diff options
-rw-r--r-- | .appveyor.yml | 17 | ||||
-rw-r--r-- | .travis.yml | 30 | ||||
-rw-r--r-- | COPYRIGHT.txt | 10 | ||||
-rw-r--r-- | SConstruct | 74 | ||||
-rw-r--r-- | core/array.cpp | 4 | ||||
-rw-r--r-- | core/bind/core_bind.cpp | 145 | ||||
-rw-r--r-- | core/bind/core_bind.h | 56 | ||||
-rw-r--r-- | core/callable.cpp | 357 | ||||
-rw-r--r-- | core/callable.h | 161 | ||||
-rw-r--r-- | core/callable_method_pointer.cpp (renamed from platform/uwp/power_uwp.cpp) | 87 | ||||
-rw-r--r-- | core/callable_method_pointer.h | 292 | ||||
-rw-r--r-- | core/class_db.cpp | 20 | ||||
-rw-r--r-- | core/class_db.h | 8 | ||||
-rw-r--r-- | core/compressed_translation.cpp | 18 | ||||
-rw-r--r-- | core/compressed_translation.h | 6 | ||||
-rw-r--r-- | core/core_string_names.cpp | 6 | ||||
-rw-r--r-- | core/core_string_names.h | 5 | ||||
-rw-r--r-- | core/crypto/crypto.cpp | 4 | ||||
-rw-r--r-- | core/crypto/crypto.h | 2 | ||||
-rw-r--r-- | core/crypto/crypto_core.cpp | 4 | ||||
-rw-r--r-- | core/crypto/hashing_context.cpp | 18 | ||||
-rw-r--r-- | core/crypto/hashing_context.h | 4 | ||||
-rw-r--r-- | core/func_ref.cpp | 6 | ||||
-rw-r--r-- | core/func_ref.h | 2 | ||||
-rw-r--r-- | core/global_constants.cpp | 37 | ||||
-rw-r--r-- | core/image.cpp | 333 | ||||
-rw-r--r-- | core/image.h | 43 | ||||
-rw-r--r-- | core/io/config_file.cpp | 8 | ||||
-rw-r--r-- | core/io/config_file.h | 4 | ||||
-rw-r--r-- | core/io/dtls_server.cpp (renamed from platform/windows/power_windows.h) | 38 | ||||
-rw-r--r-- | core/io/dtls_server.h | 57 | ||||
-rw-r--r-- | core/io/file_access_buffered.cpp | 4 | ||||
-rw-r--r-- | core/io/file_access_buffered.h | 2 | ||||
-rw-r--r-- | core/io/file_access_buffered_fa.h | 4 | ||||
-rw-r--r-- | core/io/http_client.cpp | 26 | ||||
-rw-r--r-- | core/io/http_client.h | 6 | ||||
-rw-r--r-- | core/io/json.cpp | 10 | ||||
-rw-r--r-- | core/io/marshalls.cpp | 293 | ||||
-rw-r--r-- | core/io/multiplayer_api.cpp | 157 | ||||
-rw-r--r-- | core/io/multiplayer_api.h | 2 | ||||
-rw-r--r-- | core/io/net_socket.h | 2 | ||||
-rw-r--r-- | core/io/packet_peer.cpp | 20 | ||||
-rw-r--r-- | core/io/packet_peer.h | 10 | ||||
-rw-r--r-- | core/io/packet_peer_dtls.cpp (renamed from platform/x11/power_x11.h) | 56 | ||||
-rw-r--r-- | core/io/packet_peer_dtls.h (renamed from core/ref_ptr.h) | 56 | ||||
-rw-r--r-- | core/io/packet_peer_udp.cpp | 75 | ||||
-rw-r--r-- | core/io/packet_peer_udp.h | 6 | ||||
-rw-r--r-- | core/io/resource_format_binary.cpp | 276 | ||||
-rw-r--r-- | core/io/resource_loader.cpp | 20 | ||||
-rw-r--r-- | core/io/resource_saver.cpp | 8 | ||||
-rw-r--r-- | core/io/stream_peer.cpp | 35 | ||||
-rw-r--r-- | core/io/stream_peer.h | 10 | ||||
-rw-r--r-- | core/io/udp_server.cpp (renamed from core/ref_ptr.cpp) | 106 | ||||
-rw-r--r-- | core/io/udp_server.h (renamed from platform/osx/power_osx.h) | 43 | ||||
-rw-r--r-- | core/make_binders.py | 24 | ||||
-rw-r--r-- | core/math/a_star.cpp | 52 | ||||
-rw-r--r-- | core/math/a_star.h | 12 | ||||
-rw-r--r-- | core/math/bsp_tree.cpp | 581 | ||||
-rw-r--r-- | core/math/bsp_tree.h | 159 | ||||
-rw-r--r-- | core/math/expression.cpp | 82 | ||||
-rw-r--r-- | core/math/expression.h | 2 | ||||
-rw-r--r-- | core/math/geometry.cpp | 49 | ||||
-rw-r--r-- | core/math/geometry.h | 16 | ||||
-rw-r--r-- | core/math/rect2.h | 5 | ||||
-rw-r--r-- | core/math/transform.h | 21 | ||||
-rw-r--r-- | core/math/transform_2d.h | 21 | ||||
-rw-r--r-- | core/math/triangle_mesh.cpp | 80 | ||||
-rw-r--r-- | core/math/triangle_mesh.h | 16 | ||||
-rw-r--r-- | core/math/vector2.h | 7 | ||||
-rw-r--r-- | core/message_queue.cpp | 105 | ||||
-rw-r--r-- | core/message_queue.h | 6 | ||||
-rw-r--r-- | core/method_bind.h | 21 | ||||
-rw-r--r-- | core/method_ptrcall.h | 336 | ||||
-rw-r--r-- | core/node_path.h | 9 | ||||
-rw-r--r-- | core/object.cpp | 456 | ||||
-rw-r--r-- | core/object.h | 129 | ||||
-rw-r--r-- | core/object_id.h | 31 | ||||
-rw-r--r-- | core/os/file_access.cpp | 8 | ||||
-rw-r--r-- | core/os/input_event.cpp | 14 | ||||
-rw-r--r-- | core/os/main_loop.cpp | 10 | ||||
-rw-r--r-- | core/os/memory.h | 2 | ||||
-rw-r--r-- | core/os/midi_driver.cpp | 4 | ||||
-rw-r--r-- | core/os/midi_driver.h | 2 | ||||
-rw-r--r-- | core/os/os.cpp | 18 | ||||
-rw-r--r-- | core/os/os.h | 17 | ||||
-rw-r--r-- | core/packed_data_container.cpp | 57 | ||||
-rw-r--r-- | core/packed_data_container.h | 6 | ||||
-rw-r--r-- | core/pool_vector.h | 648 | ||||
-rw-r--r-- | core/project_settings.cpp | 4 | ||||
-rw-r--r-- | core/reference.cpp | 3 | ||||
-rw-r--r-- | core/reference.h | 101 | ||||
-rw-r--r-- | core/register_core_types.cpp | 12 | ||||
-rw-r--r-- | core/resource.cpp | 2 | ||||
-rw-r--r-- | core/resource.h | 1 | ||||
-rw-r--r-- | core/script_debugger_remote.cpp | 1145 | ||||
-rw-r--r-- | core/script_debugger_remote.h (renamed from scene/debugger/script_debugger_remote.h) | 207 | ||||
-rw-r--r-- | core/script_language.cpp | 6 | ||||
-rw-r--r-- | core/script_language.h | 10 | ||||
-rw-r--r-- | core/translation.cpp | 18 | ||||
-rw-r--r-- | core/translation.h | 6 | ||||
-rw-r--r-- | core/type_info.h | 61 | ||||
-rw-r--r-- | core/typedefs.h | 30 | ||||
-rw-r--r-- | core/undo_redo.cpp | 48 | ||||
-rw-r--r-- | core/undo_redo.h | 14 | ||||
-rw-r--r-- | core/ustring.cpp | 1 | ||||
-rw-r--r-- | core/variant.cpp | 1620 | ||||
-rw-r--r-- | core/variant.h | 230 | ||||
-rw-r--r-- | core/variant_call.cpp | 961 | ||||
-rw-r--r-- | core/variant_op.cpp | 1741 | ||||
-rw-r--r-- | core/variant_parser.cpp | 290 | ||||
-rw-r--r-- | core/variant_parser.h | 1 | ||||
-rw-r--r-- | core/vector.h | 29 | ||||
-rw-r--r-- | doc/classes/@GlobalScope.xml | 87 | ||||
-rw-r--r-- | doc/classes/ARVRInterface.xml | 2 | ||||
-rw-r--r-- | doc/classes/ARVRPositionalTracker.xml | 2 | ||||
-rw-r--r-- | doc/classes/ARVRServer.xml | 8 | ||||
-rw-r--r-- | doc/classes/AStar.xml | 6 | ||||
-rw-r--r-- | doc/classes/AStar2D.xml | 6 | ||||
-rw-r--r-- | doc/classes/AcceptDialog.xml | 2 | ||||
-rw-r--r-- | doc/classes/AnimatedSprite.xml | 4 | ||||
-rw-r--r-- | doc/classes/AnimatedSprite3D.xml | 4 | ||||
-rw-r--r-- | doc/classes/Animation.xml | 12 | ||||
-rw-r--r-- | doc/classes/AnimationNode.xml | 12 | ||||
-rw-r--r-- | doc/classes/AnimationNodeAnimation.xml | 2 | ||||
-rw-r--r-- | doc/classes/AnimationNodeBlendTree.xml | 22 | ||||
-rw-r--r-- | doc/classes/AnimationNodeStateMachine.xml | 38 | ||||
-rw-r--r-- | doc/classes/AnimationNodeStateMachinePlayback.xml | 8 | ||||
-rw-r--r-- | doc/classes/AnimationNodeStateMachineTransition.xml | 2 | ||||
-rw-r--r-- | doc/classes/AnimationPlayer.xml | 48 | ||||
-rw-r--r-- | doc/classes/Area.xml | 4 | ||||
-rw-r--r-- | doc/classes/Area2D.xml | 2 | ||||
-rw-r--r-- | doc/classes/Array.xml | 82 | ||||
-rw-r--r-- | doc/classes/ArrayMesh.xml | 26 | ||||
-rw-r--r-- | doc/classes/AudioEffectCompressor.xml | 2 | ||||
-rw-r--r-- | doc/classes/AudioServer.xml | 6 | ||||
-rw-r--r-- | doc/classes/AudioStreamGeneratorPlayback.xml | 2 | ||||
-rw-r--r-- | doc/classes/AudioStreamPlayer.xml | 2 | ||||
-rw-r--r-- | doc/classes/AudioStreamPlayer2D.xml | 2 | ||||
-rw-r--r-- | doc/classes/AudioStreamPlayer3D.xml | 2 | ||||
-rw-r--r-- | doc/classes/AudioStreamSample.xml | 2 | ||||
-rw-r--r-- | doc/classes/BaseMaterial3D.xml | 4 | ||||
-rw-r--r-- | doc/classes/BoxContainer.xml | 6 | ||||
-rw-r--r-- | doc/classes/CPUParticles.xml | 6 | ||||
-rw-r--r-- | doc/classes/CPUParticles2D.xml | 6 | ||||
-rw-r--r-- | doc/classes/Callable.xml | 77 | ||||
-rw-r--r-- | doc/classes/CanvasItem.xml | 62 | ||||
-rw-r--r-- | doc/classes/ClassDB.xml | 60 | ||||
-rw-r--r-- | doc/classes/CollisionPolygon.xml | 2 | ||||
-rw-r--r-- | doc/classes/CollisionPolygon2D.xml | 4 | ||||
-rw-r--r-- | doc/classes/ColorPicker.xml | 4 | ||||
-rw-r--r-- | doc/classes/ConcavePolygonShape.xml | 4 | ||||
-rw-r--r-- | doc/classes/ConcavePolygonShape2D.xml | 2 | ||||
-rw-r--r-- | doc/classes/ConfigFile.xml | 8 | ||||
-rw-r--r-- | doc/classes/Control.xml | 64 | ||||
-rw-r--r-- | doc/classes/ConvexPolygonShape.xml | 2 | ||||
-rw-r--r-- | doc/classes/ConvexPolygonShape2D.xml | 4 | ||||
-rw-r--r-- | doc/classes/Crypto.xml | 4 | ||||
-rw-r--r-- | doc/classes/Curve2D.xml | 6 | ||||
-rw-r--r-- | doc/classes/Curve3D.xml | 14 | ||||
-rw-r--r-- | doc/classes/DTLSServer.xml | 90 | ||||
-rw-r--r-- | doc/classes/Dictionary.xml | 4 | ||||
-rw-r--r-- | doc/classes/EditorExportPlugin.xml | 8 | ||||
-rw-r--r-- | doc/classes/EditorFeatureProfile.xml | 16 | ||||
-rw-r--r-- | doc/classes/EditorFileDialog.xml | 2 | ||||
-rw-r--r-- | doc/classes/EditorFileSystem.xml | 4 | ||||
-rw-r--r-- | doc/classes/EditorFileSystemDirectory.xml | 2 | ||||
-rw-r--r-- | doc/classes/EditorInspectorPlugin.xml | 2 | ||||
-rw-r--r-- | doc/classes/EditorPlugin.xml | 2 | ||||
-rw-r--r-- | doc/classes/EditorProperty.xml | 18 | ||||
-rw-r--r-- | doc/classes/EditorResourcePreview.xml | 4 | ||||
-rw-r--r-- | doc/classes/EditorSettings.xml | 10 | ||||
-rw-r--r-- | doc/classes/EditorSpatialGizmo.xml | 6 | ||||
-rw-r--r-- | doc/classes/Expression.xml | 2 | ||||
-rw-r--r-- | doc/classes/File.xml | 14 | ||||
-rw-r--r-- | doc/classes/FileDialog.xml | 6 | ||||
-rw-r--r-- | doc/classes/FuncRef.xml | 2 | ||||
-rw-r--r-- | doc/classes/GIProbeData.xml | 14 | ||||
-rw-r--r-- | doc/classes/Geometry.xml | 74 | ||||
-rw-r--r-- | doc/classes/Gradient.xml | 8 | ||||
-rw-r--r-- | doc/classes/GraphEdit.xml | 28 | ||||
-rw-r--r-- | doc/classes/HTTPClient.xml | 10 | ||||
-rw-r--r-- | doc/classes/HTTPRequest.xml | 6 | ||||
-rw-r--r-- | doc/classes/HashingContext.xml | 4 | ||||
-rw-r--r-- | doc/classes/HeightMapShape.xml | 2 | ||||
-rw-r--r-- | doc/classes/Image.xml | 44 | ||||
-rw-r--r-- | doc/classes/Input.xml | 12 | ||||
-rw-r--r-- | doc/classes/InputEvent.xml | 8 | ||||
-rw-r--r-- | doc/classes/InputEventAction.xml | 2 | ||||
-rw-r--r-- | doc/classes/InputMap.xml | 20 | ||||
-rw-r--r-- | doc/classes/ItemList.xml | 2 | ||||
-rw-r--r-- | doc/classes/Line2D.xml | 2 | ||||
-rw-r--r-- | doc/classes/MainLoop.xml | 2 | ||||
-rw-r--r-- | doc/classes/Marshalls.xml | 10 | ||||
-rw-r--r-- | doc/classes/Mesh.xml | 2 | ||||
-rw-r--r-- | doc/classes/MeshDataTool.xml | 14 | ||||
-rw-r--r-- | doc/classes/MeshLibrary.xml | 5 | ||||
-rw-r--r-- | doc/classes/MonoGCHandle.xml | 13 | ||||
-rw-r--r-- | doc/classes/MultiMesh.xml | 10 | ||||
-rw-r--r-- | doc/classes/MultiplayerAPI.xml | 6 | ||||
-rw-r--r-- | doc/classes/Navigation.xml | 44 | ||||
-rw-r--r-- | doc/classes/Navigation2D.xml | 22 | ||||
-rw-r--r-- | doc/classes/Navigation2DServer.xml | 26 | ||||
-rw-r--r-- | doc/classes/NavigationAgent.xml | 4 | ||||
-rw-r--r-- | doc/classes/NavigationAgent2D.xml | 4 | ||||
-rw-r--r-- | doc/classes/NavigationMesh.xml | 10 | ||||
-rw-r--r-- | doc/classes/NavigationPolygon.xml | 32 | ||||
-rw-r--r-- | doc/classes/NavigationServer.xml | 58 | ||||
-rw-r--r-- | doc/classes/Node.xml | 38 | ||||
-rw-r--r-- | doc/classes/OS.xml | 56 | ||||
-rw-r--r-- | doc/classes/Object.xml | 55 | ||||
-rw-r--r-- | doc/classes/OccluderPolygon2D.xml | 2 | ||||
-rw-r--r-- | doc/classes/PackedByteArray.xml (renamed from doc/classes/PoolByteArray.xml) | 44 | ||||
-rw-r--r-- | doc/classes/PackedColorArray.xml (renamed from doc/classes/PoolColorArray.xml) | 30 | ||||
-rw-r--r-- | doc/classes/PackedDataContainer.xml | 2 | ||||
-rw-r--r-- | doc/classes/PackedFloat32Array.xml (renamed from doc/classes/PoolRealArray.xml) | 31 | ||||
-rw-r--r-- | doc/classes/PackedFloat64Array.xml | 114 | ||||
-rw-r--r-- | doc/classes/PackedInt32Array.xml | 114 | ||||
-rw-r--r-- | doc/classes/PackedInt64Array.xml (renamed from doc/classes/PoolIntArray.xml) | 36 | ||||
-rw-r--r-- | doc/classes/PackedScene.xml | 2 | ||||
-rw-r--r-- | doc/classes/PackedStringArray.xml (renamed from doc/classes/PoolStringArray.xml) | 39 | ||||
-rw-r--r-- | doc/classes/PackedVector2Array.xml (renamed from doc/classes/PoolVector2Array.xml) | 30 | ||||
-rw-r--r-- | doc/classes/PackedVector3Array.xml (renamed from doc/classes/PoolVector3Array.xml) | 30 | ||||
-rw-r--r-- | doc/classes/PacketPeer.xml | 4 | ||||
-rw-r--r-- | doc/classes/PacketPeerDTLS.xml | 66 | ||||
-rw-r--r-- | doc/classes/PacketPeerUDP.xml | 19 | ||||
-rw-r--r-- | doc/classes/PanoramaSky.xml | 2 | ||||
-rw-r--r-- | doc/classes/Performance.xml | 54 | ||||
-rw-r--r-- | doc/classes/Physics2DServer.xml | 6 | ||||
-rw-r--r-- | doc/classes/PhysicsServer.xml | 6 | ||||
-rw-r--r-- | doc/classes/Polygon2D.xml | 14 | ||||
-rw-r--r-- | doc/classes/PolygonPathFinder.xml | 8 | ||||
-rw-r--r-- | doc/classes/ProjectSettings.xml | 17 | ||||
-rw-r--r-- | doc/classes/Quat.xml | 4 | ||||
-rw-r--r-- | doc/classes/Rect2.xml | 14 | ||||
-rw-r--r-- | doc/classes/Rect2i.xml | 52 | ||||
-rw-r--r-- | doc/classes/ResourceFormatLoader.xml | 4 | ||||
-rw-r--r-- | doc/classes/ResourceFormatSaver.xml | 2 | ||||
-rw-r--r-- | doc/classes/ResourceLoader.xml | 4 | ||||
-rw-r--r-- | doc/classes/ResourcePreloader.xml | 14 | ||||
-rw-r--r-- | doc/classes/ResourceSaver.xml | 2 | ||||
-rw-r--r-- | doc/classes/RichTextLabel.xml | 2 | ||||
-rw-r--r-- | doc/classes/SceneState.xml | 12 | ||||
-rw-r--r-- | doc/classes/SceneTree.xml | 24 | ||||
-rw-r--r-- | doc/classes/Script.xml | 6 | ||||
-rw-r--r-- | doc/classes/ScrollContainer.xml | 4 | ||||
-rw-r--r-- | doc/classes/Shader.xml | 6 | ||||
-rw-r--r-- | doc/classes/ShaderMaterial.xml | 4 | ||||
-rw-r--r-- | doc/classes/Signal.xml | 87 | ||||
-rw-r--r-- | doc/classes/SkeletonIK.xml | 4 | ||||
-rw-r--r-- | doc/classes/Skin.xml | 18 | ||||
-rw-r--r-- | doc/classes/SpriteFrames.xml | 32 | ||||
-rw-r--r-- | doc/classes/StreamPeer.xml | 4 | ||||
-rw-r--r-- | doc/classes/StreamPeerBuffer.xml | 2 | ||||
-rw-r--r-- | doc/classes/String.xml | 124 | ||||
-rw-r--r-- | doc/classes/StringName.xml | 21 | ||||
-rw-r--r-- | doc/classes/SurfaceTool.xml | 14 | ||||
-rw-r--r-- | doc/classes/TabContainer.xml | 6 | ||||
-rw-r--r-- | doc/classes/Tabs.xml | 6 | ||||
-rw-r--r-- | doc/classes/TextEdit.xml | 4 | ||||
-rw-r--r-- | doc/classes/Texture2D.xml | 2 | ||||
-rw-r--r-- | doc/classes/TextureLayered.xml | 2 | ||||
-rw-r--r-- | doc/classes/Theme.xml | 108 | ||||
-rw-r--r-- | doc/classes/Thread.xml | 2 | ||||
-rw-r--r-- | doc/classes/Transform.xml | 8 | ||||
-rw-r--r-- | doc/classes/Transform2D.xml | 8 | ||||
-rw-r--r-- | doc/classes/Translation.xml | 12 | ||||
-rw-r--r-- | doc/classes/TranslationServer.xml | 4 | ||||
-rw-r--r-- | doc/classes/TreeItem.xml | 4 | ||||
-rw-r--r-- | doc/classes/Tween.xml | 18 | ||||
-rw-r--r-- | doc/classes/UDPServer.xml | 98 | ||||
-rw-r--r-- | doc/classes/UndoRedo.xml | 8 | ||||
-rw-r--r-- | doc/classes/Vector2.xml | 14 | ||||
-rw-r--r-- | doc/classes/Vector2i.xml | 61 | ||||
-rw-r--r-- | doc/classes/Vector3.xml | 14 | ||||
-rw-r--r-- | doc/classes/Vector3i.xml | 72 | ||||
-rw-r--r-- | doc/classes/VideoPlayer.xml | 2 | ||||
-rw-r--r-- | doc/classes/Viewport.xml | 2 | ||||
-rw-r--r-- | doc/classes/VisualServer.xml | 72 | ||||
-rw-r--r-- | doc/classes/VisualShader.xml | 2 | ||||
-rw-r--r-- | doc/classes/VisualShaderNode.xml | 13 | ||||
-rw-r--r-- | doc/classes/VisualShaderNodeCompare.xml | 2 | ||||
-rw-r--r-- | doc/classes/VisualShaderNodeCustom.xml | 16 | ||||
-rw-r--r-- | doc/classes/VisualShaderNodeFloatConstant.xml (renamed from doc/classes/VisualShaderNodeScalarConstant.xml) | 5 | ||||
-rw-r--r-- | doc/classes/VisualShaderNodeFloatFunc.xml | 116 | ||||
-rw-r--r-- | doc/classes/VisualShaderNodeFloatOp.xml | 50 | ||||
-rw-r--r-- | doc/classes/VisualShaderNodeFloatUniform.xml (renamed from doc/classes/VisualShaderNodeScalarUniform.xml) | 6 | ||||
-rw-r--r-- | doc/classes/VisualShaderNodeIf.xml | 2 | ||||
-rw-r--r-- | doc/classes/VisualShaderNodeInput.xml | 4 | ||||
-rw-r--r-- | doc/classes/VisualShaderNodeIntConstant.xml | 20 | ||||
-rw-r--r-- | doc/classes/VisualShaderNodeIntFunc.xml | 32 | ||||
-rw-r--r-- | doc/classes/VisualShaderNodeIntOp.xml | 41 | ||||
-rw-r--r-- | doc/classes/VisualShaderNodeIntUniform.xml | 38 | ||||
-rw-r--r-- | doc/classes/VisualShaderNodeScalarFunc.xml | 81 | ||||
-rw-r--r-- | doc/classes/VisualShaderNodeScalarOp.xml | 37 | ||||
-rw-r--r-- | doc/classes/XMLParser.xml | 2 | ||||
-rw-r--r-- | drivers/alsamidi/midi_driver_alsamidi.cpp | 4 | ||||
-rw-r--r-- | drivers/alsamidi/midi_driver_alsamidi.h | 2 | ||||
-rw-r--r-- | drivers/coremidi/midi_driver_coremidi.cpp | 4 | ||||
-rw-r--r-- | drivers/coremidi/midi_driver_coremidi.h | 2 | ||||
-rw-r--r-- | drivers/dummy/rasterizer_dummy.h | 44 | ||||
-rw-r--r-- | drivers/dummy/texture_loader_dummy.cpp | 2 | ||||
-rw-r--r-- | drivers/gles2/rasterizer_scene_gles2.cpp | 6 | ||||
-rw-r--r-- | drivers/gles2/rasterizer_storage_gles2.cpp | 110 | ||||
-rw-r--r-- | drivers/gles2/rasterizer_storage_gles2.h | 39 | ||||
-rw-r--r-- | drivers/png/image_loader_png.cpp | 26 | ||||
-rw-r--r-- | drivers/png/image_loader_png.h | 4 | ||||
-rw-r--r-- | drivers/png/png_driver_common.cpp | 20 | ||||
-rw-r--r-- | drivers/png/png_driver_common.h | 3 | ||||
-rw-r--r-- | drivers/png/resource_saver_png.cpp | 12 | ||||
-rw-r--r-- | drivers/png/resource_saver_png.h | 2 | ||||
-rw-r--r-- | drivers/spirv-reflect/SCsub | 3 | ||||
-rw-r--r-- | drivers/unix/net_socket_posix.cpp | 15 | ||||
-rw-r--r-- | drivers/unix/net_socket_posix.h | 2 | ||||
-rw-r--r-- | drivers/vulkan/SCsub | 12 | ||||
-rw-r--r-- | drivers/vulkan/rendering_device_vulkan.cpp | 102 | ||||
-rw-r--r-- | drivers/vulkan/rendering_device_vulkan.h | 24 | ||||
-rw-r--r-- | drivers/vulkan/vulkan_context.cpp | 131 | ||||
-rw-r--r-- | drivers/winmidi/midi_driver_winmidi.cpp | 4 | ||||
-rw-r--r-- | drivers/winmidi/midi_driver_winmidi.h | 2 | ||||
-rw-r--r-- | editor/SCsub | 1 | ||||
-rw-r--r-- | editor/animation_bezier_editor.cpp | 26 | ||||
-rw-r--r-- | editor/animation_track_editor.cpp | 187 | ||||
-rw-r--r-- | editor/animation_track_editor.h | 2 | ||||
-rw-r--r-- | editor/animation_track_editor_plugins.cpp | 4 | ||||
-rw-r--r-- | editor/array_property_edit.cpp | 6 | ||||
-rw-r--r-- | editor/code_editor.cpp | 74 | ||||
-rw-r--r-- | editor/connections_dialog.cpp | 94 | ||||
-rw-r--r-- | editor/connections_dialog.h | 37 | ||||
-rw-r--r-- | editor/create_dialog.cpp | 24 | ||||
-rw-r--r-- | editor/debugger/SCsub | 5 | ||||
-rw-r--r-- | editor/debugger/editor_debugger_inspector.cpp | 277 | ||||
-rw-r--r-- | editor/debugger/editor_debugger_inspector.h | 98 | ||||
-rw-r--r-- | editor/debugger/editor_debugger_node.cpp | 591 | ||||
-rw-r--r-- | editor/debugger/editor_debugger_node.h | 177 | ||||
-rw-r--r-- | editor/debugger/editor_debugger_tree.cpp | 274 | ||||
-rw-r--r-- | editor/debugger/editor_debugger_tree.h (renamed from platform/android/power_android.h) | 74 | ||||
-rw-r--r-- | editor/debugger/script_editor_debugger.cpp (renamed from editor/script_editor_debugger.cpp) | 1665 | ||||
-rw-r--r-- | editor/debugger/script_editor_debugger.h (renamed from editor/script_editor_debugger.h) | 113 | ||||
-rw-r--r-- | editor/dependency_editor.cpp | 16 | ||||
-rw-r--r-- | editor/doc/doc_data.cpp | 15 | ||||
-rw-r--r-- | editor/doc/doc_dump.cpp | 23 | ||||
-rw-r--r-- | editor/editor_about.cpp | 2 | ||||
-rw-r--r-- | editor/editor_asset_installer.cpp | 2 | ||||
-rw-r--r-- | editor/editor_audio_buses.cpp | 56 | ||||
-rw-r--r-- | editor/editor_autoload_settings.cpp | 24 | ||||
-rw-r--r-- | editor/editor_data.cpp | 8 | ||||
-rw-r--r-- | editor/editor_dir_dialog.cpp | 20 | ||||
-rw-r--r-- | editor/editor_export.cpp | 12 | ||||
-rw-r--r-- | editor/editor_export.h | 6 | ||||
-rw-r--r-- | editor/editor_feature_profile.cpp | 40 | ||||
-rw-r--r-- | editor/editor_file_dialog.cpp | 66 | ||||
-rw-r--r-- | editor/editor_file_system.cpp | 4 | ||||
-rw-r--r-- | editor/editor_folding.cpp | 22 | ||||
-rw-r--r-- | editor/editor_folding.h | 4 | ||||
-rw-r--r-- | editor/editor_help.cpp | 20 | ||||
-rw-r--r-- | editor/editor_help_search.cpp | 16 | ||||
-rw-r--r-- | editor/editor_inspector.cpp | 100 | ||||
-rw-r--r-- | editor/editor_layouts_dialog.cpp | 4 | ||||
-rw-r--r-- | editor/editor_log.cpp | 4 | ||||
-rw-r--r-- | editor/editor_network_profiler.cpp | 6 | ||||
-rw-r--r-- | editor/editor_node.cpp | 247 | ||||
-rw-r--r-- | editor/editor_node.h | 10 | ||||
-rw-r--r-- | editor/editor_path.cpp | 6 | ||||
-rw-r--r-- | editor/editor_plugin.cpp | 8 | ||||
-rw-r--r-- | editor/editor_plugin_settings.cpp | 10 | ||||
-rw-r--r-- | editor/editor_profiler.cpp | 26 | ||||
-rw-r--r-- | editor/editor_profiler.h | 2 | ||||
-rw-r--r-- | editor/editor_properties.cpp | 201 | ||||
-rw-r--r-- | editor/editor_properties.h | 5 | ||||
-rw-r--r-- | editor/editor_properties_array_dict.cpp | 133 | ||||
-rw-r--r-- | editor/editor_run.cpp | 32 | ||||
-rw-r--r-- | editor/editor_run.h | 8 | ||||
-rw-r--r-- | editor/editor_run_native.cpp | 4 | ||||
-rw-r--r-- | editor/editor_run_script.cpp | 6 | ||||
-rw-r--r-- | editor/editor_sectioned_inspector.cpp | 4 | ||||
-rw-r--r-- | editor/editor_settings.cpp | 42 | ||||
-rw-r--r-- | editor/editor_spin_slider.cpp | 26 | ||||
-rw-r--r-- | editor/editor_sub_scene.cpp | 12 | ||||
-rw-r--r-- | editor/editor_themes.cpp | 6 | ||||
-rw-r--r-- | editor/editor_visual_profiler.cpp | 40 | ||||
-rw-r--r-- | editor/editor_visual_profiler.h | 2 | ||||
-rw-r--r-- | editor/export_template_manager.cpp | 28 | ||||
-rw-r--r-- | editor/export_template_manager.h | 4 | ||||
-rw-r--r-- | editor/filesystem_dock.cpp | 70 | ||||
-rw-r--r-- | editor/filesystem_dock.h | 2 | ||||
-rw-r--r-- | editor/find_in_files.cpp | 125 | ||||
-rw-r--r-- | editor/find_in_files.h | 22 | ||||
-rw-r--r-- | editor/groups_editor.cpp | 31 | ||||
-rw-r--r-- | editor/icons/2D.svg (renamed from editor/icons/icon_2_d.svg) | 0 | ||||
-rw-r--r-- | editor/icons/3D.svg (renamed from editor/icons/icon_3_d.svg) | 0 | ||||
-rw-r--r-- | editor/icons/AABB.svg (renamed from editor/icons/icon_a_a_b_b.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ARVRAnchor.svg (renamed from editor/icons/icon_a_r_v_r_anchor.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ARVRCamera.svg (renamed from editor/icons/icon_a_r_v_r_camera.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ARVRController.svg (renamed from editor/icons/icon_a_r_v_r_controller.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ARVROrigin.svg (renamed from editor/icons/icon_a_r_v_r_origin.svg) | 0 | ||||
-rw-r--r-- | editor/icons/AcceptDialog.svg (renamed from editor/icons/icon_accept_dialog.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ActionCopy.svg (renamed from editor/icons/icon_action_copy.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ActionCut.svg (renamed from editor/icons/icon_action_cut.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ActionPaste.svg (renamed from editor/icons/icon_action_paste.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Add.svg (renamed from editor/icons/icon_add.svg) | 0 | ||||
-rw-r--r-- | editor/icons/AddAtlasTile.svg (renamed from editor/icons/icon_add_atlas_tile.svg) | 0 | ||||
-rw-r--r-- | editor/icons/AddAutotile.svg (renamed from editor/icons/icon_add_autotile.svg) | 0 | ||||
-rw-r--r-- | editor/icons/AddSingleTile.svg (renamed from editor/icons/icon_add_single_tile.svg) | 0 | ||||
-rw-r--r-- | editor/icons/AddSplit.svg (renamed from editor/icons/icon_add_split.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Anchor.svg (renamed from editor/icons/icon_anchor.svg) | 0 | ||||
-rw-r--r-- | editor/icons/AnimatedSprite.svg (renamed from editor/icons/icon_animated_sprite.svg) | 0 | ||||
-rw-r--r-- | editor/icons/AnimatedSprite3D.svg (renamed from editor/icons/icon_animated_sprite_3d.svg) | 0 | ||||
-rw-r--r-- | editor/icons/AnimatedTexture.svg (renamed from editor/icons/icon_animated_texture.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Animation.svg (renamed from editor/icons/icon_animation.svg) | 0 | ||||
-rw-r--r-- | editor/icons/AnimationFilter.svg (renamed from editor/icons/icon_animation_filter.svg) | 0 | ||||
-rw-r--r-- | editor/icons/AnimationPlayer.svg (renamed from editor/icons/icon_animation_player.svg) | 0 | ||||
-rw-r--r-- | editor/icons/AnimationTrackGroup.svg (renamed from editor/icons/icon_animation_track_group.svg) | 0 | ||||
-rw-r--r-- | editor/icons/AnimationTrackList.svg (renamed from editor/icons/icon_animation_track_list.svg) | 0 | ||||
-rw-r--r-- | editor/icons/AnimationTree.svg (renamed from editor/icons/icon_animation_tree.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Area.svg (renamed from editor/icons/icon_area.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Area2D.svg (renamed from editor/icons/icon_area_2d.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Array.svg (renamed from editor/icons/icon_array.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ArrayMesh.svg (renamed from editor/icons/icon_array_mesh.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ArrowDown.svg (renamed from editor/icons/icon_arrow_down.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ArrowLeft.svg (renamed from editor/icons/icon_arrow_left.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ArrowRight.svg (renamed from editor/icons/icon_arrow_right.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ArrowUp.svg (renamed from editor/icons/icon_arrow_up.svg) | 0 | ||||
-rw-r--r-- | editor/icons/AssetLib.svg (renamed from editor/icons/icon_asset_lib.svg) | 0 | ||||
-rw-r--r-- | editor/icons/AtlasTexture.svg (renamed from editor/icons/icon_atlas_texture.svg) | 0 | ||||
-rw-r--r-- | editor/icons/AudioBusBypass.svg (renamed from editor/icons/icon_audio_bus_bypass.svg) | 0 | ||||
-rw-r--r-- | editor/icons/AudioBusLayout.svg (renamed from editor/icons/icon_audio_bus_layout.svg) | 0 | ||||
-rw-r--r-- | editor/icons/AudioBusMute.svg (renamed from editor/icons/icon_audio_bus_mute.svg) | 0 | ||||
-rw-r--r-- | editor/icons/AudioBusSolo.svg (renamed from editor/icons/icon_audio_bus_solo.svg) | 0 | ||||
-rw-r--r-- | editor/icons/AudioStreamOGGVorbis.svg (renamed from editor/icons/icon_audio_stream_o_g_g_vorbis.svg) | 0 | ||||
-rw-r--r-- | editor/icons/AudioStreamPlayer.svg (renamed from editor/icons/icon_audio_stream_player.svg) | 0 | ||||
-rw-r--r-- | editor/icons/AudioStreamPlayer2D.svg (renamed from editor/icons/icon_audio_stream_player_2_d.svg) | 0 | ||||
-rw-r--r-- | editor/icons/AudioStreamPlayer3D.svg (renamed from editor/icons/icon_audio_stream_player_3_d.svg) | 0 | ||||
-rw-r--r-- | editor/icons/AudioStreamSample.svg (renamed from editor/icons/icon_audio_stream_sample.svg) | 0 | ||||
-rw-r--r-- | editor/icons/AutoEnd.svg (renamed from editor/icons/icon_auto_end.svg) | 0 | ||||
-rw-r--r-- | editor/icons/AutoKey.svg (renamed from editor/icons/icon_auto_key.svg) | 0 | ||||
-rw-r--r-- | editor/icons/AutoPlay.svg (renamed from editor/icons/icon_auto_play.svg) | 0 | ||||
-rw-r--r-- | editor/icons/AutoTriangle.svg (renamed from editor/icons/icon_auto_triangle.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Back.svg (renamed from editor/icons/icon_back.svg) | 0 | ||||
-rw-r--r-- | editor/icons/BackBufferCopy.svg (renamed from editor/icons/icon_back_buffer_copy.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Bake.svg (renamed from editor/icons/icon_bake.svg) | 0 | ||||
-rw-r--r-- | editor/icons/BakedLightmap.svg (renamed from editor/icons/icon_baked_lightmap.svg) | 0 | ||||
-rw-r--r-- | editor/icons/BakedLightmapData.svg (renamed from editor/icons/icon_baked_lightmap_data.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Basis.svg (renamed from editor/icons/icon_basis.svg) | 0 | ||||
-rw-r--r-- | editor/icons/BezierHandlesBalanced.svg (renamed from editor/icons/icon_bezier_handles_balanced.svg) | 0 | ||||
-rw-r--r-- | editor/icons/BezierHandlesFree.svg (renamed from editor/icons/icon_bezier_handles_free.svg) | 0 | ||||
-rw-r--r-- | editor/icons/BezierHandlesMirror.svg (renamed from editor/icons/icon_bezier_handles_mirror.svg) | 0 | ||||
-rw-r--r-- | editor/icons/BitMap.svg (renamed from editor/icons/icon_bit_map.svg) | 0 | ||||
-rw-r--r-- | editor/icons/BitmapFont.svg (renamed from editor/icons/icon_bitmap_font.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Blend.svg (renamed from editor/icons/icon_blend.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Bone.svg (renamed from editor/icons/icon_bone.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Bone2D.svg (renamed from editor/icons/icon_bone_2_d.svg) | 0 | ||||
-rw-r--r-- | editor/icons/BoneAttachment.svg (renamed from editor/icons/icon_bone_attachment.svg) | 0 | ||||
-rw-r--r-- | editor/icons/BoneTrack.svg (renamed from editor/icons/icon_bone_track.svg) | 0 | ||||
-rw-r--r-- | editor/icons/BoxShape.svg (renamed from editor/icons/icon_box_shape.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Bucket.svg (renamed from editor/icons/icon_bucket.svg) | 0 | ||||
-rw-r--r-- | editor/icons/BusVuEmpty.svg (renamed from editor/icons/icon_bus_vu_empty.svg) | 0 | ||||
-rw-r--r-- | editor/icons/BusVuFrozen.svg (renamed from editor/icons/icon_bus_vu_frozen.svg) | 0 | ||||
-rw-r--r-- | editor/icons/BusVuFull.svg (renamed from editor/icons/icon_bus_vu_full.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Button.svg (renamed from editor/icons/icon_button.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ButtonGroup.svg (renamed from editor/icons/icon_button_group.svg) | 0 | ||||
-rw-r--r-- | editor/icons/CPUParticles.svg (renamed from editor/icons/icon_c_p_u_particles.svg) | 0 | ||||
-rw-r--r-- | editor/icons/CPUParticles2D.svg (renamed from editor/icons/icon_c_p_u_particles_2_d.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Callable.svg | 5 | ||||
-rw-r--r-- | editor/icons/Camera.svg (renamed from editor/icons/icon_camera.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Camera2D.svg (renamed from editor/icons/icon_camera_2d.svg) | 0 | ||||
-rw-r--r-- | editor/icons/CameraTexture.svg (renamed from editor/icons/icon_camera_texture.svg) | 0 | ||||
-rw-r--r-- | editor/icons/CanvasItem.svg (renamed from editor/icons/icon_canvas_item.svg) | 0 | ||||
-rw-r--r-- | editor/icons/CanvasItemMaterial.svg (renamed from editor/icons/icon_canvas_item_material.svg) | 0 | ||||
-rw-r--r-- | editor/icons/CanvasItemShader.svg (renamed from editor/icons/icon_canvas_item_shader.svg) | 0 | ||||
-rw-r--r-- | editor/icons/CanvasItemShaderGraph.svg (renamed from editor/icons/icon_canvas_item_shader_graph.svg) | 0 | ||||
-rw-r--r-- | editor/icons/CanvasLayer.svg (renamed from editor/icons/icon_canvas_layer.svg) | 0 | ||||
-rw-r--r-- | editor/icons/CanvasModulate.svg (renamed from editor/icons/icon_canvas_modulate.svg) | 0 | ||||
-rw-r--r-- | editor/icons/CapsuleMesh.svg (renamed from editor/icons/icon_capsule_mesh.svg) | 0 | ||||
-rw-r--r-- | editor/icons/CapsuleShape.svg (renamed from editor/icons/icon_capsule_shape.svg) | 0 | ||||
-rw-r--r-- | editor/icons/CapsuleShape2D.svg (renamed from editor/icons/icon_capsule_shape_2d.svg) | 0 | ||||
-rw-r--r-- | editor/icons/CenterContainer.svg (renamed from editor/icons/icon_center_container.svg) | 0 | ||||
-rw-r--r-- | editor/icons/CheckBox.svg (renamed from editor/icons/icon_check_box.svg) | 0 | ||||
-rw-r--r-- | editor/icons/CheckButton.svg (renamed from editor/icons/icon_check_button.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Checkerboard.svg (renamed from editor/icons/icon_checkerboard.svg) | 0 | ||||
-rw-r--r-- | editor/icons/CircleShape2D.svg (renamed from editor/icons/icon_circle_shape_2d.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ClassList.svg (renamed from editor/icons/icon_class_list.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Clear.svg (renamed from editor/icons/icon_clear.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ClippedCamera.svg (renamed from editor/icons/icon_clipped_camera.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Close.svg (renamed from editor/icons/icon_close.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Collapse.svg (renamed from editor/icons/icon_collapse.svg) | 0 | ||||
-rw-r--r-- | editor/icons/CollisionPolygon.svg (renamed from editor/icons/icon_collision_polygon.svg) | 0 | ||||
-rw-r--r-- | editor/icons/CollisionPolygon2D.svg (renamed from editor/icons/icon_collision_polygon_2d.svg) | 0 | ||||
-rw-r--r-- | editor/icons/CollisionShape.svg (renamed from editor/icons/icon_collision_shape.svg) | 0 | ||||
-rw-r--r-- | editor/icons/CollisionShape2D.svg (renamed from editor/icons/icon_collision_shape_2d.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Color.svg (renamed from editor/icons/icon_color.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ColorPick.svg (renamed from editor/icons/icon_color_pick.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ColorPicker.svg (renamed from editor/icons/icon_color_picker.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ColorPickerButton.svg (renamed from editor/icons/icon_color_picker_button.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ColorRamp.svg (renamed from editor/icons/icon_color_ramp.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ColorRect.svg (renamed from editor/icons/icon_color_rect.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ColorTrackVu.svg (renamed from editor/icons/icon_color_track_vu.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ConcavePolygonShape.svg (renamed from editor/icons/icon_concave_polygon_shape.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ConcavePolygonShape2D.svg (renamed from editor/icons/icon_concave_polygon_shape_2d.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ConeTwistJoint.svg (renamed from editor/icons/icon_cone_twist_joint.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ConfirmationDialog.svg (renamed from editor/icons/icon_confirmation_dialog.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Container.svg (renamed from editor/icons/icon_container.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Control.svg (renamed from editor/icons/icon_control.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ControlAlignBottomCenter.svg (renamed from editor/icons/icon_control_align_bottom_center.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ControlAlignBottomLeft.svg (renamed from editor/icons/icon_control_align_bottom_left.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ControlAlignBottomRight.svg (renamed from editor/icons/icon_control_align_bottom_right.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ControlAlignBottomWide.svg (renamed from editor/icons/icon_control_align_bottom_wide.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ControlAlignCenter.svg (renamed from editor/icons/icon_control_align_center.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ControlAlignCenterLeft.svg (renamed from editor/icons/icon_control_align_center_left.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ControlAlignCenterRight.svg (renamed from editor/icons/icon_control_align_center_right.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ControlAlignLeftCenter.svg (renamed from editor/icons/icon_control_align_left_center.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ControlAlignLeftWide.svg (renamed from editor/icons/icon_control_align_left_wide.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ControlAlignRightCenter.svg (renamed from editor/icons/icon_control_align_right_center.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ControlAlignRightWide.svg (renamed from editor/icons/icon_control_align_right_wide.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ControlAlignTopCenter.svg (renamed from editor/icons/icon_control_align_top_center.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ControlAlignTopLeft.svg (renamed from editor/icons/icon_control_align_top_left.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ControlAlignTopRight.svg (renamed from editor/icons/icon_control_align_top_right.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ControlAlignTopWide.svg (renamed from editor/icons/icon_control_align_top_wide.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ControlAlignWide.svg (renamed from editor/icons/icon_control_align_wide.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ControlHcenterWide.svg (renamed from editor/icons/icon_control_hcenter_wide.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ControlLayout.svg (renamed from editor/icons/icon_control_layout.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ControlVcenterWide.svg (renamed from editor/icons/icon_control_vcenter_wide.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ConvexPolygonShape.svg (renamed from editor/icons/icon_convex_polygon_shape.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ConvexPolygonShape2D.svg (renamed from editor/icons/icon_convex_polygon_shape_2d.svg) | 0 | ||||
-rw-r--r-- | editor/icons/CopyNodePath.svg (renamed from editor/icons/icon_copy_node_path.svg) | 0 | ||||
-rw-r--r-- | editor/icons/CreateNewSceneFrom.svg (renamed from editor/icons/icon_create_new_scene_from.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Crosshair.svg (renamed from editor/icons/icon_crosshair.svg) | 0 | ||||
-rw-r--r-- | editor/icons/CryptoKey.svg (renamed from editor/icons/icon_crypto_key.svg) | 0 | ||||
-rw-r--r-- | editor/icons/CubeMap.svg (renamed from editor/icons/icon_cube_map.svg) | 0 | ||||
-rw-r--r-- | editor/icons/CubeMesh.svg (renamed from editor/icons/icon_cube_mesh.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Curve.svg (renamed from editor/icons/icon_curve.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Curve2D.svg (renamed from editor/icons/icon_curve_2d.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Curve3D.svg (renamed from editor/icons/icon_curve_3d.svg) | 0 | ||||
-rw-r--r-- | editor/icons/CurveClose.svg (renamed from editor/icons/icon_curve_close.svg) | 0 | ||||
-rw-r--r-- | editor/icons/CurveConstant.svg (renamed from editor/icons/icon_curve_constant.svg) | 0 | ||||
-rw-r--r-- | editor/icons/CurveCreate.svg (renamed from editor/icons/icon_curve_create.svg) | 0 | ||||
-rw-r--r-- | editor/icons/CurveCurve.svg (renamed from editor/icons/icon_curve_curve.svg) | 0 | ||||
-rw-r--r-- | editor/icons/CurveDelete.svg (renamed from editor/icons/icon_curve_delete.svg) | 0 | ||||
-rw-r--r-- | editor/icons/CurveEdit.svg (renamed from editor/icons/icon_curve_edit.svg) | 0 | ||||
-rw-r--r-- | editor/icons/CurveIn.svg (renamed from editor/icons/icon_curve_in.svg) | 0 | ||||
-rw-r--r-- | editor/icons/CurveInOut.svg (renamed from editor/icons/icon_curve_in_out.svg) | 0 | ||||
-rw-r--r-- | editor/icons/CurveLinear.svg (renamed from editor/icons/icon_curve_linear.svg) | 0 | ||||
-rw-r--r-- | editor/icons/CurveOut.svg (renamed from editor/icons/icon_curve_out.svg) | 0 | ||||
-rw-r--r-- | editor/icons/CurveOutIn.svg (renamed from editor/icons/icon_curve_out_in.svg) | 0 | ||||
-rw-r--r-- | editor/icons/CurveTexture.svg (renamed from editor/icons/icon_curve_texture.svg) | 0 | ||||
-rw-r--r-- | editor/icons/CylinderMesh.svg (renamed from editor/icons/icon_cylinder_mesh.svg) | 0 | ||||
-rw-r--r-- | editor/icons/CylinderShape.svg (renamed from editor/icons/icon_cylinder_shape.svg) | 0 | ||||
-rw-r--r-- | editor/icons/DampedSpringJoint2D.svg (renamed from editor/icons/icon_damped_spring_joint_2d.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Debug.svg (renamed from editor/icons/icon_debug.svg) | 0 | ||||
-rw-r--r-- | editor/icons/DebugContinue.svg (renamed from editor/icons/icon_debug_continue.svg) | 0 | ||||
-rw-r--r-- | editor/icons/DebugNext.svg (renamed from editor/icons/icon_debug_next.svg) | 0 | ||||
-rw-r--r-- | editor/icons/DebugSkipBreakpointsOff.svg (renamed from editor/icons/icon_debug_skip_breakpoints_off.svg) | 0 | ||||
-rw-r--r-- | editor/icons/DebugSkipBreakpointsOn.svg (renamed from editor/icons/icon_debug_skip_breakpoints_on.svg) | 0 | ||||
-rw-r--r-- | editor/icons/DebugStep.svg (renamed from editor/icons/icon_debug_step.svg) | 0 | ||||
-rw-r--r-- | editor/icons/DefaultProjectIcon.svg (renamed from editor/icons/icon_default_project_icon.svg) | 0 | ||||
-rw-r--r-- | editor/icons/DeleteSplit.svg (renamed from editor/icons/icon_delete_split.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Dictionary.svg (renamed from editor/icons/icon_dictionary.svg) | 0 | ||||
-rw-r--r-- | editor/icons/DirectionalLight.svg (renamed from editor/icons/icon_directional_light.svg) | 0 | ||||
-rw-r--r-- | editor/icons/DistractionFree.svg (renamed from editor/icons/icon_distraction_free.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Duplicate.svg (renamed from editor/icons/icon_duplicate.svg) | 0 | ||||
-rw-r--r-- | editor/icons/DynamicFont.svg (renamed from editor/icons/icon_dynamic_font.svg) | 0 | ||||
-rw-r--r-- | editor/icons/DynamicFontData.svg (renamed from editor/icons/icon_dynamic_font_data.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Edit.svg (renamed from editor/icons/icon_edit.svg) | 0 | ||||
-rw-r--r-- | editor/icons/EditBezier.svg (renamed from editor/icons/icon_edit_bezier.svg) | 0 | ||||
-rw-r--r-- | editor/icons/EditInternal.svg (renamed from editor/icons/icon_edit_internal.svg) | 0 | ||||
-rw-r--r-- | editor/icons/EditKey.svg (renamed from editor/icons/icon_edit_key.svg) | 0 | ||||
-rw-r--r-- | editor/icons/EditPivot.svg (renamed from editor/icons/icon_edit_pivot.svg) | 0 | ||||
-rw-r--r-- | editor/icons/EditResource.svg (renamed from editor/icons/icon_edit_resource.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Editor3DHandle.svg (renamed from editor/icons/icon_editor_3d_handle.svg) | 0 | ||||
-rw-r--r-- | editor/icons/EditorControlAnchor.svg (renamed from editor/icons/icon_editor_control_anchor.svg) | 0 | ||||
-rw-r--r-- | editor/icons/EditorCurveHandle.svg (renamed from editor/icons/icon_editor_curve_handle.svg) | 0 | ||||
-rw-r--r-- | editor/icons/EditorHandle.svg (renamed from editor/icons/icon_editor_handle.svg) | 0 | ||||
-rw-r--r-- | editor/icons/EditorHandleAdd.svg (renamed from editor/icons/icon_editor_handle_add.svg) | 0 | ||||
-rw-r--r-- | editor/icons/EditorInternalHandle.svg (renamed from editor/icons/icon_editor_internal_handle.svg) | 0 | ||||
-rw-r--r-- | editor/icons/EditorPathSharpHandle.svg (renamed from editor/icons/icon_editor_path_sharp_handle.svg) | 0 | ||||
-rw-r--r-- | editor/icons/EditorPathSmoothHandle.svg (renamed from editor/icons/icon_editor_path_smooth_handle.svg) | 0 | ||||
-rw-r--r-- | editor/icons/EditorPivot.svg (renamed from editor/icons/icon_editor_pivot.svg) | 0 | ||||
-rw-r--r-- | editor/icons/EditorPlugin.svg (renamed from editor/icons/icon_editor_plugin.svg) | 0 | ||||
-rw-r--r-- | editor/icons/EditorPosition.svg (renamed from editor/icons/icon_editor_position.svg) | 0 | ||||
-rw-r--r-- | editor/icons/EditorPositionPrevious.svg (renamed from editor/icons/icon_editor_position_previous.svg) | 0 | ||||
-rw-r--r-- | editor/icons/EditorPositionUnselected.svg (renamed from editor/icons/icon_editor_position_unselected.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Enum.svg (renamed from editor/icons/icon_enum.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Environment.svg (renamed from editor/icons/icon_environment.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Error.svg (renamed from editor/icons/icon_error.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ErrorSign.svg (renamed from editor/icons/icon_error_sign.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ExpandBottomDock.svg (renamed from editor/icons/icon_expand_bottom_dock.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Favorites.svg (renamed from editor/icons/icon_favorites.svg) | 0 | ||||
-rw-r--r-- | editor/icons/File.svg (renamed from editor/icons/icon_file.svg) | 0 | ||||
-rw-r--r-- | editor/icons/FileBigThumb.svg (renamed from editor/icons/icon_file_big_thumb.svg) | 0 | ||||
-rw-r--r-- | editor/icons/FileBroken.svg (renamed from editor/icons/icon_file_broken.svg) | 0 | ||||
-rw-r--r-- | editor/icons/FileBrokenBigThumb.svg (renamed from editor/icons/icon_file_broken_big_thumb.svg) | 0 | ||||
-rw-r--r-- | editor/icons/FileDead.svg (renamed from editor/icons/icon_file_dead.svg) | 0 | ||||
-rw-r--r-- | editor/icons/FileDeadBigThumb.svg (renamed from editor/icons/icon_file_dead_big_thumb.svg) | 0 | ||||
-rw-r--r-- | editor/icons/FileDeadMediumThumb.svg (renamed from editor/icons/icon_file_dead_medium_thumb.svg) | 0 | ||||
-rw-r--r-- | editor/icons/FileDialog.svg (renamed from editor/icons/icon_file_dialog.svg) | 0 | ||||
-rw-r--r-- | editor/icons/FileList.svg (renamed from editor/icons/icon_file_list.svg) | 0 | ||||
-rw-r--r-- | editor/icons/FileMediumThumb.svg (renamed from editor/icons/icon_file_medium_thumb.svg) | 0 | ||||
-rw-r--r-- | editor/icons/FileThumbnail.svg (renamed from editor/icons/icon_file_thumbnail.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Filesystem.svg (renamed from editor/icons/icon_filesystem.svg) | 0 | ||||
-rw-r--r-- | editor/icons/FixedMaterial.svg (renamed from editor/icons/icon_fixed_material.svg) | 0 | ||||
-rw-r--r-- | editor/icons/FixedSpatialMaterial.svg (renamed from editor/icons/icon_fixed_spatial_material.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Folder.svg (renamed from editor/icons/icon_folder.svg) | 0 | ||||
-rw-r--r-- | editor/icons/FolderBigThumb.svg (renamed from editor/icons/icon_folder_big_thumb.svg) | 0 | ||||
-rw-r--r-- | editor/icons/FolderMediumThumb.svg (renamed from editor/icons/icon_folder_medium_thumb.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Font.svg (renamed from editor/icons/icon_font.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Forward.svg (renamed from editor/icons/icon_forward.svg) | 0 | ||||
-rw-r--r-- | editor/icons/GIProbe.svg (renamed from editor/icons/icon_g_i_probe.svg) | 0 | ||||
-rw-r--r-- | editor/icons/GIProbeData.svg (renamed from editor/icons/icon_g_i_probe_data.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Generic6DOFJoint.svg (renamed from editor/icons/icon_generic_6_d_o_f_joint.svg) | 0 | ||||
-rw-r--r-- | editor/icons/GizmoBakedLightmap.svg (renamed from editor/icons/icon_gizmo_baked_lightmap.svg) | 0 | ||||
-rw-r--r-- | editor/icons/GizmoCPUParticles.svg (renamed from editor/icons/icon_gizmo_c_p_u_particles.svg) | 0 | ||||
-rw-r--r-- | editor/icons/GizmoCamera.svg (renamed from editor/icons/icon_gizmo_camera.svg) | 0 | ||||
-rw-r--r-- | editor/icons/GizmoDirectionalLight.svg (renamed from editor/icons/icon_gizmo_directional_light.svg) | 0 | ||||
-rw-r--r-- | editor/icons/GizmoGIProbe.svg (renamed from editor/icons/icon_gizmo_g_i_probe.svg) | 0 | ||||
-rw-r--r-- | editor/icons/GizmoLight.svg (renamed from editor/icons/icon_gizmo_light.svg) | 0 | ||||
-rw-r--r-- | editor/icons/GizmoListener.svg (renamed from editor/icons/icon_gizmo_listener.svg) | 0 | ||||
-rw-r--r-- | editor/icons/GizmoParticles.svg (renamed from editor/icons/icon_gizmo_particles.svg) | 0 | ||||
-rw-r--r-- | editor/icons/GizmoReflectionProbe.svg (renamed from editor/icons/icon_gizmo_reflection_probe.svg) | 0 | ||||
-rw-r--r-- | editor/icons/GizmoSpatialSamplePlayer.svg (renamed from editor/icons/icon_gizmo_spatial_sample_player.svg) | 0 | ||||
-rw-r--r-- | editor/icons/GizmoSpotLight.svg (renamed from editor/icons/icon_gizmo_spot_light.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Godot.svg (renamed from editor/icons/icon_godot.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Gradient.svg (renamed from editor/icons/icon_gradient.svg) | 0 | ||||
-rw-r--r-- | editor/icons/GradientTexture.svg (renamed from editor/icons/icon_gradient_texture.svg) | 0 | ||||
-rw-r--r-- | editor/icons/GraphEdit.svg (renamed from editor/icons/icon_graph_edit.svg) | 0 | ||||
-rw-r--r-- | editor/icons/GraphNode.svg (renamed from editor/icons/icon_graph_node.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Grid.svg (renamed from editor/icons/icon_grid.svg) | 0 | ||||
-rw-r--r-- | editor/icons/GridContainer.svg (renamed from editor/icons/icon_grid_container.svg) | 0 | ||||
-rw-r--r-- | editor/icons/GrooveJoint2D.svg (renamed from editor/icons/icon_groove_joint_2d.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Group.svg (renamed from editor/icons/icon_group.svg) | 0 | ||||
-rw-r--r-- | editor/icons/GroupViewport.svg (renamed from editor/icons/icon_group_viewport.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Groups.svg (renamed from editor/icons/icon_groups.svg) | 0 | ||||
-rw-r--r-- | editor/icons/GuiChecked.svg (renamed from editor/icons/icon_GUI_checked.svg) | 0 | ||||
-rw-r--r-- | editor/icons/GuiClose.svg (renamed from editor/icons/icon_gui_close.svg) | 0 | ||||
-rw-r--r-- | editor/icons/GuiCloseCustomizable.svg (renamed from editor/icons/icon_gui_close_customizable.svg) | 0 | ||||
-rw-r--r-- | editor/icons/GuiDropdown.svg (renamed from editor/icons/icon_GUI_dropdown.svg) | 0 | ||||
-rw-r--r-- | editor/icons/GuiEllipsis.svg (renamed from editor/icons/icon_GUI_ellipsis.svg) | 0 | ||||
-rw-r--r-- | editor/icons/GuiGraphNodePort.svg (renamed from editor/icons/icon_gui_graph_node_port.svg) | 0 | ||||
-rw-r--r-- | editor/icons/GuiHTick.svg (renamed from editor/icons/icon_GUI_h_tick.svg) | 0 | ||||
-rw-r--r-- | editor/icons/GuiHsplitter.svg (renamed from editor/icons/icon_GUI_hsplitter.svg) | 0 | ||||
-rw-r--r-- | editor/icons/GuiMiniCheckerboard.svg (renamed from editor/icons/icon_GUI_mini_checkerboard.svg) | 0 | ||||
-rw-r--r-- | editor/icons/GuiOptionArrow.svg (renamed from editor/icons/icon_GUI_option_arrow.svg) | 0 | ||||
-rw-r--r-- | editor/icons/GuiProgressBar.svg (renamed from editor/icons/icon_GUI_progress_bar.svg) | 0 | ||||
-rw-r--r-- | editor/icons/GuiProgressFill.svg (renamed from editor/icons/icon_GUI_progress_fill.svg) | 0 | ||||
-rw-r--r-- | editor/icons/GuiRadioChecked.svg (renamed from editor/icons/icon_GUI_radio_checked.svg) | 0 | ||||
-rw-r--r-- | editor/icons/GuiRadioUnchecked.svg (renamed from editor/icons/icon_GUI_radio_unchecked.svg) | 0 | ||||
-rw-r--r-- | editor/icons/GuiResizer.svg (renamed from editor/icons/icon_gui_resizer.svg) | 0 | ||||
-rw-r--r-- | editor/icons/GuiScrollArrowLeft.svg (renamed from editor/icons/icon_GUI_scroll_arrow_left.svg) | 0 | ||||
-rw-r--r-- | editor/icons/GuiScrollArrowLeftHl.svg (renamed from editor/icons/icon_GUI_scroll_arrow_left_hl.svg) | 0 | ||||
-rw-r--r-- | editor/icons/GuiScrollArrowRight.svg (renamed from editor/icons/icon_GUI_scroll_arrow_right.svg) | 0 | ||||
-rw-r--r-- | editor/icons/GuiScrollArrowRightHl.svg (renamed from editor/icons/icon_GUI_scroll_arrow_right_hl.svg) | 0 | ||||
-rw-r--r-- | editor/icons/GuiScrollBg.svg (renamed from editor/icons/icon_GUI_scroll_bg.svg) | 0 | ||||
-rw-r--r-- | editor/icons/GuiScrollGrabber.svg (renamed from editor/icons/icon_GUI_scroll_grabber.svg) | 0 | ||||
-rw-r--r-- | editor/icons/GuiScrollGrabberHl.svg (renamed from editor/icons/icon_GUI_scroll_grabber_hl.svg) | 0 | ||||
-rw-r--r-- | editor/icons/GuiScrollGrabberPressed.svg (renamed from editor/icons/icon_GUI_scroll_grabber_pressed.svg) | 0 | ||||
-rw-r--r-- | editor/icons/GuiSliderGrabber.svg (renamed from editor/icons/icon_GUI_slider_grabber.svg) | 0 | ||||
-rw-r--r-- | editor/icons/GuiSliderGrabberHl.svg (renamed from editor/icons/icon_GUI_slider_grabber_hl.svg) | 0 | ||||
-rw-r--r-- | editor/icons/GuiSpace.svg (renamed from editor/icons/icon_GUI_space.svg) | 0 | ||||
-rw-r--r-- | editor/icons/GuiSpinboxUpdown.svg (renamed from editor/icons/icon_GUI_spinbox_updown.svg) | 0 | ||||
-rw-r--r-- | editor/icons/GuiTab.svg (renamed from editor/icons/icon_GUI_tab.svg) | 0 | ||||
-rw-r--r-- | editor/icons/GuiTabMenu.svg (renamed from editor/icons/icon_GUI_tab_menu.svg) | 0 | ||||
-rw-r--r-- | editor/icons/GuiTabMenuHl.svg (renamed from editor/icons/icon_GUI_tab_menu_hl.svg) | 0 | ||||
-rw-r--r-- | editor/icons/GuiToggleOff.svg (renamed from editor/icons/icon_GUI_toggle_off.svg) | 0 | ||||
-rw-r--r-- | editor/icons/GuiToggleOn.svg (renamed from editor/icons/icon_GUI_toggle_on.svg) | 0 | ||||
-rw-r--r-- | editor/icons/GuiTreeArrowDown.svg (renamed from editor/icons/icon_GUI_tree_arrow_down.svg) | 0 | ||||
-rw-r--r-- | editor/icons/GuiTreeArrowRight.svg (renamed from editor/icons/icon_GUI_tree_arrow_right.svg) | 0 | ||||
-rw-r--r-- | editor/icons/GuiTreeArrowUp.svg (renamed from editor/icons/icon_GUI_tree_arrow_up.svg) | 0 | ||||
-rw-r--r-- | editor/icons/GuiTreeUpdown.svg (renamed from editor/icons/icon_GUI_tree_updown.svg) | 0 | ||||
-rw-r--r-- | editor/icons/GuiUnchecked.svg (renamed from editor/icons/icon_GUI_unchecked.svg) | 0 | ||||
-rw-r--r-- | editor/icons/GuiVTick.svg (renamed from editor/icons/icon_GUI_v_tick.svg) | 0 | ||||
-rw-r--r-- | editor/icons/GuiViewportHdiagsplitter.svg (renamed from editor/icons/icon_GUI_viewport_hdiagsplitter.svg) | 0 | ||||
-rw-r--r-- | editor/icons/GuiViewportVdiagsplitter.svg (renamed from editor/icons/icon_GUI_viewport_vdiagsplitter.svg) | 0 | ||||
-rw-r--r-- | editor/icons/GuiViewportVhsplitter.svg (renamed from editor/icons/icon_GUI_viewport_vhsplitter.svg) | 0 | ||||
-rw-r--r-- | editor/icons/GuiVisibilityHidden.svg (renamed from editor/icons/icon_GUI_visibility_hidden.svg) | 0 | ||||
-rw-r--r-- | editor/icons/GuiVisibilityVisible.svg (renamed from editor/icons/icon_GUI_visibility_visible.svg) | 0 | ||||
-rw-r--r-- | editor/icons/GuiVisibilityXray.svg (renamed from editor/icons/icon_GUI_visibility_xray.svg) | 0 | ||||
-rw-r--r-- | editor/icons/GuiVsplitBg.svg (renamed from editor/icons/icon_GUI_vsplit_bg.svg) | 0 | ||||
-rw-r--r-- | editor/icons/GuiVsplitter.svg (renamed from editor/icons/icon_GUI_vsplitter.svg) | 0 | ||||
-rw-r--r-- | editor/icons/HBoxContainer.svg (renamed from editor/icons/icon_h_box_container.svg) | 0 | ||||
-rw-r--r-- | editor/icons/HScrollBar.svg (renamed from editor/icons/icon_h_scroll_bar.svg) | 0 | ||||
-rw-r--r-- | editor/icons/HSeparator.svg (renamed from editor/icons/icon_h_separator.svg) | 0 | ||||
-rw-r--r-- | editor/icons/HSlider.svg (renamed from editor/icons/icon_h_slider.svg) | 0 | ||||
-rw-r--r-- | editor/icons/HSplitContainer.svg (renamed from editor/icons/icon_h_split_container.svg) | 0 | ||||
-rw-r--r-- | editor/icons/HTTPRequest.svg (renamed from editor/icons/icon_h_t_t_p_request.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Headphones.svg (renamed from editor/icons/icon_headphones.svg) | 0 | ||||
-rw-r--r-- | editor/icons/HeightMapShape.svg (renamed from editor/icons/icon_height_map_shape.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Help.svg (renamed from editor/icons/icon_help.svg) | 0 | ||||
-rw-r--r-- | editor/icons/HelpSearch.svg (renamed from editor/icons/icon_help_search.svg) | 0 | ||||
-rw-r--r-- | editor/icons/HingeJoint.svg (renamed from editor/icons/icon_hinge_joint.svg) | 0 | ||||
-rw-r--r-- | editor/icons/History.svg (renamed from editor/icons/icon_history.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Hsize.svg (renamed from editor/icons/icon_hsize.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Image.svg (renamed from editor/icons/icon_image.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ImageTexture.svg (renamed from editor/icons/icon_image_texture.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ImmediateGeometry.svg (renamed from editor/icons/icon_immediate_geometry.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ImportCheck.svg (renamed from editor/icons/icon_import_check.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ImportFail.svg (renamed from editor/icons/icon_import_fail.svg) | 0 | ||||
-rw-r--r-- | editor/icons/InformationSign.svg (renamed from editor/icons/icon_information_sign.svg) | 0 | ||||
-rw-r--r-- | editor/icons/InsertAfter.svg (renamed from editor/icons/icon_insert_after.svg) | 0 | ||||
-rw-r--r-- | editor/icons/InsertBefore.svg (renamed from editor/icons/icon_insert_before.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Instance.svg (renamed from editor/icons/icon_instance.svg) | 0 | ||||
-rw-r--r-- | editor/icons/InstanceOptions.svg (renamed from editor/icons/icon_instance_options.svg) | 0 | ||||
-rw-r--r-- | editor/icons/InterpCubic.svg (renamed from editor/icons/icon_interp_cubic.svg) | 0 | ||||
-rw-r--r-- | editor/icons/InterpLinear.svg (renamed from editor/icons/icon_interp_linear.svg) | 0 | ||||
-rw-r--r-- | editor/icons/InterpRaw.svg (renamed from editor/icons/icon_interp_raw.svg) | 0 | ||||
-rw-r--r-- | editor/icons/InterpWrapClamp.svg (renamed from editor/icons/icon_interp_wrap_clamp.svg) | 0 | ||||
-rw-r--r-- | editor/icons/InterpWrapLoop.svg (renamed from editor/icons/icon_interp_wrap_loop.svg) | 0 | ||||
-rw-r--r-- | editor/icons/InterpolatedCamera.svg (renamed from editor/icons/icon_interpolated_camera.svg) | 0 | ||||
-rw-r--r-- | editor/icons/InverseKinematics.svg (renamed from editor/icons/icon_inverse_kinematics.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Issue.svg (renamed from editor/icons/icon_issue.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ItemList.svg (renamed from editor/icons/icon_item_list.svg) | 0 | ||||
-rw-r--r-- | editor/icons/JoyAxis.svg (renamed from editor/icons/icon_joy_axis.svg) | 0 | ||||
-rw-r--r-- | editor/icons/JoyButton.svg (renamed from editor/icons/icon_joy_button.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Joypad.svg (renamed from editor/icons/icon_joypad.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Key.svg (renamed from editor/icons/icon_key.svg) | 0 | ||||
-rw-r--r-- | editor/icons/KeyAnimation.svg (renamed from editor/icons/icon_key_animation.svg) | 0 | ||||
-rw-r--r-- | editor/icons/KeyAudio.svg (renamed from editor/icons/icon_key_audio.svg) | 0 | ||||
-rw-r--r-- | editor/icons/KeyBezier.svg (renamed from editor/icons/icon_key_bezier.svg) | 0 | ||||
-rw-r--r-- | editor/icons/KeyBezierHandle.svg (renamed from editor/icons/icon_key_bezier_handle.svg) | 0 | ||||
-rw-r--r-- | editor/icons/KeyBezierPoint.svg (renamed from editor/icons/icon_key_bezier_point.svg) | 0 | ||||
-rw-r--r-- | editor/icons/KeyBezierSelected.svg (renamed from editor/icons/icon_key_bezier_selected.svg) | 0 | ||||
-rw-r--r-- | editor/icons/KeyCall.svg (renamed from editor/icons/icon_key_call.svg) | 0 | ||||
-rw-r--r-- | editor/icons/KeyHover.svg (renamed from editor/icons/icon_key_hover.svg) | 0 | ||||
-rw-r--r-- | editor/icons/KeyInvalid.svg (renamed from editor/icons/icon_key_invalid.svg) | 0 | ||||
-rw-r--r-- | editor/icons/KeyNext.svg (renamed from editor/icons/icon_key_next.svg) | 0 | ||||
-rw-r--r-- | editor/icons/KeyPosition.svg (renamed from editor/icons/icon_key_position.svg) | 0 | ||||
-rw-r--r-- | editor/icons/KeyRotation.svg (renamed from editor/icons/icon_key_rotation.svg) | 0 | ||||
-rw-r--r-- | editor/icons/KeyScale.svg (renamed from editor/icons/icon_key_scale.svg) | 0 | ||||
-rw-r--r-- | editor/icons/KeySelected.svg (renamed from editor/icons/icon_key_selected.svg) | 0 | ||||
-rw-r--r-- | editor/icons/KeyValue.svg (renamed from editor/icons/icon_key_value.svg) | 0 | ||||
-rw-r--r-- | editor/icons/KeyXform.svg (renamed from editor/icons/icon_key_xform.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Keyboard.svg (renamed from editor/icons/icon_keyboard.svg) | 0 | ||||
-rw-r--r-- | editor/icons/KinematicBody.svg (renamed from editor/icons/icon_kinematic_body.svg) | 0 | ||||
-rw-r--r-- | editor/icons/KinematicBody2D.svg (renamed from editor/icons/icon_kinematic_body_2d.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Label.svg (renamed from editor/icons/icon_label.svg) | 0 | ||||
-rw-r--r-- | editor/icons/LargeTexture.svg (renamed from editor/icons/icon_large_texture.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Light2D.svg (renamed from editor/icons/icon_light_2d.svg) | 0 | ||||
-rw-r--r-- | editor/icons/LightOccluder2D.svg (renamed from editor/icons/icon_light_occluder_2d.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Line2D.svg (renamed from editor/icons/icon_line_2d.svg) | 0 | ||||
-rw-r--r-- | editor/icons/LineEdit.svg (renamed from editor/icons/icon_line_edit.svg) | 0 | ||||
-rw-r--r-- | editor/icons/LineShape2D.svg (renamed from editor/icons/icon_line_shape_2d.svg) | 0 | ||||
-rw-r--r-- | editor/icons/LinkButton.svg (renamed from editor/icons/icon_link_button.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ListSelect.svg (renamed from editor/icons/icon_list_select.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Listener.svg (renamed from editor/icons/icon_listener.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Load.svg (renamed from editor/icons/icon_load.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Lock.svg (renamed from editor/icons/icon_lock.svg) | 0 | ||||
-rw-r--r-- | editor/icons/LockViewport.svg (renamed from editor/icons/icon_lock_viewport.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Logo.svg (renamed from editor/icons/icon_logo.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Loop.svg (renamed from editor/icons/icon_loop.svg) | 0 | ||||
-rw-r--r-- | editor/icons/LoopInterpolation.svg (renamed from editor/icons/icon_loop_interpolation.svg) | 0 | ||||
-rw-r--r-- | editor/icons/MainPlay.svg (renamed from editor/icons/icon_main_play.svg) | 0 | ||||
-rw-r--r-- | editor/icons/MarginContainer.svg (renamed from editor/icons/icon_margin_container.svg) | 0 | ||||
-rw-r--r-- | editor/icons/MatchCase.svg (renamed from editor/icons/icon_match_case.svg) | 0 | ||||
-rw-r--r-- | editor/icons/MaterialPreviewCube.svg (renamed from editor/icons/icon_material_preview_cube.svg) | 0 | ||||
-rw-r--r-- | editor/icons/MaterialPreviewCubeOff.svg (renamed from editor/icons/icon_material_preview_cube_off.svg) | 0 | ||||
-rw-r--r-- | editor/icons/MaterialPreviewLight1.svg (renamed from editor/icons/icon_material_preview_light_1.svg) | 0 | ||||
-rw-r--r-- | editor/icons/MaterialPreviewLight1Off.svg (renamed from editor/icons/icon_material_preview_light_1_off.svg) | 0 | ||||
-rw-r--r-- | editor/icons/MaterialPreviewLight2.svg (renamed from editor/icons/icon_material_preview_light_2.svg) | 0 | ||||
-rw-r--r-- | editor/icons/MaterialPreviewLight2Off.svg (renamed from editor/icons/icon_material_preview_light_2_off.svg) | 0 | ||||
-rw-r--r-- | editor/icons/MaterialPreviewSphere.svg (renamed from editor/icons/icon_material_preview_sphere.svg) | 0 | ||||
-rw-r--r-- | editor/icons/MaterialPreviewSphereOff.svg (renamed from editor/icons/icon_material_preview_sphere_off.svg) | 0 | ||||
-rw-r--r-- | editor/icons/MemberConstant.svg (renamed from editor/icons/icon_member_constant.svg) | 0 | ||||
-rw-r--r-- | editor/icons/MemberMethod.svg (renamed from editor/icons/icon_member_method.svg) | 0 | ||||
-rw-r--r-- | editor/icons/MemberProperty.svg (renamed from editor/icons/icon_member_property.svg) | 0 | ||||
-rw-r--r-- | editor/icons/MemberSignal.svg (renamed from editor/icons/icon_member_signal.svg) | 0 | ||||
-rw-r--r-- | editor/icons/MemberTheme.svg (renamed from editor/icons/icon_member_theme.svg) | 0 | ||||
-rw-r--r-- | editor/icons/MenuButton.svg (renamed from editor/icons/icon_menu_button.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Mesh.svg (renamed from editor/icons/icon_mesh.svg) | 0 | ||||
-rw-r--r-- | editor/icons/MeshInstance.svg (renamed from editor/icons/icon_mesh_instance.svg) | 0 | ||||
-rw-r--r-- | editor/icons/MeshInstance2D.svg (renamed from editor/icons/icon_mesh_instance_2d.svg) | 0 | ||||
-rw-r--r-- | editor/icons/MeshLibrary.svg (renamed from editor/icons/icon_mesh_library.svg) | 0 | ||||
-rw-r--r-- | editor/icons/MeshTexture.svg (renamed from editor/icons/icon_mesh_texture.svg) | 0 | ||||
-rw-r--r-- | editor/icons/MiniObject.svg (renamed from editor/icons/icon_mini_object.svg) | 0 | ||||
-rw-r--r-- | editor/icons/MirrorX.svg (renamed from editor/icons/icon_mirror_x.svg) | 0 | ||||
-rw-r--r-- | editor/icons/MirrorY.svg (renamed from editor/icons/icon_mirror_y.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Mouse.svg (renamed from editor/icons/icon_mouse.svg) | 0 | ||||
-rw-r--r-- | editor/icons/MoveDown.svg (renamed from editor/icons/icon_move_down.svg) | 0 | ||||
-rw-r--r-- | editor/icons/MoveLeft.svg (renamed from editor/icons/icon_move_left.svg) | 0 | ||||
-rw-r--r-- | editor/icons/MovePoint.svg (renamed from editor/icons/icon_move_point.svg) | 0 | ||||
-rw-r--r-- | editor/icons/MoveRight.svg (renamed from editor/icons/icon_move_right.svg) | 0 | ||||
-rw-r--r-- | editor/icons/MoveUp.svg (renamed from editor/icons/icon_move_up.svg) | 0 | ||||
-rw-r--r-- | editor/icons/MultiEdit.svg (renamed from editor/icons/icon_multi_edit.svg) | 0 | ||||
-rw-r--r-- | editor/icons/MultiLine.svg (renamed from editor/icons/icon_multi_line.svg) | 0 | ||||
-rw-r--r-- | editor/icons/MultiMesh.svg (renamed from editor/icons/icon_multi_mesh.svg) | 0 | ||||
-rw-r--r-- | editor/icons/MultiMeshInstance.svg (renamed from editor/icons/icon_multi_mesh_instance.svg) | 0 | ||||
-rw-r--r-- | editor/icons/MultiMeshInstance2D.svg (renamed from editor/icons/icon_multi_mesh_instance_2d.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Navigation.svg (renamed from editor/icons/icon_navigation.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Navigation2D.svg (renamed from editor/icons/icon_navigation_2d.svg) | 0 | ||||
-rw-r--r-- | editor/icons/NavigationMesh.svg (renamed from editor/icons/icon_navigation_mesh.svg) | 0 | ||||
-rw-r--r-- | editor/icons/NavigationMeshInstance.svg (renamed from editor/icons/icon_navigation_mesh_instance.svg) | 0 | ||||
-rw-r--r-- | editor/icons/NavigationPolygon.svg (renamed from editor/icons/icon_navigation_polygon.svg) | 0 | ||||
-rw-r--r-- | editor/icons/NavigationPolygonInstance.svg (renamed from editor/icons/icon_navigation_polygon_instance.svg) | 0 | ||||
-rw-r--r-- | editor/icons/New.svg (renamed from editor/icons/icon_new.svg) | 0 | ||||
-rw-r--r-- | editor/icons/NewRoot.svg (renamed from editor/icons/icon_new_root.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Nil.svg (renamed from editor/icons/icon_nil.svg) | 0 | ||||
-rw-r--r-- | editor/icons/NinePatchRect.svg (renamed from editor/icons/icon_nine_patch_rect.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Node.svg (renamed from editor/icons/icon_node.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Node2D.svg (renamed from editor/icons/icon_node_2d.svg) | 0 | ||||
-rw-r--r-- | editor/icons/NodePath.svg (renamed from editor/icons/icon_node_path.svg) | 0 | ||||
-rw-r--r-- | editor/icons/NodeWarning.svg (renamed from editor/icons/icon_node_warning.svg) | 0 | ||||
-rw-r--r-- | editor/icons/NonFavorite.svg (renamed from editor/icons/icon_non_favorite.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ORMMaterial3D.svg (renamed from editor/icons/icon_o_r_m_material_3d.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Object.svg (renamed from editor/icons/icon_object.svg) | 0 | ||||
-rw-r--r-- | editor/icons/OccluderPolygon2D.svg (renamed from editor/icons/icon_occluder_polygon_2d.svg) | 0 | ||||
-rw-r--r-- | editor/icons/OmniLight.svg (renamed from editor/icons/icon_omni_light.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Onion.svg (renamed from editor/icons/icon_onion.svg) | 0 | ||||
-rw-r--r-- | editor/icons/OptionButton.svg (renamed from editor/icons/icon_option_button.svg) | 0 | ||||
-rw-r--r-- | editor/icons/OverbrightIndicator.svg (renamed from editor/icons/icon_overbright_indicator.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Override.svg (renamed from editor/icons/icon_override.svg) | 0 | ||||
-rw-r--r-- | editor/icons/PackedByteArray.svg (renamed from editor/icons/icon_pool_byte_array.svg) | 0 | ||||
-rw-r--r-- | editor/icons/PackedColorArray.svg (renamed from editor/icons/icon_pool_color_array.svg) | 0 | ||||
-rw-r--r-- | editor/icons/PackedDataContainer.svg (renamed from editor/icons/icon_packed_data_container.svg) | 0 | ||||
-rw-r--r-- | editor/icons/PackedFloat32Array.svg (renamed from editor/icons/icon_pool_real_array.svg) | 0 | ||||
-rw-r--r-- | editor/icons/PackedFloat64Array.svg | 1 | ||||
-rw-r--r-- | editor/icons/PackedInt32Array.svg (renamed from editor/icons/icon_pool_int_array.svg) | 0 | ||||
-rw-r--r-- | editor/icons/PackedInt64Array.svg | 1 | ||||
-rw-r--r-- | editor/icons/PackedScene.svg (renamed from editor/icons/icon_packed_scene.svg) | 0 | ||||
-rw-r--r-- | editor/icons/PackedStringArray.svg (renamed from editor/icons/icon_pool_string_array.svg) | 0 | ||||
-rw-r--r-- | editor/icons/PackedVector2Array.svg (renamed from editor/icons/icon_pool_vector2_array.svg) | 0 | ||||
-rw-r--r-- | editor/icons/PackedVector3Array.svg (renamed from editor/icons/icon_pool_vector3_array.svg) | 0 | ||||
-rw-r--r-- | editor/icons/PaintVertex.svg (renamed from editor/icons/icon_paint_vertex.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Panel.svg (renamed from editor/icons/icon_panel.svg) | 0 | ||||
-rw-r--r-- | editor/icons/PanelContainer.svg (renamed from editor/icons/icon_panel_container.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Panels1.svg (renamed from editor/icons/icon_panels_1.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Panels2.svg (renamed from editor/icons/icon_panels_2.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Panels2Alt.svg (renamed from editor/icons/icon_panels_2_alt.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Panels3.svg (renamed from editor/icons/icon_panels_3.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Panels3Alt.svg (renamed from editor/icons/icon_panels_3_alt.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Panels4.svg (renamed from editor/icons/icon_panels_4.svg) | 0 | ||||
-rw-r--r-- | editor/icons/PanoramaSky.svg (renamed from editor/icons/icon_panorama_sky.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ParallaxBackground.svg (renamed from editor/icons/icon_parallax_background.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ParallaxLayer.svg (renamed from editor/icons/icon_parallax_layer.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Particles.svg (renamed from editor/icons/icon_particles.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Particles2D.svg (renamed from editor/icons/icon_particles_2d.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ParticlesMaterial.svg (renamed from editor/icons/icon_particles_material.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Path.svg (renamed from editor/icons/icon_path.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Path2D.svg (renamed from editor/icons/icon_path_2d.svg) | 0 | ||||
-rw-r--r-- | editor/icons/PathFollow.svg (renamed from editor/icons/icon_path_follow.svg) | 0 | ||||
-rw-r--r-- | editor/icons/PathFollow2D.svg (renamed from editor/icons/icon_path_follow_2d.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Pause.svg (renamed from editor/icons/icon_pause.svg) | 0 | ||||
-rw-r--r-- | editor/icons/PhysicalBone.svg (renamed from editor/icons/icon_physical_bone.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Pin.svg (renamed from editor/icons/icon_pin.svg) | 0 | ||||
-rw-r--r-- | editor/icons/PinJoint.svg (renamed from editor/icons/icon_pin_joint.svg) | 0 | ||||
-rw-r--r-- | editor/icons/PinJoint2D.svg (renamed from editor/icons/icon_pin_joint_2d.svg) | 0 | ||||
-rw-r--r-- | editor/icons/PinPressed.svg (renamed from editor/icons/icon_pin_pressed.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Plane.svg (renamed from editor/icons/icon_plane.svg) | 0 | ||||
-rw-r--r-- | editor/icons/PlaneMesh.svg (renamed from editor/icons/icon_plane_mesh.svg) | 0 | ||||
-rw-r--r-- | editor/icons/PlaneShape.svg (renamed from editor/icons/icon_plane_shape.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Play.svg (renamed from editor/icons/icon_play.svg) | 0 | ||||
-rw-r--r-- | editor/icons/PlayBackwards.svg (renamed from editor/icons/icon_play_backwards.svg) | 0 | ||||
-rw-r--r-- | editor/icons/PlayCustom.svg (renamed from editor/icons/icon_play_custom.svg) | 0 | ||||
-rw-r--r-- | editor/icons/PlayOverlay.svg (renamed from editor/icons/icon_play_overlay.svg) | 0 | ||||
-rw-r--r-- | editor/icons/PlayScene.svg (renamed from editor/icons/icon_play_scene.svg) | 0 | ||||
-rw-r--r-- | editor/icons/PlayStart.svg (renamed from editor/icons/icon_play_start.svg) | 0 | ||||
-rw-r--r-- | editor/icons/PlayStartBackwards.svg (renamed from editor/icons/icon_play_start_backwards.svg) | 0 | ||||
-rw-r--r-- | editor/icons/PlayTravel.svg (renamed from editor/icons/icon_play_travel.svg) | 0 | ||||
-rw-r--r-- | editor/icons/PluginScript.svg (renamed from editor/icons/icon_plugin_script.svg) | 0 | ||||
-rw-r--r-- | editor/icons/PointMesh.svg (renamed from editor/icons/icon_point_mesh.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Polygon2D.svg (renamed from editor/icons/icon_polygon_2_d.svg) | 0 | ||||
-rw-r--r-- | editor/icons/PolygonPathFinder.svg (renamed from editor/icons/icon_polygon_path_finder.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Popup.svg (renamed from editor/icons/icon_popup.svg) | 0 | ||||
-rw-r--r-- | editor/icons/PopupDialog.svg (renamed from editor/icons/icon_popup_dialog.svg) | 0 | ||||
-rw-r--r-- | editor/icons/PopupMenu.svg (renamed from editor/icons/icon_popup_menu.svg) | 0 | ||||
-rw-r--r-- | editor/icons/PopupPanel.svg (renamed from editor/icons/icon_popup_panel.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Portal.svg (renamed from editor/icons/icon_portal.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Position2D.svg (renamed from editor/icons/icon_position_2d.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Position3D.svg (renamed from editor/icons/icon_position_3d.svg) | 0 | ||||
-rw-r--r-- | editor/icons/PrismMesh.svg (renamed from editor/icons/icon_prism_mesh.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ProceduralSky.svg (renamed from editor/icons/icon_procedural_sky.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Progress1.svg (renamed from editor/icons/icon_progress_1.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Progress2.svg (renamed from editor/icons/icon_progress_2.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Progress3.svg (renamed from editor/icons/icon_progress_3.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Progress4.svg (renamed from editor/icons/icon_progress_4.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Progress5.svg (renamed from editor/icons/icon_progress_5.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Progress6.svg (renamed from editor/icons/icon_progress_6.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Progress7.svg (renamed from editor/icons/icon_progress_7.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Progress8.svg (renamed from editor/icons/icon_progress_8.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ProgressBar.svg (renamed from editor/icons/icon_progress_bar.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ProjectIconLoading.svg (renamed from editor/icons/icon_project_icon_loading.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ProximityGroup.svg (renamed from editor/icons/icon_proximity_group.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ProxyTexture.svg (renamed from editor/icons/icon_proxy_texture.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Quad.svg (renamed from editor/icons/icon_quad.svg) | 0 | ||||
-rw-r--r-- | editor/icons/QuadMesh.svg (renamed from editor/icons/icon_quad_mesh.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Quat.svg (renamed from editor/icons/icon_quat.svg) | 0 | ||||
-rw-r--r-- | editor/icons/RID.svg (renamed from editor/icons/icon_r_i_d.svg) | 0 | ||||
-rw-r--r-- | editor/icons/RayCast.svg (renamed from editor/icons/icon_ray_cast.svg) | 0 | ||||
-rw-r--r-- | editor/icons/RayCast2D.svg (renamed from editor/icons/icon_ray_cast_2d.svg) | 0 | ||||
-rw-r--r-- | editor/icons/RayShape.svg (renamed from editor/icons/icon_ray_shape.svg) | 0 | ||||
-rw-r--r-- | editor/icons/RayShape2D.svg (renamed from editor/icons/icon_ray_shape_2d.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Rayito.svg (renamed from editor/icons/icon_rayito.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Rect2.svg (renamed from editor/icons/icon_rect2.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Rect2i.svg | 4 | ||||
-rw-r--r-- | editor/icons/RectangleShape2D.svg (renamed from editor/icons/icon_rectangle_shape_2d.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ReferenceRect.svg (renamed from editor/icons/icon_reference_rect.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ReflectionProbe.svg (renamed from editor/icons/icon_reflection_probe.svg) | 0 | ||||
-rw-r--r-- | editor/icons/RegionEdit.svg (renamed from editor/icons/icon_region_edit.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Reload.svg (renamed from editor/icons/icon_reload.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ReloadSmall.svg (renamed from editor/icons/icon_reload_small.svg) | 0 | ||||
-rw-r--r-- | editor/icons/RemoteTransform.svg (renamed from editor/icons/icon_remote_transform.svg) | 0 | ||||
-rw-r--r-- | editor/icons/RemoteTransform2D.svg (renamed from editor/icons/icon_remote_transform_2d.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Remove.svg (renamed from editor/icons/icon_remove.svg) | 0 | ||||
-rw-r--r-- | editor/icons/RemoveInternal.svg (renamed from editor/icons/icon_remove_internal.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Rename.svg (renamed from editor/icons/icon_rename.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Reparent.svg (renamed from editor/icons/icon_reparent.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ReparentToNewNode.svg (renamed from editor/icons/icon_reparent_to_new_node.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ResourcePreloader.svg (renamed from editor/icons/icon_resource_preloader.svg) | 0 | ||||
-rw-r--r-- | editor/icons/RichTextEffect.svg (renamed from editor/icons/icon_rich_text_effect.svg) | 0 | ||||
-rw-r--r-- | editor/icons/RichTextLabel.svg (renamed from editor/icons/icon_rich_text_label.svg) | 0 | ||||
-rw-r--r-- | editor/icons/RigidBody.svg (renamed from editor/icons/icon_rigid_body.svg) | 0 | ||||
-rw-r--r-- | editor/icons/RigidBody2D.svg (renamed from editor/icons/icon_rigid_body_2d.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Room.svg (renamed from editor/icons/icon_room.svg) | 0 | ||||
-rw-r--r-- | editor/icons/RoomBounds.svg (renamed from editor/icons/icon_room_bounds.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Rotate0.svg (renamed from editor/icons/icon_rotate_0.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Rotate180.svg (renamed from editor/icons/icon_rotate_180.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Rotate270.svg (renamed from editor/icons/icon_rotate_270.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Rotate90.svg (renamed from editor/icons/icon_rotate_90.svg) | 0 | ||||
-rw-r--r-- | editor/icons/RotateLeft.svg (renamed from editor/icons/icon_rotate_left.svg) | 0 | ||||
-rw-r--r-- | editor/icons/RotateRight.svg (renamed from editor/icons/icon_rotate_right.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Ruler.svg (renamed from editor/icons/icon_ruler.svg) | 0 | ||||
-rw-r--r-- | editor/icons/SampleLibrary.svg (renamed from editor/icons/icon_sample_library.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Save.svg (renamed from editor/icons/icon_save.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Script.svg (renamed from editor/icons/icon_script.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ScriptCreate.svg (renamed from editor/icons/icon_script_create.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ScriptCreateDialog.svg (renamed from editor/icons/icon_script_create_dialog.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ScriptExtend.svg (renamed from editor/icons/icon_script_extend.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ScriptRemove.svg (renamed from editor/icons/icon_script_remove.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ScrollContainer.svg (renamed from editor/icons/icon_scroll_container.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Search.svg (renamed from editor/icons/icon_search.svg) | 0 | ||||
-rw-r--r-- | editor/icons/SegmentShape2D.svg (renamed from editor/icons/icon_segment_shape_2d.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Shader.svg (renamed from editor/icons/icon_shader.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ShaderMaterial.svg (renamed from editor/icons/icon_shader_material.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ShortCut.svg (renamed from editor/icons/icon_short_cut.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Signal.svg (renamed from editor/icons/icon_signal.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Signals.svg (renamed from editor/icons/icon_signals.svg) | 0 | ||||
-rw-r--r-- | editor/icons/SignalsAndGroups.svg (renamed from editor/icons/icon_signals_and_groups.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Skeleton.svg (renamed from editor/icons/icon_skeleton.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Skeleton2D.svg (renamed from editor/icons/icon_skeleton_2d.svg) | 0 | ||||
-rw-r--r-- | editor/icons/SkeletonIK.svg (renamed from editor/icons/icon_skeleton_i_k.svg) | 0 | ||||
-rw-r--r-- | editor/icons/SliderJoint.svg (renamed from editor/icons/icon_slider_joint.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Slot.svg (renamed from editor/icons/icon_slot.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Snap.svg (renamed from editor/icons/icon_snap.svg) | 0 | ||||
-rw-r--r-- | editor/icons/SnapGrid.svg (renamed from editor/icons/icon_snap_grid.svg) | 0 | ||||
-rw-r--r-- | editor/icons/SoftBody.svg (renamed from editor/icons/icon_soft_body.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Sort.svg (renamed from editor/icons/icon_sort.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Spatial.svg (renamed from editor/icons/icon_spatial.svg) | 0 | ||||
-rw-r--r-- | editor/icons/SpatialMaterial.svg (renamed from editor/icons/icon_spatial_material.svg) | 0 | ||||
-rw-r--r-- | editor/icons/SphereMesh.svg (renamed from editor/icons/icon_sphere_mesh.svg) | 0 | ||||
-rw-r--r-- | editor/icons/SphereShape.svg (renamed from editor/icons/icon_sphere_shape.svg) | 0 | ||||
-rw-r--r-- | editor/icons/SpinBox.svg (renamed from editor/icons/icon_spin_box.svg) | 0 | ||||
-rw-r--r-- | editor/icons/SpotLight.svg (renamed from editor/icons/icon_spot_light.svg) | 0 | ||||
-rw-r--r-- | editor/icons/SpringArm.svg (renamed from editor/icons/icon_spring_arm.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Sprite.svg (renamed from editor/icons/icon_sprite.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Sprite3D.svg (renamed from editor/icons/icon_sprite_3d.svg) | 0 | ||||
-rw-r--r-- | editor/icons/SpriteFrames.svg (renamed from editor/icons/icon_sprite_frames.svg) | 0 | ||||
-rw-r--r-- | editor/icons/SpriteSheet.svg (renamed from editor/icons/icon_sprite_sheet.svg) | 0 | ||||
-rw-r--r-- | editor/icons/StandardMaterial3D.svg (renamed from editor/icons/icon_standard_material_3d.svg) | 0 | ||||
-rw-r--r-- | editor/icons/StaticBody.svg (renamed from editor/icons/icon_static_body.svg) | 0 | ||||
-rw-r--r-- | editor/icons/StaticBody2D.svg (renamed from editor/icons/icon_static_body_2d.svg) | 0 | ||||
-rw-r--r-- | editor/icons/StatusError.svg (renamed from editor/icons/icon_status_error.svg) | 0 | ||||
-rw-r--r-- | editor/icons/StatusSuccess.svg (renamed from editor/icons/icon_status_success.svg) | 0 | ||||
-rw-r--r-- | editor/icons/StatusWarning.svg (renamed from editor/icons/icon_status_warning.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Stop.svg (renamed from editor/icons/icon_stop.svg) | 0 | ||||
-rw-r--r-- | editor/icons/StreamTexture.svg (renamed from editor/icons/icon_stream_texture.svg) | 0 | ||||
-rw-r--r-- | editor/icons/String.svg (renamed from editor/icons/icon_string.svg) | 0 | ||||
-rw-r--r-- | editor/icons/StringName.svg | 4 | ||||
-rw-r--r-- | editor/icons/StyleBoxEmpty.svg (renamed from editor/icons/icon_style_box_empty.svg) | 0 | ||||
-rw-r--r-- | editor/icons/StyleBoxFlat.svg (renamed from editor/icons/icon_style_box_flat.svg) | 0 | ||||
-rw-r--r-- | editor/icons/StyleBoxLine.svg (renamed from editor/icons/icon_style_box_line.svg) | 0 | ||||
-rw-r--r-- | editor/icons/StyleBoxTexture.svg (renamed from editor/icons/icon_style_box_texture.svg) | 0 | ||||
-rw-r--r-- | editor/icons/TabContainer.svg (renamed from editor/icons/icon_tab_container.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Tabs.svg (renamed from editor/icons/icon_tabs.svg) | 0 | ||||
-rw-r--r-- | editor/icons/TestCube.svg (renamed from editor/icons/icon_test_cube.svg) | 0 | ||||
-rw-r--r-- | editor/icons/TextEdit.svg (renamed from editor/icons/icon_text_edit.svg) | 0 | ||||
-rw-r--r-- | editor/icons/TextFile.svg (renamed from editor/icons/icon_text_file.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Texture3D.svg (renamed from editor/icons/icon_texture_3_d.svg) | 0 | ||||
-rw-r--r-- | editor/icons/TextureArray.svg (renamed from editor/icons/icon_texture_array.svg) | 0 | ||||
-rw-r--r-- | editor/icons/TextureButton.svg (renamed from editor/icons/icon_texture_button.svg) | 0 | ||||
-rw-r--r-- | editor/icons/TextureProgress.svg (renamed from editor/icons/icon_texture_progress.svg) | 0 | ||||
-rw-r--r-- | editor/icons/TextureRect.svg (renamed from editor/icons/icon_texture_rect.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Theme.svg (renamed from editor/icons/icon_theme.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ThumbnailWait.svg (renamed from editor/icons/icon_thumbnail_wait.svg) | 0 | ||||
-rw-r--r-- | editor/icons/TileMap.svg (renamed from editor/icons/icon_tile_map.svg) | 0 | ||||
-rw-r--r-- | editor/icons/TileSet.svg (renamed from editor/icons/icon_tile_set.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Time.svg (renamed from editor/icons/icon_time.svg) | 0 | ||||
-rw-r--r-- | editor/icons/TimelineIndicator.svg (renamed from editor/icons/icon_timeline_indicator.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Timer.svg (renamed from editor/icons/icon_timer.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ToolAddNode.svg (renamed from editor/icons/icon_tool_add_node.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ToolButton.svg (renamed from editor/icons/icon_tool_button.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ToolConnect.svg (renamed from editor/icons/icon_tool_connect.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ToolMove.svg (renamed from editor/icons/icon_tool_move.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ToolPan.svg (renamed from editor/icons/icon_tool_pan.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ToolRotate.svg (renamed from editor/icons/icon_tool_rotate.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ToolScale.svg (renamed from editor/icons/icon_tool_scale.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ToolSelect.svg (renamed from editor/icons/icon_tool_select.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ToolTriangle.svg (renamed from editor/icons/icon_tool_triangle.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Tools.svg (renamed from editor/icons/icon_tools.svg) | 0 | ||||
-rw-r--r-- | editor/icons/TouchScreenButton.svg (renamed from editor/icons/icon_touch_screen_button.svg) | 0 | ||||
-rw-r--r-- | editor/icons/TrackAddKey.svg (renamed from editor/icons/icon_track_add_key.svg) | 0 | ||||
-rw-r--r-- | editor/icons/TrackAddKeyHl.svg (renamed from editor/icons/icon_track_add_key_hl.svg) | 0 | ||||
-rw-r--r-- | editor/icons/TrackCapture.svg (renamed from editor/icons/icon_track_capture.svg) | 0 | ||||
-rw-r--r-- | editor/icons/TrackColor.svg (renamed from editor/icons/icon_track_color.svg) | 0 | ||||
-rw-r--r-- | editor/icons/TrackContinuous.svg (renamed from editor/icons/icon_track_continuous.svg) | 0 | ||||
-rw-r--r-- | editor/icons/TrackDiscrete.svg (renamed from editor/icons/icon_track_discrete.svg) | 0 | ||||
-rw-r--r-- | editor/icons/TrackTrigger.svg (renamed from editor/icons/icon_track_trigger.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Transform.svg (renamed from editor/icons/icon_transform.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Transform2D.svg (renamed from editor/icons/icon_transform_2_D.svg) | 0 | ||||
-rw-r--r-- | editor/icons/TransitionEnd.svg (renamed from editor/icons/icon_transition_end.svg) | 0 | ||||
-rw-r--r-- | editor/icons/TransitionEndAuto.svg (renamed from editor/icons/icon_transition_end_auto.svg) | 0 | ||||
-rw-r--r-- | editor/icons/TransitionEndAutoBig.svg (renamed from editor/icons/icon_transition_end_auto_big.svg) | 0 | ||||
-rw-r--r-- | editor/icons/TransitionEndBig.svg (renamed from editor/icons/icon_transition_end_big.svg) | 0 | ||||
-rw-r--r-- | editor/icons/TransitionImmediate.svg (renamed from editor/icons/icon_transition_immediate.svg) | 0 | ||||
-rw-r--r-- | editor/icons/TransitionImmediateAuto.svg (renamed from editor/icons/icon_transition_immediate_auto.svg) | 0 | ||||
-rw-r--r-- | editor/icons/TransitionImmediateAutoBig.svg (renamed from editor/icons/icon_transition_immediate_auto_big.svg) | 0 | ||||
-rw-r--r-- | editor/icons/TransitionImmediateBig.svg (renamed from editor/icons/icon_transition_immediate_big.svg) | 0 | ||||
-rw-r--r-- | editor/icons/TransitionSync.svg (renamed from editor/icons/icon_transition_sync.svg) | 0 | ||||
-rw-r--r-- | editor/icons/TransitionSyncAuto.svg (renamed from editor/icons/icon_transition_sync_auto.svg) | 0 | ||||
-rw-r--r-- | editor/icons/TransitionSyncAutoBig.svg (renamed from editor/icons/icon_transition_sync_auto_big.svg) | 0 | ||||
-rw-r--r-- | editor/icons/TransitionSyncBig.svg (renamed from editor/icons/icon_transition_sync_big.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Translation.svg (renamed from editor/icons/icon_translation.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Transpose.svg (renamed from editor/icons/icon_transpose.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Tree.svg (renamed from editor/icons/icon_tree.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Tween.svg (renamed from editor/icons/icon_tween.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Unbone.svg (renamed from editor/icons/icon_unbone.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Ungroup.svg (renamed from editor/icons/icon_ungroup.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Unlock.svg (renamed from editor/icons/icon_unlock.svg) | 0 | ||||
-rw-r--r-- | editor/icons/UnpaintVertex.svg (renamed from editor/icons/icon_unpaint_vertex.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Uv.svg (renamed from editor/icons/icon_uv.svg) | 0 | ||||
-rw-r--r-- | editor/icons/VBoxContainer.svg (renamed from editor/icons/icon_v_box_container.svg) | 0 | ||||
-rw-r--r-- | editor/icons/VScrollBar.svg (renamed from editor/icons/icon_v_scroll_bar.svg) | 0 | ||||
-rw-r--r-- | editor/icons/VSeparator.svg (renamed from editor/icons/icon_v_separator.svg) | 0 | ||||
-rw-r--r-- | editor/icons/VSlider.svg (renamed from editor/icons/icon_v_slider.svg) | 0 | ||||
-rw-r--r-- | editor/icons/VSplitContainer.svg (renamed from editor/icons/icon_v_split_container.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Variant.svg (renamed from editor/icons/icon_variant.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Vector2.svg (renamed from editor/icons/icon_vector2.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Vector2i.svg | 5 | ||||
-rw-r--r-- | editor/icons/Vector3.svg (renamed from editor/icons/icon_vector3.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Vector3i.svg | 5 | ||||
-rw-r--r-- | editor/icons/VehicleBody.svg (renamed from editor/icons/icon_vehicle_body.svg) | 0 | ||||
-rw-r--r-- | editor/icons/VehicleWheel.svg (renamed from editor/icons/icon_vehicle_wheel.svg) | 0 | ||||
-rw-r--r-- | editor/icons/VideoPlayer.svg (renamed from editor/icons/icon_video_player.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Viewport.svg (renamed from editor/icons/icon_viewport.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ViewportContainer.svg (renamed from editor/icons/icon_viewport_container.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ViewportSpeed.svg (renamed from editor/icons/icon_viewport_speed.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ViewportTexture.svg (renamed from editor/icons/icon_viewport_texture.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ViewportZoom.svg (renamed from editor/icons/icon_viewport_zoom.svg) | 0 | ||||
-rw-r--r-- | editor/icons/VisibilityEnabler.svg (renamed from editor/icons/icon_visibility_enabler.svg) | 0 | ||||
-rw-r--r-- | editor/icons/VisibilityEnabler2D.svg (renamed from editor/icons/icon_visibility_enabler_2d.svg) | 0 | ||||
-rw-r--r-- | editor/icons/VisibilityNotifier.svg (renamed from editor/icons/icon_visibility_notifier.svg) | 0 | ||||
-rw-r--r-- | editor/icons/VisibilityNotifier2D.svg (renamed from editor/icons/icon_visibility_notifier_2d.svg) | 0 | ||||
-rw-r--r-- | editor/icons/VisualShader.svg (renamed from editor/icons/icon_visual_shader.svg) | 0 | ||||
-rw-r--r-- | editor/icons/VisualShaderPort.svg (renamed from editor/icons/icon_visual_shader_port.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Warning.svg (renamed from editor/icons/icon_warning.svg) | 0 | ||||
-rw-r--r-- | editor/icons/WindowDialog.svg (renamed from editor/icons/icon_window_dialog.svg) | 0 | ||||
-rw-r--r-- | editor/icons/World.svg (renamed from editor/icons/icon_world.svg) | 0 | ||||
-rw-r--r-- | editor/icons/World2D.svg (renamed from editor/icons/icon_world_2d.svg) | 0 | ||||
-rw-r--r-- | editor/icons/WorldEnvironment.svg (renamed from editor/icons/icon_world_environment.svg) | 0 | ||||
-rw-r--r-- | editor/icons/X509Certificate.svg (renamed from editor/icons/icon_x509_certificate.svg) | 0 | ||||
-rw-r--r-- | editor/icons/YSort.svg (renamed from editor/icons/icon_y_sort.svg) | 0 | ||||
-rw-r--r-- | editor/icons/Zoom.svg (renamed from editor/icons/icon_zoom.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ZoomLess.svg (renamed from editor/icons/icon_zoom_less.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ZoomMore.svg (renamed from editor/icons/icon_zoom_more.svg) | 0 | ||||
-rw-r--r-- | editor/icons/ZoomReset.svg (renamed from editor/icons/icon_zoom_reset.svg) | 0 | ||||
-rw-r--r-- | editor/icons/bool.svg (renamed from editor/icons/icon_bool.svg) | 0 | ||||
-rw-r--r-- | editor/icons/editor_icons_builders.py | 10 | ||||
-rw-r--r-- | editor/icons/float.svg (renamed from editor/icons/icon_float.svg) | 0 | ||||
-rw-r--r-- | editor/icons/icon_gizmo_spatial_stream_player.svg | 1 | ||||
-rw-r--r-- | editor/icons/int.svg (renamed from editor/icons/icon_int.svg) | 0 | ||||
-rw-r--r-- | editor/import/editor_import_plugin.cpp | 2 | ||||
-rw-r--r-- | editor/import/editor_scene_importer_gltf.cpp | 101 | ||||
-rw-r--r-- | editor/import/editor_scene_importer_gltf.h | 13 | ||||
-rw-r--r-- | editor/import/resource_importer_bitmask.cpp | 3 | ||||
-rw-r--r-- | editor/import/resource_importer_layered_texture.cpp | 12 | ||||
-rw-r--r-- | editor/import/resource_importer_scene.cpp | 18 | ||||
-rw-r--r-- | editor/import/resource_importer_scene.h | 3 | ||||
-rw-r--r-- | editor/import/resource_importer_texture.cpp | 36 | ||||
-rw-r--r-- | editor/import/resource_importer_texture_atlas.cpp | 26 | ||||
-rw-r--r-- | editor/import/resource_importer_wav.cpp | 16 | ||||
-rw-r--r-- | editor/import/resource_importer_wav.h | 6 | ||||
-rw-r--r-- | editor/import_dock.cpp | 74 | ||||
-rw-r--r-- | editor/import_dock.h | 1 | ||||
-rw-r--r-- | editor/inspector_dock.cpp | 35 | ||||
-rw-r--r-- | editor/inspector_dock.h | 6 | ||||
-rw-r--r-- | editor/node_dock.cpp | 4 | ||||
-rw-r--r-- | editor/plugin_config_dialog.cpp | 8 | ||||
-rw-r--r-- | editor/plugins/abstract_polygon_2d_editor.cpp | 22 | ||||
-rw-r--r-- | editor/plugins/animation_blend_space_1d_editor.cpp | 32 | ||||
-rw-r--r-- | editor/plugins/animation_blend_space_2d_editor.cpp | 52 | ||||
-rw-r--r-- | editor/plugins/animation_blend_tree_editor_plugin.cpp | 44 | ||||
-rw-r--r-- | editor/plugins/animation_player_editor_plugin.cpp | 65 | ||||
-rw-r--r-- | editor/plugins/animation_player_editor_plugin.h | 1 | ||||
-rw-r--r-- | editor/plugins/animation_state_machine_editor.cpp | 32 | ||||
-rw-r--r-- | editor/plugins/animation_tree_editor_plugin.cpp | 4 | ||||
-rw-r--r-- | editor/plugins/asset_library_editor_plugin.cpp | 112 | ||||
-rw-r--r-- | editor/plugins/asset_library_editor_plugin.h | 10 | ||||
-rw-r--r-- | editor/plugins/audio_stream_editor_plugin.cpp | 14 | ||||
-rw-r--r-- | editor/plugins/camera_editor_plugin.cpp | 2 | ||||
-rw-r--r-- | editor/plugins/canvas_item_editor_plugin.cpp | 134 | ||||
-rw-r--r-- | editor/plugins/collision_polygon_editor_plugin.cpp | 10 | ||||
-rw-r--r-- | editor/plugins/cpu_particles_2d_editor_plugin.cpp | 22 | ||||
-rw-r--r-- | editor/plugins/cpu_particles_editor_plugin.cpp | 13 | ||||
-rw-r--r-- | editor/plugins/cpu_particles_editor_plugin.h | 1 | ||||
-rw-r--r-- | editor/plugins/curve_editor_plugin.cpp | 16 | ||||
-rw-r--r-- | editor/plugins/debugger_editor_plugin.cpp (renamed from drivers/dummy/audio_driver_dummy.h) | 43 | ||||
-rw-r--r-- | editor/plugins/debugger_editor_plugin.h (renamed from platform/uwp/power_uwp.h) | 32 | ||||
-rw-r--r-- | editor/plugins/editor_preview_plugins.cpp | 31 | ||||
-rw-r--r-- | editor/plugins/gi_probe_editor_plugin.cpp | 4 | ||||
-rw-r--r-- | editor/plugins/gradient_editor_plugin.cpp | 4 | ||||
-rw-r--r-- | editor/plugins/item_list_editor_plugin.cpp | 8 | ||||
-rw-r--r-- | editor/plugins/material_editor_plugin.cpp | 8 | ||||
-rw-r--r-- | editor/plugins/mesh_editor_plugin.cpp | 4 | ||||
-rw-r--r-- | editor/plugins/mesh_instance_editor_plugin.cpp | 18 | ||||
-rw-r--r-- | editor/plugins/mesh_library_editor_plugin.cpp | 6 | ||||
-rw-r--r-- | editor/plugins/multimesh_editor_plugin.cpp | 20 | ||||
-rw-r--r-- | editor/plugins/particles_2d_editor_plugin.cpp | 28 | ||||
-rw-r--r-- | editor/plugins/particles_editor_plugin.cpp | 68 | ||||
-rw-r--r-- | editor/plugins/particles_editor_plugin.h | 6 | ||||
-rw-r--r-- | editor/plugins/path_2d_editor_plugin.cpp | 20 | ||||
-rw-r--r-- | editor/plugins/path_editor_plugin.cpp | 20 | ||||
-rw-r--r-- | editor/plugins/physical_bone_plugin.cpp | 2 | ||||
-rw-r--r-- | editor/plugins/polygon_2d_editor_plugin.cpp | 96 | ||||
-rw-r--r-- | editor/plugins/polygon_2d_editor_plugin.h | 10 | ||||
-rw-r--r-- | editor/plugins/resource_preloader_editor_plugin.cpp | 10 | ||||
-rw-r--r-- | editor/plugins/root_motion_editor_plugin.cpp | 8 | ||||
-rw-r--r-- | editor/plugins/script_editor_plugin.cpp | 268 | ||||
-rw-r--r-- | editor/plugins/script_editor_plugin.h | 22 | ||||
-rw-r--r-- | editor/plugins/script_text_editor.cpp | 133 | ||||
-rw-r--r-- | editor/plugins/script_text_editor.h | 3 | ||||
-rw-r--r-- | editor/plugins/shader_editor_plugin.cpp | 29 | ||||
-rw-r--r-- | editor/plugins/skeleton_2d_editor_plugin.cpp | 2 | ||||
-rw-r--r-- | editor/plugins/skeleton_editor_plugin.cpp | 4 | ||||
-rw-r--r-- | editor/plugins/skeleton_ik_editor_plugin.cpp | 2 | ||||
-rw-r--r-- | editor/plugins/spatial_editor_plugin.cpp | 116 | ||||
-rw-r--r-- | editor/plugins/sprite_editor_plugin.cpp | 24 | ||||
-rw-r--r-- | editor/plugins/sprite_frames_editor_plugin.cpp | 54 | ||||
-rw-r--r-- | editor/plugins/sprite_frames_editor_plugin.h | 2 | ||||
-rw-r--r-- | editor/plugins/style_box_editor_plugin.cpp | 6 | ||||
-rw-r--r-- | editor/plugins/text_editor.cpp | 31 | ||||
-rw-r--r-- | editor/plugins/text_editor.h | 3 | ||||
-rw-r--r-- | editor/plugins/texture_region_editor_plugin.cpp | 30 | ||||
-rw-r--r-- | editor/plugins/theme_editor_plugin.cpp | 12 | ||||
-rw-r--r-- | editor/plugins/tile_map_editor_plugin.cpp | 86 | ||||
-rw-r--r-- | editor/plugins/tile_map_editor_plugin.h | 8 | ||||
-rw-r--r-- | editor/plugins/tile_set_editor_plugin.cpp | 94 | ||||
-rw-r--r-- | editor/plugins/tile_set_editor_plugin.h | 6 | ||||
-rw-r--r-- | editor/plugins/version_control_editor_plugin.cpp | 24 | ||||
-rw-r--r-- | editor/plugins/visual_shader_editor_plugin.cpp | 603 | ||||
-rw-r--r-- | editor/plugins/visual_shader_editor_plugin.h | 33 | ||||
-rw-r--r-- | editor/progress_dialog.cpp | 2 | ||||
-rw-r--r-- | editor/project_export.cpp | 66 | ||||
-rw-r--r-- | editor/project_manager.cpp | 98 | ||||
-rw-r--r-- | editor/project_manager.h | 4 | ||||
-rw-r--r-- | editor/project_settings_editor.cpp | 94 | ||||
-rw-r--r-- | editor/property_editor.cpp | 114 | ||||
-rw-r--r-- | editor/property_selector.cpp | 32 | ||||
-rw-r--r-- | editor/quick_open.cpp | 12 | ||||
-rw-r--r-- | editor/rename_dialog.cpp | 58 | ||||
-rw-r--r-- | editor/reparent_dialog.cpp | 6 | ||||
-rw-r--r-- | editor/run_settings_dialog.cpp | 2 | ||||
-rw-r--r-- | editor/scene_tree_dock.cpp | 140 | ||||
-rw-r--r-- | editor/scene_tree_editor.cpp | 73 | ||||
-rw-r--r-- | editor/script_create_dialog.cpp | 39 | ||||
-rw-r--r-- | editor/settings_config_dialog.cpp | 29 | ||||
-rw-r--r-- | editor/spatial_editor_gizmos.cpp | 71 | ||||
-rw-r--r-- | editor/translations/af.po | 138 | ||||
-rw-r--r-- | editor/translations/ar.po | 142 | ||||
-rw-r--r-- | editor/translations/bg.po | 1412 | ||||
-rw-r--r-- | editor/translations/bn.po | 145 | ||||
-rw-r--r-- | editor/translations/ca.po | 441 | ||||
-rw-r--r-- | editor/translations/cs.po | 616 | ||||
-rw-r--r-- | editor/translations/da.po | 152 | ||||
-rw-r--r-- | editor/translations/de.po | 173 | ||||
-rw-r--r-- | editor/translations/de_CH.po | 130 | ||||
-rw-r--r-- | editor/translations/editor.pot | 118 | ||||
-rw-r--r-- | editor/translations/el.po | 341 | ||||
-rw-r--r-- | editor/translations/eo.po | 131 | ||||
-rw-r--r-- | editor/translations/es.po | 160 | ||||
-rw-r--r-- | editor/translations/es_AR.po | 184 | ||||
-rw-r--r-- | editor/translations/et.po | 118 | ||||
-rw-r--r-- | editor/translations/eu.po | 118 | ||||
-rw-r--r-- | editor/translations/fa.po | 137 | ||||
-rw-r--r-- | editor/translations/fi.po | 294 | ||||
-rw-r--r-- | editor/translations/fil.po | 121 | ||||
-rw-r--r-- | editor/translations/fr.po | 187 | ||||
-rw-r--r-- | editor/translations/ga.po | 124 | ||||
-rw-r--r-- | editor/translations/he.po | 133 | ||||
-rw-r--r-- | editor/translations/hi.po | 796 | ||||
-rw-r--r-- | editor/translations/hr.po | 128 | ||||
-rw-r--r-- | editor/translations/hu.po | 155 | ||||
-rw-r--r-- | editor/translations/id.po | 1243 | ||||
-rw-r--r-- | editor/translations/is.po | 119 | ||||
-rw-r--r-- | editor/translations/it.po | 164 | ||||
-rw-r--r-- | editor/translations/ja.po | 528 | ||||
-rw-r--r-- | editor/translations/ka.po | 127 | ||||
-rw-r--r-- | editor/translations/ko.po | 2681 | ||||
-rw-r--r-- | editor/translations/lt.po | 123 | ||||
-rw-r--r-- | editor/translations/lv.po | 128 | ||||
-rw-r--r-- | editor/translations/mi.po | 118 | ||||
-rw-r--r-- | editor/translations/ml.po | 118 | ||||
-rw-r--r-- | editor/translations/mr.po | 190 | ||||
-rw-r--r-- | editor/translations/ms.po | 118 | ||||
-rw-r--r-- | editor/translations/nb.po | 138 | ||||
-rw-r--r-- | editor/translations/nl.po | 157 | ||||
-rw-r--r-- | editor/translations/or.po | 118 | ||||
-rw-r--r-- | editor/translations/pl.po | 162 | ||||
-rw-r--r-- | editor/translations/pr.po | 125 | ||||
-rw-r--r-- | editor/translations/pt_BR.po | 189 | ||||
-rw-r--r-- | editor/translations/pt_PT.po | 643 | ||||
-rw-r--r-- | editor/translations/ro.po | 144 | ||||
-rw-r--r-- | editor/translations/ru.po | 197 | ||||
-rw-r--r-- | editor/translations/si.po | 118 | ||||
-rw-r--r-- | editor/translations/sk.po | 129 | ||||
-rw-r--r-- | editor/translations/sl.po | 138 | ||||
-rw-r--r-- | editor/translations/sq.po | 132 | ||||
-rw-r--r-- | editor/translations/sr_Cyrl.po | 142 | ||||
-rw-r--r-- | editor/translations/sr_Latn.po | 119 | ||||
-rw-r--r-- | editor/translations/sv.po | 136 | ||||
-rw-r--r-- | editor/translations/ta.po | 118 | ||||
-rw-r--r-- | editor/translations/te.po | 118 | ||||
-rw-r--r-- | editor/translations/th.po | 145 | ||||
-rw-r--r-- | editor/translations/tr.po | 1287 | ||||
-rw-r--r-- | editor/translations/uk.po | 163 | ||||
-rw-r--r-- | editor/translations/ur_PK.po | 127 | ||||
-rw-r--r-- | editor/translations/vi.po | 506 | ||||
-rw-r--r-- | editor/translations/zh_CN.po | 243 | ||||
-rw-r--r-- | editor/translations/zh_HK.po | 135 | ||||
-rw-r--r-- | editor/translations/zh_TW.po | 199 | ||||
-rw-r--r-- | main/main.cpp | 18 | ||||
-rw-r--r-- | main/performance.cpp | 8 | ||||
-rw-r--r-- | main/performance.h | 2 | ||||
-rw-r--r-- | main/tests/test_astar.cpp | 6 | ||||
-rw-r--r-- | main/tests/test_gdscript.cpp | 2 | ||||
-rw-r--r-- | main/tests/test_math.cpp | 18 | ||||
-rw-r--r-- | main/tests/test_physics.cpp | 8 | ||||
-rw-r--r-- | main/tests/test_physics_2d.cpp | 10 | ||||
-rw-r--r-- | main/tests/test_render.cpp | 2 | ||||
-rw-r--r-- | main/tests/test_shader_lang.cpp | 3 | ||||
-rw-r--r-- | methods.py | 24 | ||||
-rwxr-xr-x | misc/dist/osx_template.app/Contents/Info.plist | 6 | ||||
-rwxr-xr-x | misc/dist/osx_tools.app/Contents/Info.plist | 4 | ||||
-rw-r--r-- | misc/dist/shell/godot.fish | 91 | ||||
-rwxr-xr-x | misc/travis/clang-format.sh | 14 | ||||
-rw-r--r-- | modules/arkit/arkit_interface.h | 2 | ||||
-rw-r--r-- | modules/arkit/arkit_interface.mm | 4 | ||||
-rw-r--r-- | modules/assimp/editor_scene_importer_assimp.cpp | 38 | ||||
-rw-r--r-- | modules/assimp/import_utils.h | 18 | ||||
-rw-r--r-- | modules/basis_universal/SCsub | 6 | ||||
-rw-r--r-- | modules/basis_universal/register_types.cpp | 67 | ||||
-rw-r--r-- | modules/basis_universal/texture_basisu.cpp | 20 | ||||
-rw-r--r-- | modules/basis_universal/texture_basisu.h | 6 | ||||
-rw-r--r-- | modules/bmp/image_loader_bmp.cpp | 38 | ||||
-rw-r--r-- | modules/bullet/area_bullet.cpp | 2 | ||||
-rw-r--r-- | modules/bullet/rigid_body_bullet.cpp | 2 | ||||
-rw-r--r-- | modules/bullet/shape_bullet.cpp | 34 | ||||
-rw-r--r-- | modules/bullet/shape_bullet.h | 12 | ||||
-rw-r--r-- | modules/bullet/soft_body_bullet.cpp | 14 | ||||
-rw-r--r-- | modules/bullet/soft_body_bullet.h | 2 | ||||
-rw-r--r-- | modules/bullet/space_bullet.cpp | 3 | ||||
-rw-r--r-- | modules/camera/camera_ios.mm | 6 | ||||
-rw-r--r-- | modules/camera/camera_osx.mm | 10 | ||||
-rw-r--r-- | modules/csg/csg.cpp | 12 | ||||
-rw-r--r-- | modules/csg/csg.h | 4 | ||||
-rw-r--r-- | modules/csg/csg_gizmos.cpp | 4 | ||||
-rw-r--r-- | modules/csg/csg_shape.cpp | 226 | ||||
-rw-r--r-- | modules/csg/csg_shape.h | 22 | ||||
-rw-r--r-- | modules/csg/doc_classes/CSGPolygon.xml | 2 | ||||
-rw-r--r-- | modules/cvtt/image_compress_cvtt.cpp | 25 | ||||
-rw-r--r-- | modules/dds/texture_loader_dds.cpp | 14 | ||||
-rw-r--r-- | modules/enet/doc_classes/NetworkedMultiplayerENet.xml | 25 | ||||
-rw-r--r-- | modules/enet/networked_multiplayer_enet.cpp | 136 | ||||
-rw-r--r-- | modules/enet/networked_multiplayer_enet.h | 12 | ||||
-rw-r--r-- | modules/etc/image_etc.cpp | 8 | ||||
-rw-r--r-- | modules/etc/texture_loader_pkm.cpp | 7 | ||||
-rw-r--r-- | modules/gdnative/arvr/arvr_interface_gdnative.cpp | 5 | ||||
-rw-r--r-- | modules/gdnative/arvr/arvr_interface_gdnative.h | 4 | ||||
-rw-r--r-- | modules/gdnative/doc_classes/GDNative.xml | 4 | ||||
-rw-r--r-- | modules/gdnative/doc_classes/GDNativeLibrary.xml | 2 | ||||
-rw-r--r-- | modules/gdnative/doc_classes/NativeScript.xml | 6 | ||||
-rw-r--r-- | modules/gdnative/gdnative/array.cpp | 29 | ||||
-rw-r--r-- | modules/gdnative/gdnative/gdnative.cpp | 6 | ||||
-rw-r--r-- | modules/gdnative/gdnative/pool_arrays.cpp | 822 | ||||
-rw-r--r-- | modules/gdnative/gdnative/string.cpp | 30 | ||||
-rw-r--r-- | modules/gdnative/gdnative/variant.cpp | 88 | ||||
-rw-r--r-- | modules/gdnative/gdnative_api.json | 1049 | ||||
-rw-r--r-- | modules/gdnative/gdnative_library_editor_plugin.cpp | 16 | ||||
-rw-r--r-- | modules/gdnative/gdnative_library_editor_plugin.h | 2 | ||||
-rw-r--r-- | modules/gdnative/gdnative_library_singleton_editor.cpp | 4 | ||||
-rw-r--r-- | modules/gdnative/include/gdnative/array.h | 14 | ||||
-rw-r--r-- | modules/gdnative/include/gdnative/gdnative.h | 4 | ||||
-rw-r--r-- | modules/gdnative/include/gdnative/pool_arrays.h | 432 | ||||
-rw-r--r-- | modules/gdnative/include/gdnative/string.h | 6 | ||||
-rw-r--r-- | modules/gdnative/include/gdnative/variant.h | 54 | ||||
-rw-r--r-- | modules/gdnative/include/pluginscript/godot_pluginscript.h | 10 | ||||
-rw-r--r-- | modules/gdnative/include/videodecoder/godot_videodecoder.h | 2 | ||||
-rw-r--r-- | modules/gdnative/nativescript/nativescript.cpp | 32 | ||||
-rw-r--r-- | modules/gdnative/nativescript/nativescript.h | 6 | ||||
-rw-r--r-- | modules/gdnative/pluginscript/pluginscript_instance.cpp | 2 | ||||
-rw-r--r-- | modules/gdnative/pluginscript/pluginscript_instance.h | 2 | ||||
-rw-r--r-- | modules/gdnative/pluginscript/pluginscript_language.cpp | 20 | ||||
-rw-r--r-- | modules/gdnative/pluginscript/pluginscript_language.h | 2 | ||||
-rw-r--r-- | modules/gdnative/pluginscript/pluginscript_script.cpp | 24 | ||||
-rw-r--r-- | modules/gdnative/pluginscript/pluginscript_script.h | 4 | ||||
-rw-r--r-- | modules/gdnative/register_types.cpp | 2 | ||||
-rw-r--r-- | modules/gdnative/videodecoder/video_stream_gdnative.cpp | 2 | ||||
-rw-r--r-- | modules/gdnavigation/gd_navigation_server.cpp | 68 | ||||
-rw-r--r-- | modules/gdnavigation/gd_navigation_server.h | 9 | ||||
-rw-r--r-- | modules/gdnavigation/nav_map.cpp | 145 | ||||
-rw-r--r-- | modules/gdnavigation/nav_map.h | 4 | ||||
-rw-r--r-- | modules/gdnavigation/nav_region.cpp | 4 | ||||
-rw-r--r-- | modules/gdnavigation/navigation_mesh_editor_plugin.cpp | 4 | ||||
-rw-r--r-- | modules/gdnavigation/navigation_mesh_generator.cpp | 18 | ||||
-rw-r--r-- | modules/gdnavigation/navigation_mesh_generator.h | 2 | ||||
-rw-r--r-- | modules/gdnavigation/rvo_agent.cpp | 2 | ||||
-rw-r--r-- | modules/gdscript/doc_classes/@GDScript.xml | 4 | ||||
-rw-r--r-- | modules/gdscript/doc_classes/GDScript.xml | 2 | ||||
-rw-r--r-- | modules/gdscript/gdscript.cpp | 76 | ||||
-rw-r--r-- | modules/gdscript/gdscript.h | 12 | ||||
-rw-r--r-- | modules/gdscript/gdscript_compiler.cpp | 4 | ||||
-rw-r--r-- | modules/gdscript/gdscript_editor.cpp | 46 | ||||
-rw-r--r-- | modules/gdscript/gdscript_function.cpp | 149 | ||||
-rw-r--r-- | modules/gdscript/gdscript_function.h | 16 | ||||
-rw-r--r-- | modules/gdscript/gdscript_functions.cpp | 384 | ||||
-rw-r--r-- | modules/gdscript/gdscript_functions.h | 2 | ||||
-rw-r--r-- | modules/gdscript/gdscript_parser.cpp | 128 | ||||
-rw-r--r-- | modules/gdscript/gdscript_tokenizer.cpp | 38 | ||||
-rw-r--r-- | modules/gdscript/language_server/gdscript_language_protocol.cpp | 201 | ||||
-rw-r--r-- | modules/gdscript/language_server/gdscript_language_protocol.h | 40 | ||||
-rw-r--r-- | modules/gdscript/language_server/gdscript_workspace.cpp | 49 | ||||
-rw-r--r-- | modules/gdscript/language_server/gdscript_workspace.h | 5 | ||||
-rw-r--r-- | modules/glslang/SCsub | 6 | ||||
-rw-r--r-- | modules/glslang/register_types.cpp | 8 | ||||
-rw-r--r-- | modules/gridmap/grid_map.cpp | 12 | ||||
-rw-r--r-- | modules/gridmap/grid_map_editor_plugin.cpp | 36 | ||||
-rw-r--r-- | modules/hdr/image_loader_hdr.cpp | 6 | ||||
-rw-r--r-- | modules/jpg/image_loader_jpegd.cpp | 13 | ||||
-rw-r--r-- | modules/mbedtls/crypto_mbedtls.cpp | 32 | ||||
-rw-r--r-- | modules/mbedtls/crypto_mbedtls.h | 2 | ||||
-rw-r--r-- | modules/mbedtls/dtls_server_mbedtls.cpp (renamed from core/pool_vector.cpp) | 64 | ||||
-rw-r--r-- | modules/mbedtls/dtls_server_mbedtls.h | 58 | ||||
-rwxr-xr-x | modules/mbedtls/packet_peer_mbed_dtls.cpp | 297 | ||||
-rwxr-xr-x | modules/mbedtls/packet_peer_mbed_dtls.h | 88 | ||||
-rwxr-xr-x | modules/mbedtls/register_types.cpp | 6 | ||||
-rw-r--r-- | modules/mbedtls/ssl_context_mbedtls.cpp | 61 | ||||
-rw-r--r-- | modules/mbedtls/ssl_context_mbedtls.h | 30 | ||||
-rwxr-xr-x | modules/mbedtls/stream_peer_mbedtls.cpp | 13 | ||||
-rw-r--r-- | modules/mobile_vr/mobile_vr_interface.cpp | 14 | ||||
-rw-r--r-- | modules/mono/build_scripts/make_android_mono_config.py | 6 | ||||
-rw-r--r-- | modules/mono/csharp_script.cpp | 50 | ||||
-rw-r--r-- | modules/mono/csharp_script.h | 10 | ||||
-rw-r--r-- | modules/mono/doc_classes/@C#.xml | 2 | ||||
-rw-r--r-- | modules/mono/doc_classes/CSharpScript.xml | 4 | ||||
-rw-r--r-- | modules/mono/doc_classes/GodotSharp.xml | 2 | ||||
-rw-r--r-- | modules/mono/editor/GodotTools/GodotTools/BottomPanel.cs | 2 | ||||
-rw-r--r-- | modules/mono/editor/GodotTools/GodotTools/Build/MsBuildFinder.cs | 7 | ||||
-rw-r--r-- | modules/mono/editor/GodotTools/GodotTools/BuildManager.cs | 23 | ||||
-rw-r--r-- | modules/mono/editor/GodotTools/GodotTools/BuildTab.cs | 2 | ||||
-rw-r--r-- | modules/mono/editor/GodotTools/GodotTools/Ides/Rider/RiderPathLocator.cs | 78 | ||||
-rw-r--r-- | modules/mono/editor/GodotTools/GodotTools/Ides/Rider/RiderPathManager.cs | 28 | ||||
-rw-r--r-- | modules/mono/editor/GodotTools/GodotTools/Internals/Internal.cs | 4 | ||||
-rw-r--r-- | modules/mono/editor/bindings_generator.cpp | 54 | ||||
-rw-r--r-- | modules/mono/editor/editor_internal_calls.cpp | 14 | ||||
-rw-r--r-- | modules/mono/glue/GodotSharp/GodotSharp/Core/StringExtensions.cs | 4 | ||||
-rw-r--r-- | modules/mono/glue/base_object_glue.cpp | 11 | ||||
-rw-r--r-- | modules/mono/glue/gd_glue.cpp | 20 | ||||
-rw-r--r-- | modules/mono/mono_gd/gd_mono_field.cpp | 44 | ||||
-rw-r--r-- | modules/mono/mono_gd/gd_mono_internals.cpp | 2 | ||||
-rw-r--r-- | modules/mono/mono_gd/gd_mono_marshal.cpp | 146 | ||||
-rw-r--r-- | modules/mono/mono_gd/gd_mono_marshal.h | 42 | ||||
-rw-r--r-- | modules/mono/mono_gd/gd_mono_utils.cpp | 2 | ||||
-rw-r--r-- | modules/mono/signal_awaiter_utils.cpp | 8 | ||||
-rw-r--r-- | modules/mono/signal_awaiter_utils.h | 2 | ||||
-rw-r--r-- | modules/mono/utils/string_utils.cpp | 8 | ||||
-rw-r--r-- | modules/opensimplex/noise_texture.cpp | 6 | ||||
-rw-r--r-- | modules/opensimplex/open_simplex_noise.cpp | 14 | ||||
-rw-r--r-- | modules/pvr/texture_loader_pvr.cpp | 25 | ||||
-rw-r--r-- | modules/squish/image_compress_squish.cpp | 15 | ||||
-rw-r--r-- | modules/stb_vorbis/audio_stream_ogg_vorbis.cpp | 30 | ||||
-rw-r--r-- | modules/stb_vorbis/audio_stream_ogg_vorbis.h | 4 | ||||
-rw-r--r-- | modules/stb_vorbis/doc_classes/AudioStreamOGGVorbis.xml | 2 | ||||
-rw-r--r-- | modules/stb_vorbis/resource_importer_ogg_vorbis.cpp | 8 | ||||
-rw-r--r-- | modules/svg/image_loader_svg.cpp | 27 | ||||
-rw-r--r-- | modules/svg/image_loader_svg.h | 2 | ||||
-rw-r--r-- | modules/tga/image_loader_tga.cpp | 42 | ||||
-rw-r--r-- | modules/theora/video_stream_theora.cpp | 4 | ||||
-rw-r--r-- | modules/theora/video_stream_theora.h | 2 | ||||
-rw-r--r-- | modules/tinyexr/image_loader_tinyexr.cpp | 18 | ||||
-rw-r--r-- | modules/tinyexr/image_saver_tinyexr.cpp | 24 | ||||
-rw-r--r-- | modules/visual_script/doc_classes/VisualScript.xml | 90 | ||||
-rw-r--r-- | modules/visual_script/doc_classes/VisualScriptBasicTypeConstant.xml | 2 | ||||
-rw-r--r-- | modules/visual_script/doc_classes/VisualScriptBuiltinFunc.xml | 4 | ||||
-rw-r--r-- | modules/visual_script/doc_classes/VisualScriptClassConstant.xml | 4 | ||||
-rw-r--r-- | modules/visual_script/doc_classes/VisualScriptEmitSignal.xml | 2 | ||||
-rw-r--r-- | modules/visual_script/doc_classes/VisualScriptFunctionCall.xml | 6 | ||||
-rw-r--r-- | modules/visual_script/doc_classes/VisualScriptInputAction.xml | 2 | ||||
-rw-r--r-- | modules/visual_script/doc_classes/VisualScriptLocalVar.xml | 2 | ||||
-rw-r--r-- | modules/visual_script/doc_classes/VisualScriptLocalVarSet.xml | 2 | ||||
-rw-r--r-- | modules/visual_script/doc_classes/VisualScriptPropertyGet.xml | 6 | ||||
-rw-r--r-- | modules/visual_script/doc_classes/VisualScriptPropertySet.xml | 6 | ||||
-rw-r--r-- | modules/visual_script/doc_classes/VisualScriptTypeCast.xml | 2 | ||||
-rw-r--r-- | modules/visual_script/doc_classes/VisualScriptVariableGet.xml | 2 | ||||
-rw-r--r-- | modules/visual_script/doc_classes/VisualScriptVariableSet.xml | 2 | ||||
-rw-r--r-- | modules/visual_script/doc_classes/VisualScriptYieldSignal.xml | 4 | ||||
-rw-r--r-- | modules/visual_script/visual_script.cpp | 86 | ||||
-rw-r--r-- | modules/visual_script/visual_script.h | 12 | ||||
-rw-r--r-- | modules/visual_script/visual_script_builtin_funcs.cpp | 168 | ||||
-rw-r--r-- | modules/visual_script/visual_script_builtin_funcs.h | 2 | ||||
-rw-r--r-- | modules/visual_script/visual_script_editor.cpp | 198 | ||||
-rw-r--r-- | modules/visual_script/visual_script_editor.h | 4 | ||||
-rw-r--r-- | modules/visual_script/visual_script_expression.cpp | 18 | ||||
-rw-r--r-- | modules/visual_script/visual_script_flow_control.cpp | 26 | ||||
-rw-r--r-- | modules/visual_script/visual_script_func_nodes.cpp | 50 | ||||
-rw-r--r-- | modules/visual_script/visual_script_nodes.cpp | 100 | ||||
-rw-r--r-- | modules/visual_script/visual_script_property_selector.cpp | 34 | ||||
-rw-r--r-- | modules/visual_script/visual_script_yield_nodes.cpp | 14 | ||||
-rw-r--r-- | modules/webm/video_stream_webm.cpp | 10 | ||||
-rw-r--r-- | modules/webm/video_stream_webm.h | 2 | ||||
-rw-r--r-- | modules/webp/image_loader_webp.cpp | 49 | ||||
-rw-r--r-- | modules/websocket/doc_classes/WebSocketClient.xml | 4 | ||||
-rw-r--r-- | modules/websocket/doc_classes/WebSocketServer.xml | 2 | ||||
-rw-r--r-- | modules/websocket/emws_client.cpp | 22 | ||||
-rw-r--r-- | modules/websocket/emws_peer.cpp | 17 | ||||
-rw-r--r-- | modules/websocket/emws_peer.h | 2 | ||||
-rw-r--r-- | modules/websocket/emws_server.cpp | 4 | ||||
-rw-r--r-- | modules/websocket/emws_server.h | 2 | ||||
-rw-r--r-- | modules/websocket/websocket_multiplayer_peer.cpp | 16 | ||||
-rw-r--r-- | modules/websocket/websocket_multiplayer_peer.h | 2 | ||||
-rw-r--r-- | modules/websocket/wsl_peer.cpp | 10 | ||||
-rw-r--r-- | modules/websocket/wsl_peer.h | 2 | ||||
-rw-r--r-- | platform/android/SCsub | 1 | ||||
-rw-r--r-- | platform/android/api/api.cpp | 4 | ||||
-rw-r--r-- | platform/android/api/java_class_wrapper.h | 26 | ||||
-rw-r--r-- | platform/android/export/export.cpp | 12 | ||||
-rw-r--r-- | platform/android/java_class_wrapper.cpp | 22 | ||||
-rw-r--r-- | platform/android/java_godot_lib_jni.cpp | 93 | ||||
-rw-r--r-- | platform/android/os_android.cpp | 2 | ||||
-rw-r--r-- | platform/android/os_android.h | 3 | ||||
-rw-r--r-- | platform/android/power_android.cpp | 255 | ||||
-rw-r--r-- | platform/haiku/os_haiku.cpp | 15 | ||||
-rw-r--r-- | platform/haiku/os_haiku.h | 4 | ||||
-rw-r--r-- | platform/iphone/SCsub | 1 | ||||
-rw-r--r-- | platform/iphone/app_delegate.h | 7 | ||||
-rw-r--r-- | platform/iphone/app_delegate.mm | 16 | ||||
-rw-r--r-- | platform/iphone/detect.py | 14 | ||||
-rw-r--r-- | platform/iphone/export/export.cpp | 6 | ||||
-rw-r--r-- | platform/iphone/game_center.mm | 14 | ||||
-rw-r--r-- | platform/iphone/icloud.mm | 16 | ||||
-rw-r--r-- | platform/iphone/in_app_store.mm | 16 | ||||
-rw-r--r-- | platform/iphone/os_iphone.cpp | 24 | ||||
-rw-r--r-- | platform/iphone/os_iphone.h | 9 | ||||
-rw-r--r-- | platform/iphone/vulkan_context_iphone.h (renamed from platform/iphone/power_iphone.h) | 27 | ||||
-rw-r--r-- | platform/iphone/vulkan_context_iphone.mm (renamed from platform/iphone/power_iphone.cpp) | 48 | ||||
-rw-r--r-- | platform/javascript/http_client_javascript.cpp | 32 | ||||
-rw-r--r-- | platform/javascript/javascript_eval.cpp | 18 | ||||
-rw-r--r-- | platform/javascript/os_javascript.cpp | 40 | ||||
-rw-r--r-- | platform/javascript/os_javascript.h | 4 | ||||
-rw-r--r-- | platform/osx/SCsub | 1 | ||||
-rw-r--r-- | platform/osx/detect.py | 4 | ||||
-rw-r--r-- | platform/osx/export/export.cpp | 16 | ||||
-rw-r--r-- | platform/osx/os_osx.h | 7 | ||||
-rw-r--r-- | platform/osx/os_osx.mm | 27 | ||||
-rw-r--r-- | platform/osx/power_osx.cpp | 252 | ||||
-rw-r--r-- | platform/server/SCsub | 2 | ||||
-rw-r--r-- | platform/server/detect.py | 4 | ||||
-rw-r--r-- | platform/server/os_server.cpp | 21 | ||||
-rw-r--r-- | platform/server/os_server.h | 11 | ||||
-rw-r--r-- | platform/uwp/SCsub | 1 | ||||
-rw-r--r-- | platform/uwp/os_uwp.cpp | 14 | ||||
-rw-r--r-- | platform/uwp/os_uwp.h | 7 | ||||
-rw-r--r-- | platform/windows/SCsub | 1 | ||||
-rw-r--r-- | platform/windows/export/export.cpp | 4 | ||||
-rw-r--r--[-rwxr-xr-x] | platform/windows/os_windows.cpp | 23 | ||||
-rw-r--r-- | platform/windows/os_windows.h | 7 | ||||
-rw-r--r-- | platform/windows/power_windows.cpp | 131 | ||||
-rw-r--r-- | platform/x11/SCsub | 1 | ||||
-rw-r--r-- | platform/x11/detect.py | 21 | ||||
-rw-r--r-- | platform/x11/os_x11.cpp | 24 | ||||
-rw-r--r-- | platform/x11/os_x11.h | 7 | ||||
-rw-r--r-- | platform/x11/power_x11.cpp | 577 | ||||
-rw-r--r-- | scene/2d/animated_sprite.cpp | 10 | ||||
-rw-r--r-- | scene/2d/area_2d.cpp | 34 | ||||
-rw-r--r-- | scene/2d/audio_stream_player_2d.cpp | 12 | ||||
-rw-r--r-- | scene/2d/camera_2d.cpp | 14 | ||||
-rw-r--r-- | scene/2d/canvas_item.cpp | 26 | ||||
-rw-r--r-- | scene/2d/canvas_item.h | 8 | ||||
-rw-r--r-- | scene/2d/collision_polygon_2d.cpp | 9 | ||||
-rw-r--r-- | scene/2d/collision_shape_2d.cpp | 6 | ||||
-rw-r--r-- | scene/2d/cpu_particles_2d.cpp | 128 | ||||
-rw-r--r-- | scene/2d/cpu_particles_2d.h | 24 | ||||
-rw-r--r-- | scene/2d/joints_2d.cpp | 16 | ||||
-rw-r--r-- | scene/2d/light_2d.cpp | 8 | ||||
-rw-r--r-- | scene/2d/light_occluder_2d.cpp | 18 | ||||
-rw-r--r-- | scene/2d/light_occluder_2d.h | 6 | ||||
-rw-r--r-- | scene/2d/line_2d.cpp | 24 | ||||
-rw-r--r-- | scene/2d/line_2d.h | 6 | ||||
-rw-r--r-- | scene/2d/navigation_2d.cpp | 20 | ||||
-rw-r--r-- | scene/2d/navigation_2d.h | 5 | ||||
-rw-r--r-- | scene/2d/navigation_agent_2d.cpp | 12 | ||||
-rw-r--r-- | scene/2d/navigation_polygon.cpp | 55 | ||||
-rw-r--r-- | scene/2d/navigation_polygon.h | 17 | ||||
-rw-r--r-- | scene/2d/node_2d.cpp | 8 | ||||
-rw-r--r-- | scene/2d/particles_2d.cpp | 10 | ||||
-rw-r--r-- | scene/2d/path_2d.cpp | 14 | ||||
-rw-r--r-- | scene/2d/physics_body_2d.cpp | 44 | ||||
-rw-r--r-- | scene/2d/polygon_2d.cpp | 52 | ||||
-rw-r--r-- | scene/2d/polygon_2d.h | 26 | ||||
-rw-r--r-- | scene/2d/position_2d.cpp | 2 | ||||
-rw-r--r-- | scene/2d/skeleton_2d.cpp | 2 | ||||
-rw-r--r-- | scene/2d/sprite.cpp | 6 | ||||
-rw-r--r-- | scene/2d/tile_map.cpp | 26 | ||||
-rw-r--r-- | scene/2d/tile_map.h | 4 | ||||
-rw-r--r-- | scene/2d/touch_screen_button.cpp | 6 | ||||
-rw-r--r-- | scene/2d/visibility_notifier_2d.cpp | 4 | ||||
-rw-r--r-- | scene/3d/area.cpp | 40 | ||||
-rw-r--r-- | scene/3d/arvr_nodes.cpp | 4 | ||||
-rw-r--r-- | scene/3d/audio_stream_player_3d.cpp | 54 | ||||
-rw-r--r-- | scene/3d/baked_lightmap.cpp | 34 | ||||
-rw-r--r-- | scene/3d/baked_lightmap.h | 6 | ||||
-rw-r--r-- | scene/3d/bone_attachment.cpp | 2 | ||||
-rw-r--r-- | scene/3d/camera.cpp | 14 | ||||
-rw-r--r-- | scene/3d/collision_polygon.cpp | 8 | ||||
-rw-r--r-- | scene/3d/collision_shape.cpp | 4 | ||||
-rw-r--r-- | scene/3d/cpu_particles.cpp | 124 | ||||
-rw-r--r-- | scene/3d/cpu_particles.h | 26 | ||||
-rw-r--r-- | scene/3d/gi_probe.cpp | 44 | ||||
-rw-r--r-- | scene/3d/gi_probe.h | 12 | ||||
-rw-r--r-- | scene/3d/immediate_geometry.cpp | 4 | ||||
-rw-r--r-- | scene/3d/immediate_geometry.h | 2 | ||||
-rw-r--r-- | scene/3d/interpolated_camera.cpp | 2 | ||||
-rw-r--r-- | scene/3d/light.cpp | 40 | ||||
-rw-r--r-- | scene/3d/light.h | 2 | ||||
-rw-r--r-- | scene/3d/mesh_instance.cpp | 12 | ||||
-rw-r--r-- | scene/3d/mesh_instance.h | 2 | ||||
-rw-r--r-- | scene/3d/multimesh_instance.cpp | 4 | ||||
-rw-r--r-- | scene/3d/multimesh_instance.h | 2 | ||||
-rw-r--r-- | scene/3d/navigation.cpp | 26 | ||||
-rw-r--r-- | scene/3d/navigation.h | 6 | ||||
-rw-r--r-- | scene/3d/navigation_agent.cpp | 14 | ||||
-rw-r--r-- | scene/3d/particles.cpp | 14 | ||||
-rw-r--r-- | scene/3d/particles.h | 2 | ||||
-rw-r--r-- | scene/3d/path.cpp | 12 | ||||
-rw-r--r-- | scene/3d/physics_body.cpp | 130 | ||||
-rw-r--r-- | scene/3d/physics_joint.cpp | 210 | ||||
-rw-r--r-- | scene/3d/reflection_probe.cpp | 12 | ||||
-rw-r--r-- | scene/3d/reflection_probe.h | 2 | ||||
-rw-r--r-- | scene/3d/skeleton.cpp | 51 | ||||
-rw-r--r-- | scene/3d/skeleton.h | 5 | ||||
-rw-r--r-- | scene/3d/soft_body.cpp | 59 | ||||
-rw-r--r-- | scene/3d/soft_body.h | 10 | ||||
-rw-r--r-- | scene/3d/spring_arm.cpp | 4 | ||||
-rw-r--r-- | scene/3d/sprite_3d.cpp | 24 | ||||
-rw-r--r-- | scene/3d/sprite_3d.h | 2 | ||||
-rw-r--r-- | scene/3d/vehicle_body.cpp | 30 | ||||
-rw-r--r-- | scene/3d/visibility_notifier.cpp | 4 | ||||
-rw-r--r-- | scene/3d/visual_instance.cpp | 2 | ||||
-rw-r--r-- | scene/3d/visual_instance.h | 2 | ||||
-rw-r--r-- | scene/3d/voxelizer.cpp | 56 | ||||
-rw-r--r-- | scene/3d/voxelizer.h | 9 | ||||
-rw-r--r-- | scene/animation/animation_blend_space_1d.cpp | 18 | ||||
-rw-r--r-- | scene/animation/animation_blend_space_2d.cpp | 12 | ||||
-rw-r--r-- | scene/animation/animation_blend_tree.cpp | 48 | ||||
-rw-r--r-- | scene/animation/animation_cache.cpp | 12 | ||||
-rw-r--r-- | scene/animation/animation_cache.h | 2 | ||||
-rw-r--r-- | scene/animation/animation_node_state_machine.cpp | 20 | ||||
-rw-r--r-- | scene/animation/animation_player.cpp | 34 | ||||
-rw-r--r-- | scene/animation/animation_player.h | 6 | ||||
-rw-r--r-- | scene/animation/animation_tree.cpp | 22 | ||||
-rw-r--r-- | scene/animation/root_motion_view.cpp | 8 | ||||
-rw-r--r-- | scene/animation/root_motion_view.h | 2 | ||||
-rw-r--r-- | scene/animation/skeleton_ik.cpp | 8 | ||||
-rw-r--r-- | scene/animation/tween.cpp | 202 | ||||
-rw-r--r-- | scene/audio/audio_stream_player.cpp | 8 | ||||
-rw-r--r-- | scene/debugger/scene_debugger.cpp | 871 | ||||
-rw-r--r-- | scene/debugger/scene_debugger.h | 151 | ||||
-rw-r--r-- | scene/debugger/script_debugger_remote.cpp | 1313 | ||||
-rw-r--r-- | scene/gui/button.cpp | 2 | ||||
-rw-r--r-- | scene/gui/color_picker.cpp | 63 | ||||
-rw-r--r-- | scene/gui/color_picker.h | 2 | ||||
-rw-r--r-- | scene/gui/container.cpp | 12 | ||||
-rw-r--r-- | scene/gui/control.cpp | 72 | ||||
-rw-r--r-- | scene/gui/dialogs.cpp | 12 | ||||
-rw-r--r-- | scene/gui/file_dialog.cpp | 44 | ||||
-rw-r--r-- | scene/gui/gradient_edit.cpp | 4 | ||||
-rw-r--r-- | scene/gui/graph_edit.cpp | 40 | ||||
-rw-r--r-- | scene/gui/item_list.cpp | 4 | ||||
-rw-r--r-- | scene/gui/label.cpp | 2 | ||||
-rw-r--r-- | scene/gui/line_edit.cpp | 47 | ||||
-rw-r--r-- | scene/gui/menu_button.cpp | 4 | ||||
-rw-r--r-- | scene/gui/option_button.cpp | 6 | ||||
-rw-r--r-- | scene/gui/popup_menu.cpp | 8 | ||||
-rw-r--r-- | scene/gui/range.cpp | 14 | ||||
-rw-r--r-- | scene/gui/rich_text_effect.cpp | 2 | ||||
-rw-r--r-- | scene/gui/rich_text_label.cpp | 36 | ||||
-rw-r--r-- | scene/gui/scroll_bar.cpp | 20 | ||||
-rw-r--r-- | scene/gui/scroll_container.cpp | 6 | ||||
-rw-r--r-- | scene/gui/spin_box.cpp | 8 | ||||
-rw-r--r-- | scene/gui/tab_container.cpp | 6 | ||||
-rw-r--r-- | scene/gui/tabs.cpp | 2 | ||||
-rw-r--r-- | scene/gui/text_edit.cpp | 114 | ||||
-rw-r--r-- | scene/gui/text_edit.h | 12 | ||||
-rw-r--r-- | scene/gui/texture_progress.cpp | 4 | ||||
-rw-r--r-- | scene/gui/texture_rect.cpp | 4 | ||||
-rw-r--r-- | scene/gui/tree.cpp | 32 | ||||
-rw-r--r-- | scene/gui/tree.h | 4 | ||||
-rw-r--r-- | scene/gui/video_player.cpp | 8 | ||||
-rw-r--r-- | scene/main/canvas_layer.cpp | 6 | ||||
-rw-r--r-- | scene/main/http_request.cpp | 50 | ||||
-rw-r--r-- | scene/main/http_request.h | 6 | ||||
-rw-r--r-- | scene/main/instance_placeholder.cpp | 2 | ||||
-rw-r--r-- | scene/main/node.cpp | 88 | ||||
-rw-r--r-- | scene/main/node.h | 8 | ||||
-rw-r--r-- | scene/main/resource_preloader.cpp | 8 | ||||
-rw-r--r-- | scene/main/resource_preloader.h | 2 | ||||
-rw-r--r-- | scene/main/scene_tree.cpp | 444 | ||||
-rw-r--r-- | scene/main/scene_tree.h | 40 | ||||
-rwxr-xr-x | scene/main/timer.cpp | 4 | ||||
-rw-r--r-- | scene/main/viewport.cpp | 16 | ||||
-rw-r--r-- | scene/main/viewport.h | 2 | ||||
-rw-r--r-- | scene/register_scene_types.cpp | 19 | ||||
-rw-r--r-- | scene/resources/animation.cpp | 103 | ||||
-rw-r--r-- | scene/resources/animation.h | 8 | ||||
-rw-r--r-- | scene/resources/audio_stream_sample.cpp | 20 | ||||
-rw-r--r-- | scene/resources/audio_stream_sample.h | 4 | ||||
-rw-r--r-- | scene/resources/bit_map.cpp | 12 | ||||
-rw-r--r-- | scene/resources/capsule_shape.cpp | 26 | ||||
-rw-r--r-- | scene/resources/capsule_shape_2d.cpp | 4 | ||||
-rw-r--r-- | scene/resources/circle_shape_2d.cpp | 2 | ||||
-rw-r--r-- | scene/resources/concave_polygon_shape.cpp | 14 | ||||
-rw-r--r-- | scene/resources/concave_polygon_shape.h | 4 | ||||
-rw-r--r-- | scene/resources/concave_polygon_shape_2d.cpp | 24 | ||||
-rw-r--r-- | scene/resources/concave_polygon_shape_2d.h | 4 | ||||
-rw-r--r-- | scene/resources/convex_polygon_shape.cpp | 10 | ||||
-rw-r--r-- | scene/resources/convex_polygon_shape.h | 6 | ||||
-rw-r--r-- | scene/resources/convex_polygon_shape_2d.cpp | 2 | ||||
-rw-r--r-- | scene/resources/curve.cpp | 91 | ||||
-rw-r--r-- | scene/resources/curve.h | 20 | ||||
-rw-r--r-- | scene/resources/cylinder_shape.cpp | 4 | ||||
-rw-r--r-- | scene/resources/default_theme/default_theme.cpp | 6 | ||||
-rw-r--r-- | scene/resources/dynamic_font.cpp | 4 | ||||
-rw-r--r-- | scene/resources/dynamic_font.h | 2 | ||||
-rw-r--r-- | scene/resources/environment.cpp | 88 | ||||
-rw-r--r-- | scene/resources/font.cpp | 28 | ||||
-rw-r--r-- | scene/resources/font.h | 8 | ||||
-rw-r--r-- | scene/resources/gradient.cpp | 4 | ||||
-rw-r--r-- | scene/resources/height_map_shape.cpp | 18 | ||||
-rw-r--r-- | scene/resources/height_map_shape.h | 6 | ||||
-rw-r--r-- | scene/resources/line_shape_2d.cpp | 2 | ||||
-rw-r--r-- | scene/resources/material.cpp | 57 | ||||
-rw-r--r-- | scene/resources/material.h | 4 | ||||
-rw-r--r-- | scene/resources/mesh.cpp | 139 | ||||
-rw-r--r-- | scene/resources/mesh.h | 6 | ||||
-rw-r--r-- | scene/resources/mesh_data_tool.cpp | 116 | ||||
-rw-r--r-- | scene/resources/mesh_library.cpp | 6 | ||||
-rw-r--r-- | scene/resources/multimesh.cpp | 70 | ||||
-rw-r--r-- | scene/resources/multimesh.h | 20 | ||||
-rw-r--r-- | scene/resources/navigation_mesh.cpp | 52 | ||||
-rw-r--r-- | scene/resources/navigation_mesh.h | 6 | ||||
-rw-r--r-- | scene/resources/packed_scene.cpp | 36 | ||||
-rw-r--r-- | scene/resources/packed_scene.h | 2 | ||||
-rw-r--r-- | scene/resources/particles_material.cpp | 58 | ||||
-rw-r--r-- | scene/resources/physics_material.cpp | 4 | ||||
-rw-r--r-- | scene/resources/polygon_path_finder.cpp | 32 | ||||
-rw-r--r-- | scene/resources/primitive_meshes.cpp | 136 | ||||
-rw-r--r-- | scene/resources/ray_shape.cpp | 2 | ||||
-rw-r--r-- | scene/resources/resource_format_text.cpp | 4 | ||||
-rw-r--r-- | scene/resources/segment_shape_2d.cpp | 2 | ||||
-rw-r--r-- | scene/resources/shape.cpp | 10 | ||||
-rw-r--r-- | scene/resources/shape.h | 2 | ||||
-rw-r--r-- | scene/resources/shape_2d.cpp | 2 | ||||
-rw-r--r-- | scene/resources/skin.cpp | 30 | ||||
-rw-r--r-- | scene/resources/skin.h | 12 | ||||
-rw-r--r-- | scene/resources/sky.cpp | 26 | ||||
-rw-r--r-- | scene/resources/sphere_shape.cpp | 2 | ||||
-rw-r--r-- | scene/resources/style_box.cpp | 36 | ||||
-rw-r--r-- | scene/resources/surface_tool.cpp | 120 | ||||
-rw-r--r-- | scene/resources/text_file.cpp | 8 | ||||
-rw-r--r-- | scene/resources/texture.cpp | 71 | ||||
-rw-r--r-- | scene/resources/texture.h | 4 | ||||
-rw-r--r-- | scene/resources/theme.cpp | 70 | ||||
-rw-r--r-- | scene/resources/theme.h | 14 | ||||
-rw-r--r-- | scene/resources/tile_set.cpp | 2 | ||||
-rw-r--r-- | scene/resources/visual_shader.cpp | 116 | ||||
-rw-r--r-- | scene/resources/visual_shader.h | 10 | ||||
-rw-r--r-- | scene/resources/visual_shader_nodes.cpp | 551 | ||||
-rw-r--r-- | scene/resources/visual_shader_nodes.h | 202 | ||||
-rw-r--r-- | scene/resources/world.cpp | 4 | ||||
-rw-r--r-- | scene/resources/world_2d.cpp | 4 | ||||
-rw-r--r-- | servers/arvr/arvr_positional_tracker.cpp | 2 | ||||
-rw-r--r-- | servers/arvr_server.cpp | 10 | ||||
-rw-r--r-- | servers/audio/audio_stream.cpp | 2 | ||||
-rw-r--r-- | servers/audio/effects/audio_effect_amplify.cpp | 2 | ||||
-rw-r--r-- | servers/audio/effects/audio_effect_chorus.cpp | 60 | ||||
-rw-r--r-- | servers/audio/effects/audio_effect_compressor.cpp | 14 | ||||
-rw-r--r-- | servers/audio/effects/audio_effect_delay.cpp | 20 | ||||
-rw-r--r-- | servers/audio/effects/audio_effect_distortion.cpp | 8 | ||||
-rw-r--r-- | servers/audio/effects/audio_effect_eq.cpp | 2 | ||||
-rw-r--r-- | servers/audio/effects/audio_effect_filter.cpp | 6 | ||||
-rw-r--r-- | servers/audio/effects/audio_effect_limiter.cpp | 8 | ||||
-rw-r--r-- | servers/audio/effects/audio_effect_panner.cpp | 2 | ||||
-rw-r--r-- | servers/audio/effects/audio_effect_phaser.cpp | 10 | ||||
-rw-r--r-- | servers/audio/effects/audio_effect_pitch_shift.cpp | 4 | ||||
-rw-r--r-- | servers/audio/effects/audio_effect_record.cpp | 16 | ||||
-rw-r--r-- | servers/audio/effects/audio_effect_reverb.cpp | 16 | ||||
-rw-r--r-- | servers/audio/effects/audio_effect_spectrum_analyzer.cpp | 4 | ||||
-rw-r--r-- | servers/audio/effects/audio_effect_stereo_enhance.cpp | 6 | ||||
-rw-r--r-- | servers/audio/effects/audio_stream_generator.cpp | 10 | ||||
-rw-r--r-- | servers/audio/effects/audio_stream_generator.h | 2 | ||||
-rw-r--r-- | servers/audio_server.cpp | 8 | ||||
-rw-r--r-- | servers/audio_server.h | 2 | ||||
-rw-r--r-- | servers/navigation_2d_server.cpp | 11 | ||||
-rw-r--r-- | servers/navigation_2d_server.h | 3 | ||||
-rw-r--r-- | servers/navigation_server.cpp | 6 | ||||
-rw-r--r-- | servers/navigation_server.h | 13 | ||||
-rw-r--r-- | servers/physics/area_sw.cpp | 4 | ||||
-rw-r--r-- | servers/physics/body_sw.cpp | 2 | ||||
-rw-r--r-- | servers/physics/shape_sw.cpp | 64 | ||||
-rw-r--r-- | servers/physics/shape_sw.h | 31 | ||||
-rw-r--r-- | servers/physics/space_sw.cpp | 2 | ||||
-rw-r--r-- | servers/physics_2d/area_2d_sw.cpp | 4 | ||||
-rw-r--r-- | servers/physics_2d/body_2d_sw.cpp | 2 | ||||
-rw-r--r-- | servers/physics_2d/shape_2d_sw.cpp | 28 | ||||
-rw-r--r-- | servers/physics_2d/space_2d_sw.cpp | 2 | ||||
-rw-r--r-- | servers/physics_2d_server.cpp | 14 | ||||
-rw-r--r-- | servers/physics_server.cpp | 10 | ||||
-rw-r--r-- | servers/register_server_types.cpp | 8 | ||||
-rw-r--r-- | servers/visual/rasterizer.h | 28 | ||||
-rw-r--r-- | servers/visual/rasterizer_rd/light_cluster_builder.cpp | 15 | ||||
-rw-r--r-- | servers/visual/rasterizer_rd/light_cluster_builder.h | 4 | ||||
-rw-r--r-- | servers/visual/rasterizer_rd/rasterizer_canvas_rd.cpp | 63 | ||||
-rw-r--r-- | servers/visual/rasterizer_rd/rasterizer_canvas_rd.h | 2 | ||||
-rw-r--r-- | servers/visual/rasterizer_rd/rasterizer_effects_rd.cpp | 6 | ||||
-rw-r--r-- | servers/visual/rasterizer_rd/rasterizer_rd.cpp | 6 | ||||
-rw-r--r-- | servers/visual/rasterizer_rd/rasterizer_scene_high_end_rd.cpp | 62 | ||||
-rw-r--r-- | servers/visual/rasterizer_rd/rasterizer_scene_rd.cpp | 7 | ||||
-rw-r--r-- | servers/visual/rasterizer_rd/rasterizer_storage_rd.cpp | 244 | ||||
-rw-r--r-- | servers/visual/rasterizer_rd/rasterizer_storage_rd.h | 32 | ||||
-rw-r--r-- | servers/visual/rasterizer_rd/render_pipeline_vertex_format_cache_rd.h | 1 | ||||
-rw-r--r-- | servers/visual/rasterizer_rd/shader_rd.h | 5 | ||||
-rw-r--r-- | servers/visual/rasterizer_rd/shaders/scene_high_end_inc.glsl | 8 | ||||
-rw-r--r-- | servers/visual/rendering_device.cpp | 10 | ||||
-rw-r--r-- | servers/visual/rendering_device.h | 26 | ||||
-rw-r--r-- | servers/visual/shader_language.cpp | 51 | ||||
-rw-r--r-- | servers/visual/visual_server_canvas.cpp | 12 | ||||
-rw-r--r-- | servers/visual/visual_server_canvas.h | 4 | ||||
-rw-r--r-- | servers/visual/visual_server_raster.cpp | 6 | ||||
-rw-r--r-- | servers/visual/visual_server_raster.h | 24 | ||||
-rw-r--r-- | servers/visual/visual_server_scene.cpp | 6 | ||||
-rw-r--r-- | servers/visual/visual_server_wrap_mt.h | 24 | ||||
-rw-r--r-- | servers/visual_server.cpp | 250 | ||||
-rw-r--r-- | servers/visual_server.h | 45 | ||||
-rw-r--r-- | thirdparty/README.md | 2 | ||||
-rw-r--r-- | thirdparty/basis_universal/basisu_backend.cpp | 2 | ||||
-rw-r--r-- | thirdparty/basis_universal/basisu_basis_file.cpp | 2 | ||||
-rw-r--r-- | thirdparty/basis_universal/basisu_comp.cpp | 20 | ||||
-rw-r--r-- | thirdparty/basis_universal/basisu_comp.h | 4 | ||||
-rw-r--r-- | thirdparty/basis_universal/basisu_enc.h | 10 | ||||
-rw-r--r-- | thirdparty/basis_universal/basisu_frontend.cpp | 3 | ||||
-rw-r--r-- | thirdparty/basis_universal/basisu_gpu_texture.cpp | 487 | ||||
-rw-r--r-- | thirdparty/basis_universal/basisu_gpu_texture.h | 8 | ||||
-rw-r--r-- | thirdparty/basis_universal/basisu_pvrtc1_4.cpp | 42 | ||||
-rw-r--r-- | thirdparty/basis_universal/basisu_pvrtc1_4.h | 28 | ||||
-rw-r--r-- | thirdparty/basis_universal/basisu_tool.cpp | 118 | ||||
-rw-r--r-- | thirdparty/basis_universal/transcoder/basisu.h | 35 | ||||
-rw-r--r-- | thirdparty/basis_universal/transcoder/basisu_transcoder.cpp | 2572 | ||||
-rw-r--r-- | thirdparty/basis_universal/transcoder/basisu_transcoder.h | 103 | ||||
-rw-r--r-- | thirdparty/basis_universal/transcoder/basisu_transcoder_internal.h | 17 | ||||
-rw-r--r-- | thirdparty/basis_universal/transcoder/basisu_transcoder_tables_pvrtc2_45.inc | 481 | ||||
-rw-r--r-- | thirdparty/basis_universal/transcoder/basisu_transcoder_tables_pvrtc2_alpha_33.inc | 481 | ||||
-rw-r--r-- | thirdparty/enet/enet/enet.h | 2 | ||||
-rw-r--r-- | thirdparty/enet/godot.cpp | 381 | ||||
-rw-r--r-- | thirdparty/glslang/glslang/Include/revision.template | 13 |
1766 files changed, 40141 insertions, 28100 deletions
diff --git a/.appveyor.yml b/.appveyor.yml index 05e7094981..3f6e932050 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -7,10 +7,19 @@ environment: PYTHON: C:\Python38 SCONS_CACHE_ROOT: "%HOME%\\scons_cache" SCONS_CACHE_LIMIT: 1024 + OPTIONS: "debug_symbols=no verbose=yes progress=no" + EXTRA_ARGS: "warnings=all werror=yes" matrix: - - GD_PLATFORM: windows - TOOLS: yes - TARGET: release_debug + - GD_PLATFORM: windows + TARGET: release_debug + TOOLS: yes +# Disabled for performance reasons until master is more stable. +# - GD_PLATFORM: windows +# TARGET: release +# TOOLS: no + +matrix: + fast_finish: true init: - ps: if ($env:APPVEYOR_REPO_BRANCH -ne "master") { $env:APPVEYOR_CACHE_SKIP_SAVE = "true" } @@ -29,4 +38,4 @@ before_build: - set "SCONS_CACHE=%SCONS_CACHE_ROOT%\%APPVEYOR_REPO_BRANCH%" build_script: - - scons platform=%GD_PLATFORM% target=%TARGET% tools=%TOOLS% debug_symbols=no verbose=yes progress=no gdnative_wrapper=yes + - scons platform=%GD_PLATFORM% target=%TARGET% tools=%TOOLS% %OPTIONS% %EXTRA_ARGS% diff --git a/.travis.yml b/.travis.yml index 4d53e3f819..80191423c1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ language: cpp # OS config, depends on actual 'os' in build matrix -dist: xenial +dist: bionic stages: - build @@ -10,7 +10,7 @@ env: global: - SCONS_CACHE=$HOME/.scons_cache/$TRAVIS_BRANCH - SCONS_CACHE_LIMIT=1024 - - OPTIONS="debug_symbols=no verbose=yes progress=no builtin_libpng=yes" + - OPTIONS="debug_symbols=no verbose=yes progress=no" - secure: "uch9QszCgsl1qVbuzY41P7S2hWL2IiNFV4SbAYRCdi0oJ9MIu+pVyrQdpf3+jG4rH6j4Rffl+sN17Zz4dIDDioFL1JwqyCqyCyswR8uACC0Rr8gr4Mi3+HIRbv+2s2P4cIQq41JM8FJe84k9jLEMGCGh69w+ibCWoWs74CokYVA=" cache: @@ -26,29 +26,28 @@ matrix: compiler: gcc addons: apt: - sources: - - llvm-toolchain-xenial-8 packages: - clang-format-8 - name: Linux editor (debug, GCC 9, with Mono) stage: build - env: PLATFORM=x11 TOOLS=yes TARGET=debug CACHE_NAME=${PLATFORM}-tools-mono-gcc-9 MATRIX_EVAL="CC=gcc-9 && CXX=g++-9" EXTRA_ARGS="module_mono_enabled=yes mono_glue=no warnings=extra" + env: PLATFORM=x11 TOOLS=yes TARGET=debug CACHE_NAME=${PLATFORM}-tools-mono-gcc-9 MATRIX_EVAL="CC=gcc-9 && CXX=g++-9" EXTRA_ARGS="module_mono_enabled=yes mono_glue=no warnings=extra werror=yes" os: linux compiler: gcc-9 addons: apt: sources: - - mono - - ubuntu-toolchain-r-test + - sourceline: "deb https://download.mono-project.com/repo/ubuntu stable-bionic main" + key_url: "https://raw.githubusercontent.com/travis-ci/apt-source-safelist/master/keys/mono.asc" + - sourceline: "ppa:ubuntu-toolchain-r/test" packages: - &gcc9_deps [gcc-9, g++-9] - &linux_deps [libasound2-dev, libgl1-mesa-dev, libglu1-mesa-dev, libx11-dev, libxcursor-dev, libxi-dev, libxinerama-dev, libxrandr-dev] - &linux_mono_deps [mono-devel, msbuild, nuget] - - name: Linux export template (release, Clang) + - name: Linux export template (release, Clang 7) stage: build - env: PLATFORM=x11 TOOLS=no TARGET=release CACHE_NAME=${PLATFORM}-clang EXTRA_ARGS="warnings=extra" + env: PLATFORM=x11 TOOLS=no TARGET=release CACHE_NAME=${PLATFORM}-clang EXTRA_ARGS="warnings=extra werror=yes" os: linux compiler: clang addons: @@ -70,13 +69,15 @@ matrix: - name: macOS editor (debug, Clang) stage: build - env: PLATFORM=osx TOOLS=yes TARGET=debug CACHE_NAME=${PLATFORM}-tools-clang EXTRA_ARGS="warnings=extra" # werror=yes + env: PLATFORM=osx TOOLS=yes TARGET=debug CACHE_NAME=${PLATFORM}-tools-clang EXTRA_ARGS="warnings=extra werror=yes" os: osx + osx_image: xcode11.3 compiler: clang addons: homebrew: packages: - scons + update: true # TODO: iOS MoltenVK support @@ -84,6 +85,7 @@ matrix: # stage: build # env: PLATFORM=iphone TOOLS=no TARGET=debug CACHE_NAME=${PLATFORM}-clang # os: osx +# osx_image: xcode11.3 # compiler: clang # addons: # homebrew: @@ -100,14 +102,14 @@ matrix: # addons: # apt: # sources: -# - ubuntu-toolchain-r-test +# - sourceline: "ppa:ubuntu-toolchain-r/test" # packages: # - *gcc9_deps # - *linux_deps - - name: Linux export template (release_debug, GCC 5, without 3D support) + - name: Linux export template (release_debug, GCC 7, without 3D support) stage: build - env: PLATFORM=x11 TOOLS=no TARGET=release_debug CACHE_NAME=${PLATFORM}-gcc-5 EXTRA_ARGS="CXXFLAGS=-fno-strict-aliasing disable_3d=yes" + env: PLATFORM=x11 TOOLS=no TARGET=release_debug CACHE_NAME=${PLATFORM}-gcc-7 EXTRA_ARGS="disable_3d=yes" os: linux compiler: gcc addons: @@ -123,7 +125,7 @@ before_install: install: - if [ "$TRAVIS_OS_NAME" = "linux" ]; then - pyenv global 3.7.1 system; + pyenv global 3.8 system; pip3 install --user scons; fi - scons --version diff --git a/COPYRIGHT.txt b/COPYRIGHT.txt index de9936d96b..cdc59a4596 100644 --- a/COPYRIGHT.txt +++ b/COPYRIGHT.txt @@ -71,16 +71,6 @@ Comment: The Android Open Source Project Copyright: 2002, Google Inc. License: Apache-2.0 -Files: ./platform/android/power_android.cpp - ./platform/osx/power_osx.cpp - ./platform/windows/power_windows.cpp - ./platform/x11/power_x11.cpp -Comment: Simple DirectMedia Layer -Copyright: 1997-2017, Sam Lantinga - 2007-2020, Juan Linietsky, Ariel Manzur. - 2014-2020, Godot Engine contributors. -License: Expat and Zlib - Files: ./scene/animation/tween_interpolaters.cpp Comment: Penner Easing Copyright: 2001, Robert Penner diff --git a/SConstruct b/SConstruct index 2b368f7b19..f2c20ea91e 100644 --- a/SConstruct +++ b/SConstruct @@ -292,6 +292,7 @@ if selected_platform in platform_list: if env["extra_suffix"] != '': env.extra_suffix += '.' + env["extra_suffix"] + # Environment flags CCFLAGS = env.get('CCFLAGS', '') env['CCFLAGS'] = '' env.Append(CCFLAGS=str(CCFLAGS).split()) @@ -308,17 +309,66 @@ if selected_platform in platform_list: env['LINKFLAGS'] = '' env.Append(LINKFLAGS=str(LINKFLAGS).split()) + # Platform specific flags flag_list = platform_flags[selected_platform] for f in flag_list: if not (f[0] in ARGUMENTS): # allow command line to override platform flags env[f[0]] = f[1] - # must happen after the flags, so when flags are used by configure, stuff happens (ie, ssl on x11) + # Must happen after the flags definition, so that they can be used by platform detect detect.configure(env) - # Enable C++11 support + # Set our C and C++ standard requirements. + # C++17 is required as we need guaranteed copy elision as per GH-36436. + # Prepending to make it possible to override. + # This needs to come after `configure`, otherwise we don't have env.msvc. if not env.msvc: - env.Append(CXXFLAGS=['-std=c++11']) + # Specifying GNU extensions support explicitly, which are supported by + # both GCC and Clang. Both currently default to gnu11 and gnu++14. + env.Prepend(CFLAGS=['-std=gnu11']) + env.Prepend(CXXFLAGS=['-std=gnu++17']) + else: + # MSVC doesn't have clear C standard support, /std only covers C++. + # We apply it to CCFLAGS (both C and C++ code) in case it impacts C features. + env.Prepend(CCFLAGS=['/std:c++17', '/permissive-']) + + # Enforce our minimal compiler version requirements + cc_version = methods.get_compiler_version(env) or [-1, -1] + cc_version_major = cc_version[0] + cc_version_minor = cc_version[1] + + if methods.using_gcc(env): + # GCC 8 before 8.4 has a regression in the support of guaranteed copy elision + # which causes a build failure: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86521 + if cc_version_major == 8 and cc_version_minor < 4: + print("Detected GCC 8 version < 8.4, which is not supported due to a " + "regression in its C++17 guaranteed copy elision support. Use a " + "newer GCC version, or Clang 6 or later by passing \"use_llvm=yes\" " + "to the SCons command line.") + sys.exit(255) + elif cc_version_major < 7: + print("Detected GCC version older than 7, which does not fully support " + "C++17. Supported versions are GCC 7, 9 and later. Use a newer GCC " + "version, or Clang 6 or later by passing \"use_llvm=yes\" to the " + "SCons command line.") + sys.exit(255) + elif methods.using_clang(env): + # Apple LLVM versions differ from upstream LLVM version \o/, compare + # in https://en.wikipedia.org/wiki/Xcode#Toolchain_versions + if env["platform"] == "osx" or env["platform"] == "iphone": + vanilla = methods.is_vanilla_clang(env) + if vanilla and cc_version_major < 6: + print("Detected Clang version older than 6, which does not fully support " + "C++17. Supported versions are Clang 6 and later.") + sys.exit(255) + elif not vanilla and cc_version_major < 10: + print("Detected Apple Clang version older than 10, which does not fully " + "support C++17. Supported versions are Apple Clang 10 and later.") + sys.exit(255) + elif cc_version_major < 6: + print("Detected Clang version older than 6, which does not fully support " + "C++17. Supported versions are Clang 6 and later.") + sys.exit(255) # Configure compiler warnings if env.msvc: @@ -343,13 +393,10 @@ if selected_platform in platform_list: all_plus_warnings = ['-Wwrite-strings'] if methods.using_gcc(env): - version = methods.get_compiler_version(env) - if version != None and version[0] >= '7': + if cc_version_major >= 7: shadow_local_warning = ['-Wshadow-local'] if (env["warnings"] == 'extra'): - # Note: enable -Wimplicit-fallthrough for Clang (already part of -Wextra for GCC) - # once we switch to C++11 or later (necessary for our FALLTHROUGH macro). env.Append(CCFLAGS=['-Wall', '-Wextra', '-Wno-unused-parameter'] + all_plus_warnings + shadow_local_warning) env.Append(CXXFLAGS=['-Wctor-dtor-privacy', '-Wnon-virtual-dtor']) @@ -357,10 +404,12 @@ if selected_platform in platform_list: env.Append(CCFLAGS=['-Walloc-zero', '-Wduplicated-branches', '-Wduplicated-cond', '-Wstringop-overflow=4', '-Wlogical-op']) - env.Append(CXXFLAGS=['-Wnoexcept', '-Wplacement-new=1']) - version = methods.get_compiler_version(env) - if version != None and version[0] >= '9': + # -Wnoexcept was removed temporarily due to GH-36325. + env.Append(CXXFLAGS=['-Wplacement-new=1']) + if cc_version_major >= 9: env.Append(CCFLAGS=['-Wattribute-alias=2']) + if methods.using_clang(env): + env.Append(CCFLAGS=['-Wimplicit-fallthrough']) elif (env["warnings"] == 'all'): env.Append(CCFLAGS=['-Wall'] + shadow_local_warning) elif (env["warnings"] == 'moderate'): @@ -369,6 +418,11 @@ if selected_platform in platform_list: env.Append(CCFLAGS=['-w']) if (env["werror"]): env.Append(CCFLAGS=['-Werror']) + # FIXME: Temporary workaround after the Vulkan merge, remove once warnings are fixed. + if methods.using_gcc(env): + env.Append(CXXFLAGS=['-Wno-error=cpp']) + else: + env.Append(CXXFLAGS=['-Wno-error=#warnings']) else: # always enable those errors env.Append(CCFLAGS=['-Werror=return-type']) diff --git a/core/array.cpp b/core/array.cpp index 2253d05605..7eb15ea934 100644 --- a/core/array.cpp +++ b/core/array.cpp @@ -308,9 +308,9 @@ struct _ArrayVariantSortCustom { _FORCE_INLINE_ bool operator()(const Variant &p_l, const Variant &p_r) const { const Variant *args[2] = { &p_l, &p_r }; - Variant::CallError err; + Callable::CallError err; bool res = obj->call(func, args, 2, err); - if (err.error != Variant::CallError::CALL_OK) + if (err.error != Callable::CallError::CALL_OK) res = false; return res; } diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp index 9413772f84..c1cf061854 100644 --- a/core/bind/core_bind.cpp +++ b/core/bind/core_bind.cpp @@ -77,11 +77,11 @@ RES _ResourceLoader::load(const String &p_path, const String &p_type_hint, bool return ret; } -PoolVector<String> _ResourceLoader::get_recognized_extensions_for_type(const String &p_type) { +Vector<String> _ResourceLoader::get_recognized_extensions_for_type(const String &p_type) { List<String> exts; ResourceLoader::get_recognized_extensions_for_type(p_type, &exts); - PoolVector<String> ret; + Vector<String> ret; for (List<String>::Element *E = exts.front(); E; E = E->next()) { ret.push_back(E->get()); @@ -95,12 +95,12 @@ void _ResourceLoader::set_abort_on_missing_resources(bool p_abort) { ResourceLoader::set_abort_on_missing_resources(p_abort); } -PoolStringArray _ResourceLoader::get_dependencies(const String &p_path) { +PackedStringArray _ResourceLoader::get_dependencies(const String &p_path) { List<String> deps; ResourceLoader::get_dependencies(p_path, &deps); - PoolStringArray ret; + PackedStringArray ret; for (List<String>::Element *E = deps.front(); E; E = E->next()) { ret.push_back(E->get()); } @@ -139,12 +139,12 @@ Error _ResourceSaver::save(const String &p_path, const RES &p_resource, SaverFla return ResourceSaver::save(p_path, p_resource, p_flags); } -PoolVector<String> _ResourceSaver::get_recognized_extensions(const RES &p_resource) { +Vector<String> _ResourceSaver::get_recognized_extensions(const RES &p_resource) { - ERR_FAIL_COND_V_MSG(p_resource.is_null(), PoolVector<String>(), "It's not a reference to a valid Resource object."); + ERR_FAIL_COND_V_MSG(p_resource.is_null(), Vector<String>(), "It's not a reference to a valid Resource object."); List<String> exts; ResourceSaver::get_recognized_extensions(p_resource, &exts); - PoolVector<String> ret; + Vector<String> ret; for (List<String>::Element *E = exts.front(); E; E = E->next()) { ret.push_back(E->get()); @@ -249,7 +249,7 @@ String _OS::get_audio_driver_name(int p_driver) const { return OS::get_singleton()->get_audio_driver_name(p_driver); } -PoolStringArray _OS::get_connected_midi_inputs() { +PackedStringArray _OS::get_connected_midi_inputs() { return OS::get_singleton()->get_connected_midi_inputs(); } @@ -587,18 +587,6 @@ bool _OS::is_vsync_via_compositor_enabled() const { return OS::get_singleton()->is_vsync_via_compositor_enabled(); } -_OS::PowerState _OS::get_power_state() { - return _OS::PowerState(OS::get_singleton()->get_power_state()); -} - -int _OS::get_power_seconds_left() { - return OS::get_singleton()->get_power_seconds_left(); -} - -int _OS::get_power_percent_left() { - return OS::get_singleton()->get_power_percent_left(); -} - bool _OS::has_feature(const String &p_feature) const { return OS::get_singleton()->has_feature(p_feature); @@ -658,11 +646,6 @@ uint64_t _OS::get_static_memory_peak_usage() const { return OS::get_singleton()->get_static_memory_peak_usage(); } -uint64_t _OS::get_dynamic_memory_usage() const { - - return OS::get_singleton()->get_dynamic_memory_usage(); -} - void _OS::set_native_icon(const String &p_filename) { OS::get_singleton()->set_native_icon(p_filename); @@ -1313,7 +1296,6 @@ void _OS::_bind_methods() { ClassDB::bind_method(D_METHOD("get_static_memory_usage"), &_OS::get_static_memory_usage); ClassDB::bind_method(D_METHOD("get_static_memory_peak_usage"), &_OS::get_static_memory_peak_usage); - ClassDB::bind_method(D_METHOD("get_dynamic_memory_usage"), &_OS::get_dynamic_memory_usage); ClassDB::bind_method(D_METHOD("get_user_data_dir"), &_OS::get_user_data_dir); ClassDB::bind_method(D_METHOD("get_system_dir", "dir"), &_OS::get_system_dir); @@ -1348,10 +1330,6 @@ void _OS::_bind_methods() { ClassDB::bind_method(D_METHOD("has_feature", "tag_name"), &_OS::has_feature); - ClassDB::bind_method(D_METHOD("get_power_state"), &_OS::get_power_state); - ClassDB::bind_method(D_METHOD("get_power_seconds_left"), &_OS::get_power_seconds_left); - ClassDB::bind_method(D_METHOD("get_power_percent_left"), &_OS::get_power_percent_left); - ClassDB::bind_method(D_METHOD("request_permission", "name"), &_OS::request_permission); ClassDB::bind_method(D_METHOD("request_permissions"), &_OS::request_permissions); ClassDB::bind_method(D_METHOD("get_granted_permissions"), &_OS::get_granted_permissions); @@ -1439,12 +1417,6 @@ void _OS::_bind_methods() { BIND_ENUM_CONSTANT(SYSTEM_DIR_MUSIC); BIND_ENUM_CONSTANT(SYSTEM_DIR_PICTURES); BIND_ENUM_CONSTANT(SYSTEM_DIR_RINGTONES); - - BIND_ENUM_CONSTANT(POWERSTATE_UNKNOWN); - BIND_ENUM_CONSTANT(POWERSTATE_ON_BATTERY); - BIND_ENUM_CONSTANT(POWERSTATE_NO_BATTERY); - BIND_ENUM_CONSTANT(POWERSTATE_CHARGING); - BIND_ENUM_CONSTANT(POWERSTATE_CHARGED); } _OS::_OS() { @@ -1461,16 +1433,16 @@ _Geometry *_Geometry::get_singleton() { return singleton; } -PoolVector<Plane> _Geometry::build_box_planes(const Vector3 &p_extents) { +Vector<Plane> _Geometry::build_box_planes(const Vector3 &p_extents) { return Geometry::build_box_planes(p_extents); } -PoolVector<Plane> _Geometry::build_cylinder_planes(float p_radius, float p_height, int p_sides, Vector3::Axis p_axis) { +Vector<Plane> _Geometry::build_cylinder_planes(float p_radius, float p_height, int p_sides, Vector3::Axis p_axis) { return Geometry::build_cylinder_planes(p_radius, p_height, p_sides, p_axis); } -PoolVector<Plane> _Geometry::build_capsule_planes(float p_radius, float p_height, int p_sides, int p_lats, Vector3::Axis p_axis) { +Vector<Plane> _Geometry::build_capsule_planes(float p_radius, float p_height, int p_sides, int p_lats, Vector3::Axis p_axis) { return Geometry::build_capsule_planes(p_radius, p_height, p_sides, p_lats, p_axis); } @@ -1506,22 +1478,22 @@ Variant _Geometry::line_intersects_line_2d(const Vector2 &p_from_a, const Vector } } -PoolVector<Vector2> _Geometry::get_closest_points_between_segments_2d(const Vector2 &p1, const Vector2 &q1, const Vector2 &p2, const Vector2 &q2) { +Vector<Vector2> _Geometry::get_closest_points_between_segments_2d(const Vector2 &p1, const Vector2 &q1, const Vector2 &p2, const Vector2 &q2) { Vector2 r1, r2; Geometry::get_closest_points_between_segments(p1, q1, p2, q2, r1, r2); - PoolVector<Vector2> r; + Vector<Vector2> r; r.resize(2); r.set(0, r1); r.set(1, r2); return r; } -PoolVector<Vector3> _Geometry::get_closest_points_between_segments(const Vector3 &p1, const Vector3 &p2, const Vector3 &q1, const Vector3 &q2) { +Vector<Vector3> _Geometry::get_closest_points_between_segments(const Vector3 &p1, const Vector3 &p2, const Vector3 &q1, const Vector3 &q2) { Vector3 r1, r2; Geometry::get_closest_points_between_segments(p1, p2, q1, q2, r1, r2); - PoolVector<Vector3> r; + Vector<Vector3> r; r.resize(2); r.set(0, r1); r.set(1, r2); @@ -1569,9 +1541,9 @@ bool _Geometry::point_is_inside_triangle(const Vector2 &s, const Vector2 &a, con return Geometry::is_point_in_triangle(s, a, b, c); } -PoolVector<Vector3> _Geometry::segment_intersects_sphere(const Vector3 &p_from, const Vector3 &p_to, const Vector3 &p_sphere_pos, real_t p_sphere_radius) { +Vector<Vector3> _Geometry::segment_intersects_sphere(const Vector3 &p_from, const Vector3 &p_to, const Vector3 &p_sphere_pos, real_t p_sphere_radius) { - PoolVector<Vector3> r; + Vector<Vector3> r; Vector3 res, norm; if (!Geometry::segment_intersects_sphere(p_from, p_to, p_sphere_pos, p_sphere_radius, &res, &norm)) return r; @@ -1581,9 +1553,9 @@ PoolVector<Vector3> _Geometry::segment_intersects_sphere(const Vector3 &p_from, r.set(1, norm); return r; } -PoolVector<Vector3> _Geometry::segment_intersects_cylinder(const Vector3 &p_from, const Vector3 &p_to, float p_height, float p_radius) { +Vector<Vector3> _Geometry::segment_intersects_cylinder(const Vector3 &p_from, const Vector3 &p_to, float p_height, float p_radius) { - PoolVector<Vector3> r; + Vector<Vector3> r; Vector3 res, norm; if (!Geometry::segment_intersects_cylinder(p_from, p_to, p_height, p_radius, &res, &norm)) return r; @@ -1593,9 +1565,9 @@ PoolVector<Vector3> _Geometry::segment_intersects_cylinder(const Vector3 &p_from r.set(1, norm); return r; } -PoolVector<Vector3> _Geometry::segment_intersects_convex(const Vector3 &p_from, const Vector3 &p_to, const Vector<Plane> &p_planes) { +Vector<Vector3> _Geometry::segment_intersects_convex(const Vector3 &p_from, const Vector3 &p_to, const Vector<Plane> &p_planes) { - PoolVector<Vector3> r; + Vector<Vector3> r; Vector3 res, norm; if (!Geometry::segment_intersects_convex(p_from, p_to, p_planes.ptr(), p_planes.size(), &res, &norm)) return r; @@ -1984,9 +1956,9 @@ real_t _File::get_real() const { return f->get_real(); } -PoolVector<uint8_t> _File::get_buffer(int p_length) const { +Vector<uint8_t> _File::get_buffer(int p_length) const { - PoolVector<uint8_t> data; + Vector<uint8_t> data; ERR_FAIL_COND_V_MSG(!f, data, "File must be opened before use."); ERR_FAIL_COND_V_MSG(p_length < 0, data, "Length of buffer cannot be smaller than 0."); @@ -1996,11 +1968,9 @@ PoolVector<uint8_t> _File::get_buffer(int p_length) const { Error err = data.resize(p_length); ERR_FAIL_COND_V_MSG(err != OK, data, "Can't resize data to " + itos(p_length) + " elements."); - PoolVector<uint8_t>::Write w = data.write(); + uint8_t *w = data.ptrw(); int len = f->get_buffer(&w[0], p_length); - ERR_FAIL_COND_V(len < 0, PoolVector<uint8_t>()); - - w.release(); + ERR_FAIL_COND_V(len < 0, Vector<uint8_t>()); if (len < p_length) data.resize(p_length); @@ -2148,7 +2118,7 @@ void _File::store_csv_line(const Vector<String> &p_values, const String &p_delim f->store_csv_line(p_values, p_delim); } -void _File::store_buffer(const PoolVector<uint8_t> &p_buffer) { +void _File::store_buffer(const Vector<uint8_t> &p_buffer) { ERR_FAIL_COND_MSG(!f, "File must be opened before use."); @@ -2156,7 +2126,7 @@ void _File::store_buffer(const PoolVector<uint8_t> &p_buffer) { if (len == 0) return; - PoolVector<uint8_t>::Read r = p_buffer.read(); + const uint8_t *r = p_buffer.ptr(); f->store_buffer(&r[0], len); } @@ -2173,13 +2143,12 @@ void _File::store_var(const Variant &p_var, bool p_full_objects) { Error err = encode_variant(p_var, NULL, len, p_full_objects); ERR_FAIL_COND_MSG(err != OK, "Error when trying to encode Variant."); - PoolVector<uint8_t> buff; + Vector<uint8_t> buff; buff.resize(len); - PoolVector<uint8_t>::Write w = buff.write(); + uint8_t *w = buff.ptrw(); err = encode_variant(p_var, &w[0], len, p_full_objects); ERR_FAIL_COND_MSG(err != OK, "Error when trying to encode Variant."); - w.release(); store_32(len); store_buffer(buff); @@ -2189,10 +2158,10 @@ Variant _File::get_var(bool p_allow_objects) const { ERR_FAIL_COND_V_MSG(!f, Variant(), "File must be opened before use."); uint32_t len = get_32(); - PoolVector<uint8_t> buff = get_buffer(len); + Vector<uint8_t> buff = get_buffer(len); ERR_FAIL_COND_V((uint32_t)buff.size() != len, Variant()); - PoolVector<uint8_t>::Read r = buff.read(); + const uint8_t *r = buff.ptr(); Variant v; Error err = decode_variant(v, &r[0], len, NULL, p_allow_objects); @@ -2487,9 +2456,9 @@ String _Marshalls::variant_to_base64(const Variant &p_var, bool p_full_objects) Error err = encode_variant(p_var, NULL, len, p_full_objects); ERR_FAIL_COND_V_MSG(err != OK, "", "Error when trying to encode Variant."); - PoolVector<uint8_t> buff; + Vector<uint8_t> buff; buff.resize(len); - PoolVector<uint8_t>::Write w = buff.write(); + uint8_t *w = buff.ptrw(); err = encode_variant(p_var, &w[0], len, p_full_objects); ERR_FAIL_COND_V_MSG(err != OK, "", "Error when trying to encode Variant."); @@ -2505,9 +2474,9 @@ Variant _Marshalls::base64_to_variant(const String &p_str, bool p_allow_objects) int strlen = p_str.length(); CharString cstr = p_str.ascii(); - PoolVector<uint8_t> buf; + Vector<uint8_t> buf; buf.resize(strlen / 4 * 3 + 1); - PoolVector<uint8_t>::Write w = buf.write(); + uint8_t *w = buf.ptrw(); size_t len = 0; ERR_FAIL_COND_V(CryptoCore::b64_decode(&w[0], buf.size(), &len, (unsigned char *)cstr.get_data(), strlen) != OK, Variant()); @@ -2519,25 +2488,25 @@ Variant _Marshalls::base64_to_variant(const String &p_str, bool p_allow_objects) return v; }; -String _Marshalls::raw_to_base64(const PoolVector<uint8_t> &p_arr) { +String _Marshalls::raw_to_base64(const Vector<uint8_t> &p_arr) { - String ret = CryptoCore::b64_encode_str(p_arr.read().ptr(), p_arr.size()); + String ret = CryptoCore::b64_encode_str(p_arr.ptr(), p_arr.size()); ERR_FAIL_COND_V(ret == "", ret); return ret; }; -PoolVector<uint8_t> _Marshalls::base64_to_raw(const String &p_str) { +Vector<uint8_t> _Marshalls::base64_to_raw(const String &p_str) { int strlen = p_str.length(); CharString cstr = p_str.ascii(); size_t arr_len = 0; - PoolVector<uint8_t> buf; + Vector<uint8_t> buf; { buf.resize(strlen / 4 * 3 + 1); - PoolVector<uint8_t>::Write w = buf.write(); + uint8_t *w = buf.ptrw(); - ERR_FAIL_COND_V(CryptoCore::b64_decode(&w[0], buf.size(), &arr_len, (unsigned char *)cstr.get_data(), strlen) != OK, PoolVector<uint8_t>()); + ERR_FAIL_COND_V(CryptoCore::b64_decode(&w[0], buf.size(), &arr_len, (unsigned char *)cstr.get_data(), strlen) != OK, Vector<uint8_t>()); } buf.resize(arr_len); @@ -2557,9 +2526,9 @@ String _Marshalls::base64_to_utf8(const String &p_str) { int strlen = p_str.length(); CharString cstr = p_str.ascii(); - PoolVector<uint8_t> buf; + Vector<uint8_t> buf; buf.resize(strlen / 4 * 3 + 1 + 1); - PoolVector<uint8_t>::Write w = buf.write(); + uint8_t *w = buf.ptrw(); size_t len = 0; ERR_FAIL_COND_V(CryptoCore::b64_decode(&w[0], buf.size(), &len, (unsigned char *)cstr.get_data(), strlen) != OK, String()); @@ -2651,29 +2620,29 @@ void _Thread::_start_func(void *ud) { Ref<_Thread> *tud = (Ref<_Thread> *)ud; Ref<_Thread> t = *tud; memdelete(tud); - Variant::CallError ce; + Callable::CallError ce; const Variant *arg[1] = { &t->userdata }; Thread::set_name(t->target_method); t->ret = t->target_instance->call(t->target_method, arg, 1, ce); - if (ce.error != Variant::CallError::CALL_OK) { + if (ce.error != Callable::CallError::CALL_OK) { String reason; switch (ce.error) { - case Variant::CallError::CALL_ERROR_INVALID_ARGUMENT: { + case Callable::CallError::CALL_ERROR_INVALID_ARGUMENT: { reason = "Invalid Argument #" + itos(ce.argument); } break; - case Variant::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS: { + case Callable::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS: { reason = "Too Many Arguments"; } break; - case Variant::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS: { + case Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS: { reason = "Too Few Arguments"; } break; - case Variant::CallError::CALL_ERROR_INVALID_METHOD: { + case Callable::CallError::CALL_ERROR_INVALID_METHOD: { reason = "Method Not Found"; } break; @@ -2768,12 +2737,12 @@ _Thread::~_Thread() { ///////////////////////////////////// -PoolStringArray _ClassDB::get_class_list() const { +PackedStringArray _ClassDB::get_class_list() const { List<StringName> classes; ClassDB::get_class_list(&classes); - PoolStringArray ret; + PackedStringArray ret; ret.resize(classes.size()); int idx = 0; for (List<StringName>::Element *E = classes.front(); E; E = E->next()) { @@ -2782,12 +2751,12 @@ PoolStringArray _ClassDB::get_class_list() const { return ret; } -PoolStringArray _ClassDB::get_inheriters_from_class(const StringName &p_class) const { +PackedStringArray _ClassDB::get_inheriters_from_class(const StringName &p_class) const { List<StringName> classes; ClassDB::get_inheriters_from_class(p_class, &classes); - PoolStringArray ret; + PackedStringArray ret; ret.resize(classes.size()); int idx = 0; for (List<StringName>::Element *E = classes.front(); E; E = E->next()) { @@ -2905,12 +2874,12 @@ Array _ClassDB::get_method_list(StringName p_class, bool p_no_inheritance) const return ret; } -PoolStringArray _ClassDB::get_integer_constant_list(const StringName &p_class, bool p_no_inheritance) const { +PackedStringArray _ClassDB::get_integer_constant_list(const StringName &p_class, bool p_no_inheritance) const { List<String> constants; ClassDB::get_integer_constant_list(p_class, &constants, p_no_inheritance); - PoolStringArray ret; + PackedStringArray ret; ret.resize(constants.size()); int idx = 0; for (List<String>::Element *E = constants.front(); E; E = E->next()) { @@ -3132,8 +3101,8 @@ void _Engine::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::BOOL, "editor_hint"), "set_editor_hint", "is_editor_hint"); ADD_PROPERTY(PropertyInfo(Variant::INT, "iterations_per_second"), "set_iterations_per_second", "get_iterations_per_second"); ADD_PROPERTY(PropertyInfo(Variant::INT, "target_fps"), "set_target_fps", "get_target_fps"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "time_scale"), "set_time_scale", "get_time_scale"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "physics_jitter_fix"), "set_physics_jitter_fix", "get_physics_jitter_fix"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "time_scale"), "set_time_scale", "get_time_scale"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "physics_jitter_fix"), "set_physics_jitter_fix", "get_physics_jitter_fix"); } _Engine *_Engine::singleton = NULL; diff --git a/core/bind/core_bind.h b/core/bind/core_bind.h index 18bb1408e3..ae569ea189 100644 --- a/core/bind/core_bind.h +++ b/core/bind/core_bind.h @@ -52,9 +52,9 @@ public: static _ResourceLoader *get_singleton() { return singleton; } Ref<ResourceInteractiveLoader> load_interactive(const String &p_path, const String &p_type_hint = ""); RES load(const String &p_path, const String &p_type_hint = "", bool p_no_cache = false); - PoolVector<String> get_recognized_extensions_for_type(const String &p_type); + Vector<String> get_recognized_extensions_for_type(const String &p_type); void set_abort_on_missing_resources(bool p_abort); - PoolStringArray get_dependencies(const String &p_path); + PackedStringArray get_dependencies(const String &p_path); bool has_cached(const String &p_path); bool exists(const String &p_path, const String &p_type_hint = ""); @@ -83,7 +83,7 @@ public: static _ResourceSaver *get_singleton() { return singleton; } Error save(const String &p_path, const RES &p_resource, SaverFlags p_flags); - PoolVector<String> get_recognized_extensions(const RES &p_resource); + Vector<String> get_recognized_extensions(const RES &p_resource); _ResourceSaver(); }; @@ -105,14 +105,6 @@ public: VIDEO_DRIVER_VULKAN, }; - enum PowerState { - POWERSTATE_UNKNOWN, // Cannot determine power status. - POWERSTATE_ON_BATTERY, // Not plugged in, running on the battery. - POWERSTATE_NO_BATTERY, // Plugged in, no battery available. - POWERSTATE_CHARGING, // Plugged in, charging battery. - POWERSTATE_CHARGED // Plugged in, battery charged. - }; - enum Weekday { DAY_SUNDAY, DAY_MONDAY, @@ -165,7 +157,7 @@ public: virtual int get_audio_driver_count() const; virtual String get_audio_driver_name(int p_driver) const; - virtual PoolStringArray get_connected_midi_inputs(); + virtual PackedStringArray get_connected_midi_inputs(); virtual void open_midi_inputs(); virtual void close_midi_inputs(); @@ -284,7 +276,6 @@ public: uint64_t get_static_memory_usage() const; uint64_t get_static_memory_peak_usage() const; - uint64_t get_dynamic_memory_usage() const; void delay_usec(uint32_t p_usec) const; void delay_msec(uint32_t p_msec) const; @@ -346,10 +337,6 @@ public: void set_vsync_via_compositor(bool p_enable); bool is_vsync_via_compositor_enabled() const; - PowerState get_power_state(); - int get_power_seconds_left(); - int get_power_percent_left(); - bool has_feature(const String &p_feature) const; bool request_permission(const String &p_name); @@ -362,7 +349,6 @@ public: }; VARIANT_ENUM_CAST(_OS::VideoDriver); -VARIANT_ENUM_CAST(_OS::PowerState); VARIANT_ENUM_CAST(_OS::Weekday); VARIANT_ENUM_CAST(_OS::Month); VARIANT_ENUM_CAST(_OS::SystemDir); @@ -379,13 +365,13 @@ protected: public: static _Geometry *get_singleton(); - PoolVector<Plane> build_box_planes(const Vector3 &p_extents); - PoolVector<Plane> build_cylinder_planes(float p_radius, float p_height, int p_sides, Vector3::Axis p_axis = Vector3::AXIS_Z); - PoolVector<Plane> build_capsule_planes(float p_radius, float p_height, int p_sides, int p_lats, Vector3::Axis p_axis = Vector3::AXIS_Z); + Vector<Plane> build_box_planes(const Vector3 &p_extents); + Vector<Plane> build_cylinder_planes(float p_radius, float p_height, int p_sides, Vector3::Axis p_axis = Vector3::AXIS_Z); + Vector<Plane> build_capsule_planes(float p_radius, float p_height, int p_sides, int p_lats, Vector3::Axis p_axis = Vector3::AXIS_Z); Variant segment_intersects_segment_2d(const Vector2 &p_from_a, const Vector2 &p_to_a, const Vector2 &p_from_b, const Vector2 &p_to_b); Variant line_intersects_line_2d(const Vector2 &p_from_a, const Vector2 &p_dir_a, const Vector2 &p_from_b, const Vector2 &p_dir_b); - PoolVector<Vector2> get_closest_points_between_segments_2d(const Vector2 &p1, const Vector2 &q1, const Vector2 &p2, const Vector2 &q2); - PoolVector<Vector3> get_closest_points_between_segments(const Vector3 &p1, const Vector3 &p2, const Vector3 &q1, const Vector3 &q2); + Vector<Vector2> get_closest_points_between_segments_2d(const Vector2 &p1, const Vector2 &q1, const Vector2 &p2, const Vector2 &q2); + Vector<Vector3> get_closest_points_between_segments(const Vector3 &p1, const Vector3 &p2, const Vector3 &q1, const Vector3 &q2); Vector2 get_closest_point_to_segment_2d(const Vector2 &p_point, const Vector2 &p_a, const Vector2 &p_b); Vector3 get_closest_point_to_segment(const Vector3 &p_point, const Vector3 &p_a, const Vector3 &p_b); Vector2 get_closest_point_to_segment_uncapped_2d(const Vector2 &p_point, const Vector2 &p_a, const Vector2 &p_b); @@ -394,9 +380,9 @@ public: Variant segment_intersects_triangle(const Vector3 &p_from, const Vector3 &p_to, const Vector3 &p_v0, const Vector3 &p_v1, const Vector3 &p_v2); bool point_is_inside_triangle(const Vector2 &s, const Vector2 &a, const Vector2 &b, const Vector2 &c) const; - PoolVector<Vector3> segment_intersects_sphere(const Vector3 &p_from, const Vector3 &p_to, const Vector3 &p_sphere_pos, real_t p_sphere_radius); - PoolVector<Vector3> segment_intersects_cylinder(const Vector3 &p_from, const Vector3 &p_to, float p_height, float p_radius); - PoolVector<Vector3> segment_intersects_convex(const Vector3 &p_from, const Vector3 &p_to, const Vector<Plane> &p_planes); + Vector<Vector3> segment_intersects_sphere(const Vector3 &p_from, const Vector3 &p_to, const Vector3 &p_sphere_pos, real_t p_sphere_radius); + Vector<Vector3> segment_intersects_cylinder(const Vector3 &p_from, const Vector3 &p_to, float p_height, float p_radius); + Vector<Vector3> segment_intersects_convex(const Vector3 &p_from, const Vector3 &p_to, const Vector<Plane> &p_planes); bool is_point_in_circle(const Vector2 &p_point, const Vector2 &p_circle_pos, real_t p_circle_radius); real_t segment_intersects_circle(const Vector2 &p_from, const Vector2 &p_to, const Vector2 &p_circle_pos, real_t p_circle_radius); int get_uv84_normal_bit(const Vector3 &p_vector); @@ -503,7 +489,7 @@ public: Variant get_var(bool p_allow_objects = false) const; - PoolVector<uint8_t> get_buffer(int p_length) const; // Get an array of bytes. + Vector<uint8_t> get_buffer(int 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; @@ -536,7 +522,7 @@ public: virtual void store_pascal_string(const String &p_string); virtual String get_pascal_string(); - void store_buffer(const PoolVector<uint8_t> &p_buffer); // Store an array of bytes. + void store_buffer(const Vector<uint8_t> &p_buffer); // Store an array of bytes. void store_var(const Variant &p_var, bool p_full_objects = false); @@ -595,9 +581,9 @@ private: bool _list_skip_hidden; }; -class _Marshalls : public Reference { +class _Marshalls : public Object { - GDCLASS(_Marshalls, Reference); + GDCLASS(_Marshalls, Object); static _Marshalls *singleton; @@ -610,8 +596,8 @@ public: String variant_to_base64(const Variant &p_var, bool p_full_objects = false); Variant base64_to_variant(const String &p_str, bool p_allow_objects = false); - String raw_to_base64(const PoolVector<uint8_t> &p_arr); - PoolVector<uint8_t> base64_to_raw(const String &p_str); + String raw_to_base64(const Vector<uint8_t> &p_arr); + Vector<uint8_t> base64_to_raw(const String &p_str); String utf8_to_base64(const String &p_str); String base64_to_utf8(const String &p_str); @@ -693,8 +679,8 @@ protected: static void _bind_methods(); public: - PoolStringArray get_class_list() const; - PoolStringArray get_inheriters_from_class(const StringName &p_class) const; + PackedStringArray get_class_list() const; + PackedStringArray get_inheriters_from_class(const StringName &p_class) const; StringName get_parent_class(const StringName &p_class) const; bool class_exists(const StringName &p_class) const; bool is_parent_class(const StringName &p_class, const StringName &p_inherits) const; @@ -713,7 +699,7 @@ public: Array get_method_list(StringName p_class, bool p_no_inheritance = false) const; - PoolStringArray get_integer_constant_list(const StringName &p_class, bool p_no_inheritance = false) const; + PackedStringArray get_integer_constant_list(const StringName &p_class, bool p_no_inheritance = false) const; bool has_integer_constant(const StringName &p_class, const StringName &p_name) const; int get_integer_constant(const StringName &p_class, const StringName &p_name) const; StringName get_category(const StringName &p_node) const; diff --git a/core/callable.cpp b/core/callable.cpp new file mode 100644 index 0000000000..34b79cea10 --- /dev/null +++ b/core/callable.cpp @@ -0,0 +1,357 @@ +/*************************************************************************/ +/* callable.cpp */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* https://godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 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 "callable.h" +#include "core/script_language.h" +#include "message_queue.h" +#include "object.h" +#include "reference.h" + +void Callable::call_deferred(const Variant **p_arguments, int p_argcount) const { + MessageQueue::get_singleton()->push_callable(*this, p_arguments, p_argcount); +} + +void Callable::call(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; + r_call_error.expected = 0; + r_return_value = Variant(); + } else if (is_custom()) { + custom->call(p_arguments, p_argcount, r_return_value, r_call_error); + } else { + Object *obj = ObjectDB::get_instance(ObjectID(object)); + r_return_value = obj->call(method, p_arguments, p_argcount, r_call_error); + } +} + +Object *Callable::get_object() const { + if (is_null()) { + return nullptr; + } else if (is_custom()) { + return ObjectDB::get_instance(custom->get_object()); + } else { + return ObjectDB::get_instance(ObjectID(object)); + } +} + +ObjectID Callable::get_object_id() const { + if (is_null()) { + return ObjectID(); + } else if (is_custom()) { + return custom->get_object(); + } else { + return ObjectID(object); + } +} +StringName Callable::get_method() const { + ERR_FAIL_COND_V(is_custom(), StringName()); + return method; +} +uint32_t Callable::hash() const { + if (is_custom()) { + return custom->hash(); + } else { + uint32_t hash = method.hash(); + return hash_djb2_one_64(object, hash); + } +} + +bool Callable::operator==(const Callable &p_callable) const { + bool custom_a = is_custom(); + bool custom_b = p_callable.is_custom(); + + if (custom_a == custom_b) { + if (custom_a) { + if (custom == p_callable.custom) { + return true; //same pointer, dont even compare + } + + CallableCustom::CompareEqualFunc eq_a = custom->get_compare_equal_func(); + CallableCustom::CompareEqualFunc eq_b = p_callable.custom->get_compare_equal_func(); + if (eq_a == eq_b) { + return eq_a(custom, p_callable.custom); + } else { + return false; + } + } else { + return object == p_callable.object && method == p_callable.method; + } + } else { + return false; + } +} +bool Callable::operator!=(const Callable &p_callable) const { + return !(*this == p_callable); +} +bool Callable::operator<(const Callable &p_callable) const { + bool custom_a = is_custom(); + bool custom_b = p_callable.is_custom(); + + if (custom_a == custom_b) { + if (custom_a) { + if (custom == p_callable.custom) { + return false; //same pointer, dont even compare + } + + CallableCustom::CompareLessFunc less_a = custom->get_compare_less_func(); + CallableCustom::CompareLessFunc less_b = p_callable.custom->get_compare_less_func(); + if (less_a == less_b) { + return less_a(custom, p_callable.custom); + } else { + return less_a < less_b; //it's something.. + } + + } else { + if (object == p_callable.object) { + return method < p_callable.method; + } else { + return object < p_callable.object; + } + } + } else { + return int(custom_a ? 1 : 0) < int(custom_b ? 1 : 0); + } +} + +void Callable::operator=(const Callable &p_callable) { + if (is_custom()) { + if (p_callable.is_custom()) { + if (custom == p_callable.custom) { + return; + } + } + + if (custom->ref_count.unref()) { + memdelete(custom); + } + } + + if (p_callable.is_custom()) { + method = StringName(); + if (!p_callable.custom->ref_count.ref()) { + object = 0; + } else { + object = 0; + custom = p_callable.custom; + } + } else { + method = p_callable.method; + object = p_callable.object; + } +} + +Callable::operator String() const { + + if (is_custom()) { + return custom->get_as_text(); + } else { + if (is_null()) { + return "null::null"; + } + + Object *base = get_object(); + if (base) { + String class_name = base->get_class(); + Ref<Script> script = base->get_script(); + if (script.is_valid() && script->get_path().is_resource_file()) { + + class_name += "(" + script->get_path().get_file() + ")"; + } + return class_name + "::" + String(method); + } else { + return "null::" + String(method); + } + } +} + +Callable::Callable(const Object *p_object, const StringName &p_method) { + if (p_method == StringName()) { + object = 0; + ERR_FAIL_MSG("Method argument to Callable constructor must be a non-empty string"); + } + if (p_object == nullptr) { + object = 0; + ERR_FAIL_MSG("Object argument to Callable constructor must be non-null"); + } + + object = p_object->get_instance_id(); + method = p_method; +} + +Callable::Callable(ObjectID p_object, const StringName &p_method) { + if (p_method == StringName()) { + object = 0; + ERR_FAIL_MSG("Method argument to Callable constructor must be a non-empty string"); + } + + object = p_object; + method = p_method; +} +Callable::Callable(CallableCustom *p_custom) { + if (p_custom->referenced) { + object = 0; + ERR_FAIL_MSG("Callable custom is already referenced"); + } + p_custom->referenced = true; + object = 0; //ensure object is all zero, since pointer may be 32 bits + custom = p_custom; +} +Callable::Callable(const Callable &p_callable) { + if (p_callable.is_custom()) { + if (!p_callable.custom->ref_count.ref()) { + object = 0; + } else { + object = 0; + custom = p_callable.custom; + } + } else { + method = p_callable.method; + object = p_callable.object; + } +} + +Callable::~Callable() { + if (is_custom()) { + if (custom->ref_count.unref()) { + memdelete(custom); + } + } +} + +Callable::Callable() { + object = 0; +} + +CallableCustom::CallableCustom() { + referenced = false; + ref_count.init(); +} + +////////////////////////////////// + +Object *Signal::get_object() const { + return ObjectDB::get_instance(object); +} +ObjectID Signal::get_object_id() const { + return object; +} +StringName Signal::get_name() const { + return name; +} + +bool Signal::operator==(const Signal &p_signal) const { + return object == p_signal.object && name == p_signal.name; +} + +bool Signal::operator!=(const Signal &p_signal) const { + return object != p_signal.object || name != p_signal.name; +} + +bool Signal::operator<(const Signal &p_signal) const { + if (object == p_signal.object) { + return name < p_signal.name; + } else { + return object < p_signal.object; + } +} + +Signal::operator String() const { + Object *base = get_object(); + if (base) { + String class_name = base->get_class(); + Ref<Script> script = base->get_script(); + if (script.is_valid() && script->get_path().is_resource_file()) { + + class_name += "(" + script->get_path().get_file() + ")"; + } + return class_name + "::[signal]" + String(name); + } else { + return "null::[signal]" + String(name); + } +} + +Error Signal::emit(const Variant **p_arguments, int p_argcount) const { + Object *obj = ObjectDB::get_instance(object); + if (!obj) { + return ERR_INVALID_DATA; + } + + return obj->emit_signal(name, p_arguments, p_argcount); +} +Error Signal::connect(const Callable &p_callable, const Vector<Variant> &p_binds, uint32_t p_flags) { + + Object *object = get_object(); + ERR_FAIL_COND_V(!object, ERR_UNCONFIGURED); + + return object->connect(name, p_callable, p_binds, p_flags); +} +void Signal::disconnect(const Callable &p_callable) { + Object *object = get_object(); + ERR_FAIL_COND(!object); + object->disconnect(name, p_callable); +} +bool Signal::is_connected(const Callable &p_callable) const { + Object *object = get_object(); + ERR_FAIL_COND_V(!object, false); + + return object->is_connected(name, p_callable); +} + +Array Signal::get_connections() const { + Object *object = get_object(); + if (!object) { + return Array(); + } + + List<Object::Connection> connections; + object->get_signal_connection_list(name, &connections); + + Array arr; + for (List<Object::Connection>::Element *E = connections.front(); E; E = E->next()) { + arr.push_back(E->get()); + } + return arr; +} +Signal::Signal(const Object *p_object, const StringName &p_name) { + + ERR_FAIL_COND_MSG(p_object == nullptr, "Object argument to Signal constructor must be non-null"); + + object = p_object->get_instance_id(); + name = p_name; +} +Signal::Signal(ObjectID p_object, const StringName &p_name) { + + object = p_object; + name = p_name; +} +Signal::Signal() { +} diff --git a/core/callable.h b/core/callable.h new file mode 100644 index 0000000000..cecf2264a3 --- /dev/null +++ b/core/callable.h @@ -0,0 +1,161 @@ +/*************************************************************************/ +/* callable.h */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* https://godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 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 CALLABLE_H +#define CALLABLE_H + +#include "core/list.h" +#include "core/object_id.h" +#include "core/string_name.h" + +class Object; +class Variant; +class CallableCustom; + +// This is an abstraction of things that can be called. +// It is used for signals and other cases where efficient calling of functions +// is required. It is designed for the standard case (object and method) +// but can be optimized or customized. + +class Callable { + + //needs to be max 16 bytes in 64 bits + StringName method; + union { + uint64_t object; + CallableCustom *custom; + }; + +public: + struct CallError { + enum Error { + CALL_OK, + CALL_ERROR_INVALID_METHOD, + CALL_ERROR_INVALID_ARGUMENT, // expected is variant type + CALL_ERROR_TOO_MANY_ARGUMENTS, // expected is number of arguments + CALL_ERROR_TOO_FEW_ARGUMENTS, // expected is number of arguments + CALL_ERROR_INSTANCE_IS_NULL, + }; + Error error; + int argument; + int expected; + }; + + 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; + + _FORCE_INLINE_ bool is_null() const { + return method == StringName() && object == 0; + } + _FORCE_INLINE_ bool is_custom() const { + return method == StringName() && custom != 0; + } + _FORCE_INLINE_ bool is_standard() const { + return method != StringName(); + } + + Object *get_object() const; + ObjectID get_object_id() const; + StringName get_method() const; + + uint32_t hash() const; + + bool operator==(const Callable &p_callable) const; + bool operator!=(const Callable &p_callable) const; + bool operator<(const Callable &p_callable) const; + + void operator=(const Callable &p_callable); + + operator String() const; + + Callable(const Object *p_object, const StringName &p_method); + Callable(ObjectID p_object, const StringName &p_method); + Callable(CallableCustom *p_custom); + Callable(const Callable &p_callable); + Callable(); + ~Callable(); +}; + +class CallableCustom { + friend class Callable; + SafeRefCount ref_count; + bool referenced; + +public: + typedef bool (*CompareEqualFunc)(const CallableCustom *p_a, const CallableCustom *p_b); + typedef bool (*CompareLessFunc)(const CallableCustom *p_a, const CallableCustom *p_b); + + //for every type that inherits, these must always be the same for this type + virtual uint32_t hash() const = 0; + virtual String get_as_text() const = 0; + virtual CompareEqualFunc get_compare_equal_func() const = 0; + virtual CompareLessFunc get_compare_less_func() const = 0; + 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; + + CallableCustom(); + virtual ~CallableCustom() {} +}; + +// This is just a proxy object to object signals, its only +// allocated on demand by/for scripting languages so it can +// be put inside a Variant, but it is not +// used by the engine itself. + +class Signal { + StringName name; + ObjectID object; + +public: + _FORCE_INLINE_ bool is_null() const { + return object.is_null() && name == StringName(); + } + Object *get_object() const; + ObjectID get_object_id() const; + StringName get_name() const; + + bool operator==(const Signal &p_signal) const; + bool operator!=(const Signal &p_signal) const; + bool operator<(const Signal &p_signal) const; + + operator String() const; + + Error emit(const Variant **p_arguments, int p_argcount) const; + Error connect(const Callable &p_callable, const Vector<Variant> &p_binds = Vector<Variant>(), uint32_t p_flags = 0); + void disconnect(const Callable &p_callable); + bool is_connected(const Callable &p_callable) const; + + Array get_connections() const; + Signal(const Object *p_object, const StringName &p_name); + Signal(ObjectID p_object, const StringName &p_name); + Signal(); +}; + +#endif // CALLABLE_H diff --git a/platform/uwp/power_uwp.cpp b/core/callable_method_pointer.cpp index c6b4359392..8774af6add 100644 --- a/platform/uwp/power_uwp.cpp +++ b/core/callable_method_pointer.cpp @@ -1,5 +1,5 @@ /*************************************************************************/ -/* power_uwp.cpp */ +/* callable_method_pointer.cpp */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ @@ -28,50 +28,67 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -#include "power_uwp.h" +#include "callable_method_pointer.h" -PowerUWP::PowerUWP() : - nsecs_left(-1), - percent_left(-1), - power_state(OS::POWERSTATE_UNKNOWN) { -} +bool CallableCustomMethodPointerBase::compare_equal(const CallableCustom *p_a, const CallableCustom *p_b) { + const CallableCustomMethodPointerBase *a = static_cast<const CallableCustomMethodPointerBase *>(p_a); + const CallableCustomMethodPointerBase *b = static_cast<const CallableCustomMethodPointerBase *>(p_b); + + if (a->comp_size != b->comp_size) { + return false; + } + + for (uint32_t i = 0; i < a->comp_size; i++) { + if (a->comp_ptr[i] != b->comp_ptr[i]) { + return false; + } + } -PowerUWP::~PowerUWP() { + return true; } -bool PowerUWP::UpdatePowerInfo() { - // TODO, WinRT: Battery info is available on at least one WinRT platform (Windows Phone 8). Implement UpdatePowerInfo as appropriate. */ - /* Notes from SDL: - - the Win32 function, GetSystemPowerStatus, is not available for use on WinRT - - Windows Phone 8 has a 'Battery' class, which is documented as available for C++ - - More info on WP8's Battery class can be found at http://msdn.microsoft.com/library/windowsphone/develop/jj207231 - */ +bool CallableCustomMethodPointerBase::compare_less(const CallableCustom *p_a, const CallableCustom *p_b) { + + const CallableCustomMethodPointerBase *a = static_cast<const CallableCustomMethodPointerBase *>(p_a); + const CallableCustomMethodPointerBase *b = static_cast<const CallableCustomMethodPointerBase *>(p_b); + + if (a->comp_size != b->comp_size) { + return a->comp_size < b->comp_size; + } + + for (uint32_t i = 0; i < a->comp_size; i++) { + if (a->comp_ptr[i] == b->comp_ptr[i]) { + continue; + } + + return a->comp_ptr[i] < b->comp_ptr[i]; + } + return false; } -OS::PowerState PowerUWP::get_power_state() { - if (UpdatePowerInfo()) { - return power_state; - } else { - WARN_PRINT("Power management is not implemented on this platform, defaulting to POWERSTATE_UNKNOWN"); - return OS::POWERSTATE_UNKNOWN; - } +CallableCustom::CompareEqualFunc CallableCustomMethodPointerBase::get_compare_equal_func() const { + return compare_equal; } -int PowerUWP::get_power_seconds_left() { - if (UpdatePowerInfo()) { - return nsecs_left; - } else { - WARN_PRINT("Power management is not implemented on this platform, defaulting to -1"); - return -1; - } +CallableCustom::CompareLessFunc CallableCustomMethodPointerBase::get_compare_less_func() const { + return compare_less; +} + +uint32_t CallableCustomMethodPointerBase::hash() const { + return h; } -int PowerUWP::get_power_percent_left() { - if (UpdatePowerInfo()) { - return percent_left; - } else { - WARN_PRINT("Power management is not implemented on this platform, defaulting to -1"); - return -1; +void CallableCustomMethodPointerBase::_setup(uint32_t *p_base_ptr, uint32_t p_ptr_size) { + comp_ptr = p_base_ptr; + comp_size = p_ptr_size / 4; + + // Precompute hash. + for (uint32_t i = 0; i < comp_size; i++) { + if (i == 0) { + h = hash_djb2_one_32(comp_ptr[i]); + } else { + h = hash_djb2_one_32(comp_ptr[i], h); + } } } diff --git a/core/callable_method_pointer.h b/core/callable_method_pointer.h new file mode 100644 index 0000000000..a931a344e6 --- /dev/null +++ b/core/callable_method_pointer.h @@ -0,0 +1,292 @@ +/*************************************************************************/ +/* callable_method_pointer.h */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* https://godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 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 CALLABLE_METHOD_POINTER_H +#define CALLABLE_METHOD_POINTER_H + +#include "core/callable.h" +#include "core/hashfuncs.h" +#include "core/object.h" +#include "core/simple_type.h" + +class CallableCustomMethodPointerBase : public CallableCustom { + + uint32_t *comp_ptr; + uint32_t comp_size; + uint32_t h; +#ifdef DEBUG_METHODS_ENABLED + const char *text = ""; +#endif + static bool compare_equal(const CallableCustom *p_a, const CallableCustom *p_b); + static bool compare_less(const CallableCustom *p_a, const CallableCustom *p_b); + +protected: + void _setup(uint32_t *p_base_ptr, uint32_t p_ptr_size); + +public: +#ifdef DEBUG_METHODS_ENABLED + void set_text(const char *p_text) { + text = p_text; + } + virtual String get_as_text() const { + return text; + } +#else + virtual String get_as_text() const { + return String(); + } +#endif + virtual CompareEqualFunc get_compare_equal_func() const; + virtual CompareLessFunc get_compare_less_func() const; + + virtual uint32_t hash() const; +}; + +#ifdef DEBUG_METHODS_ENABLED + +template <class T> +struct VariantCasterAndValidate { + + static _FORCE_INLINE_ T cast(const Variant **p_args, uint32_t p_arg_idx, Callable::CallError &r_error) { + Variant::Type argtype = GetTypeInfo<T>::VARIANT_TYPE; + if (!Variant::can_convert_strict(p_args[p_arg_idx]->get_type(), argtype)) { + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; + r_error.argument = p_arg_idx; + r_error.expected = argtype; + } + + return VariantCaster<T>::cast(*p_args[p_arg_idx]); + } +}; + +template <class T> +struct VariantCasterAndValidate<T &> { + + static _FORCE_INLINE_ T cast(const Variant **p_args, uint32_t p_arg_idx, Callable::CallError &r_error) { + Variant::Type argtype = GetTypeInfo<T>::VARIANT_TYPE; + if (!Variant::can_convert_strict(p_args[p_arg_idx]->get_type(), argtype)) { + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; + r_error.argument = p_arg_idx; + r_error.expected = argtype; + } + + return VariantCaster<T>::cast(*p_args[p_arg_idx]); + } +}; + +template <class T> +struct VariantCasterAndValidate<const T &> { + + static _FORCE_INLINE_ T cast(const Variant **p_args, uint32_t p_arg_idx, Callable::CallError &r_error) { + Variant::Type argtype = GetTypeInfo<T>::VARIANT_TYPE; + if (!Variant::can_convert_strict(p_args[p_arg_idx]->get_type(), argtype)) { + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; + r_error.argument = p_arg_idx; + r_error.expected = argtype; + } + + return VariantCaster<T>::cast(*p_args[p_arg_idx]); + } +}; + +#endif // DEBUG_METHODS_ENABLED + +// GCC 8 raises "parameter 'p_args' set but not used" here, probably using a +// template version that does not have arguments and thus sees it unused, but +// obviously the template can be used for functions with and without them, and +// the optimizer will get rid of it anyway. +#if defined(DEBUG_METHODS_ENABLED) && defined(__GNUC__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-parameter" +#endif + +template <class T, class... P, size_t... Is> +void call_with_variant_args_helper(T *p_instance, void (T::*p_method)(P...), const Variant **p_args, Callable::CallError &r_error, IndexSequence<Is...>) { + r_error.error = Callable::CallError::CALL_OK; + +#ifdef DEBUG_METHODS_ENABLED + (p_instance->*p_method)(VariantCasterAndValidate<P>::cast(p_args, Is, r_error)...); +#else + (p_instance->*p_method)(VariantCaster<P>::cast(p_args[Is])...); +#endif +} + +#if defined(DEBUG_METHODS_ENABLED) && defined(__GNUC__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif + +template <class T, class... P> +void call_with_variant_args(T *p_instance, void (T::*p_method)(P...), const Variant **p_args, int p_argcount, Callable::CallError &r_error) { +#ifdef DEBUG_METHODS_ENABLED + if ((size_t)p_argcount > sizeof...(P)) { + r_error.error = Callable::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS; + r_error.argument = sizeof...(P); + return; + } + + if ((size_t)p_argcount < sizeof...(P)) { + r_error.error = Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS; + r_error.argument = sizeof...(P); + return; + } +#endif + call_with_variant_args_helper<T, P...>(p_instance, p_method, p_args, r_error, BuildIndexSequence<sizeof...(P)>{}); +} + +template <class T, class... P> +class CallableCustomMethodPointer : public CallableCustomMethodPointerBase { + + struct Data { + T *instance; + void (T::*method)(P...); + } data; + +public: + virtual ObjectID get_object() const { return data.instance->get_instance_id(); } + + virtual void call(const Variant **p_arguments, int p_argcount, Variant &r_return_value, Callable::CallError &r_call_error) const { + + call_with_variant_args(data.instance, data.method, p_arguments, p_argcount, r_call_error); + } + + CallableCustomMethodPointer(T *p_instance, void (T::*p_method)(P...)) { + zeromem(&data, sizeof(Data)); // Clear beforehand, may have padding bytes. + data.instance = p_instance; + data.method = p_method; + _setup((uint32_t *)&data, sizeof(Data)); + } +}; + +template <class T, class... P> +Callable create_custom_callable_function_pointer(T *p_instance, +#ifdef DEBUG_METHODS_ENABLED + const char *p_func_text, +#endif + void (T::*p_method)(P...)) { + + typedef CallableCustomMethodPointer<T, P...> CCMP; // Messes with memnew otherwise. + CCMP *ccmp = memnew(CCMP(p_instance, p_method)); +#ifdef DEBUG_METHODS_ENABLED + ccmp->set_text(p_func_text + 1); // Try to get rid of the ampersand. +#endif + return Callable(ccmp); +} + +// VERSION WITH RETURN + +// GCC 8 raises "parameter 'p_args' set but not used" here, probably using a +// template version that does not have arguments and thus sees it unused, but +// obviously the template can be used for functions with and without them, and +// the optimizer will get rid of it anyway. +#if defined(DEBUG_METHODS_ENABLED) && defined(__GNUC__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-but-set-parameter" +#endif + +template <class T, class R, class... P, size_t... Is> +void call_with_variant_args_ret_helper(T *p_instance, R (T::*p_method)(P...), const Variant **p_args, Variant &r_ret, Callable::CallError &r_error, IndexSequence<Is...>) { + r_error.error = Callable::CallError::CALL_OK; + +#ifdef DEBUG_METHODS_ENABLED + r_ret = (p_instance->*p_method)(VariantCasterAndValidate<P>::cast(p_args, Is, r_error)...); +#else + (p_instance->*p_method)(VariantCaster<P>::cast(p_args[Is])...); +#endif +} + +#if defined(DEBUG_METHODS_ENABLED) && defined(__GNUC__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif + +template <class T, class R, class... P> +void call_with_variant_args_ret(T *p_instance, R (T::*p_method)(P...), const Variant **p_args, int p_argcount, Variant &r_ret, Callable::CallError &r_error) { +#ifdef DEBUG_METHODS_ENABLED + if ((size_t)p_argcount > sizeof...(P)) { + r_error.error = Callable::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS; + r_error.argument = sizeof...(P); + return; + } + + if ((size_t)p_argcount < sizeof...(P)) { + r_error.error = Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS; + r_error.argument = sizeof...(P); + return; + } +#endif + call_with_variant_args_ret_helper<T, R, P...>(p_instance, p_method, p_args, r_ret, r_error, BuildIndexSequence<sizeof...(P)>{}); +} + +template <class T, class R, class... P> +class CallableCustomMethodPointerRet : public CallableCustomMethodPointerBase { + + struct Data { + T *instance; + R(T::*method) + (P...); + } data; + +public: + virtual ObjectID get_object() const { return data.instance->get_instance_id(); } + + virtual void call(const Variant **p_arguments, int p_argcount, Variant &r_return_value, Callable::CallError &r_call_error) const { + + call_with_variant_args_ret(data.instance, data.method, p_arguments, p_argcount, r_return_value, r_call_error); + } + + CallableCustomMethodPointerRet(T *p_instance, R (T::*p_method)(P...)) { + zeromem(&data, sizeof(Data)); // Clear beforehand, may have padding bytes. + data.instance = p_instance; + data.method = p_method; + _setup((uint32_t *)&data, sizeof(Data)); + } +}; + +template <class T, class R, class... P> +Callable create_custom_callable_function_pointer(T *p_instance, +#ifdef DEBUG_METHODS_ENABLED + const char *p_func_text, +#endif + R (T::*p_method)(P...)) { + + typedef CallableCustomMethodPointerRet<T, R, P...> CCMP; // Messes with memnew otherwise. + CCMP *ccmp = memnew(CCMP(p_instance, p_method)); +#ifdef DEBUG_METHODS_ENABLED + ccmp->set_text(p_func_text + 1); // Try to get rid of the ampersand. +#endif + return Callable(ccmp); +} + +#ifdef DEBUG_METHODS_ENABLED +#define callable_mp(I, M) create_custom_callable_function_pointer(I, #M, M) +#else +#define callable_mp(I, M) create_custom_callable_function_pointer(I, M) +#endif + +#endif // CALLABLE_METHOD_POINTER_H diff --git a/core/class_db.cpp b/core/class_db.cpp index a2941d70f6..35e216a58f 100644 --- a/core/class_db.cpp +++ b/core/class_db.cpp @@ -1033,7 +1033,7 @@ bool ClassDB::set_property(Object *p_object, const StringName &p_property, const return true; //return true but do nothing } - Variant::CallError ce; + Callable::CallError ce; if (psg->index >= 0) { Variant index = psg->index; @@ -1055,7 +1055,7 @@ bool ClassDB::set_property(Object *p_object, const StringName &p_property, const } if (r_valid) - *r_valid = ce.error == Variant::CallError::CALL_OK; + *r_valid = ce.error == Callable::CallError::CALL_OK; return true; } @@ -1078,12 +1078,12 @@ bool ClassDB::get_property(Object *p_object, const StringName &p_property, Varia if (psg->index >= 0) { Variant index = psg->index; const Variant *arg[1] = { &index }; - Variant::CallError ce; + Callable::CallError ce; r_value = p_object->call(psg->getter, arg, 1, ce); } else { - Variant::CallError ce; + Callable::CallError ce; if (psg->_getptr) { r_value = psg->_getptr->call(p_object, NULL, 0, ce); @@ -1094,13 +1094,23 @@ bool ClassDB::get_property(Object *p_object, const StringName &p_property, Varia return true; } - const int *c = check->constant_map.getptr(p_property); + const int *c = check->constant_map.getptr(p_property); //constants count if (c) { r_value = *c; return true; } + if (check->method_map.has(p_property)) { //methods count + r_value = Callable(p_object, p_property); + return true; + } + + if (check->signal_map.has(p_property)) { //signals count + r_value = Signal(p_object, p_property); + return true; + } + check = check->inherits_ptr; } diff --git a/core/class_db.h b/core/class_db.h index 404b04f2d0..398eca9132 100644 --- a/core/class_db.h +++ b/core/class_db.h @@ -35,13 +35,15 @@ #include "core/object.h" #include "core/print_string.h" -/** To bind more then 6 parameters include this: +/** To bind more then 6 parameters include this: * #include "core/method_bind_ext.gen.inc" */ -#define DEFVAL(m_defval) (m_defval) +// Makes callable_mp readily available in all classes connecting signals. +// Needs to come after method_bind and object have been included. +#include "core/callable_method_pointer.h" -//#define SIMPLE_METHODDEF +#define DEFVAL(m_defval) (m_defval) #ifdef DEBUG_METHODS_ENABLED diff --git a/core/compressed_translation.cpp b/core/compressed_translation.cpp index 69b4ec292f..ed307fd3ac 100644 --- a/core/compressed_translation.cpp +++ b/core/compressed_translation.cpp @@ -141,8 +141,8 @@ void PHashTranslation::generate(const Ref<Translation> &p_from) { hash_table.resize(size); bucket_table.resize(bucket_table_size); - PoolVector<int>::Write htwb = hash_table.write(); - PoolVector<int>::Write btwb = bucket_table.write(); + int *htwb = hash_table.ptrw(); + int *btwb = bucket_table.ptrw(); uint32_t *htw = (uint32_t *)&htwb[0]; uint32_t *btw = (uint32_t *)&btwb[0]; @@ -174,7 +174,7 @@ void PHashTranslation::generate(const Ref<Translation> &p_from) { } strings.resize(total_compression_size); - PoolVector<uint8_t>::Write cw = strings.write(); + uint8_t *cw = strings.ptrw(); for (int i = 0; i < compressed.size(); i++) { memcpy(&cw[compressed[i].offset], compressed[i].compressed.get_data(), compressed[i].compressed.size()); @@ -228,11 +228,11 @@ StringName PHashTranslation::get_message(const StringName &p_src_text) const { CharString str = p_src_text.operator String().utf8(); uint32_t h = hash(0, str.get_data()); - PoolVector<int>::Read htr = hash_table.read(); + const int *htr = hash_table.ptr(); const uint32_t *htptr = (const uint32_t *)&htr[0]; - PoolVector<int>::Read btr = bucket_table.read(); + const int *btr = bucket_table.ptr(); const uint32_t *btptr = (const uint32_t *)&btr[0]; - PoolVector<uint8_t>::Read sr = strings.read(); + const uint8_t *sr = strings.ptr(); const char *sptr = (const char *)&sr[0]; uint32_t p = htptr[h % htsize]; @@ -279,9 +279,9 @@ StringName PHashTranslation::get_message(const StringName &p_src_text) const { void PHashTranslation::_get_property_list(List<PropertyInfo> *p_list) const { - p_list->push_back(PropertyInfo(Variant::POOL_INT_ARRAY, "hash_table")); - p_list->push_back(PropertyInfo(Variant::POOL_INT_ARRAY, "bucket_table")); - p_list->push_back(PropertyInfo(Variant::POOL_BYTE_ARRAY, "strings")); + p_list->push_back(PropertyInfo(Variant::PACKED_INT32_ARRAY, "hash_table")); + p_list->push_back(PropertyInfo(Variant::PACKED_INT32_ARRAY, "bucket_table")); + p_list->push_back(PropertyInfo(Variant::PACKED_BYTE_ARRAY, "strings")); p_list->push_back(PropertyInfo(Variant::OBJECT, "load_from", PROPERTY_HINT_RESOURCE_TYPE, "Translation", PROPERTY_USAGE_EDITOR)); } void PHashTranslation::_bind_methods() { diff --git a/core/compressed_translation.h b/core/compressed_translation.h index a72be739a1..d599240dfe 100644 --- a/core/compressed_translation.h +++ b/core/compressed_translation.h @@ -43,9 +43,9 @@ class PHashTranslation : public Translation { //of catching untranslated strings //load/store friendly types - PoolVector<int> hash_table; - PoolVector<int> bucket_table; - PoolVector<uint8_t> strings; + Vector<int> hash_table; + Vector<int> bucket_table; + Vector<uint8_t> strings; struct Bucket { diff --git a/core/core_string_names.cpp b/core/core_string_names.cpp index bafb800e41..253d5f1acb 100644 --- a/core/core_string_names.cpp +++ b/core/core_string_names.cpp @@ -70,5 +70,9 @@ CoreStringNames::CoreStringNames() : r8(StaticCString::create("r8")), g8(StaticCString::create("g8")), b8(StaticCString::create("b8")), - a8(StaticCString::create("a8")) { + a8(StaticCString::create("a8")), + call(StaticCString::create("call")), + call_deferred(StaticCString::create("call_deferred")), + emit(StaticCString::create("emit")), + notification(StaticCString::create("notification")) { } diff --git a/core/core_string_names.h b/core/core_string_names.h index a507a20935..42416d3f75 100644 --- a/core/core_string_names.h +++ b/core/core_string_names.h @@ -90,6 +90,11 @@ public: StringName g8; StringName b8; StringName a8; + + StringName call; + StringName call_deferred; + StringName emit; + StringName notification; }; #endif // SCENE_STRING_NAMES_H diff --git a/core/crypto/crypto.cpp b/core/crypto/crypto.cpp index 3bee34f8e4..3711b26e47 100644 --- a/core/crypto/crypto.cpp +++ b/core/crypto/crypto.cpp @@ -82,8 +82,8 @@ void Crypto::_bind_methods() { ClassDB::bind_method(D_METHOD("generate_self_signed_certificate", "key", "issuer_name", "not_before", "not_after"), &Crypto::generate_self_signed_certificate, DEFVAL("CN=myserver,O=myorganisation,C=IT"), DEFVAL("20140101000000"), DEFVAL("20340101000000")); } -PoolByteArray Crypto::generate_random_bytes(int p_bytes) { - ERR_FAIL_V_MSG(PoolByteArray(), "generate_random_bytes is not available when mbedtls module is disabled."); +PackedByteArray Crypto::generate_random_bytes(int p_bytes) { + ERR_FAIL_V_MSG(PackedByteArray(), "generate_random_bytes is not available when mbedtls module is disabled."); } Ref<CryptoKey> Crypto::generate_rsa(int p_bytes) { diff --git a/core/crypto/crypto.h b/core/crypto/crypto.h index adc36255b6..babd0bc4eb 100644 --- a/core/crypto/crypto.h +++ b/core/crypto/crypto.h @@ -76,7 +76,7 @@ public: static Crypto *create(); static void load_default_certificates(String p_path); - virtual PoolByteArray generate_random_bytes(int p_bytes); + virtual PackedByteArray generate_random_bytes(int p_bytes); virtual Ref<CryptoKey> generate_rsa(int p_bytes); virtual Ref<X509Certificate> generate_self_signed_certificate(Ref<CryptoKey> p_key, String p_issuer_name, String p_not_before, String p_not_after); diff --git a/core/crypto/crypto_core.cpp b/core/crypto/crypto_core.cpp index dec52d8ca4..ec25ee0d38 100644 --- a/core/crypto/crypto_core.cpp +++ b/core/crypto/crypto_core.cpp @@ -148,9 +148,9 @@ Error CryptoCore::AESContext::decrypt_ecb(const uint8_t p_src[16], uint8_t r_dst // CryptoCore String CryptoCore::b64_encode_str(const uint8_t *p_src, int p_src_len) { int b64len = p_src_len / 3 * 4 + 4 + 1; - PoolVector<uint8_t> b64buff; + Vector<uint8_t> b64buff; b64buff.resize(b64len); - PoolVector<uint8_t>::Write w64 = b64buff.write(); + uint8_t *w64 = b64buff.ptrw(); size_t strlen = 0; int ret = b64_encode(&w64[0], b64len, &strlen, p_src, p_src_len); w64[strlen] = 0; diff --git a/core/crypto/hashing_context.cpp b/core/crypto/hashing_context.cpp index 7bee8f1200..a4d8a93c8a 100644 --- a/core/crypto/hashing_context.cpp +++ b/core/crypto/hashing_context.cpp @@ -47,11 +47,11 @@ Error HashingContext::start(HashType p_type) { return ERR_UNAVAILABLE; } -Error HashingContext::update(PoolByteArray p_chunk) { +Error HashingContext::update(PackedByteArray p_chunk) { ERR_FAIL_COND_V(ctx == NULL, ERR_UNCONFIGURED); size_t len = p_chunk.size(); ERR_FAIL_COND_V(len == 0, FAILED); - PoolByteArray::Read r = p_chunk.read(); + const uint8_t *r = p_chunk.ptr(); switch (type) { case HASH_MD5: return ((CryptoCore::MD5Context *)ctx)->update(&r[0], len); @@ -63,26 +63,26 @@ Error HashingContext::update(PoolByteArray p_chunk) { return ERR_UNAVAILABLE; } -PoolByteArray HashingContext::finish() { - ERR_FAIL_COND_V(ctx == NULL, PoolByteArray()); - PoolByteArray out; +PackedByteArray HashingContext::finish() { + ERR_FAIL_COND_V(ctx == NULL, PackedByteArray()); + PackedByteArray out; Error err = FAILED; switch (type) { case HASH_MD5: out.resize(16); - err = ((CryptoCore::MD5Context *)ctx)->finish(out.write().ptr()); + err = ((CryptoCore::MD5Context *)ctx)->finish(out.ptrw()); break; case HASH_SHA1: out.resize(20); - err = ((CryptoCore::SHA1Context *)ctx)->finish(out.write().ptr()); + err = ((CryptoCore::SHA1Context *)ctx)->finish(out.ptrw()); break; case HASH_SHA256: out.resize(32); - err = ((CryptoCore::SHA256Context *)ctx)->finish(out.write().ptr()); + err = ((CryptoCore::SHA256Context *)ctx)->finish(out.ptrw()); break; } _delete_ctx(); - ERR_FAIL_COND_V(err != OK, PoolByteArray()); + ERR_FAIL_COND_V(err != OK, PackedByteArray()); return out; } diff --git a/core/crypto/hashing_context.h b/core/crypto/hashing_context.h index af6ed3aa0b..230ba7ee85 100644 --- a/core/crypto/hashing_context.h +++ b/core/crypto/hashing_context.h @@ -54,8 +54,8 @@ protected: public: Error start(HashType p_type); - Error update(PoolByteArray p_chunk); - PoolByteArray finish(); + Error update(PackedByteArray p_chunk); + PackedByteArray finish(); HashingContext(); ~HashingContext(); diff --git a/core/func_ref.cpp b/core/func_ref.cpp index e20188c813..338c17946b 100644 --- a/core/func_ref.cpp +++ b/core/func_ref.cpp @@ -30,16 +30,16 @@ #include "func_ref.h" -Variant FuncRef::call_func(const Variant **p_args, int p_argcount, Variant::CallError &r_error) { +Variant FuncRef::call_func(const Variant **p_args, int p_argcount, Callable::CallError &r_error) { if (id.is_null()) { - r_error.error = Variant::CallError::CALL_ERROR_INSTANCE_IS_NULL; + r_error.error = Callable::CallError::CALL_ERROR_INSTANCE_IS_NULL; return Variant(); } Object *obj = ObjectDB::get_instance(id); if (!obj) { - r_error.error = Variant::CallError::CALL_ERROR_INSTANCE_IS_NULL; + r_error.error = Callable::CallError::CALL_ERROR_INSTANCE_IS_NULL; return Variant(); } diff --git a/core/func_ref.h b/core/func_ref.h index 1d1ca47ad7..8cb3be6e61 100644 --- a/core/func_ref.h +++ b/core/func_ref.h @@ -43,7 +43,7 @@ protected: static void _bind_methods(); public: - Variant call_func(const Variant **p_args, int p_argcount, Variant::CallError &r_error); + Variant call_func(const Variant **p_args, int p_argcount, Callable::CallError &r_error); Variant call_funcv(const Array &p_args); void set_instance(Object *p_obj); void set_function(const StringName &p_func); diff --git a/core/global_constants.cpp b/core/global_constants.cpp index e48556c064..0945240c1f 100644 --- a/core/global_constants.cpp +++ b/core/global_constants.cpp @@ -92,9 +92,6 @@ VARIANT_ENUM_CAST(JoystickList); VARIANT_ENUM_CAST(MidiMessageList); void register_global_constants() { - - //{ KEY_BACKSPACE, VK_BACK },// (0x08) // backspace - BIND_GLOBAL_ENUM_CONSTANT(MARGIN_LEFT); BIND_GLOBAL_ENUM_CONSTANT(MARGIN_TOP); BIND_GLOBAL_ENUM_CONSTANT(MARGIN_RIGHT); @@ -116,7 +113,7 @@ void register_global_constants() { BIND_GLOBAL_ENUM_CONSTANT(VALIGN_CENTER); BIND_GLOBAL_ENUM_CONSTANT(VALIGN_BOTTOM); - // hueg list of keys + // huge list of keys BIND_GLOBAL_CONSTANT(SPKEY); BIND_GLOBAL_ENUM_CONSTANT(KEY_ESCAPE); @@ -594,30 +591,38 @@ void register_global_constants() { BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_NIL", Variant::NIL); BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_BOOL", Variant::BOOL); BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_INT", Variant::INT); - BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_REAL", Variant::REAL); + BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_REAL", Variant::FLOAT); BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_STRING", Variant::STRING); - BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_VECTOR2", Variant::VECTOR2); // 5 + BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_VECTOR2", Variant::VECTOR2); + BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_VECTOR2I", Variant::VECTOR2I); BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_RECT2", Variant::RECT2); + BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_RECT2I", Variant::RECT2I); BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_VECTOR3", Variant::VECTOR3); + BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_VECTOR3I", Variant::VECTOR3I); BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_TRANSFORM2D", Variant::TRANSFORM2D); BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_PLANE", Variant::PLANE); - BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_QUAT", Variant::QUAT); // 10 + BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_QUAT", Variant::QUAT); BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_AABB", Variant::AABB); BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_BASIS", Variant::BASIS); BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_TRANSFORM", Variant::TRANSFORM); BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_COLOR", Variant::COLOR); - BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_NODE_PATH", Variant::NODE_PATH); // 15 + BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_STRING_NAME", Variant::STRING_NAME); + BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_NODE_PATH", Variant::NODE_PATH); BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_RID", Variant::_RID); BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_OBJECT", Variant::OBJECT); - BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_DICTIONARY", Variant::DICTIONARY); // 20 + BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_CALLABLE", Variant::CALLABLE); + BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_SIGNAL", Variant::SIGNAL); + BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_DICTIONARY", Variant::DICTIONARY); BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_ARRAY", Variant::ARRAY); - BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_RAW_ARRAY", Variant::POOL_BYTE_ARRAY); - BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_INT_ARRAY", Variant::POOL_INT_ARRAY); - BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_REAL_ARRAY", Variant::POOL_REAL_ARRAY); - BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_STRING_ARRAY", Variant::POOL_STRING_ARRAY); - BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_VECTOR2_ARRAY", Variant::POOL_VECTOR2_ARRAY); // 25 - BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_VECTOR3_ARRAY", Variant::POOL_VECTOR3_ARRAY); - BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_COLOR_ARRAY", Variant::POOL_COLOR_ARRAY); + BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_RAW_ARRAY", Variant::PACKED_BYTE_ARRAY); + BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_INT32_ARRAY", Variant::PACKED_INT32_ARRAY); + BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_INT64_ARRAY", Variant::PACKED_INT64_ARRAY); + BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_FLOAT32_ARRAY", Variant::PACKED_FLOAT32_ARRAY); + BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_FLOAT64_ARRAY", Variant::PACKED_FLOAT64_ARRAY); + BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_STRING_ARRAY", Variant::PACKED_STRING_ARRAY); + BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_VECTOR2_ARRAY", Variant::PACKED_VECTOR2_ARRAY); + BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_VECTOR3_ARRAY", Variant::PACKED_VECTOR3_ARRAY); + BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_COLOR_ARRAY", Variant::PACKED_COLOR_ARRAY); BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_MAX", Variant::VARIANT_MAX); //comparison diff --git a/core/image.cpp b/core/image.cpp index d9f84621a3..a188447f90 100644 --- a/core/image.cpp +++ b/core/image.cpp @@ -444,8 +444,6 @@ void Image::convert(Format p_new_format) { if (p_new_format == format) return; - ERR_FAIL_COND_MSG(write_lock.ptr(), "Cannot convert image when it is locked."); - if (format > FORMAT_RGBE9995 || p_new_format > FORMAT_RGBE9995) { ERR_FAIL_MSG("Cannot convert to <-> from compressed formats. Use compress() and decompress() instead."); @@ -454,8 +452,6 @@ void Image::convert(Format p_new_format) { //use put/set pixel which is slower but works with non byte formats Image new_img(width, height, 0, p_new_format); - lock(); - new_img.lock(); for (int i = 0; i < width; i++) { for (int j = 0; j < height; j++) { @@ -464,9 +460,6 @@ void Image::convert(Format p_new_format) { } } - unlock(); - new_img.unlock(); - if (has_mipmaps()) { new_img.generate_mipmaps(); } @@ -478,11 +471,8 @@ void Image::convert(Format p_new_format) { Image new_img(width, height, 0, p_new_format); - PoolVector<uint8_t>::Read r = data.read(); - PoolVector<uint8_t>::Write w = new_img.data.write(); - - const uint8_t *rptr = r.ptr(); - uint8_t *wptr = w.ptr(); + const uint8_t *rptr = data.ptr(); + uint8_t *wptr = new_img.data.ptrw(); int conversion_type = format | p_new_format << 8; @@ -520,9 +510,6 @@ void Image::convert(Format p_new_format) { case FORMAT_RGBA8 | (FORMAT_RGB8 << 8): _convert<3, true, 3, false, false, false>(width, height, rptr, wptr); break; } - r.release(); - w.release(); - bool gen_mipmaps = mipmaps; _copy_internals_from(new_img); @@ -906,7 +893,6 @@ void Image::resize(int p_width, int p_height, Interpolation p_interpolation) { ERR_FAIL_COND_MSG(data.size() == 0, "Cannot resize image before creating it, use create() or create_from_data() first."); ERR_FAIL_COND_MSG(!_can_modify(format), "Cannot resize in compressed or custom image formats."); - ERR_FAIL_COND_MSG(write_lock.ptr(), "Cannot resize image when it is locked."); bool mipmap_aware = p_interpolation == INTERPOLATE_TRILINEAR /* || p_interpolation == INTERPOLATE_TRICUBIC */; @@ -948,11 +934,11 @@ void Image::resize(int p_width, int p_height, Interpolation p_interpolation) { } // -- - PoolVector<uint8_t>::Read r = data.read(); - const unsigned char *r_ptr = r.ptr(); + const uint8_t *r = data.ptr(); + const unsigned char *r_ptr = r; - PoolVector<uint8_t>::Write w = dst.data.write(); - unsigned char *w_ptr = w.ptr(); + uint8_t *w = dst.data.ptrw(); + unsigned char *w_ptr = w; switch (p_interpolation) { @@ -1017,8 +1003,8 @@ void Image::resize(int p_width, int p_height, Interpolation p_interpolation) { _get_mipmap_offset_and_size(mip2, offs, src_width, src_height); src_ptr = r_ptr + offs; // Switch to write to the second destination image - w = dst2.data.write(); - w_ptr = w.ptr(); + w = dst2.data.ptrw(); + w_ptr = w; } } @@ -1048,8 +1034,8 @@ void Image::resize(int p_width, int p_height, Interpolation p_interpolation) { if (interpolate_mipmaps) { // Switch to read again from the first scaled mipmap to overlay it over the second - r = dst.data.read(); - _overlay(r.ptr(), w.ptr(), mip1_weight, p_width, p_height, get_format_pixel_size(format)); + r = dst.data.ptr(); + _overlay(r, w, mip1_weight, p_width, p_height, get_format_pixel_size(format)); } } break; @@ -1105,9 +1091,6 @@ void Image::resize(int p_width, int p_height, Interpolation p_interpolation) { } break; } - r.release(); - w.release(); - if (interpolate_mipmaps) { dst._copy_internals_from(dst2); } @@ -1142,8 +1125,8 @@ void Image::crop_from_point(int p_x, int p_y, int p_width, int p_height) { Image dst(p_width, p_height, 0, format); { - PoolVector<uint8_t>::Read r = data.read(); - PoolVector<uint8_t>::Write w = dst.data.write(); + const uint8_t *r = data.ptr(); + uint8_t *w = dst.data.ptrw(); int m_h = p_y + p_height; int m_w = p_x + p_width; @@ -1155,10 +1138,10 @@ void Image::crop_from_point(int p_x, int p_y, int p_width, int p_height) { for (uint32_t i = 0; i < pixel_size; i++) pdata[i] = 0; } else { - _get_pixelb(x, y, pixel_size, r.ptr(), pdata); + _get_pixelb(x, y, pixel_size, r, pdata); } - dst._put_pixelb(x - p_x, y - p_y, pixel_size, w.ptr(), pdata); + dst._put_pixelb(x - p_x, y - p_y, pixel_size, w, pdata); } } } @@ -1183,7 +1166,7 @@ void Image::flip_y() { } { - PoolVector<uint8_t>::Write w = data.write(); + uint8_t *w = data.ptrw(); uint8_t up[16]; uint8_t down[16]; uint32_t pixel_size = get_format_pixel_size(format); @@ -1192,11 +1175,11 @@ void Image::flip_y() { for (int x = 0; x < width; x++) { - _get_pixelb(x, y, pixel_size, w.ptr(), up); - _get_pixelb(x, height - y - 1, pixel_size, w.ptr(), down); + _get_pixelb(x, y, pixel_size, w, up); + _get_pixelb(x, height - y - 1, pixel_size, w, down); - _put_pixelb(x, height - y - 1, pixel_size, w.ptr(), up); - _put_pixelb(x, y, pixel_size, w.ptr(), down); + _put_pixelb(x, height - y - 1, pixel_size, w, up); + _put_pixelb(x, y, pixel_size, w, down); } } } @@ -1216,7 +1199,7 @@ void Image::flip_x() { } { - PoolVector<uint8_t>::Write w = data.write(); + uint8_t *w = data.ptrw(); uint8_t up[16]; uint8_t down[16]; uint32_t pixel_size = get_format_pixel_size(format); @@ -1225,11 +1208,11 @@ void Image::flip_x() { for (int x = 0; x < width / 2; x++) { - _get_pixelb(x, y, pixel_size, w.ptr(), up); - _get_pixelb(width - x - 1, y, pixel_size, w.ptr(), down); + _get_pixelb(x, y, pixel_size, w, up); + _get_pixelb(width - x - 1, y, pixel_size, w, down); - _put_pixelb(width - x - 1, y, pixel_size, w.ptr(), up); - _put_pixelb(x, y, pixel_size, w.ptr(), down); + _put_pixelb(width - x - 1, y, pixel_size, w, up); + _put_pixelb(x, y, pixel_size, w, down); } } } @@ -1348,16 +1331,16 @@ void Image::expand_x2_hq2x() { if (current != FORMAT_RGBA8) convert(FORMAT_RGBA8); - PoolVector<uint8_t> dest; + Vector<uint8_t> dest; dest.resize(width * 2 * height * 2 * 4); { - PoolVector<uint8_t>::Read r = data.read(); - PoolVector<uint8_t>::Write w = dest.write(); + const uint8_t *r = data.ptr(); + uint8_t *w = dest.ptrw(); - ERR_FAIL_COND(!r.ptr()); + ERR_FAIL_COND(!r); - hq2x_resize((const uint32_t *)r.ptr(), width, height, (uint32_t *)w.ptr()); + hq2x_resize((const uint32_t *)r, width, height, (uint32_t *)w); } width *= 2; @@ -1381,7 +1364,7 @@ void Image::shrink_x2() { if (mipmaps) { //just use the lower mipmap as base and copy all - PoolVector<uint8_t> new_img; + Vector<uint8_t> new_img; int ofs = get_mipmap_offset(1); @@ -1390,10 +1373,10 @@ void Image::shrink_x2() { ERR_FAIL_COND(new_img.size() == 0); { - PoolVector<uint8_t>::Write w = new_img.write(); - PoolVector<uint8_t>::Read r = data.read(); + uint8_t *w = new_img.ptrw(); + const uint8_t *r = data.ptr(); - copymem(w.ptr(), &r[ofs], new_size); + copymem(w, &r[ofs], new_size); } width = MAX(width / 2, 1); @@ -1402,7 +1385,7 @@ void Image::shrink_x2() { } else { - PoolVector<uint8_t> new_img; + Vector<uint8_t> new_img; ERR_FAIL_COND(!_can_modify(format)); int ps = get_format_pixel_size(format); @@ -1411,29 +1394,29 @@ void Image::shrink_x2() { ERR_FAIL_COND(data.size() == 0); { - PoolVector<uint8_t>::Write w = new_img.write(); - PoolVector<uint8_t>::Read r = data.read(); + uint8_t *w = new_img.ptrw(); + const uint8_t *r = data.ptr(); switch (format) { case FORMAT_L8: - case FORMAT_R8: _generate_po2_mipmap<uint8_t, 1, false, Image::average_4_uint8, Image::renormalize_uint8>(r.ptr(), w.ptr(), width, height); break; - case FORMAT_LA8: _generate_po2_mipmap<uint8_t, 2, false, Image::average_4_uint8, Image::renormalize_uint8>(r.ptr(), w.ptr(), width, height); break; - case FORMAT_RG8: _generate_po2_mipmap<uint8_t, 2, false, Image::average_4_uint8, Image::renormalize_uint8>(r.ptr(), w.ptr(), width, height); break; - case FORMAT_RGB8: _generate_po2_mipmap<uint8_t, 3, false, Image::average_4_uint8, Image::renormalize_uint8>(r.ptr(), w.ptr(), width, height); break; - case FORMAT_RGBA8: _generate_po2_mipmap<uint8_t, 4, false, Image::average_4_uint8, Image::renormalize_uint8>(r.ptr(), w.ptr(), width, height); break; - - case FORMAT_RF: _generate_po2_mipmap<float, 1, false, Image::average_4_float, Image::renormalize_float>(reinterpret_cast<const float *>(r.ptr()), reinterpret_cast<float *>(w.ptr()), width, height); break; - case FORMAT_RGF: _generate_po2_mipmap<float, 2, false, Image::average_4_float, Image::renormalize_float>(reinterpret_cast<const float *>(r.ptr()), reinterpret_cast<float *>(w.ptr()), width, height); break; - case FORMAT_RGBF: _generate_po2_mipmap<float, 3, false, Image::average_4_float, Image::renormalize_float>(reinterpret_cast<const float *>(r.ptr()), reinterpret_cast<float *>(w.ptr()), width, height); break; - case FORMAT_RGBAF: _generate_po2_mipmap<float, 4, false, Image::average_4_float, Image::renormalize_float>(reinterpret_cast<const float *>(r.ptr()), reinterpret_cast<float *>(w.ptr()), width, height); break; - - case FORMAT_RH: _generate_po2_mipmap<uint16_t, 1, false, Image::average_4_half, Image::renormalize_half>(reinterpret_cast<const uint16_t *>(r.ptr()), reinterpret_cast<uint16_t *>(w.ptr()), width, height); break; - case FORMAT_RGH: _generate_po2_mipmap<uint16_t, 2, false, Image::average_4_half, Image::renormalize_half>(reinterpret_cast<const uint16_t *>(r.ptr()), reinterpret_cast<uint16_t *>(w.ptr()), width, height); break; - case FORMAT_RGBH: _generate_po2_mipmap<uint16_t, 3, false, Image::average_4_half, Image::renormalize_half>(reinterpret_cast<const uint16_t *>(r.ptr()), reinterpret_cast<uint16_t *>(w.ptr()), width, height); break; - case FORMAT_RGBAH: _generate_po2_mipmap<uint16_t, 4, false, Image::average_4_half, Image::renormalize_half>(reinterpret_cast<const uint16_t *>(r.ptr()), reinterpret_cast<uint16_t *>(w.ptr()), width, height); break; - - case FORMAT_RGBE9995: _generate_po2_mipmap<uint32_t, 1, false, Image::average_4_rgbe9995, Image::renormalize_rgbe9995>(reinterpret_cast<const uint32_t *>(r.ptr()), reinterpret_cast<uint32_t *>(w.ptr()), width, height); break; + case FORMAT_R8: _generate_po2_mipmap<uint8_t, 1, false, Image::average_4_uint8, Image::renormalize_uint8>(r, w, width, height); break; + case FORMAT_LA8: _generate_po2_mipmap<uint8_t, 2, false, Image::average_4_uint8, Image::renormalize_uint8>(r, w, width, height); break; + case FORMAT_RG8: _generate_po2_mipmap<uint8_t, 2, false, Image::average_4_uint8, Image::renormalize_uint8>(r, w, width, height); break; + case FORMAT_RGB8: _generate_po2_mipmap<uint8_t, 3, false, Image::average_4_uint8, Image::renormalize_uint8>(r, w, width, height); break; + case FORMAT_RGBA8: _generate_po2_mipmap<uint8_t, 4, false, Image::average_4_uint8, Image::renormalize_uint8>(r, w, width, height); break; + + case FORMAT_RF: _generate_po2_mipmap<float, 1, false, Image::average_4_float, Image::renormalize_float>(reinterpret_cast<const float *>(r), reinterpret_cast<float *>(w), width, height); break; + case FORMAT_RGF: _generate_po2_mipmap<float, 2, false, Image::average_4_float, Image::renormalize_float>(reinterpret_cast<const float *>(r), reinterpret_cast<float *>(w), width, height); break; + case FORMAT_RGBF: _generate_po2_mipmap<float, 3, false, Image::average_4_float, Image::renormalize_float>(reinterpret_cast<const float *>(r), reinterpret_cast<float *>(w), width, height); break; + case FORMAT_RGBAF: _generate_po2_mipmap<float, 4, false, Image::average_4_float, Image::renormalize_float>(reinterpret_cast<const float *>(r), reinterpret_cast<float *>(w), width, height); break; + + case FORMAT_RH: _generate_po2_mipmap<uint16_t, 1, false, Image::average_4_half, Image::renormalize_half>(reinterpret_cast<const uint16_t *>(r), reinterpret_cast<uint16_t *>(w), width, height); break; + case FORMAT_RGH: _generate_po2_mipmap<uint16_t, 2, false, Image::average_4_half, Image::renormalize_half>(reinterpret_cast<const uint16_t *>(r), reinterpret_cast<uint16_t *>(w), width, height); break; + case FORMAT_RGBH: _generate_po2_mipmap<uint16_t, 3, false, Image::average_4_half, Image::renormalize_half>(reinterpret_cast<const uint16_t *>(r), reinterpret_cast<uint16_t *>(w), width, height); break; + case FORMAT_RGBAH: _generate_po2_mipmap<uint16_t, 4, false, Image::average_4_half, Image::renormalize_half>(reinterpret_cast<const uint16_t *>(r), reinterpret_cast<uint16_t *>(w), width, height); break; + + case FORMAT_RGBE9995: _generate_po2_mipmap<uint32_t, 1, false, Image::average_4_rgbe9995, Image::renormalize_rgbe9995>(reinterpret_cast<const uint32_t *>(r), reinterpret_cast<uint32_t *>(w), width, height); break; default: { } } @@ -1452,8 +1435,6 @@ void Image::normalize() { clear_mipmaps(); } - lock(); - for (int y = 0; y < height; y++) { for (int x = 0; x < width; x++) { @@ -1468,8 +1449,6 @@ void Image::normalize() { } } - unlock(); - if (used_mipmaps) { generate_mipmaps(true); } @@ -1487,7 +1466,7 @@ Error Image::generate_mipmaps(bool p_renormalize) { data.resize(size); - PoolVector<uint8_t>::Write wp = data.write(); + uint8_t *wp = data.ptrw(); int prev_ofs = 0; int prev_h = height; @@ -1599,7 +1578,6 @@ Error Image::generate_mipmap_roughness(RoughnessChannel p_roughness_channel, con normal_sat = normal_sat_vec.ptrw(); //create summed area table - nm->lock(); for (int y = 0; y < normal_h; y++) { double line_sum[3] = { 0, 0, 0 }; @@ -1642,9 +1620,7 @@ Error Image::generate_mipmap_roughness(RoughnessChannel p_roughness_channel, con _get_dst_image_size(width, height, format, mmcount); - lock(); - - uint8_t *base_ptr = write_lock.ptr(); + uint8_t *base_ptr = data.ptrw(); for (int i = 1; i <= mmcount; i++) { @@ -1759,11 +1735,13 @@ Error Image::generate_mipmap_roughness(RoughnessChannel p_roughness_channel, con { int size = get_mipmap_byte_size(i); print_line("size for mimpap " + itos(i) + ": " + itos(size)); - PoolVector<uint8_t> imgdata; + Vector<uint8_t> imgdata; imgdata.resize(size); - PoolVector<uint8_t>::Write wr = imgdata.write(); + + + uint8_t* wr = imgdata.ptrw(); copymem(wr.ptr(), ptr, size); - wr = PoolVector<uint8_t>::Write(); + wr = uint8_t*(); Ref<Image> im; im.instance(); im->create(w, h, false, format, imgdata); @@ -1772,9 +1750,6 @@ Error Image::generate_mipmap_roughness(RoughnessChannel p_roughness_channel, con #endif } - unlock(); - nm->unlock(); - return OK; } @@ -1798,7 +1773,7 @@ bool Image::empty() const { return (data.size() == 0); } -PoolVector<uint8_t> Image::get_data() const { +Vector<uint8_t> Image::get_data() const { return data; } @@ -1812,9 +1787,10 @@ void Image::create(int p_width, int p_height, bool p_use_mipmaps, Format p_forma int mm = 0; int size = _get_dst_image_size(p_width, p_height, p_format, mm, p_use_mipmaps ? -1 : 0); data.resize(size); + { - PoolVector<uint8_t>::Write w = data.write(); - zeromem(w.ptr(), size); + uint8_t *w = data.ptrw(); + zeromem(w, size); } width = p_width; @@ -1823,7 +1799,7 @@ void Image::create(int p_width, int p_height, bool p_use_mipmaps, Format p_forma format = p_format; } -void Image::create(int p_width, int p_height, bool p_use_mipmaps, Format p_format, const PoolVector<uint8_t> &p_data) { +void Image::create(int p_width, int p_height, bool p_use_mipmaps, Format p_format, const Vector<uint8_t> &p_data) { ERR_FAIL_INDEX(p_width - 1, MAX_WIDTH); ERR_FAIL_INDEX(p_height - 1, MAX_HEIGHT); @@ -1838,6 +1814,7 @@ void Image::create(int p_width, int p_height, bool p_use_mipmaps, Format p_forma width = p_width; format = p_format; data = p_data; + mipmaps = p_use_mipmaps; } @@ -1862,7 +1839,7 @@ void Image::create(const char **p_xpm) { HashMap<String, Color> colormap; int colormap_size = 0; uint32_t pixel_size = 0; - PoolVector<uint8_t>::Write w; + uint8_t *w; while (status != DONE) { @@ -1953,7 +1930,7 @@ void Image::create(const char **p_xpm) { status = READING_PIXELS; create(size_width, size_height, 0, has_alpha ? FORMAT_RGBA8 : FORMAT_RGB8); - w = data.write(); + w = data.ptrw(); pixel_size = has_alpha ? 4 : 3; } } break; @@ -1972,7 +1949,7 @@ void Image::create(const char **p_xpm) { for (uint32_t i = 0; i < pixel_size; i++) { pixel[i] = CLAMP((*colorptr)[i] * 255, 0, 255); } - _put_pixelb(x, y, pixel_size, w.ptr(), pixel); + _put_pixelb(x, y, pixel_size, w, pixel); } if (y == (size_height - 1)) @@ -2024,8 +2001,8 @@ bool Image::is_invisible() const { int w, h; _get_mipmap_offset_and_size(1, len, w, h); - PoolVector<uint8_t>::Read r = data.read(); - const unsigned char *data_ptr = r.ptr(); + const uint8_t *r = data.ptr(); + const unsigned char *data_ptr = r; bool detected = false; @@ -2069,8 +2046,8 @@ Image::AlphaMode Image::detect_alpha() const { int w, h; _get_mipmap_offset_and_size(1, len, w, h); - PoolVector<uint8_t>::Read r = data.read(); - const unsigned char *data_ptr = r.ptr(); + const uint8_t *r = data.ptr(); + const unsigned char *data_ptr = r; bool bit = false; bool detected = false; @@ -2126,9 +2103,9 @@ Error Image::save_png(const String &p_path) const { return save_png_func(p_path, Ref<Image>((Image *)this)); } -PoolVector<uint8_t> Image::save_png_to_buffer() const { +Vector<uint8_t> Image::save_png_to_buffer() const { if (save_png_buffer_func == NULL) { - return PoolVector<uint8_t>(); + return Vector<uint8_t>(); } return save_png_buffer_func(Ref<Image>((Image *)this)); @@ -2266,7 +2243,7 @@ Image::Image(int p_width, int p_height, bool p_use_mipmaps, Format p_format) { create(p_width, p_height, p_use_mipmaps, p_format); } -Image::Image(int p_width, int p_height, bool p_mipmaps, Format p_format, const PoolVector<uint8_t> &p_data) { +Image::Image(int p_width, int p_height, bool p_mipmaps, Format p_format, const Vector<uint8_t> &p_data) { width = 0; height = 0; @@ -2286,7 +2263,6 @@ Rect2 Image::get_used_rect() const { if (len == 0) return Rect2(); - const_cast<Image *>(this)->lock(); int minx = 0xFFFFFF, miny = 0xFFFFFFF; int maxx = -1, maxy = -1; for (int j = 0; j < height; j++) { @@ -2305,8 +2281,6 @@ Rect2 Image::get_used_rect() const { } } - const_cast<Image *>(this)->unlock(); - if (maxx == -1) return Rect2(); else @@ -2343,11 +2317,11 @@ void Image::blit_rect(const Ref<Image> &p_src, const Rect2 &p_src_rect, const Po Point2 src_underscan = Point2(MIN(0, p_src_rect.position.x), MIN(0, p_src_rect.position.y)); Rect2i dest_rect = Rect2i(0, 0, width, height).clip(Rect2i(p_dest - src_underscan, clipped_src_rect.size)); - PoolVector<uint8_t>::Write wp = data.write(); - uint8_t *dst_data_ptr = wp.ptr(); + uint8_t *wp = data.ptrw(); + uint8_t *dst_data_ptr = wp; - PoolVector<uint8_t>::Read rp = p_src->data.read(); - const uint8_t *src_data_ptr = rp.ptr(); + const uint8_t *rp = p_src->data.ptr(); + const uint8_t *src_data_ptr = rp; int pixel_size = get_format_pixel_size(format); @@ -2398,16 +2372,15 @@ void Image::blit_rect_mask(const Ref<Image> &p_src, const Ref<Image> &p_mask, co Point2 src_underscan = Point2(MIN(0, p_src_rect.position.x), MIN(0, p_src_rect.position.y)); Rect2i dest_rect = Rect2i(0, 0, width, height).clip(Rect2i(p_dest - src_underscan, clipped_src_rect.size)); - PoolVector<uint8_t>::Write wp = data.write(); - uint8_t *dst_data_ptr = wp.ptr(); + uint8_t *wp = data.ptrw(); + uint8_t *dst_data_ptr = wp; - PoolVector<uint8_t>::Read rp = p_src->data.read(); - const uint8_t *src_data_ptr = rp.ptr(); + const uint8_t *rp = p_src->data.ptr(); + const uint8_t *src_data_ptr = rp; int pixel_size = get_format_pixel_size(format); Ref<Image> msk = p_mask; - msk->lock(); for (int i = 0; i < dest_rect.size.y; i++) { @@ -2430,8 +2403,6 @@ void Image::blit_rect_mask(const Ref<Image> &p_src, const Ref<Image> &p_mask, co } } } - - msk->unlock(); } void Image::blend_rect(const Ref<Image> &p_src, const Rect2 &p_src_rect, const Point2 &p_dest) { @@ -2456,9 +2427,7 @@ void Image::blend_rect(const Ref<Image> &p_src, const Rect2 &p_src_rect, const P Point2 src_underscan = Point2(MIN(0, p_src_rect.position.x), MIN(0, p_src_rect.position.y)); Rect2i dest_rect = Rect2i(0, 0, width, height).clip(Rect2i(p_dest - src_underscan, clipped_src_rect.size)); - lock(); Ref<Image> img = p_src; - img->lock(); for (int i = 0; i < dest_rect.size.y; i++) { @@ -2479,9 +2448,6 @@ void Image::blend_rect(const Ref<Image> &p_src, const Rect2 &p_src_rect, const P set_pixel(dst_x, dst_y, dc); } } - - img->unlock(); - unlock(); } void Image::blend_rect_mask(const Ref<Image> &p_src, const Ref<Image> &p_mask, const Rect2 &p_src_rect, const Point2 &p_dest) { @@ -2511,11 +2477,8 @@ void Image::blend_rect_mask(const Ref<Image> &p_src, const Ref<Image> &p_mask, c Point2 src_underscan = Point2(MIN(0, p_src_rect.position.x), MIN(0, p_src_rect.position.y)); Rect2i dest_rect = Rect2i(0, 0, width, height).clip(Rect2i(p_dest - src_underscan, clipped_src_rect.size)); - lock(); Ref<Image> img = p_src; Ref<Image> msk = p_mask; - img->lock(); - msk->lock(); for (int i = 0; i < dest_rect.size.y; i++) { @@ -2542,19 +2505,13 @@ void Image::blend_rect_mask(const Ref<Image> &p_src, const Ref<Image> &p_mask, c } } } - - msk->unlock(); - img->unlock(); - unlock(); } void Image::fill(const Color &c) { ERR_FAIL_COND_MSG(!_can_modify(format), "Cannot fill in compressed or custom image formats."); - lock(); - - PoolVector<uint8_t>::Write wp = data.write(); - uint8_t *dst_data_ptr = wp.ptr(); + uint8_t *wp = data.ptrw(); + uint8_t *dst_data_ptr = wp; int pixel_size = get_format_pixel_size(format); @@ -2572,8 +2529,6 @@ void Image::fill(const Color &c) { } } } - - unlock(); } ImageMemLoadFunc Image::_png_mem_loader_func = NULL; @@ -2592,12 +2547,12 @@ void (*Image::_image_decompress_bptc)(Image *) = NULL; void (*Image::_image_decompress_etc1)(Image *) = NULL; void (*Image::_image_decompress_etc2)(Image *) = NULL; -PoolVector<uint8_t> (*Image::lossy_packer)(const Ref<Image> &, float) = NULL; -Ref<Image> (*Image::lossy_unpacker)(const PoolVector<uint8_t> &) = NULL; -PoolVector<uint8_t> (*Image::lossless_packer)(const Ref<Image> &) = NULL; -Ref<Image> (*Image::lossless_unpacker)(const PoolVector<uint8_t> &) = NULL; -PoolVector<uint8_t> (*Image::basis_universal_packer)(const Ref<Image> &, Image::UsedChannels) = NULL; -Ref<Image> (*Image::basis_universal_unpacker)(const PoolVector<uint8_t> &) = NULL; +Vector<uint8_t> (*Image::lossy_packer)(const Ref<Image> &, float) = NULL; +Ref<Image> (*Image::lossy_unpacker)(const Vector<uint8_t> &) = NULL; +Vector<uint8_t> (*Image::lossless_packer)(const Ref<Image> &) = NULL; +Ref<Image> (*Image::lossless_unpacker)(const Vector<uint8_t> &) = NULL; +Vector<uint8_t> (*Image::basis_universal_packer)(const Ref<Image> &, Image::UsedChannels) = NULL; +Ref<Image> (*Image::basis_universal_unpacker)(const Vector<uint8_t> &) = NULL; void Image::_set_data(const Dictionary &p_data) { @@ -2611,7 +2566,7 @@ void Image::_set_data(const Dictionary &p_data) { int dheight = p_data["height"]; String dformat = p_data["format"]; bool dmipmaps = p_data["mipmaps"]; - PoolVector<uint8_t> ddata = p_data["data"]; + Vector<uint8_t> ddata = p_data["data"]; Format ddformat = FORMAT_MAX; for (int i = 0; i < FORMAT_MAX; i++) { if (dformat == get_format_name(Format(i))) { @@ -2636,22 +2591,11 @@ Dictionary Image::_get_data() const { return d; } -void Image::lock() { - - ERR_FAIL_COND(data.size() == 0); - write_lock = data.write(); -} - -void Image::unlock() { - - write_lock.release(); -} - Color Image::get_pixelv(const Point2 &p_src) const { return get_pixel(p_src.x, p_src.y); } -Color Image::_get_color_at_ofs(uint8_t *ptr, uint32_t ofs) const { +Color Image::_get_color_at_ofs(const uint8_t *ptr, uint32_t ofs) const { switch (format) { case FORMAT_L8: { @@ -2873,18 +2817,13 @@ void Image::_set_color_at_ofs(uint8_t *ptr, uint32_t ofs, const Color &p_color) } Color Image::get_pixel(int p_x, int p_y) const { - - uint8_t *ptr = write_lock.ptr(); #ifdef DEBUG_ENABLED - ERR_FAIL_COND_V_MSG(!ptr, Color(), "Image must be locked with 'lock()' before using get_pixel()."); - ERR_FAIL_INDEX_V(p_x, width, Color()); ERR_FAIL_INDEX_V(p_y, height, Color()); - #endif uint32_t ofs = p_y * width + p_x; - return _get_color_at_ofs(ptr, ofs); + return _get_color_at_ofs(data.ptr(), ofs); } void Image::set_pixelv(const Point2 &p_dst, const Color &p_color) { @@ -2892,18 +2831,13 @@ void Image::set_pixelv(const Point2 &p_dst, const Color &p_color) { } void Image::set_pixel(int p_x, int p_y, const Color &p_color) { - - uint8_t *ptr = write_lock.ptr(); #ifdef DEBUG_ENABLED - ERR_FAIL_COND_MSG(!ptr, "Image must be locked with 'lock()' before using set_pixel()."); - ERR_FAIL_INDEX(p_x, width); ERR_FAIL_INDEX(p_y, height); - #endif uint32_t ofs = p_y * width + p_x; - _set_color_at_ofs(ptr, ofs, p_color); + _set_color_at_ofs(data.ptrw(), ofs, p_color); } Image::UsedChannels Image::detect_used_channels(CompressSource p_source) { @@ -2911,7 +2845,7 @@ Image::UsedChannels Image::detect_used_channels(CompressSource p_source) { ERR_FAIL_COND_V(data.size() == 0, USED_CHANNELS_RGBA); ERR_FAIL_COND_V(is_compressed(), USED_CHANNELS_RGBA); bool r = false, g = false, b = false, a = false, c = false; - lock(); + for (int i = 0; i < width; i++) { for (int j = 0; j < height; j++) { @@ -2932,8 +2866,6 @@ Image::UsedChannels Image::detect_used_channels(CompressSource p_source) { } } - unlock(); - UsedChannels used_channels; if (!c && !a) @@ -3036,8 +2968,6 @@ void Image::_bind_methods() { ClassDB::bind_method(D_METHOD("_set_data", "data"), &Image::_set_data); ClassDB::bind_method(D_METHOD("_get_data"), &Image::_get_data); - ClassDB::bind_method(D_METHOD("lock"), &Image::lock); - ClassDB::bind_method(D_METHOD("unlock"), &Image::unlock); ClassDB::bind_method(D_METHOD("get_pixelv", "src"), &Image::get_pixelv); ClassDB::bind_method(D_METHOD("get_pixel", "x", "y"), &Image::get_pixel); ClassDB::bind_method(D_METHOD("set_pixelv", "dst", "color"), &Image::set_pixelv); @@ -3137,8 +3067,7 @@ void Image::normalmap_to_xy() { { int len = data.size() / 4; - PoolVector<uint8_t>::Write wp = data.write(); - unsigned char *data_ptr = wp.ptr(); + uint8_t *data_ptr = data.ptrw(); for (int i = 0; i < len; i++) { @@ -3162,19 +3091,12 @@ Ref<Image> Image::rgbe_to_srgb() { new_image.instance(); new_image->create(width, height, 0, Image::FORMAT_RGB8); - lock(); - - new_image->lock(); - for (int row = 0; row < height; row++) { for (int col = 0; col < width; col++) { new_image->set_pixel(col, row, get_pixel(col, row).to_srgb()); } } - unlock(); - new_image->unlock(); - if (has_mipmaps()) { new_image->generate_mipmaps(); } @@ -3187,12 +3109,13 @@ Ref<Image> Image::get_image_from_mipmap(int p_mipamp) const { int ofs, size, w, h; get_mipmap_offset_size_and_dimensions(p_mipamp, ofs, size, w, h); - PoolVector<uint8_t> new_data; + Vector<uint8_t> new_data; new_data.resize(size); + { - PoolVector<uint8_t>::Write wr = new_data.write(); - PoolVector<uint8_t>::Read rd = data.read(); - copymem(wr.ptr(), rd.ptr() + ofs, size); + uint8_t *wr = new_data.ptrw(); + const uint8_t *rd = data.ptr(); + copymem(wr, rd + ofs, size); } Ref<Image> image; @@ -3201,6 +3124,7 @@ Ref<Image> Image::get_image_from_mipmap(int p_mipamp) const { image->height = h; image->format = format; image->data = new_data; + image->mipmaps = false; return image; } @@ -3209,17 +3133,17 @@ void Image::bumpmap_to_normalmap(float bump_scale) { ERR_FAIL_COND(!_can_modify(format)); convert(Image::FORMAT_RF); - PoolVector<uint8_t> result_image; //rgba output + Vector<uint8_t> result_image; //rgba output result_image.resize(width * height * 4); { - PoolVector<uint8_t>::Read rp = data.read(); - PoolVector<uint8_t>::Write wp = result_image.write(); + const uint8_t *rp = data.ptr(); + uint8_t *wp = result_image.ptrw(); - ERR_FAIL_COND(!rp.ptr()); + ERR_FAIL_COND(!rp); - unsigned char *write_ptr = wp.ptr(); - float *read_ptr = (float *)rp.ptr(); + unsigned char *write_ptr = wp; + float *read_ptr = (float *)rp; for (int ty = 0; ty < height; ty++) { int py = ty + 1; @@ -3260,8 +3184,7 @@ void Image::srgb_to_linear() { if (format == FORMAT_RGBA8) { int len = data.size() / 4; - PoolVector<uint8_t>::Write wp = data.write(); - unsigned char *data_ptr = wp.ptr(); + uint8_t *data_ptr = data.ptrw(); for (int i = 0; i < len; i++) { @@ -3273,8 +3196,7 @@ void Image::srgb_to_linear() { } else if (format == FORMAT_RGB8) { int len = data.size() / 3; - PoolVector<uint8_t>::Write wp = data.write(); - unsigned char *data_ptr = wp.ptr(); + uint8_t *data_ptr = data.ptrw(); for (int i = 0; i < len; i++) { @@ -3293,8 +3215,7 @@ void Image::premultiply_alpha() { if (format != FORMAT_RGBA8) return; //not needed - PoolVector<uint8_t>::Write wp = data.write(); - unsigned char *data_ptr = wp.ptr(); + uint8_t *data_ptr = data.ptrw(); for (int i = 0; i < height; i++) { for (int j = 0; j < width; j++) { @@ -3316,12 +3237,10 @@ void Image::fix_alpha_edges() { if (format != FORMAT_RGBA8) return; //not needed - PoolVector<uint8_t> dcopy = data; - PoolVector<uint8_t>::Read rp = dcopy.read(); - const uint8_t *srcptr = rp.ptr(); + Vector<uint8_t> dcopy = data; + const uint8_t *srcptr = dcopy.ptr(); - PoolVector<uint8_t>::Write wp = data.write(); - unsigned char *data_ptr = wp.ptr(); + uint8_t *data_ptr = data.ptrw(); const int max_radius = 4; const int alpha_threshold = 20; @@ -3381,15 +3300,15 @@ String Image::get_format_name(Format p_format) { return format_names[p_format]; } -Error Image::load_png_from_buffer(const PoolVector<uint8_t> &p_array) { +Error Image::load_png_from_buffer(const Vector<uint8_t> &p_array) { return _load_from_buffer(p_array, _png_mem_loader_func); } -Error Image::load_jpg_from_buffer(const PoolVector<uint8_t> &p_array) { +Error Image::load_jpg_from_buffer(const Vector<uint8_t> &p_array) { return _load_from_buffer(p_array, _jpg_mem_loader_func); } -Error Image::load_webp_from_buffer(const PoolVector<uint8_t> &p_array) { +Error Image::load_webp_from_buffer(const Vector<uint8_t> &p_array) { return _load_from_buffer(p_array, _webp_mem_loader_func); } @@ -3398,7 +3317,7 @@ void Image::convert_rg_to_ra_rgba8() { ERR_FAIL_COND(!data.size()); int s = data.size(); - PoolVector<uint8_t>::Write w = data.write(); + uint8_t *w = data.ptrw(); for (int i = 0; i < s; i += 4) { w[i + 3] = w[i + 1]; w[i + 1] = 0; @@ -3410,7 +3329,7 @@ void Image::convert_ra_rgba8_to_rg() { ERR_FAIL_COND(!data.size()); int s = data.size(); - PoolVector<uint8_t>::Write w = data.write(); + uint8_t *w = data.ptrw(); for (int i = 0; i < s; i += 4) { w[i + 1] = w[i + 3]; w[i + 2] = 0; @@ -3418,15 +3337,15 @@ void Image::convert_ra_rgba8_to_rg() { } } -Error Image::_load_from_buffer(const PoolVector<uint8_t> &p_array, ImageMemLoadFunc p_loader) { +Error Image::_load_from_buffer(const Vector<uint8_t> &p_array, ImageMemLoadFunc p_loader) { int buffer_size = p_array.size(); ERR_FAIL_COND_V(buffer_size == 0, ERR_INVALID_PARAMETER); ERR_FAIL_COND_V(!p_loader, ERR_INVALID_PARAMETER); - PoolVector<uint8_t>::Read r = p_array.read(); + const uint8_t *r = p_array.ptr(); - Ref<Image> image = p_loader(r.ptr(), buffer_size); + Ref<Image> image = p_loader(r, buffer_size); ERR_FAIL_COND_V(!image.is_valid(), ERR_PARSE_ERROR); copy_internals_from(image); @@ -3516,8 +3435,4 @@ Image::Image() { } Image::~Image() { - - if (write_lock.ptr()) { - unlock(); - } } diff --git a/core/image.h b/core/image.h index 1cc22420d5..4dc4bf1328 100644 --- a/core/image.h +++ b/core/image.h @@ -33,7 +33,7 @@ #include "core/color.h" #include "core/math/rect2.h" -#include "core/pool_vector.h" + #include "core/resource.h" /** @@ -47,7 +47,7 @@ class Image; typedef Error (*SavePNGFunc)(const String &p_path, const Ref<Image> &p_img); -typedef PoolVector<uint8_t> (*SavePNGBufferFunc)(const Ref<Image> &p_img); +typedef Vector<uint8_t> (*SavePNGBufferFunc)(const Ref<Image> &p_img); typedef Ref<Image> (*ImageMemLoadFunc)(const uint8_t *p_png, int p_size); typedef Error (*SaveEXRFunc)(const String &p_path, const Ref<Image> &p_img, bool p_grayscale); @@ -150,16 +150,14 @@ public: static void (*_image_decompress_etc1)(Image *); static void (*_image_decompress_etc2)(Image *); - static PoolVector<uint8_t> (*lossy_packer)(const Ref<Image> &p_image, float p_quality); - static Ref<Image> (*lossy_unpacker)(const PoolVector<uint8_t> &p_buffer); - static PoolVector<uint8_t> (*lossless_packer)(const Ref<Image> &p_image); - static Ref<Image> (*lossless_unpacker)(const PoolVector<uint8_t> &p_buffer); - static PoolVector<uint8_t> (*basis_universal_packer)(const Ref<Image> &p_image, UsedChannels p_channels); - static Ref<Image> (*basis_universal_unpacker)(const PoolVector<uint8_t> &p_buffer); - - PoolVector<uint8_t>::Write write_lock; + static Vector<uint8_t> (*lossy_packer)(const Ref<Image> &p_image, float p_quality); + static Ref<Image> (*lossy_unpacker)(const Vector<uint8_t> &p_buffer); + static Vector<uint8_t> (*lossless_packer)(const Ref<Image> &p_image); + static Ref<Image> (*lossless_unpacker)(const Vector<uint8_t> &p_buffer); + static Vector<uint8_t> (*basis_universal_packer)(const Ref<Image> &p_image, UsedChannels p_channels); + static Ref<Image> (*basis_universal_unpacker)(const Vector<uint8_t> &p_buffer); - _FORCE_INLINE_ Color _get_color_at_ofs(uint8_t *ptr, uint32_t ofs) const; + _FORCE_INLINE_ Color _get_color_at_ofs(const uint8_t *ptr, uint32_t ofs) const; _FORCE_INLINE_ void _set_color_at_ofs(uint8_t *ptr, uint32_t ofs, const Color &p_color); protected: @@ -170,12 +168,12 @@ private: create(p_width, p_height, p_use_mipmaps, p_format); } - void _create_from_data(int p_width, int p_height, bool p_use_mipmaps, Format p_format, const PoolVector<uint8_t> &p_data) { + void _create_from_data(int p_width, int p_height, bool p_use_mipmaps, Format p_format, const Vector<uint8_t> &p_data) { create(p_width, p_height, p_use_mipmaps, p_format, p_data); } Format format; - PoolVector<uint8_t> data; + Vector<uint8_t> data; int width, height; bool mipmaps; @@ -198,7 +196,7 @@ private: void _set_data(const Dictionary &p_data); Dictionary _get_data() const; - Error _load_from_buffer(const PoolVector<uint8_t> &p_array, ImageMemLoadFunc p_loader); + Error _load_from_buffer(const Vector<uint8_t> &p_array, ImageMemLoadFunc p_loader); static void average_4_uint8(uint8_t &p_out, const uint8_t &p_a, const uint8_t &p_b, const uint8_t &p_c, const uint8_t &p_d); static void average_4_float(float &p_out, const float &p_a, const float &p_b, const float &p_c, const float &p_d); @@ -270,7 +268,7 @@ public: * Create a new image of a given size and format. Current image will be lost */ void create(int p_width, int p_height, bool p_use_mipmaps, Format p_format); - void create(int p_width, int p_height, bool p_use_mipmaps, Format p_format, const PoolVector<uint8_t> &p_data); + void create(int p_width, int p_height, bool p_use_mipmaps, Format p_format, const Vector<uint8_t> &p_data); void create(const char **p_xpm); /** @@ -278,11 +276,11 @@ public: */ bool empty() const; - PoolVector<uint8_t> get_data() const; + Vector<uint8_t> get_data() const; Error load(const String &p_path); Error save_png(const String &p_path) const; - PoolVector<uint8_t> save_png_to_buffer() const; + Vector<uint8_t> save_png_to_buffer() const; Error save_exr(const String &p_path, bool p_grayscale) const; /** @@ -296,7 +294,7 @@ public: /** * import an image of a specific size and format from a pointer */ - Image(int p_width, int p_height, bool p_mipmaps, Format p_format, const PoolVector<uint8_t> &p_data); + Image(int p_width, int p_height, bool p_mipmaps, Format p_format, const Vector<uint8_t> &p_data); enum AlphaMode { ALPHA_NONE, @@ -358,9 +356,9 @@ public: static void set_compress_bptc_func(void (*p_compress_func)(Image *, float, UsedChannels)); static String get_format_name(Format p_format); - Error load_png_from_buffer(const PoolVector<uint8_t> &p_array); - Error load_jpg_from_buffer(const PoolVector<uint8_t> &p_array); - Error load_webp_from_buffer(const PoolVector<uint8_t> &p_array); + Error load_png_from_buffer(const Vector<uint8_t> &p_array); + Error load_jpg_from_buffer(const Vector<uint8_t> &p_array); + Error load_webp_from_buffer(const Vector<uint8_t> &p_array); void convert_rg_to_ra_rgba8(); void convert_ra_rgba8_to_rg(); @@ -370,9 +368,6 @@ public: virtual Ref<Resource> duplicate(bool p_subresources = false) const; - void lock(); - void unlock(); - UsedChannels detect_used_channels(CompressSource p_source = COMPRESS_SOURCE_GENERIC); void optimize_channels(); diff --git a/core/io/config_file.cpp b/core/io/config_file.cpp index 5968972143..b44ac16a87 100644 --- a/core/io/config_file.cpp +++ b/core/io/config_file.cpp @@ -34,11 +34,11 @@ #include "core/os/keyboard.h" #include "core/variant_parser.h" -PoolStringArray ConfigFile::_get_sections() const { +PackedStringArray ConfigFile::_get_sections() const { List<String> s; get_sections(&s); - PoolStringArray arr; + PackedStringArray arr; arr.resize(s.size()); int idx = 0; for (const List<String>::Element *E = s.front(); E; E = E->next()) { @@ -49,11 +49,11 @@ PoolStringArray ConfigFile::_get_sections() const { return arr; } -PoolStringArray ConfigFile::_get_section_keys(const String &p_section) const { +PackedStringArray ConfigFile::_get_section_keys(const String &p_section) const { List<String> s; get_section_keys(p_section, &s); - PoolStringArray arr; + PackedStringArray arr; arr.resize(s.size()); int idx = 0; for (const List<String>::Element *E = s.front(); E; E = E->next()) { diff --git a/core/io/config_file.h b/core/io/config_file.h index 2d61ef6afe..150fd24693 100644 --- a/core/io/config_file.h +++ b/core/io/config_file.h @@ -42,8 +42,8 @@ class ConfigFile : public Reference { OrderedHashMap<String, OrderedHashMap<String, Variant> > values; - PoolStringArray _get_sections() const; - PoolStringArray _get_section_keys(const String &p_section) const; + PackedStringArray _get_sections() const; + PackedStringArray _get_section_keys(const String &p_section) const; Error _internal_load(const String &p_path, FileAccess *f); Error _internal_save(FileAccess *file); diff --git a/platform/windows/power_windows.h b/core/io/dtls_server.cpp index 80d86a12c5..07e6abb1c9 100644 --- a/platform/windows/power_windows.h +++ b/core/io/dtls_server.cpp @@ -1,5 +1,5 @@ /*************************************************************************/ -/* power_windows.h */ +/* dtls_server.cpp */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ @@ -28,31 +28,27 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -#ifndef POWER_WINDOWS_H -#define POWER_WINDOWS_H - -#include "core/os/dir_access.h" +#include "dtls_server.h" #include "core/os/file_access.h" -#include "core/os/os.h" +#include "core/project_settings.h" -#include <windows.h> +DTLSServer *(*DTLSServer::_create)() = NULL; +bool DTLSServer::available = false; -class PowerWindows { +DTLSServer *DTLSServer::create() { -private: - int nsecs_left; - int percent_left; - OS::PowerState power_state; + return _create(); +} - bool GetPowerInfo_Windows(); +bool DTLSServer::is_available() { + return available; +} -public: - PowerWindows(); - virtual ~PowerWindows(); +void DTLSServer::_bind_methods() { - OS::PowerState get_power_state(); - int get_power_seconds_left(); - int get_power_percent_left(); -}; + ClassDB::bind_method(D_METHOD("setup", "key", "certificate", "chain"), &DTLSServer::setup, DEFVAL(Ref<X509Certificate>())); + ClassDB::bind_method(D_METHOD("take_connection", "udp_peer"), &DTLSServer::take_connection); +} -#endif // POWER_WINDOWS_H +DTLSServer::DTLSServer() { +} diff --git a/core/io/dtls_server.h b/core/io/dtls_server.h new file mode 100644 index 0000000000..7b08138f7f --- /dev/null +++ b/core/io/dtls_server.h @@ -0,0 +1,57 @@ +/*************************************************************************/ +/* dtls_server.h */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* https://godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 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 DTLS_SERVER_H +#define DTLS_SERVER_H + +#include "core/io/net_socket.h" +#include "core/io/packet_peer_dtls.h" + +class DTLSServer : public Reference { + GDCLASS(DTLSServer, Reference); + +protected: + static DTLSServer *(*_create)(); + static void _bind_methods(); + + static bool available; + +public: + static bool is_available(); + static DTLSServer *create(); + + virtual Error setup(Ref<CryptoKey> p_key, Ref<X509Certificate> p_cert, Ref<X509Certificate> p_ca_chain = Ref<X509Certificate>()) = 0; + virtual void stop() = 0; + virtual Ref<PacketPeerDTLS> take_connection(Ref<PacketPeerUDP> p_peer) = 0; + + DTLSServer(); +}; + +#endif // DTLS_SERVER_H diff --git a/core/io/file_access_buffered.cpp b/core/io/file_access_buffered.cpp index 6ac065a19b..ab0fb3943c 100644 --- a/core/io/file_access_buffered.cpp +++ b/core/io/file_access_buffered.cpp @@ -113,7 +113,7 @@ int FileAccessBuffered::get_buffer(uint8_t *p_dest, int p_length) const { int size = (cache.buffer.size() - (file.offset - cache.offset)); size = size - (size % 4); - //PoolVector<uint8_t>::Read read = cache.buffer.read(); + //const uint8_t* read = cache.buffer.ptr(); //memcpy(p_dest, read.ptr() + (file.offset - cache.offset), size); memcpy(p_dest, cache.buffer.ptr() + (file.offset - cache.offset), size); p_dest += size; @@ -145,7 +145,7 @@ int FileAccessBuffered::get_buffer(uint8_t *p_dest, int p_length) const { } int r = MIN(left, to_read); - //PoolVector<uint8_t>::Read read = cache.buffer.read(); + //const uint8_t* read = cache.buffer.ptr(); //memcpy(p_dest+total_read, &read.ptr()[file.offset - cache.offset], r); memcpy(p_dest + total_read, cache.buffer.ptr() + (file.offset - cache.offset), r); diff --git a/core/io/file_access_buffered.h b/core/io/file_access_buffered.h index 5e2939c1a2..a6177c20be 100644 --- a/core/io/file_access_buffered.h +++ b/core/io/file_access_buffered.h @@ -32,7 +32,7 @@ #define FILE_ACCESS_BUFFERED_H #include "core/os/file_access.h" -#include "core/pool_vector.h" + #include "core/ustring.h" class FileAccessBuffered : public FileAccess { diff --git a/core/io/file_access_buffered_fa.h b/core/io/file_access_buffered_fa.h index c17652080c..6ec77d503b 100644 --- a/core/io/file_access_buffered_fa.h +++ b/core/io/file_access_buffered_fa.h @@ -54,8 +54,8 @@ class FileAccessBufferedFA : public FileAccessBuffered { cache.offset = p_offset; cache.buffer.resize(p_size); - // on PoolVector - //PoolVector<uint8_t>::Write write = cache.buffer.write(); + // on Vector + //uint8_t* write = cache.buffer.ptrw(); //f.get_buffer(write.ptrw(), p_size); // on vector diff --git a/core/io/http_client.cpp b/core/io/http_client.cpp index 541bd3a7c8..ce7025de35 100644 --- a/core/io/http_client.cpp +++ b/core/io/http_client.cpp @@ -110,7 +110,7 @@ Ref<StreamPeer> HTTPClient::get_connection() const { return connection; } -Error HTTPClient::request_raw(Method p_method, const String &p_url, const Vector<String> &p_headers, const PoolVector<uint8_t> &p_body) { +Error HTTPClient::request_raw(Method p_method, const String &p_url, const Vector<String> &p_headers, const Vector<uint8_t> &p_body) { ERR_FAIL_INDEX_V(p_method, METHOD_MAX, ERR_INVALID_PARAMETER); ERR_FAIL_COND_V(!p_url.begins_with("/"), ERR_INVALID_PARAMETER); @@ -152,10 +152,10 @@ Error HTTPClient::request_raw(Method p_method, const String &p_url, const Vector request += "\r\n"; CharString cs = request.utf8(); - PoolVector<uint8_t> data; + Vector<uint8_t> data; data.resize(cs.length()); { - PoolVector<uint8_t>::Write data_write = data.write(); + uint8_t *data_write = data.ptrw(); for (int i = 0; i < cs.length(); i++) { data_write[i] = cs[i]; } @@ -163,7 +163,7 @@ Error HTTPClient::request_raw(Method p_method, const String &p_url, const Vector data.append_array(p_body); - PoolVector<uint8_t>::Read r = data.read(); + const uint8_t *r = data.ptr(); Error err = connection->put_data(&r[0], data.size()); if (err) { @@ -517,11 +517,11 @@ int HTTPClient::get_response_body_length() const { return body_size; } -PoolByteArray HTTPClient::read_response_body_chunk() { +PackedByteArray HTTPClient::read_response_body_chunk() { - ERR_FAIL_COND_V(status != STATUS_BODY, PoolByteArray()); + ERR_FAIL_COND_V(status != STATUS_BODY, PackedByteArray()); - PoolByteArray ret; + PackedByteArray ret; Error err = OK; if (chunked) { @@ -622,8 +622,8 @@ PoolByteArray HTTPClient::read_response_body_chunk() { } ret.resize(chunk.size() - 2); - PoolByteArray::Write w = ret.write(); - copymem(w.ptr(), chunk.ptr(), chunk.size() - 2); + uint8_t *w = ret.ptrw(); + copymem(w, chunk.ptr(), chunk.size() - 2); chunk.clear(); } @@ -639,8 +639,8 @@ PoolByteArray HTTPClient::read_response_body_chunk() { while (to_read > 0) { int rec = 0; { - PoolByteArray::Write w = ret.write(); - err = _get_http_data(w.ptr() + _offset, to_read, rec); + uint8_t *w = ret.ptrw(); + err = _get_http_data(w + _offset, to_read, rec); } if (rec <= 0) { // Ended up reading less ret.resize(_offset); @@ -801,11 +801,11 @@ Dictionary HTTPClient::_get_response_headers_as_dictionary() { return ret; } -PoolStringArray HTTPClient::_get_response_headers() { +PackedStringArray HTTPClient::_get_response_headers() { List<String> rh; get_response_headers(&rh); - PoolStringArray ret; + PackedStringArray ret; ret.resize(rh.size()); int idx = 0; for (const List<String>::Element *E = rh.front(); E; E = E->next()) { diff --git a/core/io/http_client.h b/core/io/http_client.h index 3796eb992c..03ba20f8dd 100644 --- a/core/io/http_client.h +++ b/core/io/http_client.h @@ -191,7 +191,7 @@ private: #include "platform/javascript/http_client.h.inc" #endif - PoolStringArray _get_response_headers(); + PackedStringArray _get_response_headers(); Dictionary _get_response_headers_as_dictionary(); static void _bind_methods(); @@ -202,7 +202,7 @@ public: void set_connection(const Ref<StreamPeer> &p_connection); Ref<StreamPeer> get_connection() const; - Error request_raw(Method p_method, const String &p_url, const Vector<String> &p_headers, const PoolVector<uint8_t> &p_body); + Error request_raw(Method p_method, const String &p_url, const Vector<String> &p_headers, const Vector<uint8_t> &p_body); Error request(Method p_method, const String &p_url, const Vector<String> &p_headers, const String &p_body = String()); void close(); @@ -215,7 +215,7 @@ public: Error get_response_headers(List<String> *r_response); int get_response_body_length() const; - PoolByteArray read_response_body_chunk(); // Can't get body as partial text because of most encodings UTF8, gzip, etc. + PackedByteArray read_response_body_chunk(); // Can't get body as partial text because of most encodings UTF8, gzip, etc. void set_blocking_mode(bool p_enable); // Useful mostly if running in a thread bool is_blocking_mode_enabled() const; diff --git a/core/io/json.cpp b/core/io/json.cpp index 144e4bdc3b..3a0edceb81 100644 --- a/core/io/json.cpp +++ b/core/io/json.cpp @@ -70,10 +70,12 @@ String JSON::_print_var(const Variant &p_var, const String &p_indent, int p_cur_ case Variant::NIL: return "null"; case Variant::BOOL: return p_var.operator bool() ? "true" : "false"; case Variant::INT: return itos(p_var); - case Variant::REAL: return rtos(p_var); - case Variant::POOL_INT_ARRAY: - case Variant::POOL_REAL_ARRAY: - case Variant::POOL_STRING_ARRAY: + case Variant::FLOAT: return rtos(p_var); + case Variant::PACKED_INT32_ARRAY: + case Variant::PACKED_INT64_ARRAY: + case Variant::PACKED_FLOAT32_ARRAY: + case Variant::PACKED_FLOAT64_ARRAY: + case Variant::PACKED_STRING_ARRAY: case Variant::ARRAY: { String s = "["; diff --git a/core/io/marshalls.cpp b/core/io/marshalls.cpp index fdce9db2a0..fbcaa582b7 100644 --- a/core/io/marshalls.cpp +++ b/core/io/marshalls.cpp @@ -147,7 +147,7 @@ Error decode_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int } } break; - case Variant::REAL: { + case Variant::FLOAT: { if (type & ENCODE_FLAG_64) { ERR_FAIL_COND_V(len < 8, ERR_INVALID_DATA); @@ -186,7 +186,19 @@ Error decode_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int if (r_len) (*r_len) += 4 * 2; - } break; // 5 + } break; + case Variant::VECTOR2I: { + + ERR_FAIL_COND_V(len < 4 * 2, ERR_INVALID_DATA); + Vector2i val; + val.x = decode_uint32(&buf[0]); + val.y = decode_uint32(&buf[4]); + r_variant = val; + + if (r_len) + (*r_len) += 4 * 2; + + } break; case Variant::RECT2: { ERR_FAIL_COND_V(len < 4 * 4, ERR_INVALID_DATA); @@ -201,6 +213,20 @@ Error decode_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int (*r_len) += 4 * 4; } break; + case Variant::RECT2I: { + + ERR_FAIL_COND_V(len < 4 * 4, ERR_INVALID_DATA); + Rect2i val; + val.position.x = decode_uint32(&buf[0]); + val.position.y = decode_uint32(&buf[4]); + val.size.x = decode_uint32(&buf[8]); + val.size.y = decode_uint32(&buf[12]); + r_variant = val; + + if (r_len) + (*r_len) += 4 * 4; + + } break; case Variant::VECTOR3: { ERR_FAIL_COND_V(len < 4 * 3, ERR_INVALID_DATA); @@ -214,6 +240,19 @@ Error decode_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int (*r_len) += 4 * 3; } break; + case Variant::VECTOR3I: { + + ERR_FAIL_COND_V(len < 4 * 3, ERR_INVALID_DATA); + Vector3i val; + val.x = decode_uint32(&buf[0]); + val.y = decode_uint32(&buf[4]); + val.z = decode_uint32(&buf[8]); + r_variant = val; + + if (r_len) + (*r_len) += 4 * 3; + + } break; case Variant::TRANSFORM2D: { ERR_FAIL_COND_V(len < 4 * 6, ERR_INVALID_DATA); @@ -328,6 +367,16 @@ Error decode_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int (*r_len) += 4 * 4; } break; + case Variant::STRING_NAME: { + + String str; + Error err = _decode_string(buf, len, r_len, str); + if (err) + return err; + r_variant = StringName(str); + + } break; + case Variant::NODE_PATH: { ERR_FAIL_COND_V(len < 4, ERR_INVALID_DATA); @@ -455,6 +504,15 @@ Error decode_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int } } break; + case Variant::CALLABLE: { + + r_variant = Callable(); + } break; + case Variant::SIGNAL: { + + r_variant = Signal(); + } break; + case Variant::DICTIONARY: { ERR_FAIL_COND_V(len < 4, ERR_INVALID_DATA); @@ -535,7 +593,7 @@ Error decode_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int } break; // arrays - case Variant::POOL_BYTE_ARRAY: { + case Variant::PACKED_BYTE_ARRAY: { ERR_FAIL_COND_V(len < 4, ERR_INVALID_DATA); int32_t count = decode_uint32(buf); @@ -543,11 +601,11 @@ Error decode_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int len -= 4; ERR_FAIL_COND_V(count < 0 || count > len, ERR_INVALID_DATA); - PoolVector<uint8_t> data; + Vector<uint8_t> data; if (count) { data.resize(count); - PoolVector<uint8_t>::Write w = data.write(); + uint8_t *w = data.ptrw(); for (int32_t i = 0; i < count; i++) { w[i] = buf[i]; @@ -563,7 +621,7 @@ Error decode_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int } } break; - case Variant::POOL_INT_ARRAY: { + case Variant::PACKED_INT32_ARRAY: { ERR_FAIL_COND_V(len < 4, ERR_INVALID_DATA); int32_t count = decode_uint32(buf); @@ -572,12 +630,12 @@ Error decode_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int ERR_FAIL_MUL_OF(count, 4, ERR_INVALID_DATA); ERR_FAIL_COND_V(count < 0 || count * 4 > len, ERR_INVALID_DATA); - PoolVector<int> data; + Vector<int32_t> data; if (count) { //const int*rbuf=(const int*)buf; data.resize(count); - PoolVector<int>::Write w = data.write(); + int32_t *w = data.ptrw(); for (int32_t i = 0; i < count; i++) { w[i] = decode_uint32(&buf[i * 4]); @@ -585,11 +643,37 @@ Error decode_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int } r_variant = Variant(data); if (r_len) { - (*r_len) += 4 + count * sizeof(int); + (*r_len) += 4 + count * sizeof(int32_t); } } break; - case Variant::POOL_REAL_ARRAY: { + case Variant::PACKED_INT64_ARRAY: { + + ERR_FAIL_COND_V(len < 4, ERR_INVALID_DATA); + int64_t count = decode_uint64(buf); + buf += 4; + len -= 4; + ERR_FAIL_MUL_OF(count, 8, ERR_INVALID_DATA); + ERR_FAIL_COND_V(count < 0 || count * 8 > len, ERR_INVALID_DATA); + + Vector<int64_t> data; + + if (count) { + //const int*rbuf=(const int*)buf; + data.resize(count); + int64_t *w = data.ptrw(); + for (int64_t i = 0; i < count; i++) { + + w[i] = decode_uint64(&buf[i * 8]); + } + } + r_variant = Variant(data); + if (r_len) { + (*r_len) += 4 + count * sizeof(int64_t); + } + + } break; + case Variant::PACKED_FLOAT32_ARRAY: { ERR_FAIL_COND_V(len < 4, ERR_INVALID_DATA); int32_t count = decode_uint32(buf); @@ -598,12 +682,12 @@ Error decode_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int ERR_FAIL_MUL_OF(count, 4, ERR_INVALID_DATA); ERR_FAIL_COND_V(count < 0 || count * 4 > len, ERR_INVALID_DATA); - PoolVector<float> data; + Vector<float> data; if (count) { //const float*rbuf=(const float*)buf; data.resize(count); - PoolVector<float>::Write w = data.write(); + float *w = data.ptrw(); for (int32_t i = 0; i < count; i++) { w[i] = decode_float(&buf[i * 4]); @@ -616,12 +700,39 @@ Error decode_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int } } break; - case Variant::POOL_STRING_ARRAY: { + case Variant::PACKED_FLOAT64_ARRAY: { + + ERR_FAIL_COND_V(len < 4, ERR_INVALID_DATA); + int64_t count = decode_uint64(buf); + buf += 4; + len -= 4; + ERR_FAIL_MUL_OF(count, 8, ERR_INVALID_DATA); + ERR_FAIL_COND_V(count < 0 || count * 8 > len, ERR_INVALID_DATA); + + Vector<double> data; + + if (count) { + //const double*rbuf=(const double*)buf; + data.resize(count); + double *w = data.ptrw(); + for (int64_t i = 0; i < count; i++) { + + w[i] = decode_double(&buf[i * 8]); + } + } + r_variant = data; + + if (r_len) { + (*r_len) += 4 + count * sizeof(double); + } + + } break; + case Variant::PACKED_STRING_ARRAY: { ERR_FAIL_COND_V(len < 4, ERR_INVALID_DATA); int32_t count = decode_uint32(buf); - PoolVector<String> strings; + Vector<String> strings; buf += 4; len -= 4; @@ -642,7 +753,7 @@ Error decode_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int r_variant = strings; } break; - case Variant::POOL_VECTOR2_ARRAY: { + case Variant::PACKED_VECTOR2_ARRAY: { ERR_FAIL_COND_V(len < 4, ERR_INVALID_DATA); int32_t count = decode_uint32(buf); @@ -651,7 +762,7 @@ Error decode_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int ERR_FAIL_MUL_OF(count, 4 * 2, ERR_INVALID_DATA); ERR_FAIL_COND_V(count < 0 || count * 4 * 2 > len, ERR_INVALID_DATA); - PoolVector<Vector2> varray; + Vector<Vector2> varray; if (r_len) { (*r_len) += 4; @@ -659,7 +770,7 @@ Error decode_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int if (count) { varray.resize(count); - PoolVector<Vector2>::Write w = varray.write(); + Vector2 *w = varray.ptrw(); for (int32_t i = 0; i < count; i++) { @@ -676,7 +787,7 @@ Error decode_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int r_variant = varray; } break; - case Variant::POOL_VECTOR3_ARRAY: { + case Variant::PACKED_VECTOR3_ARRAY: { ERR_FAIL_COND_V(len < 4, ERR_INVALID_DATA); int32_t count = decode_uint32(buf); @@ -686,7 +797,7 @@ Error decode_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int ERR_FAIL_MUL_OF(count, 4 * 3, ERR_INVALID_DATA); ERR_FAIL_COND_V(count < 0 || count * 4 * 3 > len, ERR_INVALID_DATA); - PoolVector<Vector3> varray; + Vector<Vector3> varray; if (r_len) { (*r_len) += 4; @@ -694,7 +805,7 @@ Error decode_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int if (count) { varray.resize(count); - PoolVector<Vector3>::Write w = varray.write(); + Vector3 *w = varray.ptrw(); for (int32_t i = 0; i < count; i++) { @@ -712,7 +823,7 @@ Error decode_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int r_variant = varray; } break; - case Variant::POOL_COLOR_ARRAY: { + case Variant::PACKED_COLOR_ARRAY: { ERR_FAIL_COND_V(len < 4, ERR_INVALID_DATA); int32_t count = decode_uint32(buf); @@ -722,7 +833,7 @@ Error decode_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int ERR_FAIL_MUL_OF(count, 4 * 4, ERR_INVALID_DATA); ERR_FAIL_COND_V(count < 0 || count * 4 * 4 > len, ERR_INVALID_DATA); - PoolVector<Color> carray; + Vector<Color> carray; if (r_len) { (*r_len) += 4; @@ -730,7 +841,7 @@ Error decode_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int if (count) { carray.resize(count); - PoolVector<Color>::Write w = carray.write(); + Color *w = carray.ptrw(); for (int32_t i = 0; i < count; i++) { @@ -793,7 +904,7 @@ Error encode_variant(const Variant &p_variant, uint8_t *r_buffer, int &r_len, bo flags |= ENCODE_FLAG_64; } } break; - case Variant::REAL: { + case Variant::FLOAT: { double d = p_variant; float f = d; @@ -802,10 +913,10 @@ Error encode_variant(const Variant &p_variant, uint8_t *r_buffer, int &r_len, bo } } break; case Variant::OBJECT: { -#ifdef DEBUG_ENABLED + // Test for potential wrong values sent by the debugger when it breaks. - Object *obj = p_variant; - if (!obj || !ObjectDB::instance_validate(obj)) { + Object *obj = p_variant.get_validated_object(); + if (!obj) { // Object is invalid, send a NULL instead. if (buf) { encode_uint32(Variant::NIL, buf); @@ -813,7 +924,7 @@ Error encode_variant(const Variant &p_variant, uint8_t *r_buffer, int &r_len, bo r_len += 4; return OK; } -#endif // DEBUG_ENABLED + if (!p_full_objects) { flags |= ENCODE_FLAG_OBJECT_AS_ID; } @@ -860,7 +971,7 @@ Error encode_variant(const Variant &p_variant, uint8_t *r_buffer, int &r_len, bo r_len += 4; } } break; - case Variant::REAL: { + case Variant::FLOAT: { if (flags & ENCODE_FLAG_64) { if (buf) { @@ -930,6 +1041,11 @@ Error encode_variant(const Variant &p_variant, uint8_t *r_buffer, int &r_len, bo _encode_string(p_variant, buf, r_len); } break; + case Variant::STRING_NAME: { + + _encode_string(p_variant, buf, r_len); + + } break; // math types case Variant::VECTOR2: { @@ -942,7 +1058,18 @@ Error encode_variant(const Variant &p_variant, uint8_t *r_buffer, int &r_len, bo r_len += 2 * 4; - } break; // 5 + } break; + case Variant::VECTOR2I: { + + if (buf) { + Vector2i v2 = p_variant; + encode_uint32(v2.x, &buf[0]); + encode_uint32(v2.y, &buf[4]); + } + + r_len += 2 * 4; + + } break; case Variant::RECT2: { if (buf) { @@ -955,6 +1082,18 @@ Error encode_variant(const Variant &p_variant, uint8_t *r_buffer, int &r_len, bo r_len += 4 * 4; } break; + case Variant::RECT2I: { + + if (buf) { + Rect2i r2 = p_variant; + encode_uint32(r2.position.x, &buf[0]); + encode_uint32(r2.position.y, &buf[4]); + encode_uint32(r2.size.x, &buf[8]); + encode_uint32(r2.size.y, &buf[12]); + } + r_len += 4 * 4; + + } break; case Variant::VECTOR3: { if (buf) { @@ -967,6 +1106,18 @@ Error encode_variant(const Variant &p_variant, uint8_t *r_buffer, int &r_len, bo r_len += 3 * 4; } break; + case Variant::VECTOR3I: { + + if (buf) { + Vector3i v3 = p_variant; + encode_uint32(v3.x, &buf[0]); + encode_uint32(v3.y, &buf[4]); + encode_uint32(v3.z, &buf[8]); + } + + r_len += 3 * 4; + + } break; case Variant::TRANSFORM2D: { if (buf) { @@ -1075,6 +1226,12 @@ Error encode_variant(const Variant &p_variant, uint8_t *r_buffer, int &r_len, bo case Variant::_RID: { } break; + case Variant::CALLABLE: { + + } break; + case Variant::SIGNAL: { + + } break; case Variant::OBJECT: { if (p_full_objects) { @@ -1127,9 +1284,9 @@ Error encode_variant(const Variant &p_variant, uint8_t *r_buffer, int &r_len, bo } else { if (buf) { - Object *obj = p_variant; + Object *obj = p_variant.get_validated_object(); ObjectID id; - if (obj && ObjectDB::instance_validate(obj)) { + if (obj) { id = obj->get_instance_id(); } @@ -1207,16 +1364,16 @@ Error encode_variant(const Variant &p_variant, uint8_t *r_buffer, int &r_len, bo } break; // arrays - case Variant::POOL_BYTE_ARRAY: { + case Variant::PACKED_BYTE_ARRAY: { - PoolVector<uint8_t> data = p_variant; + Vector<uint8_t> data = p_variant; int datalen = data.size(); int datasize = sizeof(uint8_t); if (buf) { encode_uint32(datalen, buf); buf += 4; - PoolVector<uint8_t>::Read r = data.read(); + const uint8_t *r = data.ptr(); copymem(buf, &r[0], datalen * datasize); buf += datalen * datasize; } @@ -1229,33 +1386,50 @@ Error encode_variant(const Variant &p_variant, uint8_t *r_buffer, int &r_len, bo } } break; - case Variant::POOL_INT_ARRAY: { + case Variant::PACKED_INT32_ARRAY: { - PoolVector<int> data = p_variant; + Vector<int32_t> data = p_variant; int datalen = data.size(); int datasize = sizeof(int32_t); if (buf) { encode_uint32(datalen, buf); buf += 4; - PoolVector<int>::Read r = data.read(); - for (int i = 0; i < datalen; i++) + const int32_t *r = data.ptr(); + for (int32_t i = 0; i < datalen; i++) encode_uint32(r[i], &buf[i * datasize]); } r_len += 4 + datalen * datasize; } break; - case Variant::POOL_REAL_ARRAY: { + case Variant::PACKED_INT64_ARRAY: { - PoolVector<real_t> data = p_variant; + Vector<int64_t> data = p_variant; int datalen = data.size(); - int datasize = sizeof(real_t); + int datasize = sizeof(int64_t); + + if (buf) { + encode_uint64(datalen, buf); + buf += 4; + const int64_t *r = data.ptr(); + for (int64_t i = 0; i < datalen; i++) + encode_uint64(r[i], &buf[i * datasize]); + } + + r_len += 4 + datalen * datasize; + + } break; + case Variant::PACKED_FLOAT32_ARRAY: { + + Vector<float> data = p_variant; + int datalen = data.size(); + int datasize = sizeof(float); if (buf) { encode_uint32(datalen, buf); buf += 4; - PoolVector<real_t>::Read r = data.read(); + const float *r = data.ptr(); for (int i = 0; i < datalen; i++) encode_float(r[i], &buf[i * datasize]); } @@ -1263,9 +1437,26 @@ Error encode_variant(const Variant &p_variant, uint8_t *r_buffer, int &r_len, bo r_len += 4 + datalen * datasize; } break; - case Variant::POOL_STRING_ARRAY: { + case Variant::PACKED_FLOAT64_ARRAY: { + + Vector<double> data = p_variant; + int datalen = data.size(); + int datasize = sizeof(double); + + if (buf) { + encode_uint32(datalen, buf); + buf += 4; + const double *r = data.ptr(); + for (int i = 0; i < datalen; i++) + encode_double(r[i], &buf[i * datasize]); + } + + r_len += 4 + datalen * datasize; + + } break; + case Variant::PACKED_STRING_ARRAY: { - PoolVector<String> data = p_variant; + Vector<String> data = p_variant; int len = data.size(); if (buf) { @@ -1295,9 +1486,9 @@ Error encode_variant(const Variant &p_variant, uint8_t *r_buffer, int &r_len, bo } } break; - case Variant::POOL_VECTOR2_ARRAY: { + case Variant::PACKED_VECTOR2_ARRAY: { - PoolVector<Vector2> data = p_variant; + Vector<Vector2> data = p_variant; int len = data.size(); if (buf) { @@ -1322,9 +1513,9 @@ Error encode_variant(const Variant &p_variant, uint8_t *r_buffer, int &r_len, bo r_len += 4 * 2 * len; } break; - case Variant::POOL_VECTOR3_ARRAY: { + case Variant::PACKED_VECTOR3_ARRAY: { - PoolVector<Vector3> data = p_variant; + Vector<Vector3> data = p_variant; int len = data.size(); if (buf) { @@ -1350,9 +1541,9 @@ Error encode_variant(const Variant &p_variant, uint8_t *r_buffer, int &r_len, bo r_len += 4 * 3 * len; } break; - case Variant::POOL_COLOR_ARRAY: { + case Variant::PACKED_COLOR_ARRAY: { - PoolVector<Color> data = p_variant; + Vector<Color> data = p_variant; int len = data.size(); if (buf) { diff --git a/core/io/multiplayer_api.cpp b/core/io/multiplayer_api.cpp index 3f66e00021..2aef0a3274 100644 --- a/core/io/multiplayer_api.cpp +++ b/core/io/multiplayer_api.cpp @@ -34,6 +34,10 @@ #include "scene/main/node.h" #include <stdint.h> +#define NODE_ID_COMPRESSION_SHIFT 3 +#define NAME_ID_COMPRESSION_SHIFT 5 +#define BYTE_ONLY_OR_NO_ARGS_SHIFT 6 + #ifdef DEBUG_ENABLED #include "core/os/os.h" #endif @@ -51,7 +55,7 @@ _FORCE_INLINE_ bool _should_call_local(MultiplayerAPI::RPCMode mode, bool is_mas case MultiplayerAPI::RPC_MODE_MASTERSYNC: { if (is_master) r_skip_rpc = true; // I am the master, so skip remote call. - FALLTHROUGH; + [[fallthrough]]; } case MultiplayerAPI::RPC_MODE_REMOTESYNC: case MultiplayerAPI::RPC_MODE_PUPPETSYNC: { @@ -145,22 +149,22 @@ void MultiplayerAPI::set_network_peer(const Ref<NetworkedMultiplayerPeer> &p_pee "Supplied NetworkedMultiplayerPeer must be connecting or connected."); if (network_peer.is_valid()) { - network_peer->disconnect("peer_connected", this, "_add_peer"); - network_peer->disconnect("peer_disconnected", this, "_del_peer"); - network_peer->disconnect("connection_succeeded", this, "_connected_to_server"); - network_peer->disconnect("connection_failed", this, "_connection_failed"); - network_peer->disconnect("server_disconnected", this, "_server_disconnected"); + network_peer->disconnect_compat("peer_connected", this, "_add_peer"); + network_peer->disconnect_compat("peer_disconnected", this, "_del_peer"); + network_peer->disconnect_compat("connection_succeeded", this, "_connected_to_server"); + network_peer->disconnect_compat("connection_failed", this, "_connection_failed"); + network_peer->disconnect_compat("server_disconnected", this, "_server_disconnected"); clear(); } network_peer = p_peer; if (network_peer.is_valid()) { - network_peer->connect("peer_connected", this, "_add_peer"); - network_peer->connect("peer_disconnected", this, "_del_peer"); - network_peer->connect("connection_succeeded", this, "_connected_to_server"); - network_peer->connect("connection_failed", this, "_connection_failed"); - network_peer->connect("server_disconnected", this, "_server_disconnected"); + network_peer->connect_compat("peer_connected", this, "_add_peer"); + network_peer->connect_compat("peer_disconnected", this, "_del_peer"); + network_peer->connect_compat("connection_succeeded", this, "_connected_to_server"); + network_peer->connect_compat("connection_failed", this, "_connection_failed"); + network_peer->connect_compat("server_disconnected", this, "_server_disconnected"); } } @@ -168,6 +172,16 @@ Ref<NetworkedMultiplayerPeer> MultiplayerAPI::get_network_peer() const { return network_peer; } +// Returns the packet size stripping the node path added when the node is not yet cached. +int get_packet_len(uint32_t p_node_target, int p_packet_len) { + if (p_node_target & 0x80000000) { + int ofs = p_node_target & 0x7FFFFFFF; + return p_packet_len - (p_packet_len - ofs); + } else { + return p_packet_len; + } +} + void MultiplayerAPI::_process_packet(int p_from, const uint8_t *p_packet, int p_packet_len) { ERR_FAIL_COND_MSG(root_node == NULL, "Multiplayer root node was not initialized. If you are using custom multiplayer, remember to set the root node via MultiplayerAPI.set_root_node before using it."); @@ -204,8 +218,8 @@ void MultiplayerAPI::_process_packet(int p_from, const uint8_t *p_packet, int p_ int name_id_offset = 1; ERR_FAIL_COND_MSG(p_packet_len < packet_min_size, "Invalid packet received. Size too small."); // Compute the meta size, which depends on the compression level. - int node_id_compression = (p_packet[0] & 24) >> 3; - int name_id_compression = (p_packet[0] & 32) >> 5; + int node_id_compression = (p_packet[0] & 24) >> NODE_ID_COMPRESSION_SHIFT; + int name_id_compression = (p_packet[0] & 32) >> NAME_ID_COMPRESSION_SHIFT; switch (node_id_compression) { case NETWORK_NODE_ID_COMPRESSION_8: @@ -250,6 +264,7 @@ void MultiplayerAPI::_process_packet(int p_from, const uint8_t *p_packet, int p_ // Unreachable, checked before. CRASH_NOW(); } + Node *node = _process_get_node(p_from, p_packet, node_target, p_packet_len); ERR_FAIL_COND_MSG(node == NULL, "Invalid packet received. Requested node was not found."); @@ -266,13 +281,14 @@ void MultiplayerAPI::_process_packet(int p_from, const uint8_t *p_packet, int p_ CRASH_NOW(); } + const int packet_len = get_packet_len(node_target, p_packet_len); if (packet_type == NETWORK_COMMAND_REMOTE_CALL) { - _process_rpc(node, name_id, p_from, p_packet, p_packet_len, packet_min_size); + _process_rpc(node, name_id, p_from, p_packet, packet_len, packet_min_size); } else { - _process_rset(node, name_id, p_from, p_packet, p_packet_len, packet_min_size); + _process_rset(node, name_id, p_from, p_packet, packet_len, packet_min_size); } } break; @@ -326,7 +342,7 @@ Node *MultiplayerAPI::_process_get_node(int p_from, const uint8_t *p_packet, uin void MultiplayerAPI::_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) { - ERR_FAIL_COND_MSG(p_offset >= p_packet_len, "Invalid packet received. Size too small."); + 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. StringName name = p_node->get_node_rpc_method(p_rpc_method_id); @@ -340,14 +356,30 @@ void MultiplayerAPI::_process_rpc(Node *p_node, const uint16_t p_rpc_method_id, bool can_call = _can_call_mode(p_node, rpc_mode, p_from); ERR_FAIL_COND_MSG(!can_call, "RPC '" + String(name) + "' is not allowed on node " + p_node->get_path() + " from: " + itos(p_from) + ". Mode is " + itos((int)rpc_mode) + ", master is " + itos(p_node->get_network_master()) + "."); - int argc = p_packet[p_offset]; + int argc = 0; + bool byte_only = false; + + const bool byte_only_or_no_args = ((p_packet[0] & 64) >> BYTE_ONLY_OR_NO_ARGS_SHIFT) == 1; + if (byte_only_or_no_args) { + if (p_offset < p_packet_len) { + // This packet contains only bytes. + argc = 1; + byte_only = true; + } else { + // This rpc calls a method without parameters. + } + } else { + // Normal variant, takes the argument count from the packet. + ERR_FAIL_COND_MSG(p_offset >= p_packet_len, "Invalid packet received. Size too small."); + argc = p_packet[p_offset]; + p_offset += 1; + } + Vector<Variant> args; Vector<const Variant *> argp; args.resize(argc); argp.resize(argc); - p_offset++; - #ifdef DEBUG_ENABLED if (profiling) { ObjectID id = p_node->get_instance_id(); @@ -356,22 +388,32 @@ void MultiplayerAPI::_process_rpc(Node *p_node, const uint16_t p_rpc_method_id, } #endif - for (int i = 0; i < argc; i++) { + if (byte_only) { + Vector<uint8_t> pure_data; + const int len = p_packet_len - p_offset; + pure_data.resize(len); + memcpy(pure_data.ptrw(), &p_packet[p_offset], len); + args.write[0] = pure_data; + argp.write[0] = &args[0]; + p_offset += len; + } else { + for (int i = 0; i < argc; i++) { - ERR_FAIL_COND_MSG(p_offset >= p_packet_len, "Invalid packet received. Size too small."); + ERR_FAIL_COND_MSG(p_offset >= p_packet_len, "Invalid packet received. Size too small."); - int vlen; - Error err = _decode_and_decompress_variant(args.write[i], &p_packet[p_offset], p_packet_len - p_offset, &vlen); - ERR_FAIL_COND_MSG(err != OK, "Invalid packet received. Unable to decode RPC argument."); + int vlen; + Error err = _decode_and_decompress_variant(args.write[i], &p_packet[p_offset], p_packet_len - p_offset, &vlen); + ERR_FAIL_COND_MSG(err != OK, "Invalid packet received. Unable to decode RPC argument."); - argp.write[i] = &args[i]; - p_offset += vlen; + argp.write[i] = &args[i]; + p_offset += vlen; + } } - Variant::CallError ce; + Callable::CallError ce; p_node->call(name, (const Variant **)argp.ptr(), argc, ce); - if (ce.error != Variant::CallError::CALL_OK) { + if (ce.error != Callable::CallError::CALL_OK) { String error = Variant::get_call_error_text(p_node, name, (const Variant **)argp.ptr(), argc, ce); error = "RPC - " + error; ERR_PRINT(error); @@ -742,10 +784,12 @@ void MultiplayerAPI::_send_rpc(Node *p_from, int p_to, bool p_unreliable, bool p // - `NetworkCommands` in the first three bits. // - `NetworkNodeIdCompression` in the next 2 bits. // - `NetworkNameIdCompression` in the next 1 bit. - // - So we still have the last two bits free! + // - `byte_only_or_no_args` in the next 1 bit. + // - So we still have the last bit free! uint8_t command_type = p_set ? NETWORK_COMMAND_REMOTE_SET : 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; MAKE_ROOM(1); // The meta is composed along the way, so just set 0 for now. @@ -835,17 +879,28 @@ void MultiplayerAPI::_send_rpc(Node *p_from, int p_to, bool p_unreliable, bool p ofs += 2; } - // Call arguments. - MAKE_ROOM(ofs + 1); - packet_cache.write[ofs] = p_argcount; - ofs += 1; - for (int i = 0; i < p_argcount; i++) { - int len(0); - Error err = _encode_and_compress_variant(*p_arg[i], NULL, len); - ERR_FAIL_COND_MSG(err != OK, "Unable to encode RPC argument. THIS IS LIKELY A BUG IN THE ENGINE!"); - MAKE_ROOM(ofs + len); - _encode_and_compress_variant(*p_arg[i], &(packet_cache.write[ofs]), len); - ofs += len; + if (p_argcount == 0) { + byte_only_or_no_args = true; + } else if (p_argcount == 1 && p_arg[0]->get_type() == Variant::PACKED_BYTE_ARRAY) { + byte_only_or_no_args = true; + // Special optimization when only the byte vector is sent. + const Vector<uint8_t> data = *p_arg[0]; + MAKE_ROOM(ofs + data.size()); + copymem(&(packet_cache.write[ofs]), data.ptr(), sizeof(uint8_t) * data.size()); + ofs += data.size(); + } else { + // Arguments + MAKE_ROOM(ofs + 1); + packet_cache.write[ofs] = p_argcount; + ofs += 1; + for (int i = 0; i < p_argcount; i++) { + int len(0); + Error err = _encode_and_compress_variant(*p_arg[i], NULL, len); + ERR_FAIL_COND_MSG(err != OK, "Unable to encode RPC argument. THIS IS LIKELY A BUG IN THE ENGINE!"); + MAKE_ROOM(ofs + len); + _encode_and_compress_variant(*p_arg[i], &(packet_cache.write[ofs]), len); + ofs += len; + } } } @@ -854,7 +909,7 @@ void MultiplayerAPI::_send_rpc(Node *p_from, int p_to, bool p_unreliable, bool p ERR_FAIL_COND(name_id_compression > 1); // We can now set the meta - packet_cache.write[0] = command_type + (node_id_compression << 3) + (name_id_compression << 5); + packet_cache.write[0] = command_type + (node_id_compression << NODE_ID_COMPRESSION_SHIFT) + (name_id_compression << NAME_ID_COMPRESSION_SHIFT) + ((byte_only_or_no_args ? 1 : 0) << BYTE_ONLY_OR_NO_ARGS_SHIFT); #ifdef DEBUG_ENABLED if (profiling) { @@ -989,10 +1044,10 @@ void MultiplayerAPI::rpcp(Node *p_node, int p_peer_id, bool p_unreliable, const if (call_local_native) { int temp_id = rpc_sender_id; rpc_sender_id = get_network_unique_id(); - Variant::CallError ce; + Callable::CallError ce; p_node->call(p_method, p_arg, p_argcount, ce); rpc_sender_id = temp_id; - if (ce.error != Variant::CallError::CALL_OK) { + if (ce.error != Callable::CallError::CALL_OK) { String error = Variant::get_call_error_text(p_node, p_method, p_arg, p_argcount, ce); error = "rpc() aborted in local call: - " + error + "."; ERR_PRINT(error); @@ -1003,11 +1058,11 @@ void MultiplayerAPI::rpcp(Node *p_node, int p_peer_id, bool p_unreliable, const if (call_local_script) { int temp_id = rpc_sender_id; rpc_sender_id = get_network_unique_id(); - Variant::CallError ce; - ce.error = Variant::CallError::CALL_OK; + Callable::CallError ce; + ce.error = Callable::CallError::CALL_OK; p_node->get_script_instance()->call(p_method, p_arg, p_argcount, ce); rpc_sender_id = temp_id; - if (ce.error != Variant::CallError::CALL_OK) { + if (ce.error != Callable::CallError::CALL_OK) { String error = Variant::get_call_error_text(p_node, p_method, p_arg, p_argcount, ce); error = "rpc() aborted in script local call: - " + error + "."; ERR_PRINT(error); @@ -1087,14 +1142,14 @@ void MultiplayerAPI::rsetp(Node *p_node, int p_peer_id, bool p_unreliable, const _send_rpc(p_node, p_peer_id, p_unreliable, true, p_property, &vptr, 1); } -Error MultiplayerAPI::send_bytes(PoolVector<uint8_t> p_data, int p_to, NetworkedMultiplayerPeer::TransferMode p_mode) { +Error MultiplayerAPI::send_bytes(Vector<uint8_t> p_data, int p_to, NetworkedMultiplayerPeer::TransferMode p_mode) { ERR_FAIL_COND_V_MSG(p_data.size() < 1, ERR_INVALID_DATA, "Trying to send an empty raw packet."); ERR_FAIL_COND_V_MSG(!network_peer.is_valid(), ERR_UNCONFIGURED, "Trying to send a raw packet while no network peer is active."); ERR_FAIL_COND_V_MSG(network_peer->get_connection_status() != NetworkedMultiplayerPeer::CONNECTION_CONNECTED, ERR_UNCONFIGURED, "Trying to send a raw packet via a network peer which is not connected."); MAKE_ROOM(p_data.size() + 1); - PoolVector<uint8_t>::Read r = p_data.read(); + const uint8_t *r = p_data.ptr(); packet_cache.write[0] = NETWORK_COMMAND_RAW; memcpy(&packet_cache.write[1], &r[0], p_data.size()); @@ -1108,11 +1163,11 @@ void MultiplayerAPI::_process_raw(int p_from, const uint8_t *p_packet, int p_pac ERR_FAIL_COND_MSG(p_packet_len < 2, "Invalid packet received. Size too small."); - PoolVector<uint8_t> out; + Vector<uint8_t> out; int len = p_packet_len - 1; out.resize(len); { - PoolVector<uint8_t>::Write w = out.write(); + uint8_t *w = out.ptrw(); memcpy(&w[0], &p_packet[1], len); } emit_signal("network_peer_packet", p_from, out); @@ -1284,7 +1339,7 @@ void MultiplayerAPI::_bind_methods() { ADD_SIGNAL(MethodInfo("network_peer_connected", PropertyInfo(Variant::INT, "id"))); ADD_SIGNAL(MethodInfo("network_peer_disconnected", PropertyInfo(Variant::INT, "id"))); - ADD_SIGNAL(MethodInfo("network_peer_packet", PropertyInfo(Variant::INT, "id"), PropertyInfo(Variant::POOL_BYTE_ARRAY, "packet"))); + ADD_SIGNAL(MethodInfo("network_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")); diff --git a/core/io/multiplayer_api.h b/core/io/multiplayer_api.h index 8748dba03c..a706a0e450 100644 --- a/core/io/multiplayer_api.h +++ b/core/io/multiplayer_api.h @@ -145,7 +145,7 @@ public: void set_root_node(Node *p_node); void set_network_peer(const Ref<NetworkedMultiplayerPeer> &p_peer); Ref<NetworkedMultiplayerPeer> get_network_peer() const; - Error send_bytes(PoolVector<uint8_t> p_data, int p_to = NetworkedMultiplayerPeer::TARGET_PEER_BROADCAST, NetworkedMultiplayerPeer::TransferMode p_mode = NetworkedMultiplayerPeer::TRANSFER_MODE_RELIABLE); + Error send_bytes(Vector<uint8_t> p_data, int p_to = NetworkedMultiplayerPeer::TARGET_PEER_BROADCAST, NetworkedMultiplayerPeer::TransferMode p_mode = NetworkedMultiplayerPeer::TRANSFER_MODE_RELIABLE); // Called by Node.rpc void rpcp(Node *p_node, int p_peer_id, bool p_unreliable, const StringName &p_method, const Variant **p_arg, int p_argcount); diff --git a/core/io/net_socket.h b/core/io/net_socket.h index 710df2dd78..376fd87a27 100644 --- a/core/io/net_socket.h +++ b/core/io/net_socket.h @@ -61,7 +61,7 @@ public: virtual Error connect_to_host(IP_Address p_addr, uint16_t p_port) = 0; virtual Error poll(PollType p_type, int timeout) const = 0; virtual Error recv(uint8_t *p_buffer, int p_len, int &r_read) = 0; - virtual Error recvfrom(uint8_t *p_buffer, int p_len, int &r_read, IP_Address &r_ip, uint16_t &r_port) = 0; + virtual Error recvfrom(uint8_t *p_buffer, int p_len, int &r_read, IP_Address &r_ip, uint16_t &r_port, bool p_peek = false) = 0; virtual Error send(const uint8_t *p_buffer, int p_len, int &r_sent) = 0; virtual Error sendto(const uint8_t *p_buffer, int p_len, int &r_sent, IP_Address p_ip, uint16_t p_port) = 0; virtual Ref<NetSocket> accept(IP_Address &r_ip, uint16_t &r_port) = 0; diff --git a/core/io/packet_peer.cpp b/core/io/packet_peer.cpp index 81d7b86161..2f5c493c2c 100644 --- a/core/io/packet_peer.cpp +++ b/core/io/packet_peer.cpp @@ -53,7 +53,7 @@ int PacketPeer::get_encode_buffer_max_size() const { return encode_buffer_max_size; } -Error PacketPeer::get_packet_buffer(PoolVector<uint8_t> &r_buffer) { +Error PacketPeer::get_packet_buffer(Vector<uint8_t> &r_buffer) { const uint8_t *buffer; int buffer_size; @@ -65,20 +65,20 @@ Error PacketPeer::get_packet_buffer(PoolVector<uint8_t> &r_buffer) { if (buffer_size == 0) return OK; - PoolVector<uint8_t>::Write w = r_buffer.write(); + uint8_t *w = r_buffer.ptrw(); for (int i = 0; i < buffer_size; i++) w[i] = buffer[i]; return OK; } -Error PacketPeer::put_packet_buffer(const PoolVector<uint8_t> &p_buffer) { +Error PacketPeer::put_packet_buffer(const Vector<uint8_t> &p_buffer) { int len = p_buffer.size(); if (len == 0) return OK; - PoolVector<uint8_t>::Read r = p_buffer.read(); + const uint8_t *r = p_buffer.ptr(); return put_packet(&r[0], len); } @@ -110,11 +110,11 @@ Error PacketPeer::put_var(const Variant &p_packet, bool p_full_objects) { encode_buffer.resize(next_power_of_2(len)); } - PoolVector<uint8_t>::Write w = encode_buffer.write(); - err = encode_variant(p_packet, w.ptr(), len, p_full_objects); + uint8_t *w = encode_buffer.ptrw(); + err = encode_variant(p_packet, w, len, p_full_objects); ERR_FAIL_COND_V_MSG(err != OK, err, "Error when trying to encode Variant."); - return put_packet(w.ptr(), len); + return put_packet(w, len); } Variant PacketPeer::_bnd_get_var(bool p_allow_objects) { @@ -125,12 +125,12 @@ Variant PacketPeer::_bnd_get_var(bool p_allow_objects) { return var; } -Error PacketPeer::_put_packet(const PoolVector<uint8_t> &p_buffer) { +Error PacketPeer::_put_packet(const Vector<uint8_t> &p_buffer) { return put_packet_buffer(p_buffer); } -PoolVector<uint8_t> PacketPeer::_get_packet() { +Vector<uint8_t> PacketPeer::_get_packet() { - PoolVector<uint8_t> raw; + Vector<uint8_t> raw; last_get_error = get_packet_buffer(raw); return raw; } diff --git a/core/io/packet_peer.h b/core/io/packet_peer.h index bee69f5ca9..62144259cc 100644 --- a/core/io/packet_peer.h +++ b/core/io/packet_peer.h @@ -43,14 +43,14 @@ class PacketPeer : public Reference { static void _bind_methods(); - Error _put_packet(const PoolVector<uint8_t> &p_buffer); - PoolVector<uint8_t> _get_packet(); + Error _put_packet(const Vector<uint8_t> &p_buffer); + Vector<uint8_t> _get_packet(); Error _get_packet_error() const; mutable Error last_get_error; int encode_buffer_max_size; - PoolVector<uint8_t> encode_buffer; + Vector<uint8_t> encode_buffer; public: virtual int get_available_packet_count() const = 0; @@ -61,8 +61,8 @@ public: /* helpers / binders */ - virtual Error get_packet_buffer(PoolVector<uint8_t> &r_buffer); - virtual Error put_packet_buffer(const PoolVector<uint8_t> &p_buffer); + virtual Error get_packet_buffer(Vector<uint8_t> &r_buffer); + virtual Error put_packet_buffer(const Vector<uint8_t> &p_buffer); virtual Error get_var(Variant &r_variant, bool p_allow_objects = false); virtual Error put_var(const Variant &p_packet, bool p_full_objects = false); diff --git a/platform/x11/power_x11.h b/core/io/packet_peer_dtls.cpp index 76f20c68e8..01218a6881 100644 --- a/platform/x11/power_x11.h +++ b/core/io/packet_peer_dtls.cpp @@ -1,5 +1,5 @@ /*************************************************************************/ -/* power_x11.h */ +/* packet_peer_dtls.cpp */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ @@ -28,39 +28,35 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -#ifndef POWER_X11_H -#define POWER_X11_H - -#include "core/os/dir_access.h" +#include "packet_peer_dtls.h" #include "core/os/file_access.h" -#include "core/os/os.h" +#include "core/project_settings.h" + +PacketPeerDTLS *(*PacketPeerDTLS::_create)() = NULL; +bool PacketPeerDTLS::available = false; + +PacketPeerDTLS *PacketPeerDTLS::create() { -class PowerX11 { + return _create(); +} -private: - int nsecs_left; - int percent_left; - OS::PowerState power_state; +bool PacketPeerDTLS::is_available() { + return available; +} - FileAccessRef open_power_file(const char *base, const char *node, const char *key); - bool read_power_file(const char *base, const char *node, const char *key, char *buf, size_t buflen); - bool make_proc_acpi_key_val(char **_ptr, char **_key, char **_val); - void check_proc_acpi_battery(const char *node, bool *have_battery, bool *charging); - void check_proc_acpi_ac_adapter(const char *node, bool *have_ac); - bool GetPowerInfo_Linux_proc_acpi(); - bool next_string(char **_ptr, char **_str); - bool int_string(char *str, int *val); - bool GetPowerInfo_Linux_proc_apm(); - bool GetPowerInfo_Linux_sys_class_power_supply(); - bool UpdatePowerInfo(); +void PacketPeerDTLS::_bind_methods() { -public: - PowerX11(); - virtual ~PowerX11(); + ClassDB::bind_method(D_METHOD("poll"), &PacketPeerDTLS::poll); + ClassDB::bind_method(D_METHOD("connect_to_peer", "packet_peer", "validate_certs", "for_hostname", "valid_certificate"), &PacketPeerDTLS::connect_to_peer, DEFVAL(true), DEFVAL(String()), DEFVAL(Ref<X509Certificate>())); + ClassDB::bind_method(D_METHOD("get_status"), &PacketPeerDTLS::get_status); + ClassDB::bind_method(D_METHOD("disconnect_from_peer"), &PacketPeerDTLS::disconnect_from_peer); - OS::PowerState get_power_state(); - int get_power_seconds_left(); - int get_power_percent_left(); -}; + BIND_ENUM_CONSTANT(STATUS_DISCONNECTED); + BIND_ENUM_CONSTANT(STATUS_HANDSHAKING); + BIND_ENUM_CONSTANT(STATUS_CONNECTED); + BIND_ENUM_CONSTANT(STATUS_ERROR); + BIND_ENUM_CONSTANT(STATUS_ERROR_HOSTNAME_MISMATCH); +} -#endif // POWER_X11_H +PacketPeerDTLS::PacketPeerDTLS() { +} diff --git a/core/ref_ptr.h b/core/io/packet_peer_dtls.h index 4736106b4f..4f9f4535bc 100644 --- a/core/ref_ptr.h +++ b/core/io/packet_peer_dtls.h @@ -1,5 +1,5 @@ /*************************************************************************/ -/* ref_ptr.h */ +/* packet_peer_dtls.h */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ @@ -28,35 +28,41 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -#ifndef REF_PTR_H -#define REF_PTR_H -/** - @author Juan Linietsky <reduzio@gmail.com> - * This class exists to workaround a limitation in C++ but keep the design OK. - * It's basically an opaque container of a Reference reference, so Variant can use it. -*/ +#ifndef PACKET_PEER_DTLS_H +#define PACKET_PEER_DTLS_H -#include "core/rid.h" +#include "core/crypto/crypto.h" +#include "core/io/packet_peer_udp.h" -class RefPtr { +class PacketPeerDTLS : public PacketPeer { + GDCLASS(PacketPeerDTLS, PacketPeer); - enum { +protected: + static PacketPeerDTLS *(*_create)(); + static void _bind_methods(); - DATASIZE = sizeof(void *) //*4 -ref was shrunk - }; + static bool available; - mutable char data[DATASIZE]; // too much probably, virtual class + pointer public: - bool is_null() const; - void operator=(const RefPtr &p_other); - bool operator==(const RefPtr &p_other) const; - bool operator!=(const RefPtr &p_other) const; - RID get_rid() const; - void unref(); - _FORCE_INLINE_ void *get_data() const { return data; } - RefPtr(const RefPtr &p_other); - RefPtr(); - ~RefPtr(); + enum Status { + STATUS_DISCONNECTED, + STATUS_HANDSHAKING, + STATUS_CONNECTED, + STATUS_ERROR, + STATUS_ERROR_HOSTNAME_MISMATCH + }; + + virtual void poll() = 0; + virtual Error connect_to_peer(Ref<PacketPeerUDP> p_base, bool p_validate_certs = true, const String &p_for_hostname = String(), Ref<X509Certificate> p_ca_certs = Ref<X509Certificate>()) = 0; + virtual void disconnect_from_peer() = 0; + virtual Status get_status() const = 0; + + static PacketPeerDTLS *create(); + static bool is_available(); + + PacketPeerDTLS(); }; -#endif // REF_PTR_H +VARIANT_ENUM_CAST(PacketPeerDTLS::Status); + +#endif // PACKET_PEER_DTLS_H diff --git a/core/io/packet_peer_udp.cpp b/core/io/packet_peer_udp.cpp index a8cfd741bb..f800ffc3db 100644 --- a/core/io/packet_peer_udp.cpp +++ b/core/io/packet_peer_udp.cpp @@ -133,7 +133,11 @@ Error PacketPeerUDP::put_packet(const uint8_t *p_buffer, int p_buffer_size) { } do { - err = _sock->sendto(p_buffer, p_buffer_size, sent, peer_addr, peer_port); + if (connected) { + err = _sock->send(p_buffer, p_buffer_size, sent); + } else { + err = _sock->sendto(p_buffer, p_buffer_size, sent, peer_addr, peer_port); + } if (err != OK) { if (err != ERR_BUSY) return FAILED; @@ -184,12 +188,69 @@ Error PacketPeerUDP::listen(int p_port, const IP_Address &p_bind_address, int p_ return OK; } +Error PacketPeerUDP::connect_socket(Ref<NetSocket> p_sock) { + Error err; + int read = 0; + uint16_t r_port; + IP_Address r_ip; + + err = p_sock->recvfrom(recv_buffer, sizeof(recv_buffer), read, r_ip, r_port, true); + ERR_FAIL_COND_V(err != OK, err); + err = p_sock->connect_to_host(r_ip, r_port); + ERR_FAIL_COND_V(err != OK, err); + _sock = p_sock; + peer_addr = r_ip; + peer_port = r_port; + packet_ip = peer_addr; + packet_port = peer_port; + connected = true; + return OK; +} + +Error PacketPeerUDP::connect_to_host(const IP_Address &p_host, int p_port) { + ERR_FAIL_COND_V(!_sock.is_valid(), ERR_UNAVAILABLE); + ERR_FAIL_COND_V(!p_host.is_valid(), ERR_INVALID_PARAMETER); + + Error err; + + if (!_sock->is_open()) { + IP::Type ip_type = p_host.is_ipv4() ? IP::TYPE_IPV4 : IP::TYPE_IPV6; + err = _sock->open(NetSocket::TYPE_UDP, ip_type); + ERR_FAIL_COND_V(err != OK, ERR_CANT_OPEN); + _sock->set_blocking_enabled(false); + } + + err = _sock->connect_to_host(p_host, p_port); + + // I see no reason why we should get ERR_BUSY (wouldblock/eagain) here. + // This is UDP, so connect is only used to tell the OS to which socket + // it shuold deliver packets when multiple are bound on the same address/port. + if (err != OK) { + close(); + ERR_FAIL_V_MSG(FAILED, "Unable to connect"); + } + + connected = true; + + peer_addr = p_host; + peer_port = p_port; + + // Flush any packet we might still have in queue. + rb.clear(); + return OK; +} + +bool PacketPeerUDP::is_connected_to_host() const { + return connected; +} + void PacketPeerUDP::close() { if (_sock.is_valid()) _sock->close(); rb.resize(16); queue_count = 0; + connected = false; } Error PacketPeerUDP::wait() { @@ -212,7 +273,13 @@ Error PacketPeerUDP::_poll() { uint16_t port; while (true) { - err = _sock->recvfrom(recv_buffer, sizeof(recv_buffer), read, ip, port); + if (connected) { + err = _sock->recv(recv_buffer, sizeof(recv_buffer), read); + ip = peer_addr; + port = peer_port; + } else { + err = _sock->recvfrom(recv_buffer, sizeof(recv_buffer), read, ip, port); + } if (err != OK) { if (err == ERR_BUSY) @@ -254,6 +321,7 @@ int PacketPeerUDP::get_packet_port() const { void PacketPeerUDP::set_dest_address(const IP_Address &p_address, int p_port) { + ERR_FAIL_COND_MSG(connected, "Destination address cannot be set for connected sockets"); peer_addr = p_address; peer_port = p_port; } @@ -264,6 +332,8 @@ void PacketPeerUDP::_bind_methods() { ClassDB::bind_method(D_METHOD("close"), &PacketPeerUDP::close); ClassDB::bind_method(D_METHOD("wait"), &PacketPeerUDP::wait); ClassDB::bind_method(D_METHOD("is_listening"), &PacketPeerUDP::is_listening); + ClassDB::bind_method(D_METHOD("connect_to_host", "host", "port"), &PacketPeerUDP::connect_to_host); + ClassDB::bind_method(D_METHOD("is_connected_to_host"), &PacketPeerUDP::is_connected_to_host); ClassDB::bind_method(D_METHOD("get_packet_ip"), &PacketPeerUDP::_get_packet_ip); ClassDB::bind_method(D_METHOD("get_packet_port"), &PacketPeerUDP::get_packet_port); ClassDB::bind_method(D_METHOD("set_dest_address", "host", "port"), &PacketPeerUDP::_set_dest_address); @@ -276,6 +346,7 @@ PacketPeerUDP::PacketPeerUDP() : packet_port(0), queue_count(0), peer_port(0), + connected(false), blocking(true), broadcast(false), _sock(Ref<NetSocket>(NetSocket::create())) { diff --git a/core/io/packet_peer_udp.h b/core/io/packet_peer_udp.h index 15b4d00c37..b5a9fc9ec3 100644 --- a/core/io/packet_peer_udp.h +++ b/core/io/packet_peer_udp.h @@ -52,6 +52,7 @@ protected: IP_Address peer_addr; int peer_port; + bool connected; bool blocking; bool broadcast; Ref<NetSocket> _sock; @@ -70,6 +71,11 @@ public: void close(); Error wait(); bool is_listening() const; + + Error connect_socket(Ref<NetSocket> p_sock); // Used by UDPServer + Error connect_to_host(const IP_Address &p_host, int p_port); + bool is_connected_to_host() const; + IP_Address get_packet_address() const; int get_packet_port() const; void set_dest_address(const IP_Address &p_address, int p_port); diff --git a/core/io/resource_format_binary.cpp b/core/io/resource_format_binary.cpp index 4a2bea3182..8c343a0f43 100644 --- a/core/io/resource_format_binary.cpp +++ b/core/io/resource_format_binary.cpp @@ -46,7 +46,7 @@ enum { VARIANT_NIL = 1, VARIANT_BOOL = 2, VARIANT_INT = 3, - VARIANT_REAL = 4, + VARIANT_FLOAT = 4, VARIANT_STRING = 5, VARIANT_VECTOR2 = 10, VARIANT_RECT2 = 11, @@ -65,14 +65,22 @@ enum { VARIANT_DICTIONARY = 26, VARIANT_ARRAY = 30, VARIANT_RAW_ARRAY = 31, - VARIANT_INT_ARRAY = 32, - VARIANT_REAL_ARRAY = 33, + VARIANT_INT32_ARRAY = 32, + VARIANT_FLOAT32_ARRAY = 33, VARIANT_STRING_ARRAY = 34, VARIANT_VECTOR3_ARRAY = 35, VARIANT_COLOR_ARRAY = 36, VARIANT_VECTOR2_ARRAY = 37, VARIANT_INT64 = 40, VARIANT_DOUBLE = 41, + VARIANT_CALLABLE = 42, + VARIANT_SIGNAL = 43, + VARIANT_STRING_NAME = 44, + VARIANT_VECTOR2I = 45, + VARIANT_RECT2I = 46, + VARIANT_VECTOR3I = 47, + VARIANT_INT64_ARRAY = 48, + VARIANT_FLOAT64_ARRAY = 49, OBJECT_EMPTY = 0, OBJECT_EXTERNAL_RESOURCE = 1, OBJECT_INTERNAL_RESOURCE = 2, @@ -136,7 +144,7 @@ Error ResourceInteractiveLoaderBinary::parse_variant(Variant &r_v) { r_v = int64_t(f->get_64()); } break; - case VARIANT_REAL: { + case VARIANT_FLOAT: { r_v = f->get_real(); } break; @@ -156,6 +164,14 @@ Error ResourceInteractiveLoaderBinary::parse_variant(Variant &r_v) { r_v = v; } break; + case VARIANT_VECTOR2I: { + + Vector2i v; + v.x = f->get_32(); + v.y = f->get_32(); + r_v = v; + + } break; case VARIANT_RECT2: { Rect2 v; @@ -166,6 +182,16 @@ Error ResourceInteractiveLoaderBinary::parse_variant(Variant &r_v) { r_v = v; } break; + case VARIANT_RECT2I: { + + Rect2i v; + v.position.x = f->get_32(); + v.position.y = f->get_32(); + v.size.x = f->get_32(); + v.size.y = f->get_32(); + r_v = v; + + } break; case VARIANT_VECTOR3: { Vector3 v; @@ -174,6 +200,14 @@ Error ResourceInteractiveLoaderBinary::parse_variant(Variant &r_v) { v.z = f->get_real(); r_v = v; } break; + case VARIANT_VECTOR3I: { + + Vector3i v; + v.x = f->get_32(); + v.y = f->get_32(); + v.z = f->get_32(); + r_v = v; + } break; case VARIANT_PLANE: { Plane v; @@ -258,6 +292,10 @@ Error ResourceInteractiveLoaderBinary::parse_variant(Variant &r_v) { r_v = v; } break; + case VARIANT_STRING_NAME: { + + r_v = StringName(get_unicode_string()); + } break; case VARIANT_NODE_PATH: { @@ -363,6 +401,15 @@ Error ResourceInteractiveLoaderBinary::parse_variant(Variant &r_v) { } } break; + case VARIANT_CALLABLE: { + + r_v = Callable(); + } break; + case VARIANT_SIGNAL: { + + r_v = Signal(); + } break; + case VARIANT_DICTIONARY: { uint32_t len = f->get_32(); @@ -398,23 +445,23 @@ Error ResourceInteractiveLoaderBinary::parse_variant(Variant &r_v) { uint32_t len = f->get_32(); - PoolVector<uint8_t> array; + Vector<uint8_t> array; array.resize(len); - PoolVector<uint8_t>::Write w = array.write(); - f->get_buffer(w.ptr(), len); + uint8_t *w = array.ptrw(); + f->get_buffer(w, len); _advance_padding(len); - w.release(); + r_v = array; } break; - case VARIANT_INT_ARRAY: { + case VARIANT_INT32_ARRAY: { uint32_t len = f->get_32(); - PoolVector<int> array; + Vector<int32_t> array; array.resize(len); - PoolVector<int>::Write w = array.write(); - f->get_buffer((uint8_t *)w.ptr(), len * 4); + int32_t *w = array.ptrw(); + f->get_buffer((uint8_t *)w, len * sizeof(int32_t)); #ifdef BIG_ENDIAN_ENABLED { uint32_t *ptr = (uint32_t *)w.ptr(); @@ -425,17 +472,38 @@ Error ResourceInteractiveLoaderBinary::parse_variant(Variant &r_v) { } #endif - w.release(); + r_v = array; } break; - case VARIANT_REAL_ARRAY: { + case VARIANT_INT64_ARRAY: { uint32_t len = f->get_32(); - PoolVector<real_t> array; + Vector<int64_t> array; array.resize(len); - PoolVector<real_t>::Write w = array.write(); - f->get_buffer((uint8_t *)w.ptr(), len * sizeof(real_t)); + int64_t *w = array.ptrw(); + f->get_buffer((uint8_t *)w, len * sizeof(int64_t)); +#ifdef BIG_ENDIAN_ENABLED + { + uint64_t *ptr = (uint64_t *)w.ptr(); + for (int i = 0; i < len; i++) { + + ptr[i] = BSWAP64(ptr[i]); + } + } + +#endif + + r_v = array; + } break; + case VARIANT_FLOAT32_ARRAY: { + + uint32_t len = f->get_32(); + + Vector<float> array; + array.resize(len); + float *w = array.ptrw(); + f->get_buffer((uint8_t *)w, len * sizeof(float)); #ifdef BIG_ENDIAN_ENABLED { uint32_t *ptr = (uint32_t *)w.ptr(); @@ -447,18 +515,38 @@ Error ResourceInteractiveLoaderBinary::parse_variant(Variant &r_v) { #endif - w.release(); + r_v = array; + } break; + case VARIANT_FLOAT64_ARRAY: { + + uint32_t len = f->get_32(); + + Vector<double> array; + array.resize(len); + double *w = array.ptrw(); + f->get_buffer((uint8_t *)w, len * sizeof(double)); +#ifdef BIG_ENDIAN_ENABLED + { + uint64_t *ptr = (uint64_t *)w.ptr(); + for (int i = 0; i < len; i++) { + + ptr[i] = BSWAP64(ptr[i]); + } + } + +#endif + r_v = array; } break; case VARIANT_STRING_ARRAY: { uint32_t len = f->get_32(); - PoolVector<String> array; + Vector<String> array; array.resize(len); - PoolVector<String>::Write w = array.write(); + String *w = array.ptrw(); for (uint32_t i = 0; i < len; i++) w[i] = get_unicode_string(); - w.release(); + r_v = array; } break; @@ -466,11 +554,11 @@ Error ResourceInteractiveLoaderBinary::parse_variant(Variant &r_v) { uint32_t len = f->get_32(); - PoolVector<Vector2> array; + Vector<Vector2> array; array.resize(len); - PoolVector<Vector2>::Write w = array.write(); + Vector2 *w = array.ptrw(); if (sizeof(Vector2) == 8) { - f->get_buffer((uint8_t *)w.ptr(), len * sizeof(real_t) * 2); + f->get_buffer((uint8_t *)w, len * sizeof(real_t) * 2); #ifdef BIG_ENDIAN_ENABLED { uint32_t *ptr = (uint32_t *)w.ptr(); @@ -485,7 +573,7 @@ Error ResourceInteractiveLoaderBinary::parse_variant(Variant &r_v) { } else { ERR_FAIL_V_MSG(ERR_UNAVAILABLE, "Vector2 size is NOT 8!"); } - w.release(); + r_v = array; } break; @@ -493,11 +581,11 @@ Error ResourceInteractiveLoaderBinary::parse_variant(Variant &r_v) { uint32_t len = f->get_32(); - PoolVector<Vector3> array; + Vector<Vector3> array; array.resize(len); - PoolVector<Vector3>::Write w = array.write(); + Vector3 *w = array.ptrw(); if (sizeof(Vector3) == 12) { - f->get_buffer((uint8_t *)w.ptr(), len * sizeof(real_t) * 3); + f->get_buffer((uint8_t *)w, len * sizeof(real_t) * 3); #ifdef BIG_ENDIAN_ENABLED { uint32_t *ptr = (uint32_t *)w.ptr(); @@ -512,7 +600,7 @@ Error ResourceInteractiveLoaderBinary::parse_variant(Variant &r_v) { } else { ERR_FAIL_V_MSG(ERR_UNAVAILABLE, "Vector3 size is NOT 12!"); } - w.release(); + r_v = array; } break; @@ -520,11 +608,11 @@ Error ResourceInteractiveLoaderBinary::parse_variant(Variant &r_v) { uint32_t len = f->get_32(); - PoolVector<Color> array; + Vector<Color> array; array.resize(len); - PoolVector<Color>::Write w = array.write(); + Color *w = array.ptrw(); if (sizeof(Color) == 16) { - f->get_buffer((uint8_t *)w.ptr(), len * sizeof(real_t) * 4); + f->get_buffer((uint8_t *)w, len * sizeof(real_t) * 4); #ifdef BIG_ENDIAN_ENABLED { uint32_t *ptr = (uint32_t *)w.ptr(); @@ -539,7 +627,7 @@ Error ResourceInteractiveLoaderBinary::parse_variant(Variant &r_v) { } else { ERR_FAIL_V_MSG(ERR_UNAVAILABLE, "Color size is NOT 16!"); } - w.release(); + r_v = array; } break; default: { @@ -1249,7 +1337,7 @@ void ResourceFormatSaverBinaryInstance::write_variant(FileAccess *f, const Varia } } break; - case Variant::REAL: { + case Variant::FLOAT: { double d = p_property; float fl = d; @@ -1258,7 +1346,7 @@ void ResourceFormatSaverBinaryInstance::write_variant(FileAccess *f, const Varia f->store_double(d); } else { - f->store_32(VARIANT_REAL); + f->store_32(VARIANT_FLOAT); f->store_real(fl); } @@ -1278,6 +1366,14 @@ void ResourceFormatSaverBinaryInstance::write_variant(FileAccess *f, const Varia f->store_real(val.y); } break; + case Variant::VECTOR2I: { + + f->store_32(VARIANT_VECTOR2I); + Vector2i val = p_property; + f->store_32(val.x); + f->store_32(val.y); + + } break; case Variant::RECT2: { f->store_32(VARIANT_RECT2); @@ -1288,6 +1384,16 @@ void ResourceFormatSaverBinaryInstance::write_variant(FileAccess *f, const Varia f->store_real(val.size.y); } break; + case Variant::RECT2I: { + + f->store_32(VARIANT_RECT2I); + Rect2i val = p_property; + f->store_32(val.position.x); + f->store_32(val.position.y); + f->store_32(val.size.x); + f->store_32(val.size.y); + + } break; case Variant::VECTOR3: { f->store_32(VARIANT_VECTOR3); @@ -1297,6 +1403,15 @@ void ResourceFormatSaverBinaryInstance::write_variant(FileAccess *f, const Varia f->store_real(val.z); } break; + case Variant::VECTOR3I: { + + f->store_32(VARIANT_VECTOR3I); + Vector3i val = p_property; + f->store_32(val.x); + f->store_32(val.y); + f->store_32(val.z); + + } break; case Variant::PLANE: { f->store_32(VARIANT_PLANE); @@ -1384,6 +1499,13 @@ void ResourceFormatSaverBinaryInstance::write_variant(FileAccess *f, const Varia f->store_real(val.a); } break; + case Variant::STRING_NAME: { + + f->store_32(VARIANT_STRING_NAME); + String val = p_property; + save_unicode_string(f, val); + + } break; case Variant::NODE_PATH: { f->store_32(VARIANT_NODE_PATH); @@ -1441,6 +1563,17 @@ void ResourceFormatSaverBinaryInstance::write_variant(FileAccess *f, const Varia } } break; + case Variant::CALLABLE: { + + f->store_32(VARIANT_CALLABLE); + WARN_PRINT("Can't save Callables."); + } break; + case Variant::SIGNAL: { + + f->store_32(VARIANT_SIGNAL); + WARN_PRINT("Can't save Signals."); + } break; + case Variant::DICTIONARY: { f->store_32(VARIANT_DICTIONARY); @@ -1473,59 +1606,82 @@ void ResourceFormatSaverBinaryInstance::write_variant(FileAccess *f, const Varia } } break; - case Variant::POOL_BYTE_ARRAY: { + case Variant::PACKED_BYTE_ARRAY: { f->store_32(VARIANT_RAW_ARRAY); - PoolVector<uint8_t> arr = p_property; + Vector<uint8_t> arr = p_property; int len = arr.size(); f->store_32(len); - PoolVector<uint8_t>::Read r = arr.read(); - f->store_buffer(r.ptr(), len); + const uint8_t *r = arr.ptr(); + f->store_buffer(r, len); _pad_buffer(f, len); } break; - case Variant::POOL_INT_ARRAY: { + case Variant::PACKED_INT32_ARRAY: { - f->store_32(VARIANT_INT_ARRAY); - PoolVector<int> arr = p_property; + f->store_32(VARIANT_INT32_ARRAY); + Vector<int32_t> arr = p_property; int len = arr.size(); f->store_32(len); - PoolVector<int>::Read r = arr.read(); + const int32_t *r = arr.ptr(); for (int i = 0; i < len; i++) f->store_32(r[i]); } break; - case Variant::POOL_REAL_ARRAY: { + case Variant::PACKED_INT64_ARRAY: { - f->store_32(VARIANT_REAL_ARRAY); - PoolVector<real_t> arr = p_property; + f->store_32(VARIANT_INT64_ARRAY); + Vector<int64_t> arr = p_property; int len = arr.size(); f->store_32(len); - PoolVector<real_t>::Read r = arr.read(); + const int64_t *r = arr.ptr(); + for (int i = 0; i < len; i++) + f->store_64(r[i]); + + } break; + case Variant::PACKED_FLOAT32_ARRAY: { + + f->store_32(VARIANT_FLOAT32_ARRAY); + Vector<float> arr = p_property; + int len = arr.size(); + f->store_32(len); + const float *r = arr.ptr(); for (int i = 0; i < len; i++) { f->store_real(r[i]); } } break; - case Variant::POOL_STRING_ARRAY: { + case Variant::PACKED_FLOAT64_ARRAY: { + + f->store_32(VARIANT_FLOAT64_ARRAY); + Vector<double> arr = p_property; + int len = arr.size(); + f->store_32(len); + const double *r = arr.ptr(); + for (int i = 0; i < len; i++) { + f->store_double(r[i]); + } + + } break; + case Variant::PACKED_STRING_ARRAY: { f->store_32(VARIANT_STRING_ARRAY); - PoolVector<String> arr = p_property; + Vector<String> arr = p_property; int len = arr.size(); f->store_32(len); - PoolVector<String>::Read r = arr.read(); + const String *r = arr.ptr(); for (int i = 0; i < len; i++) { save_unicode_string(f, r[i]); } } break; - case Variant::POOL_VECTOR3_ARRAY: { + case Variant::PACKED_VECTOR3_ARRAY: { f->store_32(VARIANT_VECTOR3_ARRAY); - PoolVector<Vector3> arr = p_property; + Vector<Vector3> arr = p_property; int len = arr.size(); f->store_32(len); - PoolVector<Vector3>::Read r = arr.read(); + const Vector3 *r = arr.ptr(); for (int i = 0; i < len; i++) { f->store_real(r[i].x); f->store_real(r[i].y); @@ -1533,26 +1689,26 @@ void ResourceFormatSaverBinaryInstance::write_variant(FileAccess *f, const Varia } } break; - case Variant::POOL_VECTOR2_ARRAY: { + case Variant::PACKED_VECTOR2_ARRAY: { f->store_32(VARIANT_VECTOR2_ARRAY); - PoolVector<Vector2> arr = p_property; + Vector<Vector2> arr = p_property; int len = arr.size(); f->store_32(len); - PoolVector<Vector2>::Read r = arr.read(); + const Vector2 *r = arr.ptr(); for (int i = 0; i < len; i++) { f->store_real(r[i].x); f->store_real(r[i].y); } } break; - case Variant::POOL_COLOR_ARRAY: { + case Variant::PACKED_COLOR_ARRAY: { f->store_32(VARIANT_COLOR_ARRAY); - PoolVector<Color> arr = p_property; + Vector<Color> arr = p_property; int len = arr.size(); f->store_32(len); - PoolVector<Color>::Read r = arr.read(); + const Color *r = arr.ptr(); for (int i = 0; i < len; i++) { f->store_real(r[i].r); f->store_real(r[i].g); @@ -1573,7 +1729,7 @@ void ResourceFormatSaverBinaryInstance::_find_resources(const Variant &p_variant switch (p_variant.get_type()) { case Variant::OBJECT: { - RES res = p_variant.operator RefPtr(); + RES res = p_variant; if (res.is_null() || external_resources.has(res)) return; diff --git a/core/io/resource_loader.cpp b/core/io/resource_loader.cpp index 0ee6478fa2..39bbebefa6 100644 --- a/core/io/resource_loader.cpp +++ b/core/io/resource_loader.cpp @@ -157,10 +157,10 @@ bool ResourceFormatLoader::exists(const String &p_path) const { void ResourceFormatLoader::get_recognized_extensions(List<String> *p_extensions) const { if (get_script_instance() && get_script_instance()->has_method("get_recognized_extensions")) { - PoolStringArray exts = get_script_instance()->call("get_recognized_extensions"); + PackedStringArray exts = get_script_instance()->call("get_recognized_extensions"); { - PoolStringArray::Read r = exts.read(); + const String *r = exts.ptr(); for (int i = 0; i < exts.size(); ++i) { p_extensions->push_back(r[i]); } @@ -212,10 +212,10 @@ RES ResourceFormatLoader::load(const String &p_path, const String &p_original_pa void ResourceFormatLoader::get_dependencies(const String &p_path, List<String> *p_dependencies, bool p_add_types) { if (get_script_instance() && get_script_instance()->has_method("get_dependencies")) { - PoolStringArray deps = get_script_instance()->call("get_dependencies", p_path, p_add_types); + PackedStringArray deps = get_script_instance()->call("get_dependencies", p_path, p_add_types); { - PoolStringArray::Read r = deps.read(); + const String *r = deps.ptr(); for (int i = 0; i < deps.size(); ++i) { p_dependencies->push_back(r[i]); } @@ -247,8 +247,8 @@ void ResourceFormatLoader::_bind_methods() { ClassDB::add_virtual_method(get_class_static(), info); } - ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::POOL_STRING_ARRAY, "get_recognized_extensions")); - ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::BOOL, "handles_type", PropertyInfo(Variant::STRING, "typename"))); + ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::PACKED_STRING_ARRAY, "get_recognized_extensions")); + ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::BOOL, "handles_type", PropertyInfo(Variant::STRING_NAME, "typename"))); ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::STRING, "get_resource_type", PropertyInfo(Variant::STRING, "path"))); ClassDB::add_virtual_method(get_class_static(), MethodInfo("get_dependencies", PropertyInfo(Variant::STRING, "path"), PropertyInfo(Variant::STRING, "add_types"))); ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::INT, "rename_dependencies", PropertyInfo(Variant::STRING, "path"), PropertyInfo(Variant::STRING, "renames"))); @@ -743,7 +743,7 @@ String ResourceLoader::_path_remap(const String &p_path, bool *r_translation_rem if (translation_remaps.has(p_path)) { // translation_remaps has the following format: - // { "res://path.png": PoolStringArray( "res://path-ru.png:ru", "res://path-de.png:de" ) } + // { "res://path.png": PackedStringArray( "res://path-ru.png:ru", "res://path-de.png:de" ) } // To find the path of the remapped resource, we extract the locale name after // the last ':' to match the project locale. @@ -905,10 +905,10 @@ void ResourceLoader::load_path_remaps() { if (!ProjectSettings::get_singleton()->has_setting("path_remap/remapped_paths")) return; - PoolVector<String> remaps = ProjectSettings::get_singleton()->get("path_remap/remapped_paths"); + Vector<String> remaps = ProjectSettings::get_singleton()->get("path_remap/remapped_paths"); int rc = remaps.size(); ERR_FAIL_COND(rc & 1); //must be even - PoolVector<String>::Read r = remaps.read(); + const String *r = remaps.ptr(); for (int i = 0; i < rc; i += 2) { @@ -955,7 +955,7 @@ bool ResourceLoader::add_custom_resource_format_loader(String script_path) { ERR_FAIL_COND_V_MSG(obj == NULL, false, "Cannot instance script as custom resource loader, expected 'ResourceFormatLoader' inheritance, got: " + String(ibt) + "."); ResourceFormatLoader *crl = Object::cast_to<ResourceFormatLoader>(obj); - crl->set_script(s.get_ref_ptr()); + crl->set_script(s); ResourceLoader::add_resource_format_loader(crl); return true; diff --git a/core/io/resource_saver.cpp b/core/io/resource_saver.cpp index b468685e4d..740aaf5cfa 100644 --- a/core/io/resource_saver.cpp +++ b/core/io/resource_saver.cpp @@ -61,10 +61,10 @@ bool ResourceFormatSaver::recognize(const RES &p_resource) const { void ResourceFormatSaver::get_recognized_extensions(const RES &p_resource, List<String> *p_extensions) const { if (get_script_instance() && get_script_instance()->has_method("get_recognized_extensions")) { - PoolStringArray exts = get_script_instance()->call("get_recognized_extensions", p_resource); + PackedStringArray exts = get_script_instance()->call("get_recognized_extensions", p_resource); { - PoolStringArray::Read r = exts.read(); + const String *r = exts.ptr(); for (int i = 0; i < exts.size(); ++i) { p_extensions->push_back(r[i]); } @@ -81,7 +81,7 @@ void ResourceFormatSaver::_bind_methods() { ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::INT, "save", arg0, arg1, arg2)); } - ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::POOL_STRING_ARRAY, "get_recognized_extensions", PropertyInfo(Variant::OBJECT, "resource", PROPERTY_HINT_RESOURCE_TYPE, "Resource"))); + ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::PACKED_STRING_ARRAY, "get_recognized_extensions", PropertyInfo(Variant::OBJECT, "resource", PROPERTY_HINT_RESOURCE_TYPE, "Resource"))); ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::BOOL, "recognize", PropertyInfo(Variant::OBJECT, "resource", PROPERTY_HINT_RESOURCE_TYPE, "Resource"))); } @@ -221,7 +221,7 @@ bool ResourceSaver::add_custom_resource_format_saver(String script_path) { ERR_FAIL_COND_V_MSG(obj == NULL, false, "Cannot instance script as custom resource saver, expected 'ResourceFormatSaver' inheritance, got: " + String(ibt) + "."); ResourceFormatSaver *crl = Object::cast_to<ResourceFormatSaver>(obj); - crl->set_script(s.get_ref_ptr()); + crl->set_script(s); ResourceSaver::add_resource_format_saver(crl); return true; diff --git a/core/io/stream_peer.cpp b/core/io/stream_peer.cpp index dee82de691..3c695c18fc 100644 --- a/core/io/stream_peer.cpp +++ b/core/io/stream_peer.cpp @@ -32,16 +32,16 @@ #include "core/io/marshalls.h" -Error StreamPeer::_put_data(const PoolVector<uint8_t> &p_data) { +Error StreamPeer::_put_data(const Vector<uint8_t> &p_data) { int len = p_data.size(); if (len == 0) return OK; - PoolVector<uint8_t>::Read r = p_data.read(); + const uint8_t *r = p_data.ptr(); return put_data(&r[0], len); } -Array StreamPeer::_put_partial_data(const PoolVector<uint8_t> &p_data) { +Array StreamPeer::_put_partial_data(const Vector<uint8_t> &p_data) { Array ret; @@ -52,7 +52,7 @@ Array StreamPeer::_put_partial_data(const PoolVector<uint8_t> &p_data) { return ret; } - PoolVector<uint8_t>::Read r = p_data.read(); + const uint8_t *r = p_data.ptr(); int sent; Error err = put_partial_data(&r[0], len, sent); @@ -68,18 +68,18 @@ Array StreamPeer::_get_data(int p_bytes) { Array ret; - PoolVector<uint8_t> data; + Vector<uint8_t> data; data.resize(p_bytes); if (data.size() != p_bytes) { ret.push_back(ERR_OUT_OF_MEMORY); - ret.push_back(PoolVector<uint8_t>()); + ret.push_back(Vector<uint8_t>()); return ret; } - PoolVector<uint8_t>::Write w = data.write(); + uint8_t *w = data.ptrw(); Error err = get_data(&w[0], p_bytes); - w.release(); + ret.push_back(err); ret.push_back(data); return ret; @@ -89,19 +89,18 @@ Array StreamPeer::_get_partial_data(int p_bytes) { Array ret; - PoolVector<uint8_t> data; + Vector<uint8_t> data; data.resize(p_bytes); if (data.size() != p_bytes) { ret.push_back(ERR_OUT_OF_MEMORY); - ret.push_back(PoolVector<uint8_t>()); + ret.push_back(Vector<uint8_t>()); return ret; } - PoolVector<uint8_t>::Write w = data.write(); + uint8_t *w = data.ptrw(); int received; Error err = get_partial_data(&w[0], p_bytes, received); - w.release(); if (err != OK) { data.resize(0); @@ -431,7 +430,7 @@ void StreamPeerBuffer::_bind_methods() { ClassDB::bind_method(D_METHOD("clear"), &StreamPeerBuffer::clear); ClassDB::bind_method(D_METHOD("duplicate"), &StreamPeerBuffer::duplicate); - ADD_PROPERTY(PropertyInfo(Variant::POOL_BYTE_ARRAY, "data_array"), "set_data_array", "get_data_array"); + ADD_PROPERTY(PropertyInfo(Variant::PACKED_BYTE_ARRAY, "data_array"), "set_data_array", "get_data_array"); } Error StreamPeerBuffer::put_data(const uint8_t *p_data, int p_bytes) { @@ -443,7 +442,7 @@ Error StreamPeerBuffer::put_data(const uint8_t *p_data, int p_bytes) { data.resize(pointer + p_bytes); } - PoolVector<uint8_t>::Write w = data.write(); + uint8_t *w = data.ptrw(); copymem(&w[pointer], p_data, p_bytes); pointer += p_bytes; @@ -478,8 +477,8 @@ Error StreamPeerBuffer::get_partial_data(uint8_t *p_buffer, int p_bytes, int &r_ r_received = p_bytes; } - PoolVector<uint8_t>::Read r = data.read(); - copymem(p_buffer, r.ptr() + pointer, r_received); + const uint8_t *r = data.ptr(); + copymem(p_buffer, r + pointer, r_received); pointer += r_received; // FIXME: return what? OK or ERR_* @@ -513,13 +512,13 @@ void StreamPeerBuffer::resize(int p_size) { data.resize(p_size); } -void StreamPeerBuffer::set_data_array(const PoolVector<uint8_t> &p_data) { +void StreamPeerBuffer::set_data_array(const Vector<uint8_t> &p_data) { data = p_data; pointer = 0; } -PoolVector<uint8_t> StreamPeerBuffer::get_data_array() const { +Vector<uint8_t> StreamPeerBuffer::get_data_array() const { return data; } diff --git a/core/io/stream_peer.h b/core/io/stream_peer.h index d6ce7ddc16..9358a2c07c 100644 --- a/core/io/stream_peer.h +++ b/core/io/stream_peer.h @@ -41,8 +41,8 @@ protected: static void _bind_methods(); //bind helpers - Error _put_data(const PoolVector<uint8_t> &p_data); - Array _put_partial_data(const PoolVector<uint8_t> &p_data); + Error _put_data(const Vector<uint8_t> &p_data); + Array _put_partial_data(const Vector<uint8_t> &p_data); Array _get_data(int p_bytes); Array _get_partial_data(int p_bytes); @@ -96,7 +96,7 @@ class StreamPeerBuffer : public StreamPeer { GDCLASS(StreamPeerBuffer, StreamPeer); - PoolVector<uint8_t> data; + Vector<uint8_t> data; int pointer; protected: @@ -116,8 +116,8 @@ public: int get_position() const; void resize(int p_size); - void set_data_array(const PoolVector<uint8_t> &p_data); - PoolVector<uint8_t> get_data_array() const; + void set_data_array(const Vector<uint8_t> &p_data); + Vector<uint8_t> get_data_array() const; void clear(); diff --git a/core/ref_ptr.cpp b/core/io/udp_server.cpp index 7e35bcc56c..16b7863cdd 100644 --- a/core/ref_ptr.cpp +++ b/core/io/udp_server.cpp @@ -1,5 +1,5 @@ /*************************************************************************/ -/* ref_ptr.cpp */ +/* udp_server.cpp */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ @@ -28,76 +28,92 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -#include "ref_ptr.h" +#include "udp_server.h" -#include "core/reference.h" -#include "core/resource.h" +void UDPServer::_bind_methods() { -void RefPtr::operator=(const RefPtr &p_other) { + ClassDB::bind_method(D_METHOD("listen", "port", "bind_address"), &UDPServer::listen, DEFVAL("*")); + ClassDB::bind_method(D_METHOD("is_connection_available"), &UDPServer::is_connection_available); + ClassDB::bind_method(D_METHOD("is_listening"), &UDPServer::is_listening); + ClassDB::bind_method(D_METHOD("take_connection"), &UDPServer::take_connection); + ClassDB::bind_method(D_METHOD("stop"), &UDPServer::stop); +} - Ref<Reference> *ref = reinterpret_cast<Ref<Reference> *>(&data[0]); - Ref<Reference> *ref_other = reinterpret_cast<Ref<Reference> *>(const_cast<char *>(&p_other.data[0])); +Error UDPServer::listen(uint16_t p_port, const IP_Address &p_bind_address) { - *ref = *ref_other; -} + ERR_FAIL_COND_V(!_sock.is_valid(), ERR_UNAVAILABLE); + ERR_FAIL_COND_V(_sock->is_open(), ERR_ALREADY_IN_USE); + ERR_FAIL_COND_V(!p_bind_address.is_valid() && !p_bind_address.is_wildcard(), ERR_INVALID_PARAMETER); -bool RefPtr::operator==(const RefPtr &p_other) const { + Error err; + IP::Type ip_type = IP::TYPE_ANY; - Ref<Reference> *ref = reinterpret_cast<Ref<Reference> *>(&data[0]); - Ref<Reference> *ref_other = reinterpret_cast<Ref<Reference> *>(const_cast<char *>(&p_other.data[0])); + if (p_bind_address.is_valid()) + ip_type = p_bind_address.is_ipv4() ? IP::TYPE_IPV4 : IP::TYPE_IPV6; - return *ref == *ref_other; -} + err = _sock->open(NetSocket::TYPE_UDP, ip_type); -bool RefPtr::operator!=(const RefPtr &p_other) const { + if (err != OK) + return ERR_CANT_CREATE; - Ref<Reference> *ref = reinterpret_cast<Ref<Reference> *>(&data[0]); - Ref<Reference> *ref_other = reinterpret_cast<Ref<Reference> *>(const_cast<char *>(&p_other.data[0])); + _sock->set_blocking_enabled(false); + _sock->set_reuse_address_enabled(true); + err = _sock->bind(p_bind_address, p_port); - return *ref != *ref_other; + if (err != OK) { + stop(); + return err; + } + bind_address = p_bind_address; + bind_port = p_port; + return OK; } -RefPtr::RefPtr(const RefPtr &p_other) { +bool UDPServer::is_listening() const { + ERR_FAIL_COND_V(!_sock.is_valid(), false); - memnew_placement(&data[0], Ref<Reference>); + return _sock->is_open(); +} - Ref<Reference> *ref = reinterpret_cast<Ref<Reference> *>(&data[0]); - Ref<Reference> *ref_other = reinterpret_cast<Ref<Reference> *>(const_cast<char *>(&p_other.data[0])); +bool UDPServer::is_connection_available() const { - *ref = *ref_other; -} + ERR_FAIL_COND_V(!_sock.is_valid(), false); -bool RefPtr::is_null() const { + if (!_sock->is_open()) + return false; - Ref<Reference> *ref = reinterpret_cast<Ref<Reference> *>(&data[0]); - return ref->is_null(); + Error err = _sock->poll(NetSocket::POLL_TYPE_IN, 0); + return (err == OK); } -RID RefPtr::get_rid() const { +Ref<PacketPeerUDP> UDPServer::take_connection() { + + Ref<PacketPeerUDP> conn; + if (!is_connection_available()) { + return conn; + } - Ref<Reference> *ref = reinterpret_cast<Ref<Reference> *>(&data[0]); - if (ref->is_null()) - return RID(); - Resource *res = Object::cast_to<Resource>(ref->ptr()); - if (res) - return res->get_rid(); - return RID(); + conn = Ref<PacketPeerUDP>(memnew(PacketPeerUDP)); + conn->connect_socket(_sock); + _sock = Ref<NetSocket>(NetSocket::create()); + listen(bind_port, bind_address); + return conn; } -void RefPtr::unref() { +void UDPServer::stop() { - Ref<Reference> *ref = reinterpret_cast<Ref<Reference> *>(&data[0]); - ref->unref(); + if (_sock.is_valid()) { + _sock->close(); + } + bind_port = 0; + bind_address = IP_Address(); } -RefPtr::RefPtr() { - - ERR_FAIL_COND(sizeof(Ref<Reference>) > DATASIZE); - memnew_placement(&data[0], Ref<Reference>); +UDPServer::UDPServer() : + _sock(Ref<NetSocket>(NetSocket::create())) { } -RefPtr::~RefPtr() { +UDPServer::~UDPServer() { - Ref<Reference> *ref = reinterpret_cast<Ref<Reference> *>(&data[0]); - ref->~Ref<Reference>(); + stop(); } diff --git a/platform/osx/power_osx.h b/core/io/udp_server.h index 6f9b213439..90bb82b62b 100644 --- a/platform/osx/power_osx.h +++ b/core/io/udp_server.h @@ -1,5 +1,5 @@ /*************************************************************************/ -/* power_osx.h */ +/* udp_server.h */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ @@ -28,32 +28,31 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -#ifndef POWER_OSX_H -#define POWER_OSX_H +#ifndef UDP_SERVER_H +#define UDP_SERVER_H -#include "core/os/file_access.h" -#include "core/os/os.h" -#include "dir_access_osx.h" +#include "core/io/net_socket.h" +#include "core/io/packet_peer_udp.h" -#include <CoreFoundation/CoreFoundation.h> +class UDPServer : public Reference { + GDCLASS(UDPServer, Reference); -class PowerOSX { - -private: - int nsecs_left; - int percent_left; - OS::PowerState power_state; - void checkps(CFDictionaryRef dict, bool *have_ac, bool *have_battery, bool *charging); - bool GetPowerInfo_MacOSX(/*PowerState * state, int *seconds, int *percent*/); - bool UpdatePowerInfo(); +protected: + static void _bind_methods(); + int bind_port; + IP_Address bind_address; + Ref<NetSocket> _sock; public: - PowerOSX(); - virtual ~PowerOSX(); + Error listen(uint16_t p_port, const IP_Address &p_bind_address = IP_Address("*")); + bool is_listening() const; + bool is_connection_available() const; + Ref<PacketPeerUDP> take_connection(); + + void stop(); - OS::PowerState get_power_state(); - int get_power_seconds_left(); - int get_power_percent_left(); + UDPServer(); + ~UDPServer(); }; -#endif // POWER_OSX_H +#endif // UDP_SERVER_H diff --git a/core/make_binders.py b/core/make_binders.py index 11cfbf6e79..c42b91fbe5 100644 --- a/core/make_binders.py +++ b/core/make_binders.py @@ -32,22 +32,22 @@ public: return T::get_class_static(); } - virtual Variant call(Object* p_object,const Variant** p_args,int p_arg_count, Variant::CallError& r_error) { + virtual Variant call(Object* p_object,const Variant** p_args,int p_arg_count, Callable::CallError& r_error) { T *instance=Object::cast_to<T>(p_object); - r_error.error=Variant::CallError::CALL_OK; + r_error.error=Callable::CallError::CALL_OK; #ifdef DEBUG_METHODS_ENABLED ERR_FAIL_COND_V(!instance,Variant()); if (p_arg_count>get_argument_count()) { - r_error.error=Variant::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS; + r_error.error=Callable::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS; r_error.argument=get_argument_count(); return Variant(); } if (p_arg_count<(get_argument_count()-get_default_argument_count())) { - r_error.error=Variant::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS; + r_error.error=Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS; r_error.argument=get_argument_count()-get_default_argument_count(); return Variant(); } @@ -126,23 +126,23 @@ public: return type_name; } - virtual Variant call(Object* p_object,const Variant** p_args,int p_arg_count, Variant::CallError& r_error) { + virtual Variant call(Object* p_object,const Variant** p_args,int p_arg_count, Callable::CallError& r_error) { __UnexistingClass *instance = (__UnexistingClass*)p_object; - r_error.error=Variant::CallError::CALL_OK; + r_error.error=Callable::CallError::CALL_OK; #ifdef DEBUG_METHODS_ENABLED ERR_FAIL_COND_V(!instance,Variant()); if (p_arg_count>get_argument_count()) { - r_error.error=Variant::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS; + r_error.error=Callable::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS; r_error.argument=get_argument_count(); return Variant(); } if (p_arg_count<(get_argument_count()-get_default_argument_count())) { - r_error.error=Variant::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS; + r_error.error=Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS; r_error.argument=get_argument_count()-get_default_argument_count(); return Variant(); } @@ -223,22 +223,22 @@ public: return T::get_class_static(); } - virtual Variant call(Object* p_object,const Variant** p_args,int p_arg_count, Variant::CallError& r_error) { + virtual Variant call(Object* p_object,const Variant** p_args,int p_arg_count, Callable::CallError& r_error) { T *instance=Object::cast_to<T>(p_object); - r_error.error=Variant::CallError::CALL_OK; + r_error.error=Callable::CallError::CALL_OK; #ifdef DEBUG_METHODS_ENABLED ERR_FAIL_COND_V(!instance,Variant()); if (p_arg_count>get_argument_count()) { - r_error.error=Variant::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS; + r_error.error=Callable::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS; r_error.argument=get_argument_count(); return Variant(); } if (p_arg_count<(get_argument_count()-get_default_argument_count())) { - r_error.error=Variant::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS; + r_error.error=Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS; r_error.argument=get_argument_count()-get_default_argument_count(); return Variant(); } diff --git a/core/math/a_star.cpp b/core/math/a_star.cpp index 73f190a330..847d4d8681 100644 --- a/core/math/a_star.cpp +++ b/core/math/a_star.cpp @@ -235,13 +235,13 @@ Array AStar::get_points() { return point_list; } -PoolVector<int> AStar::get_point_connections(int p_id) { +Vector<int> AStar::get_point_connections(int p_id) { Point *p; bool p_exists = points.lookup(p_id, p); - ERR_FAIL_COND_V(!p_exists, PoolVector<int>()); + ERR_FAIL_COND_V(!p_exists, Vector<int>()); - PoolVector<int> point_list; + Vector<int> point_list; for (OAHashMap<int, Point *>::Iterator it = p->neighbours.iter(); it.valid; it = p->neighbours.next_iter(it)) { point_list.push_back((*it.key)); @@ -431,18 +431,18 @@ float AStar::_compute_cost(int p_from_id, int p_to_id) { return from_point->pos.distance_to(to_point->pos); } -PoolVector<Vector3> AStar::get_point_path(int p_from_id, int p_to_id) { +Vector<Vector3> AStar::get_point_path(int p_from_id, int p_to_id) { Point *a; bool from_exists = points.lookup(p_from_id, a); - ERR_FAIL_COND_V(!from_exists, PoolVector<Vector3>()); + ERR_FAIL_COND_V(!from_exists, Vector<Vector3>()); Point *b; bool to_exists = points.lookup(p_to_id, b); - ERR_FAIL_COND_V(!to_exists, PoolVector<Vector3>()); + ERR_FAIL_COND_V(!to_exists, Vector<Vector3>()); if (a == b) { - PoolVector<Vector3> ret; + Vector<Vector3> ret; ret.push_back(a->pos); return ret; } @@ -451,7 +451,7 @@ PoolVector<Vector3> AStar::get_point_path(int p_from_id, int p_to_id) { Point *end_point = b; bool found_route = _solve(begin_point, end_point); - if (!found_route) return PoolVector<Vector3>(); + if (!found_route) return Vector<Vector3>(); Point *p = end_point; int pc = 1; // Begin point @@ -460,11 +460,11 @@ PoolVector<Vector3> AStar::get_point_path(int p_from_id, int p_to_id) { p = p->prev_point; } - PoolVector<Vector3> path; + Vector<Vector3> path; path.resize(pc); { - PoolVector<Vector3>::Write w = path.write(); + Vector3 *w = path.ptrw(); Point *p2 = end_point; int idx = pc - 1; @@ -479,18 +479,18 @@ PoolVector<Vector3> AStar::get_point_path(int p_from_id, int p_to_id) { return path; } -PoolVector<int> AStar::get_id_path(int p_from_id, int p_to_id) { +Vector<int> AStar::get_id_path(int p_from_id, int p_to_id) { Point *a; bool from_exists = points.lookup(p_from_id, a); - ERR_FAIL_COND_V(!from_exists, PoolVector<int>()); + ERR_FAIL_COND_V(!from_exists, Vector<int>()); Point *b; bool to_exists = points.lookup(p_to_id, b); - ERR_FAIL_COND_V(!to_exists, PoolVector<int>()); + ERR_FAIL_COND_V(!to_exists, Vector<int>()); if (a == b) { - PoolVector<int> ret; + Vector<int> ret; ret.push_back(a->id); return ret; } @@ -499,7 +499,7 @@ PoolVector<int> AStar::get_id_path(int p_from_id, int p_to_id) { Point *end_point = b; bool found_route = _solve(begin_point, end_point); - if (!found_route) return PoolVector<int>(); + if (!found_route) return Vector<int>(); Point *p = end_point; int pc = 1; // Begin point @@ -508,11 +508,11 @@ PoolVector<int> AStar::get_id_path(int p_from_id, int p_to_id) { p = p->prev_point; } - PoolVector<int> path; + Vector<int> path; path.resize(pc); { - PoolVector<int>::Write w = path.write(); + int *w = path.ptrw(); p = end_point; int idx = pc - 1; @@ -576,8 +576,8 @@ void AStar::_bind_methods() { ClassDB::bind_method(D_METHOD("get_point_path", "from_id", "to_id"), &AStar::get_point_path); ClassDB::bind_method(D_METHOD("get_id_path", "from_id", "to_id"), &AStar::get_id_path); - BIND_VMETHOD(MethodInfo(Variant::REAL, "_estimate_cost", PropertyInfo(Variant::INT, "from_id"), PropertyInfo(Variant::INT, "to_id"))); - BIND_VMETHOD(MethodInfo(Variant::REAL, "_compute_cost", PropertyInfo(Variant::INT, "from_id"), PropertyInfo(Variant::INT, "to_id"))); + BIND_VMETHOD(MethodInfo(Variant::FLOAT, "_estimate_cost", PropertyInfo(Variant::INT, "from_id"), PropertyInfo(Variant::INT, "to_id"))); + BIND_VMETHOD(MethodInfo(Variant::FLOAT, "_compute_cost", PropertyInfo(Variant::INT, "from_id"), PropertyInfo(Variant::INT, "to_id"))); } AStar::AStar() { @@ -624,7 +624,7 @@ bool AStar2D::has_point(int p_id) const { return astar.has_point(p_id); } -PoolVector<int> AStar2D::get_point_connections(int p_id) { +Vector<int> AStar2D::get_point_connections(int p_id) { return astar.get_point_connections(p_id); } @@ -677,15 +677,15 @@ Vector2 AStar2D::get_closest_position_in_segment(const Vector2 &p_point) const { return Vector2(p.x, p.y); } -PoolVector<Vector2> AStar2D::get_point_path(int p_from_id, int p_to_id) { +Vector<Vector2> AStar2D::get_point_path(int p_from_id, int p_to_id) { - PoolVector3Array pv = astar.get_point_path(p_from_id, p_to_id); + PackedVector3Array pv = astar.get_point_path(p_from_id, p_to_id); int size = pv.size(); - PoolVector2Array path; + PackedVector2Array path; path.resize(size); { - PoolVector<Vector3>::Read r = pv.read(); - PoolVector<Vector2>::Write w = path.write(); + const Vector3 *r = pv.ptr(); + Vector2 *w = path.ptrw(); for (int i = 0; i < size; i++) { Vector3 p = r[i]; w[i] = Vector2(p.x, p.y); @@ -694,7 +694,7 @@ PoolVector<Vector2> AStar2D::get_point_path(int p_from_id, int p_to_id) { return path; } -PoolVector<int> AStar2D::get_id_path(int p_from_id, int p_to_id) { +Vector<int> AStar2D::get_id_path(int p_from_id, int p_to_id) { return astar.get_id_path(p_from_id, p_to_id); } diff --git a/core/math/a_star.h b/core/math/a_star.h index 0b10976932..bfcf0c09d3 100644 --- a/core/math/a_star.h +++ b/core/math/a_star.h @@ -137,7 +137,7 @@ public: void set_point_weight_scale(int p_id, real_t p_weight_scale); void remove_point(int p_id); bool has_point(int p_id) const; - PoolVector<int> get_point_connections(int p_id); + Vector<int> get_point_connections(int p_id); Array get_points(); void set_point_disabled(int p_id, bool p_disabled = true); @@ -155,8 +155,8 @@ public: int get_closest_point(const Vector3 &p_point, bool p_include_disabled = false) const; Vector3 get_closest_position_in_segment(const Vector3 &p_point) const; - PoolVector<Vector3> get_point_path(int p_from_id, int p_to_id); - PoolVector<int> get_id_path(int p_from_id, int p_to_id); + Vector<Vector3> get_point_path(int p_from_id, int p_to_id); + Vector<int> get_id_path(int p_from_id, int p_to_id); AStar(); ~AStar(); @@ -179,7 +179,7 @@ public: void set_point_weight_scale(int p_id, real_t p_weight_scale); void remove_point(int p_id); bool has_point(int p_id) const; - PoolVector<int> get_point_connections(int p_id); + Vector<int> get_point_connections(int p_id); Array get_points(); void set_point_disabled(int p_id, bool p_disabled = true); @@ -197,8 +197,8 @@ public: int get_closest_point(const Vector2 &p_point, bool p_include_disabled = false) const; Vector2 get_closest_position_in_segment(const Vector2 &p_point) const; - PoolVector<Vector2> get_point_path(int p_from_id, int p_to_id); - PoolVector<int> get_id_path(int p_from_id, int p_to_id); + Vector<Vector2> get_point_path(int p_from_id, int p_to_id); + Vector<int> get_id_path(int p_from_id, int p_to_id); AStar2D(); ~AStar2D(); diff --git a/core/math/bsp_tree.cpp b/core/math/bsp_tree.cpp deleted file mode 100644 index 7ad907db97..0000000000 --- a/core/math/bsp_tree.cpp +++ /dev/null @@ -1,581 +0,0 @@ -/*************************************************************************/ -/* bsp_tree.cpp */ -/*************************************************************************/ -/* This file is part of: */ -/* GODOT ENGINE */ -/* https://godotengine.org */ -/*************************************************************************/ -/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */ -/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */ -/* */ -/* Permission is hereby granted, free of charge, to any person obtaining */ -/* a copy of this software and associated documentation files (the */ -/* "Software"), to deal in the Software without restriction, including */ -/* without limitation the rights to use, copy, modify, merge, publish, */ -/* distribute, sublicense, and/or sell copies of the Software, and to */ -/* permit persons to whom the Software is furnished to do so, subject to */ -/* the following conditions: */ -/* */ -/* The above copyright notice and this permission notice shall be */ -/* included in all copies or substantial portions of the Software. */ -/* */ -/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ -/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ -/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ -/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ -/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 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 "bsp_tree.h" - -#include "core/error_macros.h" -#include "core/print_string.h" - -void BSP_Tree::from_aabb(const AABB &p_aabb) { - - planes.clear(); - - for (int i = 0; i < 3; i++) { - - Vector3 n; - n[i] = 1; - planes.push_back(Plane(n, p_aabb.position[i] + p_aabb.size[i])); - planes.push_back(Plane(-n, -p_aabb.position[i])); - } - - nodes.clear(); - - for (int i = 0; i < 6; i++) { - - Node n; - n.plane = i; - n.under = (i == 0) ? UNDER_LEAF : i - 1; - n.over = OVER_LEAF; - nodes.push_back(n); - } - - aabb = p_aabb; - error_radius = 0; -} - -Vector<BSP_Tree::Node> BSP_Tree::get_nodes() const { - - return nodes; -} -Vector<Plane> BSP_Tree::get_planes() const { - - return planes; -} - -AABB BSP_Tree::get_aabb() const { - - return aabb; -} - -int BSP_Tree::_get_points_inside(int p_node, const Vector3 *p_points, int *p_indices, const Vector3 &p_center, const Vector3 &p_half_extents, int p_indices_count) const { - - const Node *node = &nodes[p_node]; - const Plane &p = planes[node->plane]; - - Vector3 min( - (p.normal.x > 0) ? -p_half_extents.x : p_half_extents.x, - (p.normal.y > 0) ? -p_half_extents.y : p_half_extents.y, - (p.normal.z > 0) ? -p_half_extents.z : p_half_extents.z); - Vector3 max = -min; - max += p_center; - min += p_center; - - real_t dist_min = p.distance_to(min); - real_t dist_max = p.distance_to(max); - - if ((dist_min * dist_max) < CMP_EPSILON) { //intersection, test point by point - - int under_count = 0; - - //sort points, so the are under first, over last - for (int i = 0; i < p_indices_count; i++) { - - int index = p_indices[i]; - - if (p.is_point_over(p_points[index])) { - - // kind of slow (but cache friendly), should try something else, - // but this is a corner case most of the time - - for (int j = index; j < p_indices_count - 1; j++) - p_indices[j] = p_indices[j + 1]; - - p_indices[p_indices_count - 1] = index; - - } else { - under_count++; - } - } - - int total = 0; - - if (under_count > 0) { - if (node->under == UNDER_LEAF) { - total += under_count; - } else { - total += _get_points_inside(node->under, p_points, p_indices, p_center, p_half_extents, under_count); - } - } - - if (under_count != p_indices_count) { - if (node->over == OVER_LEAF) { - //total+=0 //if they are over an OVER_LEAF, they are outside the model - } else { - total += _get_points_inside(node->over, p_points, &p_indices[under_count], p_center, p_half_extents, p_indices_count - under_count); - } - } - - return total; - - } else if (dist_min > 0) { //all points over plane - - if (node->over == OVER_LEAF) { - - return 0; // all these points are not visible - } - - return _get_points_inside(node->over, p_points, p_indices, p_center, p_half_extents, p_indices_count); - } else { //all points behind plane - - if (node->under == UNDER_LEAF) { - - return p_indices_count; // all these points are visible - } - return _get_points_inside(node->under, p_points, p_indices, p_center, p_half_extents, p_indices_count); - } -} - -int BSP_Tree::get_points_inside(const Vector3 *p_points, int p_point_count) const { - - if (nodes.size() == 0) - return 0; - -#if 1 - //this version is easier to debug, and and MUCH faster in real world cases - - int pass_count = 0; - const Node *nodesptr = &nodes[0]; - const Plane *planesptr = &planes[0]; - int node_count = nodes.size(); - - if (node_count == 0) // no nodes! - return 0; - - for (int i = 0; i < p_point_count; i++) { - - const Vector3 &point = p_points[i]; - if (!aabb.has_point(point)) { - continue; - } - - int idx = node_count - 1; - - bool pass = false; - - while (true) { - - if (idx == OVER_LEAF) { - pass = false; - break; - } else if (idx == UNDER_LEAF) { - pass = true; - break; - } - -#ifdef DEBUG_ENABLED - int plane_count = planes.size(); - uint16_t plane = nodesptr[idx].plane; - ERR_FAIL_UNSIGNED_INDEX_V(plane, plane_count, 0); -#endif - - idx = planesptr[nodesptr[idx].plane].is_point_over(point) ? nodes[idx].over : nodes[idx].under; - -#ifdef DEBUG_ENABLED - - ERR_FAIL_COND_V(idx < MAX_NODES && idx >= node_count, 0); -#endif - } - - if (pass) - pass_count++; - } - - return pass_count; - -#else - //this version scales better but it's slower for real world cases - - int *indices = (int *)alloca(p_point_count * sizeof(int)); - AABB bounds; - - for (int i = 0; i < p_point_count; i++) { - - indices[i] = i; - if (i == 0) - bounds.pos = p_points[i]; - else - bounds.expand_to(p_points[i]); - } - - Vector3 half_extents = bounds.size / 2.0; - return _get_points_inside(nodes.size() + 1, p_points, indices, bounds.pos + half_extents, half_extents, p_point_count); -#endif -} - -bool BSP_Tree::point_is_inside(const Vector3 &p_point) const { - - if (!aabb.has_point(p_point)) { - return false; - } - - int node_count = nodes.size(); - - if (node_count == 0) // no nodes! - return false; - - const Node *nodesptr = &nodes[0]; - const Plane *planesptr = &planes[0]; - - int idx = node_count - 1; - - while (true) { - - if (idx == OVER_LEAF) { - return false; - } - if (idx == UNDER_LEAF) { - - return true; - } - -#ifdef DEBUG_ENABLED - int plane_count = planes.size(); - uint16_t plane = nodesptr[idx].plane; - ERR_FAIL_UNSIGNED_INDEX_V(plane, plane_count, false); -#endif - - bool over = planesptr[nodesptr[idx].plane].is_point_over(p_point); - - idx = over ? nodes[idx].over : nodes[idx].under; - -#ifdef DEBUG_ENABLED - ERR_FAIL_COND_V(idx < MAX_NODES && idx >= node_count, false); -#endif - } -} - -static int _bsp_find_best_half_plane(const Face3 *p_faces, const Vector<int> &p_indices, real_t p_tolerance) { - - int ic = p_indices.size(); - const int *indices = p_indices.ptr(); - - int best_plane = -1; - real_t best_plane_cost = 1e20; - - // Loop to find the polygon that best divides the set. - - for (int i = 0; i < ic; i++) { - - const Face3 &f = p_faces[indices[i]]; - Plane p = f.get_plane(); - - int num_over = 0, num_under = 0, num_spanning = 0; - - for (int j = 0; j < ic; j++) { - - if (i == j) - continue; - - const Face3 &g = p_faces[indices[j]]; - int over = 0, under = 0; - - for (int k = 0; k < 3; k++) { - - real_t d = p.distance_to(g.vertex[j]); - - if (Math::abs(d) > p_tolerance) { - - if (d > 0) - over++; - else - under++; - } - } - - if (over && under) - num_spanning++; - else if (over) - num_over++; - else - num_under++; - } - - //real_t split_cost = num_spanning / (real_t) face_count; - real_t relation = Math::abs(num_over - num_under) / (real_t)ic; - - // being honest, i never found a way to add split cost to the mix in a meaninguful way - // in this engine, also, will likely be ignored anyway - - real_t plane_cost = /*split_cost +*/ relation; - - //printf("plane %i, %i over, %i under, %i spanning, cost is %g\n",i,num_over,num_under,num_spanning,plane_cost); - if (plane_cost < best_plane_cost) { - - best_plane = i; - best_plane_cost = plane_cost; - } - } - - return best_plane; -} - -static int _bsp_create_node(const Face3 *p_faces, const Vector<int> &p_indices, Vector<Plane> &p_planes, Vector<BSP_Tree::Node> &p_nodes, real_t p_tolerance) { - - ERR_FAIL_COND_V(p_nodes.size() == BSP_Tree::MAX_NODES, -1); - - // should not reach here - ERR_FAIL_COND_V(p_indices.size() == 0, -1); - - int ic = p_indices.size(); - const int *indices = p_indices.ptr(); - - int divisor_idx = _bsp_find_best_half_plane(p_faces, p_indices, p_tolerance); - - // returned error - ERR_FAIL_COND_V(divisor_idx < 0, -1); - - Vector<int> faces_over; - Vector<int> faces_under; - - Plane divisor_plane = p_faces[indices[divisor_idx]].get_plane(); - - for (int i = 0; i < ic; i++) { - - if (i == divisor_idx) - continue; - - const Face3 &f = p_faces[indices[i]]; - - /* - if (f.get_plane().is_equal_approx(divisor_plane)) - continue; - */ - - int over_count = 0; - int under_count = 0; - - for (int j = 0; j < 3; j++) { - - real_t d = divisor_plane.distance_to(f.vertex[j]); - if (Math::abs(d) > p_tolerance) { - - if (d > 0) - over_count++; - else - under_count++; - } - } - - if (over_count) - faces_over.push_back(indices[i]); - if (under_count) - faces_under.push_back(indices[i]); - } - - uint16_t over_idx = BSP_Tree::OVER_LEAF, under_idx = BSP_Tree::UNDER_LEAF; - - if (faces_over.size() > 0) { //have facess above? - - int idx = _bsp_create_node(p_faces, faces_over, p_planes, p_nodes, p_tolerance); - if (idx >= 0) - over_idx = idx; - } - - if (faces_under.size() > 0) { //have facess above? - - int idx = _bsp_create_node(p_faces, faces_under, p_planes, p_nodes, p_tolerance); - if (idx >= 0) - under_idx = idx; - } - - /* Create the node */ - - // find existing divisor plane - int divisor_plane_idx = -1; - - for (int i = 0; i < p_planes.size(); i++) { - - if (p_planes[i].is_equal_approx(divisor_plane)) { - divisor_plane_idx = i; - break; - } - } - - if (divisor_plane_idx == -1) { - - ERR_FAIL_COND_V(p_planes.size() == BSP_Tree::MAX_PLANES, -1); - divisor_plane_idx = p_planes.size(); - p_planes.push_back(divisor_plane); - } - - BSP_Tree::Node node; - node.plane = divisor_plane_idx; - node.under = under_idx; - node.over = over_idx; - - p_nodes.push_back(node); - - return p_nodes.size() - 1; -} - -BSP_Tree::operator Variant() const { - - Dictionary d; - d["error_radius"] = error_radius; - - Vector<real_t> plane_values; - plane_values.resize(planes.size() * 4); - - for (int i = 0; i < planes.size(); i++) { - - plane_values.write[i * 4 + 0] = planes[i].normal.x; - plane_values.write[i * 4 + 1] = planes[i].normal.y; - plane_values.write[i * 4 + 2] = planes[i].normal.z; - plane_values.write[i * 4 + 3] = planes[i].d; - } - - d["planes"] = plane_values; - - PoolVector<int> dst_nodes; - dst_nodes.resize(nodes.size() * 3); - - for (int i = 0; i < nodes.size(); i++) { - - dst_nodes.set(i * 3 + 0, nodes[i].over); - dst_nodes.set(i * 3 + 1, nodes[i].under); - dst_nodes.set(i * 3 + 2, nodes[i].plane); - } - - d["nodes"] = dst_nodes; - d["aabb"] = aabb; - - return Variant(d); -} - -BSP_Tree::BSP_Tree() { -} - -BSP_Tree::BSP_Tree(const Variant &p_variant) { - - Dictionary d = p_variant; - ERR_FAIL_COND(!d.has("nodes")); - ERR_FAIL_COND(!d.has("planes")); - ERR_FAIL_COND(!d.has("aabb")); - ERR_FAIL_COND(!d.has("error_radius")); - - PoolVector<int> src_nodes = d["nodes"]; - ERR_FAIL_COND(src_nodes.size() % 3); - - if (d["planes"].get_type() == Variant::POOL_REAL_ARRAY) { - - PoolVector<real_t> src_planes = d["planes"]; - int plane_count = src_planes.size(); - ERR_FAIL_COND(plane_count % 4); - planes.resize(plane_count / 4); - - if (plane_count) { - PoolVector<real_t>::Read r = src_planes.read(); - for (int i = 0; i < plane_count / 4; i++) { - - planes.write[i].normal.x = r[i * 4 + 0]; - planes.write[i].normal.y = r[i * 4 + 1]; - planes.write[i].normal.z = r[i * 4 + 2]; - planes.write[i].d = r[i * 4 + 3]; - } - } - - } else { - - planes = d["planes"]; - } - - error_radius = d["error"]; - aabb = d["aabb"]; - - //int node_count = src_nodes.size(); - nodes.resize(src_nodes.size() / 3); - - PoolVector<int>::Read r = src_nodes.read(); - - for (int i = 0; i < nodes.size(); i++) { - - nodes.write[i].over = r[i * 3 + 0]; - nodes.write[i].under = r[i * 3 + 1]; - nodes.write[i].plane = r[i * 3 + 2]; - } -} - -BSP_Tree::BSP_Tree(const PoolVector<Face3> &p_faces, real_t p_error_radius) { - - // compute aabb - - int face_count = p_faces.size(); - PoolVector<Face3>::Read faces_r = p_faces.read(); - const Face3 *facesptr = faces_r.ptr(); - - bool first = true; - - Vector<int> indices; - - for (int i = 0; i < face_count; i++) { - - const Face3 &f = facesptr[i]; - - if (f.is_degenerate()) - continue; - - for (int j = 0; j < 3; j++) { - - if (first) { - - aabb.position = f.vertex[0]; - first = false; - } else { - - aabb.expand_to(f.vertex[j]); - } - } - - indices.push_back(i); - } - - ERR_FAIL_COND(aabb.has_no_area()); - - int top = _bsp_create_node(faces_r.ptr(), indices, planes, nodes, aabb.get_longest_axis_size() * 0.0001); - - if (top < 0) { - - nodes.clear(); - planes.clear(); - ERR_FAIL_COND(top < 0); - } - - error_radius = p_error_radius; -} - -BSP_Tree::BSP_Tree(const Vector<Node> &p_nodes, const Vector<Plane> &p_planes, const AABB &p_aabb, real_t p_error_radius) : - nodes(p_nodes), - planes(p_planes), - aabb(p_aabb), - error_radius(p_error_radius) { -} - -BSP_Tree::~BSP_Tree() { -} diff --git a/core/math/bsp_tree.h b/core/math/bsp_tree.h deleted file mode 100644 index 1c8ea380ff..0000000000 --- a/core/math/bsp_tree.h +++ /dev/null @@ -1,159 +0,0 @@ -/*************************************************************************/ -/* bsp_tree.h */ -/*************************************************************************/ -/* This file is part of: */ -/* GODOT ENGINE */ -/* https://godotengine.org */ -/*************************************************************************/ -/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */ -/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */ -/* */ -/* Permission is hereby granted, free of charge, to any person obtaining */ -/* a copy of this software and associated documentation files (the */ -/* "Software"), to deal in the Software without restriction, including */ -/* without limitation the rights to use, copy, modify, merge, publish, */ -/* distribute, sublicense, and/or sell copies of the Software, and to */ -/* permit persons to whom the Software is furnished to do so, subject to */ -/* the following conditions: */ -/* */ -/* The above copyright notice and this permission notice shall be */ -/* included in all copies or substantial portions of the Software. */ -/* */ -/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ -/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ -/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ -/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ -/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 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 BSP_TREE_H -#define BSP_TREE_H - -#include "core/math/aabb.h" -#include "core/math/face3.h" -#include "core/math/plane.h" -#include "core/method_ptrcall.h" -#include "core/pool_vector.h" -#include "core/variant.h" -#include "core/vector.h" - -class BSP_Tree { -public: - enum { - - UNDER_LEAF = 0xFFFF, - OVER_LEAF = 0xFFFE, - MAX_NODES = 0xFFFE, - MAX_PLANES = (1 << 16) - }; - - struct Node { - - uint16_t plane; - uint16_t under; - uint16_t over; - }; - -private: - // thanks to the properties of Vector, - // this class can be assigned and passed around between threads - // with no cost. - - Vector<Node> nodes; - Vector<Plane> planes; - AABB aabb; - real_t error_radius; - - int _get_points_inside(int p_node, const Vector3 *p_points, int *p_indices, const Vector3 &p_center, const Vector3 &p_half_extents, int p_indices_count) const; - - template <class T> - bool _test_convex(const Node *p_nodes, const Plane *p_planes, int p_current, const T &p_convex) const; - -public: - bool is_empty() const { return nodes.size() == 0; } - Vector<Node> get_nodes() const; - Vector<Plane> get_planes() const; - AABB get_aabb() const; - - bool point_is_inside(const Vector3 &p_point) const; - int get_points_inside(const Vector3 *p_points, int p_point_count) const; - template <class T> - bool convex_is_inside(const T &p_convex) const; - - operator Variant() const; - - void from_aabb(const AABB &p_aabb); - - BSP_Tree(); - BSP_Tree(const Variant &p_variant); - BSP_Tree(const PoolVector<Face3> &p_faces, real_t p_error_radius = 0); - BSP_Tree(const Vector<Node> &p_nodes, const Vector<Plane> &p_planes, const AABB &p_aabb, real_t p_error_radius = 0); - ~BSP_Tree(); -}; - -template <class T> -bool BSP_Tree::_test_convex(const Node *p_nodes, const Plane *p_planes, int p_current, const T &p_convex) const { - - if (p_current == UNDER_LEAF) - return true; - else if (p_current == OVER_LEAF) - return false; - - bool collided = false; - const Node &n = p_nodes[p_current]; - - const Plane &p = p_planes[n.plane]; - - real_t min, max; - p_convex.project_range(p.normal, min, max); - - bool go_under = min < p.d; - bool go_over = max >= p.d; - - if (go_under && _test_convex(p_nodes, p_planes, n.under, p_convex)) - collided = true; - if (go_over && _test_convex(p_nodes, p_planes, n.over, p_convex)) - collided = true; - - return collided; -} - -template <class T> -bool BSP_Tree::convex_is_inside(const T &p_convex) const { - - int node_count = nodes.size(); - if (node_count == 0) - return false; - const Node *nodes = &this->nodes[0]; - const Plane *planes = &this->planes[0]; - - return _test_convex(nodes, planes, node_count - 1, p_convex); -} - -#ifdef PTRCALL_ENABLED - -template <> -struct PtrToArg<BSP_Tree> { - _FORCE_INLINE_ static BSP_Tree convert(const void *p_ptr) { - BSP_Tree s(Variant(*reinterpret_cast<const Dictionary *>(p_ptr))); - return s; - } - _FORCE_INLINE_ static void encode(BSP_Tree p_val, void *p_ptr) { - Dictionary *d = reinterpret_cast<Dictionary *>(p_ptr); - *d = Variant(p_val); - } -}; - -template <> -struct PtrToArg<const BSP_Tree &> { - _FORCE_INLINE_ static BSP_Tree convert(const void *p_ptr) { - BSP_Tree s(Variant(*reinterpret_cast<const Dictionary *>(p_ptr))); - return s; - } -}; - -#endif - -#endif diff --git a/core/math/expression.cpp b/core/math/expression.cpp index 2fda7a27d5..058673b681 100644 --- a/core/math/expression.cpp +++ b/core/math/expression.cpp @@ -208,16 +208,16 @@ int Expression::get_func_argument_count(BuiltinFunc p_func) { return 0; } -#define VALIDATE_ARG_NUM(m_arg) \ - if (!p_inputs[m_arg]->is_num()) { \ - r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; \ - r_error.argument = m_arg; \ - r_error.expected = Variant::REAL; \ - return; \ +#define VALIDATE_ARG_NUM(m_arg) \ + if (!p_inputs[m_arg]->is_num()) { \ + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; \ + r_error.argument = m_arg; \ + r_error.expected = Variant::FLOAT; \ + return; \ } -void Expression::exec_func(BuiltinFunc p_func, const Variant **p_inputs, Variant *r_return, Variant::CallError &r_error, String &r_error_str) { - r_error.error = Variant::CallError::CALL_OK; +void Expression::exec_func(BuiltinFunc p_func, const Variant **p_inputs, Variant *r_return, Callable::CallError &r_error, String &r_error_str) { + r_error.error = Callable::CallError::CALL_OK; switch (p_func) { case MATH_SIN: { @@ -314,15 +314,15 @@ void Expression::exec_func(BuiltinFunc p_func, const Variant **p_inputs, Variant int64_t i = *p_inputs[0]; *r_return = ABS(i); - } else if (p_inputs[0]->get_type() == Variant::REAL) { + } else if (p_inputs[0]->get_type() == Variant::FLOAT) { real_t r = *p_inputs[0]; *r_return = Math::abs(r); } else { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.argument = 0; - r_error.expected = Variant::REAL; + r_error.expected = Variant::FLOAT; } } break; case MATH_SIGN: { @@ -331,15 +331,15 @@ void Expression::exec_func(BuiltinFunc p_func, const Variant **p_inputs, Variant int64_t i = *p_inputs[0]; *r_return = i < 0 ? -1 : (i > 0 ? +1 : 0); - } else if (p_inputs[0]->get_type() == Variant::REAL) { + } else if (p_inputs[0]->get_type() == Variant::FLOAT) { real_t r = *p_inputs[0]; *r_return = r < 0.0 ? -1.0 : (r > 0.0 ? +1.0 : 0.0); } else { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.argument = 0; - r_error.expected = Variant::REAL; + r_error.expected = Variant::FLOAT; } } break; case MATH_POW: { @@ -580,7 +580,7 @@ void Expression::exec_func(BuiltinFunc p_func, const Variant **p_inputs, Variant if (p_inputs[0]->get_type() != Variant::OBJECT) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.argument = 0; r_error.expected = Variant::OBJECT; @@ -614,7 +614,7 @@ void Expression::exec_func(BuiltinFunc p_func, const Variant **p_inputs, Variant if (p_inputs[0]->get_type() != Variant::OBJECT) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.argument = 0; r_error.expected = Variant::OBJECT; @@ -622,7 +622,7 @@ void Expression::exec_func(BuiltinFunc p_func, const Variant **p_inputs, Variant } if (p_inputs[1]->get_type() != Variant::STRING && p_inputs[1]->get_type() != Variant::NODE_PATH) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.argument = 1; r_error.expected = Variant::STRING; @@ -644,7 +644,7 @@ void Expression::exec_func(BuiltinFunc p_func, const Variant **p_inputs, Variant if (type < 0 || type >= Variant::VARIANT_MAX) { r_error_str = RTR("Invalid type argument to convert(), use TYPE_* constants."); - r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.argument = 0; r_error.expected = Variant::INT; return; @@ -675,7 +675,7 @@ void Expression::exec_func(BuiltinFunc p_func, const Variant **p_inputs, Variant if (p_inputs[0]->get_type() != Variant::STRING) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.argument = 0; r_error.expected = Variant::STRING; @@ -687,7 +687,7 @@ void Expression::exec_func(BuiltinFunc p_func, const Variant **p_inputs, Variant if (str.length() != 1) { r_error_str = RTR("Expected a string of length 1 (a character)."); - r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.argument = 0; r_error.expected = Variant::STRING; @@ -732,7 +732,7 @@ void Expression::exec_func(BuiltinFunc p_func, const Variant **p_inputs, Variant case STR_TO_VAR: { if (p_inputs[0]->get_type() != Variant::STRING) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.argument = 0; r_error.expected = Variant::STRING; @@ -747,7 +747,7 @@ void Expression::exec_func(BuiltinFunc p_func, const Variant **p_inputs, Variant Error err = VariantParser::parse(&ss, *r_return, errs, line); if (err != OK) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.argument = 0; r_error.expected = Variant::STRING; *r_return = "Parse error at line " + itos(line) + ": " + errs; @@ -757,12 +757,12 @@ void Expression::exec_func(BuiltinFunc p_func, const Variant **p_inputs, Variant } break; case VAR_TO_BYTES: { - PoolByteArray barr; + PackedByteArray barr; bool full_objects = *p_inputs[1]; int len; Error err = encode_variant(*p_inputs[0], NULL, len, full_objects); if (err) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.argument = 0; r_error.expected = Variant::NIL; r_error_str = "Unexpected error encoding variable to bytes, likely unserializable type found (Object or RID)."; @@ -771,32 +771,32 @@ void Expression::exec_func(BuiltinFunc p_func, const Variant **p_inputs, Variant barr.resize(len); { - PoolByteArray::Write w = barr.write(); - encode_variant(*p_inputs[0], w.ptr(), len, full_objects); + uint8_t *w = barr.ptrw(); + encode_variant(*p_inputs[0], w, len, full_objects); } *r_return = barr; } break; case BYTES_TO_VAR: { - if (p_inputs[0]->get_type() != Variant::POOL_BYTE_ARRAY) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; + if (p_inputs[0]->get_type() != Variant::PACKED_BYTE_ARRAY) { + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.argument = 0; - r_error.expected = Variant::POOL_BYTE_ARRAY; + r_error.expected = Variant::PACKED_BYTE_ARRAY; return; } - PoolByteArray varr = *p_inputs[0]; + PackedByteArray varr = *p_inputs[0]; bool allow_objects = *p_inputs[1]; Variant ret; { - PoolByteArray::Read r = varr.read(); - Error err = decode_variant(ret, r.ptr(), varr.size(), NULL, allow_objects); + const uint8_t *r = varr.ptr(); + Error err = decode_variant(ret, r, varr.size(), NULL, allow_objects); if (err != OK) { r_error_str = RTR("Not enough bytes for decoding bytes, or invalid format."); - r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.argument = 0; - r_error.expected = Variant::POOL_BYTE_ARRAY; + r_error.expected = Variant::PACKED_BYTE_ARRAY; return; } } @@ -1161,7 +1161,7 @@ Error Expression::_get_token(Token &r_token) { if (is_float) r_token.value = num.to_double(); else - r_token.value = num.to_int(); + r_token.value = num.to_int64(); return OK; } else if ((cchar >= 'A' && cchar <= 'Z') || (cchar >= 'a' && cchar <= 'z') || cchar == '_') { @@ -2071,10 +2071,10 @@ bool Expression::_execute(const Array &p_inputs, Object *p_instance, Expression: argp.write[i] = &arr[i]; } - Variant::CallError ce; + Callable::CallError ce; r_ret = Variant::construct(constructor->data_type, (const Variant **)argp.ptr(), argp.size(), ce); - if (ce.error != Variant::CallError::CALL_OK) { + if (ce.error != Callable::CallError::CALL_OK) { r_error_str = vformat(RTR("Invalid arguments to construct '%s'"), Variant::get_type_name(constructor->data_type)); return true; } @@ -2099,10 +2099,10 @@ bool Expression::_execute(const Array &p_inputs, Object *p_instance, Expression: argp.write[i] = &arr[i]; } - Variant::CallError ce; + Callable::CallError ce; exec_func(bifunc->func, (const Variant **)argp.ptr(), &r_ret, ce, r_error_str); - if (ce.error != Variant::CallError::CALL_OK) { + if (ce.error != Callable::CallError::CALL_OK) { r_error_str = "Builtin Call Failed. " + r_error_str; return true; } @@ -2134,10 +2134,10 @@ bool Expression::_execute(const Array &p_inputs, Object *p_instance, Expression: argp.write[i] = &arr[i]; } - Variant::CallError ce; + Callable::CallError ce; r_ret = base.call(call->method, (const Variant **)argp.ptr(), argp.size(), ce); - if (ce.error != Variant::CallError::CALL_OK) { + if (ce.error != Callable::CallError::CALL_OK) { r_error_str = vformat(RTR("On call to '%s':"), String(call->method)); return true; } diff --git a/core/math/expression.h b/core/math/expression.h index 1cd1415dcf..bbf946bb0a 100644 --- a/core/math/expression.h +++ b/core/math/expression.h @@ -111,7 +111,7 @@ public: static int get_func_argument_count(BuiltinFunc p_func); static String get_func_name(BuiltinFunc p_func); - static void exec_func(BuiltinFunc p_func, const Variant **p_inputs, Variant *r_return, Variant::CallError &r_error, String &r_error_str); + static void exec_func(BuiltinFunc p_func, const Variant **p_inputs, Variant *r_return, Callable::CallError &r_error, String &r_error_str); static BuiltinFunc find_function(const String &p_string); private: diff --git a/core/math/geometry.cpp b/core/math/geometry.cpp index 7eb48290a8..69c7abfd30 100644 --- a/core/math/geometry.cpp +++ b/core/math/geometry.cpp @@ -214,23 +214,19 @@ static bool _group_face(_FaceClassify *p_faces, int len, int p_index, int p_grou return true; } -PoolVector<PoolVector<Face3> > Geometry::separate_objects(PoolVector<Face3> p_array) { +Vector<Vector<Face3> > Geometry::separate_objects(Vector<Face3> p_array) { - PoolVector<PoolVector<Face3> > objects; + Vector<Vector<Face3> > objects; int len = p_array.size(); - PoolVector<Face3>::Read r = p_array.read(); + const Face3 *arrayptr = p_array.ptr(); - const Face3 *arrayptr = r.ptr(); - - PoolVector<_FaceClassify> fc; + Vector<_FaceClassify> fc; fc.resize(len); - PoolVector<_FaceClassify>::Write fcw = fc.write(); - - _FaceClassify *_fcptr = fcw.ptr(); + _FaceClassify *_fcptr = fc.ptrw(); for (int i = 0; i < len; i++) { @@ -239,7 +235,7 @@ PoolVector<PoolVector<Face3> > Geometry::separate_objects(PoolVector<Face3> p_ar bool error = _connect_faces(_fcptr, len, -1); - ERR_FAIL_COND_V_MSG(error, PoolVector<PoolVector<Face3> >(), "Invalid geometry."); + ERR_FAIL_COND_V_MSG(error, Vector<Vector<Face3> >(), "Invalid geometry."); // Group connected faces in separate objects. @@ -263,8 +259,7 @@ PoolVector<PoolVector<Face3> > Geometry::separate_objects(PoolVector<Face3> p_ar if (group >= 0) { objects.resize(group); - PoolVector<PoolVector<Face3> >::Write obw = objects.write(); - PoolVector<Face3> *group_faces = obw.ptr(); + Vector<Face3> *group_faces = objects.ptrw(); for (int i = 0; i < len; i++) { if (!_fcptr[i].valid) @@ -470,7 +465,7 @@ static inline void _mark_outside(uint8_t ***p_cell_status, int x, int y, int z, } } -static inline void _build_faces(uint8_t ***p_cell_status, int x, int y, int z, int len_x, int len_y, int len_z, PoolVector<Face3> &p_faces) { +static inline void _build_faces(uint8_t ***p_cell_status, int x, int y, int z, int len_x, int len_y, int len_z, Vector<Face3> &p_faces) { ERR_FAIL_INDEX(x, len_x); ERR_FAIL_INDEX(y, len_y); @@ -530,14 +525,13 @@ static inline void _build_faces(uint8_t ***p_cell_status, int x, int y, int z, i } } -PoolVector<Face3> Geometry::wrap_geometry(PoolVector<Face3> p_array, real_t *p_error) { +Vector<Face3> Geometry::wrap_geometry(Vector<Face3> p_array, real_t *p_error) { #define _MIN_SIZE 1.0 #define _MAX_LENGTH 20 int face_count = p_array.size(); - PoolVector<Face3>::Read facesr = p_array.read(); - const Face3 *faces = facesr.ptr(); + const Face3 *faces = p_array.ptr(); AABB global_aabb; @@ -638,7 +632,7 @@ PoolVector<Face3> Geometry::wrap_geometry(PoolVector<Face3> p_array, real_t *p_e // Build faces for the inside-outside cell divisors. - PoolVector<Face3> wrapped_faces; + Vector<Face3> wrapped_faces; for (int i = 0; i < div_x; i++) { @@ -654,8 +648,7 @@ PoolVector<Face3> Geometry::wrap_geometry(PoolVector<Face3> p_array, real_t *p_e // Transform face vertices to global coords. int wrapped_faces_count = wrapped_faces.size(); - PoolVector<Face3>::Write wrapped_facesw = wrapped_faces.write(); - Face3 *wrapped_faces_ptr = wrapped_facesw.ptr(); + Face3 *wrapped_faces_ptr = wrapped_faces.ptrw(); for (int i = 0; i < wrapped_faces_count; i++) { @@ -720,7 +713,7 @@ Vector<Vector<Vector2> > Geometry::decompose_polygon_in_convex(Vector<Point2> po return decomp; } -Geometry::MeshData Geometry::build_convex_mesh(const PoolVector<Plane> &p_planes) { +Geometry::MeshData Geometry::build_convex_mesh(const Vector<Plane> &p_planes) { MeshData mesh; @@ -859,9 +852,9 @@ Geometry::MeshData Geometry::build_convex_mesh(const PoolVector<Plane> &p_planes return mesh; } -PoolVector<Plane> Geometry::build_box_planes(const Vector3 &p_extents) { +Vector<Plane> Geometry::build_box_planes(const Vector3 &p_extents) { - PoolVector<Plane> planes; + Vector<Plane> planes; planes.push_back(Plane(Vector3(1, 0, 0), p_extents.x)); planes.push_back(Plane(Vector3(-1, 0, 0), p_extents.x)); @@ -873,9 +866,9 @@ PoolVector<Plane> Geometry::build_box_planes(const Vector3 &p_extents) { return planes; } -PoolVector<Plane> Geometry::build_cylinder_planes(real_t p_radius, real_t p_height, int p_sides, Vector3::Axis p_axis) { +Vector<Plane> Geometry::build_cylinder_planes(real_t p_radius, real_t p_height, int p_sides, Vector3::Axis p_axis) { - PoolVector<Plane> planes; + Vector<Plane> planes; for (int i = 0; i < p_sides; i++) { @@ -895,9 +888,9 @@ PoolVector<Plane> Geometry::build_cylinder_planes(real_t p_radius, real_t p_heig return planes; } -PoolVector<Plane> Geometry::build_sphere_planes(real_t p_radius, int p_lats, int p_lons, Vector3::Axis p_axis) { +Vector<Plane> Geometry::build_sphere_planes(real_t p_radius, int p_lats, int p_lons, Vector3::Axis p_axis) { - PoolVector<Plane> planes; + Vector<Plane> planes; Vector3 axis; axis[p_axis] = 1.0; @@ -928,9 +921,9 @@ PoolVector<Plane> Geometry::build_sphere_planes(real_t p_radius, int p_lats, int return planes; } -PoolVector<Plane> Geometry::build_capsule_planes(real_t p_radius, real_t p_height, int p_sides, int p_lats, Vector3::Axis p_axis) { +Vector<Plane> Geometry::build_capsule_planes(real_t p_radius, real_t p_height, int p_sides, int p_lats, Vector3::Axis p_axis) { - PoolVector<Plane> planes; + Vector<Plane> planes; Vector3 axis; axis[p_axis] = 1.0; diff --git a/core/math/geometry.h b/core/math/geometry.h index b9193242bc..a94d00bf77 100644 --- a/core/math/geometry.h +++ b/core/math/geometry.h @@ -37,7 +37,7 @@ #include "core/math/triangulate.h" #include "core/math/vector3.h" #include "core/object.h" -#include "core/pool_vector.h" + #include "core/print_string.h" #include "core/vector.h" @@ -899,10 +899,10 @@ public: return (intersections & 1); } - static PoolVector<PoolVector<Face3> > separate_objects(PoolVector<Face3> p_array); + static Vector<Vector<Face3> > separate_objects(Vector<Face3> p_array); // Create a "wrap" that encloses the given geometry. - static PoolVector<Face3> wrap_geometry(PoolVector<Face3> p_array, real_t *p_error = NULL); + static Vector<Face3> wrap_geometry(Vector<Face3> p_array, real_t *p_error = NULL); struct MeshData { @@ -1006,11 +1006,11 @@ public: } static Vector<Vector<Vector2> > decompose_polygon_in_convex(Vector<Point2> polygon); - static MeshData build_convex_mesh(const PoolVector<Plane> &p_planes); - static PoolVector<Plane> build_sphere_planes(real_t p_radius, int p_lats, int p_lons, Vector3::Axis p_axis = Vector3::AXIS_Z); - static PoolVector<Plane> build_box_planes(const Vector3 &p_extents); - static PoolVector<Plane> build_cylinder_planes(real_t p_radius, real_t p_height, int p_sides, Vector3::Axis p_axis = Vector3::AXIS_Z); - static PoolVector<Plane> build_capsule_planes(real_t p_radius, real_t p_height, int p_sides, int p_lats, Vector3::Axis p_axis = Vector3::AXIS_Z); + static MeshData build_convex_mesh(const Vector<Plane> &p_planes); + static Vector<Plane> build_sphere_planes(real_t p_radius, int p_lats, int p_lons, Vector3::Axis p_axis = Vector3::AXIS_Z); + static Vector<Plane> build_box_planes(const Vector3 &p_extents); + static Vector<Plane> build_cylinder_planes(real_t p_radius, real_t p_height, int p_sides, Vector3::Axis p_axis = Vector3::AXIS_Z); + static Vector<Plane> build_capsule_planes(real_t p_radius, real_t p_height, int p_sides, int p_lats, Vector3::Axis p_axis = Vector3::AXIS_Z); static void make_atlas(const Vector<Size2i> &p_rects, Vector<Point2i> &r_result, Size2i &r_size); diff --git a/core/math/rect2.h b/core/math/rect2.h index 0d2e7eb6e5..e4ea615c22 100644 --- a/core/math/rect2.h +++ b/core/math/rect2.h @@ -387,6 +387,11 @@ struct Rect2i { size = end - begin; } + _FORCE_INLINE_ Rect2i abs() const { + + return Rect2i(Point2i(position.x + MIN(size.x, 0), position.y + MIN(size.y, 0)), size.abs()); + } + operator String() const { return String(position) + ", " + String(size); } operator Rect2() const { return Rect2(position, size); } diff --git a/core/math/transform.h b/core/math/transform.h index ad397d9c09..c6e3be4c70 100644 --- a/core/math/transform.h +++ b/core/math/transform.h @@ -34,7 +34,6 @@ #include "core/math/aabb.h" #include "core/math/basis.h" #include "core/math/plane.h" -#include "core/pool_vector.h" class Transform { public: @@ -84,8 +83,8 @@ public: _FORCE_INLINE_ AABB xform(const AABB &p_aabb) const; _FORCE_INLINE_ AABB xform_inv(const AABB &p_aabb) const; - _FORCE_INLINE_ PoolVector<Vector3> xform(const PoolVector<Vector3> &p_array) const; - _FORCE_INLINE_ PoolVector<Vector3> xform_inv(const PoolVector<Vector3> &p_array) const; + _FORCE_INLINE_ Vector<Vector3> xform(const Vector<Vector3> &p_array) const; + _FORCE_INLINE_ Vector<Vector3> xform_inv(const Vector<Vector3> &p_array) const; void operator*=(const Transform &p_transform); Transform operator*(const Transform &p_transform) const; @@ -210,13 +209,13 @@ _FORCE_INLINE_ AABB Transform::xform_inv(const AABB &p_aabb) const { return ret; } -PoolVector<Vector3> Transform::xform(const PoolVector<Vector3> &p_array) const { +Vector<Vector3> Transform::xform(const Vector<Vector3> &p_array) const { - PoolVector<Vector3> array; + Vector<Vector3> array; array.resize(p_array.size()); - PoolVector<Vector3>::Read r = p_array.read(); - PoolVector<Vector3>::Write w = array.write(); + const Vector3 *r = p_array.ptr(); + Vector3 *w = array.ptrw(); for (int i = 0; i < p_array.size(); ++i) { w[i] = xform(r[i]); @@ -224,13 +223,13 @@ PoolVector<Vector3> Transform::xform(const PoolVector<Vector3> &p_array) const { return array; } -PoolVector<Vector3> Transform::xform_inv(const PoolVector<Vector3> &p_array) const { +Vector<Vector3> Transform::xform_inv(const Vector<Vector3> &p_array) const { - PoolVector<Vector3> array; + Vector<Vector3> array; array.resize(p_array.size()); - PoolVector<Vector3>::Read r = p_array.read(); - PoolVector<Vector3>::Write w = array.write(); + const Vector3 *r = p_array.ptr(); + Vector3 *w = array.ptrw(); for (int i = 0; i < p_array.size(); ++i) { w[i] = xform_inv(r[i]); diff --git a/core/math/transform_2d.h b/core/math/transform_2d.h index 367f697ccf..fa43762aa4 100644 --- a/core/math/transform_2d.h +++ b/core/math/transform_2d.h @@ -32,7 +32,6 @@ #define TRANSFORM_2D_H #include "core/math/rect2.h" // also includes vector2, math_funcs, and ustring -#include "core/pool_vector.h" struct Transform2D { // Warning #1: basis of Transform2D is stored differently from Basis. In terms of elements array, the basis matrix looks like "on paper": @@ -112,8 +111,8 @@ struct Transform2D { _FORCE_INLINE_ Vector2 xform_inv(const Vector2 &p_vec) const; _FORCE_INLINE_ Rect2 xform(const Rect2 &p_rect) const; _FORCE_INLINE_ Rect2 xform_inv(const Rect2 &p_rect) const; - _FORCE_INLINE_ PoolVector<Vector2> xform(const PoolVector<Vector2> &p_array) const; - _FORCE_INLINE_ PoolVector<Vector2> xform_inv(const PoolVector<Vector2> &p_array) const; + _FORCE_INLINE_ Vector<Vector2> xform(const Vector<Vector2> &p_array) const; + _FORCE_INLINE_ Vector<Vector2> xform_inv(const Vector<Vector2> &p_array) const; operator String() const; @@ -203,13 +202,13 @@ Rect2 Transform2D::xform_inv(const Rect2 &p_rect) const { return new_rect; } -PoolVector<Vector2> Transform2D::xform(const PoolVector<Vector2> &p_array) const { +Vector<Vector2> Transform2D::xform(const Vector<Vector2> &p_array) const { - PoolVector<Vector2> array; + Vector<Vector2> array; array.resize(p_array.size()); - PoolVector<Vector2>::Read r = p_array.read(); - PoolVector<Vector2>::Write w = array.write(); + const Vector2 *r = p_array.ptr(); + Vector2 *w = array.ptrw(); for (int i = 0; i < p_array.size(); ++i) { w[i] = xform(r[i]); @@ -217,13 +216,13 @@ PoolVector<Vector2> Transform2D::xform(const PoolVector<Vector2> &p_array) const return array; } -PoolVector<Vector2> Transform2D::xform_inv(const PoolVector<Vector2> &p_array) const { +Vector<Vector2> Transform2D::xform_inv(const Vector<Vector2> &p_array) const { - PoolVector<Vector2> array; + Vector<Vector2> array; array.resize(p_array.size()); - PoolVector<Vector2>::Read r = p_array.read(); - PoolVector<Vector2>::Write w = array.write(); + const Vector2 *r = p_array.ptr(); + Vector2 *w = array.ptrw(); for (int i = 0; i < p_array.size(); ++i) { w[i] = xform_inv(r[i]); diff --git a/core/math/triangle_mesh.cpp b/core/math/triangle_mesh.cpp index 53d4ea0a96..01d38cf24e 100644 --- a/core/math/triangle_mesh.cpp +++ b/core/math/triangle_mesh.cpp @@ -89,7 +89,7 @@ int TriangleMesh::_create_bvh(BVH *p_bvh, BVH **p_bb, int p_from, int p_size, in return index; } -void TriangleMesh::get_indices(PoolVector<int> *r_triangles_indices) const { +void TriangleMesh::get_indices(Vector<int> *r_triangles_indices) const { if (!valid) return; @@ -97,10 +97,10 @@ void TriangleMesh::get_indices(PoolVector<int> *r_triangles_indices) const { const int triangles_num = triangles.size(); // Parse vertices indices - PoolVector<Triangle>::Read triangles_read = triangles.read(); + const Triangle *triangles_read = triangles.ptr(); r_triangles_indices->resize(triangles_num * 3); - PoolVector<int>::Write r_indices_write = r_triangles_indices->write(); + int *r_indices_write = r_triangles_indices->ptrw(); for (int i = 0; i < triangles_num; ++i) { r_indices_write[3 * i + 0] = triangles_read[i].indices[0]; @@ -109,7 +109,7 @@ void TriangleMesh::get_indices(PoolVector<int> *r_triangles_indices) const { } } -void TriangleMesh::create(const PoolVector<Vector3> &p_faces) { +void TriangleMesh::create(const Vector<Vector3> &p_faces) { valid = false; @@ -119,7 +119,7 @@ void TriangleMesh::create(const PoolVector<Vector3> &p_faces) { triangles.resize(fc); bvh.resize(fc * 3); //will never be larger than this (todo make better) - PoolVector<BVH>::Write bw = bvh.write(); + BVH *bw = bvh.ptrw(); { @@ -127,8 +127,8 @@ void TriangleMesh::create(const PoolVector<Vector3> &p_faces) { //except for the Set for repeated triangles, everything //goes in-place. - PoolVector<Vector3>::Read r = p_faces.read(); - PoolVector<Triangle>::Write w = triangles.write(); + const Vector3 *r = p_faces.ptr(); + Triangle *w = triangles.ptrw(); Map<Vector3, int> db; for (int i = 0; i < fc; i++) { @@ -164,15 +164,15 @@ void TriangleMesh::create(const PoolVector<Vector3> &p_faces) { } vertices.resize(db.size()); - PoolVector<Vector3>::Write vw = vertices.write(); + Vector3 *vw = vertices.ptrw(); for (Map<Vector3, int>::Element *E = db.front(); E; E = E->next()) { vw[E->get()] = E->key(); } } - PoolVector<BVH *> bwptrs; + Vector<BVH *> bwptrs; bwptrs.resize(fc); - PoolVector<BVH *>::Write bwp = bwptrs.write(); + BVH **bwp = bwptrs.ptrw(); for (int i = 0; i < fc; i++) { bwp[i] = &bw[i]; @@ -180,9 +180,8 @@ void TriangleMesh::create(const PoolVector<Vector3> &p_faces) { max_depth = 0; int max_alloc = fc; - _create_bvh(bw.ptr(), bwp.ptr(), 0, fc, 1, max_depth, max_alloc); + _create_bvh(bw, bwp, 0, fc, 1, max_depth, max_alloc); - bw.release(); //clearup bvh.resize(max_alloc); //resize back valid = true; @@ -208,13 +207,11 @@ Vector3 TriangleMesh::get_area_normal(const AABB &p_aabb) const { int level = 0; - PoolVector<Triangle>::Read trianglesr = triangles.read(); - PoolVector<Vector3>::Read verticesr = vertices.read(); - PoolVector<BVH>::Read bvhr = bvh.read(); + const Triangle *triangleptr = triangles.ptr(); + // const Vector3 *verticesr = vertices.ptr(); + const BVH *bvhptr = bvh.ptr(); - const Triangle *triangleptr = trianglesr.ptr(); int pos = bvh.size() - 1; - const BVH *bvhptr = bvhr.ptr(); stack[0] = pos; while (true) { @@ -304,14 +301,11 @@ bool TriangleMesh::intersect_segment(const Vector3 &p_begin, const Vector3 &p_en int level = 0; - PoolVector<Triangle>::Read trianglesr = triangles.read(); - PoolVector<Vector3>::Read verticesr = vertices.read(); - PoolVector<BVH>::Read bvhr = bvh.read(); + const Triangle *triangleptr = triangles.ptr(); + const Vector3 *vertexptr = vertices.ptr(); + const BVH *bvhptr = bvh.ptr(); - const Triangle *triangleptr = trianglesr.ptr(); - const Vector3 *vertexptr = verticesr.ptr(); int pos = bvh.size() - 1; - const BVH *bvhptr = bvhr.ptr(); stack[0] = pos; while (true) { @@ -419,14 +413,11 @@ bool TriangleMesh::intersect_ray(const Vector3 &p_begin, const Vector3 &p_dir, V int level = 0; - PoolVector<Triangle>::Read trianglesr = triangles.read(); - PoolVector<Vector3>::Read verticesr = vertices.read(); - PoolVector<BVH>::Read bvhr = bvh.read(); + const Triangle *triangleptr = triangles.ptr(); + const Vector3 *vertexptr = vertices.ptr(); + const BVH *bvhptr = bvh.ptr(); - const Triangle *triangleptr = trianglesr.ptr(); - const Vector3 *vertexptr = verticesr.ptr(); int pos = bvh.size() - 1; - const BVH *bvhptr = bvhr.ptr(); stack[0] = pos; while (true) { @@ -529,14 +520,11 @@ bool TriangleMesh::intersect_convex_shape(const Plane *p_planes, int p_plane_cou int level = 0; - PoolVector<Triangle>::Read trianglesr = triangles.read(); - PoolVector<Vector3>::Read verticesr = vertices.read(); - PoolVector<BVH>::Read bvhr = bvh.read(); + const Triangle *triangleptr = triangles.ptr(); + const Vector3 *vertexptr = vertices.ptr(); + const BVH *bvhptr = bvh.ptr(); - const Triangle *triangleptr = trianglesr.ptr(); - const Vector3 *vertexptr = verticesr.ptr(); int pos = bvh.size() - 1; - const BVH *bvhptr = bvhr.ptr(); stack[0] = pos; while (true) { @@ -645,16 +633,13 @@ bool TriangleMesh::inside_convex_shape(const Plane *p_planes, int p_plane_count, int level = 0; - PoolVector<Triangle>::Read trianglesr = triangles.read(); - PoolVector<Vector3>::Read verticesr = vertices.read(); - PoolVector<BVH>::Read bvhr = bvh.read(); + const Triangle *triangleptr = triangles.ptr(); + const Vector3 *vertexptr = vertices.ptr(); + const BVH *bvhptr = bvh.ptr(); Transform scale(Basis().scaled(p_scale)); - const Triangle *triangleptr = trianglesr.ptr(); - const Vector3 *vertexptr = verticesr.ptr(); int pos = bvh.size() - 1; - const BVH *bvhptr = bvhr.ptr(); stack[0] = pos; while (true) { @@ -732,18 +717,18 @@ bool TriangleMesh::is_valid() const { return valid; } -PoolVector<Face3> TriangleMesh::get_faces() const { +Vector<Face3> TriangleMesh::get_faces() const { if (!valid) - return PoolVector<Face3>(); + return Vector<Face3>(); - PoolVector<Face3> faces; + Vector<Face3> faces; int ts = triangles.size(); faces.resize(triangles.size()); - PoolVector<Face3>::Write w = faces.write(); - PoolVector<Triangle>::Read r = triangles.read(); - PoolVector<Vector3>::Read rv = vertices.read(); + Face3 *w = faces.ptrw(); + const Triangle *r = triangles.ptr(); + const Vector3 *rv = vertices.ptr(); for (int i = 0; i < ts; i++) { for (int j = 0; j < 3; j++) { @@ -751,7 +736,6 @@ PoolVector<Face3> TriangleMesh::get_faces() const { } } - w.release(); return faces; } diff --git a/core/math/triangle_mesh.h b/core/math/triangle_mesh.h index 575a78b0b5..fdbfb90465 100644 --- a/core/math/triangle_mesh.h +++ b/core/math/triangle_mesh.h @@ -44,8 +44,8 @@ class TriangleMesh : public Reference { int indices[3]; }; - PoolVector<Triangle> triangles; - PoolVector<Vector3> vertices; + Vector<Triangle> triangles; + Vector<Vector3> vertices; struct BVH { @@ -82,7 +82,7 @@ class TriangleMesh : public Reference { int _create_bvh(BVH *p_bvh, BVH **p_bb, int p_from, int p_size, int p_depth, int &max_depth, int &max_alloc); - PoolVector<BVH> bvh; + Vector<BVH> bvh; int max_depth; bool valid; @@ -93,13 +93,13 @@ public: bool intersect_convex_shape(const Plane *p_planes, int p_plane_count) const; bool inside_convex_shape(const Plane *p_planes, int p_plane_count, Vector3 p_scale = Vector3(1, 1, 1)) const; Vector3 get_area_normal(const AABB &p_aabb) const; - PoolVector<Face3> get_faces() const; + Vector<Face3> get_faces() const; - PoolVector<Triangle> get_triangles() const { return triangles; } - PoolVector<Vector3> get_vertices() const { return vertices; } - void get_indices(PoolVector<int> *r_triangles_indices) const; + Vector<Triangle> get_triangles() const { return triangles; } + Vector<Vector3> get_vertices() const { return vertices; } + void get_indices(Vector<int> *r_triangles_indices) const; - void create(const PoolVector<Vector3> &p_faces); + void create(const Vector<Vector3> &p_faces); TriangleMesh(); }; diff --git a/core/math/vector2.h b/core/math/vector2.h index 1dec830821..ba5558102f 100644 --- a/core/math/vector2.h +++ b/core/math/vector2.h @@ -311,10 +311,15 @@ struct Vector2i { bool operator<(const Vector2i &p_vec2) const { return (x == p_vec2.x) ? (y < p_vec2.y) : (x < p_vec2.x); } bool operator>(const Vector2i &p_vec2) const { return (x == p_vec2.x) ? (y > p_vec2.y) : (x > p_vec2.x); } + bool operator<=(const Vector2i &p_vec2) const { return x == p_vec2.x ? (y <= p_vec2.y) : (x < p_vec2.x); } + bool operator>=(const Vector2i &p_vec2) const { return x == p_vec2.x ? (y >= p_vec2.y) : (x > p_vec2.x); } + bool operator==(const Vector2i &p_vec2) const; bool operator!=(const Vector2i &p_vec2) const; - real_t get_aspect() const { return width / (real_t)height; } + real_t aspect() const { return width / (real_t)height; } + Vector2i sign() const { return Vector2i(SGN(x), SGN(y)); } + Vector2i abs() const { return Vector2i(ABS(x), ABS(y)); } operator String() const { return String::num(x) + ", " + String::num(y); } diff --git a/core/message_queue.cpp b/core/message_queue.cpp index 42390935d4..235003627e 100644 --- a/core/message_queue.cpp +++ b/core/message_queue.cpp @@ -30,6 +30,7 @@ #include "message_queue.h" +#include "core/core_string_names.h" #include "core/project_settings.h" #include "core/script_language.h" @@ -42,37 +43,7 @@ MessageQueue *MessageQueue::get_singleton() { Error MessageQueue::push_call(ObjectID p_id, const StringName &p_method, const Variant **p_args, int p_argcount, bool p_show_error) { - _THREAD_SAFE_METHOD_ - - int room_needed = sizeof(Message) + sizeof(Variant) * p_argcount; - - if ((buffer_end + room_needed) >= buffer_size) { - String type; - if (ObjectDB::get_instance(p_id)) - type = ObjectDB::get_instance(p_id)->get_class(); - print_line("Failed method: " + type + ":" + p_method + " target ID: " + itos(p_id)); - statistics(); - ERR_FAIL_V_MSG(ERR_OUT_OF_MEMORY, "Message queue out of memory. Try increasing 'memory/limits/message_queue/max_size_kb' in project settings."); - } - - Message *msg = memnew_placement(&buffer[buffer_end], Message); - msg->args = p_argcount; - msg->instance_id = p_id; - msg->target = p_method; - msg->type = TYPE_CALL; - if (p_show_error) - msg->type |= FLAG_SHOW_ERROR; - - buffer_end += sizeof(Message); - - for (int i = 0; i < p_argcount; i++) { - - Variant *v = memnew_placement(&buffer[buffer_end], Variant); - buffer_end += sizeof(Variant); - *v = *p_args[i]; - } - - return OK; + return push_callable(Callable(p_id, p_method), p_args, p_argcount, p_show_error); } Error MessageQueue::push_call(ObjectID p_id, const StringName &p_method, VARIANT_ARG_DECLARE) { @@ -107,8 +78,7 @@ Error MessageQueue::push_set(ObjectID p_id, const StringName &p_prop, const Vari Message *msg = memnew_placement(&buffer[buffer_end], Message); msg->args = 1; - msg->instance_id = p_id; - msg->target = p_prop; + msg->callable = Callable(p_id, p_prop); msg->type = TYPE_SET; buffer_end += sizeof(Message); @@ -137,7 +107,7 @@ Error MessageQueue::push_notification(ObjectID p_id, int p_notification) { Message *msg = memnew_placement(&buffer[buffer_end], Message); msg->type = TYPE_NOTIFICATION; - msg->instance_id = p_id; + msg->callable = Callable(p_id, CoreStringNames::get_singleton()->notification); //name is meaningless but callable needs it //msg->target; msg->notification = p_notification; @@ -160,18 +130,49 @@ Error MessageQueue::push_set(Object *p_object, const StringName &p_prop, const V return push_set(p_object->get_instance_id(), p_prop, p_value); } +Error MessageQueue::push_callable(const Callable &p_callable, const Variant **p_args, int p_argcount, bool p_show_error) { + + _THREAD_SAFE_METHOD_ + + int room_needed = sizeof(Message) + sizeof(Variant) * p_argcount; + + if ((buffer_end + room_needed) >= buffer_size) { + print_line("Failed method: " + p_callable); + statistics(); + ERR_FAIL_V_MSG(ERR_OUT_OF_MEMORY, "Message queue out of memory. Try increasing 'memory/limits/message_queue/max_size_kb' in project settings."); + } + + Message *msg = memnew_placement(&buffer[buffer_end], Message); + msg->args = p_argcount; + msg->callable = p_callable; + msg->type = TYPE_CALL; + if (p_show_error) + msg->type |= FLAG_SHOW_ERROR; + + buffer_end += sizeof(Message); + + for (int i = 0; i < p_argcount; i++) { + + Variant *v = memnew_placement(&buffer[buffer_end], Variant); + buffer_end += sizeof(Variant); + *v = *p_args[i]; + } + + return OK; +} + void MessageQueue::statistics() { Map<StringName, int> set_count; Map<int, int> notify_count; - Map<StringName, int> call_count; + Map<Callable, int> call_count; int null_count = 0; uint32_t read_pos = 0; while (read_pos < buffer_end) { Message *message = (Message *)&buffer[read_pos]; - Object *target = ObjectDB::get_instance(message->instance_id); + Object *target = message->callable.get_object(); if (target != NULL) { @@ -179,10 +180,10 @@ void MessageQueue::statistics() { case TYPE_CALL: { - if (!call_count.has(message->target)) - call_count[message->target] = 0; + if (!call_count.has(message->callable)) + call_count[message->callable] = 0; - call_count[message->target]++; + call_count[message->callable]++; } break; case TYPE_NOTIFICATION: { @@ -195,10 +196,11 @@ void MessageQueue::statistics() { } break; case TYPE_SET: { - if (!set_count.has(message->target)) - set_count[message->target] = 0; + StringName t = message->callable.get_method(); + if (!set_count.has(t)) + set_count[t] = 0; - set_count[message->target]++; + set_count[t]++; } break; } @@ -222,7 +224,7 @@ void MessageQueue::statistics() { print_line("SET " + E->key() + ": " + itos(E->get())); } - for (Map<StringName, int>::Element *E = call_count.front(); E; E = E->next()) { + for (Map<Callable, int>::Element *E = call_count.front(); E; E = E->next()) { print_line("CALL " + E->key() + ": " + itos(E->get())); } @@ -236,7 +238,7 @@ int MessageQueue::get_max_buffer_usage() const { return buffer_max_used; } -void MessageQueue::_call_function(Object *p_target, const StringName &p_func, const Variant *p_args, int p_argcount, bool p_show_error) { +void MessageQueue::_call_function(const Callable &p_callable, const Variant *p_args, int p_argcount, bool p_show_error) { const Variant **argptrs = NULL; if (p_argcount) { @@ -246,11 +248,12 @@ void MessageQueue::_call_function(Object *p_target, const StringName &p_func, co } } - Variant::CallError ce; - p_target->call(p_func, argptrs, p_argcount, ce); - if (p_show_error && ce.error != Variant::CallError::CALL_OK) { + Callable::CallError ce; + Variant ret; + p_callable.call(argptrs, p_argcount, ret, ce); + if (p_show_error && ce.error != Callable::CallError::CALL_OK) { - ERR_PRINT("Error calling deferred method: " + Variant::get_call_error_text(p_target, p_func, argptrs, p_argcount, ce) + "."); + ERR_PRINT("Error calling deferred method: " + Variant::get_callable_error_text(p_callable, argptrs, p_argcount, ce) + "."); } } @@ -283,7 +286,7 @@ void MessageQueue::flush() { _THREAD_SAFE_UNLOCK_ - Object *target = ObjectDB::get_instance(message->instance_id); + Object *target = message->callable.get_object(); if (target != NULL) { @@ -294,7 +297,7 @@ void MessageQueue::flush() { // messages don't expect a return value - _call_function(target, message->target, args, message->args, message->type & FLAG_SHOW_ERROR); + _call_function(message->callable, args, message->args, message->type & FLAG_SHOW_ERROR); } break; case TYPE_NOTIFICATION: { @@ -307,7 +310,7 @@ void MessageQueue::flush() { Variant *arg = (Variant *)(message + 1); // messages don't expect a return value - target->set(message->target, *arg); + target->set(message->callable.get_method(), *arg); } break; } diff --git a/core/message_queue.h b/core/message_queue.h index e9a92ff5b7..9ba748bb42 100644 --- a/core/message_queue.h +++ b/core/message_queue.h @@ -54,8 +54,7 @@ class MessageQueue { struct Message { - ObjectID instance_id; - StringName target; + Callable callable; int16_t type; union { int16_t notification; @@ -68,7 +67,7 @@ class MessageQueue { uint32_t buffer_max_used; uint32_t buffer_size; - void _call_function(Object *p_target, const StringName &p_func, const Variant *p_args, int p_argcount, bool p_show_error); + void _call_function(const Callable &p_callable, const Variant *p_args, int p_argcount, bool p_show_error); static MessageQueue *singleton; @@ -81,6 +80,7 @@ public: Error push_call(ObjectID p_id, const StringName &p_method, VARIANT_ARG_LIST); Error push_notification(ObjectID p_id, int p_notification); Error push_set(ObjectID p_id, const StringName &p_prop, const Variant &p_value); + Error push_callable(const Callable &p_callable, const Variant **p_args, int p_argcount, bool p_show_error = false); Error push_call(Object *p_object, const StringName &p_method, VARIANT_ARG_LIST); Error push_notification(Object *p_object, int p_notification); diff --git a/core/method_bind.h b/core/method_bind.h index 1860d227f7..726ce512f8 100644 --- a/core/method_bind.h +++ b/core/method_bind.h @@ -31,19 +31,18 @@ #ifndef METHOD_BIND_H #define METHOD_BIND_H +#ifdef DEBUG_ENABLED +#define DEBUG_METHODS_ENABLED +#endif + #include "core/list.h" #include "core/method_ptrcall.h" #include "core/object.h" +#include "core/type_info.h" #include "core/variant.h" #include <stdio.h> -#ifdef DEBUG_ENABLED -#define DEBUG_METHODS_ENABLED -#endif - -#include "core/type_info.h" - enum MethodFlags { METHOD_FLAG_NORMAL = 1, @@ -155,7 +154,7 @@ struct VariantObjectClassChecker<Control *> { Variant::Type argtype = get_argument_type(m_arg - 1); \ if (!Variant::can_convert_strict(p_args[m_arg - 1]->get_type(), argtype) || \ !VariantObjectClassChecker<P##m_arg>::check(*p_args[m_arg - 1])) { \ - r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; \ + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; \ r_error.argument = m_arg - 1; \ r_error.expected = argtype; \ return Variant(); \ @@ -278,7 +277,7 @@ public: _FORCE_INLINE_ int get_argument_count() const { return argument_count; }; - virtual Variant call(Object *p_object, const Variant **p_args, int p_arg_count, Variant::CallError &r_error) = 0; + virtual Variant call(Object *p_object, const Variant **p_args, int p_arg_count, Callable::CallError &r_error) = 0; #ifdef PTRCALL_ENABLED virtual void ptrcall(Object *p_object, const void **p_args, void *r_ret) = 0; @@ -300,7 +299,7 @@ public: template <class T> class MethodBindVarArg : public MethodBind { public: - typedef Variant (T::*NativeCall)(const Variant **, int, Variant::CallError &); + typedef Variant (T::*NativeCall)(const Variant **, int, Callable::CallError &); protected: NativeCall call_method; @@ -338,7 +337,7 @@ public: } #endif - virtual Variant call(Object *p_object, const Variant **p_args, int p_arg_count, Variant::CallError &r_error) { + virtual Variant call(Object *p_object, const Variant **p_args, int p_arg_count, Callable::CallError &r_error) { T *instance = static_cast<T *>(p_object); return (instance->*call_method)(p_args, p_arg_count, r_error); @@ -389,7 +388,7 @@ public: }; template <class T> -MethodBind *create_vararg_method_bind(Variant (T::*p_method)(const Variant **, int, Variant::CallError &), const MethodInfo &p_info, bool p_return_nil_is_variant) { +MethodBind *create_vararg_method_bind(Variant (T::*p_method)(const Variant **, int, Callable::CallError &), const MethodInfo &p_info, bool p_return_nil_is_variant) { MethodBindVarArg<T> *a = memnew((MethodBindVarArg<T>)); a->set_method(p_method); diff --git a/core/method_ptrcall.h b/core/method_ptrcall.h index 118970de80..3db186ca69 100644 --- a/core/method_ptrcall.h +++ b/core/method_ptrcall.h @@ -125,17 +125,22 @@ MAKE_PTRARG_BY_REFERENCE(AABB); MAKE_PTRARG_BY_REFERENCE(Basis); MAKE_PTRARG_BY_REFERENCE(Transform); MAKE_PTRARG_BY_REFERENCE(Color); +MAKE_PTRARG(StringName); MAKE_PTRARG(NodePath); MAKE_PTRARG(RID); MAKE_PTRARG(Dictionary); +MAKE_PTRARG(Callable); +MAKE_PTRARG(Signal); MAKE_PTRARG(Array); -MAKE_PTRARG(PoolByteArray); -MAKE_PTRARG(PoolIntArray); -MAKE_PTRARG(PoolRealArray); -MAKE_PTRARG(PoolStringArray); -MAKE_PTRARG(PoolVector2Array); -MAKE_PTRARG(PoolVector3Array); -MAKE_PTRARG(PoolColorArray); +MAKE_PTRARG(PackedByteArray); +MAKE_PTRARG(PackedInt32Array); +MAKE_PTRARG(PackedInt64Array); +MAKE_PTRARG(PackedFloat32Array); +MAKE_PTRARG(PackedFloat64Array); +MAKE_PTRARG(PackedStringArray); +MAKE_PTRARG(PackedVector2Array); +MAKE_PTRARG(PackedVector3Array); +MAKE_PTRARG(PackedColorArray); MAKE_PTRARG_BY_REFERENCE(Variant); //this is for Object @@ -185,95 +190,96 @@ struct PtrToArg<ObjectID> { //this is for the special cases used by Variant -#define MAKE_VECARG(m_type) \ - template <> \ - struct PtrToArg<Vector<m_type> > { \ - _FORCE_INLINE_ static Vector<m_type> convert(const void *p_ptr) { \ - const PoolVector<m_type> *dvs = reinterpret_cast<const PoolVector<m_type> *>(p_ptr); \ - Vector<m_type> ret; \ - int len = dvs->size(); \ - ret.resize(len); \ - { \ - PoolVector<m_type>::Read r = dvs->read(); \ - for (int i = 0; i < len; i++) { \ - ret.write[i] = r[i]; \ - } \ - } \ - return ret; \ - } \ - _FORCE_INLINE_ static void encode(Vector<m_type> p_vec, void *p_ptr) { \ - PoolVector<m_type> *dv = reinterpret_cast<PoolVector<m_type> *>(p_ptr); \ - int len = p_vec.size(); \ - dv->resize(len); \ - { \ - PoolVector<m_type>::Write w = dv->write(); \ - for (int i = 0; i < len; i++) { \ - w[i] = p_vec[i]; \ - } \ - } \ - } \ - }; \ - template <> \ - struct PtrToArg<const Vector<m_type> &> { \ - _FORCE_INLINE_ static Vector<m_type> convert(const void *p_ptr) { \ - const PoolVector<m_type> *dvs = reinterpret_cast<const PoolVector<m_type> *>(p_ptr); \ - Vector<m_type> ret; \ - int len = dvs->size(); \ - ret.resize(len); \ - { \ - PoolVector<m_type>::Read r = dvs->read(); \ - for (int i = 0; i < len; i++) { \ - ret.write[i] = r[i]; \ - } \ - } \ - return ret; \ - } \ +#define MAKE_VECARG(m_type) \ + template <> \ + struct PtrToArg<Vector<m_type> > { \ + _FORCE_INLINE_ static Vector<m_type> convert(const void *p_ptr) { \ + const Vector<m_type> *dvs = reinterpret_cast<const Vector<m_type> *>(p_ptr); \ + Vector<m_type> ret; \ + int len = dvs->size(); \ + ret.resize(len); \ + { \ + const m_type *r = dvs->ptr(); \ + for (int i = 0; i < len; i++) { \ + ret.write[i] = r[i]; \ + } \ + } \ + return ret; \ + } \ + _FORCE_INLINE_ static void encode(Vector<m_type> p_vec, void *p_ptr) { \ + Vector<m_type> *dv = reinterpret_cast<Vector<m_type> *>(p_ptr); \ + int len = p_vec.size(); \ + dv->resize(len); \ + { \ + m_type *w = dv->ptrw(); \ + for (int i = 0; i < len; i++) { \ + w[i] = p_vec[i]; \ + } \ + } \ + } \ + }; \ + template <> \ + struct PtrToArg<const Vector<m_type> &> { \ + _FORCE_INLINE_ static Vector<m_type> convert(const void *p_ptr) { \ + const Vector<m_type> *dvs = reinterpret_cast<const Vector<m_type> *>(p_ptr); \ + Vector<m_type> ret; \ + int len = dvs->size(); \ + ret.resize(len); \ + { \ + const m_type *r = dvs->ptr(); \ + for (int i = 0; i < len; i++) { \ + ret.write[i] = r[i]; \ + } \ + } \ + return ret; \ + } \ } -#define MAKE_VECARG_ALT(m_type, m_type_alt) \ - template <> \ - struct PtrToArg<Vector<m_type_alt> > { \ - _FORCE_INLINE_ static Vector<m_type_alt> convert(const void *p_ptr) { \ - const PoolVector<m_type> *dvs = reinterpret_cast<const PoolVector<m_type> *>(p_ptr); \ - Vector<m_type_alt> ret; \ - int len = dvs->size(); \ - ret.resize(len); \ - { \ - PoolVector<m_type>::Read r = dvs->read(); \ - for (int i = 0; i < len; i++) { \ - ret.write[i] = r[i]; \ - } \ - } \ - return ret; \ - } \ - _FORCE_INLINE_ static void encode(Vector<m_type_alt> p_vec, void *p_ptr) { \ - PoolVector<m_type> *dv = reinterpret_cast<PoolVector<m_type> *>(p_ptr); \ - int len = p_vec.size(); \ - dv->resize(len); \ - { \ - PoolVector<m_type>::Write w = dv->write(); \ - for (int i = 0; i < len; i++) { \ - w[i] = p_vec[i]; \ - } \ - } \ - } \ - }; \ - template <> \ - struct PtrToArg<const Vector<m_type_alt> &> { \ - _FORCE_INLINE_ static Vector<m_type_alt> convert(const void *p_ptr) { \ - const PoolVector<m_type> *dvs = reinterpret_cast<const PoolVector<m_type> *>(p_ptr); \ - Vector<m_type_alt> ret; \ - int len = dvs->size(); \ - ret.resize(len); \ - { \ - PoolVector<m_type>::Read r = dvs->read(); \ - for (int i = 0; i < len; i++) { \ - ret.write[i] = r[i]; \ - } \ - } \ - return ret; \ - } \ +#define MAKE_VECARG_ALT(m_type, m_type_alt) \ + template <> \ + struct PtrToArg<Vector<m_type_alt> > { \ + _FORCE_INLINE_ static Vector<m_type_alt> convert(const void *p_ptr) { \ + const Vector<m_type> *dvs = reinterpret_cast<const Vector<m_type> *>(p_ptr); \ + Vector<m_type_alt> ret; \ + int len = dvs->size(); \ + ret.resize(len); \ + { \ + const m_type *r = dvs->ptr(); \ + for (int i = 0; i < len; i++) { \ + ret.write[i] = r[i]; \ + } \ + } \ + return ret; \ + } \ + _FORCE_INLINE_ static void encode(Vector<m_type_alt> p_vec, void *p_ptr) { \ + Vector<m_type> *dv = reinterpret_cast<Vector<m_type> *>(p_ptr); \ + int len = p_vec.size(); \ + dv->resize(len); \ + { \ + m_type *w = dv->ptrw(); \ + for (int i = 0; i < len; i++) { \ + w[i] = p_vec[i]; \ + } \ + } \ + } \ + }; \ + template <> \ + struct PtrToArg<const Vector<m_type_alt> &> { \ + _FORCE_INLINE_ static Vector<m_type_alt> convert(const void *p_ptr) { \ + const Vector<m_type> *dvs = reinterpret_cast<const Vector<m_type> *>(p_ptr); \ + Vector<m_type_alt> ret; \ + int len = dvs->size(); \ + ret.resize(len); \ + { \ + const m_type *r = dvs->ptr(); \ + for (int i = 0; i < len; i++) { \ + ret.write[i] = r[i]; \ + } \ + } \ + return ret; \ + } \ } +/* MAKE_VECARG(String); MAKE_VECARG(uint8_t); MAKE_VECARG(int); @@ -281,6 +287,7 @@ MAKE_VECARG(float); MAKE_VECARG(Vector2); MAKE_VECARG(Vector3); MAKE_VECARG(Color); +*/ MAKE_VECARG_ALT(String, StringName); //for stuff that gets converted to Array vectors @@ -324,74 +331,52 @@ MAKE_VECARR(Variant); MAKE_VECARR(RID); MAKE_VECARR(Plane); -#define MAKE_DVECARR(m_type) \ - template <> \ - struct PtrToArg<PoolVector<m_type> > { \ - _FORCE_INLINE_ static PoolVector<m_type> convert(const void *p_ptr) { \ - const Array *arr = reinterpret_cast<const Array *>(p_ptr); \ - PoolVector<m_type> ret; \ - int len = arr->size(); \ - ret.resize(len); \ - { \ - PoolVector<m_type>::Write w = ret.write(); \ - for (int i = 0; i < len; i++) { \ - w[i] = (*arr)[i]; \ - } \ - } \ - return ret; \ - } \ - _FORCE_INLINE_ static void encode(PoolVector<m_type> p_vec, void *p_ptr) { \ - Array *arr = reinterpret_cast<Array *>(p_ptr); \ - int len = p_vec.size(); \ - arr->resize(len); \ - { \ - PoolVector<m_type>::Read r = p_vec.read(); \ - for (int i = 0; i < len; i++) { \ - (*arr)[i] = r[i]; \ - } \ - } \ - } \ - }; \ - template <> \ - struct PtrToArg<const PoolVector<m_type> &> { \ - _FORCE_INLINE_ static PoolVector<m_type> convert(const void *p_ptr) { \ - const Array *arr = reinterpret_cast<const Array *>(p_ptr); \ - PoolVector<m_type> ret; \ - int len = arr->size(); \ - ret.resize(len); \ - { \ - PoolVector<m_type>::Write w = ret.write(); \ - for (int i = 0; i < len; i++) { \ - w[i] = (*arr)[i]; \ - } \ - } \ - return ret; \ - } \ +#define MAKE_DVECARR(m_type) \ + template <> \ + struct PtrToArg<Vector<m_type> > { \ + _FORCE_INLINE_ static Vector<m_type> convert(const void *p_ptr) { \ + const Array *arr = reinterpret_cast<const Array *>(p_ptr); \ + Vector<m_type> ret; \ + int len = arr->size(); \ + ret.resize(len); \ + { \ + m_type *w = ret.ptrw(); \ + for (int i = 0; i < len; i++) { \ + w[i] = (*arr)[i]; \ + } \ + } \ + return ret; \ + } \ + _FORCE_INLINE_ static void encode(Vector<m_type> p_vec, void *p_ptr) { \ + Array *arr = reinterpret_cast<Array *>(p_ptr); \ + int len = p_vec.size(); \ + arr->resize(len); \ + { \ + const m_type *r = p_vec.ptr(); \ + for (int i = 0; i < len; i++) { \ + (*arr)[i] = r[i]; \ + } \ + } \ + } \ + }; \ + template <> \ + struct PtrToArg<const Vector<m_type> &> { \ + _FORCE_INLINE_ static Vector<m_type> convert(const void *p_ptr) { \ + const Array *arr = reinterpret_cast<const Array *>(p_ptr); \ + Vector<m_type> ret; \ + int len = arr->size(); \ + ret.resize(len); \ + { \ + m_type *w = ret.ptrw(); \ + for (int i = 0; i < len; i++) { \ + w[i] = (*arr)[i]; \ + } \ + } \ + return ret; \ + } \ } -MAKE_DVECARR(Plane); -//for special case StringName - -#define MAKE_STRINGCONV(m_type) \ - template <> \ - struct PtrToArg<m_type> { \ - _FORCE_INLINE_ static m_type convert(const void *p_ptr) { \ - m_type s = *reinterpret_cast<const String *>(p_ptr); \ - return s; \ - } \ - _FORCE_INLINE_ static void encode(m_type p_vec, void *p_ptr) { \ - String *arr = reinterpret_cast<String *>(p_ptr); \ - *arr = p_vec; \ - } \ - }; \ - \ - template <> \ - struct PtrToArg<const m_type &> { \ - _FORCE_INLINE_ static m_type convert(const void *p_ptr) { \ - m_type s = *reinterpret_cast<const String *>(p_ptr); \ - return s; \ - } \ - } +// Special case for IP_Address. #define MAKE_STRINGCONV_BY_REFERENCE(m_type) \ template <> \ @@ -414,19 +399,18 @@ MAKE_DVECARR(Plane); } \ } -MAKE_STRINGCONV(StringName); MAKE_STRINGCONV_BY_REFERENCE(IP_Address); template <> -struct PtrToArg<PoolVector<Face3> > { - _FORCE_INLINE_ static PoolVector<Face3> convert(const void *p_ptr) { - const PoolVector<Vector3> *dvs = reinterpret_cast<const PoolVector<Vector3> *>(p_ptr); - PoolVector<Face3> ret; +struct PtrToArg<Vector<Face3> > { + _FORCE_INLINE_ static Vector<Face3> convert(const void *p_ptr) { + const Vector<Vector3> *dvs = reinterpret_cast<const Vector<Vector3> *>(p_ptr); + Vector<Face3> ret; int len = dvs->size() / 3; ret.resize(len); { - PoolVector<Vector3>::Read r = dvs->read(); - PoolVector<Face3>::Write w = ret.write(); + const Vector3 *r = dvs->ptr(); + Face3 *w = ret.ptrw(); for (int i = 0; i < len; i++) { w[i].vertex[0] = r[i * 3 + 0]; w[i].vertex[1] = r[i * 3 + 1]; @@ -435,13 +419,13 @@ struct PtrToArg<PoolVector<Face3> > { } return ret; } - _FORCE_INLINE_ static void encode(PoolVector<Face3> p_vec, void *p_ptr) { - PoolVector<Vector3> *arr = reinterpret_cast<PoolVector<Vector3> *>(p_ptr); + _FORCE_INLINE_ static void encode(Vector<Face3> p_vec, void *p_ptr) { + Vector<Vector3> *arr = reinterpret_cast<Vector<Vector3> *>(p_ptr); int len = p_vec.size(); arr->resize(len * 3); { - PoolVector<Face3>::Read r = p_vec.read(); - PoolVector<Vector3>::Write w = arr->write(); + const Face3 *r = p_vec.ptr(); + Vector3 *w = arr->ptrw(); for (int i = 0; i < len; i++) { w[i * 3 + 0] = r[i].vertex[0]; w[i * 3 + 1] = r[i].vertex[1]; @@ -451,15 +435,15 @@ struct PtrToArg<PoolVector<Face3> > { } }; template <> -struct PtrToArg<const PoolVector<Face3> &> { - _FORCE_INLINE_ static PoolVector<Face3> convert(const void *p_ptr) { - const PoolVector<Vector3> *dvs = reinterpret_cast<const PoolVector<Vector3> *>(p_ptr); - PoolVector<Face3> ret; +struct PtrToArg<const Vector<Face3> &> { + _FORCE_INLINE_ static Vector<Face3> convert(const void *p_ptr) { + const Vector<Vector3> *dvs = reinterpret_cast<const Vector<Vector3> *>(p_ptr); + Vector<Face3> ret; int len = dvs->size() / 3; ret.resize(len); { - PoolVector<Vector3>::Read r = dvs->read(); - PoolVector<Face3>::Write w = ret.write(); + const Vector3 *r = dvs->ptr(); + Face3 *w = ret.ptrw(); for (int i = 0; i < len; i++) { w[i].vertex[0] = r[i * 3 + 0]; w[i].vertex[1] = r[i * 3 + 1]; diff --git a/core/node_path.h b/core/node_path.h index 5439658910..05b6d844ff 100644 --- a/core/node_path.h +++ b/core/node_path.h @@ -54,15 +54,6 @@ class NodePath { void _update_hash_cache() const; public: - _FORCE_INLINE_ StringName get_sname() const { - - if (data && data->path.size() == 1 && data->subpath.empty()) { - return data->path[0]; - } else { - return operator String(); - } - } - bool is_absolute() const; int get_name_count() const; StringName get_name(int p_idx) const; diff --git a/core/object.cpp b/core/object.cpp index dc1dc2c41f..140ee811fe 100644 --- a/core/object.cpp +++ b/core/object.cpp @@ -335,10 +335,8 @@ MethodInfo::MethodInfo(const PropertyInfo &p_ret, const String &p_name, const Pr Object::Connection::operator Variant() const { Dictionary d; - d["source"] = source; d["signal"] = signal; - d["target"] = target; - d["method"] = method; + d["callable"] = callable; d["flags"] = flags; d["binds"] = binds; return d; @@ -346,34 +344,19 @@ Object::Connection::operator Variant() const { bool Object::Connection::operator<(const Connection &p_conn) const { - if (source == p_conn.source) { - - if (signal == p_conn.signal) { - - if (target == p_conn.target) { - - return method < p_conn.method; - } else { - - return target < p_conn.target; - } - } else - return signal < p_conn.signal; + if (signal == p_conn.signal) { + return callable < p_conn.callable; } else { - return source < p_conn.source; + return signal < p_conn.signal; } } Object::Connection::Connection(const Variant &p_variant) { Dictionary d = p_variant; - if (d.has("source")) - source = d["source"]; if (d.has("signal")) signal = d["signal"]; - if (d.has("target")) - target = d["target"]; - if (d.has("method")) - method = d["method"]; + if (d.has("callable")) + callable = d["callable"]; if (d.has("flags")) flags = d["flags"]; if (d.has("binds")) @@ -655,18 +638,18 @@ void Object::get_method_list(List<MethodInfo> *p_list) const { } } -Variant Object::_call_bind(const Variant **p_args, int p_argcount, Variant::CallError &r_error) { +Variant Object::_call_bind(const Variant **p_args, int p_argcount, Callable::CallError &r_error) { if (p_argcount < 1) { - r_error.error = Variant::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS; + r_error.error = Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS; r_error.argument = 0; return Variant(); } - if (p_args[0]->get_type() != Variant::STRING) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; + if (p_args[0]->get_type() != Variant::STRING_NAME && p_args[0]->get_type() != Variant::STRING) { + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.argument = 0; - r_error.expected = Variant::STRING; + r_error.expected = Variant::STRING_NAME; return Variant(); } @@ -675,22 +658,22 @@ Variant Object::_call_bind(const Variant **p_args, int p_argcount, Variant::Call return call(method, &p_args[1], p_argcount - 1, r_error); } -Variant Object::_call_deferred_bind(const Variant **p_args, int p_argcount, Variant::CallError &r_error) { +Variant Object::_call_deferred_bind(const Variant **p_args, int p_argcount, Callable::CallError &r_error) { if (p_argcount < 1) { - r_error.error = Variant::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS; + r_error.error = Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS; r_error.argument = 0; return Variant(); } - if (p_args[0]->get_type() != Variant::STRING) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; + if (p_args[0]->get_type() != Variant::STRING_NAME && p_args[0]->get_type() != Variant::STRING) { + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.argument = 0; - r_error.expected = Variant::STRING; + r_error.expected = Variant::STRING_NAME; return Variant(); } - r_error.error = Variant::CallError::CALL_OK; + r_error.error = Callable::CallError::CALL_OK; StringName method = *p_args[0]; @@ -700,29 +683,29 @@ Variant Object::_call_deferred_bind(const Variant **p_args, int p_argcount, Vari } #ifdef DEBUG_ENABLED -static void _test_call_error(const StringName &p_func, const Variant::CallError &error) { +static void _test_call_error(const StringName &p_func, const Callable::CallError &error) { switch (error.error) { - case Variant::CallError::CALL_OK: - case Variant::CallError::CALL_ERROR_INVALID_METHOD: + case Callable::CallError::CALL_OK: + case Callable::CallError::CALL_ERROR_INVALID_METHOD: break; - case Variant::CallError::CALL_ERROR_INVALID_ARGUMENT: { + case Callable::CallError::CALL_ERROR_INVALID_ARGUMENT: { - ERR_FAIL_MSG("Error calling function: " + String(p_func) + " - Invalid type for argument " + itos(error.argument) + ", expected " + Variant::get_type_name(error.expected) + "."); + ERR_FAIL_MSG("Error calling function: " + String(p_func) + " - Invalid type for argument " + itos(error.argument) + ", expected " + Variant::get_type_name(Variant::Type(error.expected)) + "."); break; } - case Variant::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS: { + case Callable::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS: { ERR_FAIL_MSG("Error calling function: " + String(p_func) + " - Too many arguments, expected " + itos(error.argument) + "."); break; } - case Variant::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS: { + case Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS: { ERR_FAIL_MSG("Error calling function: " + String(p_func) + " - Too few arguments, expected " + itos(error.argument) + "."); break; } - case Variant::CallError::CALL_ERROR_INSTANCE_IS_NULL: + case Callable::CallError::CALL_ERROR_INSTANCE_IS_NULL: break; } } @@ -749,7 +732,7 @@ void Object::call_multilevel(const StringName &p_method, const Variant **p_args, //Variant ret; OBJ_DEBUG_LOCK - Variant::CallError error; + Callable::CallError error; if (script_instance) { script_instance->call_multilevel(p_method, p_args, p_argcount); @@ -769,7 +752,7 @@ void Object::call_multilevel_reversed(const StringName &p_method, const Variant MethodBind *method = ClassDB::get_method(get_class_name(), p_method); - Variant::CallError error; + Callable::CallError error; OBJ_DEBUG_LOCK if (method) { @@ -823,9 +806,9 @@ Variant Object::callv(const StringName &p_method, const Array &p_args) { } } - Variant::CallError ce; + Callable::CallError ce; Variant ret = call(p_method, argptrs, p_args.size(), ce); - if (ce.error != Variant::CallError::CALL_OK) { + if (ce.error != Callable::CallError::CALL_OK) { ERR_FAIL_V_MSG(Variant(), "Error calling method from 'callv': " + Variant::get_call_error_text(this, p_method, argptrs, p_args.size(), ce) + "."); } return ret; @@ -842,7 +825,7 @@ Variant Object::call(const StringName &p_name, VARIANT_ARG_DECLARE) { argc++; } - Variant::CallError error; + Callable::CallError error; Variant ret = call(p_name, argptr, argc, error); return ret; @@ -859,38 +842,38 @@ void Object::call_multilevel(const StringName &p_name, VARIANT_ARG_DECLARE) { argc++; } - //Variant::CallError error; + //Callable::CallError error; call_multilevel(p_name, argptr, argc); } -Variant Object::call(const StringName &p_method, const Variant **p_args, int p_argcount, Variant::CallError &r_error) { +Variant Object::call(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error) { - r_error.error = Variant::CallError::CALL_OK; + r_error.error = Callable::CallError::CALL_OK; if (p_method == CoreStringNames::get_singleton()->_free) { //free must be here, before anything, always ready #ifdef DEBUG_ENABLED if (p_argcount != 0) { r_error.argument = 0; - r_error.error = Variant::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS; + r_error.error = Callable::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS; return Variant(); } if (Object::cast_to<Reference>(this)) { r_error.argument = 0; - r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD; ERR_FAIL_V_MSG(Variant(), "Can't 'free' a reference."); } if (_lock_index.get() > 1) { r_error.argument = 0; - r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD; ERR_FAIL_V_MSG(Variant(), "Object is locked and can't be freed."); } #endif //must be here, must be before everything, memdelete(this); - r_error.error = Variant::CallError::CALL_OK; + r_error.error = Callable::CallError::CALL_OK; return Variant(); } @@ -901,15 +884,15 @@ Variant Object::call(const StringName &p_method, const Variant **p_args, int p_a //force jumptable switch (r_error.error) { - case Variant::CallError::CALL_OK: + case Callable::CallError::CALL_OK: return ret; - case Variant::CallError::CALL_ERROR_INVALID_METHOD: + case Callable::CallError::CALL_ERROR_INVALID_METHOD: break; - case Variant::CallError::CALL_ERROR_INVALID_ARGUMENT: - case Variant::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS: - case Variant::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS: + case Callable::CallError::CALL_ERROR_INVALID_ARGUMENT: + case Callable::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS: + case Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS: return ret; - case Variant::CallError::CALL_ERROR_INSTANCE_IS_NULL: { + case Callable::CallError::CALL_ERROR_INSTANCE_IS_NULL: { } } } @@ -917,10 +900,9 @@ Variant Object::call(const StringName &p_method, const Variant **p_args, int p_a MethodBind *method = ClassDB::get_method(get_class_name(), p_method); if (method) { - ret = method->call(this, p_args, p_argcount, r_error); } else { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD; } return ret; @@ -968,7 +950,7 @@ void Object::cancel_delete() { _predelete_ok = true; } -void Object::set_script_and_instance(const RefPtr &p_script, ScriptInstance *p_instance) { +void Object::set_script_and_instance(const Variant &p_script, ScriptInstance *p_instance) { //this function is not meant to be used in any of these ways ERR_FAIL_COND(p_script.is_null()); @@ -979,7 +961,7 @@ void Object::set_script_and_instance(const RefPtr &p_script, ScriptInstance *p_i script_instance = p_instance; } -void Object::set_script(const RefPtr &p_script) { +void Object::set_script(const Variant &p_script) { if (script == p_script) return; @@ -990,7 +972,7 @@ void Object::set_script(const RefPtr &p_script) { } script = p_script; - Ref<Script> s(script); + Ref<Script> s = script; if (!s.is_null()) { if (s->can_instance()) { @@ -1017,12 +999,12 @@ void Object::set_script_instance(ScriptInstance *p_instance) { script_instance = p_instance; if (p_instance) - script = p_instance->get_script().get_ref_ptr(); + script = p_instance->get_script(); else - script = RefPtr(); + script = Variant(); } -RefPtr Object::get_script() const { +Variant Object::get_script() const { return script; } @@ -1075,9 +1057,9 @@ Array Object::_get_method_list_bind() const { return ret; } -PoolVector<String> Object::_get_meta_list_bind() const { +Vector<String> Object::_get_meta_list_bind() const { - PoolVector<String> _metaret; + Vector<String> _metaret; List<Variant> keys; metadata.get_key_list(&keys); @@ -1103,7 +1085,7 @@ void Object::add_user_signal(const MethodInfo &p_signal) { ERR_FAIL_COND_MSG(p_signal.name == "", "Signal name cannot be empty."); ERR_FAIL_COND_MSG(ClassDB::has_signal(get_class_name(), p_signal.name), "User signal's name conflicts with a built-in signal of '" + get_class_name() + "'."); ERR_FAIL_COND_MSG(signal_map.has(p_signal.name), "Trying to add already existing signal '" + p_signal.name + "'."); - Signal s; + SignalData s; s.user = p_signal; signal_map[p_signal.name] = s; } @@ -1118,23 +1100,22 @@ bool Object::_has_user_signal(const StringName &p_name) const { struct _ObjectSignalDisconnectData { StringName signal; - Object *target; - StringName method; + Callable callable; }; -Variant Object::_emit_signal(const Variant **p_args, int p_argcount, Variant::CallError &r_error) { +Variant Object::_emit_signal(const Variant **p_args, int p_argcount, Callable::CallError &r_error) { - r_error.error = Variant::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS; + r_error.error = Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS; ERR_FAIL_COND_V(p_argcount < 1, Variant()); - if (p_args[0]->get_type() != Variant::STRING) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; + if (p_args[0]->get_type() != Variant::STRING_NAME && p_args[0]->get_type() != Variant::STRING) { + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.argument = 0; - r_error.expected = Variant::STRING; - ERR_FAIL_COND_V(p_args[0]->get_type() != Variant::STRING, Variant()); + r_error.expected = Variant::STRING_NAME; + ERR_FAIL_COND_V(p_args[0]->get_type() != Variant::STRING_NAME && p_args[0]->get_type() != Variant::STRING, Variant()); } - r_error.error = Variant::CallError::CALL_OK; + r_error.error = Callable::CallError::CALL_OK; StringName signal = *p_args[0]; @@ -1155,7 +1136,7 @@ Error Object::emit_signal(const StringName &p_name, const Variant **p_args, int if (_block_signals) return ERR_CANT_ACQUIRE_RESOURCE; //no emit, signals blocked - Signal *s = signal_map.getptr(p_name); + SignalData *s = signal_map.getptr(p_name); if (!s) { #ifdef DEBUG_ENABLED bool signal_is_valid = ClassDB::has_signal(get_class_name(), p_name); @@ -1171,7 +1152,7 @@ Error Object::emit_signal(const StringName &p_name, const Variant **p_args, int //copy on write will ensure that disconnecting the signal or even deleting the object will not affect the signal calling. //this happens automatically and will not change the performance of calling. //awesome, isn't it? - VMap<Signal::Target, Signal::Slot> slot_map = s->slot_map; + VMap<Callable, SignalData::Slot> slot_map = s->slot_map; int ssize = slot_map.size(); @@ -1185,7 +1166,7 @@ Error Object::emit_signal(const StringName &p_name, const Variant **p_args, int const Connection &c = slot_map.getv(i).conn; - Object *target = ObjectDB::get_instance(slot_map.getk(i)._id); + Object *target = c.callable.get_object(); if (!target) { // Target might have been deleted during signal callback, this is expected and OK. continue; @@ -1210,22 +1191,23 @@ Error Object::emit_signal(const StringName &p_name, const Variant **p_args, int } if (c.flags & CONNECT_DEFERRED) { - MessageQueue::get_singleton()->push_call(target->get_instance_id(), c.method, args, argc, true); + MessageQueue::get_singleton()->push_callable(c.callable, args, argc, true); } else { - Variant::CallError ce; + Callable::CallError ce; _emitting = true; - target->call(c.method, args, argc, ce); + Variant ret; + c.callable.call(args, argc, ret, ce); _emitting = false; - if (ce.error != Variant::CallError::CALL_OK) { + if (ce.error != Callable::CallError::CALL_OK) { #ifdef DEBUG_ENABLED if (c.flags & CONNECT_PERSIST && Engine::get_singleton()->is_editor_hint() && (script.is_null() || !Ref<Script>(script)->is_tool())) continue; #endif - if (ce.error == Variant::CallError::CALL_ERROR_INVALID_METHOD && !ClassDB::class_exists(target->get_class_name())) { + if (ce.error == Callable::CallError::CALL_ERROR_INVALID_METHOD && !ClassDB::class_exists(target->get_class_name())) { //most likely object is not initialized yet, do not throw error. } else { - ERR_PRINT("Error calling method from signal '" + String(p_name) + "': " + Variant::get_call_error_text(target, c.method, args, argc, ce) + "."); + ERR_PRINT("Error calling from signal '" + String(p_name) + "' to callable: " + Variant::get_callable_error_text(c.callable, args, argc, ce) + "."); err = ERR_METHOD_NOT_FOUND; } } @@ -1242,8 +1224,7 @@ Error Object::emit_signal(const StringName &p_name, const Variant **p_args, int _ObjectSignalDisconnectData dd; dd.signal = p_name; - dd.target = target; - dd.method = c.method; + dd.callable = c.callable; disconnect_data.push_back(dd); } } @@ -1251,7 +1232,8 @@ Error Object::emit_signal(const StringName &p_name, const Variant **p_args, int while (!disconnect_data.empty()) { const _ObjectSignalDisconnectData &dd = disconnect_data.front()->get(); - disconnect(dd.signal, dd.target, dd.method); + + _disconnect(dd.signal, dd.callable); disconnect_data.pop_front(); } @@ -1323,15 +1305,8 @@ Array Object::_get_signal_connection_list(const String &p_signal) const { for (List<Connection>::Element *E = conns.front(); E; E = E->next()) { Connection &c = E->get(); - if (c.signal == p_signal) { - Dictionary rc; - rc["signal"] = c.signal; - rc["method"] = c.method; - rc["source"] = c.source; - rc["target"] = c.target; - rc["binds"] = c.binds; - rc["flags"] = c.flags; - ret.push_back(rc); + if (c.signal.get_name() == p_signal) { + ret.push_back(c); } } @@ -1343,11 +1318,7 @@ Array Object::_get_incoming_connections() const { Array ret; int connections_amount = connections.size(); for (int idx_conn = 0; idx_conn < connections_amount; idx_conn++) { - Dictionary conn_data; - conn_data["source"] = connections[idx_conn].source; - conn_data["signal_name"] = connections[idx_conn].signal; - conn_data["method_name"] = connections[idx_conn].method; - ret.push_back(conn_data); + ret.push_back(connections[idx_conn]); } return ret; @@ -1381,7 +1352,7 @@ void Object::get_all_signal_connections(List<Connection> *p_connections) const { while ((S = signal_map.next(S))) { - const Signal *s = &signal_map[*S]; + const SignalData *s = &signal_map[*S]; for (int i = 0; i < s->slot_map.size(); i++) { @@ -1392,7 +1363,7 @@ void Object::get_all_signal_connections(List<Connection> *p_connections) const { void Object::get_signal_connection_list(const StringName &p_signal, List<Connection> *p_connections) const { - const Signal *s = signal_map.getptr(p_signal); + const SignalData *s = signal_map.getptr(p_signal); if (!s) return; //nothing @@ -1407,7 +1378,7 @@ int Object::get_persistent_signal_connection_count() const { while ((S = signal_map.next(S))) { - const Signal *s = &signal_map[*S]; + const SignalData *s = &signal_map[*S]; for (int i = 0; i < s->slot_map.size(); i++) { if (s->slot_map.getv(i).conn.flags & CONNECT_PERSIST) { @@ -1426,11 +1397,18 @@ void Object::get_signals_connected_to_this(List<Connection> *p_connections) cons } } -Error Object::connect(const StringName &p_signal, Object *p_to_object, const StringName &p_to_method, const Vector<Variant> &p_binds, uint32_t p_flags) { +Error Object::connect_compat(const StringName &p_signal, Object *p_to_object, const StringName &p_to_method, const Vector<Variant> &p_binds, uint32_t p_flags) { + + return connect(p_signal, Callable(p_to_object, p_to_method), p_binds, p_flags); +} +Error Object::connect(const StringName &p_signal, const Callable &p_callable, const Vector<Variant> &p_binds, uint32_t p_flags) { + + ERR_FAIL_COND_V(p_callable.is_null(), ERR_INVALID_PARAMETER); - ERR_FAIL_NULL_V(p_to_object, ERR_INVALID_PARAMETER); + Object *target_object = p_callable.get_object(); + ERR_FAIL_COND_V(!target_object, ERR_INVALID_PARAMETER); - Signal *s = signal_map.getptr(p_signal); + SignalData *s = signal_map.getptr(p_signal); if (!s) { bool signal_is_valid = ClassDB::has_signal(get_class_name(), p_signal); //check in script @@ -1449,33 +1427,32 @@ Error Object::connect(const StringName &p_signal, Object *p_to_object, const Str #endif } - ERR_FAIL_COND_V_MSG(!signal_is_valid, ERR_INVALID_PARAMETER, "In Object of type '" + String(get_class()) + "': Attempt to connect nonexistent signal '" + p_signal + "' to method '" + p_to_object->get_class() + "." + p_to_method + "'."); + ERR_FAIL_COND_V_MSG(!signal_is_valid, ERR_INVALID_PARAMETER, "In Object of type '" + String(get_class()) + "': Attempt to connect nonexistent signal '" + p_signal + "' to callable '" + p_callable + "'."); - signal_map[p_signal] = Signal(); + signal_map[p_signal] = SignalData(); s = &signal_map[p_signal]; } - Signal::Target target(p_to_object->get_instance_id(), p_to_method); + Callable target = p_callable; + if (s->slot_map.has(target)) { if (p_flags & CONNECT_REFERENCE_COUNTED) { s->slot_map[target].reference_count++; return OK; } else { - ERR_FAIL_V_MSG(ERR_INVALID_PARAMETER, "Signal '" + p_signal + "' is already connected to given method '" + p_to_method + "' in that object."); + ERR_FAIL_V_MSG(ERR_INVALID_PARAMETER, "Signal '" + p_signal + "' is already connected to given callable '" + p_callable + "' in that object."); } } - Signal::Slot slot; + SignalData::Slot slot; Connection conn; - conn.source = this; - conn.target = p_to_object; - conn.method = p_to_method; - conn.signal = p_signal; + conn.callable = target; + conn.signal = ::Signal(this, p_signal); conn.flags = p_flags; conn.binds = p_binds; slot.conn = conn; - slot.cE = p_to_object->connections.push_back(conn); + slot.cE = target_object->connections.push_back(conn); if (p_flags & CONNECT_REFERENCE_COUNTED) { slot.reference_count = 1; } @@ -1485,10 +1462,15 @@ Error Object::connect(const StringName &p_signal, Object *p_to_object, const Str return OK; } -bool Object::is_connected(const StringName &p_signal, Object *p_to_object, const StringName &p_to_method) const { +bool Object::is_connected_compat(const StringName &p_signal, Object *p_to_object, const StringName &p_to_method) const { + + return is_connected(p_signal, Callable(p_to_object, p_to_method)); +} + +bool Object::is_connected(const StringName &p_signal, const Callable &p_callable) const { - ERR_FAIL_NULL_V(p_to_object, false); - const Signal *s = signal_map.getptr(p_signal); + ERR_FAIL_COND_V(p_callable.is_null(), false); + const SignalData *s = signal_map.getptr(p_signal); if (!s) { bool signal_is_valid = ClassDB::has_signal(get_class_name(), p_signal); if (signal_is_valid) @@ -1500,28 +1482,35 @@ bool Object::is_connected(const StringName &p_signal, Object *p_to_object, const ERR_FAIL_V_MSG(false, "Nonexistent signal: " + p_signal + "."); } - Signal::Target target(p_to_object->get_instance_id(), p_to_method); + Callable target = p_callable; return s->slot_map.has(target); //const Map<Signal::Target,Signal::Slot>::Element *E = s->slot_map.find(target); //return (E!=NULL); } -void Object::disconnect(const StringName &p_signal, Object *p_to_object, const StringName &p_to_method) { +void Object::disconnect_compat(const StringName &p_signal, Object *p_to_object, const StringName &p_to_method) { - _disconnect(p_signal, p_to_object, p_to_method); + _disconnect(p_signal, Callable(p_to_object, p_to_method)); } -void Object::_disconnect(const StringName &p_signal, Object *p_to_object, const StringName &p_to_method, bool p_force) { - ERR_FAIL_NULL(p_to_object); - Signal *s = signal_map.getptr(p_signal); - ERR_FAIL_COND_MSG(!s, vformat("Nonexistent signal '%s' in %s.", p_signal, to_string())); +void Object::disconnect(const StringName &p_signal, const Callable &p_callable) { + _disconnect(p_signal, p_callable); +} - Signal::Target target(p_to_object->get_instance_id(), p_to_method); +void Object::_disconnect(const StringName &p_signal, const Callable &p_callable, bool p_force) { - ERR_FAIL_COND_MSG(!s->slot_map.has(target), "Disconnecting nonexistent signal '" + p_signal + "', slot: " + itos(target._id) + ":" + target.method + "."); + ERR_FAIL_COND(p_callable.is_null()); - Signal::Slot *slot = &s->slot_map[target]; + Object *target_object = p_callable.get_object(); + ERR_FAIL_COND(!target_object); + + SignalData *s = signal_map.getptr(p_signal); + ERR_FAIL_COND_MSG(!s, vformat("Nonexistent signal '%s' in %s.", p_signal, to_string())); + + ERR_FAIL_COND_MSG(!s->slot_map.has(p_callable), "Disconnecting nonexistent signal '" + p_signal + "', callable: " + p_callable + "."); + + SignalData::Slot *slot = &s->slot_map[p_callable]; if (!p_force) { slot->reference_count--; // by default is zero, if it was not referenced it will go below it @@ -1530,8 +1519,8 @@ void Object::_disconnect(const StringName &p_signal, Object *p_to_object, const } } - p_to_object->connections.erase(slot->cE); - s->slot_map.erase(target); + target_object->connections.erase(slot->cE); + s->slot_map.erase(p_callable); if (s->slot_map.empty() && ClassDB::has_signal(get_class_name(), p_signal)) { //not user signal, delete @@ -1680,7 +1669,7 @@ void Object::_bind_methods() { { MethodInfo mi; mi.name = "emit_signal"; - mi.arguments.push_back(PropertyInfo(Variant::STRING, "signal")); + mi.arguments.push_back(PropertyInfo(Variant::STRING_NAME, "signal")); ClassDB::bind_vararg_method(METHOD_FLAGS_DEFAULT, "emit_signal", &Object::_emit_signal, mi, varray(), false); } @@ -1688,7 +1677,7 @@ void Object::_bind_methods() { { MethodInfo mi; mi.name = "call"; - mi.arguments.push_back(PropertyInfo(Variant::STRING, "method")); + mi.arguments.push_back(PropertyInfo(Variant::STRING_NAME, "method")); ClassDB::bind_vararg_method(METHOD_FLAGS_DEFAULT, "call", &Object::_call_bind, mi); } @@ -1696,7 +1685,7 @@ void Object::_bind_methods() { { MethodInfo mi; mi.name = "call_deferred"; - mi.arguments.push_back(PropertyInfo(Variant::STRING, "method")); + mi.arguments.push_back(PropertyInfo(Variant::STRING_NAME, "method")); ClassDB::bind_vararg_method(METHOD_FLAGS_DEFAULT, "call_deferred", &Object::_call_deferred_bind, mi, varray(), false); } @@ -1711,9 +1700,9 @@ 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", "target", "method", "binds", "flags"), &Object::connect, DEFVAL(Array()), DEFVAL(0)); - ClassDB::bind_method(D_METHOD("disconnect", "signal", "target", "method"), &Object::disconnect); - ClassDB::bind_method(D_METHOD("is_connected", "signal", "target", "method"), &Object::is_connected); + ClassDB::bind_method(D_METHOD("connect", "signal", "callable", "binds", "flags"), &Object::connect, DEFVAL(Array()), DEFVAL(0)); + ClassDB::bind_method(D_METHOD("disconnect", "signal", "callable"), &Object::disconnect); + ClassDB::bind_method(D_METHOD("is_connected", "signal", "callable"), &Object::is_connected); ClassDB::bind_method(D_METHOD("set_block_signals", "enable"), &Object::set_block_signals); ClassDB::bind_method(D_METHOD("is_blocking_signals"), &Object::is_blocking_signals); @@ -1730,9 +1719,9 @@ void Object::_bind_methods() { ADD_SIGNAL(MethodInfo("script_changed")); BIND_VMETHOD(MethodInfo("_notification", PropertyInfo(Variant::INT, "what"))); - BIND_VMETHOD(MethodInfo(Variant::BOOL, "_set", PropertyInfo(Variant::STRING, "property"), PropertyInfo(Variant::NIL, "value"))); + BIND_VMETHOD(MethodInfo(Variant::BOOL, "_set", PropertyInfo(Variant::STRING_NAME, "property"), PropertyInfo(Variant::NIL, "value"))); #ifdef TOOLS_ENABLED - MethodInfo miget("_get", PropertyInfo(Variant::STRING, "property")); + MethodInfo miget("_get", PropertyInfo(Variant::STRING_NAME, "property")); miget.return_val.name = "Variant"; miget.return_val.usage |= PROPERTY_USAGE_NIL_IS_VARIANT; BIND_VMETHOD(miget); @@ -1830,7 +1819,7 @@ Variant::Type Object::get_static_property_type_indexed(const Vector<StringName> return Variant::NIL; } - Variant::CallError ce; + Callable::CallError ce; Variant check = Variant::construct(t, NULL, 0, ce); for (int i = 1; i < p_path.size(); i++) { @@ -1911,8 +1900,8 @@ void Object::set_script_instance_binding(int p_script_language_index, void *p_da _script_instance_bindings[p_script_language_index] = p_data; } -Object::Object() { - +void Object::_construct_object(bool p_reference) { + type_is_reference = p_reference; _class_ptr = NULL; _block_signals = false; _predelete_ok = 0; @@ -1933,6 +1922,14 @@ Object::Object() { _lock_index.init(1); #endif } +Object::Object(bool p_reference) { + _construct_object(p_reference); +} + +Object::Object() { + + _construct_object(false); +} Object::~Object() { @@ -1949,15 +1946,15 @@ Object::~Object() { while ((S = signal_map.next(NULL))) { - Signal *s = &signal_map[*S]; + SignalData *s = &signal_map[*S]; //brute force disconnect for performance int slot_count = s->slot_map.size(); - const VMap<Signal::Target, Signal::Slot>::Pair *slot_list = s->slot_map.get_array(); + const VMap<Callable, SignalData::Slot>::Pair *slot_list = s->slot_map.get_array(); for (int i = 0; i < slot_count; i++) { - slot_list[i].value.conn.target->connections.erase(slot_list[i].value.cE); + slot_list[i].value.conn.callable.get_object()->connections.erase(slot_list[i].value.cE); } signal_map.erase(*S); @@ -1967,7 +1964,7 @@ Object::~Object() { while (connections.size()) { Connection c = connections.front()->get(); - c.source->_disconnect(c.signal, c.target, c.method, true); + c.signal.get_object()->_disconnect(c.signal.get_name(), c.callable, true); } ObjectDB::remove_instance(this); @@ -1993,96 +1990,139 @@ void postinitialize_handler(Object *p_object) { p_object->_postinitialize(); } -HashMap<ObjectID, Object *> ObjectDB::instances; -uint64_t ObjectDB::instance_counter = 1; -HashMap<Object *, ObjectID, ObjectDB::ObjectPtrHash> ObjectDB::instance_checks; -ObjectID ObjectDB::add_instance(Object *p_object) { - - ERR_FAIL_COND_V(p_object->get_instance_id().is_valid(), ObjectID()); - - rw_lock->write_lock(); - ObjectID instance_id = ObjectID(++instance_counter); - instances[instance_id] = p_object; - instance_checks[p_object] = instance_id; - - rw_lock->write_unlock(); +void ObjectDB::debug_objects(DebugFunc p_func) { - return instance_id; + spin_lock.lock(); + for (uint32_t i = 0; i < slot_count; i++) { + uint32_t slot = object_slots[i].next_free; + p_func(object_slots[slot].object); + } + spin_lock.unlock(); } -void ObjectDB::remove_instance(Object *p_object) { +void Object::get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options) const { +} - rw_lock->write_lock(); +SpinLock ObjectDB::spin_lock; +uint32_t ObjectDB::slot_count = 0; +uint32_t ObjectDB::slot_max = 0; +ObjectDB::ObjectSlot *ObjectDB::object_slots = nullptr; +uint64_t ObjectDB::validator_counter = 0; - instances.erase(p_object->get_instance_id()); - instance_checks.erase(p_object); +int ObjectDB::get_object_count() { - rw_lock->write_unlock(); + return slot_count; } -Object *ObjectDB::get_instance(ObjectID p_instance_id) { - rw_lock->read_lock(); - Object **obj = instances.getptr(p_instance_id); - rw_lock->read_unlock(); +ObjectID ObjectDB::add_instance(Object *p_object) { - if (!obj) - return NULL; - return *obj; -} + spin_lock.lock(); + if (unlikely(slot_count == slot_max)) { -void ObjectDB::debug_objects(DebugFunc p_func) { + CRASH_COND(slot_count == (1 << OBJECTDB_SLOT_MAX_COUNT_BITS)); - rw_lock->read_lock(); + uint32_t new_slot_max = slot_max > 0 ? slot_max * 2 : 1; + object_slots = (ObjectSlot *)memrealloc(object_slots, sizeof(ObjectSlot) * new_slot_max); + for (uint32_t i = slot_max; i < new_slot_max; i++) { + object_slots[i].object = nullptr; + object_slots[i].is_reference = false; + object_slots[i].next_free = i; + object_slots[i].validator = 0; + } + slot_max = new_slot_max; + } + + uint32_t slot = object_slots[slot_count].next_free; + if (object_slots[slot].object != nullptr) { + spin_lock.unlock(); + ERR_FAIL_COND_V(object_slots[slot].object != nullptr, ObjectID()); + } + object_slots[slot].object = p_object; + object_slots[slot].is_reference = p_object->is_reference(); + validator_counter = (validator_counter + 1) & OBJECTDB_VALIDATOR_MASK; + if (unlikely(validator_counter == 0)) { + validator_counter = 1; + } + object_slots[slot].validator = validator_counter; - const ObjectID *K = NULL; - while ((K = instances.next(K))) { + uint64_t id = validator_counter; + id <<= OBJECTDB_SLOT_MAX_COUNT_BITS; + id |= uint64_t(slot); - p_func(instances[*K]); + if (p_object->is_reference()) { + id |= OBJECTDB_REFERENCE_BIT; } - rw_lock->read_unlock(); -} + slot_count++; -void Object::get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options) const { + spin_lock.unlock(); + + return ObjectID(id); } -int ObjectDB::get_object_count() { +void ObjectDB::remove_instance(Object *p_object) { + uint64_t t = p_object->get_instance_id(); + uint32_t slot = t & OBJECTDB_SLOT_MAX_COUNT_MASK; //slot is always valid on valid object - rw_lock->read_lock(); - int count = instances.size(); - rw_lock->read_unlock(); + spin_lock.lock(); - return count; -} +#ifdef DEBUG_ENABLED + + if (object_slots[slot].object != p_object) { + spin_lock.unlock(); + ERR_FAIL_COND(object_slots[slot].object != p_object); + } + { + uint64_t validator = (t >> OBJECTDB_SLOT_MAX_COUNT_BITS) & OBJECTDB_VALIDATOR_MASK; + if (object_slots[slot].validator != validator) { + spin_lock.unlock(); + ERR_FAIL_COND(object_slots[slot].validator != validator); + } + } + +#endif + //decrease slot count + slot_count--; + //set the free slot properly + object_slots[slot_count].next_free = slot; + //invalidate, so checks against it fail + object_slots[slot].validator = 0; + object_slots[slot].is_reference = false; + object_slots[slot].object = nullptr; -RWLock *ObjectDB::rw_lock = NULL; + spin_lock.unlock(); +} void ObjectDB::setup() { - rw_lock = RWLock::create(); + //nothing to do now } void ObjectDB::cleanup() { - rw_lock->write_lock(); - if (instances.size()) { + if (slot_count > 0) { + spin_lock.lock(); WARN_PRINT("ObjectDB Instances still exist!"); if (OS::get_singleton()->is_stdout_verbose()) { - const ObjectID *K = NULL; - while ((K = instances.next(K))) { + for (uint32_t i = 0; i < slot_count; i++) { + uint32_t slot = object_slots[i].next_free; + Object *obj = object_slots[slot].object; String node_name; - if (instances[*K]->is_class("Node")) - node_name = " - Node name: " + String(instances[*K]->call("get_name")); - if (instances[*K]->is_class("Resource")) - node_name = " - Resource name: " + String(instances[*K]->call("get_name")) + " Path: " + String(instances[*K]->call("get_path")); - print_line("Leaked instance: " + String(instances[*K]->get_class()) + ":" + itos(*K) + node_name); + if (obj->is_class("Node")) + node_name = " - Node name: " + String(obj->call("get_name")); + if (obj->is_class("Resource")) + node_name = " - Resource name: " + String(obj->call("get_name")) + " Path: " + String(obj->call("get_path")); + + uint64_t id = uint64_t(slot) | (uint64_t(object_slots[slot].validator) << OBJECTDB_VALIDATOR_BITS) | (object_slots[slot].is_reference ? OBJECTDB_REFERENCE_BIT : 0); + print_line("Leaked instance: " + String(obj->get_class()) + ":" + itos(id) + node_name); } } + spin_lock.unlock(); + } + + if (object_slots) { + memfree(object_slots); } - instances.clear(); - instance_checks.clear(); - rw_lock->write_unlock(); - memdelete(rw_lock); } diff --git a/core/object.h b/core/object.h index 312fe07a17..dc7d49f534 100644 --- a/core/object.h +++ b/core/object.h @@ -37,6 +37,7 @@ #include "core/object_id.h" #include "core/os/rw_lock.h" #include "core/set.h" +#include "core/spin_lock.h" #include "core/variant.h" #include "core/vmap.h" @@ -412,18 +413,15 @@ public: struct Connection { - Object *source; - StringName signal; - Object *target; - StringName method; + ::Signal signal; + Callable callable; + uint32_t flags; Vector<Variant> binds; bool operator<(const Connection &p_conn) const; operator Variant() const; Connection() { - source = NULL; - target = NULL; flags = 0; } Connection(const Variant &p_variant); @@ -440,21 +438,7 @@ private: friend bool predelete_handler(Object *); friend void postinitialize_handler(Object *); - struct Signal { - - struct Target { - - ObjectID _id; - StringName method; - - _FORCE_INLINE_ bool operator<(const Target &p_target) const { return (_id == p_target._id) ? (method < p_target.method) : (_id < p_target._id); } - - Target(const ObjectID &p_id, const StringName &p_method) : - _id(p_id), - method(p_method) { - } - Target() { _id = ObjectID(); } - }; + struct SignalData { struct Slot { @@ -465,11 +449,11 @@ private: }; MethodInfo user; - VMap<Target, Slot> slot_map; - Signal() {} + VMap<Callable, Slot> slot_map; + SignalData() {} }; - HashMap<StringName, Signal> signal_map; + HashMap<StringName, SignalData> signal_map; List<Connection> connections; #ifdef DEBUG_ENABLED SafeRefCount _lock_index; @@ -488,14 +472,14 @@ private: Set<String> editor_section_folding; #endif ScriptInstance *script_instance; - RefPtr script; + Variant script; //reference does not yet exist, store it in a Dictionary metadata; mutable StringName _class_name; mutable const StringName *_class_ptr; void _add_user_signal(const String &p_name, const Array &p_args = Array()); bool _has_user_signal(const StringName &p_name) const; - Variant _emit_signal(const Variant **p_args, int p_argcount, Variant::CallError &r_error); + Variant _emit_signal(const Variant **p_args, int p_argcount, Callable::CallError &r_error); Array _get_signal_list() const; Array _get_signal_connection_list(const String &p_signal) const; Array _get_incoming_connections() const; @@ -506,9 +490,13 @@ private: void property_list_changed_notify(); + _FORCE_INLINE_ void _construct_object(bool p_reference); + friend class Reference; + bool type_is_reference = false; uint32_t instance_binding_count; void *_script_instance_bindings[MAX_SCRIPT_INSTANCE_BINDINGS]; + Object(bool p_reference); protected: virtual void _initialize_classv() { initialize_class(); } @@ -549,8 +537,8 @@ protected: //Variant _call_bind(const StringName& p_name, const Variant& p_arg1 = Variant(), const Variant& p_arg2 = Variant(), const Variant& p_arg3 = Variant(), const Variant& p_arg4 = Variant()); //void _call_deferred_bind(const StringName& p_name, const Variant& p_arg1 = Variant(), const Variant& p_arg2 = Variant(), const Variant& p_arg3 = Variant(), const Variant& p_arg4 = Variant()); - Variant _call_bind(const Variant **p_args, int p_argcount, Variant::CallError &r_error); - Variant _call_deferred_bind(const Variant **p_args, int p_argcount, Variant::CallError &r_error); + Variant _call_bind(const Variant **p_args, int p_argcount, Callable::CallError &r_error); + Variant _call_deferred_bind(const Variant **p_args, int p_argcount, Callable::CallError &r_error); virtual const StringName *_get_class_namev() const { if (!_class_name) @@ -558,7 +546,7 @@ protected: return &_class_name; } - PoolVector<String> _get_meta_list_bind() const; + Vector<String> _get_meta_list_bind() const; Array _get_property_list_bind() const; Array _get_method_list_bind() const; @@ -567,7 +555,7 @@ protected: friend class ClassDB; virtual void _validate_property(PropertyInfo &property) const; - void _disconnect(const StringName &p_signal, Object *p_to_object, const StringName &p_to_method, bool p_force = false); + void _disconnect(const StringName &p_signal, const Callable &p_callable, bool p_force = false); public: //should be protected, but bug in clang++ static void initialize_class(); @@ -665,7 +653,7 @@ public: bool has_method(const StringName &p_method) const; void get_method_list(List<MethodInfo> *p_list) const; Variant callv(const StringName &p_method, const Array &p_args); - virtual Variant call(const StringName &p_method, const Variant **p_args, int p_argcount, Variant::CallError &r_error); + virtual Variant call(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error); virtual void call_multilevel(const StringName &p_method, const Variant **p_args, int p_argcount); virtual void call_multilevel_reversed(const StringName &p_method, const Variant **p_args, int p_argcount); Variant call(const StringName &p_name, VARIANT_ARG_LIST); // C++ helper @@ -680,8 +668,8 @@ public: /* SCRIPT */ - void set_script(const RefPtr &p_script); - RefPtr get_script() const; + void set_script(const Variant &p_script); + Variant get_script() const; /* SCRIPT */ @@ -700,7 +688,7 @@ public: void set_script_instance(ScriptInstance *p_instance); _FORCE_INLINE_ ScriptInstance *get_script_instance() const { return script_instance; } - void set_script_and_instance(const RefPtr &p_script, ScriptInstance *p_instance); //some script languages can't control instance creation, so this function eases the process + void set_script_and_instance(const Variant &p_script, ScriptInstance *p_instance); //some script languages can't control instance creation, so this function eases the process void add_user_signal(const MethodInfo &p_signal); Error emit_signal(const StringName &p_name, VARIANT_ARG_LIST); @@ -711,9 +699,13 @@ 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, Object *p_to_object, const StringName &p_to_method, const Vector<Variant> &p_binds = Vector<Variant>(), uint32_t p_flags = 0); - void disconnect(const StringName &p_signal, Object *p_to_object, const StringName &p_to_method); - bool is_connected(const StringName &p_signal, Object *p_to_object, const StringName &p_to_method) const; + Error connect_compat(const StringName &p_signal, Object *p_to_object, const StringName &p_to_method, const Vector<Variant> &p_binds = Vector<Variant>(), uint32_t p_flags = 0); + void disconnect_compat(const StringName &p_signal, Object *p_to_object, const StringName &p_to_method); + bool is_connected_compat(const StringName &p_signal, Object *p_to_object, const StringName &p_to_method) const; + + Error connect(const StringName &p_signal, const Callable &p_callable, const Vector<Variant> &p_binds = Vector<Variant>(), 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; void call_deferred(const StringName &p_method, VARIANT_ARG_LIST); void set_deferred(const StringName &p_property, const Variant &p_value); @@ -751,6 +743,7 @@ public: void clear_internal_resource_paths(); + _ALWAYS_INLINE_ bool is_reference() const { return type_is_reference; } Object(); virtual ~Object(); }; @@ -760,49 +753,63 @@ void postinitialize_handler(Object *p_object); class ObjectDB { - struct ObjectPtrHash { - - static _FORCE_INLINE_ uint32_t hash(const Object *p_obj) { - - union { - const Object *p; - unsigned long i; - } u; - u.p = p_obj; - return HashMapHasherDefault::hash((uint64_t)u.i); - } +//this needs to add up to 63, 1 bit is for reference +#define OBJECTDB_VALIDATOR_BITS 39 +#define OBJECTDB_VALIDATOR_MASK ((uint64_t(1) << OBJECTDB_VALIDATOR_BITS) - 1) +#define OBJECTDB_SLOT_MAX_COUNT_BITS 24 +#define OBJECTDB_SLOT_MAX_COUNT_MASK ((uint64_t(1) << OBJECTDB_SLOT_MAX_COUNT_BITS) - 1) +#define OBJECTDB_REFERENCE_BIT (uint64_t(1) << (OBJECTDB_SLOT_MAX_COUNT_BITS + OBJECTDB_VALIDATOR_BITS)) + + struct ObjectSlot { //128 bits per slot + uint64_t validator : OBJECTDB_VALIDATOR_BITS; + uint64_t next_free : OBJECTDB_SLOT_MAX_COUNT_BITS; + uint64_t is_reference : 1; + Object *object; }; - static HashMap<ObjectID, Object *> instances; - static HashMap<Object *, ObjectID, ObjectPtrHash> instance_checks; + static SpinLock spin_lock; + static uint32_t slot_count; + static uint32_t slot_max; + static ObjectSlot *object_slots; + static uint64_t validator_counter; - static uint64_t instance_counter; friend class Object; friend void unregister_core_types(); - - static RWLock *rw_lock; static void cleanup(); + static ObjectID add_instance(Object *p_object); static void remove_instance(Object *p_object); + friend void register_core_types(); static void setup(); public: typedef void (*DebugFunc)(Object *p_obj); - static Object *get_instance(ObjectID p_instance_id); - static void debug_objects(DebugFunc p_func); - static int get_object_count(); + _ALWAYS_INLINE_ static Object *get_instance(ObjectID p_instance_id) { + + uint64_t id = p_instance_id; + uint32_t slot = id & OBJECTDB_SLOT_MAX_COUNT_MASK; - _FORCE_INLINE_ static bool instance_validate(Object *p_ptr) { - rw_lock->read_lock(); + ERR_FAIL_COND_V(slot >= slot_max, nullptr); //this should never happen unless RID is corrupted - bool exists = instance_checks.has(p_ptr); + spin_lock.lock(); - rw_lock->read_unlock(); + uint64_t validator = (id >> OBJECTDB_SLOT_MAX_COUNT_BITS) & OBJECTDB_VALIDATOR_MASK; - return exists; + if (unlikely(object_slots[slot].validator != validator)) { + spin_lock.unlock(); + return nullptr; + } + + Object *object = object_slots[slot].object; + + spin_lock.unlock(); + + return object; } + static void debug_objects(DebugFunc p_func); + static int get_object_count(); }; //needed by macros diff --git a/core/object_id.h b/core/object_id.h index f0ff2a24f5..63b0c27af8 100644 --- a/core/object_id.h +++ b/core/object_id.h @@ -1,3 +1,33 @@ +/*************************************************************************/ +/* object_id.h */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* https://godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 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 OBJECT_ID_H #define OBJECT_ID_H @@ -12,6 +42,7 @@ class ObjectID { uint64_t id = 0; public: + _ALWAYS_INLINE_ bool is_reference() const { return (id & (uint64_t(1) << 63)) != 0; } _ALWAYS_INLINE_ bool is_valid() const { return id != 0; } _ALWAYS_INLINE_ bool is_null() const { return id == 0; } _ALWAYS_INLINE_ operator uint64_t() const { return id; } diff --git a/core/os/file_access.cpp b/core/os/file_access.cpp index 2917351a2f..30cfaa7617 100644 --- a/core/os/file_access.cpp +++ b/core/os/file_access.cpp @@ -408,17 +408,17 @@ int FileAccess::get_buffer(uint8_t *p_dst, int p_length) const { } String FileAccess::get_as_utf8_string() const { - PoolVector<uint8_t> sourcef; + Vector<uint8_t> sourcef; int len = get_len(); sourcef.resize(len + 1); - PoolVector<uint8_t>::Write w = sourcef.write(); - int r = get_buffer(w.ptr(), len); + uint8_t *w = sourcef.ptrw(); + int r = get_buffer(w, len); ERR_FAIL_COND_V(r != len, String()); w[len] = 0; String s; - if (s.parse_utf8((const char *)w.ptr())) { + if (s.parse_utf8((const char *)w)) { return String(); } return s; diff --git a/core/os/input_event.cpp b/core/os/input_event.cpp index 2e863c9c76..3cb9c2c1c2 100644 --- a/core/os/input_event.cpp +++ b/core/os/input_event.cpp @@ -541,7 +541,7 @@ void InputEventMouseButton::_bind_methods() { ClassDB::bind_method(D_METHOD("set_doubleclick", "doubleclick"), &InputEventMouseButton::set_doubleclick); ClassDB::bind_method(D_METHOD("is_doubleclick"), &InputEventMouseButton::is_doubleclick); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "factor"), "set_factor", "get_factor"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "factor"), "set_factor", "get_factor"); ADD_PROPERTY(PropertyInfo(Variant::INT, "button_index"), "set_button_index", "get_button_index"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "pressed"), "set_pressed", "is_pressed"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "doubleclick"), "set_doubleclick", "is_doubleclick"); @@ -702,7 +702,7 @@ void InputEventMouseMotion::_bind_methods() { ClassDB::bind_method(D_METHOD("get_speed"), &InputEventMouseMotion::get_speed); ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "tilt"), "set_tilt", "get_tilt"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "pressure"), "set_pressure", "get_pressure"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "pressure"), "set_pressure", "get_pressure"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "relative"), "set_relative", "get_relative"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "speed"), "set_speed", "get_speed"); } @@ -780,7 +780,7 @@ void InputEventJoypadMotion::_bind_methods() { ClassDB::bind_method(D_METHOD("get_axis_value"), &InputEventJoypadMotion::get_axis_value); ADD_PROPERTY(PropertyInfo(Variant::INT, "axis"), "set_axis", "get_axis"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "axis_value"), "set_axis_value", "get_axis_value"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "axis_value"), "set_axis_value", "get_axis_value"); } InputEventJoypadMotion::InputEventJoypadMotion() { @@ -861,7 +861,7 @@ void InputEventJoypadButton::_bind_methods() { // ClassDB::bind_method(D_METHOD("is_pressed"), &InputEventJoypadButton::is_pressed); ADD_PROPERTY(PropertyInfo(Variant::INT, "button_index"), "set_button_index", "get_button_index"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "pressure"), "set_pressure", "get_pressure"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "pressure"), "set_pressure", "get_pressure"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "pressed"), "set_pressed", "is_pressed"); } @@ -1098,9 +1098,9 @@ void InputEventAction::_bind_methods() { // ClassDB::bind_method(D_METHOD("is_action", "name"), &InputEventAction::is_action); - ADD_PROPERTY(PropertyInfo(Variant::STRING, "action"), "set_action", "get_action"); + ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "action"), "set_action", "get_action"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "pressed"), "set_pressed", "is_pressed"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "strength", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_strength", "get_strength"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "strength", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_strength", "get_strength"); } InputEventAction::InputEventAction() { @@ -1162,7 +1162,7 @@ void InputEventMagnifyGesture::_bind_methods() { ClassDB::bind_method(D_METHOD("set_factor", "factor"), &InputEventMagnifyGesture::set_factor); ClassDB::bind_method(D_METHOD("get_factor"), &InputEventMagnifyGesture::get_factor); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "factor"), "set_factor", "get_factor"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "factor"), "set_factor", "get_factor"); } InputEventMagnifyGesture::InputEventMagnifyGesture() { diff --git a/core/os/main_loop.cpp b/core/os/main_loop.cpp index 5ecdd74a4b..ab43ce4af7 100644 --- a/core/os/main_loop.cpp +++ b/core/os/main_loop.cpp @@ -44,9 +44,9 @@ void MainLoop::_bind_methods() { BIND_VMETHOD(MethodInfo("_input_event", PropertyInfo(Variant::OBJECT, "event", PROPERTY_HINT_RESOURCE_TYPE, "InputEvent"))); BIND_VMETHOD(MethodInfo("_input_text", PropertyInfo(Variant::STRING, "text"))); BIND_VMETHOD(MethodInfo("_initialize")); - BIND_VMETHOD(MethodInfo(Variant::BOOL, "_iteration", PropertyInfo(Variant::REAL, "delta"))); - BIND_VMETHOD(MethodInfo(Variant::BOOL, "_idle", PropertyInfo(Variant::REAL, "delta"))); - BIND_VMETHOD(MethodInfo("_drop_files", PropertyInfo(Variant::POOL_STRING_ARRAY, "files"), PropertyInfo(Variant::INT, "from_screen"))); + BIND_VMETHOD(MethodInfo(Variant::BOOL, "_iteration", PropertyInfo(Variant::FLOAT, "delta"))); + BIND_VMETHOD(MethodInfo(Variant::BOOL, "_idle", PropertyInfo(Variant::FLOAT, "delta"))); + BIND_VMETHOD(MethodInfo("_drop_files", PropertyInfo(Variant::PACKED_STRING_ARRAY, "files"), PropertyInfo(Variant::INT, "from_screen"))); BIND_VMETHOD(MethodInfo("_finalize")); BIND_VMETHOD(MethodInfo("_global_menu_action", PropertyInfo(Variant::NIL, "id"), PropertyInfo(Variant::NIL, "meta"))); @@ -95,7 +95,7 @@ void MainLoop::input_event(const Ref<InputEvent> &p_event) { void MainLoop::init() { if (init_script.is_valid()) - set_script(init_script.get_ref_ptr()); + set_script(init_script); if (get_script_instance()) get_script_instance()->call("_initialize"); @@ -131,6 +131,6 @@ void MainLoop::finish() { if (get_script_instance()) { get_script_instance()->call("_finalize"); - set_script(RefPtr()); //clear script + set_script(Variant()); //clear script } } diff --git a/core/os/memory.h b/core/os/memory.h index e45f97e0c8..207149b57e 100644 --- a/core/os/memory.h +++ b/core/os/memory.h @@ -143,7 +143,7 @@ T *memnew_arr_template(size_t p_elements, const char *p_descr = "") { if (p_elements == 0) return 0; /** overloading operator new[] cannot be done , because it may not return the real allocated address (it may pad the 'element count' before the actual array). Because of that, it must be done by hand. This is the - same strategy used by std::vector, and the PoolVector class, so it should be safe.*/ + same strategy used by std::vector, and the Vector class, so it should be safe.*/ size_t len = sizeof(T) * p_elements; uint64_t *mem = (uint64_t *)Memory::alloc_static(len, true); diff --git a/core/os/midi_driver.cpp b/core/os/midi_driver.cpp index 3e020a1585..6ebec50ff0 100644 --- a/core/os/midi_driver.cpp +++ b/core/os/midi_driver.cpp @@ -121,9 +121,9 @@ void MIDIDriver::receive_input_packet(uint64_t timestamp, uint8_t *data, uint32_ id->parse_input_event(event); } -PoolStringArray MIDIDriver::get_connected_inputs() { +PackedStringArray MIDIDriver::get_connected_inputs() { - PoolStringArray list; + PackedStringArray list; return list; } diff --git a/core/os/midi_driver.h b/core/os/midi_driver.h index 26dbdce151..4f53feb43e 100644 --- a/core/os/midi_driver.h +++ b/core/os/midi_driver.h @@ -50,7 +50,7 @@ public: virtual Error open() = 0; virtual void close() = 0; - virtual PoolStringArray get_connected_inputs(); + virtual PackedStringArray get_connected_inputs(); static void receive_input_packet(uint64_t timestamp, uint8_t *data, uint32_t length); diff --git a/core/os/os.cpp b/core/os/os.cpp index 13be4a5c37..9a65d537ac 100644 --- a/core/os/os.cpp +++ b/core/os/os.cpp @@ -416,10 +416,6 @@ uint64_t OS::get_static_memory_usage() const { return Memory::get_mem_usage(); } -uint64_t OS::get_dynamic_memory_usage() const { - - return MemoryPool::total_memory; -} uint64_t OS::get_static_memory_peak_usage() const { @@ -586,16 +582,6 @@ bool OS::is_vsync_via_compositor_enabled() const { return _vsync_via_compositor; } -OS::PowerState OS::get_power_state() { - return POWERSTATE_UNKNOWN; -} -int OS::get_power_seconds_left() { - return -1; -} -int OS::get_power_percent_left() { - return -1; -} - void OS::set_has_server_feature_callback(HasServerFeatureCallback p_callback) { has_server_feature_callback = p_callback; @@ -722,12 +708,12 @@ List<String> OS::get_restart_on_exit_arguments() const { return restart_commandline; } -PoolStringArray OS::get_connected_midi_inputs() { +PackedStringArray OS::get_connected_midi_inputs() { if (MIDIDriver::get_singleton()) return MIDIDriver::get_singleton()->get_connected_inputs(); - PoolStringArray list; + PackedStringArray list; return list; } diff --git a/core/os/os.h b/core/os/os.h index 1bb910cb0d..77391c3a8b 100644 --- a/core/os/os.h +++ b/core/os/os.h @@ -78,14 +78,6 @@ public: typedef void (*ImeCallback)(void *p_inp, String p_text, Point2 p_selection); typedef bool (*HasServerFeatureCallback)(const String &p_feature); - enum PowerState { - POWERSTATE_UNKNOWN, /**< cannot determine power status */ - POWERSTATE_ON_BATTERY, /**< Not plugged in, running on the battery */ - POWERSTATE_NO_BATTERY, /**< Plugged in, no battery available */ - POWERSTATE_CHARGING, /**< Plugged in, charging battery */ - POWERSTATE_CHARGED /**< Plugged in, battery charged */ - }; - enum RenderThreadMode { RENDER_THREAD_UNSAFE, @@ -193,7 +185,7 @@ public: virtual int get_audio_driver_count() const; virtual const char *get_audio_driver_name(int p_driver) const; - virtual PoolStringArray get_connected_midi_inputs(); + virtual PackedStringArray get_connected_midi_inputs(); virtual void open_midi_inputs(); virtual void close_midi_inputs(); @@ -398,7 +390,6 @@ public: virtual uint64_t get_static_memory_usage() const; virtual uint64_t get_static_memory_peak_usage() const; - virtual uint64_t get_dynamic_memory_usage() const; virtual uint64_t get_free_static_memory() const; RenderThreadMode get_render_thread_mode() const { return _render_thread_mode; } @@ -517,10 +508,6 @@ public: void set_vsync_via_compositor(bool p_enable); bool is_vsync_via_compositor_enabled() const; - virtual OS::PowerState get_power_state(); - virtual int get_power_seconds_left(); - virtual int get_power_percent_left(); - virtual void force_process_input(){}; bool has_feature(const String &p_feature); @@ -542,6 +529,4 @@ public: virtual ~OS(); }; -VARIANT_ENUM_CAST(OS::PowerState); - #endif diff --git a/core/packed_data_container.cpp b/core/packed_data_container.cpp index f8f51c4c75..b82a366ef2 100644 --- a/core/packed_data_container.cpp +++ b/core/packed_data_container.cpp @@ -80,20 +80,20 @@ Variant PackedDataContainer::_iter_get_ofs(const Variant &p_iter, uint32_t p_off if (pos < 0 || pos >= size) return Variant(); - PoolVector<uint8_t>::Read rd = data.read(); + const uint8_t *rd = data.ptr(); const uint8_t *r = &rd[p_offset]; uint32_t type = decode_uint32(r); bool err = false; if (type == TYPE_ARRAY) { - uint32_t vpos = decode_uint32(rd.ptr() + p_offset + 8 + pos * 4); - return _get_at_ofs(vpos, rd.ptr(), err); + uint32_t vpos = decode_uint32(rd + p_offset + 8 + pos * 4); + return _get_at_ofs(vpos, rd, err); } else if (type == TYPE_DICT) { - uint32_t vpos = decode_uint32(rd.ptr() + p_offset + 8 + pos * 12 + 4); - return _get_at_ofs(vpos, rd.ptr(), err); + uint32_t vpos = decode_uint32(rd + p_offset + 8 + pos * 12 + 4); + return _get_at_ofs(vpos, rd, err); } else { ERR_FAIL_V(Variant()); } @@ -127,7 +127,7 @@ Variant PackedDataContainer::_get_at_ofs(uint32_t p_ofs, const uint8_t *p_buf, b uint32_t PackedDataContainer::_type_at_ofs(uint32_t p_ofs) const { - PoolVector<uint8_t>::Read rd = data.read(); + const uint8_t *rd = data.ptr(); const uint8_t *r = &rd[p_ofs]; uint32_t type = decode_uint32(r); @@ -136,8 +136,8 @@ uint32_t PackedDataContainer::_type_at_ofs(uint32_t p_ofs) const { int PackedDataContainer::_size(uint32_t p_ofs) const { - PoolVector<uint8_t>::Read rd = data.read(); - ERR_FAIL_COND_V(!rd.ptr(), 0); + const uint8_t *rd = data.ptr(); + ERR_FAIL_COND_V(!rd, 0); const uint8_t *r = &rd[p_ofs]; uint32_t type = decode_uint32(r); @@ -157,7 +157,7 @@ int PackedDataContainer::_size(uint32_t p_ofs) const { Variant PackedDataContainer::_key_at_ofs(uint32_t p_ofs, const Variant &p_key, bool &err) const { - PoolVector<uint8_t>::Read rd = data.read(); + const uint8_t *rd = data.ptr(); const uint8_t *r = &rd[p_ofs]; uint32_t type = decode_uint32(r); @@ -172,7 +172,7 @@ Variant PackedDataContainer::_key_at_ofs(uint32_t p_ofs, const Variant &p_key, b return Variant(); } uint32_t ofs = decode_uint32(r + 8 + 4 * idx); - return _get_at_ofs(ofs, rd.ptr(), err); + return _get_at_ofs(ofs, rd, err); } else { err = true; @@ -188,12 +188,12 @@ Variant PackedDataContainer::_key_at_ofs(uint32_t p_ofs, const Variant &p_key, b for (uint32_t i = 0; i < len; i++) { uint32_t khash = decode_uint32(r + 8 + i * 12 + 0); if (khash == hash) { - Variant key = _get_at_ofs(decode_uint32(r + 8 + i * 12 + 4), rd.ptr(), err); + Variant key = _get_at_ofs(decode_uint32(r + 8 + i * 12 + 4), rd, err); if (err) return Variant(); if (key == p_key) { //key matches, return value - return _get_at_ofs(decode_uint32(r + 8 + i * 12 + 8), rd.ptr(), err); + return _get_at_ofs(decode_uint32(r + 8 + i * 12 + 8), rd, err); } found = true; } else { @@ -225,12 +225,12 @@ uint32_t PackedDataContainer::_pack(const Variant &p_data, Vector<uint8_t> &tmpd string_cache[s] = tmpdata.size(); - FALLTHROUGH; - }; + [[fallthrough]]; + } case Variant::NIL: case Variant::BOOL: case Variant::INT: - case Variant::REAL: + case Variant::FLOAT: case Variant::VECTOR2: case Variant::RECT2: case Variant::VECTOR3: @@ -240,13 +240,16 @@ uint32_t PackedDataContainer::_pack(const Variant &p_data, Vector<uint8_t> &tmpd case Variant::AABB: case Variant::BASIS: case Variant::TRANSFORM: - case Variant::POOL_BYTE_ARRAY: - case Variant::POOL_INT_ARRAY: - case Variant::POOL_REAL_ARRAY: - case Variant::POOL_STRING_ARRAY: - case Variant::POOL_VECTOR2_ARRAY: - case Variant::POOL_VECTOR3_ARRAY: - case Variant::POOL_COLOR_ARRAY: + case Variant::PACKED_BYTE_ARRAY: + case Variant::PACKED_INT32_ARRAY: + case Variant::PACKED_INT64_ARRAY: + case Variant::PACKED_FLOAT32_ARRAY: + case Variant::PACKED_FLOAT64_ARRAY: + case Variant::PACKED_STRING_ARRAY: + case Variant::PACKED_VECTOR2_ARRAY: + case Variant::PACKED_VECTOR3_ARRAY: + case Variant::PACKED_COLOR_ARRAY: + case Variant::STRING_NAME: case Variant::NODE_PATH: { uint32_t pos = tmpdata.size(); @@ -335,19 +338,19 @@ Error PackedDataContainer::pack(const Variant &p_data) { _pack(p_data, tmpdata, string_cache); datalen = tmpdata.size(); data.resize(tmpdata.size()); - PoolVector<uint8_t>::Write w = data.write(); - copymem(w.ptr(), tmpdata.ptr(), tmpdata.size()); + uint8_t *w = data.ptrw(); + copymem(w, tmpdata.ptr(), tmpdata.size()); return OK; } -void PackedDataContainer::_set_data(const PoolVector<uint8_t> &p_data) { +void PackedDataContainer::_set_data(const Vector<uint8_t> &p_data) { data = p_data; datalen = data.size(); } -PoolVector<uint8_t> PackedDataContainer::_get_data() const { +Vector<uint8_t> PackedDataContainer::_get_data() const { return data; } @@ -375,7 +378,7 @@ void PackedDataContainer::_bind_methods() { ClassDB::bind_method(D_METHOD("pack", "value"), &PackedDataContainer::pack); ClassDB::bind_method(D_METHOD("size"), &PackedDataContainer::size); - ADD_PROPERTY(PropertyInfo(Variant::POOL_BYTE_ARRAY, "__data__"), "_set_data", "_get_data"); + ADD_PROPERTY(PropertyInfo(Variant::PACKED_BYTE_ARRAY, "__data__"), "_set_data", "_get_data"); } PackedDataContainer::PackedDataContainer() { diff --git a/core/packed_data_container.h b/core/packed_data_container.h index b534169077..852fdcd0d3 100644 --- a/core/packed_data_container.h +++ b/core/packed_data_container.h @@ -48,7 +48,7 @@ class PackedDataContainer : public Resource { bool operator<(const DictKey &p_key) const { return hash < p_key.hash; } }; - PoolVector<uint8_t> data; + Vector<uint8_t> data; int datalen; uint32_t _pack(const Variant &p_data, Vector<uint8_t> &tmpdata, Map<String, uint32_t> &string_cache); @@ -68,8 +68,8 @@ class PackedDataContainer : public Resource { int _size(uint32_t p_ofs) const; protected: - void _set_data(const PoolVector<uint8_t> &p_data); - PoolVector<uint8_t> _get_data() const; + void _set_data(const Vector<uint8_t> &p_data); + Vector<uint8_t> _get_data() const; static void _bind_methods(); public: diff --git a/core/pool_vector.h b/core/pool_vector.h deleted file mode 100644 index 01c40a237d..0000000000 --- a/core/pool_vector.h +++ /dev/null @@ -1,648 +0,0 @@ -/*************************************************************************/ -/* pool_vector.h */ -/*************************************************************************/ -/* This file is part of: */ -/* GODOT ENGINE */ -/* https://godotengine.org */ -/*************************************************************************/ -/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */ -/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */ -/* */ -/* Permission is hereby granted, free of charge, to any person obtaining */ -/* a copy of this software and associated documentation files (the */ -/* "Software"), to deal in the Software without restriction, including */ -/* without limitation the rights to use, copy, modify, merge, publish, */ -/* distribute, sublicense, and/or sell copies of the Software, and to */ -/* permit persons to whom the Software is furnished to do so, subject to */ -/* the following conditions: */ -/* */ -/* The above copyright notice and this permission notice shall be */ -/* included in all copies or substantial portions of the Software. */ -/* */ -/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ -/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ -/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ -/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ -/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 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 POOL_VECTOR_H -#define POOL_VECTOR_H - -#include "core/os/copymem.h" -#include "core/os/memory.h" -#include "core/os/rw_lock.h" -#include "core/pool_allocator.h" -#include "core/safe_refcount.h" -#include "core/ustring.h" - -struct MemoryPool { - - //avoid accessing these directly, must be public for template access - - static PoolAllocator *memory_pool; - static uint8_t *pool_memory; - static size_t *pool_size; - - struct Alloc { - - SafeRefCount refcount; - uint32_t lock; - void *mem; - PoolAllocator::ID pool_id; - size_t size; - - Alloc *free_list; - - Alloc() : - lock(0), - mem(NULL), - pool_id(POOL_ALLOCATOR_INVALID_ID), - size(0), - free_list(NULL) { - } - }; - - static Alloc *allocs; - static Alloc *free_list; - static uint32_t alloc_count; - static uint32_t allocs_used; - static Mutex *alloc_mutex; - static size_t total_memory; - static size_t max_memory; - - static void setup(uint32_t p_max_allocs = (1 << 16)); - static void cleanup(); -}; - -template <class T> -class PoolVector { - - MemoryPool::Alloc *alloc; - - void _copy_on_write() { - - if (!alloc) - return; - - // ERR_FAIL_COND(alloc->lock>0); should not be illegal to lock this for copy on write, as it's a copy on write after all - - // Refcount should not be zero, otherwise it's a misuse of COW - if (alloc->refcount.get() == 1) - return; //nothing to do - - //must allocate something - - MemoryPool::alloc_mutex->lock(); - if (MemoryPool::allocs_used == MemoryPool::alloc_count) { - MemoryPool::alloc_mutex->unlock(); - ERR_FAIL_MSG("All memory pool allocations are in use, can't COW."); - } - - MemoryPool::Alloc *old_alloc = alloc; - - //take one from the free list - alloc = MemoryPool::free_list; - MemoryPool::free_list = alloc->free_list; - //increment the used counter - MemoryPool::allocs_used++; - - //copy the alloc data - alloc->size = old_alloc->size; - alloc->refcount.init(); - alloc->pool_id = POOL_ALLOCATOR_INVALID_ID; - alloc->lock = 0; - -#ifdef DEBUG_ENABLED - MemoryPool::total_memory += alloc->size; - if (MemoryPool::total_memory > MemoryPool::max_memory) { - MemoryPool::max_memory = MemoryPool::total_memory; - } -#endif - - MemoryPool::alloc_mutex->unlock(); - - if (MemoryPool::memory_pool) { - - } else { - alloc->mem = memalloc(alloc->size); - } - - { - Write w; - w._ref(alloc); - Read r; - r._ref(old_alloc); - - int cur_elements = alloc->size / sizeof(T); - T *dst = (T *)w.ptr(); - const T *src = (const T *)r.ptr(); - for (int i = 0; i < cur_elements; i++) { - memnew_placement(&dst[i], T(src[i])); - } - } - - if (old_alloc->refcount.unref()) { - //this should never happen but.. - -#ifdef DEBUG_ENABLED - MemoryPool::alloc_mutex->lock(); - MemoryPool::total_memory -= old_alloc->size; - MemoryPool::alloc_mutex->unlock(); -#endif - - { - Write w; - w._ref(old_alloc); - - int cur_elements = old_alloc->size / sizeof(T); - T *elems = (T *)w.ptr(); - for (int i = 0; i < cur_elements; i++) { - elems[i].~T(); - } - } - - if (MemoryPool::memory_pool) { - //resize memory pool - //if none, create - //if some resize - } else { - - memfree(old_alloc->mem); - old_alloc->mem = NULL; - old_alloc->size = 0; - - MemoryPool::alloc_mutex->lock(); - old_alloc->free_list = MemoryPool::free_list; - MemoryPool::free_list = old_alloc; - MemoryPool::allocs_used--; - MemoryPool::alloc_mutex->unlock(); - } - } - } - - void _reference(const PoolVector &p_pool_vector) { - - if (alloc == p_pool_vector.alloc) - return; - - _unreference(); - - if (!p_pool_vector.alloc) { - return; - } - - if (p_pool_vector.alloc->refcount.ref()) { - alloc = p_pool_vector.alloc; - } - } - - void _unreference() { - - if (!alloc) - return; - - if (!alloc->refcount.unref()) { - alloc = NULL; - return; - } - - //must be disposed! - - { - int cur_elements = alloc->size / sizeof(T); - - // Don't use write() here because it could otherwise provoke COW, - // which is not desirable here because we are destroying the last reference anyways - Write w; - // Reference to still prevent other threads from touching the alloc - w._ref(alloc); - - for (int i = 0; i < cur_elements; i++) { - - w[i].~T(); - } - } - -#ifdef DEBUG_ENABLED - MemoryPool::alloc_mutex->lock(); - MemoryPool::total_memory -= alloc->size; - MemoryPool::alloc_mutex->unlock(); -#endif - - if (MemoryPool::memory_pool) { - //resize memory pool - //if none, create - //if some resize - } else { - - memfree(alloc->mem); - alloc->mem = NULL; - alloc->size = 0; - - MemoryPool::alloc_mutex->lock(); - alloc->free_list = MemoryPool::free_list; - MemoryPool::free_list = alloc; - MemoryPool::allocs_used--; - MemoryPool::alloc_mutex->unlock(); - } - - alloc = NULL; - } - -public: - class Access { - friend class PoolVector; - - protected: - MemoryPool::Alloc *alloc; - T *mem; - - _FORCE_INLINE_ void _ref(MemoryPool::Alloc *p_alloc) { - alloc = p_alloc; - if (alloc) { - if (atomic_increment(&alloc->lock) == 1) { - if (MemoryPool::memory_pool) { - //lock it and get mem - } - } - - mem = (T *)alloc->mem; - } - } - - _FORCE_INLINE_ void _unref() { - - if (alloc) { - if (atomic_decrement(&alloc->lock) == 0) { - if (MemoryPool::memory_pool) { - //put mem back - } - } - - mem = NULL; - alloc = NULL; - } - } - - Access() { - alloc = NULL; - mem = NULL; - } - - public: - virtual ~Access() { - _unref(); - } - - void release() { - _unref(); - } - }; - - class Read : public Access { - public: - _FORCE_INLINE_ const T &operator[](int p_index) const { return this->mem[p_index]; } - _FORCE_INLINE_ const T *ptr() const { return this->mem; } - - void operator=(const Read &p_read) { - if (this->alloc == p_read.alloc) - return; - this->_unref(); - this->_ref(p_read.alloc); - } - - Read(const Read &p_read) { - this->_ref(p_read.alloc); - } - - Read() {} - }; - - class Write : public Access { - public: - _FORCE_INLINE_ T &operator[](int p_index) const { return this->mem[p_index]; } - _FORCE_INLINE_ T *ptr() const { return this->mem; } - - void operator=(const Write &p_read) { - if (this->alloc == p_read.alloc) - return; - this->_unref(); - this->_ref(p_read.alloc); - } - - Write(const Write &p_read) { - this->_ref(p_read.alloc); - } - - Write() {} - }; - - Read read() const { - - Read r; - if (alloc) { - r._ref(alloc); - } - return r; - } - Write write() { - - Write w; - if (alloc) { - _copy_on_write(); //make sure there is only one being acessed - w._ref(alloc); - } - return w; - } - - template <class MC> - void fill_with(const MC &p_mc) { - - int c = p_mc.size(); - resize(c); - Write w = write(); - int idx = 0; - for (const typename MC::Element *E = p_mc.front(); E; E = E->next()) { - - w[idx++] = E->get(); - } - } - - void remove(int p_index) { - - int s = size(); - ERR_FAIL_INDEX(p_index, s); - Write w = write(); - for (int i = p_index; i < s - 1; i++) { - - w[i] = w[i + 1]; - }; - w = Write(); - resize(s - 1); - } - - inline int size() const; - inline bool empty() const; - T get(int p_index) const; - void set(int p_index, const T &p_val); - void push_back(const T &p_val); - void append(const T &p_val) { push_back(p_val); } - void append_array(const PoolVector<T> &p_arr) { - int ds = p_arr.size(); - if (ds == 0) - return; - int bs = size(); - resize(bs + ds); - Write w = write(); - Read r = p_arr.read(); - for (int i = 0; i < ds; i++) - w[bs + i] = r[i]; - } - - PoolVector<T> subarray(int p_from, int p_to) { - - if (p_from < 0) { - p_from = size() + p_from; - } - if (p_to < 0) { - p_to = size() + p_to; - } - - ERR_FAIL_INDEX_V(p_from, size(), PoolVector<T>()); - ERR_FAIL_INDEX_V(p_to, size(), PoolVector<T>()); - - PoolVector<T> slice; - int span = 1 + p_to - p_from; - slice.resize(span); - Read r = read(); - Write w = slice.write(); - for (int i = 0; i < span; ++i) { - w[i] = r[p_from + i]; - } - - return slice; - } - - Error insert(int p_pos, const T &p_val) { - - int s = size(); - ERR_FAIL_INDEX_V(p_pos, s + 1, ERR_INVALID_PARAMETER); - resize(s + 1); - { - Write w = write(); - for (int i = s; i > p_pos; i--) - w[i] = w[i - 1]; - w[p_pos] = p_val; - } - - return OK; - } - - String join(String delimiter) { - String rs = ""; - int s = size(); - Read r = read(); - for (int i = 0; i < s; i++) { - rs += r[i] + delimiter; - } - rs.erase(rs.length() - delimiter.length(), delimiter.length()); - return rs; - } - - bool is_locked() const { return alloc && alloc->lock > 0; } - - inline T operator[](int p_index) const; - - Error resize(int p_size); - - void invert(); - - void operator=(const PoolVector &p_pool_vector) { _reference(p_pool_vector); } - PoolVector() { alloc = NULL; } - PoolVector(const PoolVector &p_pool_vector) { - alloc = NULL; - _reference(p_pool_vector); - } - ~PoolVector() { _unreference(); } -}; - -template <class T> -int PoolVector<T>::size() const { - - return alloc ? alloc->size / sizeof(T) : 0; -} - -template <class T> -bool PoolVector<T>::empty() const { - - return alloc ? alloc->size == 0 : true; -} - -template <class T> -T PoolVector<T>::get(int p_index) const { - - return operator[](p_index); -} - -template <class T> -void PoolVector<T>::set(int p_index, const T &p_val) { - - ERR_FAIL_INDEX(p_index, size()); - - Write w = write(); - w[p_index] = p_val; -} - -template <class T> -void PoolVector<T>::push_back(const T &p_val) { - - resize(size() + 1); - set(size() - 1, p_val); -} - -template <class T> -T PoolVector<T>::operator[](int p_index) const { - - CRASH_BAD_INDEX(p_index, size()); - - Read r = read(); - return r[p_index]; -} - -template <class T> -Error PoolVector<T>::resize(int p_size) { - - ERR_FAIL_COND_V_MSG(p_size < 0, ERR_INVALID_PARAMETER, "Size of PoolVector cannot be negative."); - - if (alloc == NULL) { - - if (p_size == 0) - return OK; //nothing to do here - - //must allocate something - MemoryPool::alloc_mutex->lock(); - if (MemoryPool::allocs_used == MemoryPool::alloc_count) { - MemoryPool::alloc_mutex->unlock(); - ERR_FAIL_V_MSG(ERR_OUT_OF_MEMORY, "All memory pool allocations are in use."); - } - - //take one from the free list - alloc = MemoryPool::free_list; - MemoryPool::free_list = alloc->free_list; - //increment the used counter - MemoryPool::allocs_used++; - - //cleanup the alloc - alloc->size = 0; - alloc->refcount.init(); - alloc->pool_id = POOL_ALLOCATOR_INVALID_ID; - MemoryPool::alloc_mutex->unlock(); - - } else { - - ERR_FAIL_COND_V_MSG(alloc->lock > 0, ERR_LOCKED, "Can't resize PoolVector if locked."); //can't resize if locked! - } - - size_t new_size = sizeof(T) * p_size; - - if (alloc->size == new_size) - return OK; //nothing to do - - if (p_size == 0) { - _unreference(); - return OK; - } - - _copy_on_write(); // make it unique - -#ifdef DEBUG_ENABLED - MemoryPool::alloc_mutex->lock(); - MemoryPool::total_memory -= alloc->size; - MemoryPool::total_memory += new_size; - if (MemoryPool::total_memory > MemoryPool::max_memory) { - MemoryPool::max_memory = MemoryPool::total_memory; - } - MemoryPool::alloc_mutex->unlock(); -#endif - - int cur_elements = alloc->size / sizeof(T); - - if (p_size > cur_elements) { - - if (MemoryPool::memory_pool) { - //resize memory pool - //if none, create - //if some resize - } else { - - if (alloc->size == 0) { - alloc->mem = memalloc(new_size); - } else { - alloc->mem = memrealloc(alloc->mem, new_size); - } - } - - alloc->size = new_size; - - Write w = write(); - - for (int i = cur_elements; i < p_size; i++) { - - memnew_placement(&w[i], T); - } - - } else { - - { - Write w = write(); - for (int i = p_size; i < cur_elements; i++) { - - w[i].~T(); - } - } - - if (MemoryPool::memory_pool) { - //resize memory pool - //if none, create - //if some resize - } else { - - if (new_size == 0) { - memfree(alloc->mem); - alloc->mem = NULL; - alloc->size = 0; - - MemoryPool::alloc_mutex->lock(); - alloc->free_list = MemoryPool::free_list; - MemoryPool::free_list = alloc; - MemoryPool::allocs_used--; - MemoryPool::alloc_mutex->unlock(); - - } else { - alloc->mem = memrealloc(alloc->mem, new_size); - alloc->size = new_size; - } - } - } - - return OK; -} - -template <class T> -void PoolVector<T>::invert() { - T temp; - Write w = write(); - int s = size(); - int half_s = s / 2; - - for (int i = 0; i < half_s; i++) { - temp = w[i]; - w[i] = w[s - i - 1]; - w[s - i - 1] = temp; - } -} - -#endif // POOL_VECTOR_H diff --git a/core/project_settings.cpp b/core/project_settings.cpp index 59d7e82850..90487bda0d 100644 --- a/core/project_settings.cpp +++ b/core/project_settings.cpp @@ -1023,14 +1023,14 @@ ProjectSettings::ProjectSettings() { GLOBAL_DEF("audio/default_bus_layout", "res://default_bus_layout.tres"); custom_prop_info["audio/default_bus_layout"] = PropertyInfo(Variant::STRING, "audio/default_bus_layout", PROPERTY_HINT_FILE, "*.tres"); - PoolStringArray extensions = PoolStringArray(); + PackedStringArray extensions = PackedStringArray(); extensions.push_back("gd"); if (Engine::get_singleton()->has_singleton("GodotSharp")) extensions.push_back("cs"); extensions.push_back("shader"); GLOBAL_DEF("editor/search_in_file_extensions", extensions); - custom_prop_info["editor/search_in_file_extensions"] = PropertyInfo(Variant::POOL_STRING_ARRAY, "editor/search_in_file_extensions"); + custom_prop_info["editor/search_in_file_extensions"] = PropertyInfo(Variant::PACKED_STRING_ARRAY, "editor/search_in_file_extensions"); GLOBAL_DEF("editor/script_templates_search_path", "res://script_templates"); custom_prop_info["editor/script_templates_search_path"] = PropertyInfo(Variant::STRING, "editor/script_templates_search_path", PROPERTY_HINT_DIR); diff --git a/core/reference.cpp b/core/reference.cpp index 5c211fe301..dd65ccce69 100644 --- a/core/reference.cpp +++ b/core/reference.cpp @@ -102,7 +102,8 @@ bool Reference::unreference() { return die; } -Reference::Reference() { +Reference::Reference() : + Object(true) { refcount.init(); refcount_init.init(); diff --git a/core/reference.h b/core/reference.h index d2314005b9..fd42c4e537 100644 --- a/core/reference.h +++ b/core/reference.h @@ -33,13 +33,11 @@ #include "core/class_db.h" #include "core/object.h" -#include "core/ref_ptr.h" #include "core/safe_refcount.h" class Reference : public Object { GDCLASS(Reference, Object); - friend class RefBase; SafeRefCount refcount; SafeRefCount refcount_init; @@ -133,17 +131,9 @@ public: return reference; } - RefPtr get_ref_ptr() const { - - RefPtr refptr; - Ref<Reference> *irr = reinterpret_cast<Ref<Reference> *>(refptr.get_data()); - *irr = *this; - return refptr; - }; - operator Variant() const { - return Variant(get_ref_ptr()); + return Variant(reference); } void operator=(const Ref &p_from) { @@ -165,33 +155,24 @@ public: r.reference = NULL; } - void operator=(const RefPtr &p_refptr) { + void operator=(const Variant &p_variant) { - Ref<Reference> *irr = reinterpret_cast<Ref<Reference> *>(p_refptr.get_data()); - Reference *refb = irr->ptr(); - if (!refb) { - unref(); + Object *object = p_variant.get_validated_object(); + + if (object == reference) { return; } - Ref r; - r.reference = Object::cast_to<T>(refb); - ref(r); - r.reference = NULL; - } - void operator=(const Variant &p_variant) { + unref(); - RefPtr refptr = p_variant; - Ref<Reference> *irr = reinterpret_cast<Ref<Reference> *>(refptr.get_data()); - Reference *refb = irr->ptr(); - if (!refb) { - unref(); + if (!object) { return; } - Ref r; - r.reference = Object::cast_to<T>(refb); - ref(r); - r.reference = NULL; + + T *r = Object::cast_to<T>(object); + if (r && r->reference()) { + reference = r; + } } template <class T_Other> @@ -237,33 +218,19 @@ public: Ref(const Variant &p_variant) { - RefPtr refptr = p_variant; - Ref<Reference> *irr = reinterpret_cast<Ref<Reference> *>(refptr.get_data()); - reference = NULL; - Reference *refb = irr->ptr(); - if (!refb) { - unref(); + Object *object = p_variant.get_validated_object(); + + if (!object) { + reference = nullptr; return; } - Ref r; - r.reference = Object::cast_to<T>(refb); - ref(r); - r.reference = NULL; - } - - Ref(const RefPtr &p_refptr) { - Ref<Reference> *irr = reinterpret_cast<Ref<Reference> *>(p_refptr.get_data()); - reference = NULL; - Reference *refb = irr->ptr(); - if (!refb) { - unref(); - return; + T *r = Object::cast_to<T>(object); + if (r && r->reference()) { + reference = r; + } else { + reference = nullptr; } - Ref r; - r.reference = Object::cast_to<T>(refb); - ref(r); - r.reference = NULL; } inline bool is_valid() const { return reference != NULL; } @@ -340,32 +307,6 @@ struct PtrToArg<const Ref<T> &> { } }; -//this is for RefPtr - -template <> -struct PtrToArg<RefPtr> { - - _FORCE_INLINE_ static RefPtr convert(const void *p_ptr) { - - return Ref<Reference>(const_cast<Reference *>(reinterpret_cast<const Reference *>(p_ptr))).get_ref_ptr(); - } - - _FORCE_INLINE_ static void encode(RefPtr p_val, const void *p_ptr) { - - Ref<Reference> r = p_val; - *(Ref<Reference> *)p_ptr = r; - } -}; - -template <> -struct PtrToArg<const RefPtr &> { - - _FORCE_INLINE_ static RefPtr convert(const void *p_ptr) { - - return Ref<Reference>(const_cast<Reference *>(reinterpret_cast<const Reference *>(p_ptr))).get_ref_ptr(); - } -}; - #endif // PTRCALL_ENABLED #ifdef DEBUG_METHODS_ENABLED diff --git a/core/register_core_types.cpp b/core/register_core_types.cpp index 91d9289563..bb017f43e5 100644 --- a/core/register_core_types.cpp +++ b/core/register_core_types.cpp @@ -40,12 +40,14 @@ #include "core/func_ref.h" #include "core/input_map.h" #include "core/io/config_file.h" +#include "core/io/dtls_server.h" #include "core/io/http_client.h" #include "core/io/image_loader.h" #include "core/io/marshalls.h" #include "core/io/multiplayer_api.h" #include "core/io/networked_multiplayer_peer.h" #include "core/io/packet_peer.h" +#include "core/io/packet_peer_dtls.h" #include "core/io/packet_peer_udp.h" #include "core/io/pck_packer.h" #include "core/io/resource_format_binary.h" @@ -53,6 +55,7 @@ #include "core/io/stream_peer_ssl.h" #include "core/io/tcp_server.h" #include "core/io/translation_loader_po.h" +#include "core/io/udp_server.h" #include "core/io/xml_parser.h" #include "core/math/a_star.h" #include "core/math/expression.h" @@ -96,9 +99,11 @@ extern void unregister_variant_methods(); void register_core_types() { + //consistency check + ERR_FAIL_COND(sizeof(Callable) > 16); + ObjectDB::setup(); ResourceCache::setup(); - MemoryPool::setup(); _global_mutex = Mutex::create(); @@ -155,6 +160,9 @@ void register_core_types() { ClassDB::register_class<StreamPeerTCP>(); ClassDB::register_class<TCP_Server>(); ClassDB::register_class<PacketPeerUDP>(); + ClassDB::register_class<UDPServer>(); + ClassDB::register_custom_instance_class<PacketPeerDTLS>(); + ClassDB::register_custom_instance_class<DTLSServer>(); // Crypto ClassDB::register_class<HashingContext>(); @@ -316,6 +324,4 @@ void unregister_core_types() { memdelete(_global_mutex); _global_mutex = NULL; //still needed at a few places }; - - MemoryPool::cleanup(); } diff --git a/core/resource.cpp b/core/resource.cpp index 30e09716aa..2afc9e4042 100644 --- a/core/resource.cpp +++ b/core/resource.cpp @@ -423,7 +423,7 @@ void Resource::_bind_methods() { ADD_GROUP("Resource", "resource_"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "resource_local_to_scene"), "set_local_to_scene", "is_local_to_scene"); ADD_PROPERTY(PropertyInfo(Variant::STRING, "resource_path", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR), "set_path", "get_path"); - ADD_PROPERTY(PropertyInfo(Variant::STRING, "resource_name"), "set_name", "get_name"); + ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "resource_name"), "set_name", "get_name"); BIND_VMETHOD(MethodInfo("_setup_local_to_scene")); } diff --git a/core/resource.h b/core/resource.h index 00d330a094..b30788010b 100644 --- a/core/resource.h +++ b/core/resource.h @@ -33,7 +33,6 @@ #include "core/class_db.h" #include "core/object.h" -#include "core/ref_ptr.h" #include "core/reference.h" #include "core/safe_refcount.h" #include "core/self_list.h" diff --git a/core/script_debugger_remote.cpp b/core/script_debugger_remote.cpp new file mode 100644 index 0000000000..fdb6135edd --- /dev/null +++ b/core/script_debugger_remote.cpp @@ -0,0 +1,1145 @@ +/*************************************************************************/ +/* script_debugger_remote.cpp */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* https://godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ +/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/*************************************************************************/ + +#include "script_debugger_remote.h" + +#include "core/engine.h" +#include "core/io/ip.h" +#include "core/io/marshalls.h" +#include "core/os/input.h" +#include "core/os/os.h" +#include "core/project_settings.h" +#include "servers/visual_server.h" + +#define CHECK_SIZE(arr, expected, what) ERR_FAIL_COND_V_MSG((uint32_t)arr.size() < (uint32_t)(expected), false, String("Malformed ") + what + " message from script debugger, message too short. Exptected size: " + itos(expected) + ", actual size: " + itos(arr.size())) +#define CHECK_END(arr, expected, what) ERR_FAIL_COND_V_MSG((uint32_t)arr.size() > (uint32_t)expected, false, String("Malformed ") + what + " message from script debugger, message too short. Exptected size: " + itos(expected) + ", actual size: " + itos(arr.size())) + +Array ScriptDebuggerRemote::ScriptStackDump::serialize() { + Array arr; + arr.push_back(frames.size() * 3); + for (int i = 0; i < frames.size(); i++) { + arr.push_back(frames[i].file); + arr.push_back(frames[i].line); + arr.push_back(frames[i].func); + } + return arr; +} + +bool ScriptDebuggerRemote::ScriptStackDump::deserialize(const Array &p_arr) { + CHECK_SIZE(p_arr, 1, "ScriptStackDump"); + uint32_t size = p_arr[0]; + CHECK_SIZE(p_arr, size, "ScriptStackDump"); + int idx = 1; + for (uint32_t i = 0; i < size / 3; i++) { + ScriptLanguage::StackInfo sf; + sf.file = p_arr[idx]; + sf.line = p_arr[idx + 1]; + sf.func = p_arr[idx + 2]; + frames.push_back(sf); + idx += 3; + } + CHECK_END(p_arr, idx, "ScriptStackDump"); + return true; +} + +Array ScriptDebuggerRemote::ScriptStackVariable::serialize(int max_size) { + Array arr; + arr.push_back(name); + arr.push_back(type); + + Variant var = value; + if (value.get_type() == Variant::OBJECT && value.get_validated_object() == nullptr) { + var = Variant(); + } + + int len = 0; + Error err = encode_variant(var, NULL, len, true); + if (err != OK) + ERR_PRINT("Failed to encode variant."); + + if (len > max_size) { + arr.push_back(Variant()); + } else { + arr.push_back(var); + } + return arr; +} + +bool ScriptDebuggerRemote::ScriptStackVariable::deserialize(const Array &p_arr) { + CHECK_SIZE(p_arr, 3, "ScriptStackVariable"); + name = p_arr[0]; + type = p_arr[1]; + value = p_arr[2]; + CHECK_END(p_arr, 3, "ScriptStackVariable"); + return true; +} + +Array ScriptDebuggerRemote::OutputError::serialize() { + Array arr; + arr.push_back(hr); + arr.push_back(min); + arr.push_back(sec); + arr.push_back(msec); + arr.push_back(source_file); + arr.push_back(source_func); + arr.push_back(source_line); + arr.push_back(error); + arr.push_back(error_descr); + arr.push_back(warning); + unsigned int size = callstack.size(); + const ScriptLanguage::StackInfo *r = callstack.ptr(); + arr.push_back(size * 3); + for (int i = 0; i < callstack.size(); i++) { + arr.push_back(r[i].file); + arr.push_back(r[i].func); + arr.push_back(r[i].line); + } + return arr; +} + +bool ScriptDebuggerRemote::OutputError::deserialize(const Array &p_arr) { + CHECK_SIZE(p_arr, 11, "OutputError"); + hr = p_arr[0]; + min = p_arr[1]; + sec = p_arr[2]; + msec = p_arr[3]; + source_file = p_arr[4]; + source_func = p_arr[5]; + source_line = p_arr[6]; + error = p_arr[7]; + error_descr = p_arr[8]; + warning = p_arr[9]; + unsigned int stack_size = p_arr[10]; + CHECK_SIZE(p_arr, stack_size, "OutputError"); + int idx = 11; + callstack.resize(stack_size / 3); + ScriptLanguage::StackInfo *w = callstack.ptrw(); + for (unsigned int i = 0; i < stack_size / 3; i++) { + w[i].file = p_arr[idx]; + w[i].func = p_arr[idx + 1]; + w[i].line = p_arr[idx + 2]; + idx += 3; + } + CHECK_END(p_arr, idx, "OutputError"); + return true; +} + +Array ScriptDebuggerRemote::ResourceUsage::serialize() { + infos.sort(); + + Array arr; + arr.push_back(infos.size() * 4); + for (List<ResourceInfo>::Element *E = infos.front(); E; E = E->next()) { + arr.push_back(E->get().path); + arr.push_back(E->get().format); + arr.push_back(E->get().type); + arr.push_back(E->get().vram); + } + return arr; +} + +bool ScriptDebuggerRemote::ResourceUsage::deserialize(const Array &p_arr) { + CHECK_SIZE(p_arr, 1, "ResourceUsage"); + uint32_t size = p_arr[0]; + CHECK_SIZE(p_arr, size, "ResourceUsage"); + int idx = 1; + for (uint32_t i = 0; i < size / 4; i++) { + ResourceInfo info; + info.path = p_arr[idx]; + info.format = p_arr[idx + 1]; + info.type = p_arr[idx + 2]; + info.vram = p_arr[idx + 3]; + infos.push_back(info); + } + CHECK_END(p_arr, idx, "ResourceUsage"); + return true; +} + +Array ScriptDebuggerRemote::ProfilerSignature::serialize() { + Array arr; + arr.push_back(name); + arr.push_back(id); + return arr; +} + +bool ScriptDebuggerRemote::ProfilerSignature::deserialize(const Array &p_arr) { + CHECK_SIZE(p_arr, 2, "ProfilerSignature"); + name = p_arr[0]; + id = p_arr[1]; + CHECK_END(p_arr, 2, "ProfilerSignature"); + return true; +} + +Array ScriptDebuggerRemote::ProfilerFrame::serialize() { + Array arr; + arr.push_back(frame_number); + arr.push_back(frame_time); + arr.push_back(idle_time); + arr.push_back(physics_time); + arr.push_back(physics_frame_time); + arr.push_back(USEC_TO_SEC(script_time)); + + arr.push_back(frames_data.size()); + arr.push_back(frame_functions.size() * 4); + + // Servers profiling info. + for (int i = 0; i < frames_data.size(); i++) { + arr.push_back(frames_data[i].name); // Type (physics/process/audio/...) + arr.push_back(frames_data[i].data.size()); + for (int j = 0; j < frames_data[i].data.size() / 2; j++) { + arr.push_back(frames_data[i].data[2 * j]); // NAME + arr.push_back(frames_data[i].data[2 * j + 1]); // TIME + } + } + for (int i = 0; i < frame_functions.size(); i++) { + arr.push_back(frame_functions[i].sig_id); + arr.push_back(frame_functions[i].call_count); + arr.push_back(frame_functions[i].self_time); + arr.push_back(frame_functions[i].total_time); + } + return arr; +} + +bool ScriptDebuggerRemote::ProfilerFrame::deserialize(const Array &p_arr) { + CHECK_SIZE(p_arr, 8, "ProfilerFrame"); + frame_number = p_arr[0]; + frame_time = p_arr[1]; + idle_time = p_arr[2]; + physics_time = p_arr[3]; + physics_frame_time = p_arr[4]; + script_time = p_arr[5]; + uint32_t frame_data_size = p_arr[6]; + int frame_func_size = p_arr[7]; + int idx = 8; + while (frame_data_size) { + CHECK_SIZE(p_arr, idx + 2, "ProfilerFrame"); + frame_data_size--; + FrameData fd; + fd.name = p_arr[idx]; + int sub_data_size = p_arr[idx + 1]; + idx += 2; + CHECK_SIZE(p_arr, idx + sub_data_size, "ProfilerFrame"); + for (int j = 0; j < sub_data_size / 2; j++) { + fd.data.push_back(p_arr[idx]); // NAME + fd.data.push_back(p_arr[idx + 1]); // TIME + idx += 2; + } + frames_data.push_back(fd); + } + CHECK_SIZE(p_arr, idx + frame_func_size, "ProfilerFrame"); + for (int i = 0; i < frame_func_size / 4; i++) { + FrameFunction ff; + ff.sig_id = p_arr[idx]; + ff.call_count = p_arr[idx + 1]; + ff.self_time = p_arr[idx + 2]; + ff.total_time = p_arr[idx + 3]; + frame_functions.push_back(ff); + idx += 4; + } + CHECK_END(p_arr, idx, "ProfilerFrame"); + return true; +} + +Array ScriptDebuggerRemote::NetworkProfilerFrame::serialize() { + Array arr; + arr.push_back(infos.size() * 6); + for (int i = 0; i < infos.size(); ++i) { + arr.push_back(uint64_t(infos[i].node)); + arr.push_back(infos[i].node_path); + arr.push_back(infos[i].incoming_rpc); + arr.push_back(infos[i].incoming_rset); + arr.push_back(infos[i].outgoing_rpc); + arr.push_back(infos[i].outgoing_rset); + } + return arr; +} + +bool ScriptDebuggerRemote::NetworkProfilerFrame::deserialize(const Array &p_arr) { + CHECK_SIZE(p_arr, 1, "NetworkProfilerFrame"); + uint32_t size = p_arr[0]; + CHECK_SIZE(p_arr, size, "NetworkProfilerFrame"); + infos.resize(size); + int idx = 1; + for (uint32_t i = 0; i < size / 6; ++i) { + infos.write[i].node = uint64_t(p_arr[idx]); + infos.write[i].node_path = p_arr[idx + 1]; + infos.write[i].incoming_rpc = p_arr[idx + 2]; + infos.write[i].incoming_rset = p_arr[idx + 3]; + infos.write[i].outgoing_rpc = p_arr[idx + 4]; + infos.write[i].outgoing_rset = p_arr[idx + 5]; + } + CHECK_END(p_arr, idx, "NetworkProfilerFrame"); + return true; +} + +void ScriptDebuggerRemote::_put_msg(String p_message, Array p_data) { + Array msg; + msg.push_back(p_message); + msg.push_back(p_data); + packet_peer_stream->put_var(msg); +} + +bool ScriptDebuggerRemote::is_peer_connected() { + return tcp_client->is_connected_to_host() && tcp_client->get_status() == StreamPeerTCP::STATUS_CONNECTED; +} + +void ScriptDebuggerRemote::_send_video_memory() { + + ResourceUsage usage; + if (resource_usage_func) + resource_usage_func(&usage); + + _put_msg("message:video_mem", usage.serialize()); +} + +Error ScriptDebuggerRemote::connect_to_host(const String &p_host, uint16_t p_port) { + + IP_Address ip; + if (p_host.is_valid_ip_address()) + ip = p_host; + else + ip = IP::get_singleton()->resolve_hostname(p_host); + + int port = p_port; + + const int tries = 6; + int waits[tries] = { 1, 10, 100, 1000, 1000, 1000 }; + + tcp_client->connect_to_host(ip, port); + + for (int i = 0; i < tries; i++) { + + if (tcp_client->get_status() == StreamPeerTCP::STATUS_CONNECTED) { + print_verbose("Remote Debugger: Connected!"); + break; + } else { + + const int ms = waits[i]; + OS::get_singleton()->delay_usec(ms * 1000); + print_verbose("Remote Debugger: Connection failed with status: '" + String::num(tcp_client->get_status()) + "', retrying in " + String::num(ms) + " msec."); + }; + }; + + if (tcp_client->get_status() != StreamPeerTCP::STATUS_CONNECTED) { + + ERR_PRINT("Remote Debugger: Unable to connect. Status: " + String::num(tcp_client->get_status()) + "."); + return FAILED; + }; + + packet_peer_stream->set_stream_peer(tcp_client); + Array msg; + msg.push_back(OS::get_singleton()->get_process_id()); + send_message("set_pid", msg); + + return OK; +} + +void ScriptDebuggerRemote::_parse_message(const String p_command, const Array &p_data, ScriptLanguage *p_script) { + + if (p_command == "request_video_mem") { + _send_video_memory(); + + } else if (p_command == "start_profiling") { + ERR_FAIL_COND(p_data.size() < 1); + + for (int i = 0; i < ScriptServer::get_language_count(); i++) { + ScriptServer::get_language(i)->profiling_start(); + } + + max_frame_functions = p_data[0]; + profiler_function_signature_map.clear(); + profiling = true; + frame_time = 0; + idle_time = 0; + physics_time = 0; + physics_frame_time = 0; + print_line("PROFILING ALRIGHT!"); + + } else if (p_command == "stop_profiling") { + for (int i = 0; i < ScriptServer::get_language_count(); i++) { + ScriptServer::get_language(i)->profiling_stop(); + } + profiling = false; + _send_profiling_data(false); + print_line("PROFILING END!"); + + } else if (p_command == "start_visual_profiling") { + + visual_profiling = true; + VS::get_singleton()->set_frame_profiling_enabled(true); + } else if (p_command == "stop_visual_profiling") { + + visual_profiling = false; + VS::get_singleton()->set_frame_profiling_enabled(false); + + } else if (p_command == "start_network_profiling") { + + network_profiling = true; + multiplayer->profiling_start(); + + } else if (p_command == "stop_network_profiling") { + + network_profiling = false; + multiplayer->profiling_end(); + + } else if (p_command == "reload_scripts") { + reload_all_scripts = true; + + } else if (p_command == "breakpoint") { + ERR_FAIL_COND(p_data.size() < 3); + bool set = p_data[2]; + if (set) + insert_breakpoint(p_data[1], p_data[0]); + else + remove_breakpoint(p_data[1], p_data[0]); + + } else if (p_command == "set_skip_breakpoints") { + ERR_FAIL_COND(p_data.size() < 1); + skip_breakpoints = p_data[0]; + + } else if (p_command == "get_stack_dump") { + ERR_FAIL_COND(!p_script); + ScriptStackDump dump; + int slc = p_script->debug_get_stack_level_count(); + for (int i = 0; i < slc; i++) { + ScriptLanguage::StackInfo frame; + frame.file = p_script->debug_get_stack_level_source(i); + frame.line = p_script->debug_get_stack_level_line(i); + frame.func = p_script->debug_get_stack_level_function(i); + dump.frames.push_back(frame); + } + _put_msg("stack_dump", dump.serialize()); + + } else if (p_command == "get_stack_frame_vars") { + ERR_FAIL_COND(p_data.size() != 1); + ERR_FAIL_COND(!p_script); + int lv = p_data[0]; + + List<String> members; + List<Variant> member_vals; + if (ScriptInstance *inst = p_script->debug_get_stack_level_instance(lv)) { + members.push_back("self"); + member_vals.push_back(inst->get_owner()); + } + p_script->debug_get_stack_level_members(lv, &members, &member_vals); + ERR_FAIL_COND(members.size() != member_vals.size()); + + List<String> locals; + List<Variant> local_vals; + p_script->debug_get_stack_level_locals(lv, &locals, &local_vals); + ERR_FAIL_COND(locals.size() != local_vals.size()); + + List<String> globals; + List<Variant> globals_vals; + p_script->debug_get_globals(&globals, &globals_vals); + ERR_FAIL_COND(globals.size() != globals_vals.size()); + + _put_msg("stack_frame_vars", Array()); + + ScriptStackVariable stvar; + { //locals + List<String>::Element *E = locals.front(); + List<Variant>::Element *F = local_vals.front(); + while (E) { + stvar.name = E->get(); + stvar.value = F->get(); + stvar.type = 0; + _put_msg("stack_frame_var", stvar.serialize()); + + E = E->next(); + F = F->next(); + } + } + + { //members + List<String>::Element *E = members.front(); + List<Variant>::Element *F = member_vals.front(); + while (E) { + stvar.name = E->get(); + stvar.value = F->get(); + stvar.type = 1; + _put_msg("stack_frame_var", stvar.serialize()); + + E = E->next(); + F = F->next(); + } + } + + { //globals + List<String>::Element *E = globals.front(); + List<Variant>::Element *F = globals_vals.front(); + while (E) { + stvar.name = E->get(); + stvar.value = F->get(); + stvar.type = 2; + _put_msg("stack_frame_var", stvar.serialize()); + + E = E->next(); + F = F->next(); + } + } + + } else { + if (scene_tree_parse_func) { + scene_tree_parse_func(p_command, p_data); + } + // Unknown message... + } +} + +void ScriptDebuggerRemote::debug(ScriptLanguage *p_script, bool p_can_continue, bool p_is_error_breakpoint) { + + //this function is called when there is a debugger break (bug on script) + //or when execution is paused from editor + + if (skip_breakpoints && !p_is_error_breakpoint) + return; + + ERR_FAIL_COND_MSG(!is_peer_connected(), "Script Debugger failed to connect, but being used anyway."); + + Array msg; + msg.push_back(p_can_continue); + msg.push_back(p_script->debug_get_error()); + _put_msg("debug_enter", msg); + + skip_profile_frame = true; // to avoid super long frame time for the frame + + Input::MouseMode mouse_mode = Input::get_singleton()->get_mouse_mode(); + if (mouse_mode != Input::MOUSE_MODE_VISIBLE) + Input::get_singleton()->set_mouse_mode(Input::MOUSE_MODE_VISIBLE); + + uint64_t loop_begin_usec = 0; + uint64_t loop_time_sec = 0; + while (true) { + loop_begin_usec = OS::get_singleton()->get_ticks_usec(); + + _get_output(); + + if (packet_peer_stream->get_available_packet_count() > 0) { + + Variant var; + Error err = packet_peer_stream->get_var(var); + + ERR_CONTINUE(err != OK); + ERR_CONTINUE(var.get_type() != Variant::ARRAY); + + Array cmd = var; + + ERR_CONTINUE(cmd.size() != 2); + ERR_CONTINUE(cmd[0].get_type() != Variant::STRING); + ERR_CONTINUE(cmd[1].get_type() != Variant::ARRAY); + + String command = cmd[0]; + Array data = cmd[1]; + if (command == "step") { + + set_depth(-1); + set_lines_left(1); + break; + } else if (command == "next") { + + set_depth(0); + set_lines_left(1); + break; + + } else if (command == "continue") { + set_depth(-1); + set_lines_left(-1); + OS::get_singleton()->move_window_to_foreground(); + break; + } else if (command == "break") { + ERR_PRINT("Got break when already broke!"); + break; + } + + _parse_message(command, data, p_script); + } else { + OS::get_singleton()->delay_usec(10000); + OS::get_singleton()->process_and_drop_events(); + } + + // This is for the camera override to stay live even when the game is paused from the editor + loop_time_sec = (OS::get_singleton()->get_ticks_usec() - loop_begin_usec) / 1000000.0f; + VisualServer::get_singleton()->sync(); + if (VisualServer::get_singleton()->has_changed()) { + VisualServer::get_singleton()->draw(true, loop_time_sec * Engine::get_singleton()->get_time_scale()); + } + } + + _put_msg("debug_exit", Array()); + + if (mouse_mode != Input::MOUSE_MODE_VISIBLE) + Input::get_singleton()->set_mouse_mode(mouse_mode); +} + +void ScriptDebuggerRemote::_get_output() { + + mutex->lock(); + if (output_strings.size()) { + + locking = true; + + while (output_strings.size()) { + + Array arr; + arr.push_back(output_strings.front()->get()); + _put_msg("output", arr); + output_strings.pop_front(); + } + locking = false; + } + + if (n_messages_dropped > 0) { + Message msg; + msg.message = "Too many messages! " + String::num_int64(n_messages_dropped) + " messages were dropped."; + messages.push_back(msg); + n_messages_dropped = 0; + } + + while (messages.size()) { + locking = true; + Message msg = messages.front()->get(); + _put_msg("message:" + msg.message, msg.data); + messages.pop_front(); + locking = false; + } + + if (n_errors_dropped == 1) { + // Only print one message about dropping per second + OutputError oe; + oe.error = "TOO_MANY_ERRORS"; + oe.error_descr = "Too many errors! Ignoring errors for up to 1 second."; + oe.warning = false; + uint64_t time = OS::get_singleton()->get_ticks_msec(); + oe.hr = time / 3600000; + oe.min = (time / 60000) % 60; + oe.sec = (time / 1000) % 60; + oe.msec = time % 1000; + errors.push_back(oe); + } + + if (n_warnings_dropped == 1) { + // Only print one message about dropping per second + OutputError oe; + oe.error = "TOO_MANY_WARNINGS"; + oe.error_descr = "Too many warnings! Ignoring warnings for up to 1 second."; + oe.warning = true; + uint64_t time = OS::get_singleton()->get_ticks_msec(); + oe.hr = time / 3600000; + oe.min = (time / 60000) % 60; + oe.sec = (time / 1000) % 60; + oe.msec = time % 1000; + errors.push_back(oe); + } + + while (errors.size()) { + locking = true; + OutputError oe = errors.front()->get(); + _put_msg("error", oe.serialize()); + errors.pop_front(); + locking = false; + } + mutex->unlock(); +} + +void ScriptDebuggerRemote::line_poll() { + + //the purpose of this is just processing events every now and then when the script might get too busy + //otherwise bugs like infinite loops can't be caught + if (poll_every % 2048 == 0) + _poll_events(); + poll_every++; +} + +void ScriptDebuggerRemote::_err_handler(void *ud, const char *p_func, const char *p_file, int p_line, const char *p_err, const char *p_descr, ErrorHandlerType p_type) { + + if (p_type == ERR_HANDLER_SCRIPT) + return; //ignore script errors, those go through debugger + + Vector<ScriptLanguage::StackInfo> si; + + for (int i = 0; i < ScriptServer::get_language_count(); i++) { + si = ScriptServer::get_language(i)->debug_get_current_stack_info(); + if (si.size()) + break; + } + + ScriptDebuggerRemote *sdr = (ScriptDebuggerRemote *)ud; + sdr->send_error(p_func, p_file, p_line, p_err, p_descr, p_type, si); +} + +void ScriptDebuggerRemote::_poll_events() { + + //this si called from ::idle_poll, happens only when running the game, + //does not get called while on debug break + + while (packet_peer_stream->get_available_packet_count() > 0) { + + _get_output(); + + //send over output_strings + + Variant var; + Error err = packet_peer_stream->get_var(var); + + ERR_CONTINUE(err != OK); + ERR_CONTINUE(var.get_type() != Variant::ARRAY); + + Array cmd = var; + + ERR_CONTINUE(cmd.size() < 2); + ERR_CONTINUE(cmd[0].get_type() != Variant::STRING); + ERR_CONTINUE(cmd[1].get_type() != Variant::ARRAY); + + String command = cmd[0]; + Array data = cmd[1]; + + if (command == "break") { + + if (get_break_language()) + debug(get_break_language()); + } else { + _parse_message(command, data); + } + } +} + +void ScriptDebuggerRemote::_send_profiling_data(bool p_for_frame) { + + int ofs = 0; + + for (int i = 0; i < ScriptServer::get_language_count(); i++) { + if (p_for_frame) + ofs += ScriptServer::get_language(i)->profiling_get_frame_data(&profile_info.write[ofs], profile_info.size() - ofs); + else + ofs += ScriptServer::get_language(i)->profiling_get_accumulated_data(&profile_info.write[ofs], profile_info.size() - ofs); + } + + for (int i = 0; i < ofs; i++) { + profile_info_ptrs.write[i] = &profile_info.write[i]; + } + + SortArray<ScriptLanguage::ProfilingInfo *, ProfileInfoSort> sa; + sa.sort(profile_info_ptrs.ptrw(), ofs); + + int to_send = MIN(ofs, max_frame_functions); + + //check signatures first + uint64_t total_script_time = 0; + + for (int i = 0; i < to_send; i++) { + + if (!profiler_function_signature_map.has(profile_info_ptrs[i]->signature)) { + + int idx = profiler_function_signature_map.size(); + ProfilerSignature sig; + sig.name = profile_info_ptrs[i]->signature; + sig.id = idx; + _put_msg("profile_sig", sig.serialize()); + profiler_function_signature_map[profile_info_ptrs[i]->signature] = idx; + } + + total_script_time += profile_info_ptrs[i]->self_time; + } + + //send frames then + ProfilerFrame metric; + metric.frame_number = Engine::get_singleton()->get_frames_drawn(); + metric.frame_time = frame_time; + metric.idle_time = idle_time; + metric.physics_time = physics_time; + metric.physics_frame_time = physics_frame_time; + metric.script_time = total_script_time; + + // Add script functions information. + metric.frame_functions.resize(to_send); + FrameFunction *w = metric.frame_functions.ptrw(); + for (int i = 0; i < to_send; i++) { + + if (profiler_function_signature_map.has(profile_info_ptrs[i]->signature)) { + w[i].sig_id = profiler_function_signature_map[profile_info_ptrs[i]->signature]; + } + + w[i].call_count = profile_info_ptrs[i]->call_count; + w[i].total_time = profile_info_ptrs[i]->total_time / 1000000.0; + w[i].self_time = profile_info_ptrs[i]->self_time / 1000000.0; + } + if (p_for_frame) { + // Add profile frame data information. + metric.frames_data.append_array(profile_frame_data); + _put_msg("profile_frame", metric.serialize()); + profile_frame_data.clear(); + } else { + _put_msg("profile_total", metric.serialize()); + } +} + +void ScriptDebuggerRemote::idle_poll() { + + // this function is called every frame, except when there is a debugger break (::debug() in this class) + // execution stops and remains in the ::debug function + + _get_output(); + + if (requested_quit) { + + _put_msg("kill_me", Array()); + requested_quit = false; + } + + if (performance) { + + uint64_t pt = OS::get_singleton()->get_ticks_msec(); + if (pt - last_perf_time > 1000) { + + last_perf_time = pt; + int max = performance->get("MONITOR_MAX"); + Array arr; + arr.resize(max); + for (int i = 0; i < max; i++) { + arr[i] = performance->call("get_monitor", i); + } + _put_msg("performance", arr); + } + } + + if (visual_profiling) { + Vector<VS::FrameProfileArea> profile_areas = VS::get_singleton()->get_frame_profile(); + if (profile_areas.size()) { + Vector<String> area_names; + Vector<real_t> area_times; + area_names.resize(profile_areas.size()); + area_times.resize(profile_areas.size() * 2); + { + String *area_namesw = area_names.ptrw(); + real_t *area_timesw = area_times.ptrw(); + + for (int i = 0; i < profile_areas.size(); i++) { + area_namesw[i] = profile_areas[i].name; + area_timesw[i * 2 + 0] = profile_areas[i].cpu_msec; + area_timesw[i * 2 + 1] = profile_areas[i].gpu_msec; + } + } + Array msg; + msg.push_back(VS::get_singleton()->get_frame_profile_frame()); + msg.push_back(area_names); + msg.push_back(area_times); + _put_msg("visual_profile", msg); + } + } + + if (profiling) { + + if (skip_profile_frame) { + skip_profile_frame = false; + } else { + //send profiling info normally + _send_profiling_data(true); + } + } + + if (network_profiling) { + uint64_t pt = OS::get_singleton()->get_ticks_msec(); + if (pt - last_net_bandwidth_time > 200) { + last_net_bandwidth_time = pt; + _send_network_bandwidth_usage(); + } + if (pt - last_net_prof_time > 100) { + last_net_prof_time = pt; + _send_network_profiling_data(); + } + } + + if (reload_all_scripts) { + + for (int i = 0; i < ScriptServer::get_language_count(); i++) { + ScriptServer::get_language(i)->reload_all_scripts(); + } + reload_all_scripts = false; + } + + _poll_events(); +} + +void ScriptDebuggerRemote::_send_network_profiling_data() { + ERR_FAIL_COND(multiplayer.is_null()); + + int n_nodes = multiplayer->get_profiling_frame(&network_profile_info.write[0]); + + NetworkProfilerFrame frame; + for (int i = 0; i < n_nodes; i++) { + frame.infos.push_back(network_profile_info[i]); + } + _put_msg("network_profile", frame.serialize()); +} + +void ScriptDebuggerRemote::_send_network_bandwidth_usage() { + ERR_FAIL_COND(multiplayer.is_null()); + + int incoming_bandwidth = multiplayer->get_incoming_bandwidth_usage(); + int outgoing_bandwidth = multiplayer->get_outgoing_bandwidth_usage(); + + Array arr; + arr.push_back(incoming_bandwidth); + arr.push_back(outgoing_bandwidth); + _put_msg("network_bandwidth", arr); +} + +void ScriptDebuggerRemote::send_message(const String &p_message, const Array &p_args) { + + mutex->lock(); + if (!locking && is_peer_connected()) { + + if (messages.size() >= max_messages_per_frame) { + n_messages_dropped++; + } else { + Message msg; + msg.message = p_message; + msg.data = p_args; + messages.push_back(msg); + } + } + mutex->unlock(); +} + +void ScriptDebuggerRemote::send_error(const String &p_func, const String &p_file, int p_line, const String &p_err, const String &p_descr, ErrorHandlerType p_type, const Vector<ScriptLanguage::StackInfo> &p_stack_info) { + + OutputError oe; + oe.error = p_err; + oe.error_descr = p_descr; + oe.source_file = p_file; + oe.source_line = p_line; + oe.source_func = p_func; + oe.warning = p_type == ERR_HANDLER_WARNING; + uint64_t time = OS::get_singleton()->get_ticks_msec(); + oe.hr = time / 3600000; + oe.min = (time / 60000) % 60; + oe.sec = (time / 1000) % 60; + oe.msec = time % 1000; + Array cstack; + + uint64_t ticks = OS::get_singleton()->get_ticks_usec() / 1000; + msec_count += ticks - last_msec; + last_msec = ticks; + + if (msec_count > 1000) { + msec_count = 0; + + err_count = 0; + n_errors_dropped = 0; + warn_count = 0; + n_warnings_dropped = 0; + } + + cstack.resize(p_stack_info.size() * 3); + for (int i = 0; i < p_stack_info.size(); i++) { + cstack[i * 3 + 0] = p_stack_info[i].file; + cstack[i * 3 + 1] = p_stack_info[i].func; + cstack[i * 3 + 2] = p_stack_info[i].line; + } + + //oe.callstack = cstack; + if (oe.warning) { + warn_count++; + } else { + err_count++; + } + + mutex->lock(); + + if (!locking && is_peer_connected()) { + + if (oe.warning) { + if (warn_count > max_warnings_per_second) { + n_warnings_dropped++; + } else { + errors.push_back(oe); + } + } else { + if (err_count > max_errors_per_second) { + n_errors_dropped++; + } else { + errors.push_back(oe); + } + } + } + + mutex->unlock(); +} + +void ScriptDebuggerRemote::_print_handler(void *p_this, const String &p_string, bool p_error) { + + ScriptDebuggerRemote *sdr = (ScriptDebuggerRemote *)p_this; + + uint64_t ticks = OS::get_singleton()->get_ticks_usec() / 1000; + sdr->msec_count += ticks - sdr->last_msec; + sdr->last_msec = ticks; + + if (sdr->msec_count > 1000) { + sdr->char_count = 0; + sdr->msec_count = 0; + } + + String s = p_string; + int allowed_chars = MIN(MAX(sdr->max_cps - sdr->char_count, 0), s.length()); + + if (allowed_chars == 0) + return; + + if (allowed_chars < s.length()) { + s = s.substr(0, allowed_chars); + } + + sdr->char_count += allowed_chars; + bool overflowed = sdr->char_count >= sdr->max_cps; + + sdr->mutex->lock(); + if (!sdr->locking && sdr->is_peer_connected()) { + + if (overflowed) + s += "[...]"; + + sdr->output_strings.push_back(s); + + if (overflowed) { + sdr->output_strings.push_back("[output overflow, print less text!]"); + } + } + sdr->mutex->unlock(); +} + +void ScriptDebuggerRemote::request_quit() { + + requested_quit = true; +} + +void ScriptDebuggerRemote::set_multiplayer(Ref<MultiplayerAPI> p_multiplayer) { + multiplayer = p_multiplayer; +} + +bool ScriptDebuggerRemote::is_profiling() const { + + return profiling; +} +void ScriptDebuggerRemote::add_profiling_frame_data(const StringName &p_name, const Array &p_data) { + + int idx = -1; + for (int i = 0; i < profile_frame_data.size(); i++) { + if (profile_frame_data[i].name == p_name) { + idx = i; + break; + } + } + + FrameData fd; + fd.name = p_name; + fd.data = p_data; + + if (idx == -1) { + profile_frame_data.push_back(fd); + } else { + profile_frame_data.write[idx] = fd; + } +} + +void ScriptDebuggerRemote::profiling_start() { + //ignores this, uses it via connection +} + +void ScriptDebuggerRemote::profiling_end() { + //ignores this, uses it via connection +} + +void ScriptDebuggerRemote::profiling_set_frame_times(float p_frame_time, float p_idle_time, float p_physics_time, float p_physics_frame_time) { + + frame_time = p_frame_time; + idle_time = p_idle_time; + physics_time = p_physics_time; + physics_frame_time = p_physics_frame_time; +} + +void ScriptDebuggerRemote::set_skip_breakpoints(bool p_skip_breakpoints) { + skip_breakpoints = p_skip_breakpoints; +} + +ScriptDebuggerRemote::ResourceUsageFunc ScriptDebuggerRemote::resource_usage_func = NULL; +ScriptDebuggerRemote::ParseMessageFunc ScriptDebuggerRemote::scene_tree_parse_func = NULL; + +ScriptDebuggerRemote::ScriptDebuggerRemote() : + profiling(false), + visual_profiling(false), + network_profiling(false), + max_frame_functions(16), + skip_profile_frame(false), + reload_all_scripts(false), + tcp_client(Ref<StreamPeerTCP>(memnew(StreamPeerTCP))), + packet_peer_stream(Ref<PacketPeerStream>(memnew(PacketPeerStream))), + last_perf_time(0), + last_net_prof_time(0), + last_net_bandwidth_time(0), + performance(Engine::get_singleton()->get_singleton_object("Performance")), + requested_quit(false), + mutex(Mutex::create()), + max_messages_per_frame(GLOBAL_GET("network/limits/debugger_stdout/max_messages_per_frame")), + n_messages_dropped(0), + max_errors_per_second(GLOBAL_GET("network/limits/debugger_stdout/max_errors_per_second")), + max_warnings_per_second(GLOBAL_GET("network/limits/debugger_stdout/max_warnings_per_second")), + n_errors_dropped(0), + max_cps(GLOBAL_GET("network/limits/debugger_stdout/max_chars_per_second")), + char_count(0), + err_count(0), + warn_count(0), + last_msec(0), + msec_count(0), + locking(false), + poll_every(0) { + + packet_peer_stream->set_stream_peer(tcp_client); + packet_peer_stream->set_output_buffer_max_size((1024 * 1024 * 8) - 4); // 8 MiB should be way more than enough, minus 4 bytes for separator. + + phl.printfunc = _print_handler; + phl.userdata = this; + add_print_handler(&phl); + + eh.errfunc = _err_handler; + eh.userdata = this; + add_error_handler(&eh); + + profile_info.resize(GLOBAL_GET("debug/settings/profiler/max_functions")); + network_profile_info.resize(GLOBAL_GET("debug/settings/profiler/max_functions")); + profile_info_ptrs.resize(profile_info.size()); +} + +ScriptDebuggerRemote::~ScriptDebuggerRemote() { + + remove_print_handler(&phl); + remove_error_handler(&eh); + memdelete(mutex); +} diff --git a/scene/debugger/script_debugger_remote.h b/core/script_debugger_remote.h index ae44bf9ca2..682da1d276 100644 --- a/scene/debugger/script_debugger_remote.h +++ b/core/script_debugger_remote.h @@ -37,16 +37,170 @@ #include "core/os/os.h" #include "core/script_language.h" -class SceneTree; - class ScriptDebuggerRemote : public ScriptDebugger { - struct Message { +public: + class ResourceInfo { + public: + String path; + String format; + String type; + RID id; + int vram; + bool operator<(const ResourceInfo &p_img) const { return vram == p_img.vram ? id < p_img.id : vram > p_img.vram; } + ResourceInfo() { + vram = 0; + } + }; + + class ResourceUsage { + public: + List<ResourceInfo> infos; + + Array serialize(); + bool deserialize(const Array &p_arr); + }; + + class FrameInfo { + public: + StringName name; + float self_time; + float total_time; + + FrameInfo() { + self_time = 0; + total_time = 0; + } + }; + + class FrameFunction { + public: + int sig_id; + int call_count; + StringName name; + float self_time; + float total_time; + + FrameFunction() { + sig_id = -1; + call_count = 0; + self_time = 0; + total_time = 0; + } + }; + class ScriptStackVariable { + public: + String name; + Variant value; + int type; + ScriptStackVariable() { + type = -1; + } + + Array serialize(int max_size = 1 << 20); // 1 MiB default. + bool deserialize(const Array &p_arr); + }; + + class ScriptStackDump { + public: + List<ScriptLanguage::StackInfo> frames; + ScriptStackDump() {} + + Array serialize(); + bool deserialize(const Array &p_arr); + }; + + class Message { + + public: String message; Array data; + + Message() {} + }; + + class OutputError { + public: + int hr; + int min; + int sec; + int msec; + String source_file; + String source_func; + int source_line; + String error; + String error_descr; + bool warning; + Vector<ScriptLanguage::StackInfo> callstack; + + OutputError() { + hr = -1; + min = -1; + sec = -1; + msec = -1; + source_line = -1; + warning = false; + } + + Array serialize(); + bool deserialize(const Array &p_arr); + }; + + struct FrameData { + + StringName name; + Array data; + }; + + class ProfilerSignature { + public: + StringName name; + int id; + + Array serialize(); + bool deserialize(const Array &p_arr); + + ProfilerSignature() { + id = -1; + }; + }; + + class ProfilerFrame { + public: + int frame_number; + float frame_time; + float idle_time; + float physics_time; + float physics_frame_time; + float script_time; + + Vector<FrameData> frames_data; + Vector<FrameFunction> frame_functions; + + ProfilerFrame() { + frame_number = 0; + frame_time = 0; + idle_time = 0; + physics_time = 0; + physics_frame_time = 0; + } + + Array serialize(); + bool deserialize(const Array &p_arr); }; + class NetworkProfilerFrame { + public: + Vector<MultiplayerAPI::ProfilingInfo> infos; + + Array serialize(); + bool deserialize(const Array &p_arr); + + NetworkProfilerFrame(){}; + }; + +protected: struct ProfileInfoSort { bool operator()(ScriptLanguage::ProfilingInfo *A, ScriptLanguage::ProfilingInfo *B) const { @@ -78,21 +232,6 @@ class ScriptDebuggerRemote : public ScriptDebugger { bool requested_quit; Mutex *mutex; - struct OutputError { - - int hr; - int min; - int sec; - int msec; - String source_file; - String source_func; - int source_line; - String error; - String error_descr; - bool warning; - Array callstack; - }; - List<String> output_strings; List<Message> messages; int max_messages_per_frame; @@ -119,9 +258,7 @@ class ScriptDebuggerRemote : public ScriptDebugger { void _poll_events(); uint32_t poll_every; - SceneTree *scene_tree; - - bool _parse_live_edit(const Array &p_command); + void _parse_message(const String p_command, const Array &p_data, ScriptLanguage *p_script = NULL); void _set_object_property(ObjectID p_id, const String &p_property, const Variant &p_value); @@ -133,40 +270,24 @@ class ScriptDebuggerRemote : public ScriptDebugger { ErrorHandlerList eh; static void _err_handler(void *, const char *, const char *, int p_line, const char *, const char *, ErrorHandlerType p_type); + void _put_msg(String p_message, Array p_data); void _send_profiling_data(bool p_for_frame); void _send_network_profiling_data(); void _send_network_bandwidth_usage(); - struct FrameData { - - StringName name; - Array data; - }; - Vector<FrameData> profile_frame_data; - void _put_variable(const String &p_name, const Variant &p_variable); - - void _save_node(ObjectID id, const String &p_path); - bool skip_breakpoints; public: - struct ResourceUsage { - - String path; - String format; - String type; - RID id; - int vram; - bool operator<(const ResourceUsage &p_img) const { return vram == p_img.vram ? id < p_img.id : vram > p_img.vram; } - }; - - typedef void (*ResourceUsageFunc)(List<ResourceUsage> *); + typedef void (*ResourceUsageFunc)(ResourceUsage *); + typedef Error (*ParseMessageFunc)(const String &p_name, const Array &p_msg); // Returns true if something was found (stopping propagation). static ResourceUsageFunc resource_usage_func; + static ParseMessageFunc scene_tree_parse_func; // Could be made into list, extensible... Error connect_to_host(const String &p_host, uint16_t p_port); + bool is_peer_connected(); virtual void debug(ScriptLanguage *p_script, bool p_can_continue = true, bool p_is_error_breakpoint = false); virtual void idle_poll(); virtual void line_poll(); @@ -188,8 +309,6 @@ public: virtual void set_skip_breakpoints(bool p_skip_breakpoints); - void set_scene_tree(SceneTree *p_scene_tree) { scene_tree = p_scene_tree; }; - ScriptDebuggerRemote(); ~ScriptDebuggerRemote(); }; diff --git a/core/script_language.cpp b/core/script_language.cpp index 1149feac38..0b00247502 100644 --- a/core/script_language.cpp +++ b/core/script_language.cpp @@ -307,17 +307,17 @@ Variant ScriptInstance::call(const StringName &p_method, VARIANT_ARG_DECLARE) { argc++; } - Variant::CallError error; + Callable::CallError error; return call(p_method, argptr, argc, error); } void ScriptInstance::call_multilevel(const StringName &p_method, const Variant **p_args, int p_argcount) { - Variant::CallError ce; + Callable::CallError ce; call(p_method, p_args, p_argcount, ce); // script may not support multilevel calls } void ScriptInstance::call_multilevel_reversed(const StringName &p_method, const Variant **p_args, int p_argcount) { - Variant::CallError ce; + Callable::CallError ce; call(p_method, p_args, p_argcount, ce); // script may not support multilevel calls } diff --git a/core/script_language.h b/core/script_language.h index 788f5d6976..48570ae546 100644 --- a/core/script_language.h +++ b/core/script_language.h @@ -197,7 +197,7 @@ public: virtual void get_method_list(List<MethodInfo> *p_list) const = 0; virtual bool has_method(const StringName &p_method) const = 0; virtual Variant call(const StringName &p_method, VARIANT_ARG_LIST); - virtual Variant call(const StringName &p_method, const Variant **p_args, int p_argcount, Variant::CallError &r_error) = 0; + virtual Variant call(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error) = 0; virtual void call_multilevel(const StringName &p_method, VARIANT_ARG_LIST); virtual void call_multilevel(const StringName &p_method, const Variant **p_args, int p_argcount); virtual void call_multilevel_reversed(const StringName &p_method, const Variant **p_args, int p_argcount); @@ -313,7 +313,7 @@ public: virtual bool supports_builtin_mode() const = 0; virtual bool can_inherit_from_file() { return false; } virtual int find_function(const String &p_function, const String &p_code) const = 0; - virtual String make_function(const String &p_class, const String &p_name, const PoolStringArray &p_args) const = 0; + virtual String make_function(const String &p_class, const String &p_name, const PackedStringArray &p_args) const = 0; virtual Error open_in_external_editor(const Ref<Script> &p_script, int p_line, int p_col) { return ERR_UNAVAILABLE; } virtual bool overrides_external_editor() { return false; } @@ -424,12 +424,12 @@ public: virtual void get_method_list(List<MethodInfo> *p_list) const; virtual bool has_method(const StringName &p_method) const; virtual Variant call(const StringName &p_method, VARIANT_ARG_LIST) { return Variant(); } - virtual Variant call(const StringName &p_method, const Variant **p_args, int p_argcount, Variant::CallError &r_error) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; + virtual Variant call(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error) { + r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD; return Variant(); } //virtual void call_multilevel(const StringName& p_method,VARIANT_ARG_LIST) { return Variant(); } - //virtual void call_multilevel(const StringName& p_method,const Variant** p_args,int p_argcount,Variant::CallError &r_error) { return Variant(); } + //virtual void call_multilevel(const StringName& p_method,const Variant** p_args,int p_argcount,Callable::CallError &r_error) { return Variant(); } virtual void notification(int p_notification) {} virtual Ref<Script> get_script() const { return script; } diff --git a/core/translation.cpp b/core/translation.cpp index cf76de1c9e..17c23b86cd 100644 --- a/core/translation.cpp +++ b/core/translation.cpp @@ -794,9 +794,9 @@ static const char *locale_renames[][2] = { /////////////////////////////////////////////// -PoolVector<String> Translation::_get_messages() const { +Vector<String> Translation::_get_messages() const { - PoolVector<String> msgs; + Vector<String> msgs; msgs.resize(translation_map.size() * 2); int idx = 0; for (const Map<StringName, StringName>::Element *E = translation_map.front(); E; E = E->next()) { @@ -809,9 +809,9 @@ PoolVector<String> Translation::_get_messages() const { return msgs; } -PoolVector<String> Translation::_get_message_list() const { +Vector<String> Translation::_get_message_list() const { - PoolVector<String> msgs; + Vector<String> msgs; msgs.resize(translation_map.size()); int idx = 0; for (const Map<StringName, StringName>::Element *E = translation_map.front(); E; E = E->next()) { @@ -823,12 +823,12 @@ PoolVector<String> Translation::_get_message_list() const { return msgs; } -void Translation::_set_messages(const PoolVector<String> &p_messages) { +void Translation::_set_messages(const Vector<String> &p_messages) { int msg_count = p_messages.size(); ERR_FAIL_COND(msg_count % 2); - PoolVector<String>::Read r = p_messages.read(); + const String *r = p_messages.ptr(); for (int i = 0; i < msg_count; i += 2) { @@ -898,7 +898,7 @@ void Translation::_bind_methods() { ClassDB::bind_method(D_METHOD("_set_messages"), &Translation::_set_messages); ClassDB::bind_method(D_METHOD("_get_messages"), &Translation::_get_messages); - ADD_PROPERTY(PropertyInfo(Variant::POOL_STRING_ARRAY, "messages", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_messages", "_get_messages"); + ADD_PROPERTY(PropertyInfo(Variant::PACKED_STRING_ARRAY, "messages", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_messages", "_get_messages"); ADD_PROPERTY(PropertyInfo(Variant::STRING, "locale"), "set_locale", "get_locale"); } @@ -1146,12 +1146,12 @@ TranslationServer *TranslationServer::singleton = NULL; bool TranslationServer::_load_translations(const String &p_from) { if (ProjectSettings::get_singleton()->has_setting(p_from)) { - PoolVector<String> translations = ProjectSettings::get_singleton()->get(p_from); + Vector<String> translations = ProjectSettings::get_singleton()->get(p_from); int tcount = translations.size(); if (tcount) { - PoolVector<String>::Read r = translations.read(); + const String *r = translations.ptr(); for (int i = 0; i < tcount; i++) { diff --git a/core/translation.h b/core/translation.h index 8f56b7271d..0448ea56c5 100644 --- a/core/translation.h +++ b/core/translation.h @@ -42,10 +42,10 @@ class Translation : public Resource { String locale; Map<StringName, StringName> translation_map; - PoolVector<String> _get_message_list() const; + Vector<String> _get_message_list() const; - PoolVector<String> _get_messages() const; - void _set_messages(const PoolVector<String> &p_messages); + Vector<String> _get_messages() const; + void _set_messages(const Vector<String> &p_messages); protected: static void _bind_methods(); diff --git a/core/type_info.h b/core/type_info.h index b9e5b61a6a..5dacf67de4 100644 --- a/core/type_info.h +++ b/core/type_info.h @@ -137,8 +137,8 @@ MAKE_TYPE_INFO_WITH_META(int32_t, Variant::INT, GodotTypeInfo::METADATA_INT_IS_I MAKE_TYPE_INFO_WITH_META(uint64_t, Variant::INT, GodotTypeInfo::METADATA_INT_IS_UINT64) MAKE_TYPE_INFO_WITH_META(int64_t, Variant::INT, GodotTypeInfo::METADATA_INT_IS_INT64) MAKE_TYPE_INFO(wchar_t, Variant::INT) -MAKE_TYPE_INFO_WITH_META(float, Variant::REAL, GodotTypeInfo::METADATA_REAL_IS_FLOAT) -MAKE_TYPE_INFO_WITH_META(double, Variant::REAL, GodotTypeInfo::METADATA_REAL_IS_DOUBLE) +MAKE_TYPE_INFO_WITH_META(float, Variant::FLOAT, GodotTypeInfo::METADATA_REAL_IS_FLOAT) +MAKE_TYPE_INFO_WITH_META(double, Variant::FLOAT, GodotTypeInfo::METADATA_REAL_IS_DOUBLE) MAKE_TYPE_INFO(String, Variant::STRING) MAKE_TYPE_INFO(Vector2, Variant::VECTOR2) @@ -151,41 +151,24 @@ MAKE_TYPE_INFO(AABB, Variant::AABB) MAKE_TYPE_INFO(Basis, Variant::BASIS) MAKE_TYPE_INFO(Transform, Variant::TRANSFORM) MAKE_TYPE_INFO(Color, Variant::COLOR) +MAKE_TYPE_INFO(StringName, Variant::STRING_NAME) MAKE_TYPE_INFO(NodePath, Variant::NODE_PATH) MAKE_TYPE_INFO(RID, Variant::_RID) +MAKE_TYPE_INFO(Callable, Variant::CALLABLE) +MAKE_TYPE_INFO(Signal, Variant::SIGNAL) MAKE_TYPE_INFO(Dictionary, Variant::DICTIONARY) MAKE_TYPE_INFO(Array, Variant::ARRAY) -MAKE_TYPE_INFO(PoolByteArray, Variant::POOL_BYTE_ARRAY) -MAKE_TYPE_INFO(PoolIntArray, Variant::POOL_INT_ARRAY) -MAKE_TYPE_INFO(PoolRealArray, Variant::POOL_REAL_ARRAY) -MAKE_TYPE_INFO(PoolStringArray, Variant::POOL_STRING_ARRAY) -MAKE_TYPE_INFO(PoolVector2Array, Variant::POOL_VECTOR2_ARRAY) -MAKE_TYPE_INFO(PoolVector3Array, Variant::POOL_VECTOR3_ARRAY) -MAKE_TYPE_INFO(PoolColorArray, Variant::POOL_COLOR_ARRAY) - -MAKE_TYPE_INFO(StringName, Variant::STRING) -MAKE_TYPE_INFO(IP_Address, Variant::STRING) - -class BSP_Tree; -MAKE_TYPE_INFO(BSP_Tree, Variant::DICTIONARY) +MAKE_TYPE_INFO(PackedByteArray, Variant::PACKED_BYTE_ARRAY) +MAKE_TYPE_INFO(PackedInt32Array, Variant::PACKED_INT32_ARRAY) +MAKE_TYPE_INFO(PackedInt64Array, Variant::PACKED_INT64_ARRAY) +MAKE_TYPE_INFO(PackedFloat32Array, Variant::PACKED_FLOAT32_ARRAY) +MAKE_TYPE_INFO(PackedFloat64Array, Variant::PACKED_FLOAT64_ARRAY) +MAKE_TYPE_INFO(PackedStringArray, Variant::PACKED_STRING_ARRAY) +MAKE_TYPE_INFO(PackedVector2Array, Variant::PACKED_VECTOR2_ARRAY) +MAKE_TYPE_INFO(PackedVector3Array, Variant::PACKED_VECTOR3_ARRAY) +MAKE_TYPE_INFO(PackedColorArray, Variant::PACKED_COLOR_ARRAY) -//for RefPtr -template <> -struct GetTypeInfo<RefPtr> { - static const Variant::Type VARIANT_TYPE = Variant::OBJECT; - static const GodotTypeInfo::Metadata METADATA = GodotTypeInfo::METADATA_NONE; - static inline PropertyInfo get_class_info() { - return PropertyInfo(Variant::OBJECT, String(), PROPERTY_HINT_RESOURCE_TYPE, "Reference"); - } -}; -template <> -struct GetTypeInfo<const RefPtr &> { - static const Variant::Type VARIANT_TYPE = Variant::OBJECT; - static const GodotTypeInfo::Metadata METADATA = GodotTypeInfo::METADATA_NONE; - static inline PropertyInfo get_class_info() { - return PropertyInfo(Variant::OBJECT, String(), PROPERTY_HINT_RESOURCE_TYPE, "Reference"); - } -}; +MAKE_TYPE_INFO(IP_Address, Variant::STRING) //objectID template <> @@ -234,21 +217,11 @@ struct GetTypeInfo<const Variant &> { } \ }; -MAKE_TEMPLATE_TYPE_INFO(Vector, uint8_t, Variant::POOL_BYTE_ARRAY) -MAKE_TEMPLATE_TYPE_INFO(Vector, int, Variant::POOL_INT_ARRAY) -MAKE_TEMPLATE_TYPE_INFO(Vector, float, Variant::POOL_REAL_ARRAY) -MAKE_TEMPLATE_TYPE_INFO(Vector, String, Variant::POOL_STRING_ARRAY) -MAKE_TEMPLATE_TYPE_INFO(Vector, Vector2, Variant::POOL_VECTOR2_ARRAY) -MAKE_TEMPLATE_TYPE_INFO(Vector, Vector3, Variant::POOL_VECTOR3_ARRAY) -MAKE_TEMPLATE_TYPE_INFO(Vector, Color, Variant::POOL_COLOR_ARRAY) - MAKE_TEMPLATE_TYPE_INFO(Vector, Variant, Variant::ARRAY) MAKE_TEMPLATE_TYPE_INFO(Vector, RID, Variant::ARRAY) MAKE_TEMPLATE_TYPE_INFO(Vector, Plane, Variant::ARRAY) -MAKE_TEMPLATE_TYPE_INFO(Vector, StringName, Variant::POOL_STRING_ARRAY) - -MAKE_TEMPLATE_TYPE_INFO(PoolVector, Plane, Variant::ARRAY) -MAKE_TEMPLATE_TYPE_INFO(PoolVector, Face3, Variant::POOL_VECTOR3_ARRAY) +MAKE_TEMPLATE_TYPE_INFO(Vector, Face3, Variant::PACKED_VECTOR3_ARRAY) +MAKE_TEMPLATE_TYPE_INFO(Vector, StringName, Variant::PACKED_STRING_ARRAY) template <typename T> struct GetTypeInfo<T *, typename EnableIf<TypeInherits<Object, T>::value>::type> { diff --git a/core/typedefs.h b/core/typedefs.h index 0bb80cb2dd..5376b0718a 100644 --- a/core/typedefs.h +++ b/core/typedefs.h @@ -335,26 +335,16 @@ struct _GlobalLock { */ #define CAST_INT_TO_UCHAR_PTR(ptr) ((uint8_t *)(uintptr_t)(ptr)) -/** Hint for compilers that this fallthrough in a switch is intentional. - * Can be replaced by [[fallthrough]] annotation if we move to C++17. - * Including conditional support for it for people who set -std=c++17 - * themselves. - * Requires a trailing semicolon when used. - */ -#if __cplusplus >= 201703L -#define FALLTHROUGH [[fallthrough]] -#elif defined(__GNUC__) && __GNUC__ >= 7 -#define FALLTHROUGH __attribute__((fallthrough)) -#elif defined(__llvm__) && __cplusplus >= 201103L && defined(__has_feature) -#if __has_feature(cxx_attributes) && defined(__has_warning) -#if __has_warning("-Wimplicit-fallthrough") -#define FALLTHROUGH [[clang::fallthrough]] -#endif -#endif -#endif +// Home-made index sequence trick, so it can be used everywhere without the costly include of std::tuple. +// https://stackoverflow.com/questions/15014096/c-index-of-type-during-variadic-template-expansion -#ifndef FALLTHROUGH -#define FALLTHROUGH -#endif +template <size_t... Is> +struct IndexSequence {}; + +template <size_t N, size_t... Is> +struct BuildIndexSequence : BuildIndexSequence<N - 1, N - 1, Is...> {}; + +template <size_t... Is> +struct BuildIndexSequence<0, Is...> : IndexSequence<Is...> {}; #endif // TYPEDEFS_H diff --git a/core/undo_redo.cpp b/core/undo_redo.cpp index 577879d448..02f460c93d 100644 --- a/core/undo_redo.cpp +++ b/core/undo_redo.cpp @@ -105,7 +105,7 @@ void UndoRedo::create_action(const String &p_name, MergeMode p_mode) { action_level++; } -void UndoRedo::add_do_method(Object *p_object, const String &p_method, VARIANT_ARG_DECLARE) { +void UndoRedo::add_do_method(Object *p_object, const StringName &p_method, VARIANT_ARG_DECLARE) { VARIANT_ARGPTRS ERR_FAIL_COND(p_object == NULL); @@ -125,7 +125,7 @@ void UndoRedo::add_do_method(Object *p_object, const String &p_method, VARIANT_A actions.write[current_action + 1].do_ops.push_back(do_op); } -void UndoRedo::add_undo_method(Object *p_object, const String &p_method, VARIANT_ARG_DECLARE) { +void UndoRedo::add_undo_method(Object *p_object, const StringName &p_method, VARIANT_ARG_DECLARE) { VARIANT_ARGPTRS ERR_FAIL_COND(p_object == NULL); @@ -149,7 +149,7 @@ void UndoRedo::add_undo_method(Object *p_object, const String &p_method, VARIANT } actions.write[current_action + 1].undo_ops.push_back(undo_op); } -void UndoRedo::add_do_property(Object *p_object, const String &p_property, const Variant &p_value) { +void UndoRedo::add_do_property(Object *p_object, const StringName &p_property, const Variant &p_value) { ERR_FAIL_COND(p_object == NULL); ERR_FAIL_COND(action_level <= 0); @@ -164,7 +164,7 @@ void UndoRedo::add_do_property(Object *p_object, const String &p_property, const do_op.args[0] = p_value; actions.write[current_action + 1].do_ops.push_back(do_op); } -void UndoRedo::add_undo_property(Object *p_object, const String &p_property, const Variant &p_value) { +void UndoRedo::add_undo_property(Object *p_object, const StringName &p_property, const Variant &p_value) { ERR_FAIL_COND(p_object == NULL); ERR_FAIL_COND(action_level <= 0); @@ -290,9 +290,9 @@ void UndoRedo::_process_operation_list(List<Operation>::Element *E) { } argptrs.resize(argc); - Variant::CallError ce; + Callable::CallError ce; obj->call(op.name, (const Variant **)argptrs.ptr(), argc, ce); - if (ce.error != Variant::CallError::CALL_OK) { + if (ce.error != Callable::CallError::CALL_OK) { ERR_PRINT("Error calling method from signal '" + String(op.name) + "': " + Variant::get_call_error_text(obj, op.name, (const Variant **)argptrs.ptr(), argc, ce)); } #ifdef TOOLS_ENABLED @@ -431,32 +431,32 @@ UndoRedo::~UndoRedo() { clear_history(); } -Variant UndoRedo::_add_do_method(const Variant **p_args, int p_argcount, Variant::CallError &r_error) { +Variant UndoRedo::_add_do_method(const Variant **p_args, int p_argcount, Callable::CallError &r_error) { if (p_argcount < 2) { - r_error.error = Variant::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS; + r_error.error = Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS; r_error.argument = 0; return Variant(); } if (p_args[0]->get_type() != Variant::OBJECT) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.argument = 0; r_error.expected = Variant::OBJECT; return Variant(); } - if (p_args[1]->get_type() != Variant::STRING) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; + if (p_args[1]->get_type() != Variant::STRING_NAME && p_args[1]->get_type() != Variant::STRING) { + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.argument = 1; - r_error.expected = Variant::STRING; + r_error.expected = Variant::STRING_NAME; return Variant(); } - r_error.error = Variant::CallError::CALL_OK; + r_error.error = Callable::CallError::CALL_OK; Object *object = *p_args[0]; - String method = *p_args[1]; + StringName method = *p_args[1]; Variant v[VARIANT_ARG_MAX]; @@ -469,32 +469,32 @@ Variant UndoRedo::_add_do_method(const Variant **p_args, int p_argcount, Variant return Variant(); } -Variant UndoRedo::_add_undo_method(const Variant **p_args, int p_argcount, Variant::CallError &r_error) { +Variant UndoRedo::_add_undo_method(const Variant **p_args, int p_argcount, Callable::CallError &r_error) { if (p_argcount < 2) { - r_error.error = Variant::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS; + r_error.error = Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS; r_error.argument = 0; return Variant(); } if (p_args[0]->get_type() != Variant::OBJECT) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.argument = 0; r_error.expected = Variant::OBJECT; return Variant(); } - if (p_args[1]->get_type() != Variant::STRING) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; + if (p_args[1]->get_type() != Variant::STRING_NAME && p_args[1]->get_type() != Variant::STRING) { + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.argument = 1; - r_error.expected = Variant::STRING; + r_error.expected = Variant::STRING_NAME; return Variant(); } - r_error.error = Variant::CallError::CALL_OK; + r_error.error = Callable::CallError::CALL_OK; Object *object = *p_args[0]; - String method = *p_args[1]; + StringName method = *p_args[1]; Variant v[VARIANT_ARG_MAX]; @@ -518,7 +518,7 @@ void UndoRedo::_bind_methods() { MethodInfo mi; mi.name = "add_do_method"; mi.arguments.push_back(PropertyInfo(Variant::OBJECT, "object")); - mi.arguments.push_back(PropertyInfo(Variant::STRING, "method")); + mi.arguments.push_back(PropertyInfo(Variant::STRING_NAME, "method")); ClassDB::bind_vararg_method(METHOD_FLAGS_DEFAULT, "add_do_method", &UndoRedo::_add_do_method, mi, varray(), false); } @@ -527,7 +527,7 @@ void UndoRedo::_bind_methods() { MethodInfo mi; mi.name = "add_undo_method"; mi.arguments.push_back(PropertyInfo(Variant::OBJECT, "object")); - mi.arguments.push_back(PropertyInfo(Variant::STRING, "method")); + mi.arguments.push_back(PropertyInfo(Variant::STRING_NAME, "method")); ClassDB::bind_vararg_method(METHOD_FLAGS_DEFAULT, "add_undo_method", &UndoRedo::_add_undo_method, mi, varray(), false); } diff --git a/core/undo_redo.h b/core/undo_redo.h index bb9a4d1642..3b91e9ce36 100644 --- a/core/undo_redo.h +++ b/core/undo_redo.h @@ -47,8 +47,8 @@ public: }; typedef void (*CommitNotifyCallback)(void *p_ud, const String &p_name); - Variant _add_do_method(const Variant **p_args, int p_argcount, Variant::CallError &r_error); - Variant _add_undo_method(const Variant **p_args, int p_argcount, Variant::CallError &r_error); + Variant _add_do_method(const Variant **p_args, int p_argcount, Callable::CallError &r_error); + Variant _add_undo_method(const Variant **p_args, int p_argcount, Callable::CallError &r_error); typedef void (*MethodNotifyCallback)(void *p_ud, Object *p_base, const StringName &p_name, VARIANT_ARG_DECLARE); typedef void (*PropertyNotifyCallback)(void *p_ud, Object *p_base, const StringName &p_property, const Variant &p_value); @@ -65,7 +65,7 @@ private: Type type; Ref<Resource> resref; ObjectID object; - String name; + StringName name; Variant args[VARIANT_ARG_MAX]; }; @@ -103,10 +103,10 @@ protected: public: void create_action(const String &p_name = "", MergeMode p_mode = MERGE_DISABLE); - void add_do_method(Object *p_object, const String &p_method, VARIANT_ARG_LIST); - void add_undo_method(Object *p_object, const String &p_method, VARIANT_ARG_LIST); - void add_do_property(Object *p_object, const String &p_property, const Variant &p_value); - void add_undo_property(Object *p_object, const String &p_property, const Variant &p_value); + void add_do_method(Object *p_object, const StringName &p_method, VARIANT_ARG_LIST); + void add_undo_method(Object *p_object, const StringName &p_method, VARIANT_ARG_LIST); + void add_do_property(Object *p_object, const StringName &p_property, const Variant &p_value); + void add_undo_property(Object *p_object, const StringName &p_property, const Variant &p_value); void add_do_reference(Object *p_object); void add_undo_reference(Object *p_object); diff --git a/core/ustring.cpp b/core/ustring.cpp index c4543b89da..1d4d9c2dfd 100644 --- a/core/ustring.cpp +++ b/core/ustring.cpp @@ -2169,6 +2169,7 @@ int64_t String::to_int(const CharType *p_str, int p_len) { } else { break; } + [[fallthrough]]; } case READING_INT: { diff --git a/core/variant.cpp b/core/variant.cpp index 0f04710d13..7bdaab8fa8 100644 --- a/core/variant.cpp +++ b/core/variant.cpp @@ -57,7 +57,7 @@ String Variant::get_type_name(Variant::Type p_type) { return "int"; } break; - case REAL: { + case FLOAT: { return "float"; @@ -72,10 +72,18 @@ String Variant::get_type_name(Variant::Type p_type) { return "Vector2"; } break; + case VECTOR2I: { + + return "Vector2i"; + } break; case RECT2: { return "Rect2"; } break; + case RECT2I: { + + return "Rect2i"; + } break; case TRANSFORM2D: { return "Transform2D"; @@ -84,6 +92,10 @@ String Variant::get_type_name(Variant::Type p_type) { return "Vector3"; } break; + case VECTOR3I: { + + return "Vector3i"; + } break; case PLANE: { return "Plane"; @@ -128,6 +140,19 @@ String Variant::get_type_name(Variant::Type p_type) { return "Object"; } break; + case CALLABLE: { + + return "Callable"; + } break; + case SIGNAL: { + + return "Signal"; + } break; + case STRING_NAME: { + + return "StringName"; + + } break; case NODE_PATH: { return "NodePath"; @@ -145,38 +170,48 @@ String Variant::get_type_name(Variant::Type p_type) { } break; // arrays - case POOL_BYTE_ARRAY: { + case PACKED_BYTE_ARRAY: { + + return "PackedByteArray"; + + } break; + case PACKED_INT32_ARRAY: { - return "PoolByteArray"; + return "PackedInt32Array"; } break; - case POOL_INT_ARRAY: { + case PACKED_INT64_ARRAY: { - return "PoolIntArray"; + return "PackedInt64Array"; } break; - case POOL_REAL_ARRAY: { + case PACKED_FLOAT32_ARRAY: { - return "PoolRealArray"; + return "PackedFloat32Array"; } break; - case POOL_STRING_ARRAY: { + case PACKED_FLOAT64_ARRAY: { + + return "PackedFloat64Array"; - return "PoolStringArray"; } break; - case POOL_VECTOR2_ARRAY: { + case PACKED_STRING_ARRAY: { - return "PoolVector2Array"; + return "PackedStringArray"; + } break; + case PACKED_VECTOR2_ARRAY: { + + return "PackedVector2Array"; } break; - case POOL_VECTOR3_ARRAY: { + case PACKED_VECTOR3_ARRAY: { - return "PoolVector3Array"; + return "PackedVector3Array"; } break; - case POOL_COLOR_ARRAY: { + case PACKED_COLOR_ARRAY: { - return "PoolColorArray"; + return "PackedColorArray"; } break; default: { @@ -205,7 +240,7 @@ bool Variant::can_convert(Variant::Type p_type_from, Variant::Type p_type_to) { static const Type valid[] = { INT, - REAL, + FLOAT, STRING, NIL, }; @@ -216,7 +251,7 @@ bool Variant::can_convert(Variant::Type p_type_from, Variant::Type p_type_to) { static const Type valid[] = { BOOL, - REAL, + FLOAT, STRING, NIL, }; @@ -224,7 +259,7 @@ bool Variant::can_convert(Variant::Type p_type_from, Variant::Type p_type_to) { valid_types = valid; } break; - case REAL: { + case FLOAT: { static const Type valid[] = { BOOL, @@ -245,6 +280,46 @@ bool Variant::can_convert(Variant::Type p_type_from, Variant::Type p_type_to) { invalid_types = invalid; } break; + case VECTOR2: { + + static const Type valid[] = { + VECTOR2I, + NIL, + }; + + valid_types = valid; + + } break; + case VECTOR2I: { + + static const Type valid[] = { + VECTOR2, + NIL, + }; + + valid_types = valid; + + } break; + case RECT2: { + + static const Type valid[] = { + RECT2I, + NIL, + }; + + valid_types = valid; + + } break; + case RECT2I: { + + static const Type valid[] = { + RECT2, + NIL, + }; + + valid_types = valid; + + } break; case TRANSFORM2D: { static const Type valid[] = { @@ -254,6 +329,27 @@ bool Variant::can_convert(Variant::Type p_type_from, Variant::Type p_type_to) { valid_types = valid; } break; + case VECTOR3: { + + static const Type valid[] = { + VECTOR3I, + NIL, + }; + + valid_types = valid; + + } break; + case VECTOR3I: { + + static const Type valid[] = { + VECTOR3, + NIL, + }; + + valid_types = valid; + + } break; + case QUAT: { static const Type valid[] = { @@ -317,6 +413,15 @@ bool Variant::can_convert(Variant::Type p_type_from, Variant::Type p_type_to) { valid_types = valid; } break; + case STRING_NAME: { + + static const Type valid[] = { + STRING, + NIL + }; + + valid_types = valid; + } break; case NODE_PATH: { static const Type valid[] = { @@ -329,37 +434,56 @@ bool Variant::can_convert(Variant::Type p_type_from, Variant::Type p_type_to) { case ARRAY: { static const Type valid[] = { - POOL_BYTE_ARRAY, - POOL_INT_ARRAY, - POOL_STRING_ARRAY, - POOL_REAL_ARRAY, - POOL_COLOR_ARRAY, - POOL_VECTOR2_ARRAY, - POOL_VECTOR3_ARRAY, + PACKED_BYTE_ARRAY, + PACKED_INT32_ARRAY, + PACKED_INT64_ARRAY, + PACKED_FLOAT32_ARRAY, + PACKED_FLOAT64_ARRAY, + PACKED_STRING_ARRAY, + PACKED_COLOR_ARRAY, + PACKED_VECTOR2_ARRAY, + PACKED_VECTOR3_ARRAY, NIL }; valid_types = valid; } break; // arrays - case POOL_BYTE_ARRAY: { + case PACKED_BYTE_ARRAY: { + + static const Type valid[] = { + ARRAY, + NIL + }; + + valid_types = valid; + } break; + case PACKED_INT32_ARRAY: { static const Type valid[] = { ARRAY, NIL }; + valid_types = valid; + } break; + case PACKED_INT64_ARRAY: { + static const Type valid[] = { + ARRAY, + NIL + }; valid_types = valid; } break; - case POOL_INT_ARRAY: { + case PACKED_FLOAT32_ARRAY: { static const Type valid[] = { ARRAY, NIL }; + valid_types = valid; } break; - case POOL_REAL_ARRAY: { + case PACKED_FLOAT64_ARRAY: { static const Type valid[] = { ARRAY, @@ -368,7 +492,7 @@ bool Variant::can_convert(Variant::Type p_type_from, Variant::Type p_type_to) { valid_types = valid; } break; - case POOL_STRING_ARRAY: { + case PACKED_STRING_ARRAY: { static const Type valid[] = { ARRAY, @@ -376,7 +500,7 @@ bool Variant::can_convert(Variant::Type p_type_from, Variant::Type p_type_to) { }; valid_types = valid; } break; - case POOL_VECTOR2_ARRAY: { + case PACKED_VECTOR2_ARRAY: { static const Type valid[] = { ARRAY, @@ -385,7 +509,7 @@ bool Variant::can_convert(Variant::Type p_type_from, Variant::Type p_type_to) { valid_types = valid; } break; - case POOL_VECTOR3_ARRAY: { + case PACKED_VECTOR3_ARRAY: { static const Type valid[] = { ARRAY, @@ -394,7 +518,7 @@ bool Variant::can_convert(Variant::Type p_type_from, Variant::Type p_type_to) { valid_types = valid; } break; - case POOL_COLOR_ARRAY: { + case PACKED_COLOR_ARRAY: { static const Type valid[] = { ARRAY, @@ -452,7 +576,7 @@ bool Variant::can_convert_strict(Variant::Type p_type_from, Variant::Type p_type static const Type valid[] = { INT, - REAL, + FLOAT, //STRING, NIL, }; @@ -463,7 +587,7 @@ bool Variant::can_convert_strict(Variant::Type p_type_from, Variant::Type p_type static const Type valid[] = { BOOL, - REAL, + FLOAT, //STRING, NIL, }; @@ -471,7 +595,7 @@ bool Variant::can_convert_strict(Variant::Type p_type_from, Variant::Type p_type valid_types = valid; } break; - case REAL: { + case FLOAT: { static const Type valid[] = { BOOL, @@ -487,11 +611,52 @@ bool Variant::can_convert_strict(Variant::Type p_type_from, Variant::Type p_type static const Type valid[] = { NODE_PATH, + STRING_NAME, NIL }; valid_types = valid; } break; + case VECTOR2: { + + static const Type valid[] = { + VECTOR2I, + NIL, + }; + + valid_types = valid; + + } break; + case VECTOR2I: { + + static const Type valid[] = { + VECTOR2, + NIL, + }; + + valid_types = valid; + + } break; + case RECT2: { + + static const Type valid[] = { + RECT2I, + NIL, + }; + + valid_types = valid; + + } break; + case RECT2I: { + + static const Type valid[] = { + RECT2, + NIL, + }; + + valid_types = valid; + + } break; case TRANSFORM2D: { static const Type valid[] = { @@ -501,6 +666,27 @@ bool Variant::can_convert_strict(Variant::Type p_type_from, Variant::Type p_type valid_types = valid; } break; + case VECTOR3: { + + static const Type valid[] = { + VECTOR3I, + NIL, + }; + + valid_types = valid; + + } break; + case VECTOR3I: { + + static const Type valid[] = { + VECTOR3, + NIL, + }; + + valid_types = valid; + + } break; + case QUAT: { static const Type valid[] = { @@ -564,6 +750,15 @@ bool Variant::can_convert_strict(Variant::Type p_type_from, Variant::Type p_type valid_types = valid; } break; + case STRING_NAME: { + + static const Type valid[] = { + STRING, + NIL + }; + + valid_types = valid; + } break; case NODE_PATH: { static const Type valid[] = { @@ -576,20 +771,22 @@ bool Variant::can_convert_strict(Variant::Type p_type_from, Variant::Type p_type case ARRAY: { static const Type valid[] = { - POOL_BYTE_ARRAY, - POOL_INT_ARRAY, - POOL_STRING_ARRAY, - POOL_REAL_ARRAY, - POOL_COLOR_ARRAY, - POOL_VECTOR2_ARRAY, - POOL_VECTOR3_ARRAY, + PACKED_BYTE_ARRAY, + PACKED_INT32_ARRAY, + PACKED_INT64_ARRAY, + PACKED_FLOAT32_ARRAY, + PACKED_FLOAT64_ARRAY, + PACKED_STRING_ARRAY, + PACKED_COLOR_ARRAY, + PACKED_VECTOR2_ARRAY, + PACKED_VECTOR3_ARRAY, NIL }; valid_types = valid; } break; // arrays - case POOL_BYTE_ARRAY: { + case PACKED_BYTE_ARRAY: { static const Type valid[] = { ARRAY, @@ -598,7 +795,7 @@ bool Variant::can_convert_strict(Variant::Type p_type_from, Variant::Type p_type valid_types = valid; } break; - case POOL_INT_ARRAY: { + case PACKED_INT32_ARRAY: { static const Type valid[] = { ARRAY, @@ -606,7 +803,24 @@ bool Variant::can_convert_strict(Variant::Type p_type_from, Variant::Type p_type }; valid_types = valid; } break; - case POOL_REAL_ARRAY: { + case PACKED_INT64_ARRAY: { + + static const Type valid[] = { + ARRAY, + NIL + }; + valid_types = valid; + } break; + case PACKED_FLOAT32_ARRAY: { + + static const Type valid[] = { + ARRAY, + NIL + }; + + valid_types = valid; + } break; + case PACKED_FLOAT64_ARRAY: { static const Type valid[] = { ARRAY, @@ -615,7 +829,7 @@ bool Variant::can_convert_strict(Variant::Type p_type_from, Variant::Type p_type valid_types = valid; } break; - case POOL_STRING_ARRAY: { + case PACKED_STRING_ARRAY: { static const Type valid[] = { ARRAY, @@ -623,7 +837,7 @@ bool Variant::can_convert_strict(Variant::Type p_type_from, Variant::Type p_type }; valid_types = valid; } break; - case POOL_VECTOR2_ARRAY: { + case PACKED_VECTOR2_ARRAY: { static const Type valid[] = { ARRAY, @@ -632,7 +846,7 @@ bool Variant::can_convert_strict(Variant::Type p_type_from, Variant::Type p_type valid_types = valid; } break; - case POOL_VECTOR3_ARRAY: { + case PACKED_VECTOR3_ARRAY: { static const Type valid[] = { ARRAY, @@ -641,7 +855,7 @@ bool Variant::can_convert_strict(Variant::Type p_type_from, Variant::Type p_type valid_types = valid; } break; - case POOL_COLOR_ARRAY: { + case PACKED_COLOR_ARRAY: { static const Type valid[] = { ARRAY, @@ -716,9 +930,9 @@ bool Variant::is_zero() const { return _data._int == 0; } break; - case REAL: { + case FLOAT: { - return _data._real == 0; + return _data._float == 0; } break; case STRING: { @@ -733,11 +947,21 @@ bool Variant::is_zero() const { return *reinterpret_cast<const Vector2 *>(_data._mem) == Vector2(); } break; + case VECTOR2I: { + + return *reinterpret_cast<const Vector2i *>(_data._mem) == Vector2i(); + + } break; case RECT2: { return *reinterpret_cast<const Rect2 *>(_data._mem) == Rect2(); } break; + case RECT2I: { + + return *reinterpret_cast<const Rect2i *>(_data._mem) == Rect2i(); + + } break; case TRANSFORM2D: { return *_data._transform2d == Transform2D(); @@ -748,6 +972,11 @@ bool Variant::is_zero() const { return *reinterpret_cast<const Vector3 *>(_data._mem) == Vector3(); } break; + case VECTOR3I: { + + return *reinterpret_cast<const Vector3i *>(_data._mem) == Vector3i(); + + } break; case PLANE: { return *reinterpret_cast<const Plane *>(_data._mem) == Plane(); @@ -792,6 +1021,19 @@ bool Variant::is_zero() const { return _get_obj().obj == NULL; } break; + case CALLABLE: { + + return reinterpret_cast<const Callable *>(_data._mem)->is_null(); + } break; + case SIGNAL: { + + return reinterpret_cast<const Signal *>(_data._mem)->is_null(); + } break; + case STRING_NAME: { + + return *reinterpret_cast<const StringName *>(_data._mem) != StringName(); + + } break; case NODE_PATH: { return reinterpret_cast<const NodePath *>(_data._mem)->is_empty(); @@ -809,39 +1051,49 @@ bool Variant::is_zero() const { } break; // arrays - case POOL_BYTE_ARRAY: { + case PACKED_BYTE_ARRAY: { - return reinterpret_cast<const PoolVector<uint8_t> *>(_data._mem)->size() == 0; + return PackedArrayRef<uint8_t>::get_array(_data.packed_array).size() == 0; } break; - case POOL_INT_ARRAY: { + case PACKED_INT32_ARRAY: { - return reinterpret_cast<const PoolVector<int> *>(_data._mem)->size() == 0; + return PackedArrayRef<int32_t>::get_array(_data.packed_array).size() == 0; } break; - case POOL_REAL_ARRAY: { + case PACKED_INT64_ARRAY: { - return reinterpret_cast<const PoolVector<real_t> *>(_data._mem)->size() == 0; + return PackedArrayRef<int64_t>::get_array(_data.packed_array).size() == 0; } break; - case POOL_STRING_ARRAY: { + case PACKED_FLOAT32_ARRAY: { - return reinterpret_cast<const PoolVector<String> *>(_data._mem)->size() == 0; + return PackedArrayRef<float>::get_array(_data.packed_array).size() == 0; } break; - case POOL_VECTOR2_ARRAY: { + case PACKED_FLOAT64_ARRAY: { - return reinterpret_cast<const PoolVector<Vector2> *>(_data._mem)->size() == 0; + return PackedArrayRef<double>::get_array(_data.packed_array).size() == 0; } break; - case POOL_VECTOR3_ARRAY: { + case PACKED_STRING_ARRAY: { - return reinterpret_cast<const PoolVector<Vector3> *>(_data._mem)->size() == 0; + return PackedArrayRef<String>::get_array(_data.packed_array).size() == 0; } break; - case POOL_COLOR_ARRAY: { + case PACKED_VECTOR2_ARRAY: { - return reinterpret_cast<const PoolVector<Color> *>(_data._mem)->size() == 0; + return PackedArrayRef<Vector2>::get_array(_data.packed_array).size() == 0; + + } break; + case PACKED_VECTOR3_ARRAY: { + + return PackedArrayRef<Vector3>::get_array(_data.packed_array).size() == 0; + + } break; + case PACKED_COLOR_ARRAY: { + + return PackedArrayRef<Color>::get_array(_data.packed_array).size() == 0; } break; default: { @@ -869,9 +1121,9 @@ bool Variant::is_one() const { return _data._int == 1; } break; - case REAL: { + case FLOAT: { - return _data._real == 1; + return _data._float == 1; } break; case VECTOR2: { @@ -879,16 +1131,31 @@ bool Variant::is_one() const { return *reinterpret_cast<const Vector2 *>(_data._mem) == Vector2(1, 1); } break; + case VECTOR2I: { + + return *reinterpret_cast<const Vector2i *>(_data._mem) == Vector2i(1, 1); + + } break; case RECT2: { return *reinterpret_cast<const Rect2 *>(_data._mem) == Rect2(1, 1, 1, 1); } break; + case RECT2I: { + + return *reinterpret_cast<const Rect2i *>(_data._mem) == Rect2i(1, 1, 1, 1); + + } break; case VECTOR3: { return *reinterpret_cast<const Vector3 *>(_data._mem) == Vector3(1, 1, 1); } break; + case VECTOR3I: { + + return *reinterpret_cast<const Vector3i *>(_data._mem) == Vector3i(1, 1, 1); + + } break; case PLANE: { return *reinterpret_cast<const Plane *>(_data._mem) == Plane(1, 1, 1, 1); @@ -908,13 +1175,21 @@ bool Variant::is_one() const { return false; } +bool Variant::is_null() const { + if (type == OBJECT && _get_obj().obj) { + return false; + } else { + return true; + } +} + void Variant::reference(const Variant &p_variant) { switch (type) { case NIL: case BOOL: case INT: - case REAL: + case FLOAT: break; default: clear(); @@ -937,9 +1212,9 @@ void Variant::reference(const Variant &p_variant) { _data._int = p_variant._data._int; } break; - case REAL: { + case FLOAT: { - _data._real = p_variant._data._real; + _data._float = p_variant._data._float; } break; case STRING: { @@ -951,10 +1226,18 @@ void Variant::reference(const Variant &p_variant) { memnew_placement(_data._mem, Vector2(*reinterpret_cast<const Vector2 *>(p_variant._data._mem))); } break; + case VECTOR2I: { + + memnew_placement(_data._mem, Vector2i(*reinterpret_cast<const Vector2i *>(p_variant._data._mem))); + } break; case RECT2: { memnew_placement(_data._mem, Rect2(*reinterpret_cast<const Rect2 *>(p_variant._data._mem))); } break; + case RECT2I: { + + memnew_placement(_data._mem, Rect2i(*reinterpret_cast<const Rect2i *>(p_variant._data._mem))); + } break; case TRANSFORM2D: { _data._transform2d = memnew(Transform2D(*p_variant._data._transform2d)); @@ -963,6 +1246,10 @@ void Variant::reference(const Variant &p_variant) { memnew_placement(_data._mem, Vector3(*reinterpret_cast<const Vector3 *>(p_variant._data._mem))); } break; + case VECTOR3I: { + + memnew_placement(_data._mem, Vector3i(*reinterpret_cast<const Vector3i *>(p_variant._data._mem))); + } break; case PLANE: { memnew_placement(_data._mem, Plane(*reinterpret_cast<const Plane *>(p_variant._data._mem))); @@ -999,7 +1286,33 @@ void Variant::reference(const Variant &p_variant) { } break; case OBJECT: { - memnew_placement(_data._mem, ObjData(p_variant._get_obj())); + memnew_placement(_data._mem, ObjData); + + if (p_variant._get_obj().obj && p_variant._get_obj().id.is_reference()) { + Reference *reference = static_cast<Reference *>(p_variant._get_obj().obj); + if (!reference->reference()) { + _get_obj().obj = nullptr; + _get_obj().id = ObjectID(); + break; + } + } + + _get_obj().obj = const_cast<Object *>(p_variant._get_obj().obj); + _get_obj().id = p_variant._get_obj().id; + + } break; + case CALLABLE: { + + memnew_placement(_data._mem, Callable(*reinterpret_cast<const Callable *>(p_variant._data._mem))); + } break; + case SIGNAL: { + + memnew_placement(_data._mem, Signal(*reinterpret_cast<const Signal *>(p_variant._data._mem))); + } break; + case STRING_NAME: { + + memnew_placement(_data._mem, StringName(*reinterpret_cast<const StringName *>(p_variant._data._mem))); + } break; case NODE_PATH: { @@ -1018,39 +1331,76 @@ void Variant::reference(const Variant &p_variant) { } break; // arrays - case POOL_BYTE_ARRAY: { + case PACKED_BYTE_ARRAY: { - memnew_placement(_data._mem, PoolVector<uint8_t>(*reinterpret_cast<const PoolVector<uint8_t> *>(p_variant._data._mem))); + _data.packed_array = static_cast<PackedArrayRef<uint8_t> *>(p_variant._data.packed_array)->reference(); + if (!_data.packed_array) { + _data.packed_array = PackedArrayRef<uint8_t>::create(); + } + + } break; + case PACKED_INT32_ARRAY: { + + _data.packed_array = static_cast<PackedArrayRef<int32_t> *>(p_variant._data.packed_array)->reference(); + if (!_data.packed_array) { + _data.packed_array = PackedArrayRef<int32_t>::create(); + } + + } break; + case PACKED_INT64_ARRAY: { + + _data.packed_array = static_cast<PackedArrayRef<int64_t> *>(p_variant._data.packed_array)->reference(); + if (!_data.packed_array) { + _data.packed_array = PackedArrayRef<int64_t>::create(); + } } break; - case POOL_INT_ARRAY: { + case PACKED_FLOAT32_ARRAY: { - memnew_placement(_data._mem, PoolVector<int>(*reinterpret_cast<const PoolVector<int> *>(p_variant._data._mem))); + _data.packed_array = static_cast<PackedArrayRef<float> *>(p_variant._data.packed_array)->reference(); + if (!_data.packed_array) { + _data.packed_array = PackedArrayRef<float>::create(); + } } break; - case POOL_REAL_ARRAY: { + case PACKED_FLOAT64_ARRAY: { - memnew_placement(_data._mem, PoolVector<real_t>(*reinterpret_cast<const PoolVector<real_t> *>(p_variant._data._mem))); + _data.packed_array = static_cast<PackedArrayRef<double> *>(p_variant._data.packed_array)->reference(); + if (!_data.packed_array) { + _data.packed_array = PackedArrayRef<double>::create(); + } } break; - case POOL_STRING_ARRAY: { + case PACKED_STRING_ARRAY: { - memnew_placement(_data._mem, PoolVector<String>(*reinterpret_cast<const PoolVector<String> *>(p_variant._data._mem))); + _data.packed_array = static_cast<PackedArrayRef<String> *>(p_variant._data.packed_array)->reference(); + if (!_data.packed_array) { + _data.packed_array = PackedArrayRef<String>::create(); + } } break; - case POOL_VECTOR2_ARRAY: { + case PACKED_VECTOR2_ARRAY: { - memnew_placement(_data._mem, PoolVector<Vector2>(*reinterpret_cast<const PoolVector<Vector2> *>(p_variant._data._mem))); + _data.packed_array = static_cast<PackedArrayRef<Vector2> *>(p_variant._data.packed_array)->reference(); + if (!_data.packed_array) { + _data.packed_array = PackedArrayRef<Vector2>::create(); + } } break; - case POOL_VECTOR3_ARRAY: { + case PACKED_VECTOR3_ARRAY: { - memnew_placement(_data._mem, PoolVector<Vector3>(*reinterpret_cast<const PoolVector<Vector3> *>(p_variant._data._mem))); + _data.packed_array = static_cast<PackedArrayRef<Vector3> *>(p_variant._data.packed_array)->reference(); + if (!_data.packed_array) { + _data.packed_array = PackedArrayRef<Vector3>::create(); + } } break; - case POOL_COLOR_ARRAY: { + case PACKED_COLOR_ARRAY: { - memnew_placement(_data._mem, PoolVector<Color>(*reinterpret_cast<const PoolVector<Color> *>(p_variant._data._mem))); + _data.packed_array = static_cast<PackedArrayRef<Color> *>(p_variant._data.packed_array)->reference(); + if (!_data.packed_array) { + _data.packed_array = PackedArrayRef<Color>::create(); + } } break; default: { @@ -1063,10 +1413,13 @@ void Variant::zero() { case NIL: break; case BOOL: this->_data._bool = false; break; case INT: this->_data._int = 0; break; - case REAL: this->_data._real = 0; break; + case FLOAT: this->_data._float = 0; break; case VECTOR2: *reinterpret_cast<Vector2 *>(this->_data._mem) = Vector2(); break; + case VECTOR2I: *reinterpret_cast<Vector2i *>(this->_data._mem) = Vector2i(); break; case RECT2: *reinterpret_cast<Rect2 *>(this->_data._mem) = Rect2(); break; + case RECT2I: *reinterpret_cast<Rect2i *>(this->_data._mem) = Rect2i(); break; case VECTOR3: *reinterpret_cast<Vector3 *>(this->_data._mem) = Vector3(); break; + case VECTOR3I: *reinterpret_cast<Vector3i *>(this->_data._mem) = Vector3i(); break; case PLANE: *reinterpret_cast<Plane *>(this->_data._mem) = Plane(); break; case QUAT: *reinterpret_cast<Quat *>(this->_data._mem) = Quat(); break; case COLOR: *reinterpret_cast<Color *>(this->_data._mem) = Color(); break; @@ -1107,20 +1460,39 @@ void Variant::clear() { memdelete(_data._transform); } break; - // misc types + // misc types + case STRING_NAME: { + + reinterpret_cast<StringName *>(_data._mem)->~StringName(); + } break; case NODE_PATH: { reinterpret_cast<NodePath *>(_data._mem)->~NodePath(); } break; case OBJECT: { + if (_get_obj().id.is_reference()) { + //we are safe that there is a reference here + Reference *reference = static_cast<Reference *>(_get_obj().obj); + if (reference->unreference()) { + memdelete(reference); + } + } _get_obj().obj = NULL; - _get_obj().ref.unref(); + _get_obj().id = ObjectID(); } break; case _RID: { // not much need probably reinterpret_cast<RID *>(_data._mem)->~RID(); } break; + case CALLABLE: { + + reinterpret_cast<Callable *>(_data._mem)->~Callable(); + } break; + case SIGNAL: { + + reinterpret_cast<Signal *>(_data._mem)->~Signal(); + } break; case DICTIONARY: { reinterpret_cast<Dictionary *>(_data._mem)->~Dictionary(); @@ -1130,33 +1502,41 @@ void Variant::clear() { reinterpret_cast<Array *>(_data._mem)->~Array(); } break; // arrays - case POOL_BYTE_ARRAY: { + case PACKED_BYTE_ARRAY: { - reinterpret_cast<PoolVector<uint8_t> *>(_data._mem)->~PoolVector<uint8_t>(); + PackedArrayRefBase::destroy(_data.packed_array); } break; - case POOL_INT_ARRAY: { + case PACKED_INT32_ARRAY: { - reinterpret_cast<PoolVector<int> *>(_data._mem)->~PoolVector<int>(); + PackedArrayRefBase::destroy(_data.packed_array); } break; - case POOL_REAL_ARRAY: { + case PACKED_INT64_ARRAY: { - reinterpret_cast<PoolVector<real_t> *>(_data._mem)->~PoolVector<real_t>(); + PackedArrayRefBase::destroy(_data.packed_array); } break; - case POOL_STRING_ARRAY: { + case PACKED_FLOAT32_ARRAY: { - reinterpret_cast<PoolVector<String> *>(_data._mem)->~PoolVector<String>(); + PackedArrayRefBase::destroy(_data.packed_array); } break; - case POOL_VECTOR2_ARRAY: { + case PACKED_FLOAT64_ARRAY: { - reinterpret_cast<PoolVector<Vector2> *>(_data._mem)->~PoolVector<Vector2>(); + PackedArrayRefBase::destroy(_data.packed_array); } break; - case POOL_VECTOR3_ARRAY: { + case PACKED_STRING_ARRAY: { - reinterpret_cast<PoolVector<Vector3> *>(_data._mem)->~PoolVector<Vector3>(); + PackedArrayRefBase::destroy(_data.packed_array); } break; - case POOL_COLOR_ARRAY: { + case PACKED_VECTOR2_ARRAY: { - reinterpret_cast<PoolVector<Color> *>(_data._mem)->~PoolVector<Color>(); + PackedArrayRefBase::destroy(_data.packed_array); + } break; + case PACKED_VECTOR3_ARRAY: { + + PackedArrayRefBase::destroy(_data.packed_array); + } break; + case PACKED_COLOR_ARRAY: { + + PackedArrayRefBase::destroy(_data.packed_array); } break; default: { } /* not needed */ @@ -1172,7 +1552,7 @@ Variant::operator signed int() const { case NIL: return 0; case BOOL: return _data._bool ? 1 : 0; case INT: return _data._int; - case REAL: return _data._real; + case FLOAT: return _data._float; case STRING: return operator String().to_int(); default: { @@ -1187,7 +1567,7 @@ Variant::operator unsigned int() const { case NIL: return 0; case BOOL: return _data._bool ? 1 : 0; case INT: return _data._int; - case REAL: return _data._real; + case FLOAT: return _data._float; case STRING: return operator String().to_int(); default: { @@ -1203,7 +1583,7 @@ Variant::operator int64_t() const { case NIL: return 0; case BOOL: return _data._bool ? 1 : 0; case INT: return _data._int; - case REAL: return _data._real; + case FLOAT: return _data._float; case STRING: return operator String().to_int64(); default: { @@ -1220,7 +1600,7 @@ Variant::operator long unsigned int() const { case NIL: return 0; case BOOL: return _data._bool ? 1 : 0; case INT: return _data._int; - case REAL: return _data._real; + case FLOAT: return _data._real; case STRING: return operator String().to_int(); default: { @@ -1239,7 +1619,7 @@ Variant::operator uint64_t() const { case NIL: return 0; case BOOL: return _data._bool ? 1 : 0; case INT: return _data._int; - case REAL: return _data._real; + case FLOAT: return _data._float; case STRING: return operator String().to_int(); default: { @@ -1251,6 +1631,8 @@ Variant::operator uint64_t() const { Variant::operator ObjectID() const { if (type == INT) { return ObjectID(_data._int); + } else if (type == OBJECT) { + return _get_obj().id; } else { return ObjectID(); } @@ -1264,7 +1646,7 @@ Variant::operator signed long() const { case NIL: return 0; case BOOL: return _data._bool ? 1 : 0; case INT: return _data._int; - case REAL: return _data._real; + case FLOAT: return _data._real; case STRING: return operator String().to_int(); default: { @@ -1282,7 +1664,7 @@ Variant::operator unsigned long() const { case NIL: return 0; case BOOL: return _data._bool ? 1 : 0; case INT: return _data._int; - case REAL: return _data._real; + case FLOAT: return _data._real; case STRING: return operator String().to_int(); default: { @@ -1301,7 +1683,7 @@ Variant::operator signed short() const { case NIL: return 0; case BOOL: return _data._bool ? 1 : 0; case INT: return _data._int; - case REAL: return _data._real; + case FLOAT: return _data._float; case STRING: return operator String().to_int(); default: { @@ -1316,7 +1698,7 @@ Variant::operator unsigned short() const { case NIL: return 0; case BOOL: return _data._bool ? 1 : 0; case INT: return _data._int; - case REAL: return _data._real; + case FLOAT: return _data._float; case STRING: return operator String().to_int(); default: { @@ -1331,7 +1713,7 @@ Variant::operator signed char() const { case NIL: return 0; case BOOL: return _data._bool ? 1 : 0; case INT: return _data._int; - case REAL: return _data._real; + case FLOAT: return _data._float; case STRING: return operator String().to_int(); default: { @@ -1346,7 +1728,7 @@ Variant::operator unsigned char() const { case NIL: return 0; case BOOL: return _data._bool ? 1 : 0; case INT: return _data._int; - case REAL: return _data._real; + case FLOAT: return _data._float; case STRING: return operator String().to_int(); default: { @@ -1367,7 +1749,7 @@ Variant::operator float() const { case NIL: return 0; case BOOL: return _data._bool ? 1.0 : 0.0; case INT: return (float)_data._int; - case REAL: return _data._real; + case FLOAT: return _data._float; case STRING: return operator String().to_double(); default: { @@ -1382,7 +1764,7 @@ Variant::operator double() const { case NIL: return 0; case BOOL: return _data._bool ? 1.0 : 0.0; case INT: return (double)_data._int; - case REAL: return _data._real; + case FLOAT: return _data._float; case STRING: return operator String().to_double(); default: { @@ -1393,10 +1775,13 @@ Variant::operator double() const { Variant::operator StringName() const { - if (type == NODE_PATH) { - return reinterpret_cast<const NodePath *>(_data._mem)->get_sname(); + if (type == STRING_NAME) { + return *reinterpret_cast<const StringName *>(_data._mem); + } else if (type == STRING) { + return *reinterpret_cast<const String *>(_data._mem); } - return StringName(operator String()); + + return StringName(); } struct _VariantStrPair { @@ -1422,16 +1807,19 @@ String Variant::stringify(List<const void *> &stack) const { case NIL: return "Null"; case BOOL: return _data._bool ? "True" : "False"; case INT: return itos(_data._int); - case REAL: return rtos(_data._real); + case FLOAT: return rtos(_data._float); case STRING: return *reinterpret_cast<const String *>(_data._mem); case VECTOR2: return "(" + operator Vector2() + ")"; + case VECTOR2I: return "(" + operator Vector2i() + ")"; case RECT2: return "(" + operator Rect2() + ")"; + case RECT2I: return "(" + operator Rect2i() + ")"; case TRANSFORM2D: { Transform2D mat32 = operator Transform2D(); return "(" + Variant(mat32.elements[0]).operator String() + ", " + Variant(mat32.elements[1]).operator String() + ", " + Variant(mat32.elements[2]).operator String() + ")"; } break; case VECTOR3: return "(" + operator Vector3() + ")"; + case VECTOR3I: return "(" + operator Vector3i() + ")"; case PLANE: return operator Plane(); //case QUAT: @@ -1463,6 +1851,7 @@ String Variant::stringify(List<const void *> &stack) const { return mtx + ")"; } break; case TRANSFORM: return operator Transform(); + case STRING_NAME: return operator StringName(); case NODE_PATH: return operator NodePath(); case COLOR: return String::num(operator Color().r) + "," + String::num(operator Color().g) + "," + String::num(operator Color().b) + "," + String::num(operator Color().a); case DICTIONARY: { @@ -1501,9 +1890,9 @@ String Variant::stringify(List<const void *> &stack) const { return str; } break; - case POOL_VECTOR2_ARRAY: { + case PACKED_VECTOR2_ARRAY: { - PoolVector<Vector2> vec = operator PoolVector<Vector2>(); + Vector<Vector2> vec = operator Vector<Vector2>(); String str("["); for (int i = 0; i < vec.size(); i++) { @@ -1514,9 +1903,9 @@ String Variant::stringify(List<const void *> &stack) const { str += "]"; return str; } break; - case POOL_VECTOR3_ARRAY: { + case PACKED_VECTOR3_ARRAY: { - PoolVector<Vector3> vec = operator PoolVector<Vector3>(); + Vector<Vector3> vec = operator Vector<Vector3>(); String str("["); for (int i = 0; i < vec.size(); i++) { @@ -1527,9 +1916,9 @@ String Variant::stringify(List<const void *> &stack) const { str += "]"; return str; } break; - case POOL_STRING_ARRAY: { + case PACKED_STRING_ARRAY: { - PoolVector<String> vec = operator PoolVector<String>(); + Vector<String> vec = operator Vector<String>(); String str("["); for (int i = 0; i < vec.size(); i++) { @@ -1540,9 +1929,9 @@ String Variant::stringify(List<const void *> &stack) const { str += "]"; return str; } break; - case POOL_INT_ARRAY: { + case PACKED_INT32_ARRAY: { - PoolVector<int> vec = operator PoolVector<int>(); + Vector<int32_t> vec = operator Vector<int32_t>(); String str("["); for (int i = 0; i < vec.size(); i++) { @@ -1553,9 +1942,35 @@ String Variant::stringify(List<const void *> &stack) const { str += "]"; return str; } break; - case POOL_REAL_ARRAY: { + case PACKED_INT64_ARRAY: { + + Vector<int64_t> vec = operator Vector<int64_t>(); + String str("["); + for (int i = 0; i < vec.size(); i++) { + + if (i > 0) + str += ", "; + str = str + itos(vec[i]); + } + str += "]"; + return str; + } break; + case PACKED_FLOAT32_ARRAY: { + + Vector<float> vec = operator Vector<float>(); + String str("["); + for (int i = 0; i < vec.size(); i++) { + + if (i > 0) + str += ", "; + str = str + rtos(vec[i]); + } + str += "]"; + return str; + } break; + case PACKED_FLOAT64_ARRAY: { - PoolVector<real_t> vec = operator PoolVector<real_t>(); + Vector<double> vec = operator Vector<double>(); String str("["); for (int i = 0; i < vec.size(); i++) { @@ -1589,19 +2004,28 @@ String Variant::stringify(List<const void *> &stack) const { case OBJECT: { if (_get_obj().obj) { -#ifdef DEBUG_ENABLED - if (ScriptDebugger::get_singleton() && _get_obj().ref.is_null()) { - //only if debugging! - if (!ObjectDB::instance_validate(_get_obj().obj)) { - return "[Deleted Object]"; - }; + + if (!_get_obj().id.is_reference() && ObjectDB::get_instance(_get_obj().id) == nullptr) { + return "[Freed Object]"; }; -#endif + return _get_obj().obj->to_string(); } else return "[Object:null]"; } break; + case CALLABLE: { + const Callable &c = *reinterpret_cast<const Callable *>(_data._mem); + return c; + } break; + case SIGNAL: { + const Signal &s = *reinterpret_cast<const Signal *>(_data._mem); + return s; + } break; + case _RID: { + const RID &s = *reinterpret_cast<const RID *>(_data._mem); + return "RID(" + itos(s.get_id()) + ")"; + } break; default: { return "[" + get_type_name(type) + "]"; } @@ -1614,28 +2038,78 @@ Variant::operator Vector2() const { if (type == VECTOR2) return *reinterpret_cast<const Vector2 *>(_data._mem); + else if (type == VECTOR2I) + return *reinterpret_cast<const Vector2i *>(_data._mem); else if (type == VECTOR3) return Vector2(reinterpret_cast<const Vector3 *>(_data._mem)->x, reinterpret_cast<const Vector3 *>(_data._mem)->y); + else if (type == VECTOR3I) + return Vector2(reinterpret_cast<const Vector3i *>(_data._mem)->x, reinterpret_cast<const Vector3i *>(_data._mem)->y); else return Vector2(); } + +Variant::operator Vector2i() const { + + if (type == VECTOR2I) + return *reinterpret_cast<const Vector2i *>(_data._mem); + else if (type == VECTOR2) + return *reinterpret_cast<const Vector2 *>(_data._mem); + else if (type == VECTOR3) + return Vector2(reinterpret_cast<const Vector3 *>(_data._mem)->x, reinterpret_cast<const Vector3 *>(_data._mem)->y); + else if (type == VECTOR3I) + return Vector2(reinterpret_cast<const Vector3i *>(_data._mem)->x, reinterpret_cast<const Vector3i *>(_data._mem)->y); + else + return Vector2i(); +} + Variant::operator Rect2() const { if (type == RECT2) return *reinterpret_cast<const Rect2 *>(_data._mem); + else if (type == RECT2I) + return *reinterpret_cast<const Rect2i *>(_data._mem); else return Rect2(); } +Variant::operator Rect2i() const { + + if (type == RECT2I) + return *reinterpret_cast<const Rect2i *>(_data._mem); + else if (type == RECT2) + return *reinterpret_cast<const Rect2 *>(_data._mem); + else + return Rect2i(); +} + Variant::operator Vector3() const { if (type == VECTOR3) return *reinterpret_cast<const Vector3 *>(_data._mem); + else if (type == VECTOR3I) + return *reinterpret_cast<const Vector3i *>(_data._mem); else if (type == VECTOR2) return Vector3(reinterpret_cast<const Vector2 *>(_data._mem)->x, reinterpret_cast<const Vector2 *>(_data._mem)->y, 0.0); + else if (type == VECTOR2I) + return Vector3(reinterpret_cast<const Vector2i *>(_data._mem)->x, reinterpret_cast<const Vector2i *>(_data._mem)->y, 0.0); else return Vector3(); } + +Variant::operator Vector3i() const { + + if (type == VECTOR3I) + return *reinterpret_cast<const Vector3i *>(_data._mem); + else if (type == VECTOR3) + return *reinterpret_cast<const Vector3 *>(_data._mem); + else if (type == VECTOR2) + return Vector3i(reinterpret_cast<const Vector2 *>(_data._mem)->x, reinterpret_cast<const Vector2 *>(_data._mem)->y, 0.0); + else if (type == VECTOR2I) + return Vector3i(reinterpret_cast<const Vector2i *>(_data._mem)->x, reinterpret_cast<const Vector2i *>(_data._mem)->y, 0.0); + else + return Vector3i(); +} + Variant::operator Plane() const { if (type == PLANE) @@ -1739,29 +2213,21 @@ Variant::operator NodePath() const { return NodePath(); } -Variant::operator RefPtr() const { - - if (type == OBJECT) - return _get_obj().ref; - else - return RefPtr(); -} - Variant::operator RID() const { if (type == _RID) return *reinterpret_cast<const RID *>(_data._mem); - else if (type == OBJECT && !_get_obj().ref.is_null()) { - return _get_obj().ref.get_rid(); + else if (type == OBJECT && _get_obj().obj == nullptr) { + return RID(); } else if (type == OBJECT && _get_obj().obj) { #ifdef DEBUG_ENABLED if (ScriptDebugger::get_singleton()) { - ERR_FAIL_COND_V_MSG(!ObjectDB::instance_validate(_get_obj().obj), RID(), "Invalid pointer (object was deleted)."); + ERR_FAIL_COND_V_MSG(ObjectDB::get_instance(_get_obj().id) == nullptr, RID(), "Invalid pointer (object was freed)."); }; #endif - Variant::CallError ce; + Callable::CallError ce; Variant ret = _get_obj().obj->call(CoreStringNames::get_singleton()->get_rid, NULL, 0, ce); - if (ce.error == Variant::CallError::CALL_OK && ret.get_type() == Variant::_RID) { + if (ce.error == Callable::CallError::CALL_OK && ret.get_type() == Variant::_RID) { return ret; } return RID(); @@ -1777,6 +2243,25 @@ Variant::operator Object *() const { else return NULL; } + +Object *Variant::get_validated_object_with_check(bool &r_previously_freed) const { + if (type == OBJECT) { + Object *instance = ObjectDB::get_instance(_get_obj().id); + r_previously_freed = !instance && _get_obj().id != ObjectID(); + return instance; + } else { + r_previously_freed = false; + return NULL; + } +} + +Object *Variant::get_validated_object() const { + if (type == OBJECT) + return ObjectDB::get_instance(_get_obj().id); + else + return NULL; +} + Variant::operator Node *() const { if (type == OBJECT) @@ -1800,6 +2285,22 @@ Variant::operator Dictionary() const { return Dictionary(); } +Variant::operator Callable() const { + + if (type == CALLABLE) + return *reinterpret_cast<const Callable *>(_data._mem); + else + return Callable(); +} + +Variant::operator Signal() const { + + if (type == SIGNAL) + return *reinterpret_cast<const Signal *>(_data._mem); + else + return Signal(); +} + template <class DA, class SA> inline DA _convert_array(const SA &p_array) { @@ -1822,26 +2323,32 @@ inline DA _convert_array_from_variant(const Variant &p_variant) { case Variant::ARRAY: { return _convert_array<DA, Array>(p_variant.operator Array()); } - case Variant::POOL_BYTE_ARRAY: { - return _convert_array<DA, PoolVector<uint8_t> >(p_variant.operator PoolVector<uint8_t>()); + case Variant::PACKED_BYTE_ARRAY: { + return _convert_array<DA, Vector<uint8_t> >(p_variant.operator Vector<uint8_t>()); + } + case Variant::PACKED_INT32_ARRAY: { + return _convert_array<DA, Vector<int32_t> >(p_variant.operator Vector<int32_t>()); } - case Variant::POOL_INT_ARRAY: { - return _convert_array<DA, PoolVector<int> >(p_variant.operator PoolVector<int>()); + case Variant::PACKED_INT64_ARRAY: { + return _convert_array<DA, Vector<int64_t> >(p_variant.operator Vector<int64_t>()); } - case Variant::POOL_REAL_ARRAY: { - return _convert_array<DA, PoolVector<real_t> >(p_variant.operator PoolVector<real_t>()); + case Variant::PACKED_FLOAT32_ARRAY: { + return _convert_array<DA, Vector<float> >(p_variant.operator Vector<float>()); } - case Variant::POOL_STRING_ARRAY: { - return _convert_array<DA, PoolVector<String> >(p_variant.operator PoolVector<String>()); + case Variant::PACKED_FLOAT64_ARRAY: { + return _convert_array<DA, Vector<double> >(p_variant.operator Vector<double>()); } - case Variant::POOL_VECTOR2_ARRAY: { - return _convert_array<DA, PoolVector<Vector2> >(p_variant.operator PoolVector<Vector2>()); + case Variant::PACKED_STRING_ARRAY: { + return _convert_array<DA, Vector<String> >(p_variant.operator Vector<String>()); } - case Variant::POOL_VECTOR3_ARRAY: { - return _convert_array<DA, PoolVector<Vector3> >(p_variant.operator PoolVector<Vector3>()); + case Variant::PACKED_VECTOR2_ARRAY: { + return _convert_array<DA, Vector<Vector2> >(p_variant.operator Vector<Vector2>()); } - case Variant::POOL_COLOR_ARRAY: { - return _convert_array<DA, PoolVector<Color> >(p_variant.operator PoolVector<Color>()); + case Variant::PACKED_VECTOR3_ARRAY: { + return _convert_array<DA, Vector<Vector3> >(p_variant.operator Vector<Vector3>()); + } + case Variant::PACKED_COLOR_ARRAY: { + return _convert_array<DA, Vector<Color> >(p_variant.operator Vector<Color>()); } default: { return DA(); @@ -1857,56 +2364,72 @@ Variant::operator Array() const { return _convert_array_from_variant<Array>(*this); } -Variant::operator PoolVector<uint8_t>() const { +Variant::operator Vector<uint8_t>() const { - if (type == POOL_BYTE_ARRAY) - return *reinterpret_cast<const PoolVector<uint8_t> *>(_data._mem); + if (type == PACKED_BYTE_ARRAY) + return static_cast<PackedArrayRef<uint8_t> *>(_data.packed_array)->array; else - return _convert_array_from_variant<PoolVector<uint8_t> >(*this); + return _convert_array_from_variant<Vector<uint8_t> >(*this); } -Variant::operator PoolVector<int>() const { +Variant::operator Vector<int32_t>() const { - if (type == POOL_INT_ARRAY) - return *reinterpret_cast<const PoolVector<int> *>(_data._mem); + if (type == PACKED_INT32_ARRAY) + return static_cast<PackedArrayRef<int32_t> *>(_data.packed_array)->array; else - return _convert_array_from_variant<PoolVector<int> >(*this); + return _convert_array_from_variant<Vector<int> >(*this); } -Variant::operator PoolVector<real_t>() const { +Variant::operator Vector<int64_t>() const { - if (type == POOL_REAL_ARRAY) - return *reinterpret_cast<const PoolVector<real_t> *>(_data._mem); + if (type == PACKED_INT64_ARRAY) + return static_cast<PackedArrayRef<int64_t> *>(_data.packed_array)->array; else - return _convert_array_from_variant<PoolVector<real_t> >(*this); + return _convert_array_from_variant<Vector<int64_t> >(*this); } -Variant::operator PoolVector<String>() const { +Variant::operator Vector<float>() const { - if (type == POOL_STRING_ARRAY) - return *reinterpret_cast<const PoolVector<String> *>(_data._mem); + if (type == PACKED_FLOAT32_ARRAY) + return static_cast<PackedArrayRef<float> *>(_data.packed_array)->array; else - return _convert_array_from_variant<PoolVector<String> >(*this); + return _convert_array_from_variant<Vector<float> >(*this); } -Variant::operator PoolVector<Vector3>() const { - if (type == POOL_VECTOR3_ARRAY) - return *reinterpret_cast<const PoolVector<Vector3> *>(_data._mem); +Variant::operator Vector<double>() const { + + if (type == PACKED_FLOAT64_ARRAY) + return static_cast<PackedArrayRef<double> *>(_data.packed_array)->array; else - return _convert_array_from_variant<PoolVector<Vector3> >(*this); + return _convert_array_from_variant<Vector<double> >(*this); } -Variant::operator PoolVector<Vector2>() const { - if (type == POOL_VECTOR2_ARRAY) - return *reinterpret_cast<const PoolVector<Vector2> *>(_data._mem); +Variant::operator Vector<String>() const { + + if (type == PACKED_STRING_ARRAY) + return static_cast<PackedArrayRef<String> *>(_data.packed_array)->array; else - return _convert_array_from_variant<PoolVector<Vector2> >(*this); + return _convert_array_from_variant<Vector<String> >(*this); } +Variant::operator Vector<Vector3>() const { -Variant::operator PoolVector<Color>() const { + if (type == PACKED_VECTOR3_ARRAY) + return static_cast<PackedArrayRef<Vector3> *>(_data.packed_array)->array; + else + return _convert_array_from_variant<Vector<Vector3> >(*this); +} +Variant::operator Vector<Vector2>() const { - if (type == POOL_COLOR_ARRAY) - return *reinterpret_cast<const PoolVector<Color> *>(_data._mem); + if (type == PACKED_VECTOR2_ARRAY) + return static_cast<PackedArrayRef<Vector2> *>(_data.packed_array)->array; else - return _convert_array_from_variant<PoolVector<Color> >(*this); + return _convert_array_from_variant<Vector<Vector2> >(*this); +} + +Variant::operator Vector<Color>() const { + + if (type == PACKED_COLOR_ARRAY) + return static_cast<PackedArrayRef<Color> *>(_data.packed_array)->array; + else + return _convert_array_from_variant<Vector<Color> >(*this); } /* helpers */ @@ -1921,33 +2444,16 @@ Variant::operator Vector<RID>() const { return rids; } -Variant::operator Vector<Vector2>() const { - - PoolVector<Vector2> from = operator PoolVector<Vector2>(); - Vector<Vector2> to; - int len = from.size(); - if (len == 0) - return Vector<Vector2>(); - to.resize(len); - PoolVector<Vector2>::Read r = from.read(); - Vector2 *w = to.ptrw(); - for (int i = 0; i < len; i++) { - - w[i] = r[i]; - } - return to; -} - -Variant::operator PoolVector<Plane>() const { +Variant::operator Vector<Plane>() const { Array va = operator Array(); - PoolVector<Plane> planes; + Vector<Plane> planes; int va_size = va.size(); if (va_size == 0) return planes; planes.resize(va_size); - PoolVector<Plane>::Write w = planes.write(); + Plane *w = planes.ptrw(); for (int i = 0; i < va_size; i++) w[i] = va[i]; @@ -1955,17 +2461,17 @@ Variant::operator PoolVector<Plane>() const { return planes; } -Variant::operator PoolVector<Face3>() const { +Variant::operator Vector<Face3>() const { - PoolVector<Vector3> va = operator PoolVector<Vector3>(); - PoolVector<Face3> faces; + Vector<Vector3> va = operator Vector<Vector3>(); + Vector<Face3> faces; int va_size = va.size(); if (va_size == 0) return faces; faces.resize(va_size / 3); - PoolVector<Face3>::Write w = faces.write(); - PoolVector<Vector3>::Read r = va.read(); + Face3 *w = faces.ptrw(); + const Vector3 *r = va.ptr(); for (int i = 0; i < va_size; i++) w[i / 3].vertex[i % 3] = r[i]; @@ -1973,87 +2479,24 @@ Variant::operator PoolVector<Face3>() const { return faces; } -Variant::operator Vector<Plane>() const { +Variant::operator Vector<Variant>() const { Array va = operator Array(); - Vector<Plane> planes; + Vector<Variant> variants; int va_size = va.size(); if (va_size == 0) - return planes; - - planes.resize(va_size); + return variants; + variants.resize(va_size); + Variant *w = variants.ptrw(); for (int i = 0; i < va_size; i++) - planes.write[i] = va[i]; - - return planes; -} - -Variant::operator Vector<Variant>() const { - - Array from = operator Array(); - Vector<Variant> to; - int len = from.size(); - to.resize(len); - for (int i = 0; i < len; i++) { - - to.write[i] = from[i]; - } - return to; -} - -Variant::operator Vector<uint8_t>() const { - - PoolVector<uint8_t> from = operator PoolVector<uint8_t>(); - Vector<uint8_t> to; - int len = from.size(); - to.resize(len); - for (int i = 0; i < len; i++) { - - to.write[i] = from[i]; - } - return to; -} -Variant::operator Vector<int>() const { - - PoolVector<int> from = operator PoolVector<int>(); - Vector<int> to; - int len = from.size(); - to.resize(len); - for (int i = 0; i < len; i++) { - - to.write[i] = from[i]; - } - return to; -} -Variant::operator Vector<real_t>() const { - - PoolVector<real_t> from = operator PoolVector<real_t>(); - Vector<real_t> to; - int len = from.size(); - to.resize(len); - for (int i = 0; i < len; i++) { + w[i] = variants[i]; - to.write[i] = from[i]; - } - return to; -} - -Variant::operator Vector<String>() const { - - PoolVector<String> from = operator PoolVector<String>(); - Vector<String> to; - int len = from.size(); - to.resize(len); - for (int i = 0; i < len; i++) { - - to.write[i] = from[i]; - } - return to; + return variants; } Variant::operator Vector<StringName>() const { - PoolVector<String> from = operator PoolVector<String>(); + Vector<String> from = operator Vector<String>(); Vector<StringName> to; int len = from.size(); to.resize(len); @@ -2064,39 +2507,6 @@ Variant::operator Vector<StringName>() const { return to; } -Variant::operator Vector<Vector3>() const { - - PoolVector<Vector3> from = operator PoolVector<Vector3>(); - Vector<Vector3> to; - int len = from.size(); - if (len == 0) - return Vector<Vector3>(); - to.resize(len); - PoolVector<Vector3>::Read r = from.read(); - Vector3 *w = to.ptrw(); - for (int i = 0; i < len; i++) { - - w[i] = r[i]; - } - return to; -} -Variant::operator Vector<Color>() const { - - PoolVector<Color> from = operator PoolVector<Color>(); - Vector<Color> to; - int len = from.size(); - if (len == 0) - return Vector<Color>(); - to.resize(len); - PoolVector<Color>::Read r = from.read(); - Color *w = to.ptrw(); - for (int i = 0; i < len; i++) { - - w[i] = r[i]; - } - return to; -} - Variant::operator Margin() const { return (Margin) operator int(); @@ -2108,9 +2518,9 @@ Variant::operator Orientation() const { Variant::operator IP_Address() const { - if (type == POOL_REAL_ARRAY || type == POOL_INT_ARRAY || type == POOL_BYTE_ARRAY) { + if (type == PACKED_FLOAT32_ARRAY || type == PACKED_INT32_ARRAY || type == PACKED_FLOAT64_ARRAY || type == PACKED_INT64_ARRAY || type == PACKED_BYTE_ARRAY) { - PoolVector<int> addr = operator PoolVector<int>(); + Vector<int> addr = operator Vector<int>(); if (addr.size() == 4) { return IP_Address(addr.get(0), addr.get(1), addr.get(2), addr.get(3)); } @@ -2192,13 +2602,13 @@ Variant::Variant(unsigned char p_char) { } Variant::Variant(float p_float) { - type = REAL; - _data._real = p_float; + type = FLOAT; + _data._float = p_float; } Variant::Variant(double p_double) { - type = REAL; - _data._real = p_double; + type = FLOAT; + _data._float = p_double; } Variant::Variant(const ObjectID &p_id) { @@ -2208,8 +2618,8 @@ Variant::Variant(const ObjectID &p_id) { Variant::Variant(const StringName &p_string) { - type = STRING; - memnew_placement(_data._mem, String(p_string.operator String())); + type = STRING_NAME; + memnew_placement(_data._mem, StringName(p_string)); } Variant::Variant(const String &p_string) { @@ -2233,17 +2643,36 @@ Variant::Variant(const Vector3 &p_vector3) { type = VECTOR3; memnew_placement(_data._mem, Vector3(p_vector3)); } +Variant::Variant(const Vector3i &p_vector3i) { + + type = VECTOR3I; + memnew_placement(_data._mem, Vector3i(p_vector3i)); +} + Variant::Variant(const Vector2 &p_vector2) { type = VECTOR2; memnew_placement(_data._mem, Vector2(p_vector2)); } + +Variant::Variant(const Vector2i &p_vector2i) { + + type = VECTOR2I; + memnew_placement(_data._mem, Vector2i(p_vector2i)); +} + Variant::Variant(const Rect2 &p_rect2) { type = RECT2; memnew_placement(_data._mem, Rect2(p_rect2)); } +Variant::Variant(const Rect2i &p_rect2i) { + + type = RECT2I; + memnew_placement(_data._mem, Rect2i(p_rect2i)); +} + Variant::Variant(const Plane &p_plane) { type = PLANE; @@ -2289,15 +2718,6 @@ Variant::Variant(const NodePath &p_node_path) { memnew_placement(_data._mem, NodePath(p_node_path)); } -Variant::Variant(const RefPtr &p_resource) { - - type = OBJECT; - memnew_placement(_data._mem, ObjData); - REF *ref = reinterpret_cast<REF *>(p_resource.get_data()); - _get_obj().obj = ref->ptr(); - _get_obj().ref = p_resource; -} - Variant::Variant(const RID &p_rid) { type = _RID; @@ -2309,7 +2729,35 @@ Variant::Variant(const Object *p_object) { type = OBJECT; memnew_placement(_data._mem, ObjData); - _get_obj().obj = const_cast<Object *>(p_object); + + if (p_object) { + + if (p_object->is_reference()) { + Reference *reference = const_cast<Reference *>(static_cast<const Reference *>(p_object)); + if (!reference->init_ref()) { + _get_obj().obj = nullptr; + _get_obj().id = ObjectID(); + return; + } + } + + _get_obj().obj = const_cast<Object *>(p_object); + _get_obj().id = p_object->get_instance_id(); + } else { + _get_obj().obj = nullptr; + _get_obj().id = ObjectID(); + } +} + +Variant::Variant(const Callable &p_callable) { + + type = CALLABLE; + memnew_placement(_data._mem, Callable(p_callable)); +} +Variant::Variant(const Signal &p_callable) { + + type = SIGNAL; + memnew_placement(_data._mem, Signal(p_callable)); } Variant::Variant(const Dictionary &p_dictionary) { @@ -2324,20 +2772,6 @@ Variant::Variant(const Array &p_array) { memnew_placement(_data._mem, Array(p_array)); } -Variant::Variant(const PoolVector<Plane> &p_array) { - - type = ARRAY; - - Array *plane_array = memnew_placement(_data._mem, Array); - - plane_array->resize(p_array.size()); - - for (int i = 0; i < p_array.size(); i++) { - - plane_array->operator[](i) = Variant(p_array[i]); - } -} - Variant::Variant(const Vector<Plane> &p_array) { type = ARRAY; @@ -2366,68 +2800,67 @@ Variant::Variant(const Vector<RID> &p_array) { } } -Variant::Variant(const Vector<Vector2> &p_array) { +Variant::Variant(const Vector<uint8_t> &p_byte_array) { - type = NIL; - PoolVector<Vector2> v; - int len = p_array.size(); - if (len > 0) { - v.resize(len); - PoolVector<Vector2>::Write w = v.write(); - const Vector2 *r = p_array.ptr(); + type = PACKED_BYTE_ARRAY; - for (int i = 0; i < len; i++) - w[i] = r[i]; - } - *this = v; + _data.packed_array = PackedArrayRef<uint8_t>::create(p_byte_array); } +Variant::Variant(const Vector<int32_t> &p_int32_array) { -Variant::Variant(const PoolVector<uint8_t> &p_raw_array) { + type = PACKED_INT32_ARRAY; + _data.packed_array = PackedArrayRef<int32_t>::create(p_int32_array); +} - type = POOL_BYTE_ARRAY; - memnew_placement(_data._mem, PoolVector<uint8_t>(p_raw_array)); +Variant::Variant(const Vector<int64_t> &p_int64_array) { + + type = PACKED_INT64_ARRAY; + _data.packed_array = PackedArrayRef<int64_t>::create(p_int64_array); } -Variant::Variant(const PoolVector<int> &p_int_array) { - type = POOL_INT_ARRAY; - memnew_placement(_data._mem, PoolVector<int>(p_int_array)); +Variant::Variant(const Vector<float> &p_float32_array) { + + type = PACKED_FLOAT32_ARRAY; + _data.packed_array = PackedArrayRef<float>::create(p_float32_array); } -Variant::Variant(const PoolVector<real_t> &p_real_array) { - type = POOL_REAL_ARRAY; - memnew_placement(_data._mem, PoolVector<real_t>(p_real_array)); +Variant::Variant(const Vector<double> &p_float64_array) { + + type = PACKED_FLOAT64_ARRAY; + _data.packed_array = PackedArrayRef<double>::create(p_float64_array); } -Variant::Variant(const PoolVector<String> &p_string_array) { - type = POOL_STRING_ARRAY; - memnew_placement(_data._mem, PoolVector<String>(p_string_array)); +Variant::Variant(const Vector<String> &p_string_array) { + + type = PACKED_STRING_ARRAY; + _data.packed_array = PackedArrayRef<String>::create(p_string_array); } -Variant::Variant(const PoolVector<Vector3> &p_vector3_array) { +Variant::Variant(const Vector<Vector3> &p_vector3_array) { - type = POOL_VECTOR3_ARRAY; - memnew_placement(_data._mem, PoolVector<Vector3>(p_vector3_array)); + type = PACKED_VECTOR3_ARRAY; + _data.packed_array = PackedArrayRef<Vector3>::create(p_vector3_array); } -Variant::Variant(const PoolVector<Vector2> &p_vector2_array) { +Variant::Variant(const Vector<Vector2> &p_vector2_array) { - type = POOL_VECTOR2_ARRAY; - memnew_placement(_data._mem, PoolVector<Vector2>(p_vector2_array)); + type = PACKED_VECTOR2_ARRAY; + _data.packed_array = PackedArrayRef<Vector2>::create(p_vector2_array); } -Variant::Variant(const PoolVector<Color> &p_color_array) { +Variant::Variant(const Vector<Color> &p_color_array) { - type = POOL_COLOR_ARRAY; - memnew_placement(_data._mem, PoolVector<Color>(p_color_array)); + type = PACKED_COLOR_ARRAY; + _data.packed_array = PackedArrayRef<Color>::create(p_color_array); } -Variant::Variant(const PoolVector<Face3> &p_face_array) { +Variant::Variant(const Vector<Face3> &p_face_array) { - PoolVector<Vector3> vertices; + Vector<Vector3> vertices; int face_count = p_face_array.size(); vertices.resize(face_count * 3); if (face_count) { - PoolVector<Face3>::Read r = p_face_array.read(); - PoolVector<Vector3>::Write w = vertices.write(); + const Face3 *r = p_face_array.ptr(); + Vector3 *w = vertices.ptrw(); for (int i = 0; i < face_count; i++) { @@ -2442,93 +2875,20 @@ Variant::Variant(const PoolVector<Face3> &p_face_array) { } /* helpers */ - Variant::Variant(const Vector<Variant> &p_array) { - - type = NIL; - Array v; - int len = p_array.size(); - v.resize(len); - for (int i = 0; i < len; i++) - v.set(i, p_array[i]); - *this = v; -} - -Variant::Variant(const Vector<uint8_t> &p_array) { - - type = NIL; - PoolVector<uint8_t> v; - int len = p_array.size(); - v.resize(len); - for (int i = 0; i < len; i++) - v.set(i, p_array[i]); - *this = v; -} - -Variant::Variant(const Vector<int> &p_array) { - - type = NIL; - PoolVector<int> v; - int len = p_array.size(); - v.resize(len); - for (int i = 0; i < len; i++) - v.set(i, p_array[i]); - *this = v; -} - -Variant::Variant(const Vector<real_t> &p_array) { - - type = NIL; - PoolVector<real_t> v; - int len = p_array.size(); - v.resize(len); - for (int i = 0; i < len; i++) - v.set(i, p_array[i]); - *this = v; -} - -Variant::Variant(const Vector<String> &p_array) { - type = NIL; - PoolVector<String> v; - int len = p_array.size(); - v.resize(len); - for (int i = 0; i < len; i++) - v.set(i, p_array[i]); - *this = v; -} - -Variant::Variant(const Vector<StringName> &p_array) { - - type = NIL; - PoolVector<String> v; - int len = p_array.size(); - v.resize(len); - for (int i = 0; i < len; i++) - v.set(i, p_array[i]); - *this = v; -} - -Variant::Variant(const Vector<Vector3> &p_array) { - - type = NIL; - PoolVector<Vector3> v; - int len = p_array.size(); - if (len > 0) { - v.resize(len); - PoolVector<Vector3>::Write w = v.write(); - const Vector3 *r = p_array.ptr(); - - for (int i = 0; i < len; i++) - w[i] = r[i]; + Array arr; + arr.resize(p_array.size()); + for (int i = 0; i < p_array.size(); i++) { + arr[i] = p_array[i]; } - *this = v; + *this = arr; } -Variant::Variant(const Vector<Color> &p_array) { +Variant::Variant(const Vector<StringName> &p_array) { type = NIL; - PoolVector<Color> v; + Vector<String> v; int len = p_array.size(); v.resize(len); for (int i = 0; i < len; i++) @@ -2561,9 +2921,9 @@ void Variant::operator=(const Variant &p_variant) { _data._int = p_variant._data._int; } break; - case REAL: { + case FLOAT: { - _data._real = p_variant._data._real; + _data._float = p_variant._data._float; } break; case STRING: { @@ -2575,10 +2935,18 @@ void Variant::operator=(const Variant &p_variant) { *reinterpret_cast<Vector2 *>(_data._mem) = *reinterpret_cast<const Vector2 *>(p_variant._data._mem); } break; + case VECTOR2I: { + + *reinterpret_cast<Vector2i *>(_data._mem) = *reinterpret_cast<const Vector2i *>(p_variant._data._mem); + } break; case RECT2: { *reinterpret_cast<Rect2 *>(_data._mem) = *reinterpret_cast<const Rect2 *>(p_variant._data._mem); } break; + case RECT2I: { + + *reinterpret_cast<Rect2i *>(_data._mem) = *reinterpret_cast<const Rect2i *>(p_variant._data._mem); + } break; case TRANSFORM2D: { *_data._transform2d = *(p_variant._data._transform2d); @@ -2587,6 +2955,10 @@ void Variant::operator=(const Variant &p_variant) { *reinterpret_cast<Vector3 *>(_data._mem) = *reinterpret_cast<const Vector3 *>(p_variant._data._mem); } break; + case VECTOR3I: { + + *reinterpret_cast<Vector3i *>(_data._mem) = *reinterpret_cast<const Vector3i *>(p_variant._data._mem); + } break; case PLANE: { *reinterpret_cast<Plane *>(_data._mem) = *reinterpret_cast<const Plane *>(p_variant._data._mem); @@ -2620,7 +2992,39 @@ void Variant::operator=(const Variant &p_variant) { } break; case OBJECT: { - *reinterpret_cast<ObjData *>(_data._mem) = p_variant._get_obj(); + if (_get_obj().id.is_reference()) { + //we are safe that there is a reference here + Reference *reference = static_cast<Reference *>(_get_obj().obj); + if (reference->unreference()) { + memdelete(reference); + } + } + + if (p_variant._get_obj().obj && p_variant._get_obj().id.is_reference()) { + Reference *reference = static_cast<Reference *>(p_variant._get_obj().obj); + if (!reference->reference()) { + _get_obj().obj = nullptr; + _get_obj().id = ObjectID(); + break; + } + } + + _get_obj().obj = const_cast<Object *>(p_variant._get_obj().obj); + _get_obj().id = p_variant._get_obj().id; + + } break; + case CALLABLE: { + + *reinterpret_cast<Callable *>(_data._mem) = *reinterpret_cast<const Callable *>(p_variant._data._mem); + } break; + case SIGNAL: { + + *reinterpret_cast<Signal *>(_data._mem) = *reinterpret_cast<const Signal *>(p_variant._data._mem); + } break; + + case STRING_NAME: { + + *reinterpret_cast<StringName *>(_data._mem) = *reinterpret_cast<const StringName *>(p_variant._data._mem); } break; case NODE_PATH: { @@ -2636,33 +3040,41 @@ void Variant::operator=(const Variant &p_variant) { } break; // arrays - case POOL_BYTE_ARRAY: { + case PACKED_BYTE_ARRAY: { + + _data.packed_array = PackedArrayRef<uint8_t>::reference_from(_data.packed_array, p_variant._data.packed_array); + } break; + case PACKED_INT32_ARRAY: { + + _data.packed_array = PackedArrayRef<int32_t>::reference_from(_data.packed_array, p_variant._data.packed_array); + } break; + case PACKED_INT64_ARRAY: { - *reinterpret_cast<PoolVector<uint8_t> *>(_data._mem) = *reinterpret_cast<const PoolVector<uint8_t> *>(p_variant._data._mem); + _data.packed_array = PackedArrayRef<int64_t>::reference_from(_data.packed_array, p_variant._data.packed_array); } break; - case POOL_INT_ARRAY: { + case PACKED_FLOAT32_ARRAY: { - *reinterpret_cast<PoolVector<int> *>(_data._mem) = *reinterpret_cast<const PoolVector<int> *>(p_variant._data._mem); + _data.packed_array = PackedArrayRef<float>::reference_from(_data.packed_array, p_variant._data.packed_array); } break; - case POOL_REAL_ARRAY: { + case PACKED_FLOAT64_ARRAY: { - *reinterpret_cast<PoolVector<real_t> *>(_data._mem) = *reinterpret_cast<const PoolVector<real_t> *>(p_variant._data._mem); + _data.packed_array = PackedArrayRef<double>::reference_from(_data.packed_array, p_variant._data.packed_array); } break; - case POOL_STRING_ARRAY: { + case PACKED_STRING_ARRAY: { - *reinterpret_cast<PoolVector<String> *>(_data._mem) = *reinterpret_cast<const PoolVector<String> *>(p_variant._data._mem); + _data.packed_array = PackedArrayRef<String>::reference_from(_data.packed_array, p_variant._data.packed_array); } break; - case POOL_VECTOR2_ARRAY: { + case PACKED_VECTOR2_ARRAY: { - *reinterpret_cast<PoolVector<Vector2> *>(_data._mem) = *reinterpret_cast<const PoolVector<Vector2> *>(p_variant._data._mem); + _data.packed_array = PackedArrayRef<Vector2>::reference_from(_data.packed_array, p_variant._data.packed_array); } break; - case POOL_VECTOR3_ARRAY: { + case PACKED_VECTOR3_ARRAY: { - *reinterpret_cast<PoolVector<Vector3> *>(_data._mem) = *reinterpret_cast<const PoolVector<Vector3> *>(p_variant._data._mem); + _data.packed_array = PackedArrayRef<Vector3>::reference_from(_data.packed_array, p_variant._data.packed_array); } break; - case POOL_COLOR_ARRAY: { + case PACKED_COLOR_ARRAY: { - *reinterpret_cast<PoolVector<Color> *>(_data._mem) = *reinterpret_cast<const PoolVector<Color> *>(p_variant._data._mem); + _data.packed_array = PackedArrayRef<Color>::reference_from(_data.packed_array, p_variant._data.packed_array); } break; default: { } @@ -2702,9 +3114,9 @@ uint32_t Variant::hash() const { return _data._int; } break; - case REAL: { + case FLOAT: { - return hash_djb2_one_float(_data._real); + return hash_djb2_one_float(_data._float); } break; case STRING: { @@ -2717,6 +3129,11 @@ uint32_t Variant::hash() const { uint32_t hash = hash_djb2_one_float(reinterpret_cast<const Vector2 *>(_data._mem)->x); return hash_djb2_one_float(reinterpret_cast<const Vector2 *>(_data._mem)->y, hash); } break; + case VECTOR2I: { + + uint32_t hash = hash_djb2_one_32(reinterpret_cast<const Vector2i *>(_data._mem)->x); + return hash_djb2_one_32(reinterpret_cast<const Vector2i *>(_data._mem)->y, hash); + } break; case RECT2: { uint32_t hash = hash_djb2_one_float(reinterpret_cast<const Rect2 *>(_data._mem)->position.x); @@ -2724,6 +3141,13 @@ uint32_t Variant::hash() const { hash = hash_djb2_one_float(reinterpret_cast<const Rect2 *>(_data._mem)->size.x, hash); return hash_djb2_one_float(reinterpret_cast<const Rect2 *>(_data._mem)->size.y, hash); } break; + case RECT2I: { + + uint32_t hash = hash_djb2_one_32(reinterpret_cast<const Rect2i *>(_data._mem)->position.x); + hash = hash_djb2_one_32(reinterpret_cast<const Rect2i *>(_data._mem)->position.y, hash); + hash = hash_djb2_one_32(reinterpret_cast<const Rect2i *>(_data._mem)->size.x, hash); + return hash_djb2_one_32(reinterpret_cast<const Rect2i *>(_data._mem)->size.y, hash); + } break; case TRANSFORM2D: { uint32_t hash = 5831; @@ -2742,6 +3166,12 @@ uint32_t Variant::hash() const { hash = hash_djb2_one_float(reinterpret_cast<const Vector3 *>(_data._mem)->y, hash); return hash_djb2_one_float(reinterpret_cast<const Vector3 *>(_data._mem)->z, hash); } break; + case VECTOR3I: { + + uint32_t hash = hash_djb2_one_32(reinterpret_cast<const Vector3i *>(_data._mem)->x); + hash = hash_djb2_one_32(reinterpret_cast<const Vector3i *>(_data._mem)->y, hash); + return hash_djb2_one_32(reinterpret_cast<const Vector3i *>(_data._mem)->z, hash); + } break; case PLANE: { uint32_t hash = hash_djb2_one_float(reinterpret_cast<const Plane *>(_data._mem)->normal.x); @@ -2820,6 +3250,10 @@ uint32_t Variant::hash() const { return hash_djb2_one_64(make_uint64_t(_get_obj().obj)); } break; + case STRING_NAME: { + + return reinterpret_cast<const StringName *>(_data._mem)->hash(); + } break; case NODE_PATH: { return reinterpret_cast<const NodePath *>(_data._mem)->hash(); @@ -2829,57 +3263,93 @@ uint32_t Variant::hash() const { return reinterpret_cast<const Dictionary *>(_data._mem)->hash(); } break; + case CALLABLE: { + + return reinterpret_cast<const Callable *>(_data._mem)->hash(); + + } break; + case SIGNAL: { + + const Signal &s = *reinterpret_cast<const Signal *>(_data._mem); + uint32_t hash = s.get_name().hash(); + return hash_djb2_one_64(s.get_object_id(), hash); + } break; case ARRAY: { const Array &arr = *reinterpret_cast<const Array *>(_data._mem); return arr.hash(); } break; - case POOL_BYTE_ARRAY: { + case PACKED_BYTE_ARRAY: { - const PoolVector<uint8_t> &arr = *reinterpret_cast<const PoolVector<uint8_t> *>(_data._mem); + const Vector<uint8_t> &arr = PackedArrayRef<uint8_t>::get_array(_data.packed_array); int len = arr.size(); if (likely(len)) { - PoolVector<uint8_t>::Read r = arr.read(); + const uint8_t *r = arr.ptr(); return hash_djb2_buffer((uint8_t *)&r[0], len); } else { return hash_djb2_one_64(0); } } break; - case POOL_INT_ARRAY: { + case PACKED_INT32_ARRAY: { + + const Vector<int32_t> &arr = PackedArrayRef<int32_t>::get_array(_data.packed_array); + int len = arr.size(); + if (likely(len)) { + const int32_t *r = arr.ptr(); + return hash_djb2_buffer((uint8_t *)&r[0], len * sizeof(int32_t)); + } else { + return hash_djb2_one_64(0); + } + + } break; + case PACKED_INT64_ARRAY: { - const PoolVector<int> &arr = *reinterpret_cast<const PoolVector<int> *>(_data._mem); + const Vector<int64_t> &arr = PackedArrayRef<int64_t>::get_array(_data.packed_array); int len = arr.size(); if (likely(len)) { - PoolVector<int>::Read r = arr.read(); - return hash_djb2_buffer((uint8_t *)&r[0], len * sizeof(int)); + const int64_t *r = arr.ptr(); + return hash_djb2_buffer((uint8_t *)&r[0], len * sizeof(int64_t)); } else { return hash_djb2_one_64(0); } } break; - case POOL_REAL_ARRAY: { + case PACKED_FLOAT32_ARRAY: { + + const Vector<float> &arr = PackedArrayRef<float>::get_array(_data.packed_array); + int len = arr.size(); + + if (likely(len)) { + const float *r = arr.ptr(); + return hash_djb2_buffer((uint8_t *)&r[0], len * sizeof(float)); + } else { + return hash_djb2_one_float(0.0); + } + + } break; + case PACKED_FLOAT64_ARRAY: { - const PoolVector<real_t> &arr = *reinterpret_cast<const PoolVector<real_t> *>(_data._mem); + const Vector<double> &arr = PackedArrayRef<double>::get_array(_data.packed_array); int len = arr.size(); if (likely(len)) { - PoolVector<real_t>::Read r = arr.read(); - return hash_djb2_buffer((uint8_t *)&r[0], len * sizeof(real_t)); + const double *r = arr.ptr(); + return hash_djb2_buffer((uint8_t *)&r[0], len * sizeof(double)); } else { return hash_djb2_one_float(0.0); } } break; - case POOL_STRING_ARRAY: { + case PACKED_STRING_ARRAY: { uint32_t hash = 5831; - const PoolVector<String> &arr = *reinterpret_cast<const PoolVector<String> *>(_data._mem); + const Vector<String> &arr = PackedArrayRef<String>::get_array(_data.packed_array); int len = arr.size(); if (likely(len)) { - PoolVector<String>::Read r = arr.read(); + const String *r = arr.ptr(); for (int i = 0; i < len; i++) { hash = hash_djb2_one_32(r[i].hash(), hash); @@ -2888,14 +3358,14 @@ uint32_t Variant::hash() const { return hash; } break; - case POOL_VECTOR2_ARRAY: { + case PACKED_VECTOR2_ARRAY: { uint32_t hash = 5831; - const PoolVector<Vector2> &arr = *reinterpret_cast<const PoolVector<Vector2> *>(_data._mem); + const Vector<Vector2> &arr = PackedArrayRef<Vector2>::get_array(_data.packed_array); int len = arr.size(); if (likely(len)) { - PoolVector<Vector2>::Read r = arr.read(); + const Vector2 *r = arr.ptr(); for (int i = 0; i < len; i++) { hash = hash_djb2_one_float(r[i].x, hash); @@ -2905,14 +3375,14 @@ uint32_t Variant::hash() const { return hash; } break; - case POOL_VECTOR3_ARRAY: { + case PACKED_VECTOR3_ARRAY: { uint32_t hash = 5831; - const PoolVector<Vector3> &arr = *reinterpret_cast<const PoolVector<Vector3> *>(_data._mem); + const Vector<Vector3> &arr = PackedArrayRef<Vector3>::get_array(_data.packed_array); int len = arr.size(); if (likely(len)) { - PoolVector<Vector3>::Read r = arr.read(); + const Vector3 *r = arr.ptr(); for (int i = 0; i < len; i++) { hash = hash_djb2_one_float(r[i].x, hash); @@ -2923,14 +3393,14 @@ uint32_t Variant::hash() const { return hash; } break; - case POOL_COLOR_ARRAY: { + case PACKED_COLOR_ARRAY: { uint32_t hash = 5831; - const PoolVector<Color> &arr = *reinterpret_cast<const PoolVector<Color> *>(_data._mem); + const Vector<Color> &arr = PackedArrayRef<Color>::get_array(_data.packed_array); int len = arr.size(); if (likely(len)) { - PoolVector<Color>::Read r = arr.read(); + const Color *r = arr.ptr(); for (int i = 0; i < len; i++) { hash = hash_djb2_one_float(r[i].r, hash); @@ -2973,21 +3443,21 @@ uint32_t Variant::hash() const { (hash_compare_scalar((p_lhs).b, (p_rhs).b)) && \ (hash_compare_scalar((p_lhs).a, (p_rhs).a)) -#define hash_compare_pool_array(p_lhs, p_rhs, p_type, p_compare_func) \ - const PoolVector<p_type> &l = *reinterpret_cast<const PoolVector<p_type> *>(p_lhs); \ - const PoolVector<p_type> &r = *reinterpret_cast<const PoolVector<p_type> *>(p_rhs); \ - \ - if (l.size() != r.size()) \ - return false; \ - \ - PoolVector<p_type>::Read lr = l.read(); \ - PoolVector<p_type>::Read rr = r.read(); \ - \ - for (int i = 0; i < l.size(); ++i) { \ - if (!p_compare_func((lr[i]), (rr[i]))) \ - return false; \ - } \ - \ +#define hash_compare_packed_array(p_lhs, p_rhs, p_type, p_compare_func) \ + const Vector<p_type> &l = PackedArrayRef<p_type>::get_array(p_lhs); \ + const Vector<p_type> &r = PackedArrayRef<p_type>::get_array(p_rhs); \ + \ + if (l.size() != r.size()) \ + return false; \ + \ + const p_type *lr = l.ptr(); \ + const p_type *rr = r.ptr(); \ + \ + for (int i = 0; i < l.size(); ++i) { \ + if (!p_compare_func((lr[i]), (rr[i]))) \ + return false; \ + } \ + \ return true bool Variant::hash_compare(const Variant &p_variant) const { @@ -2995,8 +3465,8 @@ bool Variant::hash_compare(const Variant &p_variant) const { return false; switch (type) { - case REAL: { - return hash_compare_scalar(_data._real, p_variant._data._real); + case FLOAT: { + return hash_compare_scalar(_data._float, p_variant._data._float); } break; case VECTOR2: { @@ -3005,6 +3475,11 @@ bool Variant::hash_compare(const Variant &p_variant) const { return hash_compare_vector2(*l, *r); } break; + case VECTOR2I: { + const Vector2i *l = reinterpret_cast<const Vector2i *>(_data._mem); + const Vector2i *r = reinterpret_cast<const Vector2i *>(p_variant._data._mem); + return *l == *r; + } break; case RECT2: { const Rect2 *l = reinterpret_cast<const Rect2 *>(_data._mem); @@ -3013,6 +3488,12 @@ bool Variant::hash_compare(const Variant &p_variant) const { return (hash_compare_vector2(l->position, r->position)) && (hash_compare_vector2(l->size, r->size)); } break; + case RECT2I: { + const Rect2i *l = reinterpret_cast<const Rect2i *>(_data._mem); + const Rect2i *r = reinterpret_cast<const Rect2i *>(p_variant._data._mem); + + return *l == *r; + } break; case TRANSFORM2D: { Transform2D *l = _data._transform2d; @@ -3032,6 +3513,12 @@ bool Variant::hash_compare(const Variant &p_variant) const { return hash_compare_vector3(*l, *r); } break; + case VECTOR3I: { + const Vector3i *l = reinterpret_cast<const Vector3i *>(_data._mem); + const Vector3i *r = reinterpret_cast<const Vector3i *>(p_variant._data._mem); + + return *l == *r; + } break; case PLANE: { const Plane *l = reinterpret_cast<const Plane *>(_data._mem); @@ -3103,20 +3590,25 @@ bool Variant::hash_compare(const Variant &p_variant) const { return true; } break; - case POOL_REAL_ARRAY: { - hash_compare_pool_array(_data._mem, p_variant._data._mem, real_t, hash_compare_scalar); + // This is for floating point comparisons only. + case PACKED_FLOAT32_ARRAY: { + hash_compare_packed_array(_data.packed_array, p_variant._data.packed_array, float, hash_compare_scalar); + } break; + + case PACKED_FLOAT64_ARRAY: { + hash_compare_packed_array(_data.packed_array, p_variant._data.packed_array, double, hash_compare_scalar); } break; - case POOL_VECTOR2_ARRAY: { - hash_compare_pool_array(_data._mem, p_variant._data._mem, Vector2, hash_compare_vector2); + case PACKED_VECTOR2_ARRAY: { + hash_compare_packed_array(_data.packed_array, p_variant._data.packed_array, Vector2, hash_compare_vector2); } break; - case POOL_VECTOR3_ARRAY: { - hash_compare_pool_array(_data._mem, p_variant._data._mem, Vector3, hash_compare_vector3); + case PACKED_VECTOR3_ARRAY: { + hash_compare_packed_array(_data.packed_array, p_variant._data.packed_array, Vector3, hash_compare_vector3); } break; - case POOL_COLOR_ARRAY: { - hash_compare_pool_array(_data._mem, p_variant._data._mem, Color, hash_compare_color); + case PACKED_COLOR_ARRAY: { + hash_compare_packed_array(_data.packed_array, p_variant._data.packed_array, Color, hash_compare_color); } break; default: @@ -3131,7 +3623,7 @@ bool Variant::hash_compare(const Variant &p_variant) const { bool Variant::is_ref() const { - return type == OBJECT && !_get_obj().ref.is_null(); + return type == OBJECT && _get_obj().id.is_reference(); } Vector<Variant> varray() { @@ -3207,24 +3699,24 @@ Variant Variant::call(const StringName &p_method, VARIANT_ARG_DECLARE) { argc++; } - CallError error; + Callable::CallError error; Variant ret = call(p_method, argptr, argc, error); switch (error.error) { - case CallError::CALL_ERROR_INVALID_ARGUMENT: { + case Callable::CallError::CALL_ERROR_INVALID_ARGUMENT: { - String err = "Invalid type for argument #" + itos(error.argument) + ", expected '" + Variant::get_type_name(error.expected) + "'."; + String err = "Invalid type for argument #" + itos(error.argument) + ", expected '" + Variant::get_type_name(Variant::Type(error.expected)) + "'."; ERR_PRINT(err.utf8().get_data()); } break; - case CallError::CALL_ERROR_INVALID_METHOD: { + case Callable::CallError::CALL_ERROR_INVALID_METHOD: { String err = "Invalid method '" + p_method + "' for type '" + Variant::get_type_name(type) + "'."; ERR_PRINT(err.utf8().get_data()); } break; - case CallError::CALL_ERROR_TOO_MANY_ARGUMENTS: { + case Callable::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS: { String err = "Too many arguments for method '" + p_method + "'"; ERR_PRINT(err.utf8().get_data()); @@ -3249,26 +3741,26 @@ String Variant::get_construct_string() const { return vars; } -String Variant::get_call_error_text(Object *p_base, const StringName &p_method, const Variant **p_argptrs, int p_argcount, const Variant::CallError &ce) { +String Variant::get_call_error_text(Object *p_base, const StringName &p_method, const Variant **p_argptrs, int p_argcount, const Callable::CallError &ce) { String err_text; - if (ce.error == Variant::CallError::CALL_ERROR_INVALID_ARGUMENT) { + if (ce.error == Callable::CallError::CALL_ERROR_INVALID_ARGUMENT) { int errorarg = ce.argument; if (p_argptrs) { - err_text = "Cannot convert argument " + itos(errorarg + 1) + " from " + Variant::get_type_name(p_argptrs[errorarg]->get_type()) + " to " + Variant::get_type_name(ce.expected) + "."; + err_text = "Cannot convert argument " + itos(errorarg + 1) + " from " + Variant::get_type_name(p_argptrs[errorarg]->get_type()) + " to " + Variant::get_type_name(Variant::Type(ce.expected)) + "."; } else { - err_text = "Cannot convert argument " + itos(errorarg + 1) + " from [missing argptr, type unknown] to " + Variant::get_type_name(ce.expected) + "."; + err_text = "Cannot convert argument " + itos(errorarg + 1) + " from [missing argptr, type unknown] to " + Variant::get_type_name(Variant::Type(ce.expected)) + "."; } - } else if (ce.error == Variant::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS) { + } else if (ce.error == Callable::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS) { err_text = "Method expected " + itos(ce.argument) + " arguments, but called with " + itos(p_argcount) + "."; - } else if (ce.error == Variant::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS) { + } else if (ce.error == Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS) { err_text = "Method expected " + itos(ce.argument) + " arguments, but called with " + itos(p_argcount) + "."; - } else if (ce.error == Variant::CallError::CALL_ERROR_INVALID_METHOD) { + } else if (ce.error == Callable::CallError::CALL_ERROR_INVALID_METHOD) { err_text = "Method not found."; - } else if (ce.error == Variant::CallError::CALL_ERROR_INSTANCE_IS_NULL) { + } else if (ce.error == Callable::CallError::CALL_ERROR_INSTANCE_IS_NULL) { err_text = "Instance is null"; - } else if (ce.error == Variant::CallError::CALL_OK) { + } else if (ce.error == Callable::CallError::CALL_OK) { return "Call OK"; } @@ -3281,6 +3773,32 @@ String Variant::get_call_error_text(Object *p_base, const StringName &p_method, return "'" + class_name + "::" + String(p_method) + "': " + err_text; } +String Variant::get_callable_error_text(const Callable &p_callable, const Variant **p_argptrs, int p_argcount, const Callable::CallError &ce) { + + String err_text; + + if (ce.error == Callable::CallError::CALL_ERROR_INVALID_ARGUMENT) { + int errorarg = ce.argument; + if (p_argptrs) { + err_text = "Cannot convert argument " + itos(errorarg + 1) + " from " + Variant::get_type_name(p_argptrs[errorarg]->get_type()) + " to " + Variant::get_type_name(Variant::Type(ce.expected)) + "."; + } else { + err_text = "Cannot convert argument " + itos(errorarg + 1) + " from [missing argptr, type unknown] to " + Variant::get_type_name(Variant::Type(ce.expected)) + "."; + } + } else if (ce.error == Callable::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS) { + err_text = "Method expected " + itos(ce.argument) + " arguments, but called with " + itos(p_argcount) + "."; + } else if (ce.error == Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS) { + err_text = "Method expected " + itos(ce.argument) + " arguments, but called with " + itos(p_argcount) + "."; + } else if (ce.error == Callable::CallError::CALL_ERROR_INVALID_METHOD) { + err_text = "Method not found."; + } else if (ce.error == Callable::CallError::CALL_ERROR_INSTANCE_IS_NULL) { + err_text = "Instance is null"; + } else if (ce.error == Callable::CallError::CALL_OK) { + return "Call OK"; + } + + return String(p_callable) + " : " + err_text; +} + String vformat(const String &p_text, const Variant &p1, const Variant &p2, const Variant &p3, const Variant &p4, const Variant &p5) { Array args; diff --git a/core/variant.h b/core/variant.h index d8007f9e12..614d39e84a 100644 --- a/core/variant.h +++ b/core/variant.h @@ -32,6 +32,7 @@ #define VARIANT_H #include "core/array.h" +#include "core/callable.h" #include "core/color.h" #include "core/dictionary.h" #include "core/io/ip_address.h" @@ -43,14 +44,12 @@ #include "core/math/transform.h" #include "core/math/transform_2d.h" #include "core/math/vector3.h" +#include "core/math/vector3i.h" #include "core/node_path.h" #include "core/object_id.h" -#include "core/pool_vector.h" -#include "core/ref_ptr.h" #include "core/rid.h" #include "core/ustring.h" -class RefPtr; class Object; class Node; // helper class Control; // helper @@ -58,13 +57,15 @@ class Control; // helper struct PropertyInfo; struct MethodInfo; -typedef PoolVector<uint8_t> PoolByteArray; -typedef PoolVector<int> PoolIntArray; -typedef PoolVector<real_t> PoolRealArray; -typedef PoolVector<String> PoolStringArray; -typedef PoolVector<Vector2> PoolVector2Array; -typedef PoolVector<Vector3> PoolVector3Array; -typedef PoolVector<Color> PoolColorArray; +typedef Vector<uint8_t> PackedByteArray; +typedef Vector<int32_t> PackedInt32Array; +typedef Vector<int64_t> PackedInt64Array; +typedef Vector<float> PackedFloat32Array; +typedef Vector<double> PackedFloat64Array; +typedef Vector<String> PackedStringArray; +typedef Vector<Vector2> PackedVector2Array; +typedef Vector<Vector3> PackedVector3Array; +typedef Vector<Color> PackedColorArray; // Temporary workaround until c++11 alignas() #ifdef __GNUC__ @@ -77,46 +78,51 @@ class Variant { public: // If this changes the table in variant_op must be updated enum Type { - NIL, // atomic types BOOL, INT, - REAL, + FLOAT, STRING, // math types - - VECTOR2, // 5 + VECTOR2, + VECTOR2I, RECT2, + RECT2I, VECTOR3, + VECTOR3I, TRANSFORM2D, PLANE, - QUAT, // 10 + QUAT, AABB, BASIS, TRANSFORM, // misc types COLOR, - NODE_PATH, // 15 + STRING_NAME, + NODE_PATH, _RID, OBJECT, + CALLABLE, + SIGNAL, DICTIONARY, ARRAY, - // arrays - POOL_BYTE_ARRAY, // 20 - POOL_INT_ARRAY, - POOL_REAL_ARRAY, - POOL_STRING_ARRAY, - POOL_VECTOR2_ARRAY, - POOL_VECTOR3_ARRAY, // 25 - POOL_COLOR_ARRAY, + // typed arrays + PACKED_BYTE_ARRAY, + PACKED_INT32_ARRAY, + PACKED_INT64_ARRAY, + PACKED_FLOAT32_ARRAY, + PACKED_FLOAT64_ARRAY, + PACKED_STRING_ARRAY, + PACKED_VECTOR2_ARRAY, + PACKED_VECTOR3_ARRAY, + PACKED_COLOR_ARRAY, VARIANT_MAX - }; private: @@ -128,21 +134,81 @@ private: struct ObjData { + ObjectID id; Object *obj; - RefPtr ref; }; - _FORCE_INLINE_ ObjData &_get_obj(); - _FORCE_INLINE_ const ObjData &_get_obj() const; + /* array helpers */ + struct PackedArrayRefBase { + SafeRefCount refcount; + _FORCE_INLINE_ PackedArrayRefBase *reference() { + if (this->refcount.ref()) { + return this; + } else { + return nullptr; + } + } + static _FORCE_INLINE_ PackedArrayRefBase *reference_from(PackedArrayRefBase *p_base, PackedArrayRefBase *p_from) { + if (p_base == p_from) { + return p_base; //same thing, do nothing + } + + if (p_from->reference()) { + if (p_base->refcount.unref()) { + memdelete(p_base); + } + return p_from; + } else { + return p_base; //keep, could not reference new + } + } + static _FORCE_INLINE_ void destroy(PackedArrayRefBase *p_array) { + if (p_array->refcount.unref()) { + memdelete(p_array); + } + } + _FORCE_INLINE_ virtual ~PackedArrayRefBase() {} //needs virtual destructor, but make inline + }; + + template <class T> + struct PackedArrayRef : public PackedArrayRefBase { + Vector<T> array; + static _FORCE_INLINE_ PackedArrayRef<T> *create() { + return memnew(PackedArrayRef<T>); + } + static _FORCE_INLINE_ PackedArrayRef<T> *create(const Vector<T> &p_from) { + return memnew(PackedArrayRef<T>(p_from)); + } + + static _FORCE_INLINE_ const Vector<T> &get_array(PackedArrayRefBase *p_base) { + return static_cast<PackedArrayRef<T> *>(p_base)->array; + } + static _FORCE_INLINE_ Vector<T> *get_array_ptr(const PackedArrayRefBase *p_base) { + return &const_cast<PackedArrayRef<T> *>(static_cast<const PackedArrayRef<T> *>(p_base))->array; + } + + _FORCE_INLINE_ PackedArrayRef(const Vector<T> &p_from) { + array = p_from; + refcount.init(); + } + _FORCE_INLINE_ PackedArrayRef() { + refcount.init(); + } + }; + + /* end of array helpers */ + _ALWAYS_INLINE_ ObjData &_get_obj(); + _ALWAYS_INLINE_ const ObjData &_get_obj() const; union { bool _bool; int64_t _int; - double _real; + double _float; Transform2D *_transform2d; ::AABB *_aabb; Basis *_basis; Transform *_transform; + PackedArrayRefBase *packed_array; void *_ptr; //generic pointer uint8_t _mem[sizeof(ObjData) > (sizeof(real_t) * 4) ? sizeof(ObjData) : (sizeof(real_t) * 4)]; } _data GCC_ALIGNED_8; @@ -151,17 +217,24 @@ private: void clear(); public: - _FORCE_INLINE_ Type get_type() const { return type; } + _FORCE_INLINE_ Type get_type() const { + return type; + } static String get_type_name(Variant::Type p_type); static bool can_convert(Type p_type_from, Type p_type_to); static bool can_convert_strict(Type p_type_from, Type p_type_to); bool is_ref() const; - _FORCE_INLINE_ bool is_num() const { return type == INT || type == REAL; }; - _FORCE_INLINE_ bool is_array() const { return type >= ARRAY; }; + _FORCE_INLINE_ bool is_num() const { + return type == INT || type == FLOAT; + }; + _FORCE_INLINE_ bool is_array() const { + return type >= ARRAY; + }; bool is_shared() const; bool is_zero() const; bool is_one() const; + bool is_null() const; operator bool() const; operator signed int() const; @@ -186,8 +259,11 @@ public: operator String() const; operator StringName() const; operator Vector2() const; + operator Vector2i() const; operator Rect2() const; + operator Rect2i() const; operator Vector3() const; + operator Vector3i() const; operator Plane() const; operator ::AABB() const; operator Quat() const; @@ -197,37 +273,33 @@ public: operator Color() const; operator NodePath() const; - operator RefPtr() const; operator RID() const; operator Object *() const; operator Node *() const; operator Control *() const; + operator Callable() const; + operator Signal() const; + operator Dictionary() const; operator Array() const; - operator PoolVector<uint8_t>() const; - operator PoolVector<int>() const; - operator PoolVector<real_t>() const; - operator PoolVector<String>() const; - operator PoolVector<Vector3>() const; - operator PoolVector<Color>() const; - operator PoolVector<Plane>() const; - operator PoolVector<Face3>() const; - - operator Vector<Variant>() const; operator Vector<uint8_t>() const; - operator Vector<int>() const; - operator Vector<real_t>() const; + operator Vector<int32_t>() const; + operator Vector<int64_t>() const; + operator Vector<float>() const; + operator Vector<double>() const; operator Vector<String>() const; - operator Vector<StringName>() const; operator Vector<Vector3>() const; operator Vector<Color>() const; + operator Vector<Plane>() const; + operator Vector<Face3>() const; + + operator Vector<Variant>() const; + operator Vector<StringName>() const; operator Vector<RID>() const; operator Vector<Vector2>() const; - operator PoolVector<Vector2>() const; - operator Vector<Plane>() const; // some core type enums to convert to operator Margin() const; @@ -235,6 +307,9 @@ public: operator IP_Address() const; + Object *get_validated_object() const; + Object *get_validated_object_with_check(bool &r_previously_freed) const; + Variant(bool p_bool); Variant(signed int p_int); // real one Variant(unsigned int p_int); @@ -257,8 +332,11 @@ public: Variant(const char *const p_cstring); Variant(const CharType *p_wstring); Variant(const Vector2 &p_vector2); + Variant(const Vector2i &p_vector2i); Variant(const Rect2 &p_rect2); + Variant(const Rect2i &p_rect2i); Variant(const Vector3 &p_vector3); + Variant(const Vector3i &p_vector3i); Variant(const Plane &p_plane); Variant(const ::AABB &p_aabb); Variant(const Quat &p_quat); @@ -267,33 +345,28 @@ public: Variant(const Transform &p_transform); Variant(const Color &p_color); Variant(const NodePath &p_node_path); - Variant(const RefPtr &p_resource); Variant(const RID &p_rid); Variant(const Object *p_object); + Variant(const Callable &p_callable); + Variant(const Signal &p_signal); Variant(const Dictionary &p_dictionary); Variant(const Array &p_array); - Variant(const PoolVector<Plane> &p_array); // helper - Variant(const PoolVector<uint8_t> &p_raw_array); - Variant(const PoolVector<int> &p_int_array); - Variant(const PoolVector<real_t> &p_real_array); - Variant(const PoolVector<String> &p_string_array); - Variant(const PoolVector<Vector3> &p_vector3_array); - Variant(const PoolVector<Color> &p_color_array); - Variant(const PoolVector<Face3> &p_face_array); + Variant(const Vector<Plane> &p_array); // helper + Variant(const Vector<uint8_t> &p_byte_array); + Variant(const Vector<int32_t> &p_int32_array); + Variant(const Vector<int64_t> &p_int64_array); + Variant(const Vector<float> &p_float32_array); + Variant(const Vector<double> &p_float64_array); + Variant(const Vector<String> &p_string_array); + Variant(const Vector<Vector3> &p_vector3_array); + Variant(const Vector<Color> &p_color_array); + Variant(const Vector<Face3> &p_face_array); Variant(const Vector<Variant> &p_array); - Variant(const Vector<uint8_t> &p_array); - Variant(const Vector<int> &p_array); - Variant(const Vector<real_t> &p_array); - Variant(const Vector<String> &p_array); Variant(const Vector<StringName> &p_array); - Variant(const Vector<Vector3> &p_array); - Variant(const Vector<Color> &p_array); - Variant(const Vector<Plane> &p_array); // helper Variant(const Vector<RID> &p_array); // helper Variant(const Vector<Vector2> &p_array); // helper - Variant(const PoolVector<Vector2> &p_vector2_array); // helper Variant(const IP_Address &p_address); @@ -349,27 +422,14 @@ public: static void blend(const Variant &a, const Variant &b, float c, Variant &r_dst); static void interpolate(const Variant &a, const Variant &b, float c, Variant &r_dst); - struct CallError { - enum Error { - CALL_OK, - CALL_ERROR_INVALID_METHOD, - CALL_ERROR_INVALID_ARGUMENT, - CALL_ERROR_TOO_MANY_ARGUMENTS, - CALL_ERROR_TOO_FEW_ARGUMENTS, - CALL_ERROR_INSTANCE_IS_NULL, - }; - Error error; - int argument; - Type expected; - }; - - void call_ptr(const StringName &p_method, const Variant **p_args, int p_argcount, Variant *r_ret, CallError &r_error); - Variant call(const StringName &p_method, const Variant **p_args, int p_argcount, CallError &r_error); + void call_ptr(const StringName &p_method, const Variant **p_args, int p_argcount, Variant *r_ret, Callable::CallError &r_error); + Variant call(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error); Variant call(const StringName &p_method, const Variant &p_arg1 = Variant(), const Variant &p_arg2 = Variant(), const Variant &p_arg3 = Variant(), const Variant &p_arg4 = Variant(), const Variant &p_arg5 = Variant()); - static String get_call_error_text(Object *p_base, const StringName &p_method, const Variant **p_argptrs, int p_argcount, const Variant::CallError &ce); + static String get_call_error_text(Object *p_base, const StringName &p_method, const Variant **p_argptrs, int p_argcount, const Callable::CallError &ce); + static String get_callable_error_text(const Callable &p_callable, const Variant **p_argptrs, int p_argcount, const Callable::CallError &ce); - static Variant construct(const Variant::Type, const Variant **p_args, int p_argcount, CallError &r_error, bool p_strict = true); + static Variant construct(const Variant::Type, const Variant **p_args, int p_argcount, Callable::CallError &r_error, bool p_strict = true); void get_method_list(List<MethodInfo> *p_list) const; bool has_method(const StringName &p_method) const; @@ -417,7 +477,9 @@ public: void operator=(const Variant &p_variant); // only this is enough for all the other types Variant(const Variant &p_variant); - _FORCE_INLINE_ Variant() { type = NIL; } + _FORCE_INLINE_ Variant() { + type = NIL; + } _FORCE_INLINE_ ~Variant() { if (type != Variant::NIL) clear(); } diff --git a/core/variant_call.cpp b/core/variant_call.cpp index f088705cdd..9cc08b54e6 100644 --- a/core/variant_call.cpp +++ b/core/variant_call.cpp @@ -61,7 +61,7 @@ struct _VariantCall { VariantFunc func; - _FORCE_INLINE_ bool verify_arguments(const Variant **p_args, Variant::CallError &r_error) { + _FORCE_INLINE_ bool verify_arguments(const Variant **p_args, Callable::CallError &r_error) { if (arg_count == 0) return true; @@ -73,7 +73,7 @@ struct _VariantCall { if (tptr[i] == Variant::NIL || tptr[i] == p_args[i]->type) continue; // all good if (!Variant::can_convert(p_args[i]->type, tptr[i])) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.argument = i; r_error.expected = tptr[i]; return false; @@ -82,10 +82,10 @@ struct _VariantCall { return true; } - _FORCE_INLINE_ void call(Variant &r_ret, Variant &p_self, const Variant **p_args, int p_argcount, Variant::CallError &r_error) { + _FORCE_INLINE_ void call(Variant &r_ret, Variant &p_self, const Variant **p_args, int p_argcount, Callable::CallError &r_error) { #ifdef DEBUG_ENABLED if (p_argcount > arg_count) { - r_error.error = Variant::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS; + r_error.error = Callable::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS; r_error.argument = arg_count; return; } else @@ -94,7 +94,7 @@ struct _VariantCall { int def_argcount = default_args.size(); #ifdef DEBUG_ENABLED if (p_argcount < (arg_count - def_argcount)) { - r_error.error = Variant::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS; + r_error.error = Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS; r_error.argument = arg_count - def_argcount; return; } @@ -317,17 +317,16 @@ struct _VariantCall { String *s = reinterpret_cast<String *>(p_self._data._mem); if (s->empty()) { - r_ret = PoolByteArray(); + r_ret = PackedByteArray(); return; } CharString charstr = s->ascii(); - PoolByteArray retval; + PackedByteArray retval; size_t len = charstr.length(); retval.resize(len); - PoolByteArray::Write w = retval.write(); - copymem(w.ptr(), charstr.ptr(), len); - w.release(); + uint8_t *w = retval.ptrw(); + copymem(w, charstr.ptr(), len); r_ret = retval; } @@ -336,17 +335,16 @@ struct _VariantCall { String *s = reinterpret_cast<String *>(p_self._data._mem); if (s->empty()) { - r_ret = PoolByteArray(); + r_ret = PackedByteArray(); return; } CharString charstr = s->utf8(); - PoolByteArray retval; + PackedByteArray retval; size_t len = charstr.length(); retval.resize(len); - PoolByteArray::Write w = retval.write(); - copymem(w.ptr(), charstr.ptr(), len); - w.release(); + uint8_t *w = retval.ptrw(); + copymem(w, charstr.ptr(), len); r_ret = retval; } @@ -385,6 +383,10 @@ struct _VariantCall { VCALL_LOCALMEM1R(Vector2, clamped); VCALL_LOCALMEM0R(Vector2, sign); + VCALL_LOCALMEM0R(Vector2i, aspect); + VCALL_LOCALMEM0R(Vector2i, sign); + VCALL_LOCALMEM0R(Vector2i, abs); + VCALL_LOCALMEM0R(Rect2, get_area); VCALL_LOCALMEM0R(Rect2, has_no_area); VCALL_LOCALMEM1R(Rect2, has_point); @@ -399,6 +401,19 @@ struct _VariantCall { VCALL_LOCALMEM4R(Rect2, grow_individual); VCALL_LOCALMEM0R(Rect2, abs); + VCALL_LOCALMEM0R(Rect2i, get_area); + VCALL_LOCALMEM0R(Rect2i, has_no_area); + VCALL_LOCALMEM1R(Rect2i, has_point); + VCALL_LOCALMEM1R(Rect2i, intersects); + VCALL_LOCALMEM1R(Rect2i, encloses); + VCALL_LOCALMEM1R(Rect2i, clip); + VCALL_LOCALMEM1R(Rect2i, merge); + VCALL_LOCALMEM1R(Rect2i, expand); + VCALL_LOCALMEM1R(Rect2i, grow); + VCALL_LOCALMEM2R(Rect2i, grow_margin); + VCALL_LOCALMEM4R(Rect2i, grow_individual); + VCALL_LOCALMEM0R(Rect2i, abs); + VCALL_LOCALMEM0R(Vector3, min_axis); VCALL_LOCALMEM0R(Vector3, max_axis); VCALL_LOCALMEM1R(Vector3, distance_to); @@ -433,6 +448,10 @@ struct _VariantCall { VCALL_LOCALMEM1R(Vector3, reflect); VCALL_LOCALMEM0R(Vector3, sign); + VCALL_LOCALMEM0R(Vector3i, min_axis); + VCALL_LOCALMEM0R(Vector3i, max_axis); + VCALL_LOCALMEM0R(Vector3i, sign); + VCALL_LOCALMEM0R(Plane, normalized); VCALL_LOCALMEM0R(Plane, center); VCALL_LOCALMEM0R(Plane, get_any_point); @@ -521,6 +540,23 @@ struct _VariantCall { VCALL_LOCALMEM1R(Dictionary, duplicate); VCALL_LOCALMEM2R(Dictionary, get); + VCALL_LOCALMEM0R(Callable, is_null); + VCALL_LOCALMEM0R(Callable, is_custom); + VCALL_LOCALMEM0(Callable, is_standard); + VCALL_LOCALMEM0(Callable, get_object); + VCALL_LOCALMEM0(Callable, get_object_id); + VCALL_LOCALMEM0(Callable, get_method); + VCALL_LOCALMEM0(Callable, hash); + + VCALL_LOCALMEM0R(Signal, is_null); + VCALL_LOCALMEM0R(Signal, get_object); + VCALL_LOCALMEM0R(Signal, get_object_id); + VCALL_LOCALMEM0R(Signal, get_name); + VCALL_LOCALMEM3R(Signal, connect); + VCALL_LOCALMEM1(Signal, disconnect); + VCALL_LOCALMEM1R(Signal, is_connected); + VCALL_LOCALMEM0R(Signal, get_connections); + VCALL_LOCALMEM2(Array, set); VCALL_LOCALMEM1R(Array, get); VCALL_LOCALMEM0R(Array, size); @@ -554,15 +590,15 @@ struct _VariantCall { VCALL_LOCALMEM0R(Array, max); VCALL_LOCALMEM0R(Array, min); - static void _call_PoolByteArray_get_string_from_ascii(Variant &r_ret, Variant &p_self, const Variant **p_args) { + static void _call_PackedByteArray_get_string_from_ascii(Variant &r_ret, Variant &p_self, const Variant **p_args) { - PoolByteArray *ba = reinterpret_cast<PoolByteArray *>(p_self._data._mem); + PackedByteArray *ba = reinterpret_cast<PackedByteArray *>(p_self._data._mem); String s; if (ba->size() > 0) { - PoolByteArray::Read r = ba->read(); + const uint8_t *r = ba->ptr(); CharString cs; cs.resize(ba->size() + 1); - copymem(cs.ptrw(), r.ptr(), ba->size()); + copymem(cs.ptrw(), r, ba->size()); cs[ba->size()] = 0; s = cs.get_data(); @@ -570,26 +606,26 @@ struct _VariantCall { r_ret = s; } - static void _call_PoolByteArray_get_string_from_utf8(Variant &r_ret, Variant &p_self, const Variant **p_args) { + static void _call_PackedByteArray_get_string_from_utf8(Variant &r_ret, Variant &p_self, const Variant **p_args) { - PoolByteArray *ba = reinterpret_cast<PoolByteArray *>(p_self._data._mem); + PackedByteArray *ba = reinterpret_cast<PackedByteArray *>(p_self._data._mem); String s; if (ba->size() > 0) { - PoolByteArray::Read r = ba->read(); - s.parse_utf8((const char *)r.ptr(), ba->size()); + const uint8_t *r = ba->ptr(); + s.parse_utf8((const char *)r, ba->size()); } r_ret = s; } - static void _call_PoolByteArray_compress(Variant &r_ret, Variant &p_self, const Variant **p_args) { + static void _call_PackedByteArray_compress(Variant &r_ret, Variant &p_self, const Variant **p_args) { - PoolByteArray *ba = reinterpret_cast<PoolByteArray *>(p_self._data._mem); - PoolByteArray compressed; + PackedByteArray *ba = reinterpret_cast<PackedByteArray *>(p_self._data._mem); + PackedByteArray compressed; if (ba->size() > 0) { Compression::Mode mode = (Compression::Mode)(int)(*p_args[0]); compressed.resize(Compression::get_max_compressed_buffer_size(ba->size(), mode)); - int result = Compression::compress(compressed.write().ptr(), ba->read().ptr(), ba->size(), mode); + int result = Compression::compress(compressed.ptrw(), ba->ptr(), ba->size(), mode); result = result >= 0 ? result : 0; compressed.resize(result); @@ -597,10 +633,10 @@ struct _VariantCall { r_ret = compressed; } - static void _call_PoolByteArray_decompress(Variant &r_ret, Variant &p_self, const Variant **p_args) { + static void _call_PackedByteArray_decompress(Variant &r_ret, Variant &p_self, const Variant **p_args) { - PoolByteArray *ba = reinterpret_cast<PoolByteArray *>(p_self._data._mem); - PoolByteArray decompressed; + PackedByteArray *ba = reinterpret_cast<PackedByteArray *>(p_self._data._mem); + PackedByteArray decompressed; Compression::Mode mode = (Compression::Mode)(int)(*p_args[1]); int buffer_size = (int)(*p_args[0]); @@ -611,7 +647,7 @@ struct _VariantCall { } decompressed.resize(buffer_size); - int result = Compression::decompress(decompressed.write().ptr(), buffer_size, ba->read().ptr(), ba->size(), mode); + int result = Compression::decompress(decompressed.ptrw(), buffer_size, ba->ptr(), ba->size(), mode); result = result >= 0 ? result : 0; decompressed.resize(result); @@ -619,102 +655,150 @@ struct _VariantCall { r_ret = decompressed; } - static void _call_PoolByteArray_hex_encode(Variant &r_ret, Variant &p_self, const Variant **p_args) { - PoolByteArray *ba = reinterpret_cast<PoolByteArray *>(p_self._data._mem); + static void _call_PackedByteArray_hex_encode(Variant &r_ret, Variant &p_self, const Variant **p_args) { + PackedByteArray *ba = reinterpret_cast<PackedByteArray *>(p_self._data._mem); if (ba->size() == 0) { r_ret = String(); return; } - PoolByteArray::Read r = ba->read(); + const uint8_t *r = ba->ptr(); String s = String::hex_encode_buffer(&r[0], ba->size()); r_ret = s; } - VCALL_LOCALMEM0R(PoolByteArray, size); - VCALL_LOCALMEM0R(PoolByteArray, empty); - VCALL_LOCALMEM2(PoolByteArray, set); - VCALL_LOCALMEM1R(PoolByteArray, get); - VCALL_LOCALMEM1(PoolByteArray, push_back); - VCALL_LOCALMEM1(PoolByteArray, resize); - VCALL_LOCALMEM2R(PoolByteArray, insert); - VCALL_LOCALMEM1(PoolByteArray, remove); - VCALL_LOCALMEM1(PoolByteArray, append); - VCALL_LOCALMEM1(PoolByteArray, append_array); - VCALL_LOCALMEM0(PoolByteArray, invert); - VCALL_LOCALMEM2R(PoolByteArray, subarray); - - VCALL_LOCALMEM0R(PoolIntArray, size); - VCALL_LOCALMEM0R(PoolIntArray, empty); - VCALL_LOCALMEM2(PoolIntArray, set); - VCALL_LOCALMEM1R(PoolIntArray, get); - VCALL_LOCALMEM1(PoolIntArray, push_back); - VCALL_LOCALMEM1(PoolIntArray, resize); - VCALL_LOCALMEM2R(PoolIntArray, insert); - VCALL_LOCALMEM1(PoolIntArray, remove); - VCALL_LOCALMEM1(PoolIntArray, append); - VCALL_LOCALMEM1(PoolIntArray, append_array); - VCALL_LOCALMEM0(PoolIntArray, invert); - - VCALL_LOCALMEM0R(PoolRealArray, size); - VCALL_LOCALMEM0R(PoolRealArray, empty); - VCALL_LOCALMEM2(PoolRealArray, set); - VCALL_LOCALMEM1R(PoolRealArray, get); - VCALL_LOCALMEM1(PoolRealArray, push_back); - VCALL_LOCALMEM1(PoolRealArray, resize); - VCALL_LOCALMEM2R(PoolRealArray, insert); - VCALL_LOCALMEM1(PoolRealArray, remove); - VCALL_LOCALMEM1(PoolRealArray, append); - VCALL_LOCALMEM1(PoolRealArray, append_array); - VCALL_LOCALMEM0(PoolRealArray, invert); - - VCALL_LOCALMEM0R(PoolStringArray, size); - VCALL_LOCALMEM0R(PoolStringArray, empty); - VCALL_LOCALMEM2(PoolStringArray, set); - VCALL_LOCALMEM1R(PoolStringArray, get); - VCALL_LOCALMEM1(PoolStringArray, push_back); - VCALL_LOCALMEM1(PoolStringArray, resize); - VCALL_LOCALMEM2R(PoolStringArray, insert); - VCALL_LOCALMEM1(PoolStringArray, remove); - VCALL_LOCALMEM1(PoolStringArray, append); - VCALL_LOCALMEM1(PoolStringArray, append_array); - VCALL_LOCALMEM0(PoolStringArray, invert); - VCALL_LOCALMEM1R(PoolStringArray, join); - - VCALL_LOCALMEM0R(PoolVector2Array, size); - VCALL_LOCALMEM0R(PoolVector2Array, empty); - VCALL_LOCALMEM2(PoolVector2Array, set); - VCALL_LOCALMEM1R(PoolVector2Array, get); - VCALL_LOCALMEM1(PoolVector2Array, push_back); - VCALL_LOCALMEM1(PoolVector2Array, resize); - VCALL_LOCALMEM2R(PoolVector2Array, insert); - VCALL_LOCALMEM1(PoolVector2Array, remove); - VCALL_LOCALMEM1(PoolVector2Array, append); - VCALL_LOCALMEM1(PoolVector2Array, append_array); - VCALL_LOCALMEM0(PoolVector2Array, invert); - - VCALL_LOCALMEM0R(PoolVector3Array, size); - VCALL_LOCALMEM0R(PoolVector3Array, empty); - VCALL_LOCALMEM2(PoolVector3Array, set); - VCALL_LOCALMEM1R(PoolVector3Array, get); - VCALL_LOCALMEM1(PoolVector3Array, push_back); - VCALL_LOCALMEM1(PoolVector3Array, resize); - VCALL_LOCALMEM2R(PoolVector3Array, insert); - VCALL_LOCALMEM1(PoolVector3Array, remove); - VCALL_LOCALMEM1(PoolVector3Array, append); - VCALL_LOCALMEM1(PoolVector3Array, append_array); - VCALL_LOCALMEM0(PoolVector3Array, invert); - - VCALL_LOCALMEM0R(PoolColorArray, size); - VCALL_LOCALMEM0R(PoolColorArray, empty); - VCALL_LOCALMEM2(PoolColorArray, set); - VCALL_LOCALMEM1R(PoolColorArray, get); - VCALL_LOCALMEM1(PoolColorArray, push_back); - VCALL_LOCALMEM1(PoolColorArray, resize); - VCALL_LOCALMEM2R(PoolColorArray, insert); - VCALL_LOCALMEM1(PoolColorArray, remove); - VCALL_LOCALMEM1(PoolColorArray, append); - VCALL_LOCALMEM1(PoolColorArray, append_array); - VCALL_LOCALMEM0(PoolColorArray, invert); +#define VCALL_PARRMEM0(m_type, m_elemtype, m_method) \ + static void _call_##m_type##_##m_method(Variant &r_ret, Variant &p_self, const Variant **p_args) { Variant::PackedArrayRef<m_elemtype>::get_array_ptr(p_self._data.packed_array)->m_method(); } +#define VCALL_PARRMEM0R(m_type, m_elemtype, m_method) \ + static void _call_##m_type##_##m_method(Variant &r_ret, Variant &p_self, const Variant **p_args) { r_ret = Variant::PackedArrayRef<m_elemtype>::get_array_ptr(p_self._data.packed_array)->m_method(); } +#define VCALL_PARRMEM1(m_type, m_elemtype, m_method) \ + static void _call_##m_type##_##m_method(Variant &r_ret, Variant &p_self, const Variant **p_args) { Variant::PackedArrayRef<m_elemtype>::get_array_ptr(p_self._data.packed_array)->m_method(*p_args[0]); } +#define VCALL_PARRMEM1R(m_type, m_elemtype, m_method) \ + static void _call_##m_type##_##m_method(Variant &r_ret, Variant &p_self, const Variant **p_args) { r_ret = Variant::PackedArrayRef<m_elemtype>::get_array_ptr(p_self._data.packed_array)->m_method(*p_args[0]); } +#define VCALL_PARRMEM2(m_type, m_elemtype, m_method) \ + static void _call_##m_type##_##m_method(Variant &r_ret, Variant &p_self, const Variant **p_args) { Variant::PackedArrayRef<m_elemtype>::get_array_ptr(p_self._data.packed_array)->m_method(*p_args[0], *p_args[1]); } +#define VCALL_PARRMEM2R(m_type, m_elemtype, m_method) \ + static void _call_##m_type##_##m_method(Variant &r_ret, Variant &p_self, const Variant **p_args) { r_ret = Variant::PackedArrayRef<m_elemtype>::get_array_ptr(p_self._data.packed_array)->m_method(*p_args[0], *p_args[1]); } +#define VCALL_PARRMEM3(m_type, m_elemtype, m_method) \ + static void _call_##m_type##_##m_method(Variant &r_ret, Variant &p_self, const Variant **p_args) { Variant::PackedArrayRef<m_elemtype>::get_array_ptr(p_self._data.packed_array)->m_method(*p_args[0], *p_args[1], *p_args[2]); } +#define VCALL_PARRMEM3R(m_type, m_elemtype, m_method) \ + static void _call_##m_type##_##m_method(Variant &r_ret, Variant &p_self, const Variant **p_args) { r_ret = Variant::PackedArrayRef<m_elemtype>::get_array_ptr(p_self._data.packed_array)->m_method(*p_args[0], *p_args[1], *p_args[2]); } +#define VCALL_PARRMEM4(m_type, m_elemtype, m_method) \ + static void _call_##m_type##_##m_method(Variant &r_ret, Variant &p_self, const Variant **p_args) { Variant::PackedArrayRef<m_elemtype>::get_array_ptr(p_self._data.packed_array)->m_method(*p_args[0], *p_args[1], *p_args[2], *p_args[3]); } +#define VCALL_PARRMEM4R(m_type, m_elemtype, m_method) \ + static void _call_##m_type##_##m_method(Variant &r_ret, Variant &p_self, const Variant **p_args) { r_ret = Variant::PackedArrayRef<m_elemtype>::get_array_ptr(p_self._data.packed_array)->m_method(*p_args[0], *p_args[1], *p_args[2], *p_args[3]); } +#define VCALL_PARRMEM5(m_type, m_elemtype, m_method) \ + static void _call_##m_type##_##m_method(Variant &r_ret, Variant &p_self, const Variant **p_args) { Variant::PackedArrayRef<m_elemtype>::get_array_ptr(p_self._data.packed_array)->m_method(*p_args[0], *p_args[1], *p_args[2], *p_args[3], *p_args[4]); } +#define VCALL_PARRMEM5R(m_type, m_elemtype, m_method) \ + static void _call_##m_type##_##m_method(Variant &r_ret, Variant &p_self, const Variant **p_args) { r_ret = Variant::PackedArrayRef<m_elemtype>::get_array_ptr(p_self._data.packed_array)->m_method(*p_args[0], *p_args[1], *p_args[2], *p_args[3], *p_args[4]); } + + VCALL_PARRMEM0R(PackedByteArray, uint8_t, size); + VCALL_PARRMEM0R(PackedByteArray, uint8_t, empty); + VCALL_PARRMEM2(PackedByteArray, uint8_t, set); + VCALL_PARRMEM1R(PackedByteArray, uint8_t, get); + VCALL_PARRMEM1(PackedByteArray, uint8_t, push_back); + VCALL_PARRMEM1(PackedByteArray, uint8_t, resize); + VCALL_PARRMEM2R(PackedByteArray, uint8_t, insert); + VCALL_PARRMEM1(PackedByteArray, uint8_t, remove); + VCALL_PARRMEM1(PackedByteArray, uint8_t, append); + VCALL_PARRMEM1(PackedByteArray, uint8_t, append_array); + VCALL_PARRMEM0(PackedByteArray, uint8_t, invert); + VCALL_PARRMEM2R(PackedByteArray, uint8_t, subarray); + + VCALL_PARRMEM0R(PackedInt32Array, int32_t, size); + VCALL_PARRMEM0R(PackedInt32Array, int32_t, empty); + VCALL_PARRMEM2(PackedInt32Array, int32_t, set); + VCALL_PARRMEM1R(PackedInt32Array, int32_t, get); + VCALL_PARRMEM1(PackedInt32Array, int32_t, push_back); + VCALL_PARRMEM1(PackedInt32Array, int32_t, resize); + VCALL_PARRMEM2R(PackedInt32Array, int32_t, insert); + VCALL_PARRMEM1(PackedInt32Array, int32_t, remove); + VCALL_PARRMEM1(PackedInt32Array, int32_t, append); + VCALL_PARRMEM1(PackedInt32Array, int32_t, append_array); + VCALL_PARRMEM0(PackedInt32Array, int32_t, invert); + + VCALL_PARRMEM0R(PackedInt64Array, int64_t, size); + VCALL_PARRMEM0R(PackedInt64Array, int64_t, empty); + VCALL_PARRMEM2(PackedInt64Array, int64_t, set); + VCALL_PARRMEM1R(PackedInt64Array, int64_t, get); + VCALL_PARRMEM1(PackedInt64Array, int64_t, push_back); + VCALL_PARRMEM1(PackedInt64Array, int64_t, resize); + VCALL_PARRMEM2R(PackedInt64Array, int64_t, insert); + VCALL_PARRMEM1(PackedInt64Array, int64_t, remove); + VCALL_PARRMEM1(PackedInt64Array, int64_t, append); + VCALL_PARRMEM1(PackedInt64Array, int64_t, append_array); + VCALL_PARRMEM0(PackedInt64Array, int64_t, invert); + + VCALL_PARRMEM0R(PackedFloat32Array, float, size); + VCALL_PARRMEM0R(PackedFloat32Array, float, empty); + VCALL_PARRMEM2(PackedFloat32Array, float, set); + VCALL_PARRMEM1R(PackedFloat32Array, float, get); + VCALL_PARRMEM1(PackedFloat32Array, float, push_back); + VCALL_PARRMEM1(PackedFloat32Array, float, resize); + VCALL_PARRMEM2R(PackedFloat32Array, float, insert); + VCALL_PARRMEM1(PackedFloat32Array, float, remove); + VCALL_PARRMEM1(PackedFloat32Array, float, append); + VCALL_PARRMEM1(PackedFloat32Array, float, append_array); + VCALL_PARRMEM0(PackedFloat32Array, float, invert); + + VCALL_PARRMEM0R(PackedFloat64Array, double, size); + VCALL_PARRMEM0R(PackedFloat64Array, double, empty); + VCALL_PARRMEM2(PackedFloat64Array, double, set); + VCALL_PARRMEM1R(PackedFloat64Array, double, get); + VCALL_PARRMEM1(PackedFloat64Array, double, push_back); + VCALL_PARRMEM1(PackedFloat64Array, double, resize); + VCALL_PARRMEM2R(PackedFloat64Array, double, insert); + VCALL_PARRMEM1(PackedFloat64Array, double, remove); + VCALL_PARRMEM1(PackedFloat64Array, double, append); + VCALL_PARRMEM1(PackedFloat64Array, double, append_array); + VCALL_PARRMEM0(PackedFloat64Array, double, invert); + + VCALL_PARRMEM0R(PackedStringArray, String, size); + VCALL_PARRMEM0R(PackedStringArray, String, empty); + VCALL_PARRMEM2(PackedStringArray, String, set); + VCALL_PARRMEM1R(PackedStringArray, String, get); + VCALL_PARRMEM1(PackedStringArray, String, push_back); + VCALL_PARRMEM1(PackedStringArray, String, resize); + VCALL_PARRMEM2R(PackedStringArray, String, insert); + VCALL_PARRMEM1(PackedStringArray, String, remove); + VCALL_PARRMEM1(PackedStringArray, String, append); + VCALL_PARRMEM1(PackedStringArray, String, append_array); + VCALL_PARRMEM0(PackedStringArray, String, invert); + + VCALL_PARRMEM0R(PackedVector2Array, Vector2, size); + VCALL_PARRMEM0R(PackedVector2Array, Vector2, empty); + VCALL_PARRMEM2(PackedVector2Array, Vector2, set); + VCALL_PARRMEM1R(PackedVector2Array, Vector2, get); + VCALL_PARRMEM1(PackedVector2Array, Vector2, push_back); + VCALL_PARRMEM1(PackedVector2Array, Vector2, resize); + VCALL_PARRMEM2R(PackedVector2Array, Vector2, insert); + VCALL_PARRMEM1(PackedVector2Array, Vector2, remove); + VCALL_PARRMEM1(PackedVector2Array, Vector2, append); + VCALL_PARRMEM1(PackedVector2Array, Vector2, append_array); + VCALL_PARRMEM0(PackedVector2Array, Vector2, invert); + + VCALL_PARRMEM0R(PackedVector3Array, Vector3, size); + VCALL_PARRMEM0R(PackedVector3Array, Vector3, empty); + VCALL_PARRMEM2(PackedVector3Array, Vector3, set); + VCALL_PARRMEM1R(PackedVector3Array, Vector3, get); + VCALL_PARRMEM1(PackedVector3Array, Vector3, push_back); + VCALL_PARRMEM1(PackedVector3Array, Vector3, resize); + VCALL_PARRMEM2R(PackedVector3Array, Vector3, insert); + VCALL_PARRMEM1(PackedVector3Array, Vector3, remove); + VCALL_PARRMEM1(PackedVector3Array, Vector3, append); + VCALL_PARRMEM1(PackedVector3Array, Vector3, append_array); + VCALL_PARRMEM0(PackedVector3Array, Vector3, invert); + + VCALL_PARRMEM0R(PackedColorArray, Color, size); + VCALL_PARRMEM0R(PackedColorArray, Color, empty); + VCALL_PARRMEM2(PackedColorArray, Color, set); + VCALL_PARRMEM1R(PackedColorArray, Color, get); + VCALL_PARRMEM1(PackedColorArray, Color, push_back); + VCALL_PARRMEM1(PackedColorArray, Color, resize); + VCALL_PARRMEM2R(PackedColorArray, Color, insert); + VCALL_PARRMEM1(PackedColorArray, Color, remove); + VCALL_PARRMEM1(PackedColorArray, Color, append); + VCALL_PARRMEM1(PackedColorArray, Color, append_array); + VCALL_PARRMEM0(PackedColorArray, Color, invert); #define VCALL_PTR0(m_type, m_method) \ static void _call_##m_type##_##m_method(Variant &r_ret, Variant &p_self, const Variant **p_args) { reinterpret_cast<m_type *>(p_self._data._ptr)->m_method(); } @@ -781,7 +865,7 @@ struct _VariantCall { case Variant::VECTOR2: r_ret = reinterpret_cast<Transform2D *>(p_self._data._ptr)->xform(p_args[0]->operator Vector2()); return; case Variant::RECT2: r_ret = reinterpret_cast<Transform2D *>(p_self._data._ptr)->xform(p_args[0]->operator Rect2()); return; - case Variant::POOL_VECTOR2_ARRAY: r_ret = reinterpret_cast<Transform2D *>(p_self._data._ptr)->xform(p_args[0]->operator PoolVector2Array()); return; + case Variant::PACKED_VECTOR2_ARRAY: r_ret = reinterpret_cast<Transform2D *>(p_self._data._ptr)->xform(p_args[0]->operator PackedVector2Array()); return; default: r_ret = Variant(); } } @@ -792,7 +876,7 @@ struct _VariantCall { case Variant::VECTOR2: r_ret = reinterpret_cast<Transform2D *>(p_self._data._ptr)->xform_inv(p_args[0]->operator Vector2()); return; case Variant::RECT2: r_ret = reinterpret_cast<Transform2D *>(p_self._data._ptr)->xform_inv(p_args[0]->operator Rect2()); return; - case Variant::POOL_VECTOR2_ARRAY: r_ret = reinterpret_cast<Transform2D *>(p_self._data._ptr)->xform_inv(p_args[0]->operator PoolVector2Array()); return; + case Variant::PACKED_VECTOR2_ARRAY: r_ret = reinterpret_cast<Transform2D *>(p_self._data._ptr)->xform_inv(p_args[0]->operator PackedVector2Array()); return; default: r_ret = Variant(); } } @@ -850,7 +934,7 @@ struct _VariantCall { case Variant::VECTOR3: r_ret = reinterpret_cast<Transform *>(p_self._data._ptr)->xform(p_args[0]->operator Vector3()); return; case Variant::PLANE: r_ret = reinterpret_cast<Transform *>(p_self._data._ptr)->xform(p_args[0]->operator Plane()); return; case Variant::AABB: r_ret = reinterpret_cast<Transform *>(p_self._data._ptr)->xform(p_args[0]->operator ::AABB()); return; - case Variant::POOL_VECTOR3_ARRAY: r_ret = reinterpret_cast<Transform *>(p_self._data._ptr)->xform(p_args[0]->operator ::PoolVector3Array()); return; + case Variant::PACKED_VECTOR3_ARRAY: r_ret = reinterpret_cast<Transform *>(p_self._data._ptr)->xform(p_args[0]->operator ::PackedVector3Array()); return; default: r_ret = Variant(); } } @@ -862,7 +946,7 @@ struct _VariantCall { case Variant::VECTOR3: r_ret = reinterpret_cast<Transform *>(p_self._data._ptr)->xform_inv(p_args[0]->operator Vector3()); return; case Variant::PLANE: r_ret = reinterpret_cast<Transform *>(p_self._data._ptr)->xform_inv(p_args[0]->operator Plane()); return; case Variant::AABB: r_ret = reinterpret_cast<Transform *>(p_self._data._ptr)->xform_inv(p_args[0]->operator ::AABB()); return; - case Variant::POOL_VECTOR3_ARRAY: r_ret = reinterpret_cast<Transform *>(p_self._data._ptr)->xform_inv(p_args[0]->operator ::PoolVector3Array()); return; + case Variant::PACKED_VECTOR3_ARRAY: r_ret = reinterpret_cast<Transform *>(p_self._data._ptr)->xform_inv(p_args[0]->operator ::PackedVector3Array()); return; default: r_ret = Variant(); } } @@ -895,6 +979,11 @@ struct _VariantCall { r_ret = Vector2(*p_args[0], *p_args[1]); } + static void Vector2i_init1(Variant &r_ret, const Variant **p_args) { + + r_ret = Vector2i(*p_args[0], *p_args[1]); + } + static void Rect2_init1(Variant &r_ret, const Variant **p_args) { r_ret = Rect2(*p_args[0], *p_args[1]); @@ -905,6 +994,16 @@ struct _VariantCall { r_ret = Rect2(*p_args[0], *p_args[1], *p_args[2], *p_args[3]); } + static void Rect2i_init1(Variant &r_ret, const Variant **p_args) { + + r_ret = Rect2i(*p_args[0], *p_args[1]); + } + + static void Rect2i_init2(Variant &r_ret, const Variant **p_args) { + + r_ret = Rect2i(*p_args[0], *p_args[1], *p_args[2], *p_args[3]); + } + static void Transform2D_init2(Variant &r_ret, const Variant **p_args) { Transform2D m(*p_args[0], *p_args[1]); @@ -925,6 +1024,11 @@ struct _VariantCall { r_ret = Vector3(*p_args[0], *p_args[1], *p_args[2]); } + static void Vector3i_init1(Variant &r_ret, const Variant **p_args) { + + r_ret = Vector3i(*p_args[0], *p_args[1], *p_args[2]); + } + static void Plane_init1(Variant &r_ret, const Variant **p_args) { r_ret = Plane(*p_args[0], *p_args[1], *p_args[2], *p_args[3]); @@ -1013,6 +1117,16 @@ struct _VariantCall { r_ret = Transform(p_args[0]->operator Basis(), p_args[1]->operator Vector3()); } + static void Callable_init2(Variant &r_ret, const Variant **p_args) { + + r_ret = Callable(p_args[0]->operator ObjectID(), p_args[1]->operator String()); + } + + static void Signal_init2(Variant &r_ret, const Variant **p_args) { + + r_ret = Signal(p_args[0]->operator ObjectID(), p_args[1]->operator String()); + } + static void add_constructor(VariantConstructFunc p_func, const Variant::Type p_type, const String &p_name1 = "", const Variant::Type p_type1 = Variant::NIL, const String &p_name2 = "", const Variant::Type p_type2 = Variant::NIL, @@ -1081,30 +1195,27 @@ _VariantCall::TypeFunc *_VariantCall::type_funcs = NULL; _VariantCall::ConstructFunc *_VariantCall::construct_funcs = NULL; _VariantCall::ConstantData *_VariantCall::constant_data = NULL; -Variant Variant::call(const StringName &p_method, const Variant **p_args, int p_argcount, CallError &r_error) { +Variant Variant::call(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error) { Variant ret; call_ptr(p_method, p_args, p_argcount, &ret, r_error); return ret; } -void Variant::call_ptr(const StringName &p_method, const Variant **p_args, int p_argcount, Variant *r_ret, CallError &r_error) { +void Variant::call_ptr(const StringName &p_method, const Variant **p_args, int p_argcount, Variant *r_ret, Callable::CallError &r_error) { Variant ret; if (type == Variant::OBJECT) { //call object Object *obj = _get_obj().obj; if (!obj) { - r_error.error = CallError::CALL_ERROR_INSTANCE_IS_NULL; + r_error.error = Callable::CallError::CALL_ERROR_INSTANCE_IS_NULL; return; } #ifdef DEBUG_ENABLED - if (ScriptDebugger::get_singleton() && _get_obj().ref.is_null()) { - //only if debugging! - if (!ObjectDB::instance_validate(obj)) { - r_error.error = CallError::CALL_ERROR_INSTANCE_IS_NULL; - return; - } + if (ScriptDebugger::get_singleton() && !_get_obj().id.is_reference() && ObjectDB::get_instance(_get_obj().id) == nullptr) { + r_error.error = Callable::CallError::CALL_ERROR_INSTANCE_IS_NULL; + return; } #endif @@ -1114,31 +1225,57 @@ void Variant::call_ptr(const StringName &p_method, const Variant **p_args, int p } else { - r_error.error = Variant::CallError::CALL_OK; + r_error.error = Callable::CallError::CALL_OK; Map<StringName, _VariantCall::FuncData>::Element *E = _VariantCall::type_funcs[type].functions.find(p_method); -#ifdef DEBUG_ENABLED - if (!E) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; - return; + + if (E) { + + _VariantCall::FuncData &funcdata = E->get(); + funcdata.call(ret, *this, p_args, p_argcount, r_error); + + } else { + //handle vararg functions manually + bool valid = false; + if (type == CALLABLE) { + if (p_method == CoreStringNames::get_singleton()->call) { + + reinterpret_cast<const Callable *>(_data._mem)->call(p_args, p_argcount, ret, r_error); + valid = true; + } + if (p_method == CoreStringNames::get_singleton()->call_deferred) { + reinterpret_cast<const Callable *>(_data._mem)->call_deferred(p_args, p_argcount); + valid = true; + } + } else if (type == SIGNAL) { + if (p_method == CoreStringNames::get_singleton()->emit) { + if (r_ret) { + *r_ret = Variant(); + } + reinterpret_cast<const Signal *>(_data._mem)->emit(p_args, p_argcount); + valid = true; + } + } + if (!valid) { + //ok fail because not found + r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD; + return; + } } -#endif - _VariantCall::FuncData &funcdata = E->get(); - funcdata.call(ret, *this, p_args, p_argcount, r_error); } - if (r_error.error == Variant::CallError::CALL_OK && r_ret) + if (r_error.error == Callable::CallError::CALL_OK && r_ret) *r_ret = ret; } #define VCALL(m_type, m_method) _VariantCall::_call_##m_type##_##m_method -Variant Variant::construct(const Variant::Type p_type, const Variant **p_args, int p_argcount, CallError &r_error, bool p_strict) { +Variant Variant::construct(const Variant::Type p_type, const Variant **p_args, int p_argcount, Callable::CallError &r_error, bool p_strict) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD; ERR_FAIL_INDEX_V(p_type, VARIANT_MAX, Variant()); - r_error.error = Variant::CallError::CALL_OK; + r_error.error = Callable::CallError::CALL_OK; if (p_argcount == 0) { //generic construct switch (p_type) { @@ -1148,41 +1285,47 @@ Variant Variant::construct(const Variant::Type p_type, const Variant **p_args, i // atomic types case BOOL: return Variant(false); case INT: return 0; - case REAL: return 0.0f; + case FLOAT: return 0.0f; case STRING: return String(); // math types case VECTOR2: - return Vector2(); // 5 + return Vector2(); case RECT2: return Rect2(); case VECTOR3: return Vector3(); case TRANSFORM2D: return Transform2D(); case PLANE: return Plane(); case QUAT: return Quat(); case AABB: - return ::AABB(); // 10 + return ::AABB(); case BASIS: return Basis(); case TRANSFORM: return Transform(); // misc types case COLOR: return Color(); + case STRING_NAME: + return StringName(); case NODE_PATH: - return NodePath(); // 15 + return NodePath(); case _RID: return RID(); case OBJECT: return (Object *)NULL; + case CALLABLE: return Callable(); + case SIGNAL: return Signal(); case DICTIONARY: return Dictionary(); case ARRAY: - return Array(); // 20 - case POOL_BYTE_ARRAY: return PoolByteArray(); - case POOL_INT_ARRAY: return PoolIntArray(); - case POOL_REAL_ARRAY: return PoolRealArray(); - case POOL_STRING_ARRAY: return PoolStringArray(); - case POOL_VECTOR2_ARRAY: - return PoolVector2Array(); // 25 - case POOL_VECTOR3_ARRAY: return PoolVector3Array(); - case POOL_COLOR_ARRAY: return PoolColorArray(); + return Array(); + case PACKED_BYTE_ARRAY: return PackedByteArray(); + case PACKED_INT32_ARRAY: return PackedInt32Array(); + case PACKED_INT64_ARRAY: return PackedInt64Array(); + case PACKED_FLOAT32_ARRAY: return PackedFloat32Array(); + case PACKED_FLOAT64_ARRAY: return PackedFloat64Array(); + case PACKED_STRING_ARRAY: return PackedStringArray(); + case PACKED_VECTOR2_ARRAY: + return PackedVector2Array(); + case PACKED_VECTOR3_ARRAY: return PackedVector3Array(); + case PACKED_COLOR_ARRAY: return PackedColorArray(); default: return Variant(); } @@ -1202,7 +1345,7 @@ Variant Variant::construct(const Variant::Type p_type, const Variant **p_args, i case INT: { return (int64_t(*p_args[0])); } - case REAL: { + case FLOAT: { return real_t(*p_args[0]); } case STRING: { @@ -1211,35 +1354,46 @@ Variant Variant::construct(const Variant::Type p_type, const Variant **p_args, i case VECTOR2: { return Vector2(*p_args[0]); } + case VECTOR2I: { + return Vector2i(*p_args[0]); + } case RECT2: return (Rect2(*p_args[0])); + case RECT2I: return (Rect2i(*p_args[0])); case VECTOR3: return (Vector3(*p_args[0])); + case VECTOR3I: return (Vector3i(*p_args[0])); case PLANE: return (Plane(*p_args[0])); case QUAT: return (p_args[0]->operator Quat()); case AABB: - return (::AABB(*p_args[0])); // 10 + return (::AABB(*p_args[0])); case BASIS: return (Basis(p_args[0]->operator Basis())); case TRANSFORM: return (Transform(p_args[0]->operator Transform())); // misc types case COLOR: return p_args[0]->type == Variant::STRING ? Color::html(*p_args[0]) : Color::hex(*p_args[0]); + case STRING_NAME: + return (StringName(p_args[0]->operator StringName())); case NODE_PATH: - return (NodePath(p_args[0]->operator NodePath())); // 15 + return (NodePath(p_args[0]->operator NodePath())); case _RID: return (RID(*p_args[0])); case OBJECT: return ((Object *)(p_args[0]->operator Object *())); + case CALLABLE: return ((Callable)(p_args[0]->operator Callable())); + case SIGNAL: return ((Signal)(p_args[0]->operator Signal())); case DICTIONARY: return p_args[0]->operator Dictionary(); case ARRAY: - return p_args[0]->operator Array(); // 20 + return p_args[0]->operator Array(); // arrays - case POOL_BYTE_ARRAY: return (PoolByteArray(*p_args[0])); - case POOL_INT_ARRAY: return (PoolIntArray(*p_args[0])); - case POOL_REAL_ARRAY: return (PoolRealArray(*p_args[0])); - case POOL_STRING_ARRAY: return (PoolStringArray(*p_args[0])); - case POOL_VECTOR2_ARRAY: - return (PoolVector2Array(*p_args[0])); // 25 - case POOL_VECTOR3_ARRAY: return (PoolVector3Array(*p_args[0])); - case POOL_COLOR_ARRAY: return (PoolColorArray(*p_args[0])); + case PACKED_BYTE_ARRAY: return (PackedByteArray(*p_args[0])); + case PACKED_INT32_ARRAY: return (PackedInt32Array(*p_args[0])); + case PACKED_INT64_ARRAY: return (PackedInt64Array(*p_args[0])); + case PACKED_FLOAT32_ARRAY: return (PackedFloat32Array(*p_args[0])); + case PACKED_FLOAT64_ARRAY: return (PackedFloat64Array(*p_args[0])); + case PACKED_STRING_ARRAY: return (PackedStringArray(*p_args[0])); + case PACKED_VECTOR2_ARRAY: + return (PackedVector2Array(*p_args[0])); + case PACKED_VECTOR3_ARRAY: return (PackedVector3Array(*p_args[0])); + case PACKED_COLOR_ARRAY: return (PackedColorArray(*p_args[0])); default: return Variant(); } } else if (p_argcount >= 1) { @@ -1255,7 +1409,7 @@ Variant Variant::construct(const Variant::Type p_type, const Variant **p_args, i //validate parameters for (int i = 0; i < cd.arg_count; i++) { if (!Variant::can_convert(p_args[i]->type, cd.arg_types[i])) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; //no such constructor + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; //no such constructor r_error.argument = i; r_error.expected = cd.arg_types[i]; return Variant(); @@ -1267,25 +1421,18 @@ Variant Variant::construct(const Variant::Type p_type, const Variant **p_args, i return v; } } - r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; //no such constructor + r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD; //no such constructor return Variant(); } bool Variant::has_method(const StringName &p_method) const { if (type == OBJECT) { - Object *obj = operator Object *(); + Object *obj = get_validated_object(); if (!obj) return false; -#ifdef DEBUG_ENABLED - if (ScriptDebugger::get_singleton()) { - if (ObjectDB::instance_validate(obj)) { -#endif - return obj->has_method(p_method); -#ifdef DEBUG_ENABLED - } - } -#endif + + return obj->has_method(p_method); } const _VariantCall::TypeFunc &tf = _VariantCall::type_funcs[type]; @@ -1386,6 +1533,30 @@ void Variant::get_method_list(List<MethodInfo> *p_list) const { p_list->push_back(mi); } + + if (type == CALLABLE) { + + MethodInfo mi; + mi.name = "call"; + mi.return_val.usage = PROPERTY_USAGE_NIL_IS_VARIANT; + mi.flags |= METHOD_FLAG_VARARG; + + p_list->push_back(mi); + + mi.name = "call_deferred"; + mi.return_val.usage = 0; + + p_list->push_back(mi); + } + + if (type == SIGNAL) { + + MethodInfo mi; + mi.name = "emit"; + mi.flags |= METHOD_FLAG_VARARG; + + p_list->push_back(mi); + } } void Variant::get_constructor_list(Variant::Type p_type, List<MethodInfo> *p_list) { @@ -1553,8 +1724,8 @@ void register_variant_methods() { ADDFUNC1R(STRING, BOOL, String, ends_with, STRING, "text", varray()); ADDFUNC1R(STRING, BOOL, String, is_subsequence_of, STRING, "text", varray()); ADDFUNC1R(STRING, BOOL, String, is_subsequence_ofi, STRING, "text", varray()); - ADDFUNC0R(STRING, POOL_STRING_ARRAY, String, bigrams, varray()); - ADDFUNC1R(STRING, REAL, String, similarity, STRING, "text", varray()); + ADDFUNC0R(STRING, PACKED_STRING_ARRAY, String, bigrams, varray()); + ADDFUNC1R(STRING, FLOAT, String, similarity, STRING, "text", varray()); ADDFUNC2R(STRING, STRING, String, format, NIL, "values", STRING, "placeholder", varray("{_}")); ADDFUNC2R(STRING, STRING, String, replace, STRING, "what", STRING, "forwhat", varray()); @@ -1562,9 +1733,9 @@ void register_variant_methods() { ADDFUNC1R(STRING, STRING, String, repeat, INT, "count", varray()); ADDFUNC2R(STRING, STRING, String, insert, INT, "position", STRING, "what", varray()); ADDFUNC0R(STRING, STRING, String, capitalize, varray()); - ADDFUNC3R(STRING, POOL_STRING_ARRAY, String, split, STRING, "delimiter", BOOL, "allow_empty", INT, "maxsplit", varray(true, 0)); - ADDFUNC3R(STRING, POOL_STRING_ARRAY, String, rsplit, STRING, "delimiter", BOOL, "allow_empty", INT, "maxsplit", varray(true, 0)); - ADDFUNC2R(STRING, POOL_REAL_ARRAY, String, split_floats, STRING, "delimiter", BOOL, "allow_empty", varray(true)); + ADDFUNC3R(STRING, PACKED_STRING_ARRAY, String, split, STRING, "delimiter", BOOL, "allow_empty", INT, "maxsplit", varray(true, 0)); + ADDFUNC3R(STRING, PACKED_STRING_ARRAY, String, rsplit, STRING, "delimiter", BOOL, "allow_empty", INT, "maxsplit", varray(true, 0)); + ADDFUNC2R(STRING, PACKED_FLOAT32_ARRAY, String, split_floats, STRING, "delimiter", BOOL, "allow_empty", varray(true)); ADDFUNC0R(STRING, STRING, String, to_upper, varray()); ADDFUNC0R(STRING, STRING, String, to_lower, varray()); @@ -1585,9 +1756,9 @@ void register_variant_methods() { ADDFUNC0R(STRING, STRING, String, md5_text, varray()); ADDFUNC0R(STRING, STRING, String, sha1_text, varray()); ADDFUNC0R(STRING, STRING, String, sha256_text, varray()); - ADDFUNC0R(STRING, POOL_BYTE_ARRAY, String, md5_buffer, varray()); - ADDFUNC0R(STRING, POOL_BYTE_ARRAY, String, sha1_buffer, varray()); - ADDFUNC0R(STRING, POOL_BYTE_ARRAY, String, sha256_buffer, varray()); + ADDFUNC0R(STRING, PACKED_BYTE_ARRAY, String, md5_buffer, varray()); + ADDFUNC0R(STRING, PACKED_BYTE_ARRAY, String, sha1_buffer, varray()); + ADDFUNC0R(STRING, PACKED_BYTE_ARRAY, String, sha256_buffer, varray()); ADDFUNC0R(STRING, BOOL, String, empty, varray()); ADDFUNC1R(STRING, STRING, String, humanize_size, INT, "size", varray()); ADDFUNC0R(STRING, BOOL, String, is_abs_path, varray()); @@ -1611,51 +1782,55 @@ void register_variant_methods() { ADDFUNC0R(STRING, BOOL, String, is_valid_ip_address, varray()); ADDFUNC0R(STRING, BOOL, String, is_valid_filename, varray()); ADDFUNC0R(STRING, INT, String, to_int, varray()); - ADDFUNC0R(STRING, REAL, String, to_float, varray()); + ADDFUNC0R(STRING, FLOAT, String, to_float, varray()); ADDFUNC0R(STRING, INT, String, hex_to_int, varray()); ADDFUNC1R(STRING, STRING, String, pad_decimals, INT, "digits", varray()); ADDFUNC1R(STRING, STRING, String, pad_zeros, INT, "digits", varray()); ADDFUNC1R(STRING, STRING, String, trim_prefix, STRING, "prefix", varray()); ADDFUNC1R(STRING, STRING, String, trim_suffix, STRING, "suffix", varray()); - ADDFUNC0R(STRING, POOL_BYTE_ARRAY, String, to_ascii, varray()); - ADDFUNC0R(STRING, POOL_BYTE_ARRAY, String, to_utf8, varray()); + ADDFUNC0R(STRING, PACKED_BYTE_ARRAY, String, to_ascii, varray()); + ADDFUNC0R(STRING, PACKED_BYTE_ARRAY, String, to_utf8, varray()); - ADDFUNC0R(VECTOR2, REAL, Vector2, angle, varray()); - ADDFUNC1R(VECTOR2, REAL, Vector2, angle_to, VECTOR2, "to", varray()); - ADDFUNC1R(VECTOR2, REAL, Vector2, angle_to_point, VECTOR2, "to", varray()); + ADDFUNC0R(VECTOR2, FLOAT, Vector2, angle, varray()); + ADDFUNC1R(VECTOR2, FLOAT, Vector2, angle_to, VECTOR2, "to", varray()); + ADDFUNC1R(VECTOR2, FLOAT, Vector2, angle_to_point, VECTOR2, "to", varray()); ADDFUNC1R(VECTOR2, VECTOR2, Vector2, direction_to, VECTOR2, "b", varray()); - ADDFUNC1R(VECTOR2, REAL, Vector2, distance_to, VECTOR2, "to", varray()); - ADDFUNC1R(VECTOR2, REAL, Vector2, distance_squared_to, VECTOR2, "to", varray()); - ADDFUNC0R(VECTOR2, REAL, Vector2, length, varray()); - ADDFUNC0R(VECTOR2, REAL, Vector2, length_squared, varray()); + ADDFUNC1R(VECTOR2, FLOAT, Vector2, distance_to, VECTOR2, "to", varray()); + ADDFUNC1R(VECTOR2, FLOAT, Vector2, distance_squared_to, VECTOR2, "to", varray()); + ADDFUNC0R(VECTOR2, FLOAT, Vector2, length, varray()); + ADDFUNC0R(VECTOR2, FLOAT, Vector2, length_squared, varray()); ADDFUNC0R(VECTOR2, VECTOR2, Vector2, normalized, varray()); ADDFUNC0R(VECTOR2, BOOL, Vector2, is_normalized, varray()); ADDFUNC1R(VECTOR2, BOOL, Vector2, is_equal_approx, VECTOR2, "v", varray()); - ADDFUNC1R(VECTOR2, VECTOR2, Vector2, posmod, REAL, "mod", varray()); + ADDFUNC1R(VECTOR2, VECTOR2, Vector2, posmod, FLOAT, "mod", varray()); ADDFUNC1R(VECTOR2, VECTOR2, Vector2, posmodv, VECTOR2, "modv", varray()); ADDFUNC1R(VECTOR2, VECTOR2, Vector2, project, VECTOR2, "b", varray()); - ADDFUNC2R(VECTOR2, VECTOR2, Vector2, linear_interpolate, VECTOR2, "b", REAL, "t", varray()); - ADDFUNC2R(VECTOR2, VECTOR2, Vector2, slerp, VECTOR2, "b", REAL, "t", varray()); - ADDFUNC4R(VECTOR2, VECTOR2, Vector2, cubic_interpolate, VECTOR2, "b", VECTOR2, "pre_a", VECTOR2, "post_b", REAL, "t", varray()); - ADDFUNC2R(VECTOR2, VECTOR2, Vector2, move_toward, VECTOR2, "to", REAL, "delta", varray()); - ADDFUNC1R(VECTOR2, VECTOR2, Vector2, rotated, REAL, "phi", varray()); + ADDFUNC2R(VECTOR2, VECTOR2, Vector2, linear_interpolate, VECTOR2, "b", FLOAT, "t", varray()); + ADDFUNC2R(VECTOR2, VECTOR2, Vector2, slerp, VECTOR2, "b", FLOAT, "t", varray()); + ADDFUNC4R(VECTOR2, VECTOR2, Vector2, cubic_interpolate, VECTOR2, "b", VECTOR2, "pre_a", VECTOR2, "post_b", FLOAT, "t", varray()); + ADDFUNC2R(VECTOR2, VECTOR2, Vector2, move_toward, VECTOR2, "to", FLOAT, "delta", varray()); + ADDFUNC1R(VECTOR2, VECTOR2, Vector2, rotated, FLOAT, "phi", varray()); ADDFUNC0R(VECTOR2, VECTOR2, Vector2, tangent, varray()); ADDFUNC0R(VECTOR2, VECTOR2, Vector2, floor, varray()); ADDFUNC0R(VECTOR2, VECTOR2, Vector2, ceil, varray()); ADDFUNC0R(VECTOR2, VECTOR2, Vector2, round, varray()); ADDFUNC1R(VECTOR2, VECTOR2, Vector2, snapped, VECTOR2, "by", varray()); - ADDFUNC0R(VECTOR2, REAL, Vector2, aspect, varray()); - ADDFUNC1R(VECTOR2, REAL, Vector2, dot, VECTOR2, "with", varray()); + ADDFUNC0R(VECTOR2, FLOAT, Vector2, aspect, varray()); + ADDFUNC1R(VECTOR2, FLOAT, Vector2, dot, VECTOR2, "with", varray()); ADDFUNC1R(VECTOR2, VECTOR2, Vector2, slide, VECTOR2, "n", varray()); ADDFUNC1R(VECTOR2, VECTOR2, Vector2, bounce, VECTOR2, "n", varray()); ADDFUNC1R(VECTOR2, VECTOR2, Vector2, reflect, VECTOR2, "n", varray()); - ADDFUNC1R(VECTOR2, REAL, Vector2, cross, VECTOR2, "with", varray()); + ADDFUNC1R(VECTOR2, FLOAT, Vector2, cross, VECTOR2, "with", varray()); ADDFUNC0R(VECTOR2, VECTOR2, Vector2, abs, varray()); - ADDFUNC1R(VECTOR2, VECTOR2, Vector2, clamped, REAL, "length", varray()); + ADDFUNC1R(VECTOR2, VECTOR2, Vector2, clamped, FLOAT, "length", varray()); ADDFUNC0R(VECTOR2, VECTOR2, Vector2, sign, varray()); - ADDFUNC0R(RECT2, REAL, Rect2, get_area, varray()); + ADDFUNC0R(VECTOR2I, FLOAT, Vector2i, aspect, varray()); + ADDFUNC0R(VECTOR2I, VECTOR2I, Vector2i, sign, varray()); + ADDFUNC0R(VECTOR2I, VECTOR2I, Vector2i, abs, varray()); + + ADDFUNC0R(RECT2, FLOAT, Rect2, get_area, varray()); ADDFUNC0R(RECT2, BOOL, Rect2, has_no_area, varray()); ADDFUNC1R(RECT2, BOOL, Rect2, has_point, VECTOR2, "point", varray()); ADDFUNC1R(RECT2, BOOL, Rect2, is_equal_approx, RECT2, "rect", varray()); @@ -1664,30 +1839,43 @@ void register_variant_methods() { ADDFUNC1R(RECT2, RECT2, Rect2, clip, RECT2, "b", varray()); ADDFUNC1R(RECT2, RECT2, Rect2, merge, RECT2, "b", varray()); ADDFUNC1R(RECT2, RECT2, Rect2, expand, VECTOR2, "to", varray()); - ADDFUNC1R(RECT2, RECT2, Rect2, grow, REAL, "by", varray()); - ADDFUNC2R(RECT2, RECT2, Rect2, grow_margin, INT, "margin", REAL, "by", varray()); - ADDFUNC4R(RECT2, RECT2, Rect2, grow_individual, REAL, "left", REAL, "top", REAL, "right", REAL, " bottom", varray()); + ADDFUNC1R(RECT2, RECT2, Rect2, grow, FLOAT, "by", varray()); + ADDFUNC2R(RECT2, RECT2, Rect2, grow_margin, INT, "margin", FLOAT, "by", varray()); + ADDFUNC4R(RECT2, RECT2, Rect2, grow_individual, FLOAT, "left", FLOAT, "top", FLOAT, "right", FLOAT, " bottom", varray()); ADDFUNC0R(RECT2, RECT2, Rect2, abs, varray()); + ADDFUNC0R(RECT2I, INT, Rect2i, get_area, varray()); + ADDFUNC0R(RECT2I, BOOL, Rect2i, has_no_area, varray()); + ADDFUNC1R(RECT2I, BOOL, Rect2i, has_point, VECTOR2I, "point", varray()); + ADDFUNC1R(RECT2I, BOOL, Rect2i, intersects, RECT2I, "b", varray()); + ADDFUNC1R(RECT2I, BOOL, Rect2i, encloses, RECT2I, "b", varray()); + ADDFUNC1R(RECT2I, RECT2I, Rect2i, clip, RECT2I, "b", varray()); + ADDFUNC1R(RECT2I, RECT2I, Rect2i, merge, RECT2I, "b", varray()); + ADDFUNC1R(RECT2I, RECT2I, Rect2i, expand, VECTOR2I, "to", varray()); + ADDFUNC1R(RECT2I, RECT2I, Rect2i, grow, INT, "by", varray()); + ADDFUNC2R(RECT2I, RECT2I, Rect2i, grow_margin, INT, "margin", INT, "by", varray()); + ADDFUNC4R(RECT2I, RECT2I, Rect2i, grow_individual, INT, "left", INT, "top", INT, "right", INT, " bottom", varray()); + ADDFUNC0R(RECT2I, RECT2I, Rect2i, abs, varray()); + ADDFUNC0R(VECTOR3, INT, Vector3, min_axis, varray()); ADDFUNC0R(VECTOR3, INT, Vector3, max_axis, varray()); - ADDFUNC1R(VECTOR3, REAL, Vector3, angle_to, VECTOR3, "to", varray()); + ADDFUNC1R(VECTOR3, FLOAT, Vector3, angle_to, VECTOR3, "to", varray()); ADDFUNC1R(VECTOR3, VECTOR3, Vector3, direction_to, VECTOR3, "b", varray()); - ADDFUNC1R(VECTOR3, REAL, Vector3, distance_to, VECTOR3, "b", varray()); - ADDFUNC1R(VECTOR3, REAL, Vector3, distance_squared_to, VECTOR3, "b", varray()); - ADDFUNC0R(VECTOR3, REAL, Vector3, length, varray()); - ADDFUNC0R(VECTOR3, REAL, Vector3, length_squared, varray()); + ADDFUNC1R(VECTOR3, FLOAT, Vector3, distance_to, VECTOR3, "b", varray()); + ADDFUNC1R(VECTOR3, FLOAT, Vector3, distance_squared_to, VECTOR3, "b", varray()); + ADDFUNC0R(VECTOR3, FLOAT, Vector3, length, varray()); + ADDFUNC0R(VECTOR3, FLOAT, Vector3, length_squared, varray()); ADDFUNC0R(VECTOR3, VECTOR3, Vector3, normalized, varray()); ADDFUNC0R(VECTOR3, BOOL, Vector3, is_normalized, varray()); ADDFUNC1R(VECTOR3, BOOL, Vector3, is_equal_approx, VECTOR3, "v", varray()); ADDFUNC0R(VECTOR3, VECTOR3, Vector3, inverse, varray()); ADDFUNC1R(VECTOR3, VECTOR3, Vector3, snapped, VECTOR3, "by", varray()); - ADDFUNC2R(VECTOR3, VECTOR3, Vector3, rotated, VECTOR3, "axis", REAL, "phi", varray()); - ADDFUNC2R(VECTOR3, VECTOR3, Vector3, linear_interpolate, VECTOR3, "b", REAL, "t", varray()); - ADDFUNC2R(VECTOR3, VECTOR3, Vector3, slerp, VECTOR3, "b", REAL, "t", varray()); - ADDFUNC4R(VECTOR3, VECTOR3, Vector3, cubic_interpolate, VECTOR3, "b", VECTOR3, "pre_a", VECTOR3, "post_b", REAL, "t", varray()); - ADDFUNC2R(VECTOR3, VECTOR3, Vector3, move_toward, VECTOR3, "to", REAL, "delta", varray()); - ADDFUNC1R(VECTOR3, REAL, Vector3, dot, VECTOR3, "b", varray()); + ADDFUNC2R(VECTOR3, VECTOR3, Vector3, rotated, VECTOR3, "axis", FLOAT, "phi", varray()); + ADDFUNC2R(VECTOR3, VECTOR3, Vector3, linear_interpolate, VECTOR3, "b", FLOAT, "t", varray()); + ADDFUNC2R(VECTOR3, VECTOR3, Vector3, slerp, VECTOR3, "b", FLOAT, "t", varray()); + ADDFUNC4R(VECTOR3, VECTOR3, Vector3, cubic_interpolate, VECTOR3, "b", VECTOR3, "pre_a", VECTOR3, "post_b", FLOAT, "t", varray()); + ADDFUNC2R(VECTOR3, VECTOR3, Vector3, move_toward, VECTOR3, "to", FLOAT, "delta", varray()); + ADDFUNC1R(VECTOR3, FLOAT, Vector3, dot, VECTOR3, "b", varray()); ADDFUNC1R(VECTOR3, VECTOR3, Vector3, cross, VECTOR3, "b", varray()); ADDFUNC1R(VECTOR3, BASIS, Vector3, outer, VECTOR3, "b", varray()); ADDFUNC0R(VECTOR3, BASIS, Vector3, to_diagonal_matrix, varray()); @@ -1695,7 +1883,7 @@ void register_variant_methods() { ADDFUNC0R(VECTOR3, VECTOR3, Vector3, floor, varray()); ADDFUNC0R(VECTOR3, VECTOR3, Vector3, ceil, varray()); ADDFUNC0R(VECTOR3, VECTOR3, Vector3, round, varray()); - ADDFUNC1R(VECTOR3, VECTOR3, Vector3, posmod, REAL, "mod", varray()); + ADDFUNC1R(VECTOR3, VECTOR3, Vector3, posmod, FLOAT, "mod", varray()); ADDFUNC1R(VECTOR3, VECTOR3, Vector3, posmodv, VECTOR3, "modv", varray()); ADDFUNC1R(VECTOR3, VECTOR3, Vector3, project, VECTOR3, "b", varray()); ADDFUNC1R(VECTOR3, VECTOR3, Vector3, slide, VECTOR3, "n", varray()); @@ -1703,32 +1891,36 @@ void register_variant_methods() { ADDFUNC1R(VECTOR3, VECTOR3, Vector3, reflect, VECTOR3, "n", varray()); ADDFUNC0R(VECTOR3, VECTOR3, Vector3, sign, varray()); + ADDFUNC0R(VECTOR3I, INT, Vector3i, min_axis, varray()); + ADDFUNC0R(VECTOR3I, INT, Vector3i, max_axis, varray()); + ADDFUNC0R(VECTOR3I, VECTOR3I, Vector3i, sign, varray()); + ADDFUNC0R(PLANE, PLANE, Plane, normalized, varray()); ADDFUNC0R(PLANE, VECTOR3, Plane, center, varray()); ADDFUNC0R(PLANE, VECTOR3, Plane, get_any_point, varray()); ADDFUNC1R(PLANE, BOOL, Plane, is_equal_approx, PLANE, "plane", varray()); ADDFUNC1R(PLANE, BOOL, Plane, is_point_over, VECTOR3, "point", varray()); - ADDFUNC1R(PLANE, REAL, Plane, distance_to, VECTOR3, "point", varray()); - ADDFUNC2R(PLANE, BOOL, Plane, has_point, VECTOR3, "point", REAL, "epsilon", varray(CMP_EPSILON)); + ADDFUNC1R(PLANE, FLOAT, Plane, distance_to, VECTOR3, "point", varray()); + ADDFUNC2R(PLANE, BOOL, Plane, has_point, VECTOR3, "point", FLOAT, "epsilon", varray(CMP_EPSILON)); ADDFUNC1R(PLANE, VECTOR3, Plane, project, VECTOR3, "point", varray()); ADDFUNC2R(PLANE, VECTOR3, Plane, intersect_3, PLANE, "b", PLANE, "c", varray()); ADDFUNC2R(PLANE, VECTOR3, Plane, intersects_ray, VECTOR3, "from", VECTOR3, "dir", varray()); ADDFUNC2R(PLANE, VECTOR3, Plane, intersects_segment, VECTOR3, "begin", VECTOR3, "end", varray()); - ADDFUNC0R(QUAT, REAL, Quat, length, varray()); - ADDFUNC0R(QUAT, REAL, Quat, length_squared, varray()); + ADDFUNC0R(QUAT, FLOAT, Quat, length, varray()); + ADDFUNC0R(QUAT, FLOAT, Quat, length_squared, varray()); ADDFUNC0R(QUAT, QUAT, Quat, normalized, varray()); ADDFUNC0R(QUAT, BOOL, Quat, is_normalized, varray()); ADDFUNC1R(QUAT, BOOL, Quat, is_equal_approx, QUAT, "quat", varray()); ADDFUNC0R(QUAT, QUAT, Quat, inverse, varray()); - ADDFUNC1R(QUAT, REAL, Quat, dot, QUAT, "b", varray()); + ADDFUNC1R(QUAT, FLOAT, Quat, dot, QUAT, "b", varray()); ADDFUNC1R(QUAT, VECTOR3, Quat, xform, VECTOR3, "v", varray()); - ADDFUNC2R(QUAT, QUAT, Quat, slerp, QUAT, "b", REAL, "t", varray()); - ADDFUNC2R(QUAT, QUAT, Quat, slerpni, QUAT, "b", REAL, "t", varray()); - ADDFUNC4R(QUAT, QUAT, Quat, cubic_slerp, QUAT, "b", QUAT, "pre_a", QUAT, "post_b", REAL, "t", varray()); + ADDFUNC2R(QUAT, QUAT, Quat, slerp, QUAT, "b", FLOAT, "t", varray()); + ADDFUNC2R(QUAT, QUAT, Quat, slerpni, QUAT, "b", FLOAT, "t", varray()); + ADDFUNC4R(QUAT, QUAT, Quat, cubic_slerp, QUAT, "b", QUAT, "pre_a", QUAT, "post_b", FLOAT, "t", varray()); ADDFUNC0R(QUAT, VECTOR3, Quat, get_euler, varray()); ADDFUNC1(QUAT, NIL, Quat, set_euler, VECTOR3, "euler", varray()); - ADDFUNC2(QUAT, NIL, Quat, set_axis_angle, VECTOR3, "axis", REAL, "angle", varray()); + ADDFUNC2(QUAT, NIL, Quat, set_axis_angle, VECTOR3, "axis", FLOAT, "angle", varray()); ADDFUNC0R(COLOR, INT, Color, to_argb32, varray()); ADDFUNC0R(COLOR, INT, Color, to_abgr32, varray()); @@ -1738,12 +1930,12 @@ void register_variant_methods() { ADDFUNC0R(COLOR, INT, Color, to_rgba64, varray()); ADDFUNC0R(COLOR, COLOR, Color, inverted, varray()); ADDFUNC0R(COLOR, COLOR, Color, contrasted, varray()); - ADDFUNC2R(COLOR, COLOR, Color, linear_interpolate, COLOR, "b", REAL, "t", varray()); + ADDFUNC2R(COLOR, COLOR, Color, linear_interpolate, COLOR, "b", FLOAT, "t", varray()); ADDFUNC1R(COLOR, COLOR, Color, blend, COLOR, "over", varray()); - ADDFUNC1R(COLOR, COLOR, Color, lightened, REAL, "amount", varray()); - ADDFUNC1R(COLOR, COLOR, Color, darkened, REAL, "amount", varray()); + ADDFUNC1R(COLOR, COLOR, Color, lightened, FLOAT, "amount", varray()); + ADDFUNC1R(COLOR, COLOR, Color, darkened, FLOAT, "amount", varray()); ADDFUNC1R(COLOR, STRING, Color, to_html, BOOL, "with_alpha", varray(true)); - ADDFUNC4R(COLOR, COLOR, Color, from_hsv, REAL, "h", REAL, "s", REAL, "v", REAL, "a", varray(1.0)); + ADDFUNC4R(COLOR, COLOR, Color, from_hsv, FLOAT, "h", FLOAT, "s", FLOAT, "v", FLOAT, "a", varray(1.0)); ADDFUNC1R(COLOR, BOOL, Color, is_equal_approx, COLOR, "color", varray()); ADDFUNC0R(_RID, INT, RID, get_id, varray()); @@ -1769,6 +1961,25 @@ void register_variant_methods() { ADDFUNC1R(DICTIONARY, DICTIONARY, Dictionary, duplicate, BOOL, "deep", varray(false)); ADDFUNC2R(DICTIONARY, NIL, Dictionary, get, NIL, "key", NIL, "default", varray(Variant())); + ADDFUNC0R(CALLABLE, BOOL, Callable, is_null, varray()); + ADDFUNC0R(CALLABLE, BOOL, Callable, is_custom, varray()); + ADDFUNC0R(CALLABLE, BOOL, Callable, is_standard, varray()); + ADDFUNC0R(CALLABLE, OBJECT, Callable, get_object, varray()); + ADDFUNC0R(CALLABLE, INT, Callable, get_object_id, varray()); + ADDFUNC0R(CALLABLE, STRING_NAME, Callable, get_method, varray()); + ADDFUNC0R(CALLABLE, INT, Callable, hash, varray()); + + ADDFUNC0R(SIGNAL, BOOL, Signal, is_null, varray()); + ADDFUNC0R(SIGNAL, OBJECT, Signal, get_object, varray()); + ADDFUNC0R(SIGNAL, INT, Signal, get_object_id, varray()); + ADDFUNC0R(SIGNAL, STRING_NAME, Signal, get_name, varray()); + + ADDFUNC3R(SIGNAL, INT, Signal, connect, CALLABLE, "callable", ARRAY, "binds", INT, "flags", varray(Array(), 0)); + + ADDFUNC1R(SIGNAL, NIL, Signal, disconnect, CALLABLE, "callable", varray()); + ADDFUNC1R(SIGNAL, BOOL, Signal, is_connected, CALLABLE, "callable", varray()); + ADDFUNC0R(SIGNAL, ARRAY, Signal, get_connections, varray()); + ADDFUNC0R(ARRAY, INT, Array, size, varray()); ADDFUNC0R(ARRAY, BOOL, Array, empty, varray()); ADDFUNC0NC(ARRAY, NIL, Array, clear, varray()); @@ -1800,94 +2011,115 @@ void register_variant_methods() { ADDFUNC0R(ARRAY, NIL, Array, max, varray()); ADDFUNC0R(ARRAY, NIL, Array, min, varray()); - ADDFUNC0R(POOL_BYTE_ARRAY, INT, PoolByteArray, size, varray()); - ADDFUNC0R(POOL_BYTE_ARRAY, BOOL, PoolByteArray, empty, varray()); - ADDFUNC2(POOL_BYTE_ARRAY, NIL, PoolByteArray, set, INT, "idx", INT, "byte", varray()); - ADDFUNC1(POOL_BYTE_ARRAY, NIL, PoolByteArray, push_back, INT, "byte", varray()); - ADDFUNC1(POOL_BYTE_ARRAY, NIL, PoolByteArray, append, INT, "byte", varray()); - ADDFUNC1(POOL_BYTE_ARRAY, NIL, PoolByteArray, append_array, POOL_BYTE_ARRAY, "array", varray()); - ADDFUNC1(POOL_BYTE_ARRAY, NIL, PoolByteArray, remove, INT, "idx", varray()); - ADDFUNC2R(POOL_BYTE_ARRAY, INT, PoolByteArray, insert, INT, "idx", INT, "byte", varray()); - ADDFUNC1(POOL_BYTE_ARRAY, NIL, PoolByteArray, resize, INT, "idx", varray()); - ADDFUNC0(POOL_BYTE_ARRAY, NIL, PoolByteArray, invert, varray()); - ADDFUNC2R(POOL_BYTE_ARRAY, POOL_BYTE_ARRAY, PoolByteArray, subarray, INT, "from", INT, "to", varray()); - - ADDFUNC0R(POOL_BYTE_ARRAY, STRING, PoolByteArray, get_string_from_ascii, varray()); - ADDFUNC0R(POOL_BYTE_ARRAY, STRING, PoolByteArray, get_string_from_utf8, varray()); - ADDFUNC0R(POOL_BYTE_ARRAY, STRING, PoolByteArray, hex_encode, varray()); - ADDFUNC1R(POOL_BYTE_ARRAY, POOL_BYTE_ARRAY, PoolByteArray, compress, INT, "compression_mode", varray(0)); - ADDFUNC2R(POOL_BYTE_ARRAY, POOL_BYTE_ARRAY, PoolByteArray, decompress, INT, "buffer_size", INT, "compression_mode", varray(0)); - - ADDFUNC0R(POOL_INT_ARRAY, INT, PoolIntArray, size, varray()); - ADDFUNC0R(POOL_INT_ARRAY, BOOL, PoolIntArray, empty, varray()); - ADDFUNC2(POOL_INT_ARRAY, NIL, PoolIntArray, set, INT, "idx", INT, "integer", varray()); - ADDFUNC1(POOL_INT_ARRAY, NIL, PoolIntArray, push_back, INT, "integer", varray()); - ADDFUNC1(POOL_INT_ARRAY, NIL, PoolIntArray, append, INT, "integer", varray()); - ADDFUNC1(POOL_INT_ARRAY, NIL, PoolIntArray, append_array, POOL_INT_ARRAY, "array", varray()); - ADDFUNC1(POOL_INT_ARRAY, NIL, PoolIntArray, remove, INT, "idx", varray()); - ADDFUNC2R(POOL_INT_ARRAY, INT, PoolIntArray, insert, INT, "idx", INT, "integer", varray()); - ADDFUNC1(POOL_INT_ARRAY, NIL, PoolIntArray, resize, INT, "idx", varray()); - ADDFUNC0(POOL_INT_ARRAY, NIL, PoolIntArray, invert, varray()); - - ADDFUNC0R(POOL_REAL_ARRAY, INT, PoolRealArray, size, varray()); - ADDFUNC0R(POOL_REAL_ARRAY, BOOL, PoolRealArray, empty, varray()); - ADDFUNC2(POOL_REAL_ARRAY, NIL, PoolRealArray, set, INT, "idx", REAL, "value", varray()); - ADDFUNC1(POOL_REAL_ARRAY, NIL, PoolRealArray, push_back, REAL, "value", varray()); - ADDFUNC1(POOL_REAL_ARRAY, NIL, PoolRealArray, append, REAL, "value", varray()); - ADDFUNC1(POOL_REAL_ARRAY, NIL, PoolRealArray, append_array, POOL_REAL_ARRAY, "array", varray()); - ADDFUNC1(POOL_REAL_ARRAY, NIL, PoolRealArray, remove, INT, "idx", varray()); - ADDFUNC2R(POOL_REAL_ARRAY, INT, PoolRealArray, insert, INT, "idx", REAL, "value", varray()); - ADDFUNC1(POOL_REAL_ARRAY, NIL, PoolRealArray, resize, INT, "idx", varray()); - ADDFUNC0(POOL_REAL_ARRAY, NIL, PoolRealArray, invert, varray()); - - ADDFUNC0R(POOL_STRING_ARRAY, INT, PoolStringArray, size, varray()); - ADDFUNC0R(POOL_STRING_ARRAY, BOOL, PoolStringArray, empty, varray()); - ADDFUNC2(POOL_STRING_ARRAY, NIL, PoolStringArray, set, INT, "idx", STRING, "string", varray()); - ADDFUNC1(POOL_STRING_ARRAY, NIL, PoolStringArray, push_back, STRING, "string", varray()); - ADDFUNC1(POOL_STRING_ARRAY, NIL, PoolStringArray, append, STRING, "string", varray()); - ADDFUNC1(POOL_STRING_ARRAY, NIL, PoolStringArray, append_array, POOL_STRING_ARRAY, "array", varray()); - ADDFUNC1(POOL_STRING_ARRAY, NIL, PoolStringArray, remove, INT, "idx", varray()); - ADDFUNC2R(POOL_STRING_ARRAY, INT, PoolStringArray, insert, INT, "idx", STRING, "string", varray()); - ADDFUNC1(POOL_STRING_ARRAY, NIL, PoolStringArray, resize, INT, "idx", varray()); - ADDFUNC0(POOL_STRING_ARRAY, NIL, PoolStringArray, invert, varray()); - ADDFUNC1(POOL_STRING_ARRAY, STRING, PoolStringArray, join, STRING, "delimiter", varray()); - - ADDFUNC0R(POOL_VECTOR2_ARRAY, INT, PoolVector2Array, size, varray()); - ADDFUNC0R(POOL_VECTOR2_ARRAY, BOOL, PoolVector2Array, empty, varray()); - ADDFUNC2(POOL_VECTOR2_ARRAY, NIL, PoolVector2Array, set, INT, "idx", VECTOR2, "vector2", varray()); - ADDFUNC1(POOL_VECTOR2_ARRAY, NIL, PoolVector2Array, push_back, VECTOR2, "vector2", varray()); - ADDFUNC1(POOL_VECTOR2_ARRAY, NIL, PoolVector2Array, append, VECTOR2, "vector2", varray()); - ADDFUNC1(POOL_VECTOR2_ARRAY, NIL, PoolVector2Array, append_array, POOL_VECTOR2_ARRAY, "array", varray()); - ADDFUNC1(POOL_VECTOR2_ARRAY, NIL, PoolVector2Array, remove, INT, "idx", varray()); - ADDFUNC2R(POOL_VECTOR2_ARRAY, INT, PoolVector2Array, insert, INT, "idx", VECTOR2, "vector2", varray()); - ADDFUNC1(POOL_VECTOR2_ARRAY, NIL, PoolVector2Array, resize, INT, "idx", varray()); - ADDFUNC0(POOL_VECTOR2_ARRAY, NIL, PoolVector2Array, invert, varray()); - - ADDFUNC0R(POOL_VECTOR3_ARRAY, INT, PoolVector3Array, size, varray()); - ADDFUNC0R(POOL_VECTOR3_ARRAY, BOOL, PoolVector3Array, empty, varray()); - ADDFUNC2(POOL_VECTOR3_ARRAY, NIL, PoolVector3Array, set, INT, "idx", VECTOR3, "vector3", varray()); - ADDFUNC1(POOL_VECTOR3_ARRAY, NIL, PoolVector3Array, push_back, VECTOR3, "vector3", varray()); - ADDFUNC1(POOL_VECTOR3_ARRAY, NIL, PoolVector3Array, append, VECTOR3, "vector3", varray()); - ADDFUNC1(POOL_VECTOR3_ARRAY, NIL, PoolVector3Array, append_array, POOL_VECTOR3_ARRAY, "array", varray()); - ADDFUNC1(POOL_VECTOR3_ARRAY, NIL, PoolVector3Array, remove, INT, "idx", varray()); - ADDFUNC2R(POOL_VECTOR3_ARRAY, INT, PoolVector3Array, insert, INT, "idx", VECTOR3, "vector3", varray()); - ADDFUNC1(POOL_VECTOR3_ARRAY, NIL, PoolVector3Array, resize, INT, "idx", varray()); - ADDFUNC0(POOL_VECTOR3_ARRAY, NIL, PoolVector3Array, invert, varray()); - - ADDFUNC0R(POOL_COLOR_ARRAY, INT, PoolColorArray, size, varray()); - ADDFUNC0R(POOL_COLOR_ARRAY, BOOL, PoolColorArray, empty, varray()); - ADDFUNC2(POOL_COLOR_ARRAY, NIL, PoolColorArray, set, INT, "idx", COLOR, "color", varray()); - ADDFUNC1(POOL_COLOR_ARRAY, NIL, PoolColorArray, push_back, COLOR, "color", varray()); - ADDFUNC1(POOL_COLOR_ARRAY, NIL, PoolColorArray, append, COLOR, "color", varray()); - ADDFUNC1(POOL_COLOR_ARRAY, NIL, PoolColorArray, append_array, POOL_COLOR_ARRAY, "array", varray()); - ADDFUNC1(POOL_COLOR_ARRAY, NIL, PoolColorArray, remove, INT, "idx", varray()); - ADDFUNC2R(POOL_COLOR_ARRAY, INT, PoolColorArray, insert, INT, "idx", COLOR, "color", varray()); - ADDFUNC1(POOL_COLOR_ARRAY, NIL, PoolColorArray, resize, INT, "idx", varray()); - ADDFUNC0(POOL_COLOR_ARRAY, NIL, PoolColorArray, invert, varray()); + ADDFUNC0R(PACKED_BYTE_ARRAY, INT, PackedByteArray, size, varray()); + ADDFUNC0R(PACKED_BYTE_ARRAY, BOOL, PackedByteArray, empty, varray()); + ADDFUNC2(PACKED_BYTE_ARRAY, NIL, PackedByteArray, set, INT, "idx", INT, "byte", varray()); + ADDFUNC1(PACKED_BYTE_ARRAY, NIL, PackedByteArray, push_back, INT, "byte", varray()); + ADDFUNC1(PACKED_BYTE_ARRAY, NIL, PackedByteArray, append, INT, "byte", varray()); + ADDFUNC1(PACKED_BYTE_ARRAY, NIL, PackedByteArray, append_array, PACKED_BYTE_ARRAY, "array", varray()); + ADDFUNC1(PACKED_BYTE_ARRAY, NIL, PackedByteArray, remove, INT, "idx", varray()); + ADDFUNC2R(PACKED_BYTE_ARRAY, INT, PackedByteArray, insert, INT, "idx", INT, "byte", varray()); + ADDFUNC1(PACKED_BYTE_ARRAY, NIL, PackedByteArray, resize, INT, "idx", varray()); + ADDFUNC0(PACKED_BYTE_ARRAY, NIL, PackedByteArray, invert, varray()); + ADDFUNC2R(PACKED_BYTE_ARRAY, PACKED_BYTE_ARRAY, PackedByteArray, subarray, INT, "from", INT, "to", varray()); + + ADDFUNC0R(PACKED_BYTE_ARRAY, STRING, PackedByteArray, get_string_from_ascii, varray()); + ADDFUNC0R(PACKED_BYTE_ARRAY, STRING, PackedByteArray, get_string_from_utf8, varray()); + ADDFUNC0R(PACKED_BYTE_ARRAY, STRING, PackedByteArray, hex_encode, varray()); + ADDFUNC1R(PACKED_BYTE_ARRAY, PACKED_BYTE_ARRAY, PackedByteArray, compress, INT, "compression_mode", varray(0)); + ADDFUNC2R(PACKED_BYTE_ARRAY, PACKED_BYTE_ARRAY, PackedByteArray, decompress, INT, "buffer_size", INT, "compression_mode", varray(0)); + + ADDFUNC0R(PACKED_INT32_ARRAY, INT, PackedInt32Array, size, varray()); + ADDFUNC0R(PACKED_INT32_ARRAY, BOOL, PackedInt32Array, empty, varray()); + ADDFUNC2(PACKED_INT32_ARRAY, NIL, PackedInt32Array, set, INT, "idx", INT, "integer", varray()); + ADDFUNC1(PACKED_INT32_ARRAY, NIL, PackedInt32Array, push_back, INT, "integer", varray()); + ADDFUNC1(PACKED_INT32_ARRAY, NIL, PackedInt32Array, append, INT, "integer", varray()); + ADDFUNC1(PACKED_INT32_ARRAY, NIL, PackedInt32Array, append_array, PACKED_INT32_ARRAY, "array", varray()); + ADDFUNC1(PACKED_INT32_ARRAY, NIL, PackedInt32Array, remove, INT, "idx", varray()); + ADDFUNC2R(PACKED_INT32_ARRAY, INT, PackedInt32Array, insert, INT, "idx", INT, "integer", varray()); + ADDFUNC1(PACKED_INT32_ARRAY, NIL, PackedInt32Array, resize, INT, "idx", varray()); + ADDFUNC0(PACKED_INT32_ARRAY, NIL, PackedInt32Array, invert, varray()); + + ADDFUNC0R(PACKED_INT64_ARRAY, INT, PackedInt64Array, size, varray()); + ADDFUNC0R(PACKED_INT64_ARRAY, BOOL, PackedInt64Array, empty, varray()); + ADDFUNC2(PACKED_INT64_ARRAY, NIL, PackedInt64Array, set, INT, "idx", INT, "integer", varray()); + ADDFUNC1(PACKED_INT64_ARRAY, NIL, PackedInt64Array, push_back, INT, "integer", varray()); + ADDFUNC1(PACKED_INT64_ARRAY, NIL, PackedInt64Array, append, INT, "integer", varray()); + ADDFUNC1(PACKED_INT64_ARRAY, NIL, PackedInt64Array, append_array, PACKED_INT64_ARRAY, "array", varray()); + ADDFUNC1(PACKED_INT64_ARRAY, NIL, PackedInt64Array, remove, INT, "idx", varray()); + ADDFUNC2R(PACKED_INT64_ARRAY, INT, PackedInt64Array, insert, INT, "idx", INT, "integer", varray()); + ADDFUNC1(PACKED_INT64_ARRAY, NIL, PackedInt64Array, resize, INT, "idx", varray()); + ADDFUNC0(PACKED_INT64_ARRAY, NIL, PackedInt64Array, invert, varray()); + + ADDFUNC0R(PACKED_FLOAT32_ARRAY, INT, PackedFloat32Array, size, varray()); + ADDFUNC0R(PACKED_FLOAT32_ARRAY, BOOL, PackedFloat32Array, empty, varray()); + ADDFUNC2(PACKED_FLOAT32_ARRAY, NIL, PackedFloat32Array, set, INT, "idx", FLOAT, "value", varray()); + ADDFUNC1(PACKED_FLOAT32_ARRAY, NIL, PackedFloat32Array, push_back, FLOAT, "value", varray()); + ADDFUNC1(PACKED_FLOAT32_ARRAY, NIL, PackedFloat32Array, append, FLOAT, "value", varray()); + ADDFUNC1(PACKED_FLOAT32_ARRAY, NIL, PackedFloat32Array, append_array, PACKED_FLOAT32_ARRAY, "array", varray()); + ADDFUNC1(PACKED_FLOAT32_ARRAY, NIL, PackedFloat32Array, remove, INT, "idx", varray()); + ADDFUNC2R(PACKED_FLOAT32_ARRAY, INT, PackedFloat32Array, insert, INT, "idx", FLOAT, "value", varray()); + ADDFUNC1(PACKED_FLOAT32_ARRAY, NIL, PackedFloat32Array, resize, INT, "idx", varray()); + ADDFUNC0(PACKED_FLOAT32_ARRAY, NIL, PackedFloat32Array, invert, varray()); + + ADDFUNC0R(PACKED_FLOAT64_ARRAY, INT, PackedFloat64Array, size, varray()); + ADDFUNC0R(PACKED_FLOAT64_ARRAY, BOOL, PackedFloat64Array, empty, varray()); + ADDFUNC2(PACKED_FLOAT64_ARRAY, NIL, PackedFloat64Array, set, INT, "idx", FLOAT, "value", varray()); + ADDFUNC1(PACKED_FLOAT64_ARRAY, NIL, PackedFloat64Array, push_back, FLOAT, "value", varray()); + ADDFUNC1(PACKED_FLOAT64_ARRAY, NIL, PackedFloat64Array, append, FLOAT, "value", varray()); + ADDFUNC1(PACKED_FLOAT64_ARRAY, NIL, PackedFloat64Array, append_array, PACKED_FLOAT64_ARRAY, "array", varray()); + ADDFUNC1(PACKED_FLOAT64_ARRAY, NIL, PackedFloat64Array, remove, INT, "idx", varray()); + ADDFUNC2R(PACKED_FLOAT64_ARRAY, INT, PackedFloat64Array, insert, INT, "idx", FLOAT, "value", varray()); + ADDFUNC1(PACKED_FLOAT64_ARRAY, NIL, PackedFloat64Array, resize, INT, "idx", varray()); + ADDFUNC0(PACKED_FLOAT64_ARRAY, NIL, PackedFloat64Array, invert, varray()); + + ADDFUNC0R(PACKED_STRING_ARRAY, INT, PackedStringArray, size, varray()); + ADDFUNC0R(PACKED_STRING_ARRAY, BOOL, PackedStringArray, empty, varray()); + ADDFUNC2(PACKED_STRING_ARRAY, NIL, PackedStringArray, set, INT, "idx", STRING, "string", varray()); + ADDFUNC1(PACKED_STRING_ARRAY, NIL, PackedStringArray, push_back, STRING, "string", varray()); + ADDFUNC1(PACKED_STRING_ARRAY, NIL, PackedStringArray, append, STRING, "string", varray()); + ADDFUNC1(PACKED_STRING_ARRAY, NIL, PackedStringArray, append_array, PACKED_STRING_ARRAY, "array", varray()); + ADDFUNC1(PACKED_STRING_ARRAY, NIL, PackedStringArray, remove, INT, "idx", varray()); + ADDFUNC2R(PACKED_STRING_ARRAY, INT, PackedStringArray, insert, INT, "idx", STRING, "string", varray()); + ADDFUNC1(PACKED_STRING_ARRAY, NIL, PackedStringArray, resize, INT, "idx", varray()); + ADDFUNC0(PACKED_STRING_ARRAY, NIL, PackedStringArray, invert, varray()); + + ADDFUNC0R(PACKED_VECTOR2_ARRAY, INT, PackedVector2Array, size, varray()); + ADDFUNC0R(PACKED_VECTOR2_ARRAY, BOOL, PackedVector2Array, empty, varray()); + ADDFUNC2(PACKED_VECTOR2_ARRAY, NIL, PackedVector2Array, set, INT, "idx", VECTOR2, "vector2", varray()); + ADDFUNC1(PACKED_VECTOR2_ARRAY, NIL, PackedVector2Array, push_back, VECTOR2, "vector2", varray()); + ADDFUNC1(PACKED_VECTOR2_ARRAY, NIL, PackedVector2Array, append, VECTOR2, "vector2", varray()); + ADDFUNC1(PACKED_VECTOR2_ARRAY, NIL, PackedVector2Array, append_array, PACKED_VECTOR2_ARRAY, "array", varray()); + ADDFUNC1(PACKED_VECTOR2_ARRAY, NIL, PackedVector2Array, remove, INT, "idx", varray()); + ADDFUNC2R(PACKED_VECTOR2_ARRAY, INT, PackedVector2Array, insert, INT, "idx", VECTOR2, "vector2", varray()); + ADDFUNC1(PACKED_VECTOR2_ARRAY, NIL, PackedVector2Array, resize, INT, "idx", varray()); + ADDFUNC0(PACKED_VECTOR2_ARRAY, NIL, PackedVector2Array, invert, varray()); + + ADDFUNC0R(PACKED_VECTOR3_ARRAY, INT, PackedVector3Array, size, varray()); + ADDFUNC0R(PACKED_VECTOR3_ARRAY, BOOL, PackedVector3Array, empty, varray()); + ADDFUNC2(PACKED_VECTOR3_ARRAY, NIL, PackedVector3Array, set, INT, "idx", VECTOR3, "vector3", varray()); + ADDFUNC1(PACKED_VECTOR3_ARRAY, NIL, PackedVector3Array, push_back, VECTOR3, "vector3", varray()); + ADDFUNC1(PACKED_VECTOR3_ARRAY, NIL, PackedVector3Array, append, VECTOR3, "vector3", varray()); + ADDFUNC1(PACKED_VECTOR3_ARRAY, NIL, PackedVector3Array, append_array, PACKED_VECTOR3_ARRAY, "array", varray()); + ADDFUNC1(PACKED_VECTOR3_ARRAY, NIL, PackedVector3Array, remove, INT, "idx", varray()); + ADDFUNC2R(PACKED_VECTOR3_ARRAY, INT, PackedVector3Array, insert, INT, "idx", VECTOR3, "vector3", varray()); + ADDFUNC1(PACKED_VECTOR3_ARRAY, NIL, PackedVector3Array, resize, INT, "idx", varray()); + ADDFUNC0(PACKED_VECTOR3_ARRAY, NIL, PackedVector3Array, invert, varray()); + + ADDFUNC0R(PACKED_COLOR_ARRAY, INT, PackedColorArray, size, varray()); + ADDFUNC0R(PACKED_COLOR_ARRAY, BOOL, PackedColorArray, empty, varray()); + ADDFUNC2(PACKED_COLOR_ARRAY, NIL, PackedColorArray, set, INT, "idx", COLOR, "color", varray()); + ADDFUNC1(PACKED_COLOR_ARRAY, NIL, PackedColorArray, push_back, COLOR, "color", varray()); + ADDFUNC1(PACKED_COLOR_ARRAY, NIL, PackedColorArray, append, COLOR, "color", varray()); + ADDFUNC1(PACKED_COLOR_ARRAY, NIL, PackedColorArray, append_array, PACKED_COLOR_ARRAY, "array", varray()); + ADDFUNC1(PACKED_COLOR_ARRAY, NIL, PackedColorArray, remove, INT, "idx", varray()); + ADDFUNC2R(PACKED_COLOR_ARRAY, INT, PackedColorArray, insert, INT, "idx", COLOR, "color", varray()); + ADDFUNC1(PACKED_COLOR_ARRAY, NIL, PackedColorArray, resize, INT, "idx", varray()); + ADDFUNC0(PACKED_COLOR_ARRAY, NIL, PackedColorArray, invert, varray()); //pointerbased - ADDFUNC0R(AABB, REAL, AABB, get_area, varray()); + ADDFUNC0R(AABB, FLOAT, AABB, get_area, varray()); ADDFUNC0R(AABB, BOOL, AABB, has_no_area, varray()); ADDFUNC0R(AABB, BOOL, AABB, has_no_surface, varray()); ADDFUNC1R(AABB, BOOL, AABB, has_point, VECTOR3, "point", varray()); @@ -1899,93 +2131,101 @@ void register_variant_methods() { ADDFUNC1R(AABB, AABB, AABB, intersection, AABB, "with", varray()); ADDFUNC1R(AABB, AABB, AABB, merge, AABB, "with", varray()); ADDFUNC1R(AABB, AABB, AABB, expand, VECTOR3, "to_point", varray()); - ADDFUNC1R(AABB, AABB, AABB, grow, REAL, "by", varray()); + ADDFUNC1R(AABB, AABB, AABB, grow, FLOAT, "by", varray()); ADDFUNC1R(AABB, VECTOR3, AABB, get_support, VECTOR3, "dir", varray()); ADDFUNC0R(AABB, VECTOR3, AABB, get_longest_axis, varray()); ADDFUNC0R(AABB, INT, AABB, get_longest_axis_index, varray()); - ADDFUNC0R(AABB, REAL, AABB, get_longest_axis_size, varray()); + ADDFUNC0R(AABB, FLOAT, AABB, get_longest_axis_size, varray()); ADDFUNC0R(AABB, VECTOR3, AABB, get_shortest_axis, varray()); ADDFUNC0R(AABB, INT, AABB, get_shortest_axis_index, varray()); - ADDFUNC0R(AABB, REAL, AABB, get_shortest_axis_size, varray()); + ADDFUNC0R(AABB, FLOAT, AABB, get_shortest_axis_size, varray()); ADDFUNC1R(AABB, VECTOR3, AABB, get_endpoint, INT, "idx", varray()); ADDFUNC0R(TRANSFORM2D, TRANSFORM2D, Transform2D, inverse, varray()); ADDFUNC0R(TRANSFORM2D, TRANSFORM2D, Transform2D, affine_inverse, varray()); - ADDFUNC0R(TRANSFORM2D, REAL, Transform2D, get_rotation, varray()); + ADDFUNC0R(TRANSFORM2D, FLOAT, Transform2D, get_rotation, varray()); ADDFUNC0R(TRANSFORM2D, VECTOR2, Transform2D, get_origin, varray()); ADDFUNC0R(TRANSFORM2D, VECTOR2, Transform2D, get_scale, varray()); ADDFUNC0R(TRANSFORM2D, TRANSFORM2D, Transform2D, orthonormalized, varray()); - ADDFUNC1R(TRANSFORM2D, TRANSFORM2D, Transform2D, rotated, REAL, "phi", varray()); + ADDFUNC1R(TRANSFORM2D, TRANSFORM2D, Transform2D, rotated, FLOAT, "phi", varray()); ADDFUNC1R(TRANSFORM2D, TRANSFORM2D, Transform2D, scaled, VECTOR2, "scale", varray()); ADDFUNC1R(TRANSFORM2D, TRANSFORM2D, Transform2D, translated, VECTOR2, "offset", varray()); ADDFUNC1R(TRANSFORM2D, NIL, Transform2D, xform, NIL, "v", varray()); ADDFUNC1R(TRANSFORM2D, NIL, Transform2D, xform_inv, NIL, "v", varray()); ADDFUNC1R(TRANSFORM2D, VECTOR2, Transform2D, basis_xform, VECTOR2, "v", varray()); ADDFUNC1R(TRANSFORM2D, VECTOR2, Transform2D, basis_xform_inv, VECTOR2, "v", varray()); - ADDFUNC2R(TRANSFORM2D, TRANSFORM2D, Transform2D, interpolate_with, TRANSFORM2D, "transform", REAL, "weight", varray()); + ADDFUNC2R(TRANSFORM2D, TRANSFORM2D, Transform2D, interpolate_with, TRANSFORM2D, "transform", FLOAT, "weight", varray()); ADDFUNC1R(TRANSFORM2D, BOOL, Transform2D, is_equal_approx, TRANSFORM2D, "transform", varray()); ADDFUNC0R(BASIS, BASIS, Basis, inverse, varray()); ADDFUNC0R(BASIS, BASIS, Basis, transposed, varray()); ADDFUNC0R(BASIS, BASIS, Basis, orthonormalized, varray()); - ADDFUNC0R(BASIS, REAL, Basis, determinant, varray()); - ADDFUNC2R(BASIS, BASIS, Basis, rotated, VECTOR3, "axis", REAL, "phi", varray()); + ADDFUNC0R(BASIS, FLOAT, Basis, determinant, varray()); + ADDFUNC2R(BASIS, BASIS, Basis, rotated, VECTOR3, "axis", FLOAT, "phi", varray()); ADDFUNC1R(BASIS, BASIS, Basis, scaled, VECTOR3, "scale", varray()); ADDFUNC0R(BASIS, VECTOR3, Basis, get_scale, varray()); ADDFUNC0R(BASIS, VECTOR3, Basis, get_euler, varray()); - ADDFUNC1R(BASIS, REAL, Basis, tdotx, VECTOR3, "with", varray()); - ADDFUNC1R(BASIS, REAL, Basis, tdoty, VECTOR3, "with", varray()); - ADDFUNC1R(BASIS, REAL, Basis, tdotz, VECTOR3, "with", varray()); + ADDFUNC1R(BASIS, FLOAT, Basis, tdotx, VECTOR3, "with", varray()); + ADDFUNC1R(BASIS, FLOAT, Basis, tdoty, VECTOR3, "with", varray()); + ADDFUNC1R(BASIS, FLOAT, Basis, tdotz, VECTOR3, "with", varray()); ADDFUNC1R(BASIS, VECTOR3, Basis, xform, VECTOR3, "v", varray()); ADDFUNC1R(BASIS, VECTOR3, Basis, xform_inv, VECTOR3, "v", varray()); ADDFUNC0R(BASIS, INT, Basis, get_orthogonal_index, varray()); - ADDFUNC2R(BASIS, BASIS, Basis, slerp, BASIS, "b", REAL, "t", varray()); - ADDFUNC2R(BASIS, BOOL, Basis, is_equal_approx, BASIS, "b", REAL, "epsilon", varray(CMP_EPSILON)); // TODO: Replace in 4.0, see other TODO. + ADDFUNC2R(BASIS, BASIS, Basis, slerp, BASIS, "b", FLOAT, "t", varray()); + ADDFUNC2R(BASIS, BOOL, Basis, is_equal_approx, BASIS, "b", FLOAT, "epsilon", varray(CMP_EPSILON)); // TODO: Replace in 4.0, see other TODO. ADDFUNC0R(BASIS, QUAT, Basis, get_rotation_quat, varray()); ADDFUNC0R(TRANSFORM, TRANSFORM, Transform, inverse, varray()); ADDFUNC0R(TRANSFORM, TRANSFORM, Transform, affine_inverse, varray()); ADDFUNC0R(TRANSFORM, TRANSFORM, Transform, orthonormalized, varray()); - ADDFUNC2R(TRANSFORM, TRANSFORM, Transform, rotated, VECTOR3, "axis", REAL, "phi", varray()); + ADDFUNC2R(TRANSFORM, TRANSFORM, Transform, rotated, VECTOR3, "axis", FLOAT, "phi", varray()); ADDFUNC1R(TRANSFORM, TRANSFORM, Transform, scaled, VECTOR3, "scale", varray()); ADDFUNC1R(TRANSFORM, TRANSFORM, Transform, translated, VECTOR3, "offset", varray()); ADDFUNC2R(TRANSFORM, TRANSFORM, Transform, looking_at, VECTOR3, "target", VECTOR3, "up", varray()); - ADDFUNC2R(TRANSFORM, TRANSFORM, Transform, interpolate_with, TRANSFORM, "transform", REAL, "weight", varray()); + ADDFUNC2R(TRANSFORM, TRANSFORM, Transform, interpolate_with, TRANSFORM, "transform", FLOAT, "weight", varray()); ADDFUNC1R(TRANSFORM, BOOL, Transform, is_equal_approx, TRANSFORM, "transform", varray()); ADDFUNC1R(TRANSFORM, NIL, Transform, xform, NIL, "v", varray()); ADDFUNC1R(TRANSFORM, NIL, Transform, xform_inv, NIL, "v", varray()); /* REGISTER CONSTRUCTORS */ - _VariantCall::add_constructor(_VariantCall::Vector2_init1, Variant::VECTOR2, "x", Variant::REAL, "y", Variant::REAL); + _VariantCall::add_constructor(_VariantCall::Vector2_init1, Variant::VECTOR2, "x", Variant::FLOAT, "y", Variant::FLOAT); + _VariantCall::add_constructor(_VariantCall::Vector2i_init1, Variant::VECTOR2I, "x", Variant::INT, "y", Variant::INT); _VariantCall::add_constructor(_VariantCall::Rect2_init1, Variant::RECT2, "position", Variant::VECTOR2, "size", Variant::VECTOR2); - _VariantCall::add_constructor(_VariantCall::Rect2_init2, Variant::RECT2, "x", Variant::REAL, "y", Variant::REAL, "width", Variant::REAL, "height", Variant::REAL); + _VariantCall::add_constructor(_VariantCall::Rect2_init2, Variant::RECT2, "x", Variant::FLOAT, "y", Variant::FLOAT, "width", Variant::FLOAT, "height", Variant::FLOAT); - _VariantCall::add_constructor(_VariantCall::Transform2D_init2, Variant::TRANSFORM2D, "rotation", Variant::REAL, "position", Variant::VECTOR2); + _VariantCall::add_constructor(_VariantCall::Rect2i_init1, Variant::RECT2I, "position", Variant::VECTOR2, "size", Variant::VECTOR2); + _VariantCall::add_constructor(_VariantCall::Rect2i_init2, Variant::RECT2I, "x", Variant::INT, "y", Variant::INT, "width", Variant::INT, "height", Variant::INT); + + _VariantCall::add_constructor(_VariantCall::Transform2D_init2, Variant::TRANSFORM2D, "rotation", Variant::FLOAT, "position", Variant::VECTOR2); _VariantCall::add_constructor(_VariantCall::Transform2D_init3, Variant::TRANSFORM2D, "x_axis", Variant::VECTOR2, "y_axis", Variant::VECTOR2, "origin", Variant::VECTOR2); - _VariantCall::add_constructor(_VariantCall::Vector3_init1, Variant::VECTOR3, "x", Variant::REAL, "y", Variant::REAL, "z", Variant::REAL); + _VariantCall::add_constructor(_VariantCall::Vector3_init1, Variant::VECTOR3, "x", Variant::FLOAT, "y", Variant::FLOAT, "z", Variant::FLOAT); + _VariantCall::add_constructor(_VariantCall::Vector3i_init1, Variant::VECTOR3I, "x", Variant::INT, "y", Variant::INT, "z", Variant::INT); - _VariantCall::add_constructor(_VariantCall::Plane_init1, Variant::PLANE, "a", Variant::REAL, "b", Variant::REAL, "c", Variant::REAL, "d", Variant::REAL); + _VariantCall::add_constructor(_VariantCall::Plane_init1, Variant::PLANE, "a", Variant::FLOAT, "b", Variant::FLOAT, "c", Variant::FLOAT, "d", Variant::FLOAT); _VariantCall::add_constructor(_VariantCall::Plane_init2, Variant::PLANE, "v1", Variant::VECTOR3, "v2", Variant::VECTOR3, "v3", Variant::VECTOR3); - _VariantCall::add_constructor(_VariantCall::Plane_init3, Variant::PLANE, "normal", Variant::VECTOR3, "d", Variant::REAL); + _VariantCall::add_constructor(_VariantCall::Plane_init3, Variant::PLANE, "normal", Variant::VECTOR3, "d", Variant::FLOAT); - _VariantCall::add_constructor(_VariantCall::Quat_init1, Variant::QUAT, "x", Variant::REAL, "y", Variant::REAL, "z", Variant::REAL, "w", Variant::REAL); - _VariantCall::add_constructor(_VariantCall::Quat_init2, Variant::QUAT, "axis", Variant::VECTOR3, "angle", Variant::REAL); + _VariantCall::add_constructor(_VariantCall::Quat_init1, Variant::QUAT, "x", Variant::FLOAT, "y", Variant::FLOAT, "z", Variant::FLOAT, "w", Variant::FLOAT); + _VariantCall::add_constructor(_VariantCall::Quat_init2, Variant::QUAT, "axis", Variant::VECTOR3, "angle", Variant::FLOAT); _VariantCall::add_constructor(_VariantCall::Quat_init3, Variant::QUAT, "euler", Variant::VECTOR3); - _VariantCall::add_constructor(_VariantCall::Color_init1, Variant::COLOR, "r", Variant::REAL, "g", Variant::REAL, "b", Variant::REAL, "a", Variant::REAL); - _VariantCall::add_constructor(_VariantCall::Color_init2, Variant::COLOR, "r", Variant::REAL, "g", Variant::REAL, "b", Variant::REAL); + _VariantCall::add_constructor(_VariantCall::Color_init1, Variant::COLOR, "r", Variant::FLOAT, "g", Variant::FLOAT, "b", Variant::FLOAT, "a", Variant::FLOAT); + _VariantCall::add_constructor(_VariantCall::Color_init2, Variant::COLOR, "r", Variant::FLOAT, "g", Variant::FLOAT, "b", Variant::FLOAT); _VariantCall::add_constructor(_VariantCall::AABB_init1, Variant::AABB, "position", Variant::VECTOR3, "size", Variant::VECTOR3); _VariantCall::add_constructor(_VariantCall::Basis_init1, Variant::BASIS, "x_axis", Variant::VECTOR3, "y_axis", Variant::VECTOR3, "z_axis", Variant::VECTOR3); - _VariantCall::add_constructor(_VariantCall::Basis_init2, Variant::BASIS, "axis", Variant::VECTOR3, "phi", Variant::REAL); + _VariantCall::add_constructor(_VariantCall::Basis_init2, Variant::BASIS, "axis", Variant::VECTOR3, "phi", Variant::FLOAT); _VariantCall::add_constructor(_VariantCall::Transform_init1, Variant::TRANSFORM, "x_axis", Variant::VECTOR3, "y_axis", Variant::VECTOR3, "z_axis", Variant::VECTOR3, "origin", Variant::VECTOR3); _VariantCall::add_constructor(_VariantCall::Transform_init2, Variant::TRANSFORM, "basis", Variant::BASIS, "origin", Variant::VECTOR3); + _VariantCall::add_constructor(_VariantCall::Callable_init2, Variant::CALLABLE, "object", Variant::OBJECT, "method_name", Variant::STRING_NAME); + _VariantCall::add_constructor(_VariantCall::Signal_init2, Variant::SIGNAL, "object", Variant::OBJECT, "signal_name", Variant::STRING_NAME); + /* REGISTER CONSTANTS */ _populate_named_colors(); @@ -2007,9 +2247,25 @@ void register_variant_methods() { _VariantCall::add_variant_constant(Variant::VECTOR3, "FORWARD", Vector3(0, 0, -1)); _VariantCall::add_variant_constant(Variant::VECTOR3, "BACK", Vector3(0, 0, 1)); + _VariantCall::add_constant(Variant::VECTOR3I, "AXIS_X", Vector3::AXIS_X); + _VariantCall::add_constant(Variant::VECTOR3I, "AXIS_Y", Vector3::AXIS_Y); + _VariantCall::add_constant(Variant::VECTOR3I, "AXIS_Z", Vector3::AXIS_Z); + + _VariantCall::add_variant_constant(Variant::VECTOR3I, "ZERO", Vector3i(0, 0, 0)); + _VariantCall::add_variant_constant(Variant::VECTOR3I, "ONE", Vector3i(1, 1, 1)); + _VariantCall::add_variant_constant(Variant::VECTOR3I, "LEFT", Vector3i(-1, 0, 0)); + _VariantCall::add_variant_constant(Variant::VECTOR3I, "RIGHT", Vector3i(1, 0, 0)); + _VariantCall::add_variant_constant(Variant::VECTOR3I, "UP", Vector3i(0, 1, 0)); + _VariantCall::add_variant_constant(Variant::VECTOR3I, "DOWN", Vector3i(0, -1, 0)); + _VariantCall::add_variant_constant(Variant::VECTOR3I, "FORWARD", Vector3i(0, 0, -1)); + _VariantCall::add_variant_constant(Variant::VECTOR3I, "BACK", Vector3i(0, 0, 1)); + _VariantCall::add_constant(Variant::VECTOR2, "AXIS_X", Vector2::AXIS_X); _VariantCall::add_constant(Variant::VECTOR2, "AXIS_Y", Vector2::AXIS_Y); + _VariantCall::add_constant(Variant::VECTOR2I, "AXIS_X", Vector2::AXIS_X); + _VariantCall::add_constant(Variant::VECTOR2I, "AXIS_Y", Vector2::AXIS_Y); + _VariantCall::add_variant_constant(Variant::VECTOR2, "ZERO", Vector2(0, 0)); _VariantCall::add_variant_constant(Variant::VECTOR2, "ONE", Vector2(1, 1)); _VariantCall::add_variant_constant(Variant::VECTOR2, "INF", Vector2(Math_INF, Math_INF)); @@ -2018,6 +2274,13 @@ void register_variant_methods() { _VariantCall::add_variant_constant(Variant::VECTOR2, "UP", Vector2(0, -1)); _VariantCall::add_variant_constant(Variant::VECTOR2, "DOWN", Vector2(0, 1)); + _VariantCall::add_variant_constant(Variant::VECTOR2I, "ZERO", Vector2i(0, 0)); + _VariantCall::add_variant_constant(Variant::VECTOR2I, "ONE", Vector2i(1, 1)); + _VariantCall::add_variant_constant(Variant::VECTOR2I, "LEFT", Vector2i(-1, 0)); + _VariantCall::add_variant_constant(Variant::VECTOR2I, "RIGHT", Vector2i(1, 0)); + _VariantCall::add_variant_constant(Variant::VECTOR2I, "UP", Vector2i(0, -1)); + _VariantCall::add_variant_constant(Variant::VECTOR2I, "DOWN", Vector2i(0, 1)); + _VariantCall::add_variant_constant(Variant::TRANSFORM2D, "IDENTITY", Transform2D()); _VariantCall::add_variant_constant(Variant::TRANSFORM2D, "FLIP_X", Transform2D(-1, 0, 0, 1, 0, 0)); _VariantCall::add_variant_constant(Variant::TRANSFORM2D, "FLIP_Y", Transform2D(1, 0, 0, -1, 0, 0)); diff --git a/core/variant_op.cpp b/core/variant_op.cpp index 6caa224cfe..36d1278929 100644 --- a/core/variant_op.cpp +++ b/core/variant_op.cpp @@ -38,33 +38,41 @@ CASE_TYPE(PREFIX, OP, INT) \ CASE_TYPE_ALL_BUT_INT(PREFIX, OP) -#define CASE_TYPE_ALL_BUT_INT(PREFIX, OP) \ - CASE_TYPE(PREFIX, OP, NIL) \ - CASE_TYPE(PREFIX, OP, BOOL) \ - CASE_TYPE(PREFIX, OP, REAL) \ - CASE_TYPE(PREFIX, OP, STRING) \ - CASE_TYPE(PREFIX, OP, VECTOR2) \ - CASE_TYPE(PREFIX, OP, RECT2) \ - CASE_TYPE(PREFIX, OP, VECTOR3) \ - CASE_TYPE(PREFIX, OP, TRANSFORM2D) \ - CASE_TYPE(PREFIX, OP, PLANE) \ - CASE_TYPE(PREFIX, OP, QUAT) \ - CASE_TYPE(PREFIX, OP, AABB) \ - CASE_TYPE(PREFIX, OP, BASIS) \ - CASE_TYPE(PREFIX, OP, TRANSFORM) \ - CASE_TYPE(PREFIX, OP, COLOR) \ - CASE_TYPE(PREFIX, OP, NODE_PATH) \ - CASE_TYPE(PREFIX, OP, _RID) \ - CASE_TYPE(PREFIX, OP, OBJECT) \ - CASE_TYPE(PREFIX, OP, DICTIONARY) \ - CASE_TYPE(PREFIX, OP, ARRAY) \ - CASE_TYPE(PREFIX, OP, POOL_BYTE_ARRAY) \ - CASE_TYPE(PREFIX, OP, POOL_INT_ARRAY) \ - CASE_TYPE(PREFIX, OP, POOL_REAL_ARRAY) \ - CASE_TYPE(PREFIX, OP, POOL_STRING_ARRAY) \ - CASE_TYPE(PREFIX, OP, POOL_VECTOR2_ARRAY) \ - CASE_TYPE(PREFIX, OP, POOL_VECTOR3_ARRAY) \ - CASE_TYPE(PREFIX, OP, POOL_COLOR_ARRAY) +#define CASE_TYPE_ALL_BUT_INT(PREFIX, OP) \ + CASE_TYPE(PREFIX, OP, NIL) \ + CASE_TYPE(PREFIX, OP, BOOL) \ + CASE_TYPE(PREFIX, OP, FLOAT) \ + CASE_TYPE(PREFIX, OP, STRING) \ + CASE_TYPE(PREFIX, OP, VECTOR2) \ + CASE_TYPE(PREFIX, OP, VECTOR2I) \ + CASE_TYPE(PREFIX, OP, RECT2) \ + CASE_TYPE(PREFIX, OP, RECT2I) \ + CASE_TYPE(PREFIX, OP, VECTOR3) \ + CASE_TYPE(PREFIX, OP, VECTOR3I) \ + CASE_TYPE(PREFIX, OP, TRANSFORM2D) \ + CASE_TYPE(PREFIX, OP, PLANE) \ + CASE_TYPE(PREFIX, OP, QUAT) \ + CASE_TYPE(PREFIX, OP, AABB) \ + CASE_TYPE(PREFIX, OP, BASIS) \ + CASE_TYPE(PREFIX, OP, TRANSFORM) \ + CASE_TYPE(PREFIX, OP, COLOR) \ + CASE_TYPE(PREFIX, OP, STRING_NAME) \ + CASE_TYPE(PREFIX, OP, NODE_PATH) \ + CASE_TYPE(PREFIX, OP, _RID) \ + CASE_TYPE(PREFIX, OP, OBJECT) \ + CASE_TYPE(PREFIX, OP, CALLABLE) \ + CASE_TYPE(PREFIX, OP, SIGNAL) \ + CASE_TYPE(PREFIX, OP, DICTIONARY) \ + CASE_TYPE(PREFIX, OP, ARRAY) \ + CASE_TYPE(PREFIX, OP, PACKED_BYTE_ARRAY) \ + CASE_TYPE(PREFIX, OP, PACKED_INT32_ARRAY) \ + CASE_TYPE(PREFIX, OP, PACKED_INT64_ARRAY) \ + CASE_TYPE(PREFIX, OP, PACKED_FLOAT32_ARRAY) \ + CASE_TYPE(PREFIX, OP, PACKED_FLOAT64_ARRAY) \ + CASE_TYPE(PREFIX, OP, PACKED_STRING_ARRAY) \ + CASE_TYPE(PREFIX, OP, PACKED_VECTOR2_ARRAY) \ + CASE_TYPE(PREFIX, OP, PACKED_VECTOR3_ARRAY) \ + CASE_TYPE(PREFIX, OP, PACKED_COLOR_ARRAY) #ifdef __GNUC__ #define TYPE(PREFIX, OP, TYPE) &&PREFIX##_##OP##_##TYPE @@ -74,11 +82,14 @@ TYPE(PREFIX, OP, NIL), \ TYPE(PREFIX, OP, BOOL), \ TYPE(PREFIX, OP, INT), \ - TYPE(PREFIX, OP, REAL), \ + TYPE(PREFIX, OP, FLOAT), \ TYPE(PREFIX, OP, STRING), \ TYPE(PREFIX, OP, VECTOR2), \ + TYPE(PREFIX, OP, VECTOR2I), \ TYPE(PREFIX, OP, RECT2), \ + TYPE(PREFIX, OP, RECT2I), \ TYPE(PREFIX, OP, VECTOR3), \ + TYPE(PREFIX, OP, VECTOR3I), \ TYPE(PREFIX, OP, TRANSFORM2D), \ TYPE(PREFIX, OP, PLANE), \ TYPE(PREFIX, OP, QUAT), \ @@ -86,47 +97,52 @@ TYPE(PREFIX, OP, BASIS), \ TYPE(PREFIX, OP, TRANSFORM), \ TYPE(PREFIX, OP, COLOR), \ + TYPE(PREFIX, OP, STRING_NAME), \ TYPE(PREFIX, OP, NODE_PATH), \ TYPE(PREFIX, OP, _RID), \ TYPE(PREFIX, OP, OBJECT), \ + TYPE(PREFIX, OP, CALLABLE), \ + TYPE(PREFIX, OP, SIGNAL), \ TYPE(PREFIX, OP, DICTIONARY), \ TYPE(PREFIX, OP, ARRAY), \ - TYPE(PREFIX, OP, POOL_BYTE_ARRAY), \ - TYPE(PREFIX, OP, POOL_INT_ARRAY), \ - TYPE(PREFIX, OP, POOL_REAL_ARRAY), \ - TYPE(PREFIX, OP, POOL_STRING_ARRAY), \ - TYPE(PREFIX, OP, POOL_VECTOR2_ARRAY), \ - TYPE(PREFIX, OP, POOL_VECTOR3_ARRAY), \ - TYPE(PREFIX, OP, POOL_COLOR_ARRAY), \ + TYPE(PREFIX, OP, PACKED_BYTE_ARRAY), \ + TYPE(PREFIX, OP, PACKED_INT32_ARRAY), \ + TYPE(PREFIX, OP, PACKED_INT64_ARRAY), \ + TYPE(PREFIX, OP, PACKED_FLOAT32_ARRAY), \ + TYPE(PREFIX, OP, PACKED_FLOAT64_ARRAY), \ + TYPE(PREFIX, OP, PACKED_STRING_ARRAY), \ + TYPE(PREFIX, OP, PACKED_VECTOR2_ARRAY), \ + TYPE(PREFIX, OP, PACKED_VECTOR3_ARRAY), \ + TYPE(PREFIX, OP, PACKED_COLOR_ARRAY), \ } /* clang-format on */ -#define CASES(PREFIX) static const void *switch_table_##PREFIX[25][27] = { \ - TYPES(PREFIX, OP_EQUAL), \ - TYPES(PREFIX, OP_NOT_EQUAL), \ - TYPES(PREFIX, OP_LESS), \ - TYPES(PREFIX, OP_LESS_EQUAL), \ - TYPES(PREFIX, OP_GREATER), \ - TYPES(PREFIX, OP_GREATER_EQUAL), \ - TYPES(PREFIX, OP_ADD), \ - TYPES(PREFIX, OP_SUBTRACT), \ - TYPES(PREFIX, OP_MULTIPLY), \ - TYPES(PREFIX, OP_DIVIDE), \ - TYPES(PREFIX, OP_NEGATE), \ - TYPES(PREFIX, OP_POSITIVE), \ - TYPES(PREFIX, OP_MODULE), \ - TYPES(PREFIX, OP_STRING_CONCAT), \ - TYPES(PREFIX, OP_SHIFT_LEFT), \ - TYPES(PREFIX, OP_SHIFT_RIGHT), \ - TYPES(PREFIX, OP_BIT_AND), \ - TYPES(PREFIX, OP_BIT_OR), \ - TYPES(PREFIX, OP_BIT_XOR), \ - TYPES(PREFIX, OP_BIT_NEGATE), \ - TYPES(PREFIX, OP_AND), \ - TYPES(PREFIX, OP_OR), \ - TYPES(PREFIX, OP_XOR), \ - TYPES(PREFIX, OP_NOT), \ - TYPES(PREFIX, OP_IN), \ +#define CASES(PREFIX) static const void *switch_table_##PREFIX[25][Variant::VARIANT_MAX] = { \ + TYPES(PREFIX, OP_EQUAL), \ + TYPES(PREFIX, OP_NOT_EQUAL), \ + TYPES(PREFIX, OP_LESS), \ + TYPES(PREFIX, OP_LESS_EQUAL), \ + TYPES(PREFIX, OP_GREATER), \ + TYPES(PREFIX, OP_GREATER_EQUAL), \ + TYPES(PREFIX, OP_ADD), \ + TYPES(PREFIX, OP_SUBTRACT), \ + TYPES(PREFIX, OP_MULTIPLY), \ + TYPES(PREFIX, OP_DIVIDE), \ + TYPES(PREFIX, OP_NEGATE), \ + TYPES(PREFIX, OP_POSITIVE), \ + TYPES(PREFIX, OP_MODULE), \ + TYPES(PREFIX, OP_STRING_CONCAT), \ + TYPES(PREFIX, OP_SHIFT_LEFT), \ + TYPES(PREFIX, OP_SHIFT_RIGHT), \ + TYPES(PREFIX, OP_BIT_AND), \ + TYPES(PREFIX, OP_BIT_OR), \ + TYPES(PREFIX, OP_BIT_XOR), \ + TYPES(PREFIX, OP_BIT_NEGATE), \ + TYPES(PREFIX, OP_AND), \ + TYPES(PREFIX, OP_OR), \ + TYPES(PREFIX, OP_XOR), \ + TYPES(PREFIX, OP_NOT), \ + TYPES(PREFIX, OP_IN), \ } #define SWITCH(PREFIX, op, val) goto *switch_table_##PREFIX[op][val]; @@ -165,21 +181,21 @@ bool Variant::booleanize() const { return; \ } -#define DEFAULT_OP_NUM(m_prefix, m_op_name, m_name, m_op, m_type) \ - CASE_TYPE(m_prefix, m_op_name, m_name) { \ - if (p_b.type == INT) _RETURN(p_a._data.m_type m_op p_b._data._int); \ - if (p_b.type == REAL) _RETURN(p_a._data.m_type m_op p_b._data._real); \ - \ - _RETURN_FAIL \ +#define DEFAULT_OP_NUM(m_prefix, m_op_name, m_name, m_op, m_type) \ + CASE_TYPE(m_prefix, m_op_name, m_name) { \ + if (p_b.type == INT) _RETURN(p_a._data.m_type m_op p_b._data._int); \ + if (p_b.type == FLOAT) _RETURN(p_a._data.m_type m_op p_b._data._float); \ + \ + _RETURN_FAIL \ }; -#define DEFAULT_OP_NUM_NULL(m_prefix, m_op_name, m_name, m_op, m_type) \ - CASE_TYPE(m_prefix, m_op_name, m_name) { \ - if (p_b.type == INT) _RETURN(p_a._data.m_type m_op p_b._data._int); \ - if (p_b.type == REAL) _RETURN(p_a._data.m_type m_op p_b._data._real); \ - if (p_b.type == NIL) _RETURN(!(p_b.type m_op NIL)); \ - \ - _RETURN_FAIL \ +#define DEFAULT_OP_NUM_NULL(m_prefix, m_op_name, m_name, m_op, m_type) \ + CASE_TYPE(m_prefix, m_op_name, m_name) { \ + if (p_b.type == INT) _RETURN(p_a._data.m_type m_op p_b._data._int); \ + if (p_b.type == FLOAT) _RETURN(p_a._data.m_type m_op p_b._data._float); \ + if (p_b.type == NIL) _RETURN(!(p_b.type m_op NIL)); \ + \ + _RETURN_FAIL \ }; #ifdef DEBUG_ENABLED @@ -192,23 +208,23 @@ bool Variant::booleanize() const { } \ _RETURN(p_a._data.m_type / p_b._data._int); \ } \ - if (p_b.type == REAL) { \ - if (p_b._data._real == 0) { \ + if (p_b.type == FLOAT) { \ + if (p_b._data._float == 0) { \ r_valid = false; \ _RETURN("Division By Zero"); \ } \ - _RETURN(p_a._data.m_type / p_b._data._real); \ + _RETURN(p_a._data.m_type / p_b._data._float); \ } \ \ _RETURN_FAIL \ }; #else -#define DEFAULT_OP_NUM_DIV(m_prefix, m_op_name, m_name, m_type) \ - CASE_TYPE(m_prefix, m_op_name, m_name) { \ - if (p_b.type == INT) _RETURN(p_a._data.m_type / p_b._data._int); \ - if (p_b.type == REAL) _RETURN(p_a._data.m_type / p_b._data._real); \ - \ - _RETURN_FAIL \ +#define DEFAULT_OP_NUM_DIV(m_prefix, m_op_name, m_name, m_type) \ + CASE_TYPE(m_prefix, m_op_name, m_name) { \ + if (p_b.type == INT) _RETURN(p_a._data.m_type / p_b._data._int); \ + if (p_b.type == FLOAT) _RETURN(p_a._data.m_type / p_b._data._float); \ + \ + _RETURN_FAIL \ }; #endif @@ -222,33 +238,47 @@ bool Variant::booleanize() const { _RETURN(p_a._data.m_type); \ }; -#define DEFAULT_OP_NUM_VEC(m_prefix, m_op_name, m_name, m_op, m_type) \ - CASE_TYPE(m_prefix, m_op_name, m_name) { \ - if (p_b.type == INT) _RETURN(p_a._data.m_type m_op p_b._data._int); \ - if (p_b.type == REAL) _RETURN(p_a._data.m_type m_op p_b._data._real); \ - if (p_b.type == VECTOR2) _RETURN(p_a._data.m_type m_op *reinterpret_cast<const Vector2 *>(p_b._data._mem)); \ - if (p_b.type == VECTOR3) _RETURN(p_a._data.m_type m_op *reinterpret_cast<const Vector3 *>(p_b._data._mem)); \ - \ - _RETURN_FAIL \ +#define DEFAULT_OP_NUM_VEC(m_prefix, m_op_name, m_name, m_op, m_type) \ + CASE_TYPE(m_prefix, m_op_name, m_name) { \ + if (p_b.type == INT) _RETURN(p_a._data.m_type m_op p_b._data._int); \ + if (p_b.type == FLOAT) _RETURN(p_a._data.m_type m_op p_b._data._float); \ + if (p_b.type == VECTOR2) _RETURN(p_a._data.m_type m_op *reinterpret_cast<const Vector2 *>(p_b._data._mem)); \ + if (p_b.type == VECTOR3) _RETURN(p_a._data.m_type m_op *reinterpret_cast<const Vector3 *>(p_b._data._mem)); \ + if (p_b.type == VECTOR2I) _RETURN(p_a._data.m_type m_op *reinterpret_cast<const Vector2 *>(p_b._data._mem)); \ + if (p_b.type == VECTOR3I) _RETURN(p_a._data.m_type m_op *reinterpret_cast<const Vector3 *>(p_b._data._mem)); \ + \ + _RETURN_FAIL \ }; -#define DEFAULT_OP_STR_REV(m_prefix, m_op_name, m_name, m_op, m_type) \ - CASE_TYPE(m_prefix, m_op_name, m_name) { \ - if (p_b.type == STRING) _RETURN(*reinterpret_cast<const m_type *>(p_b._data._mem) m_op *reinterpret_cast<const String *>(p_a._data._mem)); \ - if (p_b.type == NODE_PATH) _RETURN(*reinterpret_cast<const m_type *>(p_b._data._mem) m_op *reinterpret_cast<const NodePath *>(p_a._data._mem)); \ - \ - _RETURN_FAIL \ +#define DEFAULT_OP_STR_REV(m_prefix, m_op_name, m_name, m_op, m_type) \ + CASE_TYPE(m_prefix, m_op_name, m_name) { \ + if (p_b.type == STRING) _RETURN(*reinterpret_cast<const m_type *>(p_b._data._mem) m_op *reinterpret_cast<const String *>(p_a._data._mem)); \ + if (p_b.type == STRING_NAME) _RETURN(*reinterpret_cast<const m_type *>(p_b._data._mem) m_op *reinterpret_cast<const StringName *>(p_a._data._mem)); \ + if (p_b.type == NODE_PATH) _RETURN(*reinterpret_cast<const m_type *>(p_b._data._mem) m_op *reinterpret_cast<const NodePath *>(p_a._data._mem)); \ + \ + _RETURN_FAIL \ }; -#define DEFAULT_OP_STR(m_prefix, m_op_name, m_name, m_op, m_type) \ - CASE_TYPE(m_prefix, m_op_name, m_name) { \ - if (p_b.type == STRING) _RETURN(*reinterpret_cast<const m_type *>(p_a._data._mem) m_op *reinterpret_cast<const String *>(p_b._data._mem)); \ - if (p_b.type == NODE_PATH) _RETURN(*reinterpret_cast<const m_type *>(p_a._data._mem) m_op *reinterpret_cast<const NodePath *>(p_b._data._mem)); \ - \ - _RETURN_FAIL \ +#define DEFAULT_OP_STR(m_prefix, m_op_name, m_name, m_op, m_type) \ + CASE_TYPE(m_prefix, m_op_name, m_name) { \ + if (p_b.type == STRING) _RETURN(*reinterpret_cast<const m_type *>(p_a._data._mem) m_op *reinterpret_cast<const String *>(p_b._data._mem)); \ + if (p_b.type == STRING_NAME) _RETURN(*reinterpret_cast<const m_type *>(p_a._data._mem) m_op *reinterpret_cast<const StringName *>(p_b._data._mem)); \ + if (p_b.type == NODE_PATH) _RETURN(*reinterpret_cast<const m_type *>(p_a._data._mem) m_op *reinterpret_cast<const NodePath *>(p_b._data._mem)); \ + \ + _RETURN_FAIL \ + }; + +#define DEFAULT_OP_STR_NULL(m_prefix, m_op_name, m_name, m_op, m_type) \ + CASE_TYPE(m_prefix, m_op_name, m_name) { \ + if (p_b.type == STRING) _RETURN(*reinterpret_cast<const m_type *>(p_a._data._mem) m_op *reinterpret_cast<const String *>(p_b._data._mem)); \ + if (p_b.type == STRING_NAME) _RETURN(*reinterpret_cast<const m_type *>(p_a._data._mem) m_op *reinterpret_cast<const StringName *>(p_b._data._mem)); \ + if (p_b.type == NODE_PATH) _RETURN(*reinterpret_cast<const m_type *>(p_a._data._mem) m_op *reinterpret_cast<const NodePath *>(p_b._data._mem)); \ + if (p_b.type == NIL) _RETURN(!(p_b.type m_op NIL)); \ + \ + _RETURN_FAIL \ }; -#define DEFAULT_OP_STR_NULL(m_prefix, m_op_name, m_name, m_op, m_type) \ +#define DEFAULT_OP_STR_NULL_NP(m_prefix, m_op_name, m_name, m_op, m_type) \ CASE_TYPE(m_prefix, m_op_name, m_name) { \ if (p_b.type == STRING) _RETURN(*reinterpret_cast<const m_type *>(p_a._data._mem) m_op *reinterpret_cast<const String *>(p_b._data._mem)); \ if (p_b.type == NODE_PATH) _RETURN(*reinterpret_cast<const m_type *>(p_a._data._mem) m_op *reinterpret_cast<const NodePath *>(p_b._data._mem)); \ @@ -257,6 +287,15 @@ bool Variant::booleanize() const { _RETURN_FAIL \ }; +#define DEFAULT_OP_STR_NULL_SN(m_prefix, m_op_name, m_name, m_op, m_type) \ + CASE_TYPE(m_prefix, m_op_name, m_name) { \ + if (p_b.type == STRING) _RETURN(*reinterpret_cast<const m_type *>(p_a._data._mem) m_op *reinterpret_cast<const String *>(p_b._data._mem)); \ + if (p_b.type == STRING_NAME) _RETURN(*reinterpret_cast<const m_type *>(p_a._data._mem) m_op *reinterpret_cast<const StringName *>(p_b._data._mem)); \ + if (p_b.type == NIL) _RETURN(!(p_b.type m_op NIL)); \ + \ + _RETURN_FAIL \ + }; + #define DEFAULT_OP_LOCALMEM_REV(m_prefix, m_op_name, m_name, m_op, m_type) \ CASE_TYPE(m_prefix, m_op_name, m_name) { \ if (p_b.type == m_name) \ @@ -297,7 +336,7 @@ bool Variant::booleanize() const { CASE_TYPE(m_prefix, m_op_name, m_name) { \ if (p_b.type == m_name) _RETURN(*reinterpret_cast<const m_type *>(p_a._data._mem) m_op *reinterpret_cast<const m_type *>(p_b._data._mem)); \ if (p_b.type == INT) _RETURN(*reinterpret_cast<const m_type *>(p_a._data._mem) m_op p_b._data._int); \ - if (p_b.type == REAL) _RETURN(*reinterpret_cast<const m_type *>(p_a._data._mem) m_op p_b._data._real); \ + if (p_b.type == FLOAT) _RETURN(*reinterpret_cast<const m_type *>(p_a._data._mem) m_op p_b._data._float); \ \ _RETURN_FAIL \ } @@ -357,16 +396,16 @@ bool Variant::booleanize() const { if (p_a.type != p_b.type) \ _RETURN_FAIL \ \ - const PoolVector<m_type> &array_a = *reinterpret_cast<const PoolVector<m_type> *>(p_a._data._mem); \ - const PoolVector<m_type> &array_b = *reinterpret_cast<const PoolVector<m_type> *>(p_b._data._mem); \ + const Vector<m_type> &array_a = PackedArrayRef<m_type>::get_array(p_a._data.packed_array); \ + const Vector<m_type> &array_b = PackedArrayRef<m_type>::get_array(p_b._data.packed_array); \ \ int a_len = array_a.size(); \ if (a_len m_opa array_b.size()) { \ _RETURN(m_ret_s); \ } else { \ \ - PoolVector<m_type>::Read ra = array_a.read(); \ - PoolVector<m_type>::Read rb = array_b.read(); \ + const m_type *ra = array_a.ptr(); \ + const m_type *rb = array_b.ptr(); \ \ for (int i = 0; i < a_len; i++) { \ if (ra[i] m_opb rb[i]) \ @@ -376,16 +415,16 @@ bool Variant::booleanize() const { _RETURN(m_ret_def); \ } -#define DEFAULT_OP_ARRAY_ADD(m_prefix, m_op_name, m_name, m_type) \ - CASE_TYPE(m_prefix, m_op_name, m_name) { \ - if (p_a.type != p_b.type) \ - _RETURN_FAIL; \ - \ - const PoolVector<m_type> &array_a = *reinterpret_cast<const PoolVector<m_type> *>(p_a._data._mem); \ - const PoolVector<m_type> &array_b = *reinterpret_cast<const PoolVector<m_type> *>(p_b._data._mem); \ - PoolVector<m_type> sum = array_a; \ - sum.append_array(array_b); \ - _RETURN(sum); \ +#define DEFAULT_OP_ARRAY_ADD(m_prefix, m_op_name, m_name, m_type) \ + CASE_TYPE(m_prefix, m_op_name, m_name) { \ + if (p_a.type != p_b.type) \ + _RETURN_FAIL; \ + \ + const Vector<m_type> &array_a = PackedArrayRef<m_type>::get_array(p_a._data.packed_array); \ + const Vector<m_type> &array_b = PackedArrayRef<m_type>::get_array(p_b._data.packed_array); \ + Vector<m_type> sum = array_a; \ + sum.append_array(array_b); \ + _RETURN(sum); \ } void Variant::evaluate(const Operator &p_op, const Variant &p_a, @@ -423,6 +462,9 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a, _RETURN_FAIL; } + DEFAULT_OP_LOCALMEM_NULL(math, OP_EQUAL, CALLABLE, ==, Callable); + DEFAULT_OP_LOCALMEM_NULL(math, OP_EQUAL, SIGNAL, ==, Signal); + CASE_TYPE(math, OP_EQUAL, DICTIONARY) { if (p_b.type != DICTIONARY) { if (p_b.type == NIL) @@ -458,28 +500,34 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a, } DEFAULT_OP_NUM_NULL(math, OP_EQUAL, INT, ==, _int); - DEFAULT_OP_NUM_NULL(math, OP_EQUAL, REAL, ==, _real); + DEFAULT_OP_NUM_NULL(math, OP_EQUAL, FLOAT, ==, _float); DEFAULT_OP_STR_NULL(math, OP_EQUAL, STRING, ==, String); DEFAULT_OP_LOCALMEM_NULL(math, OP_EQUAL, VECTOR2, ==, Vector2); + DEFAULT_OP_LOCALMEM_NULL(math, OP_EQUAL, VECTOR2I, ==, Vector2i); DEFAULT_OP_LOCALMEM_NULL(math, OP_EQUAL, RECT2, ==, Rect2); + DEFAULT_OP_LOCALMEM_NULL(math, OP_EQUAL, RECT2I, ==, Rect2i); DEFAULT_OP_PTRREF_NULL(math, OP_EQUAL, TRANSFORM2D, ==, _transform2d); DEFAULT_OP_LOCALMEM_NULL(math, OP_EQUAL, VECTOR3, ==, Vector3); + DEFAULT_OP_LOCALMEM_NULL(math, OP_EQUAL, VECTOR3I, ==, Vector3i); DEFAULT_OP_LOCALMEM_NULL(math, OP_EQUAL, PLANE, ==, Plane); DEFAULT_OP_LOCALMEM_NULL(math, OP_EQUAL, QUAT, ==, Quat); DEFAULT_OP_PTRREF_NULL(math, OP_EQUAL, AABB, ==, _aabb); DEFAULT_OP_PTRREF_NULL(math, OP_EQUAL, BASIS, ==, _basis); DEFAULT_OP_PTRREF_NULL(math, OP_EQUAL, TRANSFORM, ==, _transform); DEFAULT_OP_LOCALMEM_NULL(math, OP_EQUAL, COLOR, ==, Color); - DEFAULT_OP_STR_NULL(math, OP_EQUAL, NODE_PATH, ==, NodePath); + DEFAULT_OP_STR_NULL_SN(math, OP_EQUAL, STRING_NAME, ==, StringName); + DEFAULT_OP_STR_NULL_NP(math, OP_EQUAL, NODE_PATH, ==, NodePath); DEFAULT_OP_LOCALMEM_NULL(math, OP_EQUAL, _RID, ==, RID); - DEFAULT_OP_ARRAY_EQ(math, OP_EQUAL, POOL_BYTE_ARRAY, uint8_t); - DEFAULT_OP_ARRAY_EQ(math, OP_EQUAL, POOL_INT_ARRAY, int); - DEFAULT_OP_ARRAY_EQ(math, OP_EQUAL, POOL_REAL_ARRAY, real_t); - DEFAULT_OP_ARRAY_EQ(math, OP_EQUAL, POOL_STRING_ARRAY, String); - DEFAULT_OP_ARRAY_EQ(math, OP_EQUAL, POOL_VECTOR2_ARRAY, Vector2); - DEFAULT_OP_ARRAY_EQ(math, OP_EQUAL, POOL_VECTOR3_ARRAY, Vector3); - DEFAULT_OP_ARRAY_EQ(math, OP_EQUAL, POOL_COLOR_ARRAY, Color); + DEFAULT_OP_ARRAY_EQ(math, OP_EQUAL, PACKED_BYTE_ARRAY, uint8_t); + DEFAULT_OP_ARRAY_EQ(math, OP_EQUAL, PACKED_INT32_ARRAY, int32_t); + DEFAULT_OP_ARRAY_EQ(math, OP_EQUAL, PACKED_INT64_ARRAY, int64_t); + DEFAULT_OP_ARRAY_EQ(math, OP_EQUAL, PACKED_FLOAT32_ARRAY, float); + DEFAULT_OP_ARRAY_EQ(math, OP_EQUAL, PACKED_FLOAT64_ARRAY, double); + DEFAULT_OP_ARRAY_EQ(math, OP_EQUAL, PACKED_STRING_ARRAY, String); + DEFAULT_OP_ARRAY_EQ(math, OP_EQUAL, PACKED_VECTOR2_ARRAY, Vector2); + DEFAULT_OP_ARRAY_EQ(math, OP_EQUAL, PACKED_VECTOR3_ARRAY, Vector3); + DEFAULT_OP_ARRAY_EQ(math, OP_EQUAL, PACKED_COLOR_ARRAY, Color); } SWITCH_OP(math, OP_NOT_EQUAL, p_a.type) { @@ -511,6 +559,9 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a, _RETURN_FAIL; } + DEFAULT_OP_LOCALMEM_NULL(math, OP_NOT_EQUAL, CALLABLE, !=, Callable); + DEFAULT_OP_LOCALMEM_NULL(math, OP_NOT_EQUAL, SIGNAL, !=, Signal); + CASE_TYPE(math, OP_NOT_EQUAL, DICTIONARY) { if (p_b.type != DICTIONARY) { if (p_b.type == NIL) @@ -548,28 +599,34 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a, } DEFAULT_OP_NUM_NULL(math, OP_NOT_EQUAL, INT, !=, _int); - DEFAULT_OP_NUM_NULL(math, OP_NOT_EQUAL, REAL, !=, _real); + DEFAULT_OP_NUM_NULL(math, OP_NOT_EQUAL, FLOAT, !=, _float); DEFAULT_OP_STR_NULL(math, OP_NOT_EQUAL, STRING, !=, String); DEFAULT_OP_LOCALMEM_NULL(math, OP_NOT_EQUAL, VECTOR2, !=, Vector2); + DEFAULT_OP_LOCALMEM_NULL(math, OP_NOT_EQUAL, VECTOR2I, !=, Vector2i); DEFAULT_OP_LOCALMEM_NULL(math, OP_NOT_EQUAL, RECT2, !=, Rect2); + DEFAULT_OP_LOCALMEM_NULL(math, OP_NOT_EQUAL, RECT2I, !=, Rect2i); DEFAULT_OP_PTRREF_NULL(math, OP_NOT_EQUAL, TRANSFORM2D, !=, _transform2d); DEFAULT_OP_LOCALMEM_NULL(math, OP_NOT_EQUAL, VECTOR3, !=, Vector3); + DEFAULT_OP_LOCALMEM_NULL(math, OP_NOT_EQUAL, VECTOR3I, !=, Vector3i); DEFAULT_OP_LOCALMEM_NULL(math, OP_NOT_EQUAL, PLANE, !=, Plane); DEFAULT_OP_LOCALMEM_NULL(math, OP_NOT_EQUAL, QUAT, !=, Quat); DEFAULT_OP_PTRREF_NULL(math, OP_NOT_EQUAL, AABB, !=, _aabb); DEFAULT_OP_PTRREF_NULL(math, OP_NOT_EQUAL, BASIS, !=, _basis); DEFAULT_OP_PTRREF_NULL(math, OP_NOT_EQUAL, TRANSFORM, !=, _transform); DEFAULT_OP_LOCALMEM_NULL(math, OP_NOT_EQUAL, COLOR, !=, Color); - DEFAULT_OP_STR_NULL(math, OP_NOT_EQUAL, NODE_PATH, !=, NodePath); + DEFAULT_OP_STR_NULL_SN(math, OP_NOT_EQUAL, STRING_NAME, !=, StringName); + DEFAULT_OP_STR_NULL_NP(math, OP_NOT_EQUAL, NODE_PATH, !=, NodePath); DEFAULT_OP_LOCALMEM_NULL(math, OP_NOT_EQUAL, _RID, !=, RID); - DEFAULT_OP_ARRAY_NEQ(math, OP_NOT_EQUAL, POOL_BYTE_ARRAY, uint8_t); - DEFAULT_OP_ARRAY_NEQ(math, OP_NOT_EQUAL, POOL_INT_ARRAY, int); - DEFAULT_OP_ARRAY_NEQ(math, OP_NOT_EQUAL, POOL_REAL_ARRAY, real_t); - DEFAULT_OP_ARRAY_NEQ(math, OP_NOT_EQUAL, POOL_STRING_ARRAY, String); - DEFAULT_OP_ARRAY_NEQ(math, OP_NOT_EQUAL, POOL_VECTOR2_ARRAY, Vector2); - DEFAULT_OP_ARRAY_NEQ(math, OP_NOT_EQUAL, POOL_VECTOR3_ARRAY, Vector3); - DEFAULT_OP_ARRAY_NEQ(math, OP_NOT_EQUAL, POOL_COLOR_ARRAY, Color); + DEFAULT_OP_ARRAY_NEQ(math, OP_NOT_EQUAL, PACKED_BYTE_ARRAY, uint8_t); + DEFAULT_OP_ARRAY_NEQ(math, OP_NOT_EQUAL, PACKED_INT32_ARRAY, int32_t); + DEFAULT_OP_ARRAY_NEQ(math, OP_NOT_EQUAL, PACKED_INT64_ARRAY, int64_t); + DEFAULT_OP_ARRAY_NEQ(math, OP_NOT_EQUAL, PACKED_FLOAT32_ARRAY, float); + DEFAULT_OP_ARRAY_NEQ(math, OP_NOT_EQUAL, PACKED_FLOAT64_ARRAY, double); + DEFAULT_OP_ARRAY_NEQ(math, OP_NOT_EQUAL, PACKED_STRING_ARRAY, String); + DEFAULT_OP_ARRAY_NEQ(math, OP_NOT_EQUAL, PACKED_VECTOR2_ARRAY, Vector2); + DEFAULT_OP_ARRAY_NEQ(math, OP_NOT_EQUAL, PACKED_VECTOR3_ARRAY, Vector3); + DEFAULT_OP_ARRAY_NEQ(math, OP_NOT_EQUAL, PACKED_COLOR_ARRAY, Color); } SWITCH_OP(math, OP_LESS, p_a.type) { @@ -592,6 +649,9 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a, _RETURN((p_a._get_obj().obj < p_b._get_obj().obj)); } + DEFAULT_OP_LOCALMEM_NULL(math, OP_LESS, CALLABLE, <, Callable); + DEFAULT_OP_LOCALMEM_NULL(math, OP_LESS, SIGNAL, <, Signal); + CASE_TYPE(math, OP_LESS, ARRAY) { if (p_b.type != ARRAY) _RETURN_FAIL; @@ -612,21 +672,26 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a, } DEFAULT_OP_NUM(math, OP_LESS, INT, <, _int); - DEFAULT_OP_NUM(math, OP_LESS, REAL, <, _real); + DEFAULT_OP_NUM(math, OP_LESS, FLOAT, <, _float); DEFAULT_OP_STR(math, OP_LESS, STRING, <, String); DEFAULT_OP_LOCALMEM(math, OP_LESS, VECTOR2, <, Vector2); + DEFAULT_OP_LOCALMEM(math, OP_LESS, VECTOR2I, <, Vector2i); DEFAULT_OP_LOCALMEM(math, OP_LESS, VECTOR3, <, Vector3); + DEFAULT_OP_LOCALMEM(math, OP_LESS, VECTOR3I, <, Vector3i); DEFAULT_OP_LOCALMEM(math, OP_LESS, _RID, <, RID); - DEFAULT_OP_ARRAY_LT(math, OP_LESS, POOL_BYTE_ARRAY, uint8_t); - DEFAULT_OP_ARRAY_LT(math, OP_LESS, POOL_INT_ARRAY, int); - DEFAULT_OP_ARRAY_LT(math, OP_LESS, POOL_REAL_ARRAY, real_t); - DEFAULT_OP_ARRAY_LT(math, OP_LESS, POOL_STRING_ARRAY, String); - DEFAULT_OP_ARRAY_LT(math, OP_LESS, POOL_VECTOR2_ARRAY, Vector3); - DEFAULT_OP_ARRAY_LT(math, OP_LESS, POOL_VECTOR3_ARRAY, Vector3); - DEFAULT_OP_ARRAY_LT(math, OP_LESS, POOL_COLOR_ARRAY, Color); + DEFAULT_OP_ARRAY_LT(math, OP_LESS, PACKED_BYTE_ARRAY, uint8_t); + DEFAULT_OP_ARRAY_LT(math, OP_LESS, PACKED_INT32_ARRAY, int32_t); + DEFAULT_OP_ARRAY_LT(math, OP_LESS, PACKED_INT64_ARRAY, int64_t); + DEFAULT_OP_ARRAY_LT(math, OP_LESS, PACKED_FLOAT32_ARRAY, float); + DEFAULT_OP_ARRAY_LT(math, OP_LESS, PACKED_FLOAT64_ARRAY, double); + DEFAULT_OP_ARRAY_LT(math, OP_LESS, PACKED_STRING_ARRAY, String); + DEFAULT_OP_ARRAY_LT(math, OP_LESS, PACKED_VECTOR2_ARRAY, Vector3); + DEFAULT_OP_ARRAY_LT(math, OP_LESS, PACKED_VECTOR3_ARRAY, Vector3); + DEFAULT_OP_ARRAY_LT(math, OP_LESS, PACKED_COLOR_ARRAY, Color); CASE_TYPE(math, OP_LESS, NIL) CASE_TYPE(math, OP_LESS, RECT2) + CASE_TYPE(math, OP_LESS, RECT2I) CASE_TYPE(math, OP_LESS, TRANSFORM2D) CASE_TYPE(math, OP_LESS, PLANE) CASE_TYPE(math, OP_LESS, QUAT) @@ -634,6 +699,7 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a, CASE_TYPE(math, OP_LESS, BASIS) CASE_TYPE(math, OP_LESS, TRANSFORM) CASE_TYPE(math, OP_LESS, COLOR) + CASE_TYPE(math, OP_LESS, STRING_NAME) CASE_TYPE(math, OP_LESS, NODE_PATH) CASE_TYPE(math, OP_LESS, DICTIONARY) _RETURN_FAIL; @@ -647,15 +713,18 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a, } DEFAULT_OP_NUM(math, OP_LESS_EQUAL, INT, <=, _int); - DEFAULT_OP_NUM(math, OP_LESS_EQUAL, REAL, <=, _real); + DEFAULT_OP_NUM(math, OP_LESS_EQUAL, FLOAT, <=, _float); DEFAULT_OP_STR(math, OP_LESS_EQUAL, STRING, <=, String); DEFAULT_OP_LOCALMEM(math, OP_LESS_EQUAL, VECTOR2, <=, Vector2); + DEFAULT_OP_LOCALMEM(math, OP_LESS_EQUAL, VECTOR2I, <=, Vector2i); DEFAULT_OP_LOCALMEM(math, OP_LESS_EQUAL, VECTOR3, <=, Vector3); + DEFAULT_OP_LOCALMEM(math, OP_LESS_EQUAL, VECTOR3I, <=, Vector3i); DEFAULT_OP_LOCALMEM(math, OP_LESS_EQUAL, _RID, <=, RID); CASE_TYPE(math, OP_LESS_EQUAL, NIL) CASE_TYPE(math, OP_LESS_EQUAL, BOOL) CASE_TYPE(math, OP_LESS_EQUAL, RECT2) + CASE_TYPE(math, OP_LESS_EQUAL, RECT2I) CASE_TYPE(math, OP_LESS_EQUAL, TRANSFORM2D) CASE_TYPE(math, OP_LESS_EQUAL, PLANE) CASE_TYPE(math, OP_LESS_EQUAL, QUAT) @@ -663,16 +732,22 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a, CASE_TYPE(math, OP_LESS_EQUAL, BASIS) CASE_TYPE(math, OP_LESS_EQUAL, TRANSFORM) CASE_TYPE(math, OP_LESS_EQUAL, COLOR) + CASE_TYPE(math, OP_LESS_EQUAL, STRING_NAME) CASE_TYPE(math, OP_LESS_EQUAL, NODE_PATH) + CASE_TYPE(math, OP_LESS_EQUAL, CALLABLE) + CASE_TYPE(math, OP_LESS_EQUAL, SIGNAL) + CASE_TYPE(math, OP_LESS_EQUAL, DICTIONARY) CASE_TYPE(math, OP_LESS_EQUAL, ARRAY) - CASE_TYPE(math, OP_LESS_EQUAL, POOL_BYTE_ARRAY); - CASE_TYPE(math, OP_LESS_EQUAL, POOL_INT_ARRAY); - CASE_TYPE(math, OP_LESS_EQUAL, POOL_REAL_ARRAY); - CASE_TYPE(math, OP_LESS_EQUAL, POOL_STRING_ARRAY); - CASE_TYPE(math, OP_LESS_EQUAL, POOL_VECTOR2_ARRAY); - CASE_TYPE(math, OP_LESS_EQUAL, POOL_VECTOR3_ARRAY); - CASE_TYPE(math, OP_LESS_EQUAL, POOL_COLOR_ARRAY); + CASE_TYPE(math, OP_LESS_EQUAL, PACKED_BYTE_ARRAY); + CASE_TYPE(math, OP_LESS_EQUAL, PACKED_INT32_ARRAY); + CASE_TYPE(math, OP_LESS_EQUAL, PACKED_INT64_ARRAY); + CASE_TYPE(math, OP_LESS_EQUAL, PACKED_FLOAT32_ARRAY); + CASE_TYPE(math, OP_LESS_EQUAL, PACKED_FLOAT64_ARRAY); + CASE_TYPE(math, OP_LESS_EQUAL, PACKED_STRING_ARRAY); + CASE_TYPE(math, OP_LESS_EQUAL, PACKED_VECTOR2_ARRAY); + CASE_TYPE(math, OP_LESS_EQUAL, PACKED_VECTOR3_ARRAY); + CASE_TYPE(math, OP_LESS_EQUAL, PACKED_COLOR_ARRAY); _RETURN_FAIL; } @@ -716,21 +791,26 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a, } DEFAULT_OP_NUM(math, OP_GREATER, INT, >, _int); - DEFAULT_OP_NUM(math, OP_GREATER, REAL, >, _real); + DEFAULT_OP_NUM(math, OP_GREATER, FLOAT, >, _float); DEFAULT_OP_STR_REV(math, OP_GREATER, STRING, <, String); DEFAULT_OP_LOCALMEM_REV(math, OP_GREATER, VECTOR2, <, Vector2); + DEFAULT_OP_LOCALMEM_REV(math, OP_GREATER, VECTOR2I, <, Vector2i); DEFAULT_OP_LOCALMEM_REV(math, OP_GREATER, VECTOR3, <, Vector3); + DEFAULT_OP_LOCALMEM_REV(math, OP_GREATER, VECTOR3I, <, Vector3i); DEFAULT_OP_LOCALMEM_REV(math, OP_GREATER, _RID, <, RID); - DEFAULT_OP_ARRAY_GT(math, OP_GREATER, POOL_BYTE_ARRAY, uint8_t); - DEFAULT_OP_ARRAY_GT(math, OP_GREATER, POOL_INT_ARRAY, int); - DEFAULT_OP_ARRAY_GT(math, OP_GREATER, POOL_REAL_ARRAY, real_t); - DEFAULT_OP_ARRAY_GT(math, OP_GREATER, POOL_STRING_ARRAY, String); - DEFAULT_OP_ARRAY_GT(math, OP_GREATER, POOL_VECTOR2_ARRAY, Vector3); - DEFAULT_OP_ARRAY_GT(math, OP_GREATER, POOL_VECTOR3_ARRAY, Vector3); - DEFAULT_OP_ARRAY_GT(math, OP_GREATER, POOL_COLOR_ARRAY, Color); + DEFAULT_OP_ARRAY_GT(math, OP_GREATER, PACKED_BYTE_ARRAY, uint8_t); + DEFAULT_OP_ARRAY_GT(math, OP_GREATER, PACKED_INT32_ARRAY, int32_t); + DEFAULT_OP_ARRAY_GT(math, OP_GREATER, PACKED_INT64_ARRAY, int64_t); + DEFAULT_OP_ARRAY_GT(math, OP_GREATER, PACKED_FLOAT32_ARRAY, float); + DEFAULT_OP_ARRAY_GT(math, OP_GREATER, PACKED_FLOAT64_ARRAY, double); + DEFAULT_OP_ARRAY_GT(math, OP_GREATER, PACKED_STRING_ARRAY, String); + DEFAULT_OP_ARRAY_GT(math, OP_GREATER, PACKED_VECTOR2_ARRAY, Vector3); + DEFAULT_OP_ARRAY_GT(math, OP_GREATER, PACKED_VECTOR3_ARRAY, Vector3); + DEFAULT_OP_ARRAY_GT(math, OP_GREATER, PACKED_COLOR_ARRAY, Color); CASE_TYPE(math, OP_GREATER, NIL) CASE_TYPE(math, OP_GREATER, RECT2) + CASE_TYPE(math, OP_GREATER, RECT2I) CASE_TYPE(math, OP_GREATER, TRANSFORM2D) CASE_TYPE(math, OP_GREATER, PLANE) CASE_TYPE(math, OP_GREATER, QUAT) @@ -738,8 +818,12 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a, CASE_TYPE(math, OP_GREATER, BASIS) CASE_TYPE(math, OP_GREATER, TRANSFORM) CASE_TYPE(math, OP_GREATER, COLOR) + CASE_TYPE(math, OP_GREATER, STRING_NAME) CASE_TYPE(math, OP_GREATER, NODE_PATH) CASE_TYPE(math, OP_GREATER, DICTIONARY) + CASE_TYPE(math, OP_GREATER, CALLABLE) + CASE_TYPE(math, OP_GREATER, SIGNAL) + _RETURN_FAIL; } @@ -751,15 +835,18 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a, } DEFAULT_OP_NUM(math, OP_GREATER_EQUAL, INT, >=, _int); - DEFAULT_OP_NUM(math, OP_GREATER_EQUAL, REAL, >=, _real); + DEFAULT_OP_NUM(math, OP_GREATER_EQUAL, FLOAT, >=, _float); DEFAULT_OP_STR_REV(math, OP_GREATER_EQUAL, STRING, <=, String); DEFAULT_OP_LOCALMEM_REV(math, OP_GREATER_EQUAL, VECTOR2, <=, Vector2); + DEFAULT_OP_LOCALMEM_REV(math, OP_GREATER_EQUAL, VECTOR2I, <=, Vector2i); DEFAULT_OP_LOCALMEM_REV(math, OP_GREATER_EQUAL, VECTOR3, <=, Vector3); + DEFAULT_OP_LOCALMEM_REV(math, OP_GREATER_EQUAL, VECTOR3I, <=, Vector3i); DEFAULT_OP_LOCALMEM_REV(math, OP_GREATER_EQUAL, _RID, <=, RID); CASE_TYPE(math, OP_GREATER_EQUAL, NIL) CASE_TYPE(math, OP_GREATER_EQUAL, BOOL) CASE_TYPE(math, OP_GREATER_EQUAL, RECT2) + CASE_TYPE(math, OP_GREATER_EQUAL, RECT2I) CASE_TYPE(math, OP_GREATER_EQUAL, TRANSFORM2D) CASE_TYPE(math, OP_GREATER_EQUAL, PLANE) CASE_TYPE(math, OP_GREATER_EQUAL, QUAT) @@ -767,16 +854,22 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a, CASE_TYPE(math, OP_GREATER_EQUAL, BASIS) CASE_TYPE(math, OP_GREATER_EQUAL, TRANSFORM) CASE_TYPE(math, OP_GREATER_EQUAL, COLOR) + CASE_TYPE(math, OP_GREATER_EQUAL, STRING_NAME) CASE_TYPE(math, OP_GREATER_EQUAL, NODE_PATH) + CASE_TYPE(math, OP_GREATER_EQUAL, CALLABLE) + CASE_TYPE(math, OP_GREATER_EQUAL, SIGNAL) + CASE_TYPE(math, OP_GREATER_EQUAL, DICTIONARY) CASE_TYPE(math, OP_GREATER_EQUAL, ARRAY) - CASE_TYPE(math, OP_GREATER_EQUAL, POOL_BYTE_ARRAY); - CASE_TYPE(math, OP_GREATER_EQUAL, POOL_INT_ARRAY); - CASE_TYPE(math, OP_GREATER_EQUAL, POOL_REAL_ARRAY); - CASE_TYPE(math, OP_GREATER_EQUAL, POOL_STRING_ARRAY); - CASE_TYPE(math, OP_GREATER_EQUAL, POOL_VECTOR2_ARRAY); - CASE_TYPE(math, OP_GREATER_EQUAL, POOL_VECTOR3_ARRAY); - CASE_TYPE(math, OP_GREATER_EQUAL, POOL_COLOR_ARRAY); + CASE_TYPE(math, OP_GREATER_EQUAL, PACKED_BYTE_ARRAY); + CASE_TYPE(math, OP_GREATER_EQUAL, PACKED_INT32_ARRAY); + CASE_TYPE(math, OP_GREATER_EQUAL, PACKED_INT64_ARRAY); + CASE_TYPE(math, OP_GREATER_EQUAL, PACKED_FLOAT32_ARRAY); + CASE_TYPE(math, OP_GREATER_EQUAL, PACKED_FLOAT64_ARRAY); + CASE_TYPE(math, OP_GREATER_EQUAL, PACKED_STRING_ARRAY); + CASE_TYPE(math, OP_GREATER_EQUAL, PACKED_VECTOR2_ARRAY); + CASE_TYPE(math, OP_GREATER_EQUAL, PACKED_VECTOR3_ARRAY); + CASE_TYPE(math, OP_GREATER_EQUAL, PACKED_COLOR_ARRAY); _RETURN_FAIL; } @@ -799,41 +892,52 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a, } DEFAULT_OP_NUM(math, OP_ADD, INT, +, _int); - DEFAULT_OP_NUM(math, OP_ADD, REAL, +, _real); + DEFAULT_OP_NUM(math, OP_ADD, FLOAT, +, _float); DEFAULT_OP_STR(math, OP_ADD, STRING, +, String); DEFAULT_OP_LOCALMEM(math, OP_ADD, VECTOR2, +, Vector2); + DEFAULT_OP_LOCALMEM(math, OP_ADD, VECTOR2I, +, Vector2i); DEFAULT_OP_LOCALMEM(math, OP_ADD, VECTOR3, +, Vector3); + DEFAULT_OP_LOCALMEM(math, OP_ADD, VECTOR3I, +, Vector3i); DEFAULT_OP_LOCALMEM(math, OP_ADD, QUAT, +, Quat); DEFAULT_OP_LOCALMEM(math, OP_ADD, COLOR, +, Color); - DEFAULT_OP_ARRAY_ADD(math, OP_ADD, POOL_BYTE_ARRAY, uint8_t); - DEFAULT_OP_ARRAY_ADD(math, OP_ADD, POOL_INT_ARRAY, int); - DEFAULT_OP_ARRAY_ADD(math, OP_ADD, POOL_REAL_ARRAY, real_t); - DEFAULT_OP_ARRAY_ADD(math, OP_ADD, POOL_STRING_ARRAY, String); - DEFAULT_OP_ARRAY_ADD(math, OP_ADD, POOL_VECTOR2_ARRAY, Vector2); - DEFAULT_OP_ARRAY_ADD(math, OP_ADD, POOL_VECTOR3_ARRAY, Vector3); - DEFAULT_OP_ARRAY_ADD(math, OP_ADD, POOL_COLOR_ARRAY, Color); + DEFAULT_OP_ARRAY_ADD(math, OP_ADD, PACKED_BYTE_ARRAY, uint8_t); + DEFAULT_OP_ARRAY_ADD(math, OP_ADD, PACKED_INT32_ARRAY, int32_t); + DEFAULT_OP_ARRAY_ADD(math, OP_ADD, PACKED_INT64_ARRAY, int64_t); + DEFAULT_OP_ARRAY_ADD(math, OP_ADD, PACKED_FLOAT32_ARRAY, float); + DEFAULT_OP_ARRAY_ADD(math, OP_ADD, PACKED_FLOAT64_ARRAY, double); + DEFAULT_OP_ARRAY_ADD(math, OP_ADD, PACKED_STRING_ARRAY, String); + DEFAULT_OP_ARRAY_ADD(math, OP_ADD, PACKED_VECTOR2_ARRAY, Vector2); + DEFAULT_OP_ARRAY_ADD(math, OP_ADD, PACKED_VECTOR3_ARRAY, Vector3); + DEFAULT_OP_ARRAY_ADD(math, OP_ADD, PACKED_COLOR_ARRAY, Color); CASE_TYPE(math, OP_ADD, NIL) CASE_TYPE(math, OP_ADD, BOOL) CASE_TYPE(math, OP_ADD, RECT2) + CASE_TYPE(math, OP_ADD, RECT2I) CASE_TYPE(math, OP_ADD, TRANSFORM2D) CASE_TYPE(math, OP_ADD, PLANE) CASE_TYPE(math, OP_ADD, AABB) CASE_TYPE(math, OP_ADD, BASIS) CASE_TYPE(math, OP_ADD, TRANSFORM) + CASE_TYPE(math, OP_ADD, STRING_NAME) CASE_TYPE(math, OP_ADD, NODE_PATH) CASE_TYPE(math, OP_ADD, _RID) CASE_TYPE(math, OP_ADD, OBJECT) + CASE_TYPE(math, OP_ADD, CALLABLE) + CASE_TYPE(math, OP_ADD, SIGNAL) + CASE_TYPE(math, OP_ADD, DICTIONARY) _RETURN_FAIL; } SWITCH_OP(math, OP_SUBTRACT, p_a.type) { DEFAULT_OP_NUM(math, OP_SUBTRACT, INT, -, _int); - DEFAULT_OP_NUM(math, OP_SUBTRACT, REAL, -, _real); + DEFAULT_OP_NUM(math, OP_SUBTRACT, FLOAT, -, _float); DEFAULT_OP_LOCALMEM(math, OP_SUBTRACT, VECTOR2, -, Vector2); + DEFAULT_OP_LOCALMEM(math, OP_SUBTRACT, VECTOR2I, -, Vector2i); DEFAULT_OP_LOCALMEM(math, OP_SUBTRACT, VECTOR3, -, Vector3); + DEFAULT_OP_LOCALMEM(math, OP_SUBTRACT, VECTOR3I, -, Vector3i); DEFAULT_OP_LOCALMEM(math, OP_SUBTRACT, QUAT, -, Quat); DEFAULT_OP_LOCALMEM(math, OP_SUBTRACT, COLOR, -, Color); @@ -841,23 +945,30 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a, CASE_TYPE(math, OP_SUBTRACT, BOOL) CASE_TYPE(math, OP_SUBTRACT, STRING) CASE_TYPE(math, OP_SUBTRACT, RECT2) + CASE_TYPE(math, OP_SUBTRACT, RECT2I) CASE_TYPE(math, OP_SUBTRACT, TRANSFORM2D) CASE_TYPE(math, OP_SUBTRACT, PLANE) CASE_TYPE(math, OP_SUBTRACT, AABB) CASE_TYPE(math, OP_SUBTRACT, BASIS) CASE_TYPE(math, OP_SUBTRACT, TRANSFORM) + CASE_TYPE(math, OP_SUBTRACT, STRING_NAME) CASE_TYPE(math, OP_SUBTRACT, NODE_PATH) CASE_TYPE(math, OP_SUBTRACT, _RID) CASE_TYPE(math, OP_SUBTRACT, OBJECT) + CASE_TYPE(math, OP_SUBTRACT, CALLABLE) + CASE_TYPE(math, OP_SUBTRACT, SIGNAL) + CASE_TYPE(math, OP_SUBTRACT, DICTIONARY) CASE_TYPE(math, OP_SUBTRACT, ARRAY) - CASE_TYPE(math, OP_SUBTRACT, POOL_BYTE_ARRAY); - CASE_TYPE(math, OP_SUBTRACT, POOL_INT_ARRAY); - CASE_TYPE(math, OP_SUBTRACT, POOL_REAL_ARRAY); - CASE_TYPE(math, OP_SUBTRACT, POOL_STRING_ARRAY); - CASE_TYPE(math, OP_SUBTRACT, POOL_VECTOR2_ARRAY); - CASE_TYPE(math, OP_SUBTRACT, POOL_VECTOR3_ARRAY); - CASE_TYPE(math, OP_SUBTRACT, POOL_COLOR_ARRAY); + CASE_TYPE(math, OP_SUBTRACT, PACKED_BYTE_ARRAY); + CASE_TYPE(math, OP_SUBTRACT, PACKED_INT32_ARRAY); + CASE_TYPE(math, OP_SUBTRACT, PACKED_INT64_ARRAY); + CASE_TYPE(math, OP_SUBTRACT, PACKED_FLOAT32_ARRAY); + CASE_TYPE(math, OP_SUBTRACT, PACKED_FLOAT64_ARRAY); + CASE_TYPE(math, OP_SUBTRACT, PACKED_STRING_ARRAY); + CASE_TYPE(math, OP_SUBTRACT, PACKED_VECTOR2_ARRAY); + CASE_TYPE(math, OP_SUBTRACT, PACKED_VECTOR3_ARRAY); + CASE_TYPE(math, OP_SUBTRACT, PACKED_COLOR_ARRAY); _RETURN_FAIL; } @@ -882,8 +993,8 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a, case QUAT: { _RETURN(*reinterpret_cast<const Quat *>(p_a._data._mem) * *reinterpret_cast<const Quat *>(p_b._data._mem)); } - case REAL: { - _RETURN(*reinterpret_cast<const Quat *>(p_a._data._mem) * p_b._data._real); + case FLOAT: { + _RETURN(*reinterpret_cast<const Quat *>(p_a._data._mem) * p_b._data._float); } default: _RETURN_FAIL; } @@ -914,113 +1025,142 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a, } DEFAULT_OP_NUM_VEC(math, OP_MULTIPLY, INT, *, _int); - DEFAULT_OP_NUM_VEC(math, OP_MULTIPLY, REAL, *, _real); + DEFAULT_OP_NUM_VEC(math, OP_MULTIPLY, FLOAT, *, _float); DEFAULT_OP_LOCALMEM_NUM(math, OP_MULTIPLY, VECTOR2, *, Vector2); + DEFAULT_OP_LOCALMEM_NUM(math, OP_MULTIPLY, VECTOR2I, *, Vector2i); DEFAULT_OP_LOCALMEM_NUM(math, OP_MULTIPLY, VECTOR3, *, Vector3); + DEFAULT_OP_LOCALMEM_NUM(math, OP_MULTIPLY, VECTOR3I, *, Vector3i); DEFAULT_OP_LOCALMEM_NUM(math, OP_MULTIPLY, COLOR, *, Color); CASE_TYPE(math, OP_MULTIPLY, NIL) CASE_TYPE(math, OP_MULTIPLY, BOOL) CASE_TYPE(math, OP_MULTIPLY, STRING) CASE_TYPE(math, OP_MULTIPLY, RECT2) + CASE_TYPE(math, OP_MULTIPLY, RECT2I) CASE_TYPE(math, OP_MULTIPLY, PLANE) CASE_TYPE(math, OP_MULTIPLY, AABB) + CASE_TYPE(math, OP_MULTIPLY, STRING_NAME) CASE_TYPE(math, OP_MULTIPLY, NODE_PATH) CASE_TYPE(math, OP_MULTIPLY, _RID) CASE_TYPE(math, OP_MULTIPLY, OBJECT) + CASE_TYPE(math, OP_MULTIPLY, CALLABLE) + CASE_TYPE(math, OP_MULTIPLY, SIGNAL) + CASE_TYPE(math, OP_MULTIPLY, DICTIONARY) CASE_TYPE(math, OP_MULTIPLY, ARRAY) - CASE_TYPE(math, OP_MULTIPLY, POOL_BYTE_ARRAY); - CASE_TYPE(math, OP_MULTIPLY, POOL_INT_ARRAY); - CASE_TYPE(math, OP_MULTIPLY, POOL_REAL_ARRAY); - CASE_TYPE(math, OP_MULTIPLY, POOL_STRING_ARRAY); - CASE_TYPE(math, OP_MULTIPLY, POOL_VECTOR2_ARRAY); - CASE_TYPE(math, OP_MULTIPLY, POOL_VECTOR3_ARRAY); - CASE_TYPE(math, OP_MULTIPLY, POOL_COLOR_ARRAY); + CASE_TYPE(math, OP_MULTIPLY, PACKED_BYTE_ARRAY); + CASE_TYPE(math, OP_MULTIPLY, PACKED_INT32_ARRAY); + CASE_TYPE(math, OP_MULTIPLY, PACKED_INT64_ARRAY); + CASE_TYPE(math, OP_MULTIPLY, PACKED_FLOAT32_ARRAY); + CASE_TYPE(math, OP_MULTIPLY, PACKED_FLOAT64_ARRAY); + CASE_TYPE(math, OP_MULTIPLY, PACKED_STRING_ARRAY); + CASE_TYPE(math, OP_MULTIPLY, PACKED_VECTOR2_ARRAY); + CASE_TYPE(math, OP_MULTIPLY, PACKED_VECTOR3_ARRAY); + CASE_TYPE(math, OP_MULTIPLY, PACKED_COLOR_ARRAY); _RETURN_FAIL; } SWITCH_OP(math, OP_DIVIDE, p_a.type) { CASE_TYPE(math, OP_DIVIDE, QUAT) { - if (p_b.type != REAL) + if (p_b.type != FLOAT) _RETURN_FAIL; #ifdef DEBUG_ENABLED - if (p_b._data._real == 0) { + if (p_b._data._float == 0) { r_valid = false; _RETURN("Division By Zero"); } #endif - _RETURN(*reinterpret_cast<const Quat *>(p_a._data._mem) / p_b._data._real); + _RETURN(*reinterpret_cast<const Quat *>(p_a._data._mem) / p_b._data._float); } DEFAULT_OP_NUM_DIV(math, OP_DIVIDE, INT, _int); - DEFAULT_OP_NUM_DIV(math, OP_DIVIDE, REAL, _real); + DEFAULT_OP_NUM_DIV(math, OP_DIVIDE, FLOAT, _float); DEFAULT_OP_LOCALMEM_NUM(math, OP_DIVIDE, VECTOR2, /, Vector2); + DEFAULT_OP_LOCALMEM_NUM(math, OP_DIVIDE, VECTOR2I, /, Vector2i); DEFAULT_OP_LOCALMEM_NUM(math, OP_DIVIDE, VECTOR3, /, Vector3); + DEFAULT_OP_LOCALMEM_NUM(math, OP_DIVIDE, VECTOR3I, /, Vector3i); DEFAULT_OP_LOCALMEM_NUM(math, OP_DIVIDE, COLOR, /, Color); CASE_TYPE(math, OP_DIVIDE, NIL) CASE_TYPE(math, OP_DIVIDE, BOOL) CASE_TYPE(math, OP_DIVIDE, STRING) CASE_TYPE(math, OP_DIVIDE, RECT2) + CASE_TYPE(math, OP_DIVIDE, RECT2I) CASE_TYPE(math, OP_DIVIDE, TRANSFORM2D) CASE_TYPE(math, OP_DIVIDE, PLANE) CASE_TYPE(math, OP_DIVIDE, AABB) CASE_TYPE(math, OP_DIVIDE, BASIS) CASE_TYPE(math, OP_DIVIDE, TRANSFORM) + CASE_TYPE(math, OP_DIVIDE, STRING_NAME) CASE_TYPE(math, OP_DIVIDE, NODE_PATH) CASE_TYPE(math, OP_DIVIDE, _RID) CASE_TYPE(math, OP_DIVIDE, OBJECT) + CASE_TYPE(math, OP_DIVIDE, CALLABLE) + CASE_TYPE(math, OP_DIVIDE, SIGNAL) + CASE_TYPE(math, OP_DIVIDE, DICTIONARY) CASE_TYPE(math, OP_DIVIDE, ARRAY) - CASE_TYPE(math, OP_DIVIDE, POOL_BYTE_ARRAY); - CASE_TYPE(math, OP_DIVIDE, POOL_INT_ARRAY); - CASE_TYPE(math, OP_DIVIDE, POOL_REAL_ARRAY); - CASE_TYPE(math, OP_DIVIDE, POOL_STRING_ARRAY); - CASE_TYPE(math, OP_DIVIDE, POOL_VECTOR2_ARRAY); - CASE_TYPE(math, OP_DIVIDE, POOL_VECTOR3_ARRAY); - CASE_TYPE(math, OP_DIVIDE, POOL_COLOR_ARRAY); + CASE_TYPE(math, OP_DIVIDE, PACKED_BYTE_ARRAY); + CASE_TYPE(math, OP_DIVIDE, PACKED_INT32_ARRAY); + CASE_TYPE(math, OP_DIVIDE, PACKED_INT64_ARRAY); + CASE_TYPE(math, OP_DIVIDE, PACKED_FLOAT32_ARRAY); + CASE_TYPE(math, OP_DIVIDE, PACKED_FLOAT64_ARRAY); + CASE_TYPE(math, OP_DIVIDE, PACKED_STRING_ARRAY); + CASE_TYPE(math, OP_DIVIDE, PACKED_VECTOR2_ARRAY); + CASE_TYPE(math, OP_DIVIDE, PACKED_VECTOR3_ARRAY); + CASE_TYPE(math, OP_DIVIDE, PACKED_COLOR_ARRAY); _RETURN_FAIL; } SWITCH_OP(math, OP_POSITIVE, p_a.type) { DEFAULT_OP_NUM_POS(math, OP_POSITIVE, INT, _int); - DEFAULT_OP_NUM_POS(math, OP_POSITIVE, REAL, _real); + DEFAULT_OP_NUM_POS(math, OP_POSITIVE, FLOAT, _float); DEFAULT_OP_LOCALMEM_POS(math, OP_POSITIVE, VECTOR3, Vector3); + DEFAULT_OP_LOCALMEM_POS(math, OP_POSITIVE, VECTOR3I, Vector3i); DEFAULT_OP_LOCALMEM_POS(math, OP_POSITIVE, PLANE, Plane); DEFAULT_OP_LOCALMEM_POS(math, OP_POSITIVE, QUAT, Quat); DEFAULT_OP_LOCALMEM_POS(math, OP_POSITIVE, VECTOR2, Vector2); + DEFAULT_OP_LOCALMEM_POS(math, OP_POSITIVE, VECTOR2I, Vector2i); CASE_TYPE(math, OP_POSITIVE, NIL) CASE_TYPE(math, OP_POSITIVE, BOOL) CASE_TYPE(math, OP_POSITIVE, STRING) CASE_TYPE(math, OP_POSITIVE, RECT2) + CASE_TYPE(math, OP_POSITIVE, RECT2I) CASE_TYPE(math, OP_POSITIVE, TRANSFORM2D) CASE_TYPE(math, OP_POSITIVE, AABB) CASE_TYPE(math, OP_POSITIVE, BASIS) CASE_TYPE(math, OP_POSITIVE, TRANSFORM) CASE_TYPE(math, OP_POSITIVE, COLOR) + CASE_TYPE(math, OP_POSITIVE, STRING_NAME) CASE_TYPE(math, OP_POSITIVE, NODE_PATH) CASE_TYPE(math, OP_POSITIVE, _RID) CASE_TYPE(math, OP_POSITIVE, OBJECT) + CASE_TYPE(math, OP_POSITIVE, CALLABLE) + CASE_TYPE(math, OP_POSITIVE, SIGNAL) + CASE_TYPE(math, OP_POSITIVE, DICTIONARY) CASE_TYPE(math, OP_POSITIVE, ARRAY) - CASE_TYPE(math, OP_POSITIVE, POOL_BYTE_ARRAY) - CASE_TYPE(math, OP_POSITIVE, POOL_INT_ARRAY) - CASE_TYPE(math, OP_POSITIVE, POOL_REAL_ARRAY) - CASE_TYPE(math, OP_POSITIVE, POOL_STRING_ARRAY) - CASE_TYPE(math, OP_POSITIVE, POOL_VECTOR2_ARRAY) - CASE_TYPE(math, OP_POSITIVE, POOL_VECTOR3_ARRAY) - CASE_TYPE(math, OP_POSITIVE, POOL_COLOR_ARRAY) + CASE_TYPE(math, OP_POSITIVE, PACKED_BYTE_ARRAY) + CASE_TYPE(math, OP_POSITIVE, PACKED_INT32_ARRAY) + CASE_TYPE(math, OP_POSITIVE, PACKED_INT64_ARRAY) + CASE_TYPE(math, OP_POSITIVE, PACKED_FLOAT32_ARRAY) + CASE_TYPE(math, OP_POSITIVE, PACKED_FLOAT64_ARRAY) + CASE_TYPE(math, OP_POSITIVE, PACKED_STRING_ARRAY) + CASE_TYPE(math, OP_POSITIVE, PACKED_VECTOR2_ARRAY) + CASE_TYPE(math, OP_POSITIVE, PACKED_VECTOR3_ARRAY) + CASE_TYPE(math, OP_POSITIVE, PACKED_COLOR_ARRAY) _RETURN_FAIL; } SWITCH_OP(math, OP_NEGATE, p_a.type) { DEFAULT_OP_NUM_NEG(math, OP_NEGATE, INT, _int); - DEFAULT_OP_NUM_NEG(math, OP_NEGATE, REAL, _real); + DEFAULT_OP_NUM_NEG(math, OP_NEGATE, FLOAT, _float); DEFAULT_OP_LOCALMEM_NEG(math, OP_NEGATE, VECTOR2, Vector2); + DEFAULT_OP_LOCALMEM_NEG(math, OP_NEGATE, VECTOR2I, Vector2i); DEFAULT_OP_LOCALMEM_NEG(math, OP_NEGATE, VECTOR3, Vector3); + DEFAULT_OP_LOCALMEM_NEG(math, OP_NEGATE, VECTOR3I, Vector3i); DEFAULT_OP_LOCALMEM_NEG(math, OP_NEGATE, PLANE, Plane); DEFAULT_OP_LOCALMEM_NEG(math, OP_NEGATE, QUAT, Quat); DEFAULT_OP_LOCALMEM_NEG(math, OP_NEGATE, COLOR, Color); @@ -1029,22 +1169,29 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a, CASE_TYPE(math, OP_NEGATE, BOOL) CASE_TYPE(math, OP_NEGATE, STRING) CASE_TYPE(math, OP_NEGATE, RECT2) + CASE_TYPE(math, OP_NEGATE, RECT2I) CASE_TYPE(math, OP_NEGATE, TRANSFORM2D) CASE_TYPE(math, OP_NEGATE, AABB) CASE_TYPE(math, OP_NEGATE, BASIS) CASE_TYPE(math, OP_NEGATE, TRANSFORM) + CASE_TYPE(math, OP_NEGATE, STRING_NAME) CASE_TYPE(math, OP_NEGATE, NODE_PATH) CASE_TYPE(math, OP_NEGATE, _RID) CASE_TYPE(math, OP_NEGATE, OBJECT) + CASE_TYPE(math, OP_NEGATE, CALLABLE) + CASE_TYPE(math, OP_NEGATE, SIGNAL) + CASE_TYPE(math, OP_NEGATE, DICTIONARY) CASE_TYPE(math, OP_NEGATE, ARRAY) - CASE_TYPE(math, OP_NEGATE, POOL_BYTE_ARRAY) - CASE_TYPE(math, OP_NEGATE, POOL_INT_ARRAY) - CASE_TYPE(math, OP_NEGATE, POOL_REAL_ARRAY) - CASE_TYPE(math, OP_NEGATE, POOL_STRING_ARRAY) - CASE_TYPE(math, OP_NEGATE, POOL_VECTOR2_ARRAY) - CASE_TYPE(math, OP_NEGATE, POOL_VECTOR3_ARRAY) - CASE_TYPE(math, OP_NEGATE, POOL_COLOR_ARRAY) + CASE_TYPE(math, OP_NEGATE, PACKED_BYTE_ARRAY) + CASE_TYPE(math, OP_NEGATE, PACKED_INT32_ARRAY) + CASE_TYPE(math, OP_NEGATE, PACKED_INT64_ARRAY) + CASE_TYPE(math, OP_NEGATE, PACKED_FLOAT32_ARRAY) + CASE_TYPE(math, OP_NEGATE, PACKED_FLOAT64_ARRAY) + CASE_TYPE(math, OP_NEGATE, PACKED_STRING_ARRAY) + CASE_TYPE(math, OP_NEGATE, PACKED_VECTOR2_ARRAY) + CASE_TYPE(math, OP_NEGATE, PACKED_VECTOR3_ARRAY) + CASE_TYPE(math, OP_NEGATE, PACKED_COLOR_ARRAY) _RETURN_FAIL; } @@ -1082,10 +1229,13 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a, CASE_TYPE(math, OP_MODULE, NIL) CASE_TYPE(math, OP_MODULE, BOOL) - CASE_TYPE(math, OP_MODULE, REAL) + CASE_TYPE(math, OP_MODULE, FLOAT) CASE_TYPE(math, OP_MODULE, VECTOR2) + CASE_TYPE(math, OP_MODULE, VECTOR2I) CASE_TYPE(math, OP_MODULE, RECT2) + CASE_TYPE(math, OP_MODULE, RECT2I) CASE_TYPE(math, OP_MODULE, VECTOR3) + CASE_TYPE(math, OP_MODULE, VECTOR3I) CASE_TYPE(math, OP_MODULE, TRANSFORM2D) CASE_TYPE(math, OP_MODULE, PLANE) CASE_TYPE(math, OP_MODULE, QUAT) @@ -1093,18 +1243,24 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a, CASE_TYPE(math, OP_MODULE, BASIS) CASE_TYPE(math, OP_MODULE, TRANSFORM) CASE_TYPE(math, OP_MODULE, COLOR) + CASE_TYPE(math, OP_MODULE, STRING_NAME) CASE_TYPE(math, OP_MODULE, NODE_PATH) CASE_TYPE(math, OP_MODULE, _RID) CASE_TYPE(math, OP_MODULE, OBJECT) + CASE_TYPE(math, OP_MODULE, CALLABLE) + CASE_TYPE(math, OP_MODULE, SIGNAL) + CASE_TYPE(math, OP_MODULE, DICTIONARY) CASE_TYPE(math, OP_MODULE, ARRAY) - CASE_TYPE(math, OP_MODULE, POOL_BYTE_ARRAY) - CASE_TYPE(math, OP_MODULE, POOL_INT_ARRAY) - CASE_TYPE(math, OP_MODULE, POOL_REAL_ARRAY) - CASE_TYPE(math, OP_MODULE, POOL_STRING_ARRAY) - CASE_TYPE(math, OP_MODULE, POOL_VECTOR2_ARRAY) - CASE_TYPE(math, OP_MODULE, POOL_VECTOR3_ARRAY) - CASE_TYPE(math, OP_MODULE, POOL_COLOR_ARRAY) + CASE_TYPE(math, OP_MODULE, PACKED_BYTE_ARRAY) + CASE_TYPE(math, OP_MODULE, PACKED_INT32_ARRAY) + CASE_TYPE(math, OP_MODULE, PACKED_INT64_ARRAY) + CASE_TYPE(math, OP_MODULE, PACKED_FLOAT32_ARRAY) + CASE_TYPE(math, OP_MODULE, PACKED_FLOAT64_ARRAY) + CASE_TYPE(math, OP_MODULE, PACKED_STRING_ARRAY) + CASE_TYPE(math, OP_MODULE, PACKED_VECTOR2_ARRAY) + CASE_TYPE(math, OP_MODULE, PACKED_VECTOR3_ARRAY) + CASE_TYPE(math, OP_MODULE, PACKED_COLOR_ARRAY) _RETURN_FAIL; } @@ -1237,13 +1393,35 @@ void Variant::set_named(const StringName &p_index, const Variant &p_value, bool v->y = p_value._data._int; valid = true; } - } else if (p_value.type == Variant::REAL) { + } else if (p_value.type == Variant::FLOAT) { Vector2 *v = reinterpret_cast<Vector2 *>(_data._mem); if (p_index == CoreStringNames::singleton->x) { - v->x = p_value._data._real; + v->x = p_value._data._float; + valid = true; + } else if (p_index == CoreStringNames::singleton->y) { + v->y = p_value._data._float; + valid = true; + } + } + + } break; + case VECTOR2I: { + if (p_value.type == Variant::INT) { + Vector2i *v = reinterpret_cast<Vector2i *>(_data._mem); + if (p_index == CoreStringNames::singleton->x) { + v->x = p_value._data._int; + valid = true; + } else if (p_index == CoreStringNames::singleton->y) { + v->y = p_value._data._int; + valid = true; + } + } else if (p_value.type == Variant::FLOAT) { + Vector2i *v = reinterpret_cast<Vector2i *>(_data._mem); + if (p_index == CoreStringNames::singleton->x) { + v->x = p_value._data._float; valid = true; } else if (p_index == CoreStringNames::singleton->y) { - v->y = p_value._data._real; + v->y = p_value._data._float; valid = true; } } @@ -1266,6 +1444,23 @@ void Variant::set_named(const StringName &p_index, const Variant &p_value, bool } } } break; + case RECT2I: { + + if (p_value.type == Variant::VECTOR2I) { + Rect2i *v = reinterpret_cast<Rect2i *>(_data._mem); + //scalar name + if (p_index == CoreStringNames::singleton->position) { + v->position = *reinterpret_cast<const Vector2i *>(p_value._data._mem); + valid = true; + } else if (p_index == CoreStringNames::singleton->size) { + v->size = *reinterpret_cast<const Vector2i *>(p_value._data._mem); + valid = true; + } else if (p_index == CoreStringNames::singleton->end) { + v->size = *reinterpret_cast<const Vector2i *>(p_value._data._mem) - v->position; + valid = true; + } + } + } break; case TRANSFORM2D: { if (p_value.type == Variant::VECTOR2) { @@ -1297,16 +1492,45 @@ void Variant::set_named(const StringName &p_index, const Variant &p_value, bool v->z = p_value._data._int; valid = true; } - } else if (p_value.type == Variant::REAL) { + } else if (p_value.type == Variant::FLOAT) { Vector3 *v = reinterpret_cast<Vector3 *>(_data._mem); if (p_index == CoreStringNames::singleton->x) { - v->x = p_value._data._real; + v->x = p_value._data._float; valid = true; } else if (p_index == CoreStringNames::singleton->y) { - v->y = p_value._data._real; + v->y = p_value._data._float; valid = true; } else if (p_index == CoreStringNames::singleton->z) { - v->z = p_value._data._real; + v->z = p_value._data._float; + valid = true; + } + } + + } break; + case VECTOR3I: { + + if (p_value.type == Variant::INT) { + Vector3i *v = reinterpret_cast<Vector3i *>(_data._mem); + if (p_index == CoreStringNames::singleton->x) { + v->x = p_value._data._int; + valid = true; + } else if (p_index == CoreStringNames::singleton->y) { + v->y = p_value._data._int; + valid = true; + } else if (p_index == CoreStringNames::singleton->z) { + v->z = p_value._data._int; + valid = true; + } + } else if (p_value.type == Variant::FLOAT) { + Vector3i *v = reinterpret_cast<Vector3i *>(_data._mem); + if (p_index == CoreStringNames::singleton->x) { + v->x = p_value._data._float; + valid = true; + } else if (p_index == CoreStringNames::singleton->y) { + v->y = p_value._data._float; + valid = true; + } else if (p_index == CoreStringNames::singleton->z) { + v->z = p_value._data._float; valid = true; } } @@ -1329,19 +1553,19 @@ void Variant::set_named(const StringName &p_index, const Variant &p_value, bool v->d = p_value._data._int; valid = true; } - } else if (p_value.type == Variant::REAL) { + } else if (p_value.type == Variant::FLOAT) { Plane *v = reinterpret_cast<Plane *>(_data._mem); if (p_index == CoreStringNames::singleton->x) { - v->normal.x = p_value._data._real; + v->normal.x = p_value._data._float; valid = true; } else if (p_index == CoreStringNames::singleton->y) { - v->normal.y = p_value._data._real; + v->normal.y = p_value._data._float; valid = true; } else if (p_index == CoreStringNames::singleton->z) { - v->normal.z = p_value._data._real; + v->normal.z = p_value._data._float; valid = true; } else if (p_index == CoreStringNames::singleton->d) { - v->d = p_value._data._real; + v->d = p_value._data._float; valid = true; } @@ -1371,24 +1595,24 @@ void Variant::set_named(const StringName &p_index, const Variant &p_value, bool v->w = p_value._data._int; valid = true; } - } else if (p_value.type == Variant::REAL) { + } else if (p_value.type == Variant::FLOAT) { Quat *v = reinterpret_cast<Quat *>(_data._mem); if (p_index == CoreStringNames::singleton->x) { - v->x = p_value._data._real; + v->x = p_value._data._float; valid = true; } else if (p_index == CoreStringNames::singleton->y) { - v->y = p_value._data._real; + v->y = p_value._data._float; valid = true; } else if (p_index == CoreStringNames::singleton->z) { - v->z = p_value._data._real; + v->z = p_value._data._float; valid = true; } else if (p_index == CoreStringNames::singleton->w) { - v->w = p_value._data._real; + v->w = p_value._data._float; valid = true; } } - } break; // 10 + } break; case AABB: { if (p_value.type == Variant::VECTOR3) { @@ -1472,40 +1696,40 @@ void Variant::set_named(const StringName &p_index, const Variant &p_value, bool v->set_hsv(v->get_h(), v->get_v(), p_value._data._int, v->a); valid = true; } - } else if (p_value.type == Variant::REAL) { + } else if (p_value.type == Variant::FLOAT) { Color *v = reinterpret_cast<Color *>(_data._mem); if (p_index == CoreStringNames::singleton->r) { - v->r = p_value._data._real; + v->r = p_value._data._float; valid = true; } else if (p_index == CoreStringNames::singleton->g) { - v->g = p_value._data._real; + v->g = p_value._data._float; valid = true; } else if (p_index == CoreStringNames::singleton->b) { - v->b = p_value._data._real; + v->b = p_value._data._float; valid = true; } else if (p_index == CoreStringNames::singleton->a) { - v->a = p_value._data._real; + v->a = p_value._data._float; valid = true; } else if (p_index == CoreStringNames::singleton->r8) { - v->r = p_value._data._real / 255.0; + v->r = p_value._data._float / 255.0; valid = true; } else if (p_index == CoreStringNames::singleton->g8) { - v->g = p_value._data._real / 255.0; + v->g = p_value._data._float / 255.0; valid = true; } else if (p_index == CoreStringNames::singleton->b8) { - v->b = p_value._data._real / 255.0; + v->b = p_value._data._float / 255.0; valid = true; } else if (p_index == CoreStringNames::singleton->a8) { - v->a = p_value._data._real / 255.0; + v->a = p_value._data._float / 255.0; valid = true; } else if (p_index == CoreStringNames::singleton->h) { - v->set_hsv(p_value._data._real, v->get_s(), v->get_v(), v->a); + v->set_hsv(p_value._data._float, v->get_s(), v->get_v(), v->a); valid = true; } else if (p_index == CoreStringNames::singleton->s) { - v->set_hsv(v->get_h(), p_value._data._real, v->get_v(), v->a); + v->set_hsv(v->get_h(), p_value._data._float, v->get_v(), v->a); valid = true; } else if (p_index == CoreStringNames::singleton->v) { - v->set_hsv(v->get_h(), v->get_s(), p_value._data._real, v->a); + v->set_hsv(v->get_h(), v->get_s(), p_value._data._float, v->a); valid = true; } } @@ -1515,7 +1739,7 @@ void Variant::set_named(const StringName &p_index, const Variant &p_value, bool #ifdef DEBUG_ENABLED if (!_get_obj().obj) { break; - } else if (ScriptDebugger::get_singleton() && _get_obj().ref.is_null() && !ObjectDB::instance_validate(_get_obj().obj)) { + } else if (ScriptDebugger::get_singleton() && ObjectDB::get_instance(_get_obj().id) == nullptr) { break; } @@ -1548,6 +1772,15 @@ Variant Variant::get_named(const StringName &p_index, bool *r_valid) const { } } break; + case VECTOR2I: { + const Vector2i *v = reinterpret_cast<const Vector2i *>(_data._mem); + if (p_index == CoreStringNames::singleton->x) { + return v->x; + } else if (p_index == CoreStringNames::singleton->y) { + return v->y; + } + + } break; case RECT2: { const Rect2 *v = reinterpret_cast<const Rect2 *>(_data._mem); @@ -1560,6 +1793,18 @@ Variant Variant::get_named(const StringName &p_index, bool *r_valid) const { return v->size + v->position; } } break; + case RECT2I: { + + const Rect2i *v = reinterpret_cast<const Rect2i *>(_data._mem); + //scalar name + if (p_index == CoreStringNames::singleton->position) { + return v->position; + } else if (p_index == CoreStringNames::singleton->size) { + return v->size; + } else if (p_index == CoreStringNames::singleton->end) { + return v->size + v->position; + } + } break; case TRANSFORM2D: { const Transform2D *v = _data._transform2d; @@ -1584,6 +1829,18 @@ Variant Variant::get_named(const StringName &p_index, bool *r_valid) const { } } break; + case VECTOR3I: { + + const Vector3i *v = reinterpret_cast<const Vector3i *>(_data._mem); + if (p_index == CoreStringNames::singleton->x) { + return v->x; + } else if (p_index == CoreStringNames::singleton->y) { + return v->y; + } else if (p_index == CoreStringNames::singleton->z) { + return v->z; + } + + } break; case PLANE: { const Plane *v = reinterpret_cast<const Plane *>(_data._mem); @@ -1613,7 +1870,7 @@ Variant Variant::get_named(const StringName &p_index, bool *r_valid) const { return v->w; } - } break; // 10 + } break; case AABB: { const ::AABB *v = _data._aabb; @@ -1684,7 +1941,7 @@ Variant Variant::get_named(const StringName &p_index, bool *r_valid) const { return "Instance base is null."; } else { - if (ScriptDebugger::get_singleton() && _get_obj().ref.is_null() && !ObjectDB::instance_validate(_get_obj().obj)) { + if (ScriptDebugger::get_singleton() && !_get_obj().id.is_reference() && ObjectDB::get_instance(_get_obj().id) == nullptr) { if (r_valid) *r_valid = false; return "Attempted use of stray pointer object."; @@ -1707,28 +1964,55 @@ Variant Variant::get_named(const StringName &p_index, bool *r_valid) const { return Variant(); } -#define DEFAULT_OP_ARRAY_CMD(m_name, m_type, skip_test, cmd) \ - case m_name: { \ - skip_test; \ - \ - if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::REAL) { \ - int index = p_index; \ - m_type *arr = reinterpret_cast<m_type *>(_data._mem); \ - \ - if (index < 0) \ - index += arr->size(); \ - if (index >= 0 && index < arr->size()) { \ - valid = true; \ - cmd; \ - } \ - } \ +#define DEFAULT_OP_ARRAY_CMD(m_name, m_type, skip_test, cmd) \ + case m_name: { \ + skip_test; \ + \ + if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::FLOAT) { \ + int index = p_index; \ + m_type *arr = reinterpret_cast<m_type *>(_data._mem); \ + \ + if (index < 0) \ + index += arr->size(); \ + if (index >= 0 && index < arr->size()) { \ + valid = true; \ + cmd; \ + } \ + } \ } break; -#define DEFAULT_OP_DVECTOR_SET(m_name, dv_type, skip_cond) \ - DEFAULT_OP_ARRAY_CMD(m_name, PoolVector<dv_type>, if (skip_cond) return;, arr->set(index, p_value); return ) +#define DEFAULT_OP_DVECTOR_SET(m_name, m_type, skip_cond) \ + case m_name: { \ + if (skip_cond) return; \ + \ + if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::FLOAT) { \ + int index = p_index; \ + Vector<m_type> *arr = PackedArrayRef<m_type>::get_array_ptr(_data.packed_array); \ + \ + if (index < 0) \ + index += arr->size(); \ + if (index >= 0 && index < arr->size()) { \ + valid = true; \ + arr->set(index, p_value); \ + } \ + } \ + } break; -#define DEFAULT_OP_DVECTOR_GET(m_name, dv_type) \ - DEFAULT_OP_ARRAY_CMD(m_name, const PoolVector<dv_type>, ;, return arr->get(index)) +#define DEFAULT_OP_DVECTOR_GET(m_name, m_type) \ + case m_name: { \ + \ + if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::FLOAT) { \ + int index = p_index; \ + const Vector<m_type> *arr = &PackedArrayRef<m_type>::get_array(_data.packed_array); \ + \ + if (index < 0) \ + index += arr->size(); \ + if (index >= 0 && index < arr->size()) { \ + valid = true; \ + return arr->get(index); \ + } \ + } \ + } break; void Variant::set(const Variant &p_index, const Variant &p_value, bool *r_valid) { @@ -1747,12 +2031,12 @@ void Variant::set(const Variant &p_index, const Variant &p_value, bool *r_valid) case INT: { return; } break; - case REAL: { + case FLOAT: { return; } break; case STRING: { - if (p_index.type != Variant::INT && p_index.type != Variant::REAL) + if (p_index.type != Variant::INT && p_index.type != Variant::FLOAT) return; int idx = p_index; @@ -1764,7 +2048,7 @@ void Variant::set(const Variant &p_index, const Variant &p_value, bool *r_valid) return; String chr; - if (p_value.type == Variant::INT || p_value.type == Variant::REAL) { + if (p_value.type == Variant::INT || p_value.type == Variant::FLOAT) { chr = String::chr(p_value); } else if (p_value.type == Variant::STRING) { @@ -1781,10 +2065,10 @@ void Variant::set(const Variant &p_index, const Variant &p_value, bool *r_valid) } break; case VECTOR2: { - if (p_value.type != Variant::INT && p_value.type != Variant::REAL) + if (p_value.type != Variant::INT && p_value.type != Variant::FLOAT) return; - if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::REAL) { + if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::FLOAT) { // scalar index int idx = p_index; @@ -1813,7 +2097,42 @@ void Variant::set(const Variant &p_index, const Variant &p_value, bool *r_valid) } } - } break; // 5 + } break; + case VECTOR2I: { + + if (p_value.type != Variant::INT && p_value.type != Variant::FLOAT) + return; + + if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::FLOAT) { + // scalar index + int idx = p_index; + + if (idx < 0) + idx += 2; + if (idx >= 0 && idx < 2) { + + Vector2i *v = reinterpret_cast<Vector2i *>(_data._mem); + valid = true; + (*v)[idx] = p_value; + return; + } + } else if (p_index.get_type() == Variant::STRING) { + //scalar name + + const String *str = reinterpret_cast<const String *>(p_index._data._mem); + Vector2i *v = reinterpret_cast<Vector2i *>(_data._mem); + if (*str == "x") { + valid = true; + v->x = p_value; + return; + } else if (*str == "y") { + valid = true; + v->y = p_value; + return; + } + } + + } break; case RECT2: { if (p_value.type != Variant::VECTOR2) @@ -1839,12 +2158,37 @@ void Variant::set(const Variant &p_index, const Variant &p_value, bool *r_valid) } } } break; + case RECT2I: { + + if (p_value.type != Variant::VECTOR2I) + return; + + if (p_index.get_type() == Variant::STRING) { + //scalar name + + const String *str = reinterpret_cast<const String *>(p_index._data._mem); + Rect2i *v = reinterpret_cast<Rect2i *>(_data._mem); + if (*str == "position") { + valid = true; + v->position = p_value; + return; + } else if (*str == "size") { + valid = true; + v->size = p_value; + return; + } else if (*str == "end") { + valid = true; + v->size = Vector2i(p_value) - v->position; + return; + } + } + } break; case TRANSFORM2D: { if (p_value.type != Variant::VECTOR2) return; - if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::REAL) { + if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::FLOAT) { int index = p_index; @@ -1880,10 +2224,10 @@ void Variant::set(const Variant &p_index, const Variant &p_value, bool *r_valid) } break; case VECTOR3: { - if (p_value.type != Variant::INT && p_value.type != Variant::REAL) + if (p_value.type != Variant::INT && p_value.type != Variant::FLOAT) return; - if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::REAL) { + if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::FLOAT) { //scalar index int idx = p_index; if (idx < 0) @@ -1916,6 +2260,44 @@ void Variant::set(const Variant &p_index, const Variant &p_value, bool *r_valid) } } break; + case VECTOR3I: { + + if (p_value.type != Variant::INT && p_value.type != Variant::FLOAT) + return; + + if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::FLOAT) { + //scalar index + int idx = p_index; + if (idx < 0) + idx += 3; + if (idx >= 0 && idx < 3) { + + Vector3i *v = reinterpret_cast<Vector3i *>(_data._mem); + valid = true; + (*v)[idx] = p_value; + return; + } + } else if (p_index.get_type() == Variant::STRING) { + + //scalar name + const String *str = reinterpret_cast<const String *>(p_index._data._mem); + Vector3i *v = reinterpret_cast<Vector3i *>(_data._mem); + if (*str == "x") { + valid = true; + v->x = p_value; + return; + } else if (*str == "y") { + valid = true; + v->y = p_value; + return; + } else if (*str == "z") { + valid = true; + v->z = p_value; + return; + } + } + + } break; case PLANE: { if (p_index.get_type() == Variant::STRING) { @@ -1923,21 +2305,21 @@ void Variant::set(const Variant &p_index, const Variant &p_value, bool *r_valid) const String *str = reinterpret_cast<const String *>(p_index._data._mem); Plane *v = reinterpret_cast<Plane *>(_data._mem); if (*str == "x") { - if (p_value.type != Variant::INT && p_value.type != Variant::REAL) + if (p_value.type != Variant::INT && p_value.type != Variant::FLOAT) return; valid = true; v->normal.x = p_value; return; } else if (*str == "y") { - if (p_value.type != Variant::INT && p_value.type != Variant::REAL) + if (p_value.type != Variant::INT && p_value.type != Variant::FLOAT) return; valid = true; v->normal.y = p_value; return; } else if (*str == "z") { - if (p_value.type != Variant::INT && p_value.type != Variant::REAL) + if (p_value.type != Variant::INT && p_value.type != Variant::FLOAT) return; valid = true; @@ -1960,7 +2342,7 @@ void Variant::set(const Variant &p_index, const Variant &p_value, bool *r_valid) } break; case QUAT: { - if (p_value.type != Variant::INT && p_value.type != Variant::REAL) + if (p_value.type != Variant::INT && p_value.type != Variant::FLOAT) return; if (p_index.get_type() == Variant::STRING) { @@ -1986,7 +2368,7 @@ void Variant::set(const Variant &p_index, const Variant &p_value, bool *r_valid) } } - } break; // 10 + } break; case AABB: { if (p_value.type != Variant::VECTOR3) @@ -2017,7 +2399,7 @@ void Variant::set(const Variant &p_index, const Variant &p_value, bool *r_valid) if (p_value.type != Variant::VECTOR3) return; - if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::REAL) { + if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::FLOAT) { int index = p_index; @@ -2053,7 +2435,7 @@ void Variant::set(const Variant &p_index, const Variant &p_value, bool *r_valid) } break; case TRANSFORM: { - if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::REAL) { + if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::FLOAT) { if (p_value.type != Variant::VECTOR3) return; @@ -2096,7 +2478,7 @@ void Variant::set(const Variant &p_index, const Variant &p_value, bool *r_valid) } break; case COLOR: { - if (p_value.type != Variant::INT && p_value.type != Variant::REAL) + if (p_value.type != Variant::INT && p_value.type != Variant::FLOAT) return; if (p_index.get_type() == Variant::STRING) { @@ -2161,8 +2543,10 @@ void Variant::set(const Variant &p_index, const Variant &p_value, bool *r_valid) } } break; + case STRING_NAME: { + } break; case NODE_PATH: { - } break; // 15 + } break; case _RID: { } break; case OBJECT: { @@ -2172,17 +2556,15 @@ void Variant::set(const Variant &p_index, const Variant &p_value, bool *r_valid) if (obj) { #ifdef DEBUG_ENABLED - if (ScriptDebugger::get_singleton() && _get_obj().ref.is_null()) { + if (ScriptDebugger::get_singleton() && !_get_obj().id.is_reference() && ObjectDB::get_instance(_get_obj().id) == nullptr) { - if (!ObjectDB::instance_validate(obj)) { - WARN_PRINT("Attempted use of stray pointer object."); - valid = false; - return; - } + WARN_PRINT("Attempted use of previously freed pointer object."); + valid = false; + return; } #endif - if (p_index.get_type() != Variant::STRING) { + if (p_index.get_type() != Variant::STRING_NAME && p_index.get_type() != Variant::STRING) { obj->setvar(p_index, p_value, r_valid); return; } @@ -2198,14 +2580,16 @@ void Variant::set(const Variant &p_index, const Variant &p_value, bool *r_valid) valid = true; //always valid, i guess? should this really be ok? return; } break; - DEFAULT_OP_ARRAY_CMD(ARRAY, Array, ;, (*arr)[index] = p_value; return ) // 20 - DEFAULT_OP_DVECTOR_SET(POOL_BYTE_ARRAY, uint8_t, p_value.type != Variant::REAL && p_value.type != Variant::INT) - DEFAULT_OP_DVECTOR_SET(POOL_INT_ARRAY, int, p_value.type != Variant::REAL && p_value.type != Variant::INT) - DEFAULT_OP_DVECTOR_SET(POOL_REAL_ARRAY, real_t, p_value.type != Variant::REAL && p_value.type != Variant::INT) - DEFAULT_OP_DVECTOR_SET(POOL_STRING_ARRAY, String, p_value.type != Variant::STRING) - DEFAULT_OP_DVECTOR_SET(POOL_VECTOR2_ARRAY, Vector2, p_value.type != Variant::VECTOR2) // 25 - DEFAULT_OP_DVECTOR_SET(POOL_VECTOR3_ARRAY, Vector3, p_value.type != Variant::VECTOR3) - DEFAULT_OP_DVECTOR_SET(POOL_COLOR_ARRAY, Color, p_value.type != Variant::COLOR) + DEFAULT_OP_ARRAY_CMD(ARRAY, Array, ;, (*arr)[index] = p_value; return ) + DEFAULT_OP_DVECTOR_SET(PACKED_BYTE_ARRAY, uint8_t, p_value.type != Variant::FLOAT && p_value.type != Variant::INT) + DEFAULT_OP_DVECTOR_SET(PACKED_INT32_ARRAY, int32_t, p_value.type != Variant::FLOAT && p_value.type != Variant::INT) + DEFAULT_OP_DVECTOR_SET(PACKED_INT64_ARRAY, int64_t, p_value.type != Variant::FLOAT && p_value.type != Variant::INT) + DEFAULT_OP_DVECTOR_SET(PACKED_FLOAT32_ARRAY, float, p_value.type != Variant::FLOAT && p_value.type != Variant::INT) + DEFAULT_OP_DVECTOR_SET(PACKED_FLOAT64_ARRAY, double, p_value.type != Variant::FLOAT && p_value.type != Variant::INT) + DEFAULT_OP_DVECTOR_SET(PACKED_STRING_ARRAY, String, p_value.type != Variant::STRING) + DEFAULT_OP_DVECTOR_SET(PACKED_VECTOR2_ARRAY, Vector2, p_value.type != Variant::VECTOR2) + DEFAULT_OP_DVECTOR_SET(PACKED_VECTOR3_ARRAY, Vector3, p_value.type != Variant::VECTOR3) + DEFAULT_OP_DVECTOR_SET(PACKED_COLOR_ARRAY, Color, p_value.type != Variant::COLOR) default: return; } @@ -2229,12 +2613,12 @@ Variant Variant::get(const Variant &p_index, bool *r_valid) const { case INT: { return Variant(); } break; - case REAL: { + case FLOAT: { return Variant(); } break; case STRING: { - if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::REAL) { + if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::FLOAT) { //string index int idx = p_index; @@ -2251,7 +2635,7 @@ Variant Variant::get(const Variant &p_index, bool *r_valid) const { } break; case VECTOR2: { - if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::REAL) { + if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::FLOAT) { // scalar index int idx = p_index; if (idx < 0) @@ -2276,7 +2660,35 @@ Variant Variant::get(const Variant &p_index, bool *r_valid) const { } } - } break; // 5 + } break; + case VECTOR2I: { + + if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::FLOAT) { + // scalar index + int idx = p_index; + if (idx < 0) + idx += 2; + if (idx >= 0 && idx < 2) { + + const Vector2i *v = reinterpret_cast<const Vector2i *>(_data._mem); + valid = true; + return (*v)[idx]; + } + } else if (p_index.get_type() == Variant::STRING) { + //scalar name + + const String *str = reinterpret_cast<const String *>(p_index._data._mem); + const Vector2i *v = reinterpret_cast<const Vector2i *>(_data._mem); + if (*str == "x") { + valid = true; + return v->x; + } else if (*str == "y") { + valid = true; + return v->y; + } + } + + } break; case RECT2: { if (p_index.get_type() == Variant::STRING) { @@ -2296,9 +2708,28 @@ Variant Variant::get(const Variant &p_index, bool *r_valid) const { } } } break; + case RECT2I: { + + if (p_index.get_type() == Variant::STRING) { + //scalar name + + const String *str = reinterpret_cast<const String *>(p_index._data._mem); + const Rect2i *v = reinterpret_cast<const Rect2i *>(_data._mem); + if (*str == "position") { + valid = true; + return v->position; + } else if (*str == "size") { + valid = true; + return v->size; + } else if (*str == "end") { + valid = true; + return v->size + v->position; + } + } + } break; case VECTOR3: { - if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::REAL) { + if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::FLOAT) { //scalar index int idx = p_index; if (idx < 0) @@ -2327,9 +2758,40 @@ Variant Variant::get(const Variant &p_index, bool *r_valid) const { } } break; + case VECTOR3I: { + + if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::FLOAT) { + //scalar index + int idx = p_index; + if (idx < 0) + idx += 3; + if (idx >= 0 && idx < 3) { + + const Vector3i *v = reinterpret_cast<const Vector3i *>(_data._mem); + valid = true; + return (*v)[idx]; + } + } else if (p_index.get_type() == Variant::STRING) { + + //scalar name + const String *str = reinterpret_cast<const String *>(p_index._data._mem); + const Vector3i *v = reinterpret_cast<const Vector3i *>(_data._mem); + if (*str == "x") { + valid = true; + return v->x; + } else if (*str == "y") { + valid = true; + return v->y; + } else if (*str == "z") { + valid = true; + return v->z; + } + } + + } break; case TRANSFORM2D: { - if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::REAL) { + if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::FLOAT) { int index = p_index; @@ -2405,7 +2867,7 @@ Variant Variant::get(const Variant &p_index, bool *r_valid) const { } } - } break; // 10 + } break; case AABB: { if (p_index.get_type() == Variant::STRING) { @@ -2427,7 +2889,7 @@ Variant Variant::get(const Variant &p_index, bool *r_valid) const { } break; case BASIS: { - if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::REAL) { + if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::FLOAT) { int index = p_index; if (index < 0) @@ -2458,7 +2920,7 @@ Variant Variant::get(const Variant &p_index, bool *r_valid) const { } break; case TRANSFORM: { - if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::REAL) { + if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::FLOAT) { int index = p_index; if (index < 0) @@ -2537,8 +2999,10 @@ Variant Variant::get(const Variant &p_index, bool *r_valid) const { } } break; + case STRING_NAME: { + } break; case NODE_PATH: { - } break; // 15 + } break; case _RID: { } break; case OBJECT: { @@ -2546,12 +3010,10 @@ Variant Variant::get(const Variant &p_index, bool *r_valid) const { if (obj) { #ifdef DEBUG_ENABLED - if (ScriptDebugger::get_singleton() && _get_obj().ref.is_null()) { - //only if debugging! - if (!ObjectDB::instance_validate(obj)) { - valid = false; - return "Attempted get on stray pointer."; - } + + if (ScriptDebugger::get_singleton() && !_get_obj().id.is_reference() && ObjectDB::get_instance(_get_obj().id) == nullptr) { + valid = false; + return "Attempted get on previously freed instance."; } #endif @@ -2572,14 +3034,16 @@ Variant Variant::get(const Variant &p_index, bool *r_valid) const { return *res; } } break; - DEFAULT_OP_ARRAY_CMD(ARRAY, const Array, ;, return (*arr)[index]) // 20 - DEFAULT_OP_DVECTOR_GET(POOL_BYTE_ARRAY, uint8_t) - DEFAULT_OP_DVECTOR_GET(POOL_INT_ARRAY, int) - DEFAULT_OP_DVECTOR_GET(POOL_REAL_ARRAY, real_t) - DEFAULT_OP_DVECTOR_GET(POOL_STRING_ARRAY, String) - DEFAULT_OP_DVECTOR_GET(POOL_VECTOR2_ARRAY, Vector2) // 25 - DEFAULT_OP_DVECTOR_GET(POOL_VECTOR3_ARRAY, Vector3) - DEFAULT_OP_DVECTOR_GET(POOL_COLOR_ARRAY, Color) + DEFAULT_OP_ARRAY_CMD(ARRAY, const Array, ;, return (*arr)[index]) + DEFAULT_OP_DVECTOR_GET(PACKED_BYTE_ARRAY, uint8_t) + DEFAULT_OP_DVECTOR_GET(PACKED_INT32_ARRAY, int32_t) + DEFAULT_OP_DVECTOR_GET(PACKED_INT64_ARRAY, int64_t) + DEFAULT_OP_DVECTOR_GET(PACKED_FLOAT32_ARRAY, float) + DEFAULT_OP_DVECTOR_GET(PACKED_FLOAT64_ARRAY, double) + DEFAULT_OP_DVECTOR_GET(PACKED_STRING_ARRAY, String) + DEFAULT_OP_DVECTOR_GET(PACKED_VECTOR2_ARRAY, Vector2) + DEFAULT_OP_DVECTOR_GET(PACKED_VECTOR3_ARRAY, Vector3) + DEFAULT_OP_DVECTOR_GET(PACKED_COLOR_ARRAY, Color) default: return Variant(); } @@ -2611,15 +3075,14 @@ bool Variant::in(const Variant &p_index, bool *r_valid) const { bool valid = false; #ifdef DEBUG_ENABLED - if (ScriptDebugger::get_singleton() && _get_obj().ref.is_null()) { - //only if debugging! - if (!ObjectDB::instance_validate(obj)) { - if (r_valid) { - *r_valid = false; - } - return true; // Attempted get on stray pointer. + + if (ScriptDebugger::get_singleton() && !_get_obj().id.is_reference() && ObjectDB::get_instance(_get_obj().id) == nullptr) { + if (r_valid) { + *r_valid = false; } + return true; // Attempted get on stray pointer. } + #endif if (p_index.get_type() != Variant::STRING) { @@ -2640,7 +3103,7 @@ bool Variant::in(const Variant &p_index, bool *r_valid) const { const Dictionary *dic = reinterpret_cast<const Dictionary *>(_data._mem); return dic->has(p_index); - } break; // 20 + } break; case ARRAY: { const Array *arr = reinterpret_cast<const Array *>(_data._mem); @@ -2656,14 +3119,14 @@ bool Variant::in(const Variant &p_index, bool *r_valid) const { return false; } break; - case POOL_BYTE_ARRAY: { - if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::REAL) { + case PACKED_BYTE_ARRAY: { + if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::FLOAT) { int index = p_index; - const PoolVector<uint8_t> *arr = reinterpret_cast<const PoolVector<uint8_t> *>(_data._mem); + const Vector<uint8_t> *arr = &PackedArrayRef<uint8_t>::get_array(_data.packed_array); int l = arr->size(); if (l) { - PoolVector<uint8_t>::Read r = arr->read(); + const uint8_t *r = arr->ptr(); for (int i = 0; i < l; i++) { if (r[i] == index) return true; @@ -2674,14 +3137,49 @@ bool Variant::in(const Variant &p_index, bool *r_valid) const { } } break; - case POOL_INT_ARRAY: { - if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::REAL) { + case PACKED_INT32_ARRAY: { + if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::FLOAT) { - int index = p_index; - const PoolVector<int> *arr = reinterpret_cast<const PoolVector<int> *>(_data._mem); + int32_t index = p_index; + const Vector<int32_t> *arr = &PackedArrayRef<int32_t>::get_array(_data.packed_array); + int32_t l = arr->size(); + if (l) { + const int32_t *r = arr->ptr(); + for (int32_t i = 0; i < l; i++) { + if (r[i] == index) + return true; + } + } + + return false; + } + } break; + case PACKED_INT64_ARRAY: { + if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::FLOAT) { + + int64_t index = p_index; + const Vector<int64_t> *arr = &PackedArrayRef<int64_t>::get_array(_data.packed_array); + int64_t l = arr->size(); + if (l) { + const int64_t *r = arr->ptr(); + for (int64_t i = 0; i < l; i++) { + if (r[i] == index) + return true; + } + } + + return false; + } + } break; + case PACKED_FLOAT32_ARRAY: { + + if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::FLOAT) { + + real_t index = p_index; + const Vector<float> *arr = &PackedArrayRef<float>::get_array(_data.packed_array); int l = arr->size(); if (l) { - PoolVector<int>::Read r = arr->read(); + const float *r = arr->ptr(); for (int i = 0; i < l; i++) { if (r[i] == index) return true; @@ -2690,16 +3188,17 @@ bool Variant::in(const Variant &p_index, bool *r_valid) const { return false; } + } break; - case POOL_REAL_ARRAY: { + case PACKED_FLOAT64_ARRAY: { - if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::REAL) { + if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::FLOAT) { real_t index = p_index; - const PoolVector<real_t> *arr = reinterpret_cast<const PoolVector<real_t> *>(_data._mem); + const Vector<double> *arr = &PackedArrayRef<double>::get_array(_data.packed_array); int l = arr->size(); if (l) { - PoolVector<real_t>::Read r = arr->read(); + const double *r = arr->ptr(); for (int i = 0; i < l; i++) { if (r[i] == index) return true; @@ -2710,15 +3209,15 @@ bool Variant::in(const Variant &p_index, bool *r_valid) const { } } break; - case POOL_STRING_ARRAY: { + case PACKED_STRING_ARRAY: { if (p_index.get_type() == Variant::STRING) { String index = p_index; - const PoolVector<String> *arr = reinterpret_cast<const PoolVector<String> *>(_data._mem); + const Vector<String> *arr = &PackedArrayRef<String>::get_array(_data.packed_array); int l = arr->size(); if (l) { - PoolVector<String>::Read r = arr->read(); + const String *r = arr->ptr(); for (int i = 0; i < l; i++) { if (r[i] == index) return true; @@ -2729,15 +3228,15 @@ bool Variant::in(const Variant &p_index, bool *r_valid) const { } } break; //25 - case POOL_VECTOR2_ARRAY: { + case PACKED_VECTOR2_ARRAY: { if (p_index.get_type() == Variant::VECTOR2) { Vector2 index = p_index; - const PoolVector<Vector2> *arr = reinterpret_cast<const PoolVector<Vector2> *>(_data._mem); + const Vector<Vector2> *arr = &PackedArrayRef<Vector2>::get_array(_data.packed_array); int l = arr->size(); if (l) { - PoolVector<Vector2>::Read r = arr->read(); + const Vector2 *r = arr->ptr(); for (int i = 0; i < l; i++) { if (r[i] == index) return true; @@ -2748,15 +3247,15 @@ bool Variant::in(const Variant &p_index, bool *r_valid) const { } } break; - case POOL_VECTOR3_ARRAY: { + case PACKED_VECTOR3_ARRAY: { if (p_index.get_type() == Variant::VECTOR3) { Vector3 index = p_index; - const PoolVector<Vector3> *arr = reinterpret_cast<const PoolVector<Vector3> *>(_data._mem); + const Vector<Vector3> *arr = &PackedArrayRef<Vector3>::get_array(_data.packed_array); int l = arr->size(); if (l) { - PoolVector<Vector3>::Read r = arr->read(); + const Vector3 *r = arr->ptr(); for (int i = 0; i < l; i++) { if (r[i] == index) return true; @@ -2767,16 +3266,16 @@ bool Variant::in(const Variant &p_index, bool *r_valid) const { } } break; - case POOL_COLOR_ARRAY: { + case PACKED_COLOR_ARRAY: { if (p_index.get_type() == Variant::COLOR) { Color index = p_index; - const PoolVector<Color> *arr = reinterpret_cast<const PoolVector<Color> *>(_data._mem); + const Vector<Color> *arr = &PackedArrayRef<Color>::get_array(_data.packed_array); int l = arr->size(); if (l) { - PoolVector<Color>::Read r = arr->read(); + const Color *r = arr->ptr(); for (int i = 0; i < l; i++) { if (r[i] == index) return true; @@ -2800,10 +3299,16 @@ void Variant::get_property_list(List<PropertyInfo> *p_list) const { switch (type) { case VECTOR2: { - p_list->push_back(PropertyInfo(Variant::REAL, "x")); - p_list->push_back(PropertyInfo(Variant::REAL, "y")); + p_list->push_back(PropertyInfo(Variant::FLOAT, "x")); + p_list->push_back(PropertyInfo(Variant::FLOAT, "y")); + + } break; + case VECTOR2I: { - } break; // 5 + p_list->push_back(PropertyInfo(Variant::INT, "x")); + p_list->push_back(PropertyInfo(Variant::INT, "y")); + + } break; case RECT2: { p_list->push_back(PropertyInfo(Variant::VECTOR2, "position")); @@ -2811,11 +3316,25 @@ void Variant::get_property_list(List<PropertyInfo> *p_list) const { p_list->push_back(PropertyInfo(Variant::VECTOR2, "end")); } break; + case RECT2I: { + + p_list->push_back(PropertyInfo(Variant::VECTOR2I, "position")); + p_list->push_back(PropertyInfo(Variant::VECTOR2I, "size")); + p_list->push_back(PropertyInfo(Variant::VECTOR2I, "end")); + + } break; case VECTOR3: { - p_list->push_back(PropertyInfo(Variant::REAL, "x")); - p_list->push_back(PropertyInfo(Variant::REAL, "y")); - p_list->push_back(PropertyInfo(Variant::REAL, "z")); + p_list->push_back(PropertyInfo(Variant::FLOAT, "x")); + p_list->push_back(PropertyInfo(Variant::FLOAT, "y")); + p_list->push_back(PropertyInfo(Variant::FLOAT, "z")); + + } break; + case VECTOR3I: { + + p_list->push_back(PropertyInfo(Variant::INT, "x")); + p_list->push_back(PropertyInfo(Variant::INT, "y")); + p_list->push_back(PropertyInfo(Variant::INT, "z")); } break; case TRANSFORM2D: { @@ -2828,20 +3347,20 @@ void Variant::get_property_list(List<PropertyInfo> *p_list) const { case PLANE: { p_list->push_back(PropertyInfo(Variant::VECTOR3, "normal")); - p_list->push_back(PropertyInfo(Variant::REAL, "x")); - p_list->push_back(PropertyInfo(Variant::REAL, "y")); - p_list->push_back(PropertyInfo(Variant::REAL, "z")); - p_list->push_back(PropertyInfo(Variant::REAL, "d")); + p_list->push_back(PropertyInfo(Variant::FLOAT, "x")); + p_list->push_back(PropertyInfo(Variant::FLOAT, "y")); + p_list->push_back(PropertyInfo(Variant::FLOAT, "z")); + p_list->push_back(PropertyInfo(Variant::FLOAT, "d")); } break; case QUAT: { - p_list->push_back(PropertyInfo(Variant::REAL, "x")); - p_list->push_back(PropertyInfo(Variant::REAL, "y")); - p_list->push_back(PropertyInfo(Variant::REAL, "z")); - p_list->push_back(PropertyInfo(Variant::REAL, "w")); + p_list->push_back(PropertyInfo(Variant::FLOAT, "x")); + p_list->push_back(PropertyInfo(Variant::FLOAT, "y")); + p_list->push_back(PropertyInfo(Variant::FLOAT, "z")); + p_list->push_back(PropertyInfo(Variant::FLOAT, "w")); - } break; // 10 + } break; case AABB: { p_list->push_back(PropertyInfo(Variant::VECTOR3, "position")); p_list->push_back(PropertyInfo(Variant::VECTOR3, "size")); @@ -2861,21 +3380,23 @@ void Variant::get_property_list(List<PropertyInfo> *p_list) const { } break; case COLOR: { - p_list->push_back(PropertyInfo(Variant::REAL, "r")); - p_list->push_back(PropertyInfo(Variant::REAL, "g")); - p_list->push_back(PropertyInfo(Variant::REAL, "b")); - p_list->push_back(PropertyInfo(Variant::REAL, "a")); - p_list->push_back(PropertyInfo(Variant::REAL, "h")); - p_list->push_back(PropertyInfo(Variant::REAL, "s")); - p_list->push_back(PropertyInfo(Variant::REAL, "v")); + p_list->push_back(PropertyInfo(Variant::FLOAT, "r")); + p_list->push_back(PropertyInfo(Variant::FLOAT, "g")); + p_list->push_back(PropertyInfo(Variant::FLOAT, "b")); + p_list->push_back(PropertyInfo(Variant::FLOAT, "a")); + p_list->push_back(PropertyInfo(Variant::FLOAT, "h")); + p_list->push_back(PropertyInfo(Variant::FLOAT, "s")); + p_list->push_back(PropertyInfo(Variant::FLOAT, "v")); p_list->push_back(PropertyInfo(Variant::INT, "r8")); p_list->push_back(PropertyInfo(Variant::INT, "g8")); p_list->push_back(PropertyInfo(Variant::INT, "b8")); p_list->push_back(PropertyInfo(Variant::INT, "a8")); } break; + case STRING_NAME: { + } break; case NODE_PATH: { - } break; // 15 + } break; case _RID: { } break; case OBJECT: { @@ -2883,13 +3404,12 @@ void Variant::get_property_list(List<PropertyInfo> *p_list) const { Object *obj = _get_obj().obj; if (obj) { #ifdef DEBUG_ENABLED - if (ScriptDebugger::get_singleton() && _get_obj().ref.is_null()) { - //only if debugging! - if (!ObjectDB::instance_validate(obj)) { - WARN_PRINT("Attempted get_property list on stray pointer."); - return; - } + + if (ScriptDebugger::get_singleton() && !_get_obj().id.is_reference() && ObjectDB::get_instance(_get_obj().id) == nullptr) { + WARN_PRINT("Attempted get_property list on previously freed instance."); + return; } + #endif obj->get_property_list(p_list); @@ -2907,14 +3427,16 @@ void Variant::get_property_list(List<PropertyInfo> *p_list) const { } } } break; - case ARRAY: // 20 - case POOL_BYTE_ARRAY: - case POOL_INT_ARRAY: - case POOL_REAL_ARRAY: - case POOL_STRING_ARRAY: - case POOL_VECTOR2_ARRAY: // 25 - case POOL_VECTOR3_ARRAY: - case POOL_COLOR_ARRAY: { + case ARRAY: + case PACKED_BYTE_ARRAY: + case PACKED_INT32_ARRAY: + case PACKED_INT64_ARRAY: + case PACKED_FLOAT32_ARRAY: + case PACKED_FLOAT64_ARRAY: + case PACKED_STRING_ARRAY: + case PACKED_VECTOR2_ARRAY: + case PACKED_VECTOR3_ARRAY: + case PACKED_COLOR_ARRAY: { //nothing } break; @@ -2931,9 +3453,9 @@ bool Variant::iter_init(Variant &r_iter, bool &valid) const { r_iter = 0; return _data._int > 0; } break; - case REAL: { + case FLOAT: { r_iter = 0; - return _data._real > 0.0; + return _data._float > 0.0; } break; case VECTOR2: { int64_t from = reinterpret_cast<const Vector2 *>(_data._mem)->x; @@ -2961,26 +3483,28 @@ bool Variant::iter_init(Variant &r_iter, bool &valid) const { } break; case OBJECT: { -#ifdef DEBUG_ENABLED if (!_get_obj().obj) { valid = false; return false; } - if (ScriptDebugger::get_singleton() && _get_obj().ref.is_null() && !ObjectDB::instance_validate(_get_obj().obj)) { +#ifdef DEBUG_ENABLED + + if (ScriptDebugger::get_singleton() && !_get_obj().id.is_reference() && ObjectDB::get_instance(_get_obj().id) == nullptr) { valid = false; return false; } + #endif - Variant::CallError ce; - ce.error = Variant::CallError::CALL_OK; + Callable::CallError ce; + ce.error = Callable::CallError::CALL_OK; Array ref; ref.push_back(r_iter); Variant vref = ref; const Variant *refp[] = { &vref }; Variant ret = _get_obj().obj->call(CoreStringNames::get_singleton()->_iter_init, refp, 1, ce); - if (ref.size() != 1 || ce.error != Variant::CallError::CALL_OK) { + if (ref.size() != 1 || ce.error != Callable::CallError::CALL_OK) { valid = false; return false; } @@ -3016,56 +3540,72 @@ bool Variant::iter_init(Variant &r_iter, bool &valid) const { r_iter = 0; return true; } break; - case POOL_BYTE_ARRAY: { - const PoolVector<uint8_t> *arr = reinterpret_cast<const PoolVector<uint8_t> *>(_data._mem); + case PACKED_BYTE_ARRAY: { + const Vector<uint8_t> *arr = &PackedArrayRef<uint8_t>::get_array(_data.packed_array); + if (arr->size() == 0) + return false; + r_iter = 0; + return true; + + } break; + case PACKED_INT32_ARRAY: { + const Vector<int32_t> *arr = &PackedArrayRef<int32_t>::get_array(_data.packed_array); + if (arr->size() == 0) + return false; + r_iter = 0; + return true; + + } break; + case PACKED_INT64_ARRAY: { + const Vector<int64_t> *arr = &PackedArrayRef<int64_t>::get_array(_data.packed_array); if (arr->size() == 0) return false; r_iter = 0; return true; } break; - case POOL_INT_ARRAY: { - const PoolVector<int> *arr = reinterpret_cast<const PoolVector<int> *>(_data._mem); + case PACKED_FLOAT32_ARRAY: { + const Vector<float> *arr = &PackedArrayRef<float>::get_array(_data.packed_array); if (arr->size() == 0) return false; r_iter = 0; return true; } break; - case POOL_REAL_ARRAY: { - const PoolVector<real_t> *arr = reinterpret_cast<const PoolVector<real_t> *>(_data._mem); + case PACKED_FLOAT64_ARRAY: { + const Vector<double> *arr = &PackedArrayRef<double>::get_array(_data.packed_array); if (arr->size() == 0) return false; r_iter = 0; return true; } break; - case POOL_STRING_ARRAY: { - const PoolVector<String> *arr = reinterpret_cast<const PoolVector<String> *>(_data._mem); + case PACKED_STRING_ARRAY: { + const Vector<String> *arr = &PackedArrayRef<String>::get_array(_data.packed_array); if (arr->size() == 0) return false; r_iter = 0; return true; } break; - case POOL_VECTOR2_ARRAY: { + case PACKED_VECTOR2_ARRAY: { - const PoolVector<Vector2> *arr = reinterpret_cast<const PoolVector<Vector2> *>(_data._mem); + const Vector<Vector2> *arr = &PackedArrayRef<Vector2>::get_array(_data.packed_array); if (arr->size() == 0) return false; r_iter = 0; return true; } break; - case POOL_VECTOR3_ARRAY: { + case PACKED_VECTOR3_ARRAY: { - const PoolVector<Vector3> *arr = reinterpret_cast<const PoolVector<Vector3> *>(_data._mem); + const Vector<Vector3> *arr = &PackedArrayRef<Vector3>::get_array(_data.packed_array); if (arr->size() == 0) return false; r_iter = 0; return true; } break; - case POOL_COLOR_ARRAY: { + case PACKED_COLOR_ARRAY: { - const PoolVector<Color> *arr = reinterpret_cast<const PoolVector<Color> *>(_data._mem); + const Vector<Color> *arr = &PackedArrayRef<Color>::get_array(_data.packed_array); if (arr->size() == 0) return false; r_iter = 0; @@ -3091,10 +3631,10 @@ bool Variant::iter_next(Variant &r_iter, bool &valid) const { r_iter = idx; return true; } break; - case REAL: { + case FLOAT: { int64_t idx = r_iter; idx++; - if (idx >= _data._real) + if (idx >= _data._float) return false; r_iter = idx; return true; @@ -3129,26 +3669,28 @@ bool Variant::iter_next(Variant &r_iter, bool &valid) const { } break; case OBJECT: { -#ifdef DEBUG_ENABLED if (!_get_obj().obj) { valid = false; return false; } - if (ScriptDebugger::get_singleton() && _get_obj().ref.is_null() && !ObjectDB::instance_validate(_get_obj().obj)) { +#ifdef DEBUG_ENABLED + + if (ScriptDebugger::get_singleton() && !_get_obj().id.is_reference() && ObjectDB::get_instance(_get_obj().id) == nullptr) { valid = false; return false; } + #endif - Variant::CallError ce; - ce.error = Variant::CallError::CALL_OK; + Callable::CallError ce; + ce.error = Callable::CallError::CALL_OK; Array ref; ref.push_back(r_iter); Variant vref = ref; const Variant *refp[] = { &vref }; Variant ret = _get_obj().obj->call(CoreStringNames::get_singleton()->_iter_next, refp, 1, ce); - if (ref.size() != 1 || ce.error != Variant::CallError::CALL_OK) { + if (ref.size() != 1 || ce.error != Callable::CallError::CALL_OK) { valid = false; return false; } @@ -3189,8 +3731,8 @@ bool Variant::iter_next(Variant &r_iter, bool &valid) const { r_iter = idx; return true; } break; - case POOL_BYTE_ARRAY: { - const PoolVector<uint8_t> *arr = reinterpret_cast<const PoolVector<uint8_t> *>(_data._mem); + case PACKED_BYTE_ARRAY: { + const Vector<uint8_t> *arr = &PackedArrayRef<uint8_t>::get_array(_data.packed_array); int idx = r_iter; idx++; if (idx >= arr->size()) @@ -3199,8 +3741,28 @@ bool Variant::iter_next(Variant &r_iter, bool &valid) const { return true; } break; - case POOL_INT_ARRAY: { - const PoolVector<int> *arr = reinterpret_cast<const PoolVector<int> *>(_data._mem); + case PACKED_INT32_ARRAY: { + const Vector<int32_t> *arr = &PackedArrayRef<int32_t>::get_array(_data.packed_array); + int32_t idx = r_iter; + idx++; + if (idx >= arr->size()) + return false; + r_iter = idx; + return true; + + } break; + case PACKED_INT64_ARRAY: { + const Vector<int64_t> *arr = &PackedArrayRef<int64_t>::get_array(_data.packed_array); + int64_t idx = r_iter; + idx++; + if (idx >= arr->size()) + return false; + r_iter = idx; + return true; + + } break; + case PACKED_FLOAT32_ARRAY: { + const Vector<float> *arr = &PackedArrayRef<float>::get_array(_data.packed_array); int idx = r_iter; idx++; if (idx >= arr->size()) @@ -3209,8 +3771,8 @@ bool Variant::iter_next(Variant &r_iter, bool &valid) const { return true; } break; - case POOL_REAL_ARRAY: { - const PoolVector<real_t> *arr = reinterpret_cast<const PoolVector<real_t> *>(_data._mem); + case PACKED_FLOAT64_ARRAY: { + const Vector<double> *arr = &PackedArrayRef<double>::get_array(_data.packed_array); int idx = r_iter; idx++; if (idx >= arr->size()) @@ -3219,8 +3781,8 @@ bool Variant::iter_next(Variant &r_iter, bool &valid) const { return true; } break; - case POOL_STRING_ARRAY: { - const PoolVector<String> *arr = reinterpret_cast<const PoolVector<String> *>(_data._mem); + case PACKED_STRING_ARRAY: { + const Vector<String> *arr = &PackedArrayRef<String>::get_array(_data.packed_array); int idx = r_iter; idx++; if (idx >= arr->size()) @@ -3228,9 +3790,9 @@ bool Variant::iter_next(Variant &r_iter, bool &valid) const { r_iter = idx; return true; } break; - case POOL_VECTOR2_ARRAY: { + case PACKED_VECTOR2_ARRAY: { - const PoolVector<Vector2> *arr = reinterpret_cast<const PoolVector<Vector2> *>(_data._mem); + const Vector<Vector2> *arr = &PackedArrayRef<Vector2>::get_array(_data.packed_array); int idx = r_iter; idx++; if (idx >= arr->size()) @@ -3238,9 +3800,9 @@ bool Variant::iter_next(Variant &r_iter, bool &valid) const { r_iter = idx; return true; } break; - case POOL_VECTOR3_ARRAY: { + case PACKED_VECTOR3_ARRAY: { - const PoolVector<Vector3> *arr = reinterpret_cast<const PoolVector<Vector3> *>(_data._mem); + const Vector<Vector3> *arr = &PackedArrayRef<Vector3>::get_array(_data.packed_array); int idx = r_iter; idx++; if (idx >= arr->size()) @@ -3248,9 +3810,9 @@ bool Variant::iter_next(Variant &r_iter, bool &valid) const { r_iter = idx; return true; } break; - case POOL_COLOR_ARRAY: { + case PACKED_COLOR_ARRAY: { - const PoolVector<Color> *arr = reinterpret_cast<const PoolVector<Color> *>(_data._mem); + const Vector<Color> *arr = &PackedArrayRef<Color>::get_array(_data.packed_array); int idx = r_iter; idx++; if (idx >= arr->size()) @@ -3274,7 +3836,7 @@ Variant Variant::iter_get(const Variant &r_iter, bool &r_valid) const { return r_iter; } break; - case REAL: { + case FLOAT: { return r_iter; } break; @@ -3288,23 +3850,23 @@ Variant Variant::iter_get(const Variant &r_iter, bool &r_valid) const { } break; case OBJECT: { -#ifdef DEBUG_ENABLED if (!_get_obj().obj) { r_valid = false; return Variant(); } - - if (ScriptDebugger::get_singleton() && _get_obj().ref.is_null() && !ObjectDB::instance_validate(_get_obj().obj)) { +#ifdef DEBUG_ENABLED + if (ScriptDebugger::get_singleton() && !_get_obj().id.is_reference() && ObjectDB::get_instance(_get_obj().id) == nullptr) { r_valid = false; return Variant(); } + #endif - Variant::CallError ce; - ce.error = Variant::CallError::CALL_OK; + Callable::CallError ce; + ce.error = Callable::CallError::CALL_OK; const Variant *refp[] = { &r_iter }; Variant ret = _get_obj().obj->call(CoreStringNames::get_singleton()->_iter_get, refp, 1, ce); - if (ce.error != Variant::CallError::CALL_OK) { + if (ce.error != Callable::CallError::CALL_OK) { r_valid = false; return Variant(); } @@ -3336,8 +3898,8 @@ Variant Variant::iter_get(const Variant &r_iter, bool &r_valid) const { #endif return arr->get(idx); } break; - case POOL_BYTE_ARRAY: { - const PoolVector<uint8_t> *arr = reinterpret_cast<const PoolVector<uint8_t> *>(_data._mem); + case PACKED_BYTE_ARRAY: { + const Vector<uint8_t> *arr = &PackedArrayRef<uint8_t>::get_array(_data.packed_array); int idx = r_iter; #ifdef DEBUG_ENABLED if (idx < 0 || idx >= arr->size()) { @@ -3347,8 +3909,30 @@ Variant Variant::iter_get(const Variant &r_iter, bool &r_valid) const { #endif return arr->get(idx); } break; - case POOL_INT_ARRAY: { - const PoolVector<int> *arr = reinterpret_cast<const PoolVector<int> *>(_data._mem); + case PACKED_INT32_ARRAY: { + const Vector<int32_t> *arr = &PackedArrayRef<int32_t>::get_array(_data.packed_array); + int32_t idx = r_iter; +#ifdef DEBUG_ENABLED + if (idx < 0 || idx >= arr->size()) { + r_valid = false; + return Variant(); + } +#endif + return arr->get(idx); + } break; + case PACKED_INT64_ARRAY: { + const Vector<int64_t> *arr = &PackedArrayRef<int64_t>::get_array(_data.packed_array); + int64_t idx = r_iter; +#ifdef DEBUG_ENABLED + if (idx < 0 || idx >= arr->size()) { + r_valid = false; + return Variant(); + } +#endif + return arr->get(idx); + } break; + case PACKED_FLOAT32_ARRAY: { + const Vector<float> *arr = &PackedArrayRef<float>::get_array(_data.packed_array); int idx = r_iter; #ifdef DEBUG_ENABLED if (idx < 0 || idx >= arr->size()) { @@ -3358,8 +3942,8 @@ Variant Variant::iter_get(const Variant &r_iter, bool &r_valid) const { #endif return arr->get(idx); } break; - case POOL_REAL_ARRAY: { - const PoolVector<real_t> *arr = reinterpret_cast<const PoolVector<real_t> *>(_data._mem); + case PACKED_FLOAT64_ARRAY: { + const Vector<double> *arr = &PackedArrayRef<double>::get_array(_data.packed_array); int idx = r_iter; #ifdef DEBUG_ENABLED if (idx < 0 || idx >= arr->size()) { @@ -3369,8 +3953,8 @@ Variant Variant::iter_get(const Variant &r_iter, bool &r_valid) const { #endif return arr->get(idx); } break; - case POOL_STRING_ARRAY: { - const PoolVector<String> *arr = reinterpret_cast<const PoolVector<String> *>(_data._mem); + case PACKED_STRING_ARRAY: { + const Vector<String> *arr = &PackedArrayRef<String>::get_array(_data.packed_array); int idx = r_iter; #ifdef DEBUG_ENABLED if (idx < 0 || idx >= arr->size()) { @@ -3380,9 +3964,9 @@ Variant Variant::iter_get(const Variant &r_iter, bool &r_valid) const { #endif return arr->get(idx); } break; - case POOL_VECTOR2_ARRAY: { + case PACKED_VECTOR2_ARRAY: { - const PoolVector<Vector2> *arr = reinterpret_cast<const PoolVector<Vector2> *>(_data._mem); + const Vector<Vector2> *arr = &PackedArrayRef<Vector2>::get_array(_data.packed_array); int idx = r_iter; #ifdef DEBUG_ENABLED if (idx < 0 || idx >= arr->size()) { @@ -3392,9 +3976,9 @@ Variant Variant::iter_get(const Variant &r_iter, bool &r_valid) const { #endif return arr->get(idx); } break; - case POOL_VECTOR3_ARRAY: { + case PACKED_VECTOR3_ARRAY: { - const PoolVector<Vector3> *arr = reinterpret_cast<const PoolVector<Vector3> *>(_data._mem); + const Vector<Vector3> *arr = &PackedArrayRef<Vector3>::get_array(_data.packed_array); int idx = r_iter; #ifdef DEBUG_ENABLED if (idx < 0 || idx >= arr->size()) { @@ -3404,9 +3988,9 @@ Variant Variant::iter_get(const Variant &r_iter, bool &r_valid) const { #endif return arr->get(idx); } break; - case POOL_COLOR_ARRAY: { + case PACKED_COLOR_ARRAY: { - const PoolVector<Color> *arr = reinterpret_cast<const PoolVector<Color> *>(_data._mem); + const Vector<Color> *arr = &PackedArrayRef<Color>::get_array(_data.packed_array); int idx = r_iter; #ifdef DEBUG_ENABLED if (idx < 0 || idx >= arr->size()) { @@ -3469,9 +4053,9 @@ void Variant::blend(const Variant &a, const Variant &b, float c, Variant &r_dst) r_dst = int(va + vb * c + 0.5); } return; - case REAL: { - double ra = a._data._real; - double rb = b._data._real; + case FLOAT: { + double ra = a._data._float; + double rb = b._data._float; r_dst = ra + rb * c; } return; @@ -3479,16 +4063,50 @@ void Variant::blend(const Variant &a, const Variant &b, float c, Variant &r_dst) r_dst = *reinterpret_cast<const Vector2 *>(a._data._mem) + *reinterpret_cast<const Vector2 *>(b._data._mem) * c; } return; + case VECTOR2I: { + int32_t vax = reinterpret_cast<const Vector2i *>(a._data._mem)->x; + int32_t vbx = reinterpret_cast<const Vector2i *>(b._data._mem)->x; + int32_t vay = reinterpret_cast<const Vector2i *>(a._data._mem)->y; + int32_t vby = reinterpret_cast<const Vector2i *>(b._data._mem)->y; + r_dst = Vector2i(int32_t(vax + vbx * c + 0.5), int32_t(vay + vby * c + 0.5)); + } + return; case RECT2: { const Rect2 *ra = reinterpret_cast<const Rect2 *>(a._data._mem); const Rect2 *rb = reinterpret_cast<const Rect2 *>(b._data._mem); r_dst = Rect2(ra->position + rb->position * c, ra->size + rb->size * c); } return; + case RECT2I: { + const Rect2i *ra = reinterpret_cast<const Rect2i *>(a._data._mem); + const Rect2i *rb = reinterpret_cast<const Rect2i *>(b._data._mem); + + int32_t vax = ra->position.x; + int32_t vay = ra->position.y; + int32_t vbx = ra->size.x; + int32_t vby = ra->size.y; + int32_t vcx = rb->position.x; + int32_t vcy = rb->position.y; + int32_t vdx = rb->size.x; + int32_t vdy = rb->size.y; + + r_dst = Rect2i(int32_t(vax + vbx * c + 0.5), int32_t(vay + vby * c + 0.5), int32_t(vcx + vdx * c + 0.5), int32_t(vcy + vdy * c + 0.5)); + } + return; case VECTOR3: { r_dst = *reinterpret_cast<const Vector3 *>(a._data._mem) + *reinterpret_cast<const Vector3 *>(b._data._mem) * c; } return; + case VECTOR3I: { + int32_t vax = reinterpret_cast<const Vector3i *>(a._data._mem)->x; + int32_t vbx = reinterpret_cast<const Vector3i *>(b._data._mem)->x; + int32_t vay = reinterpret_cast<const Vector3i *>(a._data._mem)->y; + int32_t vby = reinterpret_cast<const Vector3i *>(b._data._mem)->y; + int32_t vaz = reinterpret_cast<const Vector3i *>(a._data._mem)->z; + int32_t vbz = reinterpret_cast<const Vector3i *>(b._data._mem)->z; + r_dst = Vector3i(int32_t(vax + vbx * c + 0.5), int32_t(vay + vby * c + 0.5), int32_t(vaz + vbz * c + 0.5)); + } + return; case AABB: { const ::AABB *ra = reinterpret_cast<const ::AABB *>(a._data._mem); const ::AABB *rb = reinterpret_cast<const ::AABB *>(b._data._mem); @@ -3554,9 +4172,9 @@ void Variant::interpolate(const Variant &a, const Variant &b, float c, Variant & r_dst = int(va + (vb - va) * c); } return; - case REAL: { - real_t va = a._data._real; - real_t vb = b._data._real; + case FLOAT: { + real_t va = a._data._float; + real_t vb = b._data._float; r_dst = va + (vb - va) * c; } return; @@ -3605,14 +4223,51 @@ void Variant::interpolate(const Variant &a, const Variant &b, float c, Variant & r_dst = reinterpret_cast<const Vector2 *>(a._data._mem)->linear_interpolate(*reinterpret_cast<const Vector2 *>(b._data._mem), c); } return; + case VECTOR2I: { + int32_t vax = reinterpret_cast<const Vector2i *>(a._data._mem)->x; + int32_t vbx = reinterpret_cast<const Vector2i *>(b._data._mem)->x; + int32_t vay = reinterpret_cast<const Vector2i *>(a._data._mem)->y; + int32_t vby = reinterpret_cast<const Vector2i *>(b._data._mem)->y; + r_dst = Vector2i(int32_t(vax + vbx * c + 0.5), int32_t(vay + vby * c + 0.5)); + } + return; + case RECT2: { r_dst = Rect2(reinterpret_cast<const Rect2 *>(a._data._mem)->position.linear_interpolate(reinterpret_cast<const Rect2 *>(b._data._mem)->position, c), reinterpret_cast<const Rect2 *>(a._data._mem)->size.linear_interpolate(reinterpret_cast<const Rect2 *>(b._data._mem)->size, c)); } return; + case RECT2I: { + const Rect2i *ra = reinterpret_cast<const Rect2i *>(a._data._mem); + const Rect2i *rb = reinterpret_cast<const Rect2i *>(b._data._mem); + + int32_t vax = ra->position.x; + int32_t vay = ra->position.y; + int32_t vbx = ra->size.x; + int32_t vby = ra->size.y; + int32_t vcx = rb->position.x; + int32_t vcy = rb->position.y; + int32_t vdx = rb->size.x; + int32_t vdy = rb->size.y; + + r_dst = Rect2i(int32_t(vax + vbx * c + 0.5), int32_t(vay + vby * c + 0.5), int32_t(vcx + vdx * c + 0.5), int32_t(vcy + vdy * c + 0.5)); + } + return; + case VECTOR3: { r_dst = reinterpret_cast<const Vector3 *>(a._data._mem)->linear_interpolate(*reinterpret_cast<const Vector3 *>(b._data._mem), c); } return; + case VECTOR3I: { + int32_t vax = reinterpret_cast<const Vector3i *>(a._data._mem)->x; + int32_t vbx = reinterpret_cast<const Vector3i *>(b._data._mem)->x; + int32_t vay = reinterpret_cast<const Vector3i *>(a._data._mem)->y; + int32_t vby = reinterpret_cast<const Vector3i *>(b._data._mem)->y; + int32_t vaz = reinterpret_cast<const Vector3i *>(a._data._mem)->z; + int32_t vbz = reinterpret_cast<const Vector3i *>(b._data._mem)->z; + r_dst = Vector3i(int32_t(vax + vbx * c + 0.5), int32_t(vay + vby * c + 0.5), int32_t(vaz + vbz * c + 0.5)); + } + return; + case TRANSFORM2D: { r_dst = a._data._transform2d->interpolate_with(*b._data._transform2d, c); } @@ -3641,6 +4296,10 @@ void Variant::interpolate(const Variant &a, const Variant &b, float c, Variant & r_dst = reinterpret_cast<const Color *>(a._data._mem)->linear_interpolate(*reinterpret_cast<const Color *>(b._data._mem), c); } return; + case STRING_NAME: { + r_dst = a; + } + return; case NODE_PATH: { r_dst = a; } @@ -3660,25 +4319,77 @@ void Variant::interpolate(const Variant &a, const Variant &b, float c, Variant & r_dst = a; } return; - case POOL_BYTE_ARRAY: { + case PACKED_BYTE_ARRAY: { r_dst = a; } return; - case POOL_INT_ARRAY: { - const PoolVector<int> *arr_a = reinterpret_cast<const PoolVector<int> *>(a._data._mem); - const PoolVector<int> *arr_b = reinterpret_cast<const PoolVector<int> *>(b._data._mem); + case PACKED_INT32_ARRAY: { + const Vector<int32_t> *arr_a = &PackedArrayRef<int32_t>::get_array(a._data.packed_array); + const Vector<int32_t> *arr_b = &PackedArrayRef<int32_t>::get_array(b._data.packed_array); + int32_t sz = arr_a->size(); + if (sz == 0 || arr_b->size() != sz) { + + r_dst = a; + } else { + + Vector<int32_t> v; + v.resize(sz); + { + int32_t *vw = v.ptrw(); + const int32_t *ar = arr_a->ptr(); + const int32_t *br = arr_b->ptr(); + + Variant va; + for (int32_t i = 0; i < sz; i++) { + Variant::interpolate(ar[i], br[i], c, va); + vw[i] = va; + } + } + r_dst = v; + } + } + return; + case PACKED_INT64_ARRAY: { + const Vector<int64_t> *arr_a = &PackedArrayRef<int64_t>::get_array(a._data.packed_array); + const Vector<int64_t> *arr_b = &PackedArrayRef<int64_t>::get_array(b._data.packed_array); + int64_t sz = arr_a->size(); + if (sz == 0 || arr_b->size() != sz) { + + r_dst = a; + } else { + + Vector<int64_t> v; + v.resize(sz); + { + int64_t *vw = v.ptrw(); + const int64_t *ar = arr_a->ptr(); + const int64_t *br = arr_b->ptr(); + + Variant va; + for (int64_t i = 0; i < sz; i++) { + Variant::interpolate(ar[i], br[i], c, va); + vw[i] = va; + } + } + r_dst = v; + } + } + return; + case PACKED_FLOAT32_ARRAY: { + const Vector<float> *arr_a = &PackedArrayRef<float>::get_array(a._data.packed_array); + const Vector<float> *arr_b = &PackedArrayRef<float>::get_array(b._data.packed_array); int sz = arr_a->size(); if (sz == 0 || arr_b->size() != sz) { r_dst = a; } else { - PoolVector<int> v; + Vector<float> v; v.resize(sz); { - PoolVector<int>::Write vw = v.write(); - PoolVector<int>::Read ar = arr_a->read(); - PoolVector<int>::Read br = arr_b->read(); + float *vw = v.ptrw(); + const float *ar = arr_a->ptr(); + const float *br = arr_b->ptr(); Variant va; for (int i = 0; i < sz; i++) { @@ -3690,21 +4401,21 @@ void Variant::interpolate(const Variant &a, const Variant &b, float c, Variant & } } return; - case POOL_REAL_ARRAY: { - const PoolVector<real_t> *arr_a = reinterpret_cast<const PoolVector<real_t> *>(a._data._mem); - const PoolVector<real_t> *arr_b = reinterpret_cast<const PoolVector<real_t> *>(b._data._mem); + case PACKED_FLOAT64_ARRAY: { + const Vector<double> *arr_a = &PackedArrayRef<double>::get_array(a._data.packed_array); + const Vector<double> *arr_b = &PackedArrayRef<double>::get_array(b._data.packed_array); int sz = arr_a->size(); if (sz == 0 || arr_b->size() != sz) { r_dst = a; } else { - PoolVector<real_t> v; + Vector<double> v; v.resize(sz); { - PoolVector<real_t>::Write vw = v.write(); - PoolVector<real_t>::Read ar = arr_a->read(); - PoolVector<real_t>::Read br = arr_b->read(); + double *vw = v.ptrw(); + const double *ar = arr_a->ptr(); + const double *br = arr_b->ptr(); Variant va; for (int i = 0; i < sz; i++) { @@ -3716,25 +4427,25 @@ void Variant::interpolate(const Variant &a, const Variant &b, float c, Variant & } } return; - case POOL_STRING_ARRAY: { + case PACKED_STRING_ARRAY: { r_dst = a; } return; - case POOL_VECTOR2_ARRAY: { - const PoolVector<Vector2> *arr_a = reinterpret_cast<const PoolVector<Vector2> *>(a._data._mem); - const PoolVector<Vector2> *arr_b = reinterpret_cast<const PoolVector<Vector2> *>(b._data._mem); + case PACKED_VECTOR2_ARRAY: { + const Vector<Vector2> *arr_a = &PackedArrayRef<Vector2>::get_array(a._data.packed_array); + const Vector<Vector2> *arr_b = &PackedArrayRef<Vector2>::get_array(b._data.packed_array); int sz = arr_a->size(); if (sz == 0 || arr_b->size() != sz) { r_dst = a; } else { - PoolVector<Vector2> v; + Vector<Vector2> v; v.resize(sz); { - PoolVector<Vector2>::Write vw = v.write(); - PoolVector<Vector2>::Read ar = arr_a->read(); - PoolVector<Vector2>::Read br = arr_b->read(); + Vector2 *vw = v.ptrw(); + const Vector2 *ar = arr_a->ptr(); + const Vector2 *br = arr_b->ptr(); for (int i = 0; i < sz; i++) { vw[i] = ar[i].linear_interpolate(br[i], c); @@ -3744,22 +4455,22 @@ void Variant::interpolate(const Variant &a, const Variant &b, float c, Variant & } } return; - case POOL_VECTOR3_ARRAY: { + case PACKED_VECTOR3_ARRAY: { - const PoolVector<Vector3> *arr_a = reinterpret_cast<const PoolVector<Vector3> *>(a._data._mem); - const PoolVector<Vector3> *arr_b = reinterpret_cast<const PoolVector<Vector3> *>(b._data._mem); + const Vector<Vector3> *arr_a = &PackedArrayRef<Vector3>::get_array(a._data.packed_array); + const Vector<Vector3> *arr_b = &PackedArrayRef<Vector3>::get_array(b._data.packed_array); int sz = arr_a->size(); if (sz == 0 || arr_b->size() != sz) { r_dst = a; } else { - PoolVector<Vector3> v; + Vector<Vector3> v; v.resize(sz); { - PoolVector<Vector3>::Write vw = v.write(); - PoolVector<Vector3>::Read ar = arr_a->read(); - PoolVector<Vector3>::Read br = arr_b->read(); + Vector3 *vw = v.ptrw(); + const Vector3 *ar = arr_a->ptr(); + const Vector3 *br = arr_b->ptr(); for (int i = 0; i < sz; i++) { vw[i] = ar[i].linear_interpolate(br[i], c); @@ -3769,21 +4480,21 @@ void Variant::interpolate(const Variant &a, const Variant &b, float c, Variant & } } return; - case POOL_COLOR_ARRAY: { - const PoolVector<Color> *arr_a = reinterpret_cast<const PoolVector<Color> *>(a._data._mem); - const PoolVector<Color> *arr_b = reinterpret_cast<const PoolVector<Color> *>(b._data._mem); + case PACKED_COLOR_ARRAY: { + const Vector<Color> *arr_a = &PackedArrayRef<Color>::get_array(a._data.packed_array); + const Vector<Color> *arr_b = &PackedArrayRef<Color>::get_array(b._data.packed_array); int sz = arr_a->size(); if (sz == 0 || arr_b->size() != sz) { r_dst = a; } else { - PoolVector<Color> v; + Vector<Color> v; v.resize(sz); { - PoolVector<Color>::Write vw = v.write(); - PoolVector<Color>::Read ar = arr_a->read(); - PoolVector<Color>::Read br = arr_b->read(); + Color *vw = v.ptrw(); + const Color *ar = arr_a->ptr(); + const Color *br = arr_b->ptr(); for (int i = 0; i < sz; i++) { vw[i] = ar[i].linear_interpolate(br[i], c); diff --git a/core/variant_parser.cpp b/core/variant_parser.cpp index 996b25308e..12fd9976bd 100644 --- a/core/variant_parser.cpp +++ b/core/variant_parser.cpp @@ -81,6 +81,7 @@ const char *VariantParser::tk_name[TK_MAX] = { "')'", "identifier", "string", + "string_name", "number", "color", "':'", @@ -93,6 +94,8 @@ const char *VariantParser::tk_name[TK_MAX] = { Error VariantParser::get_token(Stream *p_stream, Token &r_token, int &line, String &r_err_str) { + bool string_name = false; + while (true) { CharType cchar; @@ -204,6 +207,17 @@ Error VariantParser::get_token(Stream *p_stream, Token &r_token, int &line, Stri r_token.type = TK_COLOR; return OK; }; + case '@': { + cchar = p_stream->get_char(); + if (cchar != '"') { + r_err_str = "Expected '\"' after '@'"; + r_token.type = TK_ERROR; + return ERR_PARSE_ERROR; + } + + string_name = true; + [[fallthrough]]; + } case '"': { String str; @@ -285,8 +299,14 @@ Error VariantParser::get_token(Stream *p_stream, Token &r_token, int &line, Stri if (p_stream->is_utf8()) { str.parse_utf8(str.ascii(true).get_data()); } - r_token.type = TK_STRING; - r_token.value = str; + if (string_name) { + r_token.type = TK_STRING_NAME; + r_token.value = StringName(str); + string_name = false; //reset + } else { + r_token.type = TK_STRING; + r_token.value = str; + } return OK; } break; @@ -525,6 +545,19 @@ Error VariantParser::parse_value(Token &token, Variant &value, Stream *p_stream, value = Vector2(args[0], args[1]); return OK; + } else if (id == "Vector2i") { + + Vector<int32_t> args; + Error err = _parse_construct<int32_t>(p_stream, args, line, r_err_str); + if (err) + return err; + + if (args.size() != 2) { + r_err_str = "Expected 2 arguments for constructor"; + } + + value = Vector2i(args[0], args[1]); + return OK; } else if (id == "Rect2") { Vector<float> args; @@ -538,6 +571,19 @@ Error VariantParser::parse_value(Token &token, Variant &value, Stream *p_stream, value = Rect2(args[0], args[1], args[2], args[3]); return OK; + } else if (id == "Rect2i") { + + Vector<int32_t> args; + Error err = _parse_construct<int32_t>(p_stream, args, line, r_err_str); + if (err) + return err; + + if (args.size() != 4) { + r_err_str = "Expected 4 arguments for constructor"; + } + + value = Rect2i(args[0], args[1], args[2], args[3]); + return OK; } else if (id == "Vector3") { Vector<float> args; @@ -551,6 +597,19 @@ Error VariantParser::parse_value(Token &token, Variant &value, Stream *p_stream, value = Vector3(args[0], args[1], args[2]); return OK; + } else if (id == "Vector3i") { + + Vector<int32_t> args; + Error err = _parse_construct<int32_t>(p_stream, args, line, r_err_str); + if (err) + return err; + + if (args.size() != 3) { + r_err_str = "Expected 3 arguments for constructor"; + } + + value = Vector3i(args[0], args[1], args[2]); + return OK; } else if (id == "Transform2D" || id == "Matrix32") { //compatibility Vector<float> args; @@ -861,18 +920,18 @@ Error VariantParser::parse_value(Token &token, Variant &value, Stream *p_stream, } } - } else if (id == "PoolByteArray" || id == "ByteArray") { + } else if (id == "PackedByteArray" || id == "PoolByteArray" || id == "ByteArray") { Vector<uint8_t> args; Error err = _parse_construct<uint8_t>(p_stream, args, line, r_err_str); if (err) return err; - PoolVector<uint8_t> arr; + Vector<uint8_t> arr; { int len = args.size(); arr.resize(len); - PoolVector<uint8_t>::Write w = arr.write(); + uint8_t *w = arr.ptrw(); for (int i = 0; i < len; i++) { w[i] = args[i]; } @@ -882,20 +941,20 @@ Error VariantParser::parse_value(Token &token, Variant &value, Stream *p_stream, return OK; - } else if (id == "PoolIntArray" || id == "IntArray") { + } else if (id == "PackedInt32Array" || id == "PackedIntArray" || id == "PoolIntArray" || id == "IntArray") { - Vector<int> args; - Error err = _parse_construct<int>(p_stream, args, line, r_err_str); + Vector<int32_t> args; + Error err = _parse_construct<int32_t>(p_stream, args, line, r_err_str); if (err) return err; - PoolVector<int> arr; + Vector<int32_t> arr; { - int len = args.size(); + int32_t len = args.size(); arr.resize(len); - PoolVector<int>::Write w = arr.write(); - for (int i = 0; i < len; i++) { - w[i] = int(args[i]); + int32_t *w = arr.ptrw(); + for (int32_t i = 0; i < len; i++) { + w[i] = int32_t(args[i]); } } @@ -903,18 +962,59 @@ Error VariantParser::parse_value(Token &token, Variant &value, Stream *p_stream, return OK; - } else if (id == "PoolRealArray" || id == "FloatArray") { + } else if (id == "PackedInt64Array") { + + Vector<int64_t> args; + Error err = _parse_construct<int64_t>(p_stream, args, line, r_err_str); + if (err) + return err; + + Vector<int64_t> arr; + { + int64_t len = args.size(); + arr.resize(len); + int64_t *w = arr.ptrw(); + for (int64_t i = 0; i < len; i++) { + w[i] = int64_t(args[i]); + } + } + + value = arr; + + return OK; + + } else if (id == "PackedFloat32Array" || id == "PackedRealArray" || id == "PoolRealArray" || id == "FloatArray") { Vector<float> args; Error err = _parse_construct<float>(p_stream, args, line, r_err_str); if (err) return err; - PoolVector<float> arr; + Vector<float> arr; + { + int len = args.size(); + arr.resize(len); + float *w = arr.ptrw(); + for (int i = 0; i < len; i++) { + w[i] = args[i]; + } + } + + value = arr; + + return OK; + } else if (id == "PackedFloat64Array") { + + Vector<double> args; + Error err = _parse_construct<double>(p_stream, args, line, r_err_str); + if (err) + return err; + + Vector<double> arr; { int len = args.size(); arr.resize(len); - PoolVector<float>::Write w = arr.write(); + double *w = arr.ptrw(); for (int i = 0; i < len; i++) { w[i] = args[i]; } @@ -923,7 +1023,7 @@ Error VariantParser::parse_value(Token &token, Variant &value, Stream *p_stream, value = arr; return OK; - } else if (id == "PoolStringArray" || id == "StringArray") { + } else if (id == "PackedStringArray" || id == "PoolStringArray" || id == "StringArray") { get_token(p_stream, token, line, r_err_str); if (token.type != TK_PARENTHESIS_OPEN) { @@ -960,11 +1060,11 @@ Error VariantParser::parse_value(Token &token, Variant &value, Stream *p_stream, cs.push_back(token.value); } - PoolVector<String> arr; + Vector<String> arr; { int len = cs.size(); arr.resize(len); - PoolVector<String>::Write w = arr.write(); + String *w = arr.ptrw(); for (int i = 0; i < len; i++) { w[i] = cs[i]; } @@ -974,18 +1074,18 @@ Error VariantParser::parse_value(Token &token, Variant &value, Stream *p_stream, return OK; - } else if (id == "PoolVector2Array" || id == "Vector2Array") { + } else if (id == "PackedVector2Array" || id == "PoolVector2Array" || id == "Vector2Array") { Vector<float> args; Error err = _parse_construct<float>(p_stream, args, line, r_err_str); if (err) return err; - PoolVector<Vector2> arr; + Vector<Vector2> arr; { int len = args.size() / 2; arr.resize(len); - PoolVector<Vector2>::Write w = arr.write(); + Vector2 *w = arr.ptrw(); for (int i = 0; i < len; i++) { w[i] = Vector2(args[i * 2 + 0], args[i * 2 + 1]); } @@ -995,18 +1095,18 @@ Error VariantParser::parse_value(Token &token, Variant &value, Stream *p_stream, return OK; - } else if (id == "PoolVector3Array" || id == "Vector3Array") { + } else if (id == "PackedVector3Array" || id == "PoolVector3Array" || id == "Vector3Array") { Vector<float> args; Error err = _parse_construct<float>(p_stream, args, line, r_err_str); if (err) return err; - PoolVector<Vector3> arr; + Vector<Vector3> arr; { int len = args.size() / 3; arr.resize(len); - PoolVector<Vector3>::Write w = arr.write(); + Vector3 *w = arr.ptrw(); for (int i = 0; i < len; i++) { w[i] = Vector3(args[i * 3 + 0], args[i * 3 + 1], args[i * 3 + 2]); } @@ -1016,18 +1116,18 @@ Error VariantParser::parse_value(Token &token, Variant &value, Stream *p_stream, return OK; - } else if (id == "PoolColorArray" || id == "ColorArray") { + } else if (id == "PackedColorArray" || id == "PoolColorArray" || id == "ColorArray") { Vector<float> args; Error err = _parse_construct<float>(p_stream, args, line, r_err_str); if (err) return err; - PoolVector<Color> arr; + Vector<Color> arr; { int len = args.size() / 4; arr.resize(len); - PoolVector<Color>::Write w = arr.write(); + Color *w = arr.ptrw(); for (int i = 0; i < len; i++) { w[i] = Color(args[i * 4 + 0], args[i * 4 + 1], args[i * 4 + 2], args[i * 4 + 3]); } @@ -1051,6 +1151,10 @@ Error VariantParser::parse_value(Token &token, Variant &value, Stream *p_stream, value = token.value; return OK; + } else if (token.type == TK_STRING_NAME) { + + value = token.value; + return OK; } else if (token.type == TK_COLOR) { value = token.value; @@ -1392,7 +1496,7 @@ Error VariantWriter::write(const Variant &p_variant, StoreStringFunc p_store_str p_store_string_func(p_store_string_ud, itos(p_variant.operator int64_t())); } break; - case Variant::REAL: { + case Variant::FLOAT: { String s = rtosfix(p_variant.operator real_t()); if (s.find(".") == -1 && s.find("e") == -1) @@ -1411,17 +1515,33 @@ Error VariantWriter::write(const Variant &p_variant, StoreStringFunc p_store_str Vector2 v = p_variant; p_store_string_func(p_store_string_ud, "Vector2( " + rtosfix(v.x) + ", " + rtosfix(v.y) + " )"); } break; + case Variant::VECTOR2I: { + + Vector2i v = p_variant; + p_store_string_func(p_store_string_ud, "Vector2i( " + itos(v.x) + ", " + itos(v.y) + " )"); + } break; case Variant::RECT2: { Rect2 aabb = p_variant; p_store_string_func(p_store_string_ud, "Rect2( " + rtosfix(aabb.position.x) + ", " + rtosfix(aabb.position.y) + ", " + rtosfix(aabb.size.x) + ", " + rtosfix(aabb.size.y) + " )"); } break; + case Variant::RECT2I: { + + Rect2i aabb = p_variant; + p_store_string_func(p_store_string_ud, "Rect2i( " + itos(aabb.position.x) + ", " + itos(aabb.position.y) + ", " + itos(aabb.size.x) + ", " + itos(aabb.size.y) + " )"); + + } break; case Variant::VECTOR3: { Vector3 v = p_variant; p_store_string_func(p_store_string_ud, "Vector3( " + rtosfix(v.x) + ", " + rtosfix(v.y) + ", " + rtosfix(v.z) + " )"); } break; + case Variant::VECTOR3I: { + + Vector3i v = p_variant; + p_store_string_func(p_store_string_ud, "Vector3i( " + itos(v.x) + ", " + itos(v.y) + ", " + itos(v.z) + " )"); + } break; case Variant::PLANE: { Plane p = p_variant; @@ -1498,6 +1618,14 @@ Error VariantWriter::write(const Variant &p_variant, StoreStringFunc p_store_str p_store_string_func(p_store_string_ud, "Color( " + rtosfix(c.r) + ", " + rtosfix(c.g) + ", " + rtosfix(c.b) + ", " + rtosfix(c.a) + " )"); } break; + case Variant::STRING_NAME: { + + String str = p_variant; + + str = "@\"" + str.c_escape() + "\""; + p_store_string_func(p_store_string_ud, str); + + } break; case Variant::NODE_PATH: { String str = p_variant; @@ -1609,14 +1737,14 @@ Error VariantWriter::write(const Variant &p_variant, StoreStringFunc p_store_str } break; - case Variant::POOL_BYTE_ARRAY: { + case Variant::PACKED_BYTE_ARRAY: { - p_store_string_func(p_store_string_ud, "PoolByteArray( "); + p_store_string_func(p_store_string_ud, "PackedByteArray( "); String s; - PoolVector<uint8_t> data = p_variant; + Vector<uint8_t> data = p_variant; int len = data.size(); - PoolVector<uint8_t>::Read r = data.read(); - const uint8_t *ptr = r.ptr(); + const uint8_t *ptr = data.ptr(); + for (int i = 0; i < len; i++) { if (i > 0) @@ -1628,15 +1756,32 @@ Error VariantWriter::write(const Variant &p_variant, StoreStringFunc p_store_str p_store_string_func(p_store_string_ud, " )"); } break; - case Variant::POOL_INT_ARRAY: { + case Variant::PACKED_INT32_ARRAY: { - p_store_string_func(p_store_string_ud, "PoolIntArray( "); - PoolVector<int> data = p_variant; - int len = data.size(); - PoolVector<int>::Read r = data.read(); - const int *ptr = r.ptr(); + p_store_string_func(p_store_string_ud, "PackedInt32Array( "); + Vector<int32_t> data = p_variant; + int32_t len = data.size(); + const int32_t *ptr = data.ptr(); - for (int i = 0; i < len; i++) { + for (int32_t i = 0; i < len; i++) { + + if (i > 0) + p_store_string_func(p_store_string_ud, ", "); + + p_store_string_func(p_store_string_ud, itos(ptr[i])); + } + + p_store_string_func(p_store_string_ud, " )"); + + } break; + case Variant::PACKED_INT64_ARRAY: { + + p_store_string_func(p_store_string_ud, "PackedInt64Array( "); + Vector<int64_t> data = p_variant; + int64_t len = data.size(); + const int64_t *ptr = data.ptr(); + + for (int64_t i = 0; i < len; i++) { if (i > 0) p_store_string_func(p_store_string_ud, ", "); @@ -1647,13 +1792,12 @@ Error VariantWriter::write(const Variant &p_variant, StoreStringFunc p_store_str p_store_string_func(p_store_string_ud, " )"); } break; - case Variant::POOL_REAL_ARRAY: { + case Variant::PACKED_FLOAT32_ARRAY: { - p_store_string_func(p_store_string_ud, "PoolRealArray( "); - PoolVector<real_t> data = p_variant; + p_store_string_func(p_store_string_ud, "PackedFloat32Array( "); + Vector<float> data = p_variant; int len = data.size(); - PoolVector<real_t>::Read r = data.read(); - const real_t *ptr = r.ptr(); + const float *ptr = data.ptr(); for (int i = 0; i < len; i++) { @@ -1665,13 +1809,30 @@ Error VariantWriter::write(const Variant &p_variant, StoreStringFunc p_store_str p_store_string_func(p_store_string_ud, " )"); } break; - case Variant::POOL_STRING_ARRAY: { + case Variant::PACKED_FLOAT64_ARRAY: { - p_store_string_func(p_store_string_ud, "PoolStringArray( "); - PoolVector<String> data = p_variant; + p_store_string_func(p_store_string_ud, "PackedFloat64Array( "); + Vector<double> data = p_variant; int len = data.size(); - PoolVector<String>::Read r = data.read(); - const String *ptr = r.ptr(); + const double *ptr = data.ptr(); + + for (int i = 0; i < len; i++) { + + if (i > 0) + p_store_string_func(p_store_string_ud, ", "); + p_store_string_func(p_store_string_ud, rtosfix(ptr[i])); + } + + p_store_string_func(p_store_string_ud, " )"); + + } break; + case Variant::PACKED_STRING_ARRAY: { + + p_store_string_func(p_store_string_ud, "PackedStringArray( "); + Vector<String> data = p_variant; + int len = data.size(); + const String *ptr = data.ptr(); + String s; //write_string("\n"); @@ -1686,13 +1847,12 @@ Error VariantWriter::write(const Variant &p_variant, StoreStringFunc p_store_str p_store_string_func(p_store_string_ud, " )"); } break; - case Variant::POOL_VECTOR2_ARRAY: { + case Variant::PACKED_VECTOR2_ARRAY: { - p_store_string_func(p_store_string_ud, "PoolVector2Array( "); - PoolVector<Vector2> data = p_variant; + p_store_string_func(p_store_string_ud, "PackedVector2Array( "); + Vector<Vector2> data = p_variant; int len = data.size(); - PoolVector<Vector2>::Read r = data.read(); - const Vector2 *ptr = r.ptr(); + const Vector2 *ptr = data.ptr(); for (int i = 0; i < len; i++) { @@ -1704,13 +1864,12 @@ Error VariantWriter::write(const Variant &p_variant, StoreStringFunc p_store_str p_store_string_func(p_store_string_ud, " )"); } break; - case Variant::POOL_VECTOR3_ARRAY: { + case Variant::PACKED_VECTOR3_ARRAY: { - p_store_string_func(p_store_string_ud, "PoolVector3Array( "); - PoolVector<Vector3> data = p_variant; + p_store_string_func(p_store_string_ud, "PackedVector3Array( "); + Vector<Vector3> data = p_variant; int len = data.size(); - PoolVector<Vector3>::Read r = data.read(); - const Vector3 *ptr = r.ptr(); + const Vector3 *ptr = data.ptr(); for (int i = 0; i < len; i++) { @@ -1722,14 +1881,13 @@ Error VariantWriter::write(const Variant &p_variant, StoreStringFunc p_store_str p_store_string_func(p_store_string_ud, " )"); } break; - case Variant::POOL_COLOR_ARRAY: { + case Variant::PACKED_COLOR_ARRAY: { - p_store_string_func(p_store_string_ud, "PoolColorArray( "); + p_store_string_func(p_store_string_ud, "PackedColorArray( "); - PoolVector<Color> data = p_variant; + Vector<Color> data = p_variant; int len = data.size(); - PoolVector<Color>::Read r = data.read(); - const Color *ptr = r.ptr(); + const Color *ptr = data.ptr(); for (int i = 0; i < len; i++) { diff --git a/core/variant_parser.h b/core/variant_parser.h index 89db3ada0d..ad0a4d6682 100644 --- a/core/variant_parser.h +++ b/core/variant_parser.h @@ -92,6 +92,7 @@ public: TK_PARENTHESIS_CLOSE, TK_IDENTIFIER, TK_STRING, + TK_STRING_NAME, TK_NUMBER, TK_COLOR, TK_COLON, diff --git a/core/vector.h b/core/vector.h index 44add2c4d7..d3476679ff 100644 --- a/core/vector.h +++ b/core/vector.h @@ -34,7 +34,7 @@ /** * @class Vector * @author Juan Linietsky - * Vector container. Regular Vector Container. Use with care and for smaller arrays when possible. Use PoolVector for large arrays. + * Vector container. Regular Vector Container. Use with care and for smaller arrays when possible. Use Vector for large arrays. */ #include "core/cowdata.h" @@ -64,12 +64,13 @@ private: public: bool push_back(T p_elem); + _FORCE_INLINE_ bool append(const T &p_elem) { return push_back(p_elem); } //alias void remove(int p_index) { _cowdata.remove(p_index); } void erase(const T &p_val) { int idx = find(p_val); if (idx >= 0) remove(idx); - }; + } void invert(); _FORCE_INLINE_ T *ptrw() { return _cowdata.ptrw(); } @@ -123,6 +124,30 @@ public: return *this; } + Vector<T> subarray(int p_from, int p_to) const { + + if (p_from < 0) { + p_from = size() + p_from; + } + if (p_to < 0) { + p_to = size() + p_to; + } + + ERR_FAIL_INDEX_V(p_from, size(), Vector<T>()); + ERR_FAIL_INDEX_V(p_to, size(), Vector<T>()); + + Vector<T> slice; + int span = 1 + p_to - p_from; + slice.resize(span); + const T *r = ptr(); + T *w = slice.ptrw(); + for (int i = 0; i < span; ++i) { + w[i] = r[p_from + i]; + } + + return slice; + } + _FORCE_INLINE_ ~Vector() {} }; diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml index 439937e4f5..3d22c5c6ed 100644 --- a/doc/classes/@GlobalScope.xml +++ b/doc/classes/@GlobalScope.xml @@ -30,6 +30,9 @@ <member name="Geometry" type="Geometry" setter="" getter=""> The [Geometry] singleton. </member> + <member name="GodotSharp" type="GodotSharp" setter="" getter=""> + The [GodotSharp] singleton. Only available when using Godot's Mono build. + </member> <member name="IP" type="IP" setter="" getter=""> The [IP] singleton. </member> @@ -50,7 +53,7 @@ The [JavaScript] singleton. [b]Note:[/b] Only implemented on HTML5. </member> - <member name="Marshalls" type="Reference" setter="" getter=""> + <member name="Marshalls" type="Marshalls" setter="" getter=""> The [Marshalls] singleton. </member> <member name="Navigation2DServer" type="Navigation2DServer" setter="" getter=""> @@ -1477,70 +1480,94 @@ <constant name="TYPE_VECTOR2" value="5" enum="Variant.Type"> Variable is of type [Vector2]. </constant> - <constant name="TYPE_RECT2" value="6" enum="Variant.Type"> + <constant name="TYPE_VECTOR2I" value="6" enum="Variant.Type"> + Variable is of type [Vector2i]. + </constant> + <constant name="TYPE_RECT2" value="7" enum="Variant.Type"> Variable is of type [Rect2]. </constant> - <constant name="TYPE_VECTOR3" value="7" enum="Variant.Type"> + <constant name="TYPE_RECT2I" value="8" enum="Variant.Type"> + Variable is of type [Rect2i]. + </constant> + <constant name="TYPE_VECTOR3" value="9" enum="Variant.Type"> Variable is of type [Vector3]. </constant> - <constant name="TYPE_TRANSFORM2D" value="8" enum="Variant.Type"> + <constant name="TYPE_VECTOR3I" value="10" enum="Variant.Type"> + Variable is of type [Vector3i]. + </constant> + <constant name="TYPE_TRANSFORM2D" value="11" enum="Variant.Type"> Variable is of type [Transform2D]. </constant> - <constant name="TYPE_PLANE" value="9" enum="Variant.Type"> + <constant name="TYPE_PLANE" value="12" enum="Variant.Type"> Variable is of type [Plane]. </constant> - <constant name="TYPE_QUAT" value="10" enum="Variant.Type"> + <constant name="TYPE_QUAT" value="13" enum="Variant.Type"> Variable is of type [Quat]. </constant> - <constant name="TYPE_AABB" value="11" enum="Variant.Type"> + <constant name="TYPE_AABB" value="14" enum="Variant.Type"> Variable is of type [AABB]. </constant> - <constant name="TYPE_BASIS" value="12" enum="Variant.Type"> + <constant name="TYPE_BASIS" value="15" enum="Variant.Type"> Variable is of type [Basis]. </constant> - <constant name="TYPE_TRANSFORM" value="13" enum="Variant.Type"> + <constant name="TYPE_TRANSFORM" value="16" enum="Variant.Type"> Variable is of type [Transform]. </constant> - <constant name="TYPE_COLOR" value="14" enum="Variant.Type"> + <constant name="TYPE_COLOR" value="17" enum="Variant.Type"> Variable is of type [Color]. </constant> - <constant name="TYPE_NODE_PATH" value="15" enum="Variant.Type"> + <constant name="TYPE_STRING_NAME" value="18" enum="Variant.Type"> + Variable is of type [StringName]. + </constant> + <constant name="TYPE_NODE_PATH" value="19" enum="Variant.Type"> Variable is of type [NodePath]. </constant> - <constant name="TYPE_RID" value="16" enum="Variant.Type"> + <constant name="TYPE_RID" value="20" enum="Variant.Type"> Variable is of type [RID]. </constant> - <constant name="TYPE_OBJECT" value="17" enum="Variant.Type"> + <constant name="TYPE_OBJECT" value="21" enum="Variant.Type"> Variable is of type [Object]. </constant> - <constant name="TYPE_DICTIONARY" value="18" enum="Variant.Type"> + <constant name="TYPE_CALLABLE" value="22" enum="Variant.Type"> + Variable is of type [Callable]. + </constant> + <constant name="TYPE_SIGNAL" value="23" enum="Variant.Type"> + Variable is of type [Signal]. + </constant> + <constant name="TYPE_DICTIONARY" value="24" enum="Variant.Type"> Variable is of type [Dictionary]. </constant> - <constant name="TYPE_ARRAY" value="19" enum="Variant.Type"> + <constant name="TYPE_ARRAY" value="25" enum="Variant.Type"> Variable is of type [Array]. </constant> - <constant name="TYPE_RAW_ARRAY" value="20" enum="Variant.Type"> - Variable is of type [PoolByteArray]. + <constant name="TYPE_RAW_ARRAY" value="26" enum="Variant.Type"> + Variable is of type [PackedByteArray]. + </constant> + <constant name="TYPE_INT32_ARRAY" value="27" enum="Variant.Type"> + Variable is of type [PackedInt32Array]. + </constant> + <constant name="TYPE_INT64_ARRAY" value="28" enum="Variant.Type"> + Variable is of type [PackedInt64Array]. </constant> - <constant name="TYPE_INT_ARRAY" value="21" enum="Variant.Type"> - Variable is of type [PoolIntArray]. + <constant name="TYPE_FLOAT32_ARRAY" value="29" enum="Variant.Type"> + Variable is of type [PackedFloat32Array]. </constant> - <constant name="TYPE_REAL_ARRAY" value="22" enum="Variant.Type"> - Variable is of type [PoolRealArray]. + <constant name="TYPE_FLOAT64_ARRAY" value="30" enum="Variant.Type"> + Variable is of type [PackedFloat64Array]. </constant> - <constant name="TYPE_STRING_ARRAY" value="23" enum="Variant.Type"> - Variable is of type [PoolStringArray]. + <constant name="TYPE_STRING_ARRAY" value="31" enum="Variant.Type"> + Variable is of type [PackedStringArray]. </constant> - <constant name="TYPE_VECTOR2_ARRAY" value="24" enum="Variant.Type"> - Variable is of type [PoolVector2Array]. + <constant name="TYPE_VECTOR2_ARRAY" value="32" enum="Variant.Type"> + Variable is of type [PackedVector2Array]. </constant> - <constant name="TYPE_VECTOR3_ARRAY" value="25" enum="Variant.Type"> - Variable is of type [PoolVector3Array]. + <constant name="TYPE_VECTOR3_ARRAY" value="33" enum="Variant.Type"> + Variable is of type [PackedVector3Array]. </constant> - <constant name="TYPE_COLOR_ARRAY" value="26" enum="Variant.Type"> - Variable is of type [PoolColorArray]. + <constant name="TYPE_COLOR_ARRAY" value="34" enum="Variant.Type"> + Variable is of type [PackedColorArray]. </constant> - <constant name="TYPE_MAX" value="27" enum="Variant.Type"> + <constant name="TYPE_MAX" value="35" enum="Variant.Type"> Represents the size of the [enum Variant.Type] enum. </constant> <constant name="OP_EQUAL" value="0" enum="Variant.Operator"> diff --git a/doc/classes/ARVRInterface.xml b/doc/classes/ARVRInterface.xml index d9757ad023..0727bda668 100644 --- a/doc/classes/ARVRInterface.xml +++ b/doc/classes/ARVRInterface.xml @@ -26,7 +26,7 @@ </description> </method> <method name="get_name" qualifiers="const"> - <return type="String"> + <return type="StringName"> </return> <description> Returns the name of this interface (OpenVR, OpenHMD, ARKit, etc). diff --git a/doc/classes/ARVRPositionalTracker.xml b/doc/classes/ARVRPositionalTracker.xml index a151f8d652..9225717978 100644 --- a/doc/classes/ARVRPositionalTracker.xml +++ b/doc/classes/ARVRPositionalTracker.xml @@ -34,7 +34,7 @@ </description> </method> <method name="get_name" qualifiers="const"> - <return type="String"> + <return type="StringName"> </return> <description> Returns the controller or anchor point's name if available. diff --git a/doc/classes/ARVRServer.xml b/doc/classes/ARVRServer.xml index 6f0e4488fa..6db7121858 100644 --- a/doc/classes/ARVRServer.xml +++ b/doc/classes/ARVRServer.xml @@ -120,21 +120,21 @@ </members> <signals> <signal name="interface_added"> - <argument index="0" name="interface_name" type="String"> + <argument index="0" name="interface_name" type="StringName"> </argument> <description> Emitted when a new interface has been added. </description> </signal> <signal name="interface_removed"> - <argument index="0" name="interface_name" type="String"> + <argument index="0" name="interface_name" type="StringName"> </argument> <description> Emitted when an interface is removed. </description> </signal> <signal name="tracker_added"> - <argument index="0" name="tracker_name" type="String"> + <argument index="0" name="tracker_name" type="StringName"> </argument> <argument index="1" name="type" type="int"> </argument> @@ -145,7 +145,7 @@ </description> </signal> <signal name="tracker_removed"> - <argument index="0" name="tracker_name" type="String"> + <argument index="0" name="tracker_name" type="StringName"> </argument> <argument index="1" name="type" type="int"> </argument> diff --git a/doc/classes/AStar.xml b/doc/classes/AStar.xml index ccbb033444..e930abba87 100644 --- a/doc/classes/AStar.xml +++ b/doc/classes/AStar.xml @@ -152,7 +152,7 @@ </description> </method> <method name="get_id_path"> - <return type="PoolIntArray"> + <return type="PackedInt32Array"> </return> <argument index="0" name="from_id" type="int"> </argument> @@ -185,7 +185,7 @@ </description> </method> <method name="get_point_connections"> - <return type="PoolIntArray"> + <return type="PackedInt32Array"> </return> <argument index="0" name="id" type="int"> </argument> @@ -213,7 +213,7 @@ </description> </method> <method name="get_point_path"> - <return type="PoolVector3Array"> + <return type="PackedVector3Array"> </return> <argument index="0" name="from_id" type="int"> </argument> diff --git a/doc/classes/AStar2D.xml b/doc/classes/AStar2D.xml index d620ef2a79..2639f62552 100644 --- a/doc/classes/AStar2D.xml +++ b/doc/classes/AStar2D.xml @@ -111,7 +111,7 @@ </description> </method> <method name="get_id_path"> - <return type="PoolIntArray"> + <return type="PackedInt32Array"> </return> <argument index="0" name="from_id" type="int"> </argument> @@ -144,7 +144,7 @@ </description> </method> <method name="get_point_connections"> - <return type="PoolIntArray"> + <return type="PackedInt32Array"> </return> <argument index="0" name="id" type="int"> </argument> @@ -172,7 +172,7 @@ </description> </method> <method name="get_point_path"> - <return type="PoolVector2Array"> + <return type="PackedVector2Array"> </return> <argument index="0" name="from_id" type="int"> </argument> diff --git a/doc/classes/AcceptDialog.xml b/doc/classes/AcceptDialog.xml index b0b9c155bb..01540383dc 100644 --- a/doc/classes/AcceptDialog.xml +++ b/doc/classes/AcceptDialog.xml @@ -76,7 +76,7 @@ </description> </signal> <signal name="custom_action"> - <argument index="0" name="action" type="String"> + <argument index="0" name="action" type="StringName"> </argument> <description> Emitted when a custom button is pressed. See [method add_button]. diff --git a/doc/classes/AnimatedSprite.xml b/doc/classes/AnimatedSprite.xml index 3caad10f6d..03c23b6fdd 100644 --- a/doc/classes/AnimatedSprite.xml +++ b/doc/classes/AnimatedSprite.xml @@ -19,7 +19,7 @@ <method name="play"> <return type="void"> </return> - <argument index="0" name="anim" type="String" default=""""> + <argument index="0" name="anim" type="StringName" default="@"""> </argument> <argument index="1" name="backwards" type="bool" default="false"> </argument> @@ -36,7 +36,7 @@ </method> </methods> <members> - <member name="animation" type="String" setter="set_animation" getter="get_animation" default=""default""> + <member name="animation" type="StringName" setter="set_animation" getter="get_animation" default="@"default""> The current animation from the [code]frames[/code] resource. If this value changes, the [code]frame[/code] counter is reset. </member> <member name="centered" type="bool" setter="set_centered" getter="is_centered" default="true"> diff --git a/doc/classes/AnimatedSprite3D.xml b/doc/classes/AnimatedSprite3D.xml index e24119c6c7..ad9706a52a 100644 --- a/doc/classes/AnimatedSprite3D.xml +++ b/doc/classes/AnimatedSprite3D.xml @@ -19,7 +19,7 @@ <method name="play"> <return type="void"> </return> - <argument index="0" name="anim" type="String" default=""""> + <argument index="0" name="anim" type="StringName" default="@"""> </argument> <description> Plays the animation named [code]anim[/code]. If no [code]anim[/code] is provided, the current animation is played. @@ -34,7 +34,7 @@ </method> </methods> <members> - <member name="animation" type="String" setter="set_animation" getter="get_animation" default=""default""> + <member name="animation" type="StringName" setter="set_animation" getter="get_animation" default="@"default""> The current animation from the [code]frames[/code] resource. If this value changes, the [code]frame[/code] counter is reset. </member> <member name="frame" type="int" setter="set_frame" getter="get_frame" default="0"> diff --git a/doc/classes/Animation.xml b/doc/classes/Animation.xml index f77dfdc9a1..0926ef9855 100644 --- a/doc/classes/Animation.xml +++ b/doc/classes/Animation.xml @@ -32,7 +32,7 @@ </description> </method> <method name="animation_track_get_key_animation" qualifiers="const"> - <return type="String"> + <return type="StringName"> </return> <argument index="0" name="track_idx" type="int"> </argument> @@ -48,7 +48,7 @@ </argument> <argument index="1" name="time" type="float"> </argument> - <argument index="2" name="animation" type="String"> + <argument index="2" name="animation" type="StringName"> </argument> <description> </description> @@ -60,7 +60,7 @@ </argument> <argument index="1" name="key_idx" type="int"> </argument> - <argument index="2" name="animation" type="String"> + <argument index="2" name="animation" type="StringName"> </argument> <description> </description> @@ -274,7 +274,7 @@ </description> </method> <method name="method_track_get_key_indices" qualifiers="const"> - <return type="PoolIntArray"> + <return type="PackedInt32Array"> </return> <argument index="0" name="track_idx" type="int"> </argument> @@ -287,7 +287,7 @@ </description> </method> <method name="method_track_get_name" qualifiers="const"> - <return type="String"> + <return type="StringName"> </return> <argument index="0" name="track_idx" type="int"> </argument> @@ -627,7 +627,7 @@ </description> </method> <method name="value_track_get_key_indices" qualifiers="const"> - <return type="PoolIntArray"> + <return type="PackedInt32Array"> </return> <argument index="0" name="track_idx" type="int"> </argument> diff --git a/doc/classes/AnimationNode.xml b/doc/classes/AnimationNode.xml index 331a30bd9e..3d6ebd5934 100644 --- a/doc/classes/AnimationNode.xml +++ b/doc/classes/AnimationNode.xml @@ -23,7 +23,7 @@ <method name="blend_animation"> <return type="void"> </return> - <argument index="0" name="animation" type="String"> + <argument index="0" name="animation" type="StringName"> </argument> <argument index="1" name="time" type="float"> </argument> @@ -59,7 +59,7 @@ <method name="blend_node"> <return type="float"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <argument index="1" name="node" type="AnimationNode"> </argument> @@ -119,7 +119,7 @@ <method name="get_parameter" qualifiers="const"> <return type="Variant"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <description> Gets the value of a parameter. Parameters are custom local memory used for your nodes, given a resource can be reused in multiple trees. @@ -128,7 +128,7 @@ <method name="get_parameter_default_value" qualifiers="virtual"> <return type="Variant"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <description> Gets the default value of a parameter. Parameters are custom local memory used for your nodes, given a resource can be reused in multiple trees. @@ -142,7 +142,7 @@ </description> </method> <method name="has_filter" qualifiers="virtual"> - <return type="String"> + <return type="bool"> </return> <description> Returns [code]true[/code] whether you want the blend tree editor to display filter editing on this node. @@ -193,7 +193,7 @@ <method name="set_parameter"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <argument index="1" name="value" type="Variant"> </argument> diff --git a/doc/classes/AnimationNodeAnimation.xml b/doc/classes/AnimationNodeAnimation.xml index 369969a2d4..ab44148c15 100644 --- a/doc/classes/AnimationNodeAnimation.xml +++ b/doc/classes/AnimationNodeAnimation.xml @@ -12,7 +12,7 @@ <methods> </methods> <members> - <member name="animation" type="String" setter="set_animation" getter="get_animation" default=""""> + <member name="animation" type="StringName" setter="set_animation" getter="get_animation" default="@"""> Animation to use as an output. It is one of the animations provided by [member AnimationTree.anim_player]. </member> </members> diff --git a/doc/classes/AnimationNodeBlendTree.xml b/doc/classes/AnimationNodeBlendTree.xml index 5a86af6865..0befb79577 100644 --- a/doc/classes/AnimationNodeBlendTree.xml +++ b/doc/classes/AnimationNodeBlendTree.xml @@ -11,7 +11,7 @@ <method name="add_node"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <argument index="1" name="node" type="AnimationNode"> </argument> @@ -23,11 +23,11 @@ <method name="connect_node"> <return type="void"> </return> - <argument index="0" name="input_node" type="String"> + <argument index="0" name="input_node" type="StringName"> </argument> <argument index="1" name="input_index" type="int"> </argument> - <argument index="2" name="output_node" type="String"> + <argument index="2" name="output_node" type="StringName"> </argument> <description> </description> @@ -35,7 +35,7 @@ <method name="disconnect_node"> <return type="void"> </return> - <argument index="0" name="input_node" type="String"> + <argument index="0" name="input_node" type="StringName"> </argument> <argument index="1" name="input_index" type="int"> </argument> @@ -45,7 +45,7 @@ <method name="get_node" qualifiers="const"> <return type="AnimationNode"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <description> </description> @@ -53,7 +53,7 @@ <method name="get_node_position" qualifiers="const"> <return type="Vector2"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <description> </description> @@ -61,7 +61,7 @@ <method name="has_node" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <description> </description> @@ -69,7 +69,7 @@ <method name="remove_node"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <description> </description> @@ -77,9 +77,9 @@ <method name="rename_node"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="new_name" type="String"> + <argument index="1" name="new_name" type="StringName"> </argument> <description> </description> @@ -87,7 +87,7 @@ <method name="set_node_position"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <argument index="1" name="position" type="Vector2"> </argument> diff --git a/doc/classes/AnimationNodeStateMachine.xml b/doc/classes/AnimationNodeStateMachine.xml index 39a9af5ead..b647ff70b8 100644 --- a/doc/classes/AnimationNodeStateMachine.xml +++ b/doc/classes/AnimationNodeStateMachine.xml @@ -18,7 +18,7 @@ <method name="add_node"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <argument index="1" name="node" type="AnimationNode"> </argument> @@ -31,9 +31,9 @@ <method name="add_transition"> <return type="void"> </return> - <argument index="0" name="from" type="String"> + <argument index="0" name="from" type="StringName"> </argument> - <argument index="1" name="to" type="String"> + <argument index="1" name="to" type="StringName"> </argument> <argument index="2" name="transition" type="AnimationNodeStateMachineTransition"> </argument> @@ -58,14 +58,14 @@ <method name="get_node" qualifiers="const"> <return type="AnimationNode"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <description> Returns the animation node with the given name. </description> </method> <method name="get_node_name" qualifiers="const"> - <return type="String"> + <return type="StringName"> </return> <argument index="0" name="node" type="AnimationNode"> </argument> @@ -76,7 +76,7 @@ <method name="get_node_position" qualifiers="const"> <return type="Vector2"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <description> Returns the given node's coordinates. Used for display in the editor. @@ -106,7 +106,7 @@ </description> </method> <method name="get_transition_from" qualifiers="const"> - <return type="String"> + <return type="StringName"> </return> <argument index="0" name="idx" type="int"> </argument> @@ -115,7 +115,7 @@ </description> </method> <method name="get_transition_to" qualifiers="const"> - <return type="String"> + <return type="StringName"> </return> <argument index="0" name="idx" type="int"> </argument> @@ -126,7 +126,7 @@ <method name="has_node" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <description> Returns [code]true[/code] if the graph contains the given node. @@ -135,9 +135,9 @@ <method name="has_transition" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="from" type="String"> + <argument index="0" name="from" type="StringName"> </argument> - <argument index="1" name="to" type="String"> + <argument index="1" name="to" type="StringName"> </argument> <description> Returns [code]true[/code] if there is a transition between the given nodes. @@ -146,7 +146,7 @@ <method name="remove_node"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <description> Deletes the given node from the graph. @@ -155,9 +155,9 @@ <method name="remove_transition"> <return type="void"> </return> - <argument index="0" name="from" type="String"> + <argument index="0" name="from" type="StringName"> </argument> - <argument index="1" name="to" type="String"> + <argument index="1" name="to" type="StringName"> </argument> <description> Deletes the transition between the two specified nodes. @@ -175,9 +175,9 @@ <method name="rename_node"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="new_name" type="String"> + <argument index="1" name="new_name" type="StringName"> </argument> <description> Renames the given node. @@ -186,7 +186,7 @@ <method name="set_end_node"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <description> Sets the given node as the graph end point. @@ -204,7 +204,7 @@ <method name="set_node_position"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <argument index="1" name="position" type="Vector2"> </argument> @@ -215,7 +215,7 @@ <method name="set_start_node"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <description> Sets the given node as the graph start point. diff --git a/doc/classes/AnimationNodeStateMachinePlayback.xml b/doc/classes/AnimationNodeStateMachinePlayback.xml index 0198237bed..f4b89a5086 100644 --- a/doc/classes/AnimationNodeStateMachinePlayback.xml +++ b/doc/classes/AnimationNodeStateMachinePlayback.xml @@ -16,14 +16,14 @@ </tutorials> <methods> <method name="get_current_node" qualifiers="const"> - <return type="String"> + <return type="StringName"> </return> <description> Returns the currently playing animation state. </description> </method> <method name="get_travel_path" qualifiers="const"> - <return type="PoolStringArray"> + <return type="PackedStringArray"> </return> <description> Returns the current travel path as computed internally by the A* algorithm. @@ -39,7 +39,7 @@ <method name="start"> <return type="void"> </return> - <argument index="0" name="node" type="String"> + <argument index="0" name="node" type="StringName"> </argument> <description> Starts playing the given animation. @@ -55,7 +55,7 @@ <method name="travel"> <return type="void"> </return> - <argument index="0" name="to_node" type="String"> + <argument index="0" name="to_node" type="StringName"> </argument> <description> Transitions from the current state to another one, following the shortest path. diff --git a/doc/classes/AnimationNodeStateMachineTransition.xml b/doc/classes/AnimationNodeStateMachineTransition.xml index d40a6f1e46..f0b7cc4099 100644 --- a/doc/classes/AnimationNodeStateMachineTransition.xml +++ b/doc/classes/AnimationNodeStateMachineTransition.xml @@ -10,7 +10,7 @@ <methods> </methods> <members> - <member name="advance_condition" type="String" setter="set_advance_condition" getter="get_advance_condition" default=""""> + <member name="advance_condition" type="StringName" setter="set_advance_condition" getter="get_advance_condition" default="@"""> Turn on auto advance when this condition is set. The provided name will become a boolean parameter on the [AnimationTree] that can be controlled from code (see [url=https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html#controlling-from-code][/url]). For example, if [member AnimationTree.tree_root] is an [AnimationNodeStateMachine] and [member advance_condition] is set to [code]"idle"[/code]: [codeblock] $animation_tree["parameters/conditions/idle"] = is_on_floor and (linear_velocity.x == 0) diff --git a/doc/classes/AnimationPlayer.xml b/doc/classes/AnimationPlayer.xml index 3e8315f686..1420b1bf64 100644 --- a/doc/classes/AnimationPlayer.xml +++ b/doc/classes/AnimationPlayer.xml @@ -16,7 +16,7 @@ <method name="add_animation"> <return type="int" enum="Error"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <argument index="1" name="animation" type="Animation"> </argument> @@ -34,9 +34,9 @@ </description> </method> <method name="animation_get_next" qualifiers="const"> - <return type="String"> + <return type="StringName"> </return> - <argument index="0" name="anim_from" type="String"> + <argument index="0" name="anim_from" type="StringName"> </argument> <description> Returns the name of the next animation in the queue. @@ -45,9 +45,9 @@ <method name="animation_set_next"> <return type="void"> </return> - <argument index="0" name="anim_from" type="String"> + <argument index="0" name="anim_from" type="StringName"> </argument> - <argument index="1" name="anim_to" type="String"> + <argument index="1" name="anim_to" type="StringName"> </argument> <description> Triggers the [code]anim_to[/code] animation when the [code]anim_from[/code] animation completes. @@ -68,7 +68,7 @@ </description> </method> <method name="find_animation" qualifiers="const"> - <return type="String"> + <return type="StringName"> </return> <argument index="0" name="animation" type="Animation"> </argument> @@ -79,14 +79,14 @@ <method name="get_animation" qualifiers="const"> <return type="Animation"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <description> Returns the [Animation] with key [code]name[/code] or [code]null[/code] if not found. </description> </method> <method name="get_animation_list" qualifiers="const"> - <return type="PoolStringArray"> + <return type="PackedStringArray"> </return> <description> Returns the list of stored animation names. @@ -95,9 +95,9 @@ <method name="get_blend_time" qualifiers="const"> <return type="float"> </return> - <argument index="0" name="anim_from" type="String"> + <argument index="0" name="anim_from" type="StringName"> </argument> - <argument index="1" name="anim_to" type="String"> + <argument index="1" name="anim_to" type="StringName"> </argument> <description> Gets the blend time (in seconds) between two animations, referenced by their names. @@ -111,7 +111,7 @@ </description> </method> <method name="get_queue"> - <return type="PoolStringArray"> + <return type="PackedStringArray"> </return> <description> Returns a list of the animation names that are currently queued to play. @@ -120,7 +120,7 @@ <method name="has_animation" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <description> Returns [code]true[/code] if the [AnimationPlayer] stores an [Animation] with key [code]name[/code]. @@ -136,7 +136,7 @@ <method name="play"> <return type="void"> </return> - <argument index="0" name="name" type="String" default=""""> + <argument index="0" name="name" type="StringName" default=""""> </argument> <argument index="1" name="custom_blend" type="float" default="-1"> </argument> @@ -153,7 +153,7 @@ <method name="play_backwards"> <return type="void"> </return> - <argument index="0" name="name" type="String" default=""""> + <argument index="0" name="name" type="StringName" default=""""> </argument> <argument index="1" name="custom_blend" type="float" default="-1"> </argument> @@ -165,7 +165,7 @@ <method name="queue"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <description> Queues an animation for playback once the current one is done. @@ -175,7 +175,7 @@ <method name="remove_animation"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <description> Removes the animation with key [code]name[/code]. @@ -184,9 +184,9 @@ <method name="rename_animation"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="newname" type="String"> + <argument index="1" name="newname" type="StringName"> </argument> <description> Renames an existing animation with key [code]name[/code] to [code]newname[/code]. @@ -206,9 +206,9 @@ <method name="set_blend_time"> <return type="void"> </return> - <argument index="0" name="anim_from" type="String"> + <argument index="0" name="anim_from" type="StringName"> </argument> - <argument index="1" name="anim_to" type="String"> + <argument index="1" name="anim_to" type="StringName"> </argument> <argument index="2" name="sec" type="float"> </argument> @@ -264,23 +264,23 @@ </members> <signals> <signal name="animation_changed"> - <argument index="0" name="old_name" type="String"> + <argument index="0" name="old_name" type="StringName"> </argument> - <argument index="1" name="new_name" type="String"> + <argument index="1" name="new_name" type="StringName"> </argument> <description> If the currently being played animation changes, this signal will notify of such change. </description> </signal> <signal name="animation_finished"> - <argument index="0" name="anim_name" type="String"> + <argument index="0" name="anim_name" type="StringName"> </argument> <description> Notifies when an animation finished playing. </description> </signal> <signal name="animation_started"> - <argument index="0" name="anim_name" type="String"> + <argument index="0" name="anim_name" type="StringName"> </argument> <description> Notifies when an animation starts playing. diff --git a/doc/classes/Area.xml b/doc/classes/Area.xml index f2f9284ae3..b273a7a9d9 100644 --- a/doc/classes/Area.xml +++ b/doc/classes/Area.xml @@ -89,7 +89,7 @@ <member name="angular_damp" type="float" setter="set_angular_damp" getter="get_angular_damp" default="0.1"> The rate at which objects stop spinning in this area. Represents the angular velocity lost per second. Values range from [code]0[/code] (no damping) to [code]1[/code] (full damping). </member> - <member name="audio_bus_name" type="String" setter="set_audio_bus" getter="get_audio_bus" default=""Master""> + <member name="audio_bus_name" type="StringName" setter="set_audio_bus" getter="get_audio_bus" default="@"Master""> The name of the area's audio bus. </member> <member name="audio_bus_override" type="bool" setter="set_audio_bus_override" getter="is_overriding_audio_bus" default="false"> @@ -131,7 +131,7 @@ <member name="reverb_bus_enable" type="bool" setter="set_use_reverb_bus" getter="is_using_reverb_bus" default="false"> If [code]true[/code], the area applies reverb to its associated audio. </member> - <member name="reverb_bus_name" type="String" setter="set_reverb_bus" getter="get_reverb_bus" default=""Master""> + <member name="reverb_bus_name" type="StringName" setter="set_reverb_bus" getter="get_reverb_bus" default="@"Master""> The reverb bus name to use for this area's associated audio. </member> <member name="reverb_bus_uniformity" type="float" setter="set_reverb_uniformity" getter="get_reverb_uniformity" default="0.0"> diff --git a/doc/classes/Area2D.xml b/doc/classes/Area2D.xml index 715e9b3286..0c1317f19d 100644 --- a/doc/classes/Area2D.xml +++ b/doc/classes/Area2D.xml @@ -90,7 +90,7 @@ <member name="angular_damp" type="float" setter="set_angular_damp" getter="get_angular_damp" default="1.0"> The rate at which objects stop spinning in this area. Represents the angular velocity lost per second. Values range from [code]0[/code] (no damping) to [code]1[/code] (full damping). </member> - <member name="audio_bus_name" type="String" setter="set_audio_bus_name" getter="get_audio_bus_name" default=""Master""> + <member name="audio_bus_name" type="StringName" setter="set_audio_bus_name" getter="get_audio_bus_name" default="@"Master""> The name of the area's audio bus. </member> <member name="audio_bus_override" type="bool" setter="set_audio_bus_override" getter="is_overriding_audio_bus" default="false"> diff --git a/doc/classes/Array.xml b/doc/classes/Array.xml index 08455bb7bc..a294967fc9 100644 --- a/doc/classes/Array.xml +++ b/doc/classes/Array.xml @@ -22,67 +22,87 @@ <method name="Array"> <return type="Array"> </return> - <argument index="0" name="from" type="PoolColorArray"> + <argument index="0" name="from" type="PackedColorArray"> </argument> <description> - Constructs an array from a [PoolColorArray]. + Constructs an array from a [PackedColorArray]. </description> </method> <method name="Array"> <return type="Array"> </return> - <argument index="0" name="from" type="PoolVector3Array"> + <argument index="0" name="from" type="PackedVector3Array"> </argument> <description> - Constructs an array from a [PoolVector3Array]. + Constructs an array from a [PackedVector3Array]. </description> </method> <method name="Array"> <return type="Array"> </return> - <argument index="0" name="from" type="PoolVector2Array"> + <argument index="0" name="from" type="PackedVector2Array"> </argument> <description> - Constructs an array from a [PoolVector2Array]. + Constructs an array from a [PackedVector2Array]. </description> </method> <method name="Array"> <return type="Array"> </return> - <argument index="0" name="from" type="PoolStringArray"> + <argument index="0" name="from" type="PackedStringArray"> </argument> <description> - Constructs an array from a [PoolStringArray]. + Constructs an array from a [PackedStringArray]. </description> </method> <method name="Array"> <return type="Array"> </return> - <argument index="0" name="from" type="PoolRealArray"> + <argument index="0" name="from" type="PackedFloat64Array"> </argument> <description> - Constructs an array from a [PoolRealArray]. + Constructs an array from a [PackedFloat64Array]. </description> </method> <method name="Array"> <return type="Array"> </return> - <argument index="0" name="from" type="PoolIntArray"> + <argument index="0" name="from" type="PackedFloat32Array"> </argument> <description> - Constructs an array from a [PoolIntArray]. + Constructs an array from a [PackedFloat32Array]. </description> </method> <method name="Array"> <return type="Array"> </return> - <argument index="0" name="from" type="PoolByteArray"> + <argument index="0" name="from" type="PackedInt64Array"> </argument> <description> - Constructs an array from a [PoolByteArray]. + Constructs an array from a [PackedInt64Array]. + </description> + </method> + <method name="Array"> + <return type="Array"> + </return> + <argument index="0" name="from" type="PackedInt32Array"> + </argument> + <description> + Constructs an array from a [PackedInt32Array]. + </description> + </method> + <method name="Array"> + <return type="Array"> + </return> + <argument index="0" name="from" type="PackedByteArray"> + </argument> + <description> + Constructs an array from a [PackedByteArray]. </description> </method> <method name="append"> + <return type="void"> + </return> <argument index="0" name="value" type="Variant"> </argument> <description> @@ -90,7 +110,7 @@ </description> </method> <method name="back"> - <return type="Variant"> + <return type="void"> </return> <description> Returns the last element of the array, or [code]null[/code] if the array is empty. @@ -125,6 +145,8 @@ </description> </method> <method name="clear"> + <return type="void"> + </return> <description> Clears the array. This is equivalent to using [method resize] with a size of [code]0[/code]. </description> @@ -156,6 +178,8 @@ </description> </method> <method name="erase"> + <return type="void"> + </return> <argument index="0" name="value" type="Variant"> </argument> <description> @@ -183,7 +207,7 @@ </description> </method> <method name="front"> - <return type="Variant"> + <return type="void"> </return> <description> Returns the first element of the array, or [code]null[/code] if the array is empty. @@ -212,6 +236,8 @@ </description> </method> <method name="insert"> + <return type="void"> + </return> <argument index="0" name="position" type="int"> </argument> <argument index="1" name="value" type="Variant"> @@ -221,39 +247,43 @@ </description> </method> <method name="invert"> + <return type="void"> + </return> <description> Reverses the order of the elements in the array. </description> </method> <method name="max"> - <return type="Variant"> + <return type="void"> </return> <description> Returns the maximum value contained in the array if all elements are of comparable types. If the elements can't be compared, [code]null[/code] is returned. </description> </method> <method name="min"> - <return type="Variant"> + <return type="void"> </return> <description> Returns the minimum value contained in the array if all elements are of comparable types. If the elements can't be compared, [code]null[/code] is returned. </description> </method> <method name="pop_back"> - <return type="Variant"> + <return type="void"> </return> <description> Removes and returns the last element of the array. Returns [code]null[/code] if the array is empty. </description> </method> <method name="pop_front"> - <return type="Variant"> + <return type="void"> </return> <description> Removes and returns the first element of the array. Returns [code]null[/code] if the array is empty. </description> </method> <method name="push_back"> + <return type="void"> + </return> <argument index="0" name="value" type="Variant"> </argument> <description> @@ -261,6 +291,8 @@ </description> </method> <method name="push_front"> + <return type="void"> + </return> <argument index="0" name="value" type="Variant"> </argument> <description> @@ -268,6 +300,8 @@ </description> </method> <method name="remove"> + <return type="void"> + </return> <argument index="0" name="position" type="int"> </argument> <description> @@ -275,6 +309,8 @@ </description> </method> <method name="resize"> + <return type="void"> + </return> <argument index="0" name="size" type="int"> </argument> <description> @@ -293,6 +329,8 @@ </description> </method> <method name="shuffle"> + <return type="void"> + </return> <description> Shuffles the array such that the items will have a random order. This method uses the global random number generator common to methods such as [method @GDScript.randi]. Call [method @GDScript.randomize] to ensure that a new seed will be used each time if you want non-reproducible shuffling. </description> @@ -320,6 +358,8 @@ </description> </method> <method name="sort"> + <return type="void"> + </return> <description> Sorts the array. [b]Note:[/b] Strings are sorted in alphabetical order (as opposed to natural order). This may lead to unexpected behavior when sorting an array of strings ending with a sequence of numbers. Consider the following example: @@ -331,6 +371,8 @@ </description> </method> <method name="sort_custom"> + <return type="void"> + </return> <argument index="0" name="obj" type="Object"> </argument> <argument index="1" name="func" type="String"> diff --git a/doc/classes/ArrayMesh.xml b/doc/classes/ArrayMesh.xml index 2dbf55e522..33b62054df 100644 --- a/doc/classes/ArrayMesh.xml +++ b/doc/classes/ArrayMesh.xml @@ -7,7 +7,7 @@ The [ArrayMesh] is used to construct a [Mesh] by specifying the attributes as arrays. The most basic example is the creation of a single triangle: [codeblock] - var vertices = PoolVector3Array() + var vertices = PackedVector3Array() vertices.push_back(Vector3(0, 1, 0)) vertices.push_back(Vector3(1, 0, 0)) vertices.push_back(Vector3(0, 0, 1)) @@ -30,7 +30,7 @@ <method name="add_blend_shape"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <description> Adds name for a blend shape that will be added with [method add_surface_from_arrays]. Must be called before surface is added. @@ -80,7 +80,7 @@ </description> </method> <method name="get_blend_shape_name" qualifiers="const"> - <return type="String"> + <return type="StringName"> </return> <argument index="0" name="index" type="int"> </argument> @@ -178,7 +178,7 @@ </argument> <argument index="1" name="offset" type="int"> </argument> - <argument index="2" name="data" type="PoolByteArray"> + <argument index="2" name="data" type="PackedByteArray"> </argument> <description> Updates a specified region of mesh arrays on the GPU. @@ -202,31 +202,31 @@ Amount of weights/bone indices per vertex (always 4). </constant> <constant name="ARRAY_VERTEX" value="0" enum="ArrayType"> - [PoolVector3Array], [PoolVector2Array], or [Array] of vertex positions. + [PackedVector3Array], [PackedVector2Array], or [Array] of vertex positions. </constant> <constant name="ARRAY_NORMAL" value="1" enum="ArrayType"> - [PoolVector3Array] of vertex normals. + [PackedVector3Array] of vertex normals. </constant> <constant name="ARRAY_TANGENT" value="2" enum="ArrayType"> - [PoolRealArray] of vertex tangents. Each element in groups of 4 floats, first 3 floats determine the tangent, and the last the binormal direction as -1 or 1. + [PackedFloat32Array] of vertex tangents. Each element in groups of 4 floats, first 3 floats determine the tangent, and the last the binormal direction as -1 or 1. </constant> <constant name="ARRAY_COLOR" value="3" enum="ArrayType"> - [PoolColorArray] of vertex colors. + [PackedColorArray] of vertex colors. </constant> <constant name="ARRAY_TEX_UV" value="4" enum="ArrayType"> - [PoolVector2Array] for UV coordinates. + [PackedVector2Array] for UV coordinates. </constant> <constant name="ARRAY_TEX_UV2" value="5" enum="ArrayType"> - [PoolVector2Array] for second UV coordinates. + [PackedVector2Array] for second UV coordinates. </constant> <constant name="ARRAY_BONES" value="6" enum="ArrayType"> - [PoolRealArray] or [PoolIntArray] of bone indices. Each element in groups of 4 floats. + [PackedFloat32Array] or [PackedInt32Array] of bone indices. Each element in groups of 4 floats. </constant> <constant name="ARRAY_WEIGHTS" value="7" enum="ArrayType"> - [PoolRealArray] of bone weights. Each element in groups of 4 floats. + [PackedFloat32Array] of bone weights. Each element in groups of 4 floats. </constant> <constant name="ARRAY_INDEX" value="8" enum="ArrayType"> - [PoolIntArray] of integers used as indices referencing vertices, colors, normals, tangents, and textures. All of those arrays must have the same number of elements as the vertex array. No index can be beyond the vertex array size. When this index array is present, it puts the function into "index mode," where the index selects the *i*'th vertex, normal, tangent, color, UV, etc. This means if you want to have different normals or colors along an edge, you have to duplicate the vertices. + [PackedInt32Array] of integers used as indices referencing vertices, colors, normals, tangents, and textures. All of those arrays must have the same number of elements as the vertex array. No index can be beyond the vertex array size. When this index array is present, it puts the function into "index mode," where the index selects the *i*'th vertex, normal, tangent, color, UV, etc. This means if you want to have different normals or colors along an edge, you have to duplicate the vertices. For triangles, the index array is interpreted as triples, referring to the vertices of each triangle. For lines, the index array is in pairs indicating the start and end of each line. </constant> <constant name="ARRAY_MAX" value="9" enum="ArrayType"> diff --git a/doc/classes/AudioEffectCompressor.xml b/doc/classes/AudioEffectCompressor.xml index fe0d63777f..3117978d8a 100644 --- a/doc/classes/AudioEffectCompressor.xml +++ b/doc/classes/AudioEffectCompressor.xml @@ -32,7 +32,7 @@ <member name="release_ms" type="float" setter="set_release_ms" getter="get_release_ms" default="250.0"> Compressor's delay time to stop reducing the signal after the signal level falls below the threshold, in milliseconds. Value can range from 20 to 2000. </member> - <member name="sidechain" type="String" setter="set_sidechain" getter="get_sidechain" default=""""> + <member name="sidechain" type="StringName" setter="set_sidechain" getter="get_sidechain" default="@"""> Reduce the sound level using another audio bus for threshold detection. </member> <member name="threshold" type="float" setter="set_threshold" getter="get_threshold" default="0.0"> diff --git a/doc/classes/AudioServer.xml b/doc/classes/AudioServer.xml index 72acf616a9..49c6f5bb34 100644 --- a/doc/classes/AudioServer.xml +++ b/doc/classes/AudioServer.xml @@ -107,7 +107,7 @@ <method name="get_bus_index" qualifiers="const"> <return type="int"> </return> - <argument index="0" name="bus_name" type="String"> + <argument index="0" name="bus_name" type="StringName"> </argument> <description> Returns the index of the bus with the name [code]bus_name[/code]. @@ -145,7 +145,7 @@ </description> </method> <method name="get_bus_send" qualifiers="const"> - <return type="String"> + <return type="StringName"> </return> <argument index="0" name="bus_idx" type="int"> </argument> @@ -341,7 +341,7 @@ </return> <argument index="0" name="bus_idx" type="int"> </argument> - <argument index="1" name="send" type="String"> + <argument index="1" name="send" type="StringName"> </argument> <description> Connects the output of the bus at [code]bus_idx[/code] to the bus named [code]send[/code]. diff --git a/doc/classes/AudioStreamGeneratorPlayback.xml b/doc/classes/AudioStreamGeneratorPlayback.xml index 2552cd50a4..e3e17b8a93 100644 --- a/doc/classes/AudioStreamGeneratorPlayback.xml +++ b/doc/classes/AudioStreamGeneratorPlayback.xml @@ -37,7 +37,7 @@ <method name="push_buffer"> <return type="bool"> </return> - <argument index="0" name="frames" type="PoolVector2Array"> + <argument index="0" name="frames" type="PackedVector2Array"> </argument> <description> </description> diff --git a/doc/classes/AudioStreamPlayer.xml b/doc/classes/AudioStreamPlayer.xml index 2d65defad3..eab6505734 100644 --- a/doc/classes/AudioStreamPlayer.xml +++ b/doc/classes/AudioStreamPlayer.xml @@ -54,7 +54,7 @@ <member name="autoplay" type="bool" setter="set_autoplay" getter="is_autoplay_enabled" default="false"> If [code]true[/code], audio plays when added to scene tree. </member> - <member name="bus" type="String" setter="set_bus" getter="get_bus" default=""Master""> + <member name="bus" type="StringName" setter="set_bus" getter="get_bus" default="@"Master""> Bus on which this audio is playing. </member> <member name="mix_target" type="int" setter="set_mix_target" getter="get_mix_target" enum="AudioStreamPlayer.MixTarget" default="0"> diff --git a/doc/classes/AudioStreamPlayer2D.xml b/doc/classes/AudioStreamPlayer2D.xml index 66254b504a..fdbef1b89e 100644 --- a/doc/classes/AudioStreamPlayer2D.xml +++ b/doc/classes/AudioStreamPlayer2D.xml @@ -60,7 +60,7 @@ <member name="autoplay" type="bool" setter="set_autoplay" getter="is_autoplay_enabled" default="false"> If [code]true[/code], audio plays when added to scene tree. </member> - <member name="bus" type="String" setter="set_bus" getter="get_bus" default=""Master""> + <member name="bus" type="StringName" setter="set_bus" getter="get_bus" default="@"Master""> Bus on which this audio is playing. </member> <member name="max_distance" type="float" setter="set_max_distance" getter="get_max_distance" default="2000.0"> diff --git a/doc/classes/AudioStreamPlayer3D.xml b/doc/classes/AudioStreamPlayer3D.xml index f476bec323..4ec8dba2c6 100644 --- a/doc/classes/AudioStreamPlayer3D.xml +++ b/doc/classes/AudioStreamPlayer3D.xml @@ -66,7 +66,7 @@ <member name="autoplay" type="bool" setter="set_autoplay" getter="is_autoplay_enabled" default="false"> If [code]true[/code], audio plays when added to scene tree. </member> - <member name="bus" type="String" setter="set_bus" getter="get_bus" default=""Master""> + <member name="bus" type="StringName" setter="set_bus" getter="get_bus" default="@"Master""> Bus on which this audio is playing. </member> <member name="doppler_tracking" type="int" setter="set_doppler_tracking" getter="get_doppler_tracking" enum="AudioStreamPlayer3D.DopplerTracking" default="0"> diff --git a/doc/classes/AudioStreamSample.xml b/doc/classes/AudioStreamSample.xml index 898879ae27..6d99433c90 100644 --- a/doc/classes/AudioStreamSample.xml +++ b/doc/classes/AudioStreamSample.xml @@ -22,7 +22,7 @@ </method> </methods> <members> - <member name="data" type="PoolByteArray" setter="set_data" getter="get_data" default="PoolByteArray( )"> + <member name="data" type="PackedByteArray" setter="set_data" getter="get_data" default="PackedByteArray( )"> 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> diff --git a/doc/classes/BaseMaterial3D.xml b/doc/classes/BaseMaterial3D.xml index 46a96020d0..2e4ca9677d 100644 --- a/doc/classes/BaseMaterial3D.xml +++ b/doc/classes/BaseMaterial3D.xml @@ -428,11 +428,11 @@ </constant> <constant name="TEXTURE_FILTER_LINEAR" value="1" enum="TextureFilter"> </constant> - <constant name="TEXTURE_FILTER_NEAREST_WITH_MIMPAMPS" value="2" enum="TextureFilter"> + <constant name="TEXTURE_FILTER_NEAREST_WITH_MIPMAPS" value="2" enum="TextureFilter"> </constant> <constant name="TEXTURE_FILTER_LINEAR_WITH_MIPMAPS" value="3" enum="TextureFilter"> </constant> - <constant name="TEXTURE_FILTER_NEAREST_WITH_MIMPAMPS_ANISOTROPIC" value="4" enum="TextureFilter"> + <constant name="TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC" value="4" enum="TextureFilter"> </constant> <constant name="TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC" value="5" enum="TextureFilter"> </constant> diff --git a/doc/classes/BoxContainer.xml b/doc/classes/BoxContainer.xml index 4b5d4c853a..0d8233e6ff 100644 --- a/doc/classes/BoxContainer.xml +++ b/doc/classes/BoxContainer.xml @@ -4,7 +4,7 @@ Base class for box containers. </brief_description> <description> - Arranges child controls vertically or horizontally, and rearranges the controls automatically when their minimum size changes. + Arranges child [Control] nodes vertically or horizontally, and rearranges them automatically when their minimum size changes. </description> <tutorials> </tutorials> @@ -15,13 +15,13 @@ <argument index="0" name="begin" type="bool"> </argument> <description> - Adds a control to the box as a spacer. If [code]true[/code], [code]begin[/code] will insert the spacer control in front of other children. + Adds a [Control] node to the box as a spacer. If [code]begin[/code] is [code]true[/code], it will insert the [Control] node in front of all other children. </description> </method> </methods> <members> <member name="alignment" type="int" setter="set_alignment" getter="get_alignment" enum="BoxContainer.AlignMode" default="0"> - The alignment of the container's children (must be one of [constant ALIGN_BEGIN], [constant ALIGN_CENTER] or [constant ALIGN_END]). + The alignment of the container's children (must be one of [constant ALIGN_BEGIN], [constant ALIGN_CENTER], or [constant ALIGN_END]). </member> </members> <constants> diff --git a/doc/classes/CPUParticles.xml b/doc/classes/CPUParticles.xml index b9cc655784..6a6525e99a 100644 --- a/doc/classes/CPUParticles.xml +++ b/doc/classes/CPUParticles.xml @@ -171,13 +171,13 @@ <member name="emission_box_extents" type="Vector3" setter="set_emission_box_extents" getter="get_emission_box_extents"> The rectangle's extents if [member emission_shape] is set to [constant EMISSION_SHAPE_BOX]. </member> - <member name="emission_colors" type="PoolColorArray" setter="set_emission_colors" getter="get_emission_colors" default="PoolColorArray( )"> + <member name="emission_colors" type="PackedColorArray" setter="set_emission_colors" getter="get_emission_colors" default="PackedColorArray( )"> Sets the [Color]s to modulate particles by when using [constant EMISSION_SHAPE_POINTS] or [constant EMISSION_SHAPE_DIRECTED_POINTS]. </member> - <member name="emission_normals" type="PoolVector3Array" setter="set_emission_normals" getter="get_emission_normals"> + <member name="emission_normals" type="PackedVector3Array" setter="set_emission_normals" getter="get_emission_normals"> Sets the direction the particles will be emitted in when using [constant EMISSION_SHAPE_DIRECTED_POINTS]. </member> - <member name="emission_points" type="PoolVector3Array" setter="set_emission_points" getter="get_emission_points" default="PoolVector3Array( )"> + <member name="emission_points" type="PackedVector3Array" setter="set_emission_points" getter="get_emission_points" default="PackedVector3Array( )"> Sets the initial positions to spawn particles when using [constant EMISSION_SHAPE_POINTS] or [constant EMISSION_SHAPE_DIRECTED_POINTS]. </member> <member name="emission_shape" type="int" setter="set_emission_shape" getter="get_emission_shape" enum="CPUParticles.EmissionShape" default="0"> diff --git a/doc/classes/CPUParticles2D.xml b/doc/classes/CPUParticles2D.xml index 926b8e461c..799ba32075 100644 --- a/doc/classes/CPUParticles2D.xml +++ b/doc/classes/CPUParticles2D.xml @@ -169,13 +169,13 @@ <member name="draw_order" type="int" setter="set_draw_order" getter="get_draw_order" enum="CPUParticles2D.DrawOrder" default="0"> Particle draw order. Uses [enum DrawOrder] values. </member> - <member name="emission_colors" type="PoolColorArray" setter="set_emission_colors" getter="get_emission_colors"> + <member name="emission_colors" type="PackedColorArray" setter="set_emission_colors" getter="get_emission_colors"> Sets the [Color]s to modulate particles by when using [constant EMISSION_SHAPE_POINTS] or [constant EMISSION_SHAPE_DIRECTED_POINTS]. </member> - <member name="emission_normals" type="PoolVector2Array" setter="set_emission_normals" getter="get_emission_normals"> + <member name="emission_normals" type="PackedVector2Array" setter="set_emission_normals" getter="get_emission_normals"> Sets the direction the particles will be emitted in when using [constant EMISSION_SHAPE_DIRECTED_POINTS]. </member> - <member name="emission_points" type="PoolVector2Array" setter="set_emission_points" getter="get_emission_points"> + <member name="emission_points" type="PackedVector2Array" setter="set_emission_points" getter="get_emission_points"> Sets the initial positions to spawn particles when using [constant EMISSION_SHAPE_POINTS] or [constant EMISSION_SHAPE_DIRECTED_POINTS]. </member> <member name="emission_rect_extents" type="Vector2" setter="set_emission_rect_extents" getter="get_emission_rect_extents"> diff --git a/doc/classes/Callable.xml b/doc/classes/Callable.xml new file mode 100644 index 0000000000..ec38128c1e --- /dev/null +++ b/doc/classes/Callable.xml @@ -0,0 +1,77 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="Callable" version="4.0"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <methods> + <method name="Callable"> + <return type="Callable"> + </return> + <argument index="0" name="object" type="Object"> + </argument> + <argument index="1" name="method_name" type="StringName"> + </argument> + <description> + </description> + </method> + <method name="call" qualifiers="vararg"> + <return type="Variant"> + </return> + <description> + </description> + </method> + <method name="call_deferred" qualifiers="vararg"> + <return type="void"> + </return> + <description> + </description> + </method> + <method name="get_method"> + <return type="StringName"> + </return> + <description> + </description> + </method> + <method name="get_object"> + <return type="Object"> + </return> + <description> + </description> + </method> + <method name="get_object_id"> + <return type="int"> + </return> + <description> + </description> + </method> + <method name="hash"> + <return type="int"> + </return> + <description> + </description> + </method> + <method name="is_custom"> + <return type="bool"> + </return> + <description> + </description> + </method> + <method name="is_null"> + <return type="bool"> + </return> + <description> + </description> + </method> + <method name="is_standard"> + <return type="bool"> + </return> + <description> + </description> + </method> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/CanvasItem.xml b/doc/classes/CanvasItem.xml index 7f50587e66..dec7c907a4 100644 --- a/doc/classes/CanvasItem.xml +++ b/doc/classes/CanvasItem.xml @@ -76,11 +76,11 @@ <method name="draw_colored_polygon"> <return type="void"> </return> - <argument index="0" name="points" type="PoolVector2Array"> + <argument index="0" name="points" type="PackedVector2Array"> </argument> <argument index="1" name="color" type="Color"> </argument> - <argument index="2" name="uvs" type="PoolVector2Array" default="PoolVector2Array( )"> + <argument index="2" name="uvs" type="PackedVector2Array" default="PackedVector2Array( )"> </argument> <argument index="3" name="texture" type="Texture2D" default="null"> </argument> @@ -88,7 +88,7 @@ </argument> <argument index="5" name="specular_map" type="Texture2D" default="null"> </argument> - <argument index="6" name="specular_shinness" type="Color" default="Color( 1, 1, 1, 1 )"> + <argument index="6" name="specular_shininess" type="Color" default="Color( 1, 1, 1, 1 )"> </argument> <argument index="7" name="texture_filter" type="int" enum="CanvasItem.TextureFilter" default="0"> </argument> @@ -118,17 +118,17 @@ </return> <argument index="0" name="mesh" type="Mesh"> </argument> - <argument index="1" name="texture" type="Texture2D" default="null"> + <argument index="1" name="texture" type="Texture2D"> </argument> <argument index="2" name="normal_map" type="Texture2D" default="null"> </argument> - <argument index="3" name="specular_map" type="Texture2D" default="Color( 1, 1, 1, 1 )"> + <argument index="3" name="specular_map" type="Texture2D" default="null"> </argument> - <argument index="4" name="transform" type="Color" default="Transform2D( 1, 0, 0, 1, 0, 0 )"> + <argument index="4" name="specular_shininess" type="Color" default="Color( 1, 1, 1, 1 )"> </argument> - <argument index="5" name="modulate" type="Transform2D" default="Color( 1, 1, 1, 1 )"> + <argument index="5" name="transform" type="Transform2D" default="Transform2D( 1, 0, 0, 1, 0, 0 )"> </argument> - <argument index="6" name="specular_shinness" type="Color" default="Color( 1, 1, 1, 1 )"> + <argument index="6" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )"> </argument> <argument index="7" name="texture_filter" type="int" enum="CanvasItem.TextureFilter" default="0"> </argument> @@ -141,7 +141,7 @@ <method name="draw_multiline"> <return type="void"> </return> - <argument index="0" name="points" type="PoolVector2Array"> + <argument index="0" name="points" type="PackedVector2Array"> </argument> <argument index="1" name="color" type="Color"> </argument> @@ -154,9 +154,9 @@ <method name="draw_multiline_colors"> <return type="void"> </return> - <argument index="0" name="points" type="PoolVector2Array"> + <argument index="0" name="points" type="PackedVector2Array"> </argument> - <argument index="1" name="colors" type="PoolColorArray"> + <argument index="1" name="colors" type="PackedColorArray"> </argument> <argument index="2" name="width" type="float" default="1.0"> </argument> @@ -169,13 +169,13 @@ </return> <argument index="0" name="multimesh" type="MultiMesh"> </argument> - <argument index="1" name="texture" type="Texture2D" default="null"> + <argument index="1" name="texture" type="Texture2D"> </argument> <argument index="2" name="normal_map" type="Texture2D" default="null"> </argument> <argument index="3" name="specular_map" type="Texture2D" default="null"> </argument> - <argument index="4" name="specular_shinness" type="Color" default="Color( 1, 1, 1, 1 )"> + <argument index="4" name="specular_shininess" type="Color" default="Color( 1, 1, 1, 1 )"> </argument> <argument index="5" name="texture_filter" type="int" enum="CanvasItem.TextureFilter" default="0"> </argument> @@ -188,11 +188,11 @@ <method name="draw_polygon"> <return type="void"> </return> - <argument index="0" name="points" type="PoolVector2Array"> + <argument index="0" name="points" type="PackedVector2Array"> </argument> - <argument index="1" name="colors" type="PoolColorArray"> + <argument index="1" name="colors" type="PackedColorArray"> </argument> - <argument index="2" name="uvs" type="PoolVector2Array" default="PoolVector2Array( )"> + <argument index="2" name="uvs" type="PackedVector2Array" default="PackedVector2Array( )"> </argument> <argument index="3" name="texture" type="Texture2D" default="null"> </argument> @@ -200,7 +200,7 @@ </argument> <argument index="5" name="specular_map" type="Texture2D" default="null"> </argument> - <argument index="6" name="specular_shinness" type="Color" default="Color( 1, 1, 1, 1 )"> + <argument index="6" name="specular_shininess" type="Color" default="Color( 1, 1, 1, 1 )"> </argument> <argument index="7" name="texture_filter" type="int" enum="CanvasItem.TextureFilter" default="0"> </argument> @@ -213,7 +213,7 @@ <method name="draw_polyline"> <return type="void"> </return> - <argument index="0" name="points" type="PoolVector2Array"> + <argument index="0" name="points" type="PackedVector2Array"> </argument> <argument index="1" name="color" type="Color"> </argument> @@ -226,9 +226,9 @@ <method name="draw_polyline_colors"> <return type="void"> </return> - <argument index="0" name="points" type="PoolVector2Array"> + <argument index="0" name="points" type="PackedVector2Array"> </argument> - <argument index="1" name="colors" type="PoolColorArray"> + <argument index="1" name="colors" type="PackedColorArray"> </argument> <argument index="2" name="width" type="float" default="1.0"> </argument> @@ -239,11 +239,11 @@ <method name="draw_primitive"> <return type="void"> </return> - <argument index="0" name="points" type="PoolVector2Array"> + <argument index="0" name="points" type="PackedVector2Array"> </argument> - <argument index="1" name="colors" type="PoolColorArray"> + <argument index="1" name="colors" type="PackedColorArray"> </argument> - <argument index="2" name="uvs" type="PoolVector2Array"> + <argument index="2" name="uvs" type="PackedVector2Array"> </argument> <argument index="3" name="texture" type="Texture2D" default="null"> </argument> @@ -253,14 +253,14 @@ </argument> <argument index="6" name="specular_map" type="Texture2D" default="null"> </argument> - <argument index="7" name="specular_shinness" type="Color" default="Color( 1, 1, 1, 1 )"> + <argument index="7" name="specular_shininess" type="Color" default="Color( 1, 1, 1, 1 )"> </argument> <argument index="8" name="texture_filter" type="int" enum="CanvasItem.TextureFilter" default="0"> </argument> <argument index="9" name="texture_repeat" type="int" enum="CanvasItem.TextureRepeat" default="0"> </argument> <description> - Draws a custom primitive. 1 point for a point, 2 points for a line, 3 points for a triangle and 4 points for a quad. + Draws a custom primitive. 1 point for a point, 2 points for a line, 3 points for a triangle, and 4 points for a quad. </description> </method> <method name="draw_rect"> @@ -342,7 +342,7 @@ </argument> <argument index="4" name="specular_map" type="Texture2D" default="null"> </argument> - <argument index="5" name="specular_shinness" type="Color" default="Color( 1, 1, 1, 1 )"> + <argument index="5" name="specular_shininess" type="Color" default="Color( 1, 1, 1, 1 )"> </argument> <argument index="6" name="texture_filter" type="int" enum="CanvasItem.TextureFilter" default="0"> </argument> @@ -369,7 +369,7 @@ </argument> <argument index="6" name="specular_map" type="Texture2D" default="null"> </argument> - <argument index="7" name="specular_shinness" type="Color" default="Color( 1, 1, 1, 1 )"> + <argument index="7" name="specular_shininess" type="Color" default="Color( 1, 1, 1, 1 )"> </argument> <argument index="8" name="texture_filter" type="int" enum="CanvasItem.TextureFilter" default="0"> </argument> @@ -396,9 +396,9 @@ </argument> <argument index="6" name="specular_map" type="Texture2D" default="null"> </argument> - <argument index="7" name="clip_uv" type="Color" default="true"> + <argument index="7" name="specular_shininess" type="Color" default="Color( 1, 1, 1, 1 )"> </argument> - <argument index="8" name="specular_shinness" type="bool" default="Color( 1, 1, 1, 1 )"> + <argument index="8" name="clip_uv" type="bool" default="true"> </argument> <argument index="9" name="texture_filter" type="int" enum="CanvasItem.TextureFilter" default="0"> </argument> @@ -661,11 +661,11 @@ </constant> <constant name="TEXTURE_FILTER_LINEAR" value="2" enum="TextureFilter"> </constant> - <constant name="TEXTURE_FILTER_NEAREST_WITH_MIMPAMPS" value="3" enum="TextureFilter"> + <constant name="TEXTURE_FILTER_NEAREST_WITH_MIPMAPS" value="3" enum="TextureFilter"> </constant> <constant name="TEXTURE_FILTER_LINEAR_WITH_MIPMAPS" value="4" enum="TextureFilter"> </constant> - <constant name="TEXTURE_FILTER_NEAREST_WITH_MIMPAMPS_ANISOTROPIC" value="5" enum="TextureFilter"> + <constant name="TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC" value="5" enum="TextureFilter"> </constant> <constant name="TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC" value="6" enum="TextureFilter"> </constant> diff --git a/doc/classes/ClassDB.xml b/doc/classes/ClassDB.xml index 4d7ccb65e8..2a6a2ddd91 100644 --- a/doc/classes/ClassDB.xml +++ b/doc/classes/ClassDB.xml @@ -12,7 +12,7 @@ <method name="can_instance" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="class" type="String"> + <argument index="0" name="class" type="StringName"> </argument> <description> Returns [code]true[/code] if you can instance objects from the specified [code]class[/code], [code]false[/code] in other case. @@ -21,16 +21,16 @@ <method name="class_exists" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="class" type="String"> + <argument index="0" name="class" type="StringName"> </argument> <description> Returns whether the specified [code]class[/code] is available or not. </description> </method> <method name="class_get_category" qualifiers="const"> - <return type="String"> + <return type="StringName"> </return> - <argument index="0" name="class" type="String"> + <argument index="0" name="class" type="StringName"> </argument> <description> Returns a category associated with the class for use in documentation and the Asset Library. Debug mode required. @@ -39,18 +39,18 @@ <method name="class_get_integer_constant" qualifiers="const"> <return type="int"> </return> - <argument index="0" name="class" type="String"> + <argument index="0" name="class" type="StringName"> </argument> - <argument index="1" name="name" type="String"> + <argument index="1" name="name" type="StringName"> </argument> <description> Returns the value of the integer constant [code]name[/code] of [code]class[/code] or its ancestry. Always returns 0 when the constant could not be found. </description> </method> <method name="class_get_integer_constant_list" qualifiers="const"> - <return type="PoolStringArray"> + <return type="PackedStringArray"> </return> - <argument index="0" name="class" type="String"> + <argument index="0" name="class" type="StringName"> </argument> <argument index="1" name="no_inheritance" type="bool" default="false"> </argument> @@ -61,7 +61,7 @@ <method name="class_get_method_list" qualifiers="const"> <return type="Array"> </return> - <argument index="0" name="class" type="String"> + <argument index="0" name="class" type="StringName"> </argument> <argument index="1" name="no_inheritance" type="bool" default="false"> </argument> @@ -74,7 +74,7 @@ </return> <argument index="0" name="object" type="Object"> </argument> - <argument index="1" name="property" type="String"> + <argument index="1" name="property" type="StringName"> </argument> <description> Returns the value of [code]property[/code] of [code]class[/code] or its ancestry. @@ -83,7 +83,7 @@ <method name="class_get_property_list" qualifiers="const"> <return type="Array"> </return> - <argument index="0" name="class" type="String"> + <argument index="0" name="class" type="StringName"> </argument> <argument index="1" name="no_inheritance" type="bool" default="false"> </argument> @@ -94,9 +94,9 @@ <method name="class_get_signal" qualifiers="const"> <return type="Dictionary"> </return> - <argument index="0" name="class" type="String"> + <argument index="0" name="class" type="StringName"> </argument> - <argument index="1" name="signal" type="String"> + <argument index="1" name="signal" type="StringName"> </argument> <description> Returns the [code]signal[/code] data of [code]class[/code] or its ancestry. The returned value is a [Dictionary] with the following keys: [code]args[/code], [code]default_args[/code], [code]flags[/code], [code]id[/code], [code]name[/code], [code]return: (class_name, hint, hint_string, name, type, usage)[/code]. @@ -105,7 +105,7 @@ <method name="class_get_signal_list" qualifiers="const"> <return type="Array"> </return> - <argument index="0" name="class" type="String"> + <argument index="0" name="class" type="StringName"> </argument> <argument index="1" name="no_inheritance" type="bool" default="false"> </argument> @@ -116,9 +116,9 @@ <method name="class_has_integer_constant" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="class" type="String"> + <argument index="0" name="class" type="StringName"> </argument> - <argument index="1" name="name" type="String"> + <argument index="1" name="name" type="StringName"> </argument> <description> Returns whether [code]class[/code] or its ancestry has an integer constant called [code]name[/code] or not. @@ -127,9 +127,9 @@ <method name="class_has_method" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="class" type="String"> + <argument index="0" name="class" type="StringName"> </argument> - <argument index="1" name="method" type="String"> + <argument index="1" name="method" type="StringName"> </argument> <argument index="2" name="no_inheritance" type="bool" default="false"> </argument> @@ -140,9 +140,9 @@ <method name="class_has_signal" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="class" type="String"> + <argument index="0" name="class" type="StringName"> </argument> - <argument index="1" name="signal" type="String"> + <argument index="1" name="signal" type="StringName"> </argument> <description> Returns whether [code]class[/code] or its ancestry has a signal called [code]signal[/code] or not. @@ -153,7 +153,7 @@ </return> <argument index="0" name="object" type="Object"> </argument> - <argument index="1" name="property" type="String"> + <argument index="1" name="property" type="StringName"> </argument> <argument index="2" name="value" type="Variant"> </argument> @@ -162,25 +162,25 @@ </description> </method> <method name="get_class_list" qualifiers="const"> - <return type="PoolStringArray"> + <return type="PackedStringArray"> </return> <description> Returns the names of all the classes available. </description> </method> <method name="get_inheriters_from_class" qualifiers="const"> - <return type="PoolStringArray"> + <return type="PackedStringArray"> </return> - <argument index="0" name="class" type="String"> + <argument index="0" name="class" type="StringName"> </argument> <description> Returns the names of all the classes that directly or indirectly inherit from [code]class[/code]. </description> </method> <method name="get_parent_class" qualifiers="const"> - <return type="String"> + <return type="StringName"> </return> - <argument index="0" name="class" type="String"> + <argument index="0" name="class" type="StringName"> </argument> <description> Returns the parent class of [code]class[/code]. @@ -189,7 +189,7 @@ <method name="instance" qualifiers="const"> <return type="Variant"> </return> - <argument index="0" name="class" type="String"> + <argument index="0" name="class" type="StringName"> </argument> <description> Creates an instance of [code]class[/code]. @@ -198,7 +198,7 @@ <method name="is_class_enabled" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="class" type="String"> + <argument index="0" name="class" type="StringName"> </argument> <description> Returns whether this [code]class[/code] is enabled or not. @@ -207,9 +207,9 @@ <method name="is_parent_class" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="class" type="String"> + <argument index="0" name="class" type="StringName"> </argument> - <argument index="1" name="inherits" type="String"> + <argument index="1" name="inherits" type="StringName"> </argument> <description> Returns whether [code]inherits[/code] is an ancestor of [code]class[/code] or not. diff --git a/doc/classes/CollisionPolygon.xml b/doc/classes/CollisionPolygon.xml index ac519d3817..8aceec17a8 100644 --- a/doc/classes/CollisionPolygon.xml +++ b/doc/classes/CollisionPolygon.xml @@ -17,7 +17,7 @@ <member name="disabled" type="bool" setter="set_disabled" getter="is_disabled" default="false"> If [code]true[/code], no collision will be produced. </member> - <member name="polygon" type="PoolVector2Array" setter="set_polygon" getter="get_polygon" default="PoolVector2Array( )"> + <member name="polygon" type="PackedVector2Array" setter="set_polygon" getter="get_polygon" default="PackedVector2Array( )"> Array of vertices which define the polygon. [b]Note:[/b] The returned value is a copy of the original. Methods which mutate the size or properties of the return value will not impact the original polygon. To change properties of the polygon, assign it to a temporary variable and make changes before reassigning the [code]polygon[/code] member. </member> diff --git a/doc/classes/CollisionPolygon2D.xml b/doc/classes/CollisionPolygon2D.xml index c4fd417918..e3135a4d0f 100644 --- a/doc/classes/CollisionPolygon2D.xml +++ b/doc/classes/CollisionPolygon2D.xml @@ -22,8 +22,8 @@ </member> <member name="one_way_collision_margin" type="float" setter="set_one_way_collision_margin" getter="get_one_way_collision_margin" default="1.0"> </member> - <member name="polygon" type="PoolVector2Array" setter="set_polygon" getter="get_polygon" default="PoolVector2Array( )"> - The polygon's list of vertices. The final point will be connected to the first. The returned value is a clone of the [PoolVector2Array], not a reference. + <member name="polygon" type="PackedVector2Array" setter="set_polygon" getter="get_polygon" default="PackedVector2Array( )"> + The polygon's list of vertices. The final point will be connected to the first. The returned value is a clone of the [PackedVector2Array], not a reference. </member> </members> <constants> diff --git a/doc/classes/ColorPicker.xml b/doc/classes/ColorPicker.xml index d0c8e3f948..5ab929d911 100644 --- a/doc/classes/ColorPicker.xml +++ b/doc/classes/ColorPicker.xml @@ -4,7 +4,7 @@ Color picker control. </brief_description> <description> - [Control] node displaying a color picker widget. It's useful for selecting a color from an RGB/RGBA colorspace. + Displays a color picker widget. Useful for selecting a color from an RGB/RGBA colorspace. </description> <tutorials> </tutorials> @@ -29,7 +29,7 @@ </description> </method> <method name="get_presets" qualifiers="const"> - <return type="PoolColorArray"> + <return type="PackedColorArray"> </return> <description> Returns the list of colors in the presets of the color picker. diff --git a/doc/classes/ConcavePolygonShape.xml b/doc/classes/ConcavePolygonShape.xml index 3ae07ee52f..21f2f681b9 100644 --- a/doc/classes/ConcavePolygonShape.xml +++ b/doc/classes/ConcavePolygonShape.xml @@ -10,7 +10,7 @@ </tutorials> <methods> <method name="get_faces" qualifiers="const"> - <return type="PoolVector3Array"> + <return type="PackedVector3Array"> </return> <description> Returns the faces (an array of triangles). @@ -19,7 +19,7 @@ <method name="set_faces"> <return type="void"> </return> - <argument index="0" name="faces" type="PoolVector3Array"> + <argument index="0" name="faces" type="PackedVector3Array"> </argument> <description> Sets the faces (an array of triangles). diff --git a/doc/classes/ConcavePolygonShape2D.xml b/doc/classes/ConcavePolygonShape2D.xml index 6fb32436a8..9999d086da 100644 --- a/doc/classes/ConcavePolygonShape2D.xml +++ b/doc/classes/ConcavePolygonShape2D.xml @@ -12,7 +12,7 @@ <methods> </methods> <members> - <member name="segments" type="PoolVector2Array" setter="set_segments" getter="get_segments" default="PoolVector2Array( )"> + <member name="segments" type="PackedVector2Array" setter="set_segments" getter="get_segments" default="PackedVector2Array( )"> The array of points that make up the [ConcavePolygonShape2D]'s line segments. </member> </members> diff --git a/doc/classes/ConfigFile.xml b/doc/classes/ConfigFile.xml index ad36f1f1c3..00d98130f3 100644 --- a/doc/classes/ConfigFile.xml +++ b/doc/classes/ConfigFile.xml @@ -51,7 +51,7 @@ </description> </method> <method name="get_section_keys" qualifiers="const"> - <return type="PoolStringArray"> + <return type="PackedStringArray"> </return> <argument index="0" name="section" type="String"> </argument> @@ -60,7 +60,7 @@ </description> </method> <method name="get_sections" qualifiers="const"> - <return type="PoolStringArray"> + <return type="PackedStringArray"> </return> <description> Returns an array of all defined section identifiers. @@ -114,7 +114,7 @@ </return> <argument index="0" name="path" type="String"> </argument> - <argument index="1" name="key" type="PoolByteArray"> + <argument index="1" name="key" type="PackedByteArray"> </argument> <description> </description> @@ -154,7 +154,7 @@ </return> <argument index="0" name="path" type="String"> </argument> - <argument index="1" name="key" type="PoolByteArray"> + <argument index="1" name="key" type="PackedByteArray"> </argument> <description> </description> diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml index 3bf2ede896..89db5baf8a 100644 --- a/doc/classes/Control.xml +++ b/doc/classes/Control.xml @@ -90,7 +90,7 @@ <method name="add_color_override"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <argument index="1" name="color" type="Color"> </argument> @@ -101,7 +101,7 @@ <method name="add_constant_override"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <argument index="1" name="constant" type="int"> </argument> @@ -112,7 +112,7 @@ <method name="add_font_override"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <argument index="1" name="font" type="Font"> </argument> @@ -123,7 +123,7 @@ <method name="add_icon_override"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <argument index="1" name="texture" type="Texture2D"> </argument> @@ -134,7 +134,7 @@ <method name="add_shader_override"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <argument index="1" name="shader" type="Shader"> </argument> @@ -145,7 +145,7 @@ <method name="add_stylebox_override"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <argument index="1" name="stylebox" type="StyleBox"> </argument> @@ -220,9 +220,9 @@ <method name="get_color" qualifiers="const"> <return type="Color"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="String" default=""""> + <argument index="1" name="type" type="StringName" default=""""> </argument> <description> Returns a color from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]type[/code]. @@ -242,9 +242,9 @@ <method name="get_constant" qualifiers="const"> <return type="int"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="String" default=""""> + <argument index="1" name="type" type="StringName" default=""""> </argument> <description> Returns a constant from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]type[/code]. @@ -301,9 +301,9 @@ <method name="get_font" qualifiers="const"> <return type="Font"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="String" default=""""> + <argument index="1" name="type" type="StringName" default=""""> </argument> <description> Returns a font from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]type[/code]. @@ -319,9 +319,9 @@ <method name="get_icon" qualifiers="const"> <return type="Texture2D"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="String" default=""""> + <argument index="1" name="type" type="StringName" default=""""> </argument> <description> Returns an icon from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]type[/code]. @@ -374,9 +374,9 @@ <method name="get_stylebox" qualifiers="const"> <return type="StyleBox"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="String" default=""""> + <argument index="1" name="type" type="StringName" default=""""> </argument> <description> Returns a [StyleBox] from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]type[/code]. @@ -412,9 +412,9 @@ <method name="has_color" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="String" default=""""> + <argument index="1" name="type" type="StringName" default=""""> </argument> <description> Returns [code]true[/code] if [Color] with given [code]name[/code] and associated with [Control] of given [code]type[/code] exists in assigned [Theme]. @@ -423,7 +423,7 @@ <method name="has_color_override" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <description> Returns [code]true[/code] if [Color] with given [code]name[/code] has a valid override in this [Control] node. @@ -432,9 +432,9 @@ <method name="has_constant" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="String" default=""""> + <argument index="1" name="type" type="StringName" default=""""> </argument> <description> Returns [code]true[/code] if constant with given [code]name[/code] and associated with [Control] of given [code]type[/code] exists in assigned [Theme]. @@ -443,7 +443,7 @@ <method name="has_constant_override" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <description> Returns [code]true[/code] if constant with given [code]name[/code] has a valid override in this [Control] node. @@ -459,9 +459,9 @@ <method name="has_font" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="String" default=""""> + <argument index="1" name="type" type="StringName" default=""""> </argument> <description> Returns [code]true[/code] if font with given [code]name[/code] and associated with [Control] of given [code]type[/code] exists in assigned [Theme]. @@ -470,7 +470,7 @@ <method name="has_font_override" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <description> Returns [code]true[/code] if font with given [code]name[/code] has a valid override in this [Control] node. @@ -479,9 +479,9 @@ <method name="has_icon" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="String" default=""""> + <argument index="1" name="type" type="StringName" default=""""> </argument> <description> Returns [code]true[/code] if icon with given [code]name[/code] and associated with [Control] of given [code]type[/code] exists in assigned [Theme]. @@ -490,7 +490,7 @@ <method name="has_icon_override" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <description> Returns [code]true[/code] if icon with given [code]name[/code] has a valid override in this [Control] node. @@ -510,7 +510,7 @@ <method name="has_shader_override" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <description> Returns [code]true[/code] if [Shader] with given [code]name[/code] has a valid override in this [Control] node. @@ -519,9 +519,9 @@ <method name="has_stylebox" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="String" default=""""> + <argument index="1" name="type" type="StringName" default=""""> </argument> <description> Returns [code]true[/code] if [StyleBox] with given [code]name[/code] and associated with [Control] of given [code]type[/code] exists in assigned [Theme]. @@ -530,7 +530,7 @@ <method name="has_stylebox_override" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <description> Returns [code]true[/code] if [StyleBox] with given [code]name[/code] has a valid override in this [Control] node. diff --git a/doc/classes/ConvexPolygonShape.xml b/doc/classes/ConvexPolygonShape.xml index 544f304051..077bb57a03 100644 --- a/doc/classes/ConvexPolygonShape.xml +++ b/doc/classes/ConvexPolygonShape.xml @@ -11,7 +11,7 @@ <methods> </methods> <members> - <member name="points" type="PoolVector3Array" setter="set_points" getter="get_points" default="PoolVector3Array( )"> + <member name="points" type="PackedVector3Array" setter="set_points" getter="get_points" default="PackedVector3Array( )"> The list of 3D points forming the convex polygon shape. </member> </members> diff --git a/doc/classes/ConvexPolygonShape2D.xml b/doc/classes/ConvexPolygonShape2D.xml index e17048e061..cba446fff8 100644 --- a/doc/classes/ConvexPolygonShape2D.xml +++ b/doc/classes/ConvexPolygonShape2D.xml @@ -13,7 +13,7 @@ <method name="set_point_cloud"> <return type="void"> </return> - <argument index="0" name="point_cloud" type="PoolVector2Array"> + <argument index="0" name="point_cloud" type="PackedVector2Array"> </argument> <description> Based on the set of points provided, this creates and assigns the [member points] property using the convex hull algorithm. Removing all unneeded points. See [method Geometry.convex_hull_2d] for details. @@ -21,7 +21,7 @@ </method> </methods> <members> - <member name="points" type="PoolVector2Array" setter="set_points" getter="get_points" default="PoolVector2Array( )"> + <member name="points" type="PackedVector2Array" setter="set_points" getter="get_points" default="PackedVector2Array( )"> The polygon's list of vertices. Can be in either clockwise or counterclockwise order. </member> </members> diff --git a/doc/classes/Crypto.xml b/doc/classes/Crypto.xml index fb373145f9..10f1f18f0d 100644 --- a/doc/classes/Crypto.xml +++ b/doc/classes/Crypto.xml @@ -28,12 +28,12 @@ </tutorials> <methods> <method name="generate_random_bytes"> - <return type="PoolByteArray"> + <return type="PackedByteArray"> </return> <argument index="0" name="size" type="int"> </argument> <description> - Generates a [PoolByteArray] of cryptographically secure random bytes with given [code]size[/code]. + Generates a [PackedByteArray] of cryptographically secure random bytes with given [code]size[/code]. </description> </method> <method name="generate_rsa"> diff --git a/doc/classes/Curve2D.xml b/doc/classes/Curve2D.xml index f6eacfb33b..8ac6258e97 100644 --- a/doc/classes/Curve2D.xml +++ b/doc/classes/Curve2D.xml @@ -41,10 +41,10 @@ </description> </method> <method name="get_baked_points" qualifiers="const"> - <return type="PoolVector2Array"> + <return type="PackedVector2Array"> </return> <description> - Returns the cache of points as a [PoolVector2Array]. + Returns the cache of points as a [PackedVector2Array]. </description> </method> <method name="get_closest_offset" qualifiers="const"> @@ -178,7 +178,7 @@ </description> </method> <method name="tessellate" qualifiers="const"> - <return type="PoolVector2Array"> + <return type="PackedVector2Array"> </return> <argument index="0" name="max_stages" type="int" default="5"> </argument> diff --git a/doc/classes/Curve3D.xml b/doc/classes/Curve3D.xml index 52b0052908..5024cdefbd 100644 --- a/doc/classes/Curve3D.xml +++ b/doc/classes/Curve3D.xml @@ -41,24 +41,24 @@ </description> </method> <method name="get_baked_points" qualifiers="const"> - <return type="PoolVector3Array"> + <return type="PackedVector3Array"> </return> <description> - Returns the cache of points as a [PoolVector3Array]. + Returns the cache of points as a [PackedVector3Array]. </description> </method> <method name="get_baked_tilts" qualifiers="const"> - <return type="PoolRealArray"> + <return type="PackedFloat32Array"> </return> <description> - Returns the cache of tilts as a [PoolRealArray]. + Returns the cache of tilts as a [PackedFloat32Array]. </description> </method> <method name="get_baked_up_vectors" qualifiers="const"> - <return type="PoolVector3Array"> + <return type="PackedVector3Array"> </return> <description> - Returns the cache of up vectors as a [PoolVector3Array]. + Returns the cache of up vectors as a [PackedVector3Array]. If [member up_vector_enabled] is [code]false[/code], the cache will be empty. </description> </method> @@ -227,7 +227,7 @@ </description> </method> <method name="tessellate" qualifiers="const"> - <return type="PoolVector3Array"> + <return type="PackedVector3Array"> </return> <argument index="0" name="max_stages" type="int" default="5"> </argument> diff --git a/doc/classes/DTLSServer.xml b/doc/classes/DTLSServer.xml new file mode 100644 index 0000000000..8c71b61553 --- /dev/null +++ b/doc/classes/DTLSServer.xml @@ -0,0 +1,90 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="DTLSServer" inherits="Reference" version="4.0"> + <brief_description> + Helper class to implement a DTLS server. + </brief_description> + <description> + This class is used to store the state of a DTLS server. Upon [method setup] it converts connected [PacketPeerUDP] to [PacketPeerDTLS] accepting them via [method take_connection] as DTLS clients. Under the hood, this class is used to store the DTLS state and cookies of the server. The reason of why the state and cookies are needed is outside of the scope of this documentation. + Below a small example of how to use it: + [codeblock] + # server.gd + extends Node + + var dtls := DTLSServer.new() + var server := UDPServer.new() + var peers = [] + + func _ready(): + server.listen(4242) + var key = load("key.key") # Your private key. + var cert = load("cert.crt") # Your X509 certificate. + dtls.setup(key, cert) + + func _process(delta): + while server.is_connection_available(): + var peer : PacketPeerUDP = server.take_connection() + var dtls_peer : PacketPeerDTLS = dtls.take_connection(peer) + if dtls_peer.get_status() != PacketPeerDTLS.STATUS_HANDSHAKING: + continue # It is normal that 50% of the connections fails due to cookie exchange. + print("Peer connected!") + peers.append(dtls_peer) + for p in peers: + p.poll() # Must poll to update the state. + if p.get_status() == PacketPeerDTLS.STATUS_CONNECTED: + while p.get_available_packet_count() > 0: + print("Received message from client: %s" % p.get_packet().get_string_from_utf8()) + p.put_packet("Hello DTLS client".to_utf8()) + [/codeblock] + [codeblock] + # client.gd + extends Node + + var dtls := PacketPeerDTLS.new() + var udp := PacketPeerUDP.new() + var connected = false + + func _ready(): + udp.connect_to_host("127.0.0.1", 4242) + dtls.connect_to_peer(udp, false) # Use true in production for certificate validation! + + func _process(delta): + dtls.poll() + if dtls.get_status() == PacketPeerDTLS.STATUS_CONNECTED: + if !connected: + # Try to contact server + dtls.put_packet("The answer is... 42!".to_utf8()) + while dtls.get_available_packet_count() > 0: + print("Connected: %s" % dtls.get_packet().get_string_from_utf8()) + connected = true + [/codeblock] + </description> + <tutorials> + </tutorials> + <methods> + <method name="setup"> + <return type="int" enum="Error"> + </return> + <argument index="0" name="key" type="CryptoKey"> + </argument> + <argument index="1" name="certificate" type="X509Certificate"> + </argument> + <argument index="2" name="chain" type="X509Certificate" default="null"> + </argument> + <description> + Setup the DTLS server to use the given [code]private_key[/code] and provide the given [code]certificate[/code] to clients. You can pass the optional [code]chain[/code] parameter to provide additional CA chain information along with the certificate. + </description> + </method> + <method name="take_connection"> + <return type="PacketPeerDTLS"> + </return> + <argument index="0" name="udp_peer" type="PacketPeerUDP"> + </argument> + <description> + Try to initiate the DTLS handshake with the given [code]udp_peer[/code] which must be already connected (see [method PacketPeerUDP.connect_to_host]). + [b]Note[/b]: You must check that the state of the return PacketPeerUDP is [constant PacketPeerDTLS.STATUS_HANDSHAKING], as it is normal that 50% of the new connections will be invalid due to cookie exchange. + </description> + </method> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/Dictionary.xml b/doc/classes/Dictionary.xml index 8432744ea7..6104cf165e 100644 --- a/doc/classes/Dictionary.xml +++ b/doc/classes/Dictionary.xml @@ -66,6 +66,8 @@ </tutorials> <methods> <method name="clear"> + <return type="void"> + </return> <description> Clear the dictionary, removing all key/value pairs. </description> @@ -96,7 +98,7 @@ </description> </method> <method name="get"> - <return type="Variant"> + <return type="void"> </return> <argument index="0" name="key" type="Variant"> </argument> diff --git a/doc/classes/EditorExportPlugin.xml b/doc/classes/EditorExportPlugin.xml index 5de68cae71..da3840384e 100644 --- a/doc/classes/EditorExportPlugin.xml +++ b/doc/classes/EditorExportPlugin.xml @@ -10,7 +10,7 @@ <method name="_export_begin" qualifiers="virtual"> <return type="void"> </return> - <argument index="0" name="features" type="PoolStringArray"> + <argument index="0" name="features" type="PackedStringArray"> </argument> <argument index="1" name="is_debug" type="bool"> </argument> @@ -34,7 +34,7 @@ </argument> <argument index="1" name="type" type="String"> </argument> - <argument index="2" name="features" type="PoolStringArray"> + <argument index="2" name="features" type="PackedStringArray"> </argument> <description> </description> @@ -44,7 +44,7 @@ </return> <argument index="0" name="path" type="String"> </argument> - <argument index="1" name="file" type="PoolByteArray"> + <argument index="1" name="file" type="PackedByteArray"> </argument> <argument index="2" name="remap" type="bool"> </argument> @@ -96,7 +96,7 @@ </return> <argument index="0" name="path" type="String"> </argument> - <argument index="1" name="tags" type="PoolStringArray"> + <argument index="1" name="tags" type="PackedStringArray"> </argument> <description> </description> diff --git a/doc/classes/EditorFeatureProfile.xml b/doc/classes/EditorFeatureProfile.xml index 5fac4f7822..387962cf6a 100644 --- a/doc/classes/EditorFeatureProfile.xml +++ b/doc/classes/EditorFeatureProfile.xml @@ -18,7 +18,7 @@ <method name="is_class_disabled" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="class_name" type="String"> + <argument index="0" name="class_name" type="StringName"> </argument> <description> </description> @@ -26,7 +26,7 @@ <method name="is_class_editor_disabled" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="class_name" type="String"> + <argument index="0" name="class_name" type="StringName"> </argument> <description> </description> @@ -34,9 +34,9 @@ <method name="is_class_property_disabled" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="class_name" type="String"> + <argument index="0" name="class_name" type="StringName"> </argument> - <argument index="1" name="property" type="String"> + <argument index="1" name="property" type="StringName"> </argument> <description> </description> @@ -68,7 +68,7 @@ <method name="set_disable_class"> <return type="void"> </return> - <argument index="0" name="class_name" type="String"> + <argument index="0" name="class_name" type="StringName"> </argument> <argument index="1" name="disable" type="bool"> </argument> @@ -78,7 +78,7 @@ <method name="set_disable_class_editor"> <return type="void"> </return> - <argument index="0" name="class_name" type="String"> + <argument index="0" name="class_name" type="StringName"> </argument> <argument index="1" name="disable" type="bool"> </argument> @@ -88,9 +88,9 @@ <method name="set_disable_class_property"> <return type="void"> </return> - <argument index="0" name="class_name" type="String"> + <argument index="0" name="class_name" type="StringName"> </argument> - <argument index="1" name="property" type="String"> + <argument index="1" name="property" type="StringName"> </argument> <argument index="2" name="disable" type="bool"> </argument> diff --git a/doc/classes/EditorFileDialog.xml b/doc/classes/EditorFileDialog.xml index 91adf6f2af..2afdfde064 100644 --- a/doc/classes/EditorFileDialog.xml +++ b/doc/classes/EditorFileDialog.xml @@ -84,7 +84,7 @@ </description> </signal> <signal name="files_selected"> - <argument index="0" name="paths" type="PoolStringArray"> + <argument index="0" name="paths" type="PackedStringArray"> </argument> <description> Emitted when multiple files are selected. diff --git a/doc/classes/EditorFileSystem.xml b/doc/classes/EditorFileSystem.xml index a05fbf2be7..a79c57e90f 100644 --- a/doc/classes/EditorFileSystem.xml +++ b/doc/classes/EditorFileSystem.xml @@ -85,14 +85,14 @@ </description> </signal> <signal name="resources_reimported"> - <argument index="0" name="resources" type="PoolStringArray"> + <argument index="0" name="resources" type="PackedStringArray"> </argument> <description> Remitted if a resource is reimported. </description> </signal> <signal name="resources_reload"> - <argument index="0" name="resources" type="PoolStringArray"> + <argument index="0" name="resources" type="PackedStringArray"> </argument> <description> </description> diff --git a/doc/classes/EditorFileSystemDirectory.xml b/doc/classes/EditorFileSystemDirectory.xml index bbd3ee9b17..096fe5df8f 100644 --- a/doc/classes/EditorFileSystemDirectory.xml +++ b/doc/classes/EditorFileSystemDirectory.xml @@ -78,7 +78,7 @@ </description> </method> <method name="get_file_type" qualifiers="const"> - <return type="String"> + <return type="StringName"> </return> <argument index="0" name="idx" type="int"> </argument> diff --git a/doc/classes/EditorInspectorPlugin.xml b/doc/classes/EditorInspectorPlugin.xml index eaddd9917c..3cc624f49b 100644 --- a/doc/classes/EditorInspectorPlugin.xml +++ b/doc/classes/EditorInspectorPlugin.xml @@ -40,7 +40,7 @@ </return> <argument index="0" name="label" type="String"> </argument> - <argument index="1" name="properties" type="PoolStringArray"> + <argument index="1" name="properties" type="PackedStringArray"> </argument> <argument index="2" name="editor" type="Control"> </argument> diff --git a/doc/classes/EditorPlugin.xml b/doc/classes/EditorPlugin.xml index e441562051..d17fd0a661 100644 --- a/doc/classes/EditorPlugin.xml +++ b/doc/classes/EditorPlugin.xml @@ -253,7 +253,7 @@ </description> </method> <method name="get_breakpoints" qualifiers="virtual"> - <return type="PoolStringArray"> + <return type="PackedStringArray"> </return> <description> This is for editors that edit script-based objects. You can return a list of breakpoints in the format ([code]script:line[/code]), for example: [code]res://path_to_script.gd:25[/code]. diff --git a/doc/classes/EditorProperty.xml b/doc/classes/EditorProperty.xml index b93274491a..3216541b20 100644 --- a/doc/classes/EditorProperty.xml +++ b/doc/classes/EditorProperty.xml @@ -21,11 +21,11 @@ <method name="emit_changed"> <return type="void"> </return> - <argument index="0" name="property" type="String"> + <argument index="0" name="property" type="StringName"> </argument> <argument index="1" name="value" type="Variant"> </argument> - <argument index="2" name="field" type="String" default=""""> + <argument index="2" name="field" type="StringName" default="@"""> </argument> <argument index="3" name="changing" type="bool" default="false"> </argument> @@ -41,7 +41,7 @@ </description> </method> <method name="get_edited_property"> - <return type="String"> + <return type="StringName"> </return> <description> Gets the edited property. If your editor is for a single property (added via [method EditorInspectorPlugin.parse_property]), then this will return the property. @@ -93,7 +93,7 @@ </members> <signals> <signal name="multiple_properties_changed"> - <argument index="0" name="properties" type="PoolStringArray"> + <argument index="0" name="properties" type="PackedStringArray"> </argument> <argument index="1" name="value" type="Array"> </argument> @@ -102,7 +102,7 @@ </description> </signal> <signal name="object_id_selected"> - <argument index="0" name="property" type="String"> + <argument index="0" name="property" type="StringName"> </argument> <argument index="1" name="id" type="int"> </argument> @@ -111,7 +111,7 @@ </description> </signal> <signal name="property_changed"> - <argument index="0" name="property" type="String"> + <argument index="0" name="property" type="StringName"> </argument> <argument index="1" name="value" type="Variant"> </argument> @@ -120,7 +120,7 @@ </description> </signal> <signal name="property_checked"> - <argument index="0" name="property" type="String"> + <argument index="0" name="property" type="StringName"> </argument> <argument index="1" name="bool" type="String"> </argument> @@ -129,14 +129,14 @@ </description> </signal> <signal name="property_keyed"> - <argument index="0" name="property" type="String"> + <argument index="0" name="property" type="StringName"> </argument> <description> Emit it if you want to add this value as an animation key (check for keying being enabled first). </description> </signal> <signal name="property_keyed_with_value"> - <argument index="0" name="property" type="String"> + <argument index="0" name="property" type="StringName"> </argument> <argument index="1" name="value" type="Variant"> </argument> diff --git a/doc/classes/EditorResourcePreview.xml b/doc/classes/EditorResourcePreview.xml index 8e0f8842e9..aac75c5c8e 100644 --- a/doc/classes/EditorResourcePreview.xml +++ b/doc/classes/EditorResourcePreview.xml @@ -34,7 +34,7 @@ </argument> <argument index="1" name="receiver" type="Object"> </argument> - <argument index="2" name="receiver_func" type="String"> + <argument index="2" name="receiver_func" type="StringName"> </argument> <argument index="3" name="userdata" type="Variant"> </argument> @@ -49,7 +49,7 @@ </argument> <argument index="1" name="receiver" type="Object"> </argument> - <argument index="2" name="receiver_func" type="String"> + <argument index="2" name="receiver_func" type="StringName"> </argument> <argument index="3" name="userdata" type="Variant"> </argument> diff --git a/doc/classes/EditorSettings.xml b/doc/classes/EditorSettings.xml index 30fc1e0c7b..73ef807c5f 100644 --- a/doc/classes/EditorSettings.xml +++ b/doc/classes/EditorSettings.xml @@ -50,7 +50,7 @@ </description> </method> <method name="get_favorites" qualifiers="const"> - <return type="PoolStringArray"> + <return type="PackedStringArray"> </return> <description> Gets the list of favorite files and directories for this project. @@ -76,7 +76,7 @@ </description> </method> <method name="get_recent_dirs" qualifiers="const"> - <return type="PoolStringArray"> + <return type="PackedStringArray"> </return> <description> Gets the list of recently visited folders in the file dialog for this project. @@ -126,7 +126,7 @@ <method name="set_favorites"> <return type="void"> </return> - <argument index="0" name="dirs" type="PoolStringArray"> + <argument index="0" name="dirs" type="PackedStringArray"> </argument> <description> Sets the list of favorite files and directories for this project. @@ -135,7 +135,7 @@ <method name="set_initial_value"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <argument index="1" name="value" type="Variant"> </argument> @@ -159,7 +159,7 @@ <method name="set_recent_dirs"> <return type="void"> </return> - <argument index="0" name="dirs" type="PoolStringArray"> + <argument index="0" name="dirs" type="PackedStringArray"> </argument> <description> Sets the list of recently visited folders in the file dialog for this project. diff --git a/doc/classes/EditorSpatialGizmo.xml b/doc/classes/EditorSpatialGizmo.xml index e7c5ca9c0f..b8c4daab07 100644 --- a/doc/classes/EditorSpatialGizmo.xml +++ b/doc/classes/EditorSpatialGizmo.xml @@ -12,7 +12,7 @@ <method name="add_collision_segments"> <return type="void"> </return> - <argument index="0" name="segments" type="PoolVector3Array"> + <argument index="0" name="segments" type="PackedVector3Array"> </argument> <description> </description> @@ -29,7 +29,7 @@ <method name="add_handles"> <return type="void"> </return> - <argument index="0" name="handles" type="PoolVector3Array"> + <argument index="0" name="handles" type="PackedVector3Array"> </argument> <argument index="1" name="material" type="Material"> </argument> @@ -45,7 +45,7 @@ <method name="add_lines"> <return type="void"> </return> - <argument index="0" name="lines" type="PoolVector3Array"> + <argument index="0" name="lines" type="PackedVector3Array"> </argument> <argument index="1" name="material" type="Material"> </argument> diff --git a/doc/classes/Expression.xml b/doc/classes/Expression.xml index b0a2802e43..fcd1aa43c0 100644 --- a/doc/classes/Expression.xml +++ b/doc/classes/Expression.xml @@ -59,7 +59,7 @@ </return> <argument index="0" name="expression" type="String"> </argument> - <argument index="1" name="input_names" type="PoolStringArray" default="PoolStringArray( )"> + <argument index="1" name="input_names" type="PackedStringArray" default="PackedStringArray( )"> </argument> <description> Parses the expression and returns an [enum Error] code. diff --git a/doc/classes/File.xml b/doc/classes/File.xml index 7fa87c2b60..e9477517cf 100644 --- a/doc/classes/File.xml +++ b/doc/classes/File.xml @@ -87,16 +87,16 @@ </description> </method> <method name="get_buffer" qualifiers="const"> - <return type="PoolByteArray"> + <return type="PackedByteArray"> </return> <argument index="0" name="len" type="int"> </argument> <description> - Returns next [code]len[/code] bytes of the file as a [PoolByteArray]. + Returns next [code]len[/code] bytes of the file as a [PackedByteArray]. </description> </method> <method name="get_csv_line" qualifiers="const"> - <return type="PoolStringArray"> + <return type="PackedStringArray"> </return> <argument index="0" name="delim" type="String" default="",""> </argument> @@ -252,7 +252,7 @@ </argument> <argument index="1" name="mode_flags" type="int" enum="File.ModeFlags"> </argument> - <argument index="2" name="key" type="PoolByteArray"> + <argument index="2" name="key" type="PackedByteArray"> </argument> <description> Opens an encrypted file in write or read mode. You need to pass a binary key to encrypt/decrypt it. @@ -329,7 +329,7 @@ <method name="store_buffer"> <return type="void"> </return> - <argument index="0" name="buffer" type="PoolByteArray"> + <argument index="0" name="buffer" type="PackedByteArray"> </argument> <description> Stores the given array of bytes in the file. @@ -338,12 +338,12 @@ <method name="store_csv_line"> <return type="void"> </return> - <argument index="0" name="values" type="PoolStringArray"> + <argument index="0" name="values" type="PackedStringArray"> </argument> <argument index="1" name="delim" type="String" default="",""> </argument> <description> - Store the given [PoolStringArray] in the file as a line formatted in the CSV (Comma-Separated Values) format. You can pass a different delimiter [code]delim[/code] to use other than the default [code]","[/code] (comma). This delimiter must be one-character long. + Store the given [PackedStringArray] in the file as a line formatted in the CSV (Comma-Separated Values) format. You can pass a different delimiter [code]delim[/code] to use other than the default [code]","[/code] (comma). This delimiter must be one-character long. Text will be encoded as UTF-8. </description> </method> diff --git a/doc/classes/FileDialog.xml b/doc/classes/FileDialog.xml index 37b5cec2c9..f2c65a8610 100644 --- a/doc/classes/FileDialog.xml +++ b/doc/classes/FileDialog.xml @@ -68,8 +68,8 @@ The currently selected file path of the file dialog. </member> <member name="dialog_hide_on_ok" type="bool" setter="set_hide_on_ok" getter="get_hide_on_ok" override="true" default="false" /> - <member name="filters" type="PoolStringArray" setter="set_filters" getter="get_filters" default="PoolStringArray( )"> - The available file type filters. For example, this shows only [code].png[/code] and [code].gd[/code] files: [code]set_filters(PoolStringArray(["*.png ; PNG Images","*.gd ; GDScript Files"]))[/code]. + <member name="filters" type="PackedStringArray" setter="set_filters" getter="get_filters" default="PackedStringArray( )"> + The available file type filters. For example, this shows only [code].png[/code] and [code].gd[/code] files: [code]set_filters(PackedStringArray(["*.png ; PNG Images","*.gd ; GDScript Files"]))[/code]. </member> <member name="mode" type="int" setter="set_mode" getter="get_mode" enum="FileDialog.Mode" default="4"> The dialog's open or save mode, which affects the selection behavior. See enum [code]Mode[/code] constants. @@ -98,7 +98,7 @@ </description> </signal> <signal name="files_selected"> - <argument index="0" name="paths" type="PoolStringArray"> + <argument index="0" name="paths" type="PackedStringArray"> </argument> <description> Emitted when the user selects multiple files. diff --git a/doc/classes/FuncRef.xml b/doc/classes/FuncRef.xml index 37c3597a95..bf0c0b0d34 100644 --- a/doc/classes/FuncRef.xml +++ b/doc/classes/FuncRef.xml @@ -36,7 +36,7 @@ <method name="set_function"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <description> The name of the referenced function to call on the object, without parentheses or any parameters. diff --git a/doc/classes/GIProbeData.xml b/doc/classes/GIProbeData.xml index d2918c24f7..228e1afb4c 100644 --- a/doc/classes/GIProbeData.xml +++ b/doc/classes/GIProbeData.xml @@ -16,13 +16,13 @@ </argument> <argument index="2" name="octree_size" type="Vector3"> </argument> - <argument index="3" name="octree_cells" type="PoolByteArray"> + <argument index="3" name="octree_cells" type="PackedByteArray"> </argument> - <argument index="4" name="data_cells" type="PoolByteArray"> + <argument index="4" name="data_cells" type="PackedByteArray"> </argument> - <argument index="5" name="distance_field" type="PoolByteArray"> + <argument index="5" name="distance_field" type="PackedByteArray"> </argument> - <argument index="6" name="level_counts" type="PoolIntArray"> + <argument index="6" name="level_counts" type="PackedInt32Array"> </argument> <description> </description> @@ -34,19 +34,19 @@ </description> </method> <method name="get_data_cells" qualifiers="const"> - <return type="PoolByteArray"> + <return type="PackedByteArray"> </return> <description> </description> </method> <method name="get_level_counts" qualifiers="const"> - <return type="PoolIntArray"> + <return type="PackedInt32Array"> </return> <description> </description> </method> <method name="get_octree_cells" qualifiers="const"> - <return type="PoolByteArray"> + <return type="PackedByteArray"> </return> <description> </description> diff --git a/doc/classes/Geometry.xml b/doc/classes/Geometry.xml index 739c860b28..b2d77f6f92 100644 --- a/doc/classes/Geometry.xml +++ b/doc/classes/Geometry.xml @@ -51,9 +51,9 @@ </description> </method> <method name="clip_polygon"> - <return type="PoolVector3Array"> + <return type="PackedVector3Array"> </return> - <argument index="0" name="points" type="PoolVector3Array"> + <argument index="0" name="points" type="PackedVector3Array"> </argument> <argument index="1" name="plane" type="Plane"> </argument> @@ -64,9 +64,9 @@ <method name="clip_polygons_2d"> <return type="Array"> </return> - <argument index="0" name="polygon_a" type="PoolVector2Array"> + <argument index="0" name="polygon_a" type="PackedVector2Array"> </argument> - <argument index="1" name="polygon_b" type="PoolVector2Array"> + <argument index="1" name="polygon_b" type="PackedVector2Array"> </argument> <description> Clips [code]polygon_a[/code] against [code]polygon_b[/code] and returns an array of clipped polygons. This performs [constant OPERATION_DIFFERENCE] between polygons. Returns an empty array if [code]polygon_b[/code] completely overlaps [code]polygon_a[/code]. @@ -76,18 +76,18 @@ <method name="clip_polyline_with_polygon_2d"> <return type="Array"> </return> - <argument index="0" name="polyline" type="PoolVector2Array"> + <argument index="0" name="polyline" type="PackedVector2Array"> </argument> - <argument index="1" name="polygon" type="PoolVector2Array"> + <argument index="1" name="polygon" type="PackedVector2Array"> </argument> <description> Clips [code]polyline[/code] against [code]polygon[/code] and returns an array of clipped polylines. This performs [constant OPERATION_DIFFERENCE] between the polyline and the polygon. This operation can be thought of as cutting a line with a closed shape. </description> </method> <method name="convex_hull_2d"> - <return type="PoolVector2Array"> + <return type="PackedVector2Array"> </return> - <argument index="0" name="points" type="PoolVector2Array"> + <argument index="0" name="points" type="PackedVector2Array"> </argument> <description> Given an array of [Vector2]s, returns the convex hull as a list of points in counterclockwise order. The last point is the same as the first one. @@ -96,9 +96,9 @@ <method name="exclude_polygons_2d"> <return type="Array"> </return> - <argument index="0" name="polygon_a" type="PoolVector2Array"> + <argument index="0" name="polygon_a" type="PackedVector2Array"> </argument> - <argument index="1" name="polygon_b" type="PoolVector2Array"> + <argument index="1" name="polygon_b" type="PackedVector2Array"> </argument> <description> Mutually excludes common area defined by intersection of [code]polygon_a[/code] and [code]polygon_b[/code] (see [method intersect_polygons_2d]) and returns an array of excluded polygons. This performs [constant OPERATION_XOR] between polygons. In other words, returns all but common area between polygons. @@ -158,7 +158,7 @@ </description> </method> <method name="get_closest_points_between_segments"> - <return type="PoolVector3Array"> + <return type="PackedVector3Array"> </return> <argument index="0" name="p1" type="Vector3"> </argument> @@ -169,11 +169,11 @@ <argument index="3" name="q2" type="Vector3"> </argument> <description> - Given the two 3D segments ([code]p1[/code], [code]p2[/code]) and ([code]q1[/code], [code]q2[/code]), finds those two points on the two segments that are closest to each other. Returns a [PoolVector3Array] that contains this point on ([code]p1[/code], [code]p2[/code]) as well the accompanying point on ([code]q1[/code], [code]q2[/code]). + Given the two 3D segments ([code]p1[/code], [code]p2[/code]) and ([code]q1[/code], [code]q2[/code]), finds those two points on the two segments that are closest to each other. Returns a [PackedVector3Array] that contains this point on ([code]p1[/code], [code]p2[/code]) as well the accompanying point on ([code]q1[/code], [code]q2[/code]). </description> </method> <method name="get_closest_points_between_segments_2d"> - <return type="PoolVector2Array"> + <return type="PackedVector2Array"> </return> <argument index="0" name="p1" type="Vector2"> </argument> @@ -184,7 +184,7 @@ <argument index="3" name="q2" type="Vector2"> </argument> <description> - Given the two 2D segments ([code]p1[/code], [code]p2[/code]) and ([code]q1[/code], [code]q2[/code]), finds those two points on the two segments that are closest to each other. Returns a [PoolVector2Array] that contains this point on ([code]p1[/code], [code]p2[/code]) as well the accompanying point on ([code]q1[/code], [code]q2[/code]). + Given the two 2D segments ([code]p1[/code], [code]p2[/code]) and ([code]q1[/code], [code]q2[/code]), finds those two points on the two segments that are closest to each other. Returns a [PackedVector2Array] that contains this point on ([code]p1[/code], [code]p2[/code]) as well the accompanying point on ([code]q1[/code], [code]q2[/code]). </description> </method> <method name="get_uv84_normal_bit"> @@ -199,9 +199,9 @@ <method name="intersect_polygons_2d"> <return type="Array"> </return> - <argument index="0" name="polygon_a" type="PoolVector2Array"> + <argument index="0" name="polygon_a" type="PackedVector2Array"> </argument> - <argument index="1" name="polygon_b" type="PoolVector2Array"> + <argument index="1" name="polygon_b" type="PackedVector2Array"> </argument> <description> Intersects [code]polygon_a[/code] with [code]polygon_b[/code] and returns an array of intersected polygons. This performs [constant OPERATION_INTERSECTION] between polygons. In other words, returns common area shared by polygons. Returns an empty array if no intersection occurs. @@ -211,9 +211,9 @@ <method name="intersect_polyline_with_polygon_2d"> <return type="Array"> </return> - <argument index="0" name="polyline" type="PoolVector2Array"> + <argument index="0" name="polyline" type="PackedVector2Array"> </argument> - <argument index="1" name="polygon" type="PoolVector2Array"> + <argument index="1" name="polygon" type="PackedVector2Array"> </argument> <description> Intersects [code]polyline[/code] with [code]polygon[/code] and returns an array of intersected polylines. This performs [constant OPERATION_INTERSECTION] between the polyline and the polygon. This operation can be thought of as chopping a line with a closed shape. @@ -237,7 +237,7 @@ </return> <argument index="0" name="point" type="Vector2"> </argument> - <argument index="1" name="polygon" type="PoolVector2Array"> + <argument index="1" name="polygon" type="PackedVector2Array"> </argument> <description> Returns [code]true[/code] if [code]point[/code] is inside [code]polygon[/code] or if it's located exactly [i]on[/i] polygon's boundary, otherwise returns [code]false[/code]. @@ -246,7 +246,7 @@ <method name="is_polygon_clockwise"> <return type="bool"> </return> - <argument index="0" name="polygon" type="PoolVector2Array"> + <argument index="0" name="polygon" type="PackedVector2Array"> </argument> <description> Returns [code]true[/code] if [code]polygon[/code]'s vertices are ordered in clockwise order, otherwise returns [code]false[/code]. @@ -271,7 +271,7 @@ <method name="make_atlas"> <return type="Dictionary"> </return> - <argument index="0" name="sizes" type="PoolVector2Array"> + <argument index="0" name="sizes" type="PackedVector2Array"> </argument> <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]. @@ -280,9 +280,9 @@ <method name="merge_polygons_2d"> <return type="Array"> </return> - <argument index="0" name="polygon_a" type="PoolVector2Array"> + <argument index="0" name="polygon_a" type="PackedVector2Array"> </argument> - <argument index="1" name="polygon_b" type="PoolVector2Array"> + <argument index="1" name="polygon_b" type="PackedVector2Array"> </argument> <description> Merges (combines) [code]polygon_a[/code] and [code]polygon_b[/code] and returns an array of merged polygons. This performs [constant OPERATION_UNION] between polygons. @@ -292,7 +292,7 @@ <method name="offset_polygon_2d"> <return type="Array"> </return> - <argument index="0" name="polygon" type="PoolVector2Array"> + <argument index="0" name="polygon" type="PackedVector2Array"> </argument> <argument index="1" name="delta" type="float"> </argument> @@ -307,7 +307,7 @@ <method name="offset_polyline_2d"> <return type="Array"> </return> - <argument index="0" name="polyline" type="PoolVector2Array"> + <argument index="0" name="polyline" type="PackedVector2Array"> </argument> <argument index="1" name="delta" type="float"> </argument> @@ -370,7 +370,7 @@ </description> </method> <method name="segment_intersects_convex"> - <return type="PoolVector3Array"> + <return type="PackedVector3Array"> </return> <argument index="0" name="from" type="Vector3"> </argument> @@ -379,11 +379,11 @@ <argument index="2" name="planes" type="Array"> </argument> <description> - Given a convex hull defined though the [Plane]s in the array [code]planes[/code], tests if the segment ([code]from[/code], [code]to[/code]) intersects with that hull. If an intersection is found, returns a [PoolVector3Array] containing the point the intersection and the hull's normal. If no intersecion is found, an the returned array is empty. + Given a convex hull defined though the [Plane]s in the array [code]planes[/code], tests if the segment ([code]from[/code], [code]to[/code]) intersects with that hull. If an intersection is found, returns a [PackedVector3Array] containing the point the intersection and the hull's normal. If no intersecion is found, an the returned array is empty. </description> </method> <method name="segment_intersects_cylinder"> - <return type="PoolVector3Array"> + <return type="PackedVector3Array"> </return> <argument index="0" name="from" type="Vector3"> </argument> @@ -394,7 +394,7 @@ <argument index="3" name="radius" type="float"> </argument> <description> - Checks if the segment ([code]from[/code], [code]to[/code]) intersects the cylinder with height [code]height[/code] that is centered at the origin and has radius [code]radius[/code]. If no, returns an empty [PoolVector3Array]. If an intersection takes place, the returned array contains the point of intersection and the cylinder's normal at the point of intersection. + Checks if the segment ([code]from[/code], [code]to[/code]) intersects the cylinder with height [code]height[/code] that is centered at the origin and has radius [code]radius[/code]. If no, returns an empty [PackedVector3Array]. If an intersection takes place, the returned array contains the point of intersection and the cylinder's normal at the point of intersection. </description> </method> <method name="segment_intersects_segment_2d"> @@ -413,7 +413,7 @@ </description> </method> <method name="segment_intersects_sphere"> - <return type="PoolVector3Array"> + <return type="PackedVector3Array"> </return> <argument index="0" name="from" type="Vector3"> </argument> @@ -424,7 +424,7 @@ <argument index="3" name="sphere_radius" type="float"> </argument> <description> - Checks if the segment ([code]from[/code], [code]to[/code]) intersects the sphere that is located at [code]sphere_position[/code] and has radius [code]sphere_radius[/code]. If no, returns an empty [PoolVector3Array]. If yes, returns a [PoolVector3Array] containing the point of intersection and the sphere's normal at the point of intersection. + Checks if the segment ([code]from[/code], [code]to[/code]) intersects the sphere that is located at [code]sphere_position[/code] and has radius [code]sphere_radius[/code]. If no, returns an empty [PackedVector3Array]. If yes, returns a [PackedVector3Array] containing the point of intersection and the sphere's normal at the point of intersection. </description> </method> <method name="segment_intersects_triangle"> @@ -445,21 +445,21 @@ </description> </method> <method name="triangulate_delaunay_2d"> - <return type="PoolIntArray"> + <return type="PackedInt32Array"> </return> - <argument index="0" name="points" type="PoolVector2Array"> + <argument index="0" name="points" type="PackedVector2Array"> </argument> <description> - Triangulates the area specified by discrete set of [code]points[/code] such that no point is inside the circumcircle of any resulting triangle. Returns a [PoolIntArray] where each triangle consists of three consecutive point indices into [code]points[/code] (i.e. the returned array will have [code]n * 3[/code] elements, with [code]n[/code] being the number of found triangles). If the triangulation did not succeed, an empty [PoolIntArray] is returned. + Triangulates the area specified by discrete set of [code]points[/code] such that no point is inside the circumcircle of any resulting triangle. Returns a [PackedInt32Array] where each triangle consists of three consecutive point indices into [code]points[/code] (i.e. the returned array will have [code]n * 3[/code] elements, with [code]n[/code] being the number of found triangles). If the triangulation did not succeed, an empty [PackedInt32Array] is returned. </description> </method> <method name="triangulate_polygon"> - <return type="PoolIntArray"> + <return type="PackedInt32Array"> </return> - <argument index="0" name="polygon" type="PoolVector2Array"> + <argument index="0" name="polygon" type="PackedVector2Array"> </argument> <description> - Triangulates the polygon specified by the points in [code]polygon[/code]. Returns a [PoolIntArray] where each triangle consists of three consecutive point indices into [code]polygon[/code] (i.e. the returned array will have [code]n * 3[/code] elements, with [code]n[/code] being the number of found triangles). If the triangulation did not succeed, an empty [PoolIntArray] is returned. + Triangulates the polygon specified by the points in [code]polygon[/code]. Returns a [PackedInt32Array] where each triangle consists of three consecutive point indices into [code]polygon[/code] (i.e. the returned array will have [code]n * 3[/code] elements, with [code]n[/code] being the number of found triangles). If the triangulation did not succeed, an empty [PackedInt32Array] is returned. </description> </method> </methods> diff --git a/doc/classes/Gradient.xml b/doc/classes/Gradient.xml index 3ce70045ef..05aebef9de 100644 --- a/doc/classes/Gradient.xml +++ b/doc/classes/Gradient.xml @@ -87,11 +87,11 @@ </method> </methods> <members> - <member name="colors" type="PoolColorArray" setter="set_colors" getter="get_colors" default="PoolColorArray( 0, 0, 0, 1, 1, 1, 1, 1 )"> - Gradient's colors returned as a [PoolColorArray]. + <member name="colors" type="PackedColorArray" setter="set_colors" getter="get_colors" default="PackedColorArray( 0, 0, 0, 1, 1, 1, 1, 1 )"> + Gradient's colors returned as a [PackedColorArray]. </member> - <member name="offsets" type="PoolRealArray" setter="set_offsets" getter="get_offsets" default="PoolRealArray( 0, 1 )"> - Gradient's offsets returned as a [PoolRealArray]. + <member name="offsets" type="PackedFloat32Array" setter="set_offsets" getter="get_offsets" default="PackedFloat32Array( 0, 1 )"> + Gradient's offsets returned as a [PackedFloat32Array]. </member> </members> <constants> diff --git a/doc/classes/GraphEdit.xml b/doc/classes/GraphEdit.xml index 8733b94ee7..543afb01ee 100644 --- a/doc/classes/GraphEdit.xml +++ b/doc/classes/GraphEdit.xml @@ -49,11 +49,11 @@ <method name="connect_node"> <return type="int" enum="Error"> </return> - <argument index="0" name="from" type="String"> + <argument index="0" name="from" type="StringName"> </argument> <argument index="1" name="from_port" type="int"> </argument> - <argument index="2" name="to" type="String"> + <argument index="2" name="to" type="StringName"> </argument> <argument index="3" name="to_port" type="int"> </argument> @@ -64,11 +64,11 @@ <method name="disconnect_node"> <return type="void"> </return> - <argument index="0" name="from" type="String"> + <argument index="0" name="from" type="StringName"> </argument> <argument index="1" name="from_port" type="int"> </argument> - <argument index="2" name="to" type="String"> + <argument index="2" name="to" type="StringName"> </argument> <argument index="3" name="to_port" type="int"> </argument> @@ -94,11 +94,11 @@ <method name="is_node_connected"> <return type="bool"> </return> - <argument index="0" name="from" type="String"> + <argument index="0" name="from" type="StringName"> </argument> <argument index="1" name="from_port" type="int"> </argument> - <argument index="2" name="to" type="String"> + <argument index="2" name="to" type="StringName"> </argument> <argument index="3" name="to_port" type="int"> </argument> @@ -149,11 +149,11 @@ <method name="set_connection_activity"> <return type="void"> </return> - <argument index="0" name="from" type="String"> + <argument index="0" name="from" type="StringName"> </argument> <argument index="1" name="from_port" type="int"> </argument> - <argument index="2" name="to" type="String"> + <argument index="2" name="to" type="StringName"> </argument> <argument index="3" name="to_port" type="int"> </argument> @@ -204,7 +204,7 @@ </description> </signal> <signal name="connection_from_empty"> - <argument index="0" name="to" type="String"> + <argument index="0" name="to" type="StringName"> </argument> <argument index="1" name="to_slot" type="int"> </argument> @@ -215,11 +215,11 @@ </description> </signal> <signal name="connection_request"> - <argument index="0" name="from" type="String"> + <argument index="0" name="from" type="StringName"> </argument> <argument index="1" name="from_slot" type="int"> </argument> - <argument index="2" name="to" type="String"> + <argument index="2" name="to" type="StringName"> </argument> <argument index="3" name="to_slot" type="int"> </argument> @@ -228,7 +228,7 @@ </description> </signal> <signal name="connection_to_empty"> - <argument index="0" name="from" type="String"> + <argument index="0" name="from" type="StringName"> </argument> <argument index="1" name="from_slot" type="int"> </argument> @@ -249,11 +249,11 @@ </description> </signal> <signal name="disconnection_request"> - <argument index="0" name="from" type="String"> + <argument index="0" name="from" type="StringName"> </argument> <argument index="1" name="from_slot" type="int"> </argument> - <argument index="2" name="to" type="String"> + <argument index="2" name="to" type="StringName"> </argument> <argument index="3" name="to_slot" type="int"> </argument> diff --git a/doc/classes/HTTPClient.xml b/doc/classes/HTTPClient.xml index bdcbb11ef0..76153ae041 100644 --- a/doc/classes/HTTPClient.xml +++ b/doc/classes/HTTPClient.xml @@ -55,7 +55,7 @@ </description> </method> <method name="get_response_headers"> - <return type="PoolStringArray"> + <return type="PackedStringArray"> </return> <description> Returns the response headers. @@ -124,7 +124,7 @@ </description> </method> <method name="read_response_body_chunk"> - <return type="PoolByteArray"> + <return type="PackedByteArray"> </return> <description> Reads one chunk from the response. @@ -137,7 +137,7 @@ </argument> <argument index="1" name="url" type="String"> </argument> - <argument index="2" name="headers" type="PoolStringArray"> + <argument index="2" name="headers" type="PackedStringArray"> </argument> <argument index="3" name="body" type="String" default=""""> </argument> @@ -160,9 +160,9 @@ </argument> <argument index="1" name="url" type="String"> </argument> - <argument index="2" name="headers" type="PoolStringArray"> + <argument index="2" name="headers" type="PackedStringArray"> </argument> - <argument index="3" name="body" type="PoolByteArray"> + <argument index="3" name="body" type="PackedByteArray"> </argument> <description> Sends a raw request to the connected host. The URL parameter is just the part after the host, so for [code]http://somehost.com/index.php[/code], it is [code]index.php[/code]. diff --git a/doc/classes/HTTPRequest.xml b/doc/classes/HTTPRequest.xml index 313f21d8f9..53ca1fc6a9 100644 --- a/doc/classes/HTTPRequest.xml +++ b/doc/classes/HTTPRequest.xml @@ -96,7 +96,7 @@ </return> <argument index="0" name="url" type="String"> </argument> - <argument index="1" name="custom_headers" type="PoolStringArray" default="PoolStringArray( )"> + <argument index="1" name="custom_headers" type="PackedStringArray" default="PackedStringArray( )"> </argument> <argument index="2" name="ssl_validate_domain" type="bool" default="true"> </argument> @@ -136,9 +136,9 @@ </argument> <argument index="1" name="response_code" type="int"> </argument> - <argument index="2" name="headers" type="PoolStringArray"> + <argument index="2" name="headers" type="PackedStringArray"> </argument> - <argument index="3" name="body" type="PoolByteArray"> + <argument index="3" name="body" type="PackedByteArray"> </argument> <description> Emitted when a request is completed. diff --git a/doc/classes/HashingContext.xml b/doc/classes/HashingContext.xml index bc585df4a0..f8152c813e 100644 --- a/doc/classes/HashingContext.xml +++ b/doc/classes/HashingContext.xml @@ -33,7 +33,7 @@ </tutorials> <methods> <method name="finish"> - <return type="PoolByteArray"> + <return type="PackedByteArray"> </return> <description> Closes the current context, and return the computed hash. @@ -51,7 +51,7 @@ <method name="update"> <return type="int" enum="Error"> </return> - <argument index="0" name="chunk" type="PoolByteArray"> + <argument index="0" name="chunk" type="PackedByteArray"> </argument> <description> Updates the computation with the given [code]chunk[/code] of data. diff --git a/doc/classes/HeightMapShape.xml b/doc/classes/HeightMapShape.xml index f94089066c..029f3642d2 100644 --- a/doc/classes/HeightMapShape.xml +++ b/doc/classes/HeightMapShape.xml @@ -11,7 +11,7 @@ <methods> </methods> <members> - <member name="map_data" type="PoolRealArray" setter="set_map_data" getter="get_map_data" default="PoolRealArray( 0, 0, 0, 0 )"> + <member name="map_data" type="PackedFloat32Array" setter="set_map_data" getter="get_map_data" default="PackedFloat32Array( 0, 0, 0, 0 )"> Height map data, pool array must be of [member map_width] * [member map_depth] size. </member> <member name="map_depth" type="int" setter="set_map_depth" getter="get_map_depth" default="2"> diff --git a/doc/classes/Image.xml b/doc/classes/Image.xml index b4a46dd661..8bd2213194 100644 --- a/doc/classes/Image.xml +++ b/doc/classes/Image.xml @@ -150,7 +150,7 @@ </argument> <argument index="3" name="format" type="int" enum="Image.Format"> </argument> - <argument index="4" name="data" type="PoolByteArray"> + <argument index="4" name="data" type="PackedByteArray"> </argument> <description> Creates a new image of given size and format. See [enum Format] constants. Fills the image with the given raw data. If [code]use_mipmaps[/code] is [code]true[/code] then generate mipmaps for this image. See the [method generate_mipmaps]. @@ -236,7 +236,7 @@ </description> </method> <method name="get_data" qualifiers="const"> - <return type="PoolByteArray"> + <return type="PackedByteArray"> </return> <description> Returns the image's raw data. @@ -273,7 +273,7 @@ <argument index="1" name="y" type="int"> </argument> <description> - Returns the color of the pixel at [code](x, y)[/code] if the image is locked. If the image is unlocked, it always returns a [Color] with the value [code](0, 0, 0, 1.0)[/code]. This is the same as [method get_pixelv], but two integer arguments instead of a Vector2 argument. + Returns the color of the pixel at [code](x, y)[/code]. This is the same as [method get_pixelv], but with two integer arguments instead of a [Vector2] argument. </description> </method> <method name="get_pixelv" qualifiers="const"> @@ -282,7 +282,7 @@ <argument index="0" name="src" type="Vector2"> </argument> <description> - Returns the color of the pixel at [code]src[/code] if the image is locked. If the image is unlocked, it always returns a [Color] with the value [code](0, 0, 0, 1.0)[/code]. This is the same as [method get_pixel], but with a Vector2 argument instead of two integer arguments. + Returns the color of the pixel at [code]src[/code]. This is the same as [method get_pixel], but with a [Vector2] argument instead of two integer arguments. </description> </method> <method name="get_rect" qualifiers="const"> @@ -355,7 +355,7 @@ <method name="load_jpg_from_buffer"> <return type="int" enum="Error"> </return> - <argument index="0" name="buffer" type="PoolByteArray"> + <argument index="0" name="buffer" type="PackedByteArray"> </argument> <description> Loads an image from the binary contents of a JPEG file. @@ -364,7 +364,7 @@ <method name="load_png_from_buffer"> <return type="int" enum="Error"> </return> - <argument index="0" name="buffer" type="PoolByteArray"> + <argument index="0" name="buffer" type="PackedByteArray"> </argument> <description> Loads an image from the binary contents of a PNG file. @@ -373,19 +373,12 @@ <method name="load_webp_from_buffer"> <return type="int" enum="Error"> </return> - <argument index="0" name="buffer" type="PoolByteArray"> + <argument index="0" name="buffer" type="PackedByteArray"> </argument> <description> Loads an image from the binary contents of a WebP file. </description> </method> - <method name="lock"> - <return type="void"> - </return> - <description> - Locks the data for reading and writing access. Sends an error to the console if the image is not locked when reading or writing a pixel. - </description> - </method> <method name="normalmap_to_xy"> <return type="void"> </return> @@ -459,14 +452,11 @@ <argument index="2" name="color" type="Color"> </argument> <description> - Sets the [Color] of the pixel at [code](x, y)[/code] if the image is locked. Example: + Sets the [Color] of the pixel at [code](x, y)[/code]. Example: [codeblock] var img = Image.new() img.create(img_width, img_height, false, Image.FORMAT_RGBA8) - img.lock() - img.set_pixel(x, y, color) # Works - img.unlock() - img.set_pixel(x, y, color) # Does not have an effect + img.set_pixel(x, y, color) [/codeblock] </description> </method> @@ -478,14 +468,11 @@ <argument index="1" name="color" type="Color"> </argument> <description> - Sets the [Color] of the pixel at [code](dst.x, dst.y)[/code] if the image is locked. Note that the [code]dst[/code] values must be integers. Example: + Sets the [Color] of the pixel at [code](dst.x, dst.y)[/code]. Note that the [code]dst[/code] values must be integers. Example: [codeblock] var img = Image.new() img.create(img_width, img_height, false, Image.FORMAT_RGBA8) - img.lock() - img.set_pixelv(Vector2(x, y), color) # Works - img.unlock() - img.set_pixelv(Vector2(x, y), color) # Does not have an effect + img.set_pixelv(Vector2(x, y), color) [/codeblock] </description> </method> @@ -503,16 +490,9 @@ Converts the raw data from the sRGB colorspace to a linear scale. </description> </method> - <method name="unlock"> - <return type="void"> - </return> - <description> - Unlocks the data and prevents changes. - </description> - </method> </methods> <members> - <member name="data" type="Dictionary" setter="_set_data" getter="_get_data" default="{"data": PoolByteArray( ),"format": "Lum8","height": 0,"mipmaps": false,"width": 0}"> + <member name="data" type="Dictionary" setter="_set_data" getter="_get_data" default="{"data": PackedByteArray( ),"format": "Lum8","height": 0,"mipmaps": false,"width": 0}"> Holds all of the image's color data in a given format. See [enum Format] constants. </member> </members> diff --git a/doc/classes/Input.xml b/doc/classes/Input.xml index b7afe57218..c6de27a775 100644 --- a/doc/classes/Input.xml +++ b/doc/classes/Input.xml @@ -13,7 +13,7 @@ <method name="action_press"> <return type="void"> </return> - <argument index="0" name="action" type="String"> + <argument index="0" name="action" type="StringName"> </argument> <argument index="1" name="strength" type="float" default="1.0"> </argument> @@ -26,7 +26,7 @@ <method name="action_release"> <return type="void"> </return> - <argument index="0" name="action" type="String"> + <argument index="0" name="action" type="StringName"> </argument> <description> If the specified action is already pressed, this will release it. @@ -54,7 +54,7 @@ <method name="get_action_strength" qualifiers="const"> <return type="float"> </return> - <argument index="0" name="action" type="String"> + <argument index="0" name="action" type="StringName"> </argument> <description> Returns a value between 0 and 1 representing the intensity of the given action. In a joypad, for example, the further away the axis (analog sticks or L2, R2 triggers) is from the dead zone, the closer the value will be to 1. If the action is mapped to a control that has no axis as the keyboard, the value returned will be 0 or 1. @@ -202,7 +202,7 @@ <method name="is_action_just_pressed" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="action" type="String"> + <argument index="0" name="action" type="StringName"> </argument> <description> Returns [code]true[/code] when the user starts pressing the action event, meaning it's [code]true[/code] only on the frame that the user pressed down the button. @@ -212,7 +212,7 @@ <method name="is_action_just_released" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="action" type="String"> + <argument index="0" name="action" type="StringName"> </argument> <description> Returns [code]true[/code] when the user stops pressing the action event, meaning it's [code]true[/code] only on the frame that the user released the button. @@ -221,7 +221,7 @@ <method name="is_action_pressed" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="action" type="String"> + <argument index="0" name="action" type="StringName"> </argument> <description> Returns [code]true[/code] if you are pressing the action event. Note that if an action has multiple buttons assigned and more than one of them is pressed, releasing one button will release the action, even if some other button assigned to this action is still pressed. diff --git a/doc/classes/InputEvent.xml b/doc/classes/InputEvent.xml index 9e3764206b..413e217b45 100644 --- a/doc/classes/InputEvent.xml +++ b/doc/classes/InputEvent.xml @@ -31,7 +31,7 @@ <method name="get_action_strength" qualifiers="const"> <return type="float"> </return> - <argument index="0" name="action" type="String"> + <argument index="0" name="action" type="StringName"> </argument> <description> Returns a value between 0.0 and 1.0 depending on the given actions' state. Useful for getting the value of events of type [InputEventJoypadMotion]. @@ -40,7 +40,7 @@ <method name="is_action" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="action" type="String"> + <argument index="0" name="action" type="StringName"> </argument> <description> Returns [code]true[/code] if this input event matches a pre-defined action of any type. @@ -49,7 +49,7 @@ <method name="is_action_pressed" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="action" type="String"> + <argument index="0" name="action" type="StringName"> </argument> <argument index="1" name="allow_echo" type="bool" default="false"> </argument> @@ -60,7 +60,7 @@ <method name="is_action_released" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="action" type="String"> + <argument index="0" name="action" type="StringName"> </argument> <description> Returns [code]true[/code] if the given action is released (i.e. not pressed). Not relevant for events of type [InputEventMouseMotion] or [InputEventScreenDrag]. diff --git a/doc/classes/InputEventAction.xml b/doc/classes/InputEventAction.xml index 2dac693a52..1c38ff8e8f 100644 --- a/doc/classes/InputEventAction.xml +++ b/doc/classes/InputEventAction.xml @@ -12,7 +12,7 @@ <methods> </methods> <members> - <member name="action" type="String" setter="set_action" getter="get_action" default=""""> + <member name="action" type="StringName" setter="set_action" getter="get_action" default="@"""> The action's name. Actions are accessed via this [String]. </member> <member name="pressed" type="bool" setter="set_pressed" getter="is_pressed" default="false"> diff --git a/doc/classes/InputMap.xml b/doc/classes/InputMap.xml index aa3400dd97..da93d7fb53 100644 --- a/doc/classes/InputMap.xml +++ b/doc/classes/InputMap.xml @@ -13,7 +13,7 @@ <method name="action_add_event"> <return type="void"> </return> - <argument index="0" name="action" type="String"> + <argument index="0" name="action" type="StringName"> </argument> <argument index="1" name="event" type="InputEvent"> </argument> @@ -24,7 +24,7 @@ <method name="action_erase_event"> <return type="void"> </return> - <argument index="0" name="action" type="String"> + <argument index="0" name="action" type="StringName"> </argument> <argument index="1" name="event" type="InputEvent"> </argument> @@ -35,7 +35,7 @@ <method name="action_erase_events"> <return type="void"> </return> - <argument index="0" name="action" type="String"> + <argument index="0" name="action" type="StringName"> </argument> <description> Removes all events from an action. @@ -44,7 +44,7 @@ <method name="action_has_event"> <return type="bool"> </return> - <argument index="0" name="action" type="String"> + <argument index="0" name="action" type="StringName"> </argument> <argument index="1" name="event" type="InputEvent"> </argument> @@ -55,7 +55,7 @@ <method name="action_set_deadzone"> <return type="void"> </return> - <argument index="0" name="action" type="String"> + <argument index="0" name="action" type="StringName"> </argument> <argument index="1" name="deadzone" type="float"> </argument> @@ -66,7 +66,7 @@ <method name="add_action"> <return type="void"> </return> - <argument index="0" name="action" type="String"> + <argument index="0" name="action" type="StringName"> </argument> <argument index="1" name="deadzone" type="float" default="0.5"> </argument> @@ -78,7 +78,7 @@ <method name="erase_action"> <return type="void"> </return> - <argument index="0" name="action" type="String"> + <argument index="0" name="action" type="StringName"> </argument> <description> Removes an action from the [InputMap]. @@ -89,7 +89,7 @@ </return> <argument index="0" name="event" type="InputEvent"> </argument> - <argument index="1" name="action" type="String"> + <argument index="1" name="action" type="StringName"> </argument> <description> Returns [code]true[/code] if the given event is part of an existing action. This method ignores keyboard modifiers if the given [InputEvent] is not pressed (for proper release detection). See [method action_has_event] if you don't want this behavior. @@ -98,7 +98,7 @@ <method name="get_action_list"> <return type="Array"> </return> - <argument index="0" name="action" type="String"> + <argument index="0" name="action" type="StringName"> </argument> <description> Returns an array of [InputEvent]s associated with a given action. @@ -114,7 +114,7 @@ <method name="has_action" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="action" type="String"> + <argument index="0" name="action" type="StringName"> </argument> <description> Returns [code]true[/code] if the [InputMap] has a registered action with the given name. diff --git a/doc/classes/ItemList.xml b/doc/classes/ItemList.xml index 1bc36abf66..c6ed1e22ed 100644 --- a/doc/classes/ItemList.xml +++ b/doc/classes/ItemList.xml @@ -142,7 +142,7 @@ </description> </method> <method name="get_selected_items"> - <return type="PoolIntArray"> + <return type="PackedInt32Array"> </return> <description> Returns an array with the indexes of the selected items. diff --git a/doc/classes/Line2D.xml b/doc/classes/Line2D.xml index bed5bbaea7..68cec3e624 100644 --- a/doc/classes/Line2D.xml +++ b/doc/classes/Line2D.xml @@ -84,7 +84,7 @@ <member name="joint_mode" type="int" setter="set_joint_mode" getter="get_joint_mode" enum="Line2D.LineJointMode" default="0"> The style for the points between the start and the end. </member> - <member name="points" type="PoolVector2Array" setter="set_points" getter="get_points" default="PoolVector2Array( )"> + <member name="points" type="PackedVector2Array" setter="set_points" getter="get_points" default="PackedVector2Array( )"> The points that form the lines. The line is drawn between every point set in this array. </member> <member name="round_precision" type="int" setter="set_round_precision" getter="get_round_precision" default="8"> diff --git a/doc/classes/MainLoop.xml b/doc/classes/MainLoop.xml index 2ae7eacdb6..b12d4d9978 100644 --- a/doc/classes/MainLoop.xml +++ b/doc/classes/MainLoop.xml @@ -46,7 +46,7 @@ <method name="_drop_files" qualifiers="virtual"> <return type="void"> </return> - <argument index="0" name="files" type="PoolStringArray"> + <argument index="0" name="files" type="PackedStringArray"> </argument> <argument index="1" name="from_screen" type="int"> </argument> diff --git a/doc/classes/Marshalls.xml b/doc/classes/Marshalls.xml index f9ca391f1c..4250ffd700 100644 --- a/doc/classes/Marshalls.xml +++ b/doc/classes/Marshalls.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Marshalls" inherits="Reference" version="4.0"> +<class name="Marshalls" inherits="Object" version="4.0"> <brief_description> Data transformation (marshalling) and encoding helpers. </brief_description> @@ -10,12 +10,12 @@ </tutorials> <methods> <method name="base64_to_raw"> - <return type="PoolByteArray"> + <return type="PackedByteArray"> </return> <argument index="0" name="base64_str" type="String"> </argument> <description> - Returns a decoded [PoolByteArray] corresponding to the Base64-encoded string [code]base64_str[/code]. + Returns a decoded [PackedByteArray] corresponding to the Base64-encoded string [code]base64_str[/code]. </description> </method> <method name="base64_to_utf8"> @@ -42,10 +42,10 @@ <method name="raw_to_base64"> <return type="String"> </return> - <argument index="0" name="array" type="PoolByteArray"> + <argument index="0" name="array" type="PackedByteArray"> </argument> <description> - Returns a Base64-encoded string of a given [PoolByteArray]. + Returns a Base64-encoded string of a given [PackedByteArray]. </description> </method> <method name="utf8_to_base64"> diff --git a/doc/classes/Mesh.xml b/doc/classes/Mesh.xml index f2602dfc7f..dc7ffc8934 100644 --- a/doc/classes/Mesh.xml +++ b/doc/classes/Mesh.xml @@ -49,7 +49,7 @@ </description> </method> <method name="get_faces" qualifiers="const"> - <return type="PoolVector3Array"> + <return type="PackedVector3Array"> </return> <description> Returns all the vertices that make up the faces of the mesh. Each three vertices represent one triangle. diff --git a/doc/classes/MeshDataTool.xml b/doc/classes/MeshDataTool.xml index 5c6401521a..81ff5969e3 100644 --- a/doc/classes/MeshDataTool.xml +++ b/doc/classes/MeshDataTool.xml @@ -57,7 +57,7 @@ </description> </method> <method name="get_edge_faces" qualifiers="const"> - <return type="PoolIntArray"> + <return type="PackedInt32Array"> </return> <argument index="0" name="idx" type="int"> </argument> @@ -160,7 +160,7 @@ </description> </method> <method name="get_vertex_bones" qualifiers="const"> - <return type="PoolIntArray"> + <return type="PackedInt32Array"> </return> <argument index="0" name="idx" type="int"> </argument> @@ -185,7 +185,7 @@ </description> </method> <method name="get_vertex_edges" qualifiers="const"> - <return type="PoolIntArray"> + <return type="PackedInt32Array"> </return> <argument index="0" name="idx" type="int"> </argument> @@ -194,7 +194,7 @@ </description> </method> <method name="get_vertex_faces" qualifiers="const"> - <return type="PoolIntArray"> + <return type="PackedInt32Array"> </return> <argument index="0" name="idx" type="int"> </argument> @@ -248,7 +248,7 @@ </description> </method> <method name="get_vertex_weights" qualifiers="const"> - <return type="PoolRealArray"> + <return type="PackedFloat32Array"> </return> <argument index="0" name="idx" type="int"> </argument> @@ -303,7 +303,7 @@ </return> <argument index="0" name="idx" type="int"> </argument> - <argument index="1" name="bones" type="PoolIntArray"> + <argument index="1" name="bones" type="PackedInt32Array"> </argument> <description> Sets the bones of the given vertex. @@ -380,7 +380,7 @@ </return> <argument index="0" name="idx" type="int"> </argument> - <argument index="1" name="weights" type="PoolRealArray"> + <argument index="1" name="weights" type="PackedFloat32Array"> </argument> <description> Sets the bone weights of the given vertex. diff --git a/doc/classes/MeshLibrary.xml b/doc/classes/MeshLibrary.xml index 3a3dd08caf..a96f6d7231 100644 --- a/doc/classes/MeshLibrary.xml +++ b/doc/classes/MeshLibrary.xml @@ -36,7 +36,7 @@ </description> </method> <method name="get_item_list" qualifiers="const"> - <return type="PoolIntArray"> + <return type="PackedInt32Array"> </return> <description> Returns the list of item IDs in use. @@ -84,8 +84,7 @@ <argument index="0" name="id" type="int"> </argument> <description> - Returns a generated item preview (a 3D rendering in isometric perspective). - [b]Note:[/b] Since item previews are only generated in an editor context, this function will return an empty [Texture2D] in a running project. + When running in the editor, returns a generated item preview (a 3D rendering in isometric perspective). When used in a running project, returns the manually-defined item preview which can be set using [method set_item_preview]. Returns an empty [Texture2D] if no preview was manually set in a running project. </description> </method> <method name="get_item_shapes" qualifiers="const"> diff --git a/doc/classes/MonoGCHandle.xml b/doc/classes/MonoGCHandle.xml new file mode 100644 index 0000000000..1e33dd1359 --- /dev/null +++ b/doc/classes/MonoGCHandle.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="MonoGCHandle" inherits="Reference" version="4.0"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/MultiMesh.xml b/doc/classes/MultiMesh.xml index 8a4a192ed4..24b87f8e28 100644 --- a/doc/classes/MultiMesh.xml +++ b/doc/classes/MultiMesh.xml @@ -105,11 +105,11 @@ </method> </methods> <members> - <member name="buffer" type="PoolRealArray" setter="set_buffer" getter="get_buffer" default="PoolRealArray( )"> + <member name="buffer" type="PackedFloat32Array" setter="set_buffer" getter="get_buffer" default="PackedFloat32Array( )"> </member> - <member name="color_array" type="PoolColorArray" setter="_set_color_array" getter="_get_color_array"> + <member name="color_array" type="PackedColorArray" setter="_set_color_array" getter="_get_color_array"> </member> - <member name="custom_data_array" type="PoolColorArray" setter="_set_custom_data_array" getter="_get_custom_data_array"> + <member name="custom_data_array" type="PackedColorArray" setter="_set_custom_data_array" getter="_get_custom_data_array"> </member> <member name="instance_count" type="int" setter="set_instance_count" getter="get_instance_count" default="0"> Number of instances that will get drawn. This clears and (re)sizes the buffers. By default, all instances are drawn but you can limit this with [member visible_instance_count]. @@ -117,9 +117,9 @@ <member name="mesh" type="Mesh" setter="set_mesh" getter="get_mesh"> Mesh to be drawn. </member> - <member name="transform_2d_array" type="PoolVector2Array" setter="_set_transform_2d_array" getter="_get_transform_2d_array"> + <member name="transform_2d_array" type="PackedVector2Array" setter="_set_transform_2d_array" getter="_get_transform_2d_array"> </member> - <member name="transform_array" type="PoolVector3Array" setter="_set_transform_array" getter="_get_transform_array"> + <member name="transform_array" type="PackedVector3Array" setter="_set_transform_array" getter="_get_transform_array"> </member> <member name="transform_format" type="int" setter="set_transform_format" getter="get_transform_format" enum="MultiMesh.TransformFormat" default="0"> Format of transform used to transform mesh, either 2D or 3D. diff --git a/doc/classes/MultiplayerAPI.xml b/doc/classes/MultiplayerAPI.xml index b82214b246..9c753818d9 100644 --- a/doc/classes/MultiplayerAPI.xml +++ b/doc/classes/MultiplayerAPI.xml @@ -19,7 +19,7 @@ </description> </method> <method name="get_network_connected_peers" qualifiers="const"> - <return type="PoolIntArray"> + <return type="PackedInt32Array"> </return> <description> Returns the peer IDs of all connected peers of this MultiplayerAPI's [member network_peer]. @@ -65,7 +65,7 @@ <method name="send_bytes"> <return type="int" enum="Error"> </return> - <argument index="0" name="bytes" type="PoolByteArray"> + <argument index="0" name="bytes" type="PackedByteArray"> </argument> <argument index="1" name="id" type="int" default="0"> </argument> @@ -126,7 +126,7 @@ <signal name="network_peer_packet"> <argument index="0" name="id" type="int"> </argument> - <argument index="1" name="packet" type="PoolByteArray"> + <argument index="1" name="packet" type="PackedByteArray"> </argument> <description> Emitted when this MultiplayerAPI's [member network_peer] receive a [code]packet[/code] with custom data (see [method send_bytes]). ID is the peer ID of the peer that sent the packet. diff --git a/doc/classes/Navigation.xml b/doc/classes/Navigation.xml index be36be0429..0000ca6bd5 100644 --- a/doc/classes/Navigation.xml +++ b/doc/classes/Navigation.xml @@ -9,14 +9,54 @@ <tutorials> </tutorials> <methods> + <method name="get_closest_point" qualifiers="const"> + <return type="Vector3"> + </return> + <argument index="0" name="to_point" type="Vector3"> + </argument> + <description> + Returns the point closest to the provided [code]to_point[/code] on the navigation mesh surface. + </description> + </method> + <method name="get_closest_point_normal" qualifiers="const"> + <return type="Vector3"> + </return> + <argument index="0" name="to_point" type="Vector3"> + </argument> + <description> + Returns the normal for the point returned by [method get_closest_point]. + </description> + </method> + <method name="get_closest_point_owner" qualifiers="const"> + <return type="RID"> + </return> + <argument index="0" name="to_point" type="Vector3"> + </argument> + <description> + Returns the owner region RID for the point returned by [method get_closest_point]. + </description> + </method> + <method name="get_closest_point_to_segment" qualifiers="const"> + <return type="Vector3"> + </return> + <argument index="0" name="start" type="Vector3"> + </argument> + <argument index="1" name="end" type="Vector3"> + </argument> + <argument index="2" name="use_collision" type="bool" default="false"> + </argument> + <description> + Returns the closest point between the navigation surface and the segment. + </description> + </method> <method name="get_rid" qualifiers="const"> <return type="RID"> </return> <description> </description> </method> - <method name="get_simple_path"> - <return type="PoolVector3Array"> + <method name="get_simple_path" qualifiers="const"> + <return type="PackedVector3Array"> </return> <argument index="0" name="start" type="Vector3"> </argument> diff --git a/doc/classes/Navigation2D.xml b/doc/classes/Navigation2D.xml index 734469eaa9..0d016a3210 100644 --- a/doc/classes/Navigation2D.xml +++ b/doc/classes/Navigation2D.xml @@ -9,14 +9,32 @@ <tutorials> </tutorials> <methods> + <method name="get_closest_point" qualifiers="const"> + <return type="Vector2"> + </return> + <argument index="0" name="to_point" type="Vector2"> + </argument> + <description> + Returns the point closest to the provided [code]to_point[/code] on the navigation mesh surface. + </description> + </method> + <method name="get_closest_point_owner" qualifiers="const"> + <return type="RID"> + </return> + <argument index="0" name="to_point" type="Vector2"> + </argument> + <description> + Returns the owner region RID for the point returned by [method get_closest_point]. + </description> + </method> <method name="get_rid" qualifiers="const"> <return type="RID"> </return> <description> </description> </method> - <method name="get_simple_path"> - <return type="PoolVector2Array"> + <method name="get_simple_path" qualifiers="const"> + <return type="PackedVector2Array"> </return> <argument index="0" name="start" type="Vector2"> </argument> diff --git a/doc/classes/Navigation2DServer.xml b/doc/classes/Navigation2DServer.xml index 3950e35697..110844c492 100644 --- a/doc/classes/Navigation2DServer.xml +++ b/doc/classes/Navigation2DServer.xml @@ -32,7 +32,7 @@ </argument> <argument index="1" name="receiver" type="Object"> </argument> - <argument index="2" name="method" type="String"> + <argument index="2" name="method" type="StringName"> </argument> <argument index="3" name="userdata" type="Variant" default="null"> </argument> @@ -164,6 +164,28 @@ Returns the map cell size. </description> </method> + <method name="map_get_closest_point" qualifiers="const"> + <return type="Vector2"> + </return> + <argument index="0" name="map" type="RID"> + </argument> + <argument index="1" name="to_point" type="Vector2"> + </argument> + <description> + Returns the point closest to the provided [code]to_point[/code] on the navigation mesh surface. + </description> + </method> + <method name="map_get_closest_point_owner" qualifiers="const"> + <return type="RID"> + </return> + <argument index="0" name="map" type="RID"> + </argument> + <argument index="1" name="to_point" type="Vector2"> + </argument> + <description> + Returns the owner region RID for the point returned by [method map_get_closest_point]. + </description> + </method> <method name="map_get_edge_connection_margin" qualifiers="const"> <return type="float"> </return> @@ -174,7 +196,7 @@ </description> </method> <method name="map_get_path" qualifiers="const"> - <return type="PoolVector2Array"> + <return type="PackedVector2Array"> </return> <argument index="0" name="map" type="RID"> </argument> diff --git a/doc/classes/NavigationAgent.xml b/doc/classes/NavigationAgent.xml index dc759bc72b..f896bf6d15 100644 --- a/doc/classes/NavigationAgent.xml +++ b/doc/classes/NavigationAgent.xml @@ -24,7 +24,7 @@ </description> </method> <method name="get_nav_path" qualifiers="const"> - <return type="PoolVector3Array"> + <return type="PackedVector3Array"> </return> <description> Returns the path from start to finish in global coordinates. @@ -34,7 +34,7 @@ <return type="int"> </return> <description> - Returns which index the agent is currently on in the navigation path's [PoolVector3Array]. + Returns which index the agent is currently on in the navigation path's [PackedVector3Array]. </description> </method> <method name="get_navigation" qualifiers="const"> diff --git a/doc/classes/NavigationAgent2D.xml b/doc/classes/NavigationAgent2D.xml index 6f356e7e4c..116db76cc5 100644 --- a/doc/classes/NavigationAgent2D.xml +++ b/doc/classes/NavigationAgent2D.xml @@ -24,7 +24,7 @@ </description> </method> <method name="get_nav_path" qualifiers="const"> - <return type="PoolVector2Array"> + <return type="PackedVector2Array"> </return> <description> Returns the path from start to finish in global coordinates. @@ -34,7 +34,7 @@ <return type="int"> </return> <description> - Returns which index the agent is currently on in the navigation path's [PoolVector2Array]. + Returns which index the agent is currently on in the navigation path's [PackedVector2Array]. </description> </method> <method name="get_navigation" qualifiers="const"> diff --git a/doc/classes/NavigationMesh.xml b/doc/classes/NavigationMesh.xml index fb3babf4aa..6deca4394f 100644 --- a/doc/classes/NavigationMesh.xml +++ b/doc/classes/NavigationMesh.xml @@ -10,7 +10,7 @@ <method name="add_polygon"> <return type="void"> </return> - <argument index="0" name="polygon" type="PoolIntArray"> + <argument index="0" name="polygon" type="PackedInt32Array"> </argument> <description> </description> @@ -38,7 +38,7 @@ </description> </method> <method name="get_polygon"> - <return type="PoolIntArray"> + <return type="PackedInt32Array"> </return> <argument index="0" name="idx" type="int"> </argument> @@ -52,7 +52,7 @@ </description> </method> <method name="get_vertices" qualifiers="const"> - <return type="PoolVector3Array"> + <return type="PackedVector3Array"> </return> <description> </description> @@ -70,7 +70,7 @@ <method name="set_vertices"> <return type="void"> </return> - <argument index="0" name="vertices" type="PoolVector3Array"> + <argument index="0" name="vertices" type="PackedVector3Array"> </argument> <description> </description> @@ -109,7 +109,7 @@ </member> <member name="geometry/source_geometry_mode" type="int" setter="set_source_geometry_mode" getter="get_source_geometry_mode" default="0"> </member> - <member name="geometry/source_group_name" type="String" setter="set_source_group_name" getter="get_source_group_name"> + <member name="geometry/source_group_name" type="StringName" setter="set_source_group_name" getter="get_source_group_name"> </member> <member name="polygon/verts_per_poly" type="float" setter="set_verts_per_poly" getter="get_verts_per_poly" default="6.0"> </member> diff --git a/doc/classes/NavigationPolygon.xml b/doc/classes/NavigationPolygon.xml index 0157a6f3f7..da291b7337 100644 --- a/doc/classes/NavigationPolygon.xml +++ b/doc/classes/NavigationPolygon.xml @@ -8,7 +8,7 @@ Using [method add_outline]: [codeblock] var polygon = NavigationPolygon.new() - var outline = PoolVector2Array([Vector2(0, 0), Vector2(0, 50), Vector2(50, 50), Vector2(50, 0)]) + var outline = PackedVector2Array([Vector2(0, 0), Vector2(0, 50), Vector2(50, 50), Vector2(50, 0)]) polygon.add_outline(outline) polygon.make_polygons_from_outlines() $NavigationPolygonInstance.navpoly = polygon @@ -16,9 +16,9 @@ Using [method add_polygon] and indices of the vertices array. [codeblock] var polygon = NavigationPolygon.new() - var vertices = PoolVector2Array([Vector2(0, 0), Vector2(0, 50), Vector2(50, 50), Vector2(50, 0)]) + var vertices = PackedVector2Array([Vector2(0, 0), Vector2(0, 50), Vector2(50, 50), Vector2(50, 0)]) polygon.set_vertices(vertices) - var indices = PoolIntArray(0, 3, 1) + var indices = PackedInt32Array(0, 3, 1) polygon.add_polygon(indices) $NavigationPolygonInstance.navpoly = polygon [/codeblock] @@ -29,27 +29,27 @@ <method name="add_outline"> <return type="void"> </return> - <argument index="0" name="outline" type="PoolVector2Array"> + <argument index="0" name="outline" type="PackedVector2Array"> </argument> <description> - Appends a [PoolVector2Array] that contains the vertices of an outline to the internal array that contains all the outlines. You have to call [method make_polygons_from_outlines] in order for this array to be converted to polygons that the engine will use. + Appends a [PackedVector2Array] that contains the vertices of an outline to the internal array that contains all the outlines. You have to call [method make_polygons_from_outlines] in order for this array to be converted to polygons that the engine will use. </description> </method> <method name="add_outline_at_index"> <return type="void"> </return> - <argument index="0" name="outline" type="PoolVector2Array"> + <argument index="0" name="outline" type="PackedVector2Array"> </argument> <argument index="1" name="index" type="int"> </argument> <description> - Adds a [PoolVector2Array] that contains the vertices of an outline to the internal array that contains all the outlines at a fixed position. You have to call [method make_polygons_from_outlines] in order for this array to be converted to polygons that the engine will use. + Adds a [PackedVector2Array] that contains the vertices of an outline to the internal array that contains all the outlines at a fixed position. You have to call [method make_polygons_from_outlines] in order for this array to be converted to polygons that the engine will use. </description> </method> <method name="add_polygon"> <return type="void"> </return> - <argument index="0" name="polygon" type="PoolIntArray"> + <argument index="0" name="polygon" type="PackedInt32Array"> </argument> <description> Adds a polygon using the indices of the vertices you get when calling [method get_vertices]. @@ -70,12 +70,12 @@ </description> </method> <method name="get_outline" qualifiers="const"> - <return type="PoolVector2Array"> + <return type="PackedVector2Array"> </return> <argument index="0" name="idx" type="int"> </argument> <description> - Returns a [PoolVector2Array] containing the vertices of an outline that was created in the editor or by script. + Returns a [PackedVector2Array] containing the vertices of an outline that was created in the editor or by script. </description> </method> <method name="get_outline_count" qualifiers="const"> @@ -86,12 +86,12 @@ </description> </method> <method name="get_polygon"> - <return type="PoolIntArray"> + <return type="PackedInt32Array"> </return> <argument index="0" name="idx" type="int"> </argument> <description> - Returns a [PoolIntArray] containing the indices of the vertices of a created polygon. + Returns a [PackedInt32Array] containing the indices of the vertices of a created polygon. </description> </method> <method name="get_polygon_count" qualifiers="const"> @@ -102,10 +102,10 @@ </description> </method> <method name="get_vertices" qualifiers="const"> - <return type="PoolVector2Array"> + <return type="PackedVector2Array"> </return> <description> - Returns a [PoolVector2Array] containing all the vertices being used to create the polygons. + Returns a [PackedVector2Array] containing all the vertices being used to create the polygons. </description> </method> <method name="make_polygons_from_outlines"> @@ -129,7 +129,7 @@ </return> <argument index="0" name="idx" type="int"> </argument> - <argument index="1" name="outline" type="PoolVector2Array"> + <argument index="1" name="outline" type="PackedVector2Array"> </argument> <description> Changes an outline created in the editor or by script. You have to call [method make_polygons_from_outlines] for the polygons to update. @@ -138,7 +138,7 @@ <method name="set_vertices"> <return type="void"> </return> - <argument index="0" name="vertices" type="PoolVector2Array"> + <argument index="0" name="vertices" type="PackedVector2Array"> </argument> <description> Sets the vertices that can be then indexed to create polygons with the [method add_polygon] method. diff --git a/doc/classes/NavigationServer.xml b/doc/classes/NavigationServer.xml index 7553d700f8..1f65a6004e 100644 --- a/doc/classes/NavigationServer.xml +++ b/doc/classes/NavigationServer.xml @@ -32,7 +32,7 @@ </argument> <argument index="1" name="receiver" type="Object"> </argument> - <argument index="2" name="method" type="String"> + <argument index="2" name="method" type="StringName"> </argument> <argument index="3" name="userdata" type="Variant" default="null"> </argument> @@ -164,6 +164,54 @@ Returns the map cell size. </description> </method> + <method name="map_get_closest_point" qualifiers="const"> + <return type="Vector3"> + </return> + <argument index="0" name="map" type="RID"> + </argument> + <argument index="1" name="to_point" type="Vector3"> + </argument> + <description> + Returns the point closest to the provided [code]point[/code] on the navigation mesh surface. + </description> + </method> + <method name="map_get_closest_point_normal" qualifiers="const"> + <return type="Vector3"> + </return> + <argument index="0" name="map" type="RID"> + </argument> + <argument index="1" name="to_point" type="Vector3"> + </argument> + <description> + Returns the normal for the point returned by [method map_get_closest_point]. + </description> + </method> + <method name="map_get_closest_point_owner" qualifiers="const"> + <return type="RID"> + </return> + <argument index="0" name="map" type="RID"> + </argument> + <argument index="1" name="to_point" type="Vector3"> + </argument> + <description> + Returns the owner region RID for the point returned by [method map_get_closest_point]. + </description> + </method> + <method name="map_get_closest_point_to_segment" qualifiers="const"> + <return type="Vector3"> + </return> + <argument index="0" name="map" type="RID"> + </argument> + <argument index="1" name="start" type="Vector3"> + </argument> + <argument index="2" name="end" type="Vector3"> + </argument> + <argument index="3" name="use_collision" type="bool" default="false"> + </argument> + <description> + Returns the closest point between the navigation surface and the segment. + </description> + </method> <method name="map_get_edge_connection_margin" qualifiers="const"> <return type="float"> </return> @@ -174,7 +222,7 @@ </description> </method> <method name="map_get_path" qualifiers="const"> - <return type="PoolVector3Array"> + <return type="PackedVector3Array"> </return> <argument index="0" name="map" type="RID"> </argument> @@ -310,13 +358,15 @@ Control activation of this server. </description> </method> - <method name="step"> + <method name="process"> <return type="void"> </return> <argument index="0" name="delta_time" type="float"> </argument> <description> - Steps the server. This is not threadsafe and must be called in single thread. + Process the collision avoidance agents. + The result of this process is needed by the physics server, so this must be called in the main thread. + Note: This function is not thread safe. </description> </method> </methods> diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml index 5fd0da7452..eb15bc2ad9 100644 --- a/doc/classes/Node.xml +++ b/doc/classes/Node.xml @@ -129,27 +129,29 @@ child_node.get_parent().remove_child(child_node) add_child(child_node) [/codeblock] + If you need the child node to be added below a specific node in the list of children, use [method add_child_below_node] instead of this method. [b]Note:[/b] If you want a child to be persisted to a [PackedScene], you must set [member owner] in addition to calling [method add_child]. This is typically relevant for [url=https://godot.readthedocs.io/en/latest/tutorials/misc/running_code_in_the_editor.html]tool scripts[/url] and [url=https://godot.readthedocs.io/en/latest/tutorials/plugins/editor/index.html]editor plugins[/url]. If [method add_child] is called without setting [member owner], the newly added [Node] will not be visible in the scene tree, though it will be visible in the 2D/3D view. </description> </method> <method name="add_child_below_node"> <return type="void"> </return> - <argument index="0" name="node" type="Node"> + <argument index="0" name="preceding_node" type="Node"> </argument> - <argument index="1" name="child_node" type="Node"> + <argument index="1" name="node" type="Node"> </argument> <argument index="2" name="legible_unique_name" type="bool" default="false"> </argument> <description> - Adds a child node. The child is placed below the given node in the list of children. + Adds a child node below the [code]preceding_node[/code]. If [code]legible_unique_name[/code] is [code]true[/code], the child node will have an human-readable name based on the name of the node being instanced instead of its type. + Use [method add_child] instead of this method if you don't need the child node to be added below a specific node in the list of children. </description> </method> <method name="add_to_group"> <return type="void"> </return> - <argument index="0" name="group" type="String"> + <argument index="0" name="group" type="StringName"> </argument> <argument index="1" name="persistent" type="bool" default="false"> </argument> @@ -410,7 +412,7 @@ <method name="is_in_group" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="group" type="String"> + <argument index="0" name="group" type="StringName"> </argument> <description> Returns [code]true[/code] if this node is in the specified group. See notes in the description, and the group methods in [SceneTree]. @@ -532,7 +534,7 @@ <method name="propagate_call"> <return type="void"> </return> - <argument index="0" name="method" type="String"> + <argument index="0" name="method" type="StringName"> </argument> <argument index="1" name="args" type="Array" default="[ ]"> </argument> @@ -584,7 +586,7 @@ <method name="remove_from_group"> <return type="void"> </return> - <argument index="0" name="group" type="String"> + <argument index="0" name="group" type="StringName"> </argument> <description> Removes a node from a group. See notes in the description, and the group methods in [SceneTree]. @@ -611,7 +613,7 @@ <method name="rpc" qualifiers="vararg"> <return type="Variant"> </return> - <argument index="0" name="method" type="String"> + <argument index="0" name="method" type="StringName"> </argument> <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. See also [method rset] and [method rset_config] for properties. Returns an empty [Variant]. @@ -621,7 +623,7 @@ <method name="rpc_config"> <return type="int"> </return> - <argument index="0" name="method" type="String"> + <argument index="0" name="method" type="StringName"> </argument> <argument index="1" name="mode" type="int" enum="MultiplayerAPI.RPCMode"> </argument> @@ -634,7 +636,7 @@ </return> <argument index="0" name="peer_id" type="int"> </argument> - <argument index="1" name="method" type="String"> + <argument index="1" name="method" type="StringName"> </argument> <description> Sends a [method rpc] to a specific peer identified by [code]peer_id[/code] (see [method NetworkedMultiplayerPeer.set_target_peer]). Returns an empty [Variant]. @@ -643,7 +645,7 @@ <method name="rpc_unreliable" qualifiers="vararg"> <return type="Variant"> </return> - <argument index="0" name="method" type="String"> + <argument index="0" name="method" type="StringName"> </argument> <description> Sends a [method rpc] using an unreliable protocol. Returns an empty [Variant]. @@ -654,7 +656,7 @@ </return> <argument index="0" name="peer_id" type="int"> </argument> - <argument index="1" name="method" type="String"> + <argument index="1" name="method" type="StringName"> </argument> <description> Sends a [method rpc] to a specific peer identified by [code]peer_id[/code] using an unreliable protocol (see [method NetworkedMultiplayerPeer.set_target_peer]). Returns an empty [Variant]. @@ -663,7 +665,7 @@ <method name="rset"> <return type="void"> </return> - <argument index="0" name="property" type="String"> + <argument index="0" name="property" type="StringName"> </argument> <argument index="1" name="value" type="Variant"> </argument> @@ -674,7 +676,7 @@ <method name="rset_config"> <return type="int"> </return> - <argument index="0" name="property" type="String"> + <argument index="0" name="property" type="StringName"> </argument> <argument index="1" name="mode" type="int" enum="MultiplayerAPI.RPCMode"> </argument> @@ -687,7 +689,7 @@ </return> <argument index="0" name="peer_id" type="int"> </argument> - <argument index="1" name="property" type="String"> + <argument index="1" name="property" type="StringName"> </argument> <argument index="2" name="value" type="Variant"> </argument> @@ -698,7 +700,7 @@ <method name="rset_unreliable"> <return type="void"> </return> - <argument index="0" name="property" type="String"> + <argument index="0" name="property" type="StringName"> </argument> <argument index="1" name="value" type="Variant"> </argument> @@ -711,7 +713,7 @@ </return> <argument index="0" name="peer_id" type="int"> </argument> - <argument index="1" name="property" type="String"> + <argument index="1" name="property" type="StringName"> </argument> <argument index="2" name="value" type="Variant"> </argument> @@ -830,7 +832,7 @@ <member name="multiplayer" type="MultiplayerAPI" setter="" getter="get_multiplayer"> The [MultiplayerAPI] instance associated with this node. Either the [member custom_multiplayer], or the default SceneTree one (if inside tree). </member> - <member name="name" type="String" setter="set_name" getter="get_name"> + <member name="name" type="StringName" setter="set_name" getter="get_name"> The name of the node. This name is unique among the siblings (other child nodes from the same parent). When set to an existing name, the node will be automatically renamed. </member> <member name="owner" type="Node" setter="set_owner" getter="get_owner"> diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml index b3b77b0b26..6ce2d4bcbb 100644 --- a/doc/classes/OS.xml +++ b/doc/classes/OS.xml @@ -93,7 +93,7 @@ </return> <argument index="0" name="path" type="String"> </argument> - <argument index="1" name="arguments" type="PoolStringArray"> + <argument index="1" name="arguments" type="PackedStringArray"> </argument> <argument index="2" name="blocking" type="bool" default="true"> </argument> @@ -150,14 +150,14 @@ </description> </method> <method name="get_cmdline_args"> - <return type="PoolStringArray"> + <return type="PackedStringArray"> </return> <description> Returns the command line arguments passed to the engine. </description> </method> <method name="get_connected_midi_inputs"> - <return type="PoolStringArray"> + <return type="PackedStringArray"> </return> <description> Returns an array of MIDI device names. @@ -200,13 +200,6 @@ The returned Dictionary's values will be the same as [method get_datetime], with the exception of Daylight Savings Time as it cannot be determined from the epoch. </description> </method> - <method name="get_dynamic_memory_usage" qualifiers="const"> - <return type="int"> - </return> - <description> - Returns the total amount of dynamic memory used (only works in debug). - </description> - </method> <method name="get_environment" qualifiers="const"> <return type="String"> </return> @@ -224,7 +217,7 @@ </description> </method> <method name="get_granted_permissions" qualifiers="const"> - <return type="PoolStringArray"> + <return type="PackedStringArray"> </return> <description> With this function you can get the list of dangerous permissions that have been granted to the Android application. @@ -280,30 +273,6 @@ Returns the name of the host OS. Possible values are: [code]"Android"[/code], [code]"Haiku"[/code], [code]"iOS"[/code], [code]"HTML5"[/code], [code]"OSX"[/code], [code]"Server"[/code], [code]"Windows"[/code], [code]"UWP"[/code], [code]"X11"[/code]. </description> </method> - <method name="get_power_percent_left"> - <return type="int"> - </return> - <description> - Returns the amount of battery left in the device as a percentage. Returns [code]-1[/code] if power state is unknown. - [b]Note:[/b] This method is implemented on Linux, macOS and Windows. - </description> - </method> - <method name="get_power_seconds_left"> - <return type="int"> - </return> - <description> - Returns an estimate of the time left in seconds before the device runs out of battery. Returns [code]-1[/code] if power state is unknown. - [b]Note:[/b] This method is implemented on Linux, macOS and Windows. - </description> - </method> - <method name="get_power_state"> - <return type="int" enum="OS.PowerState"> - </return> - <description> - Returns the current state of the device regarding battery and power. See [enum PowerState] constants. - [b]Note:[/b] This method is implemented on Linux, macOS and Windows. - </description> - </method> <method name="get_process_id" qualifiers="const"> <return type="int"> </return> @@ -758,7 +727,7 @@ <method name="print_resources_by_type"> <return type="void"> </return> - <argument index="0" name="types" type="PoolStringArray"> + <argument index="0" name="types" type="PackedStringArray"> </argument> <description> Shows the number of resources loaded by the game of the given types. @@ -1081,20 +1050,5 @@ <constant name="SYSTEM_DIR_RINGTONES" value="7" enum="SystemDir"> Ringtones directory path. </constant> - <constant name="POWERSTATE_UNKNOWN" value="0" enum="PowerState"> - Unknown powerstate. - </constant> - <constant name="POWERSTATE_ON_BATTERY" value="1" enum="PowerState"> - Unplugged, running on battery. - </constant> - <constant name="POWERSTATE_NO_BATTERY" value="2" enum="PowerState"> - Plugged in, no battery available. - </constant> - <constant name="POWERSTATE_CHARGING" value="3" enum="PowerState"> - Plugged in, battery charging. - </constant> - <constant name="POWERSTATE_CHARGED" value="4" enum="PowerState"> - Plugged in, battery fully charged. - </constant> </constants> </class> diff --git a/doc/classes/Object.xml b/doc/classes/Object.xml index 858bf5b635..a3faccae1a 100644 --- a/doc/classes/Object.xml +++ b/doc/classes/Object.xml @@ -23,7 +23,7 @@ <method name="_get" qualifiers="virtual"> <return type="Variant"> </return> - <argument index="0" name="property" type="String"> + <argument index="0" name="property" type="StringName"> </argument> <description> Virtual method which can be overridden to customize the return value of [method get]. @@ -58,7 +58,7 @@ <method name="_set" qualifiers="virtual"> <return type="bool"> </return> - <argument index="0" name="property" type="String"> + <argument index="0" name="property" type="StringName"> </argument> <argument index="1" name="value" type="Variant"> </argument> @@ -89,7 +89,7 @@ <method name="call" qualifiers="vararg"> <return type="Variant"> </return> - <argument index="0" name="method" type="String"> + <argument index="0" name="method" type="StringName"> </argument> <description> Calls the [code]method[/code] on the object and returns the result. This method supports a variable number of arguments, so parameters are passed as a comma separated list. Example: @@ -101,7 +101,7 @@ <method name="call_deferred" qualifiers="vararg"> <return type="void"> </return> - <argument index="0" name="method" type="String"> + <argument index="0" name="method" type="StringName"> </argument> <description> Calls the [code]method[/code] on the object during idle time. This method supports a variable number of arguments, so parameters are passed as a comma separated list. Example: @@ -113,7 +113,7 @@ <method name="callv"> <return type="Variant"> </return> - <argument index="0" name="method" type="String"> + <argument index="0" name="method" type="StringName"> </argument> <argument index="1" name="arg_array" type="Array"> </argument> @@ -134,17 +134,16 @@ <method name="connect"> <return type="int" enum="Error"> </return> - <argument index="0" name="signal" type="String"> - </argument> - <argument index="1" name="target" type="Object"> + <argument index="0" name="signal" type="StringName"> </argument> - <argument index="2" name="method" type="String"> + <argument index="1" name="callable" type="Callable"> </argument> - <argument index="3" name="binds" type="Array" default="[ ]"> + <argument index="2" name="binds" type="Array" default="[ ]"> </argument> - <argument index="4" name="flags" type="int" default="0"> + <argument index="3" name="flags" type="int" default="0"> </argument> <description> + [b]FIXME:[/b] The syntax changed with the addition of [Callable], this should be updated. Connects a [code]signal[/code] to a [code]method[/code] on a [code]target[/code] object. Pass optional [code]binds[/code] to the call as an [Array] of parameters. These parameters will be passed to the 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. A [code]signal[/code] can only be connected once to a [code]method[/code]. It will throw 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 [code]target[/code] is destroyed in the game's lifecycle, the connection will be lost. @@ -166,13 +165,12 @@ <method name="disconnect"> <return type="void"> </return> - <argument index="0" name="signal" type="String"> - </argument> - <argument index="1" name="target" type="Object"> + <argument index="0" name="signal" type="StringName"> </argument> - <argument index="2" name="method" type="String"> + <argument index="1" name="callable" type="Callable"> </argument> <description> + [b]FIXME:[/b] The syntax changed with the addition of [Callable], this should be updated. Disconnects a [code]signal[/code] from a [code]method[/code] on the given [code]target[/code]. If you try to disconnect a connection that does not exist, the method will throw an error. Use [method is_connected] to ensure that the connection exists. </description> @@ -180,7 +178,7 @@ <method name="emit_signal" qualifiers="vararg"> <return type="void"> </return> - <argument index="0" name="signal" type="String"> + <argument index="0" name="signal" type="StringName"> </argument> <description> Emits the given [code]signal[/code]. The signal must exist, so it should be a built-in signal of this class or one of its parent classes, or a user-defined signal. This method supports a variable number of arguments, so parameters are passed as a comma separated list. Example: @@ -251,10 +249,10 @@ </description> </method> <method name="get_meta_list" qualifiers="const"> - <return type="PoolStringArray"> + <return type="PackedStringArray"> </return> <description> - Returns the object's metadata as a [PoolStringArray]. + Returns the object's metadata as a [PackedStringArray]. </description> </method> <method name="get_method_list" qualifiers="const"> @@ -273,7 +271,7 @@ </description> </method> <method name="get_script" qualifiers="const"> - <return type="Reference"> + <return type="Variant"> </return> <description> Returns the object's [Script] instance, or [code]null[/code] if none is assigned. @@ -307,7 +305,7 @@ <method name="has_method" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="method" type="String"> + <argument index="0" name="method" type="StringName"> </argument> <description> Returns [code]true[/code] if the object contains the given [code]method[/code]. @@ -316,7 +314,7 @@ <method name="has_user_signal" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="signal" type="String"> + <argument index="0" name="signal" type="StringName"> </argument> <description> Returns [code]true[/code] if the given user-defined [code]signal[/code] exists. @@ -341,13 +339,12 @@ <method name="is_connected" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="signal" type="String"> + <argument index="0" name="signal" type="StringName"> </argument> - <argument index="1" name="target" type="Object"> - </argument> - <argument index="2" name="method" type="String"> + <argument index="1" name="callable" type="Callable"> </argument> <description> + [b]FIXME:[/b] The syntax changed with the addition of [Callable], this should be updated. Returns [code]true[/code] if a connection exists for a given [code]signal[/code], [code]target[/code], and [code]method[/code]. </description> </method> @@ -409,7 +406,7 @@ <method name="set_deferred"> <return type="void"> </return> - <argument index="0" name="property" type="String"> + <argument index="0" name="property" type="StringName"> </argument> <argument index="1" name="value" type="Variant"> </argument> @@ -456,7 +453,7 @@ <method name="set_script"> <return type="void"> </return> - <argument index="0" name="script" type="Reference"> + <argument index="0" name="script" type="Variant"> </argument> <description> Assigns a script to the object. Each object can have a single script assigned to it, which are used to extend its functionality. @@ -472,9 +469,9 @@ </description> </method> <method name="tr" qualifiers="const"> - <return type="String"> + <return type="StringName"> </return> - <argument index="0" name="message" type="String"> + <argument index="0" name="message" type="StringName"> </argument> <description> Translates a message using translation catalogs configured in the Project Settings. diff --git a/doc/classes/OccluderPolygon2D.xml b/doc/classes/OccluderPolygon2D.xml index 6cfef42204..8a59ef5cb4 100644 --- a/doc/classes/OccluderPolygon2D.xml +++ b/doc/classes/OccluderPolygon2D.xml @@ -17,7 +17,7 @@ <member name="cull_mode" type="int" setter="set_cull_mode" getter="get_cull_mode" enum="OccluderPolygon2D.CullMode" default="0"> The culling mode to use. </member> - <member name="polygon" type="PoolVector2Array" setter="set_polygon" getter="get_polygon" default="PoolVector2Array( )"> + <member name="polygon" type="PackedVector2Array" setter="set_polygon" getter="get_polygon" default="PackedVector2Array( )"> A [Vector2] array with the index for polygon's vertices positions. [b]Note:[/b] The returned value is a copy of the underlying array, rather than a reference. </member> diff --git a/doc/classes/PoolByteArray.xml b/doc/classes/PackedByteArray.xml index 63a7037fb1..b08357e278 100644 --- a/doc/classes/PoolByteArray.xml +++ b/doc/classes/PackedByteArray.xml @@ -1,25 +1,27 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="PoolByteArray" version="4.0"> +<class name="PackedByteArray" version="4.0"> <brief_description> - A pooled [Array] of bytes. + A packed [Array] of bytes. </brief_description> <description> - An [Array] specifically designed to hold bytes. Optimized for memory usage, does not fragment the memory. + An [Array] specifically designed to hold bytes. Packs data tightly, so it saves memory for large array sizes. [b]Note:[/b] This type is passed by value and not by reference. </description> <tutorials> </tutorials> <methods> - <method name="PoolByteArray"> - <return type="PoolByteArray"> + <method name="PackedByteArray"> + <return type="PackedByteArray"> </return> <argument index="0" name="from" type="Array"> </argument> <description> - Constructs a new [PoolByteArray]. Optionally, you can pass in a generic [Array] that will be converted. + Constructs a new [PackedByteArray]. Optionally, you can pass in a generic [Array] that will be converted. </description> </method> <method name="append"> + <return type="void"> + </return> <argument index="0" name="byte" type="int"> </argument> <description> @@ -27,30 +29,32 @@ </description> </method> <method name="append_array"> - <argument index="0" name="array" type="PoolByteArray"> + <return type="void"> + </return> + <argument index="0" name="array" type="PackedByteArray"> </argument> <description> - Appends a [PoolByteArray] at the end of this array. + Appends a [PackedByteArray] at the end of this array. </description> </method> <method name="compress"> - <return type="PoolByteArray"> + <return type="PackedByteArray"> </return> <argument index="0" name="compression_mode" type="int" default="0"> </argument> <description> - Returns a new [PoolByteArray] with the data compressed. Set the compression mode using one of [enum File.CompressionMode]'s constants. + Returns a new [PackedByteArray] with the data compressed. Set the compression mode using one of [enum File.CompressionMode]'s constants. </description> </method> <method name="decompress"> - <return type="PoolByteArray"> + <return type="PackedByteArray"> </return> <argument index="0" name="buffer_size" type="int"> </argument> <argument index="1" name="compression_mode" type="int" default="0"> </argument> <description> - Returns a new [PoolByteArray] with the data decompressed. Set [code]buffer_size[/code] to the size of the uncompressed data. Set the compression mode using one of [enum File.CompressionMode]'s constants. + Returns a new [PackedByteArray] with the data decompressed. Set [code]buffer_size[/code] to the size of the uncompressed data. Set the compression mode using one of [enum File.CompressionMode]'s constants. </description> </method> <method name="empty"> @@ -80,7 +84,7 @@ <description> Returns a hexadecimal representation of this array as a [String]. [codeblock] - var array = PoolByteArray([11, 46, 255]) + var array = PackedByteArray([11, 46, 255]) print(array.hex_encode()) # Prints: 0b2eff [/codeblock] </description> @@ -97,11 +101,15 @@ </description> </method> <method name="invert"> + <return type="void"> + </return> <description> Reverses the order of the elements in the array. </description> </method> <method name="push_back"> + <return type="void"> + </return> <argument index="0" name="byte" type="int"> </argument> <description> @@ -109,6 +117,8 @@ </description> </method> <method name="remove"> + <return type="void"> + </return> <argument index="0" name="idx" type="int"> </argument> <description> @@ -116,6 +126,8 @@ </description> </method> <method name="resize"> + <return type="void"> + </return> <argument index="0" name="idx" type="int"> </argument> <description> @@ -123,6 +135,8 @@ </description> </method> <method name="set"> + <return type="void"> + </return> <argument index="0" name="idx" type="int"> </argument> <argument index="1" name="byte" type="int"> @@ -139,14 +153,14 @@ </description> </method> <method name="subarray"> - <return type="PoolByteArray"> + <return type="PackedByteArray"> </return> <argument index="0" name="from" type="int"> </argument> <argument index="1" name="to" type="int"> </argument> <description> - Returns the slice of the [PoolByteArray] between indices (inclusive) as a new [PoolByteArray]. Any negative index is considered to be from the end of the array. + Returns the slice of the [PackedByteArray] between indices (inclusive) as a new [PackedByteArray]. Any negative index is considered to be from the end of the array. </description> </method> </methods> diff --git a/doc/classes/PoolColorArray.xml b/doc/classes/PackedColorArray.xml index d5599f821c..06228e4dac 100644 --- a/doc/classes/PoolColorArray.xml +++ b/doc/classes/PackedColorArray.xml @@ -1,25 +1,27 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="PoolColorArray" version="4.0"> +<class name="PackedColorArray" version="4.0"> <brief_description> - A pooled [Array] of [Color]. + A packed [Array] of [Color]s. </brief_description> <description> - An [Array] specifically designed to hold [Color]. Optimized for memory usage, does not fragment the memory. + An [Array] specifically designed to hold [Color]. Packs data tightly, so it saves memory for large array sizes. [b]Note:[/b] This type is passed by value and not by reference. </description> <tutorials> </tutorials> <methods> - <method name="PoolColorArray"> - <return type="PoolColorArray"> + <method name="PackedColorArray"> + <return type="PackedColorArray"> </return> <argument index="0" name="from" type="Array"> </argument> <description> - Constructs a new [PoolColorArray]. Optionally, you can pass in a generic [Array] that will be converted. + Constructs a new [PackedColorArray]. Optionally, you can pass in a generic [Array] that will be converted. </description> </method> <method name="append"> + <return type="void"> + </return> <argument index="0" name="color" type="Color"> </argument> <description> @@ -27,10 +29,12 @@ </description> </method> <method name="append_array"> - <argument index="0" name="array" type="PoolColorArray"> + <return type="void"> + </return> + <argument index="0" name="array" type="PackedColorArray"> </argument> <description> - Appends a [PoolColorArray] at the end of this array. + Appends a [PackedColorArray] at the end of this array. </description> </method> <method name="empty"> @@ -52,11 +56,15 @@ </description> </method> <method name="invert"> + <return type="void"> + </return> <description> Reverses the order of the elements in the array. </description> </method> <method name="push_back"> + <return type="void"> + </return> <argument index="0" name="color" type="Color"> </argument> <description> @@ -64,6 +72,8 @@ </description> </method> <method name="remove"> + <return type="void"> + </return> <argument index="0" name="idx" type="int"> </argument> <description> @@ -71,6 +81,8 @@ </description> </method> <method name="resize"> + <return type="void"> + </return> <argument index="0" name="idx" type="int"> </argument> <description> @@ -78,6 +90,8 @@ </description> </method> <method name="set"> + <return type="void"> + </return> <argument index="0" name="idx" type="int"> </argument> <argument index="1" name="color" type="Color"> diff --git a/doc/classes/PackedDataContainer.xml b/doc/classes/PackedDataContainer.xml index 79c9fa8d9c..296f9d3373 100644 --- a/doc/classes/PackedDataContainer.xml +++ b/doc/classes/PackedDataContainer.xml @@ -23,7 +23,7 @@ </method> </methods> <members> - <member name="__data__" type="PoolByteArray" setter="_set_data" getter="_get_data" default="PoolByteArray( )"> + <member name="__data__" type="PackedByteArray" setter="_set_data" getter="_get_data" default="PackedByteArray( )"> </member> </members> <constants> diff --git a/doc/classes/PoolRealArray.xml b/doc/classes/PackedFloat32Array.xml index 6957e7282b..ee82586cdb 100644 --- a/doc/classes/PoolRealArray.xml +++ b/doc/classes/PackedFloat32Array.xml @@ -1,25 +1,28 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="PoolRealArray" version="4.0"> +<class name="PackedFloat32Array" version="4.0"> <brief_description> - A pooled [Array] of reals ([float]). + A packed [Array] of 32-bit floating-point values. </brief_description> <description> - An [Array] specifically designed to hold floating-point values ([float]). Optimized for memory usage, does not fragment the memory. + An [Array] specifically designed to hold 32-bit floating-point values. Packs data tightly, so it saves memory for large array sizes. [b]Note:[/b] This type is passed by value and not by reference. + If you need to pack 64-bit floats tightly, see [PackedFloat64Array]. </description> <tutorials> </tutorials> <methods> - <method name="PoolRealArray"> - <return type="PoolRealArray"> + <method name="PackedFloat32Array"> + <return type="PackedFloat32Array"> </return> <argument index="0" name="from" type="Array"> </argument> <description> - Constructs a new [PoolRealArray]. Optionally, you can pass in a generic [Array] that will be converted. + Constructs a new [PackedFloat32Array]. Optionally, you can pass in a generic [Array] that will be converted. </description> </method> <method name="append"> + <return type="void"> + </return> <argument index="0" name="value" type="float"> </argument> <description> @@ -27,10 +30,12 @@ </description> </method> <method name="append_array"> - <argument index="0" name="array" type="PoolRealArray"> + <return type="void"> + </return> + <argument index="0" name="array" type="PackedFloat32Array"> </argument> <description> - Appends a [PoolRealArray] at the end of this array. + Appends a [PackedFloat32Array] at the end of this array. </description> </method> <method name="empty"> @@ -52,11 +57,15 @@ </description> </method> <method name="invert"> + <return type="void"> + </return> <description> Reverses the order of the elements in the array. </description> </method> <method name="push_back"> + <return type="void"> + </return> <argument index="0" name="value" type="float"> </argument> <description> @@ -64,6 +73,8 @@ </description> </method> <method name="remove"> + <return type="void"> + </return> <argument index="0" name="idx" type="int"> </argument> <description> @@ -71,6 +82,8 @@ </description> </method> <method name="resize"> + <return type="void"> + </return> <argument index="0" name="idx" type="int"> </argument> <description> @@ -78,6 +91,8 @@ </description> </method> <method name="set"> + <return type="void"> + </return> <argument index="0" name="idx" type="int"> </argument> <argument index="1" name="value" type="float"> diff --git a/doc/classes/PackedFloat64Array.xml b/doc/classes/PackedFloat64Array.xml new file mode 100644 index 0000000000..ce2300c65a --- /dev/null +++ b/doc/classes/PackedFloat64Array.xml @@ -0,0 +1,114 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="PackedFloat64Array" version="4.0"> + <brief_description> + A packed [Array] of 64-bit floating-point values. + </brief_description> + <description> + An [Array] specifically designed to hold 64-bit floating-point values. Packs data tightly, so it saves memory for large array sizes. + [b]Note:[/b] This type is passed by value and not by reference. + If you only need to pack 32-bit floats tightly, see [PackedFloat32Array] for a more memory-friendly alternative. + </description> + <tutorials> + </tutorials> + <methods> + <method name="PackedFloat64Array"> + <return type="PackedFloat64Array"> + </return> + <argument index="0" name="from" type="Array"> + </argument> + <description> + Constructs a new [PackedFloat64Array]. Optionally, you can pass in a generic [Array] that will be converted. + </description> + </method> + <method name="append"> + <return type="void"> + </return> + <argument index="0" name="value" type="float"> + </argument> + <description> + Appends an element at the end of the array (alias of [method push_back]). + </description> + </method> + <method name="append_array"> + <return type="void"> + </return> + <argument index="0" name="array" type="PackedFloat64Array"> + </argument> + <description> + Appends a [PackedFloat64Array] at the end of this array. + </description> + </method> + <method name="empty"> + <return type="bool"> + </return> + <description> + Returns [code]true[/code] if the array is empty. + </description> + </method> + <method name="insert"> + <return type="int"> + </return> + <argument index="0" name="idx" type="int"> + </argument> + <argument index="1" name="value" type="float"> + </argument> + <description> + Inserts a new element at a given position in the array. The position must be valid, or at the end of the array ([code]idx == size()[/code]). + </description> + </method> + <method name="invert"> + <return type="void"> + </return> + <description> + Reverses the order of the elements in the array. + </description> + </method> + <method name="push_back"> + <return type="void"> + </return> + <argument index="0" name="value" type="float"> + </argument> + <description> + Appends an element at the end of the array. + </description> + </method> + <method name="remove"> + <return type="void"> + </return> + <argument index="0" name="idx" type="int"> + </argument> + <description> + Removes an element from the array by index. + </description> + </method> + <method name="resize"> + <return type="void"> + </return> + <argument index="0" name="idx" type="int"> + </argument> + <description> + Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. + </description> + </method> + <method name="set"> + <return type="void"> + </return> + <argument index="0" name="idx" type="int"> + </argument> + <argument index="1" name="value" type="float"> + </argument> + <description> + Changes the float at the given index. + </description> + </method> + <method name="size"> + <return type="int"> + </return> + <description> + Returns the size of the array. + </description> + </method> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/PackedInt32Array.xml b/doc/classes/PackedInt32Array.xml new file mode 100644 index 0000000000..176c624956 --- /dev/null +++ b/doc/classes/PackedInt32Array.xml @@ -0,0 +1,114 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="PackedInt32Array" version="4.0"> + <brief_description> + A packed [Array] of 32-bit integers. + </brief_description> + <description> + An [Array] specifically designed to hold 32-bit integer values. Packs data tightly, so it saves memory for large array sizes. + [b]Note:[/b] This type is passed by value and not by reference. + [b]Note:[/b] This type stores signed 32-bit integers, which means it can take values in the interval [code][-2^31, 2^31 - 1][/code], i.e. [code][-2147483648, 2147483647][/code]. Exceeding those bounds will wrap around. In comparison, [int] uses signed 64-bit integers which can hold much larger values. If you need to pack 64-bit integers tightly, see [PackedInt64Array]. + </description> + <tutorials> + </tutorials> + <methods> + <method name="PackedInt32Array"> + <return type="PackedInt32Array"> + </return> + <argument index="0" name="from" type="Array"> + </argument> + <description> + Constructs a new [PackedInt32Array]. Optionally, you can pass in a generic [Array] that will be converted. + </description> + </method> + <method name="append"> + <return type="void"> + </return> + <argument index="0" name="integer" type="int"> + </argument> + <description> + Appends an element at the end of the array (alias of [method push_back]). + </description> + </method> + <method name="append_array"> + <return type="void"> + </return> + <argument index="0" name="array" type="PackedInt32Array"> + </argument> + <description> + Appends a [PackedInt32Array] at the end of this array. + </description> + </method> + <method name="empty"> + <return type="bool"> + </return> + <description> + Returns [code]true[/code] if the array is empty. + </description> + </method> + <method name="insert"> + <return type="int"> + </return> + <argument index="0" name="idx" type="int"> + </argument> + <argument index="1" name="integer" type="int"> + </argument> + <description> + Inserts a new integer at a given position in the array. The position must be valid, or at the end of the array ([code]idx == size()[/code]). + </description> + </method> + <method name="invert"> + <return type="void"> + </return> + <description> + Reverses the order of the elements in the array. + </description> + </method> + <method name="push_back"> + <return type="void"> + </return> + <argument index="0" name="integer" type="int"> + </argument> + <description> + Appends a value to the array. + </description> + </method> + <method name="remove"> + <return type="void"> + </return> + <argument index="0" name="idx" type="int"> + </argument> + <description> + Removes an element from the array by index. + </description> + </method> + <method name="resize"> + <return type="void"> + </return> + <argument index="0" name="idx" type="int"> + </argument> + <description> + Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. + </description> + </method> + <method name="set"> + <return type="void"> + </return> + <argument index="0" name="idx" type="int"> + </argument> + <argument index="1" name="integer" type="int"> + </argument> + <description> + Changes the integer at the given index. + </description> + </method> + <method name="size"> + <return type="int"> + </return> + <description> + Returns the array size. + </description> + </method> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/PoolIntArray.xml b/doc/classes/PackedInt64Array.xml index 54f0f46e11..d8a8071590 100644 --- a/doc/classes/PoolIntArray.xml +++ b/doc/classes/PackedInt64Array.xml @@ -1,26 +1,28 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="PoolIntArray" version="4.0"> +<class name="PackedInt64Array" version="4.0"> <brief_description> - A pooled [Array] of integers ([int]). + A packed [Array] of 64-bit integers. </brief_description> <description> - An [Array] specifically designed to hold integer values ([int]). Optimized for memory usage, does not fragment the memory. + An [Array] specifically designed to hold 64-bit integer values. Packs data tightly, so it saves memory for large array sizes. [b]Note:[/b] This type is passed by value and not by reference. - [b]Note:[/b] This type is limited to signed 32-bit integers, which means it can only take values in the interval [code][-2^31, 2^31 - 1][/code], i.e. [code][-2147483648, 2147483647][/code]. Exceeding those bounds will wrap around. In comparison, [int] uses signed 64-bit integers which can hold much larger values. + [b]Note:[/b] This type stores signed 64-bit integers, which means it can take values in the interval [code][-2^63, 2^63 - 1][/code], i.e. [code][-9223372036854775808, 9223372036854775807][/code]. Exceeding those bounds will wrap around. If you only need to pack 32-bit integers tightly, see [PackedInt32Array] for a more memory-friendly alternative. </description> <tutorials> </tutorials> <methods> - <method name="PoolIntArray"> - <return type="PoolIntArray"> + <method name="PackedInt64Array"> + <return type="PackedInt64Array"> </return> <argument index="0" name="from" type="Array"> </argument> <description> - Constructs a new [PoolIntArray]. Optionally, you can pass in a generic [Array] that will be converted. + Constructs a new [PackedInt64Array]. Optionally, you can pass in a generic [Array] that will be converted. </description> </method> <method name="append"> + <return type="void"> + </return> <argument index="0" name="integer" type="int"> </argument> <description> @@ -28,10 +30,12 @@ </description> </method> <method name="append_array"> - <argument index="0" name="array" type="PoolIntArray"> + <return type="void"> + </return> + <argument index="0" name="array" type="PackedInt64Array"> </argument> <description> - Appends a [PoolIntArray] at the end of this array. + Appends a [PackedInt64Array] at the end of this array. </description> </method> <method name="empty"> @@ -49,15 +53,19 @@ <argument index="1" name="integer" type="int"> </argument> <description> - Inserts a new int at a given position in the array. The position must be valid, or at the end of the array ([code]idx == size()[/code]). + Inserts a new integer at a given position in the array. The position must be valid, or at the end of the array ([code]idx == size()[/code]). </description> </method> <method name="invert"> + <return type="void"> + </return> <description> Reverses the order of the elements in the array. </description> </method> <method name="push_back"> + <return type="void"> + </return> <argument index="0" name="integer" type="int"> </argument> <description> @@ -65,6 +73,8 @@ </description> </method> <method name="remove"> + <return type="void"> + </return> <argument index="0" name="idx" type="int"> </argument> <description> @@ -72,6 +82,8 @@ </description> </method> <method name="resize"> + <return type="void"> + </return> <argument index="0" name="idx" type="int"> </argument> <description> @@ -79,12 +91,14 @@ </description> </method> <method name="set"> + <return type="void"> + </return> <argument index="0" name="idx" type="int"> </argument> <argument index="1" name="integer" type="int"> </argument> <description> - Changes the int at the given index. + Changes the integer at the given index. </description> </method> <method name="size"> diff --git a/doc/classes/PackedScene.xml b/doc/classes/PackedScene.xml index d13195bd5e..e422545b7b 100644 --- a/doc/classes/PackedScene.xml +++ b/doc/classes/PackedScene.xml @@ -65,7 +65,7 @@ </method> </methods> <members> - <member name="_bundled" type="Dictionary" setter="_set_bundled_scene" getter="_get_bundled_scene" default="{"conn_count": 0,"conns": PoolIntArray( ),"editable_instances": [ ],"names": PoolStringArray( ),"node_count": 0,"node_paths": [ ],"nodes": PoolIntArray( ),"variants": [ ],"version": 2}"> + <member name="_bundled" type="Dictionary" setter="_set_bundled_scene" getter="_get_bundled_scene" default="{"conn_count": 0,"conns": PackedInt32Array( ),"editable_instances": [ ],"names": PackedStringArray( ),"node_count": 0,"node_paths": [ ],"nodes": PackedInt32Array( ),"variants": [ ],"version": 2}"> A dictionary representation of the scene contents. Available keys include "rnames" and "variants" for resources, "node_count", "nodes", "node_paths" for nodes, "editable_instances" for base scene children overrides, "conn_count" and "conns" for signal connections, and "version" for the format style of the PackedScene. </member> diff --git a/doc/classes/PoolStringArray.xml b/doc/classes/PackedStringArray.xml index b4fb7b31d4..9526f5899d 100644 --- a/doc/classes/PoolStringArray.xml +++ b/doc/classes/PackedStringArray.xml @@ -1,25 +1,27 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="PoolStringArray" version="4.0"> +<class name="PackedStringArray" version="4.0"> <brief_description> - A pooled [Array] of [String]. + A packed [Array] of [String]s. </brief_description> <description> - An [Array] specifically designed to hold [String]s. Optimized for memory usage, does not fragment the memory. + An [Array] specifically designed to hold [String]s. Packs data tightly, so it saves memory for large array sizes. [b]Note:[/b] This type is passed by value and not by reference. </description> <tutorials> </tutorials> <methods> - <method name="PoolStringArray"> - <return type="PoolStringArray"> + <method name="PackedStringArray"> + <return type="PackedStringArray"> </return> <argument index="0" name="from" type="Array"> </argument> <description> - Constructs a new [PoolStringArray]. Optionally, you can pass in a generic [Array] that will be converted. + Constructs a new [PackedStringArray]. Optionally, you can pass in a generic [Array] that will be converted. </description> </method> <method name="append"> + <return type="void"> + </return> <argument index="0" name="string" type="String"> </argument> <description> @@ -27,10 +29,12 @@ </description> </method> <method name="append_array"> - <argument index="0" name="array" type="PoolStringArray"> + <return type="void"> + </return> + <argument index="0" name="array" type="PackedStringArray"> </argument> <description> - Appends a [PoolStringArray] at the end of this array. + Appends a [PackedStringArray] at the end of this array. </description> </method> <method name="empty"> @@ -52,20 +56,15 @@ </description> </method> <method name="invert"> - <description> - Reverses the order of the elements in the array. - </description> - </method> - <method name="join"> - <return type="String"> + <return type="void"> </return> - <argument index="0" name="delimiter" type="String"> - </argument> <description> - Returns a [String] with each element of the array joined with the given [code]delimiter[/code]. + Reverses the order of the elements in the array. </description> </method> <method name="push_back"> + <return type="void"> + </return> <argument index="0" name="string" type="String"> </argument> <description> @@ -73,6 +72,8 @@ </description> </method> <method name="remove"> + <return type="void"> + </return> <argument index="0" name="idx" type="int"> </argument> <description> @@ -80,6 +81,8 @@ </description> </method> <method name="resize"> + <return type="void"> + </return> <argument index="0" name="idx" type="int"> </argument> <description> @@ -87,6 +90,8 @@ </description> </method> <method name="set"> + <return type="void"> + </return> <argument index="0" name="idx" type="int"> </argument> <argument index="1" name="string" type="String"> diff --git a/doc/classes/PoolVector2Array.xml b/doc/classes/PackedVector2Array.xml index cb4536be5b..87f202357c 100644 --- a/doc/classes/PoolVector2Array.xml +++ b/doc/classes/PackedVector2Array.xml @@ -1,25 +1,27 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="PoolVector2Array" version="4.0"> +<class name="PackedVector2Array" version="4.0"> <brief_description> - A pooled [Array] of [Vector2]. + A packed [Array] of [Vector2]s. </brief_description> <description> - An [Array] specifically designed to hold [Vector2]. Optimized for memory usage, does not fragment the memory. + An [Array] specifically designed to hold [Vector2]. Packs data tightly, so it saves memory for large array sizes. [b]Note:[/b] This type is passed by value and not by reference. </description> <tutorials> </tutorials> <methods> - <method name="PoolVector2Array"> - <return type="PoolVector2Array"> + <method name="PackedVector2Array"> + <return type="PackedVector2Array"> </return> <argument index="0" name="from" type="Array"> </argument> <description> - Constructs a new [PoolVector2Array]. Optionally, you can pass in a generic [Array] that will be converted. + Constructs a new [PackedVector2Array]. Optionally, you can pass in a generic [Array] that will be converted. </description> </method> <method name="append"> + <return type="void"> + </return> <argument index="0" name="vector2" type="Vector2"> </argument> <description> @@ -27,10 +29,12 @@ </description> </method> <method name="append_array"> - <argument index="0" name="array" type="PoolVector2Array"> + <return type="void"> + </return> + <argument index="0" name="array" type="PackedVector2Array"> </argument> <description> - Appends a [PoolVector2Array] at the end of this array. + Appends a [PackedVector2Array] at the end of this array. </description> </method> <method name="empty"> @@ -52,11 +56,15 @@ </description> </method> <method name="invert"> + <return type="void"> + </return> <description> Reverses the order of the elements in the array. </description> </method> <method name="push_back"> + <return type="void"> + </return> <argument index="0" name="vector2" type="Vector2"> </argument> <description> @@ -64,6 +72,8 @@ </description> </method> <method name="remove"> + <return type="void"> + </return> <argument index="0" name="idx" type="int"> </argument> <description> @@ -71,6 +81,8 @@ </description> </method> <method name="resize"> + <return type="void"> + </return> <argument index="0" name="idx" type="int"> </argument> <description> @@ -78,6 +90,8 @@ </description> </method> <method name="set"> + <return type="void"> + </return> <argument index="0" name="idx" type="int"> </argument> <argument index="1" name="vector2" type="Vector2"> diff --git a/doc/classes/PoolVector3Array.xml b/doc/classes/PackedVector3Array.xml index 6c40de9bd8..7bfa684ff5 100644 --- a/doc/classes/PoolVector3Array.xml +++ b/doc/classes/PackedVector3Array.xml @@ -1,25 +1,27 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="PoolVector3Array" version="4.0"> +<class name="PackedVector3Array" version="4.0"> <brief_description> - A pooled [Array] of [Vector3]. + A packed [Array] of [Vector3]s. </brief_description> <description> - An [Array] specifically designed to hold [Vector3]. Optimized for memory usage, does not fragment the memory. + An [Array] specifically designed to hold [Vector3]. Packs data tightly, so it saves memory for large array sizes. [b]Note:[/b] This type is passed by value and not by reference. </description> <tutorials> </tutorials> <methods> - <method name="PoolVector3Array"> - <return type="PoolVector3Array"> + <method name="PackedVector3Array"> + <return type="PackedVector3Array"> </return> <argument index="0" name="from" type="Array"> </argument> <description> - Constructs a new [PoolVector3Array]. Optionally, you can pass in a generic [Array] that will be converted. + Constructs a new [PackedVector3Array]. Optionally, you can pass in a generic [Array] that will be converted. </description> </method> <method name="append"> + <return type="void"> + </return> <argument index="0" name="vector3" type="Vector3"> </argument> <description> @@ -27,10 +29,12 @@ </description> </method> <method name="append_array"> - <argument index="0" name="array" type="PoolVector3Array"> + <return type="void"> + </return> + <argument index="0" name="array" type="PackedVector3Array"> </argument> <description> - Appends a [PoolVector3Array] at the end of this array. + Appends a [PackedVector3Array] at the end of this array. </description> </method> <method name="empty"> @@ -52,11 +56,15 @@ </description> </method> <method name="invert"> + <return type="void"> + </return> <description> Reverses the order of the elements in the array. </description> </method> <method name="push_back"> + <return type="void"> + </return> <argument index="0" name="vector3" type="Vector3"> </argument> <description> @@ -64,6 +72,8 @@ </description> </method> <method name="remove"> + <return type="void"> + </return> <argument index="0" name="idx" type="int"> </argument> <description> @@ -71,6 +81,8 @@ </description> </method> <method name="resize"> + <return type="void"> + </return> <argument index="0" name="idx" type="int"> </argument> <description> @@ -78,6 +90,8 @@ </description> </method> <method name="set"> + <return type="void"> + </return> <argument index="0" name="idx" type="int"> </argument> <argument index="1" name="vector3" type="Vector3"> diff --git a/doc/classes/PacketPeer.xml b/doc/classes/PacketPeer.xml index b721bc9df4..e3e2f63e14 100644 --- a/doc/classes/PacketPeer.xml +++ b/doc/classes/PacketPeer.xml @@ -17,7 +17,7 @@ </description> </method> <method name="get_packet"> - <return type="PoolByteArray"> + <return type="PackedByteArray"> </return> <description> Gets a raw packet. @@ -43,7 +43,7 @@ <method name="put_packet"> <return type="int" enum="Error"> </return> - <argument index="0" name="buffer" type="PoolByteArray"> + <argument index="0" name="buffer" type="PackedByteArray"> </argument> <description> Sends a raw packet. diff --git a/doc/classes/PacketPeerDTLS.xml b/doc/classes/PacketPeerDTLS.xml new file mode 100644 index 0000000000..19ebb9d81e --- /dev/null +++ b/doc/classes/PacketPeerDTLS.xml @@ -0,0 +1,66 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="PacketPeerDTLS" inherits="PacketPeer" version="4.0"> + <brief_description> + DTLS packet peer. + </brief_description> + <description> + This class represents a DTLS peer connection. It can be used to connect to a DTLS server, and is returned by [method DTLSServer.take_connection]. + </description> + <tutorials> + </tutorials> + <methods> + <method name="connect_to_peer"> + <return type="int" enum="Error"> + </return> + <argument index="0" name="packet_peer" type="PacketPeerUDP"> + </argument> + <argument index="1" name="validate_certs" type="bool" default="true"> + </argument> + <argument index="2" name="for_hostname" type="String" default=""""> + </argument> + <argument index="3" name="valid_certificate" type="X509Certificate" default="null"> + </argument> + <description> + Connects a [code]peer[/code] beginning the DTLS handshake using the underlying [PacketPeerUDP] which must be connected (see [method PacketPeerUDP.connect_to_host]). If [code]validate_certs[/code] is [code]true[/code], [PacketPeerDTLS] will validate that the certificate presented by the remote peer and match it with the [code]for_hostname[/code] argument. You can specify a custom [X509Certificate] to use for validation via the [code]valid_certificate[/code] argument. + </description> + </method> + <method name="disconnect_from_peer"> + <return type="void"> + </return> + <description> + Disconnects this peer, terminating the DTLS session. + </description> + </method> + <method name="get_status" qualifiers="const"> + <return type="int" enum="PacketPeerDTLS.Status"> + </return> + <description> + Returns the status of the connection. See [enum Status] for values. + </description> + </method> + <method name="poll"> + <return type="void"> + </return> + <description> + Poll the connection to check for incoming packets. Call this frequently to update the status and keep the connection working. + </description> + </method> + </methods> + <constants> + <constant name="STATUS_DISCONNECTED" value="0" enum="Status"> + A status representing a [PacketPeerDTLS] that is disconnected. + </constant> + <constant name="STATUS_HANDSHAKING" value="1" enum="Status"> + A status representing a [PacketPeerDTLS] that is currently performing the handshake with a remote peer. + </constant> + <constant name="STATUS_CONNECTED" value="2" enum="Status"> + A status representing a [PacketPeerDTLS] that is connected to a remote peer. + </constant> + <constant name="STATUS_ERROR" value="3" enum="Status"> + A status representing a [PacketPeerDTLS] in a generic error state. + </constant> + <constant name="STATUS_ERROR_HOSTNAME_MISMATCH" value="4" enum="Status"> + An error status that shows a mismatch in the DTLS certificate domain presented by the host and the domain requested for validation. + </constant> + </constants> +</class> diff --git a/doc/classes/PacketPeerUDP.xml b/doc/classes/PacketPeerUDP.xml index 81cd341ef7..aa5599a3fb 100644 --- a/doc/classes/PacketPeerUDP.xml +++ b/doc/classes/PacketPeerUDP.xml @@ -16,6 +16,18 @@ Closes the UDP socket the [PacketPeerUDP] is currently listening on. </description> </method> + <method name="connect_to_host"> + <return type="int" enum="Error"> + </return> + <argument index="0" name="host" type="String"> + </argument> + <argument index="1" name="port" type="int"> + </argument> + <description> + Calling this method connects this UDP peer to the given [code]host[/code]/[code]port[/code] pair. UDP is in reality connectionless, so this option only means that incoming packets from different addresses are automatically discarded, and that outgoing packets are always sent to the connected address (future calls to [method set_dest_address] are not allowed). This method does not send any data to the remote peer, to do that, use [method PacketPeer.put_var] or [method PacketPeer.put_packet] as usual. See also [UDPServer]. + Note: Connecting to the remote peer does not help to protect from malicious attacks like IP spoofing, etc. Think about using an encryption technique like SSL or DTLS if you feel like your application is transfering sensitive information. + </description> + </method> <method name="get_packet_ip" qualifiers="const"> <return type="String"> </return> @@ -30,6 +42,13 @@ Returns the port of the remote peer that sent the last packet(that was received with [method PacketPeer.get_packet] or [method PacketPeer.get_var]). </description> </method> + <method name="is_connected_to_host" qualifiers="const"> + <return type="bool"> + </return> + <description> + Returns [code]true[/code] if the UDP socket is open and has been connected to a remote address. See [method connect_to_host]. + </description> + </method> <method name="is_listening" qualifiers="const"> <return type="bool"> </return> diff --git a/doc/classes/PanoramaSky.xml b/doc/classes/PanoramaSky.xml index c600a4425b..0ddf1cb054 100644 --- a/doc/classes/PanoramaSky.xml +++ b/doc/classes/PanoramaSky.xml @@ -5,6 +5,8 @@ </brief_description> <description> A resource referenced in an [Environment] that is used to draw a background. The Panorama sky functions similar to skyboxes in other engines, except it uses an equirectangular sky map instead of a cube map. + Using an HDR panorama is strongly recommended for accurate, high-quality reflections. Godot supports the Radiance HDR ([code].hdr[/code]) and OpenEXR ([code].exr[/code]) image formats for this purpose. + You can use [url=https://danilw.github.io/GLSL-howto/cubemap_to_panorama_js/cubemap_to_panorama.html]this tool[/url] to convert a cube map to an equirectangular sky map. </description> <tutorials> </tutorials> diff --git a/doc/classes/Performance.xml b/doc/classes/Performance.xml index a7bf947011..378b165644 100644 --- a/doc/classes/Performance.xml +++ b/doc/classes/Performance.xml @@ -37,82 +37,76 @@ <constant name="MEMORY_STATIC" value="3" enum="Monitor"> Static memory currently used, in bytes. Not available in release builds. </constant> - <constant name="MEMORY_DYNAMIC" value="4" enum="Monitor"> - Dynamic memory currently used, in bytes. Not available in release builds. - </constant> - <constant name="MEMORY_STATIC_MAX" value="5" enum="Monitor"> + <constant name="MEMORY_STATIC_MAX" value="4" enum="Monitor"> Available static memory. Not available in release builds. </constant> - <constant name="MEMORY_DYNAMIC_MAX" value="6" enum="Monitor"> - Available dynamic memory. Not available in release builds. - </constant> - <constant name="MEMORY_MESSAGE_BUFFER_MAX" value="7" enum="Monitor"> + <constant name="MEMORY_MESSAGE_BUFFER_MAX" value="5" enum="Monitor"> Largest amount of memory the message queue buffer has used, in bytes. The message queue is used for deferred functions calls and notifications. </constant> - <constant name="OBJECT_COUNT" value="8" enum="Monitor"> + <constant name="OBJECT_COUNT" value="6" enum="Monitor"> Number of objects currently instanced (including nodes). </constant> - <constant name="OBJECT_RESOURCE_COUNT" value="9" enum="Monitor"> + <constant name="OBJECT_RESOURCE_COUNT" value="7" enum="Monitor"> Number of resources currently used. </constant> - <constant name="OBJECT_NODE_COUNT" value="10" enum="Monitor"> + <constant name="OBJECT_NODE_COUNT" value="8" enum="Monitor"> Number of nodes currently instanced in the scene tree. This also includes the root node. </constant> - <constant name="OBJECT_ORPHAN_NODE_COUNT" value="11" enum="Monitor"> + <constant name="OBJECT_ORPHAN_NODE_COUNT" value="9" enum="Monitor"> Number of orphan nodes, i.e. nodes which are not parented to a node of the scene tree. </constant> - <constant name="RENDER_OBJECTS_IN_FRAME" value="12" enum="Monitor"> + <constant name="RENDER_OBJECTS_IN_FRAME" value="10" enum="Monitor"> 3D objects drawn per frame. </constant> - <constant name="RENDER_VERTICES_IN_FRAME" value="13" enum="Monitor"> + <constant name="RENDER_VERTICES_IN_FRAME" value="11" enum="Monitor"> Vertices drawn per frame. 3D only. </constant> - <constant name="RENDER_MATERIAL_CHANGES_IN_FRAME" value="14" enum="Monitor"> + <constant name="RENDER_MATERIAL_CHANGES_IN_FRAME" value="12" enum="Monitor"> Material changes per frame. 3D only. </constant> - <constant name="RENDER_SHADER_CHANGES_IN_FRAME" value="15" enum="Monitor"> + <constant name="RENDER_SHADER_CHANGES_IN_FRAME" value="13" enum="Monitor"> Shader changes per frame. 3D only. </constant> - <constant name="RENDER_SURFACE_CHANGES_IN_FRAME" value="16" enum="Monitor"> + <constant name="RENDER_SURFACE_CHANGES_IN_FRAME" value="14" enum="Monitor"> Render surface changes per frame. 3D only. </constant> - <constant name="RENDER_DRAW_CALLS_IN_FRAME" value="17" enum="Monitor"> + <constant name="RENDER_DRAW_CALLS_IN_FRAME" value="15" enum="Monitor"> Draw calls per frame. 3D only. </constant> - <constant name="RENDER_VIDEO_MEM_USED" value="18" enum="Monitor"> + <constant name="RENDER_VIDEO_MEM_USED" value="16" enum="Monitor"> The amount of video memory used, i.e. texture and vertex memory combined. </constant> - <constant name="RENDER_TEXTURE_MEM_USED" value="19" enum="Monitor"> + <constant name="RENDER_TEXTURE_MEM_USED" value="17" enum="Monitor"> The amount of texture memory used. </constant> - <constant name="RENDER_VERTEX_MEM_USED" value="20" enum="Monitor"> + <constant name="RENDER_VERTEX_MEM_USED" value="18" enum="Monitor"> The amount of vertex memory used. </constant> - <constant name="RENDER_USAGE_VIDEO_MEM_TOTAL" value="21" enum="Monitor"> + <constant name="RENDER_USAGE_VIDEO_MEM_TOTAL" value="19" enum="Monitor"> Unimplemented in the GLES2 rendering backend, always returns 0. </constant> - <constant name="PHYSICS_2D_ACTIVE_OBJECTS" value="22" enum="Monitor"> + <constant name="PHYSICS_2D_ACTIVE_OBJECTS" value="20" enum="Monitor"> Number of active [RigidBody2D] nodes in the game. </constant> - <constant name="PHYSICS_2D_COLLISION_PAIRS" value="23" enum="Monitor"> + <constant name="PHYSICS_2D_COLLISION_PAIRS" value="21" enum="Monitor"> Number of collision pairs in the 2D physics engine. </constant> - <constant name="PHYSICS_2D_ISLAND_COUNT" value="24" enum="Monitor"> + <constant name="PHYSICS_2D_ISLAND_COUNT" value="22" enum="Monitor"> Number of islands in the 2D physics engine. </constant> - <constant name="PHYSICS_3D_ACTIVE_OBJECTS" value="25" enum="Monitor"> + <constant name="PHYSICS_3D_ACTIVE_OBJECTS" value="23" enum="Monitor"> Number of active [RigidBody] and [VehicleBody] nodes in the game. </constant> - <constant name="PHYSICS_3D_COLLISION_PAIRS" value="26" enum="Monitor"> + <constant name="PHYSICS_3D_COLLISION_PAIRS" value="24" enum="Monitor"> Number of collision pairs in the 3D physics engine. </constant> - <constant name="PHYSICS_3D_ISLAND_COUNT" value="27" enum="Monitor"> + <constant name="PHYSICS_3D_ISLAND_COUNT" value="25" enum="Monitor"> Number of islands in the 3D physics engine. </constant> - <constant name="AUDIO_OUTPUT_LATENCY" value="28" enum="Monitor"> + <constant name="AUDIO_OUTPUT_LATENCY" value="26" enum="Monitor"> Output latency of the [AudioServer]. </constant> - <constant name="MONITOR_MAX" value="29" enum="Monitor"> + <constant name="MONITOR_MAX" value="27" enum="Monitor"> Represents the size of the [enum Monitor] enum. </constant> </constants> diff --git a/doc/classes/Physics2DServer.xml b/doc/classes/Physics2DServer.xml index 4fac27a82b..45215253be 100644 --- a/doc/classes/Physics2DServer.xml +++ b/doc/classes/Physics2DServer.xml @@ -165,7 +165,7 @@ </argument> <argument index="1" name="receiver" type="Object"> </argument> - <argument index="2" name="method" type="String"> + <argument index="2" name="method" type="StringName"> </argument> <description> </description> @@ -199,7 +199,7 @@ </argument> <argument index="1" name="receiver" type="Object"> </argument> - <argument index="2" name="method" type="String"> + <argument index="2" name="method" type="StringName"> </argument> <description> Sets the function to call when any body/area enters or exits the area. This callback will be called for any object interacting with the area, and takes five parameters: @@ -661,7 +661,7 @@ </argument> <argument index="1" name="receiver" type="Object"> </argument> - <argument index="2" name="method" type="String"> + <argument index="2" name="method" type="StringName"> </argument> <argument index="3" name="userdata" type="Variant" default="null"> </argument> diff --git a/doc/classes/PhysicsServer.xml b/doc/classes/PhysicsServer.xml index d54a907d3d..592d3d8e4e 100644 --- a/doc/classes/PhysicsServer.xml +++ b/doc/classes/PhysicsServer.xml @@ -156,7 +156,7 @@ </argument> <argument index="1" name="receiver" type="Object"> </argument> - <argument index="2" name="method" type="String"> + <argument index="2" name="method" type="StringName"> </argument> <description> </description> @@ -190,7 +190,7 @@ </argument> <argument index="1" name="receiver" type="Object"> </argument> - <argument index="2" name="method" type="String"> + <argument index="2" name="method" type="StringName"> </argument> <description> Sets the function to call when any body/area enters or exits the area. This callback will be called for any object interacting with the area, and takes five parameters: @@ -678,7 +678,7 @@ </argument> <argument index="1" name="receiver" type="Object"> </argument> - <argument index="2" name="method" type="String"> + <argument index="2" name="method" type="StringName"> </argument> <argument index="3" name="userdata" type="Variant" default="null"> </argument> diff --git a/doc/classes/Polygon2D.xml b/doc/classes/Polygon2D.xml index af4e8e1671..f777545733 100644 --- a/doc/classes/Polygon2D.xml +++ b/doc/classes/Polygon2D.xml @@ -14,7 +14,7 @@ </return> <argument index="0" name="path" type="NodePath"> </argument> - <argument index="1" name="weights" type="PoolRealArray"> + <argument index="1" name="weights" type="PackedFloat32Array"> </argument> <description> </description> @@ -48,7 +48,7 @@ </description> </method> <method name="get_bone_weights" qualifiers="const"> - <return type="PoolRealArray"> + <return type="PackedFloat32Array"> </return> <argument index="0" name="index" type="int"> </argument> @@ -70,7 +70,7 @@ </return> <argument index="0" name="index" type="int"> </argument> - <argument index="1" name="weights" type="PoolRealArray"> + <argument index="1" name="weights" type="PackedFloat32Array"> </argument> <description> </description> @@ -98,9 +98,9 @@ <member name="offset" type="Vector2" setter="set_offset" getter="get_offset" default="Vector2( 0, 0 )"> The offset applied to each vertex. </member> - <member name="polygon" type="PoolVector2Array" setter="set_polygon" getter="get_polygon" default="PoolVector2Array( )"> + <member name="polygon" type="PackedVector2Array" setter="set_polygon" getter="get_polygon" default="PackedVector2Array( )"> The polygon's list of vertices. The final point will be connected to the first. - [b]Note:[/b] This returns a copy of the [PoolVector2Array] rather than a reference. + [b]Note:[/b] This returns a copy of the [PackedVector2Array] rather than a reference. </member> <member name="polygons" type="Array" setter="set_polygons" getter="get_polygons" default="[ ]"> </member> @@ -127,10 +127,10 @@ <member name="texture_scale" type="Vector2" setter="set_texture_scale" getter="get_texture_scale" default="Vector2( 1, 1 )"> Amount to multiply the [code]uv[/code] coordinates when using a [code]texture[/code]. Larger values make the texture smaller, and vice versa. </member> - <member name="uv" type="PoolVector2Array" setter="set_uv" getter="get_uv" default="PoolVector2Array( )"> + <member name="uv" type="PackedVector2Array" setter="set_uv" getter="get_uv" default="PackedVector2Array( )"> Texture coordinates for each vertex of the polygon. There should be one [code]uv[/code] per polygon vertex. If there are fewer, undefined vertices will use [code](0, 0)[/code]. </member> - <member name="vertex_colors" type="PoolColorArray" setter="set_vertex_colors" getter="get_vertex_colors" default="PoolColorArray( )"> + <member name="vertex_colors" type="PackedColorArray" setter="set_vertex_colors" getter="get_vertex_colors" default="PackedColorArray( )"> Color for each vertex. Colors are interpolated between vertices, resulting in smooth gradients. There should be one per polygon vertex. If there are fewer, undefined vertices will use [code]color[/code]. </member> </members> diff --git a/doc/classes/PolygonPathFinder.xml b/doc/classes/PolygonPathFinder.xml index 28a0447f3d..49453d32ac 100644 --- a/doc/classes/PolygonPathFinder.xml +++ b/doc/classes/PolygonPathFinder.xml @@ -8,7 +8,7 @@ </tutorials> <methods> <method name="find_path"> - <return type="PoolVector2Array"> + <return type="PackedVector2Array"> </return> <argument index="0" name="from" type="Vector2"> </argument> @@ -32,7 +32,7 @@ </description> </method> <method name="get_intersections" qualifiers="const"> - <return type="PoolVector2Array"> + <return type="PackedVector2Array"> </return> <argument index="0" name="from" type="Vector2"> </argument> @@ -70,9 +70,9 @@ <method name="setup"> <return type="void"> </return> - <argument index="0" name="points" type="PoolVector2Array"> + <argument index="0" name="points" type="PackedVector2Array"> </argument> - <argument index="1" name="connections" type="PoolIntArray"> + <argument index="1" name="connections" type="PackedInt32Array"> </argument> <description> </description> diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index 0bedb3afe3..236931f877 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -469,7 +469,7 @@ <member name="editor/script_templates_search_path" type="String" setter="" getter="" default=""res://script_templates""> Search path for project-specific script templates. Script templates will be search both in the editor-specific path and in this project-specific path. </member> - <member name="editor/search_in_file_extensions" type="PoolStringArray" setter="" getter="" default="PoolStringArray( "gd", "shader" )"> + <member name="editor/search_in_file_extensions" type="PackedStringArray" setter="" getter="" default="PackedStringArray( "gd", "shader" )"> Text-based file extensions to include in the script editor's "Find in Files" feature. You can add e.g. [code]tscn[/code] if you wish to also parse your scene files, especially if you use built-in scripts which are serialized in the scene files. </member> <member name="gui/common/default_scroll_deadzone" type="int" setter="" getter="" default="0"> @@ -815,6 +815,18 @@ <member name="memory/limits/multithreaded_server/rid_pool_prealloc" type="int" setter="" getter="" default="60"> This is used by servers when used in multi-threading mode (servers and visual). RIDs are preallocated to avoid stalling the server requesting them on threads. If servers get stalled too often when loading resources in a thread, increase this number. </member> + <member name="mono/debugger_agent/port" type="int" setter="" getter="" default="23685"> + </member> + <member name="mono/debugger_agent/wait_for_debugger" type="bool" setter="" getter="" default="false"> + </member> + <member name="mono/debugger_agent/wait_timeout" type="int" setter="" getter="" default="3000"> + </member> + <member name="mono/profiler/args" type="String" setter="" getter="" default=""log:calls,alloc,sample,output=output.mlpd""> + </member> + <member name="mono/profiler/enabled" type="bool" setter="" getter="" default="false"> + </member> + <member name="mono/unhandled_exception_policy" type="int" setter="" getter="" default="0"> + </member> <member name="network/limits/debugger_stdout/max_chars_per_second" type="int" setter="" getter="" default="2048"> Maximum amount of characters allowed to send as output from the debugger. Over this value, content is dropped. This helps not to stall the debugger connection. </member> @@ -1028,9 +1040,6 @@ </member> <member name="rendering/quality/reflection_atlas/reflection_size.mobile" type="int" setter="" getter="" default="128"> </member> - <member name="rendering/quality/reflections/atlas_size" type="int" setter="" getter="" default="2048"> - Size of the atlas used by reflection probes. A larger size can result in higher visual quality, while a smaller size will be faster and take up less memory. - </member> <member name="rendering/quality/reflections/ggx_samples" type="int" setter="" getter="" default="1024"> </member> <member name="rendering/quality/reflections/ggx_samples.mobile" type="int" setter="" getter="" default="128"> diff --git a/doc/classes/Quat.xml b/doc/classes/Quat.xml index f11f20f1f9..327fa882e5 100644 --- a/doc/classes/Quat.xml +++ b/doc/classes/Quat.xml @@ -132,6 +132,8 @@ </description> </method> <method name="set_axis_angle"> + <return type="void"> + </return> <argument index="0" name="axis" type="Vector3"> </argument> <argument index="1" name="angle" type="float"> @@ -141,6 +143,8 @@ </description> </method> <method name="set_euler"> + <return type="void"> + </return> <argument index="0" name="euler" type="Vector3"> </argument> <description> diff --git a/doc/classes/Rect2.xml b/doc/classes/Rect2.xml index e32b19ff00..26abfb538b 100644 --- a/doc/classes/Rect2.xml +++ b/doc/classes/Rect2.xml @@ -1,10 +1,11 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="Rect2" version="4.0"> <brief_description> - 2D axis-aligned bounding box. + 2D axis-aligned bounding box using floating point coordinates. </brief_description> <description> - Rect2 consists of a position, a size, and several utility functions. It is typically used for fast overlap tests. + [Rect2] consists of a position, a size, and several utility functions. It is typically used for fast overlap tests. + It uses floating point coordinates. </description> <tutorials> <link>https://docs.godotengine.org/en/latest/tutorials/math/index.html</link> @@ -36,6 +37,15 @@ Constructs a [Rect2] by x, y, width, and height. </description> </method> + <method name="Rect2"> + <return type="Rect2"> + </return> + <argument index="0" name="from" type="Rect2i"> + </argument> + <description> + Constructs a [Rect2] from a [Rect2i]. + </description> + </method> <method name="abs"> <return type="Rect2"> </return> diff --git a/doc/classes/Rect2i.xml b/doc/classes/Rect2i.xml new file mode 100644 index 0000000000..2e8be384c1 --- /dev/null +++ b/doc/classes/Rect2i.xml @@ -0,0 +1,52 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="Rect2i" version="4.0"> + <brief_description> + 2D axis-aligned bounding box using integer coordinates. + </brief_description> + <description> + [Rect2i] consists of a position, a size, and several utility functions. It is typically used for fast overlap tests. + It uses integer coordinates. + </description> + <tutorials> + <link>https://docs.godotengine.org/en/latest/tutorials/math/index.html</link> + </tutorials> + <methods> + <method name="Rect2i"> + <return type="Rect2i"> + </return> + <argument index="0" name="position" type="Vector2"> + </argument> + <argument index="1" name="size" type="Vector2"> + </argument> + <description> + Constructs a [Rect2i] by position and size. + </description> + </method> + <method name="Rect2i"> + <return type="Rect2i"> + </return> + <argument index="0" name="x" type="int"> + </argument> + <argument index="1" name="y" type="int"> + </argument> + <argument index="2" name="width" type="int"> + </argument> + <argument index="3" name="height" type="int"> + </argument> + <description> + Constructs a [Rect2i] by x, y, width, and height. + </description> + </method> + <method name="Rect2i"> + <return type="Rect2i"> + </return> + <argument index="0" name="from" type="Rect2"> + </argument> + <description> + Constructs a new [Rect2i] from [Rect2]. The floating point coordinates will be truncated. + </description> + </method> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/ResourceFormatLoader.xml b/doc/classes/ResourceFormatLoader.xml index fc36f922e1..713f2c1726 100644 --- a/doc/classes/ResourceFormatLoader.xml +++ b/doc/classes/ResourceFormatLoader.xml @@ -24,7 +24,7 @@ </description> </method> <method name="get_recognized_extensions" qualifiers="virtual"> - <return type="PoolStringArray"> + <return type="PackedStringArray"> </return> <description> Gets the list of extensions for files this loader is able to read. @@ -43,7 +43,7 @@ <method name="handles_type" qualifiers="virtual"> <return type="bool"> </return> - <argument index="0" name="typename" type="String"> + <argument index="0" name="typename" type="StringName"> </argument> <description> Tells which resource class this loader can load. diff --git a/doc/classes/ResourceFormatSaver.xml b/doc/classes/ResourceFormatSaver.xml index 369c158ce4..69f8b43898 100644 --- a/doc/classes/ResourceFormatSaver.xml +++ b/doc/classes/ResourceFormatSaver.xml @@ -11,7 +11,7 @@ </tutorials> <methods> <method name="get_recognized_extensions" qualifiers="virtual"> - <return type="PoolStringArray"> + <return type="PackedStringArray"> </return> <argument index="0" name="resource" type="Resource"> </argument> diff --git a/doc/classes/ResourceLoader.xml b/doc/classes/ResourceLoader.xml index 85c9438d4f..d2a0ac22d6 100644 --- a/doc/classes/ResourceLoader.xml +++ b/doc/classes/ResourceLoader.xml @@ -24,7 +24,7 @@ </description> </method> <method name="get_dependencies"> - <return type="PoolStringArray"> + <return type="PackedStringArray"> </return> <argument index="0" name="path" type="String"> </argument> @@ -33,7 +33,7 @@ </description> </method> <method name="get_recognized_extensions_for_type"> - <return type="PoolStringArray"> + <return type="PackedStringArray"> </return> <argument index="0" name="type" type="String"> </argument> diff --git a/doc/classes/ResourcePreloader.xml b/doc/classes/ResourcePreloader.xml index 1e0dcaaea8..3159a4c424 100644 --- a/doc/classes/ResourcePreloader.xml +++ b/doc/classes/ResourcePreloader.xml @@ -13,7 +13,7 @@ <method name="add_resource"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <argument index="1" name="resource" type="Resource"> </argument> @@ -24,14 +24,14 @@ <method name="get_resource" qualifiers="const"> <return type="Resource"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <description> Returns the resource associated to [code]name[/code]. </description> </method> <method name="get_resource_list" qualifiers="const"> - <return type="PoolStringArray"> + <return type="PackedStringArray"> </return> <description> Returns the list of resources inside the preloader. @@ -40,7 +40,7 @@ <method name="has_resource" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <description> Returns [code]true[/code] if the preloader contains a resource associated to [code]name[/code]. @@ -49,7 +49,7 @@ <method name="remove_resource"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <description> Removes the resource associated to [code]name[/code] from the preloader. @@ -58,9 +58,9 @@ <method name="rename_resource"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="newname" type="String"> + <argument index="1" name="newname" type="StringName"> </argument> <description> Renames a resource inside the preloader from [code]name[/code] to [code]newname[/code]. diff --git a/doc/classes/ResourceSaver.xml b/doc/classes/ResourceSaver.xml index 8c27b951f5..ecde5754f9 100644 --- a/doc/classes/ResourceSaver.xml +++ b/doc/classes/ResourceSaver.xml @@ -11,7 +11,7 @@ </tutorials> <methods> <method name="get_recognized_extensions"> - <return type="PoolStringArray"> + <return type="PackedStringArray"> </return> <argument index="0" name="type" type="Resource"> </argument> diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml index 983f768b85..5f07133a27 100644 --- a/doc/classes/RichTextLabel.xml +++ b/doc/classes/RichTextLabel.xml @@ -113,7 +113,7 @@ <method name="parse_expressions_for_values"> <return type="Dictionary"> </return> - <argument index="0" name="expressions" type="PoolStringArray"> + <argument index="0" name="expressions" type="PackedStringArray"> </argument> <description> Parses BBCode parameter [code]expressions[/code] into a dictionary. diff --git a/doc/classes/SceneState.xml b/doc/classes/SceneState.xml index 7304e03bf6..abc429d5fe 100644 --- a/doc/classes/SceneState.xml +++ b/doc/classes/SceneState.xml @@ -37,7 +37,7 @@ </description> </method> <method name="get_connection_method" qualifiers="const"> - <return type="String"> + <return type="StringName"> </return> <argument index="0" name="idx" type="int"> </argument> @@ -46,7 +46,7 @@ </description> </method> <method name="get_connection_signal" qualifiers="const"> - <return type="String"> + <return type="StringName"> </return> <argument index="0" name="idx" type="int"> </argument> @@ -81,7 +81,7 @@ </description> </method> <method name="get_node_groups" qualifiers="const"> - <return type="PoolStringArray"> + <return type="PackedStringArray"> </return> <argument index="0" name="idx" type="int"> </argument> @@ -117,7 +117,7 @@ </description> </method> <method name="get_node_name" qualifiers="const"> - <return type="String"> + <return type="StringName"> </return> <argument index="0" name="idx" type="int"> </argument> @@ -157,7 +157,7 @@ </description> </method> <method name="get_node_property_name" qualifiers="const"> - <return type="String"> + <return type="StringName"> </return> <argument index="0" name="idx" type="int"> </argument> @@ -179,7 +179,7 @@ </description> </method> <method name="get_node_type" qualifiers="const"> - <return type="String"> + <return type="StringName"> </return> <argument index="0" name="idx" type="int"> </argument> diff --git a/doc/classes/SceneTree.xml b/doc/classes/SceneTree.xml index 1499173d6b..e6778013cf 100644 --- a/doc/classes/SceneTree.xml +++ b/doc/classes/SceneTree.xml @@ -16,9 +16,9 @@ <method name="call_group" qualifiers="vararg"> <return type="Variant"> </return> - <argument index="0" name="group" type="String"> + <argument index="0" name="group" type="StringName"> </argument> - <argument index="1" name="method" type="String"> + <argument index="1" name="method" type="StringName"> </argument> <description> Calls [code]method[/code] on each member of the given group. @@ -29,9 +29,9 @@ </return> <argument index="0" name="flags" type="int"> </argument> - <argument index="1" name="group" type="String"> + <argument index="1" name="group" type="StringName"> </argument> - <argument index="2" name="method" type="String"> + <argument index="2" name="method" type="StringName"> </argument> <description> Calls [code]method[/code] on each member of the given group, respecting the given [enum GroupCallFlags]. @@ -83,7 +83,7 @@ </description> </method> <method name="get_network_connected_peers" qualifiers="const"> - <return type="PoolIntArray"> + <return type="PackedInt32Array"> </return> <description> Returns the peer IDs of all connected peers of this [SceneTree]'s [member network_peer]. @@ -106,7 +106,7 @@ <method name="get_nodes_in_group"> <return type="Array"> </return> - <argument index="0" name="group" type="String"> + <argument index="0" name="group" type="StringName"> </argument> <description> Returns a list of all nodes assigned to the given group. @@ -122,7 +122,7 @@ <method name="has_group" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <description> Returns [code]true[/code] if the given group exists. @@ -152,7 +152,7 @@ <method name="notify_group"> <return type="void"> </return> - <argument index="0" name="group" type="String"> + <argument index="0" name="group" type="StringName"> </argument> <argument index="1" name="notification" type="int"> </argument> @@ -165,7 +165,7 @@ </return> <argument index="0" name="call_flags" type="int"> </argument> - <argument index="1" name="group" type="String"> + <argument index="1" name="group" type="StringName"> </argument> <argument index="2" name="notification" type="int"> </argument> @@ -212,7 +212,7 @@ <method name="set_group"> <return type="void"> </return> - <argument index="0" name="group" type="String"> + <argument index="0" name="group" type="StringName"> </argument> <argument index="1" name="property" type="String"> </argument> @@ -227,7 +227,7 @@ </return> <argument index="0" name="call_flags" type="int"> </argument> - <argument index="1" name="group" type="String"> + <argument index="1" name="group" type="StringName"> </argument> <argument index="2" name="property" type="String"> </argument> @@ -320,7 +320,7 @@ </description> </signal> <signal name="files_dropped"> - <argument index="0" name="files" type="PoolStringArray"> + <argument index="0" name="files" type="PackedStringArray"> </argument> <argument index="1" name="screen" type="int"> </argument> diff --git a/doc/classes/Script.xml b/doc/classes/Script.xml index 0f07cb83f3..f671315620 100644 --- a/doc/classes/Script.xml +++ b/doc/classes/Script.xml @@ -26,7 +26,7 @@ </description> </method> <method name="get_instance_base_type" qualifiers="const"> - <return type="String"> + <return type="StringName"> </return> <description> Returns the script's base type. @@ -35,7 +35,7 @@ <method name="get_property_default_value"> <return type="Variant"> </return> - <argument index="0" name="property" type="String"> + <argument index="0" name="property" type="StringName"> </argument> <description> </description> @@ -67,7 +67,7 @@ <method name="has_script_signal" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="signal_name" type="String"> + <argument index="0" name="signal_name" type="StringName"> </argument> <description> Returns [code]true[/code] if the script, or a base class, defines a signal with the given name. diff --git a/doc/classes/ScrollContainer.xml b/doc/classes/ScrollContainer.xml index 0b113bebe5..9c5634f43a 100644 --- a/doc/classes/ScrollContainer.xml +++ b/doc/classes/ScrollContainer.xml @@ -4,7 +4,9 @@ A helper node for displaying scrollable elements such as lists. </brief_description> <description> - A ScrollContainer node meant to contain a [Control] child. ScrollContainers will automatically create a scrollbar child ([HScrollBar], [VScrollBar], or both) when needed and will only draw the Control within the ScrollContainer area. Scrollbars will automatically be drawn at the right (for vertical) or bottom (for horizontal) and will enable dragging to move the viewable Control (and its children) within the ScrollContainer. Scrollbars will also automatically resize the grabber based on the [member Control.rect_min_size] of the Control relative to the ScrollContainer. Works great with a [Panel] control. You can set [code]EXPAND[/code] on the children's size flags, so they will upscale to the ScrollContainer's size if it's larger (scroll is invisible for the chosen dimension). + A ScrollContainer node meant to contain a [Control] child. + ScrollContainers will automatically create a scrollbar child ([HScrollBar], [VScrollBar], or both) when needed and will only draw the Control within the ScrollContainer area. Scrollbars will automatically be drawn at the right (for vertical) or bottom (for horizontal) and will enable dragging to move the viewable Control (and its children) within the ScrollContainer. Scrollbars will also automatically resize the grabber based on the [member Control.rect_min_size] of the Control relative to the ScrollContainer. + Works great with a [Panel] control. You can set [code]EXPAND[/code] on the children's size flags, so they will upscale to the ScrollContainer's size if it's larger (scroll is invisible for the chosen dimension). </description> <tutorials> </tutorials> diff --git a/doc/classes/Shader.xml b/doc/classes/Shader.xml index a2fbf5a1b1..14c5d7a03c 100644 --- a/doc/classes/Shader.xml +++ b/doc/classes/Shader.xml @@ -14,7 +14,7 @@ <method name="get_default_texture_param" qualifiers="const"> <return type="Texture2D"> </return> - <argument index="0" name="param" type="String"> + <argument index="0" name="param" type="StringName"> </argument> <description> Returns the texture that is set as default for the specified parameter. @@ -31,7 +31,7 @@ <method name="has_param" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <description> Returns [code]true[/code] if the shader has this param defined as a uniform in its code. @@ -41,7 +41,7 @@ <method name="set_default_texture_param"> <return type="void"> </return> - <argument index="0" name="param" type="String"> + <argument index="0" name="param" type="StringName"> </argument> <argument index="1" name="texture" type="Texture2D"> </argument> diff --git a/doc/classes/ShaderMaterial.xml b/doc/classes/ShaderMaterial.xml index adb30c14d1..7e0e1ce831 100644 --- a/doc/classes/ShaderMaterial.xml +++ b/doc/classes/ShaderMaterial.xml @@ -13,7 +13,7 @@ <method name="get_shader_param" qualifiers="const"> <return type="Variant"> </return> - <argument index="0" name="param" type="String"> + <argument index="0" name="param" type="StringName"> </argument> <description> Returns the current value set for this material of a uniform in the shader. @@ -40,7 +40,7 @@ <method name="set_shader_param"> <return type="void"> </return> - <argument index="0" name="param" type="String"> + <argument index="0" name="param" type="StringName"> </argument> <argument index="1" name="value" type="Variant"> </argument> diff --git a/doc/classes/Signal.xml b/doc/classes/Signal.xml new file mode 100644 index 0000000000..ff428b887d --- /dev/null +++ b/doc/classes/Signal.xml @@ -0,0 +1,87 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="Signal" version="4.0"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <methods> + <method name="Signal"> + <return type="Signal"> + </return> + <argument index="0" name="object" type="Object"> + </argument> + <argument index="1" name="signal_name" type="StringName"> + </argument> + <description> + </description> + </method> + <method name="connect"> + <return type="int"> + </return> + <argument index="0" name="callable" type="Callable"> + </argument> + <argument index="1" name="binds" type="Array" default="[]"> + </argument> + <argument index="2" name="flags" type="int" default="0"> + </argument> + <description> + </description> + </method> + <method name="disconnect"> + <return type="void"> + </return> + <argument index="0" name="callable" type="Callable"> + </argument> + <description> + </description> + </method> + <method name="emit" qualifiers="vararg"> + <return type="void"> + </return> + <description> + </description> + </method> + <method name="get_connections"> + <return type="Array"> + </return> + <description> + </description> + </method> + <method name="get_name"> + <return type="StringName"> + </return> + <description> + </description> + </method> + <method name="get_object"> + <return type="Object"> + </return> + <description> + </description> + </method> + <method name="get_object_id"> + <return type="int"> + </return> + <description> + </description> + </method> + <method name="is_connected"> + <return type="bool"> + </return> + <argument index="0" name="callable" type="Callable"> + </argument> + <description> + </description> + </method> + <method name="is_null"> + <return type="bool"> + </return> + <description> + </description> + </method> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/SkeletonIK.xml b/doc/classes/SkeletonIK.xml index 0f07031708..1db78314d2 100644 --- a/doc/classes/SkeletonIK.xml +++ b/doc/classes/SkeletonIK.xml @@ -45,13 +45,13 @@ </member> <member name="override_tip_basis" type="bool" setter="set_override_tip_basis" getter="is_override_tip_basis" default="true"> </member> - <member name="root_bone" type="String" setter="set_root_bone" getter="get_root_bone" default=""""> + <member name="root_bone" type="StringName" setter="set_root_bone" getter="get_root_bone" default="@"""> </member> <member name="target" type="Transform" setter="set_target_transform" getter="get_target_transform" default="Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )"> </member> <member name="target_node" type="NodePath" setter="set_target_node" getter="get_target_node" default="NodePath("")"> </member> - <member name="tip_bone" type="String" setter="set_tip_bone" getter="get_tip_bone" default=""""> + <member name="tip_bone" type="StringName" setter="set_tip_bone" getter="get_tip_bone" default="@"""> </member> <member name="use_magnet" type="bool" setter="set_use_magnet" getter="is_using_magnet" default="false"> </member> diff --git a/doc/classes/Skin.xml b/doc/classes/Skin.xml index b65d9d8f98..e22feb42f0 100644 --- a/doc/classes/Skin.xml +++ b/doc/classes/Skin.xml @@ -37,6 +37,14 @@ <description> </description> </method> + <method name="get_bind_name" qualifiers="const"> + <return type="StringName"> + </return> + <argument index="0" name="bind_index" type="int"> + </argument> + <description> + </description> + </method> <method name="get_bind_pose" qualifiers="const"> <return type="Transform"> </return> @@ -63,6 +71,16 @@ <description> </description> </method> + <method name="set_bind_name"> + <return type="void"> + </return> + <argument index="0" name="bind_index" type="int"> + </argument> + <argument index="1" name="name" type="StringName"> + </argument> + <description> + </description> + </method> <method name="set_bind_pose"> <return type="void"> </return> diff --git a/doc/classes/SpriteFrames.xml b/doc/classes/SpriteFrames.xml index fe4b888a3c..9facdde681 100644 --- a/doc/classes/SpriteFrames.xml +++ b/doc/classes/SpriteFrames.xml @@ -12,7 +12,7 @@ <method name="add_animation"> <return type="void"> </return> - <argument index="0" name="anim" type="String"> + <argument index="0" name="anim" type="StringName"> </argument> <description> Adds a new animation to the library. @@ -21,7 +21,7 @@ <method name="add_frame"> <return type="void"> </return> - <argument index="0" name="anim" type="String"> + <argument index="0" name="anim" type="StringName"> </argument> <argument index="1" name="frame" type="Texture2D"> </argument> @@ -34,7 +34,7 @@ <method name="clear"> <return type="void"> </return> - <argument index="0" name="anim" type="String"> + <argument index="0" name="anim" type="StringName"> </argument> <description> Removes all frames from the given animation. @@ -50,14 +50,14 @@ <method name="get_animation_loop" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="anim" type="String"> + <argument index="0" name="anim" type="StringName"> </argument> <description> If [code]true[/code], the given animation will loop. </description> </method> <method name="get_animation_names" qualifiers="const"> - <return type="PoolStringArray"> + <return type="PackedStringArray"> </return> <description> Returns an array containing the names associated to each animation. Values are placed in alphabetical order. @@ -66,7 +66,7 @@ <method name="get_animation_speed" qualifiers="const"> <return type="float"> </return> - <argument index="0" name="anim" type="String"> + <argument index="0" name="anim" type="StringName"> </argument> <description> The animation's speed in frames per second. @@ -75,7 +75,7 @@ <method name="get_frame" qualifiers="const"> <return type="Texture2D"> </return> - <argument index="0" name="anim" type="String"> + <argument index="0" name="anim" type="StringName"> </argument> <argument index="1" name="idx" type="int"> </argument> @@ -86,7 +86,7 @@ <method name="get_frame_count" qualifiers="const"> <return type="int"> </return> - <argument index="0" name="anim" type="String"> + <argument index="0" name="anim" type="StringName"> </argument> <description> Returns the number of frames in the animation. @@ -95,7 +95,7 @@ <method name="has_animation" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="anim" type="String"> + <argument index="0" name="anim" type="StringName"> </argument> <description> If [code]true[/code], the named animation exists. @@ -104,7 +104,7 @@ <method name="remove_animation"> <return type="void"> </return> - <argument index="0" name="anim" type="String"> + <argument index="0" name="anim" type="StringName"> </argument> <description> Removes the given animation. @@ -113,7 +113,7 @@ <method name="remove_frame"> <return type="void"> </return> - <argument index="0" name="anim" type="String"> + <argument index="0" name="anim" type="StringName"> </argument> <argument index="1" name="idx" type="int"> </argument> @@ -124,9 +124,9 @@ <method name="rename_animation"> <return type="void"> </return> - <argument index="0" name="anim" type="String"> + <argument index="0" name="anim" type="StringName"> </argument> - <argument index="1" name="newname" type="String"> + <argument index="1" name="newname" type="StringName"> </argument> <description> Changes the animation's name to [code]newname[/code]. @@ -135,7 +135,7 @@ <method name="set_animation_loop"> <return type="void"> </return> - <argument index="0" name="anim" type="String"> + <argument index="0" name="anim" type="StringName"> </argument> <argument index="1" name="loop" type="bool"> </argument> @@ -146,7 +146,7 @@ <method name="set_animation_speed"> <return type="void"> </return> - <argument index="0" name="anim" type="String"> + <argument index="0" name="anim" type="StringName"> </argument> <argument index="1" name="speed" type="float"> </argument> @@ -157,7 +157,7 @@ <method name="set_frame"> <return type="void"> </return> - <argument index="0" name="anim" type="String"> + <argument index="0" name="anim" type="StringName"> </argument> <argument index="1" name="idx" type="int"> </argument> diff --git a/doc/classes/StreamPeer.xml b/doc/classes/StreamPeer.xml index 31742199dd..a73d3c8212 100644 --- a/doc/classes/StreamPeer.xml +++ b/doc/classes/StreamPeer.xml @@ -171,7 +171,7 @@ <method name="put_data"> <return type="int" enum="Error"> </return> - <argument index="0" name="data" type="PoolByteArray"> + <argument index="0" name="data" type="PackedByteArray"> </argument> <description> Sends a chunk of data through the connection, blocking if necessary until the data is done sending. This function returns an [enum @GlobalScope.Error] code. @@ -198,7 +198,7 @@ <method name="put_partial_data"> <return type="Array"> </return> - <argument index="0" name="data" type="PoolByteArray"> + <argument index="0" name="data" type="PackedByteArray"> </argument> <description> Sends a chunk of data through the connection. If all the data could not be sent at once, only part of it will. This function returns two values, an [enum @GlobalScope.Error] code and an integer, describing how much data was actually sent. diff --git a/doc/classes/StreamPeerBuffer.xml b/doc/classes/StreamPeerBuffer.xml index 23e3890fdb..41cef9fb55 100644 --- a/doc/classes/StreamPeerBuffer.xml +++ b/doc/classes/StreamPeerBuffer.xml @@ -49,7 +49,7 @@ </method> </methods> <members> - <member name="data_array" type="PoolByteArray" setter="set_data_array" getter="get_data_array" default="PoolByteArray( )"> + <member name="data_array" type="PackedByteArray" setter="set_data_array" getter="get_data_array" default="PackedByteArray( )"> </member> </members> <constants> diff --git a/doc/classes/String.xml b/doc/classes/String.xml index cb80d04f24..1a5182b76e 100644 --- a/doc/classes/String.xml +++ b/doc/classes/String.xml @@ -49,6 +49,15 @@ <method name="String"> <return type="String"> </return> + <argument index="0" name="from" type="Vector2i"> + </argument> + <description> + Constructs a new String from the given [Vector2i]. + </description> + </method> + <method name="String"> + <return type="String"> + </return> <argument index="0" name="from" type="Rect2"> </argument> <description> @@ -58,6 +67,15 @@ <method name="String"> <return type="String"> </return> + <argument index="0" name="from" type="Rect2i"> + </argument> + <description> + Constructs a new String from the given [Rect2i]. + </description> + </method> + <method name="String"> + <return type="String"> + </return> <argument index="0" name="from" type="Vector3"> </argument> <description> @@ -67,6 +85,15 @@ <method name="String"> <return type="String"> </return> + <argument index="0" name="from" type="Vector3i"> + </argument> + <description> + Constructs a new String from the given [Vector3i]. + </description> + </method> + <method name="String"> + <return type="String"> + </return> <argument index="0" name="from" type="Transform2D"> </argument> <description> @@ -130,6 +157,15 @@ <method name="String"> <return type="String"> </return> + <argument index="0" name="from" type="StringName"> + </argument> + <description> + Constructs a new String from the given [StringName]. + </description> + </method> + <method name="String"> + <return type="String"> + </return> <argument index="0" name="from" type="NodePath"> </argument> <description> @@ -148,6 +184,24 @@ <method name="String"> <return type="String"> </return> + <argument index="0" name="from" type="Callable"> + </argument> + <description> + Constructs a new String from the given [Callable]. + </description> + </method> + <method name="String"> + <return type="String"> + </return> + <argument index="0" name="from" type="Signal"> + </argument> + <description> + Constructs a new String from the given [Signal]. + </description> + </method> + <method name="String"> + <return type="String"> + </return> <argument index="0" name="from" type="Dictionary"> </argument> <description> @@ -166,64 +220,82 @@ <method name="String"> <return type="String"> </return> - <argument index="0" name="from" type="PoolByteArray"> + <argument index="0" name="from" type="PackedByteArray"> + </argument> + <description> + Constructs a new String from the given [PackedByteArray]. + </description> + </method> + <method name="String"> + <return type="String"> + </return> + <argument index="0" name="from" type="PackedInt32Array"> + </argument> + <description> + Constructs a new String from the given [PackedInt32Array]. + </description> + </method> + <method name="String"> + <return type="String"> + </return> + <argument index="0" name="from" type="PackedInt64Array"> </argument> <description> - Constructs a new String from the given [PoolByteArray]. + Constructs a new String from the given [PackedInt64Array]. </description> </method> <method name="String"> <return type="String"> </return> - <argument index="0" name="from" type="PoolIntArray"> + <argument index="0" name="from" type="PackedFloat32Array"> </argument> <description> - Constructs a new String from the given [PoolIntArray]. + Constructs a new String from the given [PackedFloat32Array]. </description> </method> <method name="String"> <return type="String"> </return> - <argument index="0" name="from" type="PoolRealArray"> + <argument index="0" name="from" type="PackedFloat64Array"> </argument> <description> - Constructs a new String from the given [PoolRealArray]. + Constructs a new String from the given [PackedFloat64Array]. </description> </method> <method name="String"> <return type="String"> </return> - <argument index="0" name="from" type="PoolStringArray"> + <argument index="0" name="from" type="PackedStringArray"> </argument> <description> - Constructs a new String from the given [PoolStringArray]. + Constructs a new String from the given [PackedStringArray]. </description> </method> <method name="String"> <return type="String"> </return> - <argument index="0" name="from" type="PoolVector2Array"> + <argument index="0" name="from" type="PackedVector2Array"> </argument> <description> - Constructs a new String from the given [PoolVector2Array]. + Constructs a new String from the given [PackedVector2Array]. </description> </method> <method name="String"> <return type="String"> </return> - <argument index="0" name="from" type="PoolVector3Array"> + <argument index="0" name="from" type="PackedVector3Array"> </argument> <description> - Constructs a new String from the given [PoolVector3Array]. + Constructs a new String from the given [PackedVector3Array]. </description> </method> <method name="String"> <return type="String"> </return> - <argument index="0" name="from" type="PoolColorArray"> + <argument index="0" name="from" type="PackedColorArray"> </argument> <description> - Constructs a new String from the given [PoolColorArray]. + Constructs a new String from the given [PackedColorArray]. </description> </method> <method name="begins_with"> @@ -236,7 +308,7 @@ </description> </method> <method name="bigrams"> - <return type="PoolStringArray"> + <return type="PackedStringArray"> </return> <description> Returns the bigrams (pairs of consecutive letters) of this string. @@ -322,6 +394,8 @@ </description> </method> <method name="erase"> + <return type="void"> + </return> <argument index="0" name="position" type="int"> </argument> <argument index="1" name="chars" type="int"> @@ -597,7 +671,7 @@ </description> </method> <method name="md5_buffer"> - <return type="PoolByteArray"> + <return type="PackedByteArray"> </return> <description> Returns the MD5 hash of the string as an array of bytes. @@ -732,7 +806,7 @@ </description> </method> <method name="rsplit"> - <return type="PoolStringArray"> + <return type="PackedStringArray"> </return> <argument index="0" name="delimiter" type="String"> </argument> @@ -764,7 +838,7 @@ </description> </method> <method name="sha1_buffer"> - <return type="PoolByteArray"> + <return type="PackedByteArray"> </return> <description> Returns the SHA-1 hash of the string as an array of bytes. @@ -778,7 +852,7 @@ </description> </method> <method name="sha256_buffer"> - <return type="PoolByteArray"> + <return type="PackedByteArray"> </return> <description> Returns the SHA-256 hash of the string as an array of bytes. @@ -801,7 +875,7 @@ </description> </method> <method name="split"> - <return type="PoolStringArray"> + <return type="PackedStringArray"> </return> <argument index="0" name="delimiter" type="String"> </argument> @@ -823,7 +897,7 @@ </description> </method> <method name="split_floats"> - <return type="PoolRealArray"> + <return type="PackedFloat32Array"> </return> <argument index="0" name="delimiter" type="String"> </argument> @@ -864,10 +938,10 @@ </description> </method> <method name="to_ascii"> - <return type="PoolByteArray"> + <return type="PackedByteArray"> </return> <description> - Converts the String (which is a character array) to [PoolByteArray] (which is an array of bytes). The conversion is faster compared to [method to_utf8], as this method assumes that all the characters in the String are ASCII characters. + Converts the String (which is a character array) to [PackedByteArray] (which is an array of bytes). The conversion is faster compared to [method to_utf8], as this method assumes that all the characters in the String are ASCII characters. </description> </method> <method name="to_float"> @@ -899,10 +973,10 @@ </description> </method> <method name="to_utf8"> - <return type="PoolByteArray"> + <return type="PackedByteArray"> </return> <description> - Converts the String (which is an array of characters) to [PoolByteArray] (which is an array of bytes). The conversion is a bit slower than [method to_ascii], but supports all UTF-8 characters. Therefore, you should prefer this function over [method to_ascii]. + Converts the String (which is an array of characters) to [PackedByteArray] (which is an array of bytes). The conversion is a bit slower than [method to_ascii], but supports all UTF-8 characters. Therefore, you should prefer this function over [method to_ascii]. </description> </method> <method name="trim_prefix"> diff --git a/doc/classes/StringName.xml b/doc/classes/StringName.xml new file mode 100644 index 0000000000..f323a4bb6a --- /dev/null +++ b/doc/classes/StringName.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="StringName" version="4.0"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <methods> + <method name="StringName"> + <return type="StringName"> + </return> + <argument index="0" name="from" type="String"> + </argument> + <description> + </description> + </method> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/SurfaceTool.xml b/doc/classes/SurfaceTool.xml index 23363fcad5..4304a8df5e 100644 --- a/doc/classes/SurfaceTool.xml +++ b/doc/classes/SurfaceTool.xml @@ -22,7 +22,7 @@ <method name="add_bones"> <return type="void"> </return> - <argument index="0" name="bones" type="PoolIntArray"> + <argument index="0" name="bones" type="PackedInt32Array"> </argument> <description> Adds an array of bones for the next vertex to use. [code]bones[/code] must contain 4 integers. @@ -76,15 +76,15 @@ <method name="add_triangle_fan"> <return type="void"> </return> - <argument index="0" name="vertices" type="PoolVector3Array"> + <argument index="0" name="vertices" type="PackedVector3Array"> </argument> - <argument index="1" name="uvs" type="PoolVector2Array" default="PoolVector2Array( )"> + <argument index="1" name="uvs" type="PackedVector2Array" default="PackedVector2Array( )"> </argument> - <argument index="2" name="colors" type="PoolColorArray" default="PoolColorArray( )"> + <argument index="2" name="colors" type="PackedColorArray" default="PackedColorArray( )"> </argument> - <argument index="3" name="uv2s" type="PoolVector2Array" default="PoolVector2Array( )"> + <argument index="3" name="uv2s" type="PackedVector2Array" default="PackedVector2Array( )"> </argument> - <argument index="4" name="normals" type="PoolVector3Array" default="PoolVector3Array( )"> + <argument index="4" name="normals" type="PackedVector3Array" default="PackedVector3Array( )"> </argument> <argument index="5" name="tangents" type="Array" default="[ ]"> </argument> @@ -123,7 +123,7 @@ <method name="add_weights"> <return type="void"> </return> - <argument index="0" name="weights" type="PoolRealArray"> + <argument index="0" name="weights" type="PackedFloat32Array"> </argument> <description> Specifies weight values for next vertex to use. [code]weights[/code] must contain 4 values. diff --git a/doc/classes/TabContainer.xml b/doc/classes/TabContainer.xml index 73b5afe6a7..3c4fd4c41a 100644 --- a/doc/classes/TabContainer.xml +++ b/doc/classes/TabContainer.xml @@ -204,10 +204,6 @@ </theme_item> <theme_item name="increment_highlight" type="Texture2D"> </theme_item> - <theme_item name="label_valign_bg" type="int" default="2"> - </theme_item> - <theme_item name="label_valign_fg" type="int" default="0"> - </theme_item> <theme_item name="menu" type="Texture2D"> </theme_item> <theme_item name="menu_highlight" type="Texture2D"> @@ -222,7 +218,5 @@ </theme_item> <theme_item name="tab_fg" type="StyleBox"> </theme_item> - <theme_item name="top_margin" type="int" default="24"> - </theme_item> </theme_items> </class> diff --git a/doc/classes/Tabs.xml b/doc/classes/Tabs.xml index 266a733f8f..8f31b24131 100644 --- a/doc/classes/Tabs.xml +++ b/doc/classes/Tabs.xml @@ -285,10 +285,6 @@ </theme_item> <theme_item name="increment_highlight" type="Texture2D"> </theme_item> - <theme_item name="label_valign_bg" type="int" default="2"> - </theme_item> - <theme_item name="label_valign_fg" type="int" default="0"> - </theme_item> <theme_item name="panel" type="StyleBox"> </theme_item> <theme_item name="tab_bg" type="StyleBox"> @@ -297,7 +293,5 @@ </theme_item> <theme_item name="tab_fg" type="StyleBox"> </theme_item> - <theme_item name="top_margin" type="int" default="24"> - </theme_item> </theme_items> </class> diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml index c4a05db3a7..d4eeb574eb 100644 --- a/doc/classes/TextEdit.xml +++ b/doc/classes/TextEdit.xml @@ -299,7 +299,7 @@ </description> </method> <method name="search" qualifiers="const"> - <return type="PoolIntArray"> + <return type="PackedInt32Array"> </return> <argument index="0" name="key" type="String"> </argument> @@ -311,7 +311,7 @@ </argument> <description> Perform a search inside the text. Search flags can be specified in the [enum SearchFlags] enum. - Returns an empty [code]PoolIntArray[/code] if no result was found. Otherwise, the result line and column can be accessed at indices specified in the [enum SearchResult] enum, e.g: + Returns an empty [code]PackedInt32Array[/code] if no result was found. Otherwise, the result line and column can be accessed at indices specified in the [enum SearchResult] enum, e.g: [codeblock] var result = search(key, flags, line, column) if result.size() > 0: diff --git a/doc/classes/Texture2D.xml b/doc/classes/Texture2D.xml index 2ccb469eb1..63cdb0d90a 100644 --- a/doc/classes/Texture2D.xml +++ b/doc/classes/Texture2D.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Texture2D" inherits="Resource" version="4.0"> +<class name="Texture2D" inherits="Texture" version="4.0"> <brief_description> Texture for 2D and 3D. </brief_description> diff --git a/doc/classes/TextureLayered.xml b/doc/classes/TextureLayered.xml index f9ecdb02f0..66e5b69ab4 100644 --- a/doc/classes/TextureLayered.xml +++ b/doc/classes/TextureLayered.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="TextureLayered" inherits="Resource" version="4.0"> +<class name="TextureLayered" inherits="Texture" version="4.0"> <brief_description> Base class for 3D texture types. </brief_description> diff --git a/doc/classes/Theme.xml b/doc/classes/Theme.xml index d11cfc7aa2..70a4eda867 100644 --- a/doc/classes/Theme.xml +++ b/doc/classes/Theme.xml @@ -21,9 +21,9 @@ <method name="clear_color"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="String"> + <argument index="1" name="type" type="StringName"> </argument> <description> Clears the [Color] at [code]name[/code] if the theme has [code]type[/code]. @@ -32,9 +32,9 @@ <method name="clear_constant"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="String"> + <argument index="1" name="type" type="StringName"> </argument> <description> Clears the constant at [code]name[/code] if the theme has [code]type[/code]. @@ -43,9 +43,9 @@ <method name="clear_font"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="String"> + <argument index="1" name="type" type="StringName"> </argument> <description> Clears the [Font] at [code]name[/code] if the theme has [code]type[/code]. @@ -54,9 +54,9 @@ <method name="clear_icon"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="String"> + <argument index="1" name="type" type="StringName"> </argument> <description> Clears the icon at [code]name[/code] if the theme has [code]type[/code]. @@ -65,9 +65,9 @@ <method name="clear_stylebox"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="String"> + <argument index="1" name="type" type="StringName"> </argument> <description> Clears [StyleBox] at [code]name[/code] if the theme has [code]type[/code]. @@ -92,125 +92,125 @@ <method name="get_color" qualifiers="const"> <return type="Color"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="String"> + <argument index="1" name="type" type="StringName"> </argument> <description> Returns the [Color] at [code]name[/code] if the theme has [code]type[/code]. </description> </method> <method name="get_color_list" qualifiers="const"> - <return type="PoolStringArray"> + <return type="PackedStringArray"> </return> <argument index="0" name="type" type="String"> </argument> <description> - Returns all the [Color]s as a [PoolStringArray] filled with each [Color]'s name, for use in [method get_color], if the theme has [code]type[/code]. + Returns all the [Color]s as a [PackedStringArray] filled with each [Color]'s name, for use in [method get_color], if the theme has [code]type[/code]. </description> </method> <method name="get_constant" qualifiers="const"> <return type="int"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="String"> + <argument index="1" name="type" type="StringName"> </argument> <description> Returns the constant at [code]name[/code] if the theme has [code]type[/code]. </description> </method> <method name="get_constant_list" qualifiers="const"> - <return type="PoolStringArray"> + <return type="PackedStringArray"> </return> <argument index="0" name="type" type="String"> </argument> <description> - Returns all the constants as a [PoolStringArray] filled with each constant's name, for use in [method get_constant], if the theme has [code]type[/code]. + Returns all the constants as a [PackedStringArray] filled with each constant's name, for use in [method get_constant], if the theme has [code]type[/code]. </description> </method> <method name="get_font" qualifiers="const"> <return type="Font"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="String"> + <argument index="1" name="type" type="StringName"> </argument> <description> Returns the [Font] at [code]name[/code] if the theme has [code]type[/code]. </description> </method> <method name="get_font_list" qualifiers="const"> - <return type="PoolStringArray"> + <return type="PackedStringArray"> </return> <argument index="0" name="type" type="String"> </argument> <description> - Returns all the [Font]s as a [PoolStringArray] filled with each [Font]'s name, for use in [method get_font], if the theme has [code]type[/code]. + Returns all the [Font]s as a [PackedStringArray] filled with each [Font]'s name, for use in [method get_font], if the theme has [code]type[/code]. </description> </method> <method name="get_icon" qualifiers="const"> <return type="Texture2D"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="String"> + <argument index="1" name="type" type="StringName"> </argument> <description> Returns the icon [Texture2D] at [code]name[/code] if the theme has [code]type[/code]. </description> </method> <method name="get_icon_list" qualifiers="const"> - <return type="PoolStringArray"> + <return type="PackedStringArray"> </return> <argument index="0" name="type" type="String"> </argument> <description> - Returns all the icons as a [PoolStringArray] filled with each [Texture2D]'s name, for use in [method get_icon], if the theme has [code]type[/code]. + Returns all the icons as a [PackedStringArray] filled with each [Texture2D]'s name, for use in [method get_icon], if the theme has [code]type[/code]. </description> </method> <method name="get_stylebox" qualifiers="const"> <return type="StyleBox"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="String"> + <argument index="1" name="type" type="StringName"> </argument> <description> Returns the icon [StyleBox] at [code]name[/code] if the theme has [code]type[/code]. </description> </method> <method name="get_stylebox_list" qualifiers="const"> - <return type="PoolStringArray"> + <return type="PackedStringArray"> </return> <argument index="0" name="type" type="String"> </argument> <description> - Returns all the [StyleBox]s as a [PoolStringArray] filled with each [StyleBox]'s name, for use in [method get_stylebox], if the theme has [code]type[/code]. + Returns all the [StyleBox]s as a [PackedStringArray] filled with each [StyleBox]'s name, for use in [method get_stylebox], if the theme has [code]type[/code]. </description> </method> <method name="get_stylebox_types" qualifiers="const"> - <return type="PoolStringArray"> + <return type="PackedStringArray"> </return> <description> - Returns all the [StyleBox] types as a [PoolStringArray] filled with each [StyleBox]'s type, for use in [method get_stylebox] and/or [method get_stylebox_list], if the theme has [code]type[/code]. + Returns all the [StyleBox] types as a [PackedStringArray] filled with each [StyleBox]'s type, for use in [method get_stylebox] and/or [method get_stylebox_list], if the theme has [code]type[/code]. </description> </method> <method name="get_type_list" qualifiers="const"> - <return type="PoolStringArray"> + <return type="PackedStringArray"> </return> <argument index="0" name="type" type="String"> </argument> <description> - Returns all the types in [code]type[/code] as a [PoolStringArray] for use in any of the [code]get_*[/code] functions, if the theme has [code]type[/code]. + Returns all the types in [code]type[/code] as a [PackedStringArray] for use in any of the [code]get_*[/code] functions, if the theme has [code]type[/code]. </description> </method> <method name="has_color" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="String"> + <argument index="1" name="type" type="StringName"> </argument> <description> Returns [code]true[/code] if [Color] with [code]name[/code] is in [code]type[/code]. @@ -220,9 +220,9 @@ <method name="has_constant" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="String"> + <argument index="1" name="type" type="StringName"> </argument> <description> Returns [code]true[/code] if constant with [code]name[/code] is in [code]type[/code]. @@ -232,9 +232,9 @@ <method name="has_font" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="String"> + <argument index="1" name="type" type="StringName"> </argument> <description> Returns [code]true[/code] if [Font] with [code]name[/code] is in [code]type[/code]. @@ -244,9 +244,9 @@ <method name="has_icon" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="String"> + <argument index="1" name="type" type="StringName"> </argument> <description> Returns [code]true[/code] if icon [Texture2D] with [code]name[/code] is in [code]type[/code]. @@ -256,9 +256,9 @@ <method name="has_stylebox" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="String"> + <argument index="1" name="type" type="StringName"> </argument> <description> Returns [code]true[/code] if [StyleBox] with [code]name[/code] is in [code]type[/code]. @@ -268,9 +268,9 @@ <method name="set_color"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="String"> + <argument index="1" name="type" type="StringName"> </argument> <argument index="2" name="color" type="Color"> </argument> @@ -282,9 +282,9 @@ <method name="set_constant"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="String"> + <argument index="1" name="type" type="StringName"> </argument> <argument index="2" name="constant" type="int"> </argument> @@ -296,9 +296,9 @@ <method name="set_font"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="String"> + <argument index="1" name="type" type="StringName"> </argument> <argument index="2" name="font" type="Font"> </argument> @@ -310,9 +310,9 @@ <method name="set_icon"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="String"> + <argument index="1" name="type" type="StringName"> </argument> <argument index="2" name="texture" type="Texture2D"> </argument> @@ -324,9 +324,9 @@ <method name="set_stylebox"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="String"> + <argument index="1" name="type" type="StringName"> </argument> <argument index="2" name="texture" type="StyleBox"> </argument> diff --git a/doc/classes/Thread.xml b/doc/classes/Thread.xml index f616a9d9b1..3bb5797df5 100644 --- a/doc/classes/Thread.xml +++ b/doc/classes/Thread.xml @@ -29,7 +29,7 @@ </return> <argument index="0" name="instance" type="Object"> </argument> - <argument index="1" name="method" type="String"> + <argument index="1" name="method" type="StringName"> </argument> <argument index="2" name="userdata" type="Variant" default="null"> </argument> diff --git a/doc/classes/Transform.xml b/doc/classes/Transform.xml index e9d7208f66..72f9c5493a 100644 --- a/doc/classes/Transform.xml +++ b/doc/classes/Transform.xml @@ -149,21 +149,21 @@ </description> </method> <method name="xform"> - <return type="Variant"> + <return type="void"> </return> <argument index="0" name="v" type="Variant"> </argument> <description> - Transforms the given [Vector3], [Plane], [AABB], or [PoolVector3Array] by this transform. + Transforms the given [Vector3], [Plane], [AABB], or [PackedVector3Array] by this transform. </description> </method> <method name="xform_inv"> - <return type="Variant"> + <return type="void"> </return> <argument index="0" name="v" type="Variant"> </argument> <description> - Inverse-transforms the given [Vector3], [Plane], [AABB], or [PoolVector3Array] by this transform. + Inverse-transforms the given [Vector3], [Plane], [AABB], or [PackedVector3Array] by this transform. </description> </method> </methods> diff --git a/doc/classes/Transform2D.xml b/doc/classes/Transform2D.xml index 9719326f59..164efd4e5e 100644 --- a/doc/classes/Transform2D.xml +++ b/doc/classes/Transform2D.xml @@ -151,21 +151,21 @@ </description> </method> <method name="xform"> - <return type="Variant"> + <return type="void"> </return> <argument index="0" name="v" type="Variant"> </argument> <description> - Transforms the given [Vector2], [Rect2], or [PoolVector2Array] by this transform. + Transforms the given [Vector2], [Rect2], or [PackedVector2Array] by this transform. </description> </method> <method name="xform_inv"> - <return type="Variant"> + <return type="void"> </return> <argument index="0" name="v" type="Variant"> </argument> <description> - Inverse-transforms the given [Vector2], [Rect2], or [PoolVector2Array] by this transform. + Inverse-transforms the given [Vector2], [Rect2], or [PackedVector2Array] by this transform. </description> </method> </methods> diff --git a/doc/classes/Translation.xml b/doc/classes/Translation.xml index f80e59f6f9..11245195bf 100644 --- a/doc/classes/Translation.xml +++ b/doc/classes/Translation.xml @@ -14,9 +14,9 @@ <method name="add_message"> <return type="void"> </return> - <argument index="0" name="src_message" type="String"> + <argument index="0" name="src_message" type="StringName"> </argument> - <argument index="1" name="xlated_message" type="String"> + <argument index="1" name="xlated_message" type="StringName"> </argument> <description> Adds a message if nonexistent, followed by its translation. @@ -25,16 +25,16 @@ <method name="erase_message"> <return type="void"> </return> - <argument index="0" name="src_message" type="String"> + <argument index="0" name="src_message" type="StringName"> </argument> <description> Erases a message. </description> </method> <method name="get_message" qualifiers="const"> - <return type="String"> + <return type="StringName"> </return> - <argument index="0" name="src_message" type="String"> + <argument index="0" name="src_message" type="StringName"> </argument> <description> Returns a message's translation. @@ -48,7 +48,7 @@ </description> </method> <method name="get_message_list" qualifiers="const"> - <return type="PoolStringArray"> + <return type="PackedStringArray"> </return> <description> Returns all the messages (keys). diff --git a/doc/classes/TranslationServer.xml b/doc/classes/TranslationServer.xml index 8a2a8b9768..aaf7a4d160 100644 --- a/doc/classes/TranslationServer.xml +++ b/doc/classes/TranslationServer.xml @@ -69,9 +69,9 @@ </description> </method> <method name="translate" qualifiers="const"> - <return type="String"> + <return type="StringName"> </return> - <argument index="0" name="message" type="String"> + <argument index="0" name="message" type="StringName"> </argument> <description> Returns the current locale's translation for the given message (key). diff --git a/doc/classes/TreeItem.xml b/doc/classes/TreeItem.xml index e4d2af0c6e..f498919f9e 100644 --- a/doc/classes/TreeItem.xml +++ b/doc/classes/TreeItem.xml @@ -30,7 +30,7 @@ <method name="call_recursive" qualifiers="vararg"> <return type="Variant"> </return> - <argument index="0" name="method" type="String"> + <argument index="0" name="method" type="StringName"> </argument> <description> Calls the [code]method[/code] on the actual TreeItem and its children recursively. Pass parameters as a comma separated list. @@ -452,7 +452,7 @@ </argument> <argument index="1" name="object" type="Object"> </argument> - <argument index="2" name="callback" type="String"> + <argument index="2" name="callback" type="StringName"> </argument> <description> Sets the given column's custom draw callback to [code]callback[/code] method on [code]object[/code]. diff --git a/doc/classes/Tween.xml b/doc/classes/Tween.xml index e60dc07e99..342acaae96 100644 --- a/doc/classes/Tween.xml +++ b/doc/classes/Tween.xml @@ -25,13 +25,13 @@ </return> <argument index="0" name="object" type="Object"> </argument> - <argument index="1" name="method" type="String"> + <argument index="1" name="method" type="StringName"> </argument> <argument index="2" name="initial_val" type="Variant"> </argument> <argument index="3" name="target" type="Object"> </argument> - <argument index="4" name="target_method" type="String"> + <argument index="4" name="target_method" type="StringName"> </argument> <argument index="5" name="duration" type="float"> </argument> @@ -130,7 +130,7 @@ </return> <argument index="0" name="object" type="Object"> </argument> - <argument index="1" name="method" type="String"> + <argument index="1" name="method" type="StringName"> </argument> <argument index="2" name="initial_val" type="Variant"> </argument> @@ -186,7 +186,7 @@ </return> <argument index="0" name="object" type="Object"> </argument> - <argument index="1" name="key" type="String" default=""""> + <argument index="1" name="key" type="StringName" default=""""> </argument> <description> Stops animation and removes a tween, given its object and property/method pair. By default, all tweens are removed, unless [code]key[/code] is specified. @@ -204,7 +204,7 @@ </return> <argument index="0" name="object" type="Object"> </argument> - <argument index="1" name="key" type="String" default=""""> + <argument index="1" name="key" type="StringName" default=""""> </argument> <description> Resets a tween to its initial value (the one given, not the one before the tween), given its object and property/method pair. By default, all tweens are removed, unless [code]key[/code] is specified. @@ -222,7 +222,7 @@ </return> <argument index="0" name="object" type="Object"> </argument> - <argument index="1" name="key" type="String" default=""""> + <argument index="1" name="key" type="StringName" default=""""> </argument> <description> Continues animating a stopped tween, given its object and property/method pair. By default, all tweens are resumed, unless [code]key[/code] is specified. @@ -265,7 +265,7 @@ </return> <argument index="0" name="object" type="Object"> </argument> - <argument index="1" name="key" type="String" default=""""> + <argument index="1" name="key" type="StringName" default=""""> </argument> <description> Stops a tween, given its object and property/method pair. By default, all tweens are stopped, unless [code]key[/code] is specified. @@ -283,11 +283,11 @@ </return> <argument index="0" name="object" type="Object"> </argument> - <argument index="1" name="method" type="String"> + <argument index="1" name="method" type="StringName"> </argument> <argument index="2" name="initial" type="Object"> </argument> - <argument index="3" name="initial_method" type="String"> + <argument index="3" name="initial_method" type="StringName"> </argument> <argument index="4" name="final_val" type="Variant"> </argument> diff --git a/doc/classes/UDPServer.xml b/doc/classes/UDPServer.xml new file mode 100644 index 0000000000..f3c865c392 --- /dev/null +++ b/doc/classes/UDPServer.xml @@ -0,0 +1,98 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="UDPServer" inherits="Reference" version="4.0"> + <brief_description> + Helper class to implement a UDP server. + </brief_description> + <description> + A simple server that opens a UDP socket and returns connected [PacketPeerUDP] upon receiving new packets. See also [method PacketPeerUDP.connect_to_host]. + Below a small example of how it can be used: + [codeblock] + # server.gd + extends Node + + var server := UDPServer.new() + var peers = [] + + func _ready(): + server.listen(4242) + + func _process(delta): + if server.is_connection_available(): + var peer : PacketPeerUDP = server.take_connection() + var pkt = peer.get_packet() + print("Accepted peer: %s:%s" % [peer.get_packet_ip(), peer.get_packet_port()]) + print("Received data: %s" % [pkt.get_string_from_utf8()]) + # Reply so it knows we received the message. + peer.put_packet(pkt) + # Keep a reference so we can keep contacting the remote peer. + peers.append(peer) + + for i in range(0, peers.size()): + pass # Do something with the connected peers. + + [/codeblock] + [codeblock] + # client.gd + extends Node + + var udp := PacketPeerUDP.new() + var connected = false + + func _ready(): + udp.connect_to_host("127.0.0.1", 4242) + + func _process(delta): + if !connected: + # Try to contact server + udp.put_packet("The answer is... 42!".to_utf8()) + if udp.get_available_packet_count() > 0: + print("Connected: %s" % udp.get_packet().get_string_from_utf8()) + connected = true + [/codeblock] + </description> + <tutorials> + </tutorials> + <methods> + <method name="is_connection_available" qualifiers="const"> + <return type="bool"> + </return> + <description> + Returns [code]true[/code] if a packet with a new address/port combination is received on the socket. + </description> + </method> + <method name="is_listening" qualifiers="const"> + <return type="bool"> + </return> + <description> + Returns [code]true[/code] if the socket is open and listening on a port. + </description> + </method> + <method name="listen"> + <return type="int" enum="Error"> + </return> + <argument index="0" name="port" type="int"> + </argument> + <argument index="1" name="bind_address" type="String" default=""*""> + </argument> + <description> + Starts the server by opening a UDP socket listening on the given port. You can optionally specify a [code]bind_address[/code] to only listen for packets sent to that address. See also [method PacketPeerUDP.listen]. + </description> + </method> + <method name="stop"> + <return type="void"> + </return> + <description> + Stops the server, closing the UDP socket if open. Will not disconnect any connected [PacketPeerUDP]. + </description> + </method> + <method name="take_connection"> + <return type="PacketPeerUDP"> + </return> + <description> + Returns a [PacketPeerUDP] connected to the address/port combination of the first packet in queue. Will return [code]null[/code] if no packet is in queue. See also [method PacketPeerUDP.connect_to_host]. + </description> + </method> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/UndoRedo.xml b/doc/classes/UndoRedo.xml index 06fcb1ca03..766ebf7e32 100644 --- a/doc/classes/UndoRedo.xml +++ b/doc/classes/UndoRedo.xml @@ -36,7 +36,7 @@ </return> <argument index="0" name="object" type="Object"> </argument> - <argument index="1" name="method" type="String"> + <argument index="1" name="method" type="StringName"> </argument> <description> Register a method that will be called when the action is committed. @@ -47,7 +47,7 @@ </return> <argument index="0" name="object" type="Object"> </argument> - <argument index="1" name="property" type="String"> + <argument index="1" name="property" type="StringName"> </argument> <argument index="2" name="value" type="Variant"> </argument> @@ -69,7 +69,7 @@ </return> <argument index="0" name="object" type="Object"> </argument> - <argument index="1" name="method" type="String"> + <argument index="1" name="method" type="StringName"> </argument> <description> Register a method that will be called when the action is undone. @@ -80,7 +80,7 @@ </return> <argument index="0" name="object" type="Object"> </argument> - <argument index="1" name="property" type="String"> + <argument index="1" name="property" type="StringName"> </argument> <argument index="2" name="value" type="Variant"> </argument> diff --git a/doc/classes/Vector2.xml b/doc/classes/Vector2.xml index 4eef103d1f..7b02a1a4c9 100644 --- a/doc/classes/Vector2.xml +++ b/doc/classes/Vector2.xml @@ -1,10 +1,11 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="Vector2" version="4.0"> <brief_description> - Vector used for 2D math. + Vector used for 2D math using floating point coordinates. </brief_description> <description> 2-element structure that can be used to represent positions in 2D space or any other pair of numeric values. + It uses floating point coordinates. </description> <tutorials> <link>https://docs.godotengine.org/en/latest/tutorials/math/index.html</link> @@ -13,12 +14,21 @@ <method name="Vector2"> <return type="Vector2"> </return> + <argument index="0" name="from" type="Vector2i"> + </argument> + <description> + Constructs a new [Vector2] from [Vector2i]. + </description> + </method> + <method name="Vector2"> + <return type="Vector2"> + </return> <argument index="0" name="x" type="float"> </argument> <argument index="1" name="y" type="float"> </argument> <description> - Constructs a new Vector2 from the given [code]x[/code] and [code]y[/code]. + Constructs a new [Vector2] from the given [code]x[/code] and [code]y[/code]. </description> </method> <method name="abs"> diff --git a/doc/classes/Vector2i.xml b/doc/classes/Vector2i.xml new file mode 100644 index 0000000000..a516eb01dd --- /dev/null +++ b/doc/classes/Vector2i.xml @@ -0,0 +1,61 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="Vector2i" version="4.0"> + <brief_description> + Vector used for 2D math using integer coordinates. + </brief_description> + <description> + 2-element structure that can be used to represent positions in 2D space or any other pair of numeric values. + It uses integer coordinates. + </description> + <tutorials> + <link>https://docs.godotengine.org/en/latest/tutorials/math/index.html</link> + </tutorials> + <methods> + <method name="Vector2i"> + <return type="Vector2i"> + </return> + <argument index="0" name="x" type="int"> + </argument> + <argument index="1" name="y" type="int"> + </argument> + <description> + Constructs a new [Vector2i] from the given [code]x[/code] and [code]y[/code]. + </description> + </method> + <method name="Vector2i"> + <return type="Vector2i"> + </return> + <argument index="0" name="from" type="Vector2"> + </argument> + <description> + Constructs a new [Vector2i] from [Vector2]. The floating point coordinates will be truncated. + </description> + </method> + </methods> + <constants> + <constant name="AXIS_X" value="0"> + Enumerated value for the X axis. + </constant> + <constant name="AXIS_Y" value="1"> + Enumerated value for the Y axis. + </constant> + <constant name="ZERO" value="Vector2i( 0, 0 )"> + Zero vector. + </constant> + <constant name="ONE" value="Vector2i( 1, 1 )"> + One vector. + </constant> + <constant name="LEFT" value="Vector2i( -1, 0 )"> + Left unit vector. + </constant> + <constant name="RIGHT" value="Vector2i( 1, 0 )"> + Right unit vector. + </constant> + <constant name="UP" value="Vector2i( 0, -1 )"> + Up unit vector. + </constant> + <constant name="DOWN" value="Vector2i( 0, 1 )"> + Down unit vector. + </constant> + </constants> +</class> diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml index 7ae89cc450..600c03ba7d 100644 --- a/doc/classes/Vector3.xml +++ b/doc/classes/Vector3.xml @@ -1,10 +1,11 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="Vector3" version="4.0"> <brief_description> - Vector used for 3D math. + Vector used for 3D math using floating point coordinates. </brief_description> <description> 3-element structure that can be used to represent positions in 3D space or any other pair of numeric values. + It uses floating point coordinates. </description> <tutorials> <link>https://docs.godotengine.org/en/latest/tutorials/math/index.html</link> @@ -13,6 +14,15 @@ <method name="Vector3"> <return type="Vector3"> </return> + <argument index="0" name="from" type="Vector3i"> + </argument> + <description> + Constructs a new [Vector3] from [Vector3i]. + </description> + </method> + <method name="Vector3"> + <return type="Vector3"> + </return> <argument index="0" name="x" type="float"> </argument> <argument index="1" name="y" type="float"> @@ -20,7 +30,7 @@ <argument index="2" name="z" type="float"> </argument> <description> - Returns a Vector3 with the given components. + Returns a [Vector3] with the given components. </description> </method> <method name="abs"> diff --git a/doc/classes/Vector3i.xml b/doc/classes/Vector3i.xml new file mode 100644 index 0000000000..4f5a658b89 --- /dev/null +++ b/doc/classes/Vector3i.xml @@ -0,0 +1,72 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="Vector3i" version="4.0"> + <brief_description> + Vector used for 3D math using integer coordinates. + </brief_description> + <description> + 3-element structure that can be used to represent positions in 3D space or any other pair of numeric values. + It uses integer coordinates. + </description> + <tutorials> + <link>https://docs.godotengine.org/en/latest/tutorials/math/index.html</link> + </tutorials> + <methods> + <method name="Vector3i"> + <return type="Vector3i"> + </return> + <argument index="0" name="x" type="int"> + </argument> + <argument index="1" name="y" type="int"> + </argument> + <argument index="2" name="z" type="int"> + </argument> + <description> + Returns a [Vector3i] with the given components. + </description> + </method> + <method name="Vector3i"> + <return type="Vector3i"> + </return> + <argument index="0" name="from" type="Vector3"> + </argument> + <description> + Constructs a new [Vector3i] from [Vector3]. The floating point coordinates will be truncated. + </description> + </method> + </methods> + <constants> + <constant name="AXIS_X" value="0"> + Enumerated value for the X axis. + </constant> + <constant name="AXIS_Y" value="1"> + Enumerated value for the Y axis. + </constant> + <constant name="AXIS_Z" value="2"> + Enumerated value for the Z axis. + </constant> + <constant name="ZERO" value="Vector3i( 0, 0, 0 )"> + Zero vector. + </constant> + <constant name="ONE" value="Vector3i( 1, 1, 1 )"> + One vector. + </constant> + <constant name="LEFT" value="Vector3i( -1, 0, 0 )"> + Left unit vector. + </constant> + <constant name="RIGHT" value="Vector3i( 1, 0, 0 )"> + Right unit vector. + </constant> + <constant name="UP" value="Vector3i( 0, 1, 0 )"> + Up unit vector. + </constant> + <constant name="DOWN" value="Vector3i( 0, -1, 0 )"> + Down unit vector. + </constant> + <constant name="FORWARD" value="Vector3i( 0, 0, -1 )"> + Forward unit vector. + </constant> + <constant name="BACK" value="Vector3i( 0, 0, 1 )"> + Back unit vector. + </constant> + </constants> +</class> diff --git a/doc/classes/VideoPlayer.xml b/doc/classes/VideoPlayer.xml index d2b9af4580..91c8ad0a77 100644 --- a/doc/classes/VideoPlayer.xml +++ b/doc/classes/VideoPlayer.xml @@ -58,7 +58,7 @@ <member name="buffering_msec" type="int" setter="set_buffering_msec" getter="get_buffering_msec" default="500"> Amount of time in milliseconds to store in buffer while playing. </member> - <member name="bus" type="String" setter="set_bus" getter="get_bus" default=""Master""> + <member name="bus" type="StringName" setter="set_bus" getter="get_bus" default="@"Master""> Audio bus to use for sound playback. </member> <member name="expand" type="bool" setter="set_expand" getter="has_expand" default="true"> diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml index 076977c364..0632be28e1 100644 --- a/doc/classes/Viewport.xml +++ b/doc/classes/Viewport.xml @@ -425,7 +425,7 @@ </constant> <constant name="DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS" value="2" enum="DefaultCanvasItemTextureFilter"> </constant> - <constant name="DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIMPAMPS" value="3" enum="DefaultCanvasItemTextureFilter"> + <constant name="DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS" value="3" enum="DefaultCanvasItemTextureFilter"> </constant> <constant name="DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_MAX" value="4" enum="DefaultCanvasItemTextureFilter"> </constant> diff --git a/doc/classes/VisualServer.xml b/doc/classes/VisualServer.xml index 1634db2484..ca2058ddbb 100644 --- a/doc/classes/VisualServer.xml +++ b/doc/classes/VisualServer.xml @@ -540,7 +540,7 @@ </return> <argument index="0" name="occluder_polygon" type="RID"> </argument> - <argument index="1" name="shape" type="PoolVector2Array"> + <argument index="1" name="shape" type="PackedVector2Array"> </argument> <argument index="2" name="closed" type="bool"> </argument> @@ -553,7 +553,7 @@ </return> <argument index="0" name="occluder_polygon" type="RID"> </argument> - <argument index="1" name="shape" type="PoolVector2Array"> + <argument index="1" name="shape" type="PackedVector2Array"> </argument> <description> Sets the shape of the occluder polygon as lines. @@ -801,6 +801,30 @@ Sets the rotation of the background [Sky] expressed as a [Basis]. Equivalent to [member Environment.sky_rotation], where the rotation vector is used to construct the [Basis]. </description> </method> + <method name="environment_set_ssao"> + <return type="void"> + </return> + <argument index="0" name="env" type="RID"> + </argument> + <argument index="1" name="enable" type="bool"> + </argument> + <argument index="2" name="radius" type="float"> + </argument> + <argument index="3" name="intensity" type="float"> + </argument> + <argument index="4" name="bias" type="float"> + </argument> + <argument index="5" name="light_affect" type="float"> + </argument> + <argument index="6" name="ao_channel_affect" type="float"> + </argument> + <argument index="7" name="blur" type="int" enum="VisualServer.EnvironmentSSAOBlur"> + </argument> + <argument index="8" name="bilateral_sharpness" type="float"> + </argument> + <description> + </description> + </method> <method name="environment_set_ssr"> <return type="void"> </return> @@ -1540,7 +1564,7 @@ </description> </method> <method name="lightmap_capture_get_octree" qualifiers="const"> - <return type="PoolByteArray"> + <return type="PackedByteArray"> </return> <argument index="0" name="capture" type="RID"> </argument> @@ -1593,7 +1617,7 @@ </return> <argument index="0" name="capture" type="RID"> </argument> - <argument index="1" name="octree" type="PoolByteArray"> + <argument index="1" name="octree" type="PackedByteArray"> </argument> <description> Sets the octree to be used by this lightmap capture. @@ -1647,7 +1671,7 @@ </return> <argument index="0" name="material" type="RID"> </argument> - <argument index="1" name="parameter" type="String"> + <argument index="1" name="parameter" type="StringName"> </argument> <description> Returns the value of a certain material's parameter. @@ -1669,7 +1693,7 @@ </return> <argument index="0" name="material" type="RID"> </argument> - <argument index="1" name="parameter" type="String"> + <argument index="1" name="parameter" type="StringName"> </argument> <argument index="2" name="value" type="Variant"> </argument> @@ -1878,7 +1902,7 @@ </argument> <argument index="2" name="offset" type="int"> </argument> - <argument index="3" name="data" type="PoolByteArray"> + <argument index="3" name="data" type="PackedByteArray"> </argument> <description> Updates a specific region of a vertex buffer for the specified surface. Warning: this function alters the vertex buffer directly with no safety mechanisms, you can easily corrupt your mesh. @@ -1919,7 +1943,7 @@ </description> </method> <method name="multimesh_get_buffer" qualifiers="const"> - <return type="PoolRealArray"> + <return type="PackedFloat32Array"> </return> <argument index="0" name="multimesh" type="RID"> </argument> @@ -2054,7 +2078,7 @@ </return> <argument index="0" name="multimesh" type="RID"> </argument> - <argument index="1" name="buffer" type="PoolRealArray"> + <argument index="1" name="buffer" type="PackedFloat32Array"> </argument> <description> </description> @@ -2479,7 +2503,7 @@ </return> <argument index="0" name="where" type="Object"> </argument> - <argument index="1" name="method" type="String"> + <argument index="1" name="method" type="StringName"> </argument> <argument index="2" name="userdata" type="Variant"> </argument> @@ -2585,7 +2609,7 @@ </return> <argument index="0" name="shader" type="RID"> </argument> - <argument index="1" name="name" type="String"> + <argument index="1" name="name" type="StringName"> </argument> <description> Returns a default texture from a shader searched by name. @@ -2596,7 +2620,7 @@ </return> <argument index="0" name="material" type="RID"> </argument> - <argument index="1" name="parameter" type="String"> + <argument index="1" name="parameter" type="StringName"> </argument> <description> </description> @@ -2626,7 +2650,7 @@ </return> <argument index="0" name="shader" type="RID"> </argument> - <argument index="1" name="name" type="String"> + <argument index="1" name="name" type="StringName"> </argument> <argument index="2" name="texture" type="RID"> </argument> @@ -3497,15 +3521,6 @@ <constant name="ENV_TONE_MAPPER_ACES" value="3" enum="EnvironmentToneMapper"> Use the ACES tonemapper. </constant> - <constant name="ENV_SSAO_QUALITY_LOW" value="0" enum="EnvironmentSSAOQuality"> - Lowest quality of screen space ambient occlusion. - </constant> - <constant name="ENV_SSAO_QUALITY_MEDIUM" value="1" enum="EnvironmentSSAOQuality"> - Medium quality screen space ambient occlusion. - </constant> - <constant name="ENV_SSAO_QUALITY_HIGH" value="2" enum="EnvironmentSSAOQuality"> - Highest quality screen space ambient occlusion. - </constant> <constant name="ENV_SSAO_BLUR_DISABLED" value="0" enum="EnvironmentSSAOBlur"> Disables the blur set for SSAO. Will make SSAO look noisier. </constant> @@ -3518,6 +3533,15 @@ <constant name="ENV_SSAO_BLUR_3x3" value="3" enum="EnvironmentSSAOBlur"> Performs a 3x3 blur on the SSAO output. Use this for smoothest SSAO. </constant> + <constant name="ENV_SSAO_QUALITY_LOW" value="0" enum="EnvironmentSSAOQuality"> + Lowest quality of screen space ambient occlusion. + </constant> + <constant name="ENV_SSAO_QUALITY_MEDIUM" value="1" enum="EnvironmentSSAOQuality"> + Medium quality screen space ambient occlusion. + </constant> + <constant name="ENV_SSAO_QUALITY_HIGH" value="2" enum="EnvironmentSSAOQuality"> + Highest quality screen space ambient occlusion. + </constant> <constant name="ENV_SSAO_QUALITY_ULTRA" value="3" enum="EnvironmentSSAOQuality"> </constant> <constant name="DOF_BLUR_QUALITY_VERY_LOW" value="0" enum="DOFBlurQuality"> @@ -3617,11 +3641,11 @@ </constant> <constant name="CANVAS_ITEM_TEXTURE_FILTER_LINEAR" value="2" enum="CanvasItemTextureFilter"> </constant> - <constant name="CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIMPAMPS" value="3" enum="CanvasItemTextureFilter"> + <constant name="CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS" value="3" enum="CanvasItemTextureFilter"> </constant> <constant name="CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS" value="4" enum="CanvasItemTextureFilter"> </constant> - <constant name="CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIMPAMPS_ANISOTROPIC" value="5" enum="CanvasItemTextureFilter"> + <constant name="CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC" value="5" enum="CanvasItemTextureFilter"> </constant> <constant name="CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC" value="6" enum="CanvasItemTextureFilter"> </constant> diff --git a/doc/classes/VisualShader.xml b/doc/classes/VisualShader.xml index 44e843f8a5..27ba54cb68 100644 --- a/doc/classes/VisualShader.xml +++ b/doc/classes/VisualShader.xml @@ -107,7 +107,7 @@ </description> </method> <method name="get_node_list" qualifiers="const"> - <return type="PoolIntArray"> + <return type="PackedInt32Array"> </return> <argument index="0" name="type" type="int" enum="VisualShader.Type"> </argument> diff --git a/doc/classes/VisualShaderNode.xml b/doc/classes/VisualShaderNode.xml index d3227f421e..72ce743656 100644 --- a/doc/classes/VisualShaderNode.xml +++ b/doc/classes/VisualShaderNode.xml @@ -61,19 +61,22 @@ <constant name="PORT_TYPE_SCALAR" value="0" enum="PortType"> Floating-point scalar. Translated to [code]float[/code] type in shader code. </constant> - <constant name="PORT_TYPE_VECTOR" value="1" enum="PortType"> + <constant name="PORT_TYPE_SCALAR_INT" value="1" enum="PortType"> + Integer scalar. Translated to [code]int[/code] type in shader code. + </constant> + <constant name="PORT_TYPE_VECTOR" value="2" enum="PortType"> 3D vector of floating-point values. Translated to [code]vec3[/code] type in shader code. </constant> - <constant name="PORT_TYPE_BOOLEAN" value="2" enum="PortType"> + <constant name="PORT_TYPE_BOOLEAN" value="3" enum="PortType"> Boolean type. Translated to [code]bool[/code] type in shader code. </constant> - <constant name="PORT_TYPE_TRANSFORM" value="3" enum="PortType"> + <constant name="PORT_TYPE_TRANSFORM" value="4" enum="PortType"> Transform type. Translated to [code]mat4[/code] type in shader code. </constant> - <constant name="PORT_TYPE_SAMPLER" value="4" enum="PortType"> + <constant name="PORT_TYPE_SAMPLER" value="5" enum="PortType"> Sampler type. Translated to reference of sampler uniform in shader code. Can only be used for input ports in non-uniform nodes. </constant> - <constant name="PORT_TYPE_MAX" value="5" enum="PortType"> + <constant name="PORT_TYPE_MAX" value="6" enum="PortType"> Represents the size of the [enum PortType] enum. </constant> </constants> diff --git a/doc/classes/VisualShaderNodeCompare.xml b/doc/classes/VisualShaderNodeCompare.xml index f207cba0a5..32f7be3ec3 100644 --- a/doc/classes/VisualShaderNodeCompare.xml +++ b/doc/classes/VisualShaderNodeCompare.xml @@ -50,7 +50,7 @@ Comparison for less than ([code]a < b[/code]). Cannot be used if [member type] set to [constant CTYPE_BOOLEAN] or [constant CTYPE_TRANSFORM]. </constant> <constant name="FUNC_LESS_THAN_EQUAL" value="5" enum="Function"> - Comparison for less than or equal ([code]a < b[/code]). Cannot be used if [member type] set to [constant CTYPE_BOOLEAN] or [constant CTYPE_TRANSFORM]. + Comparison for less than or equal ([code]a <= b[/code]). Cannot be used if [member type] set to [constant CTYPE_BOOLEAN] or [constant CTYPE_TRANSFORM]. </constant> <constant name="COND_ALL" value="0" enum="Condition"> The result will be true if all of component in vector satisfy the comparison condition. diff --git a/doc/classes/VisualShaderNodeCustom.xml b/doc/classes/VisualShaderNodeCustom.xml index 0d1bcc754f..5bd8ec38ed 100644 --- a/doc/classes/VisualShaderNodeCustom.xml +++ b/doc/classes/VisualShaderNodeCustom.xml @@ -20,8 +20,8 @@ <return type="String"> </return> <description> - Override this method to define the category of the associated custom node in the Visual Shader Editor's members dialog. - Defining this method is [b]optional[/b]. If not overridden, the node will be filed under the "Custom" category. + Override this method to define the path to the associated custom node in the Visual Shader Editor's members dialog. The path may looks like [code]"MyGame/MyFunctions/Noise"[/code]. + Defining this method is [b]optional[/b]. If not overridden, the node will be filed under the "Addons" category. </description> </method> <method name="_get_code" qualifiers="virtual"> @@ -72,7 +72,7 @@ </description> </method> <method name="_get_input_port_name" qualifiers="virtual"> - <return type="String"> + <return type="StringName"> </return> <argument index="0" name="port" type="int"> </argument> @@ -108,7 +108,7 @@ </description> </method> <method name="_get_output_port_name" qualifiers="virtual"> - <return type="String"> + <return type="StringName"> </return> <argument index="0" name="port" type="int"> </argument> @@ -135,14 +135,6 @@ Defining this method is [b]optional[/b]. If not overridden, no return icon is shown. </description> </method> - <method name="_get_subcategory" qualifiers="virtual"> - <return type="String"> - </return> - <description> - Override this method to define the subcategory of the associated custom node in the Visual Shader Editor's members dialog. - Defining this method is [b]optional[/b]. If not overridden, the node will be filed under the root of the main category (see [method _get_category]). - </description> - </method> <method name="_is_highend" qualifiers="virtual"> <return type="bool"> </return> diff --git a/doc/classes/VisualShaderNodeScalarConstant.xml b/doc/classes/VisualShaderNodeFloatConstant.xml index f7b94d9e39..3ba9ff07d3 100644 --- a/doc/classes/VisualShaderNodeScalarConstant.xml +++ b/doc/classes/VisualShaderNodeFloatConstant.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeScalarConstant" inherits="VisualShaderNode" version="4.0"> +<class name="VisualShaderNodeFloatConstant" inherits="VisualShaderNode" version="4.0"> <brief_description> + A scalar floating-point constant to be used within the visual shader graph. </brief_description> <description> + Translated to [code]float[/code] in the shader language. </description> <tutorials> </tutorials> @@ -10,6 +12,7 @@ </methods> <members> <member name="constant" type="float" setter="set_constant" getter="get_constant" default="0.0"> + A floating-point constant which represents a state of this node. </member> </members> <constants> diff --git a/doc/classes/VisualShaderNodeFloatFunc.xml b/doc/classes/VisualShaderNodeFloatFunc.xml new file mode 100644 index 0000000000..bb7486e8cf --- /dev/null +++ b/doc/classes/VisualShaderNodeFloatFunc.xml @@ -0,0 +1,116 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="VisualShaderNodeFloatFunc" inherits="VisualShaderNode" version="4.0"> + <brief_description> + A scalar floating-point function to be used within the visual shader graph. + </brief_description> + <description> + Accept a floating-point scalar ([code]x[/code]) to the input port and transform it according to [member function]. + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <members> + <member name="function" type="int" setter="set_function" getter="get_function" enum="VisualShaderNodeFloatFunc.Function" default="13"> + A function to be applied to the scalar. See [enum Function] for options. + </member> + </members> + <constants> + <constant name="FUNC_SIN" value="0" enum="Function"> + Returns the sine of the parameter. Translates to [code]sin(x)[/code] in the Godot Shader Language. + </constant> + <constant name="FUNC_COS" value="1" enum="Function"> + Returns the cosine of the parameter. Translates to [code]cos(x)[/code] in the Godot Shader Language. + </constant> + <constant name="FUNC_TAN" value="2" enum="Function"> + Returns the tangent of the parameter. Translates to [code]tan(x)[/code] in the Godot Shader Language. + </constant> + <constant name="FUNC_ASIN" value="3" enum="Function"> + Returns the arc-sine of the parameter. Translates to [code]asin(x)[/code] in the Godot Shader Language. + </constant> + <constant name="FUNC_ACOS" value="4" enum="Function"> + Returns the arc-cosine of the parameter. Translates to [code]acos(x)[/code] in the Godot Shader Language. + </constant> + <constant name="FUNC_ATAN" value="5" enum="Function"> + Returns the arc-tangent of the parameter. Translates to [code]atan(x)[/code] in the Godot Shader Language. + </constant> + <constant name="FUNC_SINH" value="6" enum="Function"> + Returns the hyperbolic sine of the parameter. Translates to [code]sinh(x)[/code] in the Godot Shader Language. + </constant> + <constant name="FUNC_COSH" value="7" enum="Function"> + Returns the hyperbolic cosine of the parameter. Translates to [code]cosh(x)[/code] in the Godot Shader Language. + </constant> + <constant name="FUNC_TANH" value="8" enum="Function"> + Returns the hyperbolic tangent of the parameter. Translates to [code]tanh(x)[/code] in the Godot Shader Language. + </constant> + <constant name="FUNC_LOG" value="9" enum="Function"> + Returns the natural logarithm of the parameter. Translates to [code]log(x)[/code] in the Godot Shader Language. + </constant> + <constant name="FUNC_EXP" value="10" enum="Function"> + Returns the natural exponentiation of the parameter. Translates to [code]exp(x)[/code] in the Godot Shader Language. + </constant> + <constant name="FUNC_SQRT" value="11" enum="Function"> + Returns the square root of the parameter. Translates to [code]sqrt(x)[/code] in the Godot Shader Language. + </constant> + <constant name="FUNC_ABS" value="12" enum="Function"> + Returns the absolute value of the parameter. Translates to [code]abs(x)[/code] in the Godot Shader Language. + </constant> + <constant name="FUNC_SIGN" value="13" enum="Function"> + Extracts the sign of the parameter. Translates to [code]sign(x)[/code] in the Godot Shader Language. + </constant> + <constant name="FUNC_FLOOR" value="14" enum="Function"> + Finds the nearest integer less than or equal to the parameter. Translates to [code]floor(x)[/code] in the Godot Shader Language. + </constant> + <constant name="FUNC_ROUND" value="15" enum="Function"> + Finds the nearest integer to the parameter. Translates to [code]round(x)[/code] in the Godot Shader Language. + </constant> + <constant name="FUNC_CEIL" value="16" enum="Function"> + Finds the nearest integer that is greater than or equal to the parameter. Translates to [code]ceil(x)[/code] in the Godot Shader Language. + </constant> + <constant name="FUNC_FRAC" value="17" enum="Function"> + Computes the fractional part of the argument. Translates to [code]fract(x)[/code] in the Godot Shader Language. + </constant> + <constant name="FUNC_SATURATE" value="18" enum="Function"> + Clamps the value between [code]0.0[/code] and [code]1.0[/code] using [code]min(max(x, 0.0), 1.0)[/code]. + </constant> + <constant name="FUNC_NEGATE" value="19" enum="Function"> + Negates the [code]x[/code] using [code]-(x)[/code]. + </constant> + <constant name="FUNC_ACOSH" value="20" enum="Function"> + Returns the arc-hyperbolic-cosine of the parameter. Translates to [code]acosh(x)[/code] in the Godot Shader Language. + </constant> + <constant name="FUNC_ASINH" value="21" enum="Function"> + Returns the arc-hyperbolic-sine of the parameter. Translates to [code]asinh(x)[/code] in the Godot Shader Language. + </constant> + <constant name="FUNC_ATANH" value="22" enum="Function"> + Returns the arc-hyperbolic-tangent of the parameter. Translates to [code]atanh(x)[/code] in the Godot Shader Language. + </constant> + <constant name="FUNC_DEGREES" value="23" enum="Function"> + Convert a quantity in radians to degrees. Translates to [code]degrees(x)[/code] in the Godot Shader Language. + </constant> + <constant name="FUNC_EXP2" value="24" enum="Function"> + Returns 2 raised by the power of the parameter. Translates to [code]exp2(x)[/code] in the Godot Shader Language. + </constant> + <constant name="FUNC_INVERSE_SQRT" value="25" enum="Function"> + Returns the inverse of the square root of the parameter. Translates to [code]inversesqrt(x)[/code] in the Godot Shader Language. + </constant> + <constant name="FUNC_LOG2" value="26" enum="Function"> + Returns the base 2 logarithm of the parameter. Translates to [code]log2(x)[/code] in the Godot Shader Language. + </constant> + <constant name="FUNC_RADIANS" value="27" enum="Function"> + Convert a quantity in degrees to radians. Translates to [code]radians(x)[/code] in the Godot Shader Language. + </constant> + <constant name="FUNC_RECIPROCAL" value="28" enum="Function"> + Finds reciprocal value of dividing 1 by [code]x[/code] (i.e. [code]1 / x[/code]). + </constant> + <constant name="FUNC_ROUNDEVEN" value="29" enum="Function"> + Finds the nearest even integer to the parameter. Translates to [code]roundEven(x)[/code] in the Godot Shader Language. + </constant> + <constant name="FUNC_TRUNC" value="30" enum="Function"> + Returns a value equal to the nearest integer to [code]x[/code] whose absolute value is not larger than the absolute value of [code]x[/code]. Translates to [code]trunc(x)[/code] in the Godot Shader Language. + </constant> + <constant name="FUNC_ONEMINUS" value="31" enum="Function"> + Subtracts scalar [code]x[/code] from 1 (i.e. [code]1 - x[/code]). + </constant> + </constants> +</class> diff --git a/doc/classes/VisualShaderNodeFloatOp.xml b/doc/classes/VisualShaderNodeFloatOp.xml new file mode 100644 index 0000000000..2c9ebabb89 --- /dev/null +++ b/doc/classes/VisualShaderNodeFloatOp.xml @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="VisualShaderNodeFloatOp" inherits="VisualShaderNode" version="4.0"> + <brief_description> + A floating-point scalar operator to be used within the visual shader graph. + </brief_description> + <description> + Applies [member operator] to two floating-point inputs: [code]a[/code] and [code]b[/code]. + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <members> + <member name="operator" type="int" setter="set_operator" getter="get_operator" enum="VisualShaderNodeFloatOp.Operator" default="0"> + An operator to be applied to the inputs. See [enum Operator] for options. + </member> + </members> + <constants> + <constant name="OP_ADD" value="0" enum="Operator"> + Sums two numbers using [code]a + b[/code]. + </constant> + <constant name="OP_SUB" value="1" enum="Operator"> + Subtracts two numbers using [code]a - b[/code]. + </constant> + <constant name="OP_MUL" value="2" enum="Operator"> + Multiplies two numbers using [code]a * b[/code]. + </constant> + <constant name="OP_DIV" value="3" enum="Operator"> + Divides two numbers using [code]a / b[/code]. + </constant> + <constant name="OP_MOD" value="4" enum="Operator"> + Calculates the remainder of two numbers. Translates to [code]mod(a, b)[/code] in the Godot Shader Language. + </constant> + <constant name="OP_POW" value="5" enum="Operator"> + Raises the [code]a[/code] to the power of [code]b[/code]. Translates to [code]pow(a, b)[/code] in the Godot Shader Language. + </constant> + <constant name="OP_MAX" value="6" enum="Operator"> + Returns the greater of two numbers. Translates to [code]max(a, b)[/code] in the Godot Shader Language. + </constant> + <constant name="OP_MIN" value="7" enum="Operator"> + Returns the lesser of two numbers. Translates to [code]min(a, b)[/code] in the Godot Shader Language. + </constant> + <constant name="OP_ATAN2" value="8" enum="Operator"> + Returns the arc-tangent of the parameters. Translates to [code]atan(a, b)[/code] in the Godot Shader Language. + </constant> + <constant name="OP_STEP" value="9" enum="Operator"> + Generates a step function by comparing [code]b[/code](x) to [code]a[/code](edge). Returns 0.0 if [code]x[/code] is smaller than [code]edge[/code] and otherwise 1.0. Translates to [code]step(a, b)[/code] in the Godot Shader Language. + </constant> + </constants> +</class> diff --git a/doc/classes/VisualShaderNodeScalarUniform.xml b/doc/classes/VisualShaderNodeFloatUniform.xml index fab766d3f9..33ece8ac1b 100644 --- a/doc/classes/VisualShaderNodeScalarUniform.xml +++ b/doc/classes/VisualShaderNodeFloatUniform.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeScalarUniform" inherits="VisualShaderNodeUniform" version="4.0"> +<class name="VisualShaderNodeFloatUniform" inherits="VisualShaderNodeUniform" version="4.0"> <brief_description> - A scalar uniform to be used within the visual shader graph. + A scalar float uniform to be used within the visual shader graph. </brief_description> <description> Translated to [code]uniform float[/code] in the shader language. @@ -11,7 +11,7 @@ <methods> </methods> <members> - <member name="hint" type="int" setter="set_hint" getter="get_hint" enum="VisualShaderNodeScalarUniform.Hint" default="0"> + <member name="hint" type="int" setter="set_hint" getter="get_hint" enum="VisualShaderNodeFloatUniform.Hint" default="0"> A hint applied to the uniform, which controls the values it can take when set through the inspector. </member> <member name="max" type="float" setter="set_max" getter="get_max" default="1.0"> diff --git a/doc/classes/VisualShaderNodeIf.xml b/doc/classes/VisualShaderNodeIf.xml index 0a8fdcfd4d..1ebd945d42 100644 --- a/doc/classes/VisualShaderNodeIf.xml +++ b/doc/classes/VisualShaderNodeIf.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VisualShaderNodeIf" inherits="VisualShaderNode" version="4.0"> <brief_description> + Compares two floating-point numbers in order to return a required vector within the visual shader graph. </brief_description> <description> + First two ports are scalar floatin-point numbers to compare, third is tolerance comparsion amount and last three ports represents a vectors returned if [code]a == b[/code], [code]a > b[/code] and [code]a < b[/code] respectivly. </description> <tutorials> </tutorials> diff --git a/doc/classes/VisualShaderNodeInput.xml b/doc/classes/VisualShaderNodeInput.xml index 1c8d8d84c4..ed629508d0 100644 --- a/doc/classes/VisualShaderNodeInput.xml +++ b/doc/classes/VisualShaderNodeInput.xml @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VisualShaderNodeInput" inherits="VisualShaderNode" version="4.0"> <brief_description> + Represents the input shader parameter within the visual shader graph. </brief_description> <description> </description> @@ -11,16 +12,19 @@ <return type="String"> </return> <description> + Returns a translated name of the current constant in the Godot Shader Language. eg. [code]"ALBEDO"[/code] if the [member input_name] equal to [code]"albedo"[/code]. </description> </method> </methods> <members> <member name="input_name" type="String" setter="set_input_name" getter="get_input_name" default=""[None]""> + One of the several input constants in lower-case style like: "vertex"([/code]VERTEX[code]) or "point_size"([code]POINT_SIZE[/code]). </member> </members> <signals> <signal name="input_type_changed"> <description> + Emitted when input is changed via [member input_name]. </description> </signal> </signals> diff --git a/doc/classes/VisualShaderNodeIntConstant.xml b/doc/classes/VisualShaderNodeIntConstant.xml new file mode 100644 index 0000000000..1c407b21ca --- /dev/null +++ b/doc/classes/VisualShaderNodeIntConstant.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="VisualShaderNodeIntConstant" inherits="VisualShaderNode" version="4.0"> + <brief_description> + A scalar integer constant to be used within the visual shader graph. + </brief_description> + <description> + Translated to [code]int[/code] in the shader language. + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <members> + <member name="constant" type="int" setter="set_constant" getter="get_constant" default="0"> + An integer constant which represents a state of this node. + </member> + </members> + <constants> + </constants> +</class> diff --git a/doc/classes/VisualShaderNodeIntFunc.xml b/doc/classes/VisualShaderNodeIntFunc.xml new file mode 100644 index 0000000000..4b5d4ca8d2 --- /dev/null +++ b/doc/classes/VisualShaderNodeIntFunc.xml @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="VisualShaderNodeIntFunc" inherits="VisualShaderNode" version="4.0"> + <brief_description> + A scalar integer function to be used within the visual shader graph. + </brief_description> + <description> + Accept an integer scalar ([code]x[/code]) to the input port and transform it according to [member function]. + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <members> + <member name="function" type="int" setter="set_function" getter="get_function" enum="VisualShaderNodeIntFunc.Function" default="0"> + A function to be applied to the scalar. See [enum Function] for options. + </member> + </members> + <constants> + <constant name="FUNC_ABS" value="0" enum="Function"> + Returns the absolute value of the parameter. Translates to [code]abs(x)[/code] in the Godot Shader Language. + </constant> + <constant name="FUNC_CLAMP" value="1" enum="Function"> + Constrains a parameter between [code]min[/code] and [code]max[/code]. Translates to [code]clamp(x, min, max)[/code] in the Godot Shader Language. + </constant> + <constant name="FUNC_NEGATE" value="2" enum="Function"> + Negates the [code]x[/code] using [code]-(x)[/code]. + </constant> + <constant name="FUNC_SIGN" value="3" enum="Function"> + Extracts the sign of the parameter. Translates to [code]sign(x)[/code] in the Godot Shader Language. + </constant> + </constants> +</class> diff --git a/doc/classes/VisualShaderNodeIntOp.xml b/doc/classes/VisualShaderNodeIntOp.xml new file mode 100644 index 0000000000..fc9a0a9a0a --- /dev/null +++ b/doc/classes/VisualShaderNodeIntOp.xml @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="VisualShaderNodeIntOp" inherits="VisualShaderNode" version="4.0"> + <brief_description> + An integer scalar operator to be used within the visual shader graph. + </brief_description> + <description> + Applies [member operator] to two integer inputs: [code]a[/code] and [code]b[/code]. + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <members> + <member name="operator" type="int" setter="set_operator" getter="get_operator" enum="VisualShaderNodeIntOp.Operator" default="0"> + An operator to be applied to the inputs. See [enum Operator] for options. + </member> + </members> + <constants> + <constant name="OP_ADD" value="0" enum="Operator"> + Sums two numbers using [code]a + b[/code]. + </constant> + <constant name="OP_SUB" value="1" enum="Operator"> + Subtracts two numbers using [code]a - b[/code]. + </constant> + <constant name="OP_MUL" value="2" enum="Operator"> + Multiplies two numbers using [code]a * b[/code]. + </constant> + <constant name="OP_DIV" value="3" enum="Operator"> + Divides two numbers using [code]a / b[/code]. + </constant> + <constant name="OP_MOD" value="4" enum="Operator"> + Calculates the remainder of two numbers using [code]a % b[/code]. + </constant> + <constant name="OP_MAX" value="5" enum="Operator"> + Returns the greater of two numbers. Translates to [code]max(a, b)[/code] in the Godot Shader Language. + </constant> + <constant name="OP_MIN" value="6" enum="Operator"> + Returns the lesser of two numbers. Translates to [code]max(a, b)[/code] in the Godot Shader Language. + </constant> + </constants> +</class> diff --git a/doc/classes/VisualShaderNodeIntUniform.xml b/doc/classes/VisualShaderNodeIntUniform.xml new file mode 100644 index 0000000000..8c7c288177 --- /dev/null +++ b/doc/classes/VisualShaderNodeIntUniform.xml @@ -0,0 +1,38 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="VisualShaderNodeIntUniform" inherits="VisualShaderNodeUniform" version="4.0"> + <brief_description> + A scalar integer uniform to be used within the visual shader graph. + </brief_description> + <description> + Translated to [code]uniform int[/code] in the shader language. + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <members> + <member name="hint" type="int" setter="set_hint" getter="get_hint" enum="VisualShaderNodeIntUniform.Hint" default="0"> + A hint applied to the uniform, which controls the values it can take when set through the inspector. + </member> + <member name="max" type="int" setter="set_max" getter="get_max" default="100"> + Minimum value for range hints. Used if [member hint] is set to [constant HINT_RANGE] or [constant HINT_RANGE_STEP]. + </member> + <member name="min" type="int" setter="set_min" getter="get_min" default="0"> + Maximum value for range hints. Used if [member hint] is set to [constant HINT_RANGE] or [constant HINT_RANGE_STEP]. + </member> + <member name="step" type="int" setter="set_step" getter="get_step" default="1"> + Step (increment) value for the range hint with step. Used if [member hint] is set to [constant HINT_RANGE_STEP]. + </member> + </members> + <constants> + <constant name="HINT_NONE" value="0" enum="Hint"> + No hint used. + </constant> + <constant name="HINT_RANGE" value="1" enum="Hint"> + A range hint for scalar value, which limits possible input values between [member min] and [member max]. Translated to [code]hint_range(min, max)[/code] in shader code. + </constant> + <constant name="HINT_RANGE_STEP" value="2" enum="Hint"> + A range hint for scalar value with step, which limits possible input values between [member min] and [member max], with a step (increment) of [member step]). Translated to [code]hint_range(min, max, step)[/code] in shader code. + </constant> + </constants> +</class> diff --git a/doc/classes/VisualShaderNodeScalarFunc.xml b/doc/classes/VisualShaderNodeScalarFunc.xml deleted file mode 100644 index b306d198f6..0000000000 --- a/doc/classes/VisualShaderNodeScalarFunc.xml +++ /dev/null @@ -1,81 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeScalarFunc" inherits="VisualShaderNode" version="4.0"> - <brief_description> - </brief_description> - <description> - </description> - <tutorials> - </tutorials> - <methods> - </methods> - <members> - <member name="function" type="int" setter="set_function" getter="get_function" enum="VisualShaderNodeScalarFunc.Function" default="13"> - </member> - </members> - <constants> - <constant name="FUNC_SIN" value="0" enum="Function"> - </constant> - <constant name="FUNC_COS" value="1" enum="Function"> - </constant> - <constant name="FUNC_TAN" value="2" enum="Function"> - </constant> - <constant name="FUNC_ASIN" value="3" enum="Function"> - </constant> - <constant name="FUNC_ACOS" value="4" enum="Function"> - </constant> - <constant name="FUNC_ATAN" value="5" enum="Function"> - </constant> - <constant name="FUNC_SINH" value="6" enum="Function"> - </constant> - <constant name="FUNC_COSH" value="7" enum="Function"> - </constant> - <constant name="FUNC_TANH" value="8" enum="Function"> - </constant> - <constant name="FUNC_LOG" value="9" enum="Function"> - </constant> - <constant name="FUNC_EXP" value="10" enum="Function"> - </constant> - <constant name="FUNC_SQRT" value="11" enum="Function"> - </constant> - <constant name="FUNC_ABS" value="12" enum="Function"> - </constant> - <constant name="FUNC_SIGN" value="13" enum="Function"> - </constant> - <constant name="FUNC_FLOOR" value="14" enum="Function"> - </constant> - <constant name="FUNC_ROUND" value="15" enum="Function"> - </constant> - <constant name="FUNC_CEIL" value="16" enum="Function"> - </constant> - <constant name="FUNC_FRAC" value="17" enum="Function"> - </constant> - <constant name="FUNC_SATURATE" value="18" enum="Function"> - </constant> - <constant name="FUNC_NEGATE" value="19" enum="Function"> - </constant> - <constant name="FUNC_ACOSH" value="20" enum="Function"> - </constant> - <constant name="FUNC_ASINH" value="21" enum="Function"> - </constant> - <constant name="FUNC_ATANH" value="22" enum="Function"> - </constant> - <constant name="FUNC_DEGREES" value="23" enum="Function"> - </constant> - <constant name="FUNC_EXP2" value="24" enum="Function"> - </constant> - <constant name="FUNC_INVERSE_SQRT" value="25" enum="Function"> - </constant> - <constant name="FUNC_LOG2" value="26" enum="Function"> - </constant> - <constant name="FUNC_RADIANS" value="27" enum="Function"> - </constant> - <constant name="FUNC_RECIPROCAL" value="28" enum="Function"> - </constant> - <constant name="FUNC_ROUNDEVEN" value="29" enum="Function"> - </constant> - <constant name="FUNC_TRUNC" value="30" enum="Function"> - </constant> - <constant name="FUNC_ONEMINUS" value="31" enum="Function"> - </constant> - </constants> -</class> diff --git a/doc/classes/VisualShaderNodeScalarOp.xml b/doc/classes/VisualShaderNodeScalarOp.xml deleted file mode 100644 index f13f16cdd2..0000000000 --- a/doc/classes/VisualShaderNodeScalarOp.xml +++ /dev/null @@ -1,37 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeScalarOp" inherits="VisualShaderNode" version="4.0"> - <brief_description> - </brief_description> - <description> - </description> - <tutorials> - </tutorials> - <methods> - </methods> - <members> - <member name="operator" type="int" setter="set_operator" getter="get_operator" enum="VisualShaderNodeScalarOp.Operator" default="0"> - </member> - </members> - <constants> - <constant name="OP_ADD" value="0" enum="Operator"> - </constant> - <constant name="OP_SUB" value="1" enum="Operator"> - </constant> - <constant name="OP_MUL" value="2" enum="Operator"> - </constant> - <constant name="OP_DIV" value="3" enum="Operator"> - </constant> - <constant name="OP_MOD" value="4" enum="Operator"> - </constant> - <constant name="OP_POW" value="5" enum="Operator"> - </constant> - <constant name="OP_MAX" value="6" enum="Operator"> - </constant> - <constant name="OP_MIN" value="7" enum="Operator"> - </constant> - <constant name="OP_ATAN2" value="8" enum="Operator"> - </constant> - <constant name="OP_STEP" value="9" enum="Operator"> - </constant> - </constants> -</class> diff --git a/doc/classes/XMLParser.xml b/doc/classes/XMLParser.xml index 8140fde62d..2849ea62ab 100644 --- a/doc/classes/XMLParser.xml +++ b/doc/classes/XMLParser.xml @@ -115,7 +115,7 @@ <method name="open_buffer"> <return type="int" enum="Error"> </return> - <argument index="0" name="buffer" type="PoolByteArray"> + <argument index="0" name="buffer" type="PackedByteArray"> </argument> <description> Opens an XML raw buffer for parsing. This returns an error code. diff --git a/drivers/alsamidi/midi_driver_alsamidi.cpp b/drivers/alsamidi/midi_driver_alsamidi.cpp index 6121a44b36..670d7e0a4a 100644 --- a/drivers/alsamidi/midi_driver_alsamidi.cpp +++ b/drivers/alsamidi/midi_driver_alsamidi.cpp @@ -189,9 +189,9 @@ void MIDIDriverALSAMidi::unlock() const { mutex->unlock(); } -PoolStringArray MIDIDriverALSAMidi::get_connected_inputs() { +PackedStringArray MIDIDriverALSAMidi::get_connected_inputs() { - PoolStringArray list; + PackedStringArray list; lock(); for (int i = 0; i < connected_inputs.size(); i++) { diff --git a/drivers/alsamidi/midi_driver_alsamidi.h b/drivers/alsamidi/midi_driver_alsamidi.h index 354fcce147..9900d90553 100644 --- a/drivers/alsamidi/midi_driver_alsamidi.h +++ b/drivers/alsamidi/midi_driver_alsamidi.h @@ -59,7 +59,7 @@ public: virtual Error open(); virtual void close(); - virtual PoolStringArray get_connected_inputs(); + virtual PackedStringArray get_connected_inputs(); MIDIDriverALSAMidi(); virtual ~MIDIDriverALSAMidi(); diff --git a/drivers/coremidi/midi_driver_coremidi.cpp b/drivers/coremidi/midi_driver_coremidi.cpp index 99628c7fe3..d807896e61 100644 --- a/drivers/coremidi/midi_driver_coremidi.cpp +++ b/drivers/coremidi/midi_driver_coremidi.cpp @@ -93,9 +93,9 @@ void MIDIDriverCoreMidi::close() { } } -PoolStringArray MIDIDriverCoreMidi::get_connected_inputs() { +PackedStringArray MIDIDriverCoreMidi::get_connected_inputs() { - PoolStringArray list; + PackedStringArray list; for (int i = 0; i < connected_sources.size(); i++) { MIDIEndpointRef source = connected_sources[i]; diff --git a/drivers/coremidi/midi_driver_coremidi.h b/drivers/coremidi/midi_driver_coremidi.h index f32644e80c..e8b4481c20 100644 --- a/drivers/coremidi/midi_driver_coremidi.h +++ b/drivers/coremidi/midi_driver_coremidi.h @@ -52,7 +52,7 @@ public: virtual Error open(); virtual void close(); - PoolStringArray get_connected_inputs(); + PackedStringArray get_connected_inputs(); MIDIDriverCoreMidi(); virtual ~MIDIDriverCoreMidi(); diff --git a/drivers/dummy/rasterizer_dummy.h b/drivers/dummy/rasterizer_dummy.h index 990a0dc455..fb23370863 100644 --- a/drivers/dummy/rasterizer_dummy.h +++ b/drivers/dummy/rasterizer_dummy.h @@ -134,12 +134,12 @@ public: struct DummySurface { uint32_t format; VS::PrimitiveType primitive; - PoolVector<uint8_t> array; + Vector<uint8_t> array; int vertex_count; - PoolVector<uint8_t> index_array; + Vector<uint8_t> index_array; int index_count; AABB aabb; - Vector<PoolVector<uint8_t> > blend_shapes; + Vector<Vector<uint8_t> > blend_shapes; Vector<AABB> bone_aabbs; }; @@ -295,7 +295,7 @@ public: return mesh_owner.make_rid(mesh); } - void mesh_add_surface(RID p_mesh, uint32_t p_format, VS::PrimitiveType p_primitive, const PoolVector<uint8_t> &p_array, int p_vertex_count, const PoolVector<uint8_t> &p_index_array, int p_index_count, const AABB &p_aabb, const Vector<PoolVector<uint8_t> > &p_blend_shapes = Vector<PoolVector<uint8_t> >(), const Vector<AABB> &p_bone_aabbs = Vector<AABB>()) { + void mesh_add_surface(RID p_mesh, uint32_t p_format, VS::PrimitiveType p_primitive, const Vector<uint8_t> &p_array, int p_vertex_count, const Vector<uint8_t> &p_index_array, int p_index_count, const AABB &p_aabb, const Vector<Vector<uint8_t> > &p_blend_shapes = Vector<Vector<uint8_t> >(), const Vector<AABB> &p_bone_aabbs = Vector<AABB>()) { DummyMesh *m = mesh_owner.getornull(p_mesh); ERR_FAIL_COND(!m); @@ -334,7 +334,7 @@ public: return m->blend_shape_mode; } - void mesh_surface_update_region(RID p_mesh, int p_surface, int p_offset, const PoolVector<uint8_t> &p_data) {} + void mesh_surface_update_region(RID p_mesh, int p_surface, int p_offset, const Vector<uint8_t> &p_data) {} void mesh_surface_set_material(RID p_mesh, int p_surface, RID p_material) {} RID mesh_surface_get_material(RID p_mesh, int p_surface) const { return RID(); } @@ -352,15 +352,15 @@ public: return m->surfaces[p_surface].index_count; } - PoolVector<uint8_t> mesh_surface_get_array(RID p_mesh, int p_surface) const { + Vector<uint8_t> mesh_surface_get_array(RID p_mesh, int p_surface) const { DummyMesh *m = mesh_owner.getornull(p_mesh); - ERR_FAIL_COND_V(!m, PoolVector<uint8_t>()); + ERR_FAIL_COND_V(!m, Vector<uint8_t>()); return m->surfaces[p_surface].array; } - PoolVector<uint8_t> mesh_surface_get_index_array(RID p_mesh, int p_surface) const { + Vector<uint8_t> mesh_surface_get_index_array(RID p_mesh, int p_surface) const { DummyMesh *m = mesh_owner.getornull(p_mesh); - ERR_FAIL_COND_V(!m, PoolVector<uint8_t>()); + ERR_FAIL_COND_V(!m, Vector<uint8_t>()); return m->surfaces[p_surface].index_array; } @@ -384,9 +384,9 @@ public: return m->surfaces[p_surface].aabb; } - Vector<PoolVector<uint8_t> > mesh_surface_get_blend_shapes(RID p_mesh, int p_surface) const { + Vector<Vector<uint8_t> > mesh_surface_get_blend_shapes(RID p_mesh, int p_surface) const { DummyMesh *m = mesh_owner.getornull(p_mesh); - ERR_FAIL_COND_V(!m, Vector<PoolVector<uint8_t> >()); + ERR_FAIL_COND_V(!m, Vector<Vector<uint8_t> >()); return m->surfaces[p_surface].blend_shapes; } @@ -436,7 +436,7 @@ public: Color multimesh_instance_get_color(RID p_multimesh, int p_index) const { return Color(); } Color multimesh_instance_get_custom_data(RID p_multimesh, int p_index) const { return Color(); } - void multimesh_set_as_bulk_array(RID p_multimesh, const PoolVector<float> &p_array) {} + void multimesh_set_as_bulk_array(RID p_multimesh, const Vector<float> &p_array) {} void multimesh_set_visible_instances(RID p_multimesh, int p_visible) {} int multimesh_get_visible_instances(RID p_multimesh) const { return 0; } @@ -555,9 +555,9 @@ public: void gi_probe_set_to_cell_xform(RID p_probe, const Transform &p_xform) {} Transform gi_probe_get_to_cell_xform(RID p_probe) const { return Transform(); } - void gi_probe_set_dynamic_data(RID p_probe, const PoolVector<int> &p_data) {} - PoolVector<int> gi_probe_get_dynamic_data(RID p_probe) const { - PoolVector<int> p; + void gi_probe_set_dynamic_data(RID p_probe, const Vector<int> &p_data) {} + Vector<int> gi_probe_get_dynamic_data(RID p_probe) const { + Vector<int> p; return p; } @@ -620,7 +620,7 @@ public: struct LightmapCapture : public Instantiable { - PoolVector<LightmapCaptureOctree> octree; + Vector<LightmapCaptureOctree> octree; AABB bounds; Transform cell_xform; int cell_subdiv; @@ -634,15 +634,15 @@ public: mutable RID_PtrOwner<LightmapCapture> lightmap_capture_data_owner; void lightmap_capture_set_bounds(RID p_capture, const AABB &p_bounds) {} AABB lightmap_capture_get_bounds(RID p_capture) const { return AABB(); } - void lightmap_capture_set_octree(RID p_capture, const PoolVector<uint8_t> &p_octree) {} + void lightmap_capture_set_octree(RID p_capture, const Vector<uint8_t> &p_octree) {} RID lightmap_capture_create() { LightmapCapture *capture = memnew(LightmapCapture); return lightmap_capture_data_owner.make_rid(capture); } - PoolVector<uint8_t> lightmap_capture_get_octree(RID p_capture) const { + Vector<uint8_t> lightmap_capture_get_octree(RID p_capture) const { const LightmapCapture *capture = lightmap_capture_data_owner.getornull(p_capture); - ERR_FAIL_COND_V(!capture, PoolVector<uint8_t>()); - return PoolVector<uint8_t>(); + ERR_FAIL_COND_V(!capture, Vector<uint8_t>()); + return Vector<uint8_t>(); } void lightmap_capture_set_octree_cell_transform(RID p_capture, const Transform &p_xform) {} Transform lightmap_capture_get_octree_cell_transform(RID p_capture) const { return Transform(); } @@ -650,7 +650,7 @@ public: int lightmap_capture_get_octree_cell_subdiv(RID p_capture) const { return 0; } void lightmap_capture_set_energy(RID p_capture, float p_energy) {} float lightmap_capture_get_energy(RID p_capture) const { return 0.0; } - const PoolVector<LightmapCaptureOctree> *lightmap_capture_get_octree_ptr(RID p_capture) const { + const Vector<LightmapCaptureOctree> *lightmap_capture_get_octree_ptr(RID p_capture) const { const LightmapCapture *capture = lightmap_capture_data_owner.getornull(p_capture); ERR_FAIL_COND_V(!capture, NULL); return &capture->octree; @@ -711,7 +711,7 @@ public: /* LIGHT SHADOW MAPPING */ RID canvas_light_occluder_create() { return RID(); } - void canvas_light_occluder_set_polylines(RID p_occluder, const PoolVector<Vector2> &p_lines) {} + void canvas_light_occluder_set_polylines(RID p_occluder, const Vector<Vector2> &p_lines) {} VS::InstanceType get_base_type(RID p_rid) const { if (mesh_owner.owns(p_rid)) { diff --git a/drivers/dummy/texture_loader_dummy.cpp b/drivers/dummy/texture_loader_dummy.cpp index bf51d76527..aff7bbd1bc 100644 --- a/drivers/dummy/texture_loader_dummy.cpp +++ b/drivers/dummy/texture_loader_dummy.cpp @@ -43,7 +43,7 @@ RES ResourceFormatDummyTexture::load(const String &p_path, const String &p_origi Image::Format fmt = Image::FORMAT_RGB8; int rowsize = 3 * width; - PoolVector<uint8_t> dstbuff; + Vector<uint8_t> dstbuff; dstbuff.resize(rowsize * height); diff --git a/drivers/gles2/rasterizer_scene_gles2.cpp b/drivers/gles2/rasterizer_scene_gles2.cpp index 2e35bd0ccf..c433886545 100644 --- a/drivers/gles2/rasterizer_scene_gles2.cpp +++ b/drivers/gles2/rasterizer_scene_gles2.cpp @@ -1500,7 +1500,7 @@ void RasterizerSceneGLES2::_setup_geometry(RenderList::Element *p_element, Raste //use transform buffer workflow ERR_FAIL_COND(p_skeleton->use_2d); - PoolVector<float> &transform_buffer = storage->resources.skeleton_transform_cpu_buffer; + Vector<float> &transform_buffer = storage->resources.skeleton_transform_cpu_buffer; if (!s->attribs[VS::ARRAY_BONES].enabled || !s->attribs[VS::ARRAY_WEIGHTS].enabled) { break; // the whole instance has a skeleton, but this surface is not affected by it. @@ -1517,10 +1517,10 @@ void RasterizerSceneGLES2::_setup_geometry(RenderList::Element *p_element, Raste const size_t bone_weight_stride = s->attribs[VS::ARRAY_WEIGHTS].stride; { - PoolVector<float>::Write write = transform_buffer.write(); + float *write = transform_buffer.ptrw(); float *buffer = write.ptr(); - PoolVector<uint8_t>::Read vertex_array_read = s->data.read(); + const uint8_t *vertex_array_read = s->data.ptr(); const uint8_t *vertex_data = vertex_array_read.ptr(); for (int i = 0; i < s->array_len; i++) { diff --git a/drivers/gles2/rasterizer_storage_gles2.cpp b/drivers/gles2/rasterizer_storage_gles2.cpp index 245531a935..55b1c7e560 100644 --- a/drivers/gles2/rasterizer_storage_gles2.cpp +++ b/drivers/gles2/rasterizer_storage_gles2.cpp @@ -750,7 +750,7 @@ void RasterizerStorageGLES2::texture_set_data(RID p_texture, const Ref<Image> &p } texture->data_size = img->get_data().size(); - PoolVector<uint8_t>::Read read = img->get_data().read(); + const uint8_t *read = img->get_data().ptr(); ERR_FAIL_COND(!read.ptr()); glActiveTexture(GL_TEXTURE0); @@ -888,12 +888,12 @@ Ref<Image> RasterizerStorageGLES2::texture_get_data(RID p_texture, int p_layer) bool compressed; _get_gl_image_and_format(Ref<Image>(), texture->format, texture->flags, real_format, gl_format, gl_internal_format, gl_type, compressed, false); - PoolVector<uint8_t> data; + Vector<uint8_t> data; int data_size = Image::get_image_data_size(texture->alloc_width, texture->alloc_height, real_format, texture->mipmaps > 1); data.resize(data_size * 2); //add some memory at the end, just in case for buggy drivers - PoolVector<uint8_t>::Write wb = data.write(); + uint8_t *wb = data.ptrw(); glActiveTexture(GL_TEXTURE0); @@ -930,12 +930,12 @@ Ref<Image> RasterizerStorageGLES2::texture_get_data(RID p_texture, int p_layer) bool compressed; _get_gl_image_and_format(Ref<Image>(), texture->format, texture->flags, real_format, gl_format, gl_internal_format, gl_type, compressed, texture->resize_to_po2); - PoolVector<uint8_t> data; + Vector<uint8_t> data; int data_size = Image::get_image_data_size(texture->alloc_width, texture->alloc_height, Image::FORMAT_RGBA8, false); data.resize(data_size * 2); //add some memory at the end, just in case for buggy drivers - PoolVector<uint8_t>::Write wb = data.write(); + uint8_t *wb = data.ptrw(); GLuint temp_framebuffer; glGenFramebuffers(1, &temp_framebuffer); @@ -1681,11 +1681,11 @@ void RasterizerStorageGLES2::shader_get_param_list(RID p_shader, List<PropertyIn case ShaderLanguage::TYPE_UVEC3: case ShaderLanguage::TYPE_IVEC4: case ShaderLanguage::TYPE_UVEC4: { - pi.type = Variant::POOL_INT_ARRAY; + pi.type = Variant::PACKED_INT32_ARRAY; } break; case ShaderLanguage::TYPE_FLOAT: { - pi.type = Variant::REAL; + pi.type = Variant::FLOAT; if (u.hint == ShaderLanguage::ShaderNode::Uniform::HINT_RANGE) { pi.hint = PROPERTY_HINT_RANGE; pi.hint_string = rtos(u.hint_range[0]) + "," + rtos(u.hint_range[1]) + "," + rtos(u.hint_range[2]); @@ -2081,7 +2081,7 @@ RID RasterizerStorageGLES2::mesh_create() { return mesh_owner.make_rid(mesh); } -static PoolVector<uint8_t> _unpack_half_floats(const PoolVector<uint8_t> &array, uint32_t &format, int p_vertices) { +static Vector<uint8_t> _unpack_half_floats(const Vector<uint8_t> &array, uint32_t &format, int p_vertices) { uint32_t p_format = format; @@ -2223,11 +2223,11 @@ static PoolVector<uint8_t> _unpack_half_floats(const PoolVector<uint8_t> &array, dst_stride += dst_size[i]; } - PoolVector<uint8_t> ret; + Vector<uint8_t> ret; ret.resize(p_vertices * dst_stride); - PoolVector<uint8_t>::Read r = array.read(); - PoolVector<uint8_t>::Write w = ret.write(); + const uint8_t *r = array.ptr(); + uint8_t *w = ret.ptrw(); int src_offset = 0; int dst_offset = 0; @@ -2270,7 +2270,7 @@ static PoolVector<uint8_t> _unpack_half_floats(const PoolVector<uint8_t> &array, return ret; } -void RasterizerStorageGLES2::mesh_add_surface(RID p_mesh, uint32_t p_format, VS::PrimitiveType p_primitive, const PoolVector<uint8_t> &p_array, int p_vertex_count, const PoolVector<uint8_t> &p_index_array, int p_index_count, const AABB &p_aabb, const Vector<PoolVector<uint8_t> > &p_blend_shapes, const Vector<AABB> &p_bone_aabbs) { +void RasterizerStorageGLES2::mesh_add_surface(RID p_mesh, uint32_t p_format, VS::PrimitiveType p_primitive, const Vector<uint8_t> &p_array, int p_vertex_count, const Vector<uint8_t> &p_index_array, int p_index_count, const AABB &p_aabb, const Vector<Vector<uint8_t> > &p_blend_shapes, const Vector<AABB> &p_bone_aabbs) { Mesh *mesh = mesh_owner.getornull(p_mesh); ERR_FAIL_COND(!mesh); @@ -2457,18 +2457,18 @@ void RasterizerStorageGLES2::mesh_add_surface(RID p_mesh, uint32_t p_format, VS: } //validate sizes - PoolVector<uint8_t> array = p_array; + Vector<uint8_t> array = p_array; int array_size = stride * p_vertex_count; int index_array_size = 0; if (array.size() != array_size && array.size() + p_vertex_count * 2 == array_size) { //old format, convert - array = PoolVector<uint8_t>(); + array = Vector<uint8_t>(); array.resize(p_array.size() + p_vertex_count * 2); - PoolVector<uint8_t>::Write w = array.write(); - PoolVector<uint8_t>::Read r = p_array.read(); + uint8_t *w = array.ptrw(); + const uint8_t *r = p_array.ptr(); uint16_t *w16 = (uint16_t *)w.ptr(); const uint16_t *r16 = (uint16_t *)r.ptr(); @@ -2492,7 +2492,7 @@ void RasterizerStorageGLES2::mesh_add_surface(RID p_mesh, uint32_t p_format, VS: if (!config.support_half_float_vertices && uses_half_float) { uint32_t new_format = p_format; - PoolVector<uint8_t> unpacked_array = _unpack_half_floats(array, new_format, p_vertex_count); + Vector<uint8_t> unpacked_array = _unpack_half_floats(array, new_format, p_vertex_count); mesh_add_surface(p_mesh, new_format, p_primitive, unpacked_array, p_vertex_count, p_index_array, p_index_count, p_aabb, p_blend_shapes, p_bone_aabbs); return; //do not go any further, above function used unpacked stuff will be used instead. @@ -2549,7 +2549,7 @@ void RasterizerStorageGLES2::mesh_add_surface(RID p_mesh, uint32_t p_format, VS: // Okay, now the OpenGL stuff, wheeeeey \o/ { - PoolVector<uint8_t>::Read vr = array.read(); + const uint8_t *vr = array.ptr(); glGenBuffers(1, &surface->vertex_id); glBindBuffer(GL_ARRAY_BUFFER, surface->vertex_id); @@ -2558,7 +2558,7 @@ void RasterizerStorageGLES2::mesh_add_surface(RID p_mesh, uint32_t p_format, VS: glBindBuffer(GL_ARRAY_BUFFER, 0); if (p_format & VS::ARRAY_FORMAT_INDEX) { - PoolVector<uint8_t>::Read ir = p_index_array.read(); + const uint8_t *ir = p_index_array.ptr(); glGenBuffers(1, &surface->index_id); glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, surface->index_id); @@ -2578,7 +2578,7 @@ void RasterizerStorageGLES2::mesh_add_surface(RID p_mesh, uint32_t p_format, VS: Surface::BlendShape mt; - PoolVector<uint8_t>::Read vr = p_blend_shapes[i].read(); + const uint8_t *vr = p_blend_shapes[i].ptr(); surface->total_data_size += array_size; @@ -2628,7 +2628,7 @@ VS::BlendShapeMode RasterizerStorageGLES2::mesh_get_blend_shape_mode(RID p_mesh) return mesh->blend_shape_mode; } -void RasterizerStorageGLES2::mesh_surface_update_region(RID p_mesh, int p_surface, int p_offset, const PoolVector<uint8_t> &p_data) { +void RasterizerStorageGLES2::mesh_surface_update_region(RID p_mesh, int p_surface, int p_offset, const Vector<uint8_t> &p_data) { Mesh *mesh = mesh_owner.getornull(p_mesh); ERR_FAIL_COND(!mesh); @@ -2637,7 +2637,7 @@ void RasterizerStorageGLES2::mesh_surface_update_region(RID p_mesh, int p_surfac int total_size = p_data.size(); ERR_FAIL_COND(p_offset + total_size > mesh->surfaces[p_surface]->array_byte_size); - PoolVector<uint8_t>::Read r = p_data.read(); + const uint8_t *r = p_data.ptr(); glBindBuffer(GL_ARRAY_BUFFER, mesh->surfaces[p_surface]->vertex_id); glBufferSubData(GL_ARRAY_BUFFER, p_offset, total_size, r.ptr()); @@ -2689,11 +2689,11 @@ int RasterizerStorageGLES2::mesh_surface_get_array_index_len(RID p_mesh, int p_s return mesh->surfaces[p_surface]->index_array_len; } -PoolVector<uint8_t> RasterizerStorageGLES2::mesh_surface_get_array(RID p_mesh, int p_surface) const { +Vector<uint8_t> RasterizerStorageGLES2::mesh_surface_get_array(RID p_mesh, int p_surface) const { const Mesh *mesh = mesh_owner.getornull(p_mesh); - ERR_FAIL_COND_V(!mesh, PoolVector<uint8_t>()); - ERR_FAIL_INDEX_V(p_surface, mesh->surfaces.size(), PoolVector<uint8_t>()); + ERR_FAIL_COND_V(!mesh, Vector<uint8_t>()); + ERR_FAIL_INDEX_V(p_surface, mesh->surfaces.size(), Vector<uint8_t>()); Surface *surface = mesh->surfaces[p_surface]; #ifndef TOOLS_ENABLED @@ -2702,10 +2702,10 @@ PoolVector<uint8_t> RasterizerStorageGLES2::mesh_surface_get_array(RID p_mesh, i return surface->data; } -PoolVector<uint8_t> RasterizerStorageGLES2::mesh_surface_get_index_array(RID p_mesh, int p_surface) const { +Vector<uint8_t> RasterizerStorageGLES2::mesh_surface_get_index_array(RID p_mesh, int p_surface) const { const Mesh *mesh = mesh_owner.getornull(p_mesh); - ERR_FAIL_COND_V(!mesh, PoolVector<uint8_t>()); - ERR_FAIL_INDEX_V(p_surface, mesh->surfaces.size(), PoolVector<uint8_t>()); + ERR_FAIL_COND_V(!mesh, Vector<uint8_t>()); + ERR_FAIL_INDEX_V(p_surface, mesh->surfaces.size(), Vector<uint8_t>()); Surface *surface = mesh->surfaces[p_surface]; @@ -2737,10 +2737,10 @@ AABB RasterizerStorageGLES2::mesh_surface_get_aabb(RID p_mesh, int p_surface) co return mesh->surfaces[p_surface]->aabb; } -Vector<PoolVector<uint8_t> > RasterizerStorageGLES2::mesh_surface_get_blend_shapes(RID p_mesh, int p_surface) const { +Vector<Vector<uint8_t> > RasterizerStorageGLES2::mesh_surface_get_blend_shapes(RID p_mesh, int p_surface) const { const Mesh *mesh = mesh_owner.getornull(p_mesh); - ERR_FAIL_COND_V(!mesh, Vector<PoolVector<uint8_t> >()); - ERR_FAIL_INDEX_V(p_surface, mesh->surfaces.size(), Vector<PoolVector<uint8_t> >()); + ERR_FAIL_COND_V(!mesh, Vector<Vector<uint8_t> >()); + ERR_FAIL_INDEX_V(p_surface, mesh->surfaces.size(), Vector<Vector<uint8_t> >()); #ifndef TOOLS_ENABLED ERR_PRINT("OpenGL ES 2.0 does not allow retrieving mesh array data"); #endif @@ -3332,7 +3332,7 @@ Color RasterizerStorageGLES2::multimesh_instance_get_custom_data(RID p_multimesh return Color(); } -void RasterizerStorageGLES2::multimesh_set_as_bulk_array(RID p_multimesh, const PoolVector<float> &p_array) { +void RasterizerStorageGLES2::multimesh_set_as_bulk_array(RID p_multimesh, const Vector<float> &p_array) { MultiMesh *multimesh = multimesh_owner.getornull(p_multimesh); ERR_FAIL_COND(!multimesh); ERR_FAIL_COND(!multimesh->data.ptr()); @@ -3341,7 +3341,7 @@ void RasterizerStorageGLES2::multimesh_set_as_bulk_array(RID p_multimesh, const ERR_FAIL_COND(dsize != p_array.size()); - PoolVector<float>::Read r = p_array.read(); + const float *r = p_array.ptr(); ERR_FAIL_COND(!r.ptr()); copymem(multimesh->data.ptrw(), r.ptr(), dsize * sizeof(float)); @@ -3767,7 +3767,7 @@ void RasterizerStorageGLES2::skeleton_set_base_transform_2d(RID p_skeleton, cons skeleton->base_transform_2d = p_base_transform; } -void RasterizerStorageGLES2::_update_skeleton_transform_buffer(const PoolVector<float> &p_data, size_t p_size) { +void RasterizerStorageGLES2::_update_skeleton_transform_buffer(const Vector<float> &p_data, size_t p_size) { glBindBuffer(GL_ARRAY_BUFFER, resources.skeleton_transform_buffer); @@ -3776,9 +3776,9 @@ void RasterizerStorageGLES2::_update_skeleton_transform_buffer(const PoolVector< resources.skeleton_transform_buffer_size = p_size; - glBufferData(GL_ARRAY_BUFFER, p_size * sizeof(float), p_data.read().ptr(), GL_DYNAMIC_DRAW); + glBufferData(GL_ARRAY_BUFFER, p_size * sizeof(float), p_data.ptr(), GL_DYNAMIC_DRAW); } else { - glBufferSubData(GL_ARRAY_BUFFER, 0, p_size * sizeof(float), p_data.read().ptr()); + glBufferSubData(GL_ARRAY_BUFFER, 0, p_size * sizeof(float), p_data.ptr()); } glBindBuffer(GL_ARRAY_BUFFER, 0); @@ -4298,11 +4298,11 @@ Transform RasterizerStorageGLES2::gi_probe_get_to_cell_xform(RID p_probe) const return Transform(); } -void RasterizerStorageGLES2::gi_probe_set_dynamic_data(RID p_probe, const PoolVector<int> &p_data) { +void RasterizerStorageGLES2::gi_probe_set_dynamic_data(RID p_probe, const Vector<int> &p_data) { } -PoolVector<int> RasterizerStorageGLES2::gi_probe_get_dynamic_data(RID p_probe) const { - return PoolVector<int>(); +Vector<int> RasterizerStorageGLES2::gi_probe_get_dynamic_data(RID p_probe) const { + return Vector<int>(); } void RasterizerStorageGLES2::gi_probe_set_dynamic_range(RID p_probe, int p_range) { @@ -4389,7 +4389,7 @@ AABB RasterizerStorageGLES2::lightmap_capture_get_bounds(RID p_capture) const { ERR_FAIL_COND_V(!capture, AABB()); return capture->bounds; } -void RasterizerStorageGLES2::lightmap_capture_set_octree(RID p_capture, const PoolVector<uint8_t> &p_octree) { +void RasterizerStorageGLES2::lightmap_capture_set_octree(RID p_capture, const Vector<uint8_t> &p_octree) { LightmapCapture *capture = lightmap_capture_data_owner.getornull(p_capture); ERR_FAIL_COND(!capture); @@ -4398,25 +4398,25 @@ void RasterizerStorageGLES2::lightmap_capture_set_octree(RID p_capture, const Po capture->octree.resize(p_octree.size() / sizeof(LightmapCaptureOctree)); if (p_octree.size()) { - PoolVector<LightmapCaptureOctree>::Write w = capture->octree.write(); - PoolVector<uint8_t>::Read r = p_octree.read(); + LightmapCaptureOctree *w = capture->octree.ptrw(); + const uint8_t *r = p_octree.ptr(); copymem(w.ptr(), r.ptr(), p_octree.size()); } capture->instance_change_notify(true, false); } -PoolVector<uint8_t> RasterizerStorageGLES2::lightmap_capture_get_octree(RID p_capture) const { +Vector<uint8_t> RasterizerStorageGLES2::lightmap_capture_get_octree(RID p_capture) const { const LightmapCapture *capture = lightmap_capture_data_owner.getornull(p_capture); - ERR_FAIL_COND_V(!capture, PoolVector<uint8_t>()); + ERR_FAIL_COND_V(!capture, Vector<uint8_t>()); if (capture->octree.size() == 0) - return PoolVector<uint8_t>(); + return Vector<uint8_t>(); - PoolVector<uint8_t> ret; + Vector<uint8_t> ret; ret.resize(capture->octree.size() * sizeof(LightmapCaptureOctree)); { - PoolVector<LightmapCaptureOctree>::Read r = capture->octree.read(); - PoolVector<uint8_t>::Write w = ret.write(); + const LightmapCaptureOctree *r = capture->octree.ptr(); + uint8_t *w = ret.ptrw(); copymem(w.ptr(), r.ptr(), ret.size()); } @@ -4461,7 +4461,7 @@ float RasterizerStorageGLES2::lightmap_capture_get_energy(RID p_capture) const { return capture->energy; } -const PoolVector<RasterizerStorage::LightmapCaptureOctree> *RasterizerStorageGLES2::lightmap_capture_get_octree_ptr(RID p_capture) const { +const Vector<RasterizerStorage::LightmapCaptureOctree> *RasterizerStorageGLES2::lightmap_capture_get_octree_ptr(RID p_capture) const { const LightmapCapture *capture = lightmap_capture_data_owner.getornull(p_capture); ERR_FAIL_COND_V(!capture, NULL); return &capture->octree; @@ -5449,7 +5449,7 @@ RID RasterizerStorageGLES2::canvas_light_occluder_create() { return canvas_occluder_owner.make_rid(co); } -void RasterizerStorageGLES2::canvas_light_occluder_set_polylines(RID p_occluder, const PoolVector<Vector2> &p_lines) { +void RasterizerStorageGLES2::canvas_light_occluder_set_polylines(RID p_occluder, const Vector<Vector2> &p_lines) { CanvasOccluder *co = canvas_occluder_owner.getornull(p_occluder); ERR_FAIL_COND(!co); @@ -5470,17 +5470,17 @@ void RasterizerStorageGLES2::canvas_light_occluder_set_polylines(RID p_occluder, if (p_lines.size()) { - PoolVector<float> geometry; - PoolVector<uint16_t> indices; + Vector<float> geometry; + Vector<uint16_t> indices; int lc = p_lines.size(); geometry.resize(lc * 6); indices.resize(lc * 3); - PoolVector<float>::Write vw = geometry.write(); - PoolVector<uint16_t>::Write iw = indices.write(); + float *vw = geometry.ptrw(); + uint16_t *iw = indices.ptrw(); - PoolVector<Vector2>::Read lr = p_lines.read(); + const Vector2 *lr = p_lines.ptr(); const int POLY_HEIGHT = 16384; diff --git a/drivers/gles2/rasterizer_storage_gles2.h b/drivers/gles2/rasterizer_storage_gles2.h index a6aae400ca..6fbfe57778 100644 --- a/drivers/gles2/rasterizer_storage_gles2.h +++ b/drivers/gles2/rasterizer_storage_gles2.h @@ -31,7 +31,6 @@ #ifndef RASTERIZERSTORAGEGLES2_H #define RASTERIZERSTORAGEGLES2_H -#include "core/pool_vector.h" #include "core/self_list.h" #include "servers/visual/rasterizer.h" #include "servers/visual/shader_language.h" @@ -125,7 +124,7 @@ public: size_t skeleton_transform_buffer_size; GLuint skeleton_transform_buffer; - PoolVector<float> skeleton_transform_cpu_buffer; + Vector<float> skeleton_transform_cpu_buffer; } resources; @@ -649,9 +648,9 @@ public: bool active; - PoolVector<uint8_t> data; - PoolVector<uint8_t> index_data; - Vector<PoolVector<uint8_t> > blend_shape_data; + Vector<uint8_t> data; + Vector<uint8_t> index_data; + Vector<Vector<uint8_t> > blend_shape_data; int total_data_size; @@ -703,7 +702,7 @@ public: virtual RID mesh_create(); - virtual void mesh_add_surface(RID p_mesh, uint32_t p_format, VS::PrimitiveType p_primitive, const PoolVector<uint8_t> &p_array, int p_vertex_count, const PoolVector<uint8_t> &p_index_array, int p_index_count, const AABB &p_aabb, const Vector<PoolVector<uint8_t> > &p_blend_shapes = Vector<PoolVector<uint8_t> >(), const Vector<AABB> &p_bone_aabbs = Vector<AABB>()); + virtual void mesh_add_surface(RID p_mesh, uint32_t p_format, VS::PrimitiveType p_primitive, const Vector<uint8_t> &p_array, int p_vertex_count, const Vector<uint8_t> &p_index_array, int p_index_count, const AABB &p_aabb, const Vector<Vector<uint8_t> > &p_blend_shapes = Vector<Vector<uint8_t> >(), const Vector<AABB> &p_bone_aabbs = Vector<AABB>()); virtual void mesh_set_blend_shape_count(RID p_mesh, int p_amount); virtual int mesh_get_blend_shape_count(RID p_mesh) const; @@ -711,7 +710,7 @@ public: virtual void mesh_set_blend_shape_mode(RID p_mesh, VS::BlendShapeMode p_mode); virtual VS::BlendShapeMode mesh_get_blend_shape_mode(RID p_mesh) const; - virtual void mesh_surface_update_region(RID p_mesh, int p_surface, int p_offset, const PoolVector<uint8_t> &p_data); + virtual void mesh_surface_update_region(RID p_mesh, int p_surface, int p_offset, const Vector<uint8_t> &p_data); virtual void mesh_surface_set_material(RID p_mesh, int p_surface, RID p_material); virtual RID mesh_surface_get_material(RID p_mesh, int p_surface) const; @@ -719,14 +718,14 @@ public: virtual int mesh_surface_get_array_len(RID p_mesh, int p_surface) const; virtual int mesh_surface_get_array_index_len(RID p_mesh, int p_surface) const; - virtual PoolVector<uint8_t> mesh_surface_get_array(RID p_mesh, int p_surface) const; - virtual PoolVector<uint8_t> mesh_surface_get_index_array(RID p_mesh, int p_surface) const; + virtual Vector<uint8_t> mesh_surface_get_array(RID p_mesh, int p_surface) const; + virtual Vector<uint8_t> mesh_surface_get_index_array(RID p_mesh, int p_surface) const; virtual uint32_t mesh_surface_get_format(RID p_mesh, int p_surface) const; virtual VS::PrimitiveType mesh_surface_get_primitive_type(RID p_mesh, int p_surface) const; virtual AABB mesh_surface_get_aabb(RID p_mesh, int p_surface) const; - virtual Vector<PoolVector<uint8_t> > mesh_surface_get_blend_shapes(RID p_mesh, int p_surface) const; + virtual Vector<Vector<uint8_t> > mesh_surface_get_blend_shapes(RID p_mesh, int p_surface) const; virtual Vector<AABB> mesh_surface_get_skeleton_aabb(RID p_mesh, int p_surface) const; virtual void mesh_remove_surface(RID p_mesh, int p_surface); @@ -803,7 +802,7 @@ public: virtual Color multimesh_instance_get_color(RID p_multimesh, int p_index) const; virtual Color multimesh_instance_get_custom_data(RID p_multimesh, int p_index) const; - virtual void multimesh_set_as_bulk_array(RID p_multimesh, const PoolVector<float> &p_array); + virtual void multimesh_set_as_bulk_array(RID p_multimesh, const Vector<float> &p_array); virtual void multimesh_set_visible_instances(RID p_multimesh, int p_visible); virtual int multimesh_get_visible_instances(RID p_multimesh) const; @@ -902,7 +901,7 @@ public: virtual Transform2D skeleton_bone_get_transform_2d(RID p_skeleton, int p_bone) const; virtual void skeleton_set_base_transform_2d(RID p_skeleton, const Transform2D &p_base_transform); - void _update_skeleton_transform_buffer(const PoolVector<float> &p_data, size_t p_size); + void _update_skeleton_transform_buffer(const Vector<float> &p_data, size_t p_size); /* Light API */ @@ -1030,8 +1029,8 @@ public: virtual void gi_probe_set_to_cell_xform(RID p_probe, const Transform &p_xform); virtual Transform gi_probe_get_to_cell_xform(RID p_probe) const; - virtual void gi_probe_set_dynamic_data(RID p_probe, const PoolVector<int> &p_data); - virtual PoolVector<int> gi_probe_get_dynamic_data(RID p_probe) const; + virtual void gi_probe_set_dynamic_data(RID p_probe, const Vector<int> &p_data); + virtual Vector<int> gi_probe_get_dynamic_data(RID p_probe) const; virtual void gi_probe_set_dynamic_range(RID p_probe, int p_range); virtual int gi_probe_get_dynamic_range(RID p_probe) const; @@ -1064,7 +1063,7 @@ public: struct LightmapCapture : public Instantiable { - PoolVector<LightmapCaptureOctree> octree; + Vector<LightmapCaptureOctree> octree; AABB bounds; Transform cell_xform; int cell_subdiv; @@ -1080,15 +1079,15 @@ public: virtual RID lightmap_capture_create(); virtual void lightmap_capture_set_bounds(RID p_capture, const AABB &p_bounds); virtual AABB lightmap_capture_get_bounds(RID p_capture) const; - virtual void lightmap_capture_set_octree(RID p_capture, const PoolVector<uint8_t> &p_octree); - virtual PoolVector<uint8_t> lightmap_capture_get_octree(RID p_capture) const; + virtual void lightmap_capture_set_octree(RID p_capture, const Vector<uint8_t> &p_octree); + virtual Vector<uint8_t> lightmap_capture_get_octree(RID p_capture) const; virtual void lightmap_capture_set_octree_cell_transform(RID p_capture, const Transform &p_xform); virtual Transform lightmap_capture_get_octree_cell_transform(RID p_capture) const; virtual void lightmap_capture_set_octree_cell_subdiv(RID p_capture, int p_subdiv); virtual int lightmap_capture_get_octree_cell_subdiv(RID p_capture) const; virtual void lightmap_capture_set_energy(RID p_capture, float p_energy); virtual float lightmap_capture_get_energy(RID p_capture) const; - virtual const PoolVector<LightmapCaptureOctree> *lightmap_capture_get_octree_ptr(RID p_capture) const; + virtual const Vector<LightmapCaptureOctree> *lightmap_capture_get_octree_ptr(RID p_capture) const; /* PARTICLES */ void update_particles(); @@ -1271,14 +1270,14 @@ public: GLuint vertex_id; // 0 means, unconfigured GLuint index_id; // 0 means, unconfigured - PoolVector<Vector2> lines; + Vector<Vector2> lines; int len; }; RID_PtrOwner<CanvasOccluder> canvas_occluder_owner; virtual RID canvas_light_occluder_create(); - virtual void canvas_light_occluder_set_polylines(RID p_occluder, const PoolVector<Vector2> &p_lines); + virtual void canvas_light_occluder_set_polylines(RID p_occluder, const Vector<Vector2> &p_lines); virtual VS::InstanceType get_base_type(RID p_rid) const; diff --git a/drivers/png/image_loader_png.cpp b/drivers/png/image_loader_png.cpp index eb7d196e1d..4cb93a821c 100644 --- a/drivers/png/image_loader_png.cpp +++ b/drivers/png/image_loader_png.cpp @@ -39,19 +39,19 @@ Error ImageLoaderPNG::load_image(Ref<Image> p_image, FileAccess *f, bool p_force_linear, float p_scale) { const size_t buffer_size = f->get_len(); - PoolVector<uint8_t> file_buffer; + Vector<uint8_t> file_buffer; Error err = file_buffer.resize(buffer_size); if (err) { f->close(); return err; } { - PoolVector<uint8_t>::Write writer = file_buffer.write(); - f->get_buffer(writer.ptr(), buffer_size); + uint8_t *writer = file_buffer.ptrw(); + f->get_buffer(writer, buffer_size); f->close(); } - PoolVector<uint8_t>::Read reader = file_buffer.read(); - return PNGDriverCommon::png_to_image(reader.ptr(), buffer_size, p_image); + const uint8_t *reader = file_buffer.ptr(); + return PNGDriverCommon::png_to_image(reader, buffer_size, p_image); } void ImageLoaderPNG::get_recognized_extensions(List<String> *p_extensions) const { @@ -70,34 +70,34 @@ Ref<Image> ImageLoaderPNG::load_mem_png(const uint8_t *p_png, int p_size) { return img; } -Ref<Image> ImageLoaderPNG::lossless_unpack_png(const PoolVector<uint8_t> &p_data) { +Ref<Image> ImageLoaderPNG::lossless_unpack_png(const Vector<uint8_t> &p_data) { const int len = p_data.size(); ERR_FAIL_COND_V(len < 4, Ref<Image>()); - PoolVector<uint8_t>::Read r = p_data.read(); + const uint8_t *r = p_data.ptr(); ERR_FAIL_COND_V(r[0] != 'P' || r[1] != 'N' || r[2] != 'G' || r[3] != ' ', Ref<Image>()); return load_mem_png(&r[4], len - 4); } -PoolVector<uint8_t> ImageLoaderPNG::lossless_pack_png(const Ref<Image> &p_image) { +Vector<uint8_t> ImageLoaderPNG::lossless_pack_png(const Ref<Image> &p_image) { - PoolVector<uint8_t> out_buffer; + Vector<uint8_t> out_buffer; // add Godot's own "PNG " prefix if (out_buffer.resize(4) != OK) { - ERR_FAIL_V(PoolVector<uint8_t>()); + ERR_FAIL_V(Vector<uint8_t>()); } // scope for writer lifetime { // must be closed before call to image_to_png - PoolVector<uint8_t>::Write writer = out_buffer.write(); - copymem(writer.ptr(), "PNG ", 4); + uint8_t *writer = out_buffer.ptrw(); + copymem(writer, "PNG ", 4); } Error err = PNGDriverCommon::image_to_png(p_image, out_buffer); if (err) { - ERR_FAIL_V(PoolVector<uint8_t>()); + ERR_FAIL_V(Vector<uint8_t>()); } return out_buffer; diff --git a/drivers/png/image_loader_png.h b/drivers/png/image_loader_png.h index 57f8aa314d..0154be0398 100644 --- a/drivers/png/image_loader_png.h +++ b/drivers/png/image_loader_png.h @@ -35,8 +35,8 @@ class ImageLoaderPNG : public ImageFormatLoader { private: - static PoolVector<uint8_t> lossless_pack_png(const Ref<Image> &p_image); - static Ref<Image> lossless_unpack_png(const PoolVector<uint8_t> &p_data); + static Vector<uint8_t> lossless_pack_png(const Ref<Image> &p_image); + static Ref<Image> lossless_unpack_png(const Vector<uint8_t> &p_data); static Ref<Image> load_mem_png(const uint8_t *p_png, int p_size); public: diff --git a/drivers/png/png_driver_common.cpp b/drivers/png/png_driver_common.cpp index 750d00eb59..efd488fd5c 100644 --- a/drivers/png/png_driver_common.cpp +++ b/drivers/png/png_driver_common.cpp @@ -101,16 +101,16 @@ Error png_to_image(const uint8_t *p_source, size_t p_size, Ref<Image> p_image) { } const png_uint_32 stride = PNG_IMAGE_ROW_STRIDE(png_img); - PoolVector<uint8_t> buffer; + Vector<uint8_t> buffer; Error err = buffer.resize(PNG_IMAGE_BUFFER_SIZE(png_img, stride)); if (err) { png_image_free(&png_img); // only required when we return before finish_read return err; } - PoolVector<uint8_t>::Write writer = buffer.write(); + uint8_t *writer = buffer.ptrw(); // read image data to buffer and release libpng resources - success = png_image_finish_read(&png_img, NULL, writer.ptr(), stride, NULL); + success = png_image_finish_read(&png_img, NULL, writer, stride, NULL); ERR_FAIL_COND_V_MSG(check_error(png_img), ERR_FILE_CORRUPT, png_img.message); ERR_FAIL_COND_V(!success, ERR_FILE_CORRUPT); @@ -120,7 +120,7 @@ Error png_to_image(const uint8_t *p_source, size_t p_size, Ref<Image> p_image) { return OK; } -Error image_to_png(const Ref<Image> &p_image, PoolVector<uint8_t> &p_buffer) { +Error image_to_png(const Ref<Image> &p_image, Vector<uint8_t> &p_buffer) { Ref<Image> source_image = p_image->duplicate(); @@ -158,8 +158,8 @@ Error image_to_png(const Ref<Image> &p_image, PoolVector<uint8_t> &p_buffer) { } } - const PoolVector<uint8_t> image_data = source_image->get_data(); - const PoolVector<uint8_t>::Read reader = image_data.read(); + const Vector<uint8_t> image_data = source_image->get_data(); + const uint8_t *reader = image_data.ptr(); // we may be passed a buffer with existing content we're expected to append to const int buffer_offset = p_buffer.size(); @@ -173,9 +173,9 @@ Error image_to_png(const Ref<Image> &p_image, PoolVector<uint8_t> &p_buffer) { Error err = p_buffer.resize(buffer_offset + png_size_estimate); ERR_FAIL_COND_V(err, err); - PoolVector<uint8_t>::Write writer = p_buffer.write(); + uint8_t *writer = p_buffer.ptrw(); success = png_image_write_to_memory(&png_img, &writer[buffer_offset], - &compressed_size, 0, reader.ptr(), 0, NULL); + &compressed_size, 0, reader, 0, NULL); ERR_FAIL_COND_V_MSG(check_error(png_img), FAILED, png_img.message); } if (!success) { @@ -187,9 +187,9 @@ Error image_to_png(const Ref<Image> &p_image, PoolVector<uint8_t> &p_buffer) { Error err = p_buffer.resize(buffer_offset + compressed_size); ERR_FAIL_COND_V(err, err); - PoolVector<uint8_t>::Write writer = p_buffer.write(); + uint8_t *writer = p_buffer.ptrw(); success = png_image_write_to_memory(&png_img, &writer[buffer_offset], - &compressed_size, 0, reader.ptr(), 0, NULL); + &compressed_size, 0, reader, 0, NULL); ERR_FAIL_COND_V_MSG(check_error(png_img), FAILED, png_img.message); ERR_FAIL_COND_V(!success, FAILED); } diff --git a/drivers/png/png_driver_common.h b/drivers/png/png_driver_common.h index ee1d32ce68..12129f034e 100644 --- a/drivers/png/png_driver_common.h +++ b/drivers/png/png_driver_common.h @@ -32,7 +32,6 @@ #define PNG_DRIVER_COMMON_H #include "core/image.h" -#include "core/pool_vector.h" namespace PNGDriverCommon { @@ -41,7 +40,7 @@ Error png_to_image(const uint8_t *p_source, size_t p_size, Ref<Image> p_image); // Append p_image, as a png, to p_buffer. // Contents of p_buffer is unspecified if error returned. -Error image_to_png(const Ref<Image> &p_image, PoolVector<uint8_t> &p_buffer); +Error image_to_png(const Ref<Image> &p_image, Vector<uint8_t> &p_buffer); } // namespace PNGDriverCommon diff --git a/drivers/png/resource_saver_png.cpp b/drivers/png/resource_saver_png.cpp index 566bfbcc1d..2380c2685f 100644 --- a/drivers/png/resource_saver_png.cpp +++ b/drivers/png/resource_saver_png.cpp @@ -51,15 +51,15 @@ Error ResourceSaverPNG::save(const String &p_path, const RES &p_resource, uint32 Error ResourceSaverPNG::save_image(const String &p_path, const Ref<Image> &p_img) { - PoolVector<uint8_t> buffer; + Vector<uint8_t> buffer; Error err = PNGDriverCommon::image_to_png(p_img, buffer); ERR_FAIL_COND_V_MSG(err, err, "Can't convert image to PNG."); FileAccess *file = FileAccess::open(p_path, FileAccess::WRITE, &err); ERR_FAIL_COND_V_MSG(err, err, vformat("Can't save PNG at path: '%s'.", p_path)); - PoolVector<uint8_t>::Read reader = buffer.read(); + const uint8_t *reader = buffer.ptr(); - file->store_buffer(reader.ptr(), buffer.size()); + file->store_buffer(reader, buffer.size()); if (file->get_error() != OK && file->get_error() != ERR_FILE_EOF) { memdelete(file); return ERR_CANT_CREATE; @@ -71,11 +71,11 @@ Error ResourceSaverPNG::save_image(const String &p_path, const Ref<Image> &p_img return OK; } -PoolVector<uint8_t> ResourceSaverPNG::save_image_to_buffer(const Ref<Image> &p_img) { +Vector<uint8_t> ResourceSaverPNG::save_image_to_buffer(const Ref<Image> &p_img) { - PoolVector<uint8_t> buffer; + Vector<uint8_t> buffer; Error err = PNGDriverCommon::image_to_png(p_img, buffer); - ERR_FAIL_COND_V_MSG(err, PoolVector<uint8_t>(), "Can't convert image to PNG."); + ERR_FAIL_COND_V_MSG(err, Vector<uint8_t>(), "Can't convert image to PNG."); return buffer; } diff --git a/drivers/png/resource_saver_png.h b/drivers/png/resource_saver_png.h index 2cac20991a..c32b383521 100644 --- a/drivers/png/resource_saver_png.h +++ b/drivers/png/resource_saver_png.h @@ -37,7 +37,7 @@ class ResourceSaverPNG : public ResourceFormatSaver { public: static Error save_image(const String &p_path, const Ref<Image> &p_img); - static PoolVector<uint8_t> save_image_to_buffer(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 RES &p_resource, uint32_t p_flags = 0); virtual bool recognize(const RES &p_resource) const; diff --git a/drivers/spirv-reflect/SCsub b/drivers/spirv-reflect/SCsub index f6b40ac433..8ff27da114 100644 --- a/drivers/spirv-reflect/SCsub +++ b/drivers/spirv-reflect/SCsub @@ -3,12 +3,13 @@ Import('env') env_spirv_reflect = env.Clone() +env_spirv_reflect.disable_warnings() thirdparty_dir = "#thirdparty/spirv-reflect/" thirdparty_sources = [ "spirv_reflect.c" ] - + thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources] env_spirv_reflect.add_source_files(env.drivers_sources, thirdparty_sources) diff --git a/drivers/unix/net_socket_posix.cpp b/drivers/unix/net_socket_posix.cpp index cab5513e0a..4adeeb1d9b 100644 --- a/drivers/unix/net_socket_posix.cpp +++ b/drivers/unix/net_socket_posix.cpp @@ -544,14 +544,14 @@ Error NetSocketPosix::recv(uint8_t *p_buffer, int p_len, int &r_read) { return OK; } -Error NetSocketPosix::recvfrom(uint8_t *p_buffer, int p_len, int &r_read, IP_Address &r_ip, uint16_t &r_port) { +Error NetSocketPosix::recvfrom(uint8_t *p_buffer, int p_len, int &r_read, IP_Address &r_ip, uint16_t &r_port, bool p_peek) { ERR_FAIL_COND_V(!is_open(), ERR_UNCONFIGURED); struct sockaddr_storage from; socklen_t len = sizeof(struct sockaddr_storage); memset(&from, 0, len); - r_read = ::recvfrom(_sock, SOCK_BUF(p_buffer), p_len, 0, (struct sockaddr *)&from, &len); + r_read = ::recvfrom(_sock, SOCK_BUF(p_buffer), p_len, p_peek ? MSG_PEEK : 0, (struct sockaddr *)&from, &len); if (r_read < 0) { NetError err = _get_socket_error(); @@ -673,22 +673,27 @@ void NetSocketPosix::set_tcp_no_delay_enabled(bool p_enabled) { void NetSocketPosix::set_reuse_address_enabled(bool p_enabled) { ERR_FAIL_COND(!is_open()); +// On Windows, enabling SO_REUSEADDR actually would also enable reuse port, very bad on TCP. Denying... +// Windows does not have this option, SO_REUSEADDR in this magical world means SO_REUSEPORT +#ifndef WINDOWS_ENABLED int par = p_enabled ? 1 : 0; if (setsockopt(_sock, SOL_SOCKET, SO_REUSEADDR, SOCK_CBUF(&par), sizeof(int)) < 0) { WARN_PRINT("Unable to set socket REUSEADDR option!"); } +#endif } void NetSocketPosix::set_reuse_port_enabled(bool p_enabled) { -// Windows does not have this option, as it is always ON when setting REUSEADDR. -#ifndef WINDOWS_ENABLED ERR_FAIL_COND(!is_open()); +// See comment above... +#ifdef WINDOWS_ENABLED +#define SO_REUSEPORT SO_REUSEADDR +#endif int par = p_enabled ? 1 : 0; if (setsockopt(_sock, SOL_SOCKET, SO_REUSEPORT, SOCK_CBUF(&par), sizeof(int)) < 0) { WARN_PRINT("Unable to set socket REUSEPORT option!"); } -#endif } bool NetSocketPosix::is_open() const { diff --git a/drivers/unix/net_socket_posix.h b/drivers/unix/net_socket_posix.h index 25ac6e2e56..0a19967265 100644 --- a/drivers/unix/net_socket_posix.h +++ b/drivers/unix/net_socket_posix.h @@ -81,7 +81,7 @@ public: virtual Error connect_to_host(IP_Address p_host, uint16_t p_port); virtual Error poll(PollType p_type, int timeout) const; virtual Error recv(uint8_t *p_buffer, int p_len, int &r_read); - virtual Error recvfrom(uint8_t *p_buffer, int p_len, int &r_read, IP_Address &r_ip, uint16_t &r_port); + virtual Error recvfrom(uint8_t *p_buffer, int p_len, int &r_read, IP_Address &r_ip, uint16_t &r_port, bool p_peek = false); virtual Error send(const uint8_t *p_buffer, int p_len, int &r_sent); virtual Error sendto(const uint8_t *p_buffer, int p_len, int &r_sent, IP_Address p_ip, uint16_t p_port); virtual Ref<NetSocket> accept(IP_Address &r_ip, uint16_t &r_port); diff --git a/drivers/vulkan/SCsub b/drivers/vulkan/SCsub index 8d6eb6b199..85a5ae8d26 100644 --- a/drivers/vulkan/SCsub +++ b/drivers/vulkan/SCsub @@ -49,6 +49,14 @@ if env['builtin_vulkan']: 'FALLBACK_DATA_DIRS=\\"%s\\"' % '/usr/local/share:/usr/share', 'FALLBACK_CONFIG_DIRS=\\"%s\\"' % '/etc/xdg' ]) + elif env['platform'] == "iphone": + env_thirdparty.AppendUnique(CPPDEFINES=[ + 'VK_USE_PLATFORM_IOS_MVK', + 'VULKAN_NON_CMAKE_BUILD', + 'SYSCONFDIR=\\"%s\\"' % '/etc', + 'FALLBACK_DATA_DIRS=\\"%s\\"' % '/usr/local/share:/usr/share', + 'FALLBACK_CONFIG_DIRS=\\"%s\\"' % '/etc/xdg' + ]) elif env['platform'] == "x11": env_thirdparty.AppendUnique(CPPDEFINES=[ 'VK_USE_PLATFORM_XLIB_KHR', @@ -57,6 +65,10 @@ if env['builtin_vulkan']: 'FALLBACK_DATA_DIRS=\\"%s\\"' % '/usr/local/share:/usr/share', 'FALLBACK_CONFIG_DIRS=\\"%s\\"' % '/etc/xdg' ]) + import platform + if (platform.system() == "Linux"): + # In glibc since 2.17 and musl libc since 1.1.24. Used by loader.c. + env_thirdparty.AppendUnique(CPPDEFINES=['HAVE_SECURE_GETENV']) loader_sources = [thirdparty_dir + "/loader/" + file for file in loader_sources] env_thirdparty.add_source_files(env.drivers_sources, loader_sources) diff --git a/drivers/vulkan/rendering_device_vulkan.cpp b/drivers/vulkan/rendering_device_vulkan.cpp index 4582f1c2c1..2bf8a16091 100644 --- a/drivers/vulkan/rendering_device_vulkan.cpp +++ b/drivers/vulkan/rendering_device_vulkan.cpp @@ -1557,7 +1557,7 @@ void RenderingDeviceVulkan::_buffer_memory_barrier(VkBuffer buffer, uint64_t p_f /**** TEXTURE ****/ /*****************/ -RID RenderingDeviceVulkan::texture_create(const TextureFormat &p_format, const TextureView &p_view, const Vector<PoolVector<uint8_t> > &p_data) { +RID RenderingDeviceVulkan::texture_create(const TextureFormat &p_format, const TextureView &p_view, const Vector<Vector<uint8_t> > &p_data) { _THREAD_SAFE_METHOD_ @@ -1997,8 +1997,8 @@ RID RenderingDeviceVulkan::texture_create_shared_from_slice(const TextureView &p //create view - ERR_FAIL_INDEX_V(p_mipmap, src_texture->mipmaps, RID()); - ERR_FAIL_INDEX_V(p_layer, src_texture->layers, RID()); + ERR_FAIL_UNSIGNED_INDEX_V(p_mipmap, src_texture->mipmaps, RID()); + ERR_FAIL_UNSIGNED_INDEX_V(p_layer, src_texture->layers, RID()); Texture texture = *src_texture; get_image_format_required_size(texture.format, texture.width, texture.height, texture.depth, p_mipmap + 1, &texture.width, &texture.height); @@ -2077,7 +2077,7 @@ RID RenderingDeviceVulkan::texture_create_shared_from_slice(const TextureView &p return id; } -Error RenderingDeviceVulkan::texture_update(RID p_texture, uint32_t p_layer, const PoolVector<uint8_t> &p_data, bool p_sync_with_draw) { +Error RenderingDeviceVulkan::texture_update(RID p_texture, uint32_t p_layer, const Vector<uint8_t> &p_data, bool p_sync_with_draw) { _THREAD_SAFE_METHOD_ @@ -2121,7 +2121,7 @@ Error RenderingDeviceVulkan::texture_update(RID p_texture, uint32_t p_layer, con uint32_t region_size = texture_upload_region_size_px; - PoolVector<uint8_t>::Read r = p_data.read(); + const uint8_t *r = p_data.ptr(); VkCommandBuffer command_buffer = p_sync_with_draw ? frames[frame].draw_command_buffer : frames[frame].setup_command_buffer; @@ -2153,7 +2153,7 @@ Error RenderingDeviceVulkan::texture_update(RID p_texture, uint32_t p_layer, con uint32_t depth; uint32_t image_total = get_image_format_required_size(texture->format, texture->width, texture->height, texture->depth, mm_i + 1, &width, &height, &depth); - const uint8_t *read_ptr_mipmap = r.ptr() + mipmap_offset; + const uint8_t *read_ptr_mipmap = r + mipmap_offset; image_size = image_total - mipmap_offset; for (uint32_t z = 0; z < depth; z++) { //for 3D textures, depth may be > 0 @@ -2288,12 +2288,12 @@ Error RenderingDeviceVulkan::texture_update(RID p_texture, uint32_t p_layer, con return OK; } -PoolVector<uint8_t> RenderingDeviceVulkan::_texture_get_data_from_image(Texture *tex, VkImage p_image, VmaAllocation p_allocation, uint32_t p_layer, bool p_2d) { +Vector<uint8_t> RenderingDeviceVulkan::_texture_get_data_from_image(Texture *tex, VkImage p_image, VmaAllocation p_allocation, uint32_t p_layer, bool p_2d) { uint32_t width, height, depth; uint32_t image_size = get_image_format_required_size(tex->format, tex->width, tex->height, p_2d ? 1 : tex->depth, tex->mipmaps, &width, &height, &depth); - PoolVector<uint8_t> image_data; + Vector<uint8_t> image_data; image_data.resize(image_size); void *img_mem; @@ -2305,14 +2305,14 @@ PoolVector<uint8_t> RenderingDeviceVulkan::_texture_get_data_from_image(Texture uint32_t pixel_size = get_image_format_pixel_size(tex->format); { - PoolVector<uint8_t>::Write w = image_data.write(); + uint8_t *w = image_data.ptrw(); uint32_t mipmap_offset = 0; for (uint32_t mm_i = 0; mm_i < tex->mipmaps; mm_i++) { uint32_t image_total = get_image_format_required_size(tex->format, tex->width, tex->height, p_2d ? 1 : tex->depth, mm_i + 1, &width, &height, &depth); - uint8_t *write_ptr_mipmap = w.ptr() + mipmap_offset; + uint8_t *write_ptr_mipmap = w + mipmap_offset; image_size = image_total - mipmap_offset; VkImageSubresource image_sub_resorce; @@ -2355,23 +2355,23 @@ PoolVector<uint8_t> RenderingDeviceVulkan::_texture_get_data_from_image(Texture return image_data; } -PoolVector<uint8_t> RenderingDeviceVulkan::texture_get_data(RID p_texture, uint32_t p_layer) { +Vector<uint8_t> RenderingDeviceVulkan::texture_get_data(RID p_texture, uint32_t p_layer) { _THREAD_SAFE_METHOD_ Texture *tex = texture_owner.getornull(p_texture); - ERR_FAIL_COND_V(!tex, PoolVector<uint8_t>()); + ERR_FAIL_COND_V(!tex, Vector<uint8_t>()); - ERR_FAIL_COND_V_MSG(tex->bound, PoolVector<uint8_t>(), + ERR_FAIL_COND_V_MSG(tex->bound, Vector<uint8_t>(), "Texture can't be retrieved while a render pass that uses it is being created. Ensure render pass is finalized (and that it was created with RENDER_PASS_CONTENTS_FINISH) to unbind this texture."); - ERR_FAIL_COND_V_MSG(!(tex->usage_flags & TEXTURE_USAGE_CAN_COPY_FROM_BIT), PoolVector<uint8_t>(), + ERR_FAIL_COND_V_MSG(!(tex->usage_flags & TEXTURE_USAGE_CAN_COPY_FROM_BIT), Vector<uint8_t>(), "Texture requires the TEXTURE_USAGE_CAN_COPY_FROM_BIT in order to be retrieved."); uint32_t layer_count = tex->layers; if (tex->type == TEXTURE_TYPE_CUBE || tex->type == TEXTURE_TYPE_CUBE_ARRAY) { layer_count *= 6; } - ERR_FAIL_COND_V(p_layer >= layer_count, PoolVector<uint8_t>()); + ERR_FAIL_COND_V(p_layer >= layer_count, Vector<uint8_t>()); if (tex->usage_flags & TEXTURE_USAGE_CPU_READ_BIT) { //does not need anything fancy, map and read. @@ -2469,15 +2469,15 @@ PoolVector<uint8_t> RenderingDeviceVulkan::texture_get_data(RID p_texture, uint3 void *buffer_mem; VkResult vkerr = vmaMapMemory(allocator, tmp_buffer.allocation, &buffer_mem); if (vkerr) { - ERR_FAIL_V(PoolVector<uint8_t>()); + ERR_FAIL_V(Vector<uint8_t>()); } - PoolVector<uint8_t> buffer_data; + Vector<uint8_t> buffer_data; { buffer_data.resize(buffer_size); - PoolVector<uint8_t>::Write w = buffer_data.write(); - copymem(w.ptr(), buffer_mem, buffer_size); + uint8_t *w = buffer_data.ptrw(); + copymem(w, buffer_mem, buffer_size); } vmaUnmapMemory(allocator, tmp_buffer.allocation); @@ -3135,7 +3135,7 @@ RID RenderingDeviceVulkan::sampler_create(const SamplerState &p_state) { /**** VERTEX ARRAY ****/ /**********************/ -RID RenderingDeviceVulkan::vertex_buffer_create(uint32_t p_size_bytes, const PoolVector<uint8_t> &p_data) { +RID RenderingDeviceVulkan::vertex_buffer_create(uint32_t p_size_bytes, const Vector<uint8_t> &p_data) { _THREAD_SAFE_METHOD_ @@ -3145,8 +3145,8 @@ RID RenderingDeviceVulkan::vertex_buffer_create(uint32_t p_size_bytes, const Poo _buffer_allocate(&buffer, p_size_bytes, VK_BUFFER_USAGE_TRANSFER_SRC_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT | VK_BUFFER_USAGE_VERTEX_BUFFER_BIT, VMA_MEMORY_USAGE_GPU_ONLY); if (p_data.size()) { uint64_t data_size = p_data.size(); - PoolVector<uint8_t>::Read r = p_data.read(); - _buffer_update(&buffer, 0, r.ptr(), data_size); + const uint8_t *r = p_data.ptr(); + _buffer_update(&buffer, 0, r, data_size); _buffer_memory_barrier(buffer.buffer, 0, data_size, VK_PIPELINE_STAGE_TRANSFER_BIT, VK_PIPELINE_STAGE_VERTEX_INPUT_BIT, VK_ACCESS_TRANSFER_WRITE_BIT, VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT, false); } @@ -3263,7 +3263,7 @@ RID RenderingDeviceVulkan::vertex_array_create(uint32_t p_vertex_count, VertexFo return id; } -RID RenderingDeviceVulkan::index_buffer_create(uint32_t p_index_count, IndexBufferFormat p_format, const PoolVector<uint8_t> &p_data, bool p_use_restart_indices) { +RID RenderingDeviceVulkan::index_buffer_create(uint32_t p_index_count, IndexBufferFormat p_format, const Vector<uint8_t> &p_data, bool p_use_restart_indices) { _THREAD_SAFE_METHOD_ @@ -3279,9 +3279,9 @@ RID RenderingDeviceVulkan::index_buffer_create(uint32_t p_index_count, IndexBuff index_buffer.max_index = 0; ERR_FAIL_COND_V_MSG((uint32_t)p_data.size() != size_bytes, RID(), "Default index buffer initializer array size (" + itos(p_data.size()) + ") does not match format required size (" + itos(size_bytes) + ")."); - PoolVector<uint8_t>::Read r = p_data.read(); + const uint8_t *r = p_data.ptr(); if (p_format == INDEX_BUFFER_FORMAT_UINT16) { - const uint16_t *index16 = (const uint16_t *)r.ptr(); + const uint16_t *index16 = (const uint16_t *)r; for (uint32_t i = 0; i < p_index_count; i++) { if (p_use_restart_indices && index16[i] == 0xFFFF) { continue; //restart index, ingnore @@ -3289,7 +3289,7 @@ RID RenderingDeviceVulkan::index_buffer_create(uint32_t p_index_count, IndexBuff index_buffer.max_index = MAX(index16[i], index_buffer.max_index); } } else { - const uint32_t *index32 = (const uint32_t *)r.ptr(); + const uint32_t *index32 = (const uint32_t *)r; for (uint32_t i = 0; i < p_index_count; i++) { if (p_use_restart_indices && index32[i] == 0xFFFFFFFF) { continue; //restart index, ingnore @@ -3306,8 +3306,8 @@ RID RenderingDeviceVulkan::index_buffer_create(uint32_t p_index_count, IndexBuff _buffer_allocate(&index_buffer, size_bytes, VK_BUFFER_USAGE_TRANSFER_SRC_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT | VK_BUFFER_USAGE_INDEX_BUFFER_BIT, VMA_MEMORY_USAGE_GPU_ONLY); if (p_data.size()) { uint64_t data_size = p_data.size(); - PoolVector<uint8_t>::Read r = p_data.read(); - _buffer_update(&index_buffer, 0, r.ptr(), data_size); + const uint8_t *r = p_data.ptr(); + _buffer_update(&index_buffer, 0, r, data_size); _buffer_memory_barrier(index_buffer.buffer, 0, data_size, VK_PIPELINE_STAGE_TRANSFER_BIT, VK_PIPELINE_STAGE_VERTEX_INPUT_BIT, VK_ACCESS_TRANSFER_WRITE_BIT, VK_ACCESS_INDEX_READ_BIT, false); } return index_buffer_owner.make_rid(index_buffer); @@ -3606,8 +3606,8 @@ RID RenderingDeviceVulkan::shader_create(const Vector<ShaderStageData> &p_stages { SpvReflectShaderModule module; - PoolVector<uint8_t>::Read spirv = p_stages[i].spir_v.read(); - SpvReflectResult result = spvReflectCreateShaderModule(p_stages[i].spir_v.size(), spirv.ptr(), &module); + const uint8_t *spirv = p_stages[i].spir_v.ptr(); + SpvReflectResult result = spvReflectCreateShaderModule(p_stages[i].spir_v.size(), spirv, &module); ERR_FAIL_COND_V_MSG(result != SPV_REFLECT_RESULT_SUCCESS, RID(), "Reflection of SPIR-V shader stage '" + String(shader_stage_names[p_stages[i].shader_stage]) + "' failed parsing shader."); @@ -3872,9 +3872,9 @@ RID RenderingDeviceVulkan::shader_create(const Vector<ShaderStageData> &p_stages shader_module_create_info.pNext = NULL; shader_module_create_info.flags = 0; shader_module_create_info.codeSize = p_stages[i].spir_v.size(); - PoolVector<uint8_t>::Read r = p_stages[i].spir_v.read(); + const uint8_t *r = p_stages[i].spir_v.ptr(); - shader_module_create_info.pCode = (const uint32_t *)r.ptr(); + shader_module_create_info.pCode = (const uint32_t *)r; VkShaderModule module; VkResult res = vkCreateShaderModule(device, &shader_module_create_info, NULL, &module); @@ -4016,7 +4016,7 @@ uint32_t RenderingDeviceVulkan::shader_get_vertex_input_attribute_mask(RID p_sha /**** UNIFORMS ****/ /******************/ -RID RenderingDeviceVulkan::uniform_buffer_create(uint32_t p_size_bytes, const PoolVector<uint8_t> &p_data) { +RID RenderingDeviceVulkan::uniform_buffer_create(uint32_t p_size_bytes, const Vector<uint8_t> &p_data) { _THREAD_SAFE_METHOD_ @@ -4027,14 +4027,14 @@ RID RenderingDeviceVulkan::uniform_buffer_create(uint32_t p_size_bytes, const Po ERR_FAIL_COND_V(err != OK, RID()); if (p_data.size()) { uint64_t data_size = p_data.size(); - PoolVector<uint8_t>::Read r = p_data.read(); - _buffer_update(&buffer, 0, r.ptr(), data_size); + const uint8_t *r = p_data.ptr(); + _buffer_update(&buffer, 0, r, data_size); _buffer_memory_barrier(buffer.buffer, 0, data_size, VK_PIPELINE_STAGE_TRANSFER_BIT, VK_PIPELINE_STAGE_VERTEX_SHADER_BIT | VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT | VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT, VK_ACCESS_TRANSFER_WRITE_BIT, VK_ACCESS_UNIFORM_READ_BIT, false); } return uniform_buffer_owner.make_rid(buffer); } -RID RenderingDeviceVulkan::storage_buffer_create(uint32_t p_size_bytes, const PoolVector<uint8_t> &p_data) { +RID RenderingDeviceVulkan::storage_buffer_create(uint32_t p_size_bytes, const Vector<uint8_t> &p_data) { _THREAD_SAFE_METHOD_ @@ -4046,14 +4046,14 @@ RID RenderingDeviceVulkan::storage_buffer_create(uint32_t p_size_bytes, const Po if (p_data.size()) { uint64_t data_size = p_data.size(); - PoolVector<uint8_t>::Read r = p_data.read(); - _buffer_update(&buffer, 0, r.ptr(), data_size); + const uint8_t *r = p_data.ptr(); + _buffer_update(&buffer, 0, r, data_size); _buffer_memory_barrier(buffer.buffer, 0, data_size, VK_PIPELINE_STAGE_TRANSFER_BIT, VK_PIPELINE_STAGE_VERTEX_SHADER_BIT | VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT | VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT, VK_ACCESS_TRANSFER_WRITE_BIT, VK_ACCESS_SHADER_READ_BIT | VK_ACCESS_SHADER_WRITE_BIT, false); } return storage_buffer_owner.make_rid(buffer); } -RID RenderingDeviceVulkan::texture_buffer_create(uint32_t p_size_elements, DataFormat p_format, const PoolVector<uint8_t> &p_data) { +RID RenderingDeviceVulkan::texture_buffer_create(uint32_t p_size_elements, DataFormat p_format, const Vector<uint8_t> &p_data) { _THREAD_SAFE_METHOD_ @@ -4069,8 +4069,8 @@ RID RenderingDeviceVulkan::texture_buffer_create(uint32_t p_size_elements, DataF if (p_data.size()) { uint64_t data_size = p_data.size(); - PoolVector<uint8_t>::Read r = p_data.read(); - _buffer_update(&texture_buffer.buffer, 0, r.ptr(), data_size); + const uint8_t *r = p_data.ptr(); + _buffer_update(&texture_buffer.buffer, 0, r, data_size); _buffer_memory_barrier(texture_buffer.buffer.buffer, 0, data_size, VK_PIPELINE_STAGE_TRANSFER_BIT, VK_PIPELINE_STAGE_VERTEX_SHADER_BIT | VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT | VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT, VK_ACCESS_TRANSFER_WRITE_BIT, VK_ACCESS_SHADER_READ_BIT, false); } @@ -4689,7 +4689,7 @@ Error RenderingDeviceVulkan::buffer_update(RID p_buffer, uint32_t p_offset, uint return err; } -PoolVector<uint8_t> RenderingDeviceVulkan::buffer_get_data(RID p_buffer) { +Vector<uint8_t> RenderingDeviceVulkan::buffer_get_data(RID p_buffer) { _THREAD_SAFE_METHOD_ @@ -4703,7 +4703,7 @@ PoolVector<uint8_t> RenderingDeviceVulkan::buffer_get_data(RID p_buffer) { } else if (storage_buffer_owner.owns(p_buffer)) { buffer = storage_buffer_owner.getornull(p_buffer); } else { - ERR_FAIL_V_MSG(PoolVector<uint8_t>(), "Buffer is either invalid or this type of buffer can't be retrieved. Only Index and Vertex buffers allow retrieving."); + ERR_FAIL_V_MSG(Vector<uint8_t>(), "Buffer is either invalid or this type of buffer can't be retrieved. Only Index and Vertex buffers allow retrieving."); } VkCommandBuffer command_buffer = frames[frame].setup_command_buffer; @@ -4720,15 +4720,15 @@ PoolVector<uint8_t> RenderingDeviceVulkan::buffer_get_data(RID p_buffer) { void *buffer_mem; VkResult vkerr = vmaMapMemory(allocator, tmp_buffer.allocation, &buffer_mem); if (vkerr) { - ERR_FAIL_V(PoolVector<uint8_t>()); + ERR_FAIL_V(Vector<uint8_t>()); } - PoolVector<uint8_t> buffer_data; + Vector<uint8_t> buffer_data; { buffer_data.resize(buffer->size); - PoolVector<uint8_t>::Write w = buffer_data.write(); - copymem(w.ptr(), buffer_mem, buffer->size); + uint8_t *w = buffer_data.ptrw(); + copymem(w, buffer_mem, buffer->size); } vmaUnmapMemory(allocator, tmp_buffer.allocation); @@ -5977,7 +5977,7 @@ void RenderingDeviceVulkan::draw_list_draw(DrawListID p_list, bool p_use_indices if (p_procedural_vertices > 0) { #ifdef DEBUG_ENABLED - ERR_FAIL_COND_MSG(dl->validation.pipeline_vertex_format == INVALID_ID, + ERR_FAIL_COND_MSG(dl->validation.pipeline_vertex_format != INVALID_ID, "Procedural vertices requested, but pipeline expects a vertex array."); #endif to_draw = p_procedural_vertices; @@ -6940,15 +6940,15 @@ uint64_t RenderingDeviceVulkan::get_captured_timestamps_frame() const { } uint64_t RenderingDeviceVulkan::get_captured_timestamp_gpu_time(uint32_t p_index) const { - ERR_FAIL_INDEX_V(p_index, frames[frame].timestamp_result_count, 0); + ERR_FAIL_UNSIGNED_INDEX_V(p_index, frames[frame].timestamp_result_count, 0); return frames[frame].timestamp_result_values[p_index] * limits.timestampPeriod; } uint64_t RenderingDeviceVulkan::get_captured_timestamp_cpu_time(uint32_t p_index) const { - ERR_FAIL_INDEX_V(p_index, frames[frame].timestamp_result_count, 0); + ERR_FAIL_UNSIGNED_INDEX_V(p_index, frames[frame].timestamp_result_count, 0); return frames[frame].timestamp_cpu_result_values[p_index]; } String RenderingDeviceVulkan::get_captured_timestamp_name(uint32_t p_index) const { - ERR_FAIL_INDEX_V(p_index, frames[frame].timestamp_result_count, String()); + ERR_FAIL_UNSIGNED_INDEX_V(p_index, frames[frame].timestamp_result_count, String()); return frames[frame].timestamp_result_names[p_index]; } diff --git a/drivers/vulkan/rendering_device_vulkan.h b/drivers/vulkan/rendering_device_vulkan.h index 8ef24d319b..30c10e922e 100644 --- a/drivers/vulkan/rendering_device_vulkan.h +++ b/drivers/vulkan/rendering_device_vulkan.h @@ -150,7 +150,7 @@ class RenderingDeviceVulkan : public RenderingDevice { RID_Owner<Texture, true> texture_owner; uint32_t texture_upload_region_size_px; - PoolVector<uint8_t> _texture_get_data_from_image(Texture *tex, VkImage p_image, VmaAllocation p_allocation, uint32_t p_layer, bool p_2d = false); + Vector<uint8_t> _texture_get_data_from_image(Texture *tex, VkImage p_image, VmaAllocation p_allocation, uint32_t p_layer, bool p_2d = false); /*****************/ /**** SAMPLER ****/ @@ -354,7 +354,9 @@ class RenderingDeviceVulkan : public RenderingDevice { if (a.stride != b.stride) { return false; } - return a.frequency != b.frequency; + if (a.frequency != b.frequency) { + return false; + } } return true; //they are equal } @@ -966,12 +968,12 @@ class RenderingDeviceVulkan : public RenderingDevice { void _free_rids(T &p_owner, const char *p_type); public: - virtual RID texture_create(const TextureFormat &p_format, const TextureView &p_view, const Vector<PoolVector<uint8_t> > &p_data = Vector<PoolVector<uint8_t> >()); + virtual RID texture_create(const TextureFormat &p_format, const TextureView &p_view, const Vector<Vector<uint8_t> > &p_data = Vector<Vector<uint8_t> >()); virtual RID texture_create_shared(const TextureView &p_view, RID p_with_texture); virtual RID texture_create_shared_from_slice(const TextureView &p_view, RID p_with_texture, uint32_t p_layer, uint32_t p_mipmap, TextureSliceType p_slice_type = TEXTURE_SLICE_2D); - virtual Error texture_update(RID p_texture, uint32_t p_layer, const PoolVector<uint8_t> &p_data, bool p_sync_with_draw = false); - virtual PoolVector<uint8_t> texture_get_data(RID p_texture, uint32_t p_layer); + virtual Error texture_update(RID p_texture, uint32_t p_layer, const Vector<uint8_t> &p_data, bool p_sync_with_draw = false); + virtual Vector<uint8_t> texture_get_data(RID p_texture, uint32_t p_layer); virtual bool texture_is_format_supported_for_usage(DataFormat p_format, uint32_t p_usage) const; virtual bool texture_is_shared(RID p_texture); @@ -1001,13 +1003,13 @@ public: /**** VERTEX ARRAY ****/ /**********************/ - virtual RID vertex_buffer_create(uint32_t p_size_bytes, const PoolVector<uint8_t> &p_data = PoolVector<uint8_t>()); + virtual RID vertex_buffer_create(uint32_t p_size_bytes, const Vector<uint8_t> &p_data = Vector<uint8_t>()); // Internally reference counted, this ID is warranted to be unique for the same description, but needs to be freed as many times as it was allocated virtual VertexFormatID vertex_format_create(const Vector<VertexDescription> &p_vertex_formats); virtual RID vertex_array_create(uint32_t p_vertex_count, VertexFormatID p_vertex_format, const Vector<RID> &p_src_buffers); - virtual RID index_buffer_create(uint32_t p_size_indices, IndexBufferFormat p_format, const PoolVector<uint8_t> &p_data = PoolVector<uint8_t>(), bool p_use_restart_indices = false); + virtual RID index_buffer_create(uint32_t p_size_indices, IndexBufferFormat p_format, const Vector<uint8_t> &p_data = Vector<uint8_t>(), bool p_use_restart_indices = false); virtual RID index_array_create(RID p_index_buffer, uint32_t p_index_offset, uint32_t p_index_count); @@ -1022,15 +1024,15 @@ public: /**** UNIFORM ****/ /*****************/ - virtual RID uniform_buffer_create(uint32_t p_size_bytes, const PoolVector<uint8_t> &p_data = PoolVector<uint8_t>()); - virtual RID storage_buffer_create(uint32_t p_size_bytes, const PoolVector<uint8_t> &p_data = PoolVector<uint8_t>()); - virtual RID texture_buffer_create(uint32_t p_size_elements, DataFormat p_format, const PoolVector<uint8_t> &p_data = PoolVector<uint8_t>()); + virtual RID uniform_buffer_create(uint32_t p_size_bytes, const Vector<uint8_t> &p_data = Vector<uint8_t>()); + virtual RID storage_buffer_create(uint32_t p_size_bytes, const Vector<uint8_t> &p_data = Vector<uint8_t>()); + virtual RID texture_buffer_create(uint32_t p_size_elements, DataFormat p_format, const Vector<uint8_t> &p_data = Vector<uint8_t>()); virtual RID uniform_set_create(const Vector<Uniform> &p_uniforms, RID p_shader, uint32_t p_shader_set); virtual bool uniform_set_is_valid(RID p_uniform_set); virtual Error buffer_update(RID p_buffer, uint32_t p_offset, uint32_t p_size, const void *p_data, bool p_sync_with_draw = false); //works for any buffer - virtual PoolVector<uint8_t> buffer_get_data(RID p_buffer); + virtual Vector<uint8_t> buffer_get_data(RID p_buffer); /*************************/ /**** RENDER PIPELINE ****/ diff --git a/drivers/vulkan/vulkan_context.cpp b/drivers/vulkan/vulkan_context.cpp index 98464bc8d1..7c691340ca 100644 --- a/drivers/vulkan/vulkan_context.cpp +++ b/drivers/vulkan/vulkan_context.cpp @@ -29,11 +29,14 @@ /*************************************************************************/ #include "vulkan_context.h" + #include "core/engine.h" -#include "core/print_string.h" #include "core/project_settings.h" +#include "core/ustring.h" #include "core/version.h" + #include "vk_enum_string_helper.h" + #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -45,94 +48,103 @@ VKAPI_ATTR VkBool32 VKAPI_CALL VulkanContext::_debug_messenger_callback(VkDebugU VkDebugUtilsMessageTypeFlagsEXT messageType, const VkDebugUtilsMessengerCallbackDataEXT *pCallbackData, void *pUserData) { - char prefix[64] = ""; - char *message = (char *)malloc(strlen(pCallbackData->pMessage) + 5000); - ERR_FAIL_COND_V(!message, false); - //This error needs to be ignored because the AMD allocator will mix up memory types on IGP processors + // This error needs to be ignored because the AMD allocator will mix up memory types on IGP processors. if (strstr(pCallbackData->pMessage, "Mapping an image with layout") != NULL && strstr(pCallbackData->pMessage, "can result in undefined behavior if this memory is used by the device") != NULL) { - free(message); return VK_FALSE; } - // This needs to be ignored because Validator is wrong here + // This needs to be ignored because Validator is wrong here. if (strstr(pCallbackData->pMessage, "SPIR-V module not valid: Pointer operand") != NULL && strstr(pCallbackData->pMessage, "must be a memory object") != NULL) { - free(message); + return VK_FALSE; + } + // Workaround for Vulkan-Loader usability bug: https://github.com/KhronosGroup/Vulkan-Loader/issues/262. + if (strstr(pCallbackData->pMessage, "wrong ELF class: ELFCLASS32") != NULL) { return VK_FALSE; } if (strstr(pCallbackData->pMessageIdName, "UNASSIGNED-CoreValidation-DrawState-ClearCmdBeforeDraw") != NULL) { - free(message); return VK_FALSE; } - if (messageSeverity & VK_DEBUG_UTILS_MESSAGE_SEVERITY_VERBOSE_BIT_EXT) { - strcat(prefix, "VERBOSE : "); - } else if (messageSeverity & VK_DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT) { - strcat(prefix, "INFO : "); - } else if (messageSeverity & VK_DEBUG_UTILS_MESSAGE_SEVERITY_WARNING_BIT_EXT) { - strcat(prefix, "WARNING : "); - } else if (messageSeverity & VK_DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT) { - strcat(prefix, "ERROR : "); + String severity_string; + switch (messageSeverity) { + case VK_DEBUG_UTILS_MESSAGE_SEVERITY_VERBOSE_BIT_EXT: + severity_string = "VERBOSE : "; + break; + case VK_DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT: + severity_string = "INFO : "; + break; + case VK_DEBUG_UTILS_MESSAGE_SEVERITY_WARNING_BIT_EXT: + severity_string = "WARNING : "; + break; + case VK_DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT: + severity_string = "ERROR : "; + break; + case VK_DEBUG_UTILS_MESSAGE_SEVERITY_FLAG_BITS_MAX_ENUM_EXT: + break; } - if (messageType & VK_DEBUG_UTILS_MESSAGE_TYPE_GENERAL_BIT_EXT) { - strcat(prefix, "GENERAL"); - } else { - if (messageType & VK_DEBUG_UTILS_MESSAGE_TYPE_VALIDATION_BIT_EXT) { - strcat(prefix, "VALIDATION"); - //validation_error = 1; - } - if (messageType & VK_DEBUG_UTILS_MESSAGE_TYPE_PERFORMANCE_BIT_EXT) { - if (messageType & VK_DEBUG_UTILS_MESSAGE_TYPE_VALIDATION_BIT_EXT) { - strcat(prefix, "|"); - } - strcat(prefix, "PERFORMANCE"); - } + String type_string; + switch (messageType) { + case (VK_DEBUG_UTILS_MESSAGE_TYPE_GENERAL_BIT_EXT): + type_string = "GENERAL"; + break; + case (VK_DEBUG_UTILS_MESSAGE_TYPE_VALIDATION_BIT_EXT): + type_string = "VALIDATION"; + break; + case (VK_DEBUG_UTILS_MESSAGE_TYPE_PERFORMANCE_BIT_EXT): + type_string = "PERFORMANCE"; + break; + case (VK_DEBUG_UTILS_MESSAGE_TYPE_VALIDATION_BIT_EXT & VK_DEBUG_UTILS_MESSAGE_TYPE_PERFORMANCE_BIT_EXT): + type_string = "VALIDATION|PERFORMANCE"; + break; } - sprintf(message, "%s - Message Id Number: %d | Message Id Name: %s\n\t%s\n", prefix, pCallbackData->messageIdNumber, - pCallbackData->pMessageIdName, pCallbackData->pMessage); - + String objects_string; if (pCallbackData->objectCount > 0) { - char tmp_message[500]; - sprintf(tmp_message, "\n\tObjects - %d\n", pCallbackData->objectCount); - strcat(message, tmp_message); + objects_string = "\n\tObjects - " + String::num_int64(pCallbackData->objectCount); for (uint32_t object = 0; object < pCallbackData->objectCount; ++object) { + objects_string += + "\n\t\tObject[" + String::num_int64(object) + "]" + + " - " + string_VkObjectType(pCallbackData->pObjects[object].objectType) + + ", Handle " + String::num_int64(pCallbackData->pObjects[object].objectHandle); if (NULL != pCallbackData->pObjects[object].pObjectName && strlen(pCallbackData->pObjects[object].pObjectName) > 0) { - sprintf(tmp_message, "\t\tObject[%d] - %s, Handle %p, Name \"%s\"\n", object, - string_VkObjectType(pCallbackData->pObjects[object].objectType), - (void *)(pCallbackData->pObjects[object].objectHandle), pCallbackData->pObjects[object].pObjectName); - } else { - sprintf(tmp_message, "\t\tObject[%d] - %s, Handle %p\n", object, - string_VkObjectType(pCallbackData->pObjects[object].objectType), - (void *)(pCallbackData->pObjects[object].objectHandle)); + objects_string += ", Name \"" + String(pCallbackData->pObjects[object].pObjectName) + "\""; } - strcat(message, tmp_message); } } + + String labels_string; if (pCallbackData->cmdBufLabelCount > 0) { - char tmp_message[500]; - sprintf(tmp_message, "\n\tCommand Buffer Labels - %d\n", pCallbackData->cmdBufLabelCount); - strcat(message, tmp_message); + labels_string = "\n\tCommand Buffer Labels - " + String::num_int64(pCallbackData->cmdBufLabelCount); for (uint32_t cmd_buf_label = 0; cmd_buf_label < pCallbackData->cmdBufLabelCount; ++cmd_buf_label) { - sprintf(tmp_message, "\t\tLabel[%d] - %s { %f, %f, %f, %f}\n", cmd_buf_label, - pCallbackData->pCmdBufLabels[cmd_buf_label].pLabelName, pCallbackData->pCmdBufLabels[cmd_buf_label].color[0], - pCallbackData->pCmdBufLabels[cmd_buf_label].color[1], pCallbackData->pCmdBufLabels[cmd_buf_label].color[2], - pCallbackData->pCmdBufLabels[cmd_buf_label].color[3]); - strcat(message, tmp_message); + labels_string += + "\n\t\tLabel[" + String::num_int64(cmd_buf_label) + "]" + + " - " + pCallbackData->pCmdBufLabels[cmd_buf_label].pLabelName + + "{ "; + for (int color_idx = 0; color_idx < 4; ++color_idx) { + labels_string += String::num(pCallbackData->pCmdBufLabels[cmd_buf_label].color[color_idx]); + if (color_idx < 3) { + labels_string += ", "; + } + } + labels_string += " }"; } } - ERR_PRINT(message); + String error_message(severity_string + type_string + + " - Message Id Number: " + String::num_int64(pCallbackData->messageIdNumber) + + " | Message Id Name: " + pCallbackData->pMessageIdName + + "\n\t" + pCallbackData->pMessage + + objects_string + labels_string); - free(message); + ERR_PRINT(error_message); - if (Engine::get_singleton()->is_abort_on_gpu_errors_enabled()) { - abort(); - } - // Don't bail out, but keep going. - return false; + CRASH_COND_MSG(Engine::get_singleton()->is_abort_on_gpu_errors_enabled(), + "Crashing, because abort on GPU errors is enabled."); + + return VK_FALSE; } VkBool32 VulkanContext::_check_layers(uint32_t check_count, const char **check_names, uint32_t layer_count, VkLayerProperties *layers) { @@ -1335,6 +1347,7 @@ Error VulkanContext::swap_buffers() { /*swapchainCount*/ 0, /*pSwapchain*/ NULL, /*pImageIndices*/ NULL, + /*pResults*/ NULL, }; VkSwapchainKHR *pSwapchains = (VkSwapchainKHR *)alloca(sizeof(VkSwapchainKHR *) * windows.size()); diff --git a/drivers/winmidi/midi_driver_winmidi.cpp b/drivers/winmidi/midi_driver_winmidi.cpp index 01c194b7d8..57fb9b0e57 100644 --- a/drivers/winmidi/midi_driver_winmidi.cpp +++ b/drivers/winmidi/midi_driver_winmidi.cpp @@ -66,9 +66,9 @@ Error MIDIDriverWinMidi::open() { return OK; } -PoolStringArray MIDIDriverWinMidi::get_connected_inputs() { +PackedStringArray MIDIDriverWinMidi::get_connected_inputs() { - PoolStringArray list; + PackedStringArray list; for (int i = 0; i < connected_sources.size(); i++) { HMIDIIN midi_in = connected_sources[i]; diff --git a/drivers/winmidi/midi_driver_winmidi.h b/drivers/winmidi/midi_driver_winmidi.h index a689d3a500..c240c8c7aa 100644 --- a/drivers/winmidi/midi_driver_winmidi.h +++ b/drivers/winmidi/midi_driver_winmidi.h @@ -51,7 +51,7 @@ public: virtual Error open(); virtual void close(); - virtual PoolStringArray get_connected_inputs(); + virtual PackedStringArray get_connected_inputs(); MIDIDriverWinMidi(); virtual ~MIDIDriverWinMidi(); diff --git a/editor/SCsub b/editor/SCsub index 2b560f68e8..4431166ee6 100644 --- a/editor/SCsub +++ b/editor/SCsub @@ -82,6 +82,7 @@ if env['tools']: SConscript('collada/SCsub') SConscript('doc/SCsub') + SConscript('debugger/SCsub') SConscript('fileserver/SCsub') SConscript('icons/SCsub') SConscript('import/SCsub') diff --git a/editor/animation_bezier_editor.cpp b/editor/animation_bezier_editor.cpp index 719e4af6b5..69e3c3b19d 100644 --- a/editor/animation_bezier_editor.cpp +++ b/editor/animation_bezier_editor.cpp @@ -502,12 +502,12 @@ void AnimationBezierTrackEdit::set_animation_and_track(const Ref<Animation> &p_a animation = p_animation; track = p_track; - if (is_connected("select_key", editor, "_key_selected")) - disconnect("select_key", editor, "_key_selected"); - if (is_connected("deselect_key", editor, "_key_deselected")) - disconnect("deselect_key", editor, "_key_deselected"); - connect("select_key", editor, "_key_selected", varray(p_track), CONNECT_DEFERRED); - connect("deselect_key", editor, "_key_deselected", varray(p_track), CONNECT_DEFERRED); + if (is_connected_compat("select_key", editor, "_key_selected")) + disconnect_compat("select_key", editor, "_key_selected"); + if (is_connected_compat("deselect_key", editor, "_key_deselected")) + disconnect_compat("deselect_key", editor, "_key_deselected"); + connect_compat("select_key", editor, "_key_selected", varray(p_track), CONNECT_DEFERRED); + connect_compat("deselect_key", editor, "_key_deselected", varray(p_track), CONNECT_DEFERRED); update(); } @@ -522,11 +522,11 @@ void AnimationBezierTrackEdit::set_undo_redo(UndoRedo *p_undo_redo) { void AnimationBezierTrackEdit::set_timeline(AnimationTimelineEdit *p_timeline) { timeline = p_timeline; - timeline->connect("zoom_changed", this, "_zoom_changed"); + timeline->connect_compat("zoom_changed", this, "_zoom_changed"); } void AnimationBezierTrackEdit::set_editor(AnimationTrackEditor *p_editor) { editor = p_editor; - connect("clear_selection", editor, "_clear_selection", varray(false)); + connect_compat("clear_selection", editor, "_clear_selection", varray(false)); } void AnimationBezierTrackEdit::_play_position_draw() { @@ -1150,16 +1150,16 @@ void AnimationBezierTrackEdit::_bind_methods() { ClassDB::bind_method("_clear_selection_for_anim", &AnimationBezierTrackEdit::_clear_selection_for_anim); ClassDB::bind_method("_select_at_anim", &AnimationBezierTrackEdit::_select_at_anim); - ADD_SIGNAL(MethodInfo("timeline_changed", PropertyInfo(Variant::REAL, "position"), PropertyInfo(Variant::BOOL, "drag"))); + ADD_SIGNAL(MethodInfo("timeline_changed", PropertyInfo(Variant::FLOAT, "position"), PropertyInfo(Variant::BOOL, "drag"))); ADD_SIGNAL(MethodInfo("remove_request", PropertyInfo(Variant::INT, "track"))); - ADD_SIGNAL(MethodInfo("insert_key", PropertyInfo(Variant::REAL, "ofs"))); + ADD_SIGNAL(MethodInfo("insert_key", PropertyInfo(Variant::FLOAT, "ofs"))); ADD_SIGNAL(MethodInfo("select_key", PropertyInfo(Variant::INT, "index"), PropertyInfo(Variant::BOOL, "single"))); ADD_SIGNAL(MethodInfo("deselect_key", PropertyInfo(Variant::INT, "index"))); ADD_SIGNAL(MethodInfo("clear_selection")); ADD_SIGNAL(MethodInfo("close_request")); ADD_SIGNAL(MethodInfo("move_selection_begin")); - ADD_SIGNAL(MethodInfo("move_selection", PropertyInfo(Variant::REAL, "ofs"))); + ADD_SIGNAL(MethodInfo("move_selection", PropertyInfo(Variant::FLOAT, "ofs"))); ADD_SIGNAL(MethodInfo("move_selection_commit")); ADD_SIGNAL(MethodInfo("move_selection_cancel")); } @@ -1184,7 +1184,7 @@ AnimationBezierTrackEdit::AnimationBezierTrackEdit() { play_position->set_mouse_filter(MOUSE_FILTER_PASS); add_child(play_position); play_position->set_anchors_and_margins_preset(PRESET_WIDE); - play_position->connect("draw", this, "_play_position_draw"); + play_position->connect_compat("draw", this, "_play_position_draw"); set_focus_mode(FOCUS_CLICK); v_scroll = 0; @@ -1198,7 +1198,7 @@ AnimationBezierTrackEdit::AnimationBezierTrackEdit() { menu = memnew(PopupMenu); add_child(menu); - menu->connect("id_pressed", this, "_menu_selected"); + menu->connect_compat("id_pressed", this, "_menu_selected"); //set_mouse_filter(MOUSE_FILTER_PASS); //scroll has to work too for selection } diff --git a/editor/animation_track_editor.cpp b/editor/animation_track_editor.cpp index cc64db22cc..8758fbcfc9 100644 --- a/editor/animation_track_editor.cpp +++ b/editor/animation_track_editor.cpp @@ -235,7 +235,7 @@ public: Variant::Type t = Variant::Type(int(p_value)); if (t != args[idx].get_type()) { - Variant::CallError err; + Callable::CallError err; if (Variant::can_convert(args[idx].get_type(), t)) { Variant old = args[idx]; Variant *ptrs[1] = { &old }; @@ -548,9 +548,9 @@ public: if (use_fps && animation->get_step() > 0) { float max_frame = animation->get_length() / animation->get_step(); - p_list->push_back(PropertyInfo(Variant::REAL, "frame", PROPERTY_HINT_RANGE, "0," + rtos(max_frame) + ",1")); + p_list->push_back(PropertyInfo(Variant::FLOAT, "frame", PROPERTY_HINT_RANGE, "0," + rtos(max_frame) + ",1")); } else { - p_list->push_back(PropertyInfo(Variant::REAL, "time", PROPERTY_HINT_RANGE, "0," + rtos(animation->get_length()) + ",0.01")); + p_list->push_back(PropertyInfo(Variant::FLOAT, "time", PROPERTY_HINT_RANGE, "0," + rtos(animation->get_length()) + ",0.01")); } switch (animation->track_get_type(track)) { @@ -593,7 +593,7 @@ public: } break; case Animation::TYPE_METHOD: { - p_list->push_back(PropertyInfo(Variant::STRING, "name")); + p_list->push_back(PropertyInfo(Variant::STRING_NAME, "name")); p_list->push_back(PropertyInfo(Variant::INT, "arg_count", PROPERTY_HINT_RANGE, "0,5,1")); Dictionary d = animation->track_get_key_value(track, key); @@ -617,7 +617,7 @@ public: } break; case Animation::TYPE_BEZIER: { - p_list->push_back(PropertyInfo(Variant::REAL, "value")); + p_list->push_back(PropertyInfo(Variant::FLOAT, "value")); p_list->push_back(PropertyInfo(Variant::VECTOR2, "in_handle")); p_list->push_back(PropertyInfo(Variant::VECTOR2, "out_handle")); @@ -625,8 +625,8 @@ public: case Animation::TYPE_AUDIO: { p_list->push_back(PropertyInfo(Variant::OBJECT, "stream", PROPERTY_HINT_RESOURCE_TYPE, "AudioStream")); - p_list->push_back(PropertyInfo(Variant::REAL, "start_offset", PROPERTY_HINT_RANGE, "0,3600,0.01,or_greater")); - p_list->push_back(PropertyInfo(Variant::REAL, "end_offset", PROPERTY_HINT_RANGE, "0,3600,0.01,or_greater")); + p_list->push_back(PropertyInfo(Variant::FLOAT, "start_offset", PROPERTY_HINT_RANGE, "0,3600,0.01,or_greater")); + p_list->push_back(PropertyInfo(Variant::FLOAT, "end_offset", PROPERTY_HINT_RANGE, "0,3600,0.01,or_greater")); } break; case Animation::TYPE_ANIMATION: { @@ -654,13 +654,13 @@ public: } animations += "[stop]"; - p_list->push_back(PropertyInfo(Variant::STRING, "animation", PROPERTY_HINT_ENUM, animations)); + p_list->push_back(PropertyInfo(Variant::STRING_NAME, "animation", PROPERTY_HINT_ENUM, animations)); } break; } if (animation->track_get_type(track) == Animation::TYPE_VALUE) { - p_list->push_back(PropertyInfo(Variant::REAL, "easing", PROPERTY_HINT_EXP_EASING)); + p_list->push_back(PropertyInfo(Variant::FLOAT, "easing", PROPERTY_HINT_EXP_EASING)); } } @@ -898,7 +898,7 @@ public: Variant::Type t = Variant::Type(int(p_value)); if (t != args[idx].get_type()) { - Variant::CallError err; + Callable::CallError err; if (Variant::can_convert(args[idx].get_type(), t)) { Variant old = args[idx]; Variant *ptrs[1] = { &old }; @@ -1243,9 +1243,9 @@ public: if (use_fps && animation->get_step() > 0) { float max_frame = animation->get_length() / animation->get_step(); - p_list->push_back(PropertyInfo(Variant::REAL, "frame", PROPERTY_HINT_RANGE, "0," + rtos(max_frame) + ",1")); + p_list->push_back(PropertyInfo(Variant::FLOAT, "frame", PROPERTY_HINT_RANGE, "0," + rtos(max_frame) + ",1")); } else { - p_list->push_back(PropertyInfo(Variant::REAL, "time", PROPERTY_HINT_RANGE, "0," + rtos(animation->get_length()) + ",0.01")); + p_list->push_back(PropertyInfo(Variant::FLOAT, "time", PROPERTY_HINT_RANGE, "0," + rtos(animation->get_length()) + ",0.01")); } } @@ -1289,11 +1289,11 @@ public: p_list->push_back(PropertyInfo(v.get_type(), "value", hint, hint_string)); } - p_list->push_back(PropertyInfo(Variant::REAL, "easing", PROPERTY_HINT_EXP_EASING)); + p_list->push_back(PropertyInfo(Variant::FLOAT, "easing", PROPERTY_HINT_EXP_EASING)); } break; case Animation::TYPE_METHOD: { - p_list->push_back(PropertyInfo(Variant::STRING, "name")); + p_list->push_back(PropertyInfo(Variant::STRING_NAME, "name")); p_list->push_back(PropertyInfo(Variant::INT, "arg_count", PROPERTY_HINT_RANGE, "0,5,1")); Dictionary d = animation->track_get_key_value(first_track, first_key); @@ -1316,15 +1316,15 @@ public: } break; case Animation::TYPE_BEZIER: { - p_list->push_back(PropertyInfo(Variant::REAL, "value")); + p_list->push_back(PropertyInfo(Variant::FLOAT, "value")); p_list->push_back(PropertyInfo(Variant::VECTOR2, "in_handle")); p_list->push_back(PropertyInfo(Variant::VECTOR2, "out_handle")); } break; case Animation::TYPE_AUDIO: { p_list->push_back(PropertyInfo(Variant::OBJECT, "stream", PROPERTY_HINT_RESOURCE_TYPE, "AudioStream")); - p_list->push_back(PropertyInfo(Variant::REAL, "start_offset", PROPERTY_HINT_RANGE, "0,3600,0.01,or_greater")); - p_list->push_back(PropertyInfo(Variant::REAL, "end_offset", PROPERTY_HINT_RANGE, "0,3600,0.01,or_greater")); + p_list->push_back(PropertyInfo(Variant::FLOAT, "start_offset", PROPERTY_HINT_RANGE, "0,3600,0.01,or_greater")); + p_list->push_back(PropertyInfo(Variant::FLOAT, "end_offset", PROPERTY_HINT_RANGE, "0,3600,0.01,or_greater")); } break; case Animation::TYPE_ANIMATION: { @@ -1354,7 +1354,7 @@ public: } animations += "[stop]"; - p_list->push_back(PropertyInfo(Variant::STRING, "animation", PROPERTY_HINT_ENUM, animations)); + p_list->push_back(PropertyInfo(Variant::STRING_NAME, "animation", PROPERTY_HINT_ENUM, animations)); } break; } } @@ -1697,7 +1697,7 @@ void AnimationTimelineEdit::set_undo_redo(UndoRedo *p_undo_redo) { void AnimationTimelineEdit::set_zoom(Range *p_zoom) { zoom = p_zoom; - zoom->connect("value_changed", this, "_zoom_changed"); + zoom->connect_compat("value_changed", this, "_zoom_changed"); } void AnimationTimelineEdit::set_play_position(float p_pos) { @@ -1854,9 +1854,9 @@ void AnimationTimelineEdit::_bind_methods() { ADD_SIGNAL(MethodInfo("zoom_changed")); ADD_SIGNAL(MethodInfo("name_limit_changed")); - ADD_SIGNAL(MethodInfo("timeline_changed", PropertyInfo(Variant::REAL, "position"), PropertyInfo(Variant::BOOL, "drag"))); + ADD_SIGNAL(MethodInfo("timeline_changed", PropertyInfo(Variant::FLOAT, "position"), PropertyInfo(Variant::BOOL, "drag"))); ADD_SIGNAL(MethodInfo("track_added", PropertyInfo(Variant::INT, "track"))); - ADD_SIGNAL(MethodInfo("length_changed", PropertyInfo(Variant::REAL, "size"))); + ADD_SIGNAL(MethodInfo("length_changed", PropertyInfo(Variant::FLOAT, "size"))); } AnimationTimelineEdit::AnimationTimelineEdit() { @@ -1871,7 +1871,7 @@ AnimationTimelineEdit::AnimationTimelineEdit() { play_position->set_mouse_filter(MOUSE_FILTER_PASS); add_child(play_position); play_position->set_anchors_and_margins_preset(PRESET_WIDE); - play_position->connect("draw", this, "_play_position_draw"); + play_position->connect_compat("draw", this, "_play_position_draw"); add_track = memnew(MenuButton); add_track->set_position(Vector2(0, 0)); @@ -1895,17 +1895,17 @@ AnimationTimelineEdit::AnimationTimelineEdit() { length->set_custom_minimum_size(Vector2(70 * EDSCALE, 0)); length->set_hide_slider(true); length->set_tooltip(TTR("Animation length (seconds)")); - length->connect("value_changed", this, "_anim_length_changed"); + length->connect_compat("value_changed", this, "_anim_length_changed"); len_hb->add_child(length); loop = memnew(ToolButton); loop->set_tooltip(TTR("Animation Looping")); - loop->connect("pressed", this, "_anim_loop_pressed"); + loop->connect_compat("pressed", this, "_anim_loop_pressed"); loop->set_toggle_mode(true); len_hb->add_child(loop); add_child(len_hb); add_track->hide(); - add_track->get_popup()->connect("index_pressed", this, "_track_added"); + add_track->get_popup()->connect_compat("index_pressed", this, "_track_added"); len_hb->hide(); panning_timeline = false; @@ -2429,8 +2429,8 @@ void AnimationTrackEdit::set_undo_redo(UndoRedo *p_undo_redo) { void AnimationTrackEdit::set_timeline(AnimationTimelineEdit *p_timeline) { timeline = p_timeline; - timeline->connect("zoom_changed", this, "_zoom_changed"); - timeline->connect("name_limit_changed", this, "_zoom_changed"); + timeline->connect_compat("zoom_changed", this, "_zoom_changed"); + timeline->connect_compat("name_limit_changed", this, "_zoom_changed"); } void AnimationTrackEdit::set_editor(AnimationTrackEditor *p_editor) { editor = p_editor; @@ -2480,6 +2480,9 @@ void AnimationTrackEdit::_path_entered(const String &p_text) { bool AnimationTrackEdit::_is_value_key_valid(const Variant &p_key_value, Variant::Type &r_valid_type) const { + if (root == nullptr) + return false; + RES res; Vector<StringName> leftover_path; Node *node = root->get_node_and_resource(animation->track_get_path(track), res, leftover_path); @@ -2688,7 +2691,7 @@ void AnimationTrackEdit::_gui_input(const Ref<InputEvent> &p_event) { if (!menu) { menu = memnew(PopupMenu); add_child(menu); - menu->connect("id_pressed", this, "_menu_selected"); + menu->connect_compat("id_pressed", this, "_menu_selected"); } menu->clear(); menu->add_icon_item(get_icon("TrackContinuous", "EditorIcons"), TTR("Continuous"), MENU_CALL_MODE_CONTINUOUS); @@ -2707,7 +2710,7 @@ void AnimationTrackEdit::_gui_input(const Ref<InputEvent> &p_event) { if (!menu) { menu = memnew(PopupMenu); add_child(menu); - menu->connect("id_pressed", this, "_menu_selected"); + menu->connect_compat("id_pressed", this, "_menu_selected"); } menu->clear(); menu->add_icon_item(get_icon("InterpRaw", "EditorIcons"), TTR("Nearest"), MENU_INTERPOLATION_NEAREST); @@ -2725,7 +2728,7 @@ void AnimationTrackEdit::_gui_input(const Ref<InputEvent> &p_event) { if (!menu) { menu = memnew(PopupMenu); add_child(menu); - menu->connect("id_pressed", this, "_menu_selected"); + menu->connect_compat("id_pressed", this, "_menu_selected"); } menu->clear(); menu->add_icon_item(get_icon("InterpWrapClamp", "EditorIcons"), TTR("Clamp Loop Interp"), MENU_LOOP_CLAMP); @@ -2820,7 +2823,7 @@ void AnimationTrackEdit::_gui_input(const Ref<InputEvent> &p_event) { if (!menu) { menu = memnew(PopupMenu); add_child(menu); - menu->connect("id_pressed", this, "_menu_selected"); + menu->connect_compat("id_pressed", this, "_menu_selected"); } menu->clear(); @@ -2848,7 +2851,7 @@ void AnimationTrackEdit::_gui_input(const Ref<InputEvent> &p_event) { path = memnew(LineEdit); add_child(path); path->set_as_toplevel(true); - path->connect("text_entered", this, "_path_entered"); + path->connect_compat("text_entered", this, "_path_entered"); } path->set_text(animation->track_get_path(track)); @@ -3073,16 +3076,16 @@ void AnimationTrackEdit::_bind_methods() { ClassDB::bind_method("_path_entered", &AnimationTrackEdit::_path_entered); ClassDB::bind_method("_play_position_draw", &AnimationTrackEdit::_play_position_draw); - ADD_SIGNAL(MethodInfo("timeline_changed", PropertyInfo(Variant::REAL, "position"), PropertyInfo(Variant::BOOL, "drag"))); + ADD_SIGNAL(MethodInfo("timeline_changed", PropertyInfo(Variant::FLOAT, "position"), PropertyInfo(Variant::BOOL, "drag"))); ADD_SIGNAL(MethodInfo("remove_request", PropertyInfo(Variant::INT, "track"))); ADD_SIGNAL(MethodInfo("dropped", PropertyInfo(Variant::INT, "from_track"), PropertyInfo(Variant::INT, "to_track"))); - ADD_SIGNAL(MethodInfo("insert_key", PropertyInfo(Variant::REAL, "ofs"))); + ADD_SIGNAL(MethodInfo("insert_key", PropertyInfo(Variant::FLOAT, "ofs"))); ADD_SIGNAL(MethodInfo("select_key", PropertyInfo(Variant::INT, "index"), PropertyInfo(Variant::BOOL, "single"))); ADD_SIGNAL(MethodInfo("deselect_key", PropertyInfo(Variant::INT, "index"))); ADD_SIGNAL(MethodInfo("bezier_edit")); ADD_SIGNAL(MethodInfo("move_selection_begin")); - ADD_SIGNAL(MethodInfo("move_selection", PropertyInfo(Variant::REAL, "ofs"))); + ADD_SIGNAL(MethodInfo("move_selection", PropertyInfo(Variant::FLOAT, "ofs"))); ADD_SIGNAL(MethodInfo("move_selection_commit")); ADD_SIGNAL(MethodInfo("move_selection_cancel")); @@ -3111,7 +3114,7 @@ AnimationTrackEdit::AnimationTrackEdit() { play_position->set_mouse_filter(MOUSE_FILTER_PASS); add_child(play_position); play_position->set_anchors_and_margins_preset(PRESET_WIDE); - play_position->connect("draw", this, "_play_position_draw"); + play_position->connect_compat("draw", this, "_play_position_draw"); set_focus_mode(FOCUS_CLICK); set_mouse_filter(MOUSE_FILTER_PASS); //scroll has to work too for selection } @@ -3138,7 +3141,7 @@ AnimationTrackEdit *AnimationTrackEditPlugin::create_value_track_edit(Object *p_ &args[5] }; - Variant::CallError ce; + Callable::CallError ce; return Object::cast_to<AnimationTrackEdit>(get_script_instance()->call("create_value_track_edit", (const Variant **)&argptrs, 6, ce).operator Object *()); } return NULL; @@ -3217,8 +3220,8 @@ Size2 AnimationTrackEditGroup::get_minimum_size() const { void AnimationTrackEditGroup::set_timeline(AnimationTimelineEdit *p_timeline) { timeline = p_timeline; - timeline->connect("zoom_changed", this, "_zoom_changed"); - timeline->connect("name_limit_changed", this, "_zoom_changed"); + timeline->connect_compat("zoom_changed", this, "_zoom_changed"); + timeline->connect_compat("name_limit_changed", this, "_zoom_changed"); } void AnimationTrackEditGroup::set_root(Node *p_root) { @@ -3258,7 +3261,7 @@ void AnimationTrackEditor::set_animation(const Ref<Animation> &p_anim) { track_edits[_get_track_selected()]->release_focus(); } if (animation.is_valid()) { - animation->disconnect("changed", this, "_animation_changed"); + animation->disconnect_compat("changed", this, "_animation_changed"); _clear_selection(); } animation = p_anim; @@ -3268,7 +3271,7 @@ void AnimationTrackEditor::set_animation(const Ref<Animation> &p_anim) { _update_tracks(); if (animation.is_valid()) { - animation->connect("changed", this, "_animation_changed"); + animation->connect_compat("changed", this, "_animation_changed"); hscroll->show(); edit->set_disabled(false); @@ -3311,13 +3314,13 @@ void AnimationTrackEditor::_root_removed(Node *p_root) { void AnimationTrackEditor::set_root(Node *p_root) { if (root) { - root->disconnect("tree_exiting", this, "_root_removed"); + root->disconnect_compat("tree_exiting", this, "_root_removed"); } root = p_root; if (root) { - root->connect("tree_exiting", this, "_root_removed", make_binds(), CONNECT_ONESHOT); + root->connect_compat("tree_exiting", this, "_root_removed", make_binds(), CONNECT_ONESHOT); } _update_tracks(); @@ -3482,7 +3485,7 @@ void AnimationTrackEditor::_query_insert(const InsertData &p_id) { switch (insert_data[i].value.get_type()) { case Variant::INT: - case Variant::REAL: + case Variant::FLOAT: case Variant::VECTOR2: case Variant::VECTOR3: case Variant::QUAT: @@ -3913,7 +3916,7 @@ static Vector<String> _get_bezier_subindices_for_type(Variant::Type p_type, bool case Variant::INT: { subindices.push_back(""); } break; - case Variant::REAL: { + case Variant::FLOAT: { subindices.push_back(""); } break; case Variant::VECTOR2: { @@ -3991,7 +3994,7 @@ int AnimationTrackEditor::_confirm_insert(InsertData p_id, int p_last_track, boo PropertyInfo h = _find_hint_for_track(animation->get_track_count() - 1, np); animation->remove_track(animation->get_track_count() - 1); //hack - if (h.type == Variant::REAL || + if (h.type == Variant::FLOAT || h.type == Variant::VECTOR2 || h.type == Variant::RECT2 || h.type == Variant::VECTOR3 || @@ -4257,21 +4260,21 @@ void AnimationTrackEditor::_update_tracks() { track_edit->grab_focus(); } - track_edit->connect("timeline_changed", this, "_timeline_changed"); - track_edit->connect("remove_request", this, "_track_remove_request", varray(), CONNECT_DEFERRED); - track_edit->connect("dropped", this, "_dropped_track", varray(), CONNECT_DEFERRED); - track_edit->connect("insert_key", this, "_insert_key_from_track", varray(i), CONNECT_DEFERRED); - track_edit->connect("select_key", this, "_key_selected", varray(i), CONNECT_DEFERRED); - track_edit->connect("deselect_key", this, "_key_deselected", varray(i), CONNECT_DEFERRED); - track_edit->connect("bezier_edit", this, "_bezier_edit", varray(i), CONNECT_DEFERRED); - track_edit->connect("move_selection_begin", this, "_move_selection_begin"); - track_edit->connect("move_selection", this, "_move_selection"); - track_edit->connect("move_selection_commit", this, "_move_selection_commit"); - track_edit->connect("move_selection_cancel", this, "_move_selection_cancel"); + track_edit->connect_compat("timeline_changed", this, "_timeline_changed"); + track_edit->connect_compat("remove_request", this, "_track_remove_request", varray(), CONNECT_DEFERRED); + track_edit->connect_compat("dropped", this, "_dropped_track", varray(), CONNECT_DEFERRED); + track_edit->connect_compat("insert_key", this, "_insert_key_from_track", varray(i), CONNECT_DEFERRED); + track_edit->connect_compat("select_key", this, "_key_selected", varray(i), CONNECT_DEFERRED); + track_edit->connect_compat("deselect_key", this, "_key_deselected", varray(i), CONNECT_DEFERRED); + track_edit->connect_compat("bezier_edit", this, "_bezier_edit", varray(i), CONNECT_DEFERRED); + track_edit->connect_compat("move_selection_begin", this, "_move_selection_begin"); + track_edit->connect_compat("move_selection", this, "_move_selection"); + track_edit->connect_compat("move_selection_commit", this, "_move_selection_commit"); + track_edit->connect_compat("move_selection_cancel", this, "_move_selection_cancel"); - track_edit->connect("duplicate_request", this, "_edit_menu_pressed", varray(EDIT_DUPLICATE_SELECTION), CONNECT_DEFERRED); - track_edit->connect("duplicate_transpose_request", this, "_edit_menu_pressed", varray(EDIT_DUPLICATE_TRANSPOSED), CONNECT_DEFERRED); - track_edit->connect("delete_request", this, "_edit_menu_pressed", varray(EDIT_DELETE_SELECTION), CONNECT_DEFERRED); + track_edit->connect_compat("duplicate_request", this, "_edit_menu_pressed", varray(EDIT_DUPLICATE_SELECTION), CONNECT_DEFERRED); + track_edit->connect_compat("duplicate_transpose_request", this, "_edit_menu_pressed", varray(EDIT_DUPLICATE_TRANSPOSED), CONNECT_DEFERRED); + track_edit->connect_compat("delete_request", this, "_edit_menu_pressed", varray(EDIT_DELETE_SELECTION), CONNECT_DEFERRED); } } @@ -4384,7 +4387,7 @@ void AnimationTrackEditor::_notification(int p_what) { } if (p_what == NOTIFICATION_READY) { - EditorNode::get_singleton()->get_editor_selection()->connect("selection_changed", this, "_selection_changed"); + EditorNode::get_singleton()->get_editor_selection()->connect_compat("selection_changed", this, "_selection_changed"); } if (p_what == NOTIFICATION_VISIBILITY_CHANGED) { @@ -4473,7 +4476,7 @@ void AnimationTrackEditor::_new_track_node_selected(NodePath p_path) { Vector<Variant::Type> filter; filter.push_back(Variant::INT); - filter.push_back(Variant::REAL); + filter.push_back(Variant::FLOAT); filter.push_back(Variant::VECTOR2); filter.push_back(Variant::VECTOR3); filter.push_back(Variant::QUAT); @@ -4543,7 +4546,7 @@ void AnimationTrackEditor::_new_track_property_selected(String p_name) { animation->track_set_path(animation->get_track_count() - 1, full_path); PropertyInfo h = _find_hint_for_track(animation->get_track_count() - 1, np); animation->remove_track(animation->get_track_count() - 1); //hack - if (h.type == Variant::REAL || + if (h.type == Variant::FLOAT || h.type == Variant::VECTOR2 || h.type == Variant::RECT2 || h.type == Variant::VECTOR3 || @@ -4753,7 +4756,7 @@ void AnimationTrackEditor::_add_method_key(const String &p_method) { Variant arg = E->get().default_arguments[i - first_defarg]; params.push_back(arg); } else { - Variant::CallError ce; + Callable::CallError ce; Variant arg = Variant::construct(E->get().arguments[i].type, NULL, 0, ce); params.push_back(arg); } @@ -5707,7 +5710,7 @@ float AnimationTrackEditor::snap_time(float p_value, bool p_relative) { return p_value; } -void AnimationTrackEditor::_show_imported_anim_warning() const { +void AnimationTrackEditor::_show_imported_anim_warning() { // It looks terrible on a single line but the TTR extractor doesn't support line breaks yet. EditorNode::get_singleton()->show_warning(TTR("This animation belongs to an imported scene, so changes to imported tracks will not be saved.\n\nTo enable the ability to add custom tracks, navigate to the scene's import settings and set\n\"Animation > Storage\" to \"Files\", enable \"Animation > Keep Custom Tracks\", then re-import.\nAlternatively, use an import preset that imports animations to separate files."), @@ -5777,10 +5780,10 @@ void AnimationTrackEditor::_bind_methods() { ClassDB::bind_method("_show_imported_anim_warning", &AnimationTrackEditor::_show_imported_anim_warning); ClassDB::bind_method("_select_all_tracks_for_copy", &AnimationTrackEditor::_select_all_tracks_for_copy); - ADD_SIGNAL(MethodInfo("timeline_changed", PropertyInfo(Variant::REAL, "position"), PropertyInfo(Variant::BOOL, "drag"))); + ADD_SIGNAL(MethodInfo("timeline_changed", PropertyInfo(Variant::FLOAT, "position"), PropertyInfo(Variant::BOOL, "drag"))); ADD_SIGNAL(MethodInfo("keying_changed")); - ADD_SIGNAL(MethodInfo("animation_len_changed", PropertyInfo(Variant::REAL, "len"))); - ADD_SIGNAL(MethodInfo("animation_step_changed", PropertyInfo(Variant::REAL, "step"))); + ADD_SIGNAL(MethodInfo("animation_len_changed", PropertyInfo(Variant::FLOAT, "len"))); + ADD_SIGNAL(MethodInfo("animation_step_changed", PropertyInfo(Variant::FLOAT, "step"))); } AnimationTrackEditor::AnimationTrackEditor() { @@ -5813,11 +5816,11 @@ AnimationTrackEditor::AnimationTrackEditor() { timeline = memnew(AnimationTimelineEdit); timeline->set_undo_redo(undo_redo); timeline_vbox->add_child(timeline); - timeline->connect("timeline_changed", this, "_timeline_changed"); - timeline->connect("name_limit_changed", this, "_name_limit_changed"); - timeline->connect("track_added", this, "_add_track"); - timeline->connect("value_changed", this, "_timeline_value_changed"); - timeline->connect("length_changed", this, "_update_length"); + timeline->connect_compat("timeline_changed", this, "_timeline_changed"); + timeline->connect_compat("name_limit_changed", this, "_name_limit_changed"); + timeline->connect_compat("track_added", this, "_add_track"); + timeline->connect_compat("value_changed", this, "_timeline_value_changed"); + timeline->connect_compat("length_changed", this, "_update_length"); scroll = memnew(ScrollContainer); timeline_vbox->add_child(scroll); @@ -5825,7 +5828,7 @@ AnimationTrackEditor::AnimationTrackEditor() { VScrollBar *sb = scroll->get_v_scrollbar(); scroll->remove_child(sb); timeline_scroll->add_child(sb); //move here so timeline and tracks are always aligned - scroll->connect("gui_input", this, "_scroll_input"); + scroll->connect_compat("gui_input", this, "_scroll_input"); bezier_edit = memnew(AnimationBezierTrackEdit); timeline_vbox->add_child(bezier_edit); @@ -5834,14 +5837,14 @@ AnimationTrackEditor::AnimationTrackEditor() { bezier_edit->set_timeline(timeline); bezier_edit->hide(); bezier_edit->set_v_size_flags(SIZE_EXPAND_FILL); - bezier_edit->connect("close_request", this, "_cancel_bezier_edit"); + bezier_edit->connect_compat("close_request", this, "_cancel_bezier_edit"); timeline_vbox->set_custom_minimum_size(Size2(0, 150) * EDSCALE); hscroll = memnew(HScrollBar); hscroll->share(timeline); hscroll->hide(); - hscroll->connect("value_changed", this, "_update_scroll"); + hscroll->connect_compat("value_changed", this, "_update_scroll"); timeline_vbox->add_child(hscroll); timeline->set_hscroll(hscroll); @@ -5858,20 +5861,20 @@ AnimationTrackEditor::AnimationTrackEditor() { imported_anim_warning = memnew(Button); imported_anim_warning->hide(); imported_anim_warning->set_tooltip(TTR("Warning: Editing imported animation")); - imported_anim_warning->connect("pressed", this, "_show_imported_anim_warning"); + imported_anim_warning->connect_compat("pressed", this, "_show_imported_anim_warning"); bottom_hb->add_child(imported_anim_warning); bottom_hb->add_spacer(); selected_filter = memnew(ToolButton); - selected_filter->connect("pressed", this, "_view_group_toggle"); //same function works the same + selected_filter->connect_compat("pressed", this, "_view_group_toggle"); //same function works the same selected_filter->set_toggle_mode(true); selected_filter->set_tooltip(TTR("Only show tracks from nodes selected in tree.")); bottom_hb->add_child(selected_filter); view_group = memnew(ToolButton); - view_group->connect("pressed", this, "_view_group_toggle"); + view_group->connect_compat("pressed", this, "_view_group_toggle"); view_group->set_toggle_mode(true); view_group->set_tooltip(TTR("Group tracks by node or display them as plain list.")); @@ -5893,14 +5896,14 @@ AnimationTrackEditor::AnimationTrackEditor() { step->set_custom_minimum_size(Size2(100, 0) * EDSCALE); step->set_tooltip(TTR("Animation step value.")); bottom_hb->add_child(step); - step->connect("value_changed", this, "_update_step"); + step->connect_compat("value_changed", this, "_update_step"); step->set_read_only(true); snap_mode = memnew(OptionButton); snap_mode->add_item(TTR("Seconds")); snap_mode->add_item(TTR("FPS")); bottom_hb->add_child(snap_mode); - snap_mode->connect("item_selected", this, "_snap_mode_changed"); + snap_mode->connect_compat("item_selected", this, "_snap_mode_changed"); snap_mode->set_disabled(true); bottom_hb->add_child(memnew(VSeparator)); @@ -5945,19 +5948,19 @@ AnimationTrackEditor::AnimationTrackEditor() { edit->get_popup()->add_item(TTR("Optimize Animation"), EDIT_OPTIMIZE_ANIMATION); edit->get_popup()->add_item(TTR("Clean-Up Animation"), EDIT_CLEAN_UP_ANIMATION); - edit->get_popup()->connect("id_pressed", this, "_edit_menu_pressed"); + edit->get_popup()->connect_compat("id_pressed", this, "_edit_menu_pressed"); pick_track = memnew(SceneTreeDialog); add_child(pick_track); pick_track->set_title(TTR("Pick the node that will be animated:")); - pick_track->connect("selected", this, "_new_track_node_selected"); + pick_track->connect_compat("selected", this, "_new_track_node_selected"); prop_selector = memnew(PropertySelector); add_child(prop_selector); - prop_selector->connect("selected", this, "_new_track_property_selected"); + prop_selector->connect_compat("selected", this, "_new_track_property_selected"); method_selector = memnew(PropertySelector); add_child(method_selector); - method_selector->connect("selected", this, "_add_method_key"); + method_selector->connect_compat("selected", this, "_add_method_key"); inserting = false; insert_query = false; @@ -5966,7 +5969,7 @@ AnimationTrackEditor::AnimationTrackEditor() { insert_confirm = memnew(ConfirmationDialog); add_child(insert_confirm); - insert_confirm->connect("confirmed", this, "_confirm_insert_list"); + insert_confirm->connect_compat("confirmed", this, "_confirm_insert_list"); VBoxContainer *icvb = memnew(VBoxContainer); insert_confirm->add_child(icvb); insert_confirm_text = memnew(Label); @@ -5984,7 +5987,7 @@ AnimationTrackEditor::AnimationTrackEditor() { box_selection->set_as_toplevel(true); box_selection->set_mouse_filter(MOUSE_FILTER_IGNORE); box_selection->hide(); - box_selection->connect("draw", this, "_box_selection_draw"); + box_selection->connect_compat("draw", this, "_box_selection_draw"); box_selecting = false; //default plugins @@ -6022,7 +6025,7 @@ AnimationTrackEditor::AnimationTrackEditor() { optimize_max_angle->set_value(22); optimize_dialog->get_ok()->set_text(TTR("Optimize")); - optimize_dialog->connect("confirmed", this, "_edit_menu_pressed", varray(EDIT_CLEAN_UP_ANIMATION_CONFIRM)); + optimize_dialog->connect_compat("confirmed", this, "_edit_menu_pressed", varray(EDIT_CLEAN_UP_ANIMATION_CONFIRM)); // @@ -6048,7 +6051,7 @@ AnimationTrackEditor::AnimationTrackEditor() { cleanup_dialog->set_title(TTR("Clean-Up Animation(s) (NO UNDO!)")); cleanup_dialog->get_ok()->set_text(TTR("Clean-Up")); - cleanup_dialog->connect("confirmed", this, "_edit_menu_pressed", varray(EDIT_CLEAN_UP_ANIMATION_CONFIRM)); + cleanup_dialog->connect_compat("confirmed", this, "_edit_menu_pressed", varray(EDIT_CLEAN_UP_ANIMATION_CONFIRM)); // scale_dialog = memnew(ConfirmationDialog); @@ -6060,7 +6063,7 @@ AnimationTrackEditor::AnimationTrackEditor() { scale->set_max(99999); scale->set_step(0.001); vbc->add_margin_child(TTR("Scale Ratio:"), scale); - scale_dialog->connect("confirmed", this, "_edit_menu_pressed", varray(EDIT_SCALE_CONFIRM)); + scale_dialog->connect_compat("confirmed", this, "_edit_menu_pressed", varray(EDIT_SCALE_CONFIRM)); add_child(scale_dialog); track_copy_dialog = memnew(ConfirmationDialog); @@ -6073,7 +6076,7 @@ AnimationTrackEditor::AnimationTrackEditor() { Button *select_all_button = memnew(Button); select_all_button->set_text(TTR("Select All/None")); - select_all_button->connect("pressed", this, "_select_all_tracks_for_copy"); + select_all_button->connect_compat("pressed", this, "_select_all_tracks_for_copy"); track_vbox->add_child(select_all_button); track_copy_select = memnew(Tree); @@ -6081,7 +6084,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", this, "_edit_menu_pressed", varray(EDIT_COPY_TRACKS_CONFIRM)); + track_copy_dialog->connect_compat("confirmed", this, "_edit_menu_pressed", varray(EDIT_COPY_TRACKS_CONFIRM)); animation_changing_awaiting_update = false; } diff --git a/editor/animation_track_editor.h b/editor/animation_track_editor.h index c2660652d6..26f9c15f6c 100644 --- a/editor/animation_track_editor.h +++ b/editor/animation_track_editor.h @@ -314,7 +314,7 @@ class AnimationTrackEditor : public VBoxContainer { OptionButton *snap_mode; Button *imported_anim_warning; - void _show_imported_anim_warning() const; + void _show_imported_anim_warning(); void _snap_mode_changed(int p_mode); Vector<AnimationTrackEdit *> track_edits; diff --git a/editor/animation_track_editor_plugins.cpp b/editor/animation_track_editor_plugins.cpp index bcdd09987f..b94d1645db 100644 --- a/editor/animation_track_editor_plugins.cpp +++ b/editor/animation_track_editor_plugins.cpp @@ -334,7 +334,7 @@ void AnimationTrackEditAudio::_bind_methods() { } AnimationTrackEditAudio::AnimationTrackEditAudio() { - AudioStreamPreviewGenerator::get_singleton()->connect("preview_updated", this, "_preview_changed"); + AudioStreamPreviewGenerator::get_singleton()->connect_compat("preview_updated", this, "_preview_changed"); } /// SPRITE FRAME / FRAME_COORDS /// @@ -949,7 +949,7 @@ void AnimationTrackEditTypeAudio::_bind_methods() { } AnimationTrackEditTypeAudio::AnimationTrackEditTypeAudio() { - AudioStreamPreviewGenerator::get_singleton()->connect("preview_updated", this, "_preview_changed"); + AudioStreamPreviewGenerator::get_singleton()->connect_compat("preview_updated", this, "_preview_changed"); len_resizing = false; } diff --git a/editor/array_property_edit.cpp b/editor/array_property_edit.cpp index 8cbc6a8dff..f14b12b132 100644 --- a/editor/array_property_edit.cpp +++ b/editor/array_property_edit.cpp @@ -42,7 +42,7 @@ Variant ArrayPropertyEdit::get_array() const { return Array(); Variant arr = o->get(property); if (!arr.is_array()) { - Variant::CallError ce; + Callable::CallError ce; arr = Variant::construct(default_type, NULL, 0, ce); } return arr; @@ -104,7 +104,7 @@ bool ArrayPropertyEdit::_set(const StringName &p_name, const Variant &p_value) { } else if (newsize > size) { Variant init; - Variant::CallError ce; + Callable::CallError ce; Variant::Type new_type = subtype; if (new_type == Variant::NIL && size) { new_type = arr.get(size - 1).get_type(); @@ -139,7 +139,7 @@ bool ArrayPropertyEdit::_set(const StringName &p_name, const Variant &p_value) { Variant value = arr.get(idx); if (value.get_type() != type && type >= 0 && type < Variant::VARIANT_MAX) { - Variant::CallError ce; + Callable::CallError ce; Variant new_value = Variant::construct(Variant::Type(type), NULL, 0, ce); UndoRedo *ur = EditorNode::get_undo_redo(); diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp index f3da1b59b2..948955eabd 100644 --- a/editor/code_editor.cpp +++ b/editor/code_editor.cpp @@ -200,7 +200,7 @@ void FindReplaceBar::_replace() { void FindReplaceBar::_replace_all() { - text_edit->disconnect("text_changed", this, "_editor_text_changed"); + text_edit->disconnect_compat("text_changed", this, "_editor_text_changed"); // Line as x so it gets priority in comparison, column as y. Point2i orig_cursor(text_edit->cursor_get_line(), text_edit->cursor_get_column()); Point2i prev_match = Point2(-1, -1); @@ -280,7 +280,7 @@ void FindReplaceBar::_replace_all() { matches_label->add_color_override("font_color", rc > 0 ? get_color("font_color", "Label") : get_color("error_color", "Editor")); matches_label->set_text(vformat(TTR("%d replaced."), rc)); - text_edit->call_deferred("connect", "text_changed", this, "_editor_text_changed"); + text_edit->call_deferred("connect", "text_changed", Callable(this, "_editor_text_changed")); results_count = -1; } @@ -517,6 +517,11 @@ void FindReplaceBar::_replace_text_entered(const String &p_text) { if (selection_only->is_pressed() && text_edit->is_selection_active()) { _replace_all(); _hide_bar(); + } else if (Input::get_singleton()->is_key_pressed(KEY_SHIFT)) { + _replace(); + search_prev(); + } else { + _replace(); } } @@ -554,7 +559,7 @@ void FindReplaceBar::set_text_edit(TextEdit *p_text_edit) { results_count = -1; text_edit = p_text_edit; - text_edit->connect("text_changed", this, "_editor_text_changed"); + text_edit->connect_compat("text_changed", this, "_editor_text_changed"); } void FindReplaceBar::_bind_methods() { @@ -608,8 +613,8 @@ FindReplaceBar::FindReplaceBar() { search_text = memnew(LineEdit); vbc_lineedit->add_child(search_text); search_text->set_custom_minimum_size(Size2(100 * EDSCALE, 0)); - search_text->connect("text_changed", this, "_search_text_changed"); - search_text->connect("text_entered", this, "_search_text_entered"); + search_text->connect_compat("text_changed", this, "_search_text_changed"); + search_text->connect_compat("text_entered", this, "_search_text_entered"); matches_label = memnew(Label); hbc_button_search->add_child(matches_label); @@ -618,51 +623,51 @@ FindReplaceBar::FindReplaceBar() { find_prev = memnew(ToolButton); hbc_button_search->add_child(find_prev); find_prev->set_focus_mode(FOCUS_NONE); - find_prev->connect("pressed", this, "_search_prev"); + find_prev->connect_compat("pressed", this, "_search_prev"); find_next = memnew(ToolButton); hbc_button_search->add_child(find_next); find_next->set_focus_mode(FOCUS_NONE); - find_next->connect("pressed", this, "_search_next"); + find_next->connect_compat("pressed", this, "_search_next"); case_sensitive = memnew(CheckBox); hbc_option_search->add_child(case_sensitive); case_sensitive->set_text(TTR("Match Case")); case_sensitive->set_focus_mode(FOCUS_NONE); - case_sensitive->connect("toggled", this, "_search_options_changed"); + case_sensitive->connect_compat("toggled", this, "_search_options_changed"); whole_words = memnew(CheckBox); hbc_option_search->add_child(whole_words); whole_words->set_text(TTR("Whole Words")); whole_words->set_focus_mode(FOCUS_NONE); - whole_words->connect("toggled", this, "_search_options_changed"); + whole_words->connect_compat("toggled", this, "_search_options_changed"); // replace toolbar replace_text = memnew(LineEdit); vbc_lineedit->add_child(replace_text); replace_text->set_custom_minimum_size(Size2(100 * EDSCALE, 0)); - replace_text->connect("text_entered", this, "_replace_text_entered"); + replace_text->connect_compat("text_entered", this, "_replace_text_entered"); replace = memnew(Button); hbc_button_replace->add_child(replace); replace->set_text(TTR("Replace")); - replace->connect("pressed", this, "_replace_pressed"); + replace->connect_compat("pressed", this, "_replace_pressed"); replace_all = memnew(Button); hbc_button_replace->add_child(replace_all); replace_all->set_text(TTR("Replace All")); - replace_all->connect("pressed", this, "_replace_all_pressed"); + replace_all->connect_compat("pressed", this, "_replace_all_pressed"); selection_only = memnew(CheckBox); hbc_option_replace->add_child(selection_only); selection_only->set_text(TTR("Selection Only")); selection_only->set_focus_mode(FOCUS_NONE); - selection_only->connect("toggled", this, "_search_options_changed"); + selection_only->connect_compat("toggled", this, "_search_options_changed"); hide_button = memnew(TextureButton); add_child(hide_button); hide_button->set_focus_mode(FOCUS_NONE); - hide_button->connect("pressed", this, "_hide_pressed"); + hide_button->connect_compat("pressed", this, "_hide_pressed"); hide_button->set_v_size_flags(SIZE_SHRINK_CENTER); } @@ -686,6 +691,16 @@ void CodeTextEditor::_input(const Ref<InputEvent> &event) { accept_event(); return; } + if (ED_IS_SHORTCUT("script_text_editor/delete_line", key_event)) { + delete_lines(); + accept_event(); + return; + } + if (ED_IS_SHORTCUT("script_text_editor/clone_down", key_event)) { + clone_lines_down(); + accept_event(); + return; + } } void CodeTextEditor::_text_editor_gui_input(const Ref<InputEvent> &p_event) { @@ -910,8 +925,9 @@ void CodeTextEditor::update_editor_settings() { text_editor->set_hiding_enabled(EditorSettings::get_singleton()->get("text_editor/appearance/code_folding")); text_editor->set_draw_fold_gutter(EditorSettings::get_singleton()->get("text_editor/appearance/code_folding")); text_editor->set_wrap_enabled(EditorSettings::get_singleton()->get("text_editor/appearance/word_wrap")); - text_editor->set_show_line_length_guideline(EditorSettings::get_singleton()->get("text_editor/appearance/show_line_length_guideline")); - text_editor->set_line_length_guideline_column(EditorSettings::get_singleton()->get("text_editor/appearance/line_length_guideline_column")); + text_editor->set_show_line_length_guidelines(EditorSettings::get_singleton()->get("text_editor/appearance/show_line_length_guidelines")); + text_editor->set_line_length_guideline_soft_column(EditorSettings::get_singleton()->get("text_editor/appearance/line_length_guideline_soft_column")); + text_editor->set_line_length_guideline_hard_column(EditorSettings::get_singleton()->get("text_editor/appearance/line_length_guideline_hard_column")); text_editor->set_scroll_pass_end_of_file(EditorSettings::get_singleton()->get("text_editor/cursor/scroll_past_end_of_file")); text_editor->cursor_set_block_mode(EditorSettings::get_singleton()->get("text_editor/cursor/block_caret")); text_editor->cursor_set_blink_enabled(EditorSettings::get_singleton()->get("text_editor/cursor/caret_blink")); @@ -1702,7 +1718,7 @@ CodeTextEditor::CodeTextEditor() { error_column = 0; toggle_scripts_button = memnew(ToolButton); - toggle_scripts_button->connect("pressed", this, "_toggle_scripts_pressed"); + toggle_scripts_button->connect_compat("pressed", this, "_toggle_scripts_pressed"); status_bar->add_child(toggle_scripts_button); toggle_scripts_button->hide(); @@ -1717,15 +1733,15 @@ CodeTextEditor::CodeTextEditor() { scroll->add_child(error); error->set_v_size_flags(SIZE_EXPAND | SIZE_SHRINK_CENTER); error->set_mouse_filter(MOUSE_FILTER_STOP); - error->connect("gui_input", this, "_error_pressed"); - find_replace_bar->connect("error", error, "set_text"); + error->connect_compat("gui_input", this, "_error_pressed"); + find_replace_bar->connect_compat("error", error, "set_text"); // Warnings warning_button = memnew(ToolButton); status_bar->add_child(warning_button); warning_button->set_v_size_flags(SIZE_EXPAND | SIZE_SHRINK_CENTER); warning_button->set_default_cursor_shape(CURSOR_POINTING_HAND); - warning_button->connect("pressed", this, "_warning_button_pressed"); + warning_button->connect_compat("pressed", this, "_warning_button_pressed"); warning_button->set_tooltip(TTR("Warnings")); warning_count_label = memnew(Label); @@ -1737,7 +1753,7 @@ CodeTextEditor::CodeTextEditor() { warning_count_label->set_tooltip(TTR("Warnings")); warning_count_label->add_color_override("font_color", EditorNode::get_singleton()->get_gui_base()->get_color("warning_color", "Editor")); warning_count_label->add_font_override("font", EditorNode::get_singleton()->get_gui_base()->get_font("status_source", "EditorFonts")); - warning_count_label->connect("gui_input", this, "_warning_label_gui_input"); + warning_count_label->connect_compat("gui_input", this, "_warning_label_gui_input"); is_warnings_panel_opened = false; set_warning_nb(0); @@ -1750,10 +1766,10 @@ CodeTextEditor::CodeTextEditor() { line_and_col_txt->set_tooltip(TTR("Line and column numbers.")); line_and_col_txt->set_mouse_filter(MOUSE_FILTER_STOP); - text_editor->connect("gui_input", this, "_text_editor_gui_input"); - text_editor->connect("cursor_changed", this, "_line_col_changed"); - text_editor->connect("text_changed", this, "_text_changed"); - text_editor->connect("request_completion", this, "_complete_request"); + text_editor->connect_compat("gui_input", this, "_text_editor_gui_input"); + text_editor->connect_compat("cursor_changed", this, "_line_col_changed"); + text_editor->connect_compat("text_changed", this, "_text_changed"); + text_editor->connect_compat("request_completion", this, "_complete_request"); Vector<String> cs; cs.push_back("."); cs.push_back(","); @@ -1761,9 +1777,9 @@ CodeTextEditor::CodeTextEditor() { cs.push_back("="); cs.push_back("$"); text_editor->set_completion(true, cs); - idle->connect("timeout", this, "_text_changed_idle_timeout"); + idle->connect_compat("timeout", this, "_text_changed_idle_timeout"); - code_complete_timer->connect("timeout", this, "_code_complete_timer_timeout"); + code_complete_timer->connect_compat("timeout", this, "_code_complete_timer_timeout"); font_resize_val = 0; font_size = EditorSettings::get_singleton()->get("interface/editor/code_font_size"); @@ -1771,7 +1787,7 @@ CodeTextEditor::CodeTextEditor() { add_child(font_resize_timer); font_resize_timer->set_one_shot(true); font_resize_timer->set_wait_time(0.07); - font_resize_timer->connect("timeout", this, "_font_resize_timeout"); + font_resize_timer->connect_compat("timeout", this, "_font_resize_timeout"); - EditorSettings::get_singleton()->connect("settings_changed", this, "_on_settings_change"); + EditorSettings::get_singleton()->connect_compat("settings_changed", this, "_on_settings_change"); } diff --git a/editor/connections_dialog.cpp b/editor/connections_dialog.cpp index 7e283bb27f..f78867e493 100644 --- a/editor/connections_dialog.cpp +++ b/editor/connections_dialog.cpp @@ -119,6 +119,9 @@ void ConnectDialog::ok_pressed() { return; } Node *target = tree->get_selected(); + if (!target) { + return; // Nothing selected in the tree, not an error. + } if (target->get_script().is_null()) { if (!target->has_method(dst_method->get_text())) { error->set_text(TTR("Target method not found. Specify a valid method or attach a script to the target node.")); @@ -150,16 +153,6 @@ void ConnectDialog::_tree_node_selected() { } /* - * Called each time a target node is activated within the target node tree. - */ -void ConnectDialog::_tree_item_activated() { - - if (!get_ok()->is_disabled()) { - get_ok()->emit_signal("pressed"); - } -} - -/* * Adds a new parameter bind to connection. */ void ConnectDialog::_add_bind() { @@ -173,8 +166,9 @@ void ConnectDialog::_add_bind() { switch (vt) { case Variant::BOOL: value = false; break; case Variant::INT: value = 0; break; - case Variant::REAL: value = 0.0; break; + case Variant::FLOAT: value = 0.0; break; case Variant::STRING: value = ""; break; + case Variant::STRING_NAME: value = ""; break; case Variant::VECTOR2: value = Vector2(); break; case Variant::RECT2: value = Rect2(); break; case Variant::VECTOR3: value = Vector3(); break; @@ -243,7 +237,6 @@ void ConnectDialog::_bind_methods() { ClassDB::bind_method("_advanced_pressed", &ConnectDialog::_advanced_pressed); ClassDB::bind_method("_cancel", &ConnectDialog::_cancel_pressed); ClassDB::bind_method("_tree_node_selected", &ConnectDialog::_tree_node_selected); - ClassDB::bind_method("_tree_item_activated", &ConnectDialog::_tree_item_activated); ClassDB::bind_method("_add_bind", &ConnectDialog::_add_bind); ClassDB::bind_method("_remove_bind", &ConnectDialog::_remove_bind); ClassDB::bind_method("_update_ok_enabled", &ConnectDialog::_update_ok_enabled); @@ -312,7 +305,7 @@ bool ConnectDialog::is_editing() const { * If creating a connection from scratch, sensible defaults are used. * If editing an existing connection, previous data is retained. */ -void ConnectDialog::init(Connection c, bool bEdit) { +void ConnectDialog::init(ConnectionData c, bool bEdit) { set_hide_on_ok(false); @@ -397,8 +390,8 @@ ConnectDialog::ConnectDialog() { tree = memnew(SceneTreeEditor(false)); tree->set_connecting_signal(true); - tree->get_scene_tree()->connect("item_activated", this, "_tree_item_activated"); - tree->connect("node_selected", this, "_tree_node_selected"); + tree->get_scene_tree()->connect_compat("item_activated", this, "_ok"); + tree->connect_compat("node_selected", this, "_tree_node_selected"); tree->set_connect_to_script_mode(true); Node *mc = vbc_left->add_margin_child(TTR("Connect to Script:"), tree, true); @@ -421,8 +414,9 @@ ConnectDialog::ConnectDialog() { add_bind_hb->add_child(type_list); type_list->add_item("bool", Variant::BOOL); type_list->add_item("int", Variant::INT); - type_list->add_item("real", Variant::REAL); + type_list->add_item("real", Variant::FLOAT); type_list->add_item("String", Variant::STRING); + type_list->add_item("StringName", Variant::STRING_NAME); type_list->add_item("Vector2", Variant::VECTOR2); type_list->add_item("Rect2", Variant::RECT2); type_list->add_item("Vector3", Variant::VECTOR3); @@ -437,12 +431,12 @@ ConnectDialog::ConnectDialog() { Button *add_bind = memnew(Button); add_bind->set_text(TTR("Add")); add_bind_hb->add_child(add_bind); - add_bind->connect("pressed", this, "_add_bind"); + add_bind->connect_compat("pressed", this, "_add_bind"); Button *del_bind = memnew(Button); del_bind->set_text(TTR("Remove")); add_bind_hb->add_child(del_bind); - del_bind->connect("pressed", this, "_remove_bind"); + del_bind->connect_compat("pressed", this, "_remove_bind"); vbc_right->add_margin_child(TTR("Add Extra Call Argument:"), add_bind_hb); @@ -455,13 +449,13 @@ ConnectDialog::ConnectDialog() { dst_method = memnew(LineEdit); dst_method->set_h_size_flags(SIZE_EXPAND_FILL); - dst_method->connect("text_entered", this, "_builtin_text_entered"); + dst_method->connect_compat("text_entered", this, "_builtin_text_entered"); dstm_hb->add_child(dst_method); advanced = memnew(CheckButton); dstm_hb->add_child(advanced); advanced->set_text(TTR("Advanced")); - advanced->connect("pressed", this, "_advanced_pressed"); + advanced->connect_compat("pressed", this, "_advanced_pressed"); // Add spacing so the tree and inspector are the same size. Control *spacing = memnew(Control); @@ -508,7 +502,6 @@ Control *ConnectionsDockTree::make_custom_tooltip(const String &p_text) const { String text = TTR("Signal:") + " [u][b]" + p_text.get_slice("::", 0) + "[/b][/u]"; text += p_text.get_slice("::", 1).strip_edges() + "\n"; text += p_text.get_slice("::", 2).strip_edges(); - help_bit->set_text(text); help_bit->call_deferred("set_text", text); //hack so it uses proper theme once inside scene return help_bit; } @@ -533,7 +526,7 @@ void ConnectionsDock::_make_or_edit_connection() { Node *target = selectedNode->get_node(dst_path); ERR_FAIL_COND(!target); - Connection cToMake; + ConnectDialog::ConnectionData cToMake; cToMake.source = connect_dialog->get_source(); cToMake.target = target; cToMake.signal = connect_dialog->get_signal_name(); @@ -563,12 +556,12 @@ void ConnectionsDock::_make_or_edit_connection() { add_script_function = !found_inherited_function; } - PoolStringArray script_function_args; + PackedStringArray script_function_args; if (add_script_function) { // Pick up args here before "it" is deleted by update_tree. script_function_args = it->get_metadata(0).operator Dictionary()["args"]; for (int i = 0; i < cToMake.binds.size(); i++) { - script_function_args.append("extra_arg_" + itos(i) + ":" + Variant::get_type_name(cToMake.binds[i].get_type())); + script_function_args.push_back("extra_arg_" + itos(i) + ":" + Variant::get_type_name(cToMake.binds[i].get_type())); } } @@ -593,7 +586,7 @@ void ConnectionsDock::_make_or_edit_connection() { /* * Creates single connection w/ undo-redo functionality. */ -void ConnectionsDock::_connect(Connection cToMake) { +void ConnectionsDock::_connect(ConnectDialog::ConnectionData cToMake) { Node *source = static_cast<Node *>(cToMake.source); Node *target = static_cast<Node *>(cToMake.target); @@ -603,8 +596,10 @@ void ConnectionsDock::_connect(Connection cToMake) { undo_redo->create_action(vformat(TTR("Connect '%s' to '%s'"), String(cToMake.signal), String(cToMake.method))); - undo_redo->add_do_method(source, "connect", cToMake.signal, target, cToMake.method, cToMake.binds, cToMake.flags); - undo_redo->add_undo_method(source, "disconnect", cToMake.signal, target, cToMake.method); + Callable c(target, cToMake.method); + + undo_redo->add_do_method(source, "connect", cToMake.signal, c, cToMake.binds, cToMake.flags); + undo_redo->add_undo_method(source, "disconnect", cToMake.signal, c); undo_redo->add_do_method(this, "update_tree"); undo_redo->add_undo_method(this, "update_tree"); undo_redo->add_do_method(EditorNode::get_singleton()->get_scene_tree_dock()->get_tree_editor(), "update_tree"); //to force redraw of scene tree @@ -618,13 +613,15 @@ void ConnectionsDock::_connect(Connection cToMake) { */ void ConnectionsDock::_disconnect(TreeItem &item) { - Connection c = item.get_metadata(0); + Connection cd = item.get_metadata(0); + ConnectDialog::ConnectionData c = cd; + ERR_FAIL_COND(c.source != selectedNode); // Shouldn't happen but... Bugcheck. undo_redo->create_action(vformat(TTR("Disconnect '%s' from '%s'"), c.signal, c.method)); - undo_redo->add_do_method(selectedNode, "disconnect", c.signal, c.target, c.method); - undo_redo->add_undo_method(selectedNode, "connect", c.signal, c.target, c.method, c.binds, c.flags); + undo_redo->add_do_method(selectedNode, "disconnect", c.signal, Callable(c.target, c.method)); + undo_redo->add_undo_method(selectedNode, "connect", c.signal, Callable(c.target, c.method), c.binds, c.flags); undo_redo->add_do_method(this, "update_tree"); undo_redo->add_undo_method(this, "update_tree"); undo_redo->add_do_method(EditorNode::get_singleton()->get_scene_tree_dock()->get_tree_editor(), "update_tree"); // To force redraw of scene tree. @@ -649,9 +646,10 @@ void ConnectionsDock::_disconnect_all() { undo_redo->create_action(vformat(TTR("Disconnect all from signal: '%s'"), signalName)); while (child) { - Connection c = child->get_metadata(0); - undo_redo->add_do_method(selectedNode, "disconnect", c.signal, c.target, c.method); - undo_redo->add_undo_method(selectedNode, "connect", c.signal, c.target, c.method, c.binds, c.flags); + Connection cd = child->get_metadata(0); + ConnectDialog::ConnectionData c = cd; + undo_redo->add_do_method(selectedNode, "disconnect", c.signal, Callable(c.target, c.method)); + undo_redo->add_undo_method(selectedNode, "connect", c.signal, Callable(c.target, c.method), c.binds, c.flags); child = child->get_next(); } @@ -728,7 +726,7 @@ void ConnectionsDock::_open_connection_dialog(TreeItem &item) { StringName dst_method = "_on_" + midname + "_" + signal; - Connection c; + ConnectDialog::ConnectionData c; c.source = selectedNode; c.signal = StringName(signalname); c.target = dst_node; @@ -741,7 +739,7 @@ void ConnectionsDock::_open_connection_dialog(TreeItem &item) { /* * Open connection dialog with Connection data to EDIT an existing connection. */ -void ConnectionsDock::_open_connection_dialog(Connection cToEdit) { +void ConnectionsDock::_open_connection_dialog(ConnectDialog::ConnectionData cToEdit) { Node *src = static_cast<Node *>(cToEdit.source); Node *dst = static_cast<Node *>(cToEdit.target); @@ -761,7 +759,8 @@ void ConnectionsDock::_go_to_script(TreeItem &item) { if (_is_item_signal(item)) return; - Connection c = item.get_metadata(0); + Connection cd = item.get_metadata(0); + ConnectDialog::ConnectionData c = cd; ERR_FAIL_COND(c.source != selectedNode); //shouldn't happen but...bugcheck if (!c.target) @@ -951,7 +950,7 @@ void ConnectionsDock::update_tree() { StringName signal_name = mi.name; String signaldesc = "("; - PoolStringArray argnames; + PackedStringArray argnames; if (mi.arguments.size()) { for (int i = 0; i < mi.arguments.size(); i++) { @@ -1022,7 +1021,7 @@ void ConnectionsDock::update_tree() { for (List<Object::Connection>::Element *F = connections.front(); F; F = F->next()) { - Object::Connection &c = F->get(); + ConnectDialog::ConnectionData c = F->get(); if (!(c.flags & CONNECT_PERSIST)) continue; @@ -1049,7 +1048,8 @@ void ConnectionsDock::update_tree() { TreeItem *item2 = tree->create_item(item); item2->set_text(0, path); - item2->set_metadata(0, c); + Connection cd = c; + item2->set_metadata(0, cd); item2->set_icon(0, get_icon("Slot", "EditorIcons")); } } @@ -1085,7 +1085,7 @@ ConnectionsDock::ConnectionsDock(EditorNode *p_editor) { vbc->add_child(hb); hb->add_spacer(); hb->add_child(connect_button); - connect_button->connect("pressed", this, "_connect_pressed"); + connect_button->connect_compat("pressed", this, "_connect_pressed"); connect_dialog = memnew(ConnectDialog); connect_dialog->set_as_toplevel(true); @@ -1094,26 +1094,26 @@ ConnectionsDock::ConnectionsDock(EditorNode *p_editor) { disconnect_all_dialog = memnew(ConfirmationDialog); disconnect_all_dialog->set_as_toplevel(true); add_child(disconnect_all_dialog); - disconnect_all_dialog->connect("confirmed", this, "_disconnect_all"); + disconnect_all_dialog->connect_compat("confirmed", this, "_disconnect_all"); disconnect_all_dialog->set_text(TTR("Are you sure you want to remove all connections from this signal?")); signal_menu = memnew(PopupMenu); add_child(signal_menu); - signal_menu->connect("id_pressed", this, "_handle_signal_menu_option"); + signal_menu->connect_compat("id_pressed", this, "_handle_signal_menu_option"); signal_menu->add_item(TTR("Connect..."), CONNECT); signal_menu->add_item(TTR("Disconnect All"), DISCONNECT_ALL); slot_menu = memnew(PopupMenu); add_child(slot_menu); - slot_menu->connect("id_pressed", this, "_handle_slot_menu_option"); + slot_menu->connect_compat("id_pressed", this, "_handle_slot_menu_option"); slot_menu->add_item(TTR("Edit..."), EDIT); slot_menu->add_item(TTR("Go To Method"), GO_TO_SCRIPT); slot_menu->add_item(TTR("Disconnect"), DISCONNECT); - connect_dialog->connect("connected", this, "_make_or_edit_connection"); - tree->connect("item_selected", this, "_tree_item_selected"); - tree->connect("item_activated", this, "_tree_item_activated"); - tree->connect("item_rmb_selected", this, "_rmb_pressed"); + connect_dialog->connect_compat("connected", this, "_make_or_edit_connection"); + tree->connect_compat("item_selected", this, "_tree_item_selected"); + tree->connect_compat("item_activated", this, "_tree_item_activated"); + tree->connect_compat("item_rmb_selected", this, "_rmb_pressed"); add_constant_override("separation", 3 * EDSCALE); } diff --git a/editor/connections_dialog.h b/editor/connections_dialog.h index c30413953a..a4ed68b44e 100644 --- a/editor/connections_dialog.h +++ b/editor/connections_dialog.h @@ -53,6 +53,36 @@ class ConnectDialog : public ConfirmationDialog { GDCLASS(ConnectDialog, ConfirmationDialog); +public: + struct ConnectionData { + Node *source = nullptr; + Node *target = nullptr; + StringName signal; + StringName method; + uint32_t flags = 0; + Vector<Variant> binds; + + ConnectionData() { + } + ConnectionData(const Connection &p_connection) { + source = Object::cast_to<Node>(p_connection.signal.get_object()); + signal = p_connection.signal.get_name(); + target = Object::cast_to<Node>(p_connection.callable.get_object()); + method = p_connection.callable.get_method(); + flags = p_connection.flags; + binds = p_connection.binds; + } + operator Connection() { + Connection c; + c.signal = ::Signal(source, signal); + c.callable = Callable(target, method); + c.flags = flags; + c.binds = binds; + return c; + } + }; + +private: Label *connect_to_label; LineEdit *from_signal; Node *source; @@ -76,7 +106,6 @@ class ConnectDialog : public ConfirmationDialog { void ok_pressed(); void _cancel_pressed(); void _tree_node_selected(); - void _tree_item_activated(); void _add_bind(); void _remove_bind(); void _advanced_pressed(); @@ -99,7 +128,7 @@ public: bool get_oneshot() const; bool is_editing() const; - void init(Connection c, bool bEdit = false); + void init(ConnectionData c, bool bEdit = false); void popup_dialog(const String &p_for_signal); ConnectDialog(); @@ -145,7 +174,7 @@ class ConnectionsDock : public VBoxContainer { Map<StringName, Map<StringName, String> > descr_cache; void _make_or_edit_connection(); - void _connect(Connection cToMake); + void _connect(ConnectDialog::ConnectionData cToMake); void _disconnect(TreeItem &item); void _disconnect_all(); @@ -154,7 +183,7 @@ class ConnectionsDock : public VBoxContainer { bool _is_item_signal(TreeItem &item); void _open_connection_dialog(TreeItem &item); - void _open_connection_dialog(Connection cToEdit); + void _open_connection_dialog(ConnectDialog::ConnectionData cToEdit); void _go_to_script(TreeItem &item); void _handle_signal_menu_option(int option); diff --git a/editor/create_dialog.cpp b/editor/create_dialog.cpp index 4adb3844bc..9584443c75 100644 --- a/editor/create_dialog.cpp +++ b/editor/create_dialog.cpp @@ -459,13 +459,13 @@ void CreateDialog::_notification(int p_what) { switch (p_what) { case NOTIFICATION_ENTER_TREE: { - connect("confirmed", this, "_confirmed"); + connect_compat("confirmed", this, "_confirmed"); search_box->set_right_icon(get_icon("Search", "EditorIcons")); search_box->set_clear_button_enabled(true); favorite->set_icon(get_icon("Favorites", "EditorIcons")); } break; case NOTIFICATION_EXIT_TREE: { - disconnect("confirmed", this, "_confirmed"); + disconnect_compat("confirmed", this, "_confirmed"); } break; case NOTIFICATION_VISIBILITY_CHANGED: { if (is_visible_in_tree()) { @@ -766,8 +766,8 @@ CreateDialog::CreateDialog() { favorites->set_hide_root(true); favorites->set_hide_folding(true); favorites->set_allow_reselect(true); - favorites->connect("cell_selected", this, "_favorite_selected"); - favorites->connect("item_activated", this, "_favorite_activated"); + favorites->connect_compat("cell_selected", this, "_favorite_selected"); + favorites->connect_compat("item_activated", this, "_favorite_activated"); favorites->set_drag_forwarding(this); favorites->add_constant_override("draw_guides", 1); @@ -781,8 +781,8 @@ CreateDialog::CreateDialog() { recent->set_hide_root(true); recent->set_hide_folding(true); recent->set_allow_reselect(true); - recent->connect("cell_selected", this, "_history_selected"); - recent->connect("item_activated", this, "_history_activated"); + recent->connect_compat("cell_selected", this, "_history_selected"); + recent->connect_compat("item_activated", this, "_history_activated"); recent->add_constant_override("draw_guides", 1); VBoxContainer *vbc = memnew(VBoxContainer); @@ -797,23 +797,23 @@ CreateDialog::CreateDialog() { favorite->set_flat(true); favorite->set_toggle_mode(true); search_hb->add_child(favorite); - favorite->connect("pressed", this, "_favorite_toggled"); + favorite->connect_compat("pressed", this, "_favorite_toggled"); vbc->add_margin_child(TTR("Search:"), search_hb); - search_box->connect("text_changed", this, "_text_changed"); - search_box->connect("gui_input", this, "_sbox_input"); + search_box->connect_compat("text_changed", this, "_text_changed"); + search_box->connect_compat("gui_input", this, "_sbox_input"); search_options = memnew(Tree); vbc->add_margin_child(TTR("Matches:"), search_options, true); get_ok()->set_disabled(true); register_text_enter(search_box); set_hide_on_ok(false); - search_options->connect("item_activated", this, "_confirmed"); - search_options->connect("cell_selected", this, "_item_selected"); + search_options->connect_compat("item_activated", this, "_confirmed"); + search_options->connect_compat("cell_selected", this, "_item_selected"); base_type = "Object"; preferred_search_result_type = ""; help_bit = memnew(EditorHelpBit); vbc->add_margin_child(TTR("Description:"), help_bit); - help_bit->connect("request_hide", this, "_closed"); + help_bit->connect_compat("request_hide", this, "_closed"); type_blacklist.insert("PluginScript"); // PluginScript must be initialized before use, which is not possible here type_blacklist.insert("ScriptCreateDialog"); // This is an exposed editor Node that doesn't have an Editor prefix. diff --git a/editor/debugger/SCsub b/editor/debugger/SCsub new file mode 100644 index 0000000000..2b1e889fb0 --- /dev/null +++ b/editor/debugger/SCsub @@ -0,0 +1,5 @@ +#!/usr/bin/env python + +Import('env') + +env.add_source_files(env.editor_sources, "*.cpp") diff --git a/editor/debugger/editor_debugger_inspector.cpp b/editor/debugger/editor_debugger_inspector.cpp new file mode 100644 index 0000000000..35d7dda3f4 --- /dev/null +++ b/editor/debugger/editor_debugger_inspector.cpp @@ -0,0 +1,277 @@ +/*************************************************************************/ +/* editor_debugger_inspector.cpp */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* https://godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ +/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/*************************************************************************/ + +#include "editor_debugger_inspector.h" + +#include "core/io/marshalls.h" +#include "core/script_debugger_remote.h" +#include "editor/editor_node.h" +#include "scene/debugger/scene_debugger.h" + +bool EditorDebuggerRemoteObject::_set(const StringName &p_name, const Variant &p_value) { + + if (!editable || !prop_values.has(p_name) || String(p_name).begins_with("Constants/")) + return false; + + prop_values[p_name] = p_value; + emit_signal("value_edited", remote_object_id, p_name, p_value); + return true; +} + +bool EditorDebuggerRemoteObject::_get(const StringName &p_name, Variant &r_ret) const { + + if (!prop_values.has(p_name)) + return false; + + r_ret = prop_values[p_name]; + return true; +} + +void EditorDebuggerRemoteObject::_get_property_list(List<PropertyInfo> *p_list) const { + + p_list->clear(); //sorry, no want category + for (const List<PropertyInfo>::Element *E = prop_list.front(); E; E = E->next()) { + p_list->push_back(E->get()); + } +} + +String EditorDebuggerRemoteObject::get_title() { + if (remote_object_id.is_valid()) + return TTR("Remote ") + String(type_name) + ": " + itos(remote_object_id); + else + return "<null>"; +} + +Variant EditorDebuggerRemoteObject::get_variant(const StringName &p_name) { + Variant var; + _get(p_name, var); + return var; +} + +void EditorDebuggerRemoteObject::_bind_methods() { + + ClassDB::bind_method(D_METHOD("get_title"), &EditorDebuggerRemoteObject::get_title); + ClassDB::bind_method(D_METHOD("get_variant"), &EditorDebuggerRemoteObject::get_variant); + ClassDB::bind_method(D_METHOD("clear"), &EditorDebuggerRemoteObject::clear); + ClassDB::bind_method(D_METHOD("get_remote_object_id"), &EditorDebuggerRemoteObject::get_remote_object_id); + + ADD_SIGNAL(MethodInfo("value_edited", PropertyInfo(Variant::INT, "object_id"), PropertyInfo(Variant::STRING, "property"), PropertyInfo("value"))); +} + +EditorDebuggerInspector::EditorDebuggerInspector() { + variables = memnew(EditorDebuggerRemoteObject); + variables->editable = false; +} + +EditorDebuggerInspector::~EditorDebuggerInspector() { + memdelete(variables); +} + +void EditorDebuggerInspector::_bind_methods() { + ClassDB::bind_method(D_METHOD("_object_edited", "name", "value"), &EditorDebuggerInspector::_object_edited); + ClassDB::bind_method(D_METHOD("_object_selected", "id"), &EditorDebuggerInspector::_object_selected); + ADD_SIGNAL(MethodInfo("object_selected", PropertyInfo(Variant::INT, "id"))); + ADD_SIGNAL(MethodInfo("object_edited", PropertyInfo(Variant::INT, "id"), PropertyInfo(Variant::STRING, "property"), PropertyInfo("value"))); + ADD_SIGNAL(MethodInfo("object_property_updated", PropertyInfo(Variant::INT, "id"), PropertyInfo(Variant::STRING, "property"))); +} + +void EditorDebuggerInspector::_notification(int p_what) { + switch (p_what) { + case NOTIFICATION_POSTINITIALIZE: + connect_compat("object_id_selected", this, "_object_selected"); + break; + case NOTIFICATION_ENTER_TREE: + edit(variables); + break; + default: + break; + } +} + +void EditorDebuggerInspector::_object_edited(ObjectID p_id, const String &p_prop, const Variant &p_value) { + + emit_signal("object_edited", p_id, p_prop, p_value); +} + +void EditorDebuggerInspector::_object_selected(ObjectID p_object) { + + emit_signal("object_selected", p_object); +} + +ObjectID EditorDebuggerInspector::add_object(const Array &p_arr) { + EditorDebuggerRemoteObject *debugObj = NULL; + + SceneDebuggerObject obj; + obj.deserialize(p_arr); + ERR_FAIL_COND_V(obj.id.is_null(), ObjectID()); + + if (remote_objects.has(obj.id)) { + debugObj = remote_objects[obj.id]; + } else { + debugObj = memnew(EditorDebuggerRemoteObject); + debugObj->remote_object_id = obj.id; + debugObj->type_name = obj.class_name; + remote_objects[obj.id] = debugObj; + debugObj->connect_compat("value_edited", this, "_object_edited"); + } + + int old_prop_size = debugObj->prop_list.size(); + + debugObj->prop_list.clear(); + int new_props_added = 0; + Set<String> changed; + for (int i = 0; i < obj.properties.size(); i++) { + + PropertyInfo &pinfo = obj.properties[i].first; + Variant &var = obj.properties[i].second; + + if (pinfo.type == Variant::OBJECT) { + if (var.get_type() == Variant::STRING) { + String path = var; + if (path.find("::") != -1) { + // built-in resource + String base_path = path.get_slice("::", 0); + if (ResourceLoader::get_resource_type(base_path) == "PackedScene") { + if (!EditorNode::get_singleton()->is_scene_open(base_path)) { + EditorNode::get_singleton()->load_scene(base_path); + } + } else { + EditorNode::get_singleton()->load_resource(base_path); + } + } + var = ResourceLoader::load(path); + + if (pinfo.hint_string == "Script") { + if (debugObj->get_script() != var) { + debugObj->set_script(REF()); + Ref<Script> script(var); + if (!script.is_null()) { + ScriptInstance *script_instance = script->placeholder_instance_create(debugObj); + debugObj->set_script_and_instance(var, script_instance); + } + } + } + } + } + + //always add the property, since props may have been added or removed + debugObj->prop_list.push_back(pinfo); + + if (!debugObj->prop_values.has(pinfo.name)) { + new_props_added++; + debugObj->prop_values[pinfo.name] = var; + } else { + + if (bool(Variant::evaluate(Variant::OP_NOT_EQUAL, debugObj->prop_values[pinfo.name], var))) { + debugObj->prop_values[pinfo.name] = var; + changed.insert(pinfo.name); + } + } + } + + if (old_prop_size == debugObj->prop_list.size() && new_props_added == 0) { + //only some may have changed, if so, then update those, if exist + for (Set<String>::Element *E = changed.front(); E; E = E->next()) { + emit_signal("object_property_updated", debugObj->remote_object_id, E->get()); + } + } else { + //full update, because props were added or removed + debugObj->update(); + } + return obj.id; +} + +void EditorDebuggerInspector::clear_cache() { + for (Map<ObjectID, EditorDebuggerRemoteObject *>::Element *E = remote_objects.front(); E; E = E->next()) { + EditorNode *editor = EditorNode::get_singleton(); + if (editor->get_editor_history()->get_current() == E->value()->get_instance_id()) { + editor->push_item(NULL); + } + memdelete(E->value()); + } + remote_objects.clear(); +} + +Object *EditorDebuggerInspector::get_object(ObjectID p_id) { + if (remote_objects.has(p_id)) + return remote_objects[p_id]; + return NULL; +} + +void EditorDebuggerInspector::add_stack_variable(const Array &p_array) { + + ScriptDebuggerRemote::ScriptStackVariable var; + var.deserialize(p_array); + String n = var.name; + Variant v = var.value; + + PropertyHint h = PROPERTY_HINT_NONE; + String hs = String(); + + if (v.get_type() == Variant::OBJECT) { + v = Object::cast_to<EncodedObjectAsID>(v)->get_object_id(); + h = PROPERTY_HINT_OBJECT_ID; + hs = "Object"; + } + String type; + switch (var.type) { + case 0: + type = "Locals/"; + break; + case 1: + type = "Members/"; + break; + case 2: + type = "Globals/"; + break; + default: + type = "Unknown/"; + } + + PropertyInfo pinfo; + pinfo.name = type + n; + pinfo.type = v.get_type(); + pinfo.hint = h; + pinfo.hint_string = hs; + + variables->prop_list.push_back(pinfo); + variables->prop_values[type + n] = v; + variables->update(); + edit(variables); +} + +void EditorDebuggerInspector::clear_stack_variables() { + variables->clear(); + variables->update(); +} + +String EditorDebuggerInspector::get_stack_variable(const String &p_var) { + return variables->get_variant(p_var); +} diff --git a/editor/debugger/editor_debugger_inspector.h b/editor/debugger/editor_debugger_inspector.h new file mode 100644 index 0000000000..e1dfbefcf3 --- /dev/null +++ b/editor/debugger/editor_debugger_inspector.h @@ -0,0 +1,98 @@ +/*************************************************************************/ +/* editor_debugger_inspector.h */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* https://godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ +/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/*************************************************************************/ + +#ifndef EDITOR_DEBUGGER_INSPECTOR_H +#define EDITOR_DEBUGGER_INSPECTOR_H +#include "editor/editor_inspector.h" + +class EditorDebuggerRemoteObject : public Object { + + GDCLASS(EditorDebuggerRemoteObject, Object); + +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; + static void _bind_methods(); + +public: + bool editable = false; + ObjectID remote_object_id; + String type_name; + List<PropertyInfo> prop_list; + Map<StringName, Variant> prop_values; + + ObjectID get_remote_object_id() { return remote_object_id; }; + String get_title(); + + Variant get_variant(const StringName &p_name); + + void clear() { + prop_list.clear(); + prop_values.clear(); + } + + void update() { _change_notify(); } + + EditorDebuggerRemoteObject(){}; +}; + +class EditorDebuggerInspector : public EditorInspector { + + GDCLASS(EditorDebuggerInspector, EditorInspector); + +private: + ObjectID inspected_object_id; + Map<ObjectID, EditorDebuggerRemoteObject *> remote_objects; + EditorDebuggerRemoteObject *variables; + + void _object_selected(ObjectID p_object); + void _object_edited(ObjectID p_id, const String &p_prop, const Variant &p_value); + +protected: + void _notification(int p_what); + static void _bind_methods(); + +public: + EditorDebuggerInspector(); + ~EditorDebuggerInspector(); + + // Remote Object cache + ObjectID add_object(const Array &p_arr); + Object *get_object(ObjectID p_id); + void clear_cache(); + + // Stack Dump variables + String get_stack_variable(const String &p_var); + void add_stack_variable(const Array &p_arr); + void clear_stack_variables(); +}; + +#endif // EDITOR_DEBUGGER_INSPECTOR_H diff --git a/editor/debugger/editor_debugger_node.cpp b/editor/debugger/editor_debugger_node.cpp new file mode 100644 index 0000000000..54708fd908 --- /dev/null +++ b/editor/debugger/editor_debugger_node.cpp @@ -0,0 +1,591 @@ +/*************************************************************************/ +/* editor_debugger_node.cpp */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* https://godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ +/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/*************************************************************************/ + +#include "editor_debugger_node.h" + +#include "editor/debugger/editor_debugger_tree.h" +#include "editor/editor_log.h" +#include "editor/editor_node.h" +#include "editor/plugins/script_editor_plugin.h" + +template <typename Func> +void _for_all(TabContainer *p_node, const Func &p_func) { + for (int i = 0; i < p_node->get_tab_count(); i++) { + ScriptEditorDebugger *dbg = Object::cast_to<ScriptEditorDebugger>(p_node->get_tab_control(i)); + ERR_FAIL_COND(!dbg); + p_func(dbg); + } +} + +EditorDebuggerNode *EditorDebuggerNode::singleton = NULL; + +EditorDebuggerNode::EditorDebuggerNode() { + if (!singleton) + singleton = this; + server.instance(); + + add_constant_override("margin_left", -EditorNode::get_singleton()->get_gui_base()->get_stylebox("BottomPanelDebuggerOverride", "EditorStyles")->get_margin(MARGIN_LEFT)); + add_constant_override("margin_right", -EditorNode::get_singleton()->get_gui_base()->get_stylebox("BottomPanelDebuggerOverride", "EditorStyles")->get_margin(MARGIN_RIGHT)); + + tabs = memnew(TabContainer); + tabs->set_tab_align(TabContainer::ALIGN_LEFT); + tabs->set_tabs_visible(false); + tabs->connect_compat("tab_changed", this, "_debugger_changed"); + add_child(tabs); + + Ref<StyleBoxEmpty> empty; + empty.instance(); + tabs->add_style_override("panel", empty); + + auto_switch_remote_scene_tree = EDITOR_DEF("debugger/auto_switch_to_remote_scene_tree", false); + _add_debugger(); + + // Remote scene tree + remote_scene_tree = memnew(EditorDebuggerTree); + remote_scene_tree->connect_compat("object_selected", this, "_remote_object_requested"); + remote_scene_tree->connect_compat("save_node", this, "_save_node_requested"); + EditorNode::get_singleton()->get_scene_tree_dock()->add_remote_tree_editor(remote_scene_tree); + EditorNode::get_singleton()->get_scene_tree_dock()->connect_compat("remote_tree_selected", this, "request_remote_tree"); + + remote_scene_tree_timeout = EDITOR_DEF("debugger/remote_scene_tree_refresh_interval", 1.0); + inspect_edited_object_timeout = EDITOR_DEF("debugger/remote_inspect_refresh_interval", 0.2); + + EditorNode *editor = EditorNode::get_singleton(); + editor->get_undo_redo()->set_method_notify_callback(_method_changeds, this); + editor->get_undo_redo()->set_property_notify_callback(_property_changeds, this); + editor->get_pause_button()->connect_compat("pressed", this, "_paused"); +} + +ScriptEditorDebugger *EditorDebuggerNode::_add_debugger() { + ScriptEditorDebugger *node = memnew(ScriptEditorDebugger(EditorNode::get_singleton())); + + int id = tabs->get_tab_count(); + node->connect_compat("stop_requested", this, "_debugger_wants_stop", varray(id)); + node->connect_compat("stopped", this, "_debugger_stopped", varray(id)); + node->connect_compat("stack_frame_selected", this, "_stack_frame_selected", varray(id)); + node->connect_compat("error_selected", this, "_error_selected", varray(id)); + node->connect_compat("clear_execution", this, "_clear_execution"); + node->connect_compat("breaked", this, "_breaked", varray(id)); + node->connect_compat("remote_tree_updated", this, "_remote_tree_updated", varray(id)); + node->connect_compat("remote_object_updated", this, "_remote_object_updated", varray(id)); + node->connect_compat("remote_object_property_updated", this, "_remote_object_property_updated", varray(id)); + node->connect_compat("remote_object_requested", this, "_remote_object_requested", varray(id)); + + if (tabs->get_tab_count() > 0) { + get_debugger(0)->clear_style(); + } + + tabs->add_child(node); + + node->set_name("Session " + itos(tabs->get_tab_count())); + if (tabs->get_tab_count() > 1) { + node->clear_style(); + tabs->set_tabs_visible(true); + tabs->add_style_override("panel", EditorNode::get_singleton()->get_gui_base()->get_stylebox("DebuggerPanel", "EditorStyles")); + } + + return node; +} + +void EditorDebuggerNode::_stack_frame_selected(int p_debugger) { + const ScriptEditorDebugger *dbg = get_debugger(p_debugger); + ERR_FAIL_COND(!dbg); + if (dbg != get_current_debugger()) + return; + _text_editor_stack_goto(dbg); +} + +void EditorDebuggerNode::_error_selected(const String &p_file, int p_line, int p_debugger) { + Ref<Script> s = ResourceLoader::load(p_file); + emit_signal("goto_script_line", s, p_line - 1); +} + +void EditorDebuggerNode::_text_editor_stack_goto(const ScriptEditorDebugger *p_debugger) { + const String file = p_debugger->get_stack_script_file(); + if (file.empty()) + return; + stack_script = ResourceLoader::load(file); + const int line = p_debugger->get_stack_script_line() - 1; + emit_signal("goto_script_line", stack_script, line); + emit_signal("set_execution", stack_script, line); + stack_script.unref(); // Why?!? +} + +void EditorDebuggerNode::_bind_methods() { + ClassDB::bind_method("_menu_option", &EditorDebuggerNode::_menu_option); + ClassDB::bind_method("_debugger_stopped", &EditorDebuggerNode::_debugger_stopped); + ClassDB::bind_method("_debugger_wants_stop", &EditorDebuggerNode::_debugger_wants_stop); + ClassDB::bind_method("_debugger_changed", &EditorDebuggerNode::_debugger_changed); + ClassDB::bind_method("_stack_frame_selected", &EditorDebuggerNode::_stack_frame_selected); + ClassDB::bind_method("_error_selected", &EditorDebuggerNode::_error_selected); + ClassDB::bind_method("_clear_execution", &EditorDebuggerNode::_clear_execution); + ClassDB::bind_method("_breaked", &EditorDebuggerNode::_breaked); + ClassDB::bind_method("start", &EditorDebuggerNode::start); + ClassDB::bind_method("stop", &EditorDebuggerNode::stop); + ClassDB::bind_method("_paused", &EditorDebuggerNode::_paused); + ClassDB::bind_method("request_remote_tree", &EditorDebuggerNode::request_remote_tree); + ClassDB::bind_method("_remote_tree_updated", &EditorDebuggerNode::_remote_tree_updated); + ClassDB::bind_method("_remote_object_updated", &EditorDebuggerNode::_remote_object_updated); + ClassDB::bind_method("_remote_object_property_updated", &EditorDebuggerNode::_remote_object_property_updated); + ClassDB::bind_method("_remote_object_requested", &EditorDebuggerNode::_remote_object_requested); + ClassDB::bind_method("_save_node_requested", &EditorDebuggerNode::_save_node_requested); + + // LiveDebug. + ClassDB::bind_method("live_debug_create_node", &EditorDebuggerNode::live_debug_create_node); + ClassDB::bind_method("live_debug_instance_node", &EditorDebuggerNode::live_debug_instance_node); + ClassDB::bind_method("live_debug_remove_node", &EditorDebuggerNode::live_debug_remove_node); + ClassDB::bind_method("live_debug_remove_and_keep_node", &EditorDebuggerNode::live_debug_remove_and_keep_node); + ClassDB::bind_method("live_debug_restore_node", &EditorDebuggerNode::live_debug_restore_node); + ClassDB::bind_method("live_debug_duplicate_node", &EditorDebuggerNode::live_debug_duplicate_node); + ClassDB::bind_method("live_debug_reparent_node", &EditorDebuggerNode::live_debug_reparent_node); + + ADD_SIGNAL(MethodInfo("goto_script_line")); + ADD_SIGNAL(MethodInfo("set_execution", PropertyInfo("script"), PropertyInfo(Variant::INT, "line"))); + ADD_SIGNAL(MethodInfo("clear_execution", PropertyInfo("script"))); + ADD_SIGNAL(MethodInfo("breaked", PropertyInfo(Variant::BOOL, "reallydid"), PropertyInfo(Variant::BOOL, "can_debug"))); +} + +EditorDebuggerRemoteObject *EditorDebuggerNode::get_inspected_remote_object() { + return Object::cast_to<EditorDebuggerRemoteObject>(ObjectDB::get_instance(EditorNode::get_singleton()->get_editor_history()->get_current())); +} + +ScriptEditorDebugger *EditorDebuggerNode::get_debugger(int p_id) const { + return Object::cast_to<ScriptEditorDebugger>(tabs->get_tab_control(p_id)); +} + +ScriptEditorDebugger *EditorDebuggerNode::get_current_debugger() const { + return Object::cast_to<ScriptEditorDebugger>(tabs->get_tab_control(tabs->get_current_tab())); +} + +ScriptEditorDebugger *EditorDebuggerNode::get_default_debugger() const { + return Object::cast_to<ScriptEditorDebugger>(tabs->get_tab_control(0)); +} + +Error EditorDebuggerNode::start() { + stop(); + if (EDITOR_GET("run/output/always_open_output_on_play")) { + EditorNode::get_singleton()->make_bottom_panel_item_visible(EditorNode::get_log()); + } else { + EditorNode::get_singleton()->make_bottom_panel_item_visible(this); + } + + int remote_port = (int)EditorSettings::get_singleton()->get("network/debug/remote_port"); + const Error err = server->listen(remote_port); + if (err != OK) { + EditorNode::get_log()->add_message(String("Error listening on port ") + itos(remote_port), EditorLog::MSG_TYPE_ERROR); + return err; + } + set_process(true); + EditorNode::get_log()->add_message("--- Debugging process started ---", EditorLog::MSG_TYPE_EDITOR); + return OK; +} + +void EditorDebuggerNode::stop() { + if (server->is_listening()) { + server->stop(); + EditorNode::get_log()->add_message("--- Debugging process stopped ---", EditorLog::MSG_TYPE_EDITOR); + } + // Also close all debugging sessions. + _for_all(tabs, [&](ScriptEditorDebugger *dbg) { + if (dbg->is_session_active()) + dbg->stop(); + }); + _break_state_changed(); + if (hide_on_stop) { + if (is_visible_in_tree()) + EditorNode::get_singleton()->hide_bottom_panel(); + } + breakpoints.clear(); + set_process(false); +} + +void EditorDebuggerNode::_notification(int p_what) { + switch (p_what) { + case NOTIFICATION_ENTER_TREE: { + EditorNode::get_singleton()->connect_compat("play_pressed", this, "start"); + EditorNode::get_singleton()->connect_compat("stop_pressed", this, "stop"); + } break; + case NOTIFICATION_EXIT_TREE: { + EditorNode::get_singleton()->disconnect_compat("play_pressed", this, "start"); + EditorNode::get_singleton()->disconnect_compat("stop_pressed", this, "stop"); + } break; + case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: { + if (tabs->get_tab_count() > 1) { + add_constant_override("margin_left", -EditorNode::get_singleton()->get_gui_base()->get_stylebox("BottomPanelDebuggerOverride", "EditorStyles")->get_margin(MARGIN_LEFT)); + add_constant_override("margin_right", -EditorNode::get_singleton()->get_gui_base()->get_stylebox("BottomPanelDebuggerOverride", "EditorStyles")->get_margin(MARGIN_RIGHT)); + + tabs->add_style_override("panel", EditorNode::get_singleton()->get_gui_base()->get_stylebox("DebuggerPanel", "EditorStyles")); + } + } break; + default: + break; + } + + if (p_what != NOTIFICATION_PROCESS || !server->is_listening()) + return; + + // Errors and warnings + int error_count = 0; + int warning_count = 0; + _for_all(tabs, [&](ScriptEditorDebugger *dbg) { + error_count += dbg->get_error_count(); + warning_count += dbg->get_warning_count(); + }); + + if (error_count != last_error_count || warning_count != last_warning_count) { + + _for_all(tabs, [&](ScriptEditorDebugger *dbg) { + dbg->update_tabs(); + }); + + if (error_count == 0 && warning_count == 0) { + debugger_button->set_text(TTR("Debugger")); + debugger_button->set_icon(Ref<Texture2D>()); + } else { + debugger_button->set_text(TTR("Debugger") + " (" + itos(error_count + warning_count) + ")"); + if (error_count == 0) { + debugger_button->set_icon(get_icon("Warning", "EditorIcons")); + } else { + debugger_button->set_icon(get_icon("Error", "EditorIcons")); + } + } + last_error_count = error_count; + last_warning_count = warning_count; + } + + // Remote scene tree update + remote_scene_tree_timeout -= get_process_delta_time(); + if (remote_scene_tree_timeout < 0) { + remote_scene_tree_timeout = EditorSettings::get_singleton()->get("debugger/remote_scene_tree_refresh_interval"); + if (remote_scene_tree->is_visible_in_tree()) { + get_current_debugger()->request_remote_tree(); + } + } + + // Remote inspector update + inspect_edited_object_timeout -= get_process_delta_time(); + if (inspect_edited_object_timeout < 0) { + inspect_edited_object_timeout = EditorSettings::get_singleton()->get("debugger/remote_inspect_refresh_interval"); + if (EditorDebuggerRemoteObject *obj = get_inspected_remote_object()) { + get_current_debugger()->request_remote_object(obj->remote_object_id); + } + } + + // Take connections. + if (server->is_connection_available()) { + ScriptEditorDebugger *debugger = NULL; + _for_all(tabs, [&](ScriptEditorDebugger *dbg) { + if (debugger || dbg->is_session_active()) + return; + debugger = dbg; + }); + if (debugger == NULL) { + if (tabs->get_tab_count() <= 4) { // Max 4 debugging sessions active. + debugger = _add_debugger(); + } else { + // We already have too many sessions, disconnecting new clients to prevent it from hanging. + // (Not keeping a reference to the connection will disconnect it) + server->take_connection(); + return; // Can't add, stop here. + } + } + + EditorNode::get_singleton()->get_pause_button()->set_disabled(false); + // Switch to remote tree view if so desired. + auto_switch_remote_scene_tree = (bool)EditorSettings::get_singleton()->get("debugger/auto_switch_to_remote_scene_tree"); + if (auto_switch_remote_scene_tree) { + EditorNode::get_singleton()->get_scene_tree_dock()->show_remote_tree(); + } + // Good to go. + EditorNode::get_singleton()->get_scene_tree_dock()->show_tab_buttons(); + debugger->set_editor_remote_tree(remote_scene_tree); + debugger->start(server->take_connection()); + // Send breakpoints. + for (Map<Breakpoint, bool>::Element *E = breakpoints.front(); E; E = E->next()) { + const Breakpoint &bp = E->key(); + debugger->set_breakpoint(bp.source, bp.line, E->get()); + } // Will arrive too late, how does the regular run work? + + debugger->update_live_edit_root(); + } +} + +void EditorDebuggerNode::_debugger_stopped(int p_id) { + ScriptEditorDebugger *dbg = get_debugger(p_id); + ERR_FAIL_COND(!dbg); + + bool found = false; + _for_all(tabs, [&](ScriptEditorDebugger *p_debugger) { + if (p_debugger->is_session_active()) + found = true; + }); + if (!found) { + EditorNode::get_singleton()->get_pause_button()->set_pressed(false); + EditorNode::get_singleton()->get_pause_button()->set_disabled(true); + EditorNode::get_singleton()->get_scene_tree_dock()->hide_remote_tree(); + EditorNode::get_singleton()->get_scene_tree_dock()->hide_tab_buttons(); + EditorNode::get_singleton()->notify_all_debug_sessions_exited(); + } +} + +void EditorDebuggerNode::_debugger_wants_stop(int p_id) { + // Ask editor to kill PID. + int pid = get_debugger(p_id)->get_remote_pid(); + if (pid) + EditorNode::get_singleton()->call_deferred("stop_child_process", pid); +} + +void EditorDebuggerNode::_debugger_changed(int p_tab) { + if (get_inspected_remote_object()) { + // Clear inspected object, you can only inspect objects in selected debugger. + // Hopefully, in the future, we will have one inspector per debugger. + EditorNode::get_singleton()->push_item(NULL); + } + if (remote_scene_tree->is_visible_in_tree()) { + get_current_debugger()->request_remote_tree(); + } + if (get_current_debugger()->is_breaked()) { + _text_editor_stack_goto(get_current_debugger()); + } +} + +void EditorDebuggerNode::set_script_debug_button(MenuButton *p_button) { + script_menu = p_button; + script_menu->set_text(TTR("Debug")); + script_menu->set_switch_on_hover(true); + PopupMenu *p = script_menu->get_popup(); + p->set_hide_on_window_lose_focus(true); + p->add_shortcut(ED_GET_SHORTCUT("debugger/step_into"), DEBUG_STEP); + p->add_shortcut(ED_GET_SHORTCUT("debugger/step_over"), DEBUG_NEXT); + p->add_separator(); + p->add_shortcut(ED_GET_SHORTCUT("debugger/break"), DEBUG_BREAK); + p->add_shortcut(ED_GET_SHORTCUT("debugger/continue"), DEBUG_CONTINUE); + p->add_separator(); + p->add_check_shortcut(ED_GET_SHORTCUT("debugger/keep_debugger_open"), DEBUG_SHOW_KEEP_OPEN); + p->add_check_shortcut(ED_GET_SHORTCUT("debugger/debug_with_external_editor"), DEBUG_WITH_EXTERNAL_EDITOR); + p->connect_compat("id_pressed", this, "_menu_option"); + + _break_state_changed(); + script_menu->show(); +} + +void EditorDebuggerNode::_break_state_changed() { + const bool breaked = get_current_debugger()->is_breaked(); + const bool can_debug = get_current_debugger()->is_debuggable(); + if (breaked) // Show debugger. + EditorNode::get_singleton()->make_bottom_panel_item_visible(this); + + // Update script menu. + if (!script_menu) + return; + PopupMenu *p = script_menu->get_popup(); + p->set_item_disabled(p->get_item_index(DEBUG_NEXT), !(breaked && can_debug)); + p->set_item_disabled(p->get_item_index(DEBUG_STEP), !(breaked && can_debug)); + p->set_item_disabled(p->get_item_index(DEBUG_BREAK), breaked); + p->set_item_disabled(p->get_item_index(DEBUG_CONTINUE), !breaked); +} + +void EditorDebuggerNode::_menu_option(int p_id) { + switch (p_id) { + case DEBUG_NEXT: { + debug_next(); + } break; + case DEBUG_STEP: { + debug_step(); + } break; + case DEBUG_BREAK: { + debug_break(); + } break; + case DEBUG_CONTINUE: { + debug_continue(); + } break; + + case DEBUG_SHOW_KEEP_OPEN: { + bool visible = script_menu->get_popup()->is_item_checked(script_menu->get_popup()->get_item_index(DEBUG_SHOW_KEEP_OPEN)); + hide_on_stop = visible; + script_menu->get_popup()->set_item_checked(script_menu->get_popup()->get_item_index(DEBUG_SHOW_KEEP_OPEN), !visible); + } break; + case DEBUG_WITH_EXTERNAL_EDITOR: { + bool checked = !script_menu->get_popup()->is_item_checked(script_menu->get_popup()->get_item_index(DEBUG_WITH_EXTERNAL_EDITOR)); + debug_with_external_editor = checked; + script_menu->get_popup()->set_item_checked(script_menu->get_popup()->get_item_index(DEBUG_WITH_EXTERNAL_EDITOR), checked); + } break; + } +} + +void EditorDebuggerNode::_paused() { + const bool paused = EditorNode::get_singleton()->get_pause_button()->is_pressed(); + _for_all(tabs, [&](ScriptEditorDebugger *dbg) { + if (paused && !dbg->is_breaked()) { + dbg->debug_break(); + } else if (!paused && dbg->is_breaked()) { + dbg->debug_continue(); + } + }); +} + +void EditorDebuggerNode::_breaked(bool p_breaked, bool p_can_debug, int p_debugger) { + if (get_current_debugger() != get_debugger(p_debugger)) { + if (!p_breaked) + return; + tabs->set_current_tab(p_debugger); + } + _break_state_changed(); + EditorNode::get_singleton()->get_pause_button()->set_pressed(p_breaked); + emit_signal("breaked", p_breaked, p_can_debug); +} + +bool EditorDebuggerNode::is_skip_breakpoints() const { + return get_default_debugger()->is_skip_breakpoints(); +} + +void EditorDebuggerNode::set_breakpoint(const String &p_path, int p_line, bool p_enabled) { + breakpoints[Breakpoint(p_path, p_line)] = p_enabled; + _for_all(tabs, [&](ScriptEditorDebugger *dbg) { + dbg->set_breakpoint(p_path, p_line, p_enabled); + }); +} + +void EditorDebuggerNode::reload_scripts() { + _for_all(tabs, [&](ScriptEditorDebugger *dbg) { + dbg->reload_scripts(); + }); +} + +// LiveEdit/Inspector +void EditorDebuggerNode::request_remote_tree() { + get_current_debugger()->request_remote_tree(); +} + +void EditorDebuggerNode::_remote_tree_updated(int p_debugger) { + if (p_debugger != tabs->get_current_tab()) + return; + remote_scene_tree->clear(); + remote_scene_tree->update_scene_tree(get_current_debugger()->get_remote_tree(), p_debugger); +} + +void EditorDebuggerNode::_remote_object_updated(ObjectID p_id, int p_debugger) { + if (p_debugger != tabs->get_current_tab()) + return; + if (EditorDebuggerRemoteObject *obj = get_inspected_remote_object()) { + if (obj->remote_object_id == p_id) + return; // Already being edited + } + + EditorNode::get_singleton()->push_item(get_current_debugger()->get_remote_object(p_id)); +} + +void EditorDebuggerNode::_remote_object_property_updated(ObjectID p_id, const String &p_property, int p_debugger) { + if (p_debugger != tabs->get_current_tab()) + return; + if (EditorDebuggerRemoteObject *obj = get_inspected_remote_object()) { + if (obj->remote_object_id != p_id) + return; + EditorNode::get_singleton()->get_inspector()->update_property(p_property); + } +} + +void EditorDebuggerNode::_remote_object_requested(ObjectID p_id, int p_debugger) { + if (p_debugger != tabs->get_current_tab()) + return; + inspect_edited_object_timeout = 0.7; // Temporarily disable timeout to avoid multiple requests. + get_current_debugger()->request_remote_object(p_id); +} + +void EditorDebuggerNode::_save_node_requested(ObjectID p_id, const String &p_file, int p_debugger) { + if (p_debugger != tabs->get_current_tab()) + return; + get_current_debugger()->save_node(p_id, p_file); +} + +// Remote inspector/edit. +void EditorDebuggerNode::_method_changeds(void *p_ud, Object *p_base, const StringName &p_name, VARIANT_ARG_DECLARE) { + if (!singleton) + return; + _for_all(singleton->tabs, [&](ScriptEditorDebugger *dbg) { + dbg->_method_changed(p_base, p_name, VARIANT_ARG_PASS); + }); +} + +void EditorDebuggerNode::_property_changeds(void *p_ud, Object *p_base, const StringName &p_property, const Variant &p_value) { + if (!singleton) + return; + _for_all(singleton->tabs, [&](ScriptEditorDebugger *dbg) { + dbg->_property_changed(p_base, p_property, p_value); + }); +} + +// LiveDebug +void EditorDebuggerNode::set_live_debugging(bool p_enabled) { + + _for_all(tabs, [&](ScriptEditorDebugger *dbg) { + dbg->set_live_debugging(p_enabled); + }); +} +void EditorDebuggerNode::update_live_edit_root() { + _for_all(tabs, [&](ScriptEditorDebugger *dbg) { + dbg->update_live_edit_root(); + }); +} +void EditorDebuggerNode::live_debug_create_node(const NodePath &p_parent, const String &p_type, const String &p_name) { + _for_all(tabs, [&](ScriptEditorDebugger *dbg) { + dbg->live_debug_create_node(p_parent, p_type, p_name); + }); +} +void EditorDebuggerNode::live_debug_instance_node(const NodePath &p_parent, const String &p_path, const String &p_name) { + _for_all(tabs, [&](ScriptEditorDebugger *dbg) { + dbg->live_debug_instance_node(p_parent, p_path, p_name); + }); +} +void EditorDebuggerNode::live_debug_remove_node(const NodePath &p_at) { + _for_all(tabs, [&](ScriptEditorDebugger *dbg) { + dbg->live_debug_remove_node(p_at); + }); +} +void EditorDebuggerNode::live_debug_remove_and_keep_node(const NodePath &p_at, ObjectID p_keep_id) { + _for_all(tabs, [&](ScriptEditorDebugger *dbg) { + dbg->live_debug_remove_and_keep_node(p_at, p_keep_id); + }); +} +void EditorDebuggerNode::live_debug_restore_node(ObjectID p_id, const NodePath &p_at, int p_at_pos) { + _for_all(tabs, [&](ScriptEditorDebugger *dbg) { + dbg->live_debug_restore_node(p_id, p_at, p_at_pos); + }); +} +void EditorDebuggerNode::live_debug_duplicate_node(const NodePath &p_at, const String &p_new_name) { + _for_all(tabs, [&](ScriptEditorDebugger *dbg) { + dbg->live_debug_duplicate_node(p_at, p_new_name); + }); +} +void EditorDebuggerNode::live_debug_reparent_node(const NodePath &p_at, const NodePath &p_new_place, const String &p_new_name, int p_at_pos) { + _for_all(tabs, [&](ScriptEditorDebugger *dbg) { + dbg->live_debug_reparent_node(p_at, p_new_place, p_new_name, p_at_pos); + }); +} diff --git a/editor/debugger/editor_debugger_node.h b/editor/debugger/editor_debugger_node.h new file mode 100644 index 0000000000..13a1d6dcb3 --- /dev/null +++ b/editor/debugger/editor_debugger_node.h @@ -0,0 +1,177 @@ +/*************************************************************************/ +/* editor_debugger_node.h */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* https://godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ +/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/*************************************************************************/ + +#ifndef EDITOR_DEBUGGER_NODE_H +#define EDITOR_DEBUGGER_NODE_H + +#include "core/io/tcp_server.h" +#include "editor/debugger/script_editor_debugger.h" +#include "scene/gui/button.h" +#include "scene/gui/tab_container.h" + +class EditorDebuggerTree; + +class EditorDebuggerNode : public MarginContainer { + + GDCLASS(EditorDebuggerNode, MarginContainer); + +private: + enum Options { + DEBUG_NEXT, + DEBUG_STEP, + DEBUG_BREAK, + DEBUG_CONTINUE, + DEBUG_SHOW_KEEP_OPEN, + DEBUG_WITH_EXTERNAL_EDITOR, + }; + + class Breakpoint { + public: + String source; + int line = 0; + + bool operator<(const Breakpoint &p_b) const { + if (line == p_b.line) + return source < p_b.source; + return line < p_b.line; + } + + Breakpoint(){}; + + Breakpoint(const String &p_source, int p_line) { + line = p_line; + source = p_source; + } + }; + + Ref<TCP_Server> server = NULL; + TabContainer *tabs = NULL; + Button *debugger_button = NULL; + MenuButton *script_menu = NULL; + + Ref<Script> stack_script; // Why?!? + + int last_error_count = 0; + int last_warning_count = 0; + + float inspect_edited_object_timeout = 0; + EditorDebuggerTree *remote_scene_tree = NULL; + float remote_scene_tree_timeout = 0.0; + bool auto_switch_remote_scene_tree = false; + bool debug_with_external_editor = false; + bool hide_on_stop = true; + ScriptEditorDebugger::CameraOverride camera_override = ScriptEditorDebugger::OVERRIDE_NONE; + Map<Breakpoint, bool> breakpoints; + + ScriptEditorDebugger *_add_debugger(); + EditorDebuggerRemoteObject *get_inspected_remote_object(); + + friend class DebuggerEditorPlugin; + static EditorDebuggerNode *singleton; + EditorDebuggerNode(); + +protected: + void _debugger_stopped(int p_id); + void _debugger_wants_stop(int p_id); + void _debugger_changed(int p_tab); + void _remote_tree_updated(int p_debugger); + void _remote_object_updated(ObjectID p_id, int p_debugger); + void _remote_object_property_updated(ObjectID p_id, const String &p_property, int p_debugger); + void _remote_object_requested(ObjectID p_id, int p_debugger); + void _save_node_requested(ObjectID p_id, const String &p_file, int p_debugger); + + void _clear_execution(REF p_script) { + emit_signal("clear_execution", p_script); + } + + void _text_editor_stack_goto(const ScriptEditorDebugger *p_debugger); + void _stack_frame_selected(int p_debugger); + void _error_selected(const String &p_file, int p_line, int p_debugger); + void _breaked(bool p_breaked, bool p_can_debug, int p_debugger); + void _paused(); + void _break_state_changed(); + void _menu_option(int p_id); + +protected: + void _notification(int p_what); + static void _bind_methods(); + +public: + static EditorDebuggerNode *get_singleton() { return singleton; } + + ScriptEditorDebugger *get_current_debugger() const; + ScriptEditorDebugger *get_default_debugger() const; + ScriptEditorDebugger *get_debugger(int p_debugger) const; + + void debug_next() { get_default_debugger()->debug_next(); } + void debug_step() { get_default_debugger()->debug_step(); } + void debug_break() { get_default_debugger()->debug_break(); } + void debug_continue() { get_default_debugger()->debug_continue(); } + + void set_script_debug_button(MenuButton *p_button); + + void set_tool_button(Button *p_button) { + debugger_button = p_button; + } + + String get_var_value(const String &p_var) const { return get_default_debugger()->get_var_value(p_var); } + Ref<Script> get_dump_stack_script() const { return stack_script; } // Why do we need this? + + bool get_debug_with_external_editor() { return debug_with_external_editor; } + + bool is_skip_breakpoints() const; + void set_breakpoint(const String &p_path, int p_line, bool p_enabled); + void reload_scripts(); + + // Remote inspector/edit. + void request_remote_tree(); + static void _method_changeds(void *p_ud, Object *p_base, const StringName &p_name, VARIANT_ARG_DECLARE); + static void _property_changeds(void *p_ud, Object *p_base, const StringName &p_property, const Variant &p_value); + + // LiveDebug + void set_live_debugging(bool p_enabled); + void update_live_edit_root(); + void live_debug_create_node(const NodePath &p_parent, const String &p_type, const String &p_name); + void live_debug_instance_node(const NodePath &p_parent, const String &p_path, const String &p_name); + void live_debug_remove_node(const NodePath &p_at); + void live_debug_remove_and_keep_node(const NodePath &p_at, ObjectID p_keep_id); + void live_debug_restore_node(ObjectID p_id, const NodePath &p_at, int p_at_pos); + void live_debug_duplicate_node(const NodePath &p_at, const String &p_new_name); + void live_debug_reparent_node(const NodePath &p_at, const NodePath &p_new_place, const String &p_new_name, int p_at_pos); + + // Camera + void set_camera_override(ScriptEditorDebugger::CameraOverride p_override) { camera_override = p_override; } + ScriptEditorDebugger::CameraOverride get_camera_override() { return camera_override; } + + Error start(); + + void stop(); +}; +#endif // EDITOR_DEBUGGER_NODE_H diff --git a/editor/debugger/editor_debugger_tree.cpp b/editor/debugger/editor_debugger_tree.cpp new file mode 100644 index 0000000000..9ba5d0cbe1 --- /dev/null +++ b/editor/debugger/editor_debugger_tree.cpp @@ -0,0 +1,274 @@ +/*************************************************************************/ +/* editor_debugger_tree.cpp */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* https://godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ +/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/*************************************************************************/ + +#include "editor_debugger_tree.h" + +#include "editor/editor_node.h" +#include "scene/debugger/scene_debugger.h" +#include "scene/resources/packed_scene.h" + +EditorDebuggerTree::EditorDebuggerTree() { + set_v_size_flags(SIZE_EXPAND_FILL); + set_allow_rmb_select(true); + + // Popup + item_menu = memnew(PopupMenu); + item_menu->connect_compat("id_pressed", this, "_item_menu_id_pressed"); + add_child(item_menu); + + // File Dialog + file_dialog = memnew(EditorFileDialog); + file_dialog->connect_compat("file_selected", this, "_file_selected"); + add_child(file_dialog); +} + +void EditorDebuggerTree::_notification(int p_what) { + if (p_what == NOTIFICATION_POSTINITIALIZE) { + connect_compat("cell_selected", this, "_scene_tree_selected"); + connect_compat("item_collapsed", this, "_scene_tree_folded"); + connect_compat("item_rmb_selected", this, "_scene_tree_rmb_selected"); + } +} + +void EditorDebuggerTree::_bind_methods() { + ClassDB::bind_method(D_METHOD("_scene_tree_selected"), &EditorDebuggerTree::_scene_tree_selected); + ClassDB::bind_method(D_METHOD("_scene_tree_folded"), &EditorDebuggerTree::_scene_tree_folded); + ClassDB::bind_method(D_METHOD("_scene_tree_rmb_selected"), &EditorDebuggerTree::_scene_tree_rmb_selected); + ClassDB::bind_method(D_METHOD("_item_menu_id_pressed"), &EditorDebuggerTree::_item_menu_id_pressed); + ClassDB::bind_method(D_METHOD("_file_selected"), &EditorDebuggerTree::_file_selected); + ADD_SIGNAL(MethodInfo("object_selected", PropertyInfo(Variant::INT, "object_id"), PropertyInfo(Variant::INT, "debugger"))); + ADD_SIGNAL(MethodInfo("save_node", PropertyInfo(Variant::INT, "object_id"), PropertyInfo(Variant::STRING, "filename"), PropertyInfo(Variant::INT, "debugger"))); +} + +void EditorDebuggerTree::_scene_tree_selected() { + + if (updating_scene_tree) { + return; + } + + TreeItem *item = get_selected(); + if (!item) { + return; + } + + inspected_object_id = uint64_t(item->get_metadata(0)); + + emit_signal("object_selected", inspected_object_id, debugger_id); +} + +void EditorDebuggerTree::_scene_tree_folded(Object *p_obj) { + + if (updating_scene_tree) { + + return; + } + TreeItem *item = Object::cast_to<TreeItem>(p_obj); + + if (!item) + return; + + ObjectID id = ObjectID(uint64_t(item->get_metadata(0))); + if (unfold_cache.has(id)) { + unfold_cache.erase(id); + } else { + unfold_cache.insert(id); + } +} + +void EditorDebuggerTree::_scene_tree_rmb_selected(const Vector2 &p_position) { + + TreeItem *item = get_item_at_position(p_position); + if (!item) + return; + + item->select(0); + + item_menu->clear(); + item_menu->add_icon_item(get_icon("CreateNewSceneFrom", "EditorIcons"), TTR("Save Branch as Scene"), ITEM_MENU_SAVE_REMOTE_NODE); + item_menu->add_icon_item(get_icon("CopyNodePath", "EditorIcons"), TTR("Copy Node Path"), ITEM_MENU_COPY_NODE_PATH); + item_menu->set_global_position(get_global_mouse_position()); + item_menu->popup(); +} + +/// Populates inspect_scene_tree given data in nodes as a flat list, encoded depth first. +/// +/// Given a nodes array like [R,A,B,C,D,E] the following Tree will be generated, assuming +/// filter is an empty String, R and A child count are 2, B is 1 and C, D and E are 0. +/// +/// R +/// |-A +/// | |-B +/// | | |-C +/// | | +/// | |-D +/// | +/// |-E +/// +void EditorDebuggerTree::update_scene_tree(const SceneDebuggerTree *p_tree, int p_debugger) { + updating_scene_tree = true; + const String last_path = get_selected_path(); + const String filter = EditorNode::get_singleton()->get_scene_tree_dock()->get_filter(); + + // Nodes are in a flatten list, depth first. Use a stack of parents, avoid recursion. + List<Pair<TreeItem *, int> > parents; + for (int i = 0; i < p_tree->nodes.size(); i++) { + TreeItem *parent = NULL; + if (parents.size()) { // Find last parent. + Pair<TreeItem *, int> &p = parents[0]; + parent = p.first; + if (!(--p.second)) { // If no child left, remove it. + parents.pop_front(); + } + } + // Add this node. + const SceneDebuggerTree::RemoteNode &node = p_tree->nodes[i]; + TreeItem *item = create_item(parent); + item->set_text(0, node.name); + item->set_tooltip(0, TTR("Type:") + " " + node.type_name); + Ref<Texture2D> icon = EditorNode::get_singleton()->get_class_icon(node.type_name, ""); + if (icon.is_valid()) { + item->set_icon(0, icon); + } + item->set_metadata(0, node.id); + + // Set current item as collapsed if necessary (root is never collapsed) + if (parent) { + if (!unfold_cache.has(node.id)) { + item->set_collapsed(true); + } + } + // Select previously selected node. + if (debugger_id == p_debugger) { // Can use remote id. + if (node.id == inspected_object_id) { + item->select(0); + } + } else { // Must use path + if (last_path == _get_path(item)) { + updating_scene_tree = false; // Force emission of new selection + item->select(0); + updating_scene_tree = true; + } + } + + // Add in front of the parents stack if children are expected. + if (node.child_count) { + parents.push_front(Pair<TreeItem *, int>(item, node.child_count)); + } else { + // Apply filters. + while (parent) { + const bool had_siblings = item->get_prev() || item->get_next(); + if (filter.is_subsequence_ofi(item->get_text(0))) + break; // Filter matches, must survive. + parent->remove_child(item); + memdelete(item); + if (had_siblings) + break; // Parent must survive. + item = parent; + parent = item->get_parent(); + // Check if parent expects more children. + for (int j = 0; j < parents.size(); j++) { + if (parents[j].first == item) { + parent = NULL; + break; // Might have more children. + } + } + } + } + } + debugger_id = p_debugger; // Needed by hook, could be avoided if every debugger had its own tree + updating_scene_tree = false; +} + +String EditorDebuggerTree::get_selected_path() { + if (!get_selected()) + return ""; + return _get_path(get_selected()); +} + +String EditorDebuggerTree::_get_path(TreeItem *p_item) { + ERR_FAIL_COND_V(!p_item, ""); + + if (p_item->get_parent() == NULL) { + return "/root"; + } + String text = p_item->get_text(0); + TreeItem *cur = p_item->get_parent(); + while (cur) { + text = cur->get_text(0) + "/" + text; + cur = cur->get_parent(); + } + return "/" + text; +} + +void EditorDebuggerTree::_item_menu_id_pressed(int p_option) { + + switch (p_option) { + + case ITEM_MENU_SAVE_REMOTE_NODE: { + + file_dialog->set_access(EditorFileDialog::ACCESS_RESOURCES); + file_dialog->set_mode(EditorFileDialog::MODE_SAVE_FILE); + + List<String> extensions; + Ref<PackedScene> sd = memnew(PackedScene); + ResourceSaver::get_recognized_extensions(sd, &extensions); + file_dialog->clear_filters(); + for (int i = 0; i < extensions.size(); i++) { + file_dialog->add_filter("*." + extensions[i] + " ; " + extensions[i].to_upper()); + } + + file_dialog->popup_centered_ratio(); + } break; + case ITEM_MENU_COPY_NODE_PATH: { + + String text = get_selected_path(); + if (text.empty()) { + return; + } else if (text == "/root") { + text = "."; + } else { + text = text.replace("/root/", ""); + int slash = text.find("/"); + if (slash < 0) { + text = "."; + } else { + text = text.substr(slash + 1); + } + } + OS::get_singleton()->set_clipboard(text); + } break; + } +} + +void EditorDebuggerTree::_file_selected(const String &p_file) { + if (inspected_object_id.is_null()) + return; + emit_signal("save_node", inspected_object_id, p_file, debugger_id); +} diff --git a/platform/android/power_android.h b/editor/debugger/editor_debugger_tree.h index 9f77f3fc6b..d9084bc596 100644 --- a/platform/android/power_android.h +++ b/editor/debugger/editor_debugger_tree.h @@ -1,5 +1,5 @@ /*************************************************************************/ -/* power_android.h */ +/* editor_debugger_tree.h */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ @@ -28,53 +28,47 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -#ifndef POWER_ANDROID_H -#define POWER_ANDROID_H +#include "scene/gui/tree.h" -#include "core/os/os.h" +#ifndef EDITOR_DEBUGGER_TREE_H +#define EDITOR_DEBUGGER_TREE_H -#include <android/native_window_jni.h> +class SceneDebuggerTree; +class EditorFileDialog; -class PowerAndroid { +class EditorDebuggerTree : public Tree { - struct LocalReferenceHolder { - JNIEnv *m_env; - const char *m_func; - }; + GDCLASS(EditorDebuggerTree, Tree); private: - static struct LocalReferenceHolder refs; - static JNIEnv *env; - static jmethodID mid; - static jobject context; - static jstring action; - static jclass cls; - static jobject filter; - static jobject intent; - static jstring iname; - static jmethodID imid; - static jstring bname; - static jmethodID bmid; - - int nsecs_left; - int percent_left; - OS::PowerState power_state; + enum ItemMenu { + ITEM_MENU_SAVE_REMOTE_NODE, + ITEM_MENU_COPY_NODE_PATH, + }; - bool GetPowerInfo_Android(); - bool UpdatePowerInfo(); + ObjectID inspected_object_id; + int debugger_id = 0; + bool updating_scene_tree = false; + Set<ObjectID> unfold_cache; + PopupMenu *item_menu = NULL; + EditorFileDialog *file_dialog = NULL; -public: - static int s_active; + String _get_path(TreeItem *p_item); + void _scene_tree_folded(Object *p_obj); + void _scene_tree_selected(); + void _scene_tree_rmb_selected(const Vector2 &p_position); + void _item_menu_id_pressed(int p_option); + void _file_selected(const String &p_file); - PowerAndroid(); - virtual ~PowerAndroid(); - static bool LocalReferenceHolder_Init(struct LocalReferenceHolder *refholder, JNIEnv *env); - static struct LocalReferenceHolder LocalReferenceHolder_Setup(const char *func); - static void LocalReferenceHolder_Cleanup(struct LocalReferenceHolder *refholder); +protected: + static void _bind_methods(); + void _notification(int p_what); - OS::PowerState get_power_state(); - int get_power_seconds_left(); - int get_power_percent_left(); +public: + String get_selected_path(); + ObjectID get_selected_object(); + int get_current_debugger(); // Would love to have one tree for every debugger. + void update_scene_tree(const SceneDebuggerTree *p_tree, int p_debugger); + EditorDebuggerTree(); }; - -#endif // POWER_ANDROID_H +#endif // EDITOR_DEBUGGER_TREE_H diff --git a/editor/script_editor_debugger.cpp b/editor/debugger/script_editor_debugger.cpp index 2b28aa87a3..45af70f191 100644 --- a/editor/script_editor_debugger.cpp +++ b/editor/debugger/script_editor_debugger.cpp @@ -32,18 +32,20 @@ #include "core/io/marshalls.h" #include "core/project_settings.h" +#include "core/script_debugger_remote.h" #include "core/ustring.h" #include "editor/editor_log.h" #include "editor/editor_network_profiler.h" +#include "editor/editor_node.h" +#include "editor/editor_profiler.h" +#include "editor/editor_scale.h" +#include "editor/editor_settings.h" #include "editor/editor_visual_profiler.h" #include "editor/plugins/canvas_item_editor_plugin.h" #include "editor/plugins/spatial_editor_plugin.h" -#include "editor_node.h" -#include "editor_profiler.h" -#include "editor_scale.h" -#include "editor_settings.h" +#include "editor/property_editor.h" #include "main/performance.h" -#include "property_editor.h" +#include "scene/debugger/scene_debugger.h" #include "scene/gui/dialogs.h" #include "scene/gui/label.h" #include "scene/gui/line_edit.h" @@ -56,149 +58,14 @@ #include "scene/gui/tree.h" #include "scene/resources/packed_scene.h" -class ScriptEditorDebuggerVariables : public Object { - - GDCLASS(ScriptEditorDebuggerVariables, Object); - - List<PropertyInfo> props; - Map<StringName, Variant> values; - -protected: - bool _set(const StringName &p_name, const Variant &p_value) { - - return false; - } - - bool _get(const StringName &p_name, Variant &r_ret) const { - - if (!values.has(p_name)) - return false; - r_ret = values[p_name]; - return true; - } - void _get_property_list(List<PropertyInfo> *p_list) const { - - for (const List<PropertyInfo>::Element *E = props.front(); E; E = E->next()) - p_list->push_back(E->get()); - } - -public: - void clear() { - - props.clear(); - values.clear(); - } - - String get_var_value(const String &p_var) const { - - for (Map<StringName, Variant>::Element *E = values.front(); E; E = E->next()) { - String v = E->key().operator String().get_slice("/", 1); - if (v == p_var) - return E->get(); - } - - return ""; - } - - void add_property(const String &p_name, const Variant &p_value, const PropertyHint &p_hint, const String p_hint_string) { - - PropertyInfo pinfo; - pinfo.name = p_name; - pinfo.type = p_value.get_type(); - pinfo.hint = p_hint; - pinfo.hint_string = p_hint_string; - props.push_back(pinfo); - values[p_name] = p_value; - } - - void update() { - _change_notify(); - } - - ScriptEditorDebuggerVariables() { - } -}; - -class ScriptEditorDebuggerInspectedObject : public Object { - - GDCLASS(ScriptEditorDebuggerInspectedObject, Object); - -protected: - bool _set(const StringName &p_name, const Variant &p_value) { - - if (!prop_values.has(p_name) || String(p_name).begins_with("Constants/")) - return false; - - prop_values[p_name] = p_value; - emit_signal("value_edited", p_name, p_value); - return true; - } - - bool _get(const StringName &p_name, Variant &r_ret) const { - - if (!prop_values.has(p_name)) - return false; - - r_ret = prop_values[p_name]; - return true; - } - - void _get_property_list(List<PropertyInfo> *p_list) const { - - p_list->clear(); //sorry, no want category - for (const List<PropertyInfo>::Element *E = prop_list.front(); E; E = E->next()) { - p_list->push_back(E->get()); - } - } - - static void _bind_methods() { - - ClassDB::bind_method(D_METHOD("get_title"), &ScriptEditorDebuggerInspectedObject::get_title); - ClassDB::bind_method(D_METHOD("get_variant"), &ScriptEditorDebuggerInspectedObject::get_variant); - ClassDB::bind_method(D_METHOD("clear"), &ScriptEditorDebuggerInspectedObject::clear); - ClassDB::bind_method(D_METHOD("get_remote_object_id"), &ScriptEditorDebuggerInspectedObject::get_remote_object_id); - - ADD_SIGNAL(MethodInfo("value_edited")); - } - -public: - String type_name; - ObjectID remote_object_id; - List<PropertyInfo> prop_list; - Map<StringName, Variant> prop_values; - - ObjectID get_remote_object_id() { - return remote_object_id; - } - - String get_title() { - if (remote_object_id.is_valid()) - return TTR("Remote ") + String(type_name) + ": " + itos(remote_object_id); - else - return "<null>"; - } - Variant get_variant(const StringName &p_name) { - - Variant var; - _get(p_name, var); - return var; - } - - void clear() { - - prop_list.clear(); - prop_values.clear(); - } - void update() { - _change_notify(); - } - void update_single(const char *p_prop) { - _change_notify(p_prop); - } - - ScriptEditorDebuggerInspectedObject() { +void ScriptEditorDebugger::_put_msg(String p_message, Array p_data) { + if (is_session_active()) { + Array msg; + msg.push_back(p_message); + msg.push_back(p_data); + ppeer->put_var(msg); } -}; +} void ScriptEditorDebugger::debug_copy() { String msg = reason->get_text(); @@ -213,285 +80,153 @@ void ScriptEditorDebugger::debug_skip_breakpoints() { else skip_breakpoints->set_icon(get_icon("DebugSkipBreakpointsOff", "EditorIcons")); - if (connection.is_valid()) { - Array msg; - msg.push_back("set_skip_breakpoints"); - msg.push_back(skip_breakpoints_value); - ppeer->put_var(msg); - } + Array msg; + msg.push_back(skip_breakpoints_value); + _put_msg("set_skip_breakpoints", msg); } void ScriptEditorDebugger::debug_next() { ERR_FAIL_COND(!breaked); - ERR_FAIL_COND(connection.is_null()); - ERR_FAIL_COND(!connection->is_connected_to_host()); - Array msg; - msg.push_back("next"); - ppeer->put_var(msg); + + _put_msg("next", Array()); _clear_execution(); - stack_dump->clear(); } void ScriptEditorDebugger::debug_step() { ERR_FAIL_COND(!breaked); - ERR_FAIL_COND(connection.is_null()); - ERR_FAIL_COND(!connection->is_connected_to_host()); - Array msg; - msg.push_back("step"); - ppeer->put_var(msg); + _put_msg("step", Array()); _clear_execution(); - stack_dump->clear(); } void ScriptEditorDebugger::debug_break() { ERR_FAIL_COND(breaked); - ERR_FAIL_COND(connection.is_null()); - ERR_FAIL_COND(!connection->is_connected_to_host()); - Array msg; - msg.push_back("break"); - ppeer->put_var(msg); + _put_msg("break", Array()); } void ScriptEditorDebugger::debug_continue() { ERR_FAIL_COND(!breaked); - ERR_FAIL_COND(connection.is_null()); - ERR_FAIL_COND(!connection->is_connected_to_host()); - OS::get_singleton()->enable_for_stealing_focus(EditorNode::get_singleton()->get_child_process_id()); + // Allow focus stealing only if we actually run this client for security. + if (remote_pid && EditorNode::get_singleton()->has_child_process(remote_pid)) + OS::get_singleton()->enable_for_stealing_focus(remote_pid); - Array msg; _clear_execution(); - msg.push_back("continue"); - ppeer->put_var(msg); + _put_msg("continue", Array()); } -void ScriptEditorDebugger::_scene_tree_folded(Object *obj) { - - if (updating_scene_tree) { - - return; - } - TreeItem *item = Object::cast_to<TreeItem>(obj); - - if (!item) - return; - - ObjectID id = item->get_metadata(0); - if (unfold_cache.has(id)) { - unfold_cache.erase(id); +void ScriptEditorDebugger::update_tabs() { + if (error_count == 0 && warning_count == 0) { + errors_tab->set_name(TTR("Errors")); + tabs->set_tab_icon(errors_tab->get_index(), Ref<Texture2D>()); } else { - unfold_cache.insert(id); + errors_tab->set_name(TTR("Errors") + " (" + itos(error_count + warning_count) + ")"); + if (error_count == 0) { + tabs->set_tab_icon(errors_tab->get_index(), get_icon("Warning", "EditorIcons")); + } else { + tabs->set_tab_icon(errors_tab->get_index(), get_icon("Error", "EditorIcons")); + } } } -void ScriptEditorDebugger::_scene_tree_selected() { - - if (updating_scene_tree) { - - return; - } - TreeItem *item = inspect_scene_tree->get_selected(); - if (!item) { - - return; - } - - inspected_object_id = item->get_metadata(0).operator ObjectID(); +void ScriptEditorDebugger::clear_style() { + tabs->add_style_override("panel", NULL); +} +void ScriptEditorDebugger::save_node(ObjectID p_id, const String &p_file) { Array msg; - msg.push_back("inspect_object"); - msg.push_back(inspected_object_id); - ppeer->put_var(msg); + msg.push_back(p_id); + msg.push_back(p_file); + _put_msg("save_node", msg); } -void ScriptEditorDebugger::_scene_tree_rmb_selected(const Vector2 &p_position) { +void ScriptEditorDebugger::_file_selected(const String &p_file) { + Error err; + FileAccessRef file = FileAccess::open(p_file, FileAccess::WRITE, &err); - TreeItem *item = inspect_scene_tree->get_item_at_position(p_position); - if (!item) + if (err != OK) { + ERR_PRINT("Failed to open " + p_file); return; + } + Vector<String> line; + line.resize(Performance::MONITOR_MAX); - item->select(0); - - item_menu->clear(); - item_menu->add_icon_item(get_icon("CreateNewSceneFrom", "EditorIcons"), TTR("Save Branch as Scene"), ITEM_MENU_SAVE_REMOTE_NODE); - item_menu->add_icon_item(get_icon("CopyNodePath", "EditorIcons"), TTR("Copy Node Path"), ITEM_MENU_COPY_NODE_PATH); - item_menu->set_global_position(get_global_mouse_position()); - item_menu->popup(); -} + // signatures + for (int i = 0; i < Performance::MONITOR_MAX; i++) { + line.write[i] = Performance::get_singleton()->get_monitor_name(Performance::Monitor(i)); + } + file->store_csv_line(line); -void ScriptEditorDebugger::_file_selected(const String &p_file) { - switch (file_dialog_mode) { - case SAVE_NODE: { - Array msg; - msg.push_back("save_node"); - msg.push_back(inspected_object_id); - msg.push_back(p_file); - ppeer->put_var(msg); - } break; - case SAVE_CSV: { - Error err; - FileAccessRef file = FileAccess::open(p_file, FileAccess::WRITE, &err); + // values + List<Vector<float> >::Element *E = perf_history.back(); + while (E) { - if (err != OK) { - ERR_PRINT("Failed to open " + p_file); - return; - } - Vector<String> line; - line.resize(Performance::MONITOR_MAX); + Vector<float> &perf_data = E->get(); + for (int i = 0; i < perf_data.size(); i++) { - // signatures - for (int i = 0; i < Performance::MONITOR_MAX; i++) { - line.write[i] = Performance::get_singleton()->get_monitor_name(Performance::Monitor(i)); - } - file->store_csv_line(line); - - // values - List<Vector<float> >::Element *E = perf_history.back(); - while (E) { + line.write[i] = String::num_real(perf_data[i]); + } + file->store_csv_line(line); + E = E->prev(); + } + file->store_string("\n"); - Vector<float> &perf_data = E->get(); - for (int i = 0; i < perf_data.size(); i++) { + Vector<Vector<String> > profiler_data = profiler->get_data_as_csv(); + for (int i = 0; i < profiler_data.size(); i++) { + file->store_csv_line(profiler_data[i]); + } +} - line.write[i] = String::num_real(perf_data[i]); - } - file->store_csv_line(line); - E = E->prev(); - } - file->store_string("\n"); +void ScriptEditorDebugger::request_remote_tree() { - Vector<Vector<String> > profiler_data = profiler->get_data_as_csv(); - for (int i = 0; i < profiler_data.size(); i++) { - file->store_csv_line(profiler_data[i]); - } + _put_msg("request_scene_tree", Array()); +} - } break; - } +const SceneDebuggerTree *ScriptEditorDebugger::get_remote_tree() { + return scene_tree; } -void ScriptEditorDebugger::_scene_tree_property_value_edited(const String &p_prop, const Variant &p_value) { +void ScriptEditorDebugger::update_remote_object(ObjectID p_obj_id, const String &p_prop, const Variant &p_value) { Array msg; - msg.push_back("set_object_property"); - msg.push_back(inspected_object_id); + msg.push_back(p_obj_id); msg.push_back(p_prop); msg.push_back(p_value); - ppeer->put_var(msg); - inspect_edited_object_timeout = 0.7; //avoid annoyance, don't request soon after editing + _put_msg("set_object_property", msg); } -void ScriptEditorDebugger::_scene_tree_property_select_object(ObjectID p_object) { +void ScriptEditorDebugger::request_remote_object(ObjectID p_obj_id) { - inspected_object_id = p_object; + ERR_FAIL_COND(p_obj_id.is_null()); Array msg; - msg.push_back("inspect_object"); - msg.push_back(inspected_object_id); - ppeer->put_var(msg); + msg.push_back(p_obj_id); + _put_msg("inspect_object", msg); } -void ScriptEditorDebugger::_scene_tree_request() { - - ERR_FAIL_COND(connection.is_null()); - ERR_FAIL_COND(!connection->is_connected_to_host()); - - Array msg; - msg.push_back("request_scene_tree"); - ppeer->put_var(msg); -} - -/// Populates inspect_scene_tree recursively given data in nodes. -/// Nodes is an array containing 4 elements for each node, it follows this pattern: -/// nodes[i] == number of direct children of this node -/// nodes[i + 1] == node name -/// nodes[i + 2] == node class -/// nodes[i + 3] == node instance id -/// -/// Returns the number of items parsed in nodes from current_index. -/// -/// Given a nodes array like [R,A,B,C,D,E] the following Tree will be generated, assuming -/// filter is an empty String, R and A child count are 2, B is 1 and C, D and E are 0. -/// -/// R -/// |-A -/// | |-B -/// | | |-C -/// | | -/// | |-D -/// | -/// |-E -/// -int ScriptEditorDebugger::_update_scene_tree(TreeItem *parent, const Array &nodes, int current_index) { - String filter = EditorNode::get_singleton()->get_scene_tree_dock()->get_filter(); - String item_text = nodes[current_index + 1]; - String item_type = nodes[current_index + 2]; - bool keep = filter.is_subsequence_ofi(item_text); - - TreeItem *item = inspect_scene_tree->create_item(parent); - item->set_text(0, item_text); - item->set_tooltip(0, TTR("Type:") + " " + item_type); - ObjectID id = nodes[current_index + 3].operator ObjectID(); - Ref<Texture2D> icon = EditorNode::get_singleton()->get_class_icon(nodes[current_index + 2], ""); - if (icon.is_valid()) { - item->set_icon(0, icon); - } - item->set_metadata(0, id); - - if (id == inspected_object_id) { - TreeItem *cti = item->get_parent(); - while (cti) { - cti->set_collapsed(false); - cti = cti->get_parent(); - } - item->select(0); - } - - // Set current item as collapsed if necessary - if (parent) { - if (!unfold_cache.has(id)) { - item->set_collapsed(true); - } - } +Object *ScriptEditorDebugger::get_remote_object(ObjectID p_id) { + return inspector->get_object(p_id); +} - int children_count = nodes[current_index]; - // Tracks the total number of items parsed in nodes, this is used to skips nodes that - // are not direct children of the current node since we can't know in advance the total - // number of children, direct and not, of a node without traversing the nodes array previously. - // Keeping track of this allows us to build our remote scene tree by traversing the node - // array just once. - int items_count = 1; - for (int i = 0; i < children_count; i++) { - // Called for each direct child of item. - // Direct children of current item might not be adjacent so items_count must - // be incremented by the number of items parsed until now, otherwise we would not - // be able to access the next child of the current item. - // items_count is multiplied by 4 since that's the number of elements in the nodes - // array needed to represent a single node. - items_count += _update_scene_tree(item, nodes, current_index + items_count * 4); - } +void ScriptEditorDebugger::_remote_object_selected(ObjectID p_id) { + emit_signal("remote_object_requested", p_id); +} - // If item has not children and should not be kept delete it - if (!keep && !item->get_children() && parent) { - parent->remove_child(item); - memdelete(item); - } +void ScriptEditorDebugger::_remote_object_edited(ObjectID p_id, const String &p_prop, const Variant &p_value) { + update_remote_object(p_id, p_prop, p_value); + request_remote_object(p_id); +} - return items_count; +void ScriptEditorDebugger::_remote_object_property_updated(ObjectID p_id, const String &p_property) { + emit_signal("remote_object_property_updated", p_id, p_property); } void ScriptEditorDebugger::_video_mem_request() { - if (connection.is_null() || !connection->is_connected_to_host()) { - // Video RAM usage is only available while a project is being debugged. - return; - } - - Array msg; - msg.push_back("request_video_mem"); - ppeer->put_var(msg); + _put_msg("request_video_mem", Array()); } Size2 ScriptEditorDebugger::get_minimum_size() const { @@ -504,184 +239,72 @@ Size2 ScriptEditorDebugger::get_minimum_size() const { void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_data) { if (p_msg == "debug_enter") { - Array msg; - msg.push_back("get_stack_dump"); - ppeer->put_var(msg); + + _put_msg("get_stack_dump", Array()); + ERR_FAIL_COND(p_data.size() != 2); bool can_continue = p_data[0]; String error = p_data[1]; - step->set_disabled(!can_continue); - next->set_disabled(!can_continue); - _set_reason_text(error, MESSAGE_ERROR); - copy->set_disabled(false); breaked = true; - dobreak->set_disabled(true); - docontinue->set_disabled(false); + can_debug = can_continue; + _update_buttons_state(); + _set_reason_text(error, MESSAGE_ERROR); emit_signal("breaked", true, can_continue); OS::get_singleton()->move_window_to_foreground(); if (error != "") { tabs->set_current_tab(0); } profiler->set_enabled(false); - EditorNode::get_singleton()->get_pause_button()->set_pressed(true); - EditorNode::get_singleton()->make_bottom_panel_item_visible(this); - _clear_remote_objects(); + inspector->clear_cache(); // Take a chance to force remote objects update. } else if (p_msg == "debug_exit") { breaked = false; + can_debug = false; _clear_execution(); - copy->set_disabled(true); - step->set_disabled(true); - next->set_disabled(true); - reason->set_text(""); - reason->set_tooltip(""); - back->set_disabled(true); - forward->set_disabled(true); - dobreak->set_disabled(false); - docontinue->set_disabled(true); - emit_signal("breaked", false, false, Variant()); + _update_buttons_state(); + _set_reason_text(TTR("Execution resumed."), MESSAGE_SUCCESS); + emit_signal("breaked", false, false); profiler->set_enabled(true); profiler->disable_seeking(); - EditorNode::get_singleton()->get_pause_button()->set_pressed(false); + } else if (p_msg == "message:set_pid") { + + ERR_FAIL_COND(p_data.size() < 1); + remote_pid = p_data[0]; } else if (p_msg == "message:click_ctrl") { + ERR_FAIL_COND(p_data.size() < 2); clicked_ctrl->set_text(p_data[0]); clicked_ctrl_type->set_text(p_data[1]); - } else if (p_msg == "message:scene_tree") { - inspect_scene_tree->clear(); - Map<int, TreeItem *> lv; - - updating_scene_tree = true; - - _update_scene_tree(NULL, p_data, 0); - - updating_scene_tree = false; - - le_clear->set_disabled(false); - le_set->set_disabled(false); + scene_tree->nodes.clear(); + scene_tree->deserialize(p_data); + emit_signal("remote_tree_updated"); + _update_buttons_state(); } else if (p_msg == "message:inspect_object") { - ScriptEditorDebuggerInspectedObject *debugObj = NULL; - - ObjectID id = p_data[0]; - String type = p_data[1]; - Array properties = p_data[2]; - - if (remote_objects.has(id)) { - debugObj = remote_objects[id]; - } else { - debugObj = memnew(ScriptEditorDebuggerInspectedObject); - debugObj->remote_object_id = id; - debugObj->type_name = type; - remote_objects[id] = debugObj; - debugObj->connect("value_edited", this, "_scene_tree_property_value_edited"); - } - - int old_prop_size = debugObj->prop_list.size(); - - debugObj->prop_list.clear(); - int new_props_added = 0; - Set<String> changed; - for (int i = 0; i < properties.size(); i++) { - - Array prop = properties[i]; - if (prop.size() != 6) - continue; - - PropertyInfo pinfo; - pinfo.name = prop[0]; - pinfo.type = Variant::Type(int(prop[1])); - pinfo.hint = PropertyHint(int(prop[2])); - pinfo.hint_string = prop[3]; - pinfo.usage = PropertyUsageFlags(int(prop[4])); - Variant var = prop[5]; - - if (pinfo.type == Variant::OBJECT) { - if (var.is_zero()) { - var = RES(); - } else if (var.get_type() == Variant::STRING) { - String path = var; - if (path.find("::") != -1) { - // built-in resource - String base_path = path.get_slice("::", 0); - if (ResourceLoader::get_resource_type(base_path) == "PackedScene") { - if (!EditorNode::get_singleton()->is_scene_open(base_path)) { - EditorNode::get_singleton()->load_scene(base_path); - } - } else { - EditorNode::get_singleton()->load_resource(base_path); - } - } - var = ResourceLoader::load(path); - - if (pinfo.hint_string == "Script") { - if (debugObj->get_script() != var) { - debugObj->set_script(RefPtr()); - Ref<Script> script(var); - if (!script.is_null()) { - ScriptInstance *script_instance = script->placeholder_instance_create(debugObj); - debugObj->set_script_and_instance(var, script_instance); - } - } - } - } else if (var.get_type() == Variant::OBJECT) { - if (((Object *)var)->is_class("EncodedObjectAsID")) { - var = Object::cast_to<EncodedObjectAsID>(var)->get_object_id(); - pinfo.type = var.get_type(); - pinfo.hint = PROPERTY_HINT_OBJECT_ID; - pinfo.hint_string = "Object"; - } - } - } - - //always add the property, since props may have been added or removed - debugObj->prop_list.push_back(pinfo); - - if (!debugObj->prop_values.has(pinfo.name)) { - new_props_added++; - debugObj->prop_values[pinfo.name] = var; - } else { - - if (bool(Variant::evaluate(Variant::OP_NOT_EQUAL, debugObj->prop_values[pinfo.name], var))) { - debugObj->prop_values[pinfo.name] = var; - changed.insert(pinfo.name); - } - } - } - - if (editor->get_editor_history()->get_current() != debugObj->get_instance_id()) { - editor->push_item(debugObj, ""); - } else { - - if (old_prop_size == debugObj->prop_list.size() && new_props_added == 0) { - //only some may have changed, if so, then update those, if exist - for (Set<String>::Element *E = changed.front(); E; E = E->next()) { - EditorNode::get_singleton()->get_inspector()->update_property(E->get()); - } - } else { - //full update, because props were added or removed - debugObj->update(); - } - } + ObjectID id = inspector->add_object(p_data); + if (id.is_valid()) + emit_signal("remote_object_updated", id); } else if (p_msg == "message:video_mem") { vmem_tree->clear(); TreeItem *root = vmem_tree->create_item(); + ScriptDebuggerRemote::ResourceUsage usage; + usage.deserialize(p_data); int total = 0; - for (int i = 0; i < p_data.size(); i += 4) { + for (List<ScriptDebuggerRemote::ResourceInfo>::Element *E = usage.infos.front(); E; E = E->next()) { TreeItem *it = vmem_tree->create_item(root); - String type = p_data[i + 1]; - int bytes = p_data[i + 3].operator int(); - it->set_text(0, p_data[i + 0]); //path - it->set_text(1, type); //type - it->set_text(2, p_data[i + 2]); //type - it->set_text(3, String::humanize_size(bytes)); //type + String type = E->get().type; + int bytes = E->get().vram; + it->set_text(0, E->get().path); + it->set_text(1, type); + it->set_text(2, E->get().format); + it->set_text(3, String::humanize_size(bytes)); total += bytes; if (has_icon(type, "EditorIcons")) @@ -693,18 +316,21 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da } else if (p_msg == "stack_dump") { + ScriptDebuggerRemote::ScriptStackDump stack; + stack.deserialize(p_data); + stack_dump->clear(); + inspector->clear_stack_variables(); TreeItem *r = stack_dump->create_item(); - for (int i = 0; i < p_data.size(); i++) { + for (int i = 0; i < stack.frames.size(); i++) { - Dictionary d = p_data[i]; - ERR_CONTINUE(!d.has("function")); - ERR_CONTINUE(!d.has("file")); - ERR_CONTINUE(!d.has("line")); - ERR_CONTINUE(!d.has("id")); TreeItem *s = stack_dump->create_item(r); + Dictionary d; d["frame"] = i; + d["file"] = stack.frames[i].file; + d["function"] = stack.frames[i].func; + d["line"] = stack.frames[i].line; s->set_metadata(0, d); String line = itos(i) + " - " + String(d["file"]) + ":" + itos(d["line"]) + " - at function: " + d["function"]; @@ -715,97 +341,22 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da } } else if (p_msg == "stack_frame_vars") { - variables->clear(); - - int ofs = 0; - int mcount = p_data[ofs]; - ofs++; - for (int i = 0; i < mcount; i++) { + inspector->clear_stack_variables(); - String n = p_data[ofs + i * 2 + 0]; - Variant v = p_data[ofs + i * 2 + 1]; + } else if (p_msg == "stack_frame_var") { - PropertyHint h = PROPERTY_HINT_NONE; - String hs = String(); - - if (v.get_type() == Variant::OBJECT) { - v = Object::cast_to<EncodedObjectAsID>(v)->get_object_id(); - h = PROPERTY_HINT_OBJECT_ID; - hs = "Object"; - } - - variables->add_property("Locals/" + n, v, h, hs); - } - - ofs += mcount * 2; - mcount = p_data[ofs]; - ofs++; - for (int i = 0; i < mcount; i++) { - - String n = p_data[ofs + i * 2 + 0]; - Variant v = p_data[ofs + i * 2 + 1]; - PropertyHint h = PROPERTY_HINT_NONE; - String hs = String(); - - if (v.get_type() == Variant::OBJECT) { - v = Object::cast_to<EncodedObjectAsID>(v)->get_object_id(); - h = PROPERTY_HINT_OBJECT_ID; - hs = "Object"; - } - - variables->add_property("Members/" + n, v, h, hs); - - if (n == "self") { - _scene_tree_property_select_object(v); - } - } - - ofs += mcount * 2; - mcount = p_data[ofs]; - ofs++; - for (int i = 0; i < mcount; i++) { - - String n = p_data[ofs + i * 2 + 0]; - Variant v = p_data[ofs + i * 2 + 1]; - PropertyHint h = PROPERTY_HINT_NONE; - String hs = String(); - - if (v.get_type() == Variant::OBJECT) { - v = Object::cast_to<EncodedObjectAsID>(v)->get_object_id(); - h = PROPERTY_HINT_OBJECT_ID; - hs = "Object"; - } - - variables->add_property("Globals/" + n, v, h, hs); - } - - variables->update(); - inspector->edit(variables); + inspector->add_stack_variable(p_data); } else if (p_msg == "output") { - - //OUT - for (int i = 0; i < p_data.size(); i++) { - - String t = p_data[i]; - //LOG - - if (!EditorNode::get_log()->is_visible()) { - if (EditorNode::get_singleton()->are_bottom_panels_hidden()) { - if (EDITOR_GET("run/output/always_open_output_on_play")) { - EditorNode::get_singleton()->make_bottom_panel_item_visible(EditorNode::get_log()); - } - } - } - EditorNode::get_log()->add_message(t); - } + ERR_FAIL_COND(p_data.size() < 1); + String t = p_data[0]; + EditorNode::get_log()->add_message(t); } else if (p_msg == "performance") { - Array arr = p_data[0]; Vector<float> p; - p.resize(arr.size()); - for (int i = 0; i < arr.size(); i++) { - p.write[i] = arr[i]; + p.resize(p_data.size()); + for (int i = 0; i < p_data.size(); i++) { + p.write[i] = p_data[i]; if (i < perf_items.size()) { const float value = p[i]; @@ -833,10 +384,12 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da } perf_history.push_front(p); perf_draw->update(); + } else if (p_msg == "visual_profile") { + // TODO check me. uint64_t frame = p_data[0]; - PoolVector<String> names = p_data[1]; - PoolVector<real_t> values = p_data[2]; + Vector<String> names = p_data[1]; + Vector<real_t> values = p_data[2]; EditorVisualProfiler::Metric metric; metric.areas.resize(names.size()); @@ -847,8 +400,8 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da EditorVisualProfiler::Metric::Area *areas_ptr = metric.areas.ptrw(); int metric_count = names.size(); - PoolVector<String>::Read rs = names.read(); - PoolVector<real_t>::Read rr = values.read(); + const String *rs = names.ptr(); + const real_t *rr = values.ptr(); for (int i = 0; i < metric_count; i++) { @@ -857,42 +410,29 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da areas_ptr[i].gpu_time = rr[i * 2 + 1]; } } - visual_profiler->add_frame_metric(metric); } else if (p_msg == "error") { - // Should have at least two elements, error array and stack items count. - ERR_FAIL_COND_MSG(p_data.size() < 2, "Malformed error message from script debugger."); - - // Error or warning data. - Array err = p_data[0]; - ERR_FAIL_COND_MSG(err.size() < 10, "Malformed error message from script debugger."); + ScriptDebuggerRemote::OutputError oe; + ERR_FAIL_COND_MSG(oe.deserialize(p_data) == false, "Failed to deserialize error message"); // Format time. Array time_vals; - time_vals.push_back(err[0]); - time_vals.push_back(err[1]); - time_vals.push_back(err[2]); - time_vals.push_back(err[3]); + time_vals.push_back(oe.hr); + time_vals.push_back(oe.min); + time_vals.push_back(oe.sec); + time_vals.push_back(oe.msec); bool e; - String time = String("%d:%02d:%02d.%03d").sprintf(time_vals, &e); + String time = String("%d:%02d:%02d:%04d").sprintf(time_vals, &e); // Rest of the error data. - String method = err[4]; - String source_file = err[5]; - String source_line = err[6]; - String error_cond = err[7]; - String error_msg = err[8]; - bool is_warning = err[9]; - bool has_method = !method.empty(); - bool has_error_msg = !error_msg.empty(); - bool source_is_project_file = source_file.begins_with("res://"); + bool source_is_project_file = oe.source_file.begins_with("res://"); // Metadata to highlight error line in scripts. Array source_meta; - source_meta.push_back(source_file); - source_meta.push_back(source_line); + source_meta.push_back(oe.source_file); + source_meta.push_back(oe.source_line); // Create error tree to display above error or warning details. TreeItem *r = error_tree->get_root(); @@ -902,40 +442,42 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da // Also provide the relevant details as tooltip to quickly check without // uncollapsing the tree. - String tooltip = is_warning ? TTR("Warning:") : TTR("Error:"); + String tooltip = oe.warning ? TTR("Warning:") : TTR("Error:"); TreeItem *error = error_tree->create_item(r); error->set_collapsed(true); - error->set_icon(0, get_icon(is_warning ? "Warning" : "Error", "EditorIcons")); + error->set_icon(0, get_icon(oe.warning ? "Warning" : "Error", "EditorIcons")); error->set_text(0, time); error->set_text_align(0, TreeItem::ALIGN_LEFT); String error_title; // Include method name, when given, in error title. - if (has_method) - error_title += method + ": "; + if (!oe.source_func.empty()) + error_title += oe.source_func + ": "; // If we have a (custom) error message, use it as title, and add a C++ Error // item with the original error condition. - error_title += error_msg.empty() ? error_cond : error_msg; + error_title += oe.error_descr.empty() ? oe.error : oe.error_descr; error->set_text(1, error_title); tooltip += " " + error_title + "\n"; - if (has_error_msg) { + if (!oe.error_descr.empty()) { // Add item for C++ error condition. TreeItem *cpp_cond = error_tree->create_item(error); cpp_cond->set_text(0, "<" + TTR("C++ Error") + ">"); - cpp_cond->set_text(1, error_cond); + cpp_cond->set_text(1, oe.error); cpp_cond->set_text_align(0, TreeItem::ALIGN_LEFT); - tooltip += TTR("C++ Error:") + " " + error_cond + "\n"; + tooltip += TTR("C++ Error:") + " " + oe.error + "\n"; if (source_is_project_file) cpp_cond->set_metadata(0, source_meta); } + Vector<uint8_t> v; + v.resize(100); // Source of the error. - String source_txt = (source_is_project_file ? source_file.get_file() : source_file) + ":" + source_line; - if (has_method) - source_txt += " @ " + method + "()"; + String source_txt = (source_is_project_file ? oe.source_file.get_file() : oe.source_file) + ":" + itos(oe.source_line); + if (!oe.source_func.empty()) + source_txt += " @ " + oe.source_func + "()"; TreeItem *cpp_source = error_tree->create_item(error); cpp_source->set_text(0, "<" + (source_is_project_file ? TTR("Source") : TTR("C++ Source")) + ">"); @@ -955,17 +497,14 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da // Format stack trace. // stack_items_count is the number of elements to parse, with 3 items per frame // of the stack trace (script, method, line). - int stack_items_count = p_data[1]; + const ScriptLanguage::StackInfo *infos = oe.callstack.ptr(); + for (unsigned int i = 0; i < (unsigned int)oe.callstack.size(); i++) { - for (int i = 0; i < stack_items_count; i += 3) { - String script = p_data[2 + i]; - String method2 = p_data[3 + i]; - int line = p_data[4 + i]; TreeItem *stack_trace = error_tree->create_item(error); Array meta; - meta.push_back(script); - meta.push_back(line); + meta.push_back(infos[i].file); + meta.push_back(infos[i].line); stack_trace->set_metadata(0, meta); if (i == 0) { @@ -973,29 +512,32 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da stack_trace->set_text_align(0, TreeItem::ALIGN_LEFT); error->set_metadata(0, meta); } - stack_trace->set_text(1, script.get_file() + ":" + itos(line) + " @ " + method2 + "()"); + stack_trace->set_text(1, infos[i].file.get_file() + ":" + itos(infos[i].line) + " @ " + infos[i].func + "()"); } - if (is_warning) + if (oe.warning) warning_count++; else error_count++; } else if (p_msg == "profile_sig") { - //cache a signature - profiler_signature[p_data[1]] = p_data[0]; + // Cache a profiler signature. + ScriptDebuggerRemote::ProfilerSignature sig; + sig.deserialize(p_data); + profiler_signature[sig.id] = sig.name; } else if (p_msg == "profile_frame" || p_msg == "profile_total") { - EditorProfiler::Metric metric; + ScriptDebuggerRemote::ProfilerFrame frame; + frame.deserialize(p_data); metric.valid = true; - metric.frame_number = p_data[0]; - metric.frame_time = p_data[1]; - metric.idle_time = p_data[2]; - metric.physics_time = p_data[3]; - metric.physics_frame_time = p_data[4]; - int frame_data_amount = p_data[6]; - int frame_function_amount = p_data[7]; + metric.frame_number = frame.frame_number; + metric.frame_time = frame.frame_time; + metric.idle_time = frame.idle_time; + metric.physics_time = frame.physics_time; + metric.physics_frame_time = frame.physics_frame_time; + int frame_data_amount = frame.frames_data.size(); + int frame_function_amount = frame.frame_functions.size(); if (frame_data_amount) { EditorProfiler::Metric::Category frame_time; @@ -1031,12 +573,11 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da metric.categories.push_back(frame_time); } - int idx = 8; for (int i = 0; i < frame_data_amount; i++) { EditorProfiler::Metric::Category c; - String name = p_data[idx++]; - Array values = p_data[idx++]; + String name = frame.frames_data[i].name; + Array values = frame.frames_data[i].data; c.name = name.capitalize(); c.items.resize(values.size() / 2); c.total_time = 0; @@ -1058,16 +599,16 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da } EditorProfiler::Metric::Category funcs; - funcs.total_time = p_data[5]; //script time + funcs.total_time = frame.script_time; funcs.items.resize(frame_function_amount); funcs.name = "Script Functions"; funcs.signature = "script_functions"; for (int i = 0; i < frame_function_amount; i++) { - int signature = p_data[idx++]; - int calls = p_data[idx++]; - float total = p_data[idx++]; - float self = p_data[idx++]; + int signature = frame.frame_functions[i].sig_id; + int calls = frame.frame_functions[i].call_count; + float total = frame.frame_functions[i].total_time; + float self = frame.frame_functions[i].self_time; EditorProfiler::Metric::Category::Item item; if (profiler_signature.has(signature)) { @@ -1102,23 +643,20 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da profiler->add_frame_metric(metric, false); else profiler->add_frame_metric(metric, true); + } else if (p_msg == "network_profile") { - int frame_size = 6; - for (int i = 0; i < p_data.size(); i += frame_size) { - MultiplayerAPI::ProfilingInfo pi; - pi.node = p_data[i + 0].operator ObjectID(); - pi.node_path = p_data[i + 1]; - pi.incoming_rpc = p_data[i + 2]; - pi.incoming_rset = p_data[i + 3]; - pi.outgoing_rpc = p_data[i + 4]; - pi.outgoing_rset = p_data[i + 5]; - network_profiler->add_node_frame_data(pi); + ScriptDebuggerRemote::NetworkProfilerFrame frame; + frame.deserialize(p_data); + for (int i = 0; i < frame.infos.size(); i++) { + network_profiler->add_node_frame_data(frame.infos[i]); } } else if (p_msg == "network_bandwidth") { + ERR_FAIL_COND(p_data.size() < 2); network_profiler->set_bandwidth(p_data[0], p_data[1]); } else if (p_msg == "kill_me") { - editor->call_deferred("stop_child_process"); + emit_signal("stop_requested"); + _stop_and_notify(); } } @@ -1218,20 +756,17 @@ void ScriptEditorDebugger::_notification(int p_what) { case NOTIFICATION_ENTER_TREE: { - inspector->edit(variables); skip_breakpoints->set_icon(get_icon("DebugSkipBreakpointsOff", "EditorIcons")); copy->set_icon(get_icon("ActionCopy", "EditorIcons")); step->set_icon(get_icon("DebugStep", "EditorIcons")); next->set_icon(get_icon("DebugNext", "EditorIcons")); - back->set_icon(get_icon("Back", "EditorIcons")); - forward->set_icon(get_icon("Forward", "EditorIcons")); dobreak->set_icon(get_icon("Pause", "EditorIcons")); docontinue->set_icon(get_icon("DebugContinue", "EditorIcons")); - le_set->connect("pressed", this, "_live_edit_set"); - le_clear->connect("pressed", this, "_live_edit_clear"); - error_tree->connect("item_selected", this, "_error_selected"); - error_tree->connect("item_activated", this, "_error_activated"); + le_set->connect_compat("pressed", this, "_live_edit_set"); + le_clear->connect_compat("pressed", this, "_live_edit_clear"); + error_tree->connect_compat("item_selected", this, "_error_selected"); + error_tree->connect_compat("item_activated", this, "_error_activated"); vmem_refresh->set_icon(get_icon("Reload", "EditorIcons")); reason->add_color_override("font_color", get_color("error_color", "Editor")); @@ -1239,31 +774,7 @@ void ScriptEditorDebugger::_notification(int p_what) { } break; case NOTIFICATION_PROCESS: { - if (connection.is_valid()) { - - inspect_scene_tree_timeout -= get_process_delta_time(); - if (inspect_scene_tree_timeout < 0) { - inspect_scene_tree_timeout = EditorSettings::get_singleton()->get("debugger/remote_scene_tree_refresh_interval"); - if (inspect_scene_tree->is_visible_in_tree()) { - _scene_tree_request(); - } - } - - inspect_edited_object_timeout -= get_process_delta_time(); - if (inspect_edited_object_timeout < 0) { - inspect_edited_object_timeout = EditorSettings::get_singleton()->get("debugger/remote_inspect_refresh_interval"); - if (inspected_object_id.is_valid()) { - if (ScriptEditorDebuggerInspectedObject *obj = Object::cast_to<ScriptEditorDebuggerInspectedObject>(ObjectDB::get_instance(editor->get_editor_history()->get_current()))) { - if (obj->remote_object_id == inspected_object_id) { - //take the chance and re-inspect selected object - Array msg; - msg.push_back("inspect_object"); - msg.push_back(inspected_object_id); - ppeer->put_var(msg); - } - } - } - } + if (is_session_active()) { if (camera_override == OVERRIDE_2D) { CanvasItemEditor *editor = CanvasItemEditor::get_singleton(); @@ -1277,9 +788,8 @@ void ScriptEditorDebugger::_notification(int p_what) { transform.elements[2] = -offset * zoom; Array msg; - msg.push_back("override_camera_2D:transform"); msg.push_back(transform); - ppeer->put_var(msg); + _put_msg("override_camera_2D:transform", msg); } else if (camera_override >= OVERRIDE_3D_1) { int viewport_idx = camera_override - OVERRIDE_3D_1; @@ -1287,7 +797,6 @@ void ScriptEditorDebugger::_notification(int p_what) { Camera *const cam = viewport->get_camera(); Array msg; - msg.push_back("override_camera_3D:transform"); msg.push_back(cam->get_camera_transform()); if (cam->get_projection() == Camera::PROJECTION_ORTHOGONAL) { msg.push_back(false); @@ -1298,86 +807,12 @@ void ScriptEditorDebugger::_notification(int p_what) { } msg.push_back(cam->get_znear()); msg.push_back(cam->get_zfar()); - ppeer->put_var(msg); - } - } - - if (error_count != last_error_count || warning_count != last_warning_count) { - - if (error_count == 0 && warning_count == 0) { - errors_tab->set_name(TTR("Errors")); - debugger_button->set_text(TTR("Debugger")); - debugger_button->set_icon(Ref<Texture2D>()); - tabs->set_tab_icon(errors_tab->get_index(), Ref<Texture2D>()); - } else { - errors_tab->set_name(TTR("Errors") + " (" + itos(error_count + warning_count) + ")"); - debugger_button->set_text(TTR("Debugger") + " (" + itos(error_count + warning_count) + ")"); - if (error_count == 0) { - debugger_button->set_icon(get_icon("Warning", "EditorIcons")); - tabs->set_tab_icon(errors_tab->get_index(), get_icon("Warning", "EditorIcons")); - } else { - debugger_button->set_icon(get_icon("Error", "EditorIcons")); - tabs->set_tab_icon(errors_tab->get_index(), get_icon("Error", "EditorIcons")); - } - } - last_error_count = error_count; - last_warning_count = warning_count; - } - - if (server->is_connection_available()) { - if (connection.is_valid()) { - // We already have a valid connection. Disconnecting any new connecting client to prevent it from hanging. - // (If we don't keep a reference to the connection it will be destroyed and disconnect_from_host will be called internally) - server->take_connection(); - } else { - // We just got the first connection. - connection = server->take_connection(); - if (connection.is_null()) - break; - - EditorNode::get_log()->add_message("--- Debugging process started ---", EditorLog::MSG_TYPE_EDITOR); - - ppeer->set_stream_peer(connection); - - //EditorNode::get_singleton()->make_bottom_panel_item_visible(this); - //emit_signal("show_debugger",true); - - dobreak->set_disabled(false); - tabs->set_current_tab(0); - - _set_reason_text(TTR("Child process connected."), MESSAGE_SUCCESS); - profiler->clear(); - - inspect_scene_tree->clear(); - le_set->set_disabled(true); - le_clear->set_disabled(false); - vmem_refresh->set_disabled(false); - error_tree->clear(); - error_count = 0; - warning_count = 0; - profiler_signature.clear(); - //live_edit_root->set_text("/root"); - - EditorNode::get_singleton()->get_pause_button()->set_pressed(false); - EditorNode::get_singleton()->get_pause_button()->set_disabled(false); - - update_live_edit_root(); - if (profiler->is_profiling()) { - _profiler_activate(true); - } - - if (network_profiler->is_profiling()) { - _network_profiler_activate(true); - } + _put_msg("override_camera_3D:transform", msg); } } - if (connection.is_null()) - break; - - if (!connection->is_connected_to_host()) { - stop(); - editor->notify_child_process_exited(); //somehow, exited + if (!is_session_active()) { + _stop_and_notify(); break; }; @@ -1389,67 +824,22 @@ void ScriptEditorDebugger::_notification(int p_what) { while (ppeer->get_available_packet_count() > 0) { - if (pending_in_queue) { - - int todo = MIN(ppeer->get_available_packet_count(), pending_in_queue); - - for (int i = 0; i < todo; i++) { - - Variant cmd; - Error ret = ppeer->get_var(cmd); - if (ret != OK) { - stop(); - ERR_FAIL_COND(ret != OK); - } - - message.push_back(cmd); - pending_in_queue--; - } - - if (pending_in_queue == 0) { - _parse_message(message_type, message); - message.clear(); - } - - } else { - - if (ppeer->get_available_packet_count() >= 2) { - - Variant cmd; - Error ret = ppeer->get_var(cmd); - if (ret != OK) { - stop(); - ERR_FAIL_COND(ret != OK); - } - if (cmd.get_type() != Variant::STRING) { - stop(); - ERR_FAIL_COND(cmd.get_type() != Variant::STRING); - } - - message_type = cmd; - - ret = ppeer->get_var(cmd); - if (ret != OK) { - stop(); - ERR_FAIL_COND(ret != OK); - } - if (cmd.get_type() != Variant::INT) { - stop(); - ERR_FAIL_COND(cmd.get_type() != Variant::INT); - } - - pending_in_queue = cmd; - - if (pending_in_queue == 0) { - _parse_message(message_type, Array()); - message.clear(); - } - - } else { - - break; - } + Variant cmd; + Error ret = ppeer->get_var(cmd); + if (ret != OK) { + _stop_and_notify(); + ERR_FAIL_MSG("Error decoding variant from peer"); + } + if (cmd.get_type() != Variant::ARRAY) { + _stop_and_notify(); + ERR_FAIL_MSG("Invalid message format received from peer"); } + Array arr = cmd; + if (arr.size() != 2 || arr[0].get_type() != Variant::STRING || arr[1].get_type() != Variant::ARRAY) { + _stop_and_notify(); + ERR_FAIL_MSG("Invalid message format received from peer"); + } + _parse_message(arr[0], arr[1]); if (OS::get_singleton()->get_ticks_msec() > until) break; @@ -1457,18 +847,13 @@ void ScriptEditorDebugger::_notification(int p_what) { } break; case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: { - add_constant_override("margin_left", -EditorNode::get_singleton()->get_gui_base()->get_stylebox("BottomPanelDebuggerOverride", "EditorStyles")->get_margin(MARGIN_LEFT)); - add_constant_override("margin_right", -EditorNode::get_singleton()->get_gui_base()->get_stylebox("BottomPanelDebuggerOverride", "EditorStyles")->get_margin(MARGIN_RIGHT)); - - tabs->add_style_override("panel", editor->get_gui_base()->get_stylebox("DebuggerPanel", "EditorStyles")); - tabs->add_style_override("tab_fg", editor->get_gui_base()->get_stylebox("DebuggerTabFG", "EditorStyles")); - tabs->add_style_override("tab_bg", editor->get_gui_base()->get_stylebox("DebuggerTabBG", "EditorStyles")); + if (tabs->has_stylebox_override("panel")) { + tabs->add_style_override("panel", editor->get_gui_base()->get_stylebox("DebuggerPanel", "EditorStyles")); + } copy->set_icon(get_icon("ActionCopy", "EditorIcons")); step->set_icon(get_icon("DebugStep", "EditorIcons")); next->set_icon(get_icon("DebugNext", "EditorIcons")); - back->set_icon(get_icon("Back", "EditorIcons")); - forward->set_icon(get_icon("Forward", "EditorIcons")); dobreak->set_icon(get_icon("Pause", "EditorIcons")); docontinue->set_icon(get_icon("DebugContinue", "EditorIcons")); vmem_refresh->set_icon(get_icon("Reload", "EditorIcons")); @@ -1486,15 +871,18 @@ void ScriptEditorDebugger::_clear_execution() { stack_script = ResourceLoader::load(d["file"]); emit_signal("clear_execution", stack_script); stack_script.unref(); + stack_dump->clear(); + inspector->clear_stack_variables(); } -void ScriptEditorDebugger::start() { +void ScriptEditorDebugger::start(Ref<StreamPeerTCP> p_connection) { + error_count = 0; + warning_count = 0; stop(); - if (is_visible_in_tree()) { - EditorNode::get_singleton()->make_bottom_panel_item_visible(this); - } + connection = p_connection; + ppeer->set_stream_peer(connection); perf_history.clear(); for (int i = 0; i < Performance::MONITOR_MAX; i++) { @@ -1502,91 +890,81 @@ void ScriptEditorDebugger::start() { perf_max.write[i] = 0; } - int remote_port = (int)EditorSettings::get_singleton()->get("network/debug/remote_port"); - if (server->listen(remote_port) != OK) { - EditorNode::get_log()->add_message(String("Error listening on port ") + itos(remote_port), EditorLog::MSG_TYPE_ERROR); - return; - } - - EditorNode::get_singleton()->get_scene_tree_dock()->show_tab_buttons(); - auto_switch_remote_scene_tree = (bool)EditorSettings::get_singleton()->get("debugger/auto_switch_to_remote_scene_tree"); - if (auto_switch_remote_scene_tree) { - EditorNode::get_singleton()->get_scene_tree_dock()->show_remote_tree(); - } - set_process(true); breaked = false; + can_debug = true; camera_override = OVERRIDE_NONE; + + tabs->set_current_tab(0); + _set_reason_text(TTR("Debug session started."), MESSAGE_SUCCESS); + _update_buttons_state(); + + if (profiler->is_profiling()) { + _profiler_activate(true); + } + + if (network_profiler->is_profiling()) { + _network_profiler_activate(true); + } } -void ScriptEditorDebugger::pause() { +void ScriptEditorDebugger::_update_buttons_state() { + const bool active = is_session_active(); + const bool has_editor_tree = active && editor_remote_tree && editor_remote_tree->get_selected(); + vmem_refresh->set_disabled(!active); + step->set_disabled(!active || !breaked || !can_debug); + next->set_disabled(!active || !breaked || !can_debug); + copy->set_disabled(!active || !breaked); + docontinue->set_disabled(!active || !breaked); + dobreak->set_disabled(!active || breaked); + le_clear->set_disabled(!active); + le_set->set_disabled(!has_editor_tree); } -void ScriptEditorDebugger::unpause() { +void ScriptEditorDebugger::_stop_and_notify() { + stop(); + emit_signal("stopped"); + _set_reason_text(TTR("Debug session closed."), MESSAGE_WARNING); } void ScriptEditorDebugger::stop() { set_process(false); breaked = false; + can_debug = false; + remote_pid = 0; _clear_execution(); - server->stop(); - _clear_remote_objects(); + inspector->clear_cache(); ppeer->set_stream_peer(Ref<StreamPeer>()); if (connection.is_valid()) { - EditorNode::get_log()->add_message("--- Debugging process stopped ---", EditorLog::MSG_TYPE_EDITOR); connection.unref(); - reason->set_text(""); reason->set_tooltip(""); } - pending_in_queue = 0; - message.clear(); - node_path_cache.clear(); res_path_cache.clear(); profiler_signature.clear(); - le_clear->set_disabled(false); - le_set->set_disabled(true); - profiler->set_enabled(true); - vmem_refresh->set_disabled(true); - inspect_scene_tree->clear(); inspector->edit(NULL); - EditorNode::get_singleton()->get_pause_button()->set_pressed(false); - EditorNode::get_singleton()->get_pause_button()->set_disabled(true); - EditorNode::get_singleton()->get_scene_tree_dock()->hide_remote_tree(); - EditorNode::get_singleton()->get_scene_tree_dock()->hide_tab_buttons(); - - if (hide_on_stop) { - if (is_visible_in_tree()) - EditorNode::get_singleton()->hide_bottom_panel(); - emit_signal("show_debugger", false); - } + _update_buttons_state(); } void ScriptEditorDebugger::_profiler_activate(bool p_enable) { - if (!connection.is_valid()) - return; - if (p_enable) { profiler_signature.clear(); Array msg; - msg.push_back("start_profiling"); int max_funcs = EditorSettings::get_singleton()->get("debugger/profiler_frame_max_functions"); max_funcs = CLAMP(max_funcs, 16, 512); msg.push_back(max_funcs); - ppeer->put_var(msg); + _put_msg("start_profiling", msg); print_verbose("Starting profiling."); } else { - Array msg; - msg.push_back("stop_profiling"); - ppeer->put_var(msg); + _put_msg("stop_profiling", Array()); print_verbose("Ending profiling."); } } @@ -1598,44 +976,30 @@ void ScriptEditorDebugger::_visual_profiler_activate(bool p_enable) { if (p_enable) { profiler_signature.clear(); - Array msg; - msg.push_back("start_visual_profiling"); - ppeer->put_var(msg); + _put_msg("start_visual_profiling", Array()); print_verbose("Starting visual profiling."); } else { - Array msg; - msg.push_back("stop_visual_profiling"); - ppeer->put_var(msg); + _put_msg("stop_visual_profiling", Array()); print_verbose("Ending visual profiling."); } } void ScriptEditorDebugger::_network_profiler_activate(bool p_enable) { - if (!connection.is_valid()) - return; - if (p_enable) { profiler_signature.clear(); - Array msg; - msg.push_back("start_network_profiling"); - ppeer->put_var(msg); + _put_msg("start_network_profiling", Array()); print_verbose("Starting network profiling."); } else { - Array msg; - msg.push_back("stop_network_profiling"); - ppeer->put_var(msg); + _put_msg("stop_network_profiling", Array()); print_verbose("Ending network profiling."); } } void ScriptEditorDebugger::_profiler_seeked() { - if (!connection.is_valid() || !connection->is_connected_to_host()) - return; - if (breaked) return; debug_break(); @@ -1643,45 +1007,30 @@ void ScriptEditorDebugger::_profiler_seeked() { void ScriptEditorDebugger::_stack_dump_frame_selected() { - TreeItem *ti = stack_dump->get_selected(); - if (!ti) - return; + emit_signal("stack_frame_selected"); - Dictionary d = ti->get_metadata(0); + int frame = get_stack_script_frame(); - stack_script = ResourceLoader::load(d["file"]); - emit_signal("goto_script_line", stack_script, int(d["line"]) - 1); - emit_signal("set_execution", stack_script, int(d["line"]) - 1); - stack_script.unref(); - - if (connection.is_valid() && connection->is_connected_to_host()) { + if (is_session_active() && frame >= 0) { Array msg; - msg.push_back("get_stack_frame_vars"); - msg.push_back(d["frame"]); - ppeer->put_var(msg); + msg.push_back(frame); + _put_msg("get_stack_frame_vars", msg); } else { inspector->edit(NULL); } } -void ScriptEditorDebugger::_output_clear() { - - //output->clear(); - //output->push_color(Color(0,0,0)); -} - void ScriptEditorDebugger::_export_csv() { file_dialog->set_mode(EditorFileDialog::MODE_SAVE_FILE); file_dialog->set_access(EditorFileDialog::ACCESS_FILESYSTEM); - file_dialog_mode = SAVE_CSV; file_dialog->popup_centered_ratio(); } String ScriptEditorDebugger::get_var_value(const String &p_var) const { if (!breaked) return String(); - return variables->get_var_value(p_var); + return inspector->get_stack_variable(p_var); } int ScriptEditorDebugger::_get_node_path_cache(const NodePath &p_path) { @@ -1694,10 +1043,9 @@ int ScriptEditorDebugger::_get_node_path_cache(const NodePath &p_path) { node_path_cache[p_path] = last_path_id; Array msg; - msg.push_back("live_node_path"); msg.push_back(p_path); msg.push_back(last_path_id); - ppeer->put_var(msg); + _put_msg("live_node_path", msg); return last_path_id; } @@ -1713,17 +1061,16 @@ int ScriptEditorDebugger::_get_res_path_cache(const String &p_path) { res_path_cache[p_path] = last_path_id; Array msg; - msg.push_back("live_res_path"); msg.push_back(p_path); msg.push_back(last_path_id); - ppeer->put_var(msg); + _put_msg("live_res_path", msg); return last_path_id; } void ScriptEditorDebugger::_method_changed(Object *p_base, const StringName &p_name, VARIANT_ARG_DECLARE) { - if (!p_base || !live_debug || !connection.is_valid() || !editor->get_edited_scene()) + if (!p_base || !live_debug || !is_session_active() || !editor->get_edited_scene()) return; Node *node = Object::cast_to<Node>(p_base); @@ -1742,14 +1089,13 @@ void ScriptEditorDebugger::_method_changed(Object *p_base, const StringName &p_n int pathid = _get_node_path_cache(path); Array msg; - msg.push_back("live_node_call"); msg.push_back(pathid); msg.push_back(p_name); for (int i = 0; i < VARIANT_ARG_MAX; i++) { //no pointers, sorry msg.push_back(*argptr[i]); } - ppeer->put_var(msg); + _put_msg("live_node_call", msg); return; } @@ -1762,14 +1108,13 @@ void ScriptEditorDebugger::_method_changed(Object *p_base, const StringName &p_n int pathid = _get_res_path_cache(respath); Array msg; - msg.push_back("live_res_call"); msg.push_back(pathid); msg.push_back(p_name); for (int i = 0; i < VARIANT_ARG_MAX; i++) { //no pointers, sorry msg.push_back(*argptr[i]); } - ppeer->put_var(msg); + _put_msg("live_res_call", msg); return; } @@ -1777,7 +1122,7 @@ void ScriptEditorDebugger::_method_changed(Object *p_base, const StringName &p_n void ScriptEditorDebugger::_property_changed(Object *p_base, const StringName &p_property, const Variant &p_value) { - if (!p_base || !live_debug || !connection.is_valid() || !editor->get_edited_scene()) + if (!p_base || !live_debug || !editor->get_edited_scene()) return; Node *node = Object::cast_to<Node>(p_base); @@ -1792,20 +1137,18 @@ void ScriptEditorDebugger::_property_changed(Object *p_base, const StringName &p if (res.is_valid() && res->get_path() != String()) { Array msg; - msg.push_back("live_node_prop_res"); msg.push_back(pathid); msg.push_back(p_property); msg.push_back(res->get_path()); - ppeer->put_var(msg); + _put_msg("live_node_prop_res", msg); } } else { Array msg; - msg.push_back("live_node_prop"); msg.push_back(pathid); msg.push_back(p_property); msg.push_back(p_value); - ppeer->put_var(msg); + _put_msg("live_node_prop", msg); } return; @@ -1823,36 +1166,46 @@ void ScriptEditorDebugger::_property_changed(Object *p_base, const StringName &p if (res2.is_valid() && res2->get_path() != String()) { Array msg; - msg.push_back("live_res_prop_res"); msg.push_back(pathid); msg.push_back(p_property); msg.push_back(res2->get_path()); - ppeer->put_var(msg); + _put_msg("live_res_prop_res", msg); } } else { Array msg; - msg.push_back("live_res_prop"); msg.push_back(pathid); msg.push_back(p_property); msg.push_back(p_value); - ppeer->put_var(msg); + _put_msg("live_res_prop", msg); } return; } } -void ScriptEditorDebugger::_method_changeds(void *p_ud, Object *p_base, const StringName &p_name, VARIANT_ARG_DECLARE) { - - ScriptEditorDebugger *sed = (ScriptEditorDebugger *)p_ud; - sed->_method_changed(p_base, p_name, VARIANT_ARG_PASS); +String ScriptEditorDebugger::get_stack_script_file() const { + TreeItem *ti = stack_dump->get_selected(); + if (!ti) + return ""; + Dictionary d = ti->get_metadata(0); + return d["file"]; } -void ScriptEditorDebugger::_property_changeds(void *p_ud, Object *p_base, const StringName &p_property, const Variant &p_value) { +int ScriptEditorDebugger::get_stack_script_line() const { + TreeItem *ti = stack_dump->get_selected(); + if (!ti) + return -1; + Dictionary d = ti->get_metadata(0); + return d["line"]; +} - ScriptEditorDebugger *sed = (ScriptEditorDebugger *)p_ud; - sed->_property_changed(p_base, p_property, p_value); +int ScriptEditorDebugger::get_stack_script_frame() const { + TreeItem *ti = stack_dump->get_selected(); + if (!ti) + return -1; + Dictionary d = ti->get_metadata(0); + return d["frame"]; } void ScriptEditorDebugger::set_live_debugging(bool p_enable) { @@ -1862,12 +1215,13 @@ void ScriptEditorDebugger::set_live_debugging(bool p_enable) { void ScriptEditorDebugger::_live_edit_set() { - if (!connection.is_valid()) + if (!is_session_active() || !editor_remote_tree) return; - TreeItem *ti = inspect_scene_tree->get_selected(); + TreeItem *ti = editor_remote_tree->get_selected(); if (!ti) return; + String path; while (ti) { @@ -1895,92 +1249,82 @@ void ScriptEditorDebugger::update_live_edit_root() { NodePath np = editor->get_editor_data().get_edited_scene_live_edit_root(); - if (connection.is_valid()) { - Array msg; - msg.push_back("live_set_root"); - msg.push_back(np); - if (editor->get_edited_scene()) - msg.push_back(editor->get_edited_scene()->get_filename()); - else - msg.push_back(""); - ppeer->put_var(msg); - } + Array msg; + msg.push_back(np); + if (editor->get_edited_scene()) + msg.push_back(editor->get_edited_scene()->get_filename()); + else + msg.push_back(""); + _put_msg("live_set_root", msg); live_edit_root->set_text(np); } void ScriptEditorDebugger::live_debug_create_node(const NodePath &p_parent, const String &p_type, const String &p_name) { - if (live_debug && connection.is_valid()) { + if (live_debug) { Array msg; - msg.push_back("live_create_node"); msg.push_back(p_parent); msg.push_back(p_type); msg.push_back(p_name); - ppeer->put_var(msg); + _put_msg("live_create_node", msg); } } void ScriptEditorDebugger::live_debug_instance_node(const NodePath &p_parent, const String &p_path, const String &p_name) { - if (live_debug && connection.is_valid()) { + if (live_debug) { Array msg; - msg.push_back("live_instance_node"); msg.push_back(p_parent); msg.push_back(p_path); msg.push_back(p_name); - ppeer->put_var(msg); + _put_msg("live_instance_node", msg); } } void ScriptEditorDebugger::live_debug_remove_node(const NodePath &p_at) { - if (live_debug && connection.is_valid()) { + if (live_debug) { Array msg; - msg.push_back("live_remove_node"); msg.push_back(p_at); - ppeer->put_var(msg); + _put_msg("live_remove_node", msg); } } void ScriptEditorDebugger::live_debug_remove_and_keep_node(const NodePath &p_at, ObjectID p_keep_id) { - if (live_debug && connection.is_valid()) { + if (live_debug) { Array msg; - msg.push_back("live_remove_and_keep_node"); msg.push_back(p_at); msg.push_back(p_keep_id); - ppeer->put_var(msg); + _put_msg("live_remove_and_keep_node", msg); } } void ScriptEditorDebugger::live_debug_restore_node(ObjectID p_id, const NodePath &p_at, int p_at_pos) { - if (live_debug && connection.is_valid()) { + if (live_debug) { Array msg; - msg.push_back("live_restore_node"); msg.push_back(p_id); msg.push_back(p_at); msg.push_back(p_at_pos); - ppeer->put_var(msg); + _put_msg("live_restore_node", msg); } } void ScriptEditorDebugger::live_debug_duplicate_node(const NodePath &p_at, const String &p_new_name) { - if (live_debug && connection.is_valid()) { + if (live_debug) { Array msg; - msg.push_back("live_duplicate_node"); msg.push_back(p_at); msg.push_back(p_new_name); - ppeer->put_var(msg); + _put_msg("live_duplicate_node", msg); } } void ScriptEditorDebugger::live_debug_reparent_node(const NodePath &p_at, const NodePath &p_new_place, const String &p_new_name, int p_at_pos) { - if (live_debug && connection.is_valid()) { + if (live_debug) { Array msg; - msg.push_back("live_reparent_node"); msg.push_back(p_at); msg.push_back(p_new_place); msg.push_back(p_new_name); msg.push_back(p_at_pos); - ppeer->put_var(msg); + _put_msg("live_reparent_node", msg); } } @@ -1991,33 +1335,21 @@ ScriptEditorDebugger::CameraOverride ScriptEditorDebugger::get_camera_override() void ScriptEditorDebugger::set_camera_override(CameraOverride p_override) { if (p_override == OVERRIDE_2D && camera_override != OVERRIDE_2D) { - if (connection.is_valid()) { - Array msg; - msg.push_back("override_camera_2D:set"); - msg.push_back(true); - ppeer->put_var(msg); - } + Array msg; + msg.push_back(true); + _put_msg("override_camera_2D:set", msg); } else if (p_override != OVERRIDE_2D && camera_override == OVERRIDE_2D) { - if (connection.is_valid()) { - Array msg; - msg.push_back("override_camera_2D:set"); - msg.push_back(false); - ppeer->put_var(msg); - } + Array msg; + msg.push_back(false); + _put_msg("override_camera_2D:set", msg); } else if (p_override >= OVERRIDE_3D_1 && camera_override < OVERRIDE_3D_1) { - if (connection.is_valid()) { - Array msg; - msg.push_back("override_camera_3D:set"); - msg.push_back(true); - ppeer->put_var(msg); - } + Array msg; + msg.push_back(true); + _put_msg("override_camera_3D:set", msg); } else if (p_override < OVERRIDE_3D_1 && camera_override >= OVERRIDE_3D_1) { - if (connection.is_valid()) { - Array msg; - msg.push_back("override_camera_3D:set"); - msg.push_back(false); - ppeer->put_var(msg); - } + Array msg; + msg.push_back(false); + _put_msg("override_camera_3D:set", msg); } camera_override = p_override; @@ -2025,23 +1357,16 @@ void ScriptEditorDebugger::set_camera_override(CameraOverride p_override) { void ScriptEditorDebugger::set_breakpoint(const String &p_path, int p_line, bool p_enabled) { - if (connection.is_valid()) { - Array msg; - msg.push_back("breakpoint"); - msg.push_back(p_path); - msg.push_back(p_line); - msg.push_back(p_enabled); - ppeer->put_var(msg); - } + Array msg; + msg.push_back(p_path); + msg.push_back(p_line); + msg.push_back(p_enabled); + _put_msg("breakpoint", msg); } void ScriptEditorDebugger::reload_scripts() { - if (connection.is_valid()) { - Array msg; - msg.push_back("reload_scripts"); - ppeer->put_var(msg); - } + _put_msg("reload_scripts", Array()); } bool ScriptEditorDebugger::is_skip_breakpoints() { @@ -2059,15 +1384,12 @@ void ScriptEditorDebugger::_error_activated() { void ScriptEditorDebugger::_error_selected() { TreeItem *selected = error_tree->get_selected(); - Array meta = selected->get_metadata(0); - if (meta.size() == 0) { return; } - Ref<Script> s = ResourceLoader::load(meta[0]); - emit_signal("goto_script_line", s, int(meta[1]) - 1); + emit_signal("error_selected", String(meta[0]), int(meta[1])); } void ScriptEditorDebugger::_expand_errors_list() { @@ -2096,58 +1418,6 @@ void ScriptEditorDebugger::_collapse_errors_list() { } } -void ScriptEditorDebugger::set_hide_on_stop(bool p_hide) { - - hide_on_stop = p_hide; -} - -bool ScriptEditorDebugger::get_debug_with_external_editor() const { - - return enable_external_editor; -} - -void ScriptEditorDebugger::set_debug_with_external_editor(bool p_enabled) { - - enable_external_editor = p_enabled; -} - -Ref<Script> ScriptEditorDebugger::get_dump_stack_script() const { - - return stack_script; -} - -void ScriptEditorDebugger::_paused() { - - ERR_FAIL_COND(connection.is_null()); - ERR_FAIL_COND(!connection->is_connected_to_host()); - - if (!breaked && EditorNode::get_singleton()->get_pause_button()->is_pressed()) { - debug_break(); - } - - if (breaked && !EditorNode::get_singleton()->get_pause_button()->is_pressed()) { - debug_continue(); - } -} - -void ScriptEditorDebugger::_set_remote_object(ObjectID p_id, ScriptEditorDebuggerInspectedObject *p_obj) { - - if (remote_objects.has(p_id)) - memdelete(remote_objects[p_id]); - remote_objects[p_id] = p_obj; -} - -void ScriptEditorDebugger::_clear_remote_objects() { - - for (Map<ObjectID, ScriptEditorDebuggerInspectedObject *>::Element *E = remote_objects.front(); E; E = E->next()) { - if (editor->get_editor_history()->get_current() == E->value()->get_instance_id()) { - editor->push_item(NULL); - } - memdelete(E->value()); - } - remote_objects.clear(); -} - void ScriptEditorDebugger::_clear_errors_list() { error_tree->clear(); @@ -2163,7 +1433,7 @@ void ScriptEditorDebugger::_error_tree_item_rmb_selected(const Vector2 &p_pos) { item_menu->set_size(Size2(1, 1)); if (error_tree->is_anything_selected()) { - item_menu->add_icon_item(get_icon("ActionCopy", "EditorIcons"), TTR("Copy Error"), ITEM_MENU_COPY_ERROR); + item_menu->add_icon_item(get_icon("ActionCopy", "EditorIcons"), TTR("Copy Error"), 0); } if (item_menu->get_item_count() > 0) { @@ -2173,70 +1443,29 @@ void ScriptEditorDebugger::_error_tree_item_rmb_selected(const Vector2 &p_pos) { } void ScriptEditorDebugger::_item_menu_id_pressed(int p_option) { + TreeItem *ti = error_tree->get_selected(); + while (ti->get_parent() != error_tree->get_root()) + ti = ti->get_parent(); - switch (p_option) { - - case ITEM_MENU_COPY_ERROR: { - TreeItem *ti = error_tree->get_selected(); - while (ti->get_parent() != error_tree->get_root()) - ti = ti->get_parent(); - - String type; - - if (ti->get_icon(0) == get_icon("Warning", "EditorIcons")) { - type = "W "; - } else if (ti->get_icon(0) == get_icon("Error", "EditorIcons")) { - type = "E "; - } - - String text = ti->get_text(0) + " "; - int rpad_len = text.length(); - - text = type + text + ti->get_text(1) + "\n"; - TreeItem *ci = ti->get_children(); - while (ci) { - text += " " + ci->get_text(0).rpad(rpad_len) + ci->get_text(1) + "\n"; - ci = ci->get_next(); - } - - OS::get_singleton()->set_clipboard(text); - - } break; - case ITEM_MENU_SAVE_REMOTE_NODE: { - - file_dialog->set_access(EditorFileDialog::ACCESS_RESOURCES); - file_dialog->set_mode(EditorFileDialog::MODE_SAVE_FILE); - file_dialog_mode = SAVE_NODE; - - List<String> extensions; - Ref<PackedScene> sd = memnew(PackedScene); - ResourceSaver::get_recognized_extensions(sd, &extensions); - file_dialog->clear_filters(); - for (int i = 0; i < extensions.size(); i++) { - file_dialog->add_filter("*." + extensions[i] + " ; " + extensions[i].to_upper()); - } - - file_dialog->popup_centered_ratio(); - } break; - case ITEM_MENU_COPY_NODE_PATH: { + String type; - TreeItem *ti = inspect_scene_tree->get_selected(); - String text = ti->get_text(0); + if (ti->get_icon(0) == get_icon("Warning", "EditorIcons")) { + type = "W "; + } else if (ti->get_icon(0) == get_icon("Error", "EditorIcons")) { + type = "E "; + } - if (ti->get_parent() == NULL) { - text = "."; - } else if (ti->get_parent()->get_parent() == NULL) { - text = "."; - } else { - while (ti->get_parent()->get_parent() != inspect_scene_tree->get_root()) { - ti = ti->get_parent(); - text = ti->get_text(0) + "/" + text; - } - } + String text = ti->get_text(0) + " "; + int rpad_len = text.length(); - OS::get_singleton()->set_clipboard(text); - } break; + text = type + text + ti->get_text(1) + "\n"; + TreeItem *ci = ti->get_children(); + while (ci) { + text += " " + ci->get_text(0).rpad(rpad_len) + ci->get_text(1) + "\n"; + ci = ci->get_next(); } + + OS::get_singleton()->set_clipboard(text); } void ScriptEditorDebugger::_tab_changed(int p_tab) { @@ -2257,11 +1486,9 @@ void ScriptEditorDebugger::_bind_methods() { ClassDB::bind_method(D_METHOD("debug_step"), &ScriptEditorDebugger::debug_step); ClassDB::bind_method(D_METHOD("debug_break"), &ScriptEditorDebugger::debug_break); ClassDB::bind_method(D_METHOD("debug_continue"), &ScriptEditorDebugger::debug_continue); - ClassDB::bind_method(D_METHOD("_output_clear"), &ScriptEditorDebugger::_output_clear); ClassDB::bind_method(D_METHOD("_export_csv"), &ScriptEditorDebugger::_export_csv); ClassDB::bind_method(D_METHOD("_performance_draw"), &ScriptEditorDebugger::_performance_draw); ClassDB::bind_method(D_METHOD("_performance_select"), &ScriptEditorDebugger::_performance_select); - ClassDB::bind_method(D_METHOD("_scene_tree_request"), &ScriptEditorDebugger::_scene_tree_request); ClassDB::bind_method(D_METHOD("_video_mem_request"), &ScriptEditorDebugger::_video_mem_request); ClassDB::bind_method(D_METHOD("_live_edit_set"), &ScriptEditorDebugger::_live_edit_set); ClassDB::bind_method(D_METHOD("_live_edit_clear"), &ScriptEditorDebugger::_live_edit_clear); @@ -2279,13 +1506,10 @@ void ScriptEditorDebugger::_bind_methods() { ClassDB::bind_method(D_METHOD("_error_tree_item_rmb_selected"), &ScriptEditorDebugger::_error_tree_item_rmb_selected); ClassDB::bind_method(D_METHOD("_item_menu_id_pressed"), &ScriptEditorDebugger::_item_menu_id_pressed); ClassDB::bind_method(D_METHOD("_tab_changed"), &ScriptEditorDebugger::_tab_changed); - - ClassDB::bind_method(D_METHOD("_paused"), &ScriptEditorDebugger::_paused); - - ClassDB::bind_method(D_METHOD("_scene_tree_selected"), &ScriptEditorDebugger::_scene_tree_selected); - ClassDB::bind_method(D_METHOD("_scene_tree_folded"), &ScriptEditorDebugger::_scene_tree_folded); - ClassDB::bind_method(D_METHOD("_scene_tree_rmb_selected"), &ScriptEditorDebugger::_scene_tree_rmb_selected); ClassDB::bind_method(D_METHOD("_file_selected"), &ScriptEditorDebugger::_file_selected); + ClassDB::bind_method(D_METHOD("_remote_object_selected", "id"), &ScriptEditorDebugger::_remote_object_selected); + ClassDB::bind_method(D_METHOD("_remote_object_edited", "id", "property", "value"), &ScriptEditorDebugger::_remote_object_edited); + ClassDB::bind_method(D_METHOD("_remote_object_property_updated", "id", "property"), &ScriptEditorDebugger::_remote_object_property_updated); ClassDB::bind_method(D_METHOD("live_debug_create_node"), &ScriptEditorDebugger::live_debug_create_node); ClassDB::bind_method(D_METHOD("live_debug_instance_node"), &ScriptEditorDebugger::live_debug_instance_node); @@ -2294,32 +1518,32 @@ void ScriptEditorDebugger::_bind_methods() { ClassDB::bind_method(D_METHOD("live_debug_restore_node"), &ScriptEditorDebugger::live_debug_restore_node); ClassDB::bind_method(D_METHOD("live_debug_duplicate_node"), &ScriptEditorDebugger::live_debug_duplicate_node); ClassDB::bind_method(D_METHOD("live_debug_reparent_node"), &ScriptEditorDebugger::live_debug_reparent_node); - ClassDB::bind_method(D_METHOD("_scene_tree_property_select_object"), &ScriptEditorDebugger::_scene_tree_property_select_object); - ClassDB::bind_method(D_METHOD("_scene_tree_property_value_edited"), &ScriptEditorDebugger::_scene_tree_property_value_edited); + ClassDB::bind_method(D_METHOD("request_remote_object", "id"), &ScriptEditorDebugger::request_remote_object); + ClassDB::bind_method(D_METHOD("update_remote_object", "id", "property", "value"), &ScriptEditorDebugger::update_remote_object); - ADD_SIGNAL(MethodInfo("goto_script_line")); + ADD_SIGNAL(MethodInfo("stopped")); + ADD_SIGNAL(MethodInfo("stop_requested")); + ADD_SIGNAL(MethodInfo("stack_frame_selected", PropertyInfo(Variant::INT, "frame"))); + ADD_SIGNAL(MethodInfo("error_selected", PropertyInfo(Variant::INT, "error"))); ADD_SIGNAL(MethodInfo("set_execution", PropertyInfo("script"), PropertyInfo(Variant::INT, "line"))); ADD_SIGNAL(MethodInfo("clear_execution", PropertyInfo("script"))); ADD_SIGNAL(MethodInfo("breaked", PropertyInfo(Variant::BOOL, "reallydid"), PropertyInfo(Variant::BOOL, "can_debug"))); - ADD_SIGNAL(MethodInfo("show_debugger", PropertyInfo(Variant::BOOL, "reallydid"))); + ADD_SIGNAL(MethodInfo("remote_object_requested", PropertyInfo(Variant::INT, "id"))); + ADD_SIGNAL(MethodInfo("remote_object_updated", PropertyInfo(Variant::INT, "id"))); + ADD_SIGNAL(MethodInfo("remote_object_property_updated", PropertyInfo(Variant::INT, "id"), PropertyInfo(Variant::STRING, "property"))); + ADD_SIGNAL(MethodInfo("remote_tree_updated")); } ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor) { - add_constant_override("margin_left", -EditorNode::get_singleton()->get_gui_base()->get_stylebox("BottomPanelDebuggerOverride", "EditorStyles")->get_margin(MARGIN_LEFT)); - add_constant_override("margin_right", -EditorNode::get_singleton()->get_gui_base()->get_stylebox("BottomPanelDebuggerOverride", "EditorStyles")->get_margin(MARGIN_RIGHT)); - ppeer = Ref<PacketPeerStream>(memnew(PacketPeerStream)); ppeer->set_input_buffer_max_size((1024 * 1024 * 8) - 4); // 8 MiB should be enough, minus 4 bytes for separator. editor = p_editor; - editor->get_inspector()->connect("object_id_selected", this, "_scene_tree_property_select_object"); tabs = memnew(TabContainer); tabs->set_tab_align(TabContainer::ALIGN_LEFT); tabs->add_style_override("panel", editor->get_gui_base()->get_stylebox("DebuggerPanel", "EditorStyles")); - tabs->add_style_override("tab_fg", editor->get_gui_base()->get_stylebox("DebuggerTabFG", "EditorStyles")); - tabs->add_style_override("tab_bg", editor->get_gui_base()->get_stylebox("DebuggerTabBG", "EditorStyles")); - tabs->connect("tab_changed", this, "_tab_changed"); + tabs->connect_compat("tab_changed", this, "_tab_changed"); add_child(tabs); @@ -2344,14 +1568,14 @@ ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor) { skip_breakpoints = memnew(ToolButton); hbc->add_child(skip_breakpoints); skip_breakpoints->set_tooltip(TTR("Skip Breakpoints")); - skip_breakpoints->connect("pressed", this, "debug_skip_breakpoints"); + skip_breakpoints->connect_compat("pressed", this, "debug_skip_breakpoints"); hbc->add_child(memnew(VSeparator)); copy = memnew(ToolButton); hbc->add_child(copy); copy->set_tooltip(TTR("Copy Error")); - copy->connect("pressed", this, "debug_copy"); + copy->connect_compat("pressed", this, "debug_copy"); hbc->add_child(memnew(VSeparator)); @@ -2359,13 +1583,13 @@ ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor) { hbc->add_child(step); step->set_tooltip(TTR("Step Into")); step->set_shortcut(ED_GET_SHORTCUT("debugger/step_into")); - step->connect("pressed", this, "debug_step"); + step->connect_compat("pressed", this, "debug_step"); next = memnew(ToolButton); hbc->add_child(next); next->set_tooltip(TTR("Step Over")); next->set_shortcut(ED_GET_SHORTCUT("debugger/step_over")); - next->connect("pressed", this, "debug_next"); + next->connect_compat("pressed", this, "debug_next"); hbc->add_child(memnew(VSeparator)); @@ -2373,23 +1597,13 @@ ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor) { hbc->add_child(dobreak); dobreak->set_tooltip(TTR("Break")); dobreak->set_shortcut(ED_GET_SHORTCUT("debugger/break")); - dobreak->connect("pressed", this, "debug_break"); + dobreak->connect_compat("pressed", this, "debug_break"); docontinue = memnew(ToolButton); hbc->add_child(docontinue); docontinue->set_tooltip(TTR("Continue")); docontinue->set_shortcut(ED_GET_SHORTCUT("debugger/continue")); - docontinue->connect("pressed", this, "debug_continue"); - - back = memnew(Button); - hbc->add_child(back); - back->set_tooltip(TTR("Inspect Previous Instance")); - back->hide(); - - forward = memnew(Button); - hbc->add_child(forward); - forward->set_tooltip(TTR("Inspect Next Instance")); - forward->hide(); + docontinue->connect_compat("pressed", this, "debug_continue"); HSplitContainer *sc = memnew(HSplitContainer); vbc->add_child(sc); @@ -2402,24 +1616,17 @@ ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor) { stack_dump->set_column_title(0, TTR("Stack Frames")); stack_dump->set_h_size_flags(SIZE_EXPAND_FILL); stack_dump->set_hide_root(true); - stack_dump->connect("cell_selected", this, "_stack_dump_frame_selected"); + stack_dump->connect_compat("cell_selected", this, "_stack_dump_frame_selected"); sc->add_child(stack_dump); - inspector = memnew(EditorInspector); + inspector = memnew(EditorDebuggerInspector); inspector->set_h_size_flags(SIZE_EXPAND_FILL); inspector->set_enable_capitalize_paths(false); inspector->set_read_only(true); - inspector->connect("object_id_selected", this, "_scene_tree_property_select_object"); + inspector->connect_compat("object_selected", this, "_remote_object_selected"); + inspector->connect_compat("object_edited", this, "_remote_object_edited"); + inspector->connect_compat("object_property_updated", this, "_remote_object_property_updated"); sc->add_child(inspector); - - server.instance(); - - pending_in_queue = 0; - - variables = memnew(ScriptEditorDebuggerVariables); - - breaked = false; - tabs->add_child(dbg); } @@ -2432,12 +1639,12 @@ ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor) { Button *expand_all = memnew(Button); expand_all->set_text(TTR("Expand All")); - expand_all->connect("pressed", this, "_expand_errors_list"); + expand_all->connect_compat("pressed", this, "_expand_errors_list"); errhb->add_child(expand_all); Button *collapse_all = memnew(Button); collapse_all->set_text(TTR("Collapse All")); - collapse_all->connect("pressed", this, "_collapse_errors_list"); + collapse_all->connect_compat("pressed", this, "_collapse_errors_list"); errhb->add_child(collapse_all); Control *space = memnew(Control); @@ -2447,7 +1654,7 @@ ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor) { clearbutton = memnew(Button); clearbutton->set_text(TTR("Clear")); clearbutton->set_h_size_flags(0); - clearbutton->connect("pressed", this, "_clear_errors_list"); + clearbutton->connect_compat("pressed", this, "_clear_errors_list"); errhb->add_child(clearbutton); error_tree = memnew(Tree); @@ -2462,36 +1669,19 @@ ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor) { error_tree->set_hide_root(true); error_tree->set_v_size_flags(SIZE_EXPAND_FILL); error_tree->set_allow_rmb_select(true); - error_tree->connect("item_rmb_selected", this, "_error_tree_item_rmb_selected"); + error_tree->connect_compat("item_rmb_selected", this, "_error_tree_item_rmb_selected"); errors_tab->add_child(error_tree); item_menu = memnew(PopupMenu); - item_menu->connect("id_pressed", this, "_item_menu_id_pressed"); + item_menu->connect_compat("id_pressed", this, "_item_menu_id_pressed"); error_tree->add_child(item_menu); tabs->add_child(errors_tab); } - { // remote scene tree - - inspect_scene_tree = memnew(Tree); - EditorNode::get_singleton()->get_scene_tree_dock()->add_remote_tree_editor(inspect_scene_tree); - EditorNode::get_singleton()->get_scene_tree_dock()->connect("remote_tree_selected", this, "_scene_tree_selected"); - inspect_scene_tree->set_v_size_flags(SIZE_EXPAND_FILL); - inspect_scene_tree->connect("cell_selected", this, "_scene_tree_selected"); - inspect_scene_tree->connect("item_collapsed", this, "_scene_tree_folded"); - inspect_scene_tree->set_allow_rmb_select(true); - inspect_scene_tree->connect("item_rmb_selected", this, "_scene_tree_rmb_selected"); - auto_switch_remote_scene_tree = EDITOR_DEF("debugger/auto_switch_to_remote_scene_tree", false); - inspect_scene_tree_timeout = EDITOR_DEF("debugger/remote_scene_tree_refresh_interval", 1.0); - inspect_edited_object_timeout = EDITOR_DEF("debugger/remote_inspect_refresh_interval", 0.2); - inspected_object_id = ObjectID(); - updating_scene_tree = false; - } - { // File dialog file_dialog = memnew(EditorFileDialog); - file_dialog->connect("file_selected", this, "_file_selected"); + file_dialog->connect_compat("file_selected", this, "_file_selected"); add_child(file_dialog); } @@ -2499,24 +1689,22 @@ ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor) { profiler = memnew(EditorProfiler); profiler->set_name(TTR("Profiler")); tabs->add_child(profiler); - profiler->connect("enable_profiling", this, "_profiler_activate"); - profiler->connect("break_request", this, "_profiler_seeked"); + profiler->connect_compat("enable_profiling", this, "_profiler_activate"); + profiler->connect_compat("break_request", this, "_profiler_seeked"); } { //frame profiler visual_profiler = memnew(EditorVisualProfiler); visual_profiler->set_name(TTR("Visual Profiler")); tabs->add_child(visual_profiler); - visual_profiler->connect("enable_profiling", this, "_visual_profiler_activate"); - visual_profiler->connect("break_request", this, "_profiler_seeked"); + visual_profiler->connect_compat("enable_profiling", this, "_visual_profiler_activate"); } { //network profiler network_profiler = memnew(EditorNetworkProfiler); network_profiler->set_name(TTR("Network Profiler")); tabs->add_child(network_profiler); - network_profiler->connect("enable_profiling", this, "_network_profiler_activate"); - network_profiler->connect("break_request", this, "_profiler_seeked"); + network_profiler->connect_compat("enable_profiling", this, "_network_profiler_activate"); } { //monitors @@ -2528,12 +1716,12 @@ ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor) { perf_monitors->set_column_title(0, TTR("Monitor")); perf_monitors->set_column_title(1, TTR("Value")); perf_monitors->set_column_titles_visible(true); - perf_monitors->connect("item_edited", this, "_performance_select"); + perf_monitors->connect_compat("item_edited", this, "_performance_select"); hsp->add_child(perf_monitors); perf_draw = memnew(Control); perf_draw->set_clip_contents(true); - perf_draw->connect("draw", this, "_performance_draw"); + perf_draw->connect_compat("draw", this, "_performance_draw"); hsp->add_child(perf_draw); hsp->set_name(TTR("Monitors")); @@ -2592,10 +1780,9 @@ ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor) { vmem_total->set_custom_minimum_size(Size2(100, 0) * EDSCALE); vmem_hb->add_child(vmem_total); vmem_refresh = memnew(ToolButton); - vmem_refresh->set_disabled(true); vmem_hb->add_child(vmem_refresh); vmem_vb->add_child(vmem_hb); - vmem_refresh->connect("pressed", this, "_video_mem_request"); + vmem_refresh->connect_compat("pressed", this, "_video_mem_request"); VBoxContainer *vmmc = memnew(VBoxContainer); vmem_tree = memnew(Tree); @@ -2640,6 +1827,7 @@ ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor) { info_left->add_child(memnew(Label(TTR("Clicked Control Type:")))); info_left->add_child(clicked_ctrl_type); + scene_tree = memnew(SceneDebuggerTree); live_edit_root = memnew(LineEdit); live_edit_root->set_h_size_flags(SIZE_EXPAND_FILL); @@ -2653,8 +1841,6 @@ ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor) { le_clear = memnew(Button(TTR("Clear"))); lehb->add_child(le_clear); info_left->add_child(lehb); - le_set->set_disabled(true); - le_clear->set_disabled(true); } misc->add_child(memnew(VSeparator)); @@ -2662,7 +1848,7 @@ ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor) { HBoxContainer *buttons = memnew(HBoxContainer); export_csv = memnew(Button(TTR("Export measures as CSV"))); - export_csv->connect("pressed", this, "_export_csv"); + export_csv->connect_compat("pressed", this, "_export_csv"); buttons->add_child(export_csv); misc->add_child(buttons); @@ -2671,27 +1857,18 @@ ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor) { msgdialog = memnew(AcceptDialog); add_child(msgdialog); - p_editor->get_undo_redo()->set_method_notify_callback(_method_changeds, this); - p_editor->get_undo_redo()->set_property_notify_callback(_property_changeds, this); live_debug = true; camera_override = OVERRIDE_NONE; last_path_id = false; error_count = 0; warning_count = 0; - hide_on_stop = true; - enable_external_editor = false; - last_error_count = 0; - last_warning_count = 0; - - EditorNode::get_singleton()->get_pause_button()->connect("pressed", this, "_paused"); + _update_buttons_state(); } ScriptEditorDebugger::~ScriptEditorDebugger() { - memdelete(variables); - ppeer->set_stream_peer(Ref<StreamPeer>()); - server->stop(); - _clear_remote_objects(); + inspector->clear_cache(); + memdelete(scene_tree); } diff --git a/editor/script_editor_debugger.h b/editor/debugger/script_editor_debugger.h index 5a821a4a88..fd034ba983 100644 --- a/editor/script_editor_debugger.h +++ b/editor/debugger/script_editor_debugger.h @@ -32,7 +32,8 @@ #define SCRIPT_EDITOR_DEBUGGER_H #include "core/io/packet_peer.h" -#include "core/io/tcp_server.h" +#include "core/io/stream_peer_tcp.h" +#include "editor/debugger/editor_debugger_inspector.h" #include "editor/editor_inspector.h" #include "editor/property_editor.h" #include "scene/3d/camera.h" @@ -41,7 +42,6 @@ class Tree; class EditorNode; -class ScriptEditorDebuggerVariables; class LineEdit; class TabContainer; class RichTextLabel; @@ -53,13 +53,14 @@ class ItemList; class EditorProfiler; class EditorVisualProfiler; class EditorNetworkProfiler; - -class ScriptEditorDebuggerInspectedObject; +class SceneDebuggerTree; class ScriptEditorDebugger : public MarginContainer { GDCLASS(ScriptEditorDebugger, MarginContainer); + friend class EditorDebuggerNode; + public: enum CameraOverride { OVERRIDE_NONE, @@ -77,16 +78,8 @@ private: MESSAGE_SUCCESS, }; - enum ItemMenu { - ITEM_MENU_COPY_ERROR, - ITEM_MENU_SAVE_REMOTE_NODE, - ITEM_MENU_COPY_NODE_PATH, - }; - AcceptDialog *msgdialog; - Button *debugger_button; - LineEdit *clicked_ctrl; LineEdit *clicked_ctrl_type; LineEdit *live_edit_root; @@ -94,35 +87,15 @@ private: Button *le_clear; Button *export_csv; - bool updating_scene_tree; - float inspect_scene_tree_timeout; - float inspect_edited_object_timeout; - bool auto_switch_remote_scene_tree; - ObjectID inspected_object_id; - ScriptEditorDebuggerVariables *variables; - Map<ObjectID, ScriptEditorDebuggerInspectedObject *> remote_objects; - Set<ObjectID> unfold_cache; - VBoxContainer *errors_tab; Tree *error_tree; - Tree *inspect_scene_tree; Button *clearbutton; PopupMenu *item_menu; EditorFileDialog *file_dialog; - enum FileDialogMode { - SAVE_CSV, - SAVE_NODE, - }; - FileDialogMode file_dialog_mode; int error_count; int warning_count; - int last_error_count; - int last_warning_count; - - bool hide_on_stop; - bool enable_external_editor; bool skip_breakpoints_value = false; Ref<Script> stack_script; @@ -135,10 +108,11 @@ private: Button *copy; Button *step; Button *next; - Button *back; - Button *forward; Button *dobreak; Button *docontinue; + // Reference to "Remote" tab in scene tree. Needed by _live_edit_set and buttons state. + // Each debugger should have it's tree in the future I guess. + const Tree *editor_remote_tree = NULL; List<Vector<float> > perf_history; Vector<float> perf_max; @@ -155,16 +129,12 @@ private: LineEdit *vmem_total; Tree *stack_dump; - EditorInspector *inspector; + EditorDebuggerInspector *inspector; + SceneDebuggerTree *scene_tree; - Ref<TCP_Server> server; Ref<StreamPeerTCP> connection; Ref<PacketPeerStream> ppeer; - String message_type; - Array message; - int pending_in_queue; - HashMap<NodePath, int> node_path_cache; int last_path_id; Map<String, int> res_path_cache; @@ -175,7 +145,9 @@ private: EditorNode *editor; - bool breaked; + OS::ProcessID remote_pid = 0; + bool breaked = false; + bool can_debug = false; bool live_debug; @@ -184,18 +156,14 @@ private: void _performance_draw(); void _performance_select(); void _stack_dump_frame_selected(); - void _output_clear(); - void _scene_tree_folded(Object *obj); - void _scene_tree_selected(); - void _scene_tree_rmb_selected(const Vector2 &p_position); void _file_selected(const String &p_file); - void _scene_tree_request(); void _parse_message(const String &p_msg, const Array &p_data); void _set_reason_text(const String &p_reason, MessageType p_type); - void _scene_tree_property_select_object(ObjectID p_object); - void _scene_tree_property_value_edited(const String &p_prop, const Variant &p_value); - int _update_scene_tree(TreeItem *parent, const Array &nodes, int current_index); + void _update_buttons_state(); + void _remote_object_selected(ObjectID p_object); + void _remote_object_edited(ObjectID, const String &p_prop, const Variant &p_value); + void _remote_object_property_updated(ObjectID p_id, const String &p_property); void _video_mem_request(); @@ -221,28 +189,34 @@ private: void _network_profiler_activate(bool p_enable); - void _paused(); - - void _set_remote_object(ObjectID p_id, ScriptEditorDebuggerInspectedObject *p_obj); - void _clear_remote_objects(); void _clear_errors_list(); void _error_tree_item_rmb_selected(const Vector2 &p_pos); void _item_menu_id_pressed(int p_option); void _tab_changed(int p_tab); + void _put_msg(String p_message, Array p_data); void _export_csv(); void _clear_execution(); + void _stop_and_notify(); protected: void _notification(int p_what); static void _bind_methods(); public: - void start(); - void pause(); - void unpause(); + void request_remote_object(ObjectID p_obj_id); + void update_remote_object(ObjectID p_obj_id, const String &p_prop, const Variant &p_value); + Object *get_remote_object(ObjectID p_id); + + // Needed by _live_edit_set, buttons state. + void set_editor_remote_tree(const Tree *p_tree) { editor_remote_tree = p_tree; } + + void request_remote_tree(); + const SceneDebuggerTree *get_remote_tree(); + + void start(Ref<StreamPeerTCP> p_connection); void stop(); void debug_skip_breakpoints(); @@ -252,14 +226,24 @@ public: void debug_step(); void debug_break(); void debug_continue(); - + bool is_breaked() const { return breaked; } + bool is_debuggable() const { return can_debug; } + bool is_session_active() { return connection.is_valid() && connection->is_connected_to_host(); }; + int get_remote_pid() const { return remote_pid; } + + int get_error_count() const { return error_count; } + int get_warning_count() const { return warning_count; } + String get_stack_script_file() const; + int get_stack_script_line() const; + int get_stack_script_frame() const; + + void update_tabs(); + void clear_style(); String get_var_value(const String &p_var) const; + void save_node(ObjectID p_id, const String &p_file); void set_live_debugging(bool p_enable); - static void _method_changeds(void *p_ud, Object *p_base, const StringName &p_name, VARIANT_ARG_DECLARE); - static void _property_changeds(void *p_ud, Object *p_base, const StringName &p_property, const Variant &p_value); - void live_debug_create_node(const NodePath &p_parent, const String &p_type, const String &p_name); void live_debug_instance_node(const NodePath &p_parent, const String &p_path, const String &p_name); void live_debug_remove_node(const NodePath &p_at); @@ -275,15 +259,6 @@ public: void update_live_edit_root(); - void set_hide_on_stop(bool p_hide); - - bool get_debug_with_external_editor() const; - void set_debug_with_external_editor(bool p_enabled); - - Ref<Script> get_dump_stack_script() const; - - void set_tool_button(Button *p_tb) { debugger_button = p_tb; } - void reload_scripts(); bool is_skip_breakpoints(); diff --git a/editor/dependency_editor.cpp b/editor/dependency_editor.cpp index 46f6815f77..e2a447cfcf 100644 --- a/editor/dependency_editor.cpp +++ b/editor/dependency_editor.cpp @@ -247,7 +247,7 @@ DependencyEditor::DependencyEditor() { tree->set_column_title(0, TTR("Resource")); tree->set_column_title(1, TTR("Path")); tree->set_hide_root(true); - tree->connect("button_pressed", this, "_load_pressed"); + tree->connect_compat("button_pressed", this, "_load_pressed"); HBoxContainer *hbc = memnew(HBoxContainer); Label *label = memnew(Label(TTR("Dependencies:"))); @@ -255,7 +255,7 @@ DependencyEditor::DependencyEditor() { hbc->add_spacer(); fixdeps = memnew(Button(TTR("Fix Broken"))); hbc->add_child(fixdeps); - fixdeps->connect("pressed", this, "_fix_all"); + fixdeps->connect_compat("pressed", this, "_fix_all"); vb->add_child(hbc); @@ -267,7 +267,7 @@ DependencyEditor::DependencyEditor() { set_title(TTR("Dependency Editor")); search = memnew(EditorFileDialog); - search->connect("file_selected", this, "_searched"); + search->connect_compat("file_selected", this, "_searched"); search->set_mode(EditorFileDialog::MODE_OPEN_FILE); search->set_title(TTR("Search Replacement Resource:")); add_child(search); @@ -360,12 +360,12 @@ DependencyEditorOwners::DependencyEditorOwners(EditorNode *p_editor) { file_options = memnew(PopupMenu); add_child(file_options); - file_options->connect("id_pressed", this, "_file_option"); + file_options->connect_compat("id_pressed", this, "_file_option"); owners = memnew(ItemList); owners->set_select_mode(ItemList::SELECT_SINGLE); - owners->connect("item_rmb_selected", this, "_list_rmb_select"); - owners->connect("item_activated", this, "_select_file"); + owners->connect_compat("item_rmb_selected", this, "_list_rmb_select"); + owners->connect_compat("item_activated", this, "_select_file"); owners->set_allow_rmb_select(true); add_child(owners); } @@ -800,7 +800,7 @@ OrphanResourcesDialog::OrphanResourcesDialog() { add_child(delete_confirm); dep_edit = memnew(DependencyEditor); add_child(dep_edit); - delete_confirm->connect("confirmed", this, "_delete_confirm"); + delete_confirm->connect_compat("confirmed", this, "_delete_confirm"); set_hide_on_ok(false); VBoxContainer *vbc = memnew(VBoxContainer); @@ -816,5 +816,5 @@ OrphanResourcesDialog::OrphanResourcesDialog() { files->set_column_title(1, TTR("Owns")); files->set_hide_root(true); vbc->add_margin_child(TTR("Resources Without Explicit Ownership:"), files, true); - files->connect("button_pressed", this, "_button_pressed"); + files->connect_compat("button_pressed", this, "_button_pressed"); } diff --git a/editor/doc/doc_data.cpp b/editor/doc/doc_data.cpp index c128ca4321..3fd9e3182d 100644 --- a/editor/doc/doc_data.cpp +++ b/editor/doc/doc_data.cpp @@ -533,7 +533,7 @@ void DocData::generate(bool p_basic_types) { ClassDoc &c = class_list[cname]; c.name = cname; - Variant::CallError cerror; + Callable::CallError cerror; Variant v = Variant::construct(Variant::Type(i), NULL, 0, cerror); List<MethodInfo> method_list; @@ -562,11 +562,12 @@ void DocData::generate(bool p_basic_types) { method.arguments.push_back(ad); } - if (mi.return_val.type == Variant::NIL) { - if (mi.return_val.name != "") - method.return_type = "Variant"; - } else { - method.return_type = Variant::get_type_name(mi.return_val.type); + return_doc_from_retinfo(method, mi.return_val); + + if (mi.flags & METHOD_FLAG_VARARG) { + if (method.qualifiers != "") + method.qualifiers += " "; + method.qualifiers += "vararg"; } c.methods.push_back(method); @@ -1032,7 +1033,7 @@ Error DocData::save_classes(const String &p_default_path, const Map<String, Stri String header = "<class name=\"" + c.name + "\""; if (c.inherits != "") header += " inherits=\"" + c.inherits + "\""; - header += String(" version=\"") + VERSION_NUMBER + "\""; + header += String(" version=\"") + VERSION_BRANCH + "\""; header += ">"; _write_string(f, 0, header); diff --git a/editor/doc/doc_dump.cpp b/editor/doc/doc_dump.cpp index d7e1d257f2..b0a89ff4b8 100644 --- a/editor/doc/doc_dump.cpp +++ b/editor/doc/doc_dump.cpp @@ -83,7 +83,7 @@ void DocDump::dump(const String &p_file) { FileAccess *f = FileAccess::open(p_file, FileAccess::WRITE); _write_string(f, 0, "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>"); - _write_string(f, 0, String("<doc version=\"") + VERSION_NUMBER + "\" name=\"Engine Types\">"); + _write_string(f, 0, String("<doc version=\"") + VERSION_BRANCH + "\" name=\"Engine Types\">"); while (class_list.size()) { @@ -161,10 +161,13 @@ void DocDump::dump(const String &p_file) { default_arg_text = "false"; break; case Variant::INT: - case Variant::REAL: + case Variant::FLOAT: //keep it break; case Variant::STRING: + case Variant::STRING_NAME: + default_arg_text = "@\"" + default_arg_text + "\""; + break; case Variant::NODE_PATH: default_arg_text = "\"" + default_arg_text + "\""; break; @@ -184,16 +187,18 @@ void DocDump::dump(const String &p_file) { case Variant::AABB: case Variant::BASIS: case Variant::COLOR: - case Variant::POOL_BYTE_ARRAY: - case Variant::POOL_INT_ARRAY: - case Variant::POOL_REAL_ARRAY: - case Variant::POOL_STRING_ARRAY: - case Variant::POOL_VECTOR3_ARRAY: - case Variant::POOL_COLOR_ARRAY: + case Variant::PACKED_BYTE_ARRAY: + case Variant::PACKED_INT32_ARRAY: + case Variant::PACKED_FLOAT32_ARRAY: + case Variant::PACKED_INT64_ARRAY: + case Variant::PACKED_FLOAT64_ARRAY: + case Variant::PACKED_STRING_ARRAY: + case Variant::PACKED_VECTOR3_ARRAY: + case Variant::PACKED_COLOR_ARRAY: default_arg_text = Variant::get_type_name(default_arg.get_type()) + "(" + default_arg_text + ")"; break; case Variant::OBJECT: - case Variant::DICTIONARY: // 20 + case Variant::DICTIONARY: case Variant::ARRAY: case Variant::_RID: diff --git a/editor/editor_about.cpp b/editor/editor_about.cpp index ba653017ef..37d653ed43 100644 --- a/editor/editor_about.cpp +++ b/editor/editor_about.cpp @@ -255,7 +255,7 @@ EditorAbout::EditorAbout() { _tpl_text->set_v_size_flags(Control::SIZE_EXPAND_FILL); tpl_hbc->add_child(_tpl_text); - _tpl_tree->connect("item_selected", this, "_license_tree_selected"); + _tpl_tree->connect_compat("item_selected", this, "_license_tree_selected"); tpl_ti_all->select(0); _tpl_text->set_text(tpl_ti_all->get_metadata(0)); } diff --git a/editor/editor_asset_installer.cpp b/editor/editor_asset_installer.cpp index 783b996c4d..8a6fc4cd12 100644 --- a/editor/editor_asset_installer.cpp +++ b/editor/editor_asset_installer.cpp @@ -318,7 +318,7 @@ EditorAssetInstaller::EditorAssetInstaller() { tree = memnew(Tree); vb->add_margin_child(TTR("Package Contents:"), tree, true); - tree->connect("item_edited", this, "_item_edited"); + tree->connect_compat("item_edited", this, "_item_edited"); error = memnew(AcceptDialog); add_child(error); diff --git a/editor/editor_audio_buses.cpp b/editor/editor_audio_buses.cpp index 594322f00d..1a72b6e1ca 100644 --- a/editor/editor_audio_buses.cpp +++ b/editor/editor_audio_buses.cpp @@ -799,8 +799,8 @@ EditorAudioBus::EditorAudioBus(EditorAudioBuses *p_buses, bool p_is_master) { set_v_size_flags(SIZE_EXPAND_FILL); track_name = memnew(LineEdit); - track_name->connect("text_entered", this, "_name_changed"); - track_name->connect("focus_exited", this, "_name_focus_exit"); + track_name->connect_compat("text_entered", this, "_name_changed"); + track_name->connect_compat("focus_exited", this, "_name_focus_exit"); vb->add_child(track_name); HBoxContainer *hbc = memnew(HBoxContainer); @@ -809,19 +809,19 @@ EditorAudioBus::EditorAudioBus(EditorAudioBuses *p_buses, bool p_is_master) { solo->set_toggle_mode(true); solo->set_tooltip(TTR("Solo")); solo->set_focus_mode(FOCUS_NONE); - solo->connect("pressed", this, "_solo_toggled"); + solo->connect_compat("pressed", this, "_solo_toggled"); hbc->add_child(solo); mute = memnew(ToolButton); mute->set_toggle_mode(true); mute->set_tooltip(TTR("Mute")); mute->set_focus_mode(FOCUS_NONE); - mute->connect("pressed", this, "_mute_toggled"); + mute->connect_compat("pressed", this, "_mute_toggled"); hbc->add_child(mute); bypass = memnew(ToolButton); bypass->set_toggle_mode(true); bypass->set_tooltip(TTR("Bypass")); bypass->set_focus_mode(FOCUS_NONE); - bypass->connect("pressed", this, "_bypass_toggled"); + bypass->connect_compat("pressed", this, "_bypass_toggled"); hbc->add_child(bypass); hbc->add_spacer(); @@ -878,9 +878,9 @@ EditorAudioBus::EditorAudioBus(EditorAudioBuses *p_buses, bool p_is_master) { preview_timer->set_one_shot(true); add_child(preview_timer); - slider->connect("value_changed", this, "_volume_changed"); - slider->connect("value_changed", this, "_show_value"); - preview_timer->connect("timeout", this, "_hide_value_preview"); + slider->connect_compat("value_changed", this, "_volume_changed"); + slider->connect_compat("value_changed", this, "_show_value"); + preview_timer->connect_compat("timeout", this, "_hide_value_preview"); hb->add_child(slider); cc = 0; @@ -918,24 +918,24 @@ EditorAudioBus::EditorAudioBus(EditorAudioBuses *p_buses, bool p_is_master) { effects->set_hide_folding(true); effects->set_v_size_flags(SIZE_EXPAND_FILL); vb->add_child(effects); - effects->connect("item_edited", this, "_effect_edited"); - effects->connect("cell_selected", this, "_effect_selected"); + effects->connect_compat("item_edited", this, "_effect_edited"); + effects->connect_compat("cell_selected", this, "_effect_selected"); effects->set_edit_checkbox_cell_only_when_checkbox_is_pressed(true); effects->set_drag_forwarding(this); - effects->connect("item_rmb_selected", this, "_effect_rmb"); + effects->connect_compat("item_rmb_selected", this, "_effect_rmb"); effects->set_allow_rmb_select(true); effects->set_focus_mode(FOCUS_CLICK); effects->set_allow_reselect(true); send = memnew(OptionButton); send->set_clip_text(true); - send->connect("item_selected", this, "_send_selected"); + send->connect_compat("item_selected", this, "_send_selected"); vb->add_child(send); set_focus_mode(FOCUS_CLICK); effect_options = memnew(PopupMenu); - effect_options->connect("index_pressed", this, "_effect_add"); + effect_options->connect_compat("index_pressed", this, "_effect_add"); add_child(effect_options); List<StringName> effects; ClassDB::get_inheriters_from_class("AudioEffect", &effects); @@ -956,12 +956,12 @@ EditorAudioBus::EditorAudioBus(EditorAudioBuses *p_buses, bool p_is_master) { bus_popup->add_item(TTR("Delete")); bus_popup->set_item_disabled(1, is_master); bus_popup->add_item(TTR("Reset Volume")); - bus_popup->connect("index_pressed", this, "_bus_popup_pressed"); + bus_popup->connect_compat("index_pressed", this, "_bus_popup_pressed"); delete_effect_popup = memnew(PopupMenu); delete_effect_popup->add_item(TTR("Delete Effect")); add_child(delete_effect_popup); - delete_effect_popup->connect("index_pressed", this, "_delete_effect_pressed"); + delete_effect_popup->connect_compat("index_pressed", this, "_delete_effect_pressed"); } void EditorAudioBusDrop::_notification(int p_what) { @@ -1029,11 +1029,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", this, "_delete_bus", varray(audio_bus), CONNECT_DEFERRED); - audio_bus->connect("duplicate_request", this, "_duplicate_bus", varray(), CONNECT_DEFERRED); - audio_bus->connect("vol_reset_request", this, "_reset_bus_volume", varray(audio_bus), CONNECT_DEFERRED); - audio_bus->connect("drop_end_request", this, "_request_drop_end"); - audio_bus->connect("dropped", this, "_drop_at_index", varray(), CONNECT_DEFERRED); + audio_bus->connect_compat("delete_request", this, "_delete_bus", varray(audio_bus), CONNECT_DEFERRED); + audio_bus->connect_compat("duplicate_request", this, "_duplicate_bus", varray(), CONNECT_DEFERRED); + audio_bus->connect_compat("vol_reset_request", this, "_reset_bus_volume", varray(audio_bus), CONNECT_DEFERRED); + audio_bus->connect_compat("drop_end_request", this, "_request_drop_end"); + audio_bus->connect_compat("dropped", this, "_drop_at_index", varray(), CONNECT_DEFERRED); } } @@ -1187,7 +1187,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", this, "_drop_at_index", varray(), CONNECT_DEFERRED); + drop_end->connect_compat("dropped", this, "_drop_at_index", varray(), CONNECT_DEFERRED); } } @@ -1339,7 +1339,7 @@ EditorAudioBuses::EditorAudioBuses() { top_hb->add_child(add); add->set_text(TTR("Add Bus")); add->set_tooltip(TTR("Add a new Audio Bus to this layout.")); - add->connect("pressed", this, "_add_bus"); + add->connect_compat("pressed", this, "_add_bus"); VSeparator *separator = memnew(VSeparator); top_hb->add_child(separator); @@ -1348,25 +1348,25 @@ EditorAudioBuses::EditorAudioBuses() { load->set_text(TTR("Load")); load->set_tooltip(TTR("Load an existing Bus Layout.")); top_hb->add_child(load); - load->connect("pressed", this, "_load_layout"); + load->connect_compat("pressed", this, "_load_layout"); save_as = memnew(Button); save_as->set_text(TTR("Save As")); save_as->set_tooltip(TTR("Save this Bus Layout to a file.")); top_hb->add_child(save_as); - save_as->connect("pressed", this, "_save_as_layout"); + save_as->connect_compat("pressed", this, "_save_as_layout"); _default = memnew(Button); _default->set_text(TTR("Load Default")); _default->set_tooltip(TTR("Load the default Bus Layout.")); top_hb->add_child(_default); - _default->connect("pressed", this, "_load_default_layout"); + _default->connect_compat("pressed", this, "_load_default_layout"); _new = memnew(Button); _new->set_text(TTR("Create")); _new->set_tooltip(TTR("Create a new Bus Layout.")); top_hb->add_child(_new); - _new->connect("pressed", this, "_new_layout"); + _new->connect_compat("pressed", this, "_new_layout"); bus_scroll = memnew(ScrollContainer); bus_scroll->set_v_size_flags(SIZE_EXPAND_FILL); @@ -1381,7 +1381,7 @@ EditorAudioBuses::EditorAudioBuses() { save_timer->set_wait_time(0.8); save_timer->set_one_shot(true); add_child(save_timer); - save_timer->connect("timeout", this, "_server_save"); + save_timer->connect_compat("timeout", this, "_server_save"); set_v_size_flags(SIZE_EXPAND_FILL); @@ -1394,7 +1394,7 @@ EditorAudioBuses::EditorAudioBuses() { file_dialog->add_filter("*." + E->get() + "; Audio Bus Layout"); } add_child(file_dialog); - file_dialog->connect("file_selected", this, "_file_dialog_callback"); + file_dialog->connect_compat("file_selected", this, "_file_dialog_callback"); set_process(true); } diff --git a/editor/editor_autoload_settings.cpp b/editor/editor_autoload_settings.cpp index dba8c2ec8c..feb6dbd302 100644 --- a/editor/editor_autoload_settings.cpp +++ b/editor/editor_autoload_settings.cpp @@ -361,7 +361,7 @@ Node *EditorAutoloadSettings::_create_autoload(const String &p_path) { ERR_FAIL_COND_V_MSG(obj == NULL, NULL, "Cannot instance script for autoload, expected 'Node' inheritance, got: " + String(ibt) + "."); n = Object::cast_to<Node>(obj); - n->set_script(s.get_ref_ptr()); + n->set_script(s); } ERR_FAIL_COND_V_MSG(!n, NULL, "Path in autoload not a node or script: " + p_path + "."); @@ -521,7 +521,7 @@ Variant EditorAutoloadSettings::get_drag_data_fw(const Point2 &p_point, Control if (autoload_cache.size() <= 1) return false; - PoolStringArray autoloads; + PackedStringArray autoloads; TreeItem *next = tree->get_next_selected(NULL); @@ -612,7 +612,7 @@ void EditorAutoloadSettings::drop_data_fw(const Point2 &p_point, const Variant & } Dictionary drop_data = p_data; - PoolStringArray autoloads = drop_data["autoloads"]; + PackedStringArray autoloads = drop_data["autoloads"]; Vector<int> orders; orders.resize(autoload_cache.size()); @@ -835,8 +835,8 @@ EditorAutoloadSettings::EditorAutoloadSettings() { autoload_add_path = memnew(EditorLineEditFileChooser); autoload_add_path->set_h_size_flags(SIZE_EXPAND_FILL); autoload_add_path->get_file_dialog()->set_mode(EditorFileDialog::MODE_OPEN_FILE); - autoload_add_path->get_file_dialog()->connect("file_selected", this, "_autoload_file_callback"); - autoload_add_path->get_line_edit()->connect("text_changed", this, "_autoload_path_text_changed"); + autoload_add_path->get_file_dialog()->connect_compat("file_selected", this, "_autoload_file_callback"); + autoload_add_path->get_line_edit()->connect_compat("text_changed", this, "_autoload_path_text_changed"); hbc->add_child(autoload_add_path); @@ -846,13 +846,13 @@ EditorAutoloadSettings::EditorAutoloadSettings() { autoload_add_name = memnew(LineEdit); autoload_add_name->set_h_size_flags(SIZE_EXPAND_FILL); - autoload_add_name->connect("text_entered", this, "_autoload_text_entered"); - autoload_add_name->connect("text_changed", this, "_autoload_text_changed"); + autoload_add_name->connect_compat("text_entered", this, "_autoload_text_entered"); + autoload_add_name->connect_compat("text_changed", this, "_autoload_text_changed"); hbc->add_child(autoload_add_name); add_autoload = memnew(Button); add_autoload->set_text(TTR("Add")); - add_autoload->connect("pressed", this, "_autoload_add"); + add_autoload->connect_compat("pressed", this, "_autoload_add"); // The button will be enabled once a valid name is entered (either automatically or manually). add_autoload->set_disabled(true); hbc->add_child(add_autoload); @@ -882,10 +882,10 @@ EditorAutoloadSettings::EditorAutoloadSettings() { tree->set_column_expand(3, false); tree->set_column_min_width(3, 120 * EDSCALE); - tree->connect("cell_selected", this, "_autoload_selected"); - tree->connect("item_edited", this, "_autoload_edited"); - tree->connect("button_pressed", this, "_autoload_button_pressed"); - tree->connect("item_activated", this, "_autoload_activated"); + tree->connect_compat("cell_selected", this, "_autoload_selected"); + tree->connect_compat("item_edited", this, "_autoload_edited"); + tree->connect_compat("button_pressed", this, "_autoload_button_pressed"); + tree->connect_compat("item_activated", this, "_autoload_activated"); tree->set_v_size_flags(SIZE_EXPAND_FILL); add_child(tree, true); diff --git a/editor/editor_data.cpp b/editor/editor_data.cpp index 5cb7720170..c3592d3f06 100644 --- a/editor/editor_data.cpp +++ b/editor/editor_data.cpp @@ -506,7 +506,7 @@ Object *EditorData::instance_custom_type(const String &p_type, const String &p_i if (ob->is_class("Node")) { ob->call("set_name", p_type); } - ob->set_script(script.get_ref_ptr()); + ob->set_script(script); return ob; } } @@ -907,7 +907,7 @@ Object *EditorData::script_class_instance(const String &p_class) { if (obj) { Ref<Script> script = script_class_load_script(p_class); if (script.is_valid()) - obj->set_script(script.get_ref_ptr()); + obj->set_script(script); return obj; } } @@ -1024,7 +1024,7 @@ void EditorSelection::add_node(Node *p_node) { } selection[p_node] = meta; - p_node->connect("tree_exiting", this, "_node_removed", varray(p_node), CONNECT_ONESHOT); + p_node->connect_compat("tree_exiting", this, "_node_removed", varray(p_node), CONNECT_ONESHOT); //emit_signal("selection_changed"); } @@ -1042,7 +1042,7 @@ void EditorSelection::remove_node(Node *p_node) { if (meta) memdelete(meta); selection.erase(p_node); - p_node->disconnect("tree_exiting", this, "_node_removed"); + p_node->disconnect_compat("tree_exiting", this, "_node_removed"); //emit_signal("selection_changed"); } bool EditorSelection::is_selected(Node *p_node) const { diff --git a/editor/editor_dir_dialog.cpp b/editor/editor_dir_dialog.cpp index 09e63f70b4..841ad250a4 100644 --- a/editor/editor_dir_dialog.cpp +++ b/editor/editor_dir_dialog.cpp @@ -82,21 +82,21 @@ void EditorDirDialog::reload(const String &p_path) { void EditorDirDialog::_notification(int p_what) { if (p_what == NOTIFICATION_ENTER_TREE) { - EditorFileSystem::get_singleton()->connect("filesystem_changed", this, "reload"); + EditorFileSystem::get_singleton()->connect_compat("filesystem_changed", this, "reload"); reload(); - if (!tree->is_connected("item_collapsed", this, "_item_collapsed")) { - tree->connect("item_collapsed", this, "_item_collapsed", varray(), CONNECT_DEFERRED); + if (!tree->is_connected_compat("item_collapsed", this, "_item_collapsed")) { + tree->connect_compat("item_collapsed", this, "_item_collapsed", varray(), CONNECT_DEFERRED); } - if (!EditorFileSystem::get_singleton()->is_connected("filesystem_changed", this, "reload")) { - EditorFileSystem::get_singleton()->connect("filesystem_changed", this, "reload"); + if (!EditorFileSystem::get_singleton()->is_connected_compat("filesystem_changed", this, "reload")) { + EditorFileSystem::get_singleton()->connect_compat("filesystem_changed", this, "reload"); } } if (p_what == NOTIFICATION_EXIT_TREE) { - if (EditorFileSystem::get_singleton()->is_connected("filesystem_changed", this, "reload")) { - EditorFileSystem::get_singleton()->disconnect("filesystem_changed", this, "reload"); + if (EditorFileSystem::get_singleton()->is_connected_compat("filesystem_changed", this, "reload")) { + EditorFileSystem::get_singleton()->disconnect_compat("filesystem_changed", this, "reload"); } } @@ -186,10 +186,10 @@ EditorDirDialog::EditorDirDialog() { tree = memnew(Tree); add_child(tree); - tree->connect("item_activated", this, "_ok"); + tree->connect_compat("item_activated", this, "_ok"); makedir = add_button(TTR("Create Folder"), OS::get_singleton()->get_swap_ok_cancel(), "makedir"); - makedir->connect("pressed", this, "_make_dir"); + makedir->connect_compat("pressed", this, "_make_dir"); makedialog = memnew(ConfirmationDialog); makedialog->set_title(TTR("Create Folder")); @@ -202,7 +202,7 @@ EditorDirDialog::EditorDirDialog() { makedirname = memnew(LineEdit); makevb->add_margin_child(TTR("Name:"), makedirname); makedialog->register_text_enter(makedirname); - makedialog->connect("confirmed", this, "_make_dir_confirm"); + makedialog->connect_compat("confirmed", this, "_make_dir_confirm"); mkdirerr = memnew(AcceptDialog); mkdirerr->set_text(TTR("Could not create folder.")); diff --git a/editor/editor_export.cpp b/editor/editor_export.cpp index f638df28a8..827b9111f3 100644 --- a/editor/editor_export.cpp +++ b/editor/editor_export.cpp @@ -582,14 +582,14 @@ String EditorExportPlugin::get_ios_cpp_code() const { return ios_cpp_code; } -void EditorExportPlugin::_export_file_script(const String &p_path, const String &p_type, const PoolVector<String> &p_features) { +void EditorExportPlugin::_export_file_script(const String &p_path, const String &p_type, const Vector<String> &p_features) { if (get_script_instance()) { get_script_instance()->call("_export_file", p_path, p_type, p_features); } } -void EditorExportPlugin::_export_begin_script(const PoolVector<String> &p_features, bool p_debug, const String &p_path, int p_flags) { +void EditorExportPlugin::_export_begin_script(const Vector<String> &p_features, bool p_debug, const String &p_path, int p_flags) { if (get_script_instance()) { get_script_instance()->call("_export_begin", p_features, p_debug, p_path, p_flags); @@ -625,8 +625,8 @@ void EditorExportPlugin::_bind_methods() { ClassDB::bind_method(D_METHOD("add_ios_cpp_code", "code"), &EditorExportPlugin::add_ios_cpp_code); ClassDB::bind_method(D_METHOD("skip"), &EditorExportPlugin::skip); - BIND_VMETHOD(MethodInfo("_export_file", PropertyInfo(Variant::STRING, "path"), PropertyInfo(Variant::STRING, "type"), PropertyInfo(Variant::POOL_STRING_ARRAY, "features"))); - BIND_VMETHOD(MethodInfo("_export_begin", PropertyInfo(Variant::POOL_STRING_ARRAY, "features"), PropertyInfo(Variant::BOOL, "is_debug"), PropertyInfo(Variant::STRING, "path"), PropertyInfo(Variant::INT, "flags"))); + BIND_VMETHOD(MethodInfo("_export_file", PropertyInfo(Variant::STRING, "path"), PropertyInfo(Variant::STRING, "type"), PropertyInfo(Variant::PACKED_STRING_ARRAY, "features"))); + BIND_VMETHOD(MethodInfo("_export_begin", PropertyInfo(Variant::PACKED_STRING_ARRAY, "features"), PropertyInfo(Variant::BOOL, "is_debug"), PropertyInfo(Variant::STRING, "path"), PropertyInfo(Variant::INT, "flags"))); BIND_VMETHOD(MethodInfo("_export_end")); } @@ -731,7 +731,7 @@ Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> & FeatureContainers feature_containers = get_feature_containers(p_preset); Set<String> &features = feature_containers.features; - PoolVector<String> &features_pv = feature_containers.features_pv; + Vector<String> &features_pv = feature_containers.features_pv; //store everything in the export medium int idx = 0; @@ -1416,7 +1416,7 @@ EditorExport::EditorExport() { add_child(save_timer); save_timer->set_wait_time(0.8); save_timer->set_one_shot(true); - save_timer->connect("timeout", this, "_save"); + save_timer->connect_compat("timeout", this, "_save"); block_save = false; singleton = this; diff --git a/editor/editor_export.h b/editor/editor_export.h index 19651b2c62..139d672cb8 100644 --- a/editor/editor_export.h +++ b/editor/editor_export.h @@ -188,7 +188,7 @@ private: struct FeatureContainers { Set<String> features; - PoolVector<String> features_pv; + Vector<String> features_pv; }; void _export_find_resources(EditorFileSystemDirectory *p_dir, Set<String> &p_paths); @@ -310,8 +310,8 @@ class EditorExportPlugin : public Reference { ios_cpp_code = ""; } - void _export_file_script(const String &p_path, const String &p_type, const PoolVector<String> &p_features); - void _export_begin_script(const PoolVector<String> &p_features, bool p_debug, const String &p_path, int p_flags); + 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: diff --git a/editor/editor_feature_profile.cpp b/editor/editor_feature_profile.cpp index 559a0ef0ea..32fadfc60e 100644 --- a/editor/editor_feature_profile.cpp +++ b/editor/editor_feature_profile.cpp @@ -534,7 +534,7 @@ void EditorFeatureProfileManager::_class_list_item_selected() { } Variant md = item->get_metadata(0); - if (md.get_type() != Variant::STRING) { + if (md.get_type() != Variant::STRING && md.get_type() != Variant::STRING_NAME) { return; } @@ -598,7 +598,7 @@ void EditorFeatureProfileManager::_class_list_item_edited() { bool checked = item->is_checked(0); Variant md = item->get_metadata(0); - if (md.get_type() == Variant::STRING) { + if (md.get_type() == Variant::STRING || md.get_type() == Variant::STRING_NAME) { String class_selected = md; edited->set_disable_class(class_selected, !checked); _save_and_update(); @@ -620,7 +620,7 @@ void EditorFeatureProfileManager::_property_item_edited() { } Variant md = class_item->get_metadata(0); - if (md.get_type() != Variant::STRING) { + if (md.get_type() != Variant::STRING && md.get_type() != Variant::STRING_NAME) { return; } @@ -633,7 +633,7 @@ void EditorFeatureProfileManager::_property_item_edited() { bool checked = item->is_checked(0); md = item->get_metadata(0); - if (md.get_type() == Variant::STRING) { + if (md.get_type() == Variant::STRING || md.get_type() == Variant::STRING_NAME) { String property_selected = md; edited->set_disable_class_property(class_name, property_selected, !checked); _save_and_update(); @@ -657,7 +657,7 @@ void EditorFeatureProfileManager::_update_selected_profile() { if (class_list->get_selected()) { Variant md = class_list->get_selected()->get_metadata(0); - if (md.get_type() == Variant::STRING) { + if (md.get_type() == Variant::STRING || md.get_type() == Variant::STRING_NAME) { class_selected = md; } else if (md.get_type() == Variant::INT) { feature_selected = md; @@ -819,7 +819,7 @@ EditorFeatureProfileManager::EditorFeatureProfileManager() { profile_actions[PROFILE_CLEAR] = memnew(Button(TTR("Unset"))); name_hbc->add_child(profile_actions[PROFILE_CLEAR]); profile_actions[PROFILE_CLEAR]->set_disabled(true); - profile_actions[PROFILE_CLEAR]->connect("pressed", this, "_profile_action", varray(PROFILE_CLEAR)); + profile_actions[PROFILE_CLEAR]->connect_compat("pressed", this, "_profile_action", varray(PROFILE_CLEAR)); main_vbc->add_margin_child(TTR("Current Profile:"), name_hbc); @@ -827,34 +827,34 @@ EditorFeatureProfileManager::EditorFeatureProfileManager() { profile_list = memnew(OptionButton); profile_list->set_h_size_flags(SIZE_EXPAND_FILL); profiles_hbc->add_child(profile_list); - profile_list->connect("item_selected", this, "_profile_selected"); + profile_list->connect_compat("item_selected", this, "_profile_selected"); profile_actions[PROFILE_SET] = memnew(Button(TTR("Make Current"))); profiles_hbc->add_child(profile_actions[PROFILE_SET]); profile_actions[PROFILE_SET]->set_disabled(true); - profile_actions[PROFILE_SET]->connect("pressed", this, "_profile_action", varray(PROFILE_SET)); + profile_actions[PROFILE_SET]->connect_compat("pressed", this, "_profile_action", varray(PROFILE_SET)); profile_actions[PROFILE_ERASE] = memnew(Button(TTR("Remove"))); profiles_hbc->add_child(profile_actions[PROFILE_ERASE]); profile_actions[PROFILE_ERASE]->set_disabled(true); - profile_actions[PROFILE_ERASE]->connect("pressed", this, "_profile_action", varray(PROFILE_ERASE)); + profile_actions[PROFILE_ERASE]->connect_compat("pressed", this, "_profile_action", varray(PROFILE_ERASE)); profiles_hbc->add_child(memnew(VSeparator)); profile_actions[PROFILE_NEW] = memnew(Button(TTR("New"))); profiles_hbc->add_child(profile_actions[PROFILE_NEW]); - profile_actions[PROFILE_NEW]->connect("pressed", this, "_profile_action", varray(PROFILE_NEW)); + profile_actions[PROFILE_NEW]->connect_compat("pressed", this, "_profile_action", varray(PROFILE_NEW)); profiles_hbc->add_child(memnew(VSeparator)); profile_actions[PROFILE_IMPORT] = memnew(Button(TTR("Import"))); profiles_hbc->add_child(profile_actions[PROFILE_IMPORT]); - profile_actions[PROFILE_IMPORT]->connect("pressed", this, "_profile_action", varray(PROFILE_IMPORT)); + profile_actions[PROFILE_IMPORT]->connect_compat("pressed", this, "_profile_action", varray(PROFILE_IMPORT)); profile_actions[PROFILE_EXPORT] = memnew(Button(TTR("Export"))); profiles_hbc->add_child(profile_actions[PROFILE_EXPORT]); profile_actions[PROFILE_EXPORT]->set_disabled(true); - profile_actions[PROFILE_EXPORT]->connect("pressed", this, "_profile_action", varray(PROFILE_EXPORT)); + profile_actions[PROFILE_EXPORT]->connect_compat("pressed", this, "_profile_action", varray(PROFILE_EXPORT)); main_vbc->add_margin_child(TTR("Available Profiles:"), profiles_hbc); @@ -870,8 +870,8 @@ EditorFeatureProfileManager::EditorFeatureProfileManager() { class_list_vbc->add_margin_child(TTR("Enabled Classes:"), class_list, true); class_list->set_hide_root(true); class_list->set_edit_checkbox_cell_only_when_checkbox_is_pressed(true); - class_list->connect("cell_selected", this, "_class_list_item_selected"); - class_list->connect("item_edited", this, "_class_list_item_edited", varray(), CONNECT_DEFERRED); + class_list->connect_compat("cell_selected", this, "_class_list_item_selected"); + class_list->connect_compat("item_edited", this, "_class_list_item_edited", varray(), CONNECT_DEFERRED); VBoxContainer *property_list_vbc = memnew(VBoxContainer); h_split->add_child(property_list_vbc); @@ -882,7 +882,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", this, "_property_item_edited", varray(), CONNECT_DEFERRED); + property_list->connect_compat("item_edited", this, "_property_item_edited", varray(), CONNECT_DEFERRED); new_profile_dialog = memnew(ConfirmationDialog); new_profile_dialog->set_title(TTR("New profile name:")); @@ -890,20 +890,20 @@ EditorFeatureProfileManager::EditorFeatureProfileManager() { new_profile_dialog->add_child(new_profile_name); new_profile_name->set_custom_minimum_size(Size2(300 * EDSCALE, 1)); add_child(new_profile_dialog); - new_profile_dialog->connect("confirmed", this, "_create_new_profile"); + new_profile_dialog->connect_compat("confirmed", this, "_create_new_profile"); new_profile_dialog->register_text_enter(new_profile_name); new_profile_dialog->get_ok()->set_text(TTR("Create")); erase_profile_dialog = memnew(ConfirmationDialog); add_child(erase_profile_dialog); erase_profile_dialog->set_title(TTR("Erase Profile")); - erase_profile_dialog->connect("confirmed", this, "_erase_selected_profile"); + erase_profile_dialog->connect_compat("confirmed", this, "_erase_selected_profile"); import_profiles = memnew(EditorFileDialog); add_child(import_profiles); import_profiles->set_mode(EditorFileDialog::MODE_OPEN_FILES); import_profiles->add_filter("*.profile; " + TTR("Godot Feature Profile")); - import_profiles->connect("files_selected", this, "_import_profiles"); + import_profiles->connect_compat("files_selected", this, "_import_profiles"); import_profiles->set_title(TTR("Import Profile(s)")); import_profiles->set_access(EditorFileDialog::ACCESS_FILESYSTEM); @@ -911,7 +911,7 @@ EditorFeatureProfileManager::EditorFeatureProfileManager() { add_child(export_profile); export_profile->set_mode(EditorFileDialog::MODE_SAVE_FILE); export_profile->add_filter("*.profile; " + TTR("Godot Feature Profile")); - export_profile->connect("file_selected", this, "_export_profile"); + export_profile->connect_compat("file_selected", this, "_export_profile"); export_profile->set_title(TTR("Export Profile")); export_profile->set_access(EditorFileDialog::ACCESS_FILESYSTEM); @@ -921,7 +921,7 @@ EditorFeatureProfileManager::EditorFeatureProfileManager() { update_timer = memnew(Timer); update_timer->set_wait_time(1); //wait a second before updating editor add_child(update_timer); - update_timer->connect("timeout", this, "_emit_current_profile_changed"); + update_timer->connect_compat("timeout", this, "_emit_current_profile_changed"); update_timer->set_one_shot(true); updating_features = false; diff --git a/editor/editor_file_dialog.cpp b/editor/editor_file_dialog.cpp index c869768c6c..dd6523e12c 100644 --- a/editor/editor_file_dialog.cpp +++ b/editor/editor_file_dialog.cpp @@ -347,7 +347,7 @@ void EditorFileDialog::_action_pressed() { String fbase = dir_access->get_current_dir(); - PoolVector<String> files; + Vector<String> files; for (int i = 0; i < item_list->get_item_count(); i++) { if (item_list->is_selected(i)) files.push_back(fbase.plus_file(item_list->get_item_text(i))); @@ -1419,7 +1419,7 @@ void EditorFileDialog::_bind_methods() { ClassDB::bind_method(D_METHOD("invalidate"), &EditorFileDialog::invalidate); ADD_SIGNAL(MethodInfo("file_selected", PropertyInfo(Variant::STRING, "path"))); - ADD_SIGNAL(MethodInfo("files_selected", PropertyInfo(Variant::POOL_STRING_ARRAY, "paths"))); + ADD_SIGNAL(MethodInfo("files_selected", PropertyInfo(Variant::PACKED_STRING_ARRAY, "paths"))); ADD_SIGNAL(MethodInfo("dir_selected", PropertyInfo(Variant::STRING, "dir"))); ADD_PROPERTY(PropertyInfo(Variant::INT, "access", PROPERTY_HINT_ENUM, "Resources,User data,File system"), "set_access", "get_access"); @@ -1537,9 +1537,9 @@ EditorFileDialog::EditorFileDialog() { pathhb->add_child(dir_next); pathhb->add_child(dir_up); - dir_prev->connect("pressed", this, "_go_back"); - dir_next->connect("pressed", this, "_go_forward"); - dir_up->connect("pressed", this, "_go_up"); + dir_prev->connect_compat("pressed", this, "_go_back"); + dir_next->connect_compat("pressed", this, "_go_forward"); + dir_up->connect_compat("pressed", this, "_go_up"); pathhb->add_child(memnew(Label(TTR("Path:")))); @@ -1549,20 +1549,20 @@ EditorFileDialog::EditorFileDialog() { refresh = memnew(ToolButton); refresh->set_tooltip(TTR("Refresh files.")); - refresh->connect("pressed", this, "_update_file_list"); + refresh->connect_compat("pressed", this, "_update_file_list"); pathhb->add_child(refresh); favorite = memnew(ToolButton); favorite->set_toggle_mode(true); favorite->set_tooltip(TTR("(Un)favorite current folder.")); - favorite->connect("pressed", this, "_favorite_pressed"); + favorite->connect_compat("pressed", this, "_favorite_pressed"); pathhb->add_child(favorite); show_hidden = memnew(ToolButton); show_hidden->set_toggle_mode(true); show_hidden->set_pressed(is_showing_hidden_files()); show_hidden->set_tooltip(TTR("Toggle the visibility of hidden files.")); - show_hidden->connect("toggled", this, "set_show_hidden_files"); + show_hidden->connect_compat("toggled", this, "set_show_hidden_files"); pathhb->add_child(show_hidden); pathhb->add_child(memnew(VSeparator)); @@ -1571,7 +1571,7 @@ EditorFileDialog::EditorFileDialog() { view_mode_group.instance(); mode_thumbnails = memnew(ToolButton); - mode_thumbnails->connect("pressed", this, "set_display_mode", varray(DISPLAY_THUMBNAILS)); + mode_thumbnails->connect_compat("pressed", this, "set_display_mode", varray(DISPLAY_THUMBNAILS)); mode_thumbnails->set_toggle_mode(true); mode_thumbnails->set_pressed(display_mode == DISPLAY_THUMBNAILS); mode_thumbnails->set_button_group(view_mode_group); @@ -1579,7 +1579,7 @@ EditorFileDialog::EditorFileDialog() { pathhb->add_child(mode_thumbnails); mode_list = memnew(ToolButton); - mode_list->connect("pressed", this, "set_display_mode", varray(DISPLAY_LIST)); + mode_list->connect_compat("pressed", this, "set_display_mode", varray(DISPLAY_LIST)); mode_list->set_toggle_mode(true); mode_list->set_pressed(display_mode == DISPLAY_LIST); mode_list->set_button_group(view_mode_group); @@ -1588,11 +1588,11 @@ EditorFileDialog::EditorFileDialog() { drives = memnew(OptionButton); pathhb->add_child(drives); - drives->connect("item_selected", this, "_select_drive"); + drives->connect_compat("item_selected", this, "_select_drive"); makedir = memnew(Button); makedir->set_text(TTR("Create Folder")); - makedir->connect("pressed", this, "_make_dir"); + makedir->connect_compat("pressed", this, "_make_dir"); pathhb->add_child(makedir); list_hb = memnew(HSplitContainer); @@ -1614,15 +1614,15 @@ EditorFileDialog::EditorFileDialog() { fav_hb->add_spacer(); fav_up = memnew(ToolButton); fav_hb->add_child(fav_up); - fav_up->connect("pressed", this, "_favorite_move_up"); + fav_up->connect_compat("pressed", this, "_favorite_move_up"); fav_down = memnew(ToolButton); fav_hb->add_child(fav_down); - fav_down->connect("pressed", this, "_favorite_move_down"); + fav_down->connect_compat("pressed", this, "_favorite_move_down"); favorites = memnew(ItemList); fav_vb->add_child(favorites); favorites->set_v_size_flags(SIZE_EXPAND_FILL); - favorites->connect("item_selected", this, "_favorite_selected"); + favorites->connect_compat("item_selected", this, "_favorite_selected"); VBoxContainer *rec_vb = memnew(VBoxContainer); vsc->add_child(rec_vb); @@ -1631,7 +1631,7 @@ EditorFileDialog::EditorFileDialog() { recent = memnew(ItemList); recent->set_allow_reselect(true); rec_vb->add_margin_child(TTR("Recent:"), recent, true); - recent->connect("item_selected", this, "_recent_selected"); + recent->connect_compat("item_selected", this, "_recent_selected"); VBoxContainer *item_vb = memnew(VBoxContainer); list_hb->add_child(item_vb); @@ -1650,13 +1650,13 @@ EditorFileDialog::EditorFileDialog() { item_list = memnew(ItemList); item_list->set_v_size_flags(SIZE_EXPAND_FILL); - item_list->connect("item_rmb_selected", this, "_item_list_item_rmb_selected"); - item_list->connect("rmb_clicked", this, "_item_list_rmb_clicked"); + item_list->connect_compat("item_rmb_selected", this, "_item_list_item_rmb_selected"); + item_list->connect_compat("rmb_clicked", this, "_item_list_rmb_clicked"); item_list->set_allow_rmb_select(true); list_vb->add_child(item_list); item_menu = memnew(PopupMenu); - item_menu->connect("id_pressed", this, "_item_menu_id_pressed"); + item_menu->connect_compat("id_pressed", this, "_item_menu_id_pressed"); add_child(item_menu); // Other stuff. @@ -1687,19 +1687,19 @@ EditorFileDialog::EditorFileDialog() { access = ACCESS_RESOURCES; _update_drives(); - connect("confirmed", this, "_action_pressed"); - item_list->connect("item_selected", this, "_item_selected", varray(), CONNECT_DEFERRED); - item_list->connect("multi_selected", this, "_multi_selected", varray(), CONNECT_DEFERRED); - item_list->connect("item_activated", this, "_item_db_selected", varray()); - item_list->connect("nothing_selected", this, "_items_clear_selection"); - dir->connect("text_entered", this, "_dir_entered"); - file->connect("text_entered", this, "_file_entered"); - filter->connect("item_selected", this, "_filter_selected"); + connect_compat("confirmed", this, "_action_pressed"); + item_list->connect_compat("item_selected", this, "_item_selected", varray(), CONNECT_DEFERRED); + item_list->connect_compat("multi_selected", this, "_multi_selected", varray(), CONNECT_DEFERRED); + item_list->connect_compat("item_activated", this, "_item_db_selected", varray()); + item_list->connect_compat("nothing_selected", this, "_items_clear_selection"); + dir->connect_compat("text_entered", this, "_dir_entered"); + file->connect_compat("text_entered", this, "_file_entered"); + filter->connect_compat("item_selected", this, "_filter_selected"); confirm_save = memnew(ConfirmationDialog); confirm_save->set_as_toplevel(true); add_child(confirm_save); - confirm_save->connect("confirmed", this, "_save_confirm_pressed"); + confirm_save->connect_compat("confirmed", this, "_save_confirm_pressed"); remove_dialog = memnew(DependencyRemoveDialog); add_child(remove_dialog); @@ -1713,7 +1713,7 @@ EditorFileDialog::EditorFileDialog() { makevb->add_margin_child(TTR("Name:"), makedirname); add_child(makedialog); makedialog->register_text_enter(makedirname); - makedialog->connect("confirmed", this, "_make_dir_confirm"); + makedialog->connect_compat("confirmed", this, "_make_dir_confirm"); mkdirerr = memnew(AcceptDialog); mkdirerr->set_text(TTR("Could not create folder.")); add_child(mkdirerr); @@ -1777,10 +1777,10 @@ EditorLineEditFileChooser::EditorLineEditFileChooser() { line_edit->set_h_size_flags(SIZE_EXPAND_FILL); button = memnew(Button); add_child(button); - button->connect("pressed", this, "_browse"); + button->connect_compat("pressed", this, "_browse"); dialog = memnew(EditorFileDialog); add_child(dialog); - dialog->connect("file_selected", this, "_chosen"); - dialog->connect("dir_selected", this, "_chosen"); - dialog->connect("files_selected", this, "_chosen"); + dialog->connect_compat("file_selected", this, "_chosen"); + dialog->connect_compat("dir_selected", this, "_chosen"); + dialog->connect_compat("files_selected", this, "_chosen"); } diff --git a/editor/editor_file_system.cpp b/editor/editor_file_system.cpp index 107ecac3b0..b5ec08ef60 100644 --- a/editor/editor_file_system.cpp +++ b/editor/editor_file_system.cpp @@ -2100,8 +2100,8 @@ void EditorFileSystem::_bind_methods() { ADD_SIGNAL(MethodInfo("filesystem_changed")); ADD_SIGNAL(MethodInfo("sources_changed", PropertyInfo(Variant::BOOL, "exist"))); - ADD_SIGNAL(MethodInfo("resources_reimported", PropertyInfo(Variant::POOL_STRING_ARRAY, "resources"))); - ADD_SIGNAL(MethodInfo("resources_reload", PropertyInfo(Variant::POOL_STRING_ARRAY, "resources"))); + ADD_SIGNAL(MethodInfo("resources_reimported", PropertyInfo(Variant::PACKED_STRING_ARRAY, "resources"))); + ADD_SIGNAL(MethodInfo("resources_reload", PropertyInfo(Variant::PACKED_STRING_ARRAY, "resources"))); } void EditorFileSystem::_update_extensions() { diff --git a/editor/editor_folding.cpp b/editor/editor_folding.cpp index 475f16f12f..8308cd760b 100644 --- a/editor/editor_folding.cpp +++ b/editor/editor_folding.cpp @@ -34,12 +34,12 @@ #include "editor_inspector.h" #include "editor_settings.h" -PoolVector<String> EditorFolding::_get_unfolds(const Object *p_object) { +Vector<String> EditorFolding::_get_unfolds(const Object *p_object) { - PoolVector<String> sections; + Vector<String> sections; sections.resize(p_object->editor_get_section_folding().size()); if (sections.size()) { - PoolVector<String>::Write w = sections.write(); + String *w = sections.ptrw(); int idx = 0; for (const Set<String>::Element *E = p_object->editor_get_section_folding().front(); E; E = E->next()) { w[idx++] = E->get(); @@ -52,7 +52,7 @@ PoolVector<String> EditorFolding::_get_unfolds(const Object *p_object) { void EditorFolding::save_resource_folding(const RES &p_resource, const String &p_path) { Ref<ConfigFile> config; config.instance(); - PoolVector<String> unfolds = _get_unfolds(p_resource.ptr()); + Vector<String> unfolds = _get_unfolds(p_resource.ptr()); config->set_value("folding", "sections_unfolded", unfolds); String file = p_path.get_file() + "-folding-" + p_path.md5_text() + ".cfg"; @@ -60,10 +60,10 @@ void EditorFolding::save_resource_folding(const RES &p_resource, const String &p config->save(file); } -void EditorFolding::_set_unfolds(Object *p_object, const PoolVector<String> &p_unfolds) { +void EditorFolding::_set_unfolds(Object *p_object, const Vector<String> &p_unfolds) { int uc = p_unfolds.size(); - PoolVector<String>::Read r = p_unfolds.read(); + const String *r = p_unfolds.ptr(); p_object->editor_clear_section_folding(); for (int i = 0; i < uc; i++) { p_object->editor_set_section_unfold(r[i], true); @@ -82,7 +82,7 @@ void EditorFolding::load_resource_folding(RES p_resource, const String &p_path) return; } - PoolVector<String> unfolds; + Vector<String> unfolds; if (config->has_section_key("folding", "sections_unfolded")) { unfolds = config->get_value("folding", "sections_unfolded"); @@ -103,7 +103,7 @@ void EditorFolding::_fill_folds(const Node *p_root, const Node *p_node, Array &p if (p_node->is_displayed_folded()) { nodes_folded.push_back(p_root->get_path_to(p_node)); } - PoolVector<String> unfolds = _get_unfolds(p_node); + Vector<String> unfolds = _get_unfolds(p_node); if (unfolds.size()) { p_folds.push_back(p_root->get_path_to(p_node)); @@ -118,7 +118,7 @@ void EditorFolding::_fill_folds(const Node *p_root, const Node *p_node, Array &p RES res = p_node->get(E->get().name); if (res.is_valid() && !resources.has(res) && res->get_path() != String() && !res->get_path().is_resource_file()) { - PoolVector<String> res_unfolds = _get_unfolds(res.ptr()); + Vector<String> res_unfolds = _get_unfolds(res.ptr()); resource_folds.push_back(res->get_path()); resource_folds.push_back(res_unfolds); resources.insert(res); @@ -184,7 +184,7 @@ void EditorFolding::load_scene_folding(Node *p_scene, const String &p_path) { for (int i = 0; i < unfolds.size(); i += 2) { NodePath path2 = unfolds[i]; - PoolVector<String> un = unfolds[i + 1]; + Vector<String> un = unfolds[i + 1]; Node *node = p_scene->get_node_or_null(path2); if (!node) { continue; @@ -202,7 +202,7 @@ void EditorFolding::load_scene_folding(Node *p_scene, const String &p_path) { continue; } - PoolVector<String> unfolds2 = res_unfolds[i + 1]; + Vector<String> unfolds2 = res_unfolds[i + 1]; _set_unfolds(res.ptr(), unfolds2); } diff --git a/editor/editor_folding.h b/editor/editor_folding.h index cc49b062d0..5220907fe7 100644 --- a/editor/editor_folding.h +++ b/editor/editor_folding.h @@ -35,8 +35,8 @@ class EditorFolding { - PoolVector<String> _get_unfolds(const Object *p_object); - void _set_unfolds(Object *p_object, const PoolVector<String> &p_unfolds); + Vector<String> _get_unfolds(const Object *p_object); + void _set_unfolds(Object *p_object, const Vector<String> &p_unfolds); void _fill_folds(const Node *p_root, const Node *p_node, Array &p_folds, Array &resource_folds, Array &nodes_folded, Set<RES> &resources); diff --git a/editor/editor_help.cpp b/editor/editor_help.cpp index 22a16ac65a..9c64540a9e 100644 --- a/editor/editor_help.cpp +++ b/editor/editor_help.cpp @@ -50,7 +50,7 @@ void EditorHelp::_init_colors() { text_color = get_color("default_color", "RichTextLabel"); headline_color = get_color("headline_color", "EditorHelp"); base_type_color = title_color.linear_interpolate(text_color, 0.5); - comment_color = text_color * Color(1, 1, 1, 0.4); + comment_color = text_color * Color(1, 1, 1, 0.6); symbol_color = comment_color; value_color = text_color * Color(1, 1, 1, 0.6); qualifier_color = text_color * Color(1, 1, 1, 0.8); @@ -1551,9 +1551,9 @@ EditorHelp::EditorHelp() { class_desc->set_v_size_flags(SIZE_EXPAND_FILL); class_desc->add_color_override("selection_color", get_color("accent_color", "Editor") * Color(1, 1, 1, 0.4)); - class_desc->connect("meta_clicked", this, "_class_desc_select"); - class_desc->connect("gui_input", this, "_class_desc_input"); - class_desc->connect("resized", this, "_class_desc_resized"); + class_desc->connect_compat("meta_clicked", this, "_class_desc_select"); + class_desc->connect_compat("gui_input", this, "_class_desc_input"); + class_desc->connect_compat("resized", this, "_class_desc_resized"); _class_desc_resized(); // Added second so it opens at the bottom so it won't offset the entire widget. @@ -1633,7 +1633,7 @@ EditorHelpBit::EditorHelpBit() { rich_text = memnew(RichTextLabel); add_child(rich_text); - rich_text->connect("meta_clicked", this, "_meta_clicked"); + rich_text->connect_compat("meta_clicked", this, "_meta_clicked"); rich_text->add_color_override("selection_color", get_color("accent_color", "Editor") * Color(1, 1, 1, 0.4)); rich_text->set_override_selected_font_color(false); set_custom_minimum_size(Size2(0, 70 * EDSCALE)); @@ -1645,8 +1645,8 @@ FindBar::FindBar() { add_child(search_text); search_text->set_custom_minimum_size(Size2(100 * EDSCALE, 0)); search_text->set_h_size_flags(SIZE_EXPAND_FILL); - search_text->connect("text_changed", this, "_search_text_changed"); - search_text->connect("text_entered", this, "_search_text_entered"); + search_text->connect_compat("text_changed", this, "_search_text_changed"); + search_text->connect_compat("text_entered", this, "_search_text_entered"); matches_label = memnew(Label); add_child(matches_label); @@ -1655,12 +1655,12 @@ FindBar::FindBar() { find_prev = memnew(ToolButton); add_child(find_prev); find_prev->set_focus_mode(FOCUS_NONE); - find_prev->connect("pressed", this, "_search_prev"); + find_prev->connect_compat("pressed", this, "_search_prev"); find_next = memnew(ToolButton); add_child(find_next); find_next->set_focus_mode(FOCUS_NONE); - find_next->connect("pressed", this, "_search_next"); + find_next->connect_compat("pressed", this, "_search_next"); Control *space = memnew(Control); add_child(space); @@ -1671,7 +1671,7 @@ FindBar::FindBar() { hide_button->set_focus_mode(FOCUS_NONE); hide_button->set_expand(true); hide_button->set_stretch_mode(TextureButton::STRETCH_KEEP_CENTERED); - hide_button->connect("pressed", this, "_hide_pressed"); + hide_button->connect_compat("pressed", this, "_hide_pressed"); } void FindBar::popup_search() { diff --git a/editor/editor_help_search.cpp b/editor/editor_help_search.cpp index d45b66afce..8bad46e4d0 100644 --- a/editor/editor_help_search.cpp +++ b/editor/editor_help_search.cpp @@ -111,7 +111,7 @@ void EditorHelpSearch::_notification(int p_what) { } break; case NOTIFICATION_ENTER_TREE: { - connect("confirmed", this, "_confirmed"); + connect_compat("confirmed", this, "_confirmed"); _update_icons(); } break; case NOTIFICATION_POPUP_HIDE: { @@ -206,21 +206,21 @@ EditorHelpSearch::EditorHelpSearch() { search_box = memnew(LineEdit); search_box->set_custom_minimum_size(Size2(200, 0) * EDSCALE); search_box->set_h_size_flags(SIZE_EXPAND_FILL); - search_box->connect("gui_input", this, "_search_box_gui_input"); - search_box->connect("text_changed", this, "_search_box_text_changed"); + search_box->connect_compat("gui_input", this, "_search_box_gui_input"); + search_box->connect_compat("text_changed", this, "_search_box_text_changed"); register_text_enter(search_box); hbox->add_child(search_box); case_sensitive_button = memnew(ToolButton); case_sensitive_button->set_tooltip(TTR("Case Sensitive")); - case_sensitive_button->connect("pressed", this, "_update_results"); + case_sensitive_button->connect_compat("pressed", this, "_update_results"); case_sensitive_button->set_toggle_mode(true); case_sensitive_button->set_focus_mode(FOCUS_NONE); hbox->add_child(case_sensitive_button); hierarchy_button = memnew(ToolButton); hierarchy_button->set_tooltip(TTR("Show Hierarchy")); - hierarchy_button->connect("pressed", this, "_update_results"); + hierarchy_button->connect_compat("pressed", this, "_update_results"); hierarchy_button->set_toggle_mode(true); hierarchy_button->set_pressed(true); hierarchy_button->set_focus_mode(FOCUS_NONE); @@ -237,7 +237,7 @@ EditorHelpSearch::EditorHelpSearch() { filter_combo->add_item(TTR("Constants Only"), SEARCH_CONSTANTS); filter_combo->add_item(TTR("Properties Only"), SEARCH_PROPERTIES); filter_combo->add_item(TTR("Theme Properties Only"), SEARCH_THEME_ITEMS); - filter_combo->connect("item_selected", this, "_filter_combo_item_selected"); + filter_combo->connect_compat("item_selected", this, "_filter_combo_item_selected"); hbox->add_child(filter_combo); // Create the results tree. @@ -251,8 +251,8 @@ EditorHelpSearch::EditorHelpSearch() { results_tree->set_custom_minimum_size(Size2(0, 100) * EDSCALE); results_tree->set_hide_root(true); results_tree->set_select_mode(Tree::SELECT_ROW); - results_tree->connect("item_activated", this, "_confirmed"); - results_tree->connect("item_selected", get_ok(), "set_disabled", varray(false)); + results_tree->connect_compat("item_activated", this, "_confirmed"); + results_tree->connect_compat("item_selected", get_ok(), "set_disabled", varray(false)); vbox->add_child(results_tree, true); } diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp index 6d2b891dc6..adf6a42f53 100644 --- a/editor/editor_inspector.cpp +++ b/editor/editor_inspector.cpp @@ -430,7 +430,7 @@ bool EditorPropertyRevert::is_node_property_different(Node *p_node, const Varian return false; //pointless to check if we are not comparing against anything. } - if (p_current.get_type() == Variant::REAL && p_orig.get_type() == Variant::REAL) { + if (p_current.get_type() == Variant::FLOAT && p_orig.get_type() == Variant::FLOAT) { float a = p_current; float b = p_orig; @@ -570,7 +570,7 @@ void EditorProperty::_focusable_focused(int p_index) { void EditorProperty::add_focusable(Control *p_control) { - p_control->connect("focus_entered", this, "_focusable_focused", varray(focusables.size())); + p_control->connect_compat("focus_entered", this, "_focusable_focused", varray(focusables.size())); focusables.push_back(p_control); } @@ -778,10 +778,20 @@ Control *EditorProperty::make_custom_tooltip(const String &p_text) const { help_bit->add_style_override("panel", get_stylebox("panel", "TooltipPanel")); help_bit->get_rich_text()->set_fixed_size_to_width(360 * EDSCALE); - String text = TTR("Property:") + " [u][b]" + p_text.get_slice("::", 0) + "[/b][/u]\n"; - text += p_text.get_slice("::", 1).strip_edges(); - help_bit->set_text(text); - help_bit->call_deferred("set_text", text); //hack so it uses proper theme once inside scene + PackedStringArray slices = p_text.split("::", false); + if (!slices.empty()) { + String property_name = slices[0].strip_edges(); + String text = TTR("Property:") + " [u][b]" + property_name + "[/b][/u]"; + + if (slices.size() > 1) { + String property_doc = slices[1].strip_edges(); + if (property_name != property_doc) { + text += "\n" + property_doc; + } + } + help_bit->call_deferred("set_text", text); //hack so it uses proper theme once inside scene + } + return help_bit; } @@ -828,13 +838,13 @@ void EditorProperty::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::BOOL, "checked"), "set_checked", "is_checked"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "draw_red"), "set_draw_red", "is_draw_red"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "keying"), "set_keying", "is_keying"); - ADD_SIGNAL(MethodInfo("property_changed", PropertyInfo(Variant::STRING, "property"), PropertyInfo(Variant::NIL, "value", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NIL_IS_VARIANT))); - ADD_SIGNAL(MethodInfo("multiple_properties_changed", PropertyInfo(Variant::POOL_STRING_ARRAY, "properties"), PropertyInfo(Variant::ARRAY, "value"))); - ADD_SIGNAL(MethodInfo("property_keyed", PropertyInfo(Variant::STRING, "property"))); - ADD_SIGNAL(MethodInfo("property_keyed_with_value", PropertyInfo(Variant::STRING, "property"), PropertyInfo(Variant::NIL, "value", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NIL_IS_VARIANT))); - ADD_SIGNAL(MethodInfo("property_checked", PropertyInfo(Variant::STRING, "property"), PropertyInfo(Variant::STRING, "bool"))); + ADD_SIGNAL(MethodInfo("property_changed", PropertyInfo(Variant::STRING_NAME, "property"), PropertyInfo(Variant::NIL, "value", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NIL_IS_VARIANT))); + ADD_SIGNAL(MethodInfo("multiple_properties_changed", PropertyInfo(Variant::PACKED_STRING_ARRAY, "properties"), PropertyInfo(Variant::ARRAY, "value"))); + ADD_SIGNAL(MethodInfo("property_keyed", PropertyInfo(Variant::STRING_NAME, "property"))); + 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::STRING, "bool"))); 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, "property"), PropertyInfo(Variant::INT, "id"))); + ADD_SIGNAL(MethodInfo("object_id_selected", PropertyInfo(Variant::STRING_NAME, "property"), PropertyInfo(Variant::INT, "id"))); ADD_SIGNAL(MethodInfo("selected", PropertyInfo(Variant::STRING, "path"), PropertyInfo(Variant::INT, "focusable_idx"))); MethodInfo vm; @@ -925,7 +935,7 @@ bool EditorInspectorPlugin::parse_property(Object *p_object, Variant::Type p_typ &arg[0], &arg[1], &arg[2], &arg[3], &arg[4], &arg[5] }; - Variant::CallError err; + Callable::CallError err; return get_script_instance()->call("parse_property", (const Variant **)&argptr, 6, err); } return false; @@ -1005,10 +1015,20 @@ Control *EditorInspectorCategory::make_custom_tooltip(const String &p_text) cons help_bit->add_style_override("panel", get_stylebox("panel", "TooltipPanel")); help_bit->get_rich_text()->set_fixed_size_to_width(360 * EDSCALE); - String text = "[u][b]" + p_text.get_slice("::", 0) + "[/b][/u]\n"; - text += p_text.get_slice("::", 1).strip_edges(); - help_bit->set_text(text); - help_bit->call_deferred("set_text", text); //hack so it uses proper theme once inside scene + PackedStringArray slices = p_text.split("::", false); + if (!slices.empty()) { + String property_name = slices[0].strip_edges(); + String text = "[u][b]" + property_name + "[/b][/u]"; + + if (slices.size() > 1) { + String property_doc = slices[1].strip_edges(); + if (property_name != property_doc) { + text += "\n" + property_doc; + } + } + help_bit->call_deferred("set_text", text); //hack so it uses proper theme once inside scene + } + return help_bit; } @@ -1339,14 +1359,14 @@ void EditorInspector::_parse_added_editors(VBoxContainer *current_vbox, Ref<Edit if (ep) { ep->object = object; - ep->connect("property_changed", this, "_property_changed"); - ep->connect("property_keyed", this, "_property_keyed"); - ep->connect("property_keyed_with_value", this, "_property_keyed_with_value"); - ep->connect("property_checked", this, "_property_checked"); - ep->connect("selected", this, "_property_selected"); - ep->connect("multiple_properties_changed", this, "_multiple_properties_changed"); - ep->connect("resource_selected", this, "_resource_selected", varray(), CONNECT_DEFERRED); - ep->connect("object_id_selected", this, "_object_id_selected", varray(), CONNECT_DEFERRED); + ep->connect_compat("property_changed", this, "_property_changed"); + ep->connect_compat("property_keyed", this, "_property_keyed"); + ep->connect_compat("property_keyed_with_value", this, "_property_keyed_with_value"); + ep->connect_compat("property_checked", this, "_property_checked"); + ep->connect_compat("selected", this, "_property_selected"); + ep->connect_compat("multiple_properties_changed", this, "_multiple_properties_changed"); + ep->connect_compat("resource_selected", this, "_resource_selected", varray(), CONNECT_DEFERRED); + ep->connect_compat("object_id_selected", this, "_object_id_selected", varray(), CONNECT_DEFERRED); if (F->get().properties.size()) { @@ -1751,17 +1771,17 @@ void EditorInspector::update_tree() { if (ep) { - ep->connect("property_changed", this, "_property_changed"); + ep->connect_compat("property_changed", this, "_property_changed"); if (p.usage & PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED) { - ep->connect("property_changed", this, "_property_changed_update_all", varray(), CONNECT_DEFERRED); + ep->connect_compat("property_changed", this, "_property_changed_update_all", varray(), CONNECT_DEFERRED); } - ep->connect("property_keyed", this, "_property_keyed"); - ep->connect("property_keyed_with_value", this, "_property_keyed_with_value"); - ep->connect("property_checked", this, "_property_checked"); - ep->connect("selected", this, "_property_selected"); - ep->connect("multiple_properties_changed", this, "_multiple_properties_changed"); - ep->connect("resource_selected", this, "_resource_selected", varray(), CONNECT_DEFERRED); - ep->connect("object_id_selected", this, "_object_id_selected", varray(), CONNECT_DEFERRED); + ep->connect_compat("property_keyed", this, "_property_keyed"); + ep->connect_compat("property_keyed_with_value", this, "_property_keyed_with_value"); + ep->connect_compat("property_checked", this, "_property_checked"); + ep->connect_compat("selected", this, "_property_selected"); + ep->connect_compat("multiple_properties_changed", this, "_multiple_properties_changed"); + ep->connect_compat("resource_selected", this, "_resource_selected", varray(), CONNECT_DEFERRED); + ep->connect_compat("object_id_selected", this, "_object_id_selected", varray(), CONNECT_DEFERRED); if (doc_hint != String()) { ep->set_tooltip(property_prefix + p.name + "::" + doc_hint); } else { @@ -1889,7 +1909,7 @@ void EditorInspector::set_use_filter(bool p_use) { void EditorInspector::register_text_enter(Node *p_line_edit) { search_box = Object::cast_to<LineEdit>(p_line_edit); if (search_box) - search_box->connect("text_changed", this, "_filter_changed"); + search_box->connect_compat("text_changed", this, "_filter_changed"); } void EditorInspector::_filter_changed(const String &p_text) { @@ -2109,7 +2129,7 @@ void EditorInspector::_property_checked(const String &p_path, bool p_checked) { object->get_property_list(&pinfo); for (List<PropertyInfo>::Element *E = pinfo.front(); E; E = E->next()) { if (E->get().name == p_path) { - Variant::CallError ce; + Callable::CallError ce; to_create = Variant::construct(E->get().type, NULL, 0, ce); break; } @@ -2165,7 +2185,7 @@ void EditorInspector::_node_removed(Node *p_node) { void EditorInspector::_notification(int p_what) { if (p_what == NOTIFICATION_READY) { - EditorFeatureProfileManager::get_singleton()->connect("current_feature_profile_changed", this, "_feature_profile_changed"); + EditorFeatureProfileManager::get_singleton()->connect_compat("current_feature_profile_changed", this, "_feature_profile_changed"); } if (p_what == NOTIFICATION_ENTER_TREE) { @@ -2174,7 +2194,7 @@ void EditorInspector::_notification(int p_what) { add_style_override("bg", get_stylebox("sub_inspector_bg", "Editor")); } else { add_style_override("bg", get_stylebox("bg", "Tree")); - get_tree()->connect("node_removed", this, "_node_removed"); + get_tree()->connect_compat("node_removed", this, "_node_removed"); } } if (p_what == NOTIFICATION_PREDELETE) { @@ -2183,7 +2203,7 @@ void EditorInspector::_notification(int p_what) { if (p_what == NOTIFICATION_EXIT_TREE) { if (!sub_inspector) { - get_tree()->disconnect("node_removed", this, "_node_removed"); + get_tree()->disconnect_compat("node_removed", this, "_node_removed"); } edit(NULL); } @@ -2337,6 +2357,6 @@ EditorInspector::EditorInspector() { property_focusable = -1; sub_inspector = false; - get_v_scrollbar()->connect("value_changed", this, "_vscroll_changed"); + get_v_scrollbar()->connect_compat("value_changed", this, "_vscroll_changed"); update_scroll_request = -1; } diff --git a/editor/editor_layouts_dialog.cpp b/editor/editor_layouts_dialog.cpp index 727e758341..05a5df45a9 100644 --- a/editor/editor_layouts_dialog.cpp +++ b/editor/editor_layouts_dialog.cpp @@ -128,8 +128,8 @@ EditorLayoutsDialog::EditorLayoutsDialog() { name->set_margin(MARGIN_TOP, 5); name->set_anchor_and_margin(MARGIN_LEFT, ANCHOR_BEGIN, 5); name->set_anchor_and_margin(MARGIN_RIGHT, ANCHOR_END, -5); - name->connect("gui_input", this, "_line_gui_input"); - name->connect("focus_entered", layout_names, "unselect_all"); + name->connect_compat("gui_input", this, "_line_gui_input"); + name->connect_compat("focus_entered", layout_names, "unselect_all"); } void EditorLayoutsDialog::set_name_line_enabled(bool p_enabled) { diff --git a/editor/editor_log.cpp b/editor/editor_log.cpp index 5b77db7707..ca755a6cb7 100644 --- a/editor/editor_log.cpp +++ b/editor/editor_log.cpp @@ -159,13 +159,13 @@ EditorLog::EditorLog() { hb->add_child(copybutton); copybutton->set_text(TTR("Copy")); copybutton->set_shortcut(ED_SHORTCUT("editor/copy_output", TTR("Copy Selection"), KEY_MASK_CMD | KEY_C)); - copybutton->connect("pressed", this, "_copy_request"); + copybutton->connect_compat("pressed", this, "_copy_request"); clearbutton = memnew(Button); hb->add_child(clearbutton); clearbutton->set_text(TTR("Clear")); clearbutton->set_shortcut(ED_SHORTCUT("editor/clear_output", TTR("Clear Output"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_K)); - clearbutton->connect("pressed", this, "_clear_request"); + clearbutton->connect_compat("pressed", this, "_clear_request"); log = memnew(RichTextLabel); log->set_scroll_follow(true); diff --git a/editor/editor_network_profiler.cpp b/editor/editor_network_profiler.cpp index 1b80743237..1dffafa359 100644 --- a/editor/editor_network_profiler.cpp +++ b/editor/editor_network_profiler.cpp @@ -142,12 +142,12 @@ EditorNetworkProfiler::EditorNetworkProfiler() { activate = memnew(Button); activate->set_toggle_mode(true); activate->set_text(TTR("Start")); - activate->connect("pressed", this, "_activate_pressed"); + activate->connect_compat("pressed", this, "_activate_pressed"); hb->add_child(activate); clear_button = memnew(Button); clear_button->set_text(TTR("Clear")); - clear_button->connect("pressed", this, "_clear_pressed"); + clear_button->connect_compat("pressed", this, "_clear_pressed"); hb->add_child(clear_button); hb->add_spacer(); @@ -207,5 +207,5 @@ EditorNetworkProfiler::EditorNetworkProfiler() { frame_delay->set_wait_time(0.1); frame_delay->set_one_shot(true); add_child(frame_delay); - frame_delay->connect("timeout", this, "_update_frame"); + frame_delay->connect_compat("timeout", this, "_update_frame"); } diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index f88b071515..9cc6134f27 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -123,6 +123,7 @@ #include "editor/plugins/cpu_particles_2d_editor_plugin.h" #include "editor/plugins/cpu_particles_editor_plugin.h" #include "editor/plugins/curve_editor_plugin.h" +#include "editor/plugins/debugger_editor_plugin.h" #include "editor/plugins/editor_preview_plugins.h" #include "editor/plugins/gi_probe_editor_plugin.h" #include "editor/plugins/gradient_editor_plugin.h" @@ -168,7 +169,6 @@ #include "editor/quick_open.h" #include "editor/register_exporters.h" #include "editor/run_settings_dialog.h" -#include "editor/script_editor_debugger.h" #include "editor/settings_config_dialog.h" #include <stdio.h> @@ -374,8 +374,8 @@ void EditorNode::_notification(int p_what) { get_tree()->get_root()->set_as_audio_listener(false); get_tree()->get_root()->set_as_audio_listener_2d(false); get_tree()->set_auto_accept_quit(false); - get_tree()->connect("files_dropped", this, "_dropped_files"); - get_tree()->connect("global_menu_action", this, "_global_menu_action"); + get_tree()->connect_compat("files_dropped", this, "_dropped_files"); + get_tree()->connect_compat("global_menu_action", this, "_global_menu_action"); /* DO NOT LOAD SCENES HERE, WAIT FOR FILE SCANNING AND REIMPORT TO COMPLETE */ } break; @@ -472,7 +472,7 @@ void EditorNode::_notification(int p_what) { recent_scenes->set_as_minsize(); // debugger area - if (ScriptEditor::get_singleton()->get_debugger()->is_visible()) + if (EditorDebuggerNode::get_singleton()->is_visible()) bottom_panel->add_style_override("panel", gui_base->get_stylebox("BottomPanelDebuggerOverride", "EditorStyles")); // update_icons @@ -547,7 +547,7 @@ void EditorNode::_on_plugin_ready(Object *p_script, const String &p_activate_nam push_item(script.operator->()); } -void EditorNode::_resources_changed(const PoolVector<String> &p_resources) { +void EditorNode::_resources_changed(const Vector<String> &p_resources) { List<Ref<Resource> > changed; @@ -1846,7 +1846,7 @@ void EditorNode::_edit_current() { Node *selected_node = NULL; - if (current_obj->is_class("ScriptEditorDebuggerInspectedObject")) { + if (current_obj->is_class("EditorDebuggerRemoteObject")) { editable_warning = TTR("This is a remote object, so changes to it won't be kept.\nPlease read the documentation relevant to debugging to better understand this workflow."); capitalize = false; disable_folding = true; @@ -2048,9 +2048,13 @@ void EditorNode::_run(bool p_current, const String &p_custom) { editor_data.get_editor_breakpoints(&breakpoints); args = ProjectSettings::get_singleton()->get("editor/main_run_args"); - skip_breakpoints = ScriptEditor::get_singleton()->get_debugger()->is_skip_breakpoints(); + skip_breakpoints = EditorDebuggerNode::get_singleton()->is_skip_breakpoints(); - Error error = editor_run.run(run_filename, args, breakpoints, skip_breakpoints); + int instances = 1; + if (debug_menu->get_popup()->is_item_checked(debug_menu->get_popup()->get_item_index(RUN_DEBUG_TWO))) + instances = 2; + + Error error = editor_run.run(run_filename, args, breakpoints, skip_breakpoints, instances); if (error != OK) { @@ -2174,7 +2178,7 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) { break; } - FALLTHROUGH; + [[fallthrough]]; } case SCENE_TAB_CLOSE: case FILE_SAVE_SCENE: { @@ -2195,7 +2199,7 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) { break; } - FALLTHROUGH; + [[fallthrough]]; } case FILE_SAVE_AS_SCENE: { int scene_idx = (p_option == FILE_SAVE_SCENE || p_option == FILE_SAVE_AS_SCENE) ? -1 : tab_closing; @@ -2481,6 +2485,16 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) { run_settings_dialog->popup_run_settings(); } break; + case RUN_DEBUG_ONE: { + debug_menu->get_popup()->set_item_checked(debug_menu->get_popup()->get_item_index(RUN_DEBUG_ONE), true); + debug_menu->get_popup()->set_item_checked(debug_menu->get_popup()->get_item_index(RUN_DEBUG_TWO), false); + + } break; + case RUN_DEBUG_TWO: { + debug_menu->get_popup()->set_item_checked(debug_menu->get_popup()->get_item_index(RUN_DEBUG_TWO), true); + debug_menu->get_popup()->set_item_checked(debug_menu->get_popup()->get_item_index(RUN_DEBUG_ONE), false); + + } break; case RUN_SETTINGS: { project_settings->popup_project_settings(); @@ -2571,7 +2585,7 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) { bool ischecked = debug_menu->get_popup()->is_item_checked(debug_menu->get_popup()->get_item_index(RUN_LIVE_DEBUG)); debug_menu->get_popup()->set_item_checked(debug_menu->get_popup()->get_item_index(RUN_LIVE_DEBUG), !ischecked); - ScriptEditor::get_singleton()->get_debugger()->set_live_debugging(!ischecked); + EditorDebuggerNode::get_singleton()->set_live_debugging(!ischecked); EditorSettings::get_singleton()->set_project_metadata("debug_options", "run_live_debug", !ischecked); } break; @@ -2746,10 +2760,10 @@ void EditorNode::_tool_menu_option(int p_idx) { Object *handler = ObjectDB::get_instance(params[0]); String callback = params[1]; Variant *ud = ¶ms[2]; - Variant::CallError ce; + Callable::CallError ce; handler->call(callback, (const Variant **)&ud, 1, ce); - if (ce.error != Variant::CallError::CALL_OK) { + if (ce.error != Callable::CallError::CALL_OK) { String err = Variant::get_call_error_text(handler, callback, (const Variant **)&ud, 1, ce); ERR_PRINT("Error calling function from tool menu: " + err); } @@ -2958,7 +2972,7 @@ void EditorNode::add_editor_plugin(EditorPlugin *p_editor, bool p_config_changed ToolButton *tb = memnew(ToolButton); tb->set_toggle_mode(true); - tb->connect("pressed", singleton, "_editor_select", varray(singleton->main_editor_buttons.size())); + tb->connect_compat("pressed", singleton, "_editor_select", varray(singleton->main_editor_buttons.size())); tb->set_text(p_editor->get_name()); Ref<Texture2D> icon = p_editor->get_icon(); @@ -3052,7 +3066,7 @@ void EditorNode::set_addon_plugin_enabled(const String &p_addon, bool p_enabled, String addon_path = String("res://addons").plus_file(p_addon).plus_file("plugin.cfg"); if (!DirAccess::exists(addon_path.get_base_dir())) { ProjectSettings *ps = ProjectSettings::get_singleton(); - PoolStringArray enabled_plugins = ps->get("editor_plugins/enabled"); + PackedStringArray enabled_plugins = ps->get("editor_plugins/enabled"); for (int i = 0; i < enabled_plugins.size(); ++i) { if (enabled_plugins.get(i) == p_addon) { enabled_plugins.remove(i); @@ -3107,7 +3121,7 @@ void EditorNode::set_addon_plugin_enabled(const String &p_addon, bool p_enabled, } EditorPlugin *ep = memnew(EditorPlugin); - ep->set_script(script.get_ref_ptr()); + ep->set_script(script); plugin_addons[p_addon] = ep; add_editor_plugin(ep, p_config_changed); @@ -3242,7 +3256,7 @@ void EditorNode::_set_main_scene_state(Dictionary p_state, Node *p_for_scene) { //this should only happen at the very end - ScriptEditor::get_singleton()->get_debugger()->update_live_edit_root(); + EditorDebuggerNode::get_singleton()->update_live_edit_root(); ScriptEditor::get_singleton()->set_scene_root_script(editor_data.get_scene_root_script(editor_data.get_edited_scene())); editor_data.notify_edited_scene_changed(); } @@ -3477,7 +3491,7 @@ Error EditorNode::load_scene(const String &p_scene, bool p_ignore_broken_deps, b opening_prev = false; scene_tree_dock->set_selected(new_scene); - ScriptEditor::get_singleton()->get_debugger()->update_live_edit_root(); + EditorDebuggerNode::get_singleton()->update_live_edit_root(); push_item(new_scene); @@ -3619,7 +3633,7 @@ void EditorNode::_quick_run() { _run(false, quick_run->get_selected()); } -void EditorNode::notify_child_process_exited() { +void EditorNode::notify_all_debug_sessions_exited() { _menu_option_confirm(RUN_STOP, false); stop_button->set_pressed(false); @@ -3703,9 +3717,13 @@ void EditorNode::unregister_editor_types() { _init_callbacks.clear(); } -void EditorNode::stop_child_process() { +void EditorNode::stop_child_process(OS::ProcessID p_pid) { - _menu_option_confirm(RUN_STOP, false); + if (has_child_process(p_pid)) { + editor_run.stop_child_process(p_pid); + if (!editor_run.get_child_process_count()) // All children stopped. Closing. + _menu_option_confirm(RUN_STOP, false); + } } Ref<Script> EditorNode::get_object_custom_type_base(const Object *p_object) const { @@ -4785,7 +4803,7 @@ void EditorNode::_scene_tab_changed(int p_tab) { ToolButton *EditorNode::add_bottom_panel_item(String p_text, Control *p_item) { ToolButton *tb = memnew(ToolButton); - tb->connect("toggled", this, "_bottom_panel_switch", varray(bottom_panel_items.size())); + tb->connect_compat("toggled", this, "_bottom_panel_switch", varray(bottom_panel_items.size())); tb->set_text(p_text); tb->set_toggle_mode(true); tb->set_focus_mode(Control::FOCUS_NONE); @@ -4847,8 +4865,8 @@ 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", this, "_bottom_panel_switch"); - bottom_panel_items[i].button->connect("toggled", this, "_bottom_panel_switch", varray(i)); + bottom_panel_items[i].button->disconnect_compat("toggled", this, "_bottom_panel_switch"); + bottom_panel_items[i].button->connect_compat("toggled", this, "_bottom_panel_switch", varray(i)); } } @@ -4869,8 +4887,8 @@ 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", this, "_bottom_panel_switch"); - bottom_panel_items[i].button->connect("toggled", this, "_bottom_panel_switch", varray(i)); + bottom_panel_items[i].button->disconnect_compat("toggled", this, "_bottom_panel_switch"); + bottom_panel_items[i].button->connect_compat("toggled", this, "_bottom_panel_switch", varray(i)); } } @@ -4888,7 +4906,7 @@ void EditorNode::_bottom_panel_switch(bool p_enable, int p_idx) { bottom_panel_items[i].button->set_pressed(i == p_idx); bottom_panel_items[i].control->set_visible(i == p_idx); } - if (ScriptEditor::get_singleton()->get_debugger() == bottom_panel_items[p_idx].control) { // this is the debug panel which uses tabs, so the top section should be smaller + if (EditorDebuggerNode::get_singleton() == bottom_panel_items[p_idx].control) { // this is the debug panel which uses tabs, so the top section should be smaller bottom_panel->add_style_override("panel", gui_base->get_stylebox("BottomPanelDebuggerOverride", "EditorStyles")); } else { bottom_panel->add_style_override("panel", gui_base->get_stylebox("panel", "TabContainer")); @@ -5519,7 +5537,7 @@ void EditorNode::_bind_methods() { ADD_SIGNAL(MethodInfo("pause_pressed")); ADD_SIGNAL(MethodInfo("stop_pressed")); ADD_SIGNAL(MethodInfo("request_help_search")); - ADD_SIGNAL(MethodInfo("script_add_function_request", PropertyInfo(Variant::OBJECT, "obj"), PropertyInfo(Variant::STRING, "function"), PropertyInfo(Variant::POOL_STRING_ARRAY, "args"))); + ADD_SIGNAL(MethodInfo("script_add_function_request", PropertyInfo(Variant::OBJECT, "obj"), PropertyInfo(Variant::STRING, "function"), PropertyInfo(Variant::PACKED_STRING_ARRAY, "args"))); ADD_SIGNAL(MethodInfo("resource_saved", PropertyInfo(Variant::OBJECT, "obj"))); } @@ -5823,7 +5841,7 @@ EditorNode::EditorNode() { EDITOR_DEF_RST("interface/scene_tabs/show_thumbnail_on_hover", true); EDITOR_DEF_RST("interface/inspector/capitalize_properties", true); EDITOR_DEF_RST("interface/inspector/default_float_step", 0.001); - EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::REAL, "interface/inspector/default_float_step", PROPERTY_HINT_EXP_RANGE, "0,1,0")); + EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::FLOAT, "interface/inspector/default_float_step", PROPERTY_HINT_RANGE, "0,1,0")); EDITOR_DEF_RST("interface/inspector/disable_folding", false); EDITOR_DEF_RST("interface/inspector/auto_unfold_foreign_scenes", true); EDITOR_DEF("interface/inspector/horizontal_vector2_editing", false); @@ -5925,8 +5943,8 @@ EditorNode::EditorNode() { hsplits.push_back(right_hsplit); for (int i = 0; i < vsplits.size(); i++) { - vsplits[i]->connect("dragged", this, "_dock_split_dragged"); - hsplits[i]->connect("dragged", this, "_dock_split_dragged"); + vsplits[i]->connect_compat("dragged", this, "_dock_split_dragged"); + hsplits[i]->connect_compat("dragged", this, "_dock_split_dragged"); } dock_select_popup = memnew(PopupPanel); @@ -5938,7 +5956,7 @@ EditorNode::EditorNode() { dock_tab_move_left = memnew(ToolButton); dock_tab_move_left->set_icon(theme->get_icon("Back", "EditorIcons")); dock_tab_move_left->set_focus_mode(Control::FOCUS_NONE); - dock_tab_move_left->connect("pressed", this, "_dock_move_left"); + dock_tab_move_left->connect_compat("pressed", this, "_dock_move_left"); dock_hb->add_child(dock_tab_move_left); Label *dock_label = memnew(Label); @@ -5950,16 +5968,16 @@ EditorNode::EditorNode() { dock_tab_move_right = memnew(ToolButton); dock_tab_move_right->set_icon(theme->get_icon("Forward", "EditorIcons")); dock_tab_move_right->set_focus_mode(Control::FOCUS_NONE); - dock_tab_move_right->connect("pressed", this, "_dock_move_right"); + dock_tab_move_right->connect_compat("pressed", this, "_dock_move_right"); dock_hb->add_child(dock_tab_move_right); dock_vb->add_child(dock_hb); dock_select = memnew(Control); dock_select->set_custom_minimum_size(Size2(128, 64) * EDSCALE); - dock_select->connect("gui_input", this, "_dock_select_input"); - dock_select->connect("draw", this, "_dock_select_draw"); - dock_select->connect("mouse_exited", this, "_dock_popup_exit"); + dock_select->connect_compat("gui_input", this, "_dock_select_input"); + dock_select->connect_compat("draw", this, "_dock_select_draw"); + dock_select->connect_compat("mouse_exited", this, "_dock_popup_exit"); dock_select->set_v_size_flags(Control::SIZE_EXPAND_FILL); dock_vb->add_child(dock_select); @@ -5970,11 +5988,11 @@ 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", this, "_dock_pre_popup", varray(i)); + dock_slot[i]->connect_compat("pre_popup_pressed", this, "_dock_pre_popup", varray(i)); dock_slot[i]->set_tab_align(TabContainer::ALIGN_LEFT); dock_slot[i]->set_drag_to_rearrange_enabled(true); dock_slot[i]->set_tabs_rearrange_group(1); - dock_slot[i]->connect("tab_changed", this, "_dock_tab_changed"); + dock_slot[i]->connect_compat("tab_changed", this, "_dock_tab_changed"); dock_slot[i]->set_use_hidden_tabs_for_min_size(true); } @@ -5982,7 +6000,7 @@ EditorNode::EditorNode() { add_child(dock_drag_timer); dock_drag_timer->set_wait_time(0.5); dock_drag_timer->set_one_shot(true); - dock_drag_timer->connect("timeout", this, "_save_docks"); + dock_drag_timer->connect_compat("timeout", this, "_save_docks"); top_split = memnew(VSplitContainer); center_split->add_child(top_split); @@ -6015,21 +6033,21 @@ EditorNode::EditorNode() { scene_tabs->set_tab_close_display_policy((bool(EDITOR_DEF("interface/scene_tabs/always_show_close_button", false)) ? Tabs::CLOSE_BUTTON_SHOW_ALWAYS : Tabs::CLOSE_BUTTON_SHOW_ACTIVE_ONLY)); scene_tabs->set_min_width(int(EDITOR_DEF("interface/scene_tabs/minimum_width", 50)) * EDSCALE); scene_tabs->set_drag_to_rearrange_enabled(true); - scene_tabs->connect("tab_changed", this, "_scene_tab_changed"); - scene_tabs->connect("right_button_pressed", this, "_scene_tab_script_edited"); - scene_tabs->connect("tab_close", this, "_scene_tab_closed", varray(SCENE_TAB_CLOSE)); - scene_tabs->connect("tab_hover", this, "_scene_tab_hover"); - scene_tabs->connect("mouse_exited", this, "_scene_tab_exit"); - scene_tabs->connect("gui_input", this, "_scene_tab_input"); - scene_tabs->connect("reposition_active_tab_request", this, "_reposition_active_tab"); - scene_tabs->connect("resized", this, "_update_scene_tabs"); + scene_tabs->connect_compat("tab_changed", this, "_scene_tab_changed"); + scene_tabs->connect_compat("right_button_pressed", this, "_scene_tab_script_edited"); + scene_tabs->connect_compat("tab_close", this, "_scene_tab_closed", varray(SCENE_TAB_CLOSE)); + scene_tabs->connect_compat("tab_hover", this, "_scene_tab_hover"); + scene_tabs->connect_compat("mouse_exited", this, "_scene_tab_exit"); + scene_tabs->connect_compat("gui_input", this, "_scene_tab_input"); + scene_tabs->connect_compat("reposition_active_tab_request", this, "_reposition_active_tab"); + scene_tabs->connect_compat("resized", this, "_update_scene_tabs"); tabbar_container = memnew(HBoxContainer); scene_tabs->set_h_size_flags(Control::SIZE_EXPAND_FILL); scene_tabs_context_menu = memnew(PopupMenu); tabbar_container->add_child(scene_tabs_context_menu); - scene_tabs_context_menu->connect("id_pressed", this, "_menu_option"); + scene_tabs_context_menu->connect_compat("id_pressed", this, "_menu_option"); scene_tabs_context_menu->set_hide_on_window_lose_focus(true); srt->add_child(tabbar_container); @@ -6041,7 +6059,7 @@ EditorNode::EditorNode() { distraction_free->set_shortcut(ED_SHORTCUT("editor/distraction_free_mode", TTR("Distraction Free Mode"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_F11)); #endif distraction_free->set_tooltip(TTR("Toggle distraction-free mode.")); - distraction_free->connect("pressed", this, "_toggle_distraction_free_mode"); + distraction_free->connect_compat("pressed", this, "_toggle_distraction_free_mode"); distraction_free->set_icon(gui_base->get_icon("DistractionFree", "EditorIcons")); distraction_free->set_toggle_mode(true); @@ -6051,7 +6069,7 @@ EditorNode::EditorNode() { scene_tab_add->set_tooltip(TTR("Add a new scene.")); scene_tab_add->set_icon(gui_base->get_icon("Add", "EditorIcons")); scene_tab_add->add_color_override("icon_color_normal", Color(0.6f, 0.6f, 0.6f, 0.8f)); - scene_tab_add->connect("pressed", this, "_menu_option", make_binds(FILE_NEW_SCENE)); + scene_tab_add->connect_compat("pressed", this, "_menu_option", make_binds(FILE_NEW_SCENE)); scene_root_parent = memnew(PanelContainer); scene_root_parent->set_custom_minimum_size(Size2(0, 80) * EDSCALE); @@ -6086,14 +6104,14 @@ EditorNode::EditorNode() { prev_scene->set_icon(gui_base->get_icon("PrevScene", "EditorIcons")); prev_scene->set_tooltip(TTR("Go to previously opened scene.")); prev_scene->set_disabled(true); - prev_scene->connect("pressed", this, "_menu_option", make_binds(FILE_OPEN_PREV)); + prev_scene->connect_compat("pressed", this, "_menu_option", make_binds(FILE_OPEN_PREV)); gui_base->add_child(prev_scene); prev_scene->set_position(Point2(3, 24)); prev_scene->hide(); accept = memnew(AcceptDialog); gui_base->add_child(accept); - accept->connect("confirmed", this, "_menu_confirm_current"); + accept->connect_compat("confirmed", this, "_menu_confirm_current"); project_export = memnew(ProjectExportDialog); gui_base->add_child(project_export); @@ -6120,16 +6138,16 @@ EditorNode::EditorNode() { gui_base->add_child(feature_profile_manager); about = memnew(EditorAbout); gui_base->add_child(about); - feature_profile_manager->connect("current_feature_profile_changed", this, "_feature_profile_changed"); + feature_profile_manager->connect_compat("current_feature_profile_changed", this, "_feature_profile_changed"); warning = memnew(AcceptDialog); warning->add_button(TTR("Copy Text"), true, "copy"); gui_base->add_child(warning); - warning->connect("custom_action", this, "_copy_warning"); + warning->connect_compat("custom_action", this, "_copy_warning"); ED_SHORTCUT("editor/next_tab", TTR("Next tab"), KEY_MASK_CMD + KEY_TAB); ED_SHORTCUT("editor/prev_tab", TTR("Previous tab"), KEY_MASK_CMD + KEY_MASK_SHIFT + KEY_TAB); - ED_SHORTCUT("editor/filter_files", TTR("Filter Files..."), KEY_MASK_ALT + KEY_MASK_CMD + KEY_P); + ED_SHORTCUT("editor/filter_files", TTR("Filter Files..."), KEY_MASK_CMD + KEY_MASK_ALT + KEY_P); PopupMenu *p; file_menu->set_tooltip(TTR("Operations with scene files.")); @@ -6144,13 +6162,14 @@ EditorNode::EditorNode() { p->add_separator(); p->add_shortcut(ED_SHORTCUT("editor/save_scene", TTR("Save Scene"), KEY_MASK_CMD + KEY_S), FILE_SAVE_SCENE); - p->add_shortcut(ED_SHORTCUT("editor/save_scene_as", TTR("Save Scene As..."), KEY_MASK_SHIFT + KEY_MASK_CMD + KEY_S), FILE_SAVE_AS_SCENE); - p->add_shortcut(ED_SHORTCUT("editor/save_all_scenes", TTR("Save All Scenes"), KEY_MASK_ALT + KEY_MASK_SHIFT + KEY_MASK_CMD + KEY_S), FILE_SAVE_ALL_SCENES); + p->add_shortcut(ED_SHORTCUT("editor/save_scene_as", TTR("Save Scene As..."), KEY_MASK_CMD + KEY_MASK_SHIFT + KEY_S), FILE_SAVE_AS_SCENE); + p->add_shortcut(ED_SHORTCUT("editor/save_all_scenes", TTR("Save All Scenes"), KEY_MASK_CMD + KEY_MASK_SHIFT + KEY_MASK_ALT + KEY_S), FILE_SAVE_ALL_SCENES); p->add_separator(); + p->add_shortcut(ED_SHORTCUT("editor/quick_open", TTR("Quick Open..."), KEY_MASK_SHIFT + KEY_MASK_ALT + KEY_O), FILE_QUICK_OPEN); - p->add_shortcut(ED_SHORTCUT("editor/quick_open_scene", TTR("Quick Open Scene..."), KEY_MASK_SHIFT + KEY_MASK_CMD + KEY_O), FILE_QUICK_OPEN_SCENE); - p->add_shortcut(ED_SHORTCUT("editor/quick_open_script", TTR("Quick Open Script..."), KEY_MASK_ALT + KEY_MASK_CMD + KEY_O), FILE_QUICK_OPEN_SCRIPT); + p->add_shortcut(ED_SHORTCUT("editor/quick_open_scene", TTR("Quick Open Scene..."), KEY_MASK_CMD + KEY_MASK_SHIFT + KEY_O), FILE_QUICK_OPEN_SCENE); + p->add_shortcut(ED_SHORTCUT("editor/quick_open_script", TTR("Quick Open Script..."), KEY_MASK_CMD + KEY_MASK_ALT + KEY_O), FILE_QUICK_OPEN_SCRIPT); p->add_separator(); PopupMenu *pm_export = memnew(PopupMenu); @@ -6159,20 +6178,20 @@ EditorNode::EditorNode() { p->add_submenu_item(TTR("Convert To..."), "Export"); pm_export->add_shortcut(ED_SHORTCUT("editor/convert_to_MeshLibrary", TTR("MeshLibrary...")), FILE_EXPORT_MESH_LIBRARY); pm_export->add_shortcut(ED_SHORTCUT("editor/convert_to_TileSet", TTR("TileSet...")), FILE_EXPORT_TILESET); - pm_export->connect("id_pressed", this, "_menu_option"); + pm_export->connect_compat("id_pressed", this, "_menu_option"); p->add_separator(); p->add_shortcut(ED_SHORTCUT("editor/undo", TTR("Undo"), KEY_MASK_CMD + KEY_Z), EDIT_UNDO, true); - p->add_shortcut(ED_SHORTCUT("editor/redo", TTR("Redo"), KEY_MASK_SHIFT + KEY_MASK_CMD + KEY_Z), EDIT_REDO, true); + p->add_shortcut(ED_SHORTCUT("editor/redo", TTR("Redo"), KEY_MASK_CMD + KEY_MASK_SHIFT + KEY_Z), EDIT_REDO, true); p->add_separator(); p->add_shortcut(ED_SHORTCUT("editor/revert_scene", TTR("Revert Scene")), EDIT_REVERT); - p->add_shortcut(ED_SHORTCUT("editor/close_scene", TTR("Close Scene"), KEY_MASK_SHIFT + KEY_MASK_CMD + KEY_W), FILE_CLOSE); + p->add_shortcut(ED_SHORTCUT("editor/close_scene", TTR("Close Scene"), KEY_MASK_CMD + KEY_MASK_SHIFT + KEY_W), FILE_CLOSE); recent_scenes = memnew(PopupMenu); recent_scenes->set_name("RecentScenes"); p->add_child(recent_scenes); - recent_scenes->connect("id_pressed", this, "_open_recent_scene"); + recent_scenes->connect_compat("id_pressed", this, "_open_recent_scene"); p->add_separator(); p->add_shortcut(ED_SHORTCUT("editor/file_quit", TTR("Quit"), KEY_MASK_CMD + KEY_Q), FILE_QUIT, true); @@ -6188,11 +6207,11 @@ EditorNode::EditorNode() { p = project_menu->get_popup(); p->set_hide_on_window_lose_focus(true); p->add_shortcut(ED_SHORTCUT("editor/project_settings", TTR("Project Settings...")), RUN_SETTINGS); - p->connect("id_pressed", this, "_menu_option"); + p->connect_compat("id_pressed", this, "_menu_option"); vcs_actions_menu = VersionControlEditorPlugin::get_singleton()->get_version_control_actions_panel(); vcs_actions_menu->set_name("Version Control"); - vcs_actions_menu->connect("index_pressed", this, "_version_control_menu_option"); + vcs_actions_menu->connect_compat("index_pressed", this, "_version_control_menu_option"); p->add_separator(); p->add_child(vcs_actions_menu); p->add_submenu_item(TTR("Version Control"), "Version Control"); @@ -6205,12 +6224,12 @@ EditorNode::EditorNode() { p->add_item(TTR("Open Project Data Folder"), RUN_PROJECT_DATA_FOLDER); plugin_config_dialog = memnew(PluginConfigDialog); - plugin_config_dialog->connect("plugin_ready", this, "_on_plugin_ready"); + plugin_config_dialog->connect_compat("plugin_ready", this, "_on_plugin_ready"); gui_base->add_child(plugin_config_dialog); tool_menu = memnew(PopupMenu); tool_menu->set_name("Tools"); - tool_menu->connect("index_pressed", this, "_tool_menu_option"); + tool_menu->connect_compat("index_pressed", this, "_tool_menu_option"); p->add_child(tool_menu); p->add_submenu_item(TTR("Tools"), "Tools"); tool_menu->add_item(TTR("Orphan Resource Explorer..."), TOOLS_ORPHAN_RESOURCES); @@ -6219,7 +6238,7 @@ EditorNode::EditorNode() { #ifdef OSX_ENABLED p->add_shortcut(ED_SHORTCUT("editor/quit_to_project_list", TTR("Quit to Project List"), KEY_MASK_SHIFT + KEY_MASK_ALT + KEY_Q), RUN_PROJECT_MANAGER, true); #else - p->add_shortcut(ED_SHORTCUT("editor/quit_to_project_list", TTR("Quit to Project List"), KEY_MASK_SHIFT + KEY_MASK_CMD + KEY_Q), RUN_PROJECT_MANAGER, true); + p->add_shortcut(ED_SHORTCUT("editor/quit_to_project_list", TTR("Quit to Project List"), KEY_MASK_CMD + KEY_MASK_SHIFT + KEY_Q), RUN_PROJECT_MANAGER, true); #endif menu_hb->add_spacer(); @@ -6254,7 +6273,14 @@ EditorNode::EditorNode() { p->add_check_shortcut(ED_SHORTCUT("editor/sync_script_changes", TTR("Sync Script Changes")), RUN_RELOAD_SCRIPTS); p->set_item_tooltip(p->get_item_count() - 1, TTR("When this option is turned on, any script that is saved will be reloaded on the running game.\nWhen used remotely on a device, this is more efficient with network filesystem.")); p->set_item_checked(p->get_item_count() - 1, true); - p->connect("id_pressed", this, "_menu_option"); + + // Multi-instance, start/stop + p->add_separator(); + p->add_radio_check_item(TTR("Debug 1 instance"), RUN_DEBUG_ONE); + p->add_radio_check_item(TTR("Debug 2 instances"), RUN_DEBUG_TWO); + p->set_item_checked(p->get_item_index(RUN_DEBUG_ONE), true); + + p->connect_compat("id_pressed", this, "_menu_option"); menu_hb->add_spacer(); @@ -6273,7 +6299,7 @@ EditorNode::EditorNode() { editor_layouts = memnew(PopupMenu); editor_layouts->set_name("Layouts"); p->add_child(editor_layouts); - editor_layouts->connect("id_pressed", this, "_layout_menu_option"); + editor_layouts->connect_compat("id_pressed", this, "_layout_menu_option"); p->add_submenu_item(TTR("Editor Layout"), "Layouts"); p->add_separator(); #ifdef OSX_ENABLED @@ -6315,7 +6341,7 @@ EditorNode::EditorNode() { p = help_menu->get_popup(); p->set_hide_on_window_lose_focus(true); - p->connect("id_pressed", this, "_menu_option"); + p->connect_compat("id_pressed", this, "_menu_option"); p->add_icon_shortcut(gui_base->get_icon("HelpSearch", "EditorIcons"), ED_SHORTCUT("editor/editor_help", TTR("Search"), KEY_MASK_SHIFT | KEY_F1), HELP_SEARCH); p->add_separator(); p->add_icon_shortcut(gui_base->get_icon("Instance", "EditorIcons"), ED_SHORTCUT("editor/online_docs", TTR("Online Docs")), HELP_DOCS); @@ -6333,7 +6359,7 @@ EditorNode::EditorNode() { play_button->set_toggle_mode(true); play_button->set_icon(gui_base->get_icon("MainPlay", "EditorIcons")); play_button->set_focus_mode(Control::FOCUS_NONE); - play_button->connect("pressed", this, "_menu_option", make_binds(RUN_PLAY)); + play_button->connect_compat("pressed", this, "_menu_option", make_binds(RUN_PLAY)); play_button->set_tooltip(TTR("Play the project.")); #ifdef OSX_ENABLED play_button->set_shortcut(ED_SHORTCUT("editor/play", TTR("Play"), KEY_MASK_CMD | KEY_B)); @@ -6358,7 +6384,7 @@ EditorNode::EditorNode() { play_hb->add_child(stop_button); stop_button->set_focus_mode(Control::FOCUS_NONE); stop_button->set_icon(gui_base->get_icon("Stop", "EditorIcons")); - stop_button->connect("pressed", this, "_menu_option", make_binds(RUN_STOP)); + stop_button->connect_compat("pressed", this, "_menu_option", make_binds(RUN_STOP)); stop_button->set_tooltip(TTR("Stop the scene.")); stop_button->set_disabled(true); #ifdef OSX_ENABLED @@ -6369,14 +6395,14 @@ EditorNode::EditorNode() { run_native = memnew(EditorRunNative); play_hb->add_child(run_native); - run_native->connect("native_run", this, "_menu_option", varray(RUN_PLAY_NATIVE)); + run_native->connect_compat("native_run", this, "_menu_option", varray(RUN_PLAY_NATIVE)); play_scene_button = memnew(ToolButton); play_hb->add_child(play_scene_button); play_scene_button->set_toggle_mode(true); play_scene_button->set_focus_mode(Control::FOCUS_NONE); play_scene_button->set_icon(gui_base->get_icon("PlayScene", "EditorIcons")); - play_scene_button->connect("pressed", this, "_menu_option", make_binds(RUN_PLAY_SCENE)); + play_scene_button->connect_compat("pressed", this, "_menu_option", make_binds(RUN_PLAY_SCENE)); play_scene_button->set_tooltip(TTR("Play the edited scene.")); #ifdef OSX_ENABLED play_scene_button->set_shortcut(ED_SHORTCUT("editor/play_scene", TTR("Play Scene"), KEY_MASK_CMD | KEY_R)); @@ -6389,7 +6415,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_icon("PlayCustom", "EditorIcons")); - play_custom_scene_button->connect("pressed", this, "_menu_option", make_binds(RUN_PLAY_CUSTOM_SCENE)); + play_custom_scene_button->connect_compat("pressed", this, "_menu_option", make_binds(RUN_PLAY_CUSTOM_SCENE)); play_custom_scene_button->set_tooltip(TTR("Play custom scene")); #ifdef OSX_ENABLED play_custom_scene_button->set_shortcut(ED_SHORTCUT("editor/play_custom_scene", TTR("Play Custom Scene"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_R)); @@ -6404,8 +6430,10 @@ EditorNode::EditorNode() { video_driver = memnew(OptionButton); video_driver->set_flat(true); video_driver->set_focus_mode(Control::FOCUS_NONE); - video_driver->connect("item_selected", this, "_video_driver_selected"); + video_driver->connect_compat("item_selected", this, "_video_driver_selected"); video_driver->add_font_override("font", gui_base->get_font("bold", "EditorFonts")); + // TODO re-enable when GLES2 is ported + video_driver->set_disabled(true); right_menu_hb->add_child(video_driver); String video_drivers = ProjectSettings::get_singleton()->get_custom_property_info()["rendering/quality/driver/driver_name"].hint_string; @@ -6427,7 +6455,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->get_ok()->set_text(TTR("Save & Restart")); - video_restart_dialog->connect("confirmed", this, "_menu_option", varray(SET_VIDEO_DRIVER_SAVE_AND_RESTART)); + video_restart_dialog->connect_compat("confirmed", this, "_menu_option", varray(SET_VIDEO_DRIVER_SAVE_AND_RESTART)); gui_base->add_child(video_restart_dialog); progress_hb = memnew(BackgroundProgress); @@ -6436,13 +6464,13 @@ EditorNode::EditorNode() { gui_base->add_child(layout_dialog); layout_dialog->set_hide_on_ok(false); layout_dialog->set_size(Size2(225, 270) * EDSCALE); - layout_dialog->connect("name_confirmed", this, "_dialog_action"); + layout_dialog->connect_compat("name_confirmed", this, "_dialog_action"); update_spinner = memnew(MenuButton); update_spinner->set_tooltip(TTR("Spins when the editor window redraws.")); right_menu_hb->add_child(update_spinner); update_spinner->set_icon(gui_base->get_icon("Progress1", "EditorIcons")); - update_spinner->get_popup()->connect("id_pressed", this, "_menu_option"); + update_spinner->get_popup()->connect_compat("id_pressed", this, "_menu_option"); p = update_spinner->get_popup(); p->add_radio_check_item(TTR("Update Continuously"), SETTINGS_UPDATE_CONTINUOUSLY); p->add_radio_check_item(TTR("Update When Changed"), SETTINGS_UPDATE_WHEN_CHANGED); @@ -6458,9 +6486,9 @@ EditorNode::EditorNode() { node_dock = memnew(NodeDock); filesystem_dock = memnew(FileSystemDock(this)); - filesystem_dock->connect("inherit", this, "_inherit_request"); - filesystem_dock->connect("instance", this, "_instance_request"); - filesystem_dock->connect("display_mode_changed", this, "_save_docks"); + filesystem_dock->connect_compat("inherit", this, "_inherit_request"); + filesystem_dock->connect_compat("instance", this, "_instance_request"); + filesystem_dock->connect_compat("display_mode_changed", this, "_save_docks"); // Scene: Top left dock_slot[DOCK_SLOT_LEFT_UR]->add_child(scene_tree_dock); @@ -6546,7 +6574,7 @@ EditorNode::EditorNode() { bottom_panel_hb->add_child(bottom_panel_raise); bottom_panel_raise->hide(); bottom_panel_raise->set_toggle_mode(true); - bottom_panel_raise->connect("toggled", this, "_bottom_panel_raise_toggled"); + bottom_panel_raise->connect_compat("toggled", this, "_bottom_panel_raise_toggled"); log = memnew(EditorLog); ToolButton *output_button = add_bottom_panel_item(TTR("Output"), log); @@ -6554,37 +6582,37 @@ EditorNode::EditorNode() { old_split_ofs = 0; - center_split->connect("resized", this, "_vp_resized"); + center_split->connect_compat("resized", this, "_vp_resized"); orphan_resources = memnew(OrphanResourcesDialog); gui_base->add_child(orphan_resources); confirmation = memnew(ConfirmationDialog); gui_base->add_child(confirmation); - confirmation->connect("confirmed", this, "_menu_confirm_current"); + confirmation->connect_compat("confirmed", this, "_menu_confirm_current"); save_confirmation = memnew(ConfirmationDialog); save_confirmation->add_button(TTR("Don't Save"), OS::get_singleton()->get_swap_ok_cancel(), "discard"); gui_base->add_child(save_confirmation); - save_confirmation->connect("confirmed", this, "_menu_confirm_current"); - save_confirmation->connect("custom_action", this, "_discard_changes"); + save_confirmation->connect_compat("confirmed", this, "_menu_confirm_current"); + save_confirmation->connect_compat("custom_action", this, "_discard_changes"); 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->get_ok()->set_text(TTR("Manage Templates")); - custom_build_manage_templates->connect("confirmed", this, "_menu_option", varray(SETTINGS_MANAGE_EXPORT_TEMPLATES)); + custom_build_manage_templates->connect_compat("confirmed", this, "_menu_option", varray(SETTINGS_MANAGE_EXPORT_TEMPLATES)); gui_base->add_child(custom_build_manage_templates); install_android_build_template = memnew(ConfirmationDialog); install_android_build_template->set_text(TTR("This will set up your project for custom Android builds by installing the source template to \"res://android/build\".\nYou can then apply modifications and build your own custom APK on export (adding modules, changing the AndroidManifest.xml, etc.).\nNote that in order to make custom builds instead of using pre-built APKs, the \"Use Custom Build\" option should be enabled in the Android export preset.")); install_android_build_template->get_ok()->set_text(TTR("Install")); - install_android_build_template->connect("confirmed", this, "_menu_confirm_current"); + install_android_build_template->connect_compat("confirmed", this, "_menu_confirm_current"); gui_base->add_child(install_android_build_template); 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->get_ok()->set_text(TTR("Show in File Manager")); - remove_android_build_template->connect("confirmed", this, "_menu_option", varray(FILE_EXPLORE_ANDROID_BUILD_TEMPLATES)); + remove_android_build_template->connect_compat("confirmed", this, "_menu_option", varray(FILE_EXPLORE_ANDROID_BUILD_TEMPLATES)); gui_base->add_child(remove_android_build_template); file_templates = memnew(EditorFileDialog); @@ -6603,7 +6631,7 @@ EditorNode::EditorNode() { file_export_lib = memnew(EditorFileDialog); file_export_lib->set_title(TTR("Export Library")); file_export_lib->set_mode(EditorFileDialog::MODE_SAVE_FILE); - file_export_lib->connect("file_selected", this, "_dialog_action"); + file_export_lib->connect_compat("file_selected", this, "_dialog_action"); file_export_lib_merge = memnew(CheckBox); file_export_lib_merge->set_text(TTR("Merge With Existing")); file_export_lib_merge->set_pressed(true); @@ -6620,16 +6648,16 @@ EditorNode::EditorNode() { file_script->add_filter("*." + E->get()); } gui_base->add_child(file_script); - file_script->connect("file_selected", this, "_dialog_action"); + file_script->connect_compat("file_selected", this, "_dialog_action"); - file_menu->get_popup()->connect("id_pressed", this, "_menu_option"); - file_menu->connect("about_to_show", this, "_update_file_menu_opened"); - file_menu->get_popup()->connect("popup_hide", this, "_update_file_menu_closed"); + file_menu->get_popup()->connect_compat("id_pressed", this, "_menu_option"); + file_menu->connect_compat("about_to_show", this, "_update_file_menu_opened"); + file_menu->get_popup()->connect_compat("popup_hide", this, "_update_file_menu_closed"); - settings_menu->get_popup()->connect("id_pressed", this, "_menu_option"); + settings_menu->get_popup()->connect_compat("id_pressed", this, "_menu_option"); - file->connect("file_selected", this, "_dialog_action"); - file_templates->connect("file_selected", this, "_dialog_action"); + file->connect_compat("file_selected", this, "_dialog_action"); + file_templates->connect_compat("file_selected", this, "_dialog_action"); preview_gen = memnew(AudioStreamPreviewGenerator); add_child(preview_gen); @@ -6637,6 +6665,7 @@ EditorNode::EditorNode() { file_server = memnew(EditorFileServer); + add_editor_plugin(memnew(DebuggerEditorPlugin(this))); add_editor_plugin(memnew(AnimationPlayerEditorPlugin(this))); add_editor_plugin(memnew(CanvasItemEditorPlugin(this))); add_editor_plugin(memnew(SpatialEditorPlugin(this))); @@ -6765,8 +6794,8 @@ EditorNode::EditorNode() { open_imported = memnew(ConfirmationDialog); open_imported->get_ok()->set_text(TTR("Open Anyway")); new_inherited_button = open_imported->add_button(TTR("New Inherited"), !OS::get_singleton()->get_swap_ok_cancel(), "inherit"); - open_imported->connect("confirmed", this, "_open_imported"); - open_imported->connect("custom_action", this, "_inherit_imported"); + open_imported->connect_compat("confirmed", this, "_open_imported"); + open_imported->connect_compat("custom_action", this, "_inherit_imported"); gui_base->add_child(open_imported); saved_version = 1; @@ -6775,11 +6804,11 @@ EditorNode::EditorNode() { quick_open = memnew(EditorQuickOpen); gui_base->add_child(quick_open); - quick_open->connect("quick_open", this, "_quick_opened"); + quick_open->connect_compat("quick_open", this, "_quick_opened"); quick_run = memnew(EditorQuickOpen); gui_base->add_child(quick_run); - quick_run->connect("quick_open", this, "_quick_run"); + quick_run->connect_compat("quick_open", this, "_quick_run"); _update_recent_scenes(); @@ -6801,10 +6830,10 @@ EditorNode::EditorNode() { execute_output_dialog->set_title(""); gui_base->add_child(execute_output_dialog); - EditorFileSystem::get_singleton()->connect("sources_changed", this, "_sources_changed"); - EditorFileSystem::get_singleton()->connect("filesystem_changed", this, "_fs_changed"); - EditorFileSystem::get_singleton()->connect("resources_reimported", this, "_resources_reimported"); - EditorFileSystem::get_singleton()->connect("resources_reload", this, "_resources_changed"); + EditorFileSystem::get_singleton()->connect_compat("sources_changed", this, "_sources_changed"); + EditorFileSystem::get_singleton()->connect_compat("filesystem_changed", this, "_fs_changed"); + EditorFileSystem::get_singleton()->connect_compat("resources_reimported", this, "_resources_reimported"); + EditorFileSystem::get_singleton()->connect_compat("resources_reload", this, "_resources_changed"); _build_icon_type_cache(); @@ -6813,7 +6842,7 @@ EditorNode::EditorNode() { pick_main_scene = memnew(ConfirmationDialog); gui_base->add_child(pick_main_scene); pick_main_scene->get_ok()->set_text(TTR("Select")); - pick_main_scene->connect("confirmed", this, "_menu_option", varray(SETTINGS_PICK_MAIN_SCENE)); + pick_main_scene->connect_compat("confirmed", this, "_menu_option", varray(SETTINGS_PICK_MAIN_SCENE)); for (int i = 0; i < _init_callbacks.size(); i++) _init_callbacks[i](); @@ -6853,7 +6882,7 @@ EditorNode::EditorNode() { screenshot_timer = memnew(Timer); screenshot_timer->set_one_shot(true); screenshot_timer->set_wait_time(settings_menu->get_popup()->get_submenu_popup_delay() + 0.1f); - screenshot_timer->connect("timeout", this, "_request_screenshot"); + screenshot_timer->connect_compat("timeout", this, "_request_screenshot"); add_child(screenshot_timer); screenshot_timer->set_owner(get_owner()); } diff --git a/editor/editor_node.h b/editor/editor_node.h index bd2c3d73ae..a982b9d85f 100644 --- a/editor/editor_node.h +++ b/editor/editor_node.h @@ -162,6 +162,8 @@ private: RUN_PLAY_NATIVE, RUN_PLAY_CUSTOM_SCENE, RUN_SCENE_SETTINGS, + RUN_DEBUG_ONE, + RUN_DEBUG_TWO, RUN_SETTINGS, RUN_PROJECT_DATA_FOLDER, RUN_PROJECT_MANAGER, @@ -639,7 +641,7 @@ private: static void _resource_saved(RES p_resource, const String &p_path); static void _resource_loaded(RES p_resource, const String &p_path); - void _resources_changed(const PoolVector<String> &p_resources); + void _resources_changed(const Vector<String> &p_resources); void _feature_profile_changed(); bool _is_class_editor_disabled_by_feature_profile(const StringName &p_class); @@ -764,10 +766,10 @@ public: void set_convert_old_scene(bool p_old) { convert_old = p_old; } - void notify_child_process_exited(); + void notify_all_debug_sessions_exited(); - OS::ProcessID get_child_process_id() const { return editor_run.get_pid(); } - void stop_child_process(); + OS::ProcessID has_child_process(OS::ProcessID p_pid) const { return editor_run.has_child_process(p_pid); } + void stop_child_process(OS::ProcessID p_pid); Ref<Theme> get_editor_theme() const { return theme; } Ref<Script> get_object_custom_type_base(const Object *p_object) const; diff --git a/editor/editor_path.cpp b/editor/editor_path.cpp index 6a1d052e02..696474d4b1 100644 --- a/editor/editor_path.cpp +++ b/editor/editor_path.cpp @@ -106,7 +106,7 @@ void EditorPath::update_path() { if (name == "") name = r->get_class(); - } else if (obj->is_class("ScriptEditorDebuggerInspectedObject")) + } else if (obj->is_class("EditorDebuggerRemoteObject")) name = obj->call("get_title"); else if (Object::cast_to<Node>(obj)) name = Object::cast_to<Node>(obj)->get_name(); @@ -152,6 +152,6 @@ EditorPath::EditorPath(EditorHistory *p_history) { history = p_history; set_clip_text(true); set_text_align(ALIGN_LEFT); - get_popup()->connect("about_to_show", this, "_about_to_show"); - get_popup()->connect("id_pressed", this, "_id_pressed"); + get_popup()->connect_compat("about_to_show", this, "_about_to_show"); + get_popup()->connect_compat("id_pressed", this, "_id_pressed"); } diff --git a/editor/editor_plugin.cpp b/editor/editor_plugin.cpp index ce847d02eb..2135e70de3 100644 --- a/editor/editor_plugin.cpp +++ b/editor/editor_plugin.cpp @@ -688,7 +688,7 @@ void EditorPlugin::apply_changes() { void EditorPlugin::get_breakpoints(List<String> *p_breakpoints) { if (get_script_instance() && get_script_instance()->has_method("get_breakpoints")) { - PoolStringArray arr = get_script_instance()->call("get_breakpoints"); + PackedStringArray arr = get_script_instance()->call("get_breakpoints"); for (int i = 0; i < arr.size(); i++) p_breakpoints->push_back(arr[i]); } @@ -743,8 +743,8 @@ void EditorPlugin::remove_scene_import_plugin(const Ref<EditorSceneImporter> &p_ ResourceImporterScene::get_singleton()->remove_importer(p_importer); } -int find(const PoolStringArray &a, const String &v) { - PoolStringArray::Read r = a.read(); +int find(const PackedStringArray &a, const String &v) { + const String *r = a.ptr(); for (int j = 0; j < a.size(); ++j) { if (r[j] == v) { return j; @@ -872,7 +872,7 @@ void EditorPlugin::_bind_methods() { ClassDB::add_virtual_method(get_class_static(), MethodInfo("clear")); ClassDB::add_virtual_method(get_class_static(), MethodInfo("save_external_data")); ClassDB::add_virtual_method(get_class_static(), MethodInfo("apply_changes")); - ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::POOL_STRING_ARRAY, "get_breakpoints")); + ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::PACKED_STRING_ARRAY, "get_breakpoints")); ClassDB::add_virtual_method(get_class_static(), MethodInfo("set_window_layout", PropertyInfo(Variant::OBJECT, "layout", PROPERTY_HINT_RESOURCE_TYPE, "ConfigFile"))); ClassDB::add_virtual_method(get_class_static(), MethodInfo("get_window_layout", PropertyInfo(Variant::OBJECT, "layout", PROPERTY_HINT_RESOURCE_TYPE, "ConfigFile"))); ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::BOOL, "build")); diff --git a/editor/editor_plugin_settings.cpp b/editor/editor_plugin_settings.cpp index 16decf5c04..c499e52f79 100644 --- a/editor/editor_plugin_settings.cpp +++ b/editor/editor_plugin_settings.cpp @@ -43,8 +43,8 @@ void EditorPluginSettings::_notification(int p_what) { if (p_what == MainLoop::NOTIFICATION_WM_FOCUS_IN) { update_plugins(); } else if (p_what == Node::NOTIFICATION_READY) { - plugin_config_dialog->connect("plugin_ready", EditorNode::get_singleton(), "_on_plugin_ready"); - plugin_list->connect("button_pressed", this, "_cell_button_pressed"); + plugin_config_dialog->connect_compat("plugin_ready", EditorNode::get_singleton(), "_on_plugin_ready"); + plugin_list->connect_compat("button_pressed", this, "_cell_button_pressed"); } } @@ -219,10 +219,10 @@ EditorPluginSettings::EditorPluginSettings() { title_hb->add_child(memnew(Label(TTR("Installed Plugins:")))); title_hb->add_spacer(); create_plugin = memnew(Button(TTR("Create"))); - create_plugin->connect("pressed", this, "_create_clicked"); + create_plugin->connect_compat("pressed", this, "_create_clicked"); title_hb->add_child(create_plugin); update_list = memnew(Button(TTR("Update"))); - update_list->connect("pressed", this, "update_plugins"); + update_list->connect_compat("pressed", this, "update_plugins"); title_hb->add_child(update_list); add_child(title_hb); @@ -245,7 +245,7 @@ EditorPluginSettings::EditorPluginSettings() { plugin_list->set_column_min_width(3, 80 * EDSCALE); plugin_list->set_column_min_width(4, 40 * EDSCALE); plugin_list->set_hide_root(true); - plugin_list->connect("item_edited", this, "_plugin_activity_changed"); + plugin_list->connect_compat("item_edited", this, "_plugin_activity_changed"); VBoxContainer *mc = memnew(VBoxContainer); mc->add_child(plugin_list); diff --git a/editor/editor_profiler.cpp b/editor/editor_profiler.cpp index 3ac4fcc21b..dd784c0980 100644 --- a/editor/editor_profiler.cpp +++ b/editor/editor_profiler.cpp @@ -175,7 +175,7 @@ void EditorProfiler::_update_plot() { graph_image.resize(desired_len); } - PoolVector<uint8_t>::Write wr = graph_image.write(); + uint8_t *wr = graph_image.ptrw(); const Color background_color = get_color("dark_color_2", "Editor"); // Clear the previous frame and set the background color. @@ -342,8 +342,6 @@ void EditorProfiler::_update_plot() { } } - wr.release(); - Ref<Image> img; img.instance(); img->create(w, h, 0, Image::FORMAT_RGBA8, graph_image); @@ -688,12 +686,12 @@ EditorProfiler::EditorProfiler() { activate = memnew(Button); activate->set_toggle_mode(true); activate->set_text(TTR("Start")); - activate->connect("pressed", this, "_activate_pressed"); + activate->connect_compat("pressed", this, "_activate_pressed"); hb->add_child(activate); clear_button = memnew(Button); clear_button->set_text(TTR("Clear")); - clear_button->connect("pressed", this, "_clear_pressed"); + clear_button->connect_compat("pressed", this, "_clear_pressed"); hb->add_child(clear_button); hb->add_child(memnew(Label(TTR("Measure:")))); @@ -703,7 +701,7 @@ EditorProfiler::EditorProfiler() { display_mode->add_item(TTR("Average Time (sec)")); display_mode->add_item(TTR("Frame %")); display_mode->add_item(TTR("Physics Frame %")); - display_mode->connect("item_selected", this, "_combo_changed"); + display_mode->connect_compat("item_selected", this, "_combo_changed"); hb->add_child(display_mode); @@ -712,7 +710,7 @@ EditorProfiler::EditorProfiler() { display_time = memnew(OptionButton); display_time->add_item(TTR("Inclusive")); display_time->add_item(TTR("Self")); - display_time->connect("item_selected", this, "_combo_changed"); + display_time->connect_compat("item_selected", this, "_combo_changed"); hb->add_child(display_time); @@ -723,7 +721,7 @@ EditorProfiler::EditorProfiler() { cursor_metric_edit = memnew(SpinBox); cursor_metric_edit->set_h_size_flags(SIZE_FILL); hb->add_child(cursor_metric_edit); - cursor_metric_edit->connect("value_changed", this, "_cursor_metric_changed"); + cursor_metric_edit->connect_compat("value_changed", this, "_cursor_metric_changed"); hb->add_constant_override("separation", 8 * EDSCALE); @@ -747,14 +745,14 @@ EditorProfiler::EditorProfiler() { variables->set_column_title(2, TTR("Calls")); variables->set_column_expand(2, false); variables->set_column_min_width(2, 60 * EDSCALE); - variables->connect("item_edited", this, "_item_edited"); + variables->connect_compat("item_edited", this, "_item_edited"); graph = memnew(TextureRect); graph->set_expand(true); graph->set_mouse_filter(MOUSE_FILTER_STOP); - graph->connect("draw", this, "_graph_tex_draw"); - graph->connect("gui_input", this, "_graph_tex_input"); - graph->connect("mouse_exited", this, "_graph_tex_mouse_exit"); + graph->connect_compat("draw", this, "_graph_tex_draw"); + graph->connect_compat("gui_input", this, "_graph_tex_input"); + graph->connect_compat("mouse_exited", this, "_graph_tex_mouse_exit"); h_split->add_child(graph); graph->set_h_size_flags(SIZE_EXPAND_FILL); @@ -770,13 +768,13 @@ EditorProfiler::EditorProfiler() { frame_delay->set_wait_time(0.1); frame_delay->set_one_shot(true); add_child(frame_delay); - frame_delay->connect("timeout", this, "_update_frame"); + frame_delay->connect_compat("timeout", this, "_update_frame"); plot_delay = memnew(Timer); plot_delay->set_wait_time(0.1); plot_delay->set_one_shot(true); add_child(plot_delay); - plot_delay->connect("timeout", this, "_update_plot"); + plot_delay->connect_compat("timeout", this, "_update_plot"); plot_sigs.insert("physics_frame_time"); plot_sigs.insert("category_frame_time"); diff --git a/editor/editor_profiler.h b/editor/editor_profiler.h index f8accdf6d2..0a442ddd5c 100644 --- a/editor/editor_profiler.h +++ b/editor/editor_profiler.h @@ -103,7 +103,7 @@ private: Button *clear_button; TextureRect *graph; Ref<ImageTexture> graph_texture; - PoolVector<uint8_t> graph_image; + Vector<uint8_t> graph_image; Tree *variables; HSplitContainer *h_split; diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp index 905e928c5a..e154b13eac 100644 --- a/editor/editor_properties.cpp +++ b/editor/editor_properties.cpp @@ -64,7 +64,11 @@ void EditorPropertyText::_text_changed(const String &p_string) { if (updating) return; - emit_changed(get_edited_property(), p_string, "", true); + if (string_name) { + emit_changed(get_edited_property(), StringName(p_string), "", true); + } else { + emit_changed(get_edited_property(), p_string, "", true); + } } void EditorPropertyText::update_property() { @@ -75,6 +79,9 @@ void EditorPropertyText::update_property() { updating = false; } +void EditorPropertyText::set_string_name(bool p_enabled) { + string_name = p_enabled; +} void EditorPropertyText::set_placeholder(const String &p_string) { text->set_placeholder(p_string); } @@ -89,9 +96,10 @@ EditorPropertyText::EditorPropertyText() { text = memnew(LineEdit); add_child(text); add_focusable(text); - text->connect("text_changed", this, "_text_changed"); - text->connect("text_entered", this, "_text_entered"); + text->connect_compat("text_changed", this, "_text_changed"); + text->connect_compat("text_entered", this, "_text_entered"); + string_name = false; updating = false; } @@ -110,7 +118,7 @@ void EditorPropertyMultilineText::_open_big_text() { if (!big_text_dialog) { big_text = memnew(TextEdit); - big_text->connect("text_changed", this, "_big_text_changed"); + big_text->connect_compat("text_changed", this, "_big_text_changed"); big_text->set_wrap_enabled(true); big_text_dialog = memnew(AcceptDialog); big_text_dialog->add_child(big_text); @@ -156,13 +164,13 @@ EditorPropertyMultilineText::EditorPropertyMultilineText() { add_child(hb); set_bottom_editor(hb); text = memnew(TextEdit); - text->connect("text_changed", this, "_text_changed"); + text->connect_compat("text_changed", this, "_text_changed"); text->set_wrap_enabled(true); add_focusable(text); hb->add_child(text); text->set_h_size_flags(SIZE_EXPAND_FILL); open_big_text = memnew(ToolButton); - open_big_text->connect("pressed", this, "_open_big_text"); + open_big_text->connect_compat("pressed", this, "_open_big_text"); hb->add_child(open_big_text); big_text_dialog = NULL; big_text = NULL; @@ -172,7 +180,12 @@ EditorPropertyMultilineText::EditorPropertyMultilineText() { void EditorPropertyTextEnum::_option_selected(int p_which) { - emit_changed(get_edited_property(), options->get_item_text(p_which)); + if (string_name) { + + emit_changed(get_edited_property(), StringName(options->get_item_text(p_which))); + } else { + emit_changed(get_edited_property(), options->get_item_text(p_which)); + } } void EditorPropertyTextEnum::update_property() { @@ -187,10 +200,11 @@ void EditorPropertyTextEnum::update_property() { } } -void EditorPropertyTextEnum::setup(const Vector<String> &p_options) { +void EditorPropertyTextEnum::setup(const Vector<String> &p_options, bool p_string_name) { for (int i = 0; i < p_options.size(); i++) { options->add_item(p_options[i], i); } + string_name = p_string_name; } void EditorPropertyTextEnum::_bind_methods() { @@ -202,10 +216,11 @@ EditorPropertyTextEnum::EditorPropertyTextEnum() { options = memnew(OptionButton); options->set_clip_text(true); options->set_flat(true); + string_name = false; add_child(options); add_focusable(options); - options->connect("item_selected", this, "_option_selected"); + options->connect_compat("item_selected", this, "_option_selected"); } ///////////////////// PATH ///////////////////////// @@ -218,8 +233,8 @@ void EditorPropertyPath::_path_pressed() { if (!dialog) { dialog = memnew(EditorFileDialog); - dialog->connect("file_selected", this, "_path_selected"); - dialog->connect("dir_selected", this, "_path_selected"); + dialog->connect_compat("file_selected", this, "_path_selected"); + dialog->connect_compat("dir_selected", this, "_path_selected"); add_child(dialog); } @@ -293,8 +308,8 @@ EditorPropertyPath::EditorPropertyPath() { add_child(path_hb); path = memnew(LineEdit); path_hb->add_child(path); - path->connect("text_entered", this, "_path_selected"); - path->connect("focus_exited", this, "_path_focus_exited"); + path->connect_compat("text_entered", this, "_path_selected"); + path->connect_compat("focus_exited", this, "_path_focus_exited"); path->set_h_size_flags(SIZE_EXPAND_FILL); path_edit = memnew(Button); @@ -302,7 +317,7 @@ EditorPropertyPath::EditorPropertyPath() { path_hb->add_child(path_edit); add_focusable(path); dialog = NULL; - path_edit->connect("pressed", this, "_path_pressed"); + path_edit->connect_compat("pressed", this, "_path_pressed"); folder = false; global = false; save_mode = false; @@ -346,10 +361,10 @@ EditorPropertyClassName::EditorPropertyClassName() { add_child(property); add_focusable(property); property->set_text(selected_type); - property->connect("pressed", this, "_property_selected"); + property->connect_compat("pressed", this, "_property_selected"); dialog = memnew(CreateDialog); dialog->set_base_type(base_type); - dialog->connect("create", this, "_dialog_created"); + dialog->connect_compat("create", this, "_dialog_created"); add_child(dialog); } @@ -365,7 +380,7 @@ void EditorPropertyMember::_property_select() { if (!selector) { selector = memnew(PropertySelector); - selector->connect("selected", this, "_property_selected"); + selector->connect_compat("selected", this, "_property_selected"); add_child(selector); } @@ -455,7 +470,7 @@ EditorPropertyMember::EditorPropertyMember() { property->set_clip_text(true); add_child(property); add_focusable(property); - property->connect("pressed", this, "_property_select"); + property->connect_compat("pressed", this, "_property_select"); } ///////////////////// CHECK ///////////////////////// @@ -480,7 +495,7 @@ EditorPropertyCheck::EditorPropertyCheck() { checkbox->set_text(TTR("On")); add_child(checkbox); add_focusable(checkbox); - checkbox->connect("pressed", this, "_checkbox_pressed"); + checkbox->connect_compat("pressed", this, "_checkbox_pressed"); } ///////////////////// ENUM ///////////////////////// @@ -531,7 +546,7 @@ EditorPropertyEnum::EditorPropertyEnum() { options->set_flat(true); add_child(options); add_focusable(options); - options->connect("item_selected", this, "_option_selected"); + options->connect_compat("item_selected", this, "_option_selected"); } ///////////////////// FLAGS ///////////////////////// @@ -576,7 +591,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", this, "_flag_toggled"); + cb->connect_compat("pressed", this, "_flag_toggled"); add_focusable(cb); vbox->add_child(cb); flags.push_back(cb); @@ -787,20 +802,20 @@ EditorPropertyLayers::EditorPropertyLayers() { HBoxContainer *hb = memnew(HBoxContainer); add_child(hb); grid = memnew(EditorPropertyLayersGrid); - grid->connect("flag_changed", this, "_grid_changed"); + grid->connect_compat("flag_changed", this, "_grid_changed"); grid->set_h_size_flags(SIZE_EXPAND_FILL); hb->add_child(grid); button = memnew(Button); button->set_toggle_mode(true); button->set_text(".."); - button->connect("pressed", this, "_button_pressed"); + button->connect_compat("pressed", this, "_button_pressed"); hb->add_child(button); set_bottom_editor(hb); layers = memnew(PopupMenu); add_child(layers); layers->set_hide_on_checkable_item_selection(false); - layers->connect("id_pressed", this, "_menu_pressed"); - layers->connect("popup_hide", button, "set_pressed", varray(false)); + layers->connect_compat("id_pressed", this, "_menu_pressed"); + layers->connect_compat("popup_hide", button, "set_pressed", varray(false)); } ///////////////////// INT ///////////////////////// @@ -841,7 +856,7 @@ EditorPropertyInteger::EditorPropertyInteger() { spin->set_flat(true); add_child(spin); add_focusable(spin); - spin->connect("value_changed", this, "_value_changed"); + spin->connect_compat("value_changed", this, "_value_changed"); setting = false; } @@ -881,7 +896,7 @@ EditorPropertyObjectID::EditorPropertyObjectID() { edit = memnew(Button); add_child(edit); add_focusable(edit); - edit->connect("pressed", this, "_edit_pressed"); + edit->connect_compat("pressed", this, "_edit_pressed"); } ///////////////////// FLOAT ///////////////////////// @@ -921,7 +936,7 @@ EditorPropertyFloat::EditorPropertyFloat() { spin->set_flat(true); add_child(spin); add_focusable(spin); - spin->connect("value_changed", this, "_value_changed"); + spin->connect_compat("value_changed", this, "_value_changed"); setting = false; } @@ -1100,14 +1115,14 @@ void EditorPropertyEasing::_bind_methods() { EditorPropertyEasing::EditorPropertyEasing() { easing_draw = memnew(Control); - easing_draw->connect("draw", this, "_draw_easing"); - easing_draw->connect("gui_input", this, "_drag_easing"); + easing_draw->connect_compat("draw", this, "_draw_easing"); + easing_draw->connect_compat("gui_input", this, "_drag_easing"); easing_draw->set_default_cursor_shape(Control::CURSOR_MOVE); add_child(easing_draw); preset = memnew(PopupMenu); add_child(preset); - preset->connect("id_pressed", this, "_set_preset"); + preset->connect_compat("id_pressed", this, "_set_preset"); spin = memnew(EditorSpinSlider); spin->set_flat(true); @@ -1117,8 +1132,8 @@ EditorPropertyEasing::EditorPropertyEasing() { spin->set_hide_slider(true); spin->set_allow_lesser(true); spin->set_allow_greater(true); - spin->connect("value_changed", this, "_spin_value_changed"); - spin->get_line_edit()->connect("focus_exited", this, "_spin_focus_exited"); + spin->connect_compat("value_changed", this, "_spin_value_changed"); + spin->get_line_edit()->connect_compat("focus_exited", this, "_spin_focus_exited"); spin->hide(); add_child(spin); @@ -1196,7 +1211,7 @@ EditorPropertyVector2::EditorPropertyVector2() { spin[i]->set_label(desc[i]); bc->add_child(spin[i]); add_focusable(spin[i]); - spin[i]->connect("value_changed", this, "_value_changed", varray(desc[i])); + spin[i]->connect_compat("value_changed", this, "_value_changed", varray(desc[i])); if (horizontal) { spin[i]->set_h_size_flags(SIZE_EXPAND_FILL); } @@ -1280,7 +1295,7 @@ EditorPropertyRect2::EditorPropertyRect2() { spin[i]->set_flat(true); bc->add_child(spin[i]); add_focusable(spin[i]); - spin[i]->connect("value_changed", this, "_value_changed", varray(desc[i])); + spin[i]->connect_compat("value_changed", this, "_value_changed", varray(desc[i])); if (horizontal) { spin[i]->set_h_size_flags(SIZE_EXPAND_FILL); } @@ -1361,7 +1376,7 @@ EditorPropertyVector3::EditorPropertyVector3() { spin[i]->set_label(desc[i]); bc->add_child(spin[i]); add_focusable(spin[i]); - spin[i]->connect("value_changed", this, "_value_changed", varray(desc[i])); + spin[i]->connect_compat("value_changed", this, "_value_changed", varray(desc[i])); if (horizontal) { spin[i]->set_h_size_flags(SIZE_EXPAND_FILL); } @@ -1444,7 +1459,7 @@ EditorPropertyPlane::EditorPropertyPlane() { spin[i]->set_label(desc[i]); bc->add_child(spin[i]); add_focusable(spin[i]); - spin[i]->connect("value_changed", this, "_value_changed", varray(desc[i])); + spin[i]->connect_compat("value_changed", this, "_value_changed", varray(desc[i])); if (horizontal) { spin[i]->set_h_size_flags(SIZE_EXPAND_FILL); } @@ -1527,7 +1542,7 @@ EditorPropertyQuat::EditorPropertyQuat() { spin[i]->set_label(desc[i]); bc->add_child(spin[i]); add_focusable(spin[i]); - spin[i]->connect("value_changed", this, "_value_changed", varray(desc[i])); + spin[i]->connect_compat("value_changed", this, "_value_changed", varray(desc[i])); if (horizontal) { spin[i]->set_h_size_flags(SIZE_EXPAND_FILL); } @@ -1609,7 +1624,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", this, "_value_changed", varray(desc[i])); + spin[i]->connect_compat("value_changed", this, "_value_changed", varray(desc[i])); } set_bottom_editor(g); setting = false; @@ -1684,7 +1699,7 @@ EditorPropertyTransform2D::EditorPropertyTransform2D() { g->add_child(spin[i]); spin[i]->set_h_size_flags(SIZE_EXPAND_FILL); add_focusable(spin[i]); - spin[i]->connect("value_changed", this, "_value_changed", varray(desc[i])); + spin[i]->connect_compat("value_changed", this, "_value_changed", varray(desc[i])); } set_bottom_editor(g); setting = false; @@ -1765,7 +1780,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", this, "_value_changed", varray(desc[i])); + spin[i]->connect_compat("value_changed", this, "_value_changed", varray(desc[i])); } set_bottom_editor(g); setting = false; @@ -1852,7 +1867,7 @@ EditorPropertyTransform::EditorPropertyTransform() { g->add_child(spin[i]); spin[i]->set_h_size_flags(SIZE_EXPAND_FILL); add_focusable(spin[i]); - spin[i]->connect("value_changed", this, "_value_changed", varray(desc[i])); + spin[i]->connect_compat("value_changed", this, "_value_changed", varray(desc[i])); } set_bottom_editor(g); setting = false; @@ -1917,9 +1932,9 @@ EditorPropertyColor::EditorPropertyColor() { picker = memnew(ColorPickerButton); add_child(picker); picker->set_flat(true); - picker->connect("color_changed", this, "_color_changed"); - picker->connect("popup_closed", this, "_popup_closed"); - picker->connect("picker_created", this, "_picker_created"); + picker->connect_compat("color_changed", this, "_color_changed"); + picker->connect_compat("popup_closed", this, "_popup_closed"); + picker->connect_compat("picker_created", this, "_picker_created"); } ////////////// NODE PATH ////////////////////// @@ -1966,7 +1981,7 @@ void EditorPropertyNodePath::_node_assign() { scene_tree->get_scene_tree()->set_show_enabled_subscene(true); scene_tree->get_scene_tree()->set_valid_types(valid_types); add_child(scene_tree); - scene_tree->connect("selected", this, "_node_selected"); + scene_tree->connect_compat("selected", this, "_node_selected"); } scene_tree->popup_centered_ratio(); } @@ -2048,12 +2063,12 @@ EditorPropertyNodePath::EditorPropertyNodePath() { assign->set_flat(true); assign->set_h_size_flags(SIZE_EXPAND_FILL); assign->set_clip_text(true); - assign->connect("pressed", this, "_node_assign"); + assign->connect_compat("pressed", this, "_node_assign"); hbc->add_child(assign); clear = memnew(Button); clear->set_flat(true); - clear->connect("pressed", this, "_node_clear"); + clear->connect_compat("pressed", this, "_node_clear"); hbc->add_child(clear); use_path_from_scene_root = false; @@ -2120,7 +2135,7 @@ void EditorPropertyResource::_menu_option(int p_which) { if (!file) { file = memnew(EditorFileDialog); - file->connect("file_selected", this, "_file_selected"); + file->connect_compat("file_selected", this, "_file_selected"); add_child(file); } file->set_mode(EditorFileDialog::MODE_OPEN_FILE); @@ -2289,7 +2304,7 @@ void EditorPropertyResource::_menu_option(int p_which) { scene_tree->get_scene_tree()->set_valid_types(valid_types); scene_tree->get_scene_tree()->set_show_enabled_subscene(true); add_child(scene_tree); - scene_tree->connect("selected", this, "_viewport_selected"); + scene_tree->connect_compat("selected", this, "_viewport_selected"); scene_tree->set_title(TTR("Pick a Viewport")); } scene_tree->popup_centered_ratio(); @@ -2607,9 +2622,9 @@ void EditorPropertyResource::update_property() { sub_inspector->set_sub_inspector(true); sub_inspector->set_enable_capitalize_paths(true); - sub_inspector->connect("property_keyed", this, "_sub_inspector_property_keyed"); - sub_inspector->connect("resource_selected", this, "_sub_inspector_resource_selected"); - sub_inspector->connect("object_id_selected", this, "_sub_inspector_object_id_selected"); + sub_inspector->connect_compat("property_keyed", this, "_sub_inspector_property_keyed"); + sub_inspector->connect_compat("resource_selected", this, "_sub_inspector_resource_selected"); + sub_inspector->connect_compat("object_id_selected", this, "_sub_inspector_object_id_selected"); sub_inspector->set_keying(is_keying()); sub_inspector->set_read_only(is_read_only()); sub_inspector->set_use_folding(is_using_folding()); @@ -2892,9 +2907,9 @@ EditorPropertyResource::EditorPropertyResource() { assign->set_flat(true); assign->set_h_size_flags(SIZE_EXPAND_FILL); assign->set_clip_text(true); - assign->connect("pressed", this, "_resource_selected"); + assign->connect_compat("pressed", this, "_resource_selected"); assign->set_drag_forwarding(this); - assign->connect("draw", this, "_button_draw"); + assign->connect_compat("draw", this, "_button_draw"); hbc->add_child(assign); add_focusable(assign); @@ -2905,18 +2920,18 @@ EditorPropertyResource::EditorPropertyResource() { preview->set_margin(MARGIN_BOTTOM, -1); preview->set_margin(MARGIN_RIGHT, -1); assign->add_child(preview); - assign->connect("gui_input", this, "_button_input"); + assign->connect_compat("gui_input", this, "_button_input"); menu = memnew(PopupMenu); add_child(menu); edit = memnew(Button); edit->set_flat(true); edit->set_toggle_mode(true); - menu->connect("id_pressed", this, "_menu_option"); - menu->connect("popup_hide", edit, "set_pressed", varray(false)); - edit->connect("pressed", this, "_update_menu"); + menu->connect_compat("id_pressed", this, "_menu_option"); + menu->connect_compat("popup_hide", edit, "set_pressed", varray(false)); + edit->connect_compat("pressed", this, "_update_menu"); hbc->add_child(edit); - edit->connect("gui_input", this, "_button_input"); + edit->connect_compat("gui_input", this, "_button_input"); add_focusable(edit); file = NULL; @@ -3024,7 +3039,7 @@ bool EditorInspectorDefaultPlugin::parse_property(Object *p_object, Variant::Typ add_property_editor(p_path, editor); } } break; - case Variant::REAL: { + case Variant::FLOAT: { if (p_hint == PROPERTY_HINT_EXP_EASING) { EditorPropertyEasing *editor = memnew(EditorPropertyEasing); @@ -3158,7 +3173,7 @@ bool EditorInspectorDefaultPlugin::parse_property(Object *p_object, Variant::Typ editor->setup(min, max, step, hide_slider); add_property_editor(p_path, editor); - } break; // 5 + } break; case Variant::RECT2: { EditorPropertyRect2 *editor = memnew(EditorPropertyRect2); double min = -65535, max = 65535, step = default_float_step; @@ -3245,7 +3260,7 @@ bool EditorInspectorDefaultPlugin::parse_property(Object *p_object, Variant::Typ editor->setup(min, max, step, hide_slider); add_property_editor(p_path, editor); - } break; // 10 + } break; case Variant::AABB: { EditorPropertyAABB *editor = memnew(EditorPropertyAABB); double min = -65535, max = 65535, step = default_float_step; @@ -3305,6 +3320,22 @@ bool EditorInspectorDefaultPlugin::parse_property(Object *p_object, Variant::Typ editor->setup(p_hint != PROPERTY_HINT_COLOR_NO_ALPHA); add_property_editor(p_path, editor); } break; + case Variant::STRING_NAME: { + + if (p_hint == PROPERTY_HINT_ENUM) { + EditorPropertyTextEnum *editor = memnew(EditorPropertyTextEnum); + Vector<String> options = p_hint_text.split(","); + editor->setup(options, true); + add_property_editor(p_path, editor); + } else { + EditorPropertyText *editor = memnew(EditorPropertyText); + if (p_hint == PROPERTY_HINT_PLACEHOLDER_TEXT) { + editor->set_placeholder(p_hint_text); + } + editor->set_string_name(true); + add_property_editor(p_path, editor); + } + } break; case Variant::NODE_PATH: { EditorPropertyNodePath *editor = memnew(EditorPropertyNodePath); @@ -3318,7 +3349,7 @@ bool EditorInspectorDefaultPlugin::parse_property(Object *p_object, Variant::Typ } add_property_editor(p_path, editor); - } break; // 15 + } break; case Variant::_RID: { EditorPropertyRID *editor = memnew(EditorPropertyRID); add_property_editor(p_path, editor); @@ -3353,39 +3384,49 @@ bool EditorInspectorDefaultPlugin::parse_property(Object *p_object, Variant::Typ editor->setup(Variant::ARRAY, p_hint_text); add_property_editor(p_path, editor); } break; - case Variant::POOL_BYTE_ARRAY: { + case Variant::PACKED_BYTE_ARRAY: { EditorPropertyArray *editor = memnew(EditorPropertyArray); - editor->setup(Variant::POOL_BYTE_ARRAY); + editor->setup(Variant::PACKED_BYTE_ARRAY); add_property_editor(p_path, editor); - } break; // 20 - case Variant::POOL_INT_ARRAY: { + } break; + case Variant::PACKED_INT32_ARRAY: { EditorPropertyArray *editor = memnew(EditorPropertyArray); - editor->setup(Variant::POOL_INT_ARRAY); + editor->setup(Variant::PACKED_INT32_ARRAY); add_property_editor(p_path, editor); } break; - case Variant::POOL_REAL_ARRAY: { + case Variant::PACKED_INT64_ARRAY: { EditorPropertyArray *editor = memnew(EditorPropertyArray); - editor->setup(Variant::POOL_REAL_ARRAY); + editor->setup(Variant::PACKED_INT64_ARRAY); add_property_editor(p_path, editor); } break; - case Variant::POOL_STRING_ARRAY: { + case Variant::PACKED_FLOAT32_ARRAY: { EditorPropertyArray *editor = memnew(EditorPropertyArray); - editor->setup(Variant::POOL_STRING_ARRAY); + editor->setup(Variant::PACKED_FLOAT32_ARRAY); add_property_editor(p_path, editor); } break; - case Variant::POOL_VECTOR2_ARRAY: { + case Variant::PACKED_FLOAT64_ARRAY: { EditorPropertyArray *editor = memnew(EditorPropertyArray); - editor->setup(Variant::POOL_VECTOR2_ARRAY); + editor->setup(Variant::PACKED_FLOAT64_ARRAY); add_property_editor(p_path, editor); } break; - case Variant::POOL_VECTOR3_ARRAY: { + case Variant::PACKED_STRING_ARRAY: { EditorPropertyArray *editor = memnew(EditorPropertyArray); - editor->setup(Variant::POOL_VECTOR3_ARRAY); + editor->setup(Variant::PACKED_STRING_ARRAY); add_property_editor(p_path, editor); - } break; // 25 - case Variant::POOL_COLOR_ARRAY: { + } break; + case Variant::PACKED_VECTOR2_ARRAY: { + EditorPropertyArray *editor = memnew(EditorPropertyArray); + editor->setup(Variant::PACKED_VECTOR2_ARRAY); + add_property_editor(p_path, editor); + } break; + case Variant::PACKED_VECTOR3_ARRAY: { + EditorPropertyArray *editor = memnew(EditorPropertyArray); + editor->setup(Variant::PACKED_VECTOR3_ARRAY); + add_property_editor(p_path, editor); + } break; + case Variant::PACKED_COLOR_ARRAY: { EditorPropertyArray *editor = memnew(EditorPropertyArray); - editor->setup(Variant::POOL_COLOR_ARRAY); + editor->setup(Variant::PACKED_COLOR_ARRAY); add_property_editor(p_path, editor); } break; default: { diff --git a/editor/editor_properties.h b/editor/editor_properties.h index 7c343f1c67..c5fc8aaf77 100644 --- a/editor/editor_properties.h +++ b/editor/editor_properties.h @@ -53,6 +53,7 @@ class EditorPropertyText : public EditorProperty { LineEdit *text; bool updating; + bool string_name; void _text_changed(const String &p_string); void _text_entered(const String &p_string); @@ -60,6 +61,7 @@ protected: static void _bind_methods(); public: + void set_string_name(bool p_enabled); virtual void update_property(); void set_placeholder(const String &p_string); EditorPropertyText(); @@ -91,12 +93,13 @@ class EditorPropertyTextEnum : public EditorProperty { OptionButton *options; void _option_selected(int p_which); + bool string_name; protected: static void _bind_methods(); public: - void setup(const Vector<String> &p_options); + void setup(const Vector<String> &p_options, bool p_string_name = false); virtual void update_property(); EditorPropertyTextEnum(); }; diff --git a/editor/editor_properties_array_dict.cpp b/editor/editor_properties_array_dict.cpp index 0dc67b298f..541069338c 100644 --- a/editor/editor_properties_array_dict.cpp +++ b/editor/editor_properties_array_dict.cpp @@ -198,7 +198,7 @@ void EditorPropertyArray::_change_type_menu(int p_index) { } Variant value; - Variant::CallError ce; + Callable::CallError ce; value = Variant::construct(Variant::Type(p_index), NULL, 0, ce); Variant array = object->get_array(); array.set(changing_type_idx, value); @@ -225,36 +225,35 @@ void EditorPropertyArray::update_property() { switch (array_type) { case Variant::ARRAY: { arrtype = "Array"; - } break; // arrays - case Variant::POOL_BYTE_ARRAY: { - arrtype = "PoolByteArray"; - + case Variant::PACKED_BYTE_ARRAY: { + arrtype = "PackedByteArray"; } break; - case Variant::POOL_INT_ARRAY: { - arrtype = "PoolIntArray"; - + case Variant::PACKED_INT32_ARRAY: { + arrtype = "PackedInt32Array"; } break; - case Variant::POOL_REAL_ARRAY: { - - arrtype = "PoolFloatArray"; + case Variant::PACKED_FLOAT32_ARRAY: { + arrtype = "PackedFloat32Array"; } break; - case Variant::POOL_STRING_ARRAY: { - - arrtype = "PoolStringArray"; + case Variant::PACKED_INT64_ARRAY: { + arrtype = "PackedInt64Array"; } break; - case Variant::POOL_VECTOR2_ARRAY: { - - arrtype = "PoolVector2Array"; + case Variant::PACKED_FLOAT64_ARRAY: { + arrtype = "PackedFloat64Array"; } break; - case Variant::POOL_VECTOR3_ARRAY: { - arrtype = "PoolVector3Array"; - + case Variant::PACKED_STRING_ARRAY: { + arrtype = "PackedStringArray"; + } break; + case Variant::PACKED_VECTOR2_ARRAY: { + arrtype = "PackedVector2Array"; } break; - case Variant::POOL_COLOR_ARRAY: { - arrtype = "PoolColorArray"; + case Variant::PACKED_VECTOR3_ARRAY: { + arrtype = "PackedVector3Array"; + } break; + case Variant::PACKED_COLOR_ARRAY: { + arrtype = "PackedColorArray"; } break; default: { } @@ -297,7 +296,7 @@ void EditorPropertyArray::update_property() { length->set_max(1000000); length->set_h_size_flags(SIZE_EXPAND_FILL); hbc->add_child(length); - length->connect("value_changed", this, "_length_changed"); + length->connect_compat("value_changed", this, "_length_changed"); page_hb = memnew(HBoxContainer); vbox->add_child(page_hb); @@ -308,7 +307,7 @@ void EditorPropertyArray::update_property() { page->set_step(1); page_hb->add_child(page); page->set_h_size_flags(SIZE_EXPAND_FILL); - page->connect("value_changed", this, "_page_changed"); + page->connect_compat("value_changed", this, "_page_changed"); } else { //bye bye children of the box while (vbox->get_child_count() > 2) { @@ -360,8 +359,8 @@ void EditorPropertyArray::update_property() { prop->set_object_and_property(object.ptr(), prop_name); prop->set_label(itos(i + offset)); prop->set_selectable(false); - prop->connect("property_changed", this, "_property_changed"); - prop->connect("object_id_selected", this, "_object_id_selected"); + prop->connect_compat("property_changed", this, "_property_changed"); + prop->connect_compat("object_id_selected", this, "_object_id_selected"); prop->set_h_size_flags(SIZE_EXPAND_FILL); HBoxContainer *hb = memnew(HBoxContainer); @@ -376,12 +375,12 @@ void EditorPropertyArray::update_property() { Button *edit = memnew(Button); edit->set_icon(get_icon("Edit", "EditorIcons")); hb->add_child(edit); - edit->connect("pressed", this, "_change_type", varray(edit, i + offset)); + edit->connect_compat("pressed", this, "_change_type", varray(edit, i + offset)); } else { Button *remove = memnew(Button); remove->set_icon(get_icon("Remove", "EditorIcons")); - remove->connect("pressed", this, "_remove_pressed", varray(i + offset)); + remove->connect_compat("pressed", this, "_remove_pressed", varray(i + offset)); hb->add_child(remove); } @@ -419,7 +418,7 @@ void EditorPropertyArray::_edit_pressed() { Variant array = get_edited_object()->get(get_edited_property()); if (!array.is_array()) { - Variant::CallError ce; + Callable::CallError ce; array = Variant::construct(array_type, NULL, 0, ce); get_edited_object()->set(get_edited_property(), array); @@ -450,7 +449,7 @@ void EditorPropertyArray::_length_changed(double p_page) { int size = array.call("size"); for (int i = previous_size; i < size; i++) { if (array.get(i).get_type() == Variant::NIL) { - Variant::CallError ce; + Callable::CallError ce; array.set(i, Variant::construct(subtype, NULL, 0, ce)); } } @@ -460,7 +459,7 @@ void EditorPropertyArray::_length_changed(double p_page) { int size = array.call("size"); // Pool*Array don't initialize their elements, have to do it manually for (int i = previous_size; i < size; i++) { - Variant::CallError ce; + Callable::CallError ce; array.set(i, Variant::construct(array.get(i).get_type(), NULL, 0, ce)); } } @@ -510,7 +509,7 @@ EditorPropertyArray::EditorPropertyArray() { edit->set_flat(true); edit->set_h_size_flags(SIZE_EXPAND_FILL); edit->set_clip_text(true); - edit->connect("pressed", this, "_edit_pressed"); + edit->connect_compat("pressed", this, "_edit_pressed"); edit->set_toggle_mode(true); add_child(edit); add_focusable(edit); @@ -520,7 +519,7 @@ EditorPropertyArray::EditorPropertyArray() { updating = false; change_type = memnew(PopupMenu); add_child(change_type); - change_type->connect("id_pressed", this, "_change_type_menu"); + change_type->connect_compat("id_pressed", this, "_change_type_menu"); for (int i = 0; i < Variant::VARIANT_MAX; i++) { String type = Variant::get_type_name(Variant::Type(i)); @@ -593,7 +592,7 @@ void EditorPropertyDictionary::_change_type_menu(int p_index) { if (changing_type_idx < 0) { Variant value; - Variant::CallError ce; + Callable::CallError ce; value = Variant::construct(Variant::Type(p_index), NULL, 0, ce); if (changing_type_idx == -1) { object->set_new_item_key(value); @@ -609,7 +608,7 @@ void EditorPropertyDictionary::_change_type_menu(int p_index) { if (p_index < Variant::VARIANT_MAX) { Variant value; - Variant::CallError ce; + Callable::CallError ce; value = Variant::construct(Variant::Type(p_index), NULL, 0, ce); Variant key = dict.get_key_at_index(changing_type_idx); dict[key] = value; @@ -668,7 +667,7 @@ void EditorPropertyDictionary::update_property() { page->set_step(1); page_hb->add_child(page); page->set_h_size_flags(SIZE_EXPAND_FILL); - page->connect("value_changed", this, "_page_changed"); + page->connect_compat("value_changed", this, "_page_changed"); } else { // Queue children for deletion, deleting immediately might cause errors. for (int i = 1; i < vbox->get_child_count(); i++) { @@ -731,7 +730,7 @@ void EditorPropertyDictionary::update_property() { prop = editor; } break; - case Variant::REAL: { + case Variant::FLOAT: { EditorPropertyFloat *editor = memnew(EditorPropertyFloat); editor->setup(-100000, 100000, 0.001, true, false, true, true); @@ -811,6 +810,12 @@ void EditorPropertyDictionary::update_property() { prop = memnew(EditorPropertyColor); } break; + case Variant::STRING_NAME: { + EditorPropertyText *ept = memnew(EditorPropertyText); + ept->set_string_name(true); + prop = ept; + + } break; case Variant::NODE_PATH: { prop = memnew(EditorPropertyNodePath); @@ -846,46 +851,58 @@ void EditorPropertyDictionary::update_property() { } break; // arrays - case Variant::POOL_BYTE_ARRAY: { + case Variant::PACKED_BYTE_ARRAY: { + + EditorPropertyArray *editor = memnew(EditorPropertyArray); + editor->setup(Variant::PACKED_BYTE_ARRAY); + prop = editor; + } break; + case Variant::PACKED_INT32_ARRAY: { + + EditorPropertyArray *editor = memnew(EditorPropertyArray); + editor->setup(Variant::PACKED_INT32_ARRAY); + prop = editor; + } break; + case Variant::PACKED_FLOAT32_ARRAY: { EditorPropertyArray *editor = memnew(EditorPropertyArray); - editor->setup(Variant::POOL_BYTE_ARRAY); + editor->setup(Variant::PACKED_FLOAT32_ARRAY); prop = editor; } break; - case Variant::POOL_INT_ARRAY: { + case Variant::PACKED_INT64_ARRAY: { EditorPropertyArray *editor = memnew(EditorPropertyArray); - editor->setup(Variant::POOL_INT_ARRAY); + editor->setup(Variant::PACKED_INT64_ARRAY); prop = editor; } break; - case Variant::POOL_REAL_ARRAY: { + case Variant::PACKED_FLOAT64_ARRAY: { EditorPropertyArray *editor = memnew(EditorPropertyArray); - editor->setup(Variant::POOL_REAL_ARRAY); + editor->setup(Variant::PACKED_FLOAT64_ARRAY); prop = editor; } break; - case Variant::POOL_STRING_ARRAY: { + case Variant::PACKED_STRING_ARRAY: { EditorPropertyArray *editor = memnew(EditorPropertyArray); - editor->setup(Variant::POOL_STRING_ARRAY); + editor->setup(Variant::PACKED_STRING_ARRAY); prop = editor; } break; - case Variant::POOL_VECTOR2_ARRAY: { + case Variant::PACKED_VECTOR2_ARRAY: { EditorPropertyArray *editor = memnew(EditorPropertyArray); - editor->setup(Variant::POOL_VECTOR2_ARRAY); + editor->setup(Variant::PACKED_VECTOR2_ARRAY); prop = editor; } break; - case Variant::POOL_VECTOR3_ARRAY: { + case Variant::PACKED_VECTOR3_ARRAY: { EditorPropertyArray *editor = memnew(EditorPropertyArray); - editor->setup(Variant::POOL_VECTOR3_ARRAY); + editor->setup(Variant::PACKED_VECTOR3_ARRAY); prop = editor; } break; - case Variant::POOL_COLOR_ARRAY: { + case Variant::PACKED_COLOR_ARRAY: { EditorPropertyArray *editor = memnew(EditorPropertyArray); - editor->setup(Variant::POOL_COLOR_ARRAY); + editor->setup(Variant::PACKED_COLOR_ARRAY); prop = editor; } break; default: { @@ -923,8 +940,8 @@ void EditorPropertyDictionary::update_property() { } prop->set_selectable(false); - prop->connect("property_changed", this, "_property_changed"); - prop->connect("object_id_selected", this, "_object_id_selected"); + prop->connect_compat("property_changed", this, "_property_changed"); + prop->connect_compat("object_id_selected", this, "_object_id_selected"); HBoxContainer *hb = memnew(HBoxContainer); if (add_vbox) { @@ -937,14 +954,14 @@ void EditorPropertyDictionary::update_property() { Button *edit = memnew(Button); edit->set_icon(get_icon("Edit", "EditorIcons")); hb->add_child(edit); - edit->connect("pressed", this, "_change_type", varray(edit, change_index)); + edit->connect_compat("pressed", this, "_change_type", varray(edit, change_index)); prop->update_property(); if (i == amount + 1) { Button *butt_add_item = memnew(Button); butt_add_item->set_text(TTR("Add Key/Value Pair")); - butt_add_item->connect("pressed", this, "_add_key_value"); + butt_add_item->connect_compat("pressed", this, "_add_key_value"); add_vbox->add_child(butt_add_item); } } @@ -971,7 +988,7 @@ void EditorPropertyDictionary::_edit_pressed() { Variant prop_val = get_edited_object()->get(get_edited_property()); if (prop_val.get_type() == Variant::NIL) { - Variant::CallError ce; + Callable::CallError ce; prop_val = Variant::construct(Variant::DICTIONARY, NULL, 0, ce); get_edited_object()->set(get_edited_property(), prop_val); } @@ -1006,7 +1023,7 @@ EditorPropertyDictionary::EditorPropertyDictionary() { edit->set_flat(true); edit->set_h_size_flags(SIZE_EXPAND_FILL); edit->set_clip_text(true); - edit->connect("pressed", this, "_edit_pressed"); + edit->connect_compat("pressed", this, "_edit_pressed"); edit->set_toggle_mode(true); add_child(edit); add_focusable(edit); @@ -1015,7 +1032,7 @@ EditorPropertyDictionary::EditorPropertyDictionary() { updating = false; change_type = memnew(PopupMenu); add_child(change_type); - change_type->connect("id_pressed", this, "_change_type_menu"); + change_type->connect_compat("id_pressed", this, "_change_type_menu"); for (int i = 0; i < Variant::VARIANT_MAX; i++) { String type = Variant::get_type_name(Variant::Type(i)); diff --git a/editor/editor_run.cpp b/editor/editor_run.cpp index ff7420e19b..3200a0ac8b 100644 --- a/editor/editor_run.cpp +++ b/editor/editor_run.cpp @@ -38,7 +38,7 @@ EditorRun::Status EditorRun::get_status() const { return status; } -Error EditorRun::run(const String &p_scene, const String &p_custom_args, const List<String> &p_breakpoints, const bool &p_skip_breakpoints) { +Error EditorRun::run(const String &p_scene, const String &p_custom_args, const List<String> &p_breakpoints, const bool &p_skip_breakpoints, const int &p_instances) { List<String> args; @@ -187,20 +187,40 @@ Error EditorRun::run(const String &p_scene, const String &p_custom_args, const L }; printf("\n"); - pid = 0; - Error err = OS::get_singleton()->execute(exec, args, false, &pid); - ERR_FAIL_COND_V(err, err); + for (int i = 0; i < p_instances; i++) { + OS::ProcessID pid = 0; + Error err = OS::get_singleton()->execute(exec, args, false, &pid); + ERR_FAIL_COND_V(err, err); + pids.push_back(pid); + } status = STATUS_PLAY; return OK; } +bool EditorRun::has_child_process(OS::ProcessID p_pid) const { + for (const List<OS::ProcessID>::Element *E = pids.front(); E; E = E->next()) { + if (E->get() == p_pid) + return true; + } + return false; +} + +void EditorRun::stop_child_process(OS::ProcessID p_pid) { + if (has_child_process(p_pid)) { + OS::get_singleton()->kill(p_pid); + pids.erase(p_pid); + } +} + void EditorRun::stop() { - if (status != STATUS_STOP && pid != 0) { + if (status != STATUS_STOP && pids.size() > 0) { - OS::get_singleton()->kill(pid); + for (List<OS::ProcessID>::Element *E = pids.front(); E; E = E->next()) { + OS::get_singleton()->kill(E->get()); + } } status = STATUS_STOP; diff --git a/editor/editor_run.h b/editor/editor_run.h index b50a2c2f0e..389a1e6b20 100644 --- a/editor/editor_run.h +++ b/editor/editor_run.h @@ -42,7 +42,7 @@ public: STATUS_STOP }; - OS::ProcessID pid; + List<OS::ProcessID> pids; private: bool debug_collisions; @@ -51,11 +51,13 @@ private: public: Status get_status() const; - Error run(const String &p_scene, const String &p_custom_args, const List<String> &p_breakpoints, const bool &p_skip_breakpoints = false); + Error run(const String &p_scene, const String &p_custom_args, const List<String> &p_breakpoints, const bool &p_skip_breakpoints = false, const int &p_instances = 1); void run_native_notify() { status = STATUS_PLAY; } void stop(); - OS::ProcessID get_pid() const { return pid; } + void stop_child_process(OS::ProcessID p_pid); + bool has_child_process(OS::ProcessID p_pid) const; + int get_child_process_count() const { return pids.size(); } void set_debug_collisions(bool p_debug); bool get_debug_collisions() const; diff --git a/editor/editor_run_native.cpp b/editor/editor_run_native.cpp index db88b0cea4..490ae19e17 100644 --- a/editor/editor_run_native.cpp +++ b/editor/editor_run_native.cpp @@ -55,8 +55,8 @@ void EditorRunNative::_notification(int p_what) { small_icon.instance(); small_icon->create_from_image(im); MenuButton *mb = memnew(MenuButton); - mb->get_popup()->connect("id_pressed", this, "_run_native", varray(i)); - mb->connect("pressed", this, "_run_native", varray(-1, i)); + mb->get_popup()->connect_compat("id_pressed", this, "_run_native", varray(i)); + mb->connect_compat("pressed", this, "_run_native", varray(-1, i)); mb->set_icon(small_icon); add_child(mb); menus[i] = mb; diff --git a/editor/editor_run_script.cpp b/editor/editor_run_script.cpp index 1f269c246a..628055cac6 100644 --- a/editor/editor_run_script.cpp +++ b/editor/editor_run_script.cpp @@ -71,10 +71,10 @@ void EditorScript::_run() { return; } - Variant::CallError ce; - ce.error = Variant::CallError::CALL_OK; + Callable::CallError ce; + ce.error = Callable::CallError::CALL_OK; get_script_instance()->call("_run", NULL, 0, ce); - if (ce.error != Variant::CallError::CALL_OK) { + if (ce.error != Callable::CallError::CALL_OK) { EditorNode::add_io_error(TTR("Couldn't run script:") + "\n " + s->get_path() + "\n" + TTR("Did you forget the '_run' method?")); } diff --git a/editor/editor_sectioned_inspector.cpp b/editor/editor_sectioned_inspector.cpp index c4a84bfcdc..e95343afc9 100644 --- a/editor/editor_sectioned_inspector.cpp +++ b/editor/editor_sectioned_inspector.cpp @@ -294,7 +294,7 @@ void SectionedInspector::register_search_box(LineEdit *p_box) { search_box = p_box; inspector->register_text_enter(p_box); - search_box->connect("text_changed", this, "_search_changed"); + search_box->connect_compat("text_changed", this, "_search_changed"); } void SectionedInspector::_search_changed(const String &p_what) { @@ -332,7 +332,7 @@ SectionedInspector::SectionedInspector() : right_vb->add_child(inspector, true); inspector->set_use_doc_hints(true); - sections->connect("cell_selected", this, "_section_selected"); + sections->connect_compat("cell_selected", this, "_section_selected"); } SectionedInspector::~SectionedInspector() { diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp index d81b9bbb82..3f3d79c83a 100644 --- a/editor/editor_settings.cpp +++ b/editor/editor_settings.cpp @@ -319,7 +319,7 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) { _initial_set("interface/editor/display_scale", 0); hints["interface/editor/display_scale"] = PropertyInfo(Variant::INT, "interface/editor/display_scale", PROPERTY_HINT_ENUM, "Auto,75%,100%,125%,150%,175%,200%,Custom", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED); _initial_set("interface/editor/custom_display_scale", 1.0f); - hints["interface/editor/custom_display_scale"] = PropertyInfo(Variant::REAL, "interface/editor/custom_display_scale", PROPERTY_HINT_RANGE, "0.5,3,0.01", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED); + hints["interface/editor/custom_display_scale"] = PropertyInfo(Variant::FLOAT, "interface/editor/custom_display_scale", PROPERTY_HINT_RANGE, "0.5,3,0.01", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED); _initial_set("interface/editor/main_font_size", 14); hints["interface/editor/main_font_size"] = PropertyInfo(Variant::INT, "interface/editor/main_font_size", PROPERTY_HINT_RANGE, "8,48,1", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED); _initial_set("interface/editor/code_font_size", 14); @@ -335,9 +335,9 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) { hints["interface/editor/code_font"] = PropertyInfo(Variant::STRING, "interface/editor/code_font", PROPERTY_HINT_GLOBAL_FILE, "*.ttf,*.otf", PROPERTY_USAGE_DEFAULT); _initial_set("interface/editor/dim_editor_on_dialog_popup", true); _initial_set("interface/editor/low_processor_mode_sleep_usec", 6900); // ~144 FPS - hints["interface/editor/low_processor_mode_sleep_usec"] = PropertyInfo(Variant::REAL, "interface/editor/low_processor_mode_sleep_usec", PROPERTY_HINT_RANGE, "1,100000,1", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED); + hints["interface/editor/low_processor_mode_sleep_usec"] = PropertyInfo(Variant::FLOAT, "interface/editor/low_processor_mode_sleep_usec", PROPERTY_HINT_RANGE, "1,100000,1", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED); _initial_set("interface/editor/unfocused_low_processor_mode_sleep_usec", 50000); // 20 FPS - hints["interface/editor/unfocused_low_processor_mode_sleep_usec"] = PropertyInfo(Variant::REAL, "interface/editor/unfocused_low_processor_mode_sleep_usec", PROPERTY_HINT_RANGE, "1,100000,1", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED); + hints["interface/editor/unfocused_low_processor_mode_sleep_usec"] = PropertyInfo(Variant::FLOAT, "interface/editor/unfocused_low_processor_mode_sleep_usec", PROPERTY_HINT_RANGE, "1,100000,1", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED); _initial_set("interface/editor/separate_distraction_mode", false); _initial_set("interface/editor/automatically_open_screenshots", true); _initial_set("interface/editor/hide_console_window", false); @@ -354,15 +354,15 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) { _initial_set("interface/theme/accent_color", Color(0.41, 0.61, 0.91)); hints["interface/theme/accent_color"] = PropertyInfo(Variant::COLOR, "interface/theme/accent_color", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT); _initial_set("interface/theme/contrast", 0.25); - hints["interface/theme/contrast"] = PropertyInfo(Variant::REAL, "interface/theme/contrast", PROPERTY_HINT_RANGE, "0.01, 1, 0.01"); + hints["interface/theme/contrast"] = PropertyInfo(Variant::FLOAT, "interface/theme/contrast", PROPERTY_HINT_RANGE, "0.01, 1, 0.01"); _initial_set("interface/theme/relationship_line_opacity", 0.1); - hints["interface/theme/relationship_line_opacity"] = PropertyInfo(Variant::REAL, "interface/theme/relationship_line_opacity", PROPERTY_HINT_RANGE, "0.00, 1, 0.01"); + hints["interface/theme/relationship_line_opacity"] = PropertyInfo(Variant::FLOAT, "interface/theme/relationship_line_opacity", PROPERTY_HINT_RANGE, "0.00, 1, 0.01"); _initial_set("interface/theme/highlight_tabs", false); _initial_set("interface/theme/border_size", 1); _initial_set("interface/theme/use_graph_node_headers", false); hints["interface/theme/border_size"] = PropertyInfo(Variant::INT, "interface/theme/border_size", PROPERTY_HINT_RANGE, "0,2,1", PROPERTY_USAGE_DEFAULT); _initial_set("interface/theme/additional_spacing", 0); - hints["interface/theme/additional_spacing"] = PropertyInfo(Variant::REAL, "interface/theme/additional_spacing", PROPERTY_HINT_RANGE, "0,5,0.1", PROPERTY_USAGE_DEFAULT); + hints["interface/theme/additional_spacing"] = PropertyInfo(Variant::FLOAT, "interface/theme/additional_spacing", PROPERTY_HINT_RANGE, "0,5,0.1", PROPERTY_USAGE_DEFAULT); _initial_set("interface/theme/custom_theme", ""); hints["interface/theme/custom_theme"] = PropertyInfo(Variant::STRING, "interface/theme/custom_theme", PROPERTY_HINT_GLOBAL_FILE, "*.res,*.tres,*.theme", PROPERTY_USAGE_DEFAULT); @@ -456,9 +456,11 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) { _initial_set("text_editor/appearance/show_info_gutter", true); _initial_set("text_editor/appearance/code_folding", true); _initial_set("text_editor/appearance/word_wrap", false); - _initial_set("text_editor/appearance/show_line_length_guideline", true); - _initial_set("text_editor/appearance/line_length_guideline_column", 80); - hints["text_editor/appearance/line_length_guideline_column"] = PropertyInfo(Variant::INT, "text_editor/appearance/line_length_guideline_column", PROPERTY_HINT_RANGE, "20, 160, 1"); + _initial_set("text_editor/appearance/show_line_length_guidelines", true); + _initial_set("text_editor/appearance/line_length_guideline_soft_column", 80); + hints["text_editor/appearance/line_length_guideline_soft_column"] = PropertyInfo(Variant::INT, "text_editor/appearance/line_length_guideline_soft_column", PROPERTY_HINT_RANGE, "20, 160, 1"); + _initial_set("text_editor/appearance/line_length_guideline_hard_column", 100); + hints["text_editor/appearance/line_length_guideline_hard_column"] = PropertyInfo(Variant::INT, "text_editor/appearance/line_length_guideline_hard_column", PROPERTY_HINT_RANGE, "20, 160, 1"); // Script list _initial_set("text_editor/script_list/show_members_overview", true); @@ -477,15 +479,15 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) { _initial_set("text_editor/cursor/block_caret", false); _initial_set("text_editor/cursor/caret_blink", true); _initial_set("text_editor/cursor/caret_blink_speed", 0.5); - hints["text_editor/cursor/caret_blink_speed"] = PropertyInfo(Variant::REAL, "text_editor/cursor/caret_blink_speed", PROPERTY_HINT_RANGE, "0.1, 10, 0.01"); + hints["text_editor/cursor/caret_blink_speed"] = PropertyInfo(Variant::FLOAT, "text_editor/cursor/caret_blink_speed", PROPERTY_HINT_RANGE, "0.1, 10, 0.01"); _initial_set("text_editor/cursor/right_click_moves_caret", true); // Completion _initial_set("text_editor/completion/idle_parse_delay", 2.0); - hints["text_editor/completion/idle_parse_delay"] = PropertyInfo(Variant::REAL, "text_editor/completion/idle_parse_delay", PROPERTY_HINT_RANGE, "0.1, 10, 0.01"); + hints["text_editor/completion/idle_parse_delay"] = PropertyInfo(Variant::FLOAT, "text_editor/completion/idle_parse_delay", PROPERTY_HINT_RANGE, "0.1, 10, 0.01"); _initial_set("text_editor/completion/auto_brace_complete", true); _initial_set("text_editor/completion/code_complete_delay", 0.3); - hints["text_editor/completion/code_complete_delay"] = PropertyInfo(Variant::REAL, "text_editor/completion/code_complete_delay", PROPERTY_HINT_RANGE, "0.01, 5, 0.01"); + hints["text_editor/completion/code_complete_delay"] = PropertyInfo(Variant::FLOAT, "text_editor/completion/code_complete_delay", PROPERTY_HINT_RANGE, "0.01, 5, 0.01"); _initial_set("text_editor/completion/put_callhint_tooltip_below_current_line", true); _initial_set("text_editor/completion/callhint_tooltip_offset", Vector2()); _initial_set("text_editor/completion/complete_file_paths", true); @@ -541,23 +543,23 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) { // 3D: Navigation feel _initial_set("editors/3d/navigation_feel/orbit_sensitivity", 0.4); - hints["editors/3d/navigation_feel/orbit_sensitivity"] = PropertyInfo(Variant::REAL, "editors/3d/navigation_feel/orbit_sensitivity", PROPERTY_HINT_RANGE, "0.0, 2, 0.01"); + hints["editors/3d/navigation_feel/orbit_sensitivity"] = PropertyInfo(Variant::FLOAT, "editors/3d/navigation_feel/orbit_sensitivity", PROPERTY_HINT_RANGE, "0.0, 2, 0.01"); _initial_set("editors/3d/navigation_feel/orbit_inertia", 0.05); - hints["editors/3d/navigation_feel/orbit_inertia"] = PropertyInfo(Variant::REAL, "editors/3d/navigation_feel/orbit_inertia", PROPERTY_HINT_RANGE, "0.0, 1, 0.01"); + hints["editors/3d/navigation_feel/orbit_inertia"] = PropertyInfo(Variant::FLOAT, "editors/3d/navigation_feel/orbit_inertia", PROPERTY_HINT_RANGE, "0.0, 1, 0.01"); _initial_set("editors/3d/navigation_feel/translation_inertia", 0.15); - hints["editors/3d/navigation_feel/translation_inertia"] = PropertyInfo(Variant::REAL, "editors/3d/navigation_feel/translation_inertia", PROPERTY_HINT_RANGE, "0.0, 1, 0.01"); + hints["editors/3d/navigation_feel/translation_inertia"] = PropertyInfo(Variant::FLOAT, "editors/3d/navigation_feel/translation_inertia", PROPERTY_HINT_RANGE, "0.0, 1, 0.01"); _initial_set("editors/3d/navigation_feel/zoom_inertia", 0.075); - hints["editors/3d/navigation_feel/zoom_inertia"] = PropertyInfo(Variant::REAL, "editors/3d/navigation_feel/zoom_inertia", PROPERTY_HINT_RANGE, "0.0, 1, 0.01"); + hints["editors/3d/navigation_feel/zoom_inertia"] = PropertyInfo(Variant::FLOAT, "editors/3d/navigation_feel/zoom_inertia", PROPERTY_HINT_RANGE, "0.0, 1, 0.01"); _initial_set("editors/3d/navigation_feel/manipulation_orbit_inertia", 0.075); - hints["editors/3d/navigation_feel/manipulation_orbit_inertia"] = PropertyInfo(Variant::REAL, "editors/3d/navigation_feel/manipulation_orbit_inertia", PROPERTY_HINT_RANGE, "0.0, 1, 0.01"); + hints["editors/3d/navigation_feel/manipulation_orbit_inertia"] = PropertyInfo(Variant::FLOAT, "editors/3d/navigation_feel/manipulation_orbit_inertia", PROPERTY_HINT_RANGE, "0.0, 1, 0.01"); _initial_set("editors/3d/navigation_feel/manipulation_translation_inertia", 0.075); - hints["editors/3d/navigation_feel/manipulation_translation_inertia"] = PropertyInfo(Variant::REAL, "editors/3d/navigation_feel/manipulation_translation_inertia", PROPERTY_HINT_RANGE, "0.0, 1, 0.01"); + hints["editors/3d/navigation_feel/manipulation_translation_inertia"] = PropertyInfo(Variant::FLOAT, "editors/3d/navigation_feel/manipulation_translation_inertia", PROPERTY_HINT_RANGE, "0.0, 1, 0.01"); // 3D: Freelook _initial_set("editors/3d/freelook/freelook_inertia", 0.1); - hints["editors/3d/freelook/freelook_inertia"] = PropertyInfo(Variant::REAL, "editors/3d/freelook/freelook_inertia", PROPERTY_HINT_RANGE, "0.0, 1, 0.01"); + hints["editors/3d/freelook/freelook_inertia"] = PropertyInfo(Variant::FLOAT, "editors/3d/freelook/freelook_inertia", PROPERTY_HINT_RANGE, "0.0, 1, 0.01"); _initial_set("editors/3d/freelook/freelook_base_speed", 5.0); - hints["editors/3d/freelook/freelook_base_speed"] = PropertyInfo(Variant::REAL, "editors/3d/freelook/freelook_base_speed", PROPERTY_HINT_RANGE, "0.0, 10, 0.01"); + hints["editors/3d/freelook/freelook_base_speed"] = PropertyInfo(Variant::FLOAT, "editors/3d/freelook/freelook_base_speed", PROPERTY_HINT_RANGE, "0.0, 10, 0.01"); _initial_set("editors/3d/freelook/freelook_activation_modifier", 0); hints["editors/3d/freelook/freelook_activation_modifier"] = PropertyInfo(Variant::INT, "editors/3d/freelook/freelook_activation_modifier", PROPERTY_HINT_ENUM, "None,Shift,Alt,Meta,Ctrl"); _initial_set("editors/3d/freelook/freelook_speed_zoom_link", false); diff --git a/editor/editor_spin_slider.cpp b/editor/editor_spin_slider.cpp index bb8bcdfe6c..9197546772 100644 --- a/editor/editor_spin_slider.cpp +++ b/editor/editor_spin_slider.cpp @@ -31,6 +31,7 @@ #include "editor_spin_slider.h" #include "core/math/expression.h" #include "core/os/input.h" +#include "editor_node.h" #include "editor_scale.h" String EditorSpinSlider::get_tooltip(const Point2 &p_pos) const { @@ -185,6 +186,19 @@ void EditorSpinSlider::_notification(int p_what) { } } + if (p_what == NOTIFICATION_READY) { + // Add a left margin to the stylebox to make the number align with the Label + // when it's edited. The LineEdit "focus" stylebox uses the "normal" stylebox's + // default margins. + Ref<StyleBoxFlat> stylebox = + EditorNode::get_singleton()->get_theme_base()->get_stylebox("normal", "LineEdit")->duplicate(); + // EditorSpinSliders with a label have more space on the left, so add an + // higher margin to match the location where the text begins. + // The margin values below were determined by empirical testing. + stylebox->set_default_margin(MARGIN_LEFT, (get_label() != String() ? 23 : 16) * EDSCALE); + value_input->add_style_override("normal", stylebox); + } + if (p_what == NOTIFICATION_DRAW) { updown_offset = -1; @@ -476,9 +490,9 @@ EditorSpinSlider::EditorSpinSlider() { grabber->hide(); grabber->set_as_toplevel(true); grabber->set_mouse_filter(MOUSE_FILTER_STOP); - grabber->connect("mouse_entered", this, "_grabber_mouse_entered"); - grabber->connect("mouse_exited", this, "_grabber_mouse_exited"); - grabber->connect("gui_input", this, "_grabber_gui_input"); + grabber->connect_compat("mouse_entered", this, "_grabber_mouse_entered"); + grabber->connect_compat("mouse_exited", this, "_grabber_mouse_exited"); + grabber->connect_compat("gui_input", this, "_grabber_gui_input"); mouse_over_spin = false; mouse_over_grabber = false; mousewheel_over_grabber = false; @@ -488,9 +502,9 @@ EditorSpinSlider::EditorSpinSlider() { add_child(value_input); value_input->set_as_toplevel(true); value_input->hide(); - value_input->connect("modal_closed", this, "_value_input_closed"); - value_input->connect("text_entered", this, "_value_input_entered"); - value_input->connect("focus_exited", this, "_value_focus_exited"); + value_input->connect_compat("modal_closed", this, "_value_input_closed"); + value_input->connect_compat("text_entered", this, "_value_input_entered"); + value_input->connect_compat("focus_exited", this, "_value_focus_exited"); value_input_just_closed = false; hide_slider = false; read_only = false; diff --git a/editor/editor_sub_scene.cpp b/editor/editor_sub_scene.cpp index cd533649e3..1dd3ac5246 100644 --- a/editor/editor_sub_scene.cpp +++ b/editor/editor_sub_scene.cpp @@ -239,24 +239,24 @@ EditorSubScene::EditorSubScene() { HBoxContainer *hb = memnew(HBoxContainer); path = memnew(LineEdit); - path->connect("text_entered", this, "_path_changed"); + path->connect_compat("text_entered", this, "_path_changed"); hb->add_child(path); path->set_h_size_flags(SIZE_EXPAND_FILL); Button *b = memnew(Button); b->set_text(TTR("Browse")); hb->add_child(b); - b->connect("pressed", this, "_path_browse"); + b->connect_compat("pressed", this, "_path_browse"); vb->add_margin_child(TTR("Scene Path:"), hb); tree = memnew(Tree); tree->set_v_size_flags(SIZE_EXPAND_FILL); vb->add_margin_child(TTR("Import From Node:"), tree, true); tree->set_select_mode(Tree::SELECT_MULTI); - tree->connect("multi_selected", this, "_item_multi_selected"); + tree->connect_compat("multi_selected", this, "_item_multi_selected"); //tree->connect("nothing_selected", this, "_deselect_items"); - tree->connect("cell_selected", this, "_selected_changed"); + tree->connect_compat("cell_selected", this, "_selected_changed"); - tree->connect("item_activated", this, "_ok", make_binds(), CONNECT_DEFERRED); + tree->connect_compat("item_activated", this, "_ok", make_binds(), CONNECT_DEFERRED); file_dialog = memnew(EditorFileDialog); List<String> extensions; @@ -269,5 +269,5 @@ EditorSubScene::EditorSubScene() { file_dialog->set_mode(EditorFileDialog::MODE_OPEN_FILE); add_child(file_dialog); - file_dialog->connect("file_selected", this, "_path_selected"); + file_dialog->connect_compat("file_selected", this, "_path_selected"); } diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp index f43aefc944..39d4b70a6a 100644 --- a/editor/editor_themes.cpp +++ b/editor/editor_themes.cpp @@ -90,9 +90,6 @@ Ref<ImageTexture> editor_generate_icon(int p_index, bool p_convert_color, float Ref<ImageTexture> icon = memnew(ImageTexture); Ref<Image> img = memnew(Image); - // dumb gizmo check - bool is_gizmo = String(editor_icons_names[p_index]).begins_with("Gizmo"); - // Upsample icon generation only if the editor scale isn't an integer multiplier. // Generating upsampled icons is slower, and the benefit is hardly visible // with integer editor scales. @@ -855,12 +852,11 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { Ref<StyleBoxFlat> style_panel_debugger = style_content_panel->duplicate(); style_panel_debugger->set_border_width(MARGIN_BOTTOM, 0); theme->set_stylebox("DebuggerPanel", "EditorStyles", style_panel_debugger); - theme->set_stylebox("DebuggerTabFG", "EditorStyles", style_tab_selected); - theme->set_stylebox("DebuggerTabBG", "EditorStyles", style_tab_unselected); Ref<StyleBoxFlat> style_panel_invisible_top = style_content_panel->duplicate(); int stylebox_offset = theme->get_font("tab_fg", "TabContainer")->get_height() + theme->get_stylebox("tab_fg", "TabContainer")->get_minimum_size().height + theme->get_stylebox("panel", "TabContainer")->get_default_margin(MARGIN_TOP); style_panel_invisible_top->set_expand_margin_size(MARGIN_TOP, -stylebox_offset); + style_panel_invisible_top->set_default_margin(MARGIN_TOP, 0); theme->set_stylebox("BottomPanelDebuggerOverride", "EditorStyles", style_panel_invisible_top); // LineEdit diff --git a/editor/editor_visual_profiler.cpp b/editor/editor_visual_profiler.cpp index 3f3da7c4a5..5fb77181bc 100644 --- a/editor/editor_visual_profiler.cpp +++ b/editor/editor_visual_profiler.cpp @@ -113,12 +113,6 @@ void EditorVisualProfiler::clear() { seeking = false; } -static String _get_percent_txt(float p_value, float p_total) { - if (p_total == 0) - p_total = 0.00001; - return String::num((p_value / p_total) * 100, 1) + "%"; -} - String EditorVisualProfiler::_get_time_as_text(float p_time) { int dmode = display_mode->get_selected(); @@ -126,7 +120,7 @@ String EditorVisualProfiler::_get_time_as_text(float p_time) { if (dmode == DISPLAY_FRAME_TIME) { return rtos(p_time) + "ms"; } else if (dmode == DISPLAY_FRAME_PERCENT) { - return String::num(p_time * 100 / graph_limit, 2) + "%"; //_get_percent_txt(p_time, m.frame_time); + return String::num(p_time * 100 / graph_limit, 2) + "%"; } return "err"; @@ -167,7 +161,7 @@ void EditorVisualProfiler::_update_plot() { graph_image.resize(desired_len); } - PoolVector<uint8_t>::Write wr = graph_image.write(); + uint8_t *wr = graph_image.ptrw(); //clear for (int i = 0; i < desired_len; i += 4) { @@ -311,8 +305,6 @@ void EditorVisualProfiler::_update_plot() { } } - wr.release(); - Ref<Image> img; img.instance(); img->create(w, h, 0, Image::FORMAT_RGBA8, graph_image); @@ -596,8 +588,7 @@ void EditorVisualProfiler::_graph_tex_input(const Ref<InputEvent> &p_ev) { if (activate->is_pressed()) { if (!seeking) { - //probably not need to break request, can just stop profiling - //emit_signal("break_request"); + // Break request is not required, just stop profiling } } @@ -687,7 +678,6 @@ void EditorVisualProfiler::_bind_methods() { ClassDB::bind_method(D_METHOD("_item_selected"), &EditorVisualProfiler::_item_selected); ADD_SIGNAL(MethodInfo("enable_profiling", PropertyInfo(Variant::BOOL, "enable"))); - ADD_SIGNAL(MethodInfo("break_request")); } void EditorVisualProfiler::set_enabled(bool p_enable) { @@ -763,12 +753,12 @@ EditorVisualProfiler::EditorVisualProfiler() { activate = memnew(Button); activate->set_toggle_mode(true); activate->set_text(TTR("Start")); - activate->connect("pressed", this, "_activate_pressed"); + activate->connect_compat("pressed", this, "_activate_pressed"); hb->add_child(activate); clear_button = memnew(Button); clear_button->set_text(TTR("Clear")); - clear_button->connect("pressed", this, "_clear_pressed"); + clear_button->connect_compat("pressed", this, "_clear_pressed"); hb->add_child(clear_button); hb->add_child(memnew(Label(TTR("Measure:")))); @@ -776,18 +766,18 @@ EditorVisualProfiler::EditorVisualProfiler() { display_mode = memnew(OptionButton); display_mode->add_item(TTR("Frame Time (msec)")); display_mode->add_item(TTR("Frame %")); - display_mode->connect("item_selected", this, "_combo_changed"); + display_mode->connect_compat("item_selected", this, "_combo_changed"); hb->add_child(display_mode); frame_relative = memnew(CheckBox(TTR("Fit to Frame"))); frame_relative->set_pressed(true); hb->add_child(frame_relative); - frame_relative->connect("pressed", this, "_update_plot"); + frame_relative->connect_compat("pressed", this, "_update_plot"); linked = memnew(CheckBox(TTR("Linked"))); linked->set_pressed(true); hb->add_child(linked); - linked->connect("pressed", this, "_update_plot"); + linked->connect_compat("pressed", this, "_update_plot"); hb->add_spacer(); @@ -796,7 +786,7 @@ EditorVisualProfiler::EditorVisualProfiler() { cursor_metric_edit = memnew(SpinBox); cursor_metric_edit->set_h_size_flags(SIZE_FILL); hb->add_child(cursor_metric_edit); - cursor_metric_edit->connect("value_changed", this, "_cursor_metric_changed"); + cursor_metric_edit->connect_compat("value_changed", this, "_cursor_metric_changed"); hb->add_constant_override("separation", 8 * EDSCALE); @@ -820,15 +810,15 @@ EditorVisualProfiler::EditorVisualProfiler() { variables->set_column_title(2, TTR("GPU")); variables->set_column_expand(2, false); variables->set_column_min_width(2, 60 * EDSCALE); - variables->connect("cell_selected", this, "_item_selected"); + variables->connect_compat("cell_selected", this, "_item_selected"); graph = memnew(TextureRect); graph->set_expand(true); graph->set_mouse_filter(MOUSE_FILTER_STOP); //graph->set_ignore_mouse(false); - graph->connect("draw", this, "_graph_tex_draw"); - graph->connect("gui_input", this, "_graph_tex_input"); - graph->connect("mouse_exited", this, "_graph_tex_mouse_exit"); + graph->connect_compat("draw", this, "_graph_tex_draw"); + graph->connect_compat("gui_input", this, "_graph_tex_input"); + graph->connect_compat("mouse_exited", this, "_graph_tex_mouse_exit"); h_split->add_child(graph); graph->set_h_size_flags(SIZE_EXPAND_FILL); @@ -845,13 +835,13 @@ EditorVisualProfiler::EditorVisualProfiler() { frame_delay->set_wait_time(0.1); frame_delay->set_one_shot(true); add_child(frame_delay); - frame_delay->connect("timeout", this, "_update_frame"); + frame_delay->connect_compat("timeout", this, "_update_frame"); plot_delay = memnew(Timer); plot_delay->set_wait_time(0.1); plot_delay->set_one_shot(true); add_child(plot_delay); - plot_delay->connect("timeout", this, "_update_plot"); + plot_delay->connect_compat("timeout", this, "_update_plot"); seeking = false; graph_height_cpu = 1; diff --git a/editor/editor_visual_profiler.h b/editor/editor_visual_profiler.h index b4c03b227e..5194c08b96 100644 --- a/editor/editor_visual_profiler.h +++ b/editor/editor_visual_profiler.h @@ -78,7 +78,7 @@ private: TextureRect *graph; Ref<ImageTexture> graph_texture; - PoolVector<uint8_t> graph_image; + Vector<uint8_t> graph_image; Tree *variables; HSplitContainer *h_split; CheckBox *frame_relative; diff --git a/editor/export_template_manager.cpp b/editor/export_template_manager.cpp index 7ed6688154..5ff4cb6246 100644 --- a/editor/export_template_manager.cpp +++ b/editor/export_template_manager.cpp @@ -93,14 +93,14 @@ void ExportTemplateManager::_update_template_list() { Button *redownload = memnew(Button); redownload->set_text(TTR("Redownload")); current_hb->add_child(redownload); - redownload->connect("pressed", this, "_download_template", varray(current_version)); + redownload->connect_compat("pressed", this, "_download_template", varray(current_version)); } Button *uninstall = memnew(Button); uninstall->set_text(TTR("Uninstall")); current_hb->add_child(uninstall); current->set_text(current_version + " " + TTR("(Installed)")); - uninstall->connect("pressed", this, "_uninstall_template", varray(current_version)); + uninstall->connect_compat("pressed", this, "_uninstall_template", varray(current_version)); } else { current->add_color_override("font_color", get_color("error_color", "Editor")); @@ -112,7 +112,7 @@ void ExportTemplateManager::_update_template_list() { redownload->set_tooltip(TTR("Official export templates aren't available for development builds.")); } - redownload->connect("pressed", this, "_download_template", varray(current_version)); + redownload->connect_compat("pressed", this, "_download_template", varray(current_version)); current_hb->add_child(redownload); current->set_text(current_version + " " + TTR("(Missing)")); } @@ -134,7 +134,7 @@ void ExportTemplateManager::_update_template_list() { uninstall->set_text(TTR("Uninstall")); hbc->add_child(uninstall); - uninstall->connect("pressed", this, "_uninstall_template", varray(E->get())); + uninstall->connect_compat("pressed", this, "_uninstall_template", varray(E->get())); installed_vb->add_child(hbc); } @@ -350,7 +350,7 @@ void ExportTemplateManager::ok_pressed() { template_open->popup_centered_ratio(); } -void ExportTemplateManager::_http_download_mirror_completed(int p_status, int p_code, const PoolStringArray &headers, const PoolByteArray &p_data) { +void ExportTemplateManager::_http_download_mirror_completed(int p_status, int p_code, const PackedStringArray &headers, const PackedByteArray &p_data) { if (p_status != HTTPRequest::RESULT_SUCCESS || p_code != 200) { EditorNode::get_singleton()->show_warning(TTR("Error getting the list of mirrors.")); @@ -359,8 +359,8 @@ void ExportTemplateManager::_http_download_mirror_completed(int p_status, int p_ String mirror_str; { - PoolByteArray::Read r = p_data.read(); - mirror_str.parse_utf8((const char *)r.ptr(), p_data.size()); + const uint8_t *r = p_data.ptr(); + mirror_str.parse_utf8((const char *)r, p_data.size()); } template_list_state->hide(); @@ -385,7 +385,7 @@ void ExportTemplateManager::_http_download_mirror_completed(int p_status, int p_ ERR_CONTINUE(!m.has("url") || !m.has("name")); LinkButton *lb = memnew(LinkButton); lb->set_text(m["name"]); - lb->connect("pressed", this, "_begin_template_download", varray(m["url"])); + lb->connect_compat("pressed", this, "_begin_template_download", varray(m["url"])); template_list->add_child(lb); mirrors_found = true; } @@ -396,7 +396,7 @@ void ExportTemplateManager::_http_download_mirror_completed(int p_status, int p_ return; } } -void ExportTemplateManager::_http_download_templates_completed(int p_status, int p_code, const PoolStringArray &headers, const PoolByteArray &p_data) { +void ExportTemplateManager::_http_download_templates_completed(int p_status, int p_code, const PackedStringArray &headers, const PackedByteArray &p_data) { switch (p_status) { @@ -689,14 +689,14 @@ ExportTemplateManager::ExportTemplateManager() { remove_confirm = memnew(ConfirmationDialog); remove_confirm->set_title(TTR("Remove Template")); add_child(remove_confirm); - remove_confirm->connect("confirmed", this, "_uninstall_template_confirm"); + remove_confirm->connect_compat("confirmed", this, "_uninstall_template_confirm"); template_open = memnew(FileDialog); template_open->set_title(TTR("Select Template File")); template_open->add_filter("*.tpz ; " + TTR("Godot Export Templates")); template_open->set_access(FileDialog::ACCESS_FILESYSTEM); template_open->set_mode(FileDialog::MODE_OPEN_FILE); - template_open->connect("file_selected", this, "_install_from_file", varray(true)); + template_open->connect_compat("file_selected", this, "_install_from_file", varray(true)); add_child(template_open); set_title(TTR("Export Template Manager")); @@ -704,18 +704,18 @@ ExportTemplateManager::ExportTemplateManager() { request_mirror = memnew(HTTPRequest); add_child(request_mirror); - request_mirror->connect("request_completed", this, "_http_download_mirror_completed"); + request_mirror->connect_compat("request_completed", this, "_http_download_mirror_completed"); download_templates = memnew(HTTPRequest); add_child(download_templates); - download_templates->connect("request_completed", this, "_http_download_templates_completed"); + download_templates->connect_compat("request_completed", this, "_http_download_templates_completed"); template_downloader = memnew(AcceptDialog); template_downloader->set_title(TTR("Download Templates")); template_downloader->get_ok()->set_text(TTR("Close")); template_downloader->set_exclusive(true); add_child(template_downloader); - template_downloader->connect("popup_hide", this, "_window_template_downloader_closed"); + template_downloader->connect_compat("popup_hide", this, "_window_template_downloader_closed"); VBoxContainer *vbc = memnew(VBoxContainer); template_downloader->add_child(vbc); diff --git a/editor/export_template_manager.h b/editor/export_template_manager.h index 96e61a6569..6ebc7fd131 100644 --- a/editor/export_template_manager.h +++ b/editor/export_template_manager.h @@ -72,8 +72,8 @@ class ExportTemplateManager : public ConfirmationDialog { virtual void ok_pressed(); bool _install_from_file(const String &p_file, bool p_use_progress = true); - void _http_download_mirror_completed(int p_status, int p_code, const PoolStringArray &headers, const PoolByteArray &p_data); - void _http_download_templates_completed(int p_status, int p_code, const PoolStringArray &headers, const PoolByteArray &p_data); + void _http_download_mirror_completed(int p_status, int p_code, const PackedStringArray &headers, const PackedByteArray &p_data); + void _http_download_templates_completed(int p_status, int p_code, const PackedStringArray &headers, const PackedByteArray &p_data); void _begin_template_download(const String &p_url); diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp index a3def15532..5363d6a1e2 100644 --- a/editor/filesystem_dock.cpp +++ b/editor/filesystem_dock.cpp @@ -300,19 +300,19 @@ void FileSystemDock::_notification(int p_what) { if (initialized) return; initialized = true; - EditorFeatureProfileManager::get_singleton()->connect("current_feature_profile_changed", this, "_feature_profile_changed"); + EditorFeatureProfileManager::get_singleton()->connect_compat("current_feature_profile_changed", this, "_feature_profile_changed"); - EditorFileSystem::get_singleton()->connect("filesystem_changed", this, "_fs_changed"); - EditorResourcePreview::get_singleton()->connect("preview_invalidated", this, "_preview_invalidated"); + EditorFileSystem::get_singleton()->connect_compat("filesystem_changed", this, "_fs_changed"); + EditorResourcePreview::get_singleton()->connect_compat("preview_invalidated", this, "_preview_invalidated"); String ei = "EditorIcons"; button_reload->set_icon(get_icon("Reload", ei)); button_toggle_display_mode->set_icon(get_icon("Panels2", ei)); - button_file_list_display_mode->connect("pressed", this, "_toggle_file_display"); + button_file_list_display_mode->connect_compat("pressed", this, "_toggle_file_display"); - files->connect("item_activated", this, "_file_list_activate_file"); - button_hist_next->connect("pressed", this, "_fw_history"); - button_hist_prev->connect("pressed", this, "_bw_history"); + files->connect_compat("item_activated", this, "_file_list_activate_file"); + button_hist_next->connect_compat("pressed", this, "_fw_history"); + button_hist_prev->connect_compat("pressed", this, "_bw_history"); tree_search_box->set_right_icon(get_icon("Search", ei)); tree_search_box->set_clear_button_enabled(true); file_list_search_box->set_right_icon(get_icon("Search", ei)); @@ -320,10 +320,10 @@ void FileSystemDock::_notification(int p_what) { button_hist_next->set_icon(get_icon("Forward", ei)); button_hist_prev->set_icon(get_icon("Back", ei)); - file_list_popup->connect("id_pressed", this, "_file_list_rmb_option"); - tree_popup->connect("id_pressed", this, "_tree_rmb_option"); + file_list_popup->connect_compat("id_pressed", this, "_file_list_rmb_option"); + tree_popup->connect_compat("id_pressed", this, "_tree_rmb_option"); - current_path->connect("text_entered", this, "_navigate_to_path"); + current_path->connect_compat("text_entered", this, "_navigate_to_path"); always_show_folders = bool(EditorSettings::get_singleton()->get("docks/filesystem/always_show_folders")); @@ -1775,7 +1775,7 @@ void FileSystemDock::_file_option(int p_option, const Vector<String> &p_selected } } -void FileSystemDock::_resource_created() const { +void FileSystemDock::_resource_created() { Object *c = new_resource_dialog->instance_selected(); ERR_FAIL_COND(!c); @@ -2506,7 +2506,7 @@ void FileSystemDock::_bind_methods() { ClassDB::bind_method(D_METHOD("_feature_profile_changed"), &FileSystemDock::_feature_profile_changed); ADD_SIGNAL(MethodInfo("inherit", PropertyInfo(Variant::STRING, "file"))); - ADD_SIGNAL(MethodInfo("instance", PropertyInfo(Variant::POOL_STRING_ARRAY, "files"))); + ADD_SIGNAL(MethodInfo("instance", PropertyInfo(Variant::PACKED_STRING_ARRAY, "files"))); ADD_SIGNAL(MethodInfo("file_removed", PropertyInfo(Variant::STRING, "file"))); ADD_SIGNAL(MethodInfo("folder_removed", PropertyInfo(Variant::STRING, "folder"))); @@ -2552,7 +2552,7 @@ FileSystemDock::FileSystemDock(EditorNode *p_editor) { button_reload = memnew(Button); button_reload->set_flat(true); - button_reload->connect("pressed", this, "_rescan"); + button_reload->connect_compat("pressed", this, "_rescan"); button_reload->set_focus_mode(FOCUS_NONE); button_reload->set_tooltip(TTR("Re-Scan Filesystem")); button_reload->hide(); @@ -2561,7 +2561,7 @@ FileSystemDock::FileSystemDock(EditorNode *p_editor) { button_toggle_display_mode = memnew(Button); button_toggle_display_mode->set_flat(true); button_toggle_display_mode->set_toggle_mode(true); - button_toggle_display_mode->connect("toggled", this, "_toggle_split_mode"); + button_toggle_display_mode->connect_compat("toggled", this, "_toggle_split_mode"); button_toggle_display_mode->set_focus_mode(FOCUS_NONE); button_toggle_display_mode->set_tooltip(TTR("Toggle Split Mode")); toolbar_hbc->add_child(button_toggle_display_mode); @@ -2573,7 +2573,7 @@ FileSystemDock::FileSystemDock(EditorNode *p_editor) { tree_search_box = memnew(LineEdit); tree_search_box->set_h_size_flags(SIZE_EXPAND_FILL); tree_search_box->set_placeholder(TTR("Search files")); - tree_search_box->connect("text_changed", this, "_search_changed", varray(tree_search_box)); + tree_search_box->connect_compat("text_changed", this, "_search_changed", varray(tree_search_box)); toolbar2_hbc->add_child(tree_search_box); file_list_popup = memnew(PopupMenu); @@ -2597,12 +2597,12 @@ FileSystemDock::FileSystemDock(EditorNode *p_editor) { tree->set_custom_minimum_size(Size2(0, 15 * EDSCALE)); split_box->add_child(tree); - tree->connect("item_activated", this, "_tree_activate_file"); - tree->connect("multi_selected", this, "_tree_multi_selected"); - tree->connect("item_rmb_selected", this, "_tree_rmb_select"); - tree->connect("empty_rmb", this, "_tree_rmb_empty"); - tree->connect("nothing_selected", this, "_tree_empty_selected"); - tree->connect("gui_input", this, "_tree_gui_input"); + tree->connect_compat("item_activated", this, "_tree_activate_file"); + tree->connect_compat("multi_selected", this, "_tree_multi_selected"); + tree->connect_compat("item_rmb_selected", this, "_tree_rmb_select"); + tree->connect_compat("empty_rmb", this, "_tree_rmb_empty"); + tree->connect_compat("nothing_selected", this, "_tree_empty_selected"); + tree->connect_compat("gui_input", this, "_tree_gui_input"); file_list_vb = memnew(VBoxContainer); file_list_vb->set_v_size_flags(SIZE_EXPAND_FILL); @@ -2614,7 +2614,7 @@ FileSystemDock::FileSystemDock(EditorNode *p_editor) { file_list_search_box = memnew(LineEdit); file_list_search_box->set_h_size_flags(SIZE_EXPAND_FILL); file_list_search_box->set_placeholder(TTR("Search files")); - file_list_search_box->connect("text_changed", this, "_search_changed", varray(file_list_search_box)); + file_list_search_box->connect_compat("text_changed", this, "_search_changed", varray(file_list_search_box)); path_hb->add_child(file_list_search_box); button_file_list_display_mode = memnew(ToolButton); @@ -2624,10 +2624,10 @@ FileSystemDock::FileSystemDock(EditorNode *p_editor) { files->set_v_size_flags(SIZE_EXPAND_FILL); files->set_select_mode(ItemList::SELECT_MULTI); files->set_drag_forwarding(this); - files->connect("item_rmb_selected", this, "_file_list_rmb_select"); - files->connect("gui_input", this, "_file_list_gui_input"); - files->connect("multi_selected", this, "_file_multi_selected"); - files->connect("rmb_clicked", this, "_file_list_rmb_pressed"); + files->connect_compat("item_rmb_selected", this, "_file_list_rmb_select"); + files->connect_compat("gui_input", this, "_file_list_gui_input"); + files->connect_compat("multi_selected", this, "_file_multi_selected"); + files->connect_compat("rmb_clicked", this, "_file_list_rmb_pressed"); files->set_custom_minimum_size(Size2(0, 15 * EDSCALE)); files->set_allow_rmb_select(true); file_list_vb->add_child(files); @@ -2651,14 +2651,14 @@ FileSystemDock::FileSystemDock(EditorNode *p_editor) { add_child(owners_editor); remove_dialog = memnew(DependencyRemoveDialog); - remove_dialog->connect("file_removed", this, "_file_deleted"); - remove_dialog->connect("folder_removed", this, "_folder_deleted"); + remove_dialog->connect_compat("file_removed", this, "_file_deleted"); + remove_dialog->connect_compat("folder_removed", this, "_folder_deleted"); add_child(remove_dialog); move_dialog = memnew(EditorDirDialog); move_dialog->get_ok()->set_text(TTR("Move")); add_child(move_dialog); - move_dialog->connect("dir_selected", this, "_move_operation_confirm"); + move_dialog->connect_compat("dir_selected", this, "_move_operation_confirm"); rename_dialog = memnew(ConfirmationDialog); VBoxContainer *rename_dialog_vb = memnew(VBoxContainer); @@ -2669,13 +2669,13 @@ FileSystemDock::FileSystemDock(EditorNode *p_editor) { rename_dialog->get_ok()->set_text(TTR("Rename")); add_child(rename_dialog); rename_dialog->register_text_enter(rename_dialog_text); - rename_dialog->connect("confirmed", this, "_rename_operation_confirm"); + rename_dialog->connect_compat("confirmed", this, "_rename_operation_confirm"); overwrite_dialog = memnew(ConfirmationDialog); overwrite_dialog->set_text(TTR("There is already file or folder with the same name in this location.")); overwrite_dialog->get_ok()->set_text(TTR("Overwrite")); add_child(overwrite_dialog); - overwrite_dialog->connect("confirmed", this, "_move_with_overwrite"); + overwrite_dialog->connect_compat("confirmed", this, "_move_with_overwrite"); duplicate_dialog = memnew(ConfirmationDialog); VBoxContainer *duplicate_dialog_vb = memnew(VBoxContainer); @@ -2686,7 +2686,7 @@ FileSystemDock::FileSystemDock(EditorNode *p_editor) { duplicate_dialog->get_ok()->set_text(TTR("Duplicate")); add_child(duplicate_dialog); duplicate_dialog->register_text_enter(duplicate_dialog_text); - duplicate_dialog->connect("confirmed", this, "_duplicate_operation_confirm"); + duplicate_dialog->connect_compat("confirmed", this, "_duplicate_operation_confirm"); make_dir_dialog = memnew(ConfirmationDialog); make_dir_dialog->set_title(TTR("Create Folder")); @@ -2697,7 +2697,7 @@ FileSystemDock::FileSystemDock(EditorNode *p_editor) { make_folder_dialog_vb->add_margin_child(TTR("Name:"), make_dir_dialog_text); add_child(make_dir_dialog); make_dir_dialog->register_text_enter(make_dir_dialog_text); - make_dir_dialog->connect("confirmed", this, "_make_dir_confirm"); + make_dir_dialog->connect_compat("confirmed", this, "_make_dir_confirm"); make_scene_dialog = memnew(ConfirmationDialog); make_scene_dialog->set_title(TTR("Create Scene")); @@ -2708,7 +2708,7 @@ FileSystemDock::FileSystemDock(EditorNode *p_editor) { make_scene_dialog_vb->add_margin_child(TTR("Name:"), make_scene_dialog_text); add_child(make_scene_dialog); make_scene_dialog->register_text_enter(make_scene_dialog_text); - make_scene_dialog->connect("confirmed", this, "_make_scene_confirm"); + make_scene_dialog->connect_compat("confirmed", this, "_make_scene_confirm"); make_script_dialog = memnew(ScriptCreateDialog); make_script_dialog->set_title(TTR("Create Script")); @@ -2717,7 +2717,7 @@ FileSystemDock::FileSystemDock(EditorNode *p_editor) { new_resource_dialog = memnew(CreateDialog); add_child(new_resource_dialog); new_resource_dialog->set_base_type("Resource"); - new_resource_dialog->connect("create", this, "_resource_created"); + new_resource_dialog->connect_compat("create", this, "_resource_created"); searched_string = String(); uncollapsed_paths_before_search = Vector<String>(); diff --git a/editor/filesystem_dock.h b/editor/filesystem_dock.h index d20d4add4e..1969f85e72 100644 --- a/editor/filesystem_dock.h +++ b/editor/filesystem_dock.h @@ -215,7 +215,7 @@ private: void _files_moved(String p_old_file, String p_new_file); void _folder_moved(String p_old_folder, String p_new_folder); - void _resource_created() const; + void _resource_created(); void _make_dir_confirm(); void _make_scene_confirm(); void _rename_operation_confirm(); diff --git a/editor/find_in_files.cpp b/editor/find_in_files.cpp index b24a5c38f2..0bc9b0585c 100644 --- a/editor/find_in_files.cpp +++ b/editor/find_in_files.cpp @@ -47,7 +47,7 @@ const char *FindInFiles::SIGNAL_RESULT_FOUND = "result_found"; const char *FindInFiles::SIGNAL_FINISHED = "finished"; -// TODO Would be nice in Vector and PoolVectors +// TODO Would be nice in Vector and Vectors template <typename T> inline void pop_back(T &container) { container.resize(container.size() - 1); @@ -132,8 +132,8 @@ void FindInFiles::start() { // Init search _current_dir = ""; - PoolStringArray init_folder; - init_folder.append(_root_dir); + PackedStringArray init_folder; + init_folder.push_back(_root_dir); _folders_stack.clear(); _folders_stack.push_back(init_folder); @@ -168,7 +168,7 @@ void FindInFiles::_iterate() { // Scan folders first so we can build a list of files and have progress info later - PoolStringArray &folders_to_scan = _folders_stack.write[_folders_stack.size() - 1]; + PackedStringArray &folders_to_scan = _folders_stack.write[_folders_stack.size() - 1]; if (folders_to_scan.size() != 0) { // Scan one folder below @@ -178,7 +178,7 @@ void FindInFiles::_iterate() { _current_dir = _current_dir.plus_file(folder_name); - PoolStringArray sub_dirs; + PackedStringArray sub_dirs; _scan_dir("res://" + _current_dir, sub_dirs); _folders_stack.push_back(sub_dirs); @@ -219,7 +219,7 @@ float FindInFiles::get_progress() const { return 0; } -void FindInFiles::_scan_dir(String path, PoolStringArray &out_folders) { +void FindInFiles::_scan_dir(String path, PackedStringArray &out_folders) { DirAccessRef dir = DirAccess::open(path); if (!dir) { @@ -242,7 +242,7 @@ void FindInFiles::_scan_dir(String path, PoolStringArray &out_folders) { continue; if (dir->current_is_dir()) - out_folders.append(file); + out_folders.push_back(file); else { String file_ext = file.get_extension(); @@ -319,10 +319,21 @@ FindInFilesDialog::FindInFilesDialog() { _search_text_line_edit = memnew(LineEdit); _search_text_line_edit->set_h_size_flags(SIZE_EXPAND_FILL); - _search_text_line_edit->connect("text_changed", this, "_on_search_text_modified"); - _search_text_line_edit->connect("text_entered", this, "_on_search_text_entered"); + _search_text_line_edit->connect_compat("text_changed", this, "_on_search_text_modified"); + _search_text_line_edit->connect_compat("text_entered", this, "_on_search_text_entered"); gc->add_child(_search_text_line_edit); + _replace_label = memnew(Label); + _replace_label->set_text(TTR("Replace:")); + _replace_label->hide(); + gc->add_child(_replace_label); + + _replace_text_line_edit = memnew(LineEdit); + _replace_text_line_edit->set_h_size_flags(SIZE_EXPAND_FILL); + _replace_text_line_edit->connect_compat("text_entered", this, "_on_replace_text_entered"); + _replace_text_line_edit->hide(); + gc->add_child(_replace_text_line_edit); + gc->add_child(memnew(Control)); // Space to maintain the grid aligned. { @@ -356,12 +367,12 @@ FindInFilesDialog::FindInFilesDialog() { Button *folder_button = memnew(Button); folder_button->set_text("..."); - folder_button->connect("pressed", this, "_on_folder_button_pressed"); + folder_button->connect_compat("pressed", this, "_on_folder_button_pressed"); hbc->add_child(folder_button); _folder_dialog = memnew(FileDialog); _folder_dialog->set_mode(FileDialog::MODE_OPEN_DIR); - _folder_dialog->connect("dir_selected", this, "_on_folder_selected"); + _folder_dialog->connect_compat("dir_selected", this, "_on_folder_selected"); add_child(_folder_dialog); gc->add_child(hbc); @@ -383,6 +394,8 @@ FindInFilesDialog::FindInFilesDialog() { Button *cancel_button = get_ok(); cancel_button->set_text(TTR("Cancel")); + + _mode = SEARCH_MODE; } void FindInFilesDialog::set_search_text(String text) { @@ -390,11 +403,40 @@ void FindInFilesDialog::set_search_text(String text) { _on_search_text_modified(text); } +void FindInFilesDialog::set_replace_text(String text) { + _replace_text_line_edit->set_text(text); +} + +void FindInFilesDialog::set_find_in_files_mode(FindInFilesMode p_mode) { + + if (_mode == p_mode) + return; + + _mode = p_mode; + + if (p_mode == SEARCH_MODE) { + set_title(TTR("Find in Files")); + _replace_label->hide(); + _replace_text_line_edit->hide(); + } else if (p_mode == REPLACE_MODE) { + set_title(TTR("Replace in Files")); + _replace_label->show(); + _replace_text_line_edit->show(); + } + + // After hiding some child controls, let's recalculate proper Dialog size + set_size(Size2(get_size().x, 0)); +} + String FindInFilesDialog::get_search_text() const { String text = _search_text_line_edit->get_text(); return text.strip_edges(); } +String FindInFilesDialog::get_replace_text() const { + return _replace_text_line_edit->get_text(); +} + bool FindInFilesDialog::is_match_case() const { return _match_case_checkbox->is_pressed(); } @@ -473,8 +515,26 @@ void FindInFilesDialog::_on_search_text_modified(String text) { void FindInFilesDialog::_on_search_text_entered(String text) { // This allows to trigger a global search without leaving the keyboard - if (!_find_button->is_disabled()) - custom_action("find"); + if (!_find_button->is_disabled()) { + if (_mode == SEARCH_MODE) { + custom_action("find"); + } + } + + if (!_replace_button->is_disabled()) { + if (_mode == REPLACE_MODE) { + custom_action("replace"); + } + } +} + +void FindInFilesDialog::_on_replace_text_entered(String text) { + // This allows to trigger a global search without leaving the keyboard + if (!_replace_button->is_disabled()) { + if (_mode == REPLACE_MODE) { + custom_action("replace"); + } + } } void FindInFilesDialog::_on_folder_selected(String path) { @@ -490,6 +550,7 @@ void FindInFilesDialog::_bind_methods() { ClassDB::bind_method("_on_folder_selected", &FindInFilesDialog::_on_folder_selected); ClassDB::bind_method("_on_search_text_modified", &FindInFilesDialog::_on_search_text_modified); ClassDB::bind_method("_on_search_text_entered", &FindInFilesDialog::_on_search_text_entered); + ClassDB::bind_method("_on_replace_text_entered", &FindInFilesDialog::_on_replace_text_entered); ADD_SIGNAL(MethodInfo(SIGNAL_FIND_REQUESTED)); ADD_SIGNAL(MethodInfo(SIGNAL_REPLACE_REQUESTED)); @@ -502,8 +563,8 @@ const char *FindInFilesPanel::SIGNAL_FILES_MODIFIED = "files_modified"; FindInFilesPanel::FindInFilesPanel() { _finder = memnew(FindInFiles); - _finder->connect(FindInFiles::SIGNAL_RESULT_FOUND, this, "_on_result_found"); - _finder->connect(FindInFiles::SIGNAL_FINISHED, this, "_on_finished"); + _finder->connect_compat(FindInFiles::SIGNAL_RESULT_FOUND, this, "_on_result_found"); + _finder->connect_compat(FindInFiles::SIGNAL_FINISHED, this, "_on_finished"); add_child(_finder); VBoxContainer *vbc = memnew(VBoxContainer); @@ -533,9 +594,15 @@ FindInFilesPanel::FindInFilesPanel() { _status_label = memnew(Label); hbc->add_child(_status_label); + _refresh_button = memnew(Button); + _refresh_button->set_text(TTR("Refresh")); + _refresh_button->connect_compat("pressed", this, "_on_refresh_button_clicked"); + _refresh_button->hide(); + hbc->add_child(_refresh_button); + _cancel_button = memnew(Button); _cancel_button->set_text(TTR("Cancel")); - _cancel_button->connect("pressed", this, "_on_cancel_button_clicked"); + _cancel_button->connect_compat("pressed", this, "_on_cancel_button_clicked"); _cancel_button->hide(); hbc->add_child(_cancel_button); @@ -545,8 +612,8 @@ FindInFilesPanel::FindInFilesPanel() { _results_display = memnew(Tree); _results_display->add_font_override("font", EditorNode::get_singleton()->get_gui_base()->get_font("source", "EditorFonts")); _results_display->set_v_size_flags(SIZE_EXPAND_FILL); - _results_display->connect("item_selected", this, "_on_result_selected"); - _results_display->connect("item_edited", this, "_on_item_edited"); + _results_display->connect_compat("item_selected", this, "_on_result_selected"); + _results_display->connect_compat("item_edited", this, "_on_item_edited"); _results_display->set_hide_root(true); _results_display->set_select_mode(Tree::SELECT_ROW); _results_display->set_allow_rmb_select(true); @@ -564,12 +631,12 @@ FindInFilesPanel::FindInFilesPanel() { _replace_line_edit = memnew(LineEdit); _replace_line_edit->set_h_size_flags(SIZE_EXPAND_FILL); - _replace_line_edit->connect("text_changed", this, "_on_replace_text_changed"); + _replace_line_edit->connect_compat("text_changed", this, "_on_replace_text_changed"); _replace_container->add_child(_replace_line_edit); _replace_all_button = memnew(Button); _replace_all_button->set_text(TTR("Replace all (no undo)")); - _replace_all_button->connect("pressed", this, "_on_replace_all_clicked"); + _replace_all_button->connect_compat("pressed", this, "_on_replace_all_clicked"); _replace_container->add_child(_replace_all_button); _replace_container->hide(); @@ -596,6 +663,10 @@ void FindInFilesPanel::set_with_replace(bool with_replace) { } } +void FindInFilesPanel::set_replace_text(String text) { + _replace_line_edit->set_text(text); +} + void FindInFilesPanel::clear() { _file_items.clear(); _result_items.clear(); @@ -616,6 +687,7 @@ void FindInFilesPanel::start_search() { _finder->start(); update_replace_buttons(); + _refresh_button->hide(); _cancel_button->show(); } @@ -626,6 +698,7 @@ void FindInFilesPanel::stop_search() { _status_label->set_text(""); update_replace_buttons(); set_progress_visible(false); + _refresh_button->show(); _cancel_button->hide(); } @@ -728,9 +801,14 @@ void FindInFilesPanel::_on_finished() { _status_label->set_text(TTR("Search complete")); update_replace_buttons(); set_progress_visible(false); + _refresh_button->show(); _cancel_button->hide(); } +void FindInFilesPanel::_on_refresh_button_clicked() { + start_search(); +} + void FindInFilesPanel::_on_cancel_button_clicked() { stop_search(); } @@ -758,7 +836,7 @@ void FindInFilesPanel::_on_replace_all_clicked() { String replace_text = get_replace_text(); - PoolStringArray modified_files; + PackedStringArray modified_files; for (Map<String, TreeItem *>::Element *E = _file_items.front(); E; E = E->next()) { @@ -779,7 +857,7 @@ void FindInFilesPanel::_on_replace_all_clicked() { if (locations.size() != 0) { // Results are sorted by file, so we can batch replaces apply_replaces_in_file(fpath, locations, replace_text); - modified_files.append(fpath); + modified_files.push_back(fpath); } } @@ -886,7 +964,7 @@ void FindInFilesPanel::apply_replaces_in_file(String fpath, const Vector<Result> } String FindInFilesPanel::get_replace_text() { - return _replace_line_edit->get_text().strip_edges(); + return _replace_line_edit->get_text(); } void FindInFilesPanel::update_replace_buttons() { @@ -905,6 +983,7 @@ void FindInFilesPanel::_bind_methods() { ClassDB::bind_method("_on_result_found", &FindInFilesPanel::_on_result_found); ClassDB::bind_method("_on_item_edited", &FindInFilesPanel::_on_item_edited); ClassDB::bind_method("_on_finished", &FindInFilesPanel::_on_finished); + ClassDB::bind_method("_on_refresh_button_clicked", &FindInFilesPanel::_on_refresh_button_clicked); ClassDB::bind_method("_on_cancel_button_clicked", &FindInFilesPanel::_on_cancel_button_clicked); ClassDB::bind_method("_on_result_selected", &FindInFilesPanel::_on_result_selected); ClassDB::bind_method("_on_replace_text_changed", &FindInFilesPanel::_on_replace_text_changed); diff --git a/editor/find_in_files.h b/editor/find_in_files.h index 327c3f1b5a..7002f750b7 100644 --- a/editor/find_in_files.h +++ b/editor/find_in_files.h @@ -69,7 +69,7 @@ protected: private: void _process(); void _iterate(); - void _scan_dir(String path, PoolStringArray &out_folders); + void _scan_dir(String path, PackedStringArray &out_folders); void _scan_file(String fpath); // Config @@ -82,7 +82,7 @@ private: // State bool _searching; String _current_dir; - Vector<PoolStringArray> _folders_stack; + Vector<PackedStringArray> _folders_stack; Vector<String> _files_to_scan; int _initial_files_count; }; @@ -97,14 +97,23 @@ class FindInFilesDialog : public AcceptDialog { GDCLASS(FindInFilesDialog, AcceptDialog); public: + enum FindInFilesMode { + SEARCH_MODE, + REPLACE_MODE + }; + static const char *SIGNAL_FIND_REQUESTED; static const char *SIGNAL_REPLACE_REQUESTED; FindInFilesDialog(); void set_search_text(String text); + void set_replace_text(String text); + + void set_find_in_files_mode(FindInFilesMode p_mode); String get_search_text() const; + String get_replace_text() const; bool is_match_case() const; bool is_whole_words() const; String get_folder() const; @@ -121,8 +130,14 @@ private: void _on_folder_selected(String path); void _on_search_text_modified(String text); void _on_search_text_entered(String text); + void _on_replace_text_entered(String text); + FindInFilesMode _mode; LineEdit *_search_text_line_edit; + + Label *_replace_label; + LineEdit *_replace_text_line_edit; + LineEdit *_folder_line_edit; CheckBox *_match_case_checkbox; CheckBox *_whole_words_checkbox; @@ -151,6 +166,7 @@ public: FindInFiles *get_finder() const { return _finder; } void set_with_replace(bool with_replace); + void set_replace_text(String text); void start_search(); void stop_search(); @@ -163,6 +179,7 @@ protected: private: void _on_result_found(String fpath, int line_number, int begin, int end, String text); void _on_finished(); + void _on_refresh_button_clicked(); void _on_cancel_button_clicked(); void _on_result_selected(); void _on_item_edited(); @@ -190,6 +207,7 @@ private: Label *_search_text_label; Tree *_results_display; Label *_status_label; + Button *_refresh_button; Button *_cancel_button; ProgressBar *_progress_bar; Map<String, TreeItem *> _file_items; diff --git a/editor/groups_editor.cpp b/editor/groups_editor.cpp index cd185ae12e..444958b0ac 100644 --- a/editor/groups_editor.cpp +++ b/editor/groups_editor.cpp @@ -29,6 +29,7 @@ /*************************************************************************/ #include "groups_editor.h" + #include "editor/scene_tree_editor.h" #include "editor_node.h" #include "editor_scale.h" @@ -435,9 +436,9 @@ GroupDialog::GroupDialog() { groups->set_allow_rmb_select(true); groups->set_v_size_flags(SIZE_EXPAND_FILL); groups->add_constant_override("draw_guides", 1); - groups->connect("item_selected", this, "_group_selected"); - groups->connect("button_pressed", this, "_delete_group_pressed"); - groups->connect("item_edited", this, "_group_renamed"); + groups->connect_compat("item_selected", this, "_group_selected"); + groups->connect_compat("button_pressed", this, "_delete_group_pressed"); + groups->connect_compat("item_edited", this, "_group_renamed"); HBoxContainer *chbc = memnew(HBoxContainer); vbc_left->add_child(chbc); @@ -446,12 +447,12 @@ GroupDialog::GroupDialog() { add_group_text = memnew(LineEdit); chbc->add_child(add_group_text); add_group_text->set_h_size_flags(SIZE_EXPAND_FILL); - add_group_text->connect("text_entered", this, "_add_group_pressed"); + add_group_text->connect_compat("text_entered", this, "_add_group_pressed"); Button *add_group_button = memnew(Button); add_group_button->set_text(TTR("Add")); chbc->add_child(add_group_button); - add_group_button->connect("pressed", this, "_add_group_pressed", varray(String())); + add_group_button->connect_compat("pressed", this, "_add_group_pressed", varray(String())); VBoxContainer *vbc_add = memnew(VBoxContainer); hbc->add_child(vbc_add); @@ -468,7 +469,6 @@ GroupDialog::GroupDialog() { nodes_to_add->set_select_mode(Tree::SELECT_MULTI); nodes_to_add->set_v_size_flags(SIZE_EXPAND_FILL); nodes_to_add->add_constant_override("draw_guides", 1); - nodes_to_add->connect("item_selected", this, "_nodes_to_add_selected"); HBoxContainer *add_filter_hbc = memnew(HBoxContainer); add_filter_hbc->add_constant_override("separate", 0); @@ -478,7 +478,7 @@ GroupDialog::GroupDialog() { add_filter->set_h_size_flags(SIZE_EXPAND_FILL); add_filter->set_placeholder(TTR("Filter nodes")); add_filter_hbc->add_child(add_filter); - add_filter->connect("text_changed", this, "_add_filter_changed"); + add_filter->connect_compat("text_changed", this, "_add_filter_changed"); VBoxContainer *vbc_buttons = memnew(VBoxContainer); hbc->add_child(vbc_buttons); @@ -487,7 +487,7 @@ GroupDialog::GroupDialog() { add_button = memnew(ToolButton); add_button->set_text(TTR("Add")); - add_button->connect("pressed", this, "_add_pressed"); + add_button->connect_compat("pressed", this, "_add_pressed"); vbc_buttons->add_child(add_button); vbc_buttons->add_spacer(); @@ -496,7 +496,7 @@ GroupDialog::GroupDialog() { remove_button = memnew(ToolButton); remove_button->set_text(TTR("Remove")); - remove_button->connect("pressed", this, "_removed_pressed"); + remove_button->connect_compat("pressed", this, "_removed_pressed"); vbc_buttons->add_child(remove_button); @@ -515,7 +515,6 @@ GroupDialog::GroupDialog() { nodes_to_remove->set_hide_folding(true); nodes_to_remove->set_select_mode(Tree::SELECT_MULTI); nodes_to_remove->add_constant_override("draw_guides", 1); - nodes_to_remove->connect("item_selected", this, "_node_to_remove_selected"); HBoxContainer *remove_filter_hbc = memnew(HBoxContainer); remove_filter_hbc->add_constant_override("separate", 0); @@ -525,7 +524,7 @@ GroupDialog::GroupDialog() { remove_filter->set_h_size_flags(SIZE_EXPAND_FILL); remove_filter->set_placeholder(TTR("Filter nodes")); remove_filter_hbc->add_child(remove_filter); - remove_filter->connect("text_changed", this, "_remove_filter_changed"); + remove_filter->connect_compat("text_changed", this, "_remove_filter_changed"); group_empty = memnew(Label()); group_empty->set_text(TTR("Empty groups will be automatically removed.")); @@ -686,12 +685,12 @@ GroupsEditor::GroupsEditor() { group_dialog = memnew(GroupDialog); group_dialog->set_as_toplevel(true); add_child(group_dialog); - group_dialog->connect("group_edited", this, "update_tree"); + group_dialog->connect_compat("group_edited", this, "update_tree"); Button *group_dialog_button = memnew(Button); group_dialog_button->set_text(TTR("Manage Groups")); vbc->add_child(group_dialog_button); - group_dialog_button->connect("pressed", this, "_show_group_dialog"); + group_dialog_button->connect_compat("pressed", this, "_show_group_dialog"); HBoxContainer *hbc = memnew(HBoxContainer); vbc->add_child(hbc); @@ -699,18 +698,18 @@ GroupsEditor::GroupsEditor() { group_name = memnew(LineEdit); group_name->set_h_size_flags(SIZE_EXPAND_FILL); hbc->add_child(group_name); - group_name->connect("text_entered", this, "_add_group"); + group_name->connect_compat("text_entered", this, "_add_group"); add = memnew(Button); add->set_text(TTR("Add")); hbc->add_child(add); - add->connect("pressed", this, "_add_group", varray(String())); + add->connect_compat("pressed", this, "_add_group", varray(String())); tree = memnew(Tree); tree->set_hide_root(true); tree->set_v_size_flags(SIZE_EXPAND_FILL); vbc->add_child(tree); - tree->connect("button_pressed", this, "_remove_group"); + tree->connect_compat("button_pressed", this, "_remove_group"); tree->add_constant_override("draw_guides", 1); add_constant_override("separation", 3 * EDSCALE); } diff --git a/editor/icons/icon_2_d.svg b/editor/icons/2D.svg index e1a96aeab6..e1a96aeab6 100644 --- a/editor/icons/icon_2_d.svg +++ b/editor/icons/2D.svg diff --git a/editor/icons/icon_3_d.svg b/editor/icons/3D.svg index 2a1d5ff36d..2a1d5ff36d 100644 --- a/editor/icons/icon_3_d.svg +++ b/editor/icons/3D.svg diff --git a/editor/icons/icon_a_a_b_b.svg b/editor/icons/AABB.svg index d6fbc52541..d6fbc52541 100644 --- a/editor/icons/icon_a_a_b_b.svg +++ b/editor/icons/AABB.svg diff --git a/editor/icons/icon_a_r_v_r_anchor.svg b/editor/icons/ARVRAnchor.svg index f1571b3fcc..f1571b3fcc 100644 --- a/editor/icons/icon_a_r_v_r_anchor.svg +++ b/editor/icons/ARVRAnchor.svg diff --git a/editor/icons/icon_a_r_v_r_camera.svg b/editor/icons/ARVRCamera.svg index f59a8c8b4a..f59a8c8b4a 100644 --- a/editor/icons/icon_a_r_v_r_camera.svg +++ b/editor/icons/ARVRCamera.svg diff --git a/editor/icons/icon_a_r_v_r_controller.svg b/editor/icons/ARVRController.svg index 40e5b8dce1..40e5b8dce1 100644 --- a/editor/icons/icon_a_r_v_r_controller.svg +++ b/editor/icons/ARVRController.svg diff --git a/editor/icons/icon_a_r_v_r_origin.svg b/editor/icons/ARVROrigin.svg index dbb93ba7a5..dbb93ba7a5 100644 --- a/editor/icons/icon_a_r_v_r_origin.svg +++ b/editor/icons/ARVROrigin.svg diff --git a/editor/icons/icon_accept_dialog.svg b/editor/icons/AcceptDialog.svg index e0bf7b8336..e0bf7b8336 100644 --- a/editor/icons/icon_accept_dialog.svg +++ b/editor/icons/AcceptDialog.svg diff --git a/editor/icons/icon_action_copy.svg b/editor/icons/ActionCopy.svg index d7a1e1097a..d7a1e1097a 100644 --- a/editor/icons/icon_action_copy.svg +++ b/editor/icons/ActionCopy.svg diff --git a/editor/icons/icon_action_cut.svg b/editor/icons/ActionCut.svg index 97df9b2d5a..97df9b2d5a 100644 --- a/editor/icons/icon_action_cut.svg +++ b/editor/icons/ActionCut.svg diff --git a/editor/icons/icon_action_paste.svg b/editor/icons/ActionPaste.svg index 6d46f899f8..6d46f899f8 100644 --- a/editor/icons/icon_action_paste.svg +++ b/editor/icons/ActionPaste.svg diff --git a/editor/icons/icon_add.svg b/editor/icons/Add.svg index a241829603..a241829603 100644 --- a/editor/icons/icon_add.svg +++ b/editor/icons/Add.svg diff --git a/editor/icons/icon_add_atlas_tile.svg b/editor/icons/AddAtlasTile.svg index 97d3590678..97d3590678 100644 --- a/editor/icons/icon_add_atlas_tile.svg +++ b/editor/icons/AddAtlasTile.svg diff --git a/editor/icons/icon_add_autotile.svg b/editor/icons/AddAutotile.svg index c6f1df422d..c6f1df422d 100644 --- a/editor/icons/icon_add_autotile.svg +++ b/editor/icons/AddAutotile.svg diff --git a/editor/icons/icon_add_single_tile.svg b/editor/icons/AddSingleTile.svg index 319fef8078..319fef8078 100644 --- a/editor/icons/icon_add_single_tile.svg +++ b/editor/icons/AddSingleTile.svg diff --git a/editor/icons/icon_add_split.svg b/editor/icons/AddSplit.svg index 1f33e8c72b..1f33e8c72b 100644 --- a/editor/icons/icon_add_split.svg +++ b/editor/icons/AddSplit.svg diff --git a/editor/icons/icon_anchor.svg b/editor/icons/Anchor.svg index 119960d177..119960d177 100644 --- a/editor/icons/icon_anchor.svg +++ b/editor/icons/Anchor.svg diff --git a/editor/icons/icon_animated_sprite.svg b/editor/icons/AnimatedSprite.svg index 411ddda015..411ddda015 100644 --- a/editor/icons/icon_animated_sprite.svg +++ b/editor/icons/AnimatedSprite.svg diff --git a/editor/icons/icon_animated_sprite_3d.svg b/editor/icons/AnimatedSprite3D.svg index 974c4e04eb..974c4e04eb 100644 --- a/editor/icons/icon_animated_sprite_3d.svg +++ b/editor/icons/AnimatedSprite3D.svg diff --git a/editor/icons/icon_animated_texture.svg b/editor/icons/AnimatedTexture.svg index 3719b64747..3719b64747 100644 --- a/editor/icons/icon_animated_texture.svg +++ b/editor/icons/AnimatedTexture.svg diff --git a/editor/icons/icon_animation.svg b/editor/icons/Animation.svg index 2cb738a8a6..2cb738a8a6 100644 --- a/editor/icons/icon_animation.svg +++ b/editor/icons/Animation.svg diff --git a/editor/icons/icon_animation_filter.svg b/editor/icons/AnimationFilter.svg index 45c323543d..45c323543d 100644 --- a/editor/icons/icon_animation_filter.svg +++ b/editor/icons/AnimationFilter.svg diff --git a/editor/icons/icon_animation_player.svg b/editor/icons/AnimationPlayer.svg index a5f7804e0d..a5f7804e0d 100644 --- a/editor/icons/icon_animation_player.svg +++ b/editor/icons/AnimationPlayer.svg diff --git a/editor/icons/icon_animation_track_group.svg b/editor/icons/AnimationTrackGroup.svg index d0d14b7c44..d0d14b7c44 100644 --- a/editor/icons/icon_animation_track_group.svg +++ b/editor/icons/AnimationTrackGroup.svg diff --git a/editor/icons/icon_animation_track_list.svg b/editor/icons/AnimationTrackList.svg index e47c8b18cb..e47c8b18cb 100644 --- a/editor/icons/icon_animation_track_list.svg +++ b/editor/icons/AnimationTrackList.svg diff --git a/editor/icons/icon_animation_tree.svg b/editor/icons/AnimationTree.svg index 718eaac2d2..718eaac2d2 100644 --- a/editor/icons/icon_animation_tree.svg +++ b/editor/icons/AnimationTree.svg diff --git a/editor/icons/icon_area.svg b/editor/icons/Area.svg index 21ebe3c251..21ebe3c251 100644 --- a/editor/icons/icon_area.svg +++ b/editor/icons/Area.svg diff --git a/editor/icons/icon_area_2d.svg b/editor/icons/Area2D.svg index e374205b13..e374205b13 100644 --- a/editor/icons/icon_area_2d.svg +++ b/editor/icons/Area2D.svg diff --git a/editor/icons/icon_array.svg b/editor/icons/Array.svg index d499fcac3a..d499fcac3a 100644 --- a/editor/icons/icon_array.svg +++ b/editor/icons/Array.svg diff --git a/editor/icons/icon_array_mesh.svg b/editor/icons/ArrayMesh.svg index 394a18623d..394a18623d 100644 --- a/editor/icons/icon_array_mesh.svg +++ b/editor/icons/ArrayMesh.svg diff --git a/editor/icons/icon_arrow_down.svg b/editor/icons/ArrowDown.svg index 49a93e6e28..49a93e6e28 100644 --- a/editor/icons/icon_arrow_down.svg +++ b/editor/icons/ArrowDown.svg diff --git a/editor/icons/icon_arrow_left.svg b/editor/icons/ArrowLeft.svg index fbbe5d9075..fbbe5d9075 100644 --- a/editor/icons/icon_arrow_left.svg +++ b/editor/icons/ArrowLeft.svg diff --git a/editor/icons/icon_arrow_right.svg b/editor/icons/ArrowRight.svg index 7895158bb1..7895158bb1 100644 --- a/editor/icons/icon_arrow_right.svg +++ b/editor/icons/ArrowRight.svg diff --git a/editor/icons/icon_arrow_up.svg b/editor/icons/ArrowUp.svg index 9bf19a6a12..9bf19a6a12 100644 --- a/editor/icons/icon_arrow_up.svg +++ b/editor/icons/ArrowUp.svg diff --git a/editor/icons/icon_asset_lib.svg b/editor/icons/AssetLib.svg index 72b20ec047..72b20ec047 100644 --- a/editor/icons/icon_asset_lib.svg +++ b/editor/icons/AssetLib.svg diff --git a/editor/icons/icon_atlas_texture.svg b/editor/icons/AtlasTexture.svg index 28a44e179a..28a44e179a 100644 --- a/editor/icons/icon_atlas_texture.svg +++ b/editor/icons/AtlasTexture.svg diff --git a/editor/icons/icon_audio_bus_bypass.svg b/editor/icons/AudioBusBypass.svg index c251a7c83f..c251a7c83f 100644 --- a/editor/icons/icon_audio_bus_bypass.svg +++ b/editor/icons/AudioBusBypass.svg diff --git a/editor/icons/icon_audio_bus_layout.svg b/editor/icons/AudioBusLayout.svg index f95794a7c7..f95794a7c7 100644 --- a/editor/icons/icon_audio_bus_layout.svg +++ b/editor/icons/AudioBusLayout.svg diff --git a/editor/icons/icon_audio_bus_mute.svg b/editor/icons/AudioBusMute.svg index 4750b0fec0..4750b0fec0 100644 --- a/editor/icons/icon_audio_bus_mute.svg +++ b/editor/icons/AudioBusMute.svg diff --git a/editor/icons/icon_audio_bus_solo.svg b/editor/icons/AudioBusSolo.svg index 5be72a8961..5be72a8961 100644 --- a/editor/icons/icon_audio_bus_solo.svg +++ b/editor/icons/AudioBusSolo.svg diff --git a/editor/icons/icon_audio_stream_o_g_g_vorbis.svg b/editor/icons/AudioStreamOGGVorbis.svg index a8d6fb6bf1..a8d6fb6bf1 100644 --- a/editor/icons/icon_audio_stream_o_g_g_vorbis.svg +++ b/editor/icons/AudioStreamOGGVorbis.svg diff --git a/editor/icons/icon_audio_stream_player.svg b/editor/icons/AudioStreamPlayer.svg index bbe2793407..bbe2793407 100644 --- a/editor/icons/icon_audio_stream_player.svg +++ b/editor/icons/AudioStreamPlayer.svg diff --git a/editor/icons/icon_audio_stream_player_2_d.svg b/editor/icons/AudioStreamPlayer2D.svg index 090b23ff7c..090b23ff7c 100644 --- a/editor/icons/icon_audio_stream_player_2_d.svg +++ b/editor/icons/AudioStreamPlayer2D.svg diff --git a/editor/icons/icon_audio_stream_player_3_d.svg b/editor/icons/AudioStreamPlayer3D.svg index 95da9818aa..95da9818aa 100644 --- a/editor/icons/icon_audio_stream_player_3_d.svg +++ b/editor/icons/AudioStreamPlayer3D.svg diff --git a/editor/icons/icon_audio_stream_sample.svg b/editor/icons/AudioStreamSample.svg index a8d6fb6bf1..a8d6fb6bf1 100644 --- a/editor/icons/icon_audio_stream_sample.svg +++ b/editor/icons/AudioStreamSample.svg diff --git a/editor/icons/icon_auto_end.svg b/editor/icons/AutoEnd.svg index 35f5fb2b1c..35f5fb2b1c 100644 --- a/editor/icons/icon_auto_end.svg +++ b/editor/icons/AutoEnd.svg diff --git a/editor/icons/icon_auto_key.svg b/editor/icons/AutoKey.svg index 3d5569397f..3d5569397f 100644 --- a/editor/icons/icon_auto_key.svg +++ b/editor/icons/AutoKey.svg diff --git a/editor/icons/icon_auto_play.svg b/editor/icons/AutoPlay.svg index dbe41f244f..dbe41f244f 100644 --- a/editor/icons/icon_auto_play.svg +++ b/editor/icons/AutoPlay.svg diff --git a/editor/icons/icon_auto_triangle.svg b/editor/icons/AutoTriangle.svg index 13b8f7c5d2..13b8f7c5d2 100644 --- a/editor/icons/icon_auto_triangle.svg +++ b/editor/icons/AutoTriangle.svg diff --git a/editor/icons/icon_back.svg b/editor/icons/Back.svg index c8ea97fa5c..c8ea97fa5c 100644 --- a/editor/icons/icon_back.svg +++ b/editor/icons/Back.svg diff --git a/editor/icons/icon_back_buffer_copy.svg b/editor/icons/BackBufferCopy.svg index c16cfe9009..c16cfe9009 100644 --- a/editor/icons/icon_back_buffer_copy.svg +++ b/editor/icons/BackBufferCopy.svg diff --git a/editor/icons/icon_bake.svg b/editor/icons/Bake.svg index 9bcfb174dc..9bcfb174dc 100644 --- a/editor/icons/icon_bake.svg +++ b/editor/icons/Bake.svg diff --git a/editor/icons/icon_baked_lightmap.svg b/editor/icons/BakedLightmap.svg index 338a100022..338a100022 100644 --- a/editor/icons/icon_baked_lightmap.svg +++ b/editor/icons/BakedLightmap.svg diff --git a/editor/icons/icon_baked_lightmap_data.svg b/editor/icons/BakedLightmapData.svg index e8d471c2af..e8d471c2af 100644 --- a/editor/icons/icon_baked_lightmap_data.svg +++ b/editor/icons/BakedLightmapData.svg diff --git a/editor/icons/icon_basis.svg b/editor/icons/Basis.svg index ecdb0f4ec0..ecdb0f4ec0 100644 --- a/editor/icons/icon_basis.svg +++ b/editor/icons/Basis.svg diff --git a/editor/icons/icon_bezier_handles_balanced.svg b/editor/icons/BezierHandlesBalanced.svg index 6656d3f5eb..6656d3f5eb 100644 --- a/editor/icons/icon_bezier_handles_balanced.svg +++ b/editor/icons/BezierHandlesBalanced.svg diff --git a/editor/icons/icon_bezier_handles_free.svg b/editor/icons/BezierHandlesFree.svg index 06abfe34ab..06abfe34ab 100644 --- a/editor/icons/icon_bezier_handles_free.svg +++ b/editor/icons/BezierHandlesFree.svg diff --git a/editor/icons/icon_bezier_handles_mirror.svg b/editor/icons/BezierHandlesMirror.svg index be85f170c7..be85f170c7 100644 --- a/editor/icons/icon_bezier_handles_mirror.svg +++ b/editor/icons/BezierHandlesMirror.svg diff --git a/editor/icons/icon_bit_map.svg b/editor/icons/BitMap.svg index b61c1b7dc5..b61c1b7dc5 100644 --- a/editor/icons/icon_bit_map.svg +++ b/editor/icons/BitMap.svg diff --git a/editor/icons/icon_bitmap_font.svg b/editor/icons/BitmapFont.svg index 5e5bd859c9..5e5bd859c9 100644 --- a/editor/icons/icon_bitmap_font.svg +++ b/editor/icons/BitmapFont.svg diff --git a/editor/icons/icon_blend.svg b/editor/icons/Blend.svg index c78b9287fa..c78b9287fa 100644 --- a/editor/icons/icon_blend.svg +++ b/editor/icons/Blend.svg diff --git a/editor/icons/icon_bone.svg b/editor/icons/Bone.svg index fafebb0394..fafebb0394 100644 --- a/editor/icons/icon_bone.svg +++ b/editor/icons/Bone.svg diff --git a/editor/icons/icon_bone_2_d.svg b/editor/icons/Bone2D.svg index 94bfff61e4..94bfff61e4 100644 --- a/editor/icons/icon_bone_2_d.svg +++ b/editor/icons/Bone2D.svg diff --git a/editor/icons/icon_bone_attachment.svg b/editor/icons/BoneAttachment.svg index 0b7dede0b6..0b7dede0b6 100644 --- a/editor/icons/icon_bone_attachment.svg +++ b/editor/icons/BoneAttachment.svg diff --git a/editor/icons/icon_bone_track.svg b/editor/icons/BoneTrack.svg index 0f6f9bb6cd..0f6f9bb6cd 100644 --- a/editor/icons/icon_bone_track.svg +++ b/editor/icons/BoneTrack.svg diff --git a/editor/icons/icon_box_shape.svg b/editor/icons/BoxShape.svg index 171e95f4fa..171e95f4fa 100644 --- a/editor/icons/icon_box_shape.svg +++ b/editor/icons/BoxShape.svg diff --git a/editor/icons/icon_bucket.svg b/editor/icons/Bucket.svg index fc3481290d..fc3481290d 100644 --- a/editor/icons/icon_bucket.svg +++ b/editor/icons/Bucket.svg diff --git a/editor/icons/icon_bus_vu_empty.svg b/editor/icons/BusVuEmpty.svg index 5260b9e252..5260b9e252 100644 --- a/editor/icons/icon_bus_vu_empty.svg +++ b/editor/icons/BusVuEmpty.svg diff --git a/editor/icons/icon_bus_vu_frozen.svg b/editor/icons/BusVuFrozen.svg index c10bb5a1a2..c10bb5a1a2 100644 --- a/editor/icons/icon_bus_vu_frozen.svg +++ b/editor/icons/BusVuFrozen.svg diff --git a/editor/icons/icon_bus_vu_full.svg b/editor/icons/BusVuFull.svg index 377ac60bc1..377ac60bc1 100644 --- a/editor/icons/icon_bus_vu_full.svg +++ b/editor/icons/BusVuFull.svg diff --git a/editor/icons/icon_button.svg b/editor/icons/Button.svg index 6ea5663dda..6ea5663dda 100644 --- a/editor/icons/icon_button.svg +++ b/editor/icons/Button.svg diff --git a/editor/icons/icon_button_group.svg b/editor/icons/ButtonGroup.svg index 683a8c3054..683a8c3054 100644 --- a/editor/icons/icon_button_group.svg +++ b/editor/icons/ButtonGroup.svg diff --git a/editor/icons/icon_c_p_u_particles.svg b/editor/icons/CPUParticles.svg index af4115c93f..af4115c93f 100644 --- a/editor/icons/icon_c_p_u_particles.svg +++ b/editor/icons/CPUParticles.svg diff --git a/editor/icons/icon_c_p_u_particles_2_d.svg b/editor/icons/CPUParticles2D.svg index 25afc35bec..25afc35bec 100644 --- a/editor/icons/icon_c_p_u_particles_2_d.svg +++ b/editor/icons/CPUParticles2D.svg diff --git a/editor/icons/Callable.svg b/editor/icons/Callable.svg new file mode 100644 index 0000000000..8f421f4fed --- /dev/null +++ b/editor/icons/Callable.svg @@ -0,0 +1,5 @@ +<svg width="16" height="16" version="1.1" viewBox="0 0 4.2333 4.2333" xmlns="http://www.w3.org/2000/svg"> +<g transform="translate(0 -292.77)"> +<path transform="matrix(.26458 0 0 .26458 0 292.77)" d="m12 1c-2 2-4 4-7 4h-4v5h4c3 3.8e-5 5 2 7 4v-13zm1 4v5c2.5896-0.015798 2.5896-4.9849 0-5zm-11 6v4h2l1-4h-3z" fill="#e0e0e0"/> +</g> +</svg> diff --git a/editor/icons/icon_camera.svg b/editor/icons/Camera.svg index af1cb8a2e9..af1cb8a2e9 100644 --- a/editor/icons/icon_camera.svg +++ b/editor/icons/Camera.svg diff --git a/editor/icons/icon_camera_2d.svg b/editor/icons/Camera2D.svg index 9a91b3017b..9a91b3017b 100644 --- a/editor/icons/icon_camera_2d.svg +++ b/editor/icons/Camera2D.svg diff --git a/editor/icons/icon_camera_texture.svg b/editor/icons/CameraTexture.svg index e61b5902f0..e61b5902f0 100644 --- a/editor/icons/icon_camera_texture.svg +++ b/editor/icons/CameraTexture.svg diff --git a/editor/icons/icon_canvas_item.svg b/editor/icons/CanvasItem.svg index eefe501ca8..eefe501ca8 100644 --- a/editor/icons/icon_canvas_item.svg +++ b/editor/icons/CanvasItem.svg diff --git a/editor/icons/icon_canvas_item_material.svg b/editor/icons/CanvasItemMaterial.svg index 7df06ed686..7df06ed686 100644 --- a/editor/icons/icon_canvas_item_material.svg +++ b/editor/icons/CanvasItemMaterial.svg diff --git a/editor/icons/icon_canvas_item_shader.svg b/editor/icons/CanvasItemShader.svg index 834fe61472..834fe61472 100644 --- a/editor/icons/icon_canvas_item_shader.svg +++ b/editor/icons/CanvasItemShader.svg diff --git a/editor/icons/icon_canvas_item_shader_graph.svg b/editor/icons/CanvasItemShaderGraph.svg index 3e83751698..3e83751698 100644 --- a/editor/icons/icon_canvas_item_shader_graph.svg +++ b/editor/icons/CanvasItemShaderGraph.svg diff --git a/editor/icons/icon_canvas_layer.svg b/editor/icons/CanvasLayer.svg index a3fcc903d7..a3fcc903d7 100644 --- a/editor/icons/icon_canvas_layer.svg +++ b/editor/icons/CanvasLayer.svg diff --git a/editor/icons/icon_canvas_modulate.svg b/editor/icons/CanvasModulate.svg index a7b788d638..a7b788d638 100644 --- a/editor/icons/icon_canvas_modulate.svg +++ b/editor/icons/CanvasModulate.svg diff --git a/editor/icons/icon_capsule_mesh.svg b/editor/icons/CapsuleMesh.svg index 1c9470105f..1c9470105f 100644 --- a/editor/icons/icon_capsule_mesh.svg +++ b/editor/icons/CapsuleMesh.svg diff --git a/editor/icons/icon_capsule_shape.svg b/editor/icons/CapsuleShape.svg index ba035ca196..ba035ca196 100644 --- a/editor/icons/icon_capsule_shape.svg +++ b/editor/icons/CapsuleShape.svg diff --git a/editor/icons/icon_capsule_shape_2d.svg b/editor/icons/CapsuleShape2D.svg index 81de995cb4..81de995cb4 100644 --- a/editor/icons/icon_capsule_shape_2d.svg +++ b/editor/icons/CapsuleShape2D.svg diff --git a/editor/icons/icon_center_container.svg b/editor/icons/CenterContainer.svg index 5d854a3cc3..5d854a3cc3 100644 --- a/editor/icons/icon_center_container.svg +++ b/editor/icons/CenterContainer.svg diff --git a/editor/icons/icon_check_box.svg b/editor/icons/CheckBox.svg index 6cb1f2aacd..6cb1f2aacd 100644 --- a/editor/icons/icon_check_box.svg +++ b/editor/icons/CheckBox.svg diff --git a/editor/icons/icon_check_button.svg b/editor/icons/CheckButton.svg index f689c5fe47..f689c5fe47 100644 --- a/editor/icons/icon_check_button.svg +++ b/editor/icons/CheckButton.svg diff --git a/editor/icons/icon_checkerboard.svg b/editor/icons/Checkerboard.svg index 7923291017..7923291017 100644 --- a/editor/icons/icon_checkerboard.svg +++ b/editor/icons/Checkerboard.svg diff --git a/editor/icons/icon_circle_shape_2d.svg b/editor/icons/CircleShape2D.svg index e41fc8807c..e41fc8807c 100644 --- a/editor/icons/icon_circle_shape_2d.svg +++ b/editor/icons/CircleShape2D.svg diff --git a/editor/icons/icon_class_list.svg b/editor/icons/ClassList.svg index ae2494724d..ae2494724d 100644 --- a/editor/icons/icon_class_list.svg +++ b/editor/icons/ClassList.svg diff --git a/editor/icons/icon_clear.svg b/editor/icons/Clear.svg index 91343ca6af..91343ca6af 100644 --- a/editor/icons/icon_clear.svg +++ b/editor/icons/Clear.svg diff --git a/editor/icons/icon_clipped_camera.svg b/editor/icons/ClippedCamera.svg index 8c80c04e27..8c80c04e27 100644 --- a/editor/icons/icon_clipped_camera.svg +++ b/editor/icons/ClippedCamera.svg diff --git a/editor/icons/icon_close.svg b/editor/icons/Close.svg index 4147c7bcdd..4147c7bcdd 100644 --- a/editor/icons/icon_close.svg +++ b/editor/icons/Close.svg diff --git a/editor/icons/icon_collapse.svg b/editor/icons/Collapse.svg index 62b5e55d81..62b5e55d81 100644 --- a/editor/icons/icon_collapse.svg +++ b/editor/icons/Collapse.svg diff --git a/editor/icons/icon_collision_polygon.svg b/editor/icons/CollisionPolygon.svg index 5e849ae4e3..5e849ae4e3 100644 --- a/editor/icons/icon_collision_polygon.svg +++ b/editor/icons/CollisionPolygon.svg diff --git a/editor/icons/icon_collision_polygon_2d.svg b/editor/icons/CollisionPolygon2D.svg index 54148f3fd4..54148f3fd4 100644 --- a/editor/icons/icon_collision_polygon_2d.svg +++ b/editor/icons/CollisionPolygon2D.svg diff --git a/editor/icons/icon_collision_shape.svg b/editor/icons/CollisionShape.svg index 8f14996a97..8f14996a97 100644 --- a/editor/icons/icon_collision_shape.svg +++ b/editor/icons/CollisionShape.svg diff --git a/editor/icons/icon_collision_shape_2d.svg b/editor/icons/CollisionShape2D.svg index 8210bf917f..8210bf917f 100644 --- a/editor/icons/icon_collision_shape_2d.svg +++ b/editor/icons/CollisionShape2D.svg diff --git a/editor/icons/icon_color.svg b/editor/icons/Color.svg index de0540763e..de0540763e 100644 --- a/editor/icons/icon_color.svg +++ b/editor/icons/Color.svg diff --git a/editor/icons/icon_color_pick.svg b/editor/icons/ColorPick.svg index d73225bd60..d73225bd60 100644 --- a/editor/icons/icon_color_pick.svg +++ b/editor/icons/ColorPick.svg diff --git a/editor/icons/icon_color_picker.svg b/editor/icons/ColorPicker.svg index 3d03615708..3d03615708 100644 --- a/editor/icons/icon_color_picker.svg +++ b/editor/icons/ColorPicker.svg diff --git a/editor/icons/icon_color_picker_button.svg b/editor/icons/ColorPickerButton.svg index b9fa86db6a..b9fa86db6a 100644 --- a/editor/icons/icon_color_picker_button.svg +++ b/editor/icons/ColorPickerButton.svg diff --git a/editor/icons/icon_color_ramp.svg b/editor/icons/ColorRamp.svg index e0f0a67483..e0f0a67483 100644 --- a/editor/icons/icon_color_ramp.svg +++ b/editor/icons/ColorRamp.svg diff --git a/editor/icons/icon_color_rect.svg b/editor/icons/ColorRect.svg index c2054de9d3..c2054de9d3 100644 --- a/editor/icons/icon_color_rect.svg +++ b/editor/icons/ColorRect.svg diff --git a/editor/icons/icon_color_track_vu.svg b/editor/icons/ColorTrackVu.svg index 5760f81070..5760f81070 100644 --- a/editor/icons/icon_color_track_vu.svg +++ b/editor/icons/ColorTrackVu.svg diff --git a/editor/icons/icon_concave_polygon_shape.svg b/editor/icons/ConcavePolygonShape.svg index 001ab82826..001ab82826 100644 --- a/editor/icons/icon_concave_polygon_shape.svg +++ b/editor/icons/ConcavePolygonShape.svg diff --git a/editor/icons/icon_concave_polygon_shape_2d.svg b/editor/icons/ConcavePolygonShape2D.svg index 38a92095c9..38a92095c9 100644 --- a/editor/icons/icon_concave_polygon_shape_2d.svg +++ b/editor/icons/ConcavePolygonShape2D.svg diff --git a/editor/icons/icon_cone_twist_joint.svg b/editor/icons/ConeTwistJoint.svg index 0e5e98a17b..0e5e98a17b 100644 --- a/editor/icons/icon_cone_twist_joint.svg +++ b/editor/icons/ConeTwistJoint.svg diff --git a/editor/icons/icon_confirmation_dialog.svg b/editor/icons/ConfirmationDialog.svg index d1f13fbb3b..d1f13fbb3b 100644 --- a/editor/icons/icon_confirmation_dialog.svg +++ b/editor/icons/ConfirmationDialog.svg diff --git a/editor/icons/icon_container.svg b/editor/icons/Container.svg index aaea67faa1..aaea67faa1 100644 --- a/editor/icons/icon_container.svg +++ b/editor/icons/Container.svg diff --git a/editor/icons/icon_control.svg b/editor/icons/Control.svg index ff6a52e29a..ff6a52e29a 100644 --- a/editor/icons/icon_control.svg +++ b/editor/icons/Control.svg diff --git a/editor/icons/icon_control_align_bottom_center.svg b/editor/icons/ControlAlignBottomCenter.svg index 7aee8caa79..7aee8caa79 100644 --- a/editor/icons/icon_control_align_bottom_center.svg +++ b/editor/icons/ControlAlignBottomCenter.svg diff --git a/editor/icons/icon_control_align_bottom_left.svg b/editor/icons/ControlAlignBottomLeft.svg index aa26eb570a..aa26eb570a 100644 --- a/editor/icons/icon_control_align_bottom_left.svg +++ b/editor/icons/ControlAlignBottomLeft.svg diff --git a/editor/icons/icon_control_align_bottom_right.svg b/editor/icons/ControlAlignBottomRight.svg index 737328e6f0..737328e6f0 100644 --- a/editor/icons/icon_control_align_bottom_right.svg +++ b/editor/icons/ControlAlignBottomRight.svg diff --git a/editor/icons/icon_control_align_bottom_wide.svg b/editor/icons/ControlAlignBottomWide.svg index ad0d7fac85..ad0d7fac85 100644 --- a/editor/icons/icon_control_align_bottom_wide.svg +++ b/editor/icons/ControlAlignBottomWide.svg diff --git a/editor/icons/icon_control_align_center.svg b/editor/icons/ControlAlignCenter.svg index 14dd500500..14dd500500 100644 --- a/editor/icons/icon_control_align_center.svg +++ b/editor/icons/ControlAlignCenter.svg diff --git a/editor/icons/icon_control_align_center_left.svg b/editor/icons/ControlAlignCenterLeft.svg index 52f1d4d143..52f1d4d143 100644 --- a/editor/icons/icon_control_align_center_left.svg +++ b/editor/icons/ControlAlignCenterLeft.svg diff --git a/editor/icons/icon_control_align_center_right.svg b/editor/icons/ControlAlignCenterRight.svg index 201796f172..201796f172 100644 --- a/editor/icons/icon_control_align_center_right.svg +++ b/editor/icons/ControlAlignCenterRight.svg diff --git a/editor/icons/icon_control_align_left_center.svg b/editor/icons/ControlAlignLeftCenter.svg index 8135c9d851..8135c9d851 100644 --- a/editor/icons/icon_control_align_left_center.svg +++ b/editor/icons/ControlAlignLeftCenter.svg diff --git a/editor/icons/icon_control_align_left_wide.svg b/editor/icons/ControlAlignLeftWide.svg index 56d16bec76..56d16bec76 100644 --- a/editor/icons/icon_control_align_left_wide.svg +++ b/editor/icons/ControlAlignLeftWide.svg diff --git a/editor/icons/icon_control_align_right_center.svg b/editor/icons/ControlAlignRightCenter.svg index 69c4dba40d..69c4dba40d 100644 --- a/editor/icons/icon_control_align_right_center.svg +++ b/editor/icons/ControlAlignRightCenter.svg diff --git a/editor/icons/icon_control_align_right_wide.svg b/editor/icons/ControlAlignRightWide.svg index b0a46cdb82..b0a46cdb82 100644 --- a/editor/icons/icon_control_align_right_wide.svg +++ b/editor/icons/ControlAlignRightWide.svg diff --git a/editor/icons/icon_control_align_top_center.svg b/editor/icons/ControlAlignTopCenter.svg index cafb3ff856..cafb3ff856 100644 --- a/editor/icons/icon_control_align_top_center.svg +++ b/editor/icons/ControlAlignTopCenter.svg diff --git a/editor/icons/icon_control_align_top_left.svg b/editor/icons/ControlAlignTopLeft.svg index ad288647fb..ad288647fb 100644 --- a/editor/icons/icon_control_align_top_left.svg +++ b/editor/icons/ControlAlignTopLeft.svg diff --git a/editor/icons/icon_control_align_top_right.svg b/editor/icons/ControlAlignTopRight.svg index d9955de728..d9955de728 100644 --- a/editor/icons/icon_control_align_top_right.svg +++ b/editor/icons/ControlAlignTopRight.svg diff --git a/editor/icons/icon_control_align_top_wide.svg b/editor/icons/ControlAlignTopWide.svg index 2526b45ad9..2526b45ad9 100644 --- a/editor/icons/icon_control_align_top_wide.svg +++ b/editor/icons/ControlAlignTopWide.svg diff --git a/editor/icons/icon_control_align_wide.svg b/editor/icons/ControlAlignWide.svg index 5d1467cd9b..5d1467cd9b 100644 --- a/editor/icons/icon_control_align_wide.svg +++ b/editor/icons/ControlAlignWide.svg diff --git a/editor/icons/icon_control_hcenter_wide.svg b/editor/icons/ControlHcenterWide.svg index 51c9aeb22d..51c9aeb22d 100644 --- a/editor/icons/icon_control_hcenter_wide.svg +++ b/editor/icons/ControlHcenterWide.svg diff --git a/editor/icons/icon_control_layout.svg b/editor/icons/ControlLayout.svg index e39e6b474c..e39e6b474c 100644 --- a/editor/icons/icon_control_layout.svg +++ b/editor/icons/ControlLayout.svg diff --git a/editor/icons/icon_control_vcenter_wide.svg b/editor/icons/ControlVcenterWide.svg index 93bbc5748b..93bbc5748b 100644 --- a/editor/icons/icon_control_vcenter_wide.svg +++ b/editor/icons/ControlVcenterWide.svg diff --git a/editor/icons/icon_convex_polygon_shape.svg b/editor/icons/ConvexPolygonShape.svg index bfb9230586..bfb9230586 100644 --- a/editor/icons/icon_convex_polygon_shape.svg +++ b/editor/icons/ConvexPolygonShape.svg diff --git a/editor/icons/icon_convex_polygon_shape_2d.svg b/editor/icons/ConvexPolygonShape2D.svg index 8d16523d93..8d16523d93 100644 --- a/editor/icons/icon_convex_polygon_shape_2d.svg +++ b/editor/icons/ConvexPolygonShape2D.svg diff --git a/editor/icons/icon_copy_node_path.svg b/editor/icons/CopyNodePath.svg index 2cabe0a44e..2cabe0a44e 100644 --- a/editor/icons/icon_copy_node_path.svg +++ b/editor/icons/CopyNodePath.svg diff --git a/editor/icons/icon_create_new_scene_from.svg b/editor/icons/CreateNewSceneFrom.svg index ffeaa36bc4..ffeaa36bc4 100644 --- a/editor/icons/icon_create_new_scene_from.svg +++ b/editor/icons/CreateNewSceneFrom.svg diff --git a/editor/icons/icon_crosshair.svg b/editor/icons/Crosshair.svg index b6fa5ec654..b6fa5ec654 100644 --- a/editor/icons/icon_crosshair.svg +++ b/editor/icons/Crosshair.svg diff --git a/editor/icons/icon_crypto_key.svg b/editor/icons/CryptoKey.svg index 45b53c815d..45b53c815d 100644 --- a/editor/icons/icon_crypto_key.svg +++ b/editor/icons/CryptoKey.svg diff --git a/editor/icons/icon_cube_map.svg b/editor/icons/CubeMap.svg index c9e6f1fa7d..c9e6f1fa7d 100644 --- a/editor/icons/icon_cube_map.svg +++ b/editor/icons/CubeMap.svg diff --git a/editor/icons/icon_cube_mesh.svg b/editor/icons/CubeMesh.svg index aeb5324b1b..aeb5324b1b 100644 --- a/editor/icons/icon_cube_mesh.svg +++ b/editor/icons/CubeMesh.svg diff --git a/editor/icons/icon_curve.svg b/editor/icons/Curve.svg index 14895337c6..14895337c6 100644 --- a/editor/icons/icon_curve.svg +++ b/editor/icons/Curve.svg diff --git a/editor/icons/icon_curve_2d.svg b/editor/icons/Curve2D.svg index 23f585c7c5..23f585c7c5 100644 --- a/editor/icons/icon_curve_2d.svg +++ b/editor/icons/Curve2D.svg diff --git a/editor/icons/icon_curve_3d.svg b/editor/icons/Curve3D.svg index f14c581ec3..f14c581ec3 100644 --- a/editor/icons/icon_curve_3d.svg +++ b/editor/icons/Curve3D.svg diff --git a/editor/icons/icon_curve_close.svg b/editor/icons/CurveClose.svg index 7d7bae88c2..7d7bae88c2 100644 --- a/editor/icons/icon_curve_close.svg +++ b/editor/icons/CurveClose.svg diff --git a/editor/icons/icon_curve_constant.svg b/editor/icons/CurveConstant.svg index 713a3a982a..713a3a982a 100644 --- a/editor/icons/icon_curve_constant.svg +++ b/editor/icons/CurveConstant.svg diff --git a/editor/icons/icon_curve_create.svg b/editor/icons/CurveCreate.svg index 43811f93f5..43811f93f5 100644 --- a/editor/icons/icon_curve_create.svg +++ b/editor/icons/CurveCreate.svg diff --git a/editor/icons/icon_curve_curve.svg b/editor/icons/CurveCurve.svg index 60f965abc1..60f965abc1 100644 --- a/editor/icons/icon_curve_curve.svg +++ b/editor/icons/CurveCurve.svg diff --git a/editor/icons/icon_curve_delete.svg b/editor/icons/CurveDelete.svg index afb545840f..afb545840f 100644 --- a/editor/icons/icon_curve_delete.svg +++ b/editor/icons/CurveDelete.svg diff --git a/editor/icons/icon_curve_edit.svg b/editor/icons/CurveEdit.svg index 5d1d6560e1..5d1d6560e1 100644 --- a/editor/icons/icon_curve_edit.svg +++ b/editor/icons/CurveEdit.svg diff --git a/editor/icons/icon_curve_in.svg b/editor/icons/CurveIn.svg index b9e203dea0..b9e203dea0 100644 --- a/editor/icons/icon_curve_in.svg +++ b/editor/icons/CurveIn.svg diff --git a/editor/icons/icon_curve_in_out.svg b/editor/icons/CurveInOut.svg index 6d3c57d4f5..6d3c57d4f5 100644 --- a/editor/icons/icon_curve_in_out.svg +++ b/editor/icons/CurveInOut.svg diff --git a/editor/icons/icon_curve_linear.svg b/editor/icons/CurveLinear.svg index 2256f493ce..2256f493ce 100644 --- a/editor/icons/icon_curve_linear.svg +++ b/editor/icons/CurveLinear.svg diff --git a/editor/icons/icon_curve_out.svg b/editor/icons/CurveOut.svg index 9b04df6b6c..9b04df6b6c 100644 --- a/editor/icons/icon_curve_out.svg +++ b/editor/icons/CurveOut.svg diff --git a/editor/icons/icon_curve_out_in.svg b/editor/icons/CurveOutIn.svg index 4a08d30966..4a08d30966 100644 --- a/editor/icons/icon_curve_out_in.svg +++ b/editor/icons/CurveOutIn.svg diff --git a/editor/icons/icon_curve_texture.svg b/editor/icons/CurveTexture.svg index 05f9d62775..05f9d62775 100644 --- a/editor/icons/icon_curve_texture.svg +++ b/editor/icons/CurveTexture.svg diff --git a/editor/icons/icon_cylinder_mesh.svg b/editor/icons/CylinderMesh.svg index f204edc985..f204edc985 100644 --- a/editor/icons/icon_cylinder_mesh.svg +++ b/editor/icons/CylinderMesh.svg diff --git a/editor/icons/icon_cylinder_shape.svg b/editor/icons/CylinderShape.svg index f0aa5833d2..f0aa5833d2 100644 --- a/editor/icons/icon_cylinder_shape.svg +++ b/editor/icons/CylinderShape.svg diff --git a/editor/icons/icon_damped_spring_joint_2d.svg b/editor/icons/DampedSpringJoint2D.svg index 9bd842bcc8..9bd842bcc8 100644 --- a/editor/icons/icon_damped_spring_joint_2d.svg +++ b/editor/icons/DampedSpringJoint2D.svg diff --git a/editor/icons/icon_debug.svg b/editor/icons/Debug.svg index 7490862c4a..7490862c4a 100644 --- a/editor/icons/icon_debug.svg +++ b/editor/icons/Debug.svg diff --git a/editor/icons/icon_debug_continue.svg b/editor/icons/DebugContinue.svg index 69c64c4fd4..69c64c4fd4 100644 --- a/editor/icons/icon_debug_continue.svg +++ b/editor/icons/DebugContinue.svg diff --git a/editor/icons/icon_debug_next.svg b/editor/icons/DebugNext.svg index 133be255e1..133be255e1 100644 --- a/editor/icons/icon_debug_next.svg +++ b/editor/icons/DebugNext.svg diff --git a/editor/icons/icon_debug_skip_breakpoints_off.svg b/editor/icons/DebugSkipBreakpointsOff.svg index f8923510bb..f8923510bb 100644 --- a/editor/icons/icon_debug_skip_breakpoints_off.svg +++ b/editor/icons/DebugSkipBreakpointsOff.svg diff --git a/editor/icons/icon_debug_skip_breakpoints_on.svg b/editor/icons/DebugSkipBreakpointsOn.svg index d4a4b4c138..d4a4b4c138 100644 --- a/editor/icons/icon_debug_skip_breakpoints_on.svg +++ b/editor/icons/DebugSkipBreakpointsOn.svg diff --git a/editor/icons/icon_debug_step.svg b/editor/icons/DebugStep.svg index c0356463fe..c0356463fe 100644 --- a/editor/icons/icon_debug_step.svg +++ b/editor/icons/DebugStep.svg diff --git a/editor/icons/icon_default_project_icon.svg b/editor/icons/DefaultProjectIcon.svg index 10ecbd019d..10ecbd019d 100644 --- a/editor/icons/icon_default_project_icon.svg +++ b/editor/icons/DefaultProjectIcon.svg diff --git a/editor/icons/icon_delete_split.svg b/editor/icons/DeleteSplit.svg index 7424de3b8a..7424de3b8a 100644 --- a/editor/icons/icon_delete_split.svg +++ b/editor/icons/DeleteSplit.svg diff --git a/editor/icons/icon_dictionary.svg b/editor/icons/Dictionary.svg index 668ef37a86..668ef37a86 100644 --- a/editor/icons/icon_dictionary.svg +++ b/editor/icons/Dictionary.svg diff --git a/editor/icons/icon_directional_light.svg b/editor/icons/DirectionalLight.svg index faac2be134..faac2be134 100644 --- a/editor/icons/icon_directional_light.svg +++ b/editor/icons/DirectionalLight.svg diff --git a/editor/icons/icon_distraction_free.svg b/editor/icons/DistractionFree.svg index 8608b33f58..8608b33f58 100644 --- a/editor/icons/icon_distraction_free.svg +++ b/editor/icons/DistractionFree.svg diff --git a/editor/icons/icon_duplicate.svg b/editor/icons/Duplicate.svg index d506b7a8c7..d506b7a8c7 100644 --- a/editor/icons/icon_duplicate.svg +++ b/editor/icons/Duplicate.svg diff --git a/editor/icons/icon_dynamic_font.svg b/editor/icons/DynamicFont.svg index fe5eca2e35..fe5eca2e35 100644 --- a/editor/icons/icon_dynamic_font.svg +++ b/editor/icons/DynamicFont.svg diff --git a/editor/icons/icon_dynamic_font_data.svg b/editor/icons/DynamicFontData.svg index 56426dd33e..56426dd33e 100644 --- a/editor/icons/icon_dynamic_font_data.svg +++ b/editor/icons/DynamicFontData.svg diff --git a/editor/icons/icon_edit.svg b/editor/icons/Edit.svg index bb7ffa2fce..bb7ffa2fce 100644 --- a/editor/icons/icon_edit.svg +++ b/editor/icons/Edit.svg diff --git a/editor/icons/icon_edit_bezier.svg b/editor/icons/EditBezier.svg index be9e2f22b8..be9e2f22b8 100644 --- a/editor/icons/icon_edit_bezier.svg +++ b/editor/icons/EditBezier.svg diff --git a/editor/icons/icon_edit_internal.svg b/editor/icons/EditInternal.svg index 2a538102ce..2a538102ce 100644 --- a/editor/icons/icon_edit_internal.svg +++ b/editor/icons/EditInternal.svg diff --git a/editor/icons/icon_edit_key.svg b/editor/icons/EditKey.svg index 883ddfda71..883ddfda71 100644 --- a/editor/icons/icon_edit_key.svg +++ b/editor/icons/EditKey.svg diff --git a/editor/icons/icon_edit_pivot.svg b/editor/icons/EditPivot.svg index ae303535b4..ae303535b4 100644 --- a/editor/icons/icon_edit_pivot.svg +++ b/editor/icons/EditPivot.svg diff --git a/editor/icons/icon_edit_resource.svg b/editor/icons/EditResource.svg index e16ca00355..e16ca00355 100644 --- a/editor/icons/icon_edit_resource.svg +++ b/editor/icons/EditResource.svg diff --git a/editor/icons/icon_editor_3d_handle.svg b/editor/icons/Editor3DHandle.svg index 687a5b184d..687a5b184d 100644 --- a/editor/icons/icon_editor_3d_handle.svg +++ b/editor/icons/Editor3DHandle.svg diff --git a/editor/icons/icon_editor_control_anchor.svg b/editor/icons/EditorControlAnchor.svg index 11e2bb5175..11e2bb5175 100644 --- a/editor/icons/icon_editor_control_anchor.svg +++ b/editor/icons/EditorControlAnchor.svg diff --git a/editor/icons/icon_editor_curve_handle.svg b/editor/icons/EditorCurveHandle.svg index c405ceab9d..c405ceab9d 100644 --- a/editor/icons/icon_editor_curve_handle.svg +++ b/editor/icons/EditorCurveHandle.svg diff --git a/editor/icons/icon_editor_handle.svg b/editor/icons/EditorHandle.svg index 8b11e782db..8b11e782db 100644 --- a/editor/icons/icon_editor_handle.svg +++ b/editor/icons/EditorHandle.svg diff --git a/editor/icons/icon_editor_handle_add.svg b/editor/icons/EditorHandleAdd.svg index bf3b604d5c..bf3b604d5c 100644 --- a/editor/icons/icon_editor_handle_add.svg +++ b/editor/icons/EditorHandleAdd.svg diff --git a/editor/icons/icon_editor_internal_handle.svg b/editor/icons/EditorInternalHandle.svg index 244e6b5d6c..244e6b5d6c 100644 --- a/editor/icons/icon_editor_internal_handle.svg +++ b/editor/icons/EditorInternalHandle.svg diff --git a/editor/icons/icon_editor_path_sharp_handle.svg b/editor/icons/EditorPathSharpHandle.svg index db160dfeae..db160dfeae 100644 --- a/editor/icons/icon_editor_path_sharp_handle.svg +++ b/editor/icons/EditorPathSharpHandle.svg diff --git a/editor/icons/icon_editor_path_smooth_handle.svg b/editor/icons/EditorPathSmoothHandle.svg index 34f3d290bd..34f3d290bd 100644 --- a/editor/icons/icon_editor_path_smooth_handle.svg +++ b/editor/icons/EditorPathSmoothHandle.svg diff --git a/editor/icons/icon_editor_pivot.svg b/editor/icons/EditorPivot.svg index 8e00f60530..8e00f60530 100644 --- a/editor/icons/icon_editor_pivot.svg +++ b/editor/icons/EditorPivot.svg diff --git a/editor/icons/icon_editor_plugin.svg b/editor/icons/EditorPlugin.svg index 72f2bd5c28..72f2bd5c28 100644 --- a/editor/icons/icon_editor_plugin.svg +++ b/editor/icons/EditorPlugin.svg diff --git a/editor/icons/icon_editor_position.svg b/editor/icons/EditorPosition.svg index 7b17fb5aa3..7b17fb5aa3 100644 --- a/editor/icons/icon_editor_position.svg +++ b/editor/icons/EditorPosition.svg diff --git a/editor/icons/icon_editor_position_previous.svg b/editor/icons/EditorPositionPrevious.svg index 8c1d2992a5..8c1d2992a5 100644 --- a/editor/icons/icon_editor_position_previous.svg +++ b/editor/icons/EditorPositionPrevious.svg diff --git a/editor/icons/icon_editor_position_unselected.svg b/editor/icons/EditorPositionUnselected.svg index b9a38ca371..b9a38ca371 100644 --- a/editor/icons/icon_editor_position_unselected.svg +++ b/editor/icons/EditorPositionUnselected.svg diff --git a/editor/icons/icon_enum.svg b/editor/icons/Enum.svg index efa3050e95..efa3050e95 100644 --- a/editor/icons/icon_enum.svg +++ b/editor/icons/Enum.svg diff --git a/editor/icons/icon_environment.svg b/editor/icons/Environment.svg index ee29342942..ee29342942 100644 --- a/editor/icons/icon_environment.svg +++ b/editor/icons/Environment.svg diff --git a/editor/icons/icon_error.svg b/editor/icons/Error.svg index 05e548068d..05e548068d 100644 --- a/editor/icons/icon_error.svg +++ b/editor/icons/Error.svg diff --git a/editor/icons/icon_error_sign.svg b/editor/icons/ErrorSign.svg index 96aace5c0c..96aace5c0c 100644 --- a/editor/icons/icon_error_sign.svg +++ b/editor/icons/ErrorSign.svg diff --git a/editor/icons/icon_expand_bottom_dock.svg b/editor/icons/ExpandBottomDock.svg index 09cc3b9b07..09cc3b9b07 100644 --- a/editor/icons/icon_expand_bottom_dock.svg +++ b/editor/icons/ExpandBottomDock.svg diff --git a/editor/icons/icon_favorites.svg b/editor/icons/Favorites.svg index 79e0c8475e..79e0c8475e 100644 --- a/editor/icons/icon_favorites.svg +++ b/editor/icons/Favorites.svg diff --git a/editor/icons/icon_file.svg b/editor/icons/File.svg index 22d330fd56..22d330fd56 100644 --- a/editor/icons/icon_file.svg +++ b/editor/icons/File.svg diff --git a/editor/icons/icon_file_big_thumb.svg b/editor/icons/FileBigThumb.svg index 50900ab684..50900ab684 100644 --- a/editor/icons/icon_file_big_thumb.svg +++ b/editor/icons/FileBigThumb.svg diff --git a/editor/icons/icon_file_broken.svg b/editor/icons/FileBroken.svg index af79f02c12..af79f02c12 100644 --- a/editor/icons/icon_file_broken.svg +++ b/editor/icons/FileBroken.svg diff --git a/editor/icons/icon_file_broken_big_thumb.svg b/editor/icons/FileBrokenBigThumb.svg index 08dee26f1c..08dee26f1c 100644 --- a/editor/icons/icon_file_broken_big_thumb.svg +++ b/editor/icons/FileBrokenBigThumb.svg diff --git a/editor/icons/icon_file_dead.svg b/editor/icons/FileDead.svg index c40aa1b9a4..c40aa1b9a4 100644 --- a/editor/icons/icon_file_dead.svg +++ b/editor/icons/FileDead.svg diff --git a/editor/icons/icon_file_dead_big_thumb.svg b/editor/icons/FileDeadBigThumb.svg index 79369873a6..79369873a6 100644 --- a/editor/icons/icon_file_dead_big_thumb.svg +++ b/editor/icons/FileDeadBigThumb.svg diff --git a/editor/icons/icon_file_dead_medium_thumb.svg b/editor/icons/FileDeadMediumThumb.svg index 62496daaae..62496daaae 100644 --- a/editor/icons/icon_file_dead_medium_thumb.svg +++ b/editor/icons/FileDeadMediumThumb.svg diff --git a/editor/icons/icon_file_dialog.svg b/editor/icons/FileDialog.svg index 7708659c21..7708659c21 100644 --- a/editor/icons/icon_file_dialog.svg +++ b/editor/icons/FileDialog.svg diff --git a/editor/icons/icon_file_list.svg b/editor/icons/FileList.svg index e47c8b18cb..e47c8b18cb 100644 --- a/editor/icons/icon_file_list.svg +++ b/editor/icons/FileList.svg diff --git a/editor/icons/icon_file_medium_thumb.svg b/editor/icons/FileMediumThumb.svg index 4c7d78b58e..4c7d78b58e 100644 --- a/editor/icons/icon_file_medium_thumb.svg +++ b/editor/icons/FileMediumThumb.svg diff --git a/editor/icons/icon_file_thumbnail.svg b/editor/icons/FileThumbnail.svg index 571335a935..571335a935 100644 --- a/editor/icons/icon_file_thumbnail.svg +++ b/editor/icons/FileThumbnail.svg diff --git a/editor/icons/icon_filesystem.svg b/editor/icons/Filesystem.svg index da6fa2ad60..da6fa2ad60 100644 --- a/editor/icons/icon_filesystem.svg +++ b/editor/icons/Filesystem.svg diff --git a/editor/icons/icon_fixed_material.svg b/editor/icons/FixedMaterial.svg index 903691689b..903691689b 100644 --- a/editor/icons/icon_fixed_material.svg +++ b/editor/icons/FixedMaterial.svg diff --git a/editor/icons/icon_fixed_spatial_material.svg b/editor/icons/FixedSpatialMaterial.svg index ba1e251088..ba1e251088 100644 --- a/editor/icons/icon_fixed_spatial_material.svg +++ b/editor/icons/FixedSpatialMaterial.svg diff --git a/editor/icons/icon_folder.svg b/editor/icons/Folder.svg index 00ff7a95e9..00ff7a95e9 100644 --- a/editor/icons/icon_folder.svg +++ b/editor/icons/Folder.svg diff --git a/editor/icons/icon_folder_big_thumb.svg b/editor/icons/FolderBigThumb.svg index a620d17b8f..a620d17b8f 100644 --- a/editor/icons/icon_folder_big_thumb.svg +++ b/editor/icons/FolderBigThumb.svg diff --git a/editor/icons/icon_folder_medium_thumb.svg b/editor/icons/FolderMediumThumb.svg index 431650aff0..431650aff0 100644 --- a/editor/icons/icon_folder_medium_thumb.svg +++ b/editor/icons/FolderMediumThumb.svg diff --git a/editor/icons/icon_font.svg b/editor/icons/Font.svg index 4b71b59d2e..4b71b59d2e 100644 --- a/editor/icons/icon_font.svg +++ b/editor/icons/Font.svg diff --git a/editor/icons/icon_forward.svg b/editor/icons/Forward.svg index aecd4b362c..aecd4b362c 100644 --- a/editor/icons/icon_forward.svg +++ b/editor/icons/Forward.svg diff --git a/editor/icons/icon_g_i_probe.svg b/editor/icons/GIProbe.svg index 5a5bfd3c5a..5a5bfd3c5a 100644 --- a/editor/icons/icon_g_i_probe.svg +++ b/editor/icons/GIProbe.svg diff --git a/editor/icons/icon_g_i_probe_data.svg b/editor/icons/GIProbeData.svg index d4765be30f..d4765be30f 100644 --- a/editor/icons/icon_g_i_probe_data.svg +++ b/editor/icons/GIProbeData.svg diff --git a/editor/icons/icon_generic_6_d_o_f_joint.svg b/editor/icons/Generic6DOFJoint.svg index 30d892e7a1..30d892e7a1 100644 --- a/editor/icons/icon_generic_6_d_o_f_joint.svg +++ b/editor/icons/Generic6DOFJoint.svg diff --git a/editor/icons/icon_gizmo_baked_lightmap.svg b/editor/icons/GizmoBakedLightmap.svg index 9568f7ff25..9568f7ff25 100644 --- a/editor/icons/icon_gizmo_baked_lightmap.svg +++ b/editor/icons/GizmoBakedLightmap.svg diff --git a/editor/icons/icon_gizmo_c_p_u_particles.svg b/editor/icons/GizmoCPUParticles.svg index d4e86d9c42..d4e86d9c42 100644 --- a/editor/icons/icon_gizmo_c_p_u_particles.svg +++ b/editor/icons/GizmoCPUParticles.svg diff --git a/editor/icons/icon_gizmo_camera.svg b/editor/icons/GizmoCamera.svg index f28efb813e..f28efb813e 100644 --- a/editor/icons/icon_gizmo_camera.svg +++ b/editor/icons/GizmoCamera.svg diff --git a/editor/icons/icon_gizmo_directional_light.svg b/editor/icons/GizmoDirectionalLight.svg index dc2d6bf82d..dc2d6bf82d 100644 --- a/editor/icons/icon_gizmo_directional_light.svg +++ b/editor/icons/GizmoDirectionalLight.svg diff --git a/editor/icons/icon_gizmo_g_i_probe.svg b/editor/icons/GizmoGIProbe.svg index c792dc5a28..c792dc5a28 100644 --- a/editor/icons/icon_gizmo_g_i_probe.svg +++ b/editor/icons/GizmoGIProbe.svg diff --git a/editor/icons/icon_gizmo_light.svg b/editor/icons/GizmoLight.svg index 1e47082a0a..1e47082a0a 100644 --- a/editor/icons/icon_gizmo_light.svg +++ b/editor/icons/GizmoLight.svg diff --git a/editor/icons/icon_gizmo_listener.svg b/editor/icons/GizmoListener.svg index 9e28c7730f..9e28c7730f 100644 --- a/editor/icons/icon_gizmo_listener.svg +++ b/editor/icons/GizmoListener.svg diff --git a/editor/icons/icon_gizmo_particles.svg b/editor/icons/GizmoParticles.svg index 1c5d8c5f2d..1c5d8c5f2d 100644 --- a/editor/icons/icon_gizmo_particles.svg +++ b/editor/icons/GizmoParticles.svg diff --git a/editor/icons/icon_gizmo_reflection_probe.svg b/editor/icons/GizmoReflectionProbe.svg index 82136821c7..82136821c7 100644 --- a/editor/icons/icon_gizmo_reflection_probe.svg +++ b/editor/icons/GizmoReflectionProbe.svg diff --git a/editor/icons/icon_gizmo_spatial_sample_player.svg b/editor/icons/GizmoSpatialSamplePlayer.svg index ee471124dc..ee471124dc 100644 --- a/editor/icons/icon_gizmo_spatial_sample_player.svg +++ b/editor/icons/GizmoSpatialSamplePlayer.svg diff --git a/editor/icons/icon_gizmo_spot_light.svg b/editor/icons/GizmoSpotLight.svg index 23a8364679..23a8364679 100644 --- a/editor/icons/icon_gizmo_spot_light.svg +++ b/editor/icons/GizmoSpotLight.svg diff --git a/editor/icons/icon_godot.svg b/editor/icons/Godot.svg index 8ca9fdcabd..8ca9fdcabd 100644 --- a/editor/icons/icon_godot.svg +++ b/editor/icons/Godot.svg diff --git a/editor/icons/icon_gradient.svg b/editor/icons/Gradient.svg index b67a9e6f8a..b67a9e6f8a 100644 --- a/editor/icons/icon_gradient.svg +++ b/editor/icons/Gradient.svg diff --git a/editor/icons/icon_gradient_texture.svg b/editor/icons/GradientTexture.svg index 1388c141bd..1388c141bd 100644 --- a/editor/icons/icon_gradient_texture.svg +++ b/editor/icons/GradientTexture.svg diff --git a/editor/icons/icon_graph_edit.svg b/editor/icons/GraphEdit.svg index 7ab7245260..7ab7245260 100644 --- a/editor/icons/icon_graph_edit.svg +++ b/editor/icons/GraphEdit.svg diff --git a/editor/icons/icon_graph_node.svg b/editor/icons/GraphNode.svg index c8d4fda910..c8d4fda910 100644 --- a/editor/icons/icon_graph_node.svg +++ b/editor/icons/GraphNode.svg diff --git a/editor/icons/icon_grid.svg b/editor/icons/Grid.svg index 869bc649fe..869bc649fe 100644 --- a/editor/icons/icon_grid.svg +++ b/editor/icons/Grid.svg diff --git a/editor/icons/icon_grid_container.svg b/editor/icons/GridContainer.svg index 9fffd8b342..9fffd8b342 100644 --- a/editor/icons/icon_grid_container.svg +++ b/editor/icons/GridContainer.svg diff --git a/editor/icons/icon_groove_joint_2d.svg b/editor/icons/GrooveJoint2D.svg index a2c7b741ad..a2c7b741ad 100644 --- a/editor/icons/icon_groove_joint_2d.svg +++ b/editor/icons/GrooveJoint2D.svg diff --git a/editor/icons/icon_group.svg b/editor/icons/Group.svg index 7e0b2f3675..7e0b2f3675 100644 --- a/editor/icons/icon_group.svg +++ b/editor/icons/Group.svg diff --git a/editor/icons/icon_group_viewport.svg b/editor/icons/GroupViewport.svg index 768c87e18d..768c87e18d 100644 --- a/editor/icons/icon_group_viewport.svg +++ b/editor/icons/GroupViewport.svg diff --git a/editor/icons/icon_groups.svg b/editor/icons/Groups.svg index 5c8bd73f0f..5c8bd73f0f 100644 --- a/editor/icons/icon_groups.svg +++ b/editor/icons/Groups.svg diff --git a/editor/icons/icon_GUI_checked.svg b/editor/icons/GuiChecked.svg index 8d00eca8d3..8d00eca8d3 100644 --- a/editor/icons/icon_GUI_checked.svg +++ b/editor/icons/GuiChecked.svg diff --git a/editor/icons/icon_gui_close.svg b/editor/icons/GuiClose.svg index 3596061877..3596061877 100644 --- a/editor/icons/icon_gui_close.svg +++ b/editor/icons/GuiClose.svg diff --git a/editor/icons/icon_gui_close_customizable.svg b/editor/icons/GuiCloseCustomizable.svg index 3596061877..3596061877 100644 --- a/editor/icons/icon_gui_close_customizable.svg +++ b/editor/icons/GuiCloseCustomizable.svg diff --git a/editor/icons/icon_GUI_dropdown.svg b/editor/icons/GuiDropdown.svg index 3ed9466f4a..3ed9466f4a 100644 --- a/editor/icons/icon_GUI_dropdown.svg +++ b/editor/icons/GuiDropdown.svg diff --git a/editor/icons/icon_GUI_ellipsis.svg b/editor/icons/GuiEllipsis.svg index 4d530d635e..4d530d635e 100644 --- a/editor/icons/icon_GUI_ellipsis.svg +++ b/editor/icons/GuiEllipsis.svg diff --git a/editor/icons/icon_gui_graph_node_port.svg b/editor/icons/GuiGraphNodePort.svg index 2023a30ead..2023a30ead 100644 --- a/editor/icons/icon_gui_graph_node_port.svg +++ b/editor/icons/GuiGraphNodePort.svg diff --git a/editor/icons/icon_GUI_h_tick.svg b/editor/icons/GuiHTick.svg index 01fecf5d12..01fecf5d12 100644 --- a/editor/icons/icon_GUI_h_tick.svg +++ b/editor/icons/GuiHTick.svg diff --git a/editor/icons/icon_GUI_hsplitter.svg b/editor/icons/GuiHsplitter.svg index f94a81cb1e..f94a81cb1e 100644 --- a/editor/icons/icon_GUI_hsplitter.svg +++ b/editor/icons/GuiHsplitter.svg diff --git a/editor/icons/icon_GUI_mini_checkerboard.svg b/editor/icons/GuiMiniCheckerboard.svg index dc6c7e37d1..dc6c7e37d1 100644 --- a/editor/icons/icon_GUI_mini_checkerboard.svg +++ b/editor/icons/GuiMiniCheckerboard.svg diff --git a/editor/icons/icon_GUI_option_arrow.svg b/editor/icons/GuiOptionArrow.svg index 28435e08c3..28435e08c3 100644 --- a/editor/icons/icon_GUI_option_arrow.svg +++ b/editor/icons/GuiOptionArrow.svg diff --git a/editor/icons/icon_GUI_progress_bar.svg b/editor/icons/GuiProgressBar.svg index a7a57adaa7..a7a57adaa7 100644 --- a/editor/icons/icon_GUI_progress_bar.svg +++ b/editor/icons/GuiProgressBar.svg diff --git a/editor/icons/icon_GUI_progress_fill.svg b/editor/icons/GuiProgressFill.svg index a75bf93edd..a75bf93edd 100644 --- a/editor/icons/icon_GUI_progress_fill.svg +++ b/editor/icons/GuiProgressFill.svg diff --git a/editor/icons/icon_GUI_radio_checked.svg b/editor/icons/GuiRadioChecked.svg index 447b57f8ae..447b57f8ae 100644 --- a/editor/icons/icon_GUI_radio_checked.svg +++ b/editor/icons/GuiRadioChecked.svg diff --git a/editor/icons/icon_GUI_radio_unchecked.svg b/editor/icons/GuiRadioUnchecked.svg index 1e8117bd10..1e8117bd10 100644 --- a/editor/icons/icon_GUI_radio_unchecked.svg +++ b/editor/icons/GuiRadioUnchecked.svg diff --git a/editor/icons/icon_gui_resizer.svg b/editor/icons/GuiResizer.svg index 545a1c9612..545a1c9612 100644 --- a/editor/icons/icon_gui_resizer.svg +++ b/editor/icons/GuiResizer.svg diff --git a/editor/icons/icon_GUI_scroll_arrow_left.svg b/editor/icons/GuiScrollArrowLeft.svg index a118f04e17..a118f04e17 100644 --- a/editor/icons/icon_GUI_scroll_arrow_left.svg +++ b/editor/icons/GuiScrollArrowLeft.svg diff --git a/editor/icons/icon_GUI_scroll_arrow_left_hl.svg b/editor/icons/GuiScrollArrowLeftHl.svg index 046356f18b..046356f18b 100644 --- a/editor/icons/icon_GUI_scroll_arrow_left_hl.svg +++ b/editor/icons/GuiScrollArrowLeftHl.svg diff --git a/editor/icons/icon_GUI_scroll_arrow_right.svg b/editor/icons/GuiScrollArrowRight.svg index 4e0a8b5327..4e0a8b5327 100644 --- a/editor/icons/icon_GUI_scroll_arrow_right.svg +++ b/editor/icons/GuiScrollArrowRight.svg diff --git a/editor/icons/icon_GUI_scroll_arrow_right_hl.svg b/editor/icons/GuiScrollArrowRightHl.svg index 4224ca8de4..4224ca8de4 100644 --- a/editor/icons/icon_GUI_scroll_arrow_right_hl.svg +++ b/editor/icons/GuiScrollArrowRightHl.svg diff --git a/editor/icons/icon_GUI_scroll_bg.svg b/editor/icons/GuiScrollBg.svg index 263b42ea61..263b42ea61 100644 --- a/editor/icons/icon_GUI_scroll_bg.svg +++ b/editor/icons/GuiScrollBg.svg diff --git a/editor/icons/icon_GUI_scroll_grabber.svg b/editor/icons/GuiScrollGrabber.svg index 9f6e9f2e25..9f6e9f2e25 100644 --- a/editor/icons/icon_GUI_scroll_grabber.svg +++ b/editor/icons/GuiScrollGrabber.svg diff --git a/editor/icons/icon_GUI_scroll_grabber_hl.svg b/editor/icons/GuiScrollGrabberHl.svg index bf5bce6934..bf5bce6934 100644 --- a/editor/icons/icon_GUI_scroll_grabber_hl.svg +++ b/editor/icons/GuiScrollGrabberHl.svg diff --git a/editor/icons/icon_GUI_scroll_grabber_pressed.svg b/editor/icons/GuiScrollGrabberPressed.svg index da26032474..da26032474 100644 --- a/editor/icons/icon_GUI_scroll_grabber_pressed.svg +++ b/editor/icons/GuiScrollGrabberPressed.svg diff --git a/editor/icons/icon_GUI_slider_grabber.svg b/editor/icons/GuiSliderGrabber.svg index dd751ead80..dd751ead80 100644 --- a/editor/icons/icon_GUI_slider_grabber.svg +++ b/editor/icons/GuiSliderGrabber.svg diff --git a/editor/icons/icon_GUI_slider_grabber_hl.svg b/editor/icons/GuiSliderGrabberHl.svg index 90d62934ec..90d62934ec 100644 --- a/editor/icons/icon_GUI_slider_grabber_hl.svg +++ b/editor/icons/GuiSliderGrabberHl.svg diff --git a/editor/icons/icon_GUI_space.svg b/editor/icons/GuiSpace.svg index b43e97b6e1..b43e97b6e1 100644 --- a/editor/icons/icon_GUI_space.svg +++ b/editor/icons/GuiSpace.svg diff --git a/editor/icons/icon_GUI_spinbox_updown.svg b/editor/icons/GuiSpinboxUpdown.svg index a6776728e3..a6776728e3 100644 --- a/editor/icons/icon_GUI_spinbox_updown.svg +++ b/editor/icons/GuiSpinboxUpdown.svg diff --git a/editor/icons/icon_GUI_tab.svg b/editor/icons/GuiTab.svg index 8451ebe5c0..8451ebe5c0 100644 --- a/editor/icons/icon_GUI_tab.svg +++ b/editor/icons/GuiTab.svg diff --git a/editor/icons/icon_GUI_tab_menu.svg b/editor/icons/GuiTabMenu.svg index 8bf5ef2f7d..8bf5ef2f7d 100644 --- a/editor/icons/icon_GUI_tab_menu.svg +++ b/editor/icons/GuiTabMenu.svg diff --git a/editor/icons/icon_GUI_tab_menu_hl.svg b/editor/icons/GuiTabMenuHl.svg index 42d58a5abf..42d58a5abf 100644 --- a/editor/icons/icon_GUI_tab_menu_hl.svg +++ b/editor/icons/GuiTabMenuHl.svg diff --git a/editor/icons/icon_GUI_toggle_off.svg b/editor/icons/GuiToggleOff.svg index 46f13d198d..46f13d198d 100644 --- a/editor/icons/icon_GUI_toggle_off.svg +++ b/editor/icons/GuiToggleOff.svg diff --git a/editor/icons/icon_GUI_toggle_on.svg b/editor/icons/GuiToggleOn.svg index 0316680daa..0316680daa 100644 --- a/editor/icons/icon_GUI_toggle_on.svg +++ b/editor/icons/GuiToggleOn.svg diff --git a/editor/icons/icon_GUI_tree_arrow_down.svg b/editor/icons/GuiTreeArrowDown.svg index fd2d900711..fd2d900711 100644 --- a/editor/icons/icon_GUI_tree_arrow_down.svg +++ b/editor/icons/GuiTreeArrowDown.svg diff --git a/editor/icons/icon_GUI_tree_arrow_right.svg b/editor/icons/GuiTreeArrowRight.svg index e20c92e2e7..e20c92e2e7 100644 --- a/editor/icons/icon_GUI_tree_arrow_right.svg +++ b/editor/icons/GuiTreeArrowRight.svg diff --git a/editor/icons/icon_GUI_tree_arrow_up.svg b/editor/icons/GuiTreeArrowUp.svg index 464363a8b1..464363a8b1 100644 --- a/editor/icons/icon_GUI_tree_arrow_up.svg +++ b/editor/icons/GuiTreeArrowUp.svg diff --git a/editor/icons/icon_GUI_tree_updown.svg b/editor/icons/GuiTreeUpdown.svg index 66716845df..66716845df 100644 --- a/editor/icons/icon_GUI_tree_updown.svg +++ b/editor/icons/GuiTreeUpdown.svg diff --git a/editor/icons/icon_GUI_unchecked.svg b/editor/icons/GuiUnchecked.svg index 9575422df3..9575422df3 100644 --- a/editor/icons/icon_GUI_unchecked.svg +++ b/editor/icons/GuiUnchecked.svg diff --git a/editor/icons/icon_GUI_v_tick.svg b/editor/icons/GuiVTick.svg index 4205237952..4205237952 100644 --- a/editor/icons/icon_GUI_v_tick.svg +++ b/editor/icons/GuiVTick.svg diff --git a/editor/icons/icon_GUI_viewport_hdiagsplitter.svg b/editor/icons/GuiViewportHdiagsplitter.svg index b1705582dc..b1705582dc 100644 --- a/editor/icons/icon_GUI_viewport_hdiagsplitter.svg +++ b/editor/icons/GuiViewportHdiagsplitter.svg diff --git a/editor/icons/icon_GUI_viewport_vdiagsplitter.svg b/editor/icons/GuiViewportVdiagsplitter.svg index 0817529ff1..0817529ff1 100644 --- a/editor/icons/icon_GUI_viewport_vdiagsplitter.svg +++ b/editor/icons/GuiViewportVdiagsplitter.svg diff --git a/editor/icons/icon_GUI_viewport_vhsplitter.svg b/editor/icons/GuiViewportVhsplitter.svg index a11fbd1b4c..a11fbd1b4c 100644 --- a/editor/icons/icon_GUI_viewport_vhsplitter.svg +++ b/editor/icons/GuiViewportVhsplitter.svg diff --git a/editor/icons/icon_GUI_visibility_hidden.svg b/editor/icons/GuiVisibilityHidden.svg index 1d1e61d1bb..1d1e61d1bb 100644 --- a/editor/icons/icon_GUI_visibility_hidden.svg +++ b/editor/icons/GuiVisibilityHidden.svg diff --git a/editor/icons/icon_GUI_visibility_visible.svg b/editor/icons/GuiVisibilityVisible.svg index 2e56f57ed8..2e56f57ed8 100644 --- a/editor/icons/icon_GUI_visibility_visible.svg +++ b/editor/icons/GuiVisibilityVisible.svg diff --git a/editor/icons/icon_GUI_visibility_xray.svg b/editor/icons/GuiVisibilityXray.svg index 241ff3e7e5..241ff3e7e5 100644 --- a/editor/icons/icon_GUI_visibility_xray.svg +++ b/editor/icons/GuiVisibilityXray.svg diff --git a/editor/icons/icon_GUI_vsplit_bg.svg b/editor/icons/GuiVsplitBg.svg index fa572c797e..fa572c797e 100644 --- a/editor/icons/icon_GUI_vsplit_bg.svg +++ b/editor/icons/GuiVsplitBg.svg diff --git a/editor/icons/icon_GUI_vsplitter.svg b/editor/icons/GuiVsplitter.svg index 8629801713..8629801713 100644 --- a/editor/icons/icon_GUI_vsplitter.svg +++ b/editor/icons/GuiVsplitter.svg diff --git a/editor/icons/icon_h_box_container.svg b/editor/icons/HBoxContainer.svg index 0ddbaf5a2e..0ddbaf5a2e 100644 --- a/editor/icons/icon_h_box_container.svg +++ b/editor/icons/HBoxContainer.svg diff --git a/editor/icons/icon_h_scroll_bar.svg b/editor/icons/HScrollBar.svg index 039ebdf0c1..039ebdf0c1 100644 --- a/editor/icons/icon_h_scroll_bar.svg +++ b/editor/icons/HScrollBar.svg diff --git a/editor/icons/icon_h_separator.svg b/editor/icons/HSeparator.svg index 762992acb8..762992acb8 100644 --- a/editor/icons/icon_h_separator.svg +++ b/editor/icons/HSeparator.svg diff --git a/editor/icons/icon_h_slider.svg b/editor/icons/HSlider.svg index 20fbf0d00b..20fbf0d00b 100644 --- a/editor/icons/icon_h_slider.svg +++ b/editor/icons/HSlider.svg diff --git a/editor/icons/icon_h_split_container.svg b/editor/icons/HSplitContainer.svg index ae7c05ee61..ae7c05ee61 100644 --- a/editor/icons/icon_h_split_container.svg +++ b/editor/icons/HSplitContainer.svg diff --git a/editor/icons/icon_h_t_t_p_request.svg b/editor/icons/HTTPRequest.svg index c79af15a43..c79af15a43 100644 --- a/editor/icons/icon_h_t_t_p_request.svg +++ b/editor/icons/HTTPRequest.svg diff --git a/editor/icons/icon_headphones.svg b/editor/icons/Headphones.svg index 82ef7acb29..82ef7acb29 100644 --- a/editor/icons/icon_headphones.svg +++ b/editor/icons/Headphones.svg diff --git a/editor/icons/icon_height_map_shape.svg b/editor/icons/HeightMapShape.svg index 2e0bf53565..2e0bf53565 100644 --- a/editor/icons/icon_height_map_shape.svg +++ b/editor/icons/HeightMapShape.svg diff --git a/editor/icons/icon_help.svg b/editor/icons/Help.svg index d993c95982..d993c95982 100644 --- a/editor/icons/icon_help.svg +++ b/editor/icons/Help.svg diff --git a/editor/icons/icon_help_search.svg b/editor/icons/HelpSearch.svg index 4a82ba23c7..4a82ba23c7 100644 --- a/editor/icons/icon_help_search.svg +++ b/editor/icons/HelpSearch.svg diff --git a/editor/icons/icon_hinge_joint.svg b/editor/icons/HingeJoint.svg index 21b3e29cb5..21b3e29cb5 100644 --- a/editor/icons/icon_hinge_joint.svg +++ b/editor/icons/HingeJoint.svg diff --git a/editor/icons/icon_history.svg b/editor/icons/History.svg index 48eed7b0c8..48eed7b0c8 100644 --- a/editor/icons/icon_history.svg +++ b/editor/icons/History.svg diff --git a/editor/icons/icon_hsize.svg b/editor/icons/Hsize.svg index 075bab1050..075bab1050 100644 --- a/editor/icons/icon_hsize.svg +++ b/editor/icons/Hsize.svg diff --git a/editor/icons/icon_image.svg b/editor/icons/Image.svg index f3beda898e..f3beda898e 100644 --- a/editor/icons/icon_image.svg +++ b/editor/icons/Image.svg diff --git a/editor/icons/icon_image_texture.svg b/editor/icons/ImageTexture.svg index 6e9905881b..6e9905881b 100644 --- a/editor/icons/icon_image_texture.svg +++ b/editor/icons/ImageTexture.svg diff --git a/editor/icons/icon_immediate_geometry.svg b/editor/icons/ImmediateGeometry.svg index 5679d5906f..5679d5906f 100644 --- a/editor/icons/icon_immediate_geometry.svg +++ b/editor/icons/ImmediateGeometry.svg diff --git a/editor/icons/icon_import_check.svg b/editor/icons/ImportCheck.svg index b2b967f37a..b2b967f37a 100644 --- a/editor/icons/icon_import_check.svg +++ b/editor/icons/ImportCheck.svg diff --git a/editor/icons/icon_import_fail.svg b/editor/icons/ImportFail.svg index 6c81f88d9f..6c81f88d9f 100644 --- a/editor/icons/icon_import_fail.svg +++ b/editor/icons/ImportFail.svg diff --git a/editor/icons/icon_information_sign.svg b/editor/icons/InformationSign.svg index a99be1b042..a99be1b042 100644 --- a/editor/icons/icon_information_sign.svg +++ b/editor/icons/InformationSign.svg diff --git a/editor/icons/icon_insert_after.svg b/editor/icons/InsertAfter.svg index cab00048ac..cab00048ac 100644 --- a/editor/icons/icon_insert_after.svg +++ b/editor/icons/InsertAfter.svg diff --git a/editor/icons/icon_insert_before.svg b/editor/icons/InsertBefore.svg index 366be3a1e6..366be3a1e6 100644 --- a/editor/icons/icon_insert_before.svg +++ b/editor/icons/InsertBefore.svg diff --git a/editor/icons/icon_instance.svg b/editor/icons/Instance.svg index 8fc985bb51..8fc985bb51 100644 --- a/editor/icons/icon_instance.svg +++ b/editor/icons/Instance.svg diff --git a/editor/icons/icon_instance_options.svg b/editor/icons/InstanceOptions.svg index ca9a5bcc87..ca9a5bcc87 100644 --- a/editor/icons/icon_instance_options.svg +++ b/editor/icons/InstanceOptions.svg diff --git a/editor/icons/icon_interp_cubic.svg b/editor/icons/InterpCubic.svg index c2dd7db08c..c2dd7db08c 100644 --- a/editor/icons/icon_interp_cubic.svg +++ b/editor/icons/InterpCubic.svg diff --git a/editor/icons/icon_interp_linear.svg b/editor/icons/InterpLinear.svg index 368be15315..368be15315 100644 --- a/editor/icons/icon_interp_linear.svg +++ b/editor/icons/InterpLinear.svg diff --git a/editor/icons/icon_interp_raw.svg b/editor/icons/InterpRaw.svg index 1c6ae0062a..1c6ae0062a 100644 --- a/editor/icons/icon_interp_raw.svg +++ b/editor/icons/InterpRaw.svg diff --git a/editor/icons/icon_interp_wrap_clamp.svg b/editor/icons/InterpWrapClamp.svg index 9634dc8a07..9634dc8a07 100644 --- a/editor/icons/icon_interp_wrap_clamp.svg +++ b/editor/icons/InterpWrapClamp.svg diff --git a/editor/icons/icon_interp_wrap_loop.svg b/editor/icons/InterpWrapLoop.svg index 6fbb4356c8..6fbb4356c8 100644 --- a/editor/icons/icon_interp_wrap_loop.svg +++ b/editor/icons/InterpWrapLoop.svg diff --git a/editor/icons/icon_interpolated_camera.svg b/editor/icons/InterpolatedCamera.svg index 4bc4ba1ee9..4bc4ba1ee9 100644 --- a/editor/icons/icon_interpolated_camera.svg +++ b/editor/icons/InterpolatedCamera.svg diff --git a/editor/icons/icon_inverse_kinematics.svg b/editor/icons/InverseKinematics.svg index a98c989ccc..a98c989ccc 100644 --- a/editor/icons/icon_inverse_kinematics.svg +++ b/editor/icons/InverseKinematics.svg diff --git a/editor/icons/icon_issue.svg b/editor/icons/Issue.svg index ddaaf41440..ddaaf41440 100644 --- a/editor/icons/icon_issue.svg +++ b/editor/icons/Issue.svg diff --git a/editor/icons/icon_item_list.svg b/editor/icons/ItemList.svg index 311ed08a44..311ed08a44 100644 --- a/editor/icons/icon_item_list.svg +++ b/editor/icons/ItemList.svg diff --git a/editor/icons/icon_joy_axis.svg b/editor/icons/JoyAxis.svg index cb7b5cdf8f..cb7b5cdf8f 100644 --- a/editor/icons/icon_joy_axis.svg +++ b/editor/icons/JoyAxis.svg diff --git a/editor/icons/icon_joy_button.svg b/editor/icons/JoyButton.svg index 9f4fbfdf2d..9f4fbfdf2d 100644 --- a/editor/icons/icon_joy_button.svg +++ b/editor/icons/JoyButton.svg diff --git a/editor/icons/icon_joypad.svg b/editor/icons/Joypad.svg index 8cb5de0c0e..8cb5de0c0e 100644 --- a/editor/icons/icon_joypad.svg +++ b/editor/icons/Joypad.svg diff --git a/editor/icons/icon_key.svg b/editor/icons/Key.svg index d134735c53..d134735c53 100644 --- a/editor/icons/icon_key.svg +++ b/editor/icons/Key.svg diff --git a/editor/icons/icon_key_animation.svg b/editor/icons/KeyAnimation.svg index 6db513ca26..6db513ca26 100644 --- a/editor/icons/icon_key_animation.svg +++ b/editor/icons/KeyAnimation.svg diff --git a/editor/icons/icon_key_audio.svg b/editor/icons/KeyAudio.svg index 75576885ec..75576885ec 100644 --- a/editor/icons/icon_key_audio.svg +++ b/editor/icons/KeyAudio.svg diff --git a/editor/icons/icon_key_bezier.svg b/editor/icons/KeyBezier.svg index dc5800fd5a..dc5800fd5a 100644 --- a/editor/icons/icon_key_bezier.svg +++ b/editor/icons/KeyBezier.svg diff --git a/editor/icons/icon_key_bezier_handle.svg b/editor/icons/KeyBezierHandle.svg index 9f00f61304..9f00f61304 100644 --- a/editor/icons/icon_key_bezier_handle.svg +++ b/editor/icons/KeyBezierHandle.svg diff --git a/editor/icons/icon_key_bezier_point.svg b/editor/icons/KeyBezierPoint.svg index 0edb55cda1..0edb55cda1 100644 --- a/editor/icons/icon_key_bezier_point.svg +++ b/editor/icons/KeyBezierPoint.svg diff --git a/editor/icons/icon_key_bezier_selected.svg b/editor/icons/KeyBezierSelected.svg index 9e50e2bdf1..9e50e2bdf1 100644 --- a/editor/icons/icon_key_bezier_selected.svg +++ b/editor/icons/KeyBezierSelected.svg diff --git a/editor/icons/icon_key_call.svg b/editor/icons/KeyCall.svg index 6cc442c391..6cc442c391 100644 --- a/editor/icons/icon_key_call.svg +++ b/editor/icons/KeyCall.svg diff --git a/editor/icons/icon_key_hover.svg b/editor/icons/KeyHover.svg index 417621716b..417621716b 100644 --- a/editor/icons/icon_key_hover.svg +++ b/editor/icons/KeyHover.svg diff --git a/editor/icons/icon_key_invalid.svg b/editor/icons/KeyInvalid.svg index 8ac9445b31..8ac9445b31 100644 --- a/editor/icons/icon_key_invalid.svg +++ b/editor/icons/KeyInvalid.svg diff --git a/editor/icons/icon_key_next.svg b/editor/icons/KeyNext.svg index 2d064e7e86..2d064e7e86 100644 --- a/editor/icons/icon_key_next.svg +++ b/editor/icons/KeyNext.svg diff --git a/editor/icons/icon_key_position.svg b/editor/icons/KeyPosition.svg index d152b76e8d..d152b76e8d 100644 --- a/editor/icons/icon_key_position.svg +++ b/editor/icons/KeyPosition.svg diff --git a/editor/icons/icon_key_rotation.svg b/editor/icons/KeyRotation.svg index 0d3577eac4..0d3577eac4 100644 --- a/editor/icons/icon_key_rotation.svg +++ b/editor/icons/KeyRotation.svg diff --git a/editor/icons/icon_key_scale.svg b/editor/icons/KeyScale.svg index a1214db62e..a1214db62e 100644 --- a/editor/icons/icon_key_scale.svg +++ b/editor/icons/KeyScale.svg diff --git a/editor/icons/icon_key_selected.svg b/editor/icons/KeySelected.svg index 6594aec6ee..6594aec6ee 100644 --- a/editor/icons/icon_key_selected.svg +++ b/editor/icons/KeySelected.svg diff --git a/editor/icons/icon_key_value.svg b/editor/icons/KeyValue.svg index 8a4787d6ed..8a4787d6ed 100644 --- a/editor/icons/icon_key_value.svg +++ b/editor/icons/KeyValue.svg diff --git a/editor/icons/icon_key_xform.svg b/editor/icons/KeyXform.svg index 4a567075a7..4a567075a7 100644 --- a/editor/icons/icon_key_xform.svg +++ b/editor/icons/KeyXform.svg diff --git a/editor/icons/icon_keyboard.svg b/editor/icons/Keyboard.svg index bd8736278d..bd8736278d 100644 --- a/editor/icons/icon_keyboard.svg +++ b/editor/icons/Keyboard.svg diff --git a/editor/icons/icon_kinematic_body.svg b/editor/icons/KinematicBody.svg index 16078fbdec..16078fbdec 100644 --- a/editor/icons/icon_kinematic_body.svg +++ b/editor/icons/KinematicBody.svg diff --git a/editor/icons/icon_kinematic_body_2d.svg b/editor/icons/KinematicBody2D.svg index be9dfa2d27..be9dfa2d27 100644 --- a/editor/icons/icon_kinematic_body_2d.svg +++ b/editor/icons/KinematicBody2D.svg diff --git a/editor/icons/icon_label.svg b/editor/icons/Label.svg index 24de398501..24de398501 100644 --- a/editor/icons/icon_label.svg +++ b/editor/icons/Label.svg diff --git a/editor/icons/icon_large_texture.svg b/editor/icons/LargeTexture.svg index 15920bf3d3..15920bf3d3 100644 --- a/editor/icons/icon_large_texture.svg +++ b/editor/icons/LargeTexture.svg diff --git a/editor/icons/icon_light_2d.svg b/editor/icons/Light2D.svg index 87cfb29149..87cfb29149 100644 --- a/editor/icons/icon_light_2d.svg +++ b/editor/icons/Light2D.svg diff --git a/editor/icons/icon_light_occluder_2d.svg b/editor/icons/LightOccluder2D.svg index 2905f9badd..2905f9badd 100644 --- a/editor/icons/icon_light_occluder_2d.svg +++ b/editor/icons/LightOccluder2D.svg diff --git a/editor/icons/icon_line_2d.svg b/editor/icons/Line2D.svg index 9728262e50..9728262e50 100644 --- a/editor/icons/icon_line_2d.svg +++ b/editor/icons/Line2D.svg diff --git a/editor/icons/icon_line_edit.svg b/editor/icons/LineEdit.svg index 4df7a3b248..4df7a3b248 100644 --- a/editor/icons/icon_line_edit.svg +++ b/editor/icons/LineEdit.svg diff --git a/editor/icons/icon_line_shape_2d.svg b/editor/icons/LineShape2D.svg index 758c0fbef2..758c0fbef2 100644 --- a/editor/icons/icon_line_shape_2d.svg +++ b/editor/icons/LineShape2D.svg diff --git a/editor/icons/icon_link_button.svg b/editor/icons/LinkButton.svg index bf7f7657eb..bf7f7657eb 100644 --- a/editor/icons/icon_link_button.svg +++ b/editor/icons/LinkButton.svg diff --git a/editor/icons/icon_list_select.svg b/editor/icons/ListSelect.svg index 42feb1922b..42feb1922b 100644 --- a/editor/icons/icon_list_select.svg +++ b/editor/icons/ListSelect.svg diff --git a/editor/icons/icon_listener.svg b/editor/icons/Listener.svg index 96eaeaffa9..96eaeaffa9 100644 --- a/editor/icons/icon_listener.svg +++ b/editor/icons/Listener.svg diff --git a/editor/icons/icon_load.svg b/editor/icons/Load.svg index 7ee6ae2a2d..7ee6ae2a2d 100644 --- a/editor/icons/icon_load.svg +++ b/editor/icons/Load.svg diff --git a/editor/icons/icon_lock.svg b/editor/icons/Lock.svg index 4136dad557..4136dad557 100644 --- a/editor/icons/icon_lock.svg +++ b/editor/icons/Lock.svg diff --git a/editor/icons/icon_lock_viewport.svg b/editor/icons/LockViewport.svg index 99c066055d..99c066055d 100644 --- a/editor/icons/icon_lock_viewport.svg +++ b/editor/icons/LockViewport.svg diff --git a/editor/icons/icon_logo.svg b/editor/icons/Logo.svg index f5379c48d4..f5379c48d4 100644 --- a/editor/icons/icon_logo.svg +++ b/editor/icons/Logo.svg diff --git a/editor/icons/icon_loop.svg b/editor/icons/Loop.svg index bbb8dadc06..bbb8dadc06 100644 --- a/editor/icons/icon_loop.svg +++ b/editor/icons/Loop.svg diff --git a/editor/icons/icon_loop_interpolation.svg b/editor/icons/LoopInterpolation.svg index 052a34ab36..052a34ab36 100644 --- a/editor/icons/icon_loop_interpolation.svg +++ b/editor/icons/LoopInterpolation.svg diff --git a/editor/icons/icon_main_play.svg b/editor/icons/MainPlay.svg index 5fd62b9453..5fd62b9453 100644 --- a/editor/icons/icon_main_play.svg +++ b/editor/icons/MainPlay.svg diff --git a/editor/icons/icon_margin_container.svg b/editor/icons/MarginContainer.svg index f11b415c06..f11b415c06 100644 --- a/editor/icons/icon_margin_container.svg +++ b/editor/icons/MarginContainer.svg diff --git a/editor/icons/icon_match_case.svg b/editor/icons/MatchCase.svg index 1b348f3d46..1b348f3d46 100644 --- a/editor/icons/icon_match_case.svg +++ b/editor/icons/MatchCase.svg diff --git a/editor/icons/icon_material_preview_cube.svg b/editor/icons/MaterialPreviewCube.svg index 7992ce05c1..7992ce05c1 100644 --- a/editor/icons/icon_material_preview_cube.svg +++ b/editor/icons/MaterialPreviewCube.svg diff --git a/editor/icons/icon_material_preview_cube_off.svg b/editor/icons/MaterialPreviewCubeOff.svg index 6dfe169eae..6dfe169eae 100644 --- a/editor/icons/icon_material_preview_cube_off.svg +++ b/editor/icons/MaterialPreviewCubeOff.svg diff --git a/editor/icons/icon_material_preview_light_1.svg b/editor/icons/MaterialPreviewLight1.svg index 3003793013..3003793013 100644 --- a/editor/icons/icon_material_preview_light_1.svg +++ b/editor/icons/MaterialPreviewLight1.svg diff --git a/editor/icons/icon_material_preview_light_1_off.svg b/editor/icons/MaterialPreviewLight1Off.svg index 6948e3d77e..6948e3d77e 100644 --- a/editor/icons/icon_material_preview_light_1_off.svg +++ b/editor/icons/MaterialPreviewLight1Off.svg diff --git a/editor/icons/icon_material_preview_light_2.svg b/editor/icons/MaterialPreviewLight2.svg index 08c05379e4..08c05379e4 100644 --- a/editor/icons/icon_material_preview_light_2.svg +++ b/editor/icons/MaterialPreviewLight2.svg diff --git a/editor/icons/icon_material_preview_light_2_off.svg b/editor/icons/MaterialPreviewLight2Off.svg index cc48927ece..cc48927ece 100644 --- a/editor/icons/icon_material_preview_light_2_off.svg +++ b/editor/icons/MaterialPreviewLight2Off.svg diff --git a/editor/icons/icon_material_preview_sphere.svg b/editor/icons/MaterialPreviewSphere.svg index 4f4ef67e20..4f4ef67e20 100644 --- a/editor/icons/icon_material_preview_sphere.svg +++ b/editor/icons/MaterialPreviewSphere.svg diff --git a/editor/icons/icon_material_preview_sphere_off.svg b/editor/icons/MaterialPreviewSphereOff.svg index f702b4fd27..f702b4fd27 100644 --- a/editor/icons/icon_material_preview_sphere_off.svg +++ b/editor/icons/MaterialPreviewSphereOff.svg diff --git a/editor/icons/icon_member_constant.svg b/editor/icons/MemberConstant.svg index ec82749cf4..ec82749cf4 100644 --- a/editor/icons/icon_member_constant.svg +++ b/editor/icons/MemberConstant.svg diff --git a/editor/icons/icon_member_method.svg b/editor/icons/MemberMethod.svg index ea5c64482c..ea5c64482c 100644 --- a/editor/icons/icon_member_method.svg +++ b/editor/icons/MemberMethod.svg diff --git a/editor/icons/icon_member_property.svg b/editor/icons/MemberProperty.svg index 4b6b7ab5df..4b6b7ab5df 100644 --- a/editor/icons/icon_member_property.svg +++ b/editor/icons/MemberProperty.svg diff --git a/editor/icons/icon_member_signal.svg b/editor/icons/MemberSignal.svg index 5159e4acd7..5159e4acd7 100644 --- a/editor/icons/icon_member_signal.svg +++ b/editor/icons/MemberSignal.svg diff --git a/editor/icons/icon_member_theme.svg b/editor/icons/MemberTheme.svg index 7aaaf2b808..7aaaf2b808 100644 --- a/editor/icons/icon_member_theme.svg +++ b/editor/icons/MemberTheme.svg diff --git a/editor/icons/icon_menu_button.svg b/editor/icons/MenuButton.svg index 8c23927783..8c23927783 100644 --- a/editor/icons/icon_menu_button.svg +++ b/editor/icons/MenuButton.svg diff --git a/editor/icons/icon_mesh.svg b/editor/icons/Mesh.svg index 0fb9e74584..0fb9e74584 100644 --- a/editor/icons/icon_mesh.svg +++ b/editor/icons/Mesh.svg diff --git a/editor/icons/icon_mesh_instance.svg b/editor/icons/MeshInstance.svg index 68344b7dbd..68344b7dbd 100644 --- a/editor/icons/icon_mesh_instance.svg +++ b/editor/icons/MeshInstance.svg diff --git a/editor/icons/icon_mesh_instance_2d.svg b/editor/icons/MeshInstance2D.svg index a173d02771..a173d02771 100644 --- a/editor/icons/icon_mesh_instance_2d.svg +++ b/editor/icons/MeshInstance2D.svg diff --git a/editor/icons/icon_mesh_library.svg b/editor/icons/MeshLibrary.svg index 13ae8fece7..13ae8fece7 100644 --- a/editor/icons/icon_mesh_library.svg +++ b/editor/icons/MeshLibrary.svg diff --git a/editor/icons/icon_mesh_texture.svg b/editor/icons/MeshTexture.svg index b3beff05c0..b3beff05c0 100644 --- a/editor/icons/icon_mesh_texture.svg +++ b/editor/icons/MeshTexture.svg diff --git a/editor/icons/icon_mini_object.svg b/editor/icons/MiniObject.svg index 0b34a9fdbb..0b34a9fdbb 100644 --- a/editor/icons/icon_mini_object.svg +++ b/editor/icons/MiniObject.svg diff --git a/editor/icons/icon_mirror_x.svg b/editor/icons/MirrorX.svg index 445a4e058d..445a4e058d 100644 --- a/editor/icons/icon_mirror_x.svg +++ b/editor/icons/MirrorX.svg diff --git a/editor/icons/icon_mirror_y.svg b/editor/icons/MirrorY.svg index ebfcf8cabd..ebfcf8cabd 100644 --- a/editor/icons/icon_mirror_y.svg +++ b/editor/icons/MirrorY.svg diff --git a/editor/icons/icon_mouse.svg b/editor/icons/Mouse.svg index 571288675a..571288675a 100644 --- a/editor/icons/icon_mouse.svg +++ b/editor/icons/Mouse.svg diff --git a/editor/icons/icon_move_down.svg b/editor/icons/MoveDown.svg index ba0c5d80ba..ba0c5d80ba 100644 --- a/editor/icons/icon_move_down.svg +++ b/editor/icons/MoveDown.svg diff --git a/editor/icons/icon_move_left.svg b/editor/icons/MoveLeft.svg index f4ad280ae1..f4ad280ae1 100644 --- a/editor/icons/icon_move_left.svg +++ b/editor/icons/MoveLeft.svg diff --git a/editor/icons/icon_move_point.svg b/editor/icons/MovePoint.svg index a8c11e7cb3..a8c11e7cb3 100644 --- a/editor/icons/icon_move_point.svg +++ b/editor/icons/MovePoint.svg diff --git a/editor/icons/icon_move_right.svg b/editor/icons/MoveRight.svg index 4d1c3b1145..4d1c3b1145 100644 --- a/editor/icons/icon_move_right.svg +++ b/editor/icons/MoveRight.svg diff --git a/editor/icons/icon_move_up.svg b/editor/icons/MoveUp.svg index 87c7834597..87c7834597 100644 --- a/editor/icons/icon_move_up.svg +++ b/editor/icons/MoveUp.svg diff --git a/editor/icons/icon_multi_edit.svg b/editor/icons/MultiEdit.svg index 9a5b3237b2..9a5b3237b2 100644 --- a/editor/icons/icon_multi_edit.svg +++ b/editor/icons/MultiEdit.svg diff --git a/editor/icons/icon_multi_line.svg b/editor/icons/MultiLine.svg index dd79bb50d8..dd79bb50d8 100644 --- a/editor/icons/icon_multi_line.svg +++ b/editor/icons/MultiLine.svg diff --git a/editor/icons/icon_multi_mesh.svg b/editor/icons/MultiMesh.svg index d317129ef4..d317129ef4 100644 --- a/editor/icons/icon_multi_mesh.svg +++ b/editor/icons/MultiMesh.svg diff --git a/editor/icons/icon_multi_mesh_instance.svg b/editor/icons/MultiMeshInstance.svg index c114a725db..c114a725db 100644 --- a/editor/icons/icon_multi_mesh_instance.svg +++ b/editor/icons/MultiMeshInstance.svg diff --git a/editor/icons/icon_multi_mesh_instance_2d.svg b/editor/icons/MultiMeshInstance2D.svg index 6c54a63ae2..6c54a63ae2 100644 --- a/editor/icons/icon_multi_mesh_instance_2d.svg +++ b/editor/icons/MultiMeshInstance2D.svg diff --git a/editor/icons/icon_navigation.svg b/editor/icons/Navigation.svg index d5a8f8618b..d5a8f8618b 100644 --- a/editor/icons/icon_navigation.svg +++ b/editor/icons/Navigation.svg diff --git a/editor/icons/icon_navigation_2d.svg b/editor/icons/Navigation2D.svg index 79dc532aee..79dc532aee 100644 --- a/editor/icons/icon_navigation_2d.svg +++ b/editor/icons/Navigation2D.svg diff --git a/editor/icons/icon_navigation_mesh.svg b/editor/icons/NavigationMesh.svg index 9bc4a00d53..9bc4a00d53 100644 --- a/editor/icons/icon_navigation_mesh.svg +++ b/editor/icons/NavigationMesh.svg diff --git a/editor/icons/icon_navigation_mesh_instance.svg b/editor/icons/NavigationMeshInstance.svg index 737d9c319d..737d9c319d 100644 --- a/editor/icons/icon_navigation_mesh_instance.svg +++ b/editor/icons/NavigationMeshInstance.svg diff --git a/editor/icons/icon_navigation_polygon.svg b/editor/icons/NavigationPolygon.svg index df2ddb07f6..df2ddb07f6 100644 --- a/editor/icons/icon_navigation_polygon.svg +++ b/editor/icons/NavigationPolygon.svg diff --git a/editor/icons/icon_navigation_polygon_instance.svg b/editor/icons/NavigationPolygonInstance.svg index e16d10614e..e16d10614e 100644 --- a/editor/icons/icon_navigation_polygon_instance.svg +++ b/editor/icons/NavigationPolygonInstance.svg diff --git a/editor/icons/icon_new.svg b/editor/icons/New.svg index a3199e3fba..a3199e3fba 100644 --- a/editor/icons/icon_new.svg +++ b/editor/icons/New.svg diff --git a/editor/icons/icon_new_root.svg b/editor/icons/NewRoot.svg index d32777d507..d32777d507 100644 --- a/editor/icons/icon_new_root.svg +++ b/editor/icons/NewRoot.svg diff --git a/editor/icons/icon_nil.svg b/editor/icons/Nil.svg index 04a29abaaa..04a29abaaa 100644 --- a/editor/icons/icon_nil.svg +++ b/editor/icons/Nil.svg diff --git a/editor/icons/icon_nine_patch_rect.svg b/editor/icons/NinePatchRect.svg index c5b04ec049..c5b04ec049 100644 --- a/editor/icons/icon_nine_patch_rect.svg +++ b/editor/icons/NinePatchRect.svg diff --git a/editor/icons/icon_node.svg b/editor/icons/Node.svg index 93f0ce80b1..93f0ce80b1 100644 --- a/editor/icons/icon_node.svg +++ b/editor/icons/Node.svg diff --git a/editor/icons/icon_node_2d.svg b/editor/icons/Node2D.svg index 5ca5754daa..5ca5754daa 100644 --- a/editor/icons/icon_node_2d.svg +++ b/editor/icons/Node2D.svg diff --git a/editor/icons/icon_node_path.svg b/editor/icons/NodePath.svg index 580283b75a..580283b75a 100644 --- a/editor/icons/icon_node_path.svg +++ b/editor/icons/NodePath.svg diff --git a/editor/icons/icon_node_warning.svg b/editor/icons/NodeWarning.svg index 587a49412e..587a49412e 100644 --- a/editor/icons/icon_node_warning.svg +++ b/editor/icons/NodeWarning.svg diff --git a/editor/icons/icon_non_favorite.svg b/editor/icons/NonFavorite.svg index eb0ebf052c..eb0ebf052c 100644 --- a/editor/icons/icon_non_favorite.svg +++ b/editor/icons/NonFavorite.svg diff --git a/editor/icons/icon_o_r_m_material_3d.svg b/editor/icons/ORMMaterial3D.svg index 3dd6013436..3dd6013436 100644 --- a/editor/icons/icon_o_r_m_material_3d.svg +++ b/editor/icons/ORMMaterial3D.svg diff --git a/editor/icons/icon_object.svg b/editor/icons/Object.svg index c3d1b47538..c3d1b47538 100644 --- a/editor/icons/icon_object.svg +++ b/editor/icons/Object.svg diff --git a/editor/icons/icon_occluder_polygon_2d.svg b/editor/icons/OccluderPolygon2D.svg index 19244f35ca..19244f35ca 100644 --- a/editor/icons/icon_occluder_polygon_2d.svg +++ b/editor/icons/OccluderPolygon2D.svg diff --git a/editor/icons/icon_omni_light.svg b/editor/icons/OmniLight.svg index 6fa0454e8c..6fa0454e8c 100644 --- a/editor/icons/icon_omni_light.svg +++ b/editor/icons/OmniLight.svg diff --git a/editor/icons/icon_onion.svg b/editor/icons/Onion.svg index ff1376c316..ff1376c316 100644 --- a/editor/icons/icon_onion.svg +++ b/editor/icons/Onion.svg diff --git a/editor/icons/icon_option_button.svg b/editor/icons/OptionButton.svg index 6b4402481d..6b4402481d 100644 --- a/editor/icons/icon_option_button.svg +++ b/editor/icons/OptionButton.svg diff --git a/editor/icons/icon_overbright_indicator.svg b/editor/icons/OverbrightIndicator.svg index 9e6f53b727..9e6f53b727 100644 --- a/editor/icons/icon_overbright_indicator.svg +++ b/editor/icons/OverbrightIndicator.svg diff --git a/editor/icons/icon_override.svg b/editor/icons/Override.svg index 2d8a1fb309..2d8a1fb309 100644 --- a/editor/icons/icon_override.svg +++ b/editor/icons/Override.svg diff --git a/editor/icons/icon_pool_byte_array.svg b/editor/icons/PackedByteArray.svg index 5409a47bc4..5409a47bc4 100644 --- a/editor/icons/icon_pool_byte_array.svg +++ b/editor/icons/PackedByteArray.svg diff --git a/editor/icons/icon_pool_color_array.svg b/editor/icons/PackedColorArray.svg index 7a312d0e91..7a312d0e91 100644 --- a/editor/icons/icon_pool_color_array.svg +++ b/editor/icons/PackedColorArray.svg diff --git a/editor/icons/icon_packed_data_container.svg b/editor/icons/PackedDataContainer.svg index 18bad53f66..18bad53f66 100644 --- a/editor/icons/icon_packed_data_container.svg +++ b/editor/icons/PackedDataContainer.svg diff --git a/editor/icons/icon_pool_real_array.svg b/editor/icons/PackedFloat32Array.svg index 734f40cd05..734f40cd05 100644 --- a/editor/icons/icon_pool_real_array.svg +++ b/editor/icons/PackedFloat32Array.svg diff --git a/editor/icons/PackedFloat64Array.svg b/editor/icons/PackedFloat64Array.svg new file mode 100644 index 0000000000..734f40cd05 --- /dev/null +++ b/editor/icons/PackedFloat64Array.svg @@ -0,0 +1 @@ +<svg height="12" viewBox="0 0 16 12" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m0 0v12h4v-2h-2v-8h2v-2zm12 0v2h2v8h-2v2h4v-12z" fill="#e0e0e0"/><path d="m6 2a3 3 0 0 0 -3 3v5h2v-2h1v-2h-1v-1a1 1 0 0 1 1-1zm1 0v5a3 3 0 0 0 3 3v-2a1 1 0 0 1 -1-1v-5zm3 0v5a3 3 0 0 0 3 3v-2a1 1 0 0 1 -1-1v-1h1v-2h-1v-2z" fill="#61daf4"/><path d="m7 2v5a3 3 0 0 0 3 3v-2a1 1 0 0 1 -1-1v-5z" fill="#fff" fill-opacity=".39216"/></svg>
\ No newline at end of file diff --git a/editor/icons/icon_pool_int_array.svg b/editor/icons/PackedInt32Array.svg index a664b2d5fd..a664b2d5fd 100644 --- a/editor/icons/icon_pool_int_array.svg +++ b/editor/icons/PackedInt32Array.svg diff --git a/editor/icons/PackedInt64Array.svg b/editor/icons/PackedInt64Array.svg new file mode 100644 index 0000000000..a664b2d5fd --- /dev/null +++ b/editor/icons/PackedInt64Array.svg @@ -0,0 +1 @@ +<svg height="12" viewBox="0 0 16 12" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m0 0v12h4v-2h-2v-8h2v-2zm12 0v2h2v8h-2v2h4v-12z" fill="#e0e0e0"/><path d="m3 2v2h2v-2zm2 2v2h-2v4h4v-4a1 1 0 0 1 1 1v3h2v-3a3 3 0 0 0 -3-3zm5 3a3 3 0 0 0 3 3v-2a1 1 0 0 1 -1-1v-1h1v-2h-1v-2h-2z" fill="#7dc6ef"/><path d="m5 4v6h2v-4a1 1 0 0 1 1 1v3h2v-3a3 3 0 0 0 -3-3z" fill="#fff" fill-opacity=".39216"/></svg>
\ No newline at end of file diff --git a/editor/icons/icon_packed_scene.svg b/editor/icons/PackedScene.svg index 9c1d88db1c..9c1d88db1c 100644 --- a/editor/icons/icon_packed_scene.svg +++ b/editor/icons/PackedScene.svg diff --git a/editor/icons/icon_pool_string_array.svg b/editor/icons/PackedStringArray.svg index 7e66f5f5e5..7e66f5f5e5 100644 --- a/editor/icons/icon_pool_string_array.svg +++ b/editor/icons/PackedStringArray.svg diff --git a/editor/icons/icon_pool_vector2_array.svg b/editor/icons/PackedVector2Array.svg index 170512eb39..170512eb39 100644 --- a/editor/icons/icon_pool_vector2_array.svg +++ b/editor/icons/PackedVector2Array.svg diff --git a/editor/icons/icon_pool_vector3_array.svg b/editor/icons/PackedVector3Array.svg index cd3578182f..cd3578182f 100644 --- a/editor/icons/icon_pool_vector3_array.svg +++ b/editor/icons/PackedVector3Array.svg diff --git a/editor/icons/icon_paint_vertex.svg b/editor/icons/PaintVertex.svg index cab3716bf5..cab3716bf5 100644 --- a/editor/icons/icon_paint_vertex.svg +++ b/editor/icons/PaintVertex.svg diff --git a/editor/icons/icon_panel.svg b/editor/icons/Panel.svg index 10a67bae7e..10a67bae7e 100644 --- a/editor/icons/icon_panel.svg +++ b/editor/icons/Panel.svg diff --git a/editor/icons/icon_panel_container.svg b/editor/icons/PanelContainer.svg index 08c5492f7e..08c5492f7e 100644 --- a/editor/icons/icon_panel_container.svg +++ b/editor/icons/PanelContainer.svg diff --git a/editor/icons/icon_panels_1.svg b/editor/icons/Panels1.svg index 850aad2cff..850aad2cff 100644 --- a/editor/icons/icon_panels_1.svg +++ b/editor/icons/Panels1.svg diff --git a/editor/icons/icon_panels_2.svg b/editor/icons/Panels2.svg index 5f3fc6cf48..5f3fc6cf48 100644 --- a/editor/icons/icon_panels_2.svg +++ b/editor/icons/Panels2.svg diff --git a/editor/icons/icon_panels_2_alt.svg b/editor/icons/Panels2Alt.svg index edee3a660f..edee3a660f 100644 --- a/editor/icons/icon_panels_2_alt.svg +++ b/editor/icons/Panels2Alt.svg diff --git a/editor/icons/icon_panels_3.svg b/editor/icons/Panels3.svg index 3ddcb5e2ef..3ddcb5e2ef 100644 --- a/editor/icons/icon_panels_3.svg +++ b/editor/icons/Panels3.svg diff --git a/editor/icons/icon_panels_3_alt.svg b/editor/icons/Panels3Alt.svg index 0f36a24da8..0f36a24da8 100644 --- a/editor/icons/icon_panels_3_alt.svg +++ b/editor/icons/Panels3Alt.svg diff --git a/editor/icons/icon_panels_4.svg b/editor/icons/Panels4.svg index 7b2189087f..7b2189087f 100644 --- a/editor/icons/icon_panels_4.svg +++ b/editor/icons/Panels4.svg diff --git a/editor/icons/icon_panorama_sky.svg b/editor/icons/PanoramaSky.svg index bfff6840bd..bfff6840bd 100644 --- a/editor/icons/icon_panorama_sky.svg +++ b/editor/icons/PanoramaSky.svg diff --git a/editor/icons/icon_parallax_background.svg b/editor/icons/ParallaxBackground.svg index 09e6a7d19d..09e6a7d19d 100644 --- a/editor/icons/icon_parallax_background.svg +++ b/editor/icons/ParallaxBackground.svg diff --git a/editor/icons/icon_parallax_layer.svg b/editor/icons/ParallaxLayer.svg index d8a5ef5e1f..d8a5ef5e1f 100644 --- a/editor/icons/icon_parallax_layer.svg +++ b/editor/icons/ParallaxLayer.svg diff --git a/editor/icons/icon_particles.svg b/editor/icons/Particles.svg index f1378e3f8c..f1378e3f8c 100644 --- a/editor/icons/icon_particles.svg +++ b/editor/icons/Particles.svg diff --git a/editor/icons/icon_particles_2d.svg b/editor/icons/Particles2D.svg index 7151194e36..7151194e36 100644 --- a/editor/icons/icon_particles_2d.svg +++ b/editor/icons/Particles2D.svg diff --git a/editor/icons/icon_particles_material.svg b/editor/icons/ParticlesMaterial.svg index af45f9888a..af45f9888a 100644 --- a/editor/icons/icon_particles_material.svg +++ b/editor/icons/ParticlesMaterial.svg diff --git a/editor/icons/icon_path.svg b/editor/icons/Path.svg index cde9a06903..cde9a06903 100644 --- a/editor/icons/icon_path.svg +++ b/editor/icons/Path.svg diff --git a/editor/icons/icon_path_2d.svg b/editor/icons/Path2D.svg index 8aa0453b88..8aa0453b88 100644 --- a/editor/icons/icon_path_2d.svg +++ b/editor/icons/Path2D.svg diff --git a/editor/icons/icon_path_follow.svg b/editor/icons/PathFollow.svg index 8e904ab5a5..8e904ab5a5 100644 --- a/editor/icons/icon_path_follow.svg +++ b/editor/icons/PathFollow.svg diff --git a/editor/icons/icon_path_follow_2d.svg b/editor/icons/PathFollow2D.svg index 20a32f2d83..20a32f2d83 100644 --- a/editor/icons/icon_path_follow_2d.svg +++ b/editor/icons/PathFollow2D.svg diff --git a/editor/icons/icon_pause.svg b/editor/icons/Pause.svg index 14c9971383..14c9971383 100644 --- a/editor/icons/icon_pause.svg +++ b/editor/icons/Pause.svg diff --git a/editor/icons/icon_physical_bone.svg b/editor/icons/PhysicalBone.svg index 0a34eb6e48..0a34eb6e48 100644 --- a/editor/icons/icon_physical_bone.svg +++ b/editor/icons/PhysicalBone.svg diff --git a/editor/icons/icon_pin.svg b/editor/icons/Pin.svg index 85cd815b64..85cd815b64 100644 --- a/editor/icons/icon_pin.svg +++ b/editor/icons/Pin.svg diff --git a/editor/icons/icon_pin_joint.svg b/editor/icons/PinJoint.svg index 147553d316..147553d316 100644 --- a/editor/icons/icon_pin_joint.svg +++ b/editor/icons/PinJoint.svg diff --git a/editor/icons/icon_pin_joint_2d.svg b/editor/icons/PinJoint2D.svg index f1dcafb923..f1dcafb923 100644 --- a/editor/icons/icon_pin_joint_2d.svg +++ b/editor/icons/PinJoint2D.svg diff --git a/editor/icons/icon_pin_pressed.svg b/editor/icons/PinPressed.svg index 85cd815b64..85cd815b64 100644 --- a/editor/icons/icon_pin_pressed.svg +++ b/editor/icons/PinPressed.svg diff --git a/editor/icons/icon_plane.svg b/editor/icons/Plane.svg index 3a943af0b3..3a943af0b3 100644 --- a/editor/icons/icon_plane.svg +++ b/editor/icons/Plane.svg diff --git a/editor/icons/icon_plane_mesh.svg b/editor/icons/PlaneMesh.svg index ddcc623c67..ddcc623c67 100644 --- a/editor/icons/icon_plane_mesh.svg +++ b/editor/icons/PlaneMesh.svg diff --git a/editor/icons/icon_plane_shape.svg b/editor/icons/PlaneShape.svg index 2c90cf6d53..2c90cf6d53 100644 --- a/editor/icons/icon_plane_shape.svg +++ b/editor/icons/PlaneShape.svg diff --git a/editor/icons/icon_play.svg b/editor/icons/Play.svg index 4c16215a68..4c16215a68 100644 --- a/editor/icons/icon_play.svg +++ b/editor/icons/Play.svg diff --git a/editor/icons/icon_play_backwards.svg b/editor/icons/PlayBackwards.svg index c98f15ea50..c98f15ea50 100644 --- a/editor/icons/icon_play_backwards.svg +++ b/editor/icons/PlayBackwards.svg diff --git a/editor/icons/icon_play_custom.svg b/editor/icons/PlayCustom.svg index e19a8e7028..e19a8e7028 100644 --- a/editor/icons/icon_play_custom.svg +++ b/editor/icons/PlayCustom.svg diff --git a/editor/icons/icon_play_overlay.svg b/editor/icons/PlayOverlay.svg index 1fb2da6596..1fb2da6596 100644 --- a/editor/icons/icon_play_overlay.svg +++ b/editor/icons/PlayOverlay.svg diff --git a/editor/icons/icon_play_scene.svg b/editor/icons/PlayScene.svg index 5e5097fd66..5e5097fd66 100644 --- a/editor/icons/icon_play_scene.svg +++ b/editor/icons/PlayScene.svg diff --git a/editor/icons/icon_play_start.svg b/editor/icons/PlayStart.svg index 2ade7371e0..2ade7371e0 100644 --- a/editor/icons/icon_play_start.svg +++ b/editor/icons/PlayStart.svg diff --git a/editor/icons/icon_play_start_backwards.svg b/editor/icons/PlayStartBackwards.svg index 195f9a646e..195f9a646e 100644 --- a/editor/icons/icon_play_start_backwards.svg +++ b/editor/icons/PlayStartBackwards.svg diff --git a/editor/icons/icon_play_travel.svg b/editor/icons/PlayTravel.svg index d772476e15..d772476e15 100644 --- a/editor/icons/icon_play_travel.svg +++ b/editor/icons/PlayTravel.svg diff --git a/editor/icons/icon_plugin_script.svg b/editor/icons/PluginScript.svg index 0d080c132e..0d080c132e 100644 --- a/editor/icons/icon_plugin_script.svg +++ b/editor/icons/PluginScript.svg diff --git a/editor/icons/icon_point_mesh.svg b/editor/icons/PointMesh.svg index 0504b7ff01..0504b7ff01 100644 --- a/editor/icons/icon_point_mesh.svg +++ b/editor/icons/PointMesh.svg diff --git a/editor/icons/icon_polygon_2_d.svg b/editor/icons/Polygon2D.svg index 485109072e..485109072e 100644 --- a/editor/icons/icon_polygon_2_d.svg +++ b/editor/icons/Polygon2D.svg diff --git a/editor/icons/icon_polygon_path_finder.svg b/editor/icons/PolygonPathFinder.svg index b41067d08a..b41067d08a 100644 --- a/editor/icons/icon_polygon_path_finder.svg +++ b/editor/icons/PolygonPathFinder.svg diff --git a/editor/icons/icon_popup.svg b/editor/icons/Popup.svg index 93f7e5000d..93f7e5000d 100644 --- a/editor/icons/icon_popup.svg +++ b/editor/icons/Popup.svg diff --git a/editor/icons/icon_popup_dialog.svg b/editor/icons/PopupDialog.svg index d871e56a63..d871e56a63 100644 --- a/editor/icons/icon_popup_dialog.svg +++ b/editor/icons/PopupDialog.svg diff --git a/editor/icons/icon_popup_menu.svg b/editor/icons/PopupMenu.svg index dd7b2bb0fd..dd7b2bb0fd 100644 --- a/editor/icons/icon_popup_menu.svg +++ b/editor/icons/PopupMenu.svg diff --git a/editor/icons/icon_popup_panel.svg b/editor/icons/PopupPanel.svg index 47a5448f5b..47a5448f5b 100644 --- a/editor/icons/icon_popup_panel.svg +++ b/editor/icons/PopupPanel.svg diff --git a/editor/icons/icon_portal.svg b/editor/icons/Portal.svg index 99d626e2f4..99d626e2f4 100644 --- a/editor/icons/icon_portal.svg +++ b/editor/icons/Portal.svg diff --git a/editor/icons/icon_position_2d.svg b/editor/icons/Position2D.svg index 22d4ab05ca..22d4ab05ca 100644 --- a/editor/icons/icon_position_2d.svg +++ b/editor/icons/Position2D.svg diff --git a/editor/icons/icon_position_3d.svg b/editor/icons/Position3D.svg index 0401942d69..0401942d69 100644 --- a/editor/icons/icon_position_3d.svg +++ b/editor/icons/Position3D.svg diff --git a/editor/icons/icon_prism_mesh.svg b/editor/icons/PrismMesh.svg index c391652add..c391652add 100644 --- a/editor/icons/icon_prism_mesh.svg +++ b/editor/icons/PrismMesh.svg diff --git a/editor/icons/icon_procedural_sky.svg b/editor/icons/ProceduralSky.svg index 356a966fe9..356a966fe9 100644 --- a/editor/icons/icon_procedural_sky.svg +++ b/editor/icons/ProceduralSky.svg diff --git a/editor/icons/icon_progress_1.svg b/editor/icons/Progress1.svg index 01c2f8f334..01c2f8f334 100644 --- a/editor/icons/icon_progress_1.svg +++ b/editor/icons/Progress1.svg diff --git a/editor/icons/icon_progress_2.svg b/editor/icons/Progress2.svg index a18ceb0381..a18ceb0381 100644 --- a/editor/icons/icon_progress_2.svg +++ b/editor/icons/Progress2.svg diff --git a/editor/icons/icon_progress_3.svg b/editor/icons/Progress3.svg index 55b01dad83..55b01dad83 100644 --- a/editor/icons/icon_progress_3.svg +++ b/editor/icons/Progress3.svg diff --git a/editor/icons/icon_progress_4.svg b/editor/icons/Progress4.svg index a038bbec70..a038bbec70 100644 --- a/editor/icons/icon_progress_4.svg +++ b/editor/icons/Progress4.svg diff --git a/editor/icons/icon_progress_5.svg b/editor/icons/Progress5.svg index 64144978af..64144978af 100644 --- a/editor/icons/icon_progress_5.svg +++ b/editor/icons/Progress5.svg diff --git a/editor/icons/icon_progress_6.svg b/editor/icons/Progress6.svg index 83b1806263..83b1806263 100644 --- a/editor/icons/icon_progress_6.svg +++ b/editor/icons/Progress6.svg diff --git a/editor/icons/icon_progress_7.svg b/editor/icons/Progress7.svg index 77d4321a14..77d4321a14 100644 --- a/editor/icons/icon_progress_7.svg +++ b/editor/icons/Progress7.svg diff --git a/editor/icons/icon_progress_8.svg b/editor/icons/Progress8.svg index ee76ba4499..ee76ba4499 100644 --- a/editor/icons/icon_progress_8.svg +++ b/editor/icons/Progress8.svg diff --git a/editor/icons/icon_progress_bar.svg b/editor/icons/ProgressBar.svg index 70f99e3bbb..70f99e3bbb 100644 --- a/editor/icons/icon_progress_bar.svg +++ b/editor/icons/ProgressBar.svg diff --git a/editor/icons/icon_project_icon_loading.svg b/editor/icons/ProjectIconLoading.svg index 3802b67654..3802b67654 100644 --- a/editor/icons/icon_project_icon_loading.svg +++ b/editor/icons/ProjectIconLoading.svg diff --git a/editor/icons/icon_proximity_group.svg b/editor/icons/ProximityGroup.svg index 7df1cc9093..7df1cc9093 100644 --- a/editor/icons/icon_proximity_group.svg +++ b/editor/icons/ProximityGroup.svg diff --git a/editor/icons/icon_proxy_texture.svg b/editor/icons/ProxyTexture.svg index 0c19363cb4..0c19363cb4 100644 --- a/editor/icons/icon_proxy_texture.svg +++ b/editor/icons/ProxyTexture.svg diff --git a/editor/icons/icon_quad.svg b/editor/icons/Quad.svg index 4657e0b0bd..4657e0b0bd 100644 --- a/editor/icons/icon_quad.svg +++ b/editor/icons/Quad.svg diff --git a/editor/icons/icon_quad_mesh.svg b/editor/icons/QuadMesh.svg index de0bd3e127..de0bd3e127 100644 --- a/editor/icons/icon_quad_mesh.svg +++ b/editor/icons/QuadMesh.svg diff --git a/editor/icons/icon_quat.svg b/editor/icons/Quat.svg index 8702a3041a..8702a3041a 100644 --- a/editor/icons/icon_quat.svg +++ b/editor/icons/Quat.svg diff --git a/editor/icons/icon_r_i_d.svg b/editor/icons/RID.svg index a6ace54d12..a6ace54d12 100644 --- a/editor/icons/icon_r_i_d.svg +++ b/editor/icons/RID.svg diff --git a/editor/icons/icon_ray_cast.svg b/editor/icons/RayCast.svg index e782b27e9f..e782b27e9f 100644 --- a/editor/icons/icon_ray_cast.svg +++ b/editor/icons/RayCast.svg diff --git a/editor/icons/icon_ray_cast_2d.svg b/editor/icons/RayCast2D.svg index 02faaa51c9..02faaa51c9 100644 --- a/editor/icons/icon_ray_cast_2d.svg +++ b/editor/icons/RayCast2D.svg diff --git a/editor/icons/icon_ray_shape.svg b/editor/icons/RayShape.svg index 37c2206740..37c2206740 100644 --- a/editor/icons/icon_ray_shape.svg +++ b/editor/icons/RayShape.svg diff --git a/editor/icons/icon_ray_shape_2d.svg b/editor/icons/RayShape2D.svg index 109c254fc3..109c254fc3 100644 --- a/editor/icons/icon_ray_shape_2d.svg +++ b/editor/icons/RayShape2D.svg diff --git a/editor/icons/icon_rayito.svg b/editor/icons/Rayito.svg index 4fd6a2827b..4fd6a2827b 100644 --- a/editor/icons/icon_rayito.svg +++ b/editor/icons/Rayito.svg diff --git a/editor/icons/icon_rect2.svg b/editor/icons/Rect2.svg index 25feb52cab..25feb52cab 100644 --- a/editor/icons/icon_rect2.svg +++ b/editor/icons/Rect2.svg diff --git a/editor/icons/Rect2i.svg b/editor/icons/Rect2i.svg new file mode 100644 index 0000000000..d28c098ed6 --- /dev/null +++ b/editor/icons/Rect2i.svg @@ -0,0 +1,4 @@ +<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg"> +<path d="m9 2v2h-1c-1.7267 0-3 1.3359-3 3 0 1.6569 1.3431 3 3 3h1v-2h-1c-0.55228 0-1-0.44772-1-1s0.44772-1 1-1h1v1c0 1.6569 1.3431 3 3 3v-2c-0.55228 0-0.93526-0.45152-1-1v-1h1v-2h-1v-2zm-5 2c-1.6569 0-2.9547 1.3438-3 3v3h2v-3c0-0.55228 0.44772-1 1-1h1v-2z" fill="#f191a5"/> +<path d="m13 2v2h2v-2zm0 4v4h2v-4z" fill="#7dc6ef"/> +</svg> diff --git a/editor/icons/icon_rectangle_shape_2d.svg b/editor/icons/RectangleShape2D.svg index 437547ece3..437547ece3 100644 --- a/editor/icons/icon_rectangle_shape_2d.svg +++ b/editor/icons/RectangleShape2D.svg diff --git a/editor/icons/icon_reference_rect.svg b/editor/icons/ReferenceRect.svg index 2fd530d584..2fd530d584 100644 --- a/editor/icons/icon_reference_rect.svg +++ b/editor/icons/ReferenceRect.svg diff --git a/editor/icons/icon_reflection_probe.svg b/editor/icons/ReflectionProbe.svg index 6bf9cc9013..6bf9cc9013 100644 --- a/editor/icons/icon_reflection_probe.svg +++ b/editor/icons/ReflectionProbe.svg diff --git a/editor/icons/icon_region_edit.svg b/editor/icons/RegionEdit.svg index 8443c0e454..8443c0e454 100644 --- a/editor/icons/icon_region_edit.svg +++ b/editor/icons/RegionEdit.svg diff --git a/editor/icons/icon_reload.svg b/editor/icons/Reload.svg index 223a725332..223a725332 100644 --- a/editor/icons/icon_reload.svg +++ b/editor/icons/Reload.svg diff --git a/editor/icons/icon_reload_small.svg b/editor/icons/ReloadSmall.svg index ce707b645a..ce707b645a 100644 --- a/editor/icons/icon_reload_small.svg +++ b/editor/icons/ReloadSmall.svg diff --git a/editor/icons/icon_remote_transform.svg b/editor/icons/RemoteTransform.svg index 2bdf8cd858..2bdf8cd858 100644 --- a/editor/icons/icon_remote_transform.svg +++ b/editor/icons/RemoteTransform.svg diff --git a/editor/icons/icon_remote_transform_2d.svg b/editor/icons/RemoteTransform2D.svg index 51c9e084df..51c9e084df 100644 --- a/editor/icons/icon_remote_transform_2d.svg +++ b/editor/icons/RemoteTransform2D.svg diff --git a/editor/icons/icon_remove.svg b/editor/icons/Remove.svg index 9372eb08b5..9372eb08b5 100644 --- a/editor/icons/icon_remove.svg +++ b/editor/icons/Remove.svg diff --git a/editor/icons/icon_remove_internal.svg b/editor/icons/RemoveInternal.svg index 0a7e06e6cd..0a7e06e6cd 100644 --- a/editor/icons/icon_remove_internal.svg +++ b/editor/icons/RemoveInternal.svg diff --git a/editor/icons/icon_rename.svg b/editor/icons/Rename.svg index 01923e3a0a..01923e3a0a 100644 --- a/editor/icons/icon_rename.svg +++ b/editor/icons/Rename.svg diff --git a/editor/icons/icon_reparent.svg b/editor/icons/Reparent.svg index 39b79cd3a1..39b79cd3a1 100644 --- a/editor/icons/icon_reparent.svg +++ b/editor/icons/Reparent.svg diff --git a/editor/icons/icon_reparent_to_new_node.svg b/editor/icons/ReparentToNewNode.svg index 37fbee848c..37fbee848c 100644 --- a/editor/icons/icon_reparent_to_new_node.svg +++ b/editor/icons/ReparentToNewNode.svg diff --git a/editor/icons/icon_resource_preloader.svg b/editor/icons/ResourcePreloader.svg index 417e63b604..417e63b604 100644 --- a/editor/icons/icon_resource_preloader.svg +++ b/editor/icons/ResourcePreloader.svg diff --git a/editor/icons/icon_rich_text_effect.svg b/editor/icons/RichTextEffect.svg index afe08685bd..afe08685bd 100644 --- a/editor/icons/icon_rich_text_effect.svg +++ b/editor/icons/RichTextEffect.svg diff --git a/editor/icons/icon_rich_text_label.svg b/editor/icons/RichTextLabel.svg index 3f4b33707c..3f4b33707c 100644 --- a/editor/icons/icon_rich_text_label.svg +++ b/editor/icons/RichTextLabel.svg diff --git a/editor/icons/icon_rigid_body.svg b/editor/icons/RigidBody.svg index 5d766f7c3d..5d766f7c3d 100644 --- a/editor/icons/icon_rigid_body.svg +++ b/editor/icons/RigidBody.svg diff --git a/editor/icons/icon_rigid_body_2d.svg b/editor/icons/RigidBody2D.svg index bb97fa650b..bb97fa650b 100644 --- a/editor/icons/icon_rigid_body_2d.svg +++ b/editor/icons/RigidBody2D.svg diff --git a/editor/icons/icon_room.svg b/editor/icons/Room.svg index 799be9f99a..799be9f99a 100644 --- a/editor/icons/icon_room.svg +++ b/editor/icons/Room.svg diff --git a/editor/icons/icon_room_bounds.svg b/editor/icons/RoomBounds.svg index ad90944ac6..ad90944ac6 100644 --- a/editor/icons/icon_room_bounds.svg +++ b/editor/icons/RoomBounds.svg diff --git a/editor/icons/icon_rotate_0.svg b/editor/icons/Rotate0.svg index 96174ca93b..96174ca93b 100644 --- a/editor/icons/icon_rotate_0.svg +++ b/editor/icons/Rotate0.svg diff --git a/editor/icons/icon_rotate_180.svg b/editor/icons/Rotate180.svg index 11415e1e19..11415e1e19 100644 --- a/editor/icons/icon_rotate_180.svg +++ b/editor/icons/Rotate180.svg diff --git a/editor/icons/icon_rotate_270.svg b/editor/icons/Rotate270.svg index be26bc4337..be26bc4337 100644 --- a/editor/icons/icon_rotate_270.svg +++ b/editor/icons/Rotate270.svg diff --git a/editor/icons/icon_rotate_90.svg b/editor/icons/Rotate90.svg index d46c56a1fc..d46c56a1fc 100644 --- a/editor/icons/icon_rotate_90.svg +++ b/editor/icons/Rotate90.svg diff --git a/editor/icons/icon_rotate_left.svg b/editor/icons/RotateLeft.svg index 223a725332..223a725332 100644 --- a/editor/icons/icon_rotate_left.svg +++ b/editor/icons/RotateLeft.svg diff --git a/editor/icons/icon_rotate_right.svg b/editor/icons/RotateRight.svg index 2b66bae998..2b66bae998 100644 --- a/editor/icons/icon_rotate_right.svg +++ b/editor/icons/RotateRight.svg diff --git a/editor/icons/icon_ruler.svg b/editor/icons/Ruler.svg index dbe02102ec..dbe02102ec 100644 --- a/editor/icons/icon_ruler.svg +++ b/editor/icons/Ruler.svg diff --git a/editor/icons/icon_sample_library.svg b/editor/icons/SampleLibrary.svg index e83a1a3778..e83a1a3778 100644 --- a/editor/icons/icon_sample_library.svg +++ b/editor/icons/SampleLibrary.svg diff --git a/editor/icons/icon_save.svg b/editor/icons/Save.svg index be5d3ef6fd..be5d3ef6fd 100644 --- a/editor/icons/icon_save.svg +++ b/editor/icons/Save.svg diff --git a/editor/icons/icon_script.svg b/editor/icons/Script.svg index 1c6ec51a48..1c6ec51a48 100644 --- a/editor/icons/icon_script.svg +++ b/editor/icons/Script.svg diff --git a/editor/icons/icon_script_create.svg b/editor/icons/ScriptCreate.svg index 0a03907a13..0a03907a13 100644 --- a/editor/icons/icon_script_create.svg +++ b/editor/icons/ScriptCreate.svg diff --git a/editor/icons/icon_script_create_dialog.svg b/editor/icons/ScriptCreateDialog.svg index 751b799ba9..751b799ba9 100644 --- a/editor/icons/icon_script_create_dialog.svg +++ b/editor/icons/ScriptCreateDialog.svg diff --git a/editor/icons/icon_script_extend.svg b/editor/icons/ScriptExtend.svg index efa0077ab1..efa0077ab1 100644 --- a/editor/icons/icon_script_extend.svg +++ b/editor/icons/ScriptExtend.svg diff --git a/editor/icons/icon_script_remove.svg b/editor/icons/ScriptRemove.svg index de67d02947..de67d02947 100644 --- a/editor/icons/icon_script_remove.svg +++ b/editor/icons/ScriptRemove.svg diff --git a/editor/icons/icon_scroll_container.svg b/editor/icons/ScrollContainer.svg index 738748ca91..738748ca91 100644 --- a/editor/icons/icon_scroll_container.svg +++ b/editor/icons/ScrollContainer.svg diff --git a/editor/icons/icon_search.svg b/editor/icons/Search.svg index 04dc4f7372..04dc4f7372 100644 --- a/editor/icons/icon_search.svg +++ b/editor/icons/Search.svg diff --git a/editor/icons/icon_segment_shape_2d.svg b/editor/icons/SegmentShape2D.svg index e4c04ae7c6..e4c04ae7c6 100644 --- a/editor/icons/icon_segment_shape_2d.svg +++ b/editor/icons/SegmentShape2D.svg diff --git a/editor/icons/icon_shader.svg b/editor/icons/Shader.svg index 479379d235..479379d235 100644 --- a/editor/icons/icon_shader.svg +++ b/editor/icons/Shader.svg diff --git a/editor/icons/icon_shader_material.svg b/editor/icons/ShaderMaterial.svg index 37c1610f29..37c1610f29 100644 --- a/editor/icons/icon_shader_material.svg +++ b/editor/icons/ShaderMaterial.svg diff --git a/editor/icons/icon_short_cut.svg b/editor/icons/ShortCut.svg index f4e302efdb..f4e302efdb 100644 --- a/editor/icons/icon_short_cut.svg +++ b/editor/icons/ShortCut.svg diff --git a/editor/icons/icon_signal.svg b/editor/icons/Signal.svg index 82fdf2b059..82fdf2b059 100644 --- a/editor/icons/icon_signal.svg +++ b/editor/icons/Signal.svg diff --git a/editor/icons/icon_signals.svg b/editor/icons/Signals.svg index 9c09546f84..9c09546f84 100644 --- a/editor/icons/icon_signals.svg +++ b/editor/icons/Signals.svg diff --git a/editor/icons/icon_signals_and_groups.svg b/editor/icons/SignalsAndGroups.svg index d568296d5f..d568296d5f 100644 --- a/editor/icons/icon_signals_and_groups.svg +++ b/editor/icons/SignalsAndGroups.svg diff --git a/editor/icons/icon_skeleton.svg b/editor/icons/Skeleton.svg index 015c842125..015c842125 100644 --- a/editor/icons/icon_skeleton.svg +++ b/editor/icons/Skeleton.svg diff --git a/editor/icons/icon_skeleton_2d.svg b/editor/icons/Skeleton2D.svg index 8e38b5c971..8e38b5c971 100644 --- a/editor/icons/icon_skeleton_2d.svg +++ b/editor/icons/Skeleton2D.svg diff --git a/editor/icons/icon_skeleton_i_k.svg b/editor/icons/SkeletonIK.svg index e69f6e8bf3..e69f6e8bf3 100644 --- a/editor/icons/icon_skeleton_i_k.svg +++ b/editor/icons/SkeletonIK.svg diff --git a/editor/icons/icon_slider_joint.svg b/editor/icons/SliderJoint.svg index fdd7487bbf..fdd7487bbf 100644 --- a/editor/icons/icon_slider_joint.svg +++ b/editor/icons/SliderJoint.svg diff --git a/editor/icons/icon_slot.svg b/editor/icons/Slot.svg index 24d54297a8..24d54297a8 100644 --- a/editor/icons/icon_slot.svg +++ b/editor/icons/Slot.svg diff --git a/editor/icons/icon_snap.svg b/editor/icons/Snap.svg index 632cf6c27d..632cf6c27d 100644 --- a/editor/icons/icon_snap.svg +++ b/editor/icons/Snap.svg diff --git a/editor/icons/icon_snap_grid.svg b/editor/icons/SnapGrid.svg index a4a1f33053..a4a1f33053 100644 --- a/editor/icons/icon_snap_grid.svg +++ b/editor/icons/SnapGrid.svg diff --git a/editor/icons/icon_soft_body.svg b/editor/icons/SoftBody.svg index 2c907df847..2c907df847 100644 --- a/editor/icons/icon_soft_body.svg +++ b/editor/icons/SoftBody.svg diff --git a/editor/icons/icon_sort.svg b/editor/icons/Sort.svg index 0b2f7f7ea9..0b2f7f7ea9 100644 --- a/editor/icons/icon_sort.svg +++ b/editor/icons/Sort.svg diff --git a/editor/icons/icon_spatial.svg b/editor/icons/Spatial.svg index 6a469dde13..6a469dde13 100644 --- a/editor/icons/icon_spatial.svg +++ b/editor/icons/Spatial.svg diff --git a/editor/icons/icon_spatial_material.svg b/editor/icons/SpatialMaterial.svg index cfd994a0fe..cfd994a0fe 100644 --- a/editor/icons/icon_spatial_material.svg +++ b/editor/icons/SpatialMaterial.svg diff --git a/editor/icons/icon_sphere_mesh.svg b/editor/icons/SphereMesh.svg index b01ba46bcf..b01ba46bcf 100644 --- a/editor/icons/icon_sphere_mesh.svg +++ b/editor/icons/SphereMesh.svg diff --git a/editor/icons/icon_sphere_shape.svg b/editor/icons/SphereShape.svg index 4da18a1a38..4da18a1a38 100644 --- a/editor/icons/icon_sphere_shape.svg +++ b/editor/icons/SphereShape.svg diff --git a/editor/icons/icon_spin_box.svg b/editor/icons/SpinBox.svg index 728710e440..728710e440 100644 --- a/editor/icons/icon_spin_box.svg +++ b/editor/icons/SpinBox.svg diff --git a/editor/icons/icon_spot_light.svg b/editor/icons/SpotLight.svg index 6a35ee3890..6a35ee3890 100644 --- a/editor/icons/icon_spot_light.svg +++ b/editor/icons/SpotLight.svg diff --git a/editor/icons/icon_spring_arm.svg b/editor/icons/SpringArm.svg index eb0c1ebd7d..eb0c1ebd7d 100644 --- a/editor/icons/icon_spring_arm.svg +++ b/editor/icons/SpringArm.svg diff --git a/editor/icons/icon_sprite.svg b/editor/icons/Sprite.svg index 26a10625fc..26a10625fc 100644 --- a/editor/icons/icon_sprite.svg +++ b/editor/icons/Sprite.svg diff --git a/editor/icons/icon_sprite_3d.svg b/editor/icons/Sprite3D.svg index 385bb8f87d..385bb8f87d 100644 --- a/editor/icons/icon_sprite_3d.svg +++ b/editor/icons/Sprite3D.svg diff --git a/editor/icons/icon_sprite_frames.svg b/editor/icons/SpriteFrames.svg index f27adcb78c..f27adcb78c 100644 --- a/editor/icons/icon_sprite_frames.svg +++ b/editor/icons/SpriteFrames.svg diff --git a/editor/icons/icon_sprite_sheet.svg b/editor/icons/SpriteSheet.svg index 9b3eda3287..9b3eda3287 100644 --- a/editor/icons/icon_sprite_sheet.svg +++ b/editor/icons/SpriteSheet.svg diff --git a/editor/icons/icon_standard_material_3d.svg b/editor/icons/StandardMaterial3D.svg index aa8bfc9a5b..aa8bfc9a5b 100644 --- a/editor/icons/icon_standard_material_3d.svg +++ b/editor/icons/StandardMaterial3D.svg diff --git a/editor/icons/icon_static_body.svg b/editor/icons/StaticBody.svg index de819bd76b..de819bd76b 100644 --- a/editor/icons/icon_static_body.svg +++ b/editor/icons/StaticBody.svg diff --git a/editor/icons/icon_static_body_2d.svg b/editor/icons/StaticBody2D.svg index 2d846c5471..2d846c5471 100644 --- a/editor/icons/icon_static_body_2d.svg +++ b/editor/icons/StaticBody2D.svg diff --git a/editor/icons/icon_status_error.svg b/editor/icons/StatusError.svg index ac3060e155..ac3060e155 100644 --- a/editor/icons/icon_status_error.svg +++ b/editor/icons/StatusError.svg diff --git a/editor/icons/icon_status_success.svg b/editor/icons/StatusSuccess.svg index 4a22c6fc7f..4a22c6fc7f 100644 --- a/editor/icons/icon_status_success.svg +++ b/editor/icons/StatusSuccess.svg diff --git a/editor/icons/icon_status_warning.svg b/editor/icons/StatusWarning.svg index 4ec16008d7..4ec16008d7 100644 --- a/editor/icons/icon_status_warning.svg +++ b/editor/icons/StatusWarning.svg diff --git a/editor/icons/icon_stop.svg b/editor/icons/Stop.svg index 2cb013c0df..2cb013c0df 100644 --- a/editor/icons/icon_stop.svg +++ b/editor/icons/Stop.svg diff --git a/editor/icons/icon_stream_texture.svg b/editor/icons/StreamTexture.svg index e7845e10f3..e7845e10f3 100644 --- a/editor/icons/icon_stream_texture.svg +++ b/editor/icons/StreamTexture.svg diff --git a/editor/icons/icon_string.svg b/editor/icons/String.svg index 9f3bb0b011..9f3bb0b011 100644 --- a/editor/icons/icon_string.svg +++ b/editor/icons/String.svg diff --git a/editor/icons/StringName.svg b/editor/icons/StringName.svg new file mode 100644 index 0000000000..bedaa6d634 --- /dev/null +++ b/editor/icons/StringName.svg @@ -0,0 +1,4 @@ +<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg"> +<path d="m5 2c-1.6569 0-3 1.3431-3 3v2c0 0.55228-0.44772 1-1 1h-1v2h1c1.6569 0 3-1.3431 3-3v-2c0-0.55228 0.44772-1 1-1h1v3c0 1.6569 1.3431 3 3 3h3v-4h1c0.55228 0 1 0.44772 1 1v3h2v-3c0-1.6569-1.3431-3-3-3h-5v-2zm3 4h2v2h-1c-0.55228 0-1-0.44772-1-1z" fill="#6ba7ec"/> +<path d="m10 4v6h2v-4h1c0.55228 0 1 0.44772 1 1v3h2v-3c0-1.6569-1.3431-3-3-3h-1z" fill="#fff" fill-opacity=".39216"/> +</svg> diff --git a/editor/icons/icon_style_box_empty.svg b/editor/icons/StyleBoxEmpty.svg index 0268b03ef2..0268b03ef2 100644 --- a/editor/icons/icon_style_box_empty.svg +++ b/editor/icons/StyleBoxEmpty.svg diff --git a/editor/icons/icon_style_box_flat.svg b/editor/icons/StyleBoxFlat.svg index a6f43be4c8..a6f43be4c8 100644 --- a/editor/icons/icon_style_box_flat.svg +++ b/editor/icons/StyleBoxFlat.svg diff --git a/editor/icons/icon_style_box_line.svg b/editor/icons/StyleBoxLine.svg index d7c26aac9d..d7c26aac9d 100644 --- a/editor/icons/icon_style_box_line.svg +++ b/editor/icons/StyleBoxLine.svg diff --git a/editor/icons/icon_style_box_texture.svg b/editor/icons/StyleBoxTexture.svg index 6f067a4db4..6f067a4db4 100644 --- a/editor/icons/icon_style_box_texture.svg +++ b/editor/icons/StyleBoxTexture.svg diff --git a/editor/icons/icon_tab_container.svg b/editor/icons/TabContainer.svg index fe0e426ef9..fe0e426ef9 100644 --- a/editor/icons/icon_tab_container.svg +++ b/editor/icons/TabContainer.svg diff --git a/editor/icons/icon_tabs.svg b/editor/icons/Tabs.svg index ad1e9069d0..ad1e9069d0 100644 --- a/editor/icons/icon_tabs.svg +++ b/editor/icons/Tabs.svg diff --git a/editor/icons/icon_test_cube.svg b/editor/icons/TestCube.svg index 16cf68520f..16cf68520f 100644 --- a/editor/icons/icon_test_cube.svg +++ b/editor/icons/TestCube.svg diff --git a/editor/icons/icon_text_edit.svg b/editor/icons/TextEdit.svg index 66f2fca4ba..66f2fca4ba 100644 --- a/editor/icons/icon_text_edit.svg +++ b/editor/icons/TextEdit.svg diff --git a/editor/icons/icon_text_file.svg b/editor/icons/TextFile.svg index d381048212..d381048212 100644 --- a/editor/icons/icon_text_file.svg +++ b/editor/icons/TextFile.svg diff --git a/editor/icons/icon_texture_3_d.svg b/editor/icons/Texture3D.svg index ed8ce3e4ef..ed8ce3e4ef 100644 --- a/editor/icons/icon_texture_3_d.svg +++ b/editor/icons/Texture3D.svg diff --git a/editor/icons/icon_texture_array.svg b/editor/icons/TextureArray.svg index 4631b1449c..4631b1449c 100644 --- a/editor/icons/icon_texture_array.svg +++ b/editor/icons/TextureArray.svg diff --git a/editor/icons/icon_texture_button.svg b/editor/icons/TextureButton.svg index 6e1d1b6436..6e1d1b6436 100644 --- a/editor/icons/icon_texture_button.svg +++ b/editor/icons/TextureButton.svg diff --git a/editor/icons/icon_texture_progress.svg b/editor/icons/TextureProgress.svg index 5763fde840..5763fde840 100644 --- a/editor/icons/icon_texture_progress.svg +++ b/editor/icons/TextureProgress.svg diff --git a/editor/icons/icon_texture_rect.svg b/editor/icons/TextureRect.svg index 1d1b5ed8f7..1d1b5ed8f7 100644 --- a/editor/icons/icon_texture_rect.svg +++ b/editor/icons/TextureRect.svg diff --git a/editor/icons/icon_theme.svg b/editor/icons/Theme.svg index e16acbfb72..e16acbfb72 100644 --- a/editor/icons/icon_theme.svg +++ b/editor/icons/Theme.svg diff --git a/editor/icons/icon_thumbnail_wait.svg b/editor/icons/ThumbnailWait.svg index fe242e81fb..fe242e81fb 100644 --- a/editor/icons/icon_thumbnail_wait.svg +++ b/editor/icons/ThumbnailWait.svg diff --git a/editor/icons/icon_tile_map.svg b/editor/icons/TileMap.svg index afdaeea7e8..afdaeea7e8 100644 --- a/editor/icons/icon_tile_map.svg +++ b/editor/icons/TileMap.svg diff --git a/editor/icons/icon_tile_set.svg b/editor/icons/TileSet.svg index 0948e6dae1..0948e6dae1 100644 --- a/editor/icons/icon_tile_set.svg +++ b/editor/icons/TileSet.svg diff --git a/editor/icons/icon_time.svg b/editor/icons/Time.svg index eb411c6858..eb411c6858 100644 --- a/editor/icons/icon_time.svg +++ b/editor/icons/Time.svg diff --git a/editor/icons/icon_timeline_indicator.svg b/editor/icons/TimelineIndicator.svg index fd18192705..fd18192705 100644 --- a/editor/icons/icon_timeline_indicator.svg +++ b/editor/icons/TimelineIndicator.svg diff --git a/editor/icons/icon_timer.svg b/editor/icons/Timer.svg index d445eeb1dd..d445eeb1dd 100644 --- a/editor/icons/icon_timer.svg +++ b/editor/icons/Timer.svg diff --git a/editor/icons/icon_tool_add_node.svg b/editor/icons/ToolAddNode.svg index 71599c0b0d..71599c0b0d 100644 --- a/editor/icons/icon_tool_add_node.svg +++ b/editor/icons/ToolAddNode.svg diff --git a/editor/icons/icon_tool_button.svg b/editor/icons/ToolButton.svg index 98a41d2a08..98a41d2a08 100644 --- a/editor/icons/icon_tool_button.svg +++ b/editor/icons/ToolButton.svg diff --git a/editor/icons/icon_tool_connect.svg b/editor/icons/ToolConnect.svg index 321f68654a..321f68654a 100644 --- a/editor/icons/icon_tool_connect.svg +++ b/editor/icons/ToolConnect.svg diff --git a/editor/icons/icon_tool_move.svg b/editor/icons/ToolMove.svg index a02296fed6..a02296fed6 100644 --- a/editor/icons/icon_tool_move.svg +++ b/editor/icons/ToolMove.svg diff --git a/editor/icons/icon_tool_pan.svg b/editor/icons/ToolPan.svg index e195542687..e195542687 100644 --- a/editor/icons/icon_tool_pan.svg +++ b/editor/icons/ToolPan.svg diff --git a/editor/icons/icon_tool_rotate.svg b/editor/icons/ToolRotate.svg index e25b08cd07..e25b08cd07 100644 --- a/editor/icons/icon_tool_rotate.svg +++ b/editor/icons/ToolRotate.svg diff --git a/editor/icons/icon_tool_scale.svg b/editor/icons/ToolScale.svg index 8fc1527296..8fc1527296 100644 --- a/editor/icons/icon_tool_scale.svg +++ b/editor/icons/ToolScale.svg diff --git a/editor/icons/icon_tool_select.svg b/editor/icons/ToolSelect.svg index 4285b3181b..4285b3181b 100644 --- a/editor/icons/icon_tool_select.svg +++ b/editor/icons/ToolSelect.svg diff --git a/editor/icons/icon_tool_triangle.svg b/editor/icons/ToolTriangle.svg index 17ce12265e..17ce12265e 100644 --- a/editor/icons/icon_tool_triangle.svg +++ b/editor/icons/ToolTriangle.svg diff --git a/editor/icons/icon_tools.svg b/editor/icons/Tools.svg index dc002d6a4d..dc002d6a4d 100644 --- a/editor/icons/icon_tools.svg +++ b/editor/icons/Tools.svg diff --git a/editor/icons/icon_touch_screen_button.svg b/editor/icons/TouchScreenButton.svg index d29e411f05..d29e411f05 100644 --- a/editor/icons/icon_touch_screen_button.svg +++ b/editor/icons/TouchScreenButton.svg diff --git a/editor/icons/icon_track_add_key.svg b/editor/icons/TrackAddKey.svg index 582003cd9b..582003cd9b 100644 --- a/editor/icons/icon_track_add_key.svg +++ b/editor/icons/TrackAddKey.svg diff --git a/editor/icons/icon_track_add_key_hl.svg b/editor/icons/TrackAddKeyHl.svg index 7f3c60a562..7f3c60a562 100644 --- a/editor/icons/icon_track_add_key_hl.svg +++ b/editor/icons/TrackAddKeyHl.svg diff --git a/editor/icons/icon_track_capture.svg b/editor/icons/TrackCapture.svg index 51a38ff1fb..51a38ff1fb 100644 --- a/editor/icons/icon_track_capture.svg +++ b/editor/icons/TrackCapture.svg diff --git a/editor/icons/icon_track_color.svg b/editor/icons/TrackColor.svg index 6a736c7a84..6a736c7a84 100644 --- a/editor/icons/icon_track_color.svg +++ b/editor/icons/TrackColor.svg diff --git a/editor/icons/icon_track_continuous.svg b/editor/icons/TrackContinuous.svg index 2e89cdd821..2e89cdd821 100644 --- a/editor/icons/icon_track_continuous.svg +++ b/editor/icons/TrackContinuous.svg diff --git a/editor/icons/icon_track_discrete.svg b/editor/icons/TrackDiscrete.svg index a0550822bf..a0550822bf 100644 --- a/editor/icons/icon_track_discrete.svg +++ b/editor/icons/TrackDiscrete.svg diff --git a/editor/icons/icon_track_trigger.svg b/editor/icons/TrackTrigger.svg index 5572b254a2..5572b254a2 100644 --- a/editor/icons/icon_track_trigger.svg +++ b/editor/icons/TrackTrigger.svg diff --git a/editor/icons/icon_transform.svg b/editor/icons/Transform.svg index 0ed5377ed7..0ed5377ed7 100644 --- a/editor/icons/icon_transform.svg +++ b/editor/icons/Transform.svg diff --git a/editor/icons/icon_transform_2_D.svg b/editor/icons/Transform2D.svg index a57587ba06..a57587ba06 100644 --- a/editor/icons/icon_transform_2_D.svg +++ b/editor/icons/Transform2D.svg diff --git a/editor/icons/icon_transition_end.svg b/editor/icons/TransitionEnd.svg index 8d6857432f..8d6857432f 100644 --- a/editor/icons/icon_transition_end.svg +++ b/editor/icons/TransitionEnd.svg diff --git a/editor/icons/icon_transition_end_auto.svg b/editor/icons/TransitionEndAuto.svg index fbfa7b03db..fbfa7b03db 100644 --- a/editor/icons/icon_transition_end_auto.svg +++ b/editor/icons/TransitionEndAuto.svg diff --git a/editor/icons/icon_transition_end_auto_big.svg b/editor/icons/TransitionEndAutoBig.svg index fcc894a3e6..fcc894a3e6 100644 --- a/editor/icons/icon_transition_end_auto_big.svg +++ b/editor/icons/TransitionEndAutoBig.svg diff --git a/editor/icons/icon_transition_end_big.svg b/editor/icons/TransitionEndBig.svg index cc93dd5808..cc93dd5808 100644 --- a/editor/icons/icon_transition_end_big.svg +++ b/editor/icons/TransitionEndBig.svg diff --git a/editor/icons/icon_transition_immediate.svg b/editor/icons/TransitionImmediate.svg index 56e9b6c0f3..56e9b6c0f3 100644 --- a/editor/icons/icon_transition_immediate.svg +++ b/editor/icons/TransitionImmediate.svg diff --git a/editor/icons/icon_transition_immediate_auto.svg b/editor/icons/TransitionImmediateAuto.svg index 8453bcff08..8453bcff08 100644 --- a/editor/icons/icon_transition_immediate_auto.svg +++ b/editor/icons/TransitionImmediateAuto.svg diff --git a/editor/icons/icon_transition_immediate_auto_big.svg b/editor/icons/TransitionImmediateAutoBig.svg index 77f7ba592e..77f7ba592e 100644 --- a/editor/icons/icon_transition_immediate_auto_big.svg +++ b/editor/icons/TransitionImmediateAutoBig.svg diff --git a/editor/icons/icon_transition_immediate_big.svg b/editor/icons/TransitionImmediateBig.svg index 94584c45f7..94584c45f7 100644 --- a/editor/icons/icon_transition_immediate_big.svg +++ b/editor/icons/TransitionImmediateBig.svg diff --git a/editor/icons/icon_transition_sync.svg b/editor/icons/TransitionSync.svg index affa353100..affa353100 100644 --- a/editor/icons/icon_transition_sync.svg +++ b/editor/icons/TransitionSync.svg diff --git a/editor/icons/icon_transition_sync_auto.svg b/editor/icons/TransitionSyncAuto.svg index 767773a000..767773a000 100644 --- a/editor/icons/icon_transition_sync_auto.svg +++ b/editor/icons/TransitionSyncAuto.svg diff --git a/editor/icons/icon_transition_sync_auto_big.svg b/editor/icons/TransitionSyncAutoBig.svg index c9735a2653..c9735a2653 100644 --- a/editor/icons/icon_transition_sync_auto_big.svg +++ b/editor/icons/TransitionSyncAutoBig.svg diff --git a/editor/icons/icon_transition_sync_big.svg b/editor/icons/TransitionSyncBig.svg index 959f26c6f1..959f26c6f1 100644 --- a/editor/icons/icon_transition_sync_big.svg +++ b/editor/icons/TransitionSyncBig.svg diff --git a/editor/icons/icon_translation.svg b/editor/icons/Translation.svg index 4195ce04a9..4195ce04a9 100644 --- a/editor/icons/icon_translation.svg +++ b/editor/icons/Translation.svg diff --git a/editor/icons/icon_transpose.svg b/editor/icons/Transpose.svg index e63c679323..e63c679323 100644 --- a/editor/icons/icon_transpose.svg +++ b/editor/icons/Transpose.svg diff --git a/editor/icons/icon_tree.svg b/editor/icons/Tree.svg index 8e450948ce..8e450948ce 100644 --- a/editor/icons/icon_tree.svg +++ b/editor/icons/Tree.svg diff --git a/editor/icons/icon_tween.svg b/editor/icons/Tween.svg index c311cbd05e..c311cbd05e 100644 --- a/editor/icons/icon_tween.svg +++ b/editor/icons/Tween.svg diff --git a/editor/icons/icon_unbone.svg b/editor/icons/Unbone.svg index 75df7e6ce9..75df7e6ce9 100644 --- a/editor/icons/icon_unbone.svg +++ b/editor/icons/Unbone.svg diff --git a/editor/icons/icon_ungroup.svg b/editor/icons/Ungroup.svg index c6e235f47d..c6e235f47d 100644 --- a/editor/icons/icon_ungroup.svg +++ b/editor/icons/Ungroup.svg diff --git a/editor/icons/icon_unlock.svg b/editor/icons/Unlock.svg index 52be7e2233..52be7e2233 100644 --- a/editor/icons/icon_unlock.svg +++ b/editor/icons/Unlock.svg diff --git a/editor/icons/icon_unpaint_vertex.svg b/editor/icons/UnpaintVertex.svg index 7bb94f06be..7bb94f06be 100644 --- a/editor/icons/icon_unpaint_vertex.svg +++ b/editor/icons/UnpaintVertex.svg diff --git a/editor/icons/icon_uv.svg b/editor/icons/Uv.svg index f68ea2c984..f68ea2c984 100644 --- a/editor/icons/icon_uv.svg +++ b/editor/icons/Uv.svg diff --git a/editor/icons/icon_v_box_container.svg b/editor/icons/VBoxContainer.svg index 17b83ced0a..17b83ced0a 100644 --- a/editor/icons/icon_v_box_container.svg +++ b/editor/icons/VBoxContainer.svg diff --git a/editor/icons/icon_v_scroll_bar.svg b/editor/icons/VScrollBar.svg index 285e54fbd1..285e54fbd1 100644 --- a/editor/icons/icon_v_scroll_bar.svg +++ b/editor/icons/VScrollBar.svg diff --git a/editor/icons/icon_v_separator.svg b/editor/icons/VSeparator.svg index 6476ea5ad7..6476ea5ad7 100644 --- a/editor/icons/icon_v_separator.svg +++ b/editor/icons/VSeparator.svg diff --git a/editor/icons/icon_v_slider.svg b/editor/icons/VSlider.svg index c6fc1e6e0f..c6fc1e6e0f 100644 --- a/editor/icons/icon_v_slider.svg +++ b/editor/icons/VSlider.svg diff --git a/editor/icons/icon_v_split_container.svg b/editor/icons/VSplitContainer.svg index b9bbb4bfc3..b9bbb4bfc3 100644 --- a/editor/icons/icon_v_split_container.svg +++ b/editor/icons/VSplitContainer.svg diff --git a/editor/icons/icon_variant.svg b/editor/icons/Variant.svg index 7c2e4559d1..7c2e4559d1 100644 --- a/editor/icons/icon_variant.svg +++ b/editor/icons/Variant.svg diff --git a/editor/icons/icon_vector2.svg b/editor/icons/Vector2.svg index b4e9b44c03..b4e9b44c03 100644 --- a/editor/icons/icon_vector2.svg +++ b/editor/icons/Vector2.svg diff --git a/editor/icons/Vector2i.svg b/editor/icons/Vector2i.svg new file mode 100644 index 0000000000..6cf9a896f3 --- /dev/null +++ b/editor/icons/Vector2i.svg @@ -0,0 +1,5 @@ +<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg"> +<path d="m8 2v2h1c0.55228 0 1 0.44772 1 1s-0.44772 1-1 1c-0.71466-1.248e-4 -1.3751 0.38109-1.7324 1-0.17472 0.30426-0.26633 0.64914-0.26562 1h-2e-3v2h5v-2h-3c1.0717-1.344e-4 2.0619-0.57191 2.5977-1.5 0.5359-0.9282 0.5359-2.0718 0-3-0.53578-0.92809-1.526-1.4999-2.5977-1.5zm-7 2v6h2c1.6569 0 3-1.3431 3-3v-3h-2v3c0 0.55228-0.44772 1-1 1v-4z" fill="#bd91f1"/> +<path d="m8 2v2h1c0.55228 0 1 0.44772 1 1s-0.44772 1-1 1c-0.71466-1.248e-4 -1.3751 0.38109-1.7324 1-0.17472 0.30426-0.26633 0.64914-0.26562 1h-0.001953v2h5v-2h-3c1.0717-1.344e-4 2.0619-0.57191 2.5977-1.5 0.5359-0.9282 0.5359-2.0718 0-3-0.53583-0.92809-1.526-1.4999-2.5977-1.5z" fill="#fff" fill-opacity=".39216"/> +<path d="m13 2v2h2v-2zm0 4v4h2v-4z" fill="#7dc6ef"/> +</svg> diff --git a/editor/icons/icon_vector3.svg b/editor/icons/Vector3.svg index 74861160d6..74861160d6 100644 --- a/editor/icons/icon_vector3.svg +++ b/editor/icons/Vector3.svg diff --git a/editor/icons/Vector3i.svg b/editor/icons/Vector3i.svg new file mode 100644 index 0000000000..d0be27886d --- /dev/null +++ b/editor/icons/Vector3i.svg @@ -0,0 +1,5 @@ +<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg"> +<path d="m8 2v2h2c0 0.55228-0.44772 1-1 1v2c0.55228 0 1 0.44772 1 1s-0.45296 0.92408-1 1h-1v2h1c1.0717-1.34e-4 2.0619-0.57191 2.5977-1.5 0.5359-0.9282 0.5359-2.0718 0-3-0.10406-0.1795-0.22646-0.34771-0.36523-0.50195 0.13855-0.15301 0.26094-0.31991 0.36523-0.49805 0.26209-0.45639 0.3995-0.97371 0.39844-1.5h0.0039v-2zm-7 2v6h2c1.6569 0 3-1.3431 3-3v-3h-2v3c0 0.55228-0.44772 1-1 1v-4z" fill="#e286f0"/> +<path d="m8 2v2h2c0 0.55228-0.44772 1-1 1v2c0.55228 0 1 0.44772 1 1s-0.44948 0.95585-1 1h-1v2h1c1.0717-1.34e-4 2.0619-0.57191 2.5977-1.5 0.5359-0.9282 0.5359-2.0718 0-3-0.10406-0.1795-0.22646-0.34771-0.36523-0.50195 0.13855-0.15301 0.26094-0.31991 0.36523-0.49805 0.26209-0.45639 0.3995-0.97371 0.39844-1.5h0.0039v-2z" fill="#fff" fill-opacity=".39216"/> +<path d="m13 2v2h2v-2zm0 4v4h2v-4z" fill="#7dc6ef"/> +</svg> diff --git a/editor/icons/icon_vehicle_body.svg b/editor/icons/VehicleBody.svg index a509730602..a509730602 100644 --- a/editor/icons/icon_vehicle_body.svg +++ b/editor/icons/VehicleBody.svg diff --git a/editor/icons/icon_vehicle_wheel.svg b/editor/icons/VehicleWheel.svg index bd870c0118..bd870c0118 100644 --- a/editor/icons/icon_vehicle_wheel.svg +++ b/editor/icons/VehicleWheel.svg diff --git a/editor/icons/icon_video_player.svg b/editor/icons/VideoPlayer.svg index 4e8dcf0ec2..4e8dcf0ec2 100644 --- a/editor/icons/icon_video_player.svg +++ b/editor/icons/VideoPlayer.svg diff --git a/editor/icons/icon_viewport.svg b/editor/icons/Viewport.svg index 7cd5d73cde..7cd5d73cde 100644 --- a/editor/icons/icon_viewport.svg +++ b/editor/icons/Viewport.svg diff --git a/editor/icons/icon_viewport_container.svg b/editor/icons/ViewportContainer.svg index 18dcddc15f..18dcddc15f 100644 --- a/editor/icons/icon_viewport_container.svg +++ b/editor/icons/ViewportContainer.svg diff --git a/editor/icons/icon_viewport_speed.svg b/editor/icons/ViewportSpeed.svg index 364eb4969b..364eb4969b 100644 --- a/editor/icons/icon_viewport_speed.svg +++ b/editor/icons/ViewportSpeed.svg diff --git a/editor/icons/icon_viewport_texture.svg b/editor/icons/ViewportTexture.svg index 145beff6bc..145beff6bc 100644 --- a/editor/icons/icon_viewport_texture.svg +++ b/editor/icons/ViewportTexture.svg diff --git a/editor/icons/icon_viewport_zoom.svg b/editor/icons/ViewportZoom.svg index 6d64d1b8a4..6d64d1b8a4 100644 --- a/editor/icons/icon_viewport_zoom.svg +++ b/editor/icons/ViewportZoom.svg diff --git a/editor/icons/icon_visibility_enabler.svg b/editor/icons/VisibilityEnabler.svg index 70e4f081c2..70e4f081c2 100644 --- a/editor/icons/icon_visibility_enabler.svg +++ b/editor/icons/VisibilityEnabler.svg diff --git a/editor/icons/icon_visibility_enabler_2d.svg b/editor/icons/VisibilityEnabler2D.svg index 2976e468ed..2976e468ed 100644 --- a/editor/icons/icon_visibility_enabler_2d.svg +++ b/editor/icons/VisibilityEnabler2D.svg diff --git a/editor/icons/icon_visibility_notifier.svg b/editor/icons/VisibilityNotifier.svg index c908d5c99d..c908d5c99d 100644 --- a/editor/icons/icon_visibility_notifier.svg +++ b/editor/icons/VisibilityNotifier.svg diff --git a/editor/icons/icon_visibility_notifier_2d.svg b/editor/icons/VisibilityNotifier2D.svg index e05d7d3887..e05d7d3887 100644 --- a/editor/icons/icon_visibility_notifier_2d.svg +++ b/editor/icons/VisibilityNotifier2D.svg diff --git a/editor/icons/icon_visual_shader.svg b/editor/icons/VisualShader.svg index 15cb60d2e3..15cb60d2e3 100644 --- a/editor/icons/icon_visual_shader.svg +++ b/editor/icons/VisualShader.svg diff --git a/editor/icons/icon_visual_shader_port.svg b/editor/icons/VisualShaderPort.svg index 9df6344fe2..9df6344fe2 100644 --- a/editor/icons/icon_visual_shader_port.svg +++ b/editor/icons/VisualShaderPort.svg diff --git a/editor/icons/icon_warning.svg b/editor/icons/Warning.svg index 698288d5a9..698288d5a9 100644 --- a/editor/icons/icon_warning.svg +++ b/editor/icons/Warning.svg diff --git a/editor/icons/icon_window_dialog.svg b/editor/icons/WindowDialog.svg index 3c7be2a58d..3c7be2a58d 100644 --- a/editor/icons/icon_window_dialog.svg +++ b/editor/icons/WindowDialog.svg diff --git a/editor/icons/icon_world.svg b/editor/icons/World.svg index 3db96a75a6..3db96a75a6 100644 --- a/editor/icons/icon_world.svg +++ b/editor/icons/World.svg diff --git a/editor/icons/icon_world_2d.svg b/editor/icons/World2D.svg index 862242ec44..862242ec44 100644 --- a/editor/icons/icon_world_2d.svg +++ b/editor/icons/World2D.svg diff --git a/editor/icons/icon_world_environment.svg b/editor/icons/WorldEnvironment.svg index e87a4b5b0c..e87a4b5b0c 100644 --- a/editor/icons/icon_world_environment.svg +++ b/editor/icons/WorldEnvironment.svg diff --git a/editor/icons/icon_x509_certificate.svg b/editor/icons/X509Certificate.svg index e175fa3234..e175fa3234 100644 --- a/editor/icons/icon_x509_certificate.svg +++ b/editor/icons/X509Certificate.svg diff --git a/editor/icons/icon_y_sort.svg b/editor/icons/YSort.svg index dbcefef216..dbcefef216 100644 --- a/editor/icons/icon_y_sort.svg +++ b/editor/icons/YSort.svg diff --git a/editor/icons/icon_zoom.svg b/editor/icons/Zoom.svg index aa517b6ae2..aa517b6ae2 100644 --- a/editor/icons/icon_zoom.svg +++ b/editor/icons/Zoom.svg diff --git a/editor/icons/icon_zoom_less.svg b/editor/icons/ZoomLess.svg index cf3b4475c9..cf3b4475c9 100644 --- a/editor/icons/icon_zoom_less.svg +++ b/editor/icons/ZoomLess.svg diff --git a/editor/icons/icon_zoom_more.svg b/editor/icons/ZoomMore.svg index 8847eea53f..8847eea53f 100644 --- a/editor/icons/icon_zoom_more.svg +++ b/editor/icons/ZoomMore.svg diff --git a/editor/icons/icon_zoom_reset.svg b/editor/icons/ZoomReset.svg index 6ecb4111fe..6ecb4111fe 100644 --- a/editor/icons/icon_zoom_reset.svg +++ b/editor/icons/ZoomReset.svg diff --git a/editor/icons/icon_bool.svg b/editor/icons/bool.svg index 5ffd40a815..5ffd40a815 100644 --- a/editor/icons/icon_bool.svg +++ b/editor/icons/bool.svg diff --git a/editor/icons/editor_icons_builders.py b/editor/icons/editor_icons_builders.py index dfd0802ce9..ea2c2e57d1 100644 --- a/editor/icons/editor_icons_builders.py +++ b/editor/icons/editor_icons_builders.py @@ -27,7 +27,6 @@ def make_editor_icons_action(target, source, env): icons_string.write("\\" + str(hex(ord(b)))[1:]) b = svgf.read(1) - icons_string.write('"') if fname != svg_icons[-1]: icons_string.write(",") @@ -44,17 +43,16 @@ def make_editor_icons_action(target, source, env): s.write("static const char *editor_icons_names[] = {\n") # this is used to store the indices of thumbnail icons - thumb_medium_indices = []; - thumb_big_indices = []; + thumb_medium_indices = [] + thumb_big_indices = [] index = 0 for f in svg_icons: fname = str(f) - icon_name = os.path.basename(fname)[5:-4].title().replace("_", "") + # Trim the `.svg` extension from the string. + icon_name = os.path.basename(fname)[:-4] # some special cases - if icon_name in ['Int', 'Bool', 'Float']: - icon_name = icon_name.lower() if icon_name.endswith("MediumThumb"): # don't know a better way to handle this thumb_medium_indices.append(str(index)) if icon_name.endswith("BigThumb"): # don't know a better way to handle this diff --git a/editor/icons/icon_float.svg b/editor/icons/float.svg index 5c09d4c244..5c09d4c244 100644 --- a/editor/icons/icon_float.svg +++ b/editor/icons/float.svg diff --git a/editor/icons/icon_gizmo_spatial_stream_player.svg b/editor/icons/icon_gizmo_spatial_stream_player.svg deleted file mode 100644 index 473fd2c2cd..0000000000 --- a/editor/icons/icon_gizmo_spatial_stream_player.svg +++ /dev/null @@ -1 +0,0 @@ -<svg height="128" viewBox="0 0 128 128" width="128" xmlns="http://www.w3.org/2000/svg"><path d="m99.645 6.0059c-.9956.029687-1.9837.18322-2.9414.45703l-56 16c-5.1336 1.4668-8.7021 6.198-8.7031 11.537v44.203c-11.16 1.0331-20 10.379-20 21.797.000011 12.103 9.8971 22 22 22 12.103-.00001 22-9.8971 22-22v-56.947l32-9.1426v28.293c-11.16 1.0331-20 10.379-20 21.797.000011 12.103 9.8971 22 22 22 12.103-.00001 22-9.8971 22-22v-66c-.00104-6.7137-5.6428-12.192-12.354-11.994z" fill-opacity=".29412"/><path d="m99.764 10.004a8.0008 8.0008 0 0 0 -1.9609.30469l-56 16a8.0008 8.0008 0 0 0 -5.8027 7.6914v48.121a18 18 0 0 0 -2-.12109 18 18 0 0 0 -18 18 18 18 0 0 0 18 18 18 18 0 0 0 18-18v-59.965l40-11.428v37.514a18 18 0 0 0 -2-.12109 18 18 0 0 0 -18 18 18 18 0 0 0 18 18 18 18 0 0 0 18-18v-66a8.0008 8.0008 0 0 0 -8.2363-7.9961z" fill="#f7f5cf"/></svg>
\ No newline at end of file diff --git a/editor/icons/icon_int.svg b/editor/icons/int.svg index 4226c8cb7e..4226c8cb7e 100644 --- a/editor/icons/icon_int.svg +++ b/editor/icons/int.svg diff --git a/editor/import/editor_import_plugin.cpp b/editor/import/editor_import_plugin.cpp index 53a654c971..aad378c94f 100644 --- a/editor/import/editor_import_plugin.cpp +++ b/editor/import/editor_import_plugin.cpp @@ -162,7 +162,7 @@ void EditorImportPlugin::_bind_methods() { ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::ARRAY, "get_import_options", PropertyInfo(Variant::INT, "preset"))); ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::STRING, "get_save_extension")); ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::STRING, "get_resource_type")); - ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::REAL, "get_priority")); + ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::FLOAT, "get_priority")); ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::INT, "get_import_order")); ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::BOOL, "get_option_visibility", PropertyInfo(Variant::STRING, "option"), PropertyInfo(Variant::DICTIONARY, "options"))); ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::INT, "import", PropertyInfo(Variant::STRING, "source_file"), PropertyInfo(Variant::STRING, "save_path"), PropertyInfo(Variant::DICTIONARY, "options"), PropertyInfo(Variant::ARRAY, "platform_variants"), PropertyInfo(Variant::ARRAY, "gen_files"))); diff --git a/editor/import/editor_scene_importer_gltf.cpp b/editor/import/editor_scene_importer_gltf.cpp index c0d84b61b4..731d094745 100644 --- a/editor/import/editor_scene_importer_gltf.cpp +++ b/editor/import/editor_scene_importer_gltf.cpp @@ -764,10 +764,10 @@ Vector<double> EditorSceneImporterGLTF::_decode_accessor(GLTFState &state, const return dst_buffer; } -PoolVector<int> EditorSceneImporterGLTF::_decode_accessor_as_ints(GLTFState &state, const GLTFAccessorIndex p_accessor, const bool p_for_vertex) { +Vector<int> EditorSceneImporterGLTF::_decode_accessor_as_ints(GLTFState &state, const GLTFAccessorIndex p_accessor, const bool p_for_vertex) { const Vector<double> attribs = _decode_accessor(state, p_accessor, p_for_vertex); - PoolVector<int> ret; + Vector<int> ret; if (attribs.size() == 0) return ret; @@ -776,7 +776,7 @@ PoolVector<int> EditorSceneImporterGLTF::_decode_accessor_as_ints(GLTFState &sta const int ret_size = attribs.size(); ret.resize(ret_size); { - PoolVector<int>::Write w = ret.write(); + int *w = ret.ptrw(); for (int i = 0; i < ret_size; i++) { w[i] = int(attribs_ptr[i]); } @@ -784,10 +784,10 @@ PoolVector<int> EditorSceneImporterGLTF::_decode_accessor_as_ints(GLTFState &sta return ret; } -PoolVector<float> EditorSceneImporterGLTF::_decode_accessor_as_floats(GLTFState &state, const GLTFAccessorIndex p_accessor, const bool p_for_vertex) { +Vector<float> EditorSceneImporterGLTF::_decode_accessor_as_floats(GLTFState &state, const GLTFAccessorIndex p_accessor, const bool p_for_vertex) { const Vector<double> attribs = _decode_accessor(state, p_accessor, p_for_vertex); - PoolVector<float> ret; + Vector<float> ret; if (attribs.size() == 0) return ret; @@ -796,7 +796,7 @@ PoolVector<float> EditorSceneImporterGLTF::_decode_accessor_as_floats(GLTFState const int ret_size = attribs.size(); ret.resize(ret_size); { - PoolVector<float>::Write w = ret.write(); + float *w = ret.ptrw(); for (int i = 0; i < ret_size; i++) { w[i] = float(attribs_ptr[i]); } @@ -804,10 +804,10 @@ PoolVector<float> EditorSceneImporterGLTF::_decode_accessor_as_floats(GLTFState return ret; } -PoolVector<Vector2> EditorSceneImporterGLTF::_decode_accessor_as_vec2(GLTFState &state, const GLTFAccessorIndex p_accessor, const bool p_for_vertex) { +Vector<Vector2> EditorSceneImporterGLTF::_decode_accessor_as_vec2(GLTFState &state, const GLTFAccessorIndex p_accessor, const bool p_for_vertex) { const Vector<double> attribs = _decode_accessor(state, p_accessor, p_for_vertex); - PoolVector<Vector2> ret; + Vector<Vector2> ret; if (attribs.size() == 0) return ret; @@ -817,7 +817,7 @@ PoolVector<Vector2> EditorSceneImporterGLTF::_decode_accessor_as_vec2(GLTFState const int ret_size = attribs.size() / 2; ret.resize(ret_size); { - PoolVector<Vector2>::Write w = ret.write(); + Vector2 *w = ret.ptrw(); for (int i = 0; i < ret_size; i++) { w[i] = Vector2(attribs_ptr[i * 2 + 0], attribs_ptr[i * 2 + 1]); } @@ -825,10 +825,10 @@ PoolVector<Vector2> EditorSceneImporterGLTF::_decode_accessor_as_vec2(GLTFState return ret; } -PoolVector<Vector3> EditorSceneImporterGLTF::_decode_accessor_as_vec3(GLTFState &state, const GLTFAccessorIndex p_accessor, const bool p_for_vertex) { +Vector<Vector3> EditorSceneImporterGLTF::_decode_accessor_as_vec3(GLTFState &state, const GLTFAccessorIndex p_accessor, const bool p_for_vertex) { const Vector<double> attribs = _decode_accessor(state, p_accessor, p_for_vertex); - PoolVector<Vector3> ret; + Vector<Vector3> ret; if (attribs.size() == 0) return ret; @@ -838,7 +838,7 @@ PoolVector<Vector3> EditorSceneImporterGLTF::_decode_accessor_as_vec3(GLTFState const int ret_size = attribs.size() / 3; ret.resize(ret_size); { - PoolVector<Vector3>::Write w = ret.write(); + Vector3 *w = ret.ptrw(); for (int i = 0; i < ret_size; i++) { w[i] = Vector3(attribs_ptr[i * 3 + 0], attribs_ptr[i * 3 + 1], attribs_ptr[i * 3 + 2]); } @@ -846,10 +846,10 @@ PoolVector<Vector3> EditorSceneImporterGLTF::_decode_accessor_as_vec3(GLTFState return ret; } -PoolVector<Color> EditorSceneImporterGLTF::_decode_accessor_as_color(GLTFState &state, const GLTFAccessorIndex p_accessor, const bool p_for_vertex) { +Vector<Color> EditorSceneImporterGLTF::_decode_accessor_as_color(GLTFState &state, const GLTFAccessorIndex p_accessor, const bool p_for_vertex) { const Vector<double> attribs = _decode_accessor(state, p_accessor, p_for_vertex); - PoolVector<Color> ret; + Vector<Color> ret; if (attribs.size() == 0) return ret; @@ -866,7 +866,7 @@ PoolVector<Color> EditorSceneImporterGLTF::_decode_accessor_as_color(GLTFState & const int ret_size = attribs.size() / vec_len; ret.resize(ret_size); { - PoolVector<Color>::Write w = ret.write(); + Color *w = ret.ptrw(); for (int i = 0; i < ret_size; i++) { w[i] = Color(attribs_ptr[i * vec_len + 0], attribs_ptr[i * vec_len + 1], attribs_ptr[i * vec_len + 2], vec_len == 4 ? attribs_ptr[i * 4 + 3] : 1.0); } @@ -1021,10 +1021,10 @@ Error EditorSceneImporterGLTF::_parse_meshes(GLTFState &state) { array[Mesh::ARRAY_BONES] = _decode_accessor_as_ints(state, a["JOINTS_0"], true); } if (a.has("WEIGHTS_0")) { - PoolVector<float> weights = _decode_accessor_as_floats(state, a["WEIGHTS_0"], true); + Vector<float> weights = _decode_accessor_as_floats(state, a["WEIGHTS_0"], true); { //gltf does not seem to normalize the weights for some reason.. int wc = weights.size(); - PoolVector<float>::Write w = weights.write(); + float *w = weights.ptrw(); for (int k = 0; k < wc; k += 4) { float total = 0.0; @@ -1044,13 +1044,13 @@ Error EditorSceneImporterGLTF::_parse_meshes(GLTFState &state) { } if (p.has("indices")) { - PoolVector<int> indices = _decode_accessor_as_ints(state, p["indices"], false); + Vector<int> indices = _decode_accessor_as_ints(state, p["indices"], false); if (primitive == Mesh::PRIMITIVE_TRIANGLES) { //swap around indices, convert ccw to cw for front face const int is = indices.size(); - const PoolVector<int>::Write w = indices.write(); + int *w = indices.ptrw(); for (int k = 0; k < is; k += 3) { SWAP(w[k + 1], w[k + 2]); } @@ -1059,13 +1059,13 @@ Error EditorSceneImporterGLTF::_parse_meshes(GLTFState &state) { } else if (primitive == Mesh::PRIMITIVE_TRIANGLES) { //generate indices because they need to be swapped for CW/CCW - const PoolVector<Vector3> &vertices = array[Mesh::ARRAY_VERTEX]; + const Vector<Vector3> &vertices = array[Mesh::ARRAY_VERTEX]; ERR_FAIL_COND_V(vertices.size() == 0, ERR_PARSE_ERROR); - PoolVector<int> indices; + Vector<int> indices; const int vs = vertices.size(); indices.resize(vs); { - const PoolVector<int>::Write w = indices.write(); + int *w = indices.ptrw(); for (int k = 0; k < vs; k += 3) { w[k] = k; w[k + 1] = k + 2; @@ -1127,8 +1127,8 @@ Error EditorSceneImporterGLTF::_parse_meshes(GLTFState &state) { array_copy[Mesh::ARRAY_INDEX] = Variant(); if (t.has("POSITION")) { - PoolVector<Vector3> varr = _decode_accessor_as_vec3(state, t["POSITION"], true); - const PoolVector<Vector3> src_varr = array[Mesh::ARRAY_VERTEX]; + Vector<Vector3> varr = _decode_accessor_as_vec3(state, t["POSITION"], true); + const Vector<Vector3> src_varr = array[Mesh::ARRAY_VERTEX]; const int size = src_varr.size(); ERR_FAIL_COND_V(size == 0, ERR_PARSE_ERROR); { @@ -1136,9 +1136,9 @@ Error EditorSceneImporterGLTF::_parse_meshes(GLTFState &state) { const int max_idx = varr.size(); varr.resize(size); - const PoolVector<Vector3>::Write w_varr = varr.write(); - const PoolVector<Vector3>::Read r_varr = varr.read(); - const PoolVector<Vector3>::Read r_src_varr = src_varr.read(); + Vector3 *w_varr = varr.ptrw(); + const Vector3 *r_varr = varr.ptr(); + const Vector3 *r_src_varr = src_varr.ptr(); for (int l = 0; l < size; l++) { if (l < max_idx) { w_varr[l] = r_varr[l] + r_src_varr[l]; @@ -1150,17 +1150,17 @@ Error EditorSceneImporterGLTF::_parse_meshes(GLTFState &state) { array_copy[Mesh::ARRAY_VERTEX] = varr; } if (t.has("NORMAL")) { - PoolVector<Vector3> narr = _decode_accessor_as_vec3(state, t["NORMAL"], true); - const PoolVector<Vector3> src_narr = array[Mesh::ARRAY_NORMAL]; + Vector<Vector3> narr = _decode_accessor_as_vec3(state, t["NORMAL"], true); + const Vector<Vector3> src_narr = array[Mesh::ARRAY_NORMAL]; int size = src_narr.size(); ERR_FAIL_COND_V(size == 0, ERR_PARSE_ERROR); { int max_idx = narr.size(); narr.resize(size); - const PoolVector<Vector3>::Write w_narr = narr.write(); - const PoolVector<Vector3>::Read r_narr = narr.read(); - const PoolVector<Vector3>::Read r_src_narr = src_narr.read(); + Vector3 *w_narr = narr.ptrw(); + const Vector3 *r_narr = narr.ptr(); + const Vector3 *r_src_narr = src_narr.ptr(); for (int l = 0; l < size; l++) { if (l < max_idx) { w_narr[l] = r_narr[l] + r_src_narr[l]; @@ -1172,11 +1172,11 @@ Error EditorSceneImporterGLTF::_parse_meshes(GLTFState &state) { array_copy[Mesh::ARRAY_NORMAL] = narr; } if (t.has("TANGENT")) { - const PoolVector<Vector3> tangents_v3 = _decode_accessor_as_vec3(state, t["TANGENT"], true); - const PoolVector<float> src_tangents = array[Mesh::ARRAY_TANGENT]; + const Vector<Vector3> tangents_v3 = _decode_accessor_as_vec3(state, t["TANGENT"], true); + const Vector<float> src_tangents = array[Mesh::ARRAY_TANGENT]; ERR_FAIL_COND_V(src_tangents.size() == 0, ERR_PARSE_ERROR); - PoolVector<float> tangents_v4; + Vector<float> tangents_v4; { @@ -1184,10 +1184,10 @@ Error EditorSceneImporterGLTF::_parse_meshes(GLTFState &state) { int size4 = src_tangents.size(); tangents_v4.resize(size4); - const PoolVector<float>::Write w4 = tangents_v4.write(); + float *w4 = tangents_v4.ptrw(); - const PoolVector<Vector3>::Read r3 = tangents_v3.read(); - const PoolVector<float>::Read r4 = src_tangents.read(); + const Vector3 *r3 = tangents_v3.ptr(); + const float *r4 = src_tangents.ptr(); for (int l = 0; l < size4 / 4; l++) { @@ -2183,6 +2183,8 @@ Error EditorSceneImporterGLTF::_map_skin_joints_indices_to_skeleton_bone_indices const GLTFNodeIndex node_i = skin.joints_original[joint_index]; const GLTFNode *node = state.nodes[node_i]; + skin.joint_i_to_name.insert(joint_index, node->name); + const int bone_index = skeleton.godot_skeleton->find_bone(node->name); ERR_FAIL_COND_V(bone_index < 0, FAILED); @@ -2204,12 +2206,18 @@ Error EditorSceneImporterGLTF::_create_skins(GLTFState &state) { const bool has_ibms = !gltf_skin.inverse_binds.empty(); for (int joint_i = 0; joint_i < gltf_skin.joints_original.size(); ++joint_i) { - int bone_i = gltf_skin.joint_i_to_bone_i[joint_i]; + Transform xform; if (has_ibms) { - skin->add_bind(bone_i, gltf_skin.inverse_binds[joint_i]); + xform = gltf_skin.inverse_binds[joint_i]; + } + + if (state.use_named_skin_binds) { + StringName name = gltf_skin.joint_i_to_name[joint_i]; + skin->add_named_bind(name, xform); } else { - skin->add_bind(bone_i, Transform()); + int bone_i = gltf_skin.joint_i_to_bone_i[joint_i]; + skin->add_bind(bone_i, xform); } } @@ -2397,9 +2405,9 @@ Error EditorSceneImporterGLTF::_parse_animations(GLTFState &state) { } } - const PoolVector<float> times = _decode_accessor_as_floats(state, input, false); + const Vector<float> times = _decode_accessor_as_floats(state, input, false); if (path == "translation") { - const PoolVector<Vector3> translations = _decode_accessor_as_vec3(state, output, false); + const Vector<Vector3> translations = _decode_accessor_as_vec3(state, output, false); track->translation_track.interpolation = interp; track->translation_track.times = Variant(times); //convert via variant track->translation_track.values = Variant(translations); //convert via variant @@ -2409,12 +2417,12 @@ Error EditorSceneImporterGLTF::_parse_animations(GLTFState &state) { track->rotation_track.times = Variant(times); //convert via variant track->rotation_track.values = rotations; //convert via variant } else if (path == "scale") { - const PoolVector<Vector3> scales = _decode_accessor_as_vec3(state, output, false); + const Vector<Vector3> scales = _decode_accessor_as_vec3(state, output, false); track->scale_track.interpolation = interp; track->scale_track.times = Variant(times); //convert via variant track->scale_track.values = Variant(scales); //convert via variant } else if (path == "weights") { - const PoolVector<float> weights = _decode_accessor_as_floats(state, output, false); + const Vector<float> weights = _decode_accessor_as_floats(state, output, false); ERR_FAIL_INDEX_V(state.nodes[node]->mesh, state.meshes.size(), ERR_PARSE_ERROR); const GLTFMesh *mesh = &state.meshes[state.nodes[node]->mesh]; @@ -2427,7 +2435,7 @@ Error EditorSceneImporterGLTF::_parse_animations(GLTFState &state) { ERR_FAIL_COND_V_MSG(weights.size() != expected_value_count, ERR_PARSE_ERROR, "Invalid weight data, expected " + itos(expected_value_count) + " weight values, got " + itos(weights.size()) + " instead."); const int wlen = weights.size() / wc; - PoolVector<float>::Read r = weights.read(); + const float *r = weights.ptr(); for (int k = 0; k < wc; k++) { //separate tracks, having them together is not such a good idea GLTFAnimation::Channel<float> cf; cf.interpolation = interp; @@ -2995,6 +3003,7 @@ Node *EditorSceneImporterGLTF::import_scene(const String &p_path, uint32_t p_fla state.major_version = version.get_slice(".", 0).to_int(); state.minor_version = version.get_slice(".", 1).to_int(); + state.use_named_skin_binds = p_flags & IMPORT_USE_NAMED_SKIN_BINDS; /* STEP 0 PARSE SCENE */ Error err = _parse_scenes(state); diff --git a/editor/import/editor_scene_importer_gltf.h b/editor/import/editor_scene_importer_gltf.h index a4a715d17c..5d2711483b 100644 --- a/editor/import/editor_scene_importer_gltf.h +++ b/editor/import/editor_scene_importer_gltf.h @@ -231,6 +231,7 @@ class EditorSceneImporterGLTF : public EditorSceneImporter { // A mapping from the joint indices (in the order of joints_original) to the // Godot Skeleton's bone_indices Map<int, int> joint_i_to_bone_i; + Map<int, StringName> joint_i_to_name; // The Actual Skin that will be created as a mapping between the IBM's of this skin // to the generated skeleton for the mesh instances. @@ -298,6 +299,8 @@ class EditorSceneImporterGLTF : public EditorSceneImporter { int minor_version; Vector<uint8_t> glb_data; + bool use_named_skin_binds; + Vector<GLTFNode *> nodes; Vector<Vector<uint8_t> > buffers; Vector<GLTFBufferView> buffer_views; @@ -352,11 +355,11 @@ class EditorSceneImporterGLTF : public EditorSceneImporter { Error _decode_buffer_view(GLTFState &state, double *dst, const GLTFBufferViewIndex p_buffer_view, const int skip_every, const int skip_bytes, const int element_size, const int count, const GLTFType type, const int component_count, const int component_type, const int component_size, const bool normalized, const int byte_offset, const bool for_vertex); Vector<double> _decode_accessor(GLTFState &state, const GLTFAccessorIndex p_accessor, const bool p_for_vertex); - PoolVector<float> _decode_accessor_as_floats(GLTFState &state, const GLTFAccessorIndex p_accessor, const bool p_for_vertex); - PoolVector<int> _decode_accessor_as_ints(GLTFState &state, const GLTFAccessorIndex p_accessor, const bool p_for_vertex); - PoolVector<Vector2> _decode_accessor_as_vec2(GLTFState &state, const GLTFAccessorIndex p_accessor, const bool p_for_vertex); - PoolVector<Vector3> _decode_accessor_as_vec3(GLTFState &state, const GLTFAccessorIndex p_accessor, const bool p_for_vertex); - PoolVector<Color> _decode_accessor_as_color(GLTFState &state, const GLTFAccessorIndex p_accessor, const bool p_for_vertex); + Vector<float> _decode_accessor_as_floats(GLTFState &state, const GLTFAccessorIndex p_accessor, const bool p_for_vertex); + Vector<int> _decode_accessor_as_ints(GLTFState &state, const GLTFAccessorIndex p_accessor, const bool p_for_vertex); + Vector<Vector2> _decode_accessor_as_vec2(GLTFState &state, const GLTFAccessorIndex p_accessor, const bool p_for_vertex); + Vector<Vector3> _decode_accessor_as_vec3(GLTFState &state, const GLTFAccessorIndex p_accessor, const bool p_for_vertex); + Vector<Color> _decode_accessor_as_color(GLTFState &state, const GLTFAccessorIndex p_accessor, const bool p_for_vertex); Vector<Quat> _decode_accessor_as_quat(GLTFState &state, const GLTFAccessorIndex p_accessor, const bool p_for_vertex); Vector<Transform2D> _decode_accessor_as_xform2d(GLTFState &state, const GLTFAccessorIndex p_accessor, const bool p_for_vertex); Vector<Basis> _decode_accessor_as_basis(GLTFState &state, const GLTFAccessorIndex p_accessor, const bool p_for_vertex); diff --git a/editor/import/resource_importer_bitmask.cpp b/editor/import/resource_importer_bitmask.cpp index c6fdbd1378..252af9050b 100644 --- a/editor/import/resource_importer_bitmask.cpp +++ b/editor/import/resource_importer_bitmask.cpp @@ -75,7 +75,7 @@ String ResourceImporterBitMap::get_preset_name(int p_idx) const { void ResourceImporterBitMap::get_import_options(List<ImportOption> *r_options, int p_preset) const { r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "create_from", PROPERTY_HINT_ENUM, "Black & White,Alpha"), 0)); - r_options->push_back(ImportOption(PropertyInfo(Variant::REAL, "threshold", PROPERTY_HINT_RANGE, "0,1,0.01"), 0.5)); + r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "threshold", PROPERTY_HINT_RANGE, "0,1,0.01"), 0.5)); } Error ResourceImporterBitMap::import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) { @@ -94,7 +94,6 @@ Error ResourceImporterBitMap::import(const String &p_source_file, const String & Ref<BitMap> bitmap; bitmap.instance(); bitmap->create(Size2(w, h)); - image->lock(); for (int i = 0; i < h; i++) { for (int j = 0; j < w; j++) { diff --git a/editor/import/resource_importer_layered_texture.cpp b/editor/import/resource_importer_layered_texture.cpp index 9ea2911c63..d472070808 100644 --- a/editor/import/resource_importer_layered_texture.cpp +++ b/editor/import/resource_importer_layered_texture.cpp @@ -187,11 +187,11 @@ void ResourceImporterLayeredTexture::_save_tex(const Vector<Ref<Image> > &p_imag image->shrink_x2(); } - PoolVector<uint8_t> data = Image::lossless_packer(image); + Vector<uint8_t> data = Image::lossless_packer(image); int data_len = data.size(); f->store_32(data_len); - PoolVector<uint8_t>::Read r = data.read(); + const uint8_t* r = data.ptr(); f->store_buffer(r.ptr(), data_len); } @@ -210,10 +210,10 @@ void ResourceImporterLayeredTexture::_save_tex(const Vector<Ref<Image> > &p_imag f->store_32(p_compress_mode); // 0 - lossless (PNG), 1 - vram, 2 - uncompressed } - PoolVector<uint8_t> data = image->get_data(); + Vector<uint8_t> data = image->get_data(); int dl = data.size(); - PoolVector<uint8_t>::Read r = data.read(); + const uint8_t* r = data.ptr(); f->store_buffer(r.ptr(), dl); } break; case COMPRESS_UNCOMPRESSED: { @@ -226,10 +226,10 @@ void ResourceImporterLayeredTexture::_save_tex(const Vector<Ref<Image> > &p_imag image->clear_mipmaps(); } - PoolVector<uint8_t> data = image->get_data(); + Vector<uint8_t> data = image->get_data(); int dl = data.size(); - PoolVector<uint8_t>::Read r = data.read(); + const uint8_t* r = data.ptr(); f->store_buffer(r.ptr(), dl); diff --git a/editor/import/resource_importer_scene.cpp b/editor/import/resource_importer_scene.cpp index 2c2b05d6fc..9fb6be50d9 100644 --- a/editor/import/resource_importer_scene.cpp +++ b/editor/import/resource_importer_scene.cpp @@ -1160,7 +1160,7 @@ void ResourceImporterScene::get_import_options(List<ImportOption> *r_options, in bool scenes_out = p_preset == PRESET_MULTIPLE_SCENES || p_preset == PRESET_MULTIPLE_SCENES_AND_MATERIALS; bool animations_out = p_preset == PRESET_SEPARATE_ANIMATIONS || p_preset == PRESET_SEPARATE_MESHES_AND_ANIMATIONS || p_preset == PRESET_SEPARATE_MATERIALS_AND_ANIMATIONS || p_preset == PRESET_SEPARATE_MESHES_MATERIALS_AND_ANIMATIONS; - r_options->push_back(ImportOption(PropertyInfo(Variant::REAL, "nodes/root_scale", PROPERTY_HINT_RANGE, "0.001,1000,0.001"), 1.0)); + r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "nodes/root_scale", PROPERTY_HINT_RANGE, "0.001,1000,0.001"), 1.0)); r_options->push_back(ImportOption(PropertyInfo(Variant::STRING, "nodes/custom_script", PROPERTY_HINT_FILE, script_ext_hint), "")); r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "nodes/storage", PROPERTY_HINT_ENUM, "Single Scene,Instanced Sub-Scenes"), scenes_out ? 1 : 0)); r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "materials/location", PROPERTY_HINT_ENUM, "Node,Mesh"), (meshes_out || materials_out) ? 1 : 0)); @@ -1170,17 +1170,18 @@ void ResourceImporterScene::get_import_options(List<ImportOption> *r_options, in r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "meshes/ensure_tangents"), true)); r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "meshes/storage", PROPERTY_HINT_ENUM, "Built-In,Files (.mesh),Files (.tres)"), meshes_out ? 1 : 0)); r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "meshes/light_baking", PROPERTY_HINT_ENUM, "Disabled,Enable,Gen Lightmaps", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), 0)); - r_options->push_back(ImportOption(PropertyInfo(Variant::REAL, "meshes/lightmap_texel_size", PROPERTY_HINT_RANGE, "0.001,100,0.001"), 0.1)); + r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "meshes/lightmap_texel_size", PROPERTY_HINT_RANGE, "0.001,100,0.001"), 0.1)); + r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "skins/use_named_skins"), true)); r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "external_files/store_in_subdir"), false)); r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "animation/import", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), true)); - r_options->push_back(ImportOption(PropertyInfo(Variant::REAL, "animation/fps", PROPERTY_HINT_RANGE, "1,120,1"), 15)); + r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "animation/fps", PROPERTY_HINT_RANGE, "1,120,1"), 15)); r_options->push_back(ImportOption(PropertyInfo(Variant::STRING, "animation/filter_script", PROPERTY_HINT_MULTILINE_TEXT), "")); r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "animation/storage", PROPERTY_HINT_ENUM, "Built-In,Files (.anim),Files (.tres)", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), animations_out)); r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "animation/keep_custom_tracks"), animations_out)); r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "animation/optimizer/enabled", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), true)); - r_options->push_back(ImportOption(PropertyInfo(Variant::REAL, "animation/optimizer/max_linear_error"), 0.05)); - r_options->push_back(ImportOption(PropertyInfo(Variant::REAL, "animation/optimizer/max_angular_error"), 0.01)); - r_options->push_back(ImportOption(PropertyInfo(Variant::REAL, "animation/optimizer/max_angle"), 22)); + r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "animation/optimizer/max_linear_error"), 0.05)); + r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "animation/optimizer/max_angular_error"), 0.01)); + r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "animation/optimizer/max_angle"), 22)); r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "animation/optimizer/remove_unused_tracks"), true)); r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "animation/clips/amount", PROPERTY_HINT_RANGE, "0,256,1", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), 0)); for (int i = 0; i < 256; i++) { @@ -1313,6 +1314,9 @@ Error ResourceImporterScene::import(const String &p_source_file, const String &p if (int(p_options["materials/location"]) == 0) import_flags |= EditorSceneImporter::IMPORT_MATERIALS_IN_INSTANCES; + if (bool(p_options["skins/use_named_skins"])) + import_flags |= EditorSceneImporter::IMPORT_USE_NAMED_SKIN_BINDS; + Error err = OK; List<String> missing_deps; // for now, not much will be done with this Node *scene = importer->import_scene(src_path, import_flags, fps, &missing_deps, &err); @@ -1473,7 +1477,7 @@ Error ResourceImporterScene::import(const String &p_source_file, const String &p } else { post_import_script = Ref<EditorScenePostImport>(memnew(EditorScenePostImport)); - post_import_script->set_script(scr.get_ref_ptr()); + post_import_script->set_script(scr); if (!post_import_script->get_script_instance()) { EditorNode::add_io_error(TTR("Invalid/broken script for post-import (check console):") + " " + post_import_script_path); post_import_script.unref(); diff --git a/editor/import/resource_importer_scene.h b/editor/import/resource_importer_scene.h index 2691b224eb..20e7af15b5 100644 --- a/editor/import/resource_importer_scene.h +++ b/editor/import/resource_importer_scene.h @@ -59,7 +59,8 @@ public: IMPORT_GENERATE_TANGENT_ARRAYS = 256, IMPORT_FAIL_ON_MISSING_DEPENDENCIES = 512, IMPORT_MATERIALS_IN_INSTANCES = 1024, - IMPORT_USE_COMPRESSION = 2048 + IMPORT_USE_COMPRESSION = 2048, + IMPORT_USE_NAMED_SKIN_BINDS = 4096, }; diff --git a/editor/import/resource_importer_texture.cpp b/editor/import/resource_importer_texture.cpp index aa7346efe8..3254b32dae 100644 --- a/editor/import/resource_importer_texture.cpp +++ b/editor/import/resource_importer_texture.cpp @@ -210,7 +210,7 @@ String ResourceImporterTexture::get_preset_name(int p_idx) const { void ResourceImporterTexture::get_import_options(List<ImportOption> *r_options, int p_preset) const { r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "compress/mode", PROPERTY_HINT_ENUM, "Lossless,Lossy,VRAM Compressed,VRAM Uncompressed,Basis Universal", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), p_preset == PRESET_3D ? 2 : 0)); - r_options->push_back(ImportOption(PropertyInfo(Variant::REAL, "compress/lossy_quality", PROPERTY_HINT_RANGE, "0,1,0.01"), 0.7)); + r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "compress/lossy_quality", PROPERTY_HINT_RANGE, "0,1,0.01"), 0.7)); r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "compress/hdr_mode", PROPERTY_HINT_ENUM, "Enabled,Force RGBE"), 0)); r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "compress/bptc_ldr", PROPERTY_HINT_ENUM, "Enabled,RGBA Only"), 0)); r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "compress/normal_map", PROPERTY_HINT_ENUM, "Detect,Enable,Disabled"), 0)); @@ -226,7 +226,7 @@ void ResourceImporterTexture::get_import_options(List<ImportOption> *r_options, r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "process/HDR_as_SRGB"), false)); r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "process/size_limit", PROPERTY_HINT_RANGE, "0,4096,1"), 0)); r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "detect_3d/compress_to", PROPERTY_HINT_ENUM, "Disabled,VRAM Compressed,Basis Universal"), (p_preset == PRESET_DETECT) ? 1 : 0)); - r_options->push_back(ImportOption(PropertyInfo(Variant::REAL, "svg/scale", PROPERTY_HINT_RANGE, "0.001,100,0.001"), 1.0)); + r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "svg/scale", PROPERTY_HINT_RANGE, "0.001,100,0.001"), 1.0)); } void ResourceImporterTexture::save_to_stex_format(FileAccess *f, const Ref<Image> &p_image, CompressMode p_compress_mode, Image::UsedChannels p_channels, Image::CompressMode p_compress_format, float p_lossy_quality, bool p_force_rgbe) { @@ -242,12 +242,12 @@ void ResourceImporterTexture::save_to_stex_format(FileAccess *f, const Ref<Image for (int i = 0; i < p_image->get_mipmap_count() + 1; i++) { - PoolVector<uint8_t> data = Image::lossless_packer(p_image->get_image_from_mipmap(i)); + Vector<uint8_t> data = Image::lossless_packer(p_image->get_image_from_mipmap(i)); int data_len = data.size(); f->store_32(data_len); - PoolVector<uint8_t>::Read r = data.read(); - f->store_buffer(r.ptr(), data_len); + const uint8_t *r = data.ptr(); + f->store_buffer(r, data_len); } } break; @@ -261,12 +261,12 @@ void ResourceImporterTexture::save_to_stex_format(FileAccess *f, const Ref<Image for (int i = 0; i < p_image->get_mipmap_count() + 1; i++) { - PoolVector<uint8_t> data = Image::lossy_packer(p_image->get_image_from_mipmap(i), p_lossy_quality); + Vector<uint8_t> data = Image::lossy_packer(p_image->get_image_from_mipmap(i), p_lossy_quality); int data_len = data.size(); f->store_32(data_len); - PoolVector<uint8_t>::Read r = data.read(); - f->store_buffer(r.ptr(), data_len); + const uint8_t *r = data.ptr(); + f->store_buffer(r, data_len); } } break; case COMPRESS_VRAM_COMPRESSED: { @@ -285,10 +285,10 @@ void ResourceImporterTexture::save_to_stex_format(FileAccess *f, const Ref<Image f->store_32(image->get_mipmap_count()); f->store_32(image->get_format()); - PoolVector<uint8_t> data = image->get_data(); + Vector<uint8_t> data = image->get_data(); int dl = data.size(); - PoolVector<uint8_t>::Read r = data.read(); - f->store_buffer(r.ptr(), dl); + const uint8_t *r = data.ptr(); + f->store_buffer(r, dl); } break; case COMPRESS_VRAM_UNCOMPRESSED: { @@ -298,11 +298,11 @@ void ResourceImporterTexture::save_to_stex_format(FileAccess *f, const Ref<Image f->store_32(p_image->get_mipmap_count()); f->store_32(p_image->get_format()); - PoolVector<uint8_t> data = p_image->get_data(); + Vector<uint8_t> data = p_image->get_data(); int dl = data.size(); - PoolVector<uint8_t>::Read r = data.read(); + const uint8_t *r = data.ptr(); - f->store_buffer(r.ptr(), dl); + f->store_buffer(r, dl); } break; case COMPRESS_BASIS_UNIVERSAL: { @@ -315,12 +315,12 @@ void ResourceImporterTexture::save_to_stex_format(FileAccess *f, const Ref<Image for (int i = 0; i < p_image->get_mipmap_count() + 1; i++) { - PoolVector<uint8_t> data = Image::basis_universal_packer(p_image->get_image_from_mipmap(i), p_channels); + Vector<uint8_t> data = Image::basis_universal_packer(p_image->get_image_from_mipmap(i), p_channels); int data_len = data.size(); f->store_32(data_len); - PoolVector<uint8_t>::Read r = data.read(); - f->store_buffer(r.ptr(), data_len); + const uint8_t *r = data.ptr(); + f->store_buffer(r, data_len); } } break; } @@ -476,13 +476,11 @@ Error ResourceImporterTexture::import(const String &p_source_file, const String int height = image->get_height(); int width = image->get_width(); - image->lock(); for (int i = 0; i < width; i++) { for (int j = 0; j < height; j++) { image->set_pixel(i, j, image->get_pixel(i, j).inverted()); } } - image->unlock(); } if (compress_mode == COMPRESS_BASIS_UNIVERSAL && image->get_format() >= Image::FORMAT_RF) { diff --git a/editor/import/resource_importer_texture_atlas.cpp b/editor/import/resource_importer_texture_atlas.cpp index 00a25ec886..3172cc7279 100644 --- a/editor/import/resource_importer_texture_atlas.cpp +++ b/editor/import/resource_importer_texture_atlas.cpp @@ -143,8 +143,8 @@ static void _plot_triangle(Vector2 *vertices, const Vector2 &p_offset, bool p_tr int px = xi, py = yi; int sx = px, sy = py; - sx = CLAMP(sx, 0, src_width); - sy = CLAMP(sy, 0, src_height); + sx = CLAMP(sx, 0, src_width - 1); + sy = CLAMP(sy, 0, src_height - 1); Color color = p_src_image->get_pixel(sx, sy); if (p_transposed) { SWAP(px, py); @@ -165,8 +165,8 @@ static void _plot_triangle(Vector2 *vertices, const Vector2 &p_offset, bool p_tr for (int xi = (xf < width ? int(xf) : width - 1); xi >= (xt > 0 ? xt : 0); xi--) { int px = xi, py = yi; int sx = px, sy = py; - sx = CLAMP(sx, 0, src_width); - sy = CLAMP(sy, 0, src_height); + sx = CLAMP(sx, 0, src_width - 1); + sy = CLAMP(sy, 0, src_height - 1); Color color = p_src_image->get_pixel(sx, sy); if (p_transposed) { SWAP(px, py); @@ -286,12 +286,10 @@ Error ResourceImporterTextureAtlas::import_group_file(const String &p_group_file new_atlas.instance(); new_atlas->create(atlas_width, atlas_height, false, Image::FORMAT_RGBA8); - new_atlas->lock(); - for (int i = 0; i < pack_data_files.size(); i++) { PackData &pack_data = pack_data_files.write[i]; - pack_data.image->lock(); + for (int j = 0; j < pack_data.chart_pieces.size(); j++) { const EditorAtlasPacker::Chart &chart = charts[pack_data.chart_pieces[j]]; for (int k = 0; k < chart.faces.size(); k++) { @@ -304,9 +302,7 @@ Error ResourceImporterTextureAtlas::import_group_file(const String &p_group_file _plot_triangle(positions, chart.final_offset, chart.transposed, new_atlas, pack_data.image); } } - pack_data.image->unlock(); } - new_atlas->unlock(); //save the atlas @@ -350,9 +346,9 @@ Error ResourceImporterTextureAtlas::import_group_file(const String &p_group_file for (int i = 0; i < pack_data.chart_pieces.size(); i++) { const EditorAtlasPacker::Chart &chart = charts[pack_data.chart_pieces[i]]; - PoolVector<Vector2> vertices; - PoolVector<int> indices; - PoolVector<Vector2> uvs; + Vector<Vector2> vertices; + Vector<int> indices; + Vector<Vector2> uvs; int vc = chart.vertices.size(); int fc = chart.faces.size(); vertices.resize(vc); @@ -360,9 +356,9 @@ Error ResourceImporterTextureAtlas::import_group_file(const String &p_group_file indices.resize(fc * 3); { - PoolVector<Vector2>::Write vw = vertices.write(); - PoolVector<int>::Write iw = indices.write(); - PoolVector<Vector2>::Write uvw = uvs.write(); + Vector2 *vw = vertices.ptrw(); + int *iw = indices.ptrw(); + Vector2 *uvw = uvs.ptrw(); for (int j = 0; j < vc; j++) { vw[j] = chart.vertices[j]; diff --git a/editor/import/resource_importer_wav.cpp b/editor/import/resource_importer_wav.cpp index 2d43fa089d..71f81051bc 100644 --- a/editor/import/resource_importer_wav.cpp +++ b/editor/import/resource_importer_wav.cpp @@ -82,7 +82,7 @@ void ResourceImporterWAV::get_import_options(List<ImportOption> *r_options, int r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "force/8_bit"), false)); r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "force/mono"), false)); r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "force/max_rate", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), false)); - r_options->push_back(ImportOption(PropertyInfo(Variant::REAL, "force/max_rate_hz", PROPERTY_HINT_EXP_RANGE, "11025,192000,1"), 44100)); + r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "force/max_rate_hz", PROPERTY_HINT_EXP_RANGE, "11025,192000,1"), 44100)); r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "edit/trim"), false)); r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "edit/normalize"), false)); r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "edit/loop"), false)); @@ -467,7 +467,7 @@ Error ResourceImporterWAV::import(const String &p_source_file, const String &p_s is16 = false; } - PoolVector<uint8_t> dst_data; + Vector<uint8_t> dst_data; AudioStreamSample::Format dst_format; if (compression == 1) { @@ -490,8 +490,8 @@ Error ResourceImporterWAV::import(const String &p_source_file, const String &p_s right.write[i] = data[i * 2 + 1]; } - PoolVector<uint8_t> bleft; - PoolVector<uint8_t> bright; + Vector<uint8_t> bleft; + Vector<uint8_t> bright; _compress_ima_adpcm(left, bleft); _compress_ima_adpcm(right, bright); @@ -499,9 +499,9 @@ Error ResourceImporterWAV::import(const String &p_source_file, const String &p_s int dl = bleft.size(); dst_data.resize(dl * 2); - PoolVector<uint8_t>::Write w = dst_data.write(); - PoolVector<uint8_t>::Read rl = bleft.read(); - PoolVector<uint8_t>::Read rr = bright.read(); + uint8_t *w = dst_data.ptrw(); + const uint8_t *rl = bleft.ptr(); + const uint8_t *rr = bright.ptr(); for (int i = 0; i < dl; i++) { w[i * 2 + 0] = rl[i]; @@ -514,7 +514,7 @@ Error ResourceImporterWAV::import(const String &p_source_file, const String &p_s dst_format = is16 ? AudioStreamSample::FORMAT_16_BITS : AudioStreamSample::FORMAT_8_BITS; dst_data.resize(data.size() * (is16 ? 2 : 1)); { - PoolVector<uint8_t>::Write w = dst_data.write(); + uint8_t *w = dst_data.ptrw(); int ds = data.size(); for (int i = 0; i < ds; i++) { diff --git a/editor/import/resource_importer_wav.h b/editor/import/resource_importer_wav.h index 59d33feef0..6df5b88b13 100644 --- a/editor/import/resource_importer_wav.h +++ b/editor/import/resource_importer_wav.h @@ -49,7 +49,7 @@ public: virtual void get_import_options(List<ImportOption> *r_options, int p_preset = 0) const; virtual bool get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const; - static void _compress_ima_adpcm(const Vector<float> &p_data, PoolVector<uint8_t> &dst_data) { + static void _compress_ima_adpcm(const Vector<float> &p_data, Vector<uint8_t> &dst_data) { /*p_sample_data->data = (void*)malloc(len); xm_s8 *dataptr=(xm_s8*)p_sample_data->data;*/ @@ -76,10 +76,10 @@ public: datalen++; dst_data.resize(datalen / 2 + 4); - PoolVector<uint8_t>::Write w = dst_data.write(); + uint8_t *w = dst_data.ptrw(); int i, step_idx = 0, prev = 0; - uint8_t *out = w.ptr(); + uint8_t *out = w; //int16_t xm_prev=0; const float *in = p_data.ptr(); diff --git a/editor/import_dock.cpp b/editor/import_dock.cpp index 20d47e8250..06c6f9940c 100644 --- a/editor/import_dock.cpp +++ b/editor/import_dock.cpp @@ -49,7 +49,7 @@ public: values[p_name] = p_value; if (checking) { checked.insert(p_name); - _change_notify(String(p_name).utf8().get_data()); + _change_notify(); } return true; } @@ -159,24 +159,7 @@ void ImportDock::_update_options(const Ref<ConfigFile> &p_config) { } params->update(); - - preset->get_popup()->clear(); - - if (params->importer->get_preset_count() == 0) { - preset->get_popup()->add_item(TTR("Default")); - } else { - for (int i = 0; i < params->importer->get_preset_count(); i++) { - preset->get_popup()->add_item(params->importer->get_preset_name(i)); - } - } - - preset->get_popup()->add_separator(); - preset->get_popup()->add_item(vformat(TTR("Set as Default for '%s'"), params->importer->get_visible_name()), ITEM_SET_AS_DEFAULT); - if (ProjectSettings::get_singleton()->has_setting("importer_defaults/" + params->importer->get_importer_name())) { - preset->get_popup()->add_item(TTR("Load Default"), ITEM_LOAD_DEFAULT); - preset->get_popup()->add_separator(); - preset->get_popup()->add_item(vformat(TTR("Clear Default for '%s'"), params->importer->get_visible_name()), ITEM_CLEAR_DEFAULT); - } + _update_preset_menu(); } void ImportDock::set_edit_multiple_paths(const Vector<String> &p_paths) { @@ -276,6 +259,17 @@ void ImportDock::set_edit_multiple_paths(const Vector<String> &p_paths) { } } + _update_preset_menu(); + + params->paths = p_paths; + import->set_disabled(false); + import_as->set_disabled(false); + preset->set_disabled(false); + + imported->set_text(vformat(TTR("%d Files"), p_paths.size())); +} + +void ImportDock::_update_preset_menu() { preset->get_popup()->clear(); if (params->importer->get_preset_count() == 0) { @@ -286,12 +280,13 @@ void ImportDock::set_edit_multiple_paths(const Vector<String> &p_paths) { } } - params->paths = p_paths; - import->set_disabled(false); - import_as->set_disabled(false); - preset->set_disabled(false); - - imported->set_text(itos(p_paths.size()) + TTR(" Files")); + preset->get_popup()->add_separator(); + preset->get_popup()->add_item(vformat(TTR("Set as Default for '%s'"), params->importer->get_visible_name()), ITEM_SET_AS_DEFAULT); + if (ProjectSettings::get_singleton()->has_setting("importer_defaults/" + params->importer->get_importer_name())) { + preset->get_popup()->add_item(TTR("Load Default"), ITEM_LOAD_DEFAULT); + preset->get_popup()->add_separator(); + preset->get_popup()->add_item(vformat(TTR("Clear Default for '%s'"), params->importer->get_visible_name()), ITEM_CLEAR_DEFAULT); + } } void ImportDock::_importer_selected(int i_idx) { @@ -326,7 +321,7 @@ void ImportDock::_preset_selected(int p_idx) { ProjectSettings::get_singleton()->set("importer_defaults/" + params->importer->get_importer_name(), d); ProjectSettings::get_singleton()->save(); - + _update_preset_menu(); } break; case ITEM_LOAD_DEFAULT: { @@ -336,17 +331,22 @@ void ImportDock::_preset_selected(int p_idx) { List<Variant> v; d.get_key_list(&v); + if (params->checking) { + params->checked.clear(); + } for (List<Variant>::Element *E = v.front(); E; E = E->next()) { params->values[E->get()] = d[E->get()]; + if (params->checking) { + params->checked.insert(E->get()); + } } params->update(); - } break; case ITEM_CLEAR_DEFAULT: { ProjectSettings::get_singleton()->set("importer_defaults/" + params->importer->get_importer_name(), Variant()); ProjectSettings::get_singleton()->save(); - + _update_preset_menu(); } break; default: { @@ -354,11 +354,15 @@ void ImportDock::_preset_selected(int p_idx) { params->importer->get_import_options(&options, p_idx); + if (params->checking) { + params->checked.clear(); + } for (List<ResourceImporter::ImportOption>::Element *E = options.front(); E; E = E->next()) { - params->values[E->get().option.name] = E->get().default_value; + if (params->checking) { + params->checked.insert(E->get().option.name); + } } - params->update(); } break; } @@ -533,26 +537,26 @@ ImportDock::ImportDock() { add_margin_child(TTR("Import As:"), hb); import_as = memnew(OptionButton); import_as->set_disabled(true); - import_as->connect("item_selected", this, "_importer_selected"); + import_as->connect_compat("item_selected", this, "_importer_selected"); hb->add_child(import_as); import_as->set_h_size_flags(SIZE_EXPAND_FILL); preset = memnew(MenuButton); preset->set_text(TTR("Preset")); preset->set_disabled(true); - preset->get_popup()->connect("index_pressed", this, "_preset_selected"); + preset->get_popup()->connect_compat("index_pressed", this, "_preset_selected"); hb->add_child(preset); import_opts = memnew(EditorInspector); add_child(import_opts); import_opts->set_v_size_flags(SIZE_EXPAND_FILL); - import_opts->connect("property_toggled", this, "_property_toggled"); + import_opts->connect_compat("property_toggled", this, "_property_toggled"); hb = memnew(HBoxContainer); add_child(hb); import = memnew(Button); import->set_text(TTR("Reimport")); import->set_disabled(true); - import->connect("pressed", this, "_reimport_attempt"); + import->connect_compat("pressed", this, "_reimport_attempt"); hb->add_spacer(); hb->add_child(import); hb->add_spacer(); @@ -560,7 +564,7 @@ ImportDock::ImportDock() { reimport_confirm = memnew(ConfirmationDialog); reimport_confirm->get_ok()->set_text(TTR("Save scenes, re-import and restart")); add_child(reimport_confirm); - reimport_confirm->connect("confirmed", this, "_reimport_and_restart"); + reimport_confirm->connect_compat("confirmed", this, "_reimport_and_restart"); VBoxContainer *vbc_confirm = memnew(VBoxContainer()); vbc_confirm->add_child(memnew(Label(TTR("Changing the type of an imported file requires editor restart.")))); diff --git a/editor/import_dock.h b/editor/import_dock.h index a4378fb60d..7a2e669620 100644 --- a/editor/import_dock.h +++ b/editor/import_dock.h @@ -62,6 +62,7 @@ class ImportDock : public VBoxContainer { void _preset_selected(int p_idx); void _importer_selected(int i_idx); void _update_options(const Ref<ConfigFile> &p_config = Ref<ConfigFile>()); + void _update_preset_menu(); void _property_toggled(const StringName &p_prop, bool p_checked); void _reimport_attempt(); diff --git a/editor/inspector_dock.cpp b/editor/inspector_dock.cpp index 954a941a96..1f96092bba 100644 --- a/editor/inspector_dock.cpp +++ b/editor/inspector_dock.cpp @@ -247,7 +247,7 @@ void InspectorDock::_prepare_history() { } } else if (Object::cast_to<Node>(obj)) { text = Object::cast_to<Node>(obj)->get_name(); - } else if (obj->is_class("ScriptEditorDebuggerInspectedObject")) { + } else if (obj->is_class("EditorDebuggerRemoteObject")) { text = obj->call("get_title"); } else { text = obj->get_class(); @@ -260,7 +260,7 @@ void InspectorDock::_prepare_history() { } } -void InspectorDock::_select_history(int p_idx) const { +void InspectorDock::_select_history(int p_idx) { //push it to the top, it is not correct, but it's more useful ObjectID id = EditorNode::get_singleton()->get_editor_history()->get_history_obj(p_idx); Object *obj = ObjectDB::get_instance(id); @@ -269,7 +269,7 @@ void InspectorDock::_select_history(int p_idx) const { editor->push_item(obj); } -void InspectorDock::_resource_created() const { +void InspectorDock::_resource_created() { Object *c = new_resource_dialog->instance_selected(); ERR_FAIL_COND(!c); @@ -280,7 +280,7 @@ void InspectorDock::_resource_created() const { editor->push_item(c); } -void InspectorDock::_resource_selected(const RES &p_res, const String &p_property) const { +void InspectorDock::_resource_selected(const RES &p_res, const String &p_property) { if (p_res.is_null()) return; @@ -349,7 +349,6 @@ void InspectorDock::_bind_methods() { ClassDB::bind_method("_property_keyed", &InspectorDock::_property_keyed); ClassDB::bind_method("_transform_keyed", &InspectorDock::_transform_keyed); - ClassDB::bind_method("_new_resource", &InspectorDock::_new_resource); ClassDB::bind_method("_resource_file_selected", &InspectorDock::_resource_file_selected); ClassDB::bind_method("_open_resource_selector", &InspectorDock::_open_resource_selector); ClassDB::bind_method("_unref_resource", &InspectorDock::_unref_resource); @@ -511,14 +510,14 @@ InspectorDock::InspectorDock(EditorNode *p_editor, EditorData &p_editor_data) { resource_new_button->set_tooltip(TTR("Create a new resource in memory and edit it.")); resource_new_button->set_icon(get_icon("New", "EditorIcons")); general_options_hb->add_child(resource_new_button); - resource_new_button->connect("pressed", this, "_new_resource"); + resource_new_button->connect("pressed", callable_mp(this, &InspectorDock::_new_resource)); resource_new_button->set_focus_mode(Control::FOCUS_NONE); resource_load_button = memnew(ToolButton); resource_load_button->set_tooltip(TTR("Load an existing resource from disk and edit it.")); resource_load_button->set_icon(get_icon("Load", "EditorIcons")); general_options_hb->add_child(resource_load_button); - resource_load_button->connect("pressed", this, "_open_resource_selector"); + resource_load_button->connect_compat("pressed", this, "_open_resource_selector"); resource_load_button->set_focus_mode(Control::FOCUS_NONE); resource_save_button = memnew(MenuButton); @@ -527,7 +526,7 @@ InspectorDock::InspectorDock(EditorNode *p_editor, EditorData &p_editor_data) { general_options_hb->add_child(resource_save_button); resource_save_button->get_popup()->add_item(TTR("Save"), RESOURCE_SAVE); resource_save_button->get_popup()->add_item(TTR("Save As..."), RESOURCE_SAVE_AS); - resource_save_button->get_popup()->connect("id_pressed", this, "_menu_option"); + resource_save_button->get_popup()->connect_compat("id_pressed", this, "_menu_option"); resource_save_button->set_focus_mode(Control::FOCUS_NONE); resource_save_button->set_disabled(true); @@ -539,7 +538,7 @@ InspectorDock::InspectorDock(EditorNode *p_editor, EditorData &p_editor_data) { backward_button->set_flat(true); backward_button->set_tooltip(TTR("Go to the previous edited object in history.")); backward_button->set_disabled(true); - backward_button->connect("pressed", this, "_edit_back"); + backward_button->connect_compat("pressed", this, "_edit_back"); forward_button = memnew(ToolButton); general_options_hb->add_child(forward_button); @@ -547,14 +546,14 @@ InspectorDock::InspectorDock(EditorNode *p_editor, EditorData &p_editor_data) { forward_button->set_flat(true); forward_button->set_tooltip(TTR("Go to the next edited object in history.")); forward_button->set_disabled(true); - forward_button->connect("pressed", this, "_edit_forward"); + forward_button->connect_compat("pressed", this, "_edit_forward"); history_menu = memnew(MenuButton); history_menu->set_tooltip(TTR("History of recently edited objects.")); history_menu->set_icon(get_icon("History", "EditorIcons")); general_options_hb->add_child(history_menu); - history_menu->connect("about_to_show", this, "_prepare_history"); - history_menu->get_popup()->connect("id_pressed", this, "_select_history"); + history_menu->connect_compat("about_to_show", this, "_prepare_history"); + history_menu->get_popup()->connect_compat("id_pressed", this, "_select_history"); HBoxContainer *node_info_hb = memnew(HBoxContainer); add_child(node_info_hb); @@ -567,12 +566,12 @@ InspectorDock::InspectorDock(EditorNode *p_editor, EditorData &p_editor_data) { object_menu->set_icon(get_icon("Tools", "EditorIcons")); node_info_hb->add_child(object_menu); object_menu->set_tooltip(TTR("Object properties.")); - object_menu->get_popup()->connect("id_pressed", this, "_menu_option"); + object_menu->get_popup()->connect_compat("id_pressed", this, "_menu_option"); new_resource_dialog = memnew(CreateDialog); editor->get_gui_base()->add_child(new_resource_dialog); new_resource_dialog->set_base_type("Resource"); - new_resource_dialog->connect("create", this, "_resource_created"); + new_resource_dialog->connect_compat("create", this, "_resource_created"); search = memnew(LineEdit); search->set_h_size_flags(Control::SIZE_EXPAND_FILL); @@ -588,7 +587,7 @@ InspectorDock::InspectorDock(EditorNode *p_editor, EditorData &p_editor_data) { warning->add_color_override("font_color", get_color("warning_color", "Editor")); warning->set_clip_text(true); warning->hide(); - warning->connect("pressed", this, "_warning_pressed"); + warning->connect_compat("pressed", this, "_warning_pressed"); warning_dialog = memnew(AcceptDialog); editor->get_gui_base()->add_child(warning_dialog); @@ -596,7 +595,7 @@ InspectorDock::InspectorDock(EditorNode *p_editor, EditorData &p_editor_data) { load_resource_dialog = memnew(EditorFileDialog); add_child(load_resource_dialog); load_resource_dialog->set_current_dir("res://"); - load_resource_dialog->connect("file_selected", this, "_resource_file_selected"); + load_resource_dialog->connect_compat("file_selected", this, "_resource_file_selected"); inspector = memnew(EditorInspector); add_child(inspector); @@ -612,8 +611,8 @@ InspectorDock::InspectorDock(EditorNode *p_editor, EditorData &p_editor_data) { inspector->set_use_filter(true); // TODO: check me - inspector->connect("resource_selected", this, "_resource_selected"); - inspector->connect("property_keyed", this, "_property_keyed"); + inspector->connect_compat("resource_selected", this, "_resource_selected"); + inspector->connect_compat("property_keyed", this, "_property_keyed"); } InspectorDock::~InspectorDock() { diff --git a/editor/inspector_dock.h b/editor/inspector_dock.h index a7da4bef4c..016aee12cf 100644 --- a/editor/inspector_dock.h +++ b/editor/inspector_dock.h @@ -104,13 +104,13 @@ class InspectorDock : public VBoxContainer { void _paste_resource() const; void _warning_pressed(); - void _resource_created() const; - void _resource_selected(const RES &p_res, const String &p_property = "") const; + void _resource_created(); + void _resource_selected(const RES &p_res, const String &p_property = ""); void _edit_forward(); void _edit_back(); void _menu_collapseall(); void _menu_expandall(); - void _select_history(int p_idx) const; + void _select_history(int p_idx); void _prepare_history(); void _property_keyed(const String &p_keyed, const Variant &p_value, bool p_advance); diff --git a/editor/node_dock.cpp b/editor/node_dock.cpp index c53c5f330b..f04afcd04d 100644 --- a/editor/node_dock.cpp +++ b/editor/node_dock.cpp @@ -107,7 +107,7 @@ NodeDock::NodeDock() { connections_button->set_h_size_flags(SIZE_EXPAND_FILL); connections_button->set_clip_text(true); mode_hb->add_child(connections_button); - connections_button->connect("pressed", this, "show_connections"); + connections_button->connect_compat("pressed", this, "show_connections"); groups_button = memnew(ToolButton); groups_button->set_text(TTR("Groups")); @@ -116,7 +116,7 @@ NodeDock::NodeDock() { groups_button->set_h_size_flags(SIZE_EXPAND_FILL); groups_button->set_clip_text(true); mode_hb->add_child(groups_button); - groups_button->connect("pressed", this, "show_groups"); + groups_button->connect_compat("pressed", this, "show_groups"); connections = memnew(ConnectionsDock(EditorNode::get_singleton())); connections->set_undoredo(EditorNode::get_undo_redo()); diff --git a/editor/plugin_config_dialog.cpp b/editor/plugin_config_dialog.cpp index 1506ba319c..4e3333f528 100644 --- a/editor/plugin_config_dialog.cpp +++ b/editor/plugin_config_dialog.cpp @@ -132,8 +132,8 @@ void PluginConfigDialog::_on_required_text_changed(const String &) { void PluginConfigDialog::_notification(int p_what) { switch (p_what) { case NOTIFICATION_READY: { - connect("confirmed", this, "_on_confirmed"); - get_cancel()->connect("pressed", this, "_on_cancelled"); + connect_compat("confirmed", this, "_on_confirmed"); + get_cancel()->connect_compat("pressed", this, "_on_cancelled"); } break; case NOTIFICATION_POST_POPUP: { @@ -194,7 +194,7 @@ PluginConfigDialog::PluginConfigDialog() { grid->add_child(name_lb); name_edit = memnew(LineEdit); - name_edit->connect("text_changed", this, "_on_required_text_changed"); + name_edit->connect_compat("text_changed", this, "_on_required_text_changed"); name_edit->set_placeholder("MyPlugin"); grid->add_child(name_edit); @@ -253,7 +253,7 @@ PluginConfigDialog::PluginConfigDialog() { grid->add_child(script_lb); script_edit = memnew(LineEdit); - script_edit->connect("text_changed", this, "_on_required_text_changed"); + script_edit->connect_compat("text_changed", this, "_on_required_text_changed"); script_edit->set_placeholder("\"plugin.gd\" -> res://addons/my_plugin/plugin.gd"); grid->add_child(script_edit); diff --git a/editor/plugins/abstract_polygon_2d_editor.cpp b/editor/plugins/abstract_polygon_2d_editor.cpp index b2d132b3da..6f29b6c76a 100644 --- a/editor/plugins/abstract_polygon_2d_editor.cpp +++ b/editor/plugins/abstract_polygon_2d_editor.cpp @@ -150,7 +150,7 @@ void AbstractPolygon2DEditor::_action_add_polygon(const Variant &p_polygon) { void AbstractPolygon2DEditor::_action_remove_polygon(int p_idx) { - _action_set_polygon(p_idx, _get_polygon(p_idx), PoolVector<Vector2>()); + _action_set_polygon(p_idx, _get_polygon(p_idx), Vector<Vector2>()); } void AbstractPolygon2DEditor::_action_set_polygon(int p_idx, const Variant &p_polygon) { @@ -209,8 +209,8 @@ void AbstractPolygon2DEditor::_notification(int p_what) { button_delete->set_icon(EditorNode::get_singleton()->get_gui_base()->get_icon("CurveDelete", "EditorIcons")); button_edit->set_pressed(true); - get_tree()->connect("node_removed", this, "_node_removed"); - create_resource->connect("confirmed", this, "_create_resource"); + get_tree()->connect_compat("node_removed", this, "_node_removed"); + create_resource->connect_compat("confirmed", this, "_create_resource"); } break; } } @@ -256,7 +256,7 @@ void AbstractPolygon2DEditor::_wip_close() { undo_redo->create_action(TTR("Create Polygon")); _action_add_polygon(wip); if (_has_uv()) { - undo_redo->add_do_method(_get_node(), "set_uv", PoolVector<Vector2>()); + undo_redo->add_do_method(_get_node(), "set_uv", Vector<Vector2>()); undo_redo->add_undo_method(_get_node(), "set_uv", _get_node()->get("uv")); } _commit_action(); @@ -584,7 +584,7 @@ void AbstractPolygon2DEditor::forward_canvas_draw_over_viewport(Control *p_overl if (wip_active && wip_destructive && j != -1) continue; - PoolVector<Vector2> points; + Vector<Vector2> points; Vector2 offset; if (wip_active && j == edited_point.polygon) { @@ -703,7 +703,7 @@ void AbstractPolygon2DEditor::_bind_methods() { void AbstractPolygon2DEditor::remove_point(const Vertex &p_vertex) { - PoolVector<Vector2> vertices = _get_polygon(p_vertex.polygon); + Vector<Vector2> vertices = _get_polygon(p_vertex.polygon); if (vertices.size() > (_is_line() ? 2 : 3)) { @@ -744,7 +744,7 @@ AbstractPolygon2DEditor::PosVertex AbstractPolygon2DEditor::closest_point(const for (int j = 0; j < n_polygons; j++) { - PoolVector<Vector2> points = _get_polygon(j); + Vector<Vector2> points = _get_polygon(j); const Vector2 offset = _get_offset(j); const int n_points = points.size(); @@ -777,7 +777,7 @@ AbstractPolygon2DEditor::PosVertex AbstractPolygon2DEditor::closest_edge_point(c for (int j = 0; j < n_polygons; j++) { - PoolVector<Vector2> points = _get_polygon(j); + Vector<Vector2> points = _get_polygon(j); const Vector2 offset = _get_offset(j); const int n_points = points.size(); const int n_segments = n_points - (_is_line() ? 1 : 0); @@ -820,17 +820,17 @@ AbstractPolygon2DEditor::AbstractPolygon2DEditor(EditorNode *p_editor, bool p_wi add_child(memnew(VSeparator)); button_create = memnew(ToolButton); add_child(button_create); - button_create->connect("pressed", this, "_menu_option", varray(MODE_CREATE)); + button_create->connect_compat("pressed", this, "_menu_option", varray(MODE_CREATE)); button_create->set_toggle_mode(true); button_edit = memnew(ToolButton); add_child(button_edit); - button_edit->connect("pressed", this, "_menu_option", varray(MODE_EDIT)); + button_edit->connect_compat("pressed", this, "_menu_option", varray(MODE_EDIT)); button_edit->set_toggle_mode(true); button_delete = memnew(ToolButton); add_child(button_delete); - button_delete->connect("pressed", this, "_menu_option", varray(MODE_DELETE)); + button_delete->connect_compat("pressed", this, "_menu_option", varray(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 9261613ddd..c955f2b806 100644 --- a/editor/plugins/animation_blend_space_1d_editor.cpp +++ b/editor/plugins/animation_blend_space_1d_editor.cpp @@ -622,28 +622,28 @@ 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", this, "_tool_switch", varray(3)); + tool_blend->connect_compat("pressed", this, "_tool_switch", varray(3)); tool_select = memnew(ToolButton); tool_select->set_toggle_mode(true); 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", this, "_tool_switch", varray(0)); + tool_select->connect_compat("pressed", this, "_tool_switch", varray(0)); tool_create = memnew(ToolButton); tool_create->set_toggle_mode(true); tool_create->set_button_group(bg); top_hb->add_child(tool_create); tool_create->set_tooltip(TTR("Create points.")); - tool_create->connect("pressed", this, "_tool_switch", varray(1)); + tool_create->connect_compat("pressed", this, "_tool_switch", varray(1)); tool_erase_sep = memnew(VSeparator); top_hb->add_child(tool_erase_sep); tool_erase = memnew(ToolButton); top_hb->add_child(tool_erase); tool_erase->set_tooltip(TTR("Erase points.")); - tool_erase->connect("pressed", this, "_erase_selected"); + tool_erase->connect_compat("pressed", this, "_erase_selected"); top_hb->add_child(memnew(VSeparator)); @@ -652,7 +652,7 @@ AnimationNodeBlendSpace1DEditor::AnimationNodeBlendSpace1DEditor() { top_hb->add_child(snap); snap->set_pressed(true); snap->set_tooltip(TTR("Enable snap and show grid.")); - snap->connect("pressed", this, "_snap_toggled"); + snap->connect_compat("pressed", this, "_snap_toggled"); snap_value = memnew(SpinBox); top_hb->add_child(snap_value); @@ -670,12 +670,12 @@ AnimationNodeBlendSpace1DEditor::AnimationNodeBlendSpace1DEditor() { edit_value->set_min(-1000); edit_value->set_max(1000); edit_value->set_step(0.01); - edit_value->connect("value_changed", this, "_edit_point_pos"); + edit_value->connect_compat("value_changed", this, "_edit_point_pos"); open_editor = memnew(Button); edit_hb->add_child(open_editor); open_editor->set_text(TTR("Open Editor")); - open_editor->connect("pressed", this, "_open_editor", varray(), CONNECT_DEFERRED); + open_editor->connect_compat("pressed", this, "_open_editor", varray(), CONNECT_DEFERRED); edit_hb->hide(); open_editor->hide(); @@ -691,8 +691,8 @@ AnimationNodeBlendSpace1DEditor::AnimationNodeBlendSpace1DEditor() { panel->set_v_size_flags(SIZE_EXPAND_FILL); blend_space_draw = memnew(Control); - blend_space_draw->connect("gui_input", this, "_blend_space_gui_input"); - blend_space_draw->connect("draw", this, "_blend_space_draw"); + blend_space_draw->connect_compat("gui_input", this, "_blend_space_gui_input"); + blend_space_draw->connect_compat("draw", this, "_blend_space_draw"); blend_space_draw->set_focus_mode(FOCUS_ALL); panel->add_child(blend_space_draw); @@ -724,10 +724,10 @@ AnimationNodeBlendSpace1DEditor::AnimationNodeBlendSpace1DEditor() { bottom_hb->add_child(max_value); } - snap_value->connect("value_changed", this, "_config_changed"); - min_value->connect("value_changed", this, "_config_changed"); - max_value->connect("value_changed", this, "_config_changed"); - label_value->connect("text_changed", this, "_labels_changed"); + snap_value->connect_compat("value_changed", this, "_config_changed"); + min_value->connect_compat("value_changed", this, "_config_changed"); + max_value->connect_compat("value_changed", this, "_config_changed"); + label_value->connect_compat("text_changed", this, "_labels_changed"); error_panel = memnew(PanelContainer); add_child(error_panel); @@ -740,18 +740,18 @@ AnimationNodeBlendSpace1DEditor::AnimationNodeBlendSpace1DEditor() { menu = memnew(PopupMenu); add_child(menu); - menu->connect("id_pressed", this, "_add_menu_type"); + menu->connect_compat("id_pressed", this, "_add_menu_type"); animations_menu = memnew(PopupMenu); menu->add_child(animations_menu); animations_menu->set_name("animations"); - animations_menu->connect("index_pressed", this, "_add_animation_type"); + animations_menu->connect_compat("index_pressed", this, "_add_animation_type"); open_file = memnew(EditorFileDialog); add_child(open_file); open_file->set_title(TTR("Open Animation Node")); open_file->set_mode(EditorFileDialog::MODE_OPEN_FILE); - open_file->connect("file_selected", this, "_file_opened"); + open_file->connect_compat("file_selected", this, "_file_opened"); undo_redo = EditorNode::get_undo_redo(); selected_point = -1; diff --git a/editor/plugins/animation_blend_space_2d_editor.cpp b/editor/plugins/animation_blend_space_2d_editor.cpp index fdd8ffd58f..d2306a5d6b 100644 --- a/editor/plugins/animation_blend_space_2d_editor.cpp +++ b/editor/plugins/animation_blend_space_2d_editor.cpp @@ -55,12 +55,12 @@ void AnimationNodeBlendSpace2DEditor::_blend_space_changed() { void AnimationNodeBlendSpace2DEditor::edit(const Ref<AnimationNode> &p_node) { if (blend_space.is_valid()) { - blend_space->disconnect("triangles_updated", this, "_blend_space_changed"); + blend_space->disconnect_compat("triangles_updated", this, "_blend_space_changed"); } blend_space = p_node; if (!blend_space.is_null()) { - blend_space->connect("triangles_updated", this, "_blend_space_changed"); + blend_space->connect_compat("triangles_updated", this, "_blend_space_changed"); _update_space(); } } @@ -870,42 +870,42 @@ 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", this, "_tool_switch", varray(3)); + tool_blend->connect_compat("pressed", this, "_tool_switch", varray(3)); tool_select = memnew(ToolButton); tool_select->set_toggle_mode(true); 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", this, "_tool_switch", varray(0)); + tool_select->connect_compat("pressed", this, "_tool_switch", varray(0)); tool_create = memnew(ToolButton); tool_create->set_toggle_mode(true); tool_create->set_button_group(bg); top_hb->add_child(tool_create); tool_create->set_tooltip(TTR("Create points.")); - tool_create->connect("pressed", this, "_tool_switch", varray(1)); + tool_create->connect_compat("pressed", this, "_tool_switch", varray(1)); tool_triangle = memnew(ToolButton); tool_triangle->set_toggle_mode(true); 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", this, "_tool_switch", varray(2)); + tool_triangle->connect_compat("pressed", this, "_tool_switch", varray(2)); tool_erase_sep = memnew(VSeparator); top_hb->add_child(tool_erase_sep); tool_erase = memnew(ToolButton); top_hb->add_child(tool_erase); tool_erase->set_tooltip(TTR("Erase points and triangles.")); - tool_erase->connect("pressed", this, "_erase_selected"); + tool_erase->connect_compat("pressed", this, "_erase_selected"); tool_erase->set_disabled(true); top_hb->add_child(memnew(VSeparator)); auto_triangles = memnew(ToolButton); top_hb->add_child(auto_triangles); - auto_triangles->connect("pressed", this, "_auto_triangles_toggled"); + auto_triangles->connect_compat("pressed", this, "_auto_triangles_toggled"); auto_triangles->set_toggle_mode(true); auto_triangles->set_tooltip(TTR("Generate blend triangles automatically (instead of manually)")); @@ -916,7 +916,7 @@ AnimationNodeBlendSpace2DEditor::AnimationNodeBlendSpace2DEditor() { top_hb->add_child(snap); snap->set_pressed(true); snap->set_tooltip(TTR("Enable snap and show grid.")); - snap->connect("pressed", this, "_snap_toggled"); + snap->connect_compat("pressed", this, "_snap_toggled"); snap_x = memnew(SpinBox); top_hb->add_child(snap_x); @@ -937,7 +937,7 @@ AnimationNodeBlendSpace2DEditor::AnimationNodeBlendSpace2DEditor() { top_hb->add_child(memnew(Label(TTR("Blend:")))); interpolation = memnew(OptionButton); top_hb->add_child(interpolation); - interpolation->connect("item_selected", this, "_config_changed"); + interpolation->connect_compat("item_selected", this, "_config_changed"); edit_hb = memnew(HBoxContainer); top_hb->add_child(edit_hb); @@ -948,17 +948,17 @@ AnimationNodeBlendSpace2DEditor::AnimationNodeBlendSpace2DEditor() { edit_x->set_min(-1000); edit_x->set_step(0.01); edit_x->set_max(1000); - edit_x->connect("value_changed", this, "_edit_point_pos"); + edit_x->connect_compat("value_changed", this, "_edit_point_pos"); edit_y = memnew(SpinBox); edit_hb->add_child(edit_y); edit_y->set_min(-1000); edit_y->set_step(0.01); edit_y->set_max(1000); - edit_y->connect("value_changed", this, "_edit_point_pos"); + edit_y->connect_compat("value_changed", this, "_edit_point_pos"); open_editor = memnew(Button); edit_hb->add_child(open_editor); open_editor->set_text(TTR("Open Editor")); - open_editor->connect("pressed", this, "_open_editor", varray(), CONNECT_DEFERRED); + open_editor->connect_compat("pressed", this, "_open_editor", varray(), CONNECT_DEFERRED); edit_hb->hide(); open_editor->hide(); @@ -999,8 +999,8 @@ AnimationNodeBlendSpace2DEditor::AnimationNodeBlendSpace2DEditor() { panel->set_h_size_flags(SIZE_EXPAND_FILL); blend_space_draw = memnew(Control); - blend_space_draw->connect("gui_input", this, "_blend_space_gui_input"); - blend_space_draw->connect("draw", this, "_blend_space_draw"); + blend_space_draw->connect_compat("gui_input", this, "_blend_space_gui_input"); + blend_space_draw->connect_compat("draw", this, "_blend_space_draw"); blend_space_draw->set_focus_mode(FOCUS_ALL); panel->add_child(blend_space_draw); @@ -1029,14 +1029,14 @@ AnimationNodeBlendSpace2DEditor::AnimationNodeBlendSpace2DEditor() { min_x_value->set_step(0.01); } - snap_x->connect("value_changed", this, "_config_changed"); - snap_y->connect("value_changed", this, "_config_changed"); - max_x_value->connect("value_changed", this, "_config_changed"); - min_x_value->connect("value_changed", this, "_config_changed"); - max_y_value->connect("value_changed", this, "_config_changed"); - min_y_value->connect("value_changed", this, "_config_changed"); - label_x->connect("text_changed", this, "_labels_changed"); - label_y->connect("text_changed", this, "_labels_changed"); + snap_x->connect_compat("value_changed", this, "_config_changed"); + snap_y->connect_compat("value_changed", this, "_config_changed"); + max_x_value->connect_compat("value_changed", this, "_config_changed"); + min_x_value->connect_compat("value_changed", this, "_config_changed"); + max_y_value->connect_compat("value_changed", this, "_config_changed"); + min_y_value->connect_compat("value_changed", this, "_config_changed"); + label_x->connect_compat("text_changed", this, "_labels_changed"); + label_y->connect_compat("text_changed", this, "_labels_changed"); error_panel = memnew(PanelContainer); add_child(error_panel); @@ -1050,18 +1050,18 @@ AnimationNodeBlendSpace2DEditor::AnimationNodeBlendSpace2DEditor() { menu = memnew(PopupMenu); add_child(menu); - menu->connect("id_pressed", this, "_add_menu_type"); + menu->connect_compat("id_pressed", this, "_add_menu_type"); animations_menu = memnew(PopupMenu); menu->add_child(animations_menu); animations_menu->set_name("animations"); - animations_menu->connect("index_pressed", this, "_add_animation_type"); + animations_menu->connect_compat("index_pressed", this, "_add_animation_type"); open_file = memnew(EditorFileDialog); add_child(open_file); open_file->set_title(TTR("Open Animation Node")); open_file->set_mode(EditorFileDialog::MODE_OPEN_FILE); - open_file->connect("file_selected", this, "_file_opened"); + open_file->connect_compat("file_selected", this, "_file_opened"); undo_redo = EditorNode::get_undo_redo(); selected_point = -1; diff --git a/editor/plugins/animation_blend_tree_editor_plugin.cpp b/editor/plugins/animation_blend_tree_editor_plugin.cpp index 2de224c043..f2daa809b4 100644 --- a/editor/plugins/animation_blend_tree_editor_plugin.cpp +++ b/editor/plugins/animation_blend_tree_editor_plugin.cpp @@ -146,11 +146,11 @@ void AnimationNodeBlendTreeEditor::_update_graph() { name->set_expand_to_text_length(true); node->add_child(name); node->set_slot(0, false, 0, Color(), true, 0, get_color("font_color", "Label")); - name->connect("text_entered", this, "_node_renamed", varray(agnode)); - name->connect("focus_exited", this, "_node_renamed_focus_out", varray(name, agnode), CONNECT_DEFERRED); + name->connect_compat("text_entered", this, "_node_renamed", varray(agnode)); + name->connect_compat("focus_exited", this, "_node_renamed_focus_out", varray(name, agnode), CONNECT_DEFERRED); base = 1; node->set_show_close_button(true); - node->connect("close_request", this, "_delete_request", varray(E->get()), CONNECT_DEFERRED); + node->connect_compat("close_request", this, "_delete_request", varray(E->get()), CONNECT_DEFERRED); } for (int i = 0; i < agnode->get_input_count(); i++) { @@ -173,13 +173,13 @@ void AnimationNodeBlendTreeEditor::_update_graph() { prop->set_object_and_property(AnimationTreeEditor::get_singleton()->get_tree(), base_path); prop->update_property(); prop->set_name_split_ratio(0); - prop->connect("property_changed", this, "_property_changed"); + prop->connect_compat("property_changed", this, "_property_changed"); node->add_child(prop); visible_properties.push_back(prop); } } - node->connect("dragged", this, "_node_dragged", varray(E->get())); + node->connect_compat("dragged", this, "_node_dragged", varray(E->get())); if (AnimationTreeEditor::get_singleton()->can_edit(agnode)) { node->add_child(memnew(HSeparator)); @@ -187,7 +187,7 @@ void AnimationNodeBlendTreeEditor::_update_graph() { open_in_editor->set_text(TTR("Open Editor")); open_in_editor->set_icon(get_icon("Edit", "EditorIcons")); node->add_child(open_in_editor); - open_in_editor->connect("pressed", this, "_open_in_editor", varray(E->get()), CONNECT_DEFERRED); + open_in_editor->connect_compat("pressed", this, "_open_in_editor", varray(E->get()), CONNECT_DEFERRED); open_in_editor->set_h_size_flags(SIZE_SHRINK_CENTER); } @@ -198,7 +198,7 @@ void AnimationNodeBlendTreeEditor::_update_graph() { edit_filters->set_text(TTR("Edit Filters")); edit_filters->set_icon(get_icon("AnimationFilter", "EditorIcons")); node->add_child(edit_filters); - edit_filters->connect("pressed", this, "_edit_filters", varray(E->get()), CONNECT_DEFERRED); + edit_filters->connect_compat("pressed", this, "_edit_filters", varray(E->get()), CONNECT_DEFERRED); edit_filters->set_h_size_flags(SIZE_SHRINK_CENTER); } @@ -238,7 +238,7 @@ void AnimationNodeBlendTreeEditor::_update_graph() { animations[E->get()] = pb; node->add_child(pb); - mb->get_popup()->connect("index_pressed", this, "_anim_selected", varray(options, E->get()), CONNECT_DEFERRED); + mb->get_popup()->connect_compat("index_pressed", this, "_anim_selected", varray(options, E->get()), CONNECT_DEFERRED); } if (EditorSettings::get_singleton()->get("interface/theme/use_graph_node_headers")) { @@ -312,7 +312,7 @@ void AnimationNodeBlendTreeEditor::_add_node(int p_idx) { AnimationNode *an = Object::cast_to<AnimationNode>(ClassDB::instance(base_type)); ERR_FAIL_COND(!an); anode = Ref<AnimationNode>(an); - anode->set_script(add_options[p_idx].script.get_ref_ptr()); + anode->set_script(add_options[p_idx].script); base_name = add_options[p_idx].name; } @@ -911,7 +911,7 @@ bool AnimationNodeBlendTreeEditor::can_edit(const Ref<AnimationNode> &p_node) { void AnimationNodeBlendTreeEditor::edit(const Ref<AnimationNode> &p_node) { if (blend_tree.is_valid()) { - blend_tree->disconnect("removed_from_graph", this, "_removed_from_graph"); + blend_tree->disconnect_compat("removed_from_graph", this, "_removed_from_graph"); } blend_tree = p_node; @@ -919,7 +919,7 @@ void AnimationNodeBlendTreeEditor::edit(const Ref<AnimationNode> &p_node) { if (blend_tree.is_null()) { hide(); } else { - blend_tree->connect("removed_from_graph", this, "_removed_from_graph"); + blend_tree->connect_compat("removed_from_graph", this, "_removed_from_graph"); _update_graph(); } @@ -936,12 +936,12 @@ 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", this, "_connection_request", varray(), CONNECT_DEFERRED); - graph->connect("disconnection_request", this, "_disconnection_request", varray(), CONNECT_DEFERRED); - graph->connect("node_selected", this, "_node_selected"); - graph->connect("scroll_offset_changed", this, "_scroll_changed"); - graph->connect("delete_nodes_request", this, "_delete_nodes_request"); - graph->connect("popup_request", this, "_popup_request"); + graph->connect_compat("connection_request", this, "_connection_request", varray(), CONNECT_DEFERRED); + graph->connect_compat("disconnection_request", this, "_disconnection_request", varray(), CONNECT_DEFERRED); + graph->connect_compat("node_selected", this, "_node_selected"); + graph->connect_compat("scroll_offset_changed", this, "_scroll_changed"); + graph->connect_compat("delete_nodes_request", this, "_delete_nodes_request"); + graph->connect_compat("popup_request", this, "_popup_request"); VSeparator *vs = memnew(VSeparator); graph->get_zoom_hbox()->add_child(vs); @@ -951,8 +951,8 @@ AnimationNodeBlendTreeEditor::AnimationNodeBlendTreeEditor() { graph->get_zoom_hbox()->add_child(add_node); add_node->set_text(TTR("Add Node...")); graph->get_zoom_hbox()->move_child(add_node, 0); - add_node->get_popup()->connect("id_pressed", this, "_add_node"); - add_node->connect("about_to_show", this, "_update_options_menu"); + add_node->get_popup()->connect_compat("id_pressed", this, "_add_node"); + add_node->connect_compat("about_to_show", this, "_update_options_menu"); add_options.push_back(AddOption("Animation", "AnimationNodeAnimation")); add_options.push_back(AddOption("OneShot", "AnimationNodeOneShot")); @@ -984,19 +984,19 @@ AnimationNodeBlendTreeEditor::AnimationNodeBlendTreeEditor() { filter_enabled = memnew(CheckBox); filter_enabled->set_text(TTR("Enable Filtering")); - filter_enabled->connect("pressed", this, "_filter_toggled"); + filter_enabled->connect_compat("pressed", this, "_filter_toggled"); filter_vbox->add_child(filter_enabled); filters = memnew(Tree); filter_vbox->add_child(filters); filters->set_v_size_flags(SIZE_EXPAND_FILL); filters->set_hide_root(true); - filters->connect("item_edited", this, "_filter_edited"); + filters->connect_compat("item_edited", this, "_filter_edited"); open_file = memnew(EditorFileDialog); add_child(open_file); open_file->set_title(TTR("Open Animation Node")); open_file->set_mode(EditorFileDialog::MODE_OPEN_FILE); - open_file->connect("file_selected", this, "_file_opened"); + open_file->connect_compat("file_selected", this, "_file_opened"); undo_redo = EditorNode::get_undo_redo(); } diff --git a/editor/plugins/animation_player_editor_plugin.cpp b/editor/plugins/animation_player_editor_plugin.cpp index d8bbac9c49..0f2a7376f5 100644 --- a/editor/plugins/animation_player_editor_plugin.cpp +++ b/editor/plugins/animation_player_editor_plugin.cpp @@ -38,10 +38,8 @@ #include "editor/animation_track_editor.h" #include "editor/editor_scale.h" #include "editor/editor_settings.h" - -// For onion skinning. -#include "editor/plugins/canvas_item_editor_plugin.h" -#include "editor/plugins/spatial_editor_plugin.h" +#include "editor/plugins/canvas_item_editor_plugin.h" // For onion skinning. +#include "editor/plugins/spatial_editor_plugin.h" // For onion skinning. #include "scene/main/viewport.h" #include "servers/visual_server.h" @@ -99,13 +97,13 @@ void AnimationPlayerEditor::_notification(int p_what) { } break; case NOTIFICATION_ENTER_TREE: { - tool_anim->get_popup()->connect("id_pressed", this, "_animation_tool_menu"); + tool_anim->get_popup()->connect_compat("id_pressed", this, "_animation_tool_menu"); - onion_skinning->get_popup()->connect("id_pressed", this, "_onion_skinning_menu"); + onion_skinning->get_popup()->connect_compat("id_pressed", this, "_onion_skinning_menu"); - blend_editor.next->connect("item_selected", this, "_blend_editor_next_changed"); + blend_editor.next->connect_compat("item_selected", this, "_blend_editor_next_changed"); - get_tree()->connect("node_removed", this, "_node_removed"); + get_tree()->connect_compat("node_removed", this, "_node_removed"); add_style_override("panel", editor->get_gui_base()->get_stylebox("panel", "Panel")); } break; @@ -375,8 +373,7 @@ void AnimationPlayerEditor::_animation_save_in_path(const Ref<Resource> &p_resou Error err = ResourceSaver::save(path, p_resource, flg | ResourceSaver::FLAG_REPLACE_SUBRESOURCE_PATHS); if (err != OK) { - accept->set_text(TTR("Error saving resource!")); - accept->popup_centered_minsize(); + EditorNode::get_singleton()->show_warning(TTR("Error saving resource!")); return; } @@ -1504,16 +1501,16 @@ void AnimationPlayerEditor::_prepare_onion_layers_2() { void AnimationPlayerEditor::_start_onion_skinning() { // FIXME: Using "idle_frame" makes onion layers update one frame behind the current. - if (!get_tree()->is_connected("idle_frame", this, "call_deferred")) { - get_tree()->connect("idle_frame", this, "call_deferred", varray("_prepare_onion_layers_1")); + if (!get_tree()->is_connected_compat("idle_frame", this, "call_deferred")) { + get_tree()->connect_compat("idle_frame", this, "call_deferred", varray("_prepare_onion_layers_1")); } } void AnimationPlayerEditor::_stop_onion_skinning() { - if (get_tree()->is_connected("idle_frame", this, "call_deferred")) { + if (get_tree()->is_connected_compat("idle_frame", this, "call_deferred")) { - get_tree()->disconnect("idle_frame", this, "call_deferred"); + get_tree()->disconnect_compat("idle_frame", this, "call_deferred"); _free_onion_layers(); @@ -1628,13 +1625,9 @@ AnimationPlayerEditor::AnimationPlayerEditor(EditorNode *p_editor, AnimationPlay scale->set_tooltip(TTR("Scale animation playback globally for the node.")); scale->hide(); - accept = memnew(AcceptDialog); - add_child(accept); - accept->connect("confirmed", this, "_menu_confirm_current"); - delete_dialog = memnew(ConfirmationDialog); add_child(delete_dialog); - delete_dialog->connect("confirmed", this, "_animation_remove_confirmed"); + delete_dialog->connect_compat("confirmed", this, "_animation_remove_confirmed"); tool_anim = memnew(MenuButton); tool_anim->set_flat(false); @@ -1679,7 +1672,7 @@ AnimationPlayerEditor::AnimationPlayerEditor(EditorNode *p_editor, AnimationPlay onion_toggle = memnew(ToolButton); onion_toggle->set_toggle_mode(true); onion_toggle->set_tooltip(TTR("Enable Onion Skinning")); - onion_toggle->connect("pressed", this, "_onion_skinning_menu", varray(ONION_SKINNING_ENABLE)); + onion_toggle->connect_compat("pressed", this, "_onion_skinning_menu", varray(ONION_SKINNING_ENABLE)); hb->add_child(onion_toggle); onion_skinning = memnew(MenuButton); @@ -1705,7 +1698,7 @@ AnimationPlayerEditor::AnimationPlayerEditor(EditorNode *p_editor, AnimationPlay pin->set_toggle_mode(true); pin->set_tooltip(TTR("Pin AnimationPlayer")); hb->add_child(pin); - pin->connect("pressed", this, "_pin_pressed"); + pin->connect_compat("pressed", this, "_pin_pressed"); file = memnew(EditorFileDialog); add_child(file); @@ -1729,7 +1722,7 @@ AnimationPlayerEditor::AnimationPlayerEditor(EditorNode *p_editor, AnimationPlay error_dialog->set_title(TTR("Error!")); add_child(error_dialog); - name_dialog->connect("confirmed", this, "_animation_name_edited"); + name_dialog->connect_compat("confirmed", this, "_animation_name_edited"); blend_editor.dialog = memnew(AcceptDialog); add_child(blend_editor.dialog); @@ -1745,21 +1738,21 @@ AnimationPlayerEditor::AnimationPlayerEditor(EditorNode *p_editor, AnimationPlay blend_editor.dialog->set_title(TTR("Cross-Animation Blend Times")); updating_blends = false; - blend_editor.tree->connect("item_edited", this, "_blend_edited"); + blend_editor.tree->connect_compat("item_edited", this, "_blend_edited"); - autoplay->connect("pressed", this, "_autoplay_pressed"); + autoplay->connect_compat("pressed", this, "_autoplay_pressed"); autoplay->set_toggle_mode(true); - play->connect("pressed", this, "_play_pressed"); - play_from->connect("pressed", this, "_play_from_pressed"); - play_bw->connect("pressed", this, "_play_bw_pressed"); - play_bw_from->connect("pressed", this, "_play_bw_from_pressed"); - stop->connect("pressed", this, "_stop_pressed"); + play->connect_compat("pressed", this, "_play_pressed"); + play_from->connect_compat("pressed", this, "_play_from_pressed"); + play_bw->connect_compat("pressed", this, "_play_bw_pressed"); + play_bw_from->connect_compat("pressed", this, "_play_bw_from_pressed"); + stop->connect_compat("pressed", this, "_stop_pressed"); - animation->connect("item_selected", this, "_animation_selected", Vector<Variant>(), true); + animation->connect_compat("item_selected", this, "_animation_selected", Vector<Variant>(), true); - file->connect("file_selected", this, "_dialog_action"); - frame->connect("value_changed", this, "_seek_value_changed", Vector<Variant>(), true); - scale->connect("text_entered", this, "_scale_changed", Vector<Variant>(), true); + file->connect_compat("file_selected", this, "_dialog_action"); + frame->connect_compat("value_changed", this, "_seek_value_changed", Vector<Variant>(), true); + scale->connect_compat("text_entered", this, "_scale_changed", Vector<Variant>(), true); renaming = false; last_active = false; @@ -1769,14 +1762,14 @@ AnimationPlayerEditor::AnimationPlayerEditor(EditorNode *p_editor, AnimationPlay add_child(track_editor); track_editor->set_v_size_flags(SIZE_EXPAND_FILL); - track_editor->connect("timeline_changed", this, "_animation_key_editor_seek"); - track_editor->connect("animation_len_changed", this, "_animation_key_editor_anim_len_changed"); + track_editor->connect_compat("timeline_changed", this, "_animation_key_editor_seek"); + track_editor->connect_compat("animation_len_changed", this, "_animation_key_editor_anim_len_changed"); _update_player(); // Onion skinning. - track_editor->connect("visibility_changed", this, "_editor_visibility_changed"); + track_editor->connect_compat("visibility_changed", this, "_editor_visibility_changed"); onion.enabled = false; onion.past = true; diff --git a/editor/plugins/animation_player_editor_plugin.h b/editor/plugins/animation_player_editor_plugin.h index ab9db279d5..40815151a3 100644 --- a/editor/plugins/animation_player_editor_plugin.h +++ b/editor/plugins/animation_player_editor_plugin.h @@ -110,7 +110,6 @@ class AnimationPlayerEditor : public VBoxContainer { float timeline_position; EditorFileDialog *file; - AcceptDialog *accept; ConfirmationDialog *delete_dialog; int current_option; diff --git a/editor/plugins/animation_state_machine_editor.cpp b/editor/plugins/animation_state_machine_editor.cpp index 035a67b821..6f29aba356 100644 --- a/editor/plugins/animation_state_machine_editor.cpp +++ b/editor/plugins/animation_state_machine_editor.cpp @@ -1276,21 +1276,21 @@ AnimationNodeStateMachineEditor::AnimationNodeStateMachineEditor() { tool_select->set_button_group(bg); tool_select->set_pressed(true); tool_select->set_tooltip(TTR("Select and move nodes.\nRMB to add new nodes.\nShift+LMB to create connections.")); - tool_select->connect("pressed", this, "_update_mode", varray(), CONNECT_DEFERRED); + tool_select->connect_compat("pressed", this, "_update_mode", varray(), CONNECT_DEFERRED); tool_create = memnew(ToolButton); top_hb->add_child(tool_create); tool_create->set_toggle_mode(true); tool_create->set_button_group(bg); tool_create->set_tooltip(TTR("Create new nodes.")); - tool_create->connect("pressed", this, "_update_mode", varray(), CONNECT_DEFERRED); + tool_create->connect_compat("pressed", this, "_update_mode", varray(), CONNECT_DEFERRED); tool_connect = memnew(ToolButton); top_hb->add_child(tool_connect); tool_connect->set_toggle_mode(true); tool_connect->set_button_group(bg); tool_connect->set_tooltip(TTR("Connect nodes.")); - tool_connect->connect("pressed", this, "_update_mode", varray(), CONNECT_DEFERRED); + tool_connect->connect_compat("pressed", this, "_update_mode", varray(), CONNECT_DEFERRED); tool_erase_hb = memnew(HBoxContainer); top_hb->add_child(tool_erase_hb); @@ -1298,7 +1298,7 @@ AnimationNodeStateMachineEditor::AnimationNodeStateMachineEditor() { tool_erase = memnew(ToolButton); tool_erase->set_tooltip(TTR("Remove selected node or transition.")); tool_erase_hb->add_child(tool_erase); - tool_erase->connect("pressed", this, "_erase_selected"); + tool_erase->connect_compat("pressed", this, "_erase_selected"); tool_erase->set_disabled(true); tool_erase_hb->add_child(memnew(VSeparator)); @@ -1306,13 +1306,13 @@ AnimationNodeStateMachineEditor::AnimationNodeStateMachineEditor() { tool_autoplay = memnew(ToolButton); tool_autoplay->set_tooltip(TTR("Toggle autoplay this animation on start, restart or seek to zero.")); tool_erase_hb->add_child(tool_autoplay); - tool_autoplay->connect("pressed", this, "_autoplay_selected"); + tool_autoplay->connect_compat("pressed", this, "_autoplay_selected"); tool_autoplay->set_disabled(true); tool_end = memnew(ToolButton); tool_end->set_tooltip(TTR("Set the end animation. This is useful for sub-transitions.")); tool_erase_hb->add_child(tool_end); - tool_end->connect("pressed", this, "_end_selected"); + tool_end->connect_compat("pressed", this, "_end_selected"); tool_end->set_disabled(true); top_hb->add_child(memnew(VSeparator)); @@ -1333,26 +1333,26 @@ AnimationNodeStateMachineEditor::AnimationNodeStateMachineEditor() { state_machine_draw = memnew(Control); panel->add_child(state_machine_draw); - state_machine_draw->connect("gui_input", this, "_state_machine_gui_input"); - state_machine_draw->connect("draw", this, "_state_machine_draw"); + state_machine_draw->connect_compat("gui_input", this, "_state_machine_gui_input"); + state_machine_draw->connect_compat("draw", this, "_state_machine_draw"); state_machine_draw->set_focus_mode(FOCUS_ALL); state_machine_play_pos = memnew(Control); state_machine_draw->add_child(state_machine_play_pos); state_machine_play_pos->set_mouse_filter(MOUSE_FILTER_PASS); //pass all to parent state_machine_play_pos->set_anchors_and_margins_preset(PRESET_WIDE); - state_machine_play_pos->connect("draw", this, "_state_machine_pos_draw"); + state_machine_play_pos->connect_compat("draw", this, "_state_machine_pos_draw"); v_scroll = memnew(VScrollBar); state_machine_draw->add_child(v_scroll); v_scroll->set_anchors_and_margins_preset(PRESET_RIGHT_WIDE); - v_scroll->connect("value_changed", this, "_scroll_changed"); + v_scroll->connect_compat("value_changed", this, "_scroll_changed"); h_scroll = memnew(HScrollBar); state_machine_draw->add_child(h_scroll); h_scroll->set_anchors_and_margins_preset(PRESET_BOTTOM_WIDE); h_scroll->set_margin(MARGIN_RIGHT, -v_scroll->get_size().x * EDSCALE); - h_scroll->connect("value_changed", this, "_scroll_changed"); + h_scroll->connect_compat("value_changed", this, "_scroll_changed"); error_panel = memnew(PanelContainer); add_child(error_panel); @@ -1366,25 +1366,25 @@ AnimationNodeStateMachineEditor::AnimationNodeStateMachineEditor() { menu = memnew(PopupMenu); add_child(menu); - menu->connect("id_pressed", this, "_add_menu_type"); + menu->connect_compat("id_pressed", this, "_add_menu_type"); animations_menu = memnew(PopupMenu); menu->add_child(animations_menu); animations_menu->set_name("animations"); - animations_menu->connect("index_pressed", this, "_add_animation_type"); + animations_menu->connect_compat("index_pressed", this, "_add_animation_type"); name_edit = memnew(LineEdit); state_machine_draw->add_child(name_edit); name_edit->hide(); - name_edit->connect("text_entered", this, "_name_edited"); - name_edit->connect("focus_exited", this, "_name_edited_focus_out"); + name_edit->connect_compat("text_entered", this, "_name_edited"); + name_edit->connect_compat("focus_exited", this, "_name_edited_focus_out"); name_edit->set_as_toplevel(true); open_file = memnew(EditorFileDialog); add_child(open_file); open_file->set_title(TTR("Open Animation Node")); open_file->set_mode(EditorFileDialog::MODE_OPEN_FILE); - open_file->connect("file_selected", this, "_file_opened"); + open_file->connect_compat("file_selected", this, "_file_opened"); undo_redo = EditorNode::get_undo_redo(); over_text = false; diff --git a/editor/plugins/animation_tree_editor_plugin.cpp b/editor/plugins/animation_tree_editor_plugin.cpp index a729c90160..8900882725 100644 --- a/editor/plugins/animation_tree_editor_plugin.cpp +++ b/editor/plugins/animation_tree_editor_plugin.cpp @@ -85,7 +85,7 @@ void AnimationTreeEditor::_update_path() { b->set_button_group(group); b->set_pressed(true); b->set_focus_mode(FOCUS_NONE); - b->connect("pressed", this, "_path_button_pressed", varray(-1)); + b->connect_compat("pressed", this, "_path_button_pressed", varray(-1)); path_hb->add_child(b); for (int i = 0; i < button_path.size(); i++) { b = memnew(Button); @@ -95,7 +95,7 @@ void AnimationTreeEditor::_update_path() { path_hb->add_child(b); b->set_pressed(true); b->set_focus_mode(FOCUS_NONE); - b->connect("pressed", this, "_path_button_pressed", varray(i)); + b->connect_compat("pressed", this, "_path_button_pressed", varray(i)); } } diff --git a/editor/plugins/asset_library_editor_plugin.cpp b/editor/plugins/asset_library_editor_plugin.cpp index a479703527..c8cbc59e45 100644 --- a/editor/plugins/asset_library_editor_plugin.cpp +++ b/editor/plugins/asset_library_editor_plugin.cpp @@ -112,7 +112,7 @@ EditorAssetLibraryItem::EditorAssetLibraryItem() { icon = memnew(TextureButton); icon->set_custom_minimum_size(Size2(64, 64) * EDSCALE); icon->set_default_cursor_shape(CURSOR_POINTING_HAND); - icon->connect("pressed", this, "_asset_clicked"); + icon->connect_compat("pressed", this, "_asset_clicked"); hb->add_child(icon); @@ -123,17 +123,17 @@ EditorAssetLibraryItem::EditorAssetLibraryItem() { title = memnew(LinkButton); title->set_underline_mode(LinkButton::UNDERLINE_MODE_ON_HOVER); - title->connect("pressed", this, "_asset_clicked"); + title->connect_compat("pressed", this, "_asset_clicked"); vb->add_child(title); category = memnew(LinkButton); category->set_underline_mode(LinkButton::UNDERLINE_MODE_ON_HOVER); - category->connect("pressed", this, "_category_clicked"); + category->connect_compat("pressed", this, "_category_clicked"); vb->add_child(category); author = memnew(LinkButton); author->set_underline_mode(LinkButton::UNDERLINE_MODE_ON_HOVER); - author->connect("pressed", this, "_author_clicked"); + author->connect_compat("pressed", this, "_author_clicked"); vb->add_child(author); price = memnew(Label); @@ -166,9 +166,8 @@ void EditorAssetLibraryItemDescription::set_image(int p_type, int p_index, const // Overlay and thumbnail need the same format for `blend_rect` to work. thumbnail->convert(Image::FORMAT_RGBA8); - thumbnail->lock(); + thumbnail->blend_rect(overlay, overlay->get_used_rect(), overlay_pos); - thumbnail->unlock(); Ref<ImageTexture> tex; tex.instance(); @@ -264,7 +263,7 @@ void EditorAssetLibraryItemDescription::add_preview(int p_id, bool p_video, cons preview.button->set_flat(true); preview.button->set_icon(get_icon("ThumbnailWait", "EditorIcons")); preview.button->set_toggle_mode(true); - preview.button->connect("pressed", this, "_preview_click", varray(p_id)); + preview.button->connect_compat("pressed", this, "_preview_click", varray(p_id)); preview_hb->add_child(preview.button); if (!p_video) { preview.image = get_icon("ThumbnailWait", "EditorIcons"); @@ -291,7 +290,7 @@ EditorAssetLibraryItemDescription::EditorAssetLibraryItemDescription() { description = memnew(RichTextLabel); desc_vbox->add_child(description); description->set_v_size_flags(SIZE_EXPAND_FILL); - description->connect("meta_clicked", this, "_link_click"); + description->connect_compat("meta_clicked", this, "_link_click"); description->add_constant_override("line_separation", Math::round(5 * EDSCALE)); VBoxContainer *previews_vbox = memnew(VBoxContainer); @@ -322,7 +321,7 @@ EditorAssetLibraryItemDescription::EditorAssetLibraryItemDescription() { } /////////////////////////////////////////////////////////////////////////////////// -void EditorAssetLibraryItemDownload::_http_download_completed(int p_status, int p_code, const PoolStringArray &headers, const PoolByteArray &p_data) { +void EditorAssetLibraryItemDownload::_http_download_completed(int p_status, int p_code, const PackedStringArray &headers, const PackedByteArray &p_data) { String error_text; @@ -527,7 +526,7 @@ EditorAssetLibraryItemDownload::EditorAssetLibraryItemDownload() { title->set_h_size_flags(SIZE_EXPAND_FILL); dismiss = memnew(TextureButton); - dismiss->connect("pressed", this, "_close"); + dismiss->connect_compat("pressed", this, "_close"); title_hb->add_child(dismiss); title->set_clip_text(true); @@ -547,11 +546,11 @@ EditorAssetLibraryItemDownload::EditorAssetLibraryItemDownload() { install = memnew(Button); install->set_text(TTR("Install...")); install->set_disabled(true); - install->connect("pressed", this, "_install"); + install->connect_compat("pressed", this, "_install"); retry = memnew(Button); retry->set_text(TTR("Retry")); - retry->connect("pressed", this, "_make_request"); + retry->connect_compat("pressed", this, "_make_request"); hb2->add_child(retry); hb2->add_child(install); @@ -559,7 +558,7 @@ EditorAssetLibraryItemDownload::EditorAssetLibraryItemDownload() { download = memnew(HTTPRequest); add_child(download); - download->connect("request_completed", this, "_http_download_completed"); + download->connect_compat("request_completed", this, "_http_download_completed"); download->set_use_threads(EDITOR_DEF("asset_library/use_threads", true)); download_error = memnew(AcceptDialog); @@ -568,7 +567,7 @@ EditorAssetLibraryItemDownload::EditorAssetLibraryItemDownload() { asset_installer = memnew(EditorAssetInstaller); add_child(asset_installer); - asset_installer->connect("confirmed", this, "_close"); + asset_installer->connect_compat("confirmed", this, "_close"); prev_status = -1; @@ -658,7 +657,7 @@ void EditorAssetLibrary::_install_asset() { if (templates_only) { download->set_external_install(true); - download->connect("install_asset", this, "_install_external_asset"); + download->connect_compat("install_asset", this, "_install_external_asset"); } } @@ -710,12 +709,12 @@ void EditorAssetLibrary::_select_asset(int p_id) { _api_request("asset/" + itos(p_id), REQUESTING_ASSET); } -void EditorAssetLibrary::_image_update(bool use_cache, bool final, const PoolByteArray &p_data, int p_queue_id) { +void EditorAssetLibrary::_image_update(bool use_cache, bool final, const PackedByteArray &p_data, int p_queue_id) { Object *obj = ObjectDB::get_instance(image_queue[p_queue_id].target); if (obj) { bool image_set = false; - PoolByteArray image_data = p_data; + PackedByteArray image_data = p_data; if (use_cache) { String cache_filename_base = EditorSettings::get_singleton()->get_cache_dir().plus_file("assetimage_" + image_queue[p_queue_id].image_url.md5_text()); @@ -723,12 +722,12 @@ void EditorAssetLibrary::_image_update(bool use_cache, bool final, const PoolByt FileAccess *file = FileAccess::open(cache_filename_base + ".data", FileAccess::READ); if (file) { - PoolByteArray cached_data; + PackedByteArray cached_data; int len = file->get_32(); cached_data.resize(len); - PoolByteArray::Write w = cached_data.write(); - file->get_buffer(w.ptr(), len); + uint8_t *w = cached_data.ptrw(); + file->get_buffer(w, len); image_data = cached_data; file->close(); @@ -737,17 +736,17 @@ void EditorAssetLibrary::_image_update(bool use_cache, bool final, const PoolByt } int len = image_data.size(); - PoolByteArray::Read r = image_data.read(); + const uint8_t *r = image_data.ptr(); Ref<Image> image = Ref<Image>(memnew(Image)); uint8_t png_signature[8] = { 137, 80, 78, 71, 13, 10, 26, 10 }; uint8_t jpg_signature[3] = { 255, 216, 255 }; - if (r.ptr()) { + if (r) { if ((memcmp(&r[0], &png_signature[0], 8) == 0) && Image::_png_mem_loader_func) { - image->copy_internals_from(Image::_png_mem_loader_func(r.ptr(), len)); + image->copy_internals_from(Image::_png_mem_loader_func(r, len)); } else if ((memcmp(&r[0], &jpg_signature[0], 3) == 0) && Image::_jpg_mem_loader_func) { - image->copy_internals_from(Image::_jpg_mem_loader_func(r.ptr(), len)); + image->copy_internals_from(Image::_jpg_mem_loader_func(r, len)); } } @@ -790,7 +789,7 @@ void EditorAssetLibrary::_image_update(bool use_cache, bool final, const PoolByt } } -void EditorAssetLibrary::_image_request_completed(int p_status, int p_code, const PoolStringArray &headers, const PoolByteArray &p_data, int p_queue_id) { +void EditorAssetLibrary::_image_request_completed(int p_status, int p_code, const PackedStringArray &headers, const PackedByteArray &p_data, int p_queue_id) { ERR_FAIL_COND(!image_queue.has(p_queue_id)); @@ -811,11 +810,11 @@ void EditorAssetLibrary::_image_request_completed(int p_status, int p_code, cons } int len = p_data.size(); - PoolByteArray::Read r = p_data.read(); + const uint8_t *r = p_data.ptr(); file = FileAccess::open(cache_filename_base + ".data", FileAccess::WRITE); if (file) { file->store_32(len); - file->store_buffer(r.ptr(), len); + file->store_buffer(r, len); file->close(); memdelete(file); } @@ -893,13 +892,13 @@ 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", this, "_image_request_completed", varray(iq.queue_id)); + iq.request->connect_compat("request_completed", this, "_image_request_completed", varray(iq.queue_id)); image_queue[iq.queue_id] = iq; add_child(iq.request); - _image_update(true, false, PoolByteArray(), iq.queue_id); + _image_update(true, false, PackedByteArray(), iq.queue_id); _update_image_queue(); } @@ -992,7 +991,7 @@ HBoxContainer *EditorAssetLibrary::_make_pages(int p_page, int p_page_count, int Button *first = memnew(Button); first->set_text(TTR("First")); if (p_page != 0) { - first->connect("pressed", this, "_search", varray(0)); + first->connect_compat("pressed", this, "_search", varray(0)); } else { first->set_disabled(true); first->set_focus_mode(Control::FOCUS_NONE); @@ -1002,7 +1001,7 @@ HBoxContainer *EditorAssetLibrary::_make_pages(int p_page, int p_page_count, int Button *prev = memnew(Button); prev->set_text(TTR("Previous")); if (p_page > 0) { - prev->connect("pressed", this, "_search", varray(p_page - 1)); + prev->connect_compat("pressed", this, "_search", varray(p_page - 1)); } else { prev->set_disabled(true); prev->set_focus_mode(Control::FOCUS_NONE); @@ -1024,7 +1023,7 @@ HBoxContainer *EditorAssetLibrary::_make_pages(int p_page, int p_page_count, int Button *current = memnew(Button); current->set_text(itos(i + 1)); - current->connect("pressed", this, "_search", varray(i)); + current->connect_compat("pressed", this, "_search", varray(i)); hbc->add_child(current); } @@ -1033,7 +1032,7 @@ HBoxContainer *EditorAssetLibrary::_make_pages(int p_page, int p_page_count, int Button *next = memnew(Button); next->set_text(TTR("Next")); if (p_page < p_page_count - 1) { - next->connect("pressed", this, "_search", varray(p_page + 1)); + next->connect_compat("pressed", this, "_search", varray(p_page + 1)); } else { next->set_disabled(true); next->set_focus_mode(Control::FOCUS_NONE); @@ -1044,7 +1043,7 @@ HBoxContainer *EditorAssetLibrary::_make_pages(int p_page, int p_page_count, int Button *last = memnew(Button); last->set_text(TTR("Last")); if (p_page != p_page_count - 1) { - last->connect("pressed", this, "_search", varray(p_page_count - 1)); + last->connect_compat("pressed", this, "_search", varray(p_page_count - 1)); } else { last->set_disabled(true); last->set_focus_mode(Control::FOCUS_NONE); @@ -1068,14 +1067,14 @@ void EditorAssetLibrary::_api_request(const String &p_request, RequestType p_req request->request(host + "/" + p_request + p_arguments); } -void EditorAssetLibrary::_http_request_completed(int p_status, int p_code, const PoolStringArray &headers, const PoolByteArray &p_data) { +void EditorAssetLibrary::_http_request_completed(int p_status, int p_code, const PackedStringArray &headers, const PackedByteArray &p_data) { String str; { int datalen = p_data.size(); - PoolByteArray::Read r = p_data.read(); - str.parse_utf8((const char *)r.ptr(), datalen); + const uint8_t *r = p_data.ptr(); + str.parse_utf8((const char *)r, datalen); } bool error_abort = true; @@ -1211,7 +1210,16 @@ void EditorAssetLibrary::_http_request_completed(int p_status, int p_code, const library_vb->add_child(asset_bottom_page); if (result.empty()) { - library_error->set_text(vformat(TTR("No results for \"%s\"."), filter->get_text())); + if (filter->get_text() != String()) { + library_error->set_text( + vformat(TTR("No results for \"%s\"."), filter->get_text())); + } else { + // No results, even though the user didn't search for anything specific. + // This is typically because the version number changed recently + // and no assets compatible with the new version have been published yet. + library_error->set_text( + vformat(TTR("No results compatible with %s %s."), String(VERSION_SHORT_NAME).capitalize(), String(VERSION_BRANCH))); + } library_error->show(); } @@ -1230,9 +1238,9 @@ void EditorAssetLibrary::_http_request_completed(int p_status, int p_code, const EditorAssetLibraryItem *item = memnew(EditorAssetLibraryItem); asset_items->add_child(item); item->configure(r["title"], r["asset_id"], category_map[r["category_id"]], r["category_id"], r["author"], r["author_id"], r["cost"]); - item->connect("asset_selected", this, "_select_asset"); - item->connect("author_selected", this, "_select_author"); - item->connect("category_selected", this, "_select_category"); + item->connect_compat("asset_selected", this, "_select_asset"); + item->connect_compat("author_selected", this, "_select_author"); + item->connect_compat("category_selected", this, "_select_category"); if (r.has("icon_url") && r["icon_url"] != "") { _request_image(item->get_instance_id(), r["icon_url"], IMAGE_QUEUE_ICON, 0); @@ -1263,7 +1271,7 @@ void EditorAssetLibrary::_http_request_completed(int p_status, int p_code, const description = memnew(EditorAssetLibraryItemDescription); add_child(description); description->popup_centered_minsize(); - description->connect("confirmed", this, "_install_asset"); + description->connect_compat("confirmed", this, "_install_asset"); description->configure(r["title"], r["asset_id"], category_map[r["category_id"]], r["category_id"], r["author"], r["author_id"], r["cost"], r["version"], r["version_string"], r["description"], r["download_url"], r["browse_url"], r["download_hash"]); @@ -1375,9 +1383,9 @@ EditorAssetLibrary::EditorAssetLibrary(bool p_templates_only) { filter = memnew(LineEdit); search_hb->add_child(filter); filter->set_h_size_flags(SIZE_EXPAND_FILL); - filter->connect("text_entered", this, "_search_text_entered"); + filter->connect_compat("text_entered", this, "_search_text_entered"); search = memnew(Button(TTR("Search"))); - search->connect("pressed", this, "_search"); + search->connect_compat("pressed", this, "_search"); search_hb->add_child(search); if (!p_templates_only) @@ -1386,12 +1394,12 @@ EditorAssetLibrary::EditorAssetLibrary(bool p_templates_only) { Button *open_asset = memnew(Button); open_asset->set_text(TTR("Import...")); search_hb->add_child(open_asset); - open_asset->connect("pressed", this, "_asset_open"); + open_asset->connect_compat("pressed", this, "_asset_open"); Button *plugins = memnew(Button); plugins->set_text(TTR("Plugins...")); search_hb->add_child(plugins); - plugins->connect("pressed", this, "_manage_plugins"); + plugins->connect_compat("pressed", this, "_manage_plugins"); if (p_templates_only) { open_asset->hide(); @@ -1410,7 +1418,7 @@ EditorAssetLibrary::EditorAssetLibrary(bool p_templates_only) { search_hb2->add_child(sort); sort->set_h_size_flags(SIZE_EXPAND_FILL); - sort->connect("item_selected", this, "_rerun_search"); + sort->connect_compat("item_selected", this, "_rerun_search"); search_hb2->add_child(memnew(VSeparator)); @@ -1419,7 +1427,7 @@ EditorAssetLibrary::EditorAssetLibrary(bool p_templates_only) { categories->add_item(TTR("All")); search_hb2->add_child(categories); categories->set_h_size_flags(SIZE_EXPAND_FILL); - categories->connect("item_selected", this, "_rerun_search"); + categories->connect_compat("item_selected", this, "_rerun_search"); search_hb2->add_child(memnew(VSeparator)); @@ -1431,7 +1439,7 @@ EditorAssetLibrary::EditorAssetLibrary(bool p_templates_only) { repository->add_item("localhost"); repository->set_item_metadata(1, "http://127.0.0.1/asset-library/api"); - repository->connect("item_selected", this, "_repository_changed"); + repository->connect_compat("item_selected", this, "_repository_changed"); search_hb2->add_child(repository); repository->set_h_size_flags(SIZE_EXPAND_FILL); @@ -1446,7 +1454,7 @@ EditorAssetLibrary::EditorAssetLibrary(bool p_templates_only) { support->get_popup()->add_check_item(TTR("Testing"), SUPPORT_TESTING); support->get_popup()->set_item_checked(SUPPORT_OFFICIAL, true); support->get_popup()->set_item_checked(SUPPORT_COMMUNITY, true); - support->get_popup()->connect("id_pressed", this, "_support_toggled"); + support->get_popup()->connect_compat("id_pressed", this, "_support_toggled"); ///////// @@ -1502,7 +1510,7 @@ EditorAssetLibrary::EditorAssetLibrary(bool p_templates_only) { request = memnew(HTTPRequest); add_child(request); request->set_use_threads(EDITOR_DEF("asset_library/use_threads", true)); - request->connect("request_completed", this, "_http_request_completed"); + request->connect_compat("request_completed", this, "_http_request_completed"); last_queue_id = 0; @@ -1535,7 +1543,7 @@ EditorAssetLibrary::EditorAssetLibrary(bool p_templates_only) { asset_open->add_filter("*.zip ; " + TTR("Assets ZIP File")); asset_open->set_mode(EditorFileDialog::MODE_OPEN_FILE); add_child(asset_open); - asset_open->connect("file_selected", this, "_asset_file_selected"); + asset_open->connect_compat("file_selected", this, "_asset_file_selected"); asset_installer = NULL; } diff --git a/editor/plugins/asset_library_editor_plugin.h b/editor/plugins/asset_library_editor_plugin.h index e13d8a6149..536a855d03 100644 --- a/editor/plugins/asset_library_editor_plugin.h +++ b/editor/plugins/asset_library_editor_plugin.h @@ -156,7 +156,7 @@ class EditorAssetLibraryItemDownload : public PanelContainer { void _close(); void _install(); void _make_request(); - void _http_download_completed(int p_status, int p_code, const PoolStringArray &headers, const PoolByteArray &p_data); + void _http_download_completed(int p_status, int p_code, const PackedStringArray &headers, const PackedByteArray &p_data); protected: void _notification(int p_what); @@ -250,8 +250,8 @@ class EditorAssetLibrary : public PanelContainer { int last_queue_id; Map<int, ImageQueue> image_queue; - void _image_update(bool use_cache, bool final, const PoolByteArray &p_data, int p_queue_id); - void _image_request_completed(int p_status, int p_code, const PoolStringArray &headers, const PoolByteArray &p_data, int p_queue_id); + void _image_update(bool use_cache, bool final, const PackedByteArray &p_data, int p_queue_id); + void _image_request_completed(int p_status, int p_code, const PackedStringArray &headers, const PackedByteArray &p_data, int p_queue_id); void _request_image(ObjectID p_for, String p_image_url, ImageType p_type, int p_image_index); void _update_image_queue(); @@ -286,8 +286,8 @@ class EditorAssetLibrary : public PanelContainer { void _rerun_search(int p_ignore); void _search_text_entered(const String &p_text = ""); void _api_request(const String &p_request, RequestType p_request_type, const String &p_arguments = ""); - void _http_request_completed(int p_status, int p_code, const PoolStringArray &headers, const PoolByteArray &p_data); - void _http_download_completed(int p_status, int p_code, const PoolStringArray &headers, const PoolByteArray &p_data); + void _http_request_completed(int p_status, int p_code, const PackedStringArray &headers, const PackedByteArray &p_data); + void _http_download_completed(int p_status, int p_code, const PackedStringArray &headers, const PackedByteArray &p_data); void _repository_changed(int p_repository_id); void _support_toggled(int p_support); diff --git a/editor/plugins/audio_stream_editor_plugin.cpp b/editor/plugins/audio_stream_editor_plugin.cpp index 60cb2ff54d..e4a9c38a99 100644 --- a/editor/plugins/audio_stream_editor_plugin.cpp +++ b/editor/plugins/audio_stream_editor_plugin.cpp @@ -39,7 +39,7 @@ void AudioStreamEditor::_notification(int p_what) { if (p_what == NOTIFICATION_READY) { - AudioStreamPreviewGenerator::get_singleton()->connect("preview_updated", this, "_preview_changed"); + AudioStreamPreviewGenerator::get_singleton()->connect_compat("preview_updated", this, "_preview_changed"); } if (p_what == NOTIFICATION_THEME_CHANGED || p_what == NOTIFICATION_ENTER_TREE) { @@ -214,7 +214,7 @@ AudioStreamEditor::AudioStreamEditor() { _dragging = false; _player = memnew(AudioStreamPlayer); - _player->connect("finished", this, "_on_finished"); + _player->connect_compat("finished", this, "_on_finished"); add_child(_player); VBoxContainer *vbox = memnew(VBoxContainer); @@ -223,13 +223,13 @@ AudioStreamEditor::AudioStreamEditor() { _preview = memnew(ColorRect); _preview->set_v_size_flags(SIZE_EXPAND_FILL); - _preview->connect("draw", this, "_draw_preview"); + _preview->connect_compat("draw", this, "_draw_preview"); vbox->add_child(_preview); _indicator = memnew(Control); _indicator->set_anchors_and_margins_preset(PRESET_WIDE); - _indicator->connect("draw", this, "_draw_indicator"); - _indicator->connect("gui_input", this, "_on_input_indicator"); + _indicator->connect_compat("draw", this, "_draw_indicator"); + _indicator->connect_compat("gui_input", this, "_on_input_indicator"); _preview->add_child(_indicator); HBoxContainer *hbox = memnew(HBoxContainer); @@ -239,12 +239,12 @@ AudioStreamEditor::AudioStreamEditor() { _play_button = memnew(ToolButton); hbox->add_child(_play_button); _play_button->set_focus_mode(Control::FOCUS_NONE); - _play_button->connect("pressed", this, "_play"); + _play_button->connect_compat("pressed", this, "_play"); _stop_button = memnew(ToolButton); hbox->add_child(_stop_button); _stop_button->set_focus_mode(Control::FOCUS_NONE); - _stop_button->connect("pressed", this, "_stop"); + _stop_button->connect_compat("pressed", this, "_stop"); _current_label = memnew(Label); _current_label->set_align(Label::ALIGN_RIGHT); diff --git a/editor/plugins/camera_editor_plugin.cpp b/editor/plugins/camera_editor_plugin.cpp index 6f5bc69bd1..0440785eaf 100644 --- a/editor/plugins/camera_editor_plugin.cpp +++ b/editor/plugins/camera_editor_plugin.cpp @@ -81,7 +81,7 @@ CameraEditor::CameraEditor() { preview->set_margin(MARGIN_RIGHT, 0); preview->set_margin(MARGIN_TOP, 0); preview->set_margin(MARGIN_BOTTOM, 10); - preview->connect("pressed", this, "_pressed"); + preview->connect_compat("pressed", this, "_pressed"); } void CameraEditorPlugin::edit(Object *p_object) { diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp index f7a3b50052..f5cc0ccf2a 100644 --- a/editor/plugins/canvas_item_editor_plugin.cpp +++ b/editor/plugins/canvas_item_editor_plugin.cpp @@ -34,12 +34,12 @@ #include "core/os/keyboard.h" #include "core/print_string.h" #include "core/project_settings.h" +#include "editor/debugger/editor_debugger_node.h" #include "editor/editor_node.h" #include "editor/editor_scale.h" #include "editor/editor_settings.h" #include "editor/plugins/animation_player_editor_plugin.h" #include "editor/plugins/script_editor_plugin.h" -#include "editor/script_editor_debugger.h" #include "scene/2d/light_2d.h" #include "scene/2d/particles_2d.h" #include "scene/2d/polygon_2d.h" @@ -3100,7 +3100,7 @@ void CanvasItemEditor::_draw_control_helpers(Control *control) { case DRAG_TOP_LEFT: case DRAG_BOTTOM_LEFT: _draw_margin_at_position(control->get_size().width, parent_transform.xform(Vector2((node_pos_in_parent[0] + node_pos_in_parent[2]) / 2, node_pos_in_parent[3])) + Vector2(0, 5), MARGIN_BOTTOM); - FALLTHROUGH; + [[fallthrough]]; case DRAG_MOVE: start = Vector2(node_pos_in_parent[0], Math::lerp(node_pos_in_parent[1], node_pos_in_parent[3], ratio)); end = start - Vector2(control->get_margin(MARGIN_LEFT), 0); @@ -3115,7 +3115,7 @@ void CanvasItemEditor::_draw_control_helpers(Control *control) { case DRAG_TOP_RIGHT: case DRAG_BOTTOM_RIGHT: _draw_margin_at_position(control->get_size().width, parent_transform.xform(Vector2((node_pos_in_parent[0] + node_pos_in_parent[2]) / 2, node_pos_in_parent[3])) + Vector2(0, 5), MARGIN_BOTTOM); - FALLTHROUGH; + [[fallthrough]]; case DRAG_MOVE: start = Vector2(node_pos_in_parent[2], Math::lerp(node_pos_in_parent[3], node_pos_in_parent[1], ratio)); end = start - Vector2(control->get_margin(MARGIN_RIGHT), 0); @@ -3130,7 +3130,7 @@ void CanvasItemEditor::_draw_control_helpers(Control *control) { case DRAG_TOP_LEFT: case DRAG_TOP_RIGHT: _draw_margin_at_position(control->get_size().height, parent_transform.xform(Vector2(node_pos_in_parent[2], (node_pos_in_parent[1] + node_pos_in_parent[3]) / 2)) + Vector2(5, 0), MARGIN_RIGHT); - FALLTHROUGH; + [[fallthrough]]; case DRAG_MOVE: start = Vector2(Math::lerp(node_pos_in_parent[0], node_pos_in_parent[2], ratio), node_pos_in_parent[1]); end = start - Vector2(0, control->get_margin(MARGIN_TOP)); @@ -3145,7 +3145,7 @@ void CanvasItemEditor::_draw_control_helpers(Control *control) { case DRAG_BOTTOM_LEFT: case DRAG_BOTTOM_RIGHT: _draw_margin_at_position(control->get_size().height, parent_transform.xform(Vector2(node_pos_in_parent[2], (node_pos_in_parent[1] + node_pos_in_parent[3]) / 2) + Vector2(5, 0)), MARGIN_RIGHT); - FALLTHROUGH; + [[fallthrough]]; case DRAG_MOVE: start = Vector2(Math::lerp(node_pos_in_parent[2], node_pos_in_parent[0], ratio), node_pos_in_parent[3]); end = start - Vector2(0, control->get_margin(MARGIN_BOTTOM)); @@ -3891,10 +3891,10 @@ void CanvasItemEditor::_notification(int p_what) { select_sb->set_default_margin(Margin(i), 4); } - AnimationPlayerEditor::singleton->get_track_editor()->connect("visibility_changed", this, "_keying_changed"); + AnimationPlayerEditor::singleton->get_track_editor()->connect_compat("visibility_changed", this, "_keying_changed"); _keying_changed(); - get_tree()->connect("node_added", this, "_tree_changed", varray()); - get_tree()->connect("node_removed", this, "_tree_changed", varray()); + get_tree()->connect_compat("node_added", this, "_tree_changed", varray()); + get_tree()->connect_compat("node_removed", this, "_tree_changed", varray()); } else if (p_what == EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED) { @@ -3902,8 +3902,8 @@ void CanvasItemEditor::_notification(int p_what) { } if (p_what == NOTIFICATION_EXIT_TREE) { - get_tree()->disconnect("node_added", this, "_tree_changed"); - get_tree()->disconnect("node_removed", this, "_tree_changed"); + get_tree()->disconnect_compat("node_added", this, "_tree_changed"); + get_tree()->disconnect_compat("node_removed", this, "_tree_changed"); } if (p_what == NOTIFICATION_ENTER_TREE || p_what == EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED) { @@ -3990,7 +3990,7 @@ void CanvasItemEditor::_notification(int p_what) { if (p_what == NOTIFICATION_VISIBILITY_CHANGED) { if (!is_visible() && override_camera_button->is_pressed()) { - ScriptEditorDebugger *debugger = ScriptEditor::get_singleton()->get_debugger(); + EditorDebuggerNode *debugger = EditorDebuggerNode::get_singleton(); debugger->set_camera_override(ScriptEditorDebugger::OVERRIDE_NONE); override_camera_button->set_pressed(false); @@ -4181,7 +4181,7 @@ void CanvasItemEditor::_popup_warning_temporarily(Control *p_control, const floa Timer *timer; if (!popup_temporarily_timers.has(p_control)) { timer = memnew(Timer); - timer->connect("timeout", this, "_popup_warning_depop", varray(p_control)); + timer->connect_compat("timeout", this, "_popup_warning_depop", varray(p_control)); timer->set_one_shot(true); add_child(timer); @@ -4345,7 +4345,7 @@ void CanvasItemEditor::_button_toggle_grid_snap(bool p_status) { viewport->update(); } void CanvasItemEditor::_button_override_camera(bool p_pressed) { - ScriptEditorDebugger *debugger = ScriptEditor::get_singleton()->get_debugger(); + EditorDebuggerNode *debugger = EditorDebuggerNode::get_singleton(); if (p_pressed) { debugger->set_camera_override(ScriptEditorDebugger::OVERRIDE_2D); @@ -5410,11 +5410,11 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) { editor = p_editor; editor_selection = p_editor->get_editor_selection(); editor_selection->add_editor_plugin(this); - editor_selection->connect("selection_changed", this, "update"); - editor_selection->connect("selection_changed", this, "_selection_changed"); + editor_selection->connect_compat("selection_changed", this, "update"); + editor_selection->connect_compat("selection_changed", this, "_selection_changed"); - editor->call_deferred("connect", "play_pressed", this, "_update_override_camera_button", make_binds(true)); - editor->call_deferred("connect", "stop_pressed", this, "_update_override_camera_button", make_binds(false)); + editor->call_deferred("connect", make_binds("play_pressed", Callable(this, "_update_override_camera_button"), true)); + editor->call_deferred("connect", make_binds("stop_pressed", Callable(this, "_update_override_camera_button"), false)); hb = memnew(HBoxContainer); add_child(hb); @@ -5434,7 +5434,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) { viewport_scrollable->set_clip_contents(true); viewport_scrollable->set_v_size_flags(SIZE_EXPAND_FILL); viewport_scrollable->set_h_size_flags(SIZE_EXPAND_FILL); - viewport_scrollable->connect("draw", this, "_update_scrollbars"); + viewport_scrollable->connect_compat("draw", this, "_update_scrollbars"); ViewportContainer *scene_tree = memnew(ViewportContainer); viewport_scrollable->add_child(scene_tree); @@ -5456,8 +5456,8 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) { viewport->set_anchors_and_margins_preset(Control::PRESET_WIDE); viewport->set_clip_contents(true); viewport->set_focus_mode(FOCUS_ALL); - viewport->connect("draw", this, "_draw_viewport"); - viewport->connect("gui_input", this, "_gui_input_viewport"); + viewport->connect_compat("draw", this, "_draw_viewport"); + viewport->connect_compat("gui_input", this, "_gui_input_viewport"); info_overlay = memnew(VBoxContainer); info_overlay->set_anchors_and_margins_preset(Control::PRESET_BOTTOM_LEFT); @@ -5485,25 +5485,25 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) { h_scroll = memnew(HScrollBar); viewport->add_child(h_scroll); - h_scroll->connect("value_changed", this, "_update_scroll"); + h_scroll->connect_compat("value_changed", this, "_update_scroll"); h_scroll->hide(); v_scroll = memnew(VScrollBar); viewport->add_child(v_scroll); - v_scroll->connect("value_changed", this, "_update_scroll"); + v_scroll->connect_compat("value_changed", this, "_update_scroll"); v_scroll->hide(); viewport->add_child(controls_vb); zoom_minus = memnew(ToolButton); zoom_hb->add_child(zoom_minus); - zoom_minus->connect("pressed", this, "_button_zoom_minus"); + zoom_minus->connect_compat("pressed", this, "_button_zoom_minus"); zoom_minus->set_shortcut(ED_SHORTCUT("canvas_item_editor/zoom_minus", TTR("Zoom Out"), KEY_MASK_CMD | KEY_MINUS)); zoom_minus->set_focus_mode(FOCUS_NONE); zoom_reset = memnew(ToolButton); zoom_hb->add_child(zoom_reset); - zoom_reset->connect("pressed", this, "_button_zoom_reset"); + zoom_reset->connect_compat("pressed", this, "_button_zoom_reset"); zoom_reset->set_shortcut(ED_SHORTCUT("canvas_item_editor/zoom_reset", TTR("Zoom Reset"), KEY_MASK_CMD | KEY_0)); zoom_reset->set_focus_mode(FOCUS_NONE); zoom_reset->set_text_align(Button::TextAlign::ALIGN_CENTER); @@ -5512,7 +5512,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) { zoom_plus = memnew(ToolButton); zoom_hb->add_child(zoom_plus); - zoom_plus->connect("pressed", this, "_button_zoom_plus"); + zoom_plus->connect_compat("pressed", this, "_button_zoom_plus"); zoom_plus->set_shortcut(ED_SHORTCUT("canvas_item_editor/zoom_plus", TTR("Zoom In"), KEY_MASK_CMD | KEY_EQUAL)); // Usually direct access key for PLUS zoom_plus->set_focus_mode(FOCUS_NONE); @@ -5521,7 +5521,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) { select_button = memnew(ToolButton); hb->add_child(select_button); select_button->set_toggle_mode(true); - select_button->connect("pressed", this, "_button_tool_select", make_binds(TOOL_SELECT)); + select_button->connect_compat("pressed", this, "_button_tool_select", make_binds(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_tooltip(keycode_get_string(KEY_MASK_CMD) + TTR("Drag: Rotate") + "\n" + TTR("Alt+Drag: Move") + "\n" + TTR("Press 'v' to Change Pivot, 'Shift+v' to Drag Pivot (while moving).") + "\n" + TTR("Alt+RMB: Depth list selection")); @@ -5531,21 +5531,21 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) { move_button = memnew(ToolButton); hb->add_child(move_button); move_button->set_toggle_mode(true); - move_button->connect("pressed", this, "_button_tool_select", make_binds(TOOL_MOVE)); + move_button->connect_compat("pressed", this, "_button_tool_select", make_binds(TOOL_MOVE)); move_button->set_shortcut(ED_SHORTCUT("canvas_item_editor/move_mode", TTR("Move Mode"), KEY_W)); move_button->set_tooltip(TTR("Move Mode")); rotate_button = memnew(ToolButton); hb->add_child(rotate_button); rotate_button->set_toggle_mode(true); - rotate_button->connect("pressed", this, "_button_tool_select", make_binds(TOOL_ROTATE)); + rotate_button->connect_compat("pressed", this, "_button_tool_select", make_binds(TOOL_ROTATE)); rotate_button->set_shortcut(ED_SHORTCUT("canvas_item_editor/rotate_mode", TTR("Rotate Mode"), KEY_E)); rotate_button->set_tooltip(TTR("Rotate Mode")); scale_button = memnew(ToolButton); hb->add_child(scale_button); scale_button->set_toggle_mode(true); - scale_button->connect("pressed", this, "_button_tool_select", make_binds(TOOL_SCALE)); + scale_button->connect_compat("pressed", this, "_button_tool_select", make_binds(TOOL_SCALE)); scale_button->set_shortcut(ED_SHORTCUT("canvas_item_editor/scale_mode", TTR("Scale Mode"), KEY_S)); scale_button->set_tooltip(TTR("Scale Mode")); @@ -5554,25 +5554,25 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) { list_select_button = memnew(ToolButton); hb->add_child(list_select_button); list_select_button->set_toggle_mode(true); - list_select_button->connect("pressed", this, "_button_tool_select", make_binds(TOOL_LIST_SELECT)); + list_select_button->connect_compat("pressed", this, "_button_tool_select", make_binds(TOOL_LIST_SELECT)); list_select_button->set_tooltip(TTR("Show a list of all objects at the position clicked\n(same as Alt+RMB in select mode).")); pivot_button = memnew(ToolButton); hb->add_child(pivot_button); pivot_button->set_toggle_mode(true); - pivot_button->connect("pressed", this, "_button_tool_select", make_binds(TOOL_EDIT_PIVOT)); + pivot_button->connect_compat("pressed", this, "_button_tool_select", make_binds(TOOL_EDIT_PIVOT)); pivot_button->set_tooltip(TTR("Click to change object's rotation pivot.")); pan_button = memnew(ToolButton); hb->add_child(pan_button); pan_button->set_toggle_mode(true); - pan_button->connect("pressed", this, "_button_tool_select", make_binds(TOOL_PAN)); + pan_button->connect_compat("pressed", this, "_button_tool_select", make_binds(TOOL_PAN)); pan_button->set_tooltip(TTR("Pan Mode")); ruler_button = memnew(ToolButton); hb->add_child(ruler_button); ruler_button->set_toggle_mode(true); - ruler_button->connect("pressed", this, "_button_tool_select", make_binds(TOOL_RULER)); + ruler_button->connect_compat("pressed", this, "_button_tool_select", make_binds(TOOL_RULER)); ruler_button->set_shortcut(ED_SHORTCUT("canvas_item_editor/ruler_mode", TTR("Ruler Mode"), KEY_R)); ruler_button->set_tooltip(TTR("Ruler Mode")); @@ -5581,14 +5581,14 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) { smart_snap_button = memnew(ToolButton); hb->add_child(smart_snap_button); smart_snap_button->set_toggle_mode(true); - smart_snap_button->connect("toggled", this, "_button_toggle_smart_snap"); + smart_snap_button->connect_compat("toggled", this, "_button_toggle_smart_snap"); smart_snap_button->set_tooltip(TTR("Toggle smart snapping.")); smart_snap_button->set_shortcut(ED_SHORTCUT("canvas_item_editor/use_smart_snap", TTR("Use Smart Snap"), KEY_MASK_SHIFT | KEY_S)); grid_snap_button = memnew(ToolButton); hb->add_child(grid_snap_button); grid_snap_button->set_toggle_mode(true); - grid_snap_button->connect("toggled", this, "_button_toggle_grid_snap"); + grid_snap_button->connect_compat("toggled", this, "_button_toggle_grid_snap"); grid_snap_button->set_tooltip(TTR("Toggle grid snapping.")); grid_snap_button->set_shortcut(ED_SHORTCUT("canvas_item_editor/use_grid_snap", TTR("Use Grid Snap"), KEY_MASK_SHIFT | KEY_G)); @@ -5599,7 +5599,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) { snap_config_menu->set_switch_on_hover(true); PopupMenu *p = snap_config_menu->get_popup(); - p->connect("id_pressed", this, "_popup_callback"); + p->connect_compat("id_pressed", this, "_popup_callback"); p->set_hide_on_checkable_item_selection(false); p->add_check_shortcut(ED_SHORTCUT("canvas_item_editor/use_rotation_snap", TTR("Use Rotation Snap")), SNAP_USE_ROTATION); p->add_check_shortcut(ED_SHORTCUT("canvas_item_editor/use_scale_snap", TTR("Use Scale Snap")), SNAP_USE_SCALE); @@ -5613,7 +5613,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) { smartsnap_config_popup = memnew(PopupMenu); p->add_child(smartsnap_config_popup); smartsnap_config_popup->set_name("SmartSnapping"); - smartsnap_config_popup->connect("id_pressed", this, "_popup_callback"); + smartsnap_config_popup->connect_compat("id_pressed", this, "_popup_callback"); smartsnap_config_popup->set_hide_on_checkable_item_selection(false); smartsnap_config_popup->add_check_shortcut(ED_SHORTCUT("canvas_item_editor/snap_node_parent", TTR("Snap to Parent")), SNAP_USE_NODE_PARENT); smartsnap_config_popup->add_check_shortcut(ED_SHORTCUT("canvas_item_editor/snap_node_anchors", TTR("Snap to Node Anchor")), SNAP_USE_NODE_ANCHORS); @@ -5627,22 +5627,22 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) { lock_button = memnew(ToolButton); hb->add_child(lock_button); - lock_button->connect("pressed", this, "_popup_callback", varray(LOCK_SELECTED)); + lock_button->connect_compat("pressed", this, "_popup_callback", varray(LOCK_SELECTED)); lock_button->set_tooltip(TTR("Lock the selected object in place (can't be moved).")); unlock_button = memnew(ToolButton); hb->add_child(unlock_button); - unlock_button->connect("pressed", this, "_popup_callback", varray(UNLOCK_SELECTED)); + unlock_button->connect_compat("pressed", this, "_popup_callback", varray(UNLOCK_SELECTED)); unlock_button->set_tooltip(TTR("Unlock the selected object (can be moved).")); group_button = memnew(ToolButton); hb->add_child(group_button); - group_button->connect("pressed", this, "_popup_callback", varray(GROUP_SELECTED)); + group_button->connect_compat("pressed", this, "_popup_callback", varray(GROUP_SELECTED)); group_button->set_tooltip(TTR("Makes sure the object's children are not selectable.")); ungroup_button = memnew(ToolButton); hb->add_child(ungroup_button); - ungroup_button->connect("pressed", this, "_popup_callback", varray(UNGROUP_SELECTED)); + ungroup_button->connect_compat("pressed", this, "_popup_callback", varray(UNGROUP_SELECTED)); ungroup_button->set_tooltip(TTR("Restores the object's children's ability to be selected.")); hb->add_child(memnew(VSeparator)); @@ -5661,13 +5661,13 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) { p->add_separator(); p->add_shortcut(ED_SHORTCUT("canvas_item_editor/skeleton_make_bones", TTR("Make Custom Bone(s) from Node(s)"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_B), SKELETON_MAKE_BONES); p->add_shortcut(ED_SHORTCUT("canvas_item_editor/skeleton_clear_bones", TTR("Clear Custom Bones")), SKELETON_CLEAR_BONES); - p->connect("id_pressed", this, "_popup_callback"); + p->connect_compat("id_pressed", this, "_popup_callback"); hb->add_child(memnew(VSeparator)); override_camera_button = memnew(ToolButton); hb->add_child(override_camera_button); - override_camera_button->connect("toggled", this, "_button_override_camera"); + override_camera_button->connect_compat("toggled", this, "_button_override_camera"); override_camera_button->set_toggle_mode(true); override_camera_button->set_disabled(true); _update_override_camera_button(false); @@ -5677,7 +5677,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) { view_menu = memnew(MenuButton); view_menu->set_text(TTR("View")); hb->add_child(view_menu); - view_menu->get_popup()->connect("id_pressed", this, "_popup_callback"); + view_menu->get_popup()->connect_compat("id_pressed", this, "_popup_callback"); view_menu->set_switch_on_hover(true); p = view_menu->get_popup(); @@ -5705,18 +5705,18 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) { presets_menu->set_switch_on_hover(true); p = presets_menu->get_popup(); - p->connect("id_pressed", this, "_popup_callback"); + p->connect_compat("id_pressed", this, "_popup_callback"); anchors_popup = memnew(PopupMenu); p->add_child(anchors_popup); anchors_popup->set_name("Anchors"); - anchors_popup->connect("id_pressed", this, "_popup_callback"); + anchors_popup->connect_compat("id_pressed", this, "_popup_callback"); anchor_mode_button = memnew(ToolButton); hb->add_child(anchor_mode_button); anchor_mode_button->set_toggle_mode(true); anchor_mode_button->hide(); - anchor_mode_button->connect("toggled", this, "_button_toggle_anchor_mode"); + anchor_mode_button->connect_compat("toggled", this, "_button_toggle_anchor_mode"); animation_hb = memnew(HBoxContainer); hb->add_child(animation_hb); @@ -5728,7 +5728,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) { key_loc_button->set_flat(true); key_loc_button->set_pressed(true); key_loc_button->set_focus_mode(FOCUS_NONE); - key_loc_button->connect("pressed", this, "_popup_callback", varray(ANIM_INSERT_POS)); + key_loc_button->connect_compat("pressed", this, "_popup_callback", varray(ANIM_INSERT_POS)); key_loc_button->set_tooltip(TTR("Translation mask for inserting keys.")); animation_hb->add_child(key_loc_button); key_rot_button = memnew(Button); @@ -5736,20 +5736,20 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) { key_rot_button->set_flat(true); key_rot_button->set_pressed(true); key_rot_button->set_focus_mode(FOCUS_NONE); - key_rot_button->connect("pressed", this, "_popup_callback", varray(ANIM_INSERT_ROT)); + key_rot_button->connect_compat("pressed", this, "_popup_callback", varray(ANIM_INSERT_ROT)); key_rot_button->set_tooltip(TTR("Rotation mask for inserting keys.")); animation_hb->add_child(key_rot_button); key_scale_button = memnew(Button); key_scale_button->set_toggle_mode(true); key_scale_button->set_flat(true); key_scale_button->set_focus_mode(FOCUS_NONE); - key_scale_button->connect("pressed", this, "_popup_callback", varray(ANIM_INSERT_SCALE)); + key_scale_button->connect_compat("pressed", this, "_popup_callback", varray(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", this, "_popup_callback", varray(ANIM_INSERT_KEY)); + key_insert_button->connect_compat("pressed", this, "_popup_callback", varray(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)); animation_hb->add_child(key_insert_button); @@ -5765,7 +5765,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) { animation_menu = memnew(MenuButton); animation_menu->set_tooltip(TTR("Animation Key and Pose Options")); animation_hb->add_child(animation_menu); - animation_menu->get_popup()->connect("id_pressed", this, "_popup_callback"); + animation_menu->get_popup()->connect_compat("id_pressed", this, "_popup_callback"); animation_menu->set_switch_on_hover(true); p = animation_menu->get_popup(); @@ -5778,7 +5778,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) { p->add_shortcut(ED_SHORTCUT("canvas_item_editor/anim_clear_pose", TTR("Clear Pose"), KEY_MASK_SHIFT | KEY_K), ANIM_CLEAR_POSE); snap_dialog = memnew(SnapDialog); - snap_dialog->connect("confirmed", this, "_snap_changed"); + snap_dialog->connect_compat("confirmed", this, "_snap_changed"); add_child(snap_dialog); select_sb = Ref<StyleBoxTexture>(memnew(StyleBoxTexture)); @@ -5786,8 +5786,8 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) { selection_menu = memnew(PopupMenu); add_child(selection_menu); selection_menu->set_custom_minimum_size(Vector2(100, 0)); - selection_menu->connect("id_pressed", this, "_selection_result_pressed"); - selection_menu->connect("popup_hide", this, "_selection_menu_hide"); + selection_menu->connect_compat("id_pressed", this, "_selection_result_pressed"); + selection_menu->connect_compat("popup_hide", this, "_selection_menu_hide"); multiply_grid_step_shortcut = ED_SHORTCUT("canvas_item_editor/multiply_grid_step", TTR("Multiply grid step by 2"), KEY_KP_MULTIPLY); divide_grid_step_shortcut = ED_SHORTCUT("canvas_item_editor/divide_grid_step", TTR("Divide grid step by 2"), KEY_KP_DIVIDE); @@ -5960,9 +5960,9 @@ void CanvasItemEditorViewport::_create_nodes(Node *parent, Node *child, String & if (parent) { String new_name = parent->validate_child_name(child); - ScriptEditorDebugger *sed = ScriptEditor::get_singleton()->get_debugger(); - editor_data->get_undo_redo().add_do_method(sed, "live_debug_create_node", editor->get_edited_scene()->get_path_to(parent), child->get_class(), new_name); - editor_data->get_undo_redo().add_undo_method(sed, "live_debug_remove_node", NodePath(String(editor->get_edited_scene()->get_path_to(parent)) + "/" + new_name)); + EditorDebuggerNode *ed = EditorDebuggerNode::get_singleton(); + editor_data->get_undo_redo().add_do_method(ed, "live_debug_create_node", editor->get_edited_scene()->get_path_to(parent), child->get_class(), new_name); + editor_data->get_undo_redo().add_undo_method(ed, "live_debug_remove_node", NodePath(String(editor->get_edited_scene()->get_path_to(parent)) + "/" + new_name)); } // handle with different property for texture @@ -5987,7 +5987,7 @@ void CanvasItemEditorViewport::_create_nodes(Node *parent, Node *child, String & if (default_type == "NinePatchRect") { editor_data->get_undo_redo().add_do_property(child, "rect/size", texture_size); } else if (default_type == "Polygon2D") { - PoolVector<Vector2> list; + Vector<Vector2> list; list.push_back(Vector2(0, 0)); list.push_back(Vector2(texture_size.width, 0)); list.push_back(Vector2(texture_size.width, texture_size.height)); @@ -6030,9 +6030,9 @@ bool CanvasItemEditorViewport::_create_instance(Node *parent, String &path, cons editor_data->get_undo_redo().add_undo_method(parent, "remove_child", instanced_scene); String new_name = parent->validate_child_name(instanced_scene); - ScriptEditorDebugger *sed = ScriptEditor::get_singleton()->get_debugger(); - editor_data->get_undo_redo().add_do_method(sed, "live_debug_instance_node", editor->get_edited_scene()->get_path_to(parent), path, new_name); - editor_data->get_undo_redo().add_undo_method(sed, "live_debug_remove_node", NodePath(String(editor->get_edited_scene()->get_path_to(parent)) + "/" + new_name)); + EditorDebuggerNode *ed = EditorDebuggerNode::get_singleton(); + editor_data->get_undo_redo().add_do_method(ed, "live_debug_instance_node", editor->get_edited_scene()->get_path_to(parent), path, new_name); + editor_data->get_undo_redo().add_undo_method(ed, "live_debug_remove_node", NodePath(String(editor->get_edited_scene()->get_path_to(parent)) + "/" + new_name)); CanvasItem *parent_ci = Object::cast_to<CanvasItem>(parent); if (parent_ci) { @@ -6234,11 +6234,11 @@ void CanvasItemEditorViewport::drop_data(const Point2 &p_point, const Variant &p void CanvasItemEditorViewport::_notification(int p_what) { switch (p_what) { case NOTIFICATION_ENTER_TREE: { - connect("mouse_exited", this, "_on_mouse_exit"); + connect_compat("mouse_exited", this, "_on_mouse_exit"); label->add_color_override("font_color", get_color("warning_color", "Editor")); } break; case NOTIFICATION_EXIT_TREE: { - disconnect("mouse_exited", this, "_on_mouse_exit"); + disconnect_compat("mouse_exited", this, "_on_mouse_exit"); } break; default: break; @@ -6276,8 +6276,8 @@ CanvasItemEditorViewport::CanvasItemEditorViewport(EditorNode *p_node, CanvasIte selector = memnew(AcceptDialog); editor->get_gui_base()->add_child(selector); selector->set_title(TTR("Change Default Type")); - selector->connect("confirmed", this, "_on_change_type_confirmed"); - selector->connect("popup_hide", this, "_on_change_type_closed"); + selector->connect_compat("confirmed", this, "_on_change_type_confirmed"); + selector->connect_compat("popup_hide", this, "_on_change_type_closed"); VBoxContainer *vbc = memnew(VBoxContainer); selector->add_child(vbc); @@ -6294,7 +6294,7 @@ CanvasItemEditorViewport::CanvasItemEditorViewport(EditorNode *p_node, CanvasIte CheckBox *check = memnew(CheckBox); btn_group->add_child(check); check->set_text(types[i]); - check->connect("button_down", this, "_on_select_type", varray(check)); + check->connect_compat("button_down", this, "_on_select_type", varray(check)); check->set_button_group(button_group); } diff --git a/editor/plugins/collision_polygon_editor_plugin.cpp b/editor/plugins/collision_polygon_editor_plugin.cpp index 3de67589ee..59bbe031ed 100644 --- a/editor/plugins/collision_polygon_editor_plugin.cpp +++ b/editor/plugins/collision_polygon_editor_plugin.cpp @@ -47,7 +47,7 @@ void Polygon3DEditor::_notification(int p_what) { button_create->set_icon(get_icon("Edit", "EditorIcons")); button_edit->set_icon(get_icon("MovePoint", "EditorIcons")); button_edit->set_pressed(true); - get_tree()->connect("node_removed", this, "_node_removed"); + get_tree()->connect_compat("node_removed", this, "_node_removed"); } break; case NOTIFICATION_PROCESS: { @@ -470,11 +470,11 @@ void Polygon3DEditor::_polygon_draw() { Array a; a.resize(Mesh::ARRAY_MAX); - PoolVector<Vector3> va; + Vector<Vector3> va; { va.resize(poly.size()); - PoolVector<Vector3>::Write w = va.write(); + Vector3 *w = va.ptrw(); for (int i = 0; i < poly.size(); i++) { Vector2 p, p2; @@ -532,12 +532,12 @@ Polygon3DEditor::Polygon3DEditor(EditorNode *p_editor) { add_child(memnew(VSeparator)); button_create = memnew(ToolButton); add_child(button_create); - button_create->connect("pressed", this, "_menu_option", varray(MODE_CREATE)); + button_create->connect_compat("pressed", this, "_menu_option", varray(MODE_CREATE)); button_create->set_toggle_mode(true); button_edit = memnew(ToolButton); add_child(button_edit); - button_edit->connect("pressed", this, "_menu_option", varray(MODE_EDIT)); + button_edit->connect_compat("pressed", this, "_menu_option", varray(MODE_EDIT)); button_edit->set_toggle_mode(true); mode = MODE_EDIT; diff --git a/editor/plugins/cpu_particles_2d_editor_plugin.cpp b/editor/plugins/cpu_particles_2d_editor_plugin.cpp index 655048c271..ad3f01ec37 100644 --- a/editor/plugins/cpu_particles_2d_editor_plugin.cpp +++ b/editor/plugins/cpu_particles_2d_editor_plugin.cpp @@ -118,8 +118,8 @@ void CPUParticles2DEditorPlugin::_generate_emission_mask() { int vpc = 0; { - PoolVector<uint8_t> data = img->get_data(); - PoolVector<uint8_t>::Read r = data.read(); + Vector<uint8_t> data = img->get_data(); + const uint8_t *r = data.ptr(); for (int i = 0; i < s.width; i++) { for (int j = 0; j < s.height; j++) { @@ -198,9 +198,9 @@ void CPUParticles2DEditorPlugin::_generate_emission_mask() { ERR_FAIL_COND_MSG(valid_positions.size() == 0, "No pixels with transparency > 128 in image..."); if (capture_colors) { - PoolColorArray pca; + PackedColorArray pca; pca.resize(vpc); - PoolColorArray::Write pcaw = pca.write(); + Color *pcaw = pca.ptrw(); for (int i = 0; i < vpc; i += 1) { Color color; color.r = valid_colors[i * 4 + 0] / 255.0f; @@ -214,9 +214,9 @@ void CPUParticles2DEditorPlugin::_generate_emission_mask() { if (valid_normals.size()) { particles->set_emission_shape(CPUParticles2D::EMISSION_SHAPE_DIRECTED_POINTS); - PoolVector2Array norms; + PackedVector2Array norms; norms.resize(valid_normals.size()); - PoolVector2Array::Write normsw = norms.write(); + Vector2 *normsw = norms.ptrw(); for (int i = 0; i < valid_normals.size(); i += 1) { normsw[i] = valid_normals[i]; } @@ -226,9 +226,9 @@ void CPUParticles2DEditorPlugin::_generate_emission_mask() { } { - PoolVector2Array points; + PackedVector2Array points; points.resize(valid_positions.size()); - PoolVector2Array::Write pointsw = points.write(); + Vector2 *pointsw = points.ptrw(); for (int i = 0; i < valid_positions.size(); i += 1) { pointsw[i] = valid_positions[i]; } @@ -240,9 +240,9 @@ void CPUParticles2DEditorPlugin::_notification(int p_what) { if (p_what == NOTIFICATION_ENTER_TREE) { - menu->get_popup()->connect("id_pressed", this, "_menu_callback"); + menu->get_popup()->connect_compat("id_pressed", this, "_menu_callback"); menu->set_icon(menu->get_popup()->get_icon("Particles2D", "EditorIcons")); - file->connect("file_selected", this, "_file_selected"); + file->connect_compat("file_selected", this, "_file_selected"); } } @@ -305,7 +305,7 @@ CPUParticles2DEditorPlugin::CPUParticles2DEditorPlugin(EditorNode *p_node) { toolbar->add_child(emission_mask); - emission_mask->connect("confirmed", this, "_generate_emission_mask"); + emission_mask->connect_compat("confirmed", this, "_generate_emission_mask"); } CPUParticles2DEditorPlugin::~CPUParticles2DEditorPlugin() { diff --git a/editor/plugins/cpu_particles_editor_plugin.cpp b/editor/plugins/cpu_particles_editor_plugin.cpp index 2074ba6b99..3d438226d2 100644 --- a/editor/plugins/cpu_particles_editor_plugin.cpp +++ b/editor/plugins/cpu_particles_editor_plugin.cpp @@ -51,12 +51,6 @@ void CPUParticlesEditor::_menu_option(int p_option) { switch (p_option) { - case MENU_OPTION_CREATE_EMISSION_VOLUME_FROM_MESH: { - - emission_file_dialog->popup_centered_ratio(); - - } break; - case MENU_OPTION_CREATE_EMISSION_VOLUME_FROM_NODE: { emission_tree_dialog->popup_centered_ratio(); @@ -80,8 +74,8 @@ void CPUParticlesEditor::edit(CPUParticles *p_particles) { void CPUParticlesEditor::_generate_emission_points() { /// hacer codigo aca - PoolVector<Vector3> points; - PoolVector<Vector3> normals; + Vector<Vector3> points; + Vector<Vector3> normals; if (!_generate(points, normals)) { return; @@ -112,11 +106,10 @@ CPUParticlesEditor::CPUParticlesEditor() { particles_editor_hb->hide(); options->set_text(TTR("CPUParticles")); - options->get_popup()->add_item(TTR("Create Emission Points From Mesh"), MENU_OPTION_CREATE_EMISSION_VOLUME_FROM_MESH); options->get_popup()->add_item(TTR("Create Emission Points From Node"), MENU_OPTION_CREATE_EMISSION_VOLUME_FROM_NODE); options->get_popup()->add_separator(); options->get_popup()->add_item(TTR("Restart"), MENU_OPTION_RESTART); - options->get_popup()->connect("id_pressed", this, "_menu_option"); + options->get_popup()->connect_compat("id_pressed", this, "_menu_option"); } void CPUParticlesEditorPlugin::edit(Object *p_object) { diff --git a/editor/plugins/cpu_particles_editor_plugin.h b/editor/plugins/cpu_particles_editor_plugin.h index deaced9ad9..4cf143fc0c 100644 --- a/editor/plugins/cpu_particles_editor_plugin.h +++ b/editor/plugins/cpu_particles_editor_plugin.h @@ -41,7 +41,6 @@ class CPUParticlesEditor : public ParticlesEditorBase { enum Menu { MENU_OPTION_CREATE_EMISSION_VOLUME_FROM_NODE, - MENU_OPTION_CREATE_EMISSION_VOLUME_FROM_MESH, MENU_OPTION_CLEAR_EMISSION_VOLUME, MENU_OPTION_RESTART diff --git a/editor/plugins/curve_editor_plugin.cpp b/editor/plugins/curve_editor_plugin.cpp index 0af983f780..5f4fb19d9e 100644 --- a/editor/plugins/curve_editor_plugin.cpp +++ b/editor/plugins/curve_editor_plugin.cpp @@ -49,7 +49,7 @@ CurveEditor::CurveEditor() { set_clip_contents(true); _context_menu = memnew(PopupMenu); - _context_menu->connect("id_pressed", this, "_on_context_menu_item_selected"); + _context_menu->connect_compat("id_pressed", this, "_on_context_menu_item_selected"); add_child(_context_menu); _presets_menu = memnew(PopupMenu); @@ -60,7 +60,7 @@ CurveEditor::CurveEditor() { _presets_menu->add_item(TTR("Ease In"), PRESET_EASE_IN); _presets_menu->add_item(TTR("Ease Out"), PRESET_EASE_OUT); _presets_menu->add_item(TTR("Smoothstep"), PRESET_SMOOTHSTEP); - _presets_menu->connect("id_pressed", this, "_on_preset_item_selected"); + _presets_menu->connect_compat("id_pressed", this, "_on_preset_item_selected"); _context_menu->add_child(_presets_menu); } @@ -70,15 +70,15 @@ void CurveEditor::set_curve(Ref<Curve> curve) { return; if (_curve_ref.is_valid()) { - _curve_ref->disconnect(CoreStringNames::get_singleton()->changed, this, "_curve_changed"); - _curve_ref->disconnect(Curve::SIGNAL_RANGE_CHANGED, this, "_curve_changed"); + _curve_ref->disconnect_compat(CoreStringNames::get_singleton()->changed, this, "_curve_changed"); + _curve_ref->disconnect_compat(Curve::SIGNAL_RANGE_CHANGED, this, "_curve_changed"); } _curve_ref = curve; if (_curve_ref.is_valid()) { - _curve_ref->connect(CoreStringNames::get_singleton()->changed, this, "_curve_changed"); - _curve_ref->connect(Curve::SIGNAL_RANGE_CHANGED, this, "_curve_changed"); + _curve_ref->connect_compat(CoreStringNames::get_singleton()->changed, this, "_curve_changed"); + _curve_ref->connect_compat(Curve::SIGNAL_RANGE_CHANGED, this, "_curve_changed"); } _selected_point = -1; @@ -802,8 +802,6 @@ Ref<Texture2D> CurvePreviewGenerator::generate(const Ref<Resource> &p_from, cons im.create(thumbnail_size, thumbnail_size / 2, 0, Image::FORMAT_RGBA8); - im.lock(); - Color bg_color(0.1, 0.1, 0.1, 1.0); for (int i = 0; i < thumbnail_size; i++) { for (int j = 0; j < thumbnail_size / 2; j++) { @@ -844,8 +842,6 @@ Ref<Texture2D> CurvePreviewGenerator::generate(const Ref<Resource> &p_from, cons prev_y = y; } - im.unlock(); - Ref<ImageTexture> ptex = Ref<ImageTexture>(memnew(ImageTexture)); ptex->create_from_image(img_ref); diff --git a/drivers/dummy/audio_driver_dummy.h b/editor/plugins/debugger_editor_plugin.cpp index 6e39df9e2f..2534a2cc17 100644 --- a/drivers/dummy/audio_driver_dummy.h +++ b/editor/plugins/debugger_editor_plugin.cpp @@ -1,5 +1,5 @@ /*************************************************************************/ -/* audio_driver_dummy.h */ +/* debugger_editor_plugin.cpp */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ @@ -28,31 +28,24 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -#ifndef AUDIO_DRIVER_DUMMY_H -#define AUDIO_DRIVER_DUMMY_H +#include "debugger_editor_plugin.h" -#include "core/os/mutex.h" -#include "core/os/thread.h" -#include "servers/audio_server.h" +#include "core/os/keyboard.h" +#include "editor/debugger/editor_debugger_node.h" -class AudioDriverDummy : public AudioDriver { -public: - const char *get_name() const { - return "Dummy"; - }; +DebuggerEditorPlugin::DebuggerEditorPlugin(EditorNode *p_editor) { + ED_SHORTCUT("debugger/step_into", TTR("Step Into"), KEY_F11); + ED_SHORTCUT("debugger/step_over", TTR("Step Over"), KEY_F10); + ED_SHORTCUT("debugger/break", TTR("Break")); + ED_SHORTCUT("debugger/continue", TTR("Continue"), KEY_F12); + ED_SHORTCUT("debugger/keep_debugger_open", TTR("Keep Debugger Open")); + ED_SHORTCUT("debugger/debug_with_external_editor", TTR("Debug with External Editor")); - virtual Error init() { return OK; } - virtual void start(){}; - virtual int get_mix_rate() const { return DEFAULT_MIX_RATE; }; - virtual SpeakerMode get_speaker_mode() const { return SPEAKER_MODE_STEREO; }; - virtual void lock(){}; - virtual void unlock(){}; - virtual void finish(){}; + EditorDebuggerNode *debugger = memnew(EditorDebuggerNode); + Button *db = EditorNode::get_singleton()->add_bottom_panel_item(TTR("Debugger"), debugger); + debugger->set_tool_button(db); +} - virtual float get_latency() { return 0; }; - - AudioDriverDummy(){}; - ~AudioDriverDummy(){}; -}; - -#endif // AUDIO_DRIVER_DUMMY_H +DebuggerEditorPlugin::~DebuggerEditorPlugin() { + // Should delete debugger? +} diff --git a/platform/uwp/power_uwp.h b/editor/plugins/debugger_editor_plugin.h index 5e28cf65e5..05d6ece72d 100644 --- a/platform/uwp/power_uwp.h +++ b/editor/plugins/debugger_editor_plugin.h @@ -1,5 +1,5 @@ /*************************************************************************/ -/* power_uwp.h */ +/* debugger_editor_plugin.h */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ @@ -28,29 +28,23 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -#ifndef POWER_UWP_H -#define POWER_UWP_H +#ifndef DEBUGGER_EDITOR_PLUGIN_H +#define DEBUGGER_EDITOR_PLUGIN_H -#include "core/os/dir_access.h" -#include "core/os/file_access.h" -#include "core/os/os.h" +#include "editor/debugger/editor_debugger_node.h" +#include "editor/editor_node.h" +#include "editor/editor_plugin.h" -class PowerUWP { +class DebuggerEditorPlugin : public EditorPlugin { -private: - int nsecs_left; - int percent_left; - OS::PowerState power_state; - - bool UpdatePowerInfo(); + GDCLASS(DebuggerEditorPlugin, EditorPlugin); public: - PowerUWP(); - virtual ~PowerUWP(); + virtual String get_name() const { return "Debugger"; } + bool has_main_screen() const { return false; } - OS::PowerState get_power_state(); - int get_power_seconds_left(); - int get_power_percent_left(); + DebuggerEditorPlugin(EditorNode *p_node); + ~DebuggerEditorPlugin(); }; -#endif // POWER_UWP_H +#endif // DEBUGGER_EDITOR_PLUGIN_H diff --git a/editor/plugins/editor_preview_plugins.cpp b/editor/plugins/editor_preview_plugins.cpp index 6e8aef0aea..3c173ab783 100644 --- a/editor/plugins/editor_preview_plugins.cpp +++ b/editor/plugins/editor_preview_plugins.cpp @@ -47,8 +47,6 @@ void post_process_preview(Ref<Image> p_image) { if (p_image->get_format() != Image::FORMAT_RGBA8) p_image->convert(Image::FORMAT_RGBA8); - p_image->lock(); - const int w = p_image->get_width(); const int h = p_image->get_height(); @@ -70,8 +68,6 @@ void post_process_preview(Ref<Image> p_image) { } } } - - p_image->unlock(); } bool EditorTexturePreviewPlugin::handles(const String &p_type) const { @@ -207,19 +203,19 @@ Ref<Texture2D> EditorBitmapPreviewPlugin::generate(const RES &p_from, const Size return Ref<Texture2D>(); } - PoolVector<uint8_t> data; + Vector<uint8_t> data; data.resize(bm->get_size().width * bm->get_size().height); { - PoolVector<uint8_t>::Write w = data.write(); + uint8_t *w = data.ptrw(); for (int i = 0; i < bm->get_size().width; i++) { for (int j = 0; j < bm->get_size().height; j++) { if (bm->get_bit(Point2i(i, j))) { - w[j * bm->get_size().width + i] = 255; + w[j * (int)bm->get_size().width + i] = 255; } else { - w[j * bm->get_size().width + i] = 0; + w[j * (int)bm->get_size().width + i] = 0; } } } @@ -396,10 +392,10 @@ EditorMaterialPreviewPlugin::EditorMaterialPreviewPlugin() { int lons = 32; float radius = 1.0; - PoolVector<Vector3> vertices; - PoolVector<Vector3> normals; - PoolVector<Vector2> uvs; - PoolVector<float> tangents; + Vector<Vector3> vertices; + Vector<Vector3> normals; + Vector<Vector2> uvs; + Vector<float> tangents; Basis tt = Basis(Vector3(0, 1, 0), Math_PI * 0.5); for (int i = 1; i <= lats; i++) { @@ -522,8 +518,6 @@ Ref<Texture2D> EditorScriptPreviewPlugin::generate(const RES &p_from, const Size Color text_color = EditorSettings::get_singleton()->get("text_editor/highlighting/text_color"); Color symbol_color = EditorSettings::get_singleton()->get("text_editor/highlighting/symbol_color"); - img->lock(); - if (bg_color.a == 0) bg_color = Color(0, 0, 0, 0); bg_color.a = MAX(bg_color.a, 0.2); // some background @@ -593,8 +587,6 @@ Ref<Texture2D> EditorScriptPreviewPlugin::generate(const RES &p_from, const Size col++; } - img->unlock(); - post_process_preview(img); Ref<ImageTexture> ptex = Ref<ImageTexture>(memnew(ImageTexture)); @@ -617,14 +609,14 @@ Ref<Texture2D> EditorAudioStreamPreviewPlugin::generate(const RES &p_from, const Ref<AudioStream> stream = p_from; ERR_FAIL_COND_V(stream.is_null(), Ref<Texture2D>()); - PoolVector<uint8_t> img; + Vector<uint8_t> img; int w = p_size.x; int h = p_size.y; img.resize(w * h * 3); - PoolVector<uint8_t>::Write imgdata = img.write(); - uint8_t *imgw = imgdata.ptr(); + uint8_t *imgdata = img.ptrw(); + uint8_t *imgw = imgdata; Ref<AudioStreamPlayback> playback = stream->instance_playback(); ERR_FAIL_COND_V(playback.is_null(), Ref<Texture2D>()); @@ -680,7 +672,6 @@ Ref<Texture2D> EditorAudioStreamPreviewPlugin::generate(const RES &p_from, const } } - imgdata.release(); //post_process_preview(img); Ref<ImageTexture> ptex = Ref<ImageTexture>(memnew(ImageTexture)); diff --git a/editor/plugins/gi_probe_editor_plugin.cpp b/editor/plugins/gi_probe_editor_plugin.cpp index fe2c0d33b7..9231d38a02 100644 --- a/editor/plugins/gi_probe_editor_plugin.cpp +++ b/editor/plugins/gi_probe_editor_plugin.cpp @@ -147,7 +147,7 @@ GIProbeEditorPlugin::GIProbeEditorPlugin(EditorNode *p_node) { bake = memnew(ToolButton); bake->set_icon(editor->get_gui_base()->get_icon("Bake", "EditorIcons")); bake->set_text(TTR("Bake GI Probe")); - bake->connect("pressed", this, "_bake"); + bake->connect_compat("pressed", this, "_bake"); bake_hb->add_child(bake); bake_info = memnew(Label); bake_info->set_h_size_flags(Control::SIZE_EXPAND_FILL); @@ -159,7 +159,7 @@ GIProbeEditorPlugin::GIProbeEditorPlugin(EditorNode *p_node) { probe_file = memnew(EditorFileDialog); probe_file->set_mode(EditorFileDialog::MODE_SAVE_FILE); probe_file->add_filter("*.res"); - probe_file->connect("file_selected", this, "_giprobe_save_path_and_bake"); + probe_file->connect_compat("file_selected", this, "_giprobe_save_path_and_bake"); get_editor_interface()->get_base_control()->add_child(probe_file); probe_file->set_title(TTR("Select path for GIProbe Data File")); diff --git a/editor/plugins/gradient_editor_plugin.cpp b/editor/plugins/gradient_editor_plugin.cpp index 0a3a994eb7..b36782ee14 100644 --- a/editor/plugins/gradient_editor_plugin.cpp +++ b/editor/plugins/gradient_editor_plugin.cpp @@ -69,8 +69,8 @@ void GradientEditor::_bind_methods() { void GradientEditor::set_gradient(const Ref<Gradient> &p_gradient) { gradient = p_gradient; - connect("ramp_changed", this, "_ramp_changed"); - gradient->connect("changed", this, "_gradient_changed"); + connect_compat("ramp_changed", this, "_ramp_changed"); + gradient->connect_compat("changed", this, "_gradient_changed"); set_points(gradient->get_points()); } diff --git a/editor/plugins/item_list_editor_plugin.cpp b/editor/plugins/item_list_editor_plugin.cpp index b7dfe97081..b872a2d932 100644 --- a/editor/plugins/item_list_editor_plugin.cpp +++ b/editor/plugins/item_list_editor_plugin.cpp @@ -268,7 +268,7 @@ void ItemListEditor::_notification(int p_notification) { del_button->set_icon(get_icon("Remove", "EditorIcons")); } else if (p_notification == NOTIFICATION_READY) { - get_tree()->connect("node_removed", this, "_node_removed"); + get_tree()->connect_compat("node_removed", this, "_node_removed"); } } @@ -359,7 +359,7 @@ ItemListEditor::ItemListEditor() { toolbar_button = memnew(ToolButton); toolbar_button->set_text(TTR("Items")); add_child(toolbar_button); - toolbar_button->connect("pressed", this, "_edit_items"); + toolbar_button->connect_compat("pressed", this, "_edit_items"); dialog = memnew(AcceptDialog); dialog->set_title(TTR("Item List Editor")); @@ -376,14 +376,14 @@ ItemListEditor::ItemListEditor() { add_button = memnew(Button); add_button->set_text(TTR("Add")); hbc->add_child(add_button); - add_button->connect("pressed", this, "_add_button"); + add_button->connect_compat("pressed", this, "_add_button"); hbc->add_spacer(); del_button = memnew(Button); del_button->set_text(TTR("Delete")); hbc->add_child(del_button); - del_button->connect("pressed", this, "_delete_button"); + del_button->connect_compat("pressed", this, "_delete_button"); property_editor = memnew(EditorInspector); vbc->add_child(property_editor); diff --git a/editor/plugins/material_editor_plugin.cpp b/editor/plugins/material_editor_plugin.cpp index 4e44082853..bca0bde441 100644 --- a/editor/plugins/material_editor_plugin.cpp +++ b/editor/plugins/material_editor_plugin.cpp @@ -171,13 +171,13 @@ MaterialEditor::MaterialEditor() { sphere_switch->set_toggle_mode(true); sphere_switch->set_pressed(true); vb_shape->add_child(sphere_switch); - sphere_switch->connect("pressed", this, "_button_pressed", varray(sphere_switch)); + sphere_switch->connect_compat("pressed", this, "_button_pressed", varray(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", this, "_button_pressed", varray(box_switch)); + box_switch->connect_compat("pressed", this, "_button_pressed", varray(box_switch)); hb->add_spacer(); @@ -187,12 +187,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", this, "_button_pressed", varray(light_1_switch)); + light_1_switch->connect_compat("pressed", this, "_button_pressed", varray(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", this, "_button_pressed", varray(light_2_switch)); + light_2_switch->connect_compat("pressed", this, "_button_pressed", varray(light_2_switch)); first_enter = true; } diff --git a/editor/plugins/mesh_editor_plugin.cpp b/editor/plugins/mesh_editor_plugin.cpp index d06e5b6349..2b25a2328c 100644 --- a/editor/plugins/mesh_editor_plugin.cpp +++ b/editor/plugins/mesh_editor_plugin.cpp @@ -157,12 +157,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", this, "_button_pressed", varray(light_1_switch)); + light_1_switch->connect_compat("pressed", this, "_button_pressed", varray(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", this, "_button_pressed", varray(light_2_switch)); + light_2_switch->connect_compat("pressed", this, "_button_pressed", varray(light_2_switch)); first_enter = true; diff --git a/editor/plugins/mesh_instance_editor_plugin.cpp b/editor/plugins/mesh_instance_editor_plugin.cpp index aaba6406c7..37cf16de58 100644 --- a/editor/plugins/mesh_instance_editor_plugin.cpp +++ b/editor/plugins/mesh_instance_editor_plugin.cpp @@ -327,24 +327,24 @@ void MeshInstanceEditor::_create_uv_lines(int p_layer) { continue; Array a = mesh->surface_get_arrays(i); - PoolVector<Vector2> uv = a[p_layer == 0 ? Mesh::ARRAY_TEX_UV : Mesh::ARRAY_TEX_UV2]; + Vector<Vector2> uv = a[p_layer == 0 ? Mesh::ARRAY_TEX_UV : Mesh::ARRAY_TEX_UV2]; if (uv.size() == 0) { err_dialog->set_text(TTR("Model has no UV in this layer")); err_dialog->popup_centered_minsize(); return; } - PoolVector<Vector2>::Read r = uv.read(); + const Vector2 *r = uv.ptr(); - PoolVector<int> indices = a[Mesh::ARRAY_INDEX]; - PoolVector<int>::Read ri; + Vector<int> indices = a[Mesh::ARRAY_INDEX]; + const int *ri; int ic; bool use_indices; if (indices.size()) { ic = indices.size(); - ri = indices.read(); + ri = indices.ptr(); use_indices = true; } else { ic = uv.size(); @@ -455,7 +455,7 @@ MeshInstanceEditor::MeshInstanceEditor() { options->get_popup()->add_separator(); options->get_popup()->add_item(TTR("Create Trimesh Collision Sibling"), MENU_OPTION_CREATE_TRIMESH_COLLISION_SHAPE); options->get_popup()->set_item_tooltip(options->get_popup()->get_item_count() - 1, TTR("Creates a polygon-based collision shape.\nThis is the most accurate (but slowest) option for collision detection.")); - options->get_popup()->add_item(TTR("Create Single Convex Collision Siblings"), MENU_OPTION_CREATE_SINGLE_CONVEX_COLLISION_SHAPE); + options->get_popup()->add_item(TTR("Create Single Convex Collision Sibling"), MENU_OPTION_CREATE_SINGLE_CONVEX_COLLISION_SHAPE); options->get_popup()->set_item_tooltip(options->get_popup()->get_item_count() - 1, TTR("Creates a single convex collision shape.\nThis is the fastest (but least accurate) option for collision detection.")); options->get_popup()->add_item(TTR("Create Multiple Convex Collision Siblings"), MENU_OPTION_CREATE_MULTIPLE_CONVEX_COLLISION_SHAPES); options->get_popup()->set_item_tooltip(options->get_popup()->get_item_count() - 1, TTR("Creates a polygon-based collision shape.\nThis is a performance middle-ground between the two above options.")); @@ -469,7 +469,7 @@ MeshInstanceEditor::MeshInstanceEditor() { options->get_popup()->add_item(TTR("View UV2"), MENU_OPTION_DEBUG_UV2); options->get_popup()->add_item(TTR("Unwrap UV2 for Lightmap/AO"), MENU_OPTION_CREATE_UV2); - options->get_popup()->connect("id_pressed", this, "_menu_option"); + options->get_popup()->connect_compat("id_pressed", this, "_menu_option"); outline_dialog = memnew(ConfirmationDialog); outline_dialog->set_title(TTR("Create Outline Mesh")); @@ -487,7 +487,7 @@ MeshInstanceEditor::MeshInstanceEditor() { outline_dialog_vbc->add_margin_child(TTR("Outline Size:"), outline_size); add_child(outline_dialog); - outline_dialog->connect("confirmed", this, "_create_outline_mesh"); + outline_dialog->connect_compat("confirmed", this, "_create_outline_mesh"); err_dialog = memnew(AcceptDialog); add_child(err_dialog); @@ -497,7 +497,7 @@ MeshInstanceEditor::MeshInstanceEditor() { add_child(debug_uv_dialog); debug_uv = memnew(Control); debug_uv->set_custom_minimum_size(Size2(600, 600) * EDSCALE); - debug_uv->connect("draw", this, "_debug_uv_draw"); + debug_uv->connect_compat("draw", this, "_debug_uv_draw"); debug_uv_dialog->add_child(debug_uv); } diff --git a/editor/plugins/mesh_library_editor_plugin.cpp b/editor/plugins/mesh_library_editor_plugin.cpp index b77cb6453f..ea8842a56f 100644 --- a/editor/plugins/mesh_library_editor_plugin.cpp +++ b/editor/plugins/mesh_library_editor_plugin.cpp @@ -268,7 +268,7 @@ MeshLibraryEditor::MeshLibraryEditor(EditorNode *p_editor) { file->add_filter("*." + extensions[i] + " ; " + extensions[i].to_upper()); } add_child(file); - file->connect("file_selected", this, "_import_scene_cbk"); + file->connect_compat("file_selected", this, "_import_scene_cbk"); menu = memnew(MenuButton); SpatialEditor::get_singleton()->add_control_to_menu_panel(menu); @@ -281,13 +281,13 @@ MeshLibraryEditor::MeshLibraryEditor(EditorNode *p_editor) { menu->get_popup()->add_item(TTR("Import from Scene"), MENU_OPTION_IMPORT_FROM_SCENE); menu->get_popup()->add_item(TTR("Update from Scene"), MENU_OPTION_UPDATE_FROM_SCENE); menu->get_popup()->set_item_disabled(menu->get_popup()->get_item_index(MENU_OPTION_UPDATE_FROM_SCENE), true); - menu->get_popup()->connect("id_pressed", this, "_menu_cbk"); + menu->get_popup()->connect_compat("id_pressed", this, "_menu_cbk"); menu->hide(); editor = p_editor; cd = memnew(ConfirmationDialog); add_child(cd); - cd->get_ok()->connect("pressed", this, "_menu_confirm"); + cd->get_ok()->connect_compat("pressed", this, "_menu_confirm"); } void MeshLibraryEditorPlugin::edit(Object *p_node) { diff --git a/editor/plugins/multimesh_editor_plugin.cpp b/editor/plugins/multimesh_editor_plugin.cpp index ddd27b5e97..b2ce01b8d8 100644 --- a/editor/plugins/multimesh_editor_plugin.cpp +++ b/editor/plugins/multimesh_editor_plugin.cpp @@ -124,7 +124,7 @@ void MultiMeshEditor::_populate() { Transform geom_xform = node->get_global_transform().affine_inverse() * ss_instance->get_global_transform(); - PoolVector<Face3> geometry = ss_instance->get_faces(VisualInstance::FACES_SOLID); + Vector<Face3> geometry = ss_instance->get_faces(VisualInstance::FACES_SOLID); if (geometry.size() == 0) { @@ -136,7 +136,7 @@ void MultiMeshEditor::_populate() { //make all faces local int gc = geometry.size(); - PoolVector<Face3>::Write w = geometry.write(); + Face3 *w = geometry.ptrw(); for (int i = 0; i < gc; i++) { for (int j = 0; j < 3; j++) { @@ -144,13 +144,11 @@ void MultiMeshEditor::_populate() { } } - w.release(); - - PoolVector<Face3> faces = geometry; + Vector<Face3> faces = geometry; int facecount = faces.size(); ERR_FAIL_COND_MSG(!facecount, "Parent has no solid faces to populate."); - PoolVector<Face3>::Read r = faces.read(); + const Face3 *r = faces.ptr(); float area_accum = 0; Map<float, int> triangle_area_map; @@ -297,7 +295,7 @@ MultiMeshEditor::MultiMeshEditor() { options->set_icon(EditorNode::get_singleton()->get_gui_base()->get_icon("MultiMeshInstance", "EditorIcons")); options->get_popup()->add_item(TTR("Populate Surface")); - options->get_popup()->connect("id_pressed", this, "_menu_option"); + options->get_popup()->connect_compat("id_pressed", this, "_menu_option"); populate_dialog = memnew(ConfirmationDialog); populate_dialog->set_title(TTR("Populate MultiMesh")); @@ -315,7 +313,7 @@ MultiMeshEditor::MultiMeshEditor() { Button *b = memnew(Button); hbc->add_child(b); b->set_text(".."); - b->connect("pressed", this, "_browse", make_binds(false)); + b->connect_compat("pressed", this, "_browse", make_binds(false)); vbc->add_margin_child(TTR("Target Surface:"), hbc); @@ -327,7 +325,7 @@ MultiMeshEditor::MultiMeshEditor() { hbc->add_child(b); b->set_text(".."); vbc->add_margin_child(TTR("Source Mesh:"), hbc); - b->connect("pressed", this, "_browse", make_binds(true)); + b->connect_compat("pressed", this, "_browse", make_binds(true)); populate_axis = memnew(OptionButton); populate_axis->add_item(TTR("X-Axis")); @@ -373,10 +371,10 @@ MultiMeshEditor::MultiMeshEditor() { populate_dialog->get_ok()->set_text(TTR("Populate")); - populate_dialog->get_ok()->connect("pressed", this, "_populate"); + populate_dialog->get_ok()->connect_compat("pressed", this, "_populate"); std = memnew(SceneTreeDialog); populate_dialog->add_child(std); - std->connect("selected", this, "_browsed"); + std->connect_compat("selected", this, "_browsed"); _last_pp_node = NULL; diff --git a/editor/plugins/particles_2d_editor_plugin.cpp b/editor/plugins/particles_2d_editor_plugin.cpp index 3a48673d8e..ab23cb9054 100644 --- a/editor/plugins/particles_2d_editor_plugin.cpp +++ b/editor/plugins/particles_2d_editor_plugin.cpp @@ -191,8 +191,8 @@ void Particles2DEditorPlugin::_generate_emission_mask() { int vpc = 0; { - PoolVector<uint8_t> data = img->get_data(); - PoolVector<uint8_t>::Read r = data.read(); + Vector<uint8_t> data = img->get_data(); + const uint8_t *r = data.ptr(); for (int i = 0; i < s.width; i++) { for (int j = 0; j < s.height; j++) { @@ -270,7 +270,7 @@ void Particles2DEditorPlugin::_generate_emission_mask() { ERR_FAIL_COND_MSG(valid_positions.size() == 0, "No pixels with transparency > 128 in image..."); - PoolVector<uint8_t> texdata; + Vector<uint8_t> texdata; int w = 2048; int h = (vpc / 2048) + 1; @@ -278,8 +278,8 @@ void Particles2DEditorPlugin::_generate_emission_mask() { texdata.resize(w * h * 2 * sizeof(float)); { - PoolVector<uint8_t>::Write tw = texdata.write(); - float *twf = (float *)tw.ptr(); + uint8_t *tw = texdata.ptrw(); + float *twf = (float *)tw; for (int i = 0; i < vpc; i++) { twf[i * 2 + 0] = valid_positions[i].x; @@ -299,11 +299,11 @@ void Particles2DEditorPlugin::_generate_emission_mask() { if (capture_colors) { - PoolVector<uint8_t> colordata; + Vector<uint8_t> colordata; colordata.resize(w * h * 4); //use RG texture { - PoolVector<uint8_t>::Write tw = colordata.write(); + uint8_t *tw = colordata.ptrw(); for (int i = 0; i < vpc * 4; i++) { tw[i] = valid_colors[i]; @@ -321,12 +321,12 @@ void Particles2DEditorPlugin::_generate_emission_mask() { if (valid_normals.size()) { pm->set_emission_shape(ParticlesMaterial::EMISSION_SHAPE_DIRECTED_POINTS); - PoolVector<uint8_t> normdata; + Vector<uint8_t> normdata; normdata.resize(w * h * 2 * sizeof(float)); //use RG texture { - PoolVector<uint8_t>::Write tw = normdata.write(); - float *twf = (float *)tw.ptr(); + uint8_t *tw = normdata.ptrw(); + float *twf = (float *)tw; for (int i = 0; i < vpc; i++) { twf[i * 2 + 0] = valid_normals[i].x; twf[i * 2 + 1] = valid_normals[i].y; @@ -349,9 +349,9 @@ void Particles2DEditorPlugin::_notification(int p_what) { if (p_what == NOTIFICATION_ENTER_TREE) { - menu->get_popup()->connect("id_pressed", this, "_menu_callback"); + menu->get_popup()->connect_compat("id_pressed", this, "_menu_callback"); menu->set_icon(menu->get_popup()->get_icon("Particles2D", "EditorIcons")); - file->connect("file_selected", this, "_file_selected"); + file->connect_compat("file_selected", this, "_file_selected"); } } @@ -416,7 +416,7 @@ Particles2DEditorPlugin::Particles2DEditorPlugin(EditorNode *p_node) { toolbar->add_child(generate_visibility_rect); - generate_visibility_rect->connect("confirmed", this, "_generate_visibility_rect"); + generate_visibility_rect->connect_compat("confirmed", this, "_generate_visibility_rect"); emission_mask = memnew(ConfirmationDialog); emission_mask->set_title(TTR("Load Emission Mask")); @@ -433,7 +433,7 @@ Particles2DEditorPlugin::Particles2DEditorPlugin(EditorNode *p_node) { toolbar->add_child(emission_mask); - emission_mask->connect("confirmed", this, "_generate_emission_mask"); + emission_mask->connect_compat("confirmed", this, "_generate_emission_mask"); } Particles2DEditorPlugin::~Particles2DEditorPlugin() { diff --git a/editor/plugins/particles_editor_plugin.cpp b/editor/plugins/particles_editor_plugin.cpp index cb29e11b9d..7020abc301 100644 --- a/editor/plugins/particles_editor_plugin.cpp +++ b/editor/plugins/particles_editor_plugin.cpp @@ -35,7 +35,7 @@ #include "scene/3d/cpu_particles.h" #include "scene/resources/particles_material.h" -bool ParticlesEditorBase::_generate(PoolVector<Vector3> &points, PoolVector<Vector3> &normals) { +bool ParticlesEditorBase::_generate(Vector<Vector3> &points, Vector<Vector3> &normals) { bool use_normals = emission_fill->get_selected() == 1; @@ -93,7 +93,7 @@ bool ParticlesEditorBase::_generate(PoolVector<Vector3> &points, PoolVector<Vect return false; } - PoolVector<Face3>::Read r = geometry.read(); + const Face3 *r = geometry.ptr(); AABB aabb; @@ -191,7 +191,7 @@ void ParticlesEditorBase::_node_selected(const NodePath &p_path) { Transform geom_xform = base_node->get_global_transform().affine_inverse() * vi->get_global_transform(); int gc = geometry.size(); - PoolVector<Face3>::Write w = geometry.write(); + Face3 *w = geometry.ptrw(); for (int i = 0; i < gc; i++) { for (int j = 0; j < 3; j++) { @@ -199,8 +199,6 @@ void ParticlesEditorBase::_node_selected(const NodePath &p_path) { } } - w.release(); - emission_dialog->popup_centered(Size2(300, 130)); } @@ -231,25 +229,11 @@ ParticlesEditorBase::ParticlesEditorBase() { emd_vb->add_margin_child(TTR("Emission Source: "), emission_fill); emission_dialog->get_ok()->set_text(TTR("Create")); - emission_dialog->connect("confirmed", this, "_generate_emission_points"); + emission_dialog->connect_compat("confirmed", this, "_generate_emission_points"); - emission_file_dialog = memnew(EditorFileDialog); - add_child(emission_file_dialog); - emission_file_dialog->connect("file_selected", this, "_resource_seleted"); emission_tree_dialog = memnew(SceneTreeDialog); add_child(emission_tree_dialog); - emission_tree_dialog->connect("selected", this, "_node_selected"); - - List<String> extensions; - ResourceLoader::get_recognized_extensions_for_type("Mesh", &extensions); - - emission_file_dialog->clear_filters(); - for (int i = 0; i < extensions.size(); i++) { - - emission_file_dialog->add_filter("*." + extensions[i] + " ; " + extensions[i].to_upper()); - } - - emission_file_dialog->set_mode(EditorFileDialog::MODE_OPEN_FILE); + emission_tree_dialog->connect_compat("selected", this, "_node_selected"); } void ParticlesEditor::_node_removed(Node *p_node) { @@ -264,7 +248,7 @@ void ParticlesEditor::_notification(int p_notification) { if (p_notification == NOTIFICATION_ENTER_TREE) { options->set_icon(options->get_popup()->get_icon("Particles", "EditorIcons")); - get_tree()->connect("node_removed", this, "_node_removed"); + get_tree()->connect_compat("node_removed", this, "_node_removed"); } } @@ -281,17 +265,6 @@ void ParticlesEditor::_menu_option(int p_option) { generate_seconds->set_value(trunc(gen_time) + 1.0); generate_aabb->popup_centered_minsize(); } break; - case MENU_OPTION_CREATE_EMISSION_VOLUME_FROM_MESH: { - - Ref<ParticlesMaterial> material = node->get_process_material(); - if (material.is_null()) { - EditorNode::get_singleton()->show_warning(TTR("A processor material of type 'ParticlesMaterial' is required.")); - return; - } - emission_file_dialog->popup_centered_ratio(); - - } break; - case MENU_OPTION_CREATE_EMISSION_VOLUME_FROM_NODE: { Ref<ParticlesMaterial> material = node->get_process_material(); if (material.is_null()) { @@ -379,8 +352,8 @@ void ParticlesEditor::edit(Particles *p_particles) { void ParticlesEditor::_generate_emission_points() { /// hacer codigo aca - PoolVector<Vector3> points; - PoolVector<Vector3> normals; + Vector<Vector3> points; + Vector<Vector3> normals; if (!_generate(points, normals)) { return; @@ -391,14 +364,14 @@ void ParticlesEditor::_generate_emission_points() { int w = 2048; int h = (point_count / 2048) + 1; - PoolVector<uint8_t> point_img; + Vector<uint8_t> point_img; point_img.resize(w * h * 3 * sizeof(float)); { - PoolVector<uint8_t>::Write iw = point_img.write(); - zeromem(iw.ptr(), w * h * 3 * sizeof(float)); - PoolVector<Vector3>::Read r = points.read(); - float *wf = (float *)iw.ptr(); + uint8_t *iw = point_img.ptrw(); + zeromem(iw, w * h * 3 * sizeof(float)); + const Vector3 *r = points.ptr(); + float *wf = (float *)iw; for (int i = 0; i < point_count; i++) { wf[i * 3 + 0] = r[i].x; wf[i * 3 + 1] = r[i].y; @@ -420,14 +393,14 @@ void ParticlesEditor::_generate_emission_points() { material->set_emission_point_count(point_count); material->set_emission_point_texture(tex); - PoolVector<uint8_t> point_img2; + Vector<uint8_t> point_img2; point_img2.resize(w * h * 3 * sizeof(float)); { - PoolVector<uint8_t>::Write iw = point_img2.write(); - zeromem(iw.ptr(), w * h * 3 * sizeof(float)); - PoolVector<Vector3>::Read r = normals.read(); - float *wf = (float *)iw.ptr(); + uint8_t *iw = point_img2.ptrw(); + zeromem(iw, w * h * 3 * sizeof(float)); + const Vector3 *r = normals.ptr(); + float *wf = (float *)iw; for (int i = 0; i < point_count; i++) { wf[i * 3 + 0] = r[i].x; wf[i * 3 + 1] = r[i].y; @@ -469,14 +442,13 @@ ParticlesEditor::ParticlesEditor() { options->set_text(TTR("Particles")); options->get_popup()->add_item(TTR("Generate AABB"), MENU_OPTION_GENERATE_AABB); options->get_popup()->add_separator(); - options->get_popup()->add_item(TTR("Create Emission Points From Mesh"), MENU_OPTION_CREATE_EMISSION_VOLUME_FROM_MESH); options->get_popup()->add_item(TTR("Create Emission Points From Node"), MENU_OPTION_CREATE_EMISSION_VOLUME_FROM_NODE); options->get_popup()->add_separator(); options->get_popup()->add_item(TTR("Convert to CPUParticles"), MENU_OPTION_CONVERT_TO_CPU_PARTICLES); options->get_popup()->add_separator(); options->get_popup()->add_item(TTR("Restart"), MENU_OPTION_RESTART); - options->get_popup()->connect("id_pressed", this, "_menu_option"); + options->get_popup()->connect_compat("id_pressed", this, "_menu_option"); generate_aabb = memnew(ConfirmationDialog); generate_aabb->set_title(TTR("Generate Visibility AABB")); @@ -490,7 +462,7 @@ ParticlesEditor::ParticlesEditor() { add_child(generate_aabb); - generate_aabb->connect("confirmed", this, "_generate_aabb"); + generate_aabb->connect_compat("confirmed", this, "_generate_aabb"); } void ParticlesEditorPlugin::edit(Object *p_object) { diff --git a/editor/plugins/particles_editor_plugin.h b/editor/plugins/particles_editor_plugin.h index 4b20d00670..fb5ce17560 100644 --- a/editor/plugins/particles_editor_plugin.h +++ b/editor/plugins/particles_editor_plugin.h @@ -46,16 +46,15 @@ protected: MenuButton *options; HBoxContainer *particles_editor_hb; - EditorFileDialog *emission_file_dialog; SceneTreeDialog *emission_tree_dialog; ConfirmationDialog *emission_dialog; SpinBox *emission_amount; OptionButton *emission_fill; - PoolVector<Face3> geometry; + Vector<Face3> geometry; - bool _generate(PoolVector<Vector3> &points, PoolVector<Vector3> &normals); + bool _generate(Vector<Vector3> &points, Vector<Vector3> &normals); virtual void _generate_emission_points() = 0; void _node_selected(const NodePath &p_path); @@ -77,7 +76,6 @@ class ParticlesEditor : public ParticlesEditorBase { MENU_OPTION_GENERATE_AABB, MENU_OPTION_CREATE_EMISSION_VOLUME_FROM_NODE, - MENU_OPTION_CREATE_EMISSION_VOLUME_FROM_MESH, MENU_OPTION_CLEAR_EMISSION_VOLUME, MENU_OPTION_CONVERT_TO_CPU_PARTICLES, MENU_OPTION_RESTART, diff --git a/editor/plugins/path_2d_editor_plugin.cpp b/editor/plugins/path_2d_editor_plugin.cpp index 383dada590..e642233c64 100644 --- a/editor/plugins/path_2d_editor_plugin.cpp +++ b/editor/plugins/path_2d_editor_plugin.cpp @@ -441,14 +441,14 @@ void Path2DEditor::edit(Node *p_path2d) { if (p_path2d) { node = Object::cast_to<Path2D>(p_path2d); - if (!node->is_connected("visibility_changed", this, "_node_visibility_changed")) - node->connect("visibility_changed", this, "_node_visibility_changed"); + if (!node->is_connected_compat("visibility_changed", this, "_node_visibility_changed")) + node->connect_compat("visibility_changed", this, "_node_visibility_changed"); } else { // node may have been deleted at this point - if (node && node->is_connected("visibility_changed", this, "_node_visibility_changed")) - node->disconnect("visibility_changed", this, "_node_visibility_changed"); + if (node && node->is_connected_compat("visibility_changed", this, "_node_visibility_changed")) + node->disconnect_compat("visibility_changed", this, "_node_visibility_changed"); node = NULL; } } @@ -555,34 +555,34 @@ Path2DEditor::Path2DEditor(EditorNode *p_editor) { 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_MASK_CMD) + TTR("Click: Add Point") + "\n" + TTR("Left Click: Split Segment (in curve)") + "\n" + TTR("Right Click: Delete Point")); - curve_edit->connect("pressed", this, "_mode_selected", varray(MODE_EDIT)); + curve_edit->connect_compat("pressed", this, "_mode_selected", varray(MODE_EDIT)); base_hb->add_child(curve_edit); curve_edit_curve = memnew(ToolButton); curve_edit_curve->set_icon(EditorNode::get_singleton()->get_gui_base()->get_icon("CurveCurve", "EditorIcons")); 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", this, "_mode_selected", varray(MODE_EDIT_CURVE)); + curve_edit_curve->connect_compat("pressed", this, "_mode_selected", varray(MODE_EDIT_CURVE)); base_hb->add_child(curve_edit_curve); curve_create = memnew(ToolButton); curve_create->set_icon(EditorNode::get_singleton()->get_gui_base()->get_icon("CurveCreate", "EditorIcons")); 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", this, "_mode_selected", varray(MODE_CREATE)); + curve_create->connect_compat("pressed", this, "_mode_selected", varray(MODE_CREATE)); base_hb->add_child(curve_create); curve_del = memnew(ToolButton); curve_del->set_icon(EditorNode::get_singleton()->get_gui_base()->get_icon("CurveDelete", "EditorIcons")); 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", this, "_mode_selected", varray(MODE_DELETE)); + curve_del->connect_compat("pressed", this, "_mode_selected", varray(MODE_DELETE)); base_hb->add_child(curve_del); curve_close = memnew(ToolButton); curve_close->set_icon(EditorNode::get_singleton()->get_gui_base()->get_icon("CurveClose", "EditorIcons")); curve_close->set_focus_mode(Control::FOCUS_NONE); curve_close->set_tooltip(TTR("Close Curve")); - curve_close->connect("pressed", this, "_mode_selected", varray(ACTION_CLOSE)); + curve_close->connect_compat("pressed", this, "_mode_selected", varray(ACTION_CLOSE)); base_hb->add_child(curve_close); PopupMenu *menu; @@ -596,7 +596,7 @@ Path2DEditor::Path2DEditor(EditorNode *p_editor) { menu->set_item_checked(HANDLE_OPTION_ANGLE, mirror_handle_angle); menu->add_check_item(TTR("Mirror Handle Lengths")); menu->set_item_checked(HANDLE_OPTION_LENGTH, mirror_handle_length); - menu->connect("id_pressed", this, "_handle_option_pressed"); + menu->connect_compat("id_pressed", this, "_handle_option_pressed"); base_hb->hide(); diff --git a/editor/plugins/path_editor_plugin.cpp b/editor/plugins/path_editor_plugin.cpp index 92f21d8428..b955bf7f41 100644 --- a/editor/plugins/path_editor_plugin.cpp +++ b/editor/plugins/path_editor_plugin.cpp @@ -229,14 +229,14 @@ void PathSpatialGizmo::redraw() { if (c.is_null()) return; - PoolVector<Vector3> v3a = c->tessellate(); - //PoolVector<Vector3> v3a=c->get_baked_points(); + Vector<Vector3> v3a = c->tessellate(); + //Vector<Vector3> v3a=c->get_baked_points(); int v3s = v3a.size(); if (v3s == 0) return; Vector<Vector3> v3p; - PoolVector<Vector3>::Read r = v3a.read(); + const Vector3 *r = v3a.ptr(); // BUG: the following won't work when v3s, avoid drawing as a temporary workaround. for (int i = 0; i < v3s - 1; i++) { @@ -315,7 +315,7 @@ bool PathEditorPlugin::forward_spatial_gui_input(Camera *p_camera, const Ref<Inp if (mb->is_pressed() && mb->get_button_index() == BUTTON_LEFT && (curve_create->is_pressed() || (curve_edit->is_pressed() && mb->get_control()))) { //click into curve, break it down - PoolVector<Vector3> v3a = c->tessellate(); + Vector<Vector3> v3a = c->tessellate(); int idx = 0; int rc = v3a.size(); int closest_seg = -1; @@ -323,7 +323,7 @@ bool PathEditorPlugin::forward_spatial_gui_input(Camera *p_camera, const Ref<Inp float closest_d = 1e20; if (rc >= 2) { - PoolVector<Vector3>::Read r = v3a.read(); + const Vector3 *r = v3a.ptr(); if (p_camera->unproject_position(gt.xform(c->get_point_position(0))).distance_to(mbpos) < click_dist) return false; //nope, existing @@ -543,10 +543,10 @@ void PathEditorPlugin::_notification(int p_what) { if (p_what == NOTIFICATION_ENTER_TREE) { - curve_create->connect("pressed", this, "_mode_changed", make_binds(0)); - curve_edit->connect("pressed", this, "_mode_changed", make_binds(1)); - curve_del->connect("pressed", this, "_mode_changed", make_binds(2)); - curve_close->connect("pressed", this, "_close_curve"); + curve_create->connect_compat("pressed", this, "_mode_changed", make_binds(0)); + curve_edit->connect_compat("pressed", this, "_mode_changed", make_binds(1)); + curve_del->connect_compat("pressed", this, "_mode_changed", make_binds(2)); + curve_close->connect_compat("pressed", this, "_close_curve"); } } @@ -614,7 +614,7 @@ PathEditorPlugin::PathEditorPlugin(EditorNode *p_node) { menu->set_item_checked(HANDLE_OPTION_ANGLE, mirror_handle_angle); menu->add_check_item(TTR("Mirror Handle Lengths")); menu->set_item_checked(HANDLE_OPTION_LENGTH, mirror_handle_length); - menu->connect("id_pressed", this, "_handle_option_pressed"); + menu->connect_compat("id_pressed", this, "_handle_option_pressed"); curve_edit->set_pressed(true); /* diff --git a/editor/plugins/physical_bone_plugin.cpp b/editor/plugins/physical_bone_plugin.cpp index 28099a927b..4b63d82961 100644 --- a/editor/plugins/physical_bone_plugin.cpp +++ b/editor/plugins/physical_bone_plugin.cpp @@ -64,7 +64,7 @@ PhysicalBoneEditor::PhysicalBoneEditor(EditorNode *p_editor) : button_transform_joint->set_text(TTR("Move Joint")); button_transform_joint->set_icon(SpatialEditor::get_singleton()->get_icon("PhysicalBone", "EditorIcons")); button_transform_joint->set_toggle_mode(true); - button_transform_joint->connect("toggled", this, "_on_toggle_button_transform_joint"); + button_transform_joint->connect_compat("toggled", this, "_on_toggle_button_transform_joint"); hide(); } diff --git a/editor/plugins/polygon_2d_editor_plugin.cpp b/editor/plugins/polygon_2d_editor_plugin.cpp index 14e22625d9..91c0222f6d 100644 --- a/editor/plugins/polygon_2d_editor_plugin.cpp +++ b/editor/plugins/polygon_2d_editor_plugin.cpp @@ -125,12 +125,12 @@ void Polygon2DEditor::_sync_bones() { } else { for (int i = 0; i < skeleton->get_bone_count(); i++) { NodePath path = skeleton->get_path_to(skeleton->get_bone(i)); - PoolVector<float> weights; + Vector<float> weights; int wc = node->get_polygon().size(); for (int j = 0; j < prev_bones.size(); j += 2) { NodePath pvp = prev_bones[j]; - PoolVector<float> pv = prev_bones[j + 1]; + Vector<float> pv = prev_bones[j + 1]; if (pvp == path && pv.size() == wc) { weights = pv; } @@ -138,7 +138,7 @@ void Polygon2DEditor::_sync_bones() { if (weights.size() == 0) { //create them weights.resize(node->get_polygon().size()); - PoolVector<float>::Write w = weights.write(); + float *w = weights.ptrw(); for (int j = 0; j < wc; j++) { w[j] = 0.0; } @@ -192,7 +192,7 @@ void Polygon2DEditor::_update_bone_list() { if (np == selected || bone_scroll_vb->get_child_count() < 2) cb->set_pressed(true); - cb->connect("pressed", this, "_bone_paint_selected", varray(i)); + cb->connect_compat("pressed", this, "_bone_paint_selected", varray(i)); } uv_edit_draw->update(); @@ -293,8 +293,8 @@ void Polygon2DEditor::_menu_option(int p_option) { return; } - PoolVector<Vector2> points = node->get_polygon(); - PoolVector<Vector2> uvs = node->get_uv(); + Vector<Vector2> points = node->get_polygon(); + Vector<Vector2> uvs = node->get_uv(); if (uvs.size() != points.size()) { undo_redo->create_action(TTR("Create UV Map")); undo_redo->add_do_method(node, "set_uv", points); @@ -312,10 +312,10 @@ void Polygon2DEditor::_menu_option(int p_option) { } break; case UVEDIT_POLYGON_TO_UV: { - PoolVector<Vector2> points = node->get_polygon(); + Vector<Vector2> points = node->get_polygon(); if (points.size() == 0) break; - PoolVector<Vector2> uvs = node->get_uv(); + Vector<Vector2> uvs = node->get_uv(); undo_redo->create_action(TTR("Create UV Map")); undo_redo->add_do_method(node, "set_uv", points); undo_redo->add_undo_method(node, "set_uv", uvs); @@ -325,8 +325,8 @@ void Polygon2DEditor::_menu_option(int p_option) { } break; case UVEDIT_UV_TO_POLYGON: { - PoolVector<Vector2> points = node->get_polygon(); - PoolVector<Vector2> uvs = node->get_uv(); + Vector<Vector2> points = node->get_polygon(); + Vector<Vector2> uvs = node->get_uv(); if (uvs.size() == 0) break; @@ -339,11 +339,11 @@ void Polygon2DEditor::_menu_option(int p_option) { } break; case UVEDIT_UV_CLEAR: { - PoolVector<Vector2> uvs = node->get_uv(); + Vector<Vector2> uvs = node->get_uv(); if (uvs.size() == 0) break; undo_redo->create_action(TTR("Create UV Map")); - undo_redo->add_do_method(node, "set_uv", PoolVector<Vector2>()); + undo_redo->add_do_method(node, "set_uv", Vector<Vector2>()); undo_redo->add_undo_method(node, "set_uv", uvs); undo_redo->add_do_method(uv_edit_draw, "update"); undo_redo->add_undo_method(uv_edit_draw, "update"); @@ -567,7 +567,7 @@ void Polygon2DEditor::_uv_input(const Ref<InputEvent> &p_input) { undo_redo->add_do_method(node, "set_vertex_colors", uv_create_colors_prev); undo_redo->add_undo_method(node, "set_vertex_colors", node->get_vertex_colors()); for (int i = 0; i < node->get_bone_count(); i++) { - PoolVector<float> bonew = node->get_bone_weights(i); + Vector<float> bonew = node->get_bone_weights(i); bonew.push_back(0); undo_redo->add_do_method(node, "set_bone_weights", i, bonew); undo_redo->add_undo_method(node, "set_bone_weights", i, node->get_bone_weights(i)); @@ -622,7 +622,7 @@ void Polygon2DEditor::_uv_input(const Ref<InputEvent> &p_input) { undo_redo->add_do_method(node, "set_vertex_colors", uv_create_colors_prev); undo_redo->add_undo_method(node, "set_vertex_colors", node->get_vertex_colors()); for (int i = 0; i < node->get_bone_count(); i++) { - PoolVector<float> bonew = node->get_bone_weights(i); + Vector<float> bonew = node->get_bone_weights(i); bonew.remove(closest); undo_redo->add_do_method(node, "set_bone_weights", i, bonew); undo_redo->add_undo_method(node, "set_bone_weights", i, node->get_bone_weights(i)); @@ -712,7 +712,7 @@ void Polygon2DEditor::_uv_input(const Ref<InputEvent> &p_input) { int erase_index = -1; for (int i = polygons.size() - 1; i >= 0; i--) { - PoolVector<int> points = polygons[i]; + Vector<int> points = polygons[i]; Vector<Vector2> polys; polys.resize(points.size()); for (int j = 0; j < polys.size(); j++) { @@ -832,7 +832,7 @@ void Polygon2DEditor::_uv_input(const Ref<InputEvent> &p_input) { } break; case UV_MODE_EDIT_POINT: { - PoolVector<Vector2> uv_new = points_prev; + Vector<Vector2> uv_new = points_prev; uv_new.set(point_drag_index, uv_new[point_drag_index] + drag); if (uv_edit_mode[0]->is_pressed()) { //edit uv @@ -843,7 +843,7 @@ void Polygon2DEditor::_uv_input(const Ref<InputEvent> &p_input) { } break; case UV_MODE_MOVE: { - PoolVector<Vector2> uv_new = points_prev; + Vector<Vector2> uv_new = points_prev; for (int i = 0; i < uv_new.size(); i++) uv_new.set(i, uv_new[i] + drag); @@ -856,7 +856,7 @@ void Polygon2DEditor::_uv_input(const Ref<InputEvent> &p_input) { case UV_MODE_ROTATE: { Vector2 center; - PoolVector<Vector2> uv_new = points_prev; + Vector<Vector2> uv_new = points_prev; for (int i = 0; i < uv_new.size(); i++) center += points_prev[i]; @@ -879,7 +879,7 @@ void Polygon2DEditor::_uv_input(const Ref<InputEvent> &p_input) { case UV_MODE_SCALE: { Vector2 center; - PoolVector<Vector2> uv_new = points_prev; + Vector<Vector2> uv_new = points_prev; for (int i = 0; i < uv_new.size(); i++) center += points_prev[i]; @@ -914,7 +914,7 @@ void Polygon2DEditor::_uv_input(const Ref<InputEvent> &p_input) { } if (bone_painting) { - PoolVector<float> painted_weights = node->get_bone_weights(bone_painting_bone); + Vector<float> painted_weights = node->get_bone_weights(bone_painting_bone); { int pc = painted_weights.size(); @@ -925,9 +925,9 @@ void Polygon2DEditor::_uv_input(const Ref<InputEvent> &p_input) { amount = -amount; } - PoolVector<float>::Write w = painted_weights.write(); - PoolVector<float>::Read r = prev_weights.read(); - PoolVector<Vector2>::Read rv = points_prev.read(); + float *w = painted_weights.ptrw(); + const float *r = prev_weights.ptr(); + const Vector2 *rv = points_prev.ptr(); for (int i = 0; i < pc; i++) { if (mtx.xform(rv[i]).distance_to(bone_paint_pos) < radius) { @@ -1024,14 +1024,14 @@ void Polygon2DEditor::_uv_draw() { Array polygons = node->get_polygons(); - PoolVector<Vector2> uvs; + Vector<Vector2> uvs; if (uv_edit_mode[0]->is_pressed()) { //edit uv uvs = node->get_uv(); } else { //edit polygon uvs = node->get_polygon(); } - PoolVector<float>::Read weight_r; + const float *weight_r; if (uv_edit_mode[3]->is_pressed()) { int bone_selected = -1; @@ -1045,7 +1045,7 @@ void Polygon2DEditor::_uv_draw() { if (bone_selected != -1 && node->get_bone_weights(bone_selected).size() == uvs.size()) { - weight_r = node->get_bone_weights(bone_selected).read(); + weight_r = node->get_bone_weights(bone_selected).ptr(); } } @@ -1094,7 +1094,7 @@ void Polygon2DEditor::_uv_draw() { for (int i = 0; i < polygons.size(); i++) { - PoolVector<int> points = polygons[i]; + Vector<int> points = polygons[i]; Vector<Vector2> polypoints; for (int j = 0; j < points.size(); j++) { int next = (j + 1) % points.size(); @@ -1116,7 +1116,7 @@ void Polygon2DEditor::_uv_draw() { for (int i = 0; i < uvs.size(); i++) { - if (weight_r.ptr()) { + if (weight_r) { Vector2 draw_pos = mtx.xform(uvs[i]); float weight = weight_r[i]; uv_edit_draw->draw_rect(Rect2(draw_pos - Vector2(2, 2) * EDSCALE, Vector2(5, 5) * EDSCALE), Color(weight, weight, weight, 1.0), Math::round(EDSCALE)); @@ -1273,14 +1273,14 @@ Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) : button_uv = memnew(ToolButton); add_child(button_uv); button_uv->set_tooltip(TTR("Open Polygon 2D UV editor.")); - button_uv->connect("pressed", this, "_menu_option", varray(MODE_EDIT_UV)); + button_uv->connect_compat("pressed", this, "_menu_option", varray(MODE_EDIT_UV)); uv_mode = UV_MODE_EDIT_POINT; uv_edit = memnew(AcceptDialog); add_child(uv_edit); uv_edit->set_title(TTR("Polygon 2D UV Editor")); uv_edit->set_resizable(true); - uv_edit->connect("popup_hide", this, "_uv_edit_popup_hide"); + uv_edit->connect_compat("popup_hide", this, "_uv_edit_popup_hide"); VBoxContainer *uv_main_vb = memnew(VBoxContainer); uv_edit->add_child(uv_main_vb); @@ -1312,10 +1312,10 @@ Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) : 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", this, "_uv_edit_mode_select", varray(0)); - uv_edit_mode[1]->connect("pressed", this, "_uv_edit_mode_select", varray(1)); - uv_edit_mode[2]->connect("pressed", this, "_uv_edit_mode_select", varray(2)); - uv_edit_mode[3]->connect("pressed", this, "_uv_edit_mode_select", varray(3)); + uv_edit_mode[0]->connect_compat("pressed", this, "_uv_edit_mode_select", varray(0)); + uv_edit_mode[1]->connect_compat("pressed", this, "_uv_edit_mode_select", varray(1)); + uv_edit_mode[2]->connect_compat("pressed", this, "_uv_edit_mode_select", varray(2)); + uv_edit_mode[3]->connect_compat("pressed", this, "_uv_edit_mode_select", varray(3)); uv_mode_hb->add_child(memnew(VSeparator)); @@ -1325,7 +1325,7 @@ Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) : uv_button[i] = memnew(ToolButton); uv_button[i]->set_toggle_mode(true); uv_mode_hb->add_child(uv_button[i]); - uv_button[i]->connect("pressed", this, "_uv_mode", varray(i)); + uv_button[i]->connect_compat("pressed", this, "_uv_mode", varray(i)); uv_button[i]->set_focus_mode(FOCUS_NONE); } @@ -1388,7 +1388,7 @@ Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) : uv_menu->get_popup()->add_item(TTR("Clear UV"), UVEDIT_UV_CLEAR); uv_menu->get_popup()->add_separator(); uv_menu->get_popup()->add_item(TTR("Grid Settings"), UVEDIT_GRID_SETTINGS); - uv_menu->get_popup()->connect("id_pressed", this, "_menu_option"); + uv_menu->get_popup()->connect_compat("id_pressed", this, "_menu_option"); uv_mode_hb->add_child(memnew(VSeparator)); @@ -1399,7 +1399,7 @@ Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) : b_snap_enable->set_toggle_mode(true); b_snap_enable->set_pressed(use_snap); b_snap_enable->set_tooltip(TTR("Enable Snap")); - b_snap_enable->connect("toggled", this, "_set_use_snap"); + b_snap_enable->connect_compat("toggled", this, "_set_use_snap"); b_snap_grid = memnew(ToolButton); uv_mode_hb->add_child(b_snap_grid); @@ -1408,7 +1408,7 @@ Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) : b_snap_grid->set_toggle_mode(true); b_snap_grid->set_pressed(snap_show_grid); b_snap_grid->set_tooltip(TTR("Show Grid")); - b_snap_grid->connect("toggled", this, "_set_show_grid"); + b_snap_grid->connect_compat("toggled", this, "_set_show_grid"); grid_settings = memnew(AcceptDialog); grid_settings->set_title(TTR("Configure Grid:")); @@ -1422,7 +1422,7 @@ Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) : sb_off_x->set_step(1); sb_off_x->set_value(snap_offset.x); sb_off_x->set_suffix("px"); - sb_off_x->connect("value_changed", this, "_set_snap_off_x"); + sb_off_x->connect_compat("value_changed", this, "_set_snap_off_x"); grid_settings_vb->add_margin_child(TTR("Grid Offset X:"), sb_off_x); SpinBox *sb_off_y = memnew(SpinBox); @@ -1431,7 +1431,7 @@ Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) : sb_off_y->set_step(1); sb_off_y->set_value(snap_offset.y); sb_off_y->set_suffix("px"); - sb_off_y->connect("value_changed", this, "_set_snap_off_y"); + sb_off_y->connect_compat("value_changed", this, "_set_snap_off_y"); grid_settings_vb->add_margin_child(TTR("Grid Offset Y:"), sb_off_y); SpinBox *sb_step_x = memnew(SpinBox); @@ -1440,7 +1440,7 @@ Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) : sb_step_x->set_step(1); sb_step_x->set_value(snap_step.x); sb_step_x->set_suffix("px"); - sb_step_x->connect("value_changed", this, "_set_snap_step_x"); + sb_step_x->connect_compat("value_changed", this, "_set_snap_step_x"); grid_settings_vb->add_margin_child(TTR("Grid Step X:"), sb_step_x); SpinBox *sb_step_y = memnew(SpinBox); @@ -1449,7 +1449,7 @@ Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) : sb_step_y->set_step(1); sb_step_y->set_value(snap_step.y); sb_step_y->set_suffix("px"); - sb_step_y->connect("value_changed", this, "_set_snap_step_y"); + sb_step_y->connect_compat("value_changed", this, "_set_snap_step_y"); grid_settings_vb->add_margin_child(TTR("Grid Step Y:"), sb_step_y); uv_mode_hb->add_child(memnew(VSeparator)); @@ -1469,16 +1469,16 @@ Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) : uv_zoom->share(uv_zoom_value); uv_zoom_value->set_custom_minimum_size(Size2(50, 0)); uv_mode_hb->add_child(uv_zoom_value); - uv_zoom->connect("value_changed", this, "_uv_scroll_changed"); + uv_zoom->connect_compat("value_changed", this, "_uv_scroll_changed"); uv_vscroll = memnew(VScrollBar); uv_vscroll->set_step(0.001); uv_edit_draw->add_child(uv_vscroll); - uv_vscroll->connect("value_changed", this, "_uv_scroll_changed"); + uv_vscroll->connect_compat("value_changed", this, "_uv_scroll_changed"); uv_hscroll = memnew(HScrollBar); uv_hscroll->set_step(0.001); uv_edit_draw->add_child(uv_hscroll); - uv_hscroll->connect("value_changed", this, "_uv_scroll_changed"); + uv_hscroll->connect_compat("value_changed", this, "_uv_scroll_changed"); bone_scroll_main_vb = memnew(VBoxContainer); bone_scroll_main_vb->hide(); @@ -1486,7 +1486,7 @@ Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) : sync_bones = memnew(Button(TTR("Sync Bones to Polygon"))); bone_scroll_main_vb->add_child(sync_bones); sync_bones->set_h_size_flags(0); - sync_bones->connect("pressed", this, "_sync_bones"); + sync_bones->connect_compat("pressed", this, "_sync_bones"); uv_main_hsc->add_child(bone_scroll_main_vb); bone_scroll = memnew(ScrollContainer); bone_scroll->set_v_scroll(true); @@ -1496,8 +1496,8 @@ Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) : bone_scroll_vb = memnew(VBoxContainer); bone_scroll->add_child(bone_scroll_vb); - uv_edit_draw->connect("draw", this, "_uv_draw"); - uv_edit_draw->connect("gui_input", this, "_uv_input"); + uv_edit_draw->connect_compat("draw", this, "_uv_draw"); + uv_edit_draw->connect_compat("gui_input", this, "_uv_input"); uv_draw_zoom = 1.0; point_drag_index = -1; uv_drag = false; diff --git a/editor/plugins/polygon_2d_editor_plugin.h b/editor/plugins/polygon_2d_editor_plugin.h index 1454a03325..2b00b50e5c 100644 --- a/editor/plugins/polygon_2d_editor_plugin.h +++ b/editor/plugins/polygon_2d_editor_plugin.h @@ -88,7 +88,7 @@ class Polygon2DEditor : public AbstractPolygon2DEditor { Label *bone_paint_radius_label; bool bone_painting; int bone_painting_bone; - PoolVector<float> prev_weights; + Vector<float> prev_weights; Vector2 bone_paint_pos; AcceptDialog *grid_settings; @@ -97,10 +97,10 @@ class Polygon2DEditor : public AbstractPolygon2DEditor { Vector2 uv_draw_ofs; float uv_draw_zoom; - PoolVector<Vector2> points_prev; - PoolVector<Vector2> uv_create_uv_prev; - PoolVector<Vector2> uv_create_poly_prev; - PoolVector<Color> uv_create_colors_prev; + Vector<Vector2> points_prev; + Vector<Vector2> uv_create_uv_prev; + Vector<Vector2> uv_create_poly_prev; + Vector<Color> uv_create_colors_prev; int uv_create_prev_internal_vertices; Array uv_create_bones_prev; Array polygons_prev; diff --git a/editor/plugins/resource_preloader_editor_plugin.cpp b/editor/plugins/resource_preloader_editor_plugin.cpp index fb04f50827..12b8ac9008 100644 --- a/editor/plugins/resource_preloader_editor_plugin.cpp +++ b/editor/plugins/resource_preloader_editor_plugin.cpp @@ -382,7 +382,7 @@ ResourcePreloaderEditor::ResourcePreloaderEditor() { add_child(file); tree = memnew(Tree); - tree->connect("button_pressed", this, "_cell_button_pressed"); + tree->connect_compat("button_pressed", this, "_cell_button_pressed"); tree->set_columns(2); tree->set_column_min_width(0, 2); tree->set_column_min_width(1, 3); @@ -396,10 +396,10 @@ ResourcePreloaderEditor::ResourcePreloaderEditor() { dialog = memnew(AcceptDialog); add_child(dialog); - load->connect("pressed", this, "_load_pressed"); - paste->connect("pressed", this, "_paste_pressed"); - file->connect("files_selected", this, "_files_load_request"); - tree->connect("item_edited", this, "_item_edited"); + load->connect_compat("pressed", this, "_load_pressed"); + paste->connect_compat("pressed", this, "_paste_pressed"); + file->connect_compat("files_selected", this, "_files_load_request"); + tree->connect_compat("item_edited", this, "_item_edited"); loading_scene = false; } diff --git a/editor/plugins/root_motion_editor_plugin.cpp b/editor/plugins/root_motion_editor_plugin.cpp index 1349de5d8e..132ec40dd2 100644 --- a/editor/plugins/root_motion_editor_plugin.cpp +++ b/editor/plugins/root_motion_editor_plugin.cpp @@ -262,24 +262,24 @@ EditorPropertyRootMotion::EditorPropertyRootMotion() { assign->set_flat(true); assign->set_h_size_flags(SIZE_EXPAND_FILL); assign->set_clip_text(true); - assign->connect("pressed", this, "_node_assign"); + assign->connect_compat("pressed", this, "_node_assign"); hbc->add_child(assign); clear = memnew(Button); clear->set_flat(true); - clear->connect("pressed", this, "_node_clear"); + clear->connect_compat("pressed", this, "_node_clear"); hbc->add_child(clear); filter_dialog = memnew(ConfirmationDialog); add_child(filter_dialog); filter_dialog->set_title(TTR("Edit Filtered Tracks:")); - filter_dialog->connect("confirmed", this, "_confirmed"); + filter_dialog->connect_compat("confirmed", this, "_confirmed"); filters = memnew(Tree); filter_dialog->add_child(filters); filters->set_v_size_flags(SIZE_EXPAND_FILL); filters->set_hide_root(true); - filters->connect("item_activated", this, "_confirmed"); + filters->connect_compat("item_activated", this, "_confirmed"); //filters->connect("item_edited", this, "_filter_edited"); } ////////////////////////// diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp index 078c1e9238..127b98c15b 100644 --- a/editor/plugins/script_editor_plugin.cpp +++ b/editor/plugins/script_editor_plugin.cpp @@ -36,6 +36,8 @@ #include "core/os/keyboard.h" #include "core/os/os.h" #include "core/project_settings.h" +#include "editor/debugger/editor_debugger_node.h" +#include "editor/debugger/script_editor_debugger.h" #include "editor/editor_node.h" #include "editor/editor_run_script.h" #include "editor/editor_scale.h" @@ -44,7 +46,6 @@ #include "editor/find_in_files.h" #include "editor/node_dock.h" #include "editor/plugins/shader_editor_plugin.h" -#include "editor/script_editor_debugger.h" #include "scene/main/viewport.h" #include "scene/scene_string_names.h" #include "script_text_editor.h" @@ -62,6 +63,7 @@ void ScriptEditorBase::_bind_methods() { ADD_SIGNAL(MethodInfo("go_to_help", PropertyInfo(Variant::STRING, "what"))); // TODO: This signal is no use for VisualScript. ADD_SIGNAL(MethodInfo("search_in_files_requested", PropertyInfo(Variant::STRING, "text"))); + ADD_SIGNAL(MethodInfo("replace_in_files_requested", PropertyInfo(Variant::STRING, "text"))); } static bool _is_built_in_script(Script *p_script) { @@ -209,16 +211,16 @@ void ScriptEditorQuickOpen::_notification(int p_what) { switch (p_what) { case NOTIFICATION_ENTER_TREE: { - connect("confirmed", this, "_confirmed"); + connect_compat("confirmed", this, "_confirmed"); search_box->set_clear_button_enabled(true); - FALLTHROUGH; + [[fallthrough]]; } case NOTIFICATION_THEME_CHANGED: { search_box->set_right_icon(get_icon("Search", "EditorIcons")); } break; case NOTIFICATION_EXIT_TREE: { - disconnect("confirmed", this, "_confirmed"); + disconnect_compat("confirmed", this, "_confirmed"); } break; } } @@ -238,15 +240,15 @@ ScriptEditorQuickOpen::ScriptEditorQuickOpen() { add_child(vbc); search_box = memnew(LineEdit); vbc->add_margin_child(TTR("Search:"), search_box); - search_box->connect("text_changed", this, "_text_changed"); - search_box->connect("gui_input", this, "_sbox_input"); + search_box->connect_compat("text_changed", this, "_text_changed"); + search_box->connect_compat("gui_input", this, "_sbox_input"); search_options = memnew(Tree); vbc->add_margin_child(TTR("Matches:"), search_options, true); get_ok()->set_text(TTR("Open")); get_ok()->set_disabled(true); register_text_enter(search_box); set_hide_on_ok(false); - search_options->connect("item_activated", this, "_confirmed"); + search_options->connect_compat("item_activated", this, "_confirmed"); search_options->set_hide_root(true); search_options->set_hide_folding(true); search_options->add_constant_override("draw_guides", 1); @@ -260,7 +262,7 @@ ScriptEditor *ScriptEditor::script_editor = NULL; String ScriptEditor::_get_debug_tooltip(const String &p_text, Node *_se) { - String val = debugger->get_var_value(p_text); + String val = EditorDebuggerNode::get_singleton()->get_var_value(p_text); if (val != String()) { return p_text + ": " + val; } else { @@ -275,11 +277,6 @@ void ScriptEditor::_breaked(bool p_breaked, bool p_can_debug) { return; } - debug_menu->get_popup()->set_item_disabled(debug_menu->get_popup()->get_item_index(DEBUG_NEXT), !(p_breaked && p_can_debug)); - debug_menu->get_popup()->set_item_disabled(debug_menu->get_popup()->get_item_index(DEBUG_STEP), !(p_breaked && p_can_debug)); - debug_menu->get_popup()->set_item_disabled(debug_menu->get_popup()->get_item_index(DEBUG_BREAK), p_breaked); - debug_menu->get_popup()->set_item_disabled(debug_menu->get_popup()->get_item_index(DEBUG_CONTINUE), !p_breaked); - for (int i = 0; i < tab_container->get_child_count(); i++) { ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_child(i)); @@ -291,11 +288,6 @@ void ScriptEditor::_breaked(bool p_breaked, bool p_can_debug) { } } -void ScriptEditor::_show_debugger(bool p_show) { - - //debug_menu->get_popup()->set_item_checked( debug_menu->get_popup()->get_item_index(DEBUG_SHOW), p_show); -} - void ScriptEditor::_script_created(Ref<Script> p_script) { editor->push_item(p_script.operator->()); } @@ -842,7 +834,7 @@ void ScriptEditor::_res_saved_callback(const Ref<Resource> &p_res) { void ScriptEditor::_live_auto_reload_running_scripts() { pending_auto_reload = false; - debugger->reload_scripts(); + EditorDebuggerNode::get_singleton()->reload_scripts(); } bool ScriptEditor::_test_script_times_on_disk(RES p_for_script) { @@ -908,7 +900,7 @@ void ScriptEditor::_file_dialog_action(String p_file) { } file->close(); memdelete(file); - FALLTHROUGH; + [[fallthrough]]; } case FILE_OPEN: { @@ -1093,6 +1085,10 @@ void ScriptEditor::_menu_option(int p_option) { _on_find_in_files_requested(""); } break; + case REPLACE_IN_FILES: { + + _on_replace_in_files_requested(""); + } break; case SEARCH_HELP: { help_search_dialog->popup_dialog(); @@ -1118,27 +1114,6 @@ void ScriptEditor::_menu_option(int p_option) { _sort_list_on_update = true; _update_script_names(); } break; - case DEBUG_SHOW: { - if (debugger) { - bool visible = debug_menu->get_popup()->is_item_checked(debug_menu->get_popup()->get_item_index(DEBUG_SHOW)); - debug_menu->get_popup()->set_item_checked(debug_menu->get_popup()->get_item_index(DEBUG_SHOW), !visible); - if (visible) - debugger->hide(); - else - debugger->show(); - } - } break; - case DEBUG_SHOW_KEEP_OPEN: { - bool visible = debug_menu->get_popup()->is_item_checked(debug_menu->get_popup()->get_item_index(DEBUG_SHOW_KEEP_OPEN)); - if (debugger) - debugger->set_hide_on_stop(visible); - debug_menu->get_popup()->set_item_checked(debug_menu->get_popup()->get_item_index(DEBUG_SHOW_KEEP_OPEN), !visible); - } break; - case DEBUG_WITH_EXTERNAL_EDITOR: { - bool debug_with_external_editor = !debug_menu->get_popup()->is_item_checked(debug_menu->get_popup()->get_item_index(DEBUG_WITH_EXTERNAL_EDITOR)); - debugger->set_debug_with_external_editor(debug_with_external_editor); - debug_menu->get_popup()->set_item_checked(debug_menu->get_popup()->get_item_index(DEBUG_WITH_EXTERNAL_EDITOR), debug_with_external_editor); - } break; case TOGGLE_SCRIPTS_PANEL: { if (current) { ScriptTextEditor *editor = Object::cast_to<ScriptTextEditor>(current); @@ -1252,7 +1227,7 @@ void ScriptEditor::_menu_option(int p_option) { } Ref<EditorScript> es = memnew(EditorScript); - es->set_script(scr.get_ref_ptr()); + es->set_script(scr); es->set_editor(EditorNode::get_singleton()); es->_run(); @@ -1289,29 +1264,6 @@ void ScriptEditor::_menu_option(int p_option) { case CLOSE_ALL: { _close_all_tabs(); } break; - case DEBUG_NEXT: { - - if (debugger) - debugger->debug_next(); - } break; - case DEBUG_STEP: { - - if (debugger) - debugger->debug_step(); - - } break; - case DEBUG_BREAK: { - - if (debugger) - debugger->debug_break(); - - } break; - case DEBUG_CONTINUE: { - - if (debugger) - debugger->debug_continue(); - - } break; case WINDOW_MOVE_UP: { if (tab_container->get_current_tab() > 0) { @@ -1434,19 +1386,17 @@ void ScriptEditor::_notification(int p_what) { case NOTIFICATION_ENTER_TREE: { - editor->connect("play_pressed", this, "_editor_play"); - editor->connect("pause_pressed", this, "_editor_pause"); - editor->connect("stop_pressed", this, "_editor_stop"); - editor->connect("script_add_function_request", this, "_add_callback"); - editor->connect("resource_saved", this, "_res_saved_callback"); - script_list->connect("item_selected", this, "_script_selected"); + editor->connect_compat("stop_pressed", this, "_editor_stop"); + editor->connect_compat("script_add_function_request", this, "_add_callback"); + editor->connect_compat("resource_saved", this, "_res_saved_callback"); + script_list->connect_compat("item_selected", this, "_script_selected"); - members_overview->connect("item_selected", this, "_members_overview_selected"); - help_overview->connect("item_selected", this, "_help_overview_selected"); - script_split->connect("dragged", this, "_script_split_dragged"); + members_overview->connect_compat("item_selected", this, "_members_overview_selected"); + help_overview->connect_compat("item_selected", this, "_help_overview_selected"); + script_split->connect_compat("dragged", this, "_script_split_dragged"); - EditorSettings::get_singleton()->connect("settings_changed", this, "_editor_settings_changed"); - FALLTHROUGH; + EditorSettings::get_singleton()->connect_compat("settings_changed", this, "_editor_settings_changed"); + [[fallthrough]]; } case NOTIFICATION_THEME_CHANGED: { @@ -1469,16 +1419,14 @@ void ScriptEditor::_notification(int p_what) { case NOTIFICATION_READY: { - get_tree()->connect("tree_changed", this, "_tree_changed"); - editor->get_inspector_dock()->connect("request_help", this, "_request_help"); - editor->connect("request_help_search", this, "_help_search"); + get_tree()->connect_compat("tree_changed", this, "_tree_changed"); + editor->get_inspector_dock()->connect_compat("request_help", this, "_request_help"); + editor->connect_compat("request_help_search", this, "_help_search"); } break; case NOTIFICATION_EXIT_TREE: { - editor->disconnect("play_pressed", this, "_editor_play"); - editor->disconnect("pause_pressed", this, "_editor_pause"); - editor->disconnect("stop_pressed", this, "_editor_stop"); + editor->disconnect_compat("stop_pressed", this, "_editor_stop"); } break; case MainLoop::NOTIFICATION_WM_FOCUS_IN: { @@ -2057,7 +2005,7 @@ bool ScriptEditor::edit(const RES &p_resource, int p_line, int p_col, bool p_gra return false; } - if ((debugger->get_dump_stack_script() != p_resource || debugger->get_debug_with_external_editor()) && + if ((EditorDebuggerNode::get_singleton()->get_dump_stack_script() != p_resource || EditorDebuggerNode::get_singleton()->get_debug_with_external_editor()) && p_resource->get_path().is_resource_file() && p_resource->get_class_name() != StringName("VisualScript") && bool(EditorSettings::get_singleton()->get("text_editor/external/use_external_editor"))) { @@ -2189,13 +2137,14 @@ bool ScriptEditor::edit(const RES &p_resource, int p_line, int p_col, bool p_gra _sort_list_on_update = true; _update_script_names(); _save_layout(); - se->connect("name_changed", this, "_update_script_names"); - se->connect("edited_script_changed", this, "_script_changed"); - se->connect("request_help", this, "_help_search"); - se->connect("request_open_script_at_line", this, "_goto_script_line"); - se->connect("go_to_help", this, "_help_class_goto"); - se->connect("request_save_history", this, "_save_history"); - se->connect("search_in_files_requested", this, "_on_find_in_files_requested"); + se->connect_compat("name_changed", this, "_update_script_names"); + se->connect_compat("edited_script_changed", this, "_script_changed"); + se->connect_compat("request_help", this, "_help_search"); + se->connect_compat("request_open_script_at_line", this, "_goto_script_line"); + se->connect_compat("go_to_help", this, "_help_class_goto"); + se->connect_compat("request_save_history", this, "_save_history"); + se->connect_compat("search_in_files_requested", this, "_on_find_in_files_requested"); + se->connect_compat("replace_in_files_requested", this, "_on_replace_in_files_requested"); //test for modification, maybe the script was not edited but was loaded @@ -2271,26 +2220,7 @@ void ScriptEditor::open_script_create_dialog(const String &p_base_name, const St script_create_dialog->config(p_base_name, p_base_path); } -void ScriptEditor::_editor_play() { - - debugger->start(); - debug_menu->get_popup()->grab_focus(); - debug_menu->get_popup()->set_item_disabled(debug_menu->get_popup()->get_item_index(DEBUG_NEXT), true); - debug_menu->get_popup()->set_item_disabled(debug_menu->get_popup()->get_item_index(DEBUG_STEP), true); - debug_menu->get_popup()->set_item_disabled(debug_menu->get_popup()->get_item_index(DEBUG_BREAK), false); - debug_menu->get_popup()->set_item_disabled(debug_menu->get_popup()->get_item_index(DEBUG_CONTINUE), true); -} - -void ScriptEditor::_editor_pause() { -} void ScriptEditor::_editor_stop() { - - debugger->stop(); - debug_menu->get_popup()->set_item_disabled(debug_menu->get_popup()->get_item_index(DEBUG_NEXT), true); - debug_menu->get_popup()->set_item_disabled(debug_menu->get_popup()->get_item_index(DEBUG_STEP), true); - debug_menu->get_popup()->set_item_disabled(debug_menu->get_popup()->get_item_index(DEBUG_BREAK), true); - debug_menu->get_popup()->set_item_disabled(debug_menu->get_popup()->get_item_index(DEBUG_CONTINUE), true); - for (int i = 0; i < tab_container->get_child_count(); i++) { ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_child(i)); @@ -2303,7 +2233,7 @@ void ScriptEditor::_editor_stop() { } } -void ScriptEditor::_add_callback(Object *p_obj, const String &p_function, const PoolStringArray &p_args) { +void ScriptEditor::_add_callback(Object *p_obj, const String &p_function, const PackedStringArray &p_args) { ERR_FAIL_COND(!p_obj); Ref<Script> script = p_obj->get_script(); @@ -2807,7 +2737,7 @@ void ScriptEditor::_help_class_open(const String &p_class) { tab_container->add_child(eh); _go_to_tab(tab_container->get_tab_count() - 1); eh->go_to_class(p_class, 0); - eh->connect("go_to_help", this, "_help_class_goto"); + eh->connect_compat("go_to_help", this, "_help_class_goto"); _add_recent_script(p_class); _sort_list_on_update = true; _update_script_names(); @@ -2837,7 +2767,7 @@ void ScriptEditor::_help_class_goto(const String &p_desc) { tab_container->add_child(eh); _go_to_tab(tab_container->get_tab_count() - 1); eh->go_to_help(p_desc); - eh->connect("go_to_help", this, "_help_class_goto"); + eh->connect_compat("go_to_help", this, "_help_class_goto"); _add_recent_script(eh->get_class()); _sort_list_on_update = true; _update_script_names(); @@ -3025,10 +2955,19 @@ void ScriptEditor::_script_changed() { void ScriptEditor::_on_find_in_files_requested(String text) { + find_in_files_dialog->set_find_in_files_mode(FindInFilesDialog::SEARCH_MODE); find_in_files_dialog->set_search_text(text); find_in_files_dialog->popup_centered_minsize(); } +void ScriptEditor::_on_replace_in_files_requested(String text) { + + find_in_files_dialog->set_find_in_files_mode(FindInFilesDialog::REPLACE_MODE); + find_in_files_dialog->set_search_text(text); + find_in_files_dialog->set_replace_text(""); + find_in_files_dialog->popup_centered_minsize(); +} + void ScriptEditor::_on_find_in_files_result_selected(String fpath, int line_number, int begin, int end) { if (ResourceLoader::exists(fpath)) { @@ -3078,12 +3017,13 @@ void ScriptEditor::_start_find_in_files(bool with_replace) { f->set_filter(find_in_files_dialog->get_filter()); find_in_files->set_with_replace(with_replace); + find_in_files->set_replace_text(find_in_files_dialog->get_replace_text()); find_in_files->start_search(); editor->make_bottom_panel_item_visible(find_in_files); } -void ScriptEditor::_on_find_in_files_modified_files(PoolStringArray paths) { +void ScriptEditor::_on_find_in_files_modified_files(PackedStringArray paths) { _test_script_times_on_disk(); _update_modified_scripts_for_external_editor(); @@ -3109,8 +3049,6 @@ void ScriptEditor::_bind_methods() { ClassDB::bind_method("_close_other_tabs", &ScriptEditor::_close_other_tabs); ClassDB::bind_method("_open_recent_script", &ScriptEditor::_open_recent_script); ClassDB::bind_method("_theme_option", &ScriptEditor::_theme_option); - ClassDB::bind_method("_editor_play", &ScriptEditor::_editor_play); - ClassDB::bind_method("_editor_pause", &ScriptEditor::_editor_pause); ClassDB::bind_method("_editor_stop", &ScriptEditor::_editor_stop); ClassDB::bind_method("_add_callback", &ScriptEditor::_add_callback); ClassDB::bind_method("_reload_scripts", &ScriptEditor::_reload_scripts); @@ -3125,7 +3063,6 @@ void ScriptEditor::_bind_methods() { ClassDB::bind_method("_copy_script_path", &ScriptEditor::_copy_script_path); ClassDB::bind_method("_breaked", &ScriptEditor::_breaked); - ClassDB::bind_method("_show_debugger", &ScriptEditor::_show_debugger); ClassDB::bind_method("_get_debug_tooltip", &ScriptEditor::_get_debug_tooltip); ClassDB::bind_method("_autosave_scripts", &ScriptEditor::_autosave_scripts); ClassDB::bind_method("_update_autosave_timer", &ScriptEditor::_update_autosave_timer); @@ -3153,6 +3090,7 @@ void ScriptEditor::_bind_methods() { ClassDB::bind_method("_filter_methods_text_changed", &ScriptEditor::_filter_methods_text_changed); ClassDB::bind_method("_update_recent_scripts", &ScriptEditor::_update_recent_scripts); ClassDB::bind_method("_on_find_in_files_requested", &ScriptEditor::_on_find_in_files_requested); + ClassDB::bind_method("_on_replace_in_files_requested", &ScriptEditor::_on_replace_in_files_requested); ClassDB::bind_method("_start_find_in_files", &ScriptEditor::_start_find_in_files); ClassDB::bind_method("_on_find_in_files_result_selected", &ScriptEditor::_on_find_in_files_result_selected); ClassDB::bind_method("_on_find_in_files_modified_files", &ScriptEditor::_on_find_in_files_modified_files); @@ -3204,22 +3142,22 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) { filter_scripts = memnew(LineEdit); filter_scripts->set_placeholder(TTR("Filter scripts")); filter_scripts->set_clear_button_enabled(true); - filter_scripts->connect("text_changed", this, "_filter_scripts_text_changed"); + filter_scripts->connect_compat("text_changed", this, "_filter_scripts_text_changed"); scripts_vbox->add_child(filter_scripts); script_list = memnew(ItemList); scripts_vbox->add_child(script_list); script_list->set_custom_minimum_size(Size2(150, 60) * EDSCALE); //need to give a bit of limit to avoid it from disappearing script_list->set_v_size_flags(SIZE_EXPAND_FILL); - script_split->set_split_offset(140); + script_split->set_split_offset(70 * EDSCALE); _sort_list_on_update = true; - script_list->connect("gui_input", this, "_script_list_gui_input", varray(), CONNECT_DEFERRED); + script_list->connect_compat("gui_input", this, "_script_list_gui_input", varray(), CONNECT_DEFERRED); script_list->set_allow_rmb_select(true); script_list->set_drag_forwarding(this); context_menu = memnew(PopupMenu); add_child(context_menu); - context_menu->connect("id_pressed", this, "_menu_option"); + context_menu->connect_compat("id_pressed", this, "_menu_option"); context_menu->set_hide_on_window_lose_focus(true); overview_vbox = memnew(VBoxContainer); @@ -3240,14 +3178,14 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) { members_overview_alphabeta_sort_button->set_tooltip(TTR("Toggle alphabetical sorting of the method list.")); members_overview_alphabeta_sort_button->set_toggle_mode(true); members_overview_alphabeta_sort_button->set_pressed(EditorSettings::get_singleton()->get("text_editor/tools/sort_members_outline_alphabetically")); - members_overview_alphabeta_sort_button->connect("toggled", this, "_toggle_members_overview_alpha_sort"); + members_overview_alphabeta_sort_button->connect_compat("toggled", this, "_toggle_members_overview_alpha_sort"); buttons_hbox->add_child(members_overview_alphabeta_sort_button); filter_methods = memnew(LineEdit); filter_methods->set_placeholder(TTR("Filter methods")); filter_methods->set_clear_button_enabled(true); - filter_methods->connect("text_changed", this, "_filter_methods_text_changed"); + filter_methods->connect_compat("text_changed", this, "_filter_methods_text_changed"); overview_vbox->add_child(filter_methods); members_overview = memnew(ItemList); @@ -3291,7 +3229,7 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) { recent_scripts = memnew(PopupMenu); recent_scripts->set_name("RecentScripts"); file_menu->get_popup()->add_child(recent_scripts); - recent_scripts->connect("id_pressed", this, "_open_recent_script"); + recent_scripts->connect_compat("id_pressed", this, "_open_recent_script"); _update_recent_scripts(); file_menu->get_popup()->add_separator(); @@ -3313,7 +3251,7 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) { theme_submenu = memnew(PopupMenu); theme_submenu->set_name("Theme"); file_menu->get_popup()->add_child(theme_submenu); - theme_submenu->connect("id_pressed", this, "_theme_option"); + theme_submenu->connect_compat("id_pressed", this, "_theme_option"); theme_submenu->add_shortcut(ED_SHORTCUT("script_editor/import_theme", TTR("Import Theme...")), THEME_IMPORT); theme_submenu->add_shortcut(ED_SHORTCUT("script_editor/reload_theme", TTR("Reload Theme")), THEME_RELOAD); @@ -3332,35 +3270,25 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) { file_menu->get_popup()->add_separator(); file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/toggle_scripts_panel", TTR("Toggle Scripts Panel"), KEY_MASK_CMD | KEY_BACKSLASH), TOGGLE_SCRIPTS_PANEL); - file_menu->get_popup()->connect("id_pressed", this, "_menu_option"); + file_menu->get_popup()->connect_compat("id_pressed", this, "_menu_option"); script_search_menu = memnew(MenuButton); menu_hb->add_child(script_search_menu); script_search_menu->set_text(TTR("Search")); script_search_menu->set_switch_on_hover(true); script_search_menu->get_popup()->set_hide_on_window_lose_focus(true); - script_search_menu->get_popup()->connect("id_pressed", this, "_menu_option"); + script_search_menu->get_popup()->connect_compat("id_pressed", this, "_menu_option"); - debug_menu = memnew(MenuButton); + MenuButton *debug_menu = memnew(MenuButton); menu_hb->add_child(debug_menu); - debug_menu->set_text(TTR("Debug")); - debug_menu->set_switch_on_hover(true); - debug_menu->get_popup()->set_hide_on_window_lose_focus(true); - debug_menu->get_popup()->add_shortcut(ED_SHORTCUT("debugger/step_into", TTR("Step Into"), KEY_F11), DEBUG_STEP); - debug_menu->get_popup()->add_shortcut(ED_SHORTCUT("debugger/step_over", TTR("Step Over"), KEY_F10), DEBUG_NEXT); - debug_menu->get_popup()->add_separator(); - debug_menu->get_popup()->add_shortcut(ED_SHORTCUT("debugger/break", TTR("Break")), DEBUG_BREAK); - debug_menu->get_popup()->add_shortcut(ED_SHORTCUT("debugger/continue", TTR("Continue"), KEY_F12), DEBUG_CONTINUE); - debug_menu->get_popup()->add_separator(); - //debug_menu->get_popup()->add_check_item("Show Debugger",DEBUG_SHOW); - debug_menu->get_popup()->add_check_shortcut(ED_SHORTCUT("debugger/keep_debugger_open", TTR("Keep Debugger Open")), DEBUG_SHOW_KEEP_OPEN); - debug_menu->get_popup()->add_check_shortcut(ED_SHORTCUT("debugger/debug_with_external_editor", TTR("Debug with External Editor")), DEBUG_WITH_EXTERNAL_EDITOR); - debug_menu->get_popup()->connect("id_pressed", this, "_menu_option"); - - debug_menu->get_popup()->set_item_disabled(debug_menu->get_popup()->get_item_index(DEBUG_NEXT), true); - debug_menu->get_popup()->set_item_disabled(debug_menu->get_popup()->get_item_index(DEBUG_STEP), true); - debug_menu->get_popup()->set_item_disabled(debug_menu->get_popup()->get_item_index(DEBUG_BREAK), true); - debug_menu->get_popup()->set_item_disabled(debug_menu->get_popup()->get_item_index(DEBUG_CONTINUE), true); + debug_menu->hide(); // Handled by EditorDebuggerNode below. + + EditorDebuggerNode *debugger = EditorDebuggerNode::get_singleton(); + debugger->set_script_debug_button(debug_menu); + debugger->connect_compat("goto_script_line", this, "_goto_script_line"); + debugger->connect_compat("set_execution", this, "_set_execution"); + debugger->connect_compat("clear_execution", this, "_clear_execution"); + debugger->connect_compat("breaked", this, "_breaked"); menu_hb->add_spacer(); @@ -3376,64 +3304,58 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) { site_search = memnew(ToolButton); site_search->set_text(TTR("Online Docs")); - site_search->connect("pressed", this, "_menu_option", varray(SEARCH_WEBSITE)); + site_search->connect_compat("pressed", this, "_menu_option", varray(SEARCH_WEBSITE)); menu_hb->add_child(site_search); site_search->set_tooltip(TTR("Open Godot online documentation.")); request_docs = memnew(ToolButton); request_docs->set_text(TTR("Request Docs")); - request_docs->connect("pressed", this, "_menu_option", varray(REQUEST_DOCS)); + request_docs->connect_compat("pressed", this, "_menu_option", varray(REQUEST_DOCS)); menu_hb->add_child(request_docs); request_docs->set_tooltip(TTR("Help improve the Godot documentation by giving feedback.")); help_search = memnew(ToolButton); help_search->set_text(TTR("Search Help")); - help_search->connect("pressed", this, "_menu_option", varray(SEARCH_HELP)); + help_search->connect_compat("pressed", this, "_menu_option", varray(SEARCH_HELP)); menu_hb->add_child(help_search); help_search->set_tooltip(TTR("Search the reference documentation.")); menu_hb->add_child(memnew(VSeparator)); script_back = memnew(ToolButton); - script_back->connect("pressed", this, "_history_back"); + script_back->connect_compat("pressed", this, "_history_back"); menu_hb->add_child(script_back); script_back->set_disabled(true); script_back->set_tooltip(TTR("Go to previous edited document.")); script_forward = memnew(ToolButton); - script_forward->connect("pressed", this, "_history_forward"); + script_forward->connect_compat("pressed", this, "_history_forward"); menu_hb->add_child(script_forward); script_forward->set_disabled(true); script_forward->set_tooltip(TTR("Go to next edited document.")); - tab_container->connect("tab_changed", this, "_tab_changed"); + tab_container->connect_compat("tab_changed", this, "_tab_changed"); erase_tab_confirm = memnew(ConfirmationDialog); erase_tab_confirm->get_ok()->set_text(TTR("Save")); erase_tab_confirm->add_button(TTR("Discard"), OS::get_singleton()->get_swap_ok_cancel(), "discard"); - erase_tab_confirm->connect("confirmed", this, "_close_current_tab"); - erase_tab_confirm->connect("custom_action", this, "_close_discard_current_tab"); + erase_tab_confirm->connect_compat("confirmed", this, "_close_current_tab"); + erase_tab_confirm->connect_compat("custom_action", this, "_close_discard_current_tab"); add_child(erase_tab_confirm); script_create_dialog = memnew(ScriptCreateDialog); script_create_dialog->set_title(TTR("Create Script")); add_child(script_create_dialog); - script_create_dialog->connect("script_created", this, "_script_created"); + script_create_dialog->connect_compat("script_created", this, "_script_created"); file_dialog_option = -1; file_dialog = memnew(EditorFileDialog); add_child(file_dialog); - file_dialog->connect("file_selected", this, "_file_dialog_action"); + file_dialog->connect_compat("file_selected", this, "_file_dialog_action"); error_dialog = memnew(AcceptDialog); add_child(error_dialog); - debugger = memnew(ScriptEditorDebugger(editor)); - debugger->connect("goto_script_line", this, "_goto_script_line"); - debugger->connect("set_execution", this, "_set_execution"); - debugger->connect("clear_execution", this, "_clear_execution"); - debugger->connect("show_debugger", this, "_show_debugger"); - disk_changed = memnew(ConfirmationDialog); { VBoxContainer *vbc = memnew(VBoxContainer); @@ -3447,48 +3369,42 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) { vbc->add_child(disk_changed_list); disk_changed_list->set_v_size_flags(SIZE_EXPAND_FILL); - disk_changed->connect("confirmed", this, "_reload_scripts"); + disk_changed->connect_compat("confirmed", this, "_reload_scripts"); disk_changed->get_ok()->set_text(TTR("Reload")); disk_changed->add_button(TTR("Resave"), !OS::get_singleton()->get_swap_ok_cancel(), "resave"); - disk_changed->connect("custom_action", this, "_resave_scripts"); + disk_changed->connect_compat("custom_action", this, "_resave_scripts"); } add_child(disk_changed); script_editor = this; - Button *db = EditorNode::get_singleton()->add_bottom_panel_item(TTR("Debugger"), debugger); - debugger->set_tool_button(db); - - debugger->connect("breaked", this, "_breaked"); - autosave_timer = memnew(Timer); autosave_timer->set_one_shot(false); - autosave_timer->connect(SceneStringNames::get_singleton()->tree_entered, this, "_update_autosave_timer"); - autosave_timer->connect("timeout", this, "_autosave_scripts"); + autosave_timer->connect_compat(SceneStringNames::get_singleton()->tree_entered, this, "_update_autosave_timer"); + autosave_timer->connect_compat("timeout", this, "_autosave_scripts"); add_child(autosave_timer); grab_focus_block = false; help_search_dialog = memnew(EditorHelpSearch); add_child(help_search_dialog); - help_search_dialog->connect("go_to_help", this, "_help_class_goto"); + help_search_dialog->connect_compat("go_to_help", this, "_help_class_goto"); find_in_files_dialog = memnew(FindInFilesDialog); - find_in_files_dialog->connect(FindInFilesDialog::SIGNAL_FIND_REQUESTED, this, "_start_find_in_files", varray(false)); - find_in_files_dialog->connect(FindInFilesDialog::SIGNAL_REPLACE_REQUESTED, this, "_start_find_in_files", varray(true)); + find_in_files_dialog->connect_compat(FindInFilesDialog::SIGNAL_FIND_REQUESTED, this, "_start_find_in_files", varray(false)); + find_in_files_dialog->connect_compat(FindInFilesDialog::SIGNAL_REPLACE_REQUESTED, this, "_start_find_in_files", varray(true)); add_child(find_in_files_dialog); find_in_files = memnew(FindInFilesPanel); find_in_files_button = editor->add_bottom_panel_item(TTR("Search Results"), find_in_files); find_in_files->set_custom_minimum_size(Size2(0, 200) * EDSCALE); - find_in_files->connect(FindInFilesPanel::SIGNAL_RESULT_SELECTED, this, "_on_find_in_files_result_selected"); - find_in_files->connect(FindInFilesPanel::SIGNAL_FILES_MODIFIED, this, "_on_find_in_files_modified_files"); + find_in_files->connect_compat(FindInFilesPanel::SIGNAL_RESULT_SELECTED, this, "_on_find_in_files_result_selected"); + find_in_files->connect_compat(FindInFilesPanel::SIGNAL_FILES_MODIFIED, this, "_on_find_in_files_modified_files"); find_in_files->hide(); find_in_files_button->hide(); history_pos = -1; - //debugger_gui->hide(); edit_pass = 0; trim_trailing_whitespace_on_save = EditorSettings::get_singleton()->get("text_editor/files/trim_trailing_whitespace_on_save"); diff --git a/editor/plugins/script_editor_plugin.h b/editor/plugins/script_editor_plugin.h index 3fb67c7ecc..b4b4f33fc5 100644 --- a/editor/plugins/script_editor_plugin.h +++ b/editor/plugins/script_editor_plugin.h @@ -73,7 +73,7 @@ public: ScriptEditorQuickOpen(); }; -class ScriptEditorDebugger; +class EditorDebuggerNode; class ScriptEditorBase : public VBoxContainer { @@ -107,7 +107,7 @@ public: virtual void tag_saved_version() = 0; virtual void reload(bool p_soft) {} virtual void get_breakpoints(List<int> *p_breakpoints) = 0; - virtual void add_callback(const String &p_function, PoolStringArray p_args) = 0; + virtual void add_callback(const String &p_function, PackedStringArray p_args) = 0; virtual void update_settings() = 0; virtual void set_debugger_active(bool p_active) = 0; virtual bool can_lose_focus_on_node_selection() { return true; } @@ -155,14 +155,8 @@ class ScriptEditor : public PanelContainer { FILE_COPY_PATH, FILE_TOOL_RELOAD, FILE_TOOL_RELOAD_SOFT, - DEBUG_NEXT, - DEBUG_STEP, - DEBUG_BREAK, - DEBUG_CONTINUE, - DEBUG_SHOW, - DEBUG_SHOW_KEEP_OPEN, - DEBUG_WITH_EXTERNAL_EDITOR, SEARCH_IN_FILES, + REPLACE_IN_FILES, SEARCH_HELP, SEARCH_WEBSITE, REQUEST_DOCS, @@ -232,7 +226,6 @@ class ScriptEditor : public PanelContainer { AcceptDialog *error_dialog; ConfirmationDialog *erase_tab_confirm; ScriptCreateDialog *script_create_dialog; - ScriptEditorDebugger *debugger; ToolButton *scripts_visible; String current_theme; @@ -314,13 +307,11 @@ class ScriptEditor : public PanelContainer { EditorScriptCodeCompletionCache *completion_cache; - void _editor_play(); - void _editor_pause(); void _editor_stop(); int edit_pass; - void _add_callback(Object *p_obj, const String &p_function, const PoolStringArray &p_args); + void _add_callback(Object *p_obj, const String &p_function, const PackedStringArray &p_args); void _res_saved_callback(const Ref<Resource> &p_res); bool trim_trailing_whitespace_on_save; @@ -334,7 +325,6 @@ class ScriptEditor : public PanelContainer { void _set_execution(REF p_script, int p_line); void _clear_execution(REF p_script); void _breaked(bool p_breaked, bool p_can_debug); - void _show_debugger(bool p_show); void _update_window_menu(); void _script_created(Ref<Script> p_script); @@ -404,9 +394,10 @@ class ScriptEditor : public PanelContainer { Error _save_text_file(Ref<TextFile> p_text_file, const String &p_path); void _on_find_in_files_requested(String text); + void _on_replace_in_files_requested(String text); void _on_find_in_files_result_selected(String fpath, int line_number, int begin, int end); void _start_find_in_files(bool with_replace); - void _on_find_in_files_modified_files(PoolStringArray paths); + void _on_find_in_files_modified_files(PackedStringArray paths); static void _open_script_request(const String &p_path); @@ -455,7 +446,6 @@ public: VSplitContainer *get_left_list_split() { return list_split; } - ScriptEditorDebugger *get_debugger() { return debugger; } void set_live_auto_reload_running_scripts(bool p_enabled); static void register_create_syntax_highlighter_function(CreateSyntaxHighlighterFunc p_func); diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp index 3a49538542..f4ebd7c3cc 100644 --- a/editor/plugins/script_text_editor.cpp +++ b/editor/plugins/script_text_editor.cpp @@ -32,10 +32,10 @@ #include "core/math/expression.h" #include "core/os/keyboard.h" +#include "editor/debugger/editor_debugger_node.h" #include "editor/editor_node.h" #include "editor/editor_scale.h" #include "editor/editor_settings.h" -#include "editor/script_editor_debugger.h" void ConnectionInfoDialog::ok_pressed() { } @@ -53,30 +53,30 @@ void ConnectionInfoDialog::popup_connections(String p_method, Vector<Node *> p_n for (List<Connection>::Element *E = all_connections.front(); E; E = E->next()) { Connection connection = E->get(); - if (connection.method != p_method) { + if (connection.callable.get_method() != p_method) { continue; } TreeItem *node_item = tree->create_item(root); - node_item->set_text(0, Object::cast_to<Node>(connection.source)->get_name()); - node_item->set_icon(0, EditorNode::get_singleton()->get_object_icon(connection.source, "Node")); + node_item->set_text(0, Object::cast_to<Node>(connection.signal.get_object())->get_name()); + node_item->set_icon(0, EditorNode::get_singleton()->get_object_icon(connection.signal.get_object(), "Node")); node_item->set_selectable(0, false); node_item->set_editable(0, false); - node_item->set_text(1, connection.signal); + node_item->set_text(1, connection.signal.get_name()); node_item->set_icon(1, get_parent_control()->get_icon("Slot", "EditorIcons")); node_item->set_selectable(1, false); node_item->set_editable(1, false); - node_item->set_text(2, Object::cast_to<Node>(connection.target)->get_name()); - node_item->set_icon(2, EditorNode::get_singleton()->get_object_icon(connection.target, "Node")); + node_item->set_text(2, Object::cast_to<Node>(connection.callable.get_object())->get_name()); + node_item->set_icon(2, EditorNode::get_singleton()->get_object_icon(connection.callable.get_object(), "Node")); node_item->set_selectable(2, false); node_item->set_editable(2, false); } } - popup_centered(Size2(400, 300) * EDSCALE); + popup_centered(Size2(600, 300) * EDSCALE); } ConnectionInfoDialog::ConnectionInfoDialog() { @@ -292,27 +292,34 @@ void ScriptTextEditor::_set_theme_for_script() { const Color basetype_color = colors_cache.basetype_color; text_edit->add_keyword_color("String", basetype_color); text_edit->add_keyword_color("Vector2", basetype_color); + text_edit->add_keyword_color("Vector2i", basetype_color); text_edit->add_keyword_color("Rect2", basetype_color); - text_edit->add_keyword_color("Transform2D", basetype_color); + text_edit->add_keyword_color("Rect2i", basetype_color); text_edit->add_keyword_color("Vector3", basetype_color); + text_edit->add_keyword_color("Vector3i", basetype_color); + text_edit->add_keyword_color("Transform2D", basetype_color); + text_edit->add_keyword_color("Plane", basetype_color); + text_edit->add_keyword_color("Quat", basetype_color); text_edit->add_keyword_color("AABB", basetype_color); text_edit->add_keyword_color("Basis", basetype_color); - text_edit->add_keyword_color("Plane", basetype_color); text_edit->add_keyword_color("Transform", basetype_color); - text_edit->add_keyword_color("Quat", basetype_color); text_edit->add_keyword_color("Color", basetype_color); - text_edit->add_keyword_color("Object", basetype_color); + text_edit->add_keyword_color("StringName", basetype_color); text_edit->add_keyword_color("NodePath", basetype_color); text_edit->add_keyword_color("RID", basetype_color); + text_edit->add_keyword_color("Object", basetype_color); + text_edit->add_keyword_color("Callable", basetype_color); text_edit->add_keyword_color("Dictionary", basetype_color); text_edit->add_keyword_color("Array", basetype_color); - text_edit->add_keyword_color("PoolByteArray", basetype_color); - text_edit->add_keyword_color("PoolIntArray", basetype_color); - text_edit->add_keyword_color("PoolRealArray", basetype_color); - text_edit->add_keyword_color("PoolStringArray", basetype_color); - text_edit->add_keyword_color("PoolVector2Array", basetype_color); - text_edit->add_keyword_color("PoolVector3Array", basetype_color); - text_edit->add_keyword_color("PoolColorArray", basetype_color); + text_edit->add_keyword_color("PackedByteArray", basetype_color); + text_edit->add_keyword_color("PackedInt32Array", basetype_color); + text_edit->add_keyword_color("PackedInt64Array", basetype_color); + text_edit->add_keyword_color("PackedFloat32Array", basetype_color); + text_edit->add_keyword_color("PackedFloat64Array", basetype_color); + text_edit->add_keyword_color("PackedStringArray", basetype_color); + text_edit->add_keyword_color("PackedVector2Array", basetype_color); + text_edit->add_keyword_color("PackedVector3Array", basetype_color); + text_edit->add_keyword_color("PackedColorArray", basetype_color); //colorize engine types List<StringName> types; @@ -424,7 +431,7 @@ void ScriptTextEditor::_notification(int p_what) { } } -void ScriptTextEditor::add_callback(const String &p_function, PoolStringArray p_args) { +void ScriptTextEditor::add_callback(const String &p_function, PackedStringArray p_args) { String code = code_editor->get_text_edit()->get_text(); int pos = script->get_language()->find_function(p_function, code); @@ -603,12 +610,12 @@ void ScriptTextEditor::_validate_script() { Connection connection = E->get(); String base_path = base->get_name(); - String source_path = base == connection.source ? base_path : base_path + "/" + base->get_path_to(Object::cast_to<Node>(connection.source)); - String target_path = base == connection.target ? base_path : base_path + "/" + base->get_path_to(Object::cast_to<Node>(connection.target)); + String source_path = base == connection.signal.get_object() ? base_path : base_path + "/" + base->get_path_to(Object::cast_to<Node>(connection.signal.get_object())); + String target_path = base == connection.callable.get_object() ? base_path : base_path + "/" + base->get_path_to(Object::cast_to<Node>(connection.callable.get_object())); warnings_panel->push_cell(); warnings_panel->push_color(warnings_panel->get_color("warning_color", "Editor")); - warnings_panel->add_text(vformat(TTR("Missing connected method '%s' for signal '%s' from node '%s' to node '%s'."), connection.method, connection.signal, source_path, target_path)); + warnings_panel->add_text(vformat(TTR("Missing connected method '%s' for signal '%s' from node '%s' to node '%s'."), connection.callable.get_method(), connection.signal.get_name(), source_path, target_path)); warnings_panel->pop(); // Color. warnings_panel->pop(); // Cell. } @@ -870,7 +877,7 @@ void ScriptTextEditor::_breakpoint_item_pressed(int p_idx) { void ScriptTextEditor::_breakpoint_toggled(int p_row) { - ScriptEditor::get_singleton()->get_debugger()->set_breakpoint(script->get_path(), p_row + 1, code_editor->get_text_edit()->is_line_set_as_breakpoint(p_row)); + EditorDebuggerNode::get_singleton()->set_breakpoint(script->get_path(), p_row + 1, code_editor->get_text_edit()->is_line_set_as_breakpoint(p_row)); } void ScriptTextEditor::_lookup_symbol(const String &p_symbol, int p_row, int p_column) { @@ -1006,24 +1013,24 @@ void ScriptTextEditor::_update_connected_methods() { } // As deleted nodes are still accessible via the undo/redo system, check if they're still on the tree. - Node *source = Object::cast_to<Node>(connection.source); + Node *source = Object::cast_to<Node>(connection.signal.get_object()); if (source && !source->is_inside_tree()) { continue; } - if (methods_found.has(connection.method)) { + if (methods_found.has(connection.callable.get_method())) { continue; } - if (!ClassDB::has_method(script->get_instance_base_type(), connection.method)) { + if (!ClassDB::has_method(script->get_instance_base_type(), connection.callable.get_method())) { int line = -1; for (int j = 0; j < functions.size(); j++) { String name = functions[j].get_slice(":", 0); - if (name == connection.method) { + if (name == connection.callable.get_method()) { line = functions[j].get_slice(":", 1).to_int(); - text_edit->set_line_info_icon(line - 1, get_parent_control()->get_icon("Slot", "EditorIcons"), connection.method); - methods_found.insert(connection.method); + text_edit->set_line_info_icon(line - 1, get_parent_control()->get_icon("Slot", "EditorIcons"), connection.callable.get_method()); + methods_found.insert(connection.callable.get_method()); break; } } @@ -1036,7 +1043,7 @@ void ScriptTextEditor::_update_connected_methods() { bool found_inherited_function = false; Ref<Script> inherited_script = script->get_base_script(); while (!inherited_script.is_null()) { - if (inherited_script->has_method(connection.method)) { + if (inherited_script->has_method(connection.callable.get_method())) { found_inherited_function = true; break; } @@ -1212,7 +1219,7 @@ void ScriptTextEditor::_edit_option(int p_op) { Expression expression; Vector<String> lines = code_editor->get_text_edit()->get_selection_text().split("\n"); - PoolStringArray results; + PackedStringArray results; for (int i = 0; i < lines.size(); i++) { String line = lines[i]; @@ -1221,17 +1228,17 @@ void ScriptTextEditor::_edit_option(int p_op) { if (expression.parse(line) == OK) { Variant result = expression.execute(Array(), Variant(), false); if (expression.get_error_text() == "") { - results.append(whitespace + result.get_construct_string()); + results.push_back(whitespace + result.get_construct_string()); } else { - results.append(line); + results.push_back(line); } } else { - results.append(line); + results.push_back(line); } } code_editor->get_text_edit()->begin_complex_operation(); //prevents creating a two-step undo - code_editor->get_text_edit()->insert_text_at_cursor(results.join("\n")); + code_editor->get_text_edit()->insert_text_at_cursor(String("\n").join(results)); code_editor->get_text_edit()->end_complex_operation(); } break; case SEARCH_FIND: { @@ -1258,6 +1265,12 @@ void ScriptTextEditor::_edit_option(int p_op) { // So this will be delegated to the ScriptEditor. emit_signal("search_in_files_requested", selected_text); } break; + case REPLACE_IN_FILES: { + + String selected_text = code_editor->get_text_edit()->get_selection_text(); + + emit_signal("replace_in_files_requested", selected_text); + } break; case SEARCH_LOCATE_FUNCTION: { quick_open->popup_dialog(get_functions()); @@ -1288,7 +1301,7 @@ void ScriptTextEditor::_edit_option(int p_op) { int line = tx->cursor_get_line(); bool dobreak = !tx->is_line_set_as_breakpoint(line); tx->set_line_as_breakpoint(line, dobreak); - ScriptEditor::get_singleton()->get_debugger()->set_breakpoint(script->get_path(), line + 1, dobreak); + EditorDebuggerNode::get_singleton()->set_breakpoint(script->get_path(), line + 1, dobreak); } break; case DEBUG_REMOVE_ALL_BREAKPOINTS: { @@ -1299,7 +1312,7 @@ void ScriptTextEditor::_edit_option(int p_op) { int line = E->get(); bool dobreak = !tx->is_line_set_as_breakpoint(line); tx->set_line_as_breakpoint(line, dobreak); - ScriptEditor::get_singleton()->get_debugger()->set_breakpoint(script->get_path(), line + 1, dobreak); + EditorDebuggerNode::get_singleton()->set_breakpoint(script->get_path(), line + 1, dobreak); } } break; case DEBUG_GOTO_NEXT_BREAKPOINT: { @@ -1768,12 +1781,12 @@ ScriptTextEditor::ScriptTextEditor() { editor_box->add_child(code_editor); code_editor->add_constant_override("separation", 2); code_editor->set_anchors_and_margins_preset(Control::PRESET_WIDE); - code_editor->connect("validate_script", this, "_validate_script"); - code_editor->connect("load_theme_settings", this, "_load_theme_settings"); + code_editor->connect_compat("validate_script", this, "_validate_script"); + code_editor->connect_compat("load_theme_settings", this, "_load_theme_settings"); code_editor->set_code_complete_func(_code_complete_scripts, this); - code_editor->get_text_edit()->connect("breakpoint_toggled", this, "_breakpoint_toggled"); - code_editor->get_text_edit()->connect("symbol_lookup", this, "_lookup_symbol"); - code_editor->get_text_edit()->connect("info_clicked", this, "_lookup_connections"); + code_editor->get_text_edit()->connect_compat("breakpoint_toggled", this, "_breakpoint_toggled"); + code_editor->get_text_edit()->connect_compat("symbol_lookup", this, "_lookup_symbol"); + code_editor->get_text_edit()->connect_compat("info_clicked", this, "_lookup_connections"); code_editor->set_v_size_flags(SIZE_EXPAND_FILL); code_editor->show_toggle_scripts_button(); @@ -1786,9 +1799,9 @@ ScriptTextEditor::ScriptTextEditor() { warnings_panel->set_focus_mode(FOCUS_CLICK); warnings_panel->hide(); - code_editor->connect("error_pressed", this, "_error_pressed"); - code_editor->connect("show_warnings_panel", this, "_show_warnings_panel"); - warnings_panel->connect("meta_clicked", this, "_warning_clicked"); + code_editor->connect_compat("error_pressed", this, "_error_pressed"); + code_editor->connect_compat("show_warnings_panel", this, "_show_warnings_panel"); + warnings_panel->connect_compat("meta_clicked", this, "_warning_clicked"); update_settings(); @@ -1798,11 +1811,11 @@ ScriptTextEditor::ScriptTextEditor() { code_editor->get_text_edit()->set_select_identifiers_on_hover(true); code_editor->get_text_edit()->set_context_menu_enabled(false); - code_editor->get_text_edit()->connect("gui_input", this, "_text_edit_gui_input"); + code_editor->get_text_edit()->connect_compat("gui_input", this, "_text_edit_gui_input"); context_menu = memnew(PopupMenu); add_child(context_menu); - context_menu->connect("id_pressed", this, "_edit_option"); + context_menu->connect_compat("id_pressed", this, "_edit_option"); context_menu->set_hide_on_window_lose_focus(true); color_panel = memnew(PopupPanel); @@ -1810,7 +1823,7 @@ ScriptTextEditor::ScriptTextEditor() { color_picker = memnew(ColorPicker); color_picker->set_deferred_mode(true); color_panel->add_child(color_picker); - color_picker->connect("color_changed", this, "_color_changed"); + color_picker->connect_compat("color_changed", this, "_color_changed"); // get default color picker mode from editor settings int default_color_mode = EDITOR_GET("interface/inspector/default_color_picker_mode"); @@ -1851,7 +1864,7 @@ ScriptTextEditor::ScriptTextEditor() { edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/convert_indent_to_spaces"), EDIT_CONVERT_INDENT_TO_SPACES); edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/convert_indent_to_tabs"), EDIT_CONVERT_INDENT_TO_TABS); edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/auto_indent"), EDIT_AUTO_INDENT); - edit_menu->get_popup()->connect("id_pressed", this, "_edit_option"); + edit_menu->get_popup()->connect_compat("id_pressed", this, "_edit_option"); edit_menu->get_popup()->add_separator(); PopupMenu *convert_case = memnew(PopupMenu); @@ -1861,7 +1874,7 @@ ScriptTextEditor::ScriptTextEditor() { convert_case->add_shortcut(ED_SHORTCUT("script_text_editor/convert_to_uppercase", TTR("Uppercase"), KEY_MASK_SHIFT | KEY_F4), EDIT_TO_UPPERCASE); convert_case->add_shortcut(ED_SHORTCUT("script_text_editor/convert_to_lowercase", TTR("Lowercase"), KEY_MASK_SHIFT | KEY_F5), EDIT_TO_LOWERCASE); convert_case->add_shortcut(ED_SHORTCUT("script_text_editor/capitalize", TTR("Capitalize"), KEY_MASK_SHIFT | KEY_F6), EDIT_CAPITALIZE); - convert_case->connect("id_pressed", this, "_edit_option"); + convert_case->connect_compat("id_pressed", this, "_edit_option"); highlighters[TTR("Standard")] = NULL; highlighter_menu = memnew(PopupMenu); @@ -1869,7 +1882,7 @@ ScriptTextEditor::ScriptTextEditor() { edit_menu->get_popup()->add_child(highlighter_menu); edit_menu->get_popup()->add_submenu_item(TTR("Syntax Highlighter"), "highlighter_menu"); highlighter_menu->add_radio_check_item(TTR("Standard")); - highlighter_menu->connect("id_pressed", this, "_change_syntax_highlighter"); + highlighter_menu->connect_compat("id_pressed", this, "_change_syntax_highlighter"); search_menu = memnew(MenuButton); edit_hb->add_child(search_menu); @@ -1882,9 +1895,10 @@ ScriptTextEditor::ScriptTextEditor() { search_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/replace"), SEARCH_REPLACE); search_menu->get_popup()->add_separator(); search_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/find_in_files"), SEARCH_IN_FILES); + search_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/replace_in_files"), REPLACE_IN_FILES); search_menu->get_popup()->add_separator(); search_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/contextual_help"), HELP_CONTEXTUAL); - search_menu->get_popup()->connect("id_pressed", this, "_edit_option"); + search_menu->get_popup()->connect_compat("id_pressed", this, "_edit_option"); edit_hb->add_child(edit_menu); @@ -1892,7 +1906,7 @@ ScriptTextEditor::ScriptTextEditor() { edit_hb->add_child(goto_menu); goto_menu->set_text(TTR("Go To")); goto_menu->set_switch_on_hover(true); - goto_menu->get_popup()->connect("id_pressed", this, "_edit_option"); + goto_menu->get_popup()->connect_compat("id_pressed", this, "_edit_option"); goto_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/goto_function"), SEARCH_LOCATE_FUNCTION); goto_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/goto_line"), SEARCH_GOTO_LINE); @@ -1903,20 +1917,20 @@ ScriptTextEditor::ScriptTextEditor() { goto_menu->get_popup()->add_child(bookmarks_menu); goto_menu->get_popup()->add_submenu_item(TTR("Bookmarks"), "Bookmarks"); _update_bookmark_list(); - bookmarks_menu->connect("about_to_show", this, "_update_bookmark_list"); - bookmarks_menu->connect("index_pressed", this, "_bookmark_item_pressed"); + bookmarks_menu->connect_compat("about_to_show", this, "_update_bookmark_list"); + bookmarks_menu->connect_compat("index_pressed", this, "_bookmark_item_pressed"); breakpoints_menu = memnew(PopupMenu); breakpoints_menu->set_name("Breakpoints"); goto_menu->get_popup()->add_child(breakpoints_menu); goto_menu->get_popup()->add_submenu_item(TTR("Breakpoints"), "Breakpoints"); _update_breakpoint_list(); - breakpoints_menu->connect("about_to_show", this, "_update_breakpoint_list"); - breakpoints_menu->connect("index_pressed", this, "_breakpoint_item_pressed"); + breakpoints_menu->connect_compat("about_to_show", this, "_update_breakpoint_list"); + breakpoints_menu->connect_compat("index_pressed", this, "_breakpoint_item_pressed"); quick_open = memnew(ScriptEditorQuickOpen); add_child(quick_open); - quick_open->connect("goto_line", this, "_goto_line"); + quick_open->connect_compat("goto_line", this, "_goto_line"); goto_line_dialog = memnew(GotoLineDialog); add_child(goto_line_dialog); @@ -1990,6 +2004,7 @@ void ScriptTextEditor::register_editor() { #endif ED_SHORTCUT("script_text_editor/find_in_files", TTR("Find in Files..."), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_F); + ED_SHORTCUT("script_text_editor/replace_in_files", TTR("Replace in Files..."), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_R); #ifdef OSX_ENABLED ED_SHORTCUT("script_text_editor/contextual_help", TTR("Contextual Help"), KEY_MASK_ALT | KEY_MASK_SHIFT | KEY_SPACE); diff --git a/editor/plugins/script_text_editor.h b/editor/plugins/script_text_editor.h index 39c9d519eb..e23160d029 100644 --- a/editor/plugins/script_text_editor.h +++ b/editor/plugins/script_text_editor.h @@ -133,6 +133,7 @@ class ScriptTextEditor : public ScriptEditorBase { SEARCH_LOCATE_FUNCTION, SEARCH_GOTO_LINE, SEARCH_IN_FILES, + REPLACE_IN_FILES, BOOKMARK_TOGGLE, BOOKMARK_GOTO_NEXT, BOOKMARK_GOTO_PREV, @@ -219,7 +220,7 @@ public: virtual void reload(bool p_soft); virtual void get_breakpoints(List<int> *p_breakpoints); - virtual void add_callback(const String &p_function, PoolStringArray p_args); + virtual void add_callback(const String &p_function, PackedStringArray p_args); virtual void update_settings(); virtual bool show_members_overview(); diff --git a/editor/plugins/shader_editor_plugin.cpp b/editor/plugins/shader_editor_plugin.cpp index a19f0b4975..b45aacd1ee 100644 --- a/editor/plugins/shader_editor_plugin.cpp +++ b/editor/plugins/shader_editor_plugin.cpp @@ -382,8 +382,9 @@ void ShaderEditor::_editor_settings_changed() { shader_editor->get_text_edit()->set_v_scroll_speed(EditorSettings::get_singleton()->get("text_editor/navigation/v_scroll_speed")); shader_editor->get_text_edit()->set_draw_minimap(EditorSettings::get_singleton()->get("text_editor/navigation/show_minimap")); shader_editor->get_text_edit()->set_minimap_width((int)EditorSettings::get_singleton()->get("text_editor/navigation/minimap_width") * EDSCALE); - shader_editor->get_text_edit()->set_show_line_length_guideline(EditorSettings::get_singleton()->get("text_editor/appearance/show_line_length_guideline")); - shader_editor->get_text_edit()->set_line_length_guideline_column(EditorSettings::get_singleton()->get("text_editor/appearance/line_length_guideline_column")); + shader_editor->get_text_edit()->set_show_line_length_guidelines(EditorSettings::get_singleton()->get("text_editor/appearance/show_line_length_guidelines")); + shader_editor->get_text_edit()->set_line_length_guideline_soft_column(EditorSettings::get_singleton()->get("text_editor/appearance/line_length_guideline_soft_column")); + shader_editor->get_text_edit()->set_line_length_guideline_hard_column(EditorSettings::get_singleton()->get("text_editor/appearance/line_length_guideline_hard_column")); shader_editor->get_text_edit()->set_breakpoint_gutter_enabled(false); } @@ -607,8 +608,8 @@ ShaderEditor::ShaderEditor(EditorNode *p_node) { shader_editor->add_constant_override("separation", 0); shader_editor->set_anchors_and_margins_preset(Control::PRESET_WIDE); - shader_editor->connect("script_changed", this, "apply_shaders"); - EditorSettings::get_singleton()->connect("settings_changed", this, "_editor_settings_changed"); + shader_editor->connect_compat("script_changed", this, "apply_shaders"); + EditorSettings::get_singleton()->connect_compat("settings_changed", this, "_editor_settings_changed"); shader_editor->get_text_edit()->set_callhint_settings( EditorSettings::get_singleton()->get("text_editor/completion/put_callhint_tooltip_below_current_line"), @@ -616,13 +617,13 @@ ShaderEditor::ShaderEditor(EditorNode *p_node) { shader_editor->get_text_edit()->set_select_identifiers_on_hover(true); shader_editor->get_text_edit()->set_context_menu_enabled(false); - shader_editor->get_text_edit()->connect("gui_input", this, "_text_edit_gui_input"); + shader_editor->get_text_edit()->connect_compat("gui_input", this, "_text_edit_gui_input"); shader_editor->update_editor_settings(); context_menu = memnew(PopupMenu); add_child(context_menu); - context_menu->connect("id_pressed", this, "_menu_option"); + context_menu->connect_compat("id_pressed", this, "_menu_option"); context_menu->set_hide_on_window_lose_focus(true); VBoxContainer *main_container = memnew(VBoxContainer); @@ -650,7 +651,7 @@ ShaderEditor::ShaderEditor(EditorNode *p_node) { edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/clone_down"), EDIT_CLONE_DOWN); edit_menu->get_popup()->add_separator(); edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/complete_symbol"), EDIT_COMPLETE); - edit_menu->get_popup()->connect("id_pressed", this, "_menu_option"); + edit_menu->get_popup()->connect_compat("id_pressed", this, "_menu_option"); search_menu = memnew(MenuButton); search_menu->set_text(TTR("Search")); @@ -660,12 +661,12 @@ ShaderEditor::ShaderEditor(EditorNode *p_node) { search_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/find_next"), SEARCH_FIND_NEXT); search_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/find_previous"), SEARCH_FIND_PREV); search_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/replace"), SEARCH_REPLACE); - search_menu->get_popup()->connect("id_pressed", this, "_menu_option"); + search_menu->get_popup()->connect_compat("id_pressed", this, "_menu_option"); MenuButton *goto_menu = memnew(MenuButton); goto_menu->set_text(TTR("Go To")); goto_menu->set_switch_on_hover(true); - goto_menu->get_popup()->connect("id_pressed", this, "_menu_option"); + goto_menu->get_popup()->connect_compat("id_pressed", this, "_menu_option"); goto_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/goto_line"), SEARCH_GOTO_LINE); goto_menu->get_popup()->add_separator(); @@ -675,14 +676,14 @@ ShaderEditor::ShaderEditor(EditorNode *p_node) { goto_menu->get_popup()->add_child(bookmarks_menu); goto_menu->get_popup()->add_submenu_item(TTR("Bookmarks"), "Bookmarks"); _update_bookmark_list(); - bookmarks_menu->connect("about_to_show", this, "_update_bookmark_list"); - bookmarks_menu->connect("index_pressed", this, "_bookmark_item_pressed"); + bookmarks_menu->connect_compat("about_to_show", this, "_update_bookmark_list"); + bookmarks_menu->connect_compat("index_pressed", this, "_bookmark_item_pressed"); help_menu = memnew(MenuButton); help_menu->set_text(TTR("Help")); help_menu->set_switch_on_hover(true); help_menu->get_popup()->add_icon_item(p_node->get_gui_base()->get_icon("Instance", "EditorIcons"), TTR("Online Docs"), HELP_DOCS); - help_menu->get_popup()->connect("id_pressed", this, "_menu_option"); + help_menu->get_popup()->connect_compat("id_pressed", this, "_menu_option"); add_child(main_container); main_container->add_child(hbc); @@ -705,11 +706,11 @@ ShaderEditor::ShaderEditor(EditorNode *p_node) { dl->set_text(TTR("This shader has been modified on on disk.\nWhat action should be taken?")); vbc->add_child(dl); - disk_changed->connect("confirmed", this, "_reload_shader_from_disk"); + disk_changed->connect_compat("confirmed", this, "_reload_shader_from_disk"); disk_changed->get_ok()->set_text(TTR("Reload")); disk_changed->add_button(TTR("Resave"), !OS::get_singleton()->get_swap_ok_cancel(), "resave"); - disk_changed->connect("custom_action", this, "save_external_data"); + disk_changed->connect_compat("custom_action", this, "save_external_data"); add_child(disk_changed); diff --git a/editor/plugins/skeleton_2d_editor_plugin.cpp b/editor/plugins/skeleton_2d_editor_plugin.cpp index dbe64f202d..d83a8ddf2d 100644 --- a/editor/plugins/skeleton_2d_editor_plugin.cpp +++ b/editor/plugins/skeleton_2d_editor_plugin.cpp @@ -110,7 +110,7 @@ Skeleton2DEditor::Skeleton2DEditor() { options->get_popup()->add_item(TTR("Set Bones to Rest Pose"), MENU_OPTION_SET_REST); options->set_switch_on_hover(true); - options->get_popup()->connect("id_pressed", this, "_menu_option"); + options->get_popup()->connect_compat("id_pressed", this, "_menu_option"); err_dialog = memnew(AcceptDialog); add_child(err_dialog); diff --git a/editor/plugins/skeleton_editor_plugin.cpp b/editor/plugins/skeleton_editor_plugin.cpp index 9101c64eab..43ba99317e 100644 --- a/editor/plugins/skeleton_editor_plugin.cpp +++ b/editor/plugins/skeleton_editor_plugin.cpp @@ -137,7 +137,7 @@ void SkeletonEditor::edit(Skeleton *p_node) { void SkeletonEditor::_notification(int p_what) { if (p_what == NOTIFICATION_ENTER_TREE) { - get_tree()->connect("node_removed", this, "_node_removed"); + get_tree()->connect_compat("node_removed", this, "_node_removed"); } } @@ -164,7 +164,7 @@ SkeletonEditor::SkeletonEditor() { options->get_popup()->add_item(TTR("Create physical skeleton"), MENU_OPTION_CREATE_PHYSICAL_SKELETON); - options->get_popup()->connect("id_pressed", this, "_on_click_option"); + options->get_popup()->connect_compat("id_pressed", this, "_on_click_option"); options->hide(); } diff --git a/editor/plugins/skeleton_ik_editor_plugin.cpp b/editor/plugins/skeleton_ik_editor_plugin.cpp index eb6ad9498d..a09dcca279 100644 --- a/editor/plugins/skeleton_ik_editor_plugin.cpp +++ b/editor/plugins/skeleton_ik_editor_plugin.cpp @@ -93,7 +93,7 @@ SkeletonIKEditorPlugin::SkeletonIKEditorPlugin(EditorNode *p_node) { play_btn->set_text(TTR("Play IK")); play_btn->set_toggle_mode(true); play_btn->hide(); - play_btn->connect("pressed", this, "_play"); + play_btn->connect_compat("pressed", this, "_play"); add_control_to_container(CONTAINER_SPATIAL_EDITOR_MENU, play_btn); skeleton_ik = NULL; } diff --git a/editor/plugins/spatial_editor_plugin.cpp b/editor/plugins/spatial_editor_plugin.cpp index e916f6f028..4c8a0590fd 100644 --- a/editor/plugins/spatial_editor_plugin.cpp +++ b/editor/plugins/spatial_editor_plugin.cpp @@ -36,12 +36,12 @@ #include "core/print_string.h" #include "core/project_settings.h" #include "core/sort_array.h" +#include "editor/debugger/editor_debugger_node.h" #include "editor/editor_node.h" #include "editor/editor_scale.h" #include "editor/editor_settings.h" #include "editor/plugins/animation_player_editor_plugin.h" #include "editor/plugins/script_editor_plugin.h" -#include "editor/script_editor_debugger.h" #include "editor/spatial_editor_gizmos.h" #include "scene/3d/camera.h" #include "scene/3d/collision_shape.h" @@ -2147,6 +2147,8 @@ void SpatialEditorViewport::_notification(int p_what) { set_process(visible); if (visible) { + orthogonal = view_menu->get_popup()->is_item_checked(view_menu->get_popup()->get_item_index(VIEW_ORTHOGONAL)); + _update_name(); _update_camera(0); } else { set_freelook_active(false); @@ -2185,10 +2187,10 @@ void SpatialEditorViewport::_notification(int p_what) { if (cam != NULL && cam != previewing) { //then switch the viewport's camera to the scene's viewport camera if (previewing != NULL) { - previewing->disconnect("tree_exited", this, "_preview_exited_scene"); + previewing->disconnect_compat("tree_exited", this, "_preview_exited_scene"); } previewing = cam; - previewing->connect("tree_exited", this, "_preview_exited_scene"); + previewing->connect_compat("tree_exited", this, "_preview_exited_scene"); VS::get_singleton()->viewport_attach_camera(viewport->get_viewport_rid(), cam->get_camera()); surface->update(); } @@ -2329,12 +2331,12 @@ void SpatialEditorViewport::_notification(int p_what) { if (p_what == NOTIFICATION_ENTER_TREE) { - surface->connect("draw", this, "_draw"); - surface->connect("gui_input", this, "_sinput"); - surface->connect("mouse_entered", this, "_surface_mouse_enter"); - surface->connect("mouse_exited", this, "_surface_mouse_exit"); - surface->connect("focus_entered", this, "_surface_focus_enter"); - surface->connect("focus_exited", this, "_surface_focus_exit"); + surface->connect_compat("draw", this, "_draw"); + surface->connect_compat("gui_input", this, "_sinput"); + surface->connect_compat("mouse_entered", this, "_surface_mouse_enter"); + surface->connect_compat("mouse_exited", this, "_surface_mouse_exit"); + surface->connect_compat("focus_entered", this, "_surface_focus_enter"); + surface->connect_compat("focus_exited", this, "_surface_focus_exit"); _init_gizmo_instance(index); } @@ -2835,10 +2837,10 @@ void SpatialEditorViewport::_menu_option(int p_option) { void SpatialEditorViewport::_preview_exited_scene() { - preview_camera->disconnect("toggled", this, "_toggle_camera_preview"); + preview_camera->disconnect_compat("toggled", this, "_toggle_camera_preview"); preview_camera->set_pressed(false); _toggle_camera_preview(false); - preview_camera->connect("toggled", this, "_toggle_camera_preview"); + preview_camera->connect_compat("toggled", this, "_toggle_camera_preview"); view_menu->show(); } @@ -2901,7 +2903,7 @@ void SpatialEditorViewport::_toggle_camera_preview(bool p_activate) { if (!p_activate) { - previewing->disconnect("tree_exiting", this, "_preview_exited_scene"); + previewing->disconnect_compat("tree_exiting", this, "_preview_exited_scene"); previewing = NULL; VS::get_singleton()->viewport_attach_camera(viewport->get_viewport_rid(), camera->get_camera()); //restore if (!preview) @@ -2912,7 +2914,7 @@ void SpatialEditorViewport::_toggle_camera_preview(bool p_activate) { } else { previewing = preview; - previewing->connect("tree_exiting", this, "_preview_exited_scene"); + previewing->connect_compat("tree_exiting", this, "_preview_exited_scene"); VS::get_singleton()->viewport_attach_camera(viewport->get_viewport_rid(), preview->get_camera()); //replace view_menu->set_disabled(true); surface->update(); @@ -2923,7 +2925,7 @@ void SpatialEditorViewport::_toggle_cinema_preview(bool p_activate) { previewing_cinema = p_activate; if (!previewing_cinema) { if (previewing != NULL) - previewing->disconnect("tree_exited", this, "_preview_exited_scene"); + previewing->disconnect_compat("tree_exited", this, "_preview_exited_scene"); previewing = NULL; VS::get_singleton()->viewport_attach_camera(viewport->get_viewport_rid(), camera->get_camera()); //restore @@ -3108,14 +3110,14 @@ void SpatialEditorViewport::set_state(const Dictionary &p_state) { view_menu->get_popup()->set_item_checked(idx, previewing_cinema); } - if (preview_camera->is_connected("toggled", this, "_toggle_camera_preview")) { - preview_camera->disconnect("toggled", this, "_toggle_camera_preview"); + if (preview_camera->is_connected_compat("toggled", this, "_toggle_camera_preview")) { + preview_camera->disconnect_compat("toggled", this, "_toggle_camera_preview"); } if (p_state.has("previewing")) { Node *pv = EditorNode::get_singleton()->get_edited_scene()->get_node(p_state["previewing"]); if (Object::cast_to<Camera>(pv)) { previewing = Object::cast_to<Camera>(pv); - previewing->connect("tree_exiting", this, "_preview_exited_scene"); + previewing->connect_compat("tree_exiting", this, "_preview_exited_scene"); VS::get_singleton()->viewport_attach_camera(viewport->get_viewport_rid(), previewing->get_camera()); //replace view_menu->set_disabled(true); surface->update(); @@ -3123,7 +3125,7 @@ void SpatialEditorViewport::set_state(const Dictionary &p_state) { preview_camera->show(); } } - preview_camera->connect("toggled", this, "_toggle_camera_preview"); + preview_camera->connect_compat("toggled", this, "_toggle_camera_preview"); } Dictionary SpatialEditorViewport::get_state() const { @@ -3419,9 +3421,9 @@ bool SpatialEditorViewport::_create_instance(Node *parent, String &path, const P editor_data->get_undo_redo().add_undo_method(parent, "remove_child", instanced_scene); String new_name = parent->validate_child_name(instanced_scene); - ScriptEditorDebugger *sed = ScriptEditor::get_singleton()->get_debugger(); - editor_data->get_undo_redo().add_do_method(sed, "live_debug_instance_node", editor->get_edited_scene()->get_path_to(parent), path, new_name); - editor_data->get_undo_redo().add_undo_method(sed, "live_debug_remove_node", NodePath(String(editor->get_edited_scene()->get_path_to(parent)) + "/" + new_name)); + EditorDebuggerNode *ed = EditorDebuggerNode::get_singleton(); + editor_data->get_undo_redo().add_do_method(ed, "live_debug_instance_node", editor->get_edited_scene()->get_path_to(parent), path, new_name); + editor_data->get_undo_redo().add_undo_method(ed, "live_debug_remove_node", NodePath(String(editor->get_edited_scene()->get_path_to(parent)) + "/" + new_name)); Transform global_transform; Spatial *parent_spatial = Object::cast_to<Spatial>(parent); @@ -3682,8 +3684,8 @@ SpatialEditorViewport::SpatialEditorViewport(SpatialEditor *p_spatial_editor, Ed view_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("spatial_editor/focus_selection"), VIEW_CENTER_TO_SELECTION); view_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("spatial_editor/align_transform_with_view"), VIEW_ALIGN_TRANSFORM_WITH_VIEW); view_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("spatial_editor/align_rotation_with_view"), VIEW_ALIGN_ROTATION_WITH_VIEW); - view_menu->get_popup()->connect("id_pressed", this, "_menu_option"); - display_submenu->connect("id_pressed", this, "_menu_option"); + view_menu->get_popup()->connect_compat("id_pressed", this, "_menu_option"); + display_submenu->connect_compat("id_pressed", this, "_menu_option"); view_menu->set_disable_shortcuts(true); if (OS::get_singleton()->get_current_video_driver() == OS::VIDEO_DRIVER_GLES2) { @@ -3718,7 +3720,7 @@ SpatialEditorViewport::SpatialEditorViewport(SpatialEditor *p_spatial_editor, Ed vbox->add_child(preview_camera); preview_camera->set_h_size_flags(0); preview_camera->hide(); - preview_camera->connect("toggled", this, "_toggle_camera_preview"); + preview_camera->connect_compat("toggled", this, "_toggle_camera_preview"); previewing = NULL; gizmo_scale = 1.0; @@ -3771,8 +3773,8 @@ SpatialEditorViewport::SpatialEditorViewport(SpatialEditor *p_spatial_editor, Ed selection_menu = memnew(PopupMenu); add_child(selection_menu); selection_menu->set_custom_minimum_size(Size2(100, 0) * EDSCALE); - selection_menu->connect("id_pressed", this, "_selection_result_pressed"); - selection_menu->connect("popup_hide", this, "_selection_menu_hide"); + selection_menu->connect_compat("id_pressed", this, "_selection_result_pressed"); + selection_menu->connect_compat("popup_hide", this, "_selection_menu_hide"); if (p_index == 0) { view_menu->get_popup()->set_item_checked(view_menu->get_popup()->get_item_index(VIEW_AUDIO_LISTENER), true); @@ -3782,7 +3784,7 @@ SpatialEditorViewport::SpatialEditorViewport(SpatialEditor *p_spatial_editor, Ed name = ""; _update_name(); - EditorSettings::get_singleton()->connect("settings_changed", this, "update_transform_gizmo_view"); + EditorSettings::get_singleton()->connect_compat("settings_changed", this, "update_transform_gizmo_view"); } ////////////////////////////////////////////////////////////// @@ -4495,7 +4497,7 @@ void SpatialEditor::_menu_item_toggled(bool pressed, int p_option) { } break; case MENU_TOOL_OVERRIDE_CAMERA: { - ScriptEditorDebugger *const debugger = ScriptEditor::get_singleton()->get_debugger(); + EditorDebuggerNode *const debugger = EditorDebuggerNode::get_singleton(); if (pressed) { using Override = ScriptEditorDebugger::CameraOverride; @@ -4552,7 +4554,7 @@ void SpatialEditor::_update_camera_override_viewport(Object *p_viewport) { if (!current_viewport) return; - ScriptEditorDebugger *const debugger = ScriptEditor::get_singleton()->get_debugger(); + EditorDebuggerNode *const debugger = EditorDebuggerNode::get_singleton(); camera_override_viewport_id = current_viewport->index; if (debugger->get_camera_override() >= ScriptEditorDebugger::OVERRIDE_3D_1) { @@ -5181,8 +5183,8 @@ void SpatialEditor::_update_gizmos_menu_theme() { void SpatialEditor::_init_grid() { - PoolVector<Color> grid_colors[3]; - PoolVector<Vector3> grid_points[3]; + Vector<Color> grid_colors[3]; + Vector<Vector3> grid_points[3]; Color primary_grid_color = EditorSettings::get_singleton()->get("editors/3d/primary_grid_color"); Color secondary_grid_color = EditorSettings::get_singleton()->get("editors/3d/secondary_grid_color"); @@ -5469,12 +5471,12 @@ void SpatialEditor::_notification(int p_what) { _refresh_menu_icons(); - get_tree()->connect("node_removed", this, "_node_removed"); - EditorNode::get_singleton()->get_scene_tree_dock()->get_tree_editor()->connect("node_changed", this, "_refresh_menu_icons"); - editor_selection->connect("selection_changed", this, "_refresh_menu_icons"); + get_tree()->connect_compat("node_removed", this, "_node_removed"); + EditorNode::get_singleton()->get_scene_tree_dock()->get_tree_editor()->connect_compat("node_changed", this, "_refresh_menu_icons"); + editor_selection->connect_compat("selection_changed", this, "_refresh_menu_icons"); - editor->connect("stop_pressed", this, "_update_camera_override_button", make_binds(false)); - editor->connect("play_pressed", this, "_update_camera_override_button", make_binds(true)); + editor->connect_compat("stop_pressed", this, "_update_camera_override_button", make_binds(false)); + editor->connect_compat("play_pressed", this, "_update_camera_override_button", make_binds(true)); } else if (p_what == NOTIFICATION_ENTER_TREE) { _register_all_gizmos(); @@ -5511,7 +5513,7 @@ void SpatialEditor::_notification(int p_what) { _init_grid(); } else if (p_what == NOTIFICATION_VISIBILITY_CHANGED) { if (!is_visible() && tool_option_button[TOOL_OPT_OVERRIDE_CAMERA]->is_pressed()) { - ScriptEditorDebugger *debugger = ScriptEditor::get_singleton()->get_debugger(); + EditorDebuggerNode *debugger = EditorDebuggerNode::get_singleton(); debugger->set_camera_override(ScriptEditorDebugger::OVERRIDE_NONE); tool_option_button[TOOL_OPT_OVERRIDE_CAMERA]->set_pressed(false); @@ -5730,7 +5732,7 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) { 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", this, "_menu_item_pressed", button_binds); + tool_button[TOOL_MODE_SELECT]->connect_compat("pressed", this, "_menu_item_pressed", button_binds); tool_button[TOOL_MODE_SELECT]->set_shortcut(ED_SHORTCUT("spatial_editor/tool_select", TTR("Select Mode"), KEY_Q)); tool_button[TOOL_MODE_SELECT]->set_tooltip(keycode_get_string(KEY_MASK_CMD) + TTR("Drag: Rotate\nAlt+Drag: Move\nAlt+RMB: Depth list selection")); @@ -5741,7 +5743,7 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) { 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", this, "_menu_item_pressed", button_binds); + tool_button[TOOL_MODE_MOVE]->connect_compat("pressed", this, "_menu_item_pressed", button_binds); tool_button[TOOL_MODE_MOVE]->set_shortcut(ED_SHORTCUT("spatial_editor/tool_move", TTR("Move Mode"), KEY_W)); tool_button[TOOL_MODE_ROTATE] = memnew(ToolButton); @@ -5749,7 +5751,7 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) { 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", this, "_menu_item_pressed", button_binds); + tool_button[TOOL_MODE_ROTATE]->connect_compat("pressed", this, "_menu_item_pressed", button_binds); tool_button[TOOL_MODE_ROTATE]->set_shortcut(ED_SHORTCUT("spatial_editor/tool_rotate", TTR("Rotate Mode"), KEY_E)); tool_button[TOOL_MODE_SCALE] = memnew(ToolButton); @@ -5757,7 +5759,7 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) { 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", this, "_menu_item_pressed", button_binds); + tool_button[TOOL_MODE_SCALE]->connect_compat("pressed", this, "_menu_item_pressed", button_binds); tool_button[TOOL_MODE_SCALE]->set_shortcut(ED_SHORTCUT("spatial_editor/tool_scale", TTR("Scale Mode"), KEY_R)); hbc_menu->add_child(memnew(VSeparator)); @@ -5767,31 +5769,31 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) { 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", this, "_menu_item_pressed", button_binds); + tool_button[TOOL_MODE_LIST_SELECT]->connect_compat("pressed", this, "_menu_item_pressed", button_binds); tool_button[TOOL_MODE_LIST_SELECT]->set_tooltip(TTR("Show a list of all objects at the position clicked\n(same as Alt+RMB in select mode).")); tool_button[TOOL_LOCK_SELECTED] = memnew(ToolButton); hbc_menu->add_child(tool_button[TOOL_LOCK_SELECTED]); button_binds.write[0] = MENU_LOCK_SELECTED; - tool_button[TOOL_LOCK_SELECTED]->connect("pressed", this, "_menu_item_pressed", button_binds); + tool_button[TOOL_LOCK_SELECTED]->connect_compat("pressed", this, "_menu_item_pressed", button_binds); tool_button[TOOL_LOCK_SELECTED]->set_tooltip(TTR("Lock the selected object in place (can't be moved).")); tool_button[TOOL_UNLOCK_SELECTED] = memnew(ToolButton); hbc_menu->add_child(tool_button[TOOL_UNLOCK_SELECTED]); button_binds.write[0] = MENU_UNLOCK_SELECTED; - tool_button[TOOL_UNLOCK_SELECTED]->connect("pressed", this, "_menu_item_pressed", button_binds); + tool_button[TOOL_UNLOCK_SELECTED]->connect_compat("pressed", this, "_menu_item_pressed", button_binds); tool_button[TOOL_UNLOCK_SELECTED]->set_tooltip(TTR("Unlock the selected object (can be moved).")); tool_button[TOOL_GROUP_SELECTED] = memnew(ToolButton); hbc_menu->add_child(tool_button[TOOL_GROUP_SELECTED]); button_binds.write[0] = MENU_GROUP_SELECTED; - tool_button[TOOL_GROUP_SELECTED]->connect("pressed", this, "_menu_item_pressed", button_binds); + tool_button[TOOL_GROUP_SELECTED]->connect_compat("pressed", this, "_menu_item_pressed", button_binds); tool_button[TOOL_GROUP_SELECTED]->set_tooltip(TTR("Makes sure the object's children are not selectable.")); tool_button[TOOL_UNGROUP_SELECTED] = memnew(ToolButton); hbc_menu->add_child(tool_button[TOOL_UNGROUP_SELECTED]); button_binds.write[0] = MENU_UNGROUP_SELECTED; - tool_button[TOOL_UNGROUP_SELECTED]->connect("pressed", this, "_menu_item_pressed", button_binds); + tool_button[TOOL_UNGROUP_SELECTED]->connect_compat("pressed", this, "_menu_item_pressed", button_binds); tool_button[TOOL_UNGROUP_SELECTED]->set_tooltip(TTR("Restores the object's children's ability to be selected.")); hbc_menu->add_child(memnew(VSeparator)); @@ -5801,7 +5803,7 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) { 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", this, "_menu_item_toggled", button_binds); + tool_option_button[TOOL_OPT_LOCAL_COORDS]->connect_compat("toggled", this, "_menu_item_toggled", button_binds); 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_USE_SNAP] = memnew(ToolButton); @@ -5809,7 +5811,7 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) { 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", this, "_menu_item_toggled", button_binds); + tool_option_button[TOOL_OPT_USE_SNAP]->connect_compat("toggled", this, "_menu_item_toggled", button_binds); tool_option_button[TOOL_OPT_USE_SNAP]->set_shortcut(ED_SHORTCUT("spatial_editor/snap", TTR("Use Snap"), KEY_Y)); hbc_menu->add_child(memnew(VSeparator)); @@ -5820,7 +5822,7 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) { 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", this, "_menu_item_toggled", button_binds); + tool_option_button[TOOL_OPT_OVERRIDE_CAMERA]->connect_compat("toggled", this, "_menu_item_toggled", button_binds); _update_camera_override_button(false); hbc_menu->add_child(memnew(VSeparator)); @@ -5857,7 +5859,7 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) { p->add_separator(); p->add_shortcut(ED_SHORTCUT("spatial_editor/configure_snap", TTR("Configure Snap...")), MENU_TRANSFORM_CONFIGURE_SNAP); - p->connect("id_pressed", this, "_menu_item_pressed"); + p->connect_compat("id_pressed", this, "_menu_item_pressed"); view_menu = memnew(MenuButton); view_menu->set_text(TTR("View")); @@ -5889,13 +5891,13 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) { p->set_item_checked(p->get_item_index(MENU_VIEW_ORIGIN), true); p->set_item_checked(p->get_item_index(MENU_VIEW_GRID), true); - p->connect("id_pressed", this, "_menu_item_pressed"); + p->connect_compat("id_pressed", this, "_menu_item_pressed"); gizmos_menu = memnew(PopupMenu); p->add_child(gizmos_menu); gizmos_menu->set_name("GizmosMenu"); gizmos_menu->set_hide_on_checkable_item_selection(false); - gizmos_menu->connect("id_pressed", this, "_menu_gizmo_toggled"); + gizmos_menu->connect_compat("id_pressed", this, "_menu_gizmo_toggled"); /* REST OF MENU */ @@ -5912,8 +5914,8 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) { for (uint32_t i = 0; i < VIEWPORTS_COUNT; i++) { viewports[i] = memnew(SpatialEditorViewport(this, editor, i)); - viewports[i]->connect("toggle_maximize_view", this, "_toggle_maximize_view"); - viewports[i]->connect("clicked", this, "_update_camera_override_viewport"); + viewports[i]->connect_compat("toggle_maximize_view", this, "_toggle_maximize_view"); + viewports[i]->connect_compat("clicked", this, "_update_camera_override_viewport"); viewports[i]->assign_pending_data_pointers(preview_node, &preview_bounds, accept); viewport_base->add_child(viewports[i]); } @@ -6028,7 +6030,7 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) { xform_type->add_item(TTR("Post")); xform_vbc->add_child(xform_type); - xform_dialog->connect("confirmed", this, "_xform_dialog_action"); + xform_dialog->connect_compat("confirmed", this, "_xform_dialog_action"); scenario_debug = VisualServer::SCENARIO_DEBUG_DISABLED; @@ -6040,7 +6042,7 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) { EDITOR_DEF("editors/3d/manipulator_gizmo_size", 80); EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::INT, "editors/3d/manipulator_gizmo_size", PROPERTY_HINT_RANGE, "16,1024,1")); EDITOR_DEF("editors/3d/manipulator_gizmo_opacity", 0.4); - EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::REAL, "editors/3d/manipulator_gizmo_opacity", PROPERTY_HINT_RANGE, "0,1,0.01")); + EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::FLOAT, "editors/3d/manipulator_gizmo_opacity", PROPERTY_HINT_RANGE, "0,1,0.01")); over_gizmo_handle = -1; } @@ -6182,7 +6184,7 @@ SpatialEditorPlugin::SpatialEditorPlugin(EditorNode *p_node) { editor->get_viewport()->add_child(spatial_editor); spatial_editor->hide(); - spatial_editor->connect("transform_key_request", editor->get_inspector_dock(), "_transform_keyed"); + spatial_editor->connect_compat("transform_key_request", editor->get_inspector_dock(), "_transform_keyed"); } SpatialEditorPlugin::~SpatialEditorPlugin() { diff --git a/editor/plugins/sprite_editor_plugin.cpp b/editor/plugins/sprite_editor_plugin.cpp index 2736bbfd3a..c35afa0644 100644 --- a/editor/plugins/sprite_editor_plugin.cpp +++ b/editor/plugins/sprite_editor_plugin.cpp @@ -358,13 +358,13 @@ void SpriteEditor::_convert_to_polygon_2d_node() { for (int i = 0; i < computed_outline_lines.size(); i++) total_point_count += computed_outline_lines[i].size(); - PoolVector2Array polygon; + PackedVector2Array polygon; polygon.resize(total_point_count); - PoolVector2Array::Write polygon_write = polygon.write(); + Vector2 *polygon_write = polygon.ptrw(); - PoolVector2Array uvs; + PackedVector2Array uvs; uvs.resize(total_point_count); - PoolVector2Array::Write uvs_write = uvs.write(); + Vector2 *uvs_write = uvs.ptrw(); int current_point_index = 0; @@ -376,9 +376,9 @@ void SpriteEditor::_convert_to_polygon_2d_node() { Vector<Vector2> outline = computed_outline_lines[i]; Vector<Vector2> uv_outline = outline_lines[i]; - PoolIntArray pia; + PackedInt32Array pia; pia.resize(outline.size()); - PoolIntArray::Write pia_write = pia.write(); + int *pia_write = pia.ptrw(); for (int pi = 0; pi < outline.size(); pi++) { polygon_write[current_point_index] = outline[pi]; @@ -442,9 +442,9 @@ void SpriteEditor::_create_light_occluder_2d_node() { Ref<OccluderPolygon2D> polygon; polygon.instance(); - PoolVector2Array a; + PackedVector2Array a; a.resize(outline.size()); - PoolVector2Array::Write aw = a.write(); + Vector2 *aw = a.ptrw(); for (int io = 0; io < outline.size(); io++) { aw[io] = outline[io]; } @@ -526,7 +526,7 @@ SpriteEditor::SpriteEditor() { options->get_popup()->add_item(TTR("Create LightOccluder2D Sibling"), MENU_OPTION_CREATE_LIGHT_OCCLUDER_2D); options->set_switch_on_hover(true); - options->get_popup()->connect("id_pressed", this, "_menu_option"); + options->get_popup()->connect_compat("id_pressed", this, "_menu_option"); err_dialog = memnew(AcceptDialog); add_child(err_dialog); @@ -542,9 +542,9 @@ SpriteEditor::SpriteEditor() { scroll->set_enable_v_scroll(true); vb->add_margin_child(TTR("Preview:"), scroll, true); debug_uv = memnew(Control); - debug_uv->connect("draw", this, "_debug_uv_draw"); + debug_uv->connect_compat("draw", this, "_debug_uv_draw"); scroll->add_child(debug_uv); - debug_uv_dialog->connect("confirmed", this, "_create_node"); + debug_uv_dialog->connect_compat("confirmed", this, "_create_node"); HBoxContainer *hb = memnew(HBoxContainer); hb->add_child(memnew(Label(TTR("Simplification: ")))); @@ -573,7 +573,7 @@ SpriteEditor::SpriteEditor() { hb->add_spacer(); update_preview = memnew(Button); update_preview->set_text(TTR("Update Preview")); - update_preview->connect("pressed", this, "_update_mesh_data"); + update_preview->connect_compat("pressed", this, "_update_mesh_data"); hb->add_child(update_preview); vb->add_margin_child(TTR("Settings:"), hb); diff --git a/editor/plugins/sprite_frames_editor_plugin.cpp b/editor/plugins/sprite_frames_editor_plugin.cpp index 2d756af213..c80ba873fb 100644 --- a/editor/plugins/sprite_frames_editor_plugin.cpp +++ b/editor/plugins/sprite_frames_editor_plugin.cpp @@ -234,7 +234,7 @@ void SpriteFramesEditor::_notification(int p_what) { _delete->set_icon(get_icon("Remove", "EditorIcons")); new_anim->set_icon(get_icon("New", "EditorIcons")); remove_anim->set_icon(get_icon("Remove", "EditorIcons")); - FALLTHROUGH; + [[fallthrough]]; } case NOTIFICATION_THEME_CHANGED: { splite_sheet_scroll->add_style_override("bg", get_stylebox("bg", "Tree")); @@ -245,7 +245,7 @@ void SpriteFramesEditor::_notification(int p_what) { } } -void SpriteFramesEditor::_file_load_request(const PoolVector<String> &p_path, int p_at_pos) { +void SpriteFramesEditor::_file_load_request(const Vector<String> &p_path, int p_at_pos) { ERR_FAIL_COND(!frames->has_animation(edited_anim)); @@ -852,7 +852,7 @@ void SpriteFramesEditor::drop_data_fw(const Point2 &p_point, const Variant &p_da if (String(d["type"]) == "files") { - PoolVector<String> files = d["files"]; + Vector<String> files = d["files"]; _file_load_request(files, at_pos); } @@ -905,19 +905,19 @@ SpriteFramesEditor::SpriteFramesEditor() { new_anim = memnew(ToolButton); new_anim->set_tooltip(TTR("New Animation")); hbc_animlist->add_child(new_anim); - new_anim->connect("pressed", this, "_animation_add"); + new_anim->connect_compat("pressed", this, "_animation_add"); remove_anim = memnew(ToolButton); remove_anim->set_tooltip(TTR("Remove Animation")); hbc_animlist->add_child(remove_anim); - remove_anim->connect("pressed", this, "_animation_remove"); + remove_anim->connect_compat("pressed", this, "_animation_remove"); animations = memnew(Tree); sub_vb->add_child(animations); animations->set_v_size_flags(SIZE_EXPAND_FILL); animations->set_hide_root(true); - animations->connect("cell_selected", this, "_animation_select"); - animations->connect("item_edited", this, "_animation_name_edited"); + animations->connect_compat("cell_selected", this, "_animation_select"); + animations->connect_compat("item_edited", this, "_animation_name_edited"); animations->set_allow_reselect(true); anim_speed = memnew(SpinBox); @@ -925,12 +925,12 @@ SpriteFramesEditor::SpriteFramesEditor() { anim_speed->set_min(0); anim_speed->set_max(100); anim_speed->set_step(0.01); - anim_speed->connect("value_changed", this, "_animation_fps_changed"); + anim_speed->connect_compat("value_changed", this, "_animation_fps_changed"); anim_loop = memnew(CheckButton); anim_loop->set_text(TTR("Loop")); vbc_animlist->add_child(anim_loop); - anim_loop->connect("pressed", this, "_animation_loop_changed"); + anim_loop->connect_compat("pressed", this, "_animation_loop_changed"); VBoxContainer *vbc = memnew(VBoxContainer); add_child(vbc); @@ -1004,16 +1004,16 @@ SpriteFramesEditor::SpriteFramesEditor() { dialog = memnew(AcceptDialog); add_child(dialog); - load->connect("pressed", this, "_load_pressed"); - load_sheet->connect("pressed", this, "_open_sprite_sheet"); - _delete->connect("pressed", this, "_delete_pressed"); - copy->connect("pressed", this, "_copy_pressed"); - paste->connect("pressed", this, "_paste_pressed"); - empty->connect("pressed", this, "_empty_pressed"); - empty2->connect("pressed", this, "_empty2_pressed"); - move_up->connect("pressed", this, "_up_pressed"); - move_down->connect("pressed", this, "_down_pressed"); - file->connect("files_selected", this, "_file_load_request"); + load->connect_compat("pressed", this, "_load_pressed"); + load_sheet->connect_compat("pressed", this, "_open_sprite_sheet"); + _delete->connect_compat("pressed", this, "_delete_pressed"); + copy->connect_compat("pressed", this, "_copy_pressed"); + paste->connect_compat("pressed", this, "_paste_pressed"); + empty->connect_compat("pressed", this, "_empty_pressed"); + empty2->connect_compat("pressed", this, "_empty2_pressed"); + move_up->connect_compat("pressed", this, "_up_pressed"); + move_down->connect_compat("pressed", this, "_down_pressed"); + file->connect_compat("files_selected", this, "_file_load_request"); loading_scene = false; sel = -1; @@ -1023,14 +1023,14 @@ SpriteFramesEditor::SpriteFramesEditor() { delete_dialog = memnew(ConfirmationDialog); add_child(delete_dialog); - delete_dialog->connect("confirmed", this, "_animation_remove_confirmed"); + delete_dialog->connect_compat("confirmed", this, "_animation_remove_confirmed"); split_sheet_dialog = memnew(ConfirmationDialog); add_child(split_sheet_dialog); VBoxContainer *split_sheet_vb = memnew(VBoxContainer); split_sheet_dialog->add_child(split_sheet_vb); split_sheet_dialog->set_title(TTR("Select Frames")); - split_sheet_dialog->connect("confirmed", this, "_sheet_add_frames"); + split_sheet_dialog->connect_compat("confirmed", this, "_sheet_add_frames"); HBoxContainer *split_sheet_hb = memnew(HBoxContainer); @@ -1041,7 +1041,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", this, "_sheet_spin_changed"); + split_sheet_h->connect_compat("value_changed", this, "_sheet_spin_changed"); ss_label = memnew(Label(TTR("Vertical:"))); split_sheet_hb->add_child(ss_label); @@ -1050,13 +1050,13 @@ 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", this, "_sheet_spin_changed"); + split_sheet_v->connect_compat("value_changed", this, "_sheet_spin_changed"); split_sheet_hb->add_spacer(); Button *select_clear_all = memnew(Button); select_clear_all->set_text(TTR("Select/Clear All Frames")); - select_clear_all->connect("pressed", this, "_sheet_select_clear_all_frames"); + select_clear_all->connect_compat("pressed", this, "_sheet_select_clear_all_frames"); split_sheet_hb->add_child(select_clear_all); split_sheet_vb->add_child(split_sheet_hb); @@ -1064,8 +1064,8 @@ SpriteFramesEditor::SpriteFramesEditor() { split_sheet_preview = memnew(TextureRect); split_sheet_preview->set_expand(false); split_sheet_preview->set_mouse_filter(MOUSE_FILTER_PASS); - split_sheet_preview->connect("draw", this, "_sheet_preview_draw"); - split_sheet_preview->connect("gui_input", this, "_sheet_preview_input"); + split_sheet_preview->connect_compat("draw", this, "_sheet_preview_draw"); + split_sheet_preview->connect_compat("gui_input", this, "_sheet_preview_input"); splite_sheet_scroll = memnew(ScrollContainer); splite_sheet_scroll->set_enable_h_scroll(true); @@ -1083,7 +1083,7 @@ SpriteFramesEditor::SpriteFramesEditor() { file_split_sheet->set_title(TTR("Create Frames from Sprite Sheet")); file_split_sheet->set_mode(EditorFileDialog::MODE_OPEN_FILE); add_child(file_split_sheet); - file_split_sheet->connect("file_selected", this, "_prepare_sprite_sheet"); + file_split_sheet->connect_compat("file_selected", this, "_prepare_sprite_sheet"); } void SpriteFramesEditorPlugin::edit(Object *p_object) { diff --git a/editor/plugins/sprite_frames_editor_plugin.h b/editor/plugins/sprite_frames_editor_plugin.h index aa683605ed..1fa93b5c47 100644 --- a/editor/plugins/sprite_frames_editor_plugin.h +++ b/editor/plugins/sprite_frames_editor_plugin.h @@ -86,7 +86,7 @@ class SpriteFramesEditor : public HSplitContainer { void _load_pressed(); void _load_scene_pressed(); - void _file_load_request(const PoolVector<String> &p_path, int p_at_pos = -1); + void _file_load_request(const Vector<String> &p_path, int p_at_pos = -1); void _copy_pressed(); void _paste_pressed(); void _empty_pressed(); diff --git a/editor/plugins/style_box_editor_plugin.cpp b/editor/plugins/style_box_editor_plugin.cpp index eebcd567a4..a9936658c3 100644 --- a/editor/plugins/style_box_editor_plugin.cpp +++ b/editor/plugins/style_box_editor_plugin.cpp @@ -54,11 +54,11 @@ void EditorInspectorPluginStyleBox::parse_end() { void StyleBoxPreview::edit(const Ref<StyleBox> &p_stylebox) { if (stylebox.is_valid()) - stylebox->disconnect("changed", this, "_sb_changed"); + stylebox->disconnect_compat("changed", this, "_sb_changed"); stylebox = p_stylebox; if (p_stylebox.is_valid()) { preview->add_style_override("panel", stylebox); - stylebox->connect("changed", this, "_sb_changed"); + stylebox->connect_compat("changed", this, "_sb_changed"); } _sb_changed(); } @@ -91,7 +91,7 @@ StyleBoxPreview::StyleBoxPreview() { preview = memnew(Control); preview->set_custom_minimum_size(Size2(0, 150 * EDSCALE)); preview->set_clip_contents(true); - preview->connect("draw", this, "_redraw"); + preview->connect_compat("draw", this, "_redraw"); add_margin_child(TTR("Preview:"), preview); } diff --git a/editor/plugins/text_editor.cpp b/editor/plugins/text_editor.cpp index 804a900582..a8b6d74c1f 100644 --- a/editor/plugins/text_editor.cpp +++ b/editor/plugins/text_editor.cpp @@ -185,7 +185,7 @@ void TextEditor::set_edited_resource(const RES &p_res) { code_editor->update_line_and_column(); } -void TextEditor::add_callback(const String &p_function, PoolStringArray p_args) { +void TextEditor::add_callback(const String &p_function, PackedStringArray p_args) { } void TextEditor::set_debugger_active(bool p_active) { @@ -491,6 +491,12 @@ void TextEditor::_edit_option(int p_op) { // So this will be delegated to the ScriptEditor. emit_signal("search_in_files_requested", selected_text); } break; + case REPLACE_IN_FILES: { + + String selected_text = code_editor->get_text_edit()->get_selection_text(); + + emit_signal("replace_in_files_requested", selected_text); + } break; case SEARCH_GOTO_LINE: { goto_line_dialog->popup_find_line(tx); @@ -627,19 +633,19 @@ TextEditor::TextEditor() { code_editor = memnew(CodeTextEditor); add_child(code_editor); code_editor->add_constant_override("separation", 0); - code_editor->connect("load_theme_settings", this, "_load_theme_settings"); - code_editor->connect("validate_script", this, "_validate_script"); + code_editor->connect_compat("load_theme_settings", this, "_load_theme_settings"); + code_editor->connect_compat("validate_script", this, "_validate_script"); code_editor->set_anchors_and_margins_preset(Control::PRESET_WIDE); code_editor->set_v_size_flags(Control::SIZE_EXPAND_FILL); update_settings(); code_editor->get_text_edit()->set_context_menu_enabled(false); - code_editor->get_text_edit()->connect("gui_input", this, "_text_edit_gui_input"); + code_editor->get_text_edit()->connect_compat("gui_input", this, "_text_edit_gui_input"); context_menu = memnew(PopupMenu); add_child(context_menu); - context_menu->connect("id_pressed", this, "_edit_option"); + context_menu->connect_compat("id_pressed", this, "_edit_option"); edit_hb = memnew(HBoxContainer); @@ -647,7 +653,7 @@ TextEditor::TextEditor() { edit_hb->add_child(search_menu); search_menu->set_text(TTR("Search")); search_menu->set_switch_on_hover(true); - search_menu->get_popup()->connect("id_pressed", this, "_edit_option"); + search_menu->get_popup()->connect_compat("id_pressed", this, "_edit_option"); search_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/find"), SEARCH_FIND); search_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/find_next"), SEARCH_FIND_NEXT); @@ -655,12 +661,13 @@ TextEditor::TextEditor() { search_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/replace"), SEARCH_REPLACE); search_menu->get_popup()->add_separator(); search_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/find_in_files"), SEARCH_IN_FILES); + search_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/replace_in_files"), REPLACE_IN_FILES); edit_menu = memnew(MenuButton); edit_hb->add_child(edit_menu); edit_menu->set_text(TTR("Edit")); edit_menu->set_switch_on_hover(true); - edit_menu->get_popup()->connect("id_pressed", this, "_edit_option"); + edit_menu->get_popup()->connect_compat("id_pressed", this, "_edit_option"); edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/undo"), EDIT_UNDO); edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/redo"), EDIT_REDO); @@ -693,7 +700,7 @@ TextEditor::TextEditor() { convert_case->add_shortcut(ED_SHORTCUT("script_text_editor/convert_to_uppercase", TTR("Uppercase")), EDIT_TO_UPPERCASE); convert_case->add_shortcut(ED_SHORTCUT("script_text_editor/convert_to_lowercase", TTR("Lowercase")), EDIT_TO_LOWERCASE); convert_case->add_shortcut(ED_SHORTCUT("script_text_editor/capitalize", TTR("Capitalize")), EDIT_CAPITALIZE); - convert_case->connect("id_pressed", this, "_edit_option"); + convert_case->connect_compat("id_pressed", this, "_edit_option"); highlighters["Standard"] = NULL; highlighter_menu = memnew(PopupMenu); @@ -701,13 +708,13 @@ TextEditor::TextEditor() { edit_menu->get_popup()->add_child(highlighter_menu); edit_menu->get_popup()->add_submenu_item(TTR("Syntax Highlighter"), "highlighter_menu"); highlighter_menu->add_radio_check_item(TTR("Standard")); - highlighter_menu->connect("id_pressed", this, "_change_syntax_highlighter"); + highlighter_menu->connect_compat("id_pressed", this, "_change_syntax_highlighter"); MenuButton *goto_menu = memnew(MenuButton); edit_hb->add_child(goto_menu); goto_menu->set_text(TTR("Go To")); goto_menu->set_switch_on_hover(true); - goto_menu->get_popup()->connect("id_pressed", this, "_edit_option"); + goto_menu->get_popup()->connect_compat("id_pressed", this, "_edit_option"); goto_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/goto_line"), SEARCH_GOTO_LINE); goto_menu->get_popup()->add_separator(); @@ -717,8 +724,8 @@ TextEditor::TextEditor() { goto_menu->get_popup()->add_child(bookmarks_menu); goto_menu->get_popup()->add_submenu_item(TTR("Bookmarks"), "Bookmarks"); _update_bookmark_list(); - bookmarks_menu->connect("about_to_show", this, "_update_bookmark_list"); - bookmarks_menu->connect("index_pressed", this, "_bookmark_item_pressed"); + bookmarks_menu->connect_compat("about_to_show", this, "_update_bookmark_list"); + bookmarks_menu->connect_compat("index_pressed", this, "_bookmark_item_pressed"); goto_line_dialog = memnew(GotoLineDialog); add_child(goto_line_dialog); diff --git a/editor/plugins/text_editor.h b/editor/plugins/text_editor.h index 81896d92be..c80052e7ba 100644 --- a/editor/plugins/text_editor.h +++ b/editor/plugins/text_editor.h @@ -88,6 +88,7 @@ private: SEARCH_FIND_PREV, SEARCH_REPLACE, SEARCH_IN_FILES, + REPLACE_IN_FILES, SEARCH_GOTO_LINE, BOOKMARK_TOGGLE, BOOKMARK_GOTO_NEXT, @@ -146,7 +147,7 @@ public: virtual bool can_lose_focus_on_node_selection() { return true; } virtual void set_debugger_active(bool p_active); virtual void set_tooltip_request_func(String p_method, Object *p_obj); - virtual void add_callback(const String &p_function, PoolStringArray p_args); + virtual void add_callback(const String &p_function, PackedStringArray p_args); virtual Control *get_edit_menu(); virtual void clear_edit_menu(); diff --git a/editor/plugins/texture_region_editor_plugin.cpp b/editor/plugins/texture_region_editor_plugin.cpp index 2350c20cb7..065833fd2b 100644 --- a/editor/plugins/texture_region_editor_plugin.cpp +++ b/editor/plugins/texture_region_editor_plugin.cpp @@ -935,7 +935,7 @@ TextureRegionEditor::TextureRegionEditor(EditorNode *p_editor) { snap_mode_button->add_item(TTR("Grid Snap"), 2); snap_mode_button->add_item(TTR("Auto Slice"), 3); snap_mode_button->select(0); - snap_mode_button->connect("item_selected", this, "_set_snap_mode"); + snap_mode_button->connect_compat("item_selected", this, "_set_snap_mode"); hb_grid = memnew(HBoxContainer); hb_tools->add_child(hb_grid); @@ -949,7 +949,7 @@ TextureRegionEditor::TextureRegionEditor(EditorNode *p_editor) { sb_off_x->set_step(1); sb_off_x->set_value(snap_offset.x); sb_off_x->set_suffix("px"); - sb_off_x->connect("value_changed", this, "_set_snap_off_x"); + sb_off_x->connect_compat("value_changed", this, "_set_snap_off_x"); hb_grid->add_child(sb_off_x); sb_off_y = memnew(SpinBox); @@ -958,7 +958,7 @@ TextureRegionEditor::TextureRegionEditor(EditorNode *p_editor) { sb_off_y->set_step(1); sb_off_y->set_value(snap_offset.y); sb_off_y->set_suffix("px"); - sb_off_y->connect("value_changed", this, "_set_snap_off_y"); + sb_off_y->connect_compat("value_changed", this, "_set_snap_off_y"); hb_grid->add_child(sb_off_y); hb_grid->add_child(memnew(VSeparator)); @@ -970,7 +970,7 @@ TextureRegionEditor::TextureRegionEditor(EditorNode *p_editor) { sb_step_x->set_step(1); sb_step_x->set_value(snap_step.x); sb_step_x->set_suffix("px"); - sb_step_x->connect("value_changed", this, "_set_snap_step_x"); + sb_step_x->connect_compat("value_changed", this, "_set_snap_step_x"); hb_grid->add_child(sb_step_x); sb_step_y = memnew(SpinBox); @@ -979,7 +979,7 @@ TextureRegionEditor::TextureRegionEditor(EditorNode *p_editor) { sb_step_y->set_step(1); sb_step_y->set_value(snap_step.y); sb_step_y->set_suffix("px"); - sb_step_y->connect("value_changed", this, "_set_snap_step_y"); + sb_step_y->connect_compat("value_changed", this, "_set_snap_step_y"); hb_grid->add_child(sb_step_y); hb_grid->add_child(memnew(VSeparator)); @@ -991,7 +991,7 @@ TextureRegionEditor::TextureRegionEditor(EditorNode *p_editor) { sb_sep_x->set_step(1); sb_sep_x->set_value(snap_separation.x); sb_sep_x->set_suffix("px"); - sb_sep_x->connect("value_changed", this, "_set_snap_sep_x"); + sb_sep_x->connect_compat("value_changed", this, "_set_snap_sep_x"); hb_grid->add_child(sb_sep_x); sb_sep_y = memnew(SpinBox); @@ -1000,7 +1000,7 @@ TextureRegionEditor::TextureRegionEditor(EditorNode *p_editor) { sb_sep_y->set_step(1); sb_sep_y->set_value(snap_separation.y); sb_sep_y->set_suffix("px"); - sb_sep_y->connect("value_changed", this, "_set_snap_sep_y"); + sb_sep_y->connect_compat("value_changed", this, "_set_snap_sep_y"); hb_grid->add_child(sb_sep_y); hb_grid->hide(); @@ -1008,8 +1008,8 @@ TextureRegionEditor::TextureRegionEditor(EditorNode *p_editor) { edit_draw = memnew(Panel); add_child(edit_draw); edit_draw->set_v_size_flags(SIZE_EXPAND_FILL); - edit_draw->connect("draw", this, "_region_draw"); - edit_draw->connect("gui_input", this, "_region_input"); + edit_draw->connect_compat("draw", this, "_region_draw"); + edit_draw->connect_compat("gui_input", this, "_region_input"); draw_zoom = 1.0; edit_draw->set_clip_contents(true); @@ -1020,27 +1020,27 @@ TextureRegionEditor::TextureRegionEditor(EditorNode *p_editor) { zoom_out = memnew(ToolButton); zoom_out->set_tooltip(TTR("Zoom Out")); - zoom_out->connect("pressed", this, "_zoom_out"); + zoom_out->connect_compat("pressed", this, "_zoom_out"); zoom_hb->add_child(zoom_out); zoom_reset = memnew(ToolButton); zoom_reset->set_tooltip(TTR("Zoom Reset")); - zoom_reset->connect("pressed", this, "_zoom_reset"); + zoom_reset->connect_compat("pressed", this, "_zoom_reset"); zoom_hb->add_child(zoom_reset); zoom_in = memnew(ToolButton); zoom_in->set_tooltip(TTR("Zoom In")); - zoom_in->connect("pressed", this, "_zoom_in"); + zoom_in->connect_compat("pressed", this, "_zoom_in"); zoom_hb->add_child(zoom_in); vscroll = memnew(VScrollBar); vscroll->set_step(0.001); edit_draw->add_child(vscroll); - vscroll->connect("value_changed", this, "_scroll_changed"); + vscroll->connect_compat("value_changed", this, "_scroll_changed"); hscroll = memnew(HScrollBar); hscroll->set_step(0.001); edit_draw->add_child(hscroll); - hscroll->connect("value_changed", this, "_scroll_changed"); + hscroll->connect_compat("value_changed", this, "_scroll_changed"); updating_scroll = false; } @@ -1125,7 +1125,7 @@ TextureRegionEditorPlugin::TextureRegionEditorPlugin(EditorNode *p_node) { region_editor = memnew(TextureRegionEditor(p_node)); region_editor->set_custom_minimum_size(Size2(0, 200) * EDSCALE); region_editor->hide(); - region_editor->connect("visibility_changed", this, "_editor_visiblity_changed"); + region_editor->connect_compat("visibility_changed", this, "_editor_visiblity_changed"); texture_region_button = p_node->add_bottom_panel_item(TTR("TextureRegion"), region_editor); texture_region_button->hide(); diff --git a/editor/plugins/theme_editor_plugin.cpp b/editor/plugins/theme_editor_plugin.cpp index 48d80a0017..717c9adad3 100644 --- a/editor/plugins/theme_editor_plugin.cpp +++ b/editor/plugins/theme_editor_plugin.cpp @@ -629,7 +629,7 @@ ThemeEditor::ThemeEditor() { theme_menu->get_popup()->add_item(TTR("Create Empty Editor Template"), POPUP_CREATE_EDITOR_EMPTY); theme_menu->get_popup()->add_item(TTR("Create From Current Editor Theme"), POPUP_IMPORT_EDITOR_THEME); top_menu->add_child(theme_menu); - theme_menu->get_popup()->connect("id_pressed", this, "_theme_menu_cbk"); + theme_menu->get_popup()->connect_compat("id_pressed", this, "_theme_menu_cbk"); ScrollContainer *scroll = memnew(ScrollContainer); add_child(scroll); @@ -835,7 +835,7 @@ ThemeEditor::ThemeEditor() { type_menu->set_text(".."); type_hbc->add_child(type_menu); - type_menu->get_popup()->connect("id_pressed", this, "_type_menu_cbk"); + type_menu->get_popup()->connect_compat("id_pressed", this, "_type_menu_cbk"); l = memnew(Label); l->set_text(TTR("Name:")); @@ -853,8 +853,8 @@ ThemeEditor::ThemeEditor() { name_menu->set_text(".."); name_hbc->add_child(name_menu); - name_menu->get_popup()->connect("about_to_show", this, "_name_menu_about_to_show"); - name_menu->get_popup()->connect("id_pressed", this, "_name_menu_cbk"); + name_menu->get_popup()->connect_compat("about_to_show", this, "_name_menu_about_to_show"); + name_menu->get_popup()->connect_compat("id_pressed", this, "_name_menu_cbk"); type_select_label = memnew(Label); type_select_label->set_text(TTR("Data Type:")); @@ -869,12 +869,12 @@ ThemeEditor::ThemeEditor() { dialog_vbc->add_child(type_select); - add_del_dialog->get_ok()->connect("pressed", this, "_dialog_cbk"); + add_del_dialog->get_ok()->connect_compat("pressed", this, "_dialog_cbk"); file_dialog = memnew(EditorFileDialog); file_dialog->add_filter("*.theme ; " + TTR("Theme File")); add_child(file_dialog); - file_dialog->connect("file_selected", this, "_save_template_cbk"); + file_dialog->connect_compat("file_selected", this, "_save_template_cbk"); } void ThemeEditorPlugin::edit(Object *p_node) { diff --git a/editor/plugins/tile_map_editor_plugin.cpp b/editor/plugins/tile_map_editor_plugin.cpp index 425a759dac..10d00b2a1d 100644 --- a/editor/plugins/tile_map_editor_plugin.cpp +++ b/editor/plugins/tile_map_editor_plugin.cpp @@ -55,7 +55,7 @@ void TileMapEditor::_notification(int p_what) { if (is_visible_in_tree()) { _update_palette(); } - FALLTHROUGH; + [[fallthrough]]; } case NOTIFICATION_ENTER_TREE: { @@ -598,7 +598,7 @@ void TileMapEditor::_pick_tile(const Point2 &p_pos) { CanvasItemEditor::get_singleton()->update_viewport(); } -PoolVector<Vector2> TileMapEditor::_bucket_fill(const Point2i &p_start, bool erase, bool preview) { +Vector<Vector2> TileMapEditor::_bucket_fill(const Point2i &p_start, bool erase, bool preview) { int prev_id = node->get_cell(p_start.x, p_start.y); Vector<int> ids; @@ -607,14 +607,14 @@ PoolVector<Vector2> TileMapEditor::_bucket_fill(const Point2i &p_start, bool era ids = get_selected_tiles(); if (ids.size() == 0 || ids[0] == TileMap::INVALID_CELL) - return PoolVector<Vector2>(); + return Vector<Vector2>(); } else if (prev_id == TileMap::INVALID_CELL) { - return PoolVector<Vector2>(); + return Vector<Vector2>(); } if (ids.size() == 1 && ids[0] == prev_id) { // Same ID, nothing to change - return PoolVector<Vector2>(); + return Vector<Vector2>(); } Rect2i r = node->get_used_rect(); @@ -640,14 +640,14 @@ PoolVector<Vector2> TileMapEditor::_bucket_fill(const Point2i &p_start, bool era if (invalidate_cache) { for (int i = 0; i < area; ++i) bucket_cache_visited[i] = false; - bucket_cache = PoolVector<Vector2>(); + bucket_cache = Vector<Vector2>(); bucket_cache_tile = prev_id; bucket_cache_rect = r; bucket_queue.clear(); } } - PoolVector<Vector2> points; + Vector<Vector2> points; Vector<Vector2> non_preview_cache; int count = 0; int limit = 0; @@ -698,10 +698,10 @@ PoolVector<Vector2> TileMapEditor::_bucket_fill(const Point2i &p_start, bool era return preview ? bucket_cache : points; } -void TileMapEditor::_fill_points(const PoolVector<Vector2> &p_points, const Dictionary &p_op) { +void TileMapEditor::_fill_points(const Vector<Vector2> &p_points, const Dictionary &p_op) { int len = p_points.size(); - PoolVector<Vector2>::Read pr = p_points.read(); + const Vector2 *pr = p_points.ptr(); Vector<int> ids = p_op["id"]; bool xf = p_op["flip_h"]; @@ -716,10 +716,10 @@ void TileMapEditor::_fill_points(const PoolVector<Vector2> &p_points, const Dict node->update_dirty_bitmask(); } -void TileMapEditor::_erase_points(const PoolVector<Vector2> &p_points) { +void TileMapEditor::_erase_points(const Vector<Vector2> &p_points) { int len = p_points.size(); - PoolVector<Vector2>::Read pr = p_points.read(); + const Vector2 *pr = p_points.ptr(); for (int i = 0; i < len; i++) { @@ -882,8 +882,8 @@ void TileMapEditor::_draw_cell(Control *p_viewport, int p_cell, const Point2i &p void TileMapEditor::_draw_fill_preview(Control *p_viewport, int p_cell, const Point2i &p_point, bool p_flip_h, bool p_flip_v, bool p_transpose, const Point2i &p_autotile_coord, const Transform2D &p_xform) { - PoolVector<Vector2> points = _bucket_fill(p_point, false, true); - PoolVector<Vector2>::Read pr = points.read(); + Vector<Vector2> points = _bucket_fill(p_point, false, true); + const Vector2 *pr = points.ptr(); int len = points.size(); for (int i = 0; i < len; ++i) { @@ -1109,7 +1109,7 @@ bool TileMapEditor::forward_gui_input(const Ref<InputEvent> &p_event) { } else if (tool == TOOL_BUCKET) { - PoolVector<Vector2> points = _bucket_fill(over_tile); + Vector<Vector2> points = _bucket_fill(over_tile); if (points.size() == 0) return false; @@ -1216,7 +1216,7 @@ bool TileMapEditor::forward_gui_input(const Ref<InputEvent> &p_event) { pop["flip_v"] = node->is_cell_y_flipped(over_tile.x, over_tile.y); pop["transpose"] = node->is_cell_transposed(over_tile.x, over_tile.y); - PoolVector<Vector2> points = _bucket_fill(over_tile, true); + Vector<Vector2> points = _bucket_fill(over_tile, true); if (points.size() == 0) return false; @@ -1761,30 +1761,30 @@ void TileMapEditor::edit(Node *p_tile_map) { } if (node) - node->disconnect("settings_changed", this, "_tileset_settings_changed"); + node->disconnect_compat("settings_changed", this, "_tileset_settings_changed"); if (p_tile_map) { node = Object::cast_to<TileMap>(p_tile_map); - if (!canvas_item_editor_viewport->is_connected("mouse_entered", this, "_canvas_mouse_enter")) - canvas_item_editor_viewport->connect("mouse_entered", this, "_canvas_mouse_enter"); - if (!canvas_item_editor_viewport->is_connected("mouse_exited", this, "_canvas_mouse_exit")) - canvas_item_editor_viewport->connect("mouse_exited", this, "_canvas_mouse_exit"); + if (!canvas_item_editor_viewport->is_connected_compat("mouse_entered", this, "_canvas_mouse_enter")) + canvas_item_editor_viewport->connect_compat("mouse_entered", this, "_canvas_mouse_enter"); + if (!canvas_item_editor_viewport->is_connected_compat("mouse_exited", this, "_canvas_mouse_exit")) + canvas_item_editor_viewport->connect_compat("mouse_exited", this, "_canvas_mouse_exit"); _update_palette(); } else { node = NULL; - if (canvas_item_editor_viewport->is_connected("mouse_entered", this, "_canvas_mouse_enter")) - canvas_item_editor_viewport->disconnect("mouse_entered", this, "_canvas_mouse_enter"); - if (canvas_item_editor_viewport->is_connected("mouse_exited", this, "_canvas_mouse_exit")) - canvas_item_editor_viewport->disconnect("mouse_exited", this, "_canvas_mouse_exit"); + if (canvas_item_editor_viewport->is_connected_compat("mouse_entered", this, "_canvas_mouse_enter")) + canvas_item_editor_viewport->disconnect_compat("mouse_entered", this, "_canvas_mouse_enter"); + if (canvas_item_editor_viewport->is_connected_compat("mouse_exited", this, "_canvas_mouse_exit")) + canvas_item_editor_viewport->disconnect_compat("mouse_exited", this, "_canvas_mouse_exit"); _update_palette(); } if (node) - node->connect("settings_changed", this, "_tileset_settings_changed"); + node->connect_compat("settings_changed", this, "_tileset_settings_changed"); _clear_bucket_cache(); } @@ -1939,20 +1939,20 @@ TileMapEditor::TileMapEditor(EditorNode *p_editor) { manual_button = memnew(CheckBox); manual_button->set_text(TTR("Disable Autotile")); - manual_button->connect("toggled", this, "_manual_toggled"); + manual_button->connect_compat("toggled", this, "_manual_toggled"); add_child(manual_button); priority_button = memnew(CheckBox); priority_button->set_text(TTR("Enable Priority")); - priority_button->connect("toggled", this, "_priority_toggled"); + priority_button->connect_compat("toggled", this, "_priority_toggled"); add_child(priority_button); search_box = memnew(LineEdit); search_box->set_placeholder(TTR("Filter tiles")); search_box->set_h_size_flags(SIZE_EXPAND_FILL); - search_box->connect("text_entered", this, "_text_entered"); - search_box->connect("text_changed", this, "_text_changed"); - search_box->connect("gui_input", this, "_sbox_input"); + search_box->connect_compat("text_entered", this, "_text_entered"); + search_box->connect_compat("text_changed", this, "_text_changed"); + search_box->connect_compat("gui_input", this, "_sbox_input"); add_child(search_box); size_slider = memnew(HSlider); @@ -1961,7 +1961,7 @@ TileMapEditor::TileMapEditor(EditorNode *p_editor) { size_slider->set_max(4.0f); size_slider->set_step(0.1f); size_slider->set_value(1.0f); - size_slider->connect("value_changed", this, "_icon_size_changed"); + size_slider->connect_compat("value_changed", this, "_icon_size_changed"); add_child(size_slider); int mw = EDITOR_DEF("editors/tile_map/palette_min_width", 80); @@ -1980,8 +1980,8 @@ TileMapEditor::TileMapEditor(EditorNode *p_editor) { palette->set_max_text_lines(2); palette->set_select_mode(ItemList::SELECT_MULTI); palette->add_constant_override("vseparation", 8 * EDSCALE); - palette->connect("item_selected", this, "_palette_selected"); - palette->connect("multi_selected", this, "_palette_multi_selected"); + palette->connect_compat("item_selected", this, "_palette_selected"); + palette->connect_compat("multi_selected", this, "_palette_multi_selected"); palette_container->add_child(palette); // Add message for when no texture is selected. @@ -2015,25 +2015,25 @@ TileMapEditor::TileMapEditor(EditorNode *p_editor) { paint_button = memnew(ToolButton); paint_button->set_shortcut(ED_SHORTCUT("tile_map_editor/paint_tile", TTR("Paint Tile"), KEY_P)); paint_button->set_tooltip(TTR("Shift+LMB: Line Draw\nShift+Ctrl+LMB: Rectangle Paint")); - paint_button->connect("pressed", this, "_button_tool_select", make_binds(TOOL_NONE)); + paint_button->connect_compat("pressed", this, "_button_tool_select", make_binds(TOOL_NONE)); paint_button->set_toggle_mode(true); toolbar->add_child(paint_button); bucket_fill_button = memnew(ToolButton); bucket_fill_button->set_shortcut(ED_SHORTCUT("tile_map_editor/bucket_fill", TTR("Bucket Fill"), KEY_G)); - bucket_fill_button->connect("pressed", this, "_button_tool_select", make_binds(TOOL_BUCKET)); + bucket_fill_button->connect_compat("pressed", this, "_button_tool_select", make_binds(TOOL_BUCKET)); bucket_fill_button->set_toggle_mode(true); toolbar->add_child(bucket_fill_button); picker_button = memnew(ToolButton); picker_button->set_shortcut(ED_SHORTCUT("tile_map_editor/pick_tile", TTR("Pick Tile"), KEY_I)); - picker_button->connect("pressed", this, "_button_tool_select", make_binds(TOOL_PICKING)); + picker_button->connect_compat("pressed", this, "_button_tool_select", make_binds(TOOL_PICKING)); picker_button->set_toggle_mode(true); toolbar->add_child(picker_button); select_button = memnew(ToolButton); select_button->set_shortcut(ED_SHORTCUT("tile_map_editor/select", TTR("Select"), KEY_M)); - select_button->connect("pressed", this, "_button_tool_select", make_binds(TOOL_SELECTING)); + select_button->connect_compat("pressed", this, "_button_tool_select", make_binds(TOOL_SELECTING)); select_button->set_toggle_mode(true); toolbar->add_child(select_button); @@ -2068,40 +2068,40 @@ TileMapEditor::TileMapEditor(EditorNode *p_editor) { p->add_shortcut(ED_GET_SHORTCUT("tile_map_editor/erase_selection"), OPTION_ERASE_SELECTION); p->add_separator(); p->add_item(TTR("Fix Invalid Tiles"), OPTION_FIX_INVALID); - p->connect("id_pressed", this, "_menu_option"); + p->connect_compat("id_pressed", this, "_menu_option"); rotate_left_button = memnew(ToolButton); rotate_left_button->set_tooltip(TTR("Rotate Left")); rotate_left_button->set_focus_mode(FOCUS_NONE); - rotate_left_button->connect("pressed", this, "_rotate", varray(-1)); + rotate_left_button->connect_compat("pressed", this, "_rotate", varray(-1)); rotate_left_button->set_shortcut(ED_SHORTCUT("tile_map_editor/rotate_left", TTR("Rotate Left"), KEY_A)); tool_hb->add_child(rotate_left_button); rotate_right_button = memnew(ToolButton); rotate_right_button->set_tooltip(TTR("Rotate Right")); rotate_right_button->set_focus_mode(FOCUS_NONE); - rotate_right_button->connect("pressed", this, "_rotate", varray(1)); + rotate_right_button->connect_compat("pressed", this, "_rotate", varray(1)); rotate_right_button->set_shortcut(ED_SHORTCUT("tile_map_editor/rotate_right", TTR("Rotate Right"), KEY_S)); tool_hb->add_child(rotate_right_button); flip_horizontal_button = memnew(ToolButton); flip_horizontal_button->set_tooltip(TTR("Flip Horizontally")); flip_horizontal_button->set_focus_mode(FOCUS_NONE); - flip_horizontal_button->connect("pressed", this, "_flip_horizontal"); + flip_horizontal_button->connect_compat("pressed", this, "_flip_horizontal"); flip_horizontal_button->set_shortcut(ED_SHORTCUT("tile_map_editor/flip_horizontal", TTR("Flip Horizontally"), KEY_X)); tool_hb->add_child(flip_horizontal_button); flip_vertical_button = memnew(ToolButton); flip_vertical_button->set_tooltip(TTR("Flip Vertically")); flip_vertical_button->set_focus_mode(FOCUS_NONE); - flip_vertical_button->connect("pressed", this, "_flip_vertical"); + flip_vertical_button->connect_compat("pressed", this, "_flip_vertical"); flip_vertical_button->set_shortcut(ED_SHORTCUT("tile_map_editor/flip_vertical", TTR("Flip Vertically"), KEY_Z)); tool_hb->add_child(flip_vertical_button); clear_transform_button = memnew(ToolButton); clear_transform_button->set_tooltip(TTR("Clear Transform")); clear_transform_button->set_focus_mode(FOCUS_NONE); - clear_transform_button->connect("pressed", this, "_clear_transform"); + clear_transform_button->connect_compat("pressed", this, "_clear_transform"); clear_transform_button->set_shortcut(ED_SHORTCUT("tile_map_editor/clear_transform", TTR("Clear Transform"), KEY_W)); tool_hb->add_child(clear_transform_button); diff --git a/editor/plugins/tile_map_editor_plugin.h b/editor/plugins/tile_map_editor_plugin.h index 927f0887bb..74969d3e64 100644 --- a/editor/plugins/tile_map_editor_plugin.h +++ b/editor/plugins/tile_map_editor_plugin.h @@ -123,7 +123,7 @@ class TileMapEditor : public VBoxContainer { bool *bucket_cache_visited; Rect2i bucket_cache_rect; int bucket_cache_tile; - PoolVector<Vector2> bucket_cache; + Vector<Vector2> bucket_cache; List<Point2i> bucket_queue; struct CellOp { @@ -164,10 +164,10 @@ class TileMapEditor : public VBoxContainer { void _pick_tile(const Point2 &p_pos); - PoolVector<Vector2> _bucket_fill(const Point2i &p_start, bool erase = false, bool preview = false); + Vector<Vector2> _bucket_fill(const Point2i &p_start, bool erase = false, bool preview = false); - void _fill_points(const PoolVector<Vector2> &p_points, const Dictionary &p_op); - void _erase_points(const PoolVector<Vector2> &p_points); + void _fill_points(const Vector<Vector2> &p_points, const Dictionary &p_op); + void _erase_points(const Vector<Vector2> &p_points); void _select(const Point2i &p_from, const Point2i &p_to); void _erase_selection(); diff --git a/editor/plugins/tile_set_editor_plugin.cpp b/editor/plugins/tile_set_editor_plugin.cpp index ce865510b4..a61b291029 100644 --- a/editor/plugins/tile_set_editor_plugin.cpp +++ b/editor/plugins/tile_set_editor_plugin.cpp @@ -251,7 +251,7 @@ void TileSetEditor::drop_data_fw(const Point2 &p_point, const Variant &p_data, C if (String(d["type"]) == "files") { - PoolVector<String> files = d["files"]; + Vector<String> files = d["files"]; _on_textures_added(files); } @@ -358,19 +358,19 @@ TileSetEditor::TileSetEditor(EditorNode *p_editor) { left_container->add_child(texture_list); texture_list->set_v_size_flags(SIZE_EXPAND_FILL); texture_list->set_custom_minimum_size(Size2(200, 0)); - texture_list->connect("item_selected", this, "_on_texture_list_selected"); + texture_list->connect_compat("item_selected", this, "_on_texture_list_selected"); texture_list->set_drag_forwarding(this); HBoxContainer *tileset_toolbar_container = memnew(HBoxContainer); left_container->add_child(tileset_toolbar_container); tileset_toolbar_buttons[TOOL_TILESET_ADD_TEXTURE] = memnew(ToolButton); - tileset_toolbar_buttons[TOOL_TILESET_ADD_TEXTURE]->connect("pressed", this, "_on_tileset_toolbar_button_pressed", varray(TOOL_TILESET_ADD_TEXTURE)); + tileset_toolbar_buttons[TOOL_TILESET_ADD_TEXTURE]->connect_compat("pressed", this, "_on_tileset_toolbar_button_pressed", varray(TOOL_TILESET_ADD_TEXTURE)); tileset_toolbar_container->add_child(tileset_toolbar_buttons[TOOL_TILESET_ADD_TEXTURE]); tileset_toolbar_buttons[TOOL_TILESET_ADD_TEXTURE]->set_tooltip(TTR("Add Texture(s) to TileSet.")); tileset_toolbar_buttons[TOOL_TILESET_REMOVE_TEXTURE] = memnew(ToolButton); - tileset_toolbar_buttons[TOOL_TILESET_REMOVE_TEXTURE]->connect("pressed", this, "_on_tileset_toolbar_button_pressed", varray(TOOL_TILESET_REMOVE_TEXTURE)); + tileset_toolbar_buttons[TOOL_TILESET_REMOVE_TEXTURE]->connect_compat("pressed", this, "_on_tileset_toolbar_button_pressed", varray(TOOL_TILESET_REMOVE_TEXTURE)); tileset_toolbar_container->add_child(tileset_toolbar_buttons[TOOL_TILESET_REMOVE_TEXTURE]); tileset_toolbar_buttons[TOOL_TILESET_REMOVE_TEXTURE]->set_tooltip(TTR("Remove selected Texture from TileSet.")); @@ -383,7 +383,7 @@ TileSetEditor::TileSetEditor(EditorNode *p_editor) { tileset_toolbar_tools->get_popup()->add_item(TTR("Create from Scene"), TOOL_TILESET_CREATE_SCENE); tileset_toolbar_tools->get_popup()->add_item(TTR("Merge from Scene"), TOOL_TILESET_MERGE_SCENE); - tileset_toolbar_tools->get_popup()->connect("id_pressed", this, "_on_tileset_toolbar_button_pressed"); + tileset_toolbar_tools->get_popup()->connect_compat("id_pressed", this, "_on_tileset_toolbar_button_pressed"); tileset_toolbar_container->add_child(tileset_toolbar_tools); //--------------- @@ -416,7 +416,7 @@ TileSetEditor::TileSetEditor(EditorNode *p_editor) { tool_workspacemode[i]->set_text(workspace_label[i]); tool_workspacemode[i]->set_toggle_mode(true); tool_workspacemode[i]->set_button_group(g); - tool_workspacemode[i]->connect("pressed", this, "_on_workspace_mode_changed", varray(i)); + tool_workspacemode[i]->connect_compat("pressed", this, "_on_workspace_mode_changed", varray(i)); tool_hb->add_child(tool_workspacemode[i]); } @@ -429,14 +429,14 @@ TileSetEditor::TileSetEditor(EditorNode *p_editor) { tool_hb->add_child(tools[SELECT_NEXT]); tool_hb->move_child(tools[SELECT_NEXT], WORKSPACE_CREATE_SINGLE); tools[SELECT_NEXT]->set_shortcut(ED_SHORTCUT("tileset_editor/next_shape", TTR("Next Coordinate"), KEY_PAGEDOWN)); - tools[SELECT_NEXT]->connect("pressed", this, "_on_tool_clicked", varray(SELECT_NEXT)); + tools[SELECT_NEXT]->connect_compat("pressed", this, "_on_tool_clicked", varray(SELECT_NEXT)); tools[SELECT_NEXT]->set_tooltip(TTR("Select the next shape, subtile, or Tile.")); tools[SELECT_PREVIOUS] = memnew(ToolButton); tool_hb->add_child(tools[SELECT_PREVIOUS]); tool_hb->move_child(tools[SELECT_PREVIOUS], WORKSPACE_CREATE_SINGLE); tools[SELECT_PREVIOUS]->set_shortcut(ED_SHORTCUT("tileset_editor/previous_shape", TTR("Previous Coordinate"), KEY_PAGEUP)); tools[SELECT_PREVIOUS]->set_tooltip(TTR("Select the previous shape, subtile, or Tile.")); - tools[SELECT_PREVIOUS]->connect("pressed", this, "_on_tool_clicked", varray(SELECT_PREVIOUS)); + tools[SELECT_PREVIOUS]->connect_compat("pressed", this, "_on_tool_clicked", varray(SELECT_PREVIOUS)); VSeparator *separator_shape_selection = memnew(VSeparator); tool_hb->add_child(separator_shape_selection); @@ -466,7 +466,7 @@ TileSetEditor::TileSetEditor(EditorNode *p_editor) { tool_editmode[i]->set_text(label[i]); tool_editmode[i]->set_toggle_mode(true); tool_editmode[i]->set_button_group(g); - tool_editmode[i]->connect("pressed", this, "_on_edit_mode_changed", varray(i)); + tool_editmode[i]->connect_compat("pressed", this, "_on_edit_mode_changed", varray(i)); tool_hb->add_child(tool_editmode[i]); } tool_editmode[EDITMODE_COLLISION]->set_pressed(true); @@ -493,21 +493,21 @@ TileSetEditor::TileSetEditor(EditorNode *p_editor) { tools[TOOL_SELECT]->set_toggle_mode(true); tools[TOOL_SELECT]->set_button_group(tg); tools[TOOL_SELECT]->set_pressed(true); - tools[TOOL_SELECT]->connect("pressed", this, "_on_tool_clicked", varray(TOOL_SELECT)); + tools[TOOL_SELECT]->connect_compat("pressed", this, "_on_tool_clicked", varray(TOOL_SELECT)); separator_bitmask = memnew(VSeparator); toolbar->add_child(separator_bitmask); tools[BITMASK_COPY] = memnew(ToolButton); tools[BITMASK_COPY]->set_tooltip(TTR("Copy bitmask.")); - tools[BITMASK_COPY]->connect("pressed", this, "_on_tool_clicked", varray(BITMASK_COPY)); + tools[BITMASK_COPY]->connect_compat("pressed", this, "_on_tool_clicked", varray(BITMASK_COPY)); toolbar->add_child(tools[BITMASK_COPY]); tools[BITMASK_PASTE] = memnew(ToolButton); tools[BITMASK_PASTE]->set_tooltip(TTR("Paste bitmask.")); - tools[BITMASK_PASTE]->connect("pressed", this, "_on_tool_clicked", varray(BITMASK_PASTE)); + tools[BITMASK_PASTE]->connect_compat("pressed", this, "_on_tool_clicked", varray(BITMASK_PASTE)); toolbar->add_child(tools[BITMASK_PASTE]); tools[BITMASK_CLEAR] = memnew(ToolButton); tools[BITMASK_CLEAR]->set_tooltip(TTR("Erase bitmask.")); - tools[BITMASK_CLEAR]->connect("pressed", this, "_on_tool_clicked", varray(BITMASK_CLEAR)); + tools[BITMASK_CLEAR]->connect_compat("pressed", this, "_on_tool_clicked", varray(BITMASK_CLEAR)); toolbar->add_child(tools[BITMASK_CLEAR]); tools[SHAPE_NEW_RECTANGLE] = memnew(ToolButton); @@ -525,13 +525,13 @@ TileSetEditor::TileSetEditor(EditorNode *p_editor) { separator_shape_toggle = memnew(VSeparator); toolbar->add_child(separator_shape_toggle); tools[SHAPE_TOGGLE_TYPE] = memnew(ToolButton); - tools[SHAPE_TOGGLE_TYPE]->connect("pressed", this, "_on_tool_clicked", varray(SHAPE_TOGGLE_TYPE)); + tools[SHAPE_TOGGLE_TYPE]->connect_compat("pressed", this, "_on_tool_clicked", varray(SHAPE_TOGGLE_TYPE)); toolbar->add_child(tools[SHAPE_TOGGLE_TYPE]); separator_delete = memnew(VSeparator); toolbar->add_child(separator_delete); tools[SHAPE_DELETE] = memnew(ToolButton); - tools[SHAPE_DELETE]->connect("pressed", this, "_on_tool_clicked", varray(SHAPE_DELETE)); + tools[SHAPE_DELETE]->connect_compat("pressed", this, "_on_tool_clicked", varray(SHAPE_DELETE)); toolbar->add_child(tools[SHAPE_DELETE]); spin_priority = memnew(SpinBox); @@ -539,7 +539,7 @@ TileSetEditor::TileSetEditor(EditorNode *p_editor) { spin_priority->set_max(255); spin_priority->set_step(1); spin_priority->set_custom_minimum_size(Size2(100, 0)); - spin_priority->connect("value_changed", this, "_on_priority_changed"); + spin_priority->connect_compat("value_changed", this, "_on_priority_changed"); spin_priority->hide(); toolbar->add_child(spin_priority); @@ -548,7 +548,7 @@ TileSetEditor::TileSetEditor(EditorNode *p_editor) { spin_z_index->set_max(VS::CANVAS_ITEM_Z_MAX); spin_z_index->set_step(1); spin_z_index->set_custom_minimum_size(Size2(100, 0)); - spin_z_index->connect("value_changed", this, "_on_z_index_changed"); + spin_z_index->connect_compat("value_changed", this, "_on_z_index_changed"); spin_z_index->hide(); toolbar->add_child(spin_z_index); @@ -562,7 +562,7 @@ TileSetEditor::TileSetEditor(EditorNode *p_editor) { tools[TOOL_GRID_SNAP] = memnew(ToolButton); tools[TOOL_GRID_SNAP]->set_toggle_mode(true); tools[TOOL_GRID_SNAP]->set_tooltip(TTR("Enable snap and show grid (configurable via the Inspector).")); - tools[TOOL_GRID_SNAP]->connect("toggled", this, "_on_grid_snap_toggled"); + tools[TOOL_GRID_SNAP]->connect_compat("toggled", this, "_on_grid_snap_toggled"); toolbar->add_child(tools[TOOL_GRID_SNAP]); Control *separator = memnew(Control); @@ -570,15 +570,15 @@ TileSetEditor::TileSetEditor(EditorNode *p_editor) { toolbar->add_child(separator); tools[ZOOM_OUT] = memnew(ToolButton); - tools[ZOOM_OUT]->connect("pressed", this, "_zoom_out"); + tools[ZOOM_OUT]->connect_compat("pressed", this, "_zoom_out"); toolbar->add_child(tools[ZOOM_OUT]); tools[ZOOM_OUT]->set_tooltip(TTR("Zoom Out")); tools[ZOOM_1] = memnew(ToolButton); - tools[ZOOM_1]->connect("pressed", this, "_zoom_reset"); + tools[ZOOM_1]->connect_compat("pressed", this, "_zoom_reset"); toolbar->add_child(tools[ZOOM_1]); tools[ZOOM_1]->set_tooltip(TTR("Zoom Reset")); tools[ZOOM_IN] = memnew(ToolButton); - tools[ZOOM_IN]->connect("pressed", this, "_zoom_in"); + tools[ZOOM_IN]->connect_compat("pressed", this, "_zoom_in"); toolbar->add_child(tools[ZOOM_IN]); tools[ZOOM_IN]->set_tooltip(TTR("Zoom In")); @@ -607,13 +607,13 @@ TileSetEditor::TileSetEditor(EditorNode *p_editor) { scroll->add_child(workspace_container); workspace_overlay = memnew(Control); - workspace_overlay->connect("draw", this, "_on_workspace_overlay_draw"); + workspace_overlay->connect_compat("draw", this, "_on_workspace_overlay_draw"); workspace_container->add_child(workspace_overlay); workspace = memnew(Control); workspace->set_focus_mode(FOCUS_ALL); - workspace->connect("draw", this, "_on_workspace_draw"); - workspace->connect("gui_input", this, "_on_workspace_input"); + workspace->connect_compat("draw", this, "_on_workspace_draw"); + workspace->connect_compat("gui_input", this, "_on_workspace_input"); workspace->set_draw_behind_parent(true); workspace_overlay->add_child(workspace); @@ -626,7 +626,7 @@ TileSetEditor::TileSetEditor(EditorNode *p_editor) { //--------------- cd = memnew(ConfirmationDialog); add_child(cd); - cd->connect("confirmed", this, "_on_tileset_toolbar_confirm"); + cd->connect_compat("confirmed", this, "_on_tileset_toolbar_confirm"); //--------------- err_dialog = memnew(AcceptDialog); @@ -645,7 +645,7 @@ TileSetEditor::TileSetEditor(EditorNode *p_editor) { texture_dialog->add_filter("*." + E->get() + " ; " + E->get().to_upper()); } add_child(texture_dialog); - texture_dialog->connect("files_selected", this, "_on_textures_added"); + texture_dialog->connect_compat("files_selected", this, "_on_textures_added"); //--------------- helper = memnew(TilesetEditorContext(this)); @@ -750,7 +750,7 @@ void TileSetEditor::_on_texture_list_selected(int p_index) { workspace->update(); } -void TileSetEditor::_on_textures_added(const PoolStringArray &p_paths) { +void TileSetEditor::_on_textures_added(const PackedStringArray &p_paths) { int invalid_count = 0; for (int i = 0; i < p_paths.size(); i++) { Ref<Texture2D> t = Ref<Texture2D>(ResourceLoader::load(p_paths[i])); @@ -1618,16 +1618,14 @@ void TileSetEditor::_on_workspace_input(const Ref<InputEvent> &p_ie) { if (dragging_point >= 0) { dragging_point = -1; - PoolVector<Vector2> polygon; + Vector<Vector2> polygon; polygon.resize(current_shape.size()); - PoolVector<Vector2>::Write w = polygon.write(); + Vector2 *w = polygon.ptrw(); for (int i = 0; i < current_shape.size(); i++) { w[i] = current_shape[i] - shape_anchor; } - w.release(); - undo_redo->create_action(TTR("Edit Occlusion Polygon")); undo_redo->add_do_method(edited_occlusion_shape.ptr(), "set_polygon", polygon); undo_redo->add_undo_method(edited_occlusion_shape.ptr(), "set_polygon", edited_occlusion_shape->get_polygon()); @@ -1639,18 +1637,16 @@ void TileSetEditor::_on_workspace_input(const Ref<InputEvent> &p_ie) { if (dragging_point >= 0) { dragging_point = -1; - PoolVector<Vector2> polygon; + Vector<Vector2> polygon; Vector<int> indices; polygon.resize(current_shape.size()); - PoolVector<Vector2>::Write w = polygon.write(); + Vector2 *w = polygon.ptrw(); for (int i = 0; i < current_shape.size(); i++) { w[i] = current_shape[i] - shape_anchor; indices.push_back(i); } - w.release(); - undo_redo->create_action(TTR("Edit Navigation Polygon")); undo_redo->add_do_method(edited_navigation_shape.ptr(), "set_vertices", polygon); undo_redo->add_undo_method(edited_navigation_shape.ptr(), "set_vertices", edited_navigation_shape->get_vertices()); @@ -1983,7 +1979,7 @@ void TileSetEditor::_set_edited_shape_points(const Vector<Vector2> &points) { undo_redo->add_do_method(convex.ptr(), "set_points", points); undo_redo->add_undo_method(convex.ptr(), "set_points", _get_edited_shape_points()); } else if (concave.is_valid()) { - PoolVector2Array segments; + PackedVector2Array segments; for (int i = 0; i < points.size() - 1; i++) { segments.push_back(points[i]); segments.push_back(points[i + 1]); @@ -2782,7 +2778,7 @@ void TileSetEditor::draw_polygon_shapes() { colors.push_back(c_bg); } } else { - PoolVector<Vector2> vertices = shape->get_vertices(); + Vector<Vector2> vertices = shape->get_vertices(); for (int j = 0; j < shape->get_polygon(0).size(); j++) { polygon.push_back(vertices[shape->get_polygon(0)[j]] + anchor); colors.push_back(c_bg); @@ -2830,7 +2826,7 @@ void TileSetEditor::draw_polygon_shapes() { colors.push_back(c_bg); } } else { - PoolVector<Vector2> vertices = shape->get_vertices(); + Vector<Vector2> vertices = shape->get_vertices(); for (int j = 0; j < shape->get_polygon(0).size(); j++) { polygon.push_back(vertices[shape->get_polygon(0)[j]] + anchor); colors.push_back(c_bg); @@ -2917,15 +2913,14 @@ void TileSetEditor::close_shape(const Vector2 &shape_anchor) { } else if (edit_mode == EDITMODE_OCCLUSION) { Ref<OccluderPolygon2D> shape = memnew(OccluderPolygon2D); - PoolVector<Vector2> polygon; + Vector<Vector2> polygon; polygon.resize(current_shape.size()); - PoolVector<Vector2>::Write w = polygon.write(); + Vector2 *w = polygon.ptrw(); for (int i = 0; i < current_shape.size(); i++) { w[i] = current_shape[i] - shape_anchor; } - w.release(); shape->set_polygon(polygon); undo_redo->create_action(TTR("Create Occlusion Polygon")); @@ -2943,17 +2938,16 @@ void TileSetEditor::close_shape(const Vector2 &shape_anchor) { } else if (edit_mode == EDITMODE_NAVIGATION) { Ref<NavigationPolygon> shape = memnew(NavigationPolygon); - PoolVector<Vector2> polygon; + Vector<Vector2> polygon; Vector<int> indices; polygon.resize(current_shape.size()); - PoolVector<Vector2>::Write w = polygon.write(); + Vector2 *w = polygon.ptrw(); for (int i = 0; i < current_shape.size(); i++) { w[i] = current_shape[i] - shape_anchor; indices.push_back(i); } - w.release(); shape->set_vertices(polygon); shape->add_polygon(indices); @@ -2975,7 +2969,7 @@ void TileSetEditor::close_shape(const Vector2 &shape_anchor) { void TileSetEditor::select_coord(const Vector2 &coord) { _update_tile_data(); - current_shape = PoolVector2Array(); + current_shape = PackedVector2Array(); if (get_current_tile() == -1) return; Rect2 current_tile_region = tileset->tile_get_region(get_current_tile()); @@ -3006,7 +3000,7 @@ void TileSetEditor::select_coord(const Vector2 &coord) { current_shape.resize(0); if (edited_navigation_shape.is_valid()) { if (edited_navigation_shape->get_polygon_count() > 0) { - PoolVector<Vector2> vertices = edited_navigation_shape->get_vertices(); + Vector<Vector2> vertices = edited_navigation_shape->get_vertices(); for (int i = 0; i < edited_navigation_shape->get_polygon(0).size(); i++) { current_shape.push_back(vertices[edited_navigation_shape->get_polygon(0)[i]] + current_tile_region.position); } @@ -3055,7 +3049,7 @@ void TileSetEditor::select_coord(const Vector2 &coord) { current_shape.resize(0); if (edited_navigation_shape.is_valid()) { if (edited_navigation_shape->get_polygon_count() > 0) { - PoolVector<Vector2> vertices = edited_navigation_shape->get_vertices(); + Vector<Vector2> vertices = edited_navigation_shape->get_vertices(); for (int i = 0; i < edited_navigation_shape->get_polygon(0).size(); i++) { current_shape.push_back(vertices[edited_navigation_shape->get_polygon(0)[i]] + shape_anchor); } @@ -3513,7 +3507,7 @@ void TilesetEditorContext::_get_property_list(List<PropertyInfo> *p_list) const p_list->push_back(PropertyInfo(Variant::OBJECT, "selected_collision", PROPERTY_HINT_RESOURCE_TYPE, tileset_editor->edited_collision_shape->get_class())); if (tileset_editor->edited_collision_shape.is_valid()) { p_list->push_back(PropertyInfo(Variant::BOOL, "selected_collision_one_way", PROPERTY_HINT_NONE)); - p_list->push_back(PropertyInfo(Variant::REAL, "selected_collision_one_way_margin", PROPERTY_HINT_NONE)); + p_list->push_back(PropertyInfo(Variant::FLOAT, "selected_collision_one_way_margin", PROPERTY_HINT_NONE)); } } if (tileset_editor->edit_mode == TileSetEditor::EDITMODE_NAVIGATION && tileset_editor->edited_navigation_shape.is_valid()) { @@ -3554,11 +3548,11 @@ void TileSetEditorPlugin::make_visible(bool p_visible) { if (p_visible) { tileset_editor_button->show(); editor->make_bottom_panel_item_visible(tileset_editor); - get_tree()->connect("idle_frame", tileset_editor, "_on_workspace_process"); + get_tree()->connect_compat("idle_frame", tileset_editor, "_on_workspace_process"); } else { editor->hide_bottom_panel(); tileset_editor_button->hide(); - get_tree()->disconnect("idle_frame", tileset_editor, "_on_workspace_process"); + get_tree()->disconnect_compat("idle_frame", tileset_editor, "_on_workspace_process"); } } diff --git a/editor/plugins/tile_set_editor_plugin.h b/editor/plugins/tile_set_editor_plugin.h index 26340824a0..7b49e2ece2 100644 --- a/editor/plugins/tile_set_editor_plugin.h +++ b/editor/plugins/tile_set_editor_plugin.h @@ -123,7 +123,7 @@ class TileSetEditor : public HSplitContainer { Rect2 edited_region; bool draw_edited_region; Vector2 edited_shape_coord; - PoolVector2Array current_shape; + PackedVector2Array current_shape; Map<Vector2i, SubtileData> current_tile_data; Map<Vector2, uint32_t> bitmask_map_copy; @@ -178,7 +178,7 @@ class TileSetEditor : public HSplitContainer { Variant get_drag_data_fw(const Point2 &p_point, Control *p_from); bool can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const; void drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from); - void _file_load_request(const PoolVector<String> &p_path, int p_at_pos = -1); + void _file_load_request(const Vector<String> &p_path, int p_at_pos = -1); protected: static void _bind_methods(); @@ -195,7 +195,7 @@ private: void _on_tileset_toolbar_button_pressed(int p_index); void _on_tileset_toolbar_confirm(); void _on_texture_list_selected(int p_index); - void _on_textures_added(const PoolStringArray &p_paths); + void _on_textures_added(const PackedStringArray &p_paths); void _on_edit_mode_changed(int p_edit_mode); void _on_workspace_mode_changed(int p_workspace_mode); void _on_workspace_overlay_draw(); diff --git a/editor/plugins/version_control_editor_plugin.cpp b/editor/plugins/version_control_editor_plugin.cpp index 3622ca8d61..cfa10488ab 100644 --- a/editor/plugins/version_control_editor_plugin.cpp +++ b/editor/plugins/version_control_editor_plugin.cpp @@ -124,10 +124,10 @@ void VersionControlEditorPlugin::_initialize_vcs() { ERR_FAIL_COND_MSG(!addon_script_instance, "Failed to create addon script instance."); // The addon is attached as a script to the VCS interface as a proxy end-point - vcs_interface->set_script_and_instance(script.get_ref_ptr(), addon_script_instance); + vcs_interface->set_script_and_instance(script, addon_script_instance); EditorVCSInterface::set_singleton(vcs_interface); - EditorFileSystem::get_singleton()->connect("filesystem_changed", this, "_refresh_stage_area"); + EditorFileSystem::get_singleton()->connect_compat("filesystem_changed", this, "_refresh_stage_area"); String res_dir = OS::get_singleton()->get_resource_dir(); @@ -388,8 +388,8 @@ void VersionControlEditorPlugin::clear_stage_area() { void VersionControlEditorPlugin::shut_down() { if (EditorVCSInterface::get_singleton()) { - if (EditorFileSystem::get_singleton()->is_connected("filesystem_changed", this, "_refresh_stage_area")) { - EditorFileSystem::get_singleton()->disconnect("filesystem_changed", this, "_refresh_stage_area"); + if (EditorFileSystem::get_singleton()->is_connected_compat("filesystem_changed", this, "_refresh_stage_area")) { + EditorFileSystem::get_singleton()->disconnect_compat("filesystem_changed", this, "_refresh_stage_area"); } EditorVCSInterface::get_singleton()->shut_down(); memdelete(EditorVCSInterface::get_singleton()); @@ -444,14 +444,14 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() { set_up_choice = memnew(OptionButton); set_up_choice->set_h_size_flags(HBoxContainer::SIZE_EXPAND_FILL); - set_up_choice->connect("item_selected", this, "_selected_a_vcs"); + set_up_choice->connect_compat("item_selected", this, "_selected_a_vcs"); set_up_hbc->add_child(set_up_choice); set_up_init_settings = NULL; set_up_init_button = memnew(Button); set_up_init_button->set_text(TTR("Initialize")); - set_up_init_button->connect("pressed", this, "_initialize_vcs"); + set_up_init_button->connect_compat("pressed", this, "_initialize_vcs"); set_up_vbc->add_child(set_up_init_button); version_control_actions->set_v_size_flags(PopupMenu::SIZE_EXPAND_FILL); @@ -479,7 +479,7 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() { refresh_button->set_tooltip(TTR("Detect new changes")); refresh_button->set_text(TTR("Refresh")); refresh_button->set_icon(EditorNode::get_singleton()->get_gui_base()->get_icon("Reload", "EditorIcons")); - refresh_button->connect("pressed", this, "_refresh_stage_area"); + refresh_button->connect_compat("pressed", this, "_refresh_stage_area"); stage_tools->add_child(refresh_button); stage_files = memnew(Tree); @@ -492,7 +492,7 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() { stage_files->set_allow_rmb_select(true); stage_files->set_select_mode(Tree::SelectMode::SELECT_MULTI); stage_files->set_edit_checkbox_cell_only_when_checkbox_is_pressed(true); - stage_files->connect("cell_selected", this, "_view_file_diff"); + stage_files->connect_compat("cell_selected", this, "_view_file_diff"); stage_files->create_item(); stage_files->set_hide_root(true); commit_box_vbc->add_child(stage_files); @@ -516,12 +516,12 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() { stage_selected_button = memnew(Button); stage_selected_button->set_h_size_flags(Button::SIZE_EXPAND_FILL); stage_selected_button->set_text(TTR("Stage Selected")); - stage_selected_button->connect("pressed", this, "_stage_selected"); + stage_selected_button->connect_compat("pressed", this, "_stage_selected"); stage_buttons->add_child(stage_selected_button); stage_all_button = memnew(Button); stage_all_button->set_text(TTR("Stage All")); - stage_all_button->connect("pressed", this, "_stage_all"); + stage_all_button->connect_compat("pressed", this, "_stage_all"); stage_buttons->add_child(stage_all_button); commit_box_vbc->add_child(memnew(HSeparator)); @@ -537,7 +537,7 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() { commit_button = memnew(Button); commit_button->set_text(TTR("Commit Changes")); - commit_button->connect("pressed", this, "_send_commit_msg"); + commit_button->connect_compat("pressed", this, "_send_commit_msg"); commit_box_vbc->add_child(commit_button); commit_status = memnew(Label); @@ -571,7 +571,7 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() { diff_refresh_button = memnew(Button); diff_refresh_button->set_tooltip(TTR("Detect changes in file diff")); diff_refresh_button->set_icon(EditorNode::get_singleton()->get_gui_base()->get_icon("Reload", "EditorIcons")); - diff_refresh_button->connect("pressed", this, "_refresh_file_diff"); + diff_refresh_button->connect_compat("pressed", this, "_refresh_file_diff"); diff_hbc->add_child(diff_refresh_button); diff = memnew(RichTextLabel); diff --git a/editor/plugins/visual_shader_editor_plugin.cpp b/editor/plugins/visual_shader_editor_plugin.cpp index ebd7b4edf6..2fb23f6a84 100644 --- a/editor/plugins/visual_shader_editor_plugin.cpp +++ b/editor/plugins/visual_shader_editor_plugin.cpp @@ -35,6 +35,7 @@ #include "core/os/input.h" #include "core/os/keyboard.h" #include "core/project_settings.h" +#include "core/version.h" #include "editor/editor_log.h" #include "editor/editor_properties.h" #include "editor/editor_scale.h" @@ -72,14 +73,20 @@ void VisualShaderEditor::edit(VisualShader *p_visual_shader) { } } visual_shader = Ref<VisualShader>(p_visual_shader); - if (!visual_shader->is_connected("changed", this, "_update_preview")) { - visual_shader->connect("changed", this, "_update_preview"); + if (!visual_shader->is_connected_compat("changed", this, "_update_preview")) { + visual_shader->connect_compat("changed", this, "_update_preview"); } +#ifndef DISABLE_DEPRECATED + String version = VERSION_BRANCH; + if (visual_shader->get_version() != version) { + visual_shader->update_version(version); + } +#endif visual_shader->set_graph_offset(graph->get_scroll_ofs() / EDSCALE); } else { if (visual_shader.is_valid()) { - if (visual_shader->is_connected("changed", this, "")) { - visual_shader->disconnect("changed", this, "_update_preview"); + if (visual_shader->is_connected_compat("changed", this, "")) { + visual_shader->disconnect_compat("changed", this, "_update_preview"); } } visual_shader.unref(); @@ -116,7 +123,7 @@ void VisualShaderEditor::clear_custom_types() { } } -void VisualShaderEditor::add_custom_type(const String &p_name, const Ref<Script> &p_script, const String &p_description, int p_return_icon_type, const String &p_category, const String &p_subcategory, bool p_highend) { +void VisualShaderEditor::add_custom_type(const String &p_name, const Ref<Script> &p_script, const String &p_description, int p_return_icon_type, const String &p_category, bool p_highend) { ERR_FAIL_COND(!p_name.is_valid_identifier()); ERR_FAIL_COND(!p_script.is_valid()); @@ -134,15 +141,15 @@ void VisualShaderEditor::add_custom_type(const String &p_name, const Ref<Script> ao.return_type = p_return_icon_type; ao.description = p_description; ao.category = p_category; - ao.sub_category = p_subcategory; ao.highend = p_highend; ao.is_custom = true; bool begin = false; + String root = p_category.split("/")[0]; for (int i = 0; i < add_options.size(); i++) { if (add_options[i].is_custom) { - if (add_options[i].category == p_category) { + if (add_options[i].category == root) { if (!begin) { begin = true; } @@ -216,7 +223,7 @@ void VisualShaderEditor::update_custom_nodes() { Ref<VisualShaderNodeCustom> ref; ref.instance(); - ref->set_script(script.get_ref_ptr()); + ref->set_script(script); String name; if (ref->has_method("_get_name")) { @@ -239,9 +246,6 @@ void VisualShaderEditor::update_custom_nodes() { if (ref->has_method("_get_category")) { category = (String)ref->call("_get_category"); } - if (category == "") { - category = "Custom"; - } String subcategory = ""; if (ref->has_method("_get_subcategory")) { @@ -258,18 +262,19 @@ void VisualShaderEditor::update_custom_nodes() { dict["script"] = script; dict["description"] = description; dict["return_icon_type"] = return_icon_type; + + category = category.rstrip("/"); + category = category.lstrip("/"); + category = "Addons/" + category; + if (subcategory != "") { + category += "/" + subcategory; + } + dict["category"] = category; - dict["subcategory"] = subcategory; dict["highend"] = highend; String key; - key = category; - key += "/"; - if (subcategory != "") { - key += subcategory; - key += "/"; - } - key += name; + key = category + "/" + name; added[key] = dict; } @@ -284,7 +289,7 @@ void VisualShaderEditor::update_custom_nodes() { const Dictionary &value = (Dictionary)added[key]; - add_custom_type(value["name"], value["script"], value["description"], value["return_icon_type"], value["category"], value["subcategory"], value["highend"]); + add_custom_type(value["name"], value["script"], value["description"], value["return_icon_type"], value["category"], value["highend"]); } _update_options_menu(); @@ -299,22 +304,12 @@ void VisualShaderEditor::_update_options_menu() { node_desc->set_text(""); members_dialog->get_ok()->set_disabled(true); - String prev_category; - String prev_sub_category; - members->clear(); TreeItem *root = members->create_item(); - TreeItem *category = NULL; - TreeItem *sub_category = NULL; String filter = node_filter->get_text().strip_edges(); bool use_filter = !filter.empty(); - Vector<String> categories; - Vector<String> sub_categories; - - int item_count = 0; - int item_count2 = 0; bool is_first_item = true; Color unsupported_color = get_color("error_color", "Editor"); @@ -322,111 +317,95 @@ void VisualShaderEditor::_update_options_menu() { static bool low_driver = ProjectSettings::get_singleton()->get("rendering/quality/driver/driver_name") == "GLES2"; + Map<String, TreeItem *> folders; + int current_func = -1; if (!visual_shader.is_null()) { current_func = visual_shader->get_mode(); } - for (int i = 0; i < add_options.size() + 1; i++) { + Vector<AddOption> custom_options; + Vector<AddOption> embedded_options; - if (i == add_options.size()) { - if (sub_category != NULL && item_count2 == 0) { - memdelete(sub_category); - --item_count; + for (int i = 0; i < add_options.size(); i++) { + if (!use_filter || add_options[i].name.findn(filter) != -1) { + if ((add_options[i].func != current_func && add_options[i].func != -1) || !_is_available(add_options[i].mode)) { + continue; } - if (category != NULL && item_count == 0) { - memdelete(category); + const_cast<AddOption &>(add_options[i]).temp_idx = i; // save valid id + if (add_options[i].is_custom) { + custom_options.push_back(add_options[i]); + } else { + embedded_options.push_back(add_options[i]); } - break; } + } + Vector<AddOption> options; + SortArray<AddOption, _OptionComparator> sorter; + sorter.sort(custom_options.ptrw(), custom_options.size()); - if (!use_filter || add_options[i].name.findn(filter) != -1) { - - if ((add_options[i].func != current_func && add_options[i].func != -1) || !_is_available(add_options[i].mode)) - continue; + options.append_array(custom_options); + options.append_array(embedded_options); - if (prev_category != add_options[i].category) { - if (category != NULL && item_count == 0) { - memdelete(category); - } + for (int i = 0; i < options.size(); i++) { + String path = options[i].category; + Vector<String> subfolders = path.split("/"); + TreeItem *category = NULL; - item_count = 0; - prev_sub_category = ""; - category = members->create_item(root); - category->set_text(0, add_options[i].category); - category->set_selectable(0, false); - if (!use_filter) - category->set_collapsed(true); - } - - if (add_options[i].sub_category != "") { - if (prev_sub_category != add_options[i].sub_category) { - if (category != NULL) { - if (sub_category != NULL && item_count2 == 0) { - memdelete(sub_category); - --item_count; - } - ++item_count; - item_count2 = 0; - sub_category = members->create_item(category); - sub_category->set_text(0, add_options[i].sub_category); - sub_category->set_selectable(0, false); - if (!use_filter) - sub_category->set_collapsed(true); - } - } - } else { - sub_category = NULL; - } - - TreeItem *p_category = NULL; - - if (sub_category != NULL) { - p_category = sub_category; - ++item_count2; - } else if (category != NULL) { - p_category = category; - ++item_count; - } - - if (p_category != NULL) { - TreeItem *item = members->create_item(p_category); - if (add_options[i].highend && low_driver) - item->set_custom_color(0, unsupported_color); - else if (add_options[i].highend) - item->set_custom_color(0, supported_color); - item->set_text(0, add_options[i].name); - if (is_first_item && use_filter) { - item->select(0); - node_desc->set_text(_get_description(i)); - is_first_item = false; - } - switch (add_options[i].return_type) { - case VisualShaderNode::PORT_TYPE_SCALAR: - item->set_icon(0, EditorNode::get_singleton()->get_gui_base()->get_icon("float", "EditorIcons")); - break; - case VisualShaderNode::PORT_TYPE_VECTOR: - item->set_icon(0, EditorNode::get_singleton()->get_gui_base()->get_icon("Vector3", "EditorIcons")); - break; - case VisualShaderNode::PORT_TYPE_BOOLEAN: - item->set_icon(0, EditorNode::get_singleton()->get_gui_base()->get_icon("bool", "EditorIcons")); - break; - case VisualShaderNode::PORT_TYPE_TRANSFORM: - item->set_icon(0, EditorNode::get_singleton()->get_gui_base()->get_icon("Transform", "EditorIcons")); - break; - case VisualShaderNode::PORT_TYPE_SAMPLER: - item->set_icon(0, EditorNode::get_singleton()->get_gui_base()->get_icon("ImageTexture", "EditorIcons")); - break; - default: - break; + if (!folders.has(path)) { + category = root; + String path_temp = ""; + for (int j = 0; j < subfolders.size(); j++) { + path_temp += subfolders[j]; + if (!folders.has(path_temp)) { + category = members->create_item(category); + category->set_selectable(0, false); + category->set_collapsed(!use_filter); + category->set_text(0, subfolders[j]); + folders.insert(path_temp, category); + } else { + category = folders[path_temp]; } - item->set_meta("id", i); } - - prev_sub_category = add_options[i].sub_category; - prev_category = add_options[i].category; + } else { + category = folders[path]; + } + + TreeItem *item = members->create_item(category); + if (options[i].highend && low_driver) + item->set_custom_color(0, unsupported_color); + else if (options[i].highend) + item->set_custom_color(0, supported_color); + item->set_text(0, options[i].name); + if (is_first_item && use_filter) { + item->select(0); + node_desc->set_text(options[i].description); + is_first_item = false; + } + switch (options[i].return_type) { + case VisualShaderNode::PORT_TYPE_SCALAR: + item->set_icon(0, EditorNode::get_singleton()->get_gui_base()->get_icon("float", "EditorIcons")); + break; + case VisualShaderNode::PORT_TYPE_SCALAR_INT: + item->set_icon(0, EditorNode::get_singleton()->get_gui_base()->get_icon("int", "EditorIcons")); + break; + case VisualShaderNode::PORT_TYPE_VECTOR: + item->set_icon(0, EditorNode::get_singleton()->get_gui_base()->get_icon("Vector3", "EditorIcons")); + break; + case VisualShaderNode::PORT_TYPE_BOOLEAN: + item->set_icon(0, EditorNode::get_singleton()->get_gui_base()->get_icon("bool", "EditorIcons")); + break; + case VisualShaderNode::PORT_TYPE_TRANSFORM: + item->set_icon(0, EditorNode::get_singleton()->get_gui_base()->get_icon("Transform", "EditorIcons")); + break; + case VisualShaderNode::PORT_TYPE_SAMPLER: + item->set_icon(0, EditorNode::get_singleton()->get_gui_base()->get_icon("ImageTexture", "EditorIcons")); + break; + default: + break; } + item->set_meta("id", options[i].temp_idx); } } @@ -459,14 +438,22 @@ void VisualShaderEditor::_update_created_node(GraphNode *node) { if (EditorSettings::get_singleton()->get("interface/theme/use_graph_node_headers")) { Ref<StyleBoxFlat> sb = node->get_stylebox("frame", "GraphNode"); Color c = sb->get_border_color(); - Color mono_color = ((c.r + c.g + c.b) / 3) < 0.7 ? Color(1.0, 1.0, 1.0) : Color(0.0, 0.0, 0.0); + Color ic; + Color mono_color; + if (((c.r + c.g + c.b) / 3) < 0.7) { + mono_color = Color(1.0, 1.0, 1.0); + ic = Color(0.0, 0.0, 0.0, 0.7); + } else { + mono_color = Color(0.0, 0.0, 0.0); + ic = Color(1.0, 1.0, 1.0, 0.7); + } mono_color.a = 0.85; c = mono_color; node->add_color_override("title_color", c); c.a = 0.7; node->add_color_override("close_color", c); - node->add_color_override("resizer_color", c); + node->add_color_override("resizer_color", ic); } } @@ -493,12 +480,13 @@ void VisualShaderEditor::_update_graph() { } } - static const Color type_color[5] = { - Color(0.38, 0.85, 0.96), // scalar + static const Color type_color[6] = { + Color(0.38, 0.85, 0.96), // scalar (float) + Color(0.49, 0.78, 0.94), // scalar (int) Color(0.84, 0.49, 0.93), // vector Color(0.55, 0.65, 0.94), // boolean Color(0.96, 0.66, 0.43), // transform - Color(1.0, 1.0, 0.0) // sampler + Color(1.0, 1.0, 0.0), // sampler }; List<VisualShader::Connection> connections; @@ -529,7 +517,7 @@ void VisualShaderEditor::_update_graph() { size = group_node->get_size(); node->set_resizable(true); - node->connect("resize_request", this, "_node_resized", varray((int)type, nodes[n_i])); + node->connect_compat("resize_request", this, "_node_resized", varray((int)type, nodes[n_i])); } if (is_expression) { expression = expression_node->get_expression(); @@ -546,10 +534,10 @@ void VisualShaderEditor::_update_graph() { if (nodes[n_i] >= 2) { node->set_show_close_button(true); - node->connect("close_request", this, "_delete_request", varray(nodes[n_i]), CONNECT_DEFERRED); + node->connect_compat("close_request", this, "_delete_request", varray(nodes[n_i]), CONNECT_DEFERRED); } - node->connect("dragged", this, "_node_dragged", varray(nodes[n_i])); + node->connect_compat("dragged", this, "_node_dragged", varray(nodes[n_i])); Control *custom_editor = NULL; int port_offset = 0; @@ -559,7 +547,8 @@ void VisualShaderEditor::_update_graph() { } Ref<VisualShaderNodeUniform> uniform = vsnode; - Ref<VisualShaderNodeScalarUniform> scalar_uniform = vsnode; + Ref<VisualShaderNodeFloatUniform> float_uniform = vsnode; + Ref<VisualShaderNodeIntUniform> int_uniform = vsnode; if (uniform.is_valid()) { graph->add_child(node); _update_created_node(node); @@ -567,14 +556,14 @@ void VisualShaderEditor::_update_graph() { LineEdit *uniform_name = memnew(LineEdit); uniform_name->set_text(uniform->get_uniform_name()); node->add_child(uniform_name); - uniform_name->connect("text_entered", this, "_line_edit_changed", varray(uniform_name, nodes[n_i])); - uniform_name->connect("focus_exited", this, "_line_edit_focus_out", varray(uniform_name, nodes[n_i])); + uniform_name->connect_compat("text_entered", this, "_line_edit_changed", varray(uniform_name, nodes[n_i])); + uniform_name->connect_compat("focus_exited", this, "_line_edit_focus_out", varray(uniform_name, nodes[n_i])); if (vsnode->get_input_port_count() == 0 && vsnode->get_output_port_count() == 1 && vsnode->get_output_port_name(0) == "") { //shortcut VisualShaderNode::PortType port_right = vsnode->get_output_port_type(0); node->set_slot(0, false, VisualShaderNode::PORT_TYPE_SCALAR, Color(), true, port_right, type_color[port_right]); - if (!scalar_uniform.is_valid()) { + if (!float_uniform.is_valid() && !int_uniform.is_valid()) { continue; } } @@ -588,13 +577,13 @@ void VisualShaderEditor::_update_graph() { } } - if (custom_editor && !scalar_uniform.is_valid() && vsnode->get_output_port_count() > 0 && vsnode->get_output_port_name(0) == "" && (vsnode->get_input_port_count() == 0 || vsnode->get_input_port_name(0) == "")) { + if (custom_editor && !float_uniform.is_valid() && !int_uniform.is_valid() && vsnode->get_output_port_count() > 0 && vsnode->get_output_port_name(0) == "" && (vsnode->get_input_port_count() == 0 || vsnode->get_input_port_name(0) == "")) { //will be embedded in first port } else if (custom_editor) { port_offset++; node->add_child(custom_editor); - if (scalar_uniform.is_valid()) { + if (float_uniform.is_valid() || int_uniform.is_valid()) { custom_editor->call_deferred("_show_prop_names", true); continue; } @@ -612,14 +601,14 @@ void VisualShaderEditor::_update_graph() { Button *add_input_btn = memnew(Button); add_input_btn->set_text(TTR("Add Input")); - add_input_btn->connect("pressed", this, "_add_input_port", varray(nodes[n_i], group_node->get_free_input_port_id(), VisualShaderNode::PORT_TYPE_VECTOR, "input" + itos(group_node->get_free_input_port_id())), CONNECT_DEFERRED); + add_input_btn->connect_compat("pressed", this, "_add_input_port", varray(nodes[n_i], group_node->get_free_input_port_id(), VisualShaderNode::PORT_TYPE_VECTOR, "input" + itos(group_node->get_free_input_port_id())), 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", this, "_add_output_port", varray(nodes[n_i], group_node->get_free_output_port_id(), VisualShaderNode::PORT_TYPE_VECTOR, "output" + itos(group_node->get_free_output_port_id())), CONNECT_DEFERRED); + add_output_btn->connect_compat("pressed", this, "_add_output_port", varray(nodes[n_i], group_node->get_free_output_port_id(), VisualShaderNode::PORT_TYPE_VECTOR, "output" + itos(group_node->get_free_output_port_id())), CONNECT_DEFERRED); hb2->add_child(add_output_btn); node->add_child(hb2); @@ -667,19 +656,19 @@ void VisualShaderEditor::_update_graph() { if (default_value.get_type() != Variant::NIL) { // only a label Button *button = memnew(Button); hb->add_child(button); - button->connect("pressed", this, "_edit_port_default_input", varray(button, nodes[n_i], i)); + button->connect_compat("pressed", this, "_edit_port_default_input", varray(button, nodes[n_i], i)); switch (default_value.get_type()) { case Variant::COLOR: { button->set_custom_minimum_size(Size2(30, 0) * EDSCALE); - button->connect("draw", this, "_draw_color_over_button", varray(button, default_value)); + button->connect_compat("draw", this, "_draw_color_over_button", varray(button, default_value)); } break; case Variant::BOOL: { button->set_text(((bool)default_value) ? "true" : "false"); } break; case Variant::INT: - case Variant::REAL: { + case Variant::FLOAT: { button->set_text(String::num(default_value, 4)); } break; case Variant::VECTOR3: { @@ -701,27 +690,28 @@ void VisualShaderEditor::_update_graph() { if (is_group) { OptionButton *type_box = memnew(OptionButton); hb->add_child(type_box); - type_box->add_item(TTR("Scalar")); + type_box->add_item(TTR("Float")); + type_box->add_item(TTR("Int")); type_box->add_item(TTR("Vector")); type_box->add_item(TTR("Boolean")); type_box->add_item(TTR("Transform")); 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", this, "_change_input_port_type", varray(nodes[n_i], i), CONNECT_DEFERRED); + type_box->connect_compat("item_selected", this, "_change_input_port_type", varray(nodes[n_i], 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(SIZE_EXPAND_FILL); name_box->set_text(name_left); - name_box->connect("text_entered", this, "_change_input_port_name", varray(name_box, nodes[n_i], i)); - name_box->connect("focus_exited", this, "_port_name_focus_out", varray(name_box, nodes[n_i], i, false)); + name_box->connect_compat("text_entered", this, "_change_input_port_name", varray(name_box, nodes[n_i], i)); + name_box->connect_compat("focus_exited", this, "_port_name_focus_out", varray(name_box, nodes[n_i], i, false)); Button *remove_btn = memnew(Button); remove_btn->set_icon(EditorNode::get_singleton()->get_gui_base()->get_icon("Remove", "EditorIcons")); remove_btn->set_tooltip(TTR("Remove") + " " + name_left); - remove_btn->connect("pressed", this, "_remove_input_port", varray(nodes[n_i], i), CONNECT_DEFERRED); + remove_btn->connect_compat("pressed", this, "_remove_input_port", varray(nodes[n_i], i), CONNECT_DEFERRED); hb->add_child(remove_btn); } else { @@ -750,7 +740,7 @@ void VisualShaderEditor::_update_graph() { Button *remove_btn = memnew(Button); remove_btn->set_icon(EditorNode::get_singleton()->get_gui_base()->get_icon("Remove", "EditorIcons")); remove_btn->set_tooltip(TTR("Remove") + " " + name_left); - remove_btn->connect("pressed", this, "_remove_output_port", varray(nodes[n_i], i), CONNECT_DEFERRED); + remove_btn->connect_compat("pressed", this, "_remove_output_port", varray(nodes[n_i], i), CONNECT_DEFERRED); hb->add_child(remove_btn); LineEdit *name_box = memnew(LineEdit); @@ -758,18 +748,19 @@ void VisualShaderEditor::_update_graph() { name_box->set_custom_minimum_size(Size2(65 * EDSCALE, 0)); name_box->set_h_size_flags(SIZE_EXPAND_FILL); name_box->set_text(name_right); - name_box->connect("text_entered", this, "_change_output_port_name", varray(name_box, nodes[n_i], i)); - name_box->connect("focus_exited", this, "_port_name_focus_out", varray(name_box, nodes[n_i], i, true)); + name_box->connect_compat("text_entered", this, "_change_output_port_name", varray(name_box, nodes[n_i], i)); + name_box->connect_compat("focus_exited", this, "_port_name_focus_out", varray(name_box, nodes[n_i], i, true)); OptionButton *type_box = memnew(OptionButton); hb->add_child(type_box); - type_box->add_item(TTR("Scalar")); + type_box->add_item(TTR("Float")); + type_box->add_item(TTR("Int")); type_box->add_item(TTR("Vector")); type_box->add_item(TTR("Boolean")); 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", this, "_change_output_port_type", varray(nodes[n_i], i), CONNECT_DEFERRED); + type_box->connect_compat("item_selected", this, "_change_output_port_type", varray(nodes[n_i], i), CONNECT_DEFERRED); } else { Label *label = memnew(Label); label->set_text(name_right); @@ -790,7 +781,7 @@ void VisualShaderEditor::_update_graph() { preview->set_pressed(true); } - preview->connect("pressed", this, "_preview_select_port", varray(nodes[n_i], i), CONNECT_DEFERRED); + preview->connect_compat("pressed", this, "_preview_select_port", varray(nodes[n_i], i), CONNECT_DEFERRED); hb->add_child(preview); } @@ -863,7 +854,7 @@ void VisualShaderEditor::_update_graph() { expression_box->set_context_menu_enabled(false); expression_box->set_show_line_numbers(true); - expression_box->connect("focus_exited", this, "_expression_focus_out", varray(expression_box, nodes[n_i])); + expression_box->connect_compat("focus_exited", this, "_expression_focus_out", varray(expression_box, nodes[n_i])); } if (!uniform.is_valid()) { @@ -1326,7 +1317,7 @@ VisualShaderNode *VisualShaderEditor::_add_node(int p_idx, int p_op_idx) { VisualShaderNode *vsn = Object::cast_to<VisualShaderNode>(ClassDB::instance(add_options[p_idx].type)); ERR_FAIL_COND_V(!vsn, NULL); - VisualShaderNodeScalarConstant *constant = Object::cast_to<VisualShaderNodeScalarConstant>(vsn); + VisualShaderNodeFloatConstant *constant = Object::cast_to<VisualShaderNodeFloatConstant>(vsn); if (constant) { if ((int)add_options[p_idx].value != -1) @@ -1365,16 +1356,28 @@ VisualShaderNode *VisualShaderEditor::_add_node(int p_idx, int p_op_idx) { colorFunc->set_function((VisualShaderNodeColorFunc::Function)p_op_idx); } - VisualShaderNodeScalarOp *scalarOp = Object::cast_to<VisualShaderNodeScalarOp>(vsn); + VisualShaderNodeFloatOp *floatOp = Object::cast_to<VisualShaderNodeFloatOp>(vsn); + + if (floatOp) { + floatOp->set_operator((VisualShaderNodeFloatOp::Operator)p_op_idx); + } + + VisualShaderNodeIntOp *intOp = Object::cast_to<VisualShaderNodeIntOp>(vsn); + + if (intOp) { + intOp->set_operator((VisualShaderNodeIntOp::Operator)p_op_idx); + } + + VisualShaderNodeFloatFunc *floatFunc = Object::cast_to<VisualShaderNodeFloatFunc>(vsn); - if (scalarOp) { - scalarOp->set_operator((VisualShaderNodeScalarOp::Operator)p_op_idx); + if (floatFunc) { + floatFunc->set_function((VisualShaderNodeFloatFunc::Function)p_op_idx); } - VisualShaderNodeScalarFunc *scalarFunc = Object::cast_to<VisualShaderNodeScalarFunc>(vsn); + VisualShaderNodeIntFunc *intFunc = Object::cast_to<VisualShaderNodeIntFunc>(vsn); - if (scalarFunc) { - scalarFunc->set_function((VisualShaderNodeScalarFunc::Function)p_op_idx); + if (intFunc) { + intFunc->set_function((VisualShaderNodeIntFunc::Function)p_op_idx); } VisualShaderNodeVectorOp *vecOp = Object::cast_to<VisualShaderNodeVectorOp>(vsn); @@ -1415,7 +1418,7 @@ VisualShaderNode *VisualShaderEditor::_add_node(int p_idx, int p_op_idx) { VisualShaderNode *vsn = Object::cast_to<VisualShaderNode>(ClassDB::instance(base_type)); ERR_FAIL_COND_V(!vsn, NULL); vsnode = Ref<VisualShaderNode>(vsn); - vsnode->set_script(add_options[p_idx].script.get_ref_ptr()); + vsnode->set_script(add_options[p_idx].script); } Point2 position = graph->get_scroll_ofs(); @@ -1606,8 +1609,29 @@ void VisualShaderEditor::_graph_gui_input(const Ref<InputEvent> &p_event) { Ref<InputEventMouseButton> mb = p_event; - if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == BUTTON_RIGHT) - _show_members_dialog(true); + if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == BUTTON_RIGHT) { + List<int> to_change; + for (int i = 0; i < graph->get_child_count(); i++) { + GraphNode *gn = Object::cast_to<GraphNode>(graph->get_child(i)); + if (gn) { + if (gn->is_selected() && gn->is_close_button_visible()) { + to_change.push_back(gn->get_name().operator String().to_int()); + } + } + } + if (to_change.empty() && copy_nodes_buffer.empty()) { + _show_members_dialog(true); + } else { + popup_menu->set_item_disabled(NodeMenuOptions::COPY, to_change.empty()); + popup_menu->set_item_disabled(NodeMenuOptions::PASTE, copy_nodes_buffer.empty()); + popup_menu->set_item_disabled(NodeMenuOptions::DELETE, to_change.empty()); + popup_menu->set_item_disabled(NodeMenuOptions::DUPLICATE, to_change.empty()); + menu_point = graph->get_local_mouse_position(); + Point2 gpos = Input::get_singleton()->get_mouse_position(); + popup_menu->set_position(gpos); + popup_menu->popup(); + } + } } void VisualShaderEditor::_show_members_dialog(bool at_mouse_pos) { @@ -1905,7 +1929,7 @@ void VisualShaderEditor::_copy_nodes() { _dup_copy_nodes(copy_type, copy_nodes_buffer, copy_nodes_excluded_buffer); } -void VisualShaderEditor::_paste_nodes() { +void VisualShaderEditor::_paste_nodes(bool p_use_custom_position, const Vector2 &p_custom_position) { if (copy_nodes_buffer.empty()) return; @@ -1916,12 +1940,19 @@ void VisualShaderEditor::_paste_nodes() { float scale = graph->get_zoom(); - _dup_paste_nodes(type, copy_type, copy_nodes_buffer, copy_nodes_excluded_buffer, (graph->get_scroll_ofs() / scale + graph->get_local_mouse_position() / scale - selection_center), false); + Vector2 mpos; + if (p_use_custom_position) { + mpos = p_custom_position; + } else { + mpos = graph->get_local_mouse_position(); + } + + _dup_paste_nodes(type, copy_type, copy_nodes_buffer, copy_nodes_excluded_buffer, (graph->get_scroll_ofs() / scale + mpos / scale - selection_center), false); _dup_update_excluded(type, copy_nodes_excluded_buffer); // to prevent selection of previous copies at new paste } -void VisualShaderEditor::_on_nodes_delete() { +void VisualShaderEditor::_delete_nodes() { VisualShader::Type type = VisualShader::Type(edit_type->get_selected()); List<int> to_erase; @@ -2107,6 +2138,26 @@ void VisualShaderEditor::_tools_menu_option(int p_idx) { } } +void VisualShaderEditor::_node_menu_id_pressed(int p_idx) { + switch (p_idx) { + case NodeMenuOptions::ADD: + _show_members_dialog(true); + break; + case NodeMenuOptions::COPY: + _copy_nodes(); + break; + case NodeMenuOptions::PASTE: + _paste_nodes(true, menu_point); + break; + case NodeMenuOptions::DELETE: + _delete_nodes(); + break; + case NodeMenuOptions::DUPLICATE: + _duplicate_nodes(); + break; + } +} + Variant VisualShaderEditor::get_drag_data_fw(const Point2 &p_point, Control *p_from) { if (p_from == members) { @@ -2164,10 +2215,10 @@ void VisualShaderEditor::drop_data_fw(const Point2 &p_point, const Variant &p_da saved_node_pos_dirty = true; _add_node(idx, add_options[idx].sub_func); } else if (d.has("files")) { - if (d["files"].get_type() == Variant::POOL_STRING_ARRAY) { + if (d["files"].get_type() == Variant::PACKED_STRING_ARRAY) { int j = 0; - PoolStringArray arr = d["files"]; + PackedStringArray arr = d["files"]; for (int i = 0; i < arr.size(); i++) { String type = ResourceLoader::get_resource_type(arr[i]); @@ -2179,7 +2230,7 @@ void VisualShaderEditor::drop_data_fw(const Point2 &p_point, const Variant &p_da _add_custom_node(arr[i]); j++; } - } else if (ClassDB::get_parent_class(type) == "Texture") { + } else if (ClassDB::get_parent_class(type) == "Texture2D") { saved_node_pos = p_point + Vector2(0, j * 210 * EDSCALE); saved_node_pos_dirty = true; _add_texture_node(arr[i]); @@ -2245,7 +2296,7 @@ void VisualShaderEditor::_bind_methods() { ClassDB::bind_method("_node_selected", &VisualShaderEditor::_node_selected); ClassDB::bind_method("_scroll_changed", &VisualShaderEditor::_scroll_changed); ClassDB::bind_method("_delete_request", &VisualShaderEditor::_delete_request); - ClassDB::bind_method("_on_nodes_delete", &VisualShaderEditor::_on_nodes_delete); + ClassDB::bind_method("_delete_nodes", &VisualShaderEditor::_delete_nodes); ClassDB::bind_method("_node_changed", &VisualShaderEditor::_node_changed); ClassDB::bind_method("_edit_port_default_input", &VisualShaderEditor::_edit_port_default_input); ClassDB::bind_method("_port_edited", &VisualShaderEditor::_port_edited); @@ -2288,6 +2339,8 @@ void VisualShaderEditor::_bind_methods() { ClassDB::bind_method("_member_unselected", &VisualShaderEditor::_member_unselected); ClassDB::bind_method("_member_create", &VisualShaderEditor::_member_create); ClassDB::bind_method("_member_cancel", &VisualShaderEditor::_member_cancel); + + ClassDB::bind_method("_node_menu_id_pressed", &VisualShaderEditor::_node_menu_id_pressed); } VisualShaderEditor *VisualShaderEditor::singleton = NULL; @@ -2321,30 +2374,38 @@ VisualShaderEditor::VisualShaderEditor() { main_box->add_child(graph); graph->set_drag_forwarding(this); graph->add_valid_right_disconnect_type(VisualShaderNode::PORT_TYPE_SCALAR); + graph->add_valid_right_disconnect_type(VisualShaderNode::PORT_TYPE_SCALAR_INT); graph->add_valid_right_disconnect_type(VisualShaderNode::PORT_TYPE_BOOLEAN); graph->add_valid_right_disconnect_type(VisualShaderNode::PORT_TYPE_VECTOR); graph->add_valid_right_disconnect_type(VisualShaderNode::PORT_TYPE_TRANSFORM); 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", this, "_connection_request", varray(), CONNECT_DEFERRED); - graph->connect("disconnection_request", this, "_disconnection_request", varray(), CONNECT_DEFERRED); - graph->connect("node_selected", this, "_node_selected"); - graph->connect("scroll_offset_changed", this, "_scroll_changed"); - graph->connect("duplicate_nodes_request", this, "_duplicate_nodes"); - graph->connect("copy_nodes_request", this, "_copy_nodes"); - graph->connect("paste_nodes_request", this, "_paste_nodes"); - graph->connect("delete_nodes_request", this, "_on_nodes_delete"); - graph->connect("gui_input", this, "_graph_gui_input"); - graph->connect("connection_to_empty", this, "_connection_to_empty"); - graph->connect("connection_from_empty", this, "_connection_from_empty"); + graph->connect_compat("connection_request", this, "_connection_request", varray(), CONNECT_DEFERRED); + graph->connect_compat("disconnection_request", this, "_disconnection_request", varray(), CONNECT_DEFERRED); + graph->connect_compat("node_selected", this, "_node_selected"); + graph->connect_compat("scroll_offset_changed", this, "_scroll_changed"); + graph->connect_compat("duplicate_nodes_request", this, "_duplicate_nodes"); + graph->connect_compat("copy_nodes_request", this, "_copy_nodes"); + graph->connect_compat("paste_nodes_request", this, "_paste_nodes"); + graph->connect_compat("delete_nodes_request", this, "_delete_nodes"); + graph->connect_compat("gui_input", this, "_graph_gui_input"); + graph->connect_compat("connection_to_empty", this, "_connection_to_empty"); + graph->connect_compat("connection_from_empty", this, "_connection_from_empty"); graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_SCALAR, VisualShaderNode::PORT_TYPE_SCALAR); + graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_SCALAR, VisualShaderNode::PORT_TYPE_SCALAR_INT); graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_SCALAR, VisualShaderNode::PORT_TYPE_VECTOR); graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_SCALAR, VisualShaderNode::PORT_TYPE_BOOLEAN); + graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_SCALAR_INT, VisualShaderNode::PORT_TYPE_SCALAR_INT); + graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_SCALAR_INT, VisualShaderNode::PORT_TYPE_SCALAR); + graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_SCALAR_INT, VisualShaderNode::PORT_TYPE_VECTOR); + graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_SCALAR_INT, VisualShaderNode::PORT_TYPE_BOOLEAN); graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_VECTOR, VisualShaderNode::PORT_TYPE_SCALAR); + graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_VECTOR, VisualShaderNode::PORT_TYPE_SCALAR_INT); graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_VECTOR, VisualShaderNode::PORT_TYPE_VECTOR); graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_VECTOR, VisualShaderNode::PORT_TYPE_BOOLEAN); graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_BOOLEAN, VisualShaderNode::PORT_TYPE_SCALAR); + graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_BOOLEAN, VisualShaderNode::PORT_TYPE_SCALAR_INT); graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_BOOLEAN, VisualShaderNode::PORT_TYPE_VECTOR); graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_BOOLEAN, VisualShaderNode::PORT_TYPE_BOOLEAN); graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_TRANSFORM, VisualShaderNode::PORT_TYPE_TRANSFORM); @@ -2359,7 +2420,7 @@ VisualShaderEditor::VisualShaderEditor() { edit_type->add_item(TTR("Fragment")); edit_type->add_item(TTR("Light")); edit_type->select(1); - edit_type->connect("item_selected", this, "_mode_selected"); + edit_type->connect_compat("item_selected", this, "_mode_selected"); graph->get_zoom_hbox()->add_child(edit_type); graph->get_zoom_hbox()->move_child(edit_type, 0); @@ -2367,13 +2428,13 @@ VisualShaderEditor::VisualShaderEditor() { graph->get_zoom_hbox()->add_child(add_node); add_node->set_text(TTR("Add Node...")); graph->get_zoom_hbox()->move_child(add_node, 0); - add_node->connect("pressed", this, "_show_members_dialog", varray(false)); + add_node->connect_compat("pressed", this, "_show_members_dialog", varray(false)); preview_shader = memnew(ToolButton); preview_shader->set_toggle_mode(true); preview_shader->set_tooltip(TTR("Show resulted shader code.")); graph->get_zoom_hbox()->add_child(preview_shader); - preview_shader->connect("pressed", this, "_show_preview_text"); + preview_shader->connect_compat("pressed", this, "_show_preview_text"); /////////////////////////////////////// // PREVIEW PANEL @@ -2396,6 +2457,20 @@ VisualShaderEditor::VisualShaderEditor() { error_text->set_visible(false); /////////////////////////////////////// + // POPUP MENU + /////////////////////////////////////// + + popup_menu = memnew(PopupMenu); + add_child(popup_menu); + popup_menu->add_item("Add Node", NodeMenuOptions::ADD); + popup_menu->add_separator(); + popup_menu->add_item("Copy", NodeMenuOptions::COPY); + popup_menu->add_item("Paste", NodeMenuOptions::PASTE); + popup_menu->add_item("Delete", NodeMenuOptions::DELETE); + popup_menu->add_item("Duplicate", NodeMenuOptions::DUPLICATE); + popup_menu->connect_compat("id_pressed", this, "_node_menu_id_pressed"); + + /////////////////////////////////////// // SHADER NODES TREE /////////////////////////////////////// @@ -2407,15 +2482,15 @@ VisualShaderEditor::VisualShaderEditor() { node_filter = memnew(LineEdit); filter_hb->add_child(node_filter); - node_filter->connect("text_changed", this, "_member_filter_changed"); - node_filter->connect("gui_input", this, "_sbox_input"); + node_filter->connect_compat("text_changed", this, "_member_filter_changed"); + node_filter->connect_compat("gui_input", this, "_sbox_input"); node_filter->set_h_size_flags(SIZE_EXPAND_FILL); node_filter->set_placeholder(TTR("Search")); tools = memnew(MenuButton); filter_hb->add_child(tools); tools->set_tooltip(TTR("Options")); - tools->get_popup()->connect("id_pressed", this, "_tools_menu_option"); + tools->get_popup()->connect_compat("id_pressed", this, "_tools_menu_option"); tools->get_popup()->add_item(TTR("Expand All"), EXPAND_ALL); tools->get_popup()->add_item(TTR("Collapse All"), COLLAPSE_ALL); @@ -2428,9 +2503,9 @@ VisualShaderEditor::VisualShaderEditor() { members->set_allow_reselect(true); members->set_hide_folding(false); members->set_custom_minimum_size(Size2(180 * EDSCALE, 200 * EDSCALE)); - members->connect("item_activated", this, "_member_create"); - members->connect("item_selected", this, "_member_selected"); - members->connect("nothing_selected", this, "_member_unselected"); + members->connect_compat("item_activated", this, "_member_create"); + members->connect_compat("item_selected", this, "_member_selected"); + members->connect_compat("nothing_selected", this, "_member_unselected"); HBoxContainer *desc_hbox = memnew(HBoxContainer); members_vb->add_child(desc_hbox); @@ -2458,11 +2533,11 @@ VisualShaderEditor::VisualShaderEditor() { members_dialog->set_title(TTR("Create Shader Node")); members_dialog->add_child(members_vb); members_dialog->get_ok()->set_text(TTR("Create")); - members_dialog->get_ok()->connect("pressed", this, "_member_create"); + members_dialog->get_ok()->connect_compat("pressed", this, "_member_create"); members_dialog->get_ok()->set_disabled(true); members_dialog->set_resizable(true); members_dialog->set_as_minsize(); - members_dialog->connect("hide", this, "_member_cancel"); + members_dialog->connect_compat("hide", this, "_member_cancel"); add_child(members_dialog); alert = memnew(AcceptDialog); @@ -2633,7 +2708,7 @@ VisualShaderEditor::VisualShaderEditor() { add_options.push_back(AddOption("CustomAlpha", "Input", "Vertex", "VisualShaderNodeInput", vformat(input_param_for_vertex_shader_mode, "custom_alpha"), "custom_alpha", VisualShaderNode::PORT_TYPE_SCALAR, VisualShader::TYPE_VERTEX, Shader::MODE_PARTICLES)); add_options.push_back(AddOption("Delta", "Input", "Vertex", "VisualShaderNodeInput", vformat(input_param_for_vertex_shader_mode, "delta"), "delta", VisualShaderNode::PORT_TYPE_SCALAR, VisualShader::TYPE_VERTEX, Shader::MODE_PARTICLES)); add_options.push_back(AddOption("EmissionTransform", "Input", "Vertex", "VisualShaderNodeInput", vformat(input_param_for_vertex_shader_mode, "emission_transform"), "emission_transform", VisualShaderNode::PORT_TYPE_TRANSFORM, VisualShader::TYPE_VERTEX, Shader::MODE_PARTICLES)); - add_options.push_back(AddOption("Index", "Input", "Vertex", "VisualShaderNodeInput", vformat(input_param_for_vertex_shader_mode, "index"), "index", VisualShaderNode::PORT_TYPE_SCALAR, VisualShader::TYPE_VERTEX, Shader::MODE_PARTICLES)); + add_options.push_back(AddOption("Index", "Input", "Vertex", "VisualShaderNodeInput", vformat(input_param_for_vertex_shader_mode, "index"), "index", VisualShaderNode::PORT_TYPE_SCALAR_INT, VisualShader::TYPE_VERTEX, Shader::MODE_PARTICLES)); add_options.push_back(AddOption("LifeTime", "Input", "Vertex", "VisualShaderNodeInput", vformat(input_param_for_vertex_shader_mode, "lifetime"), "lifetime", VisualShaderNode::PORT_TYPE_SCALAR, VisualShader::TYPE_VERTEX, Shader::MODE_PARTICLES)); add_options.push_back(AddOption("Restart", "Input", "Vertex", "VisualShaderNodeInput", vformat(input_param_for_vertex_shader_mode, "restart"), "restart", VisualShaderNode::PORT_TYPE_SCALAR, VisualShader::TYPE_VERTEX, Shader::MODE_PARTICLES)); add_options.push_back(AddOption("Time", "Input", "Vertex", "VisualShaderNodeInput", vformat(input_param_for_vertex_shader_mode, "time"), "time", VisualShaderNode::PORT_TYPE_SCALAR, VisualShader::TYPE_VERTEX, Shader::MODE_PARTICLES)); @@ -2642,78 +2717,91 @@ VisualShaderEditor::VisualShaderEditor() { // SCALAR - add_options.push_back(AddOption("ScalarFunc", "Scalar", "Common", "VisualShaderNodeScalarFunc", TTR("Scalar function."), -1, VisualShaderNode::PORT_TYPE_SCALAR)); - add_options.push_back(AddOption("ScalarOp", "Scalar", "Common", "VisualShaderNodeScalarOp", TTR("Scalar operator."), -1, VisualShaderNode::PORT_TYPE_SCALAR)); + add_options.push_back(AddOption("FloatFunc", "Scalar", "Common", "VisualShaderNodeFloatFunc", TTR("Float function."), -1, VisualShaderNode::PORT_TYPE_SCALAR)); + add_options.push_back(AddOption("IntFunc", "Scalar", "Common", "VisualShaderNodeIntFunc", TTR("Integer function."), -1, VisualShaderNode::PORT_TYPE_SCALAR_INT)); + add_options.push_back(AddOption("FloatOp", "Scalar", "Common", "VisualShaderNodeFloatOp", TTR("Float operator."), -1, VisualShaderNode::PORT_TYPE_SCALAR)); + add_options.push_back(AddOption("IntOp", "Scalar", "Common", "VisualShaderNodeIntOp", TTR("Integer operator."), -1, VisualShaderNode::PORT_TYPE_SCALAR_INT)); //CONSTANTS - add_options.push_back(AddOption("E", "Scalar", "Constants", "VisualShaderNodeScalarConstant", TTR("E constant (2.718282). Represents the base of the natural logarithm."), -1, VisualShaderNode::PORT_TYPE_SCALAR, -1, -1, Math_E)); - add_options.push_back(AddOption("Epsilon", "Scalar", "Constants", "VisualShaderNodeScalarConstant", TTR("Epsilon constant (0.00001). Smallest possible scalar number."), -1, VisualShaderNode::PORT_TYPE_SCALAR, -1, -1, CMP_EPSILON)); - add_options.push_back(AddOption("Phi", "Scalar", "Constants", "VisualShaderNodeScalarConstant", TTR("Phi constant (1.618034). Golden ratio."), -1, VisualShaderNode::PORT_TYPE_SCALAR, -1, -1, 1.618034f)); - add_options.push_back(AddOption("Pi/4", "Scalar", "Constants", "VisualShaderNodeScalarConstant", TTR("Pi/4 constant (0.785398) or 45 degrees."), -1, VisualShaderNode::PORT_TYPE_SCALAR, -1, -1, Math_PI / 4)); - add_options.push_back(AddOption("Pi/2", "Scalar", "Constants", "VisualShaderNodeScalarConstant", TTR("Pi/2 constant (1.570796) or 90 degrees."), -1, VisualShaderNode::PORT_TYPE_SCALAR, -1, -1, Math_PI / 2)); - add_options.push_back(AddOption("Pi", "Scalar", "Constants", "VisualShaderNodeScalarConstant", TTR("Pi constant (3.141593) or 180 degrees."), -1, VisualShaderNode::PORT_TYPE_SCALAR, -1, -1, Math_PI)); - add_options.push_back(AddOption("Tau", "Scalar", "Constants", "VisualShaderNodeScalarConstant", TTR("Tau constant (6.283185) or 360 degrees."), -1, VisualShaderNode::PORT_TYPE_SCALAR, -1, -1, Math_TAU)); - add_options.push_back(AddOption("Sqrt2", "Scalar", "Constants", "VisualShaderNodeScalarConstant", TTR("Sqrt2 constant (1.414214). Square root of 2."), -1, VisualShaderNode::PORT_TYPE_SCALAR, -1, -1, Math_SQRT2)); + add_options.push_back(AddOption("E", "Scalar", "Constants", "VisualShaderNodeFloatConstant", TTR("E constant (2.718282). Represents the base of the natural logarithm."), -1, VisualShaderNode::PORT_TYPE_SCALAR, -1, -1, Math_E)); + add_options.push_back(AddOption("Epsilon", "Scalar", "Constants", "VisualShaderNodeFloatConstant", TTR("Epsilon constant (0.00001). Smallest possible scalar number."), -1, VisualShaderNode::PORT_TYPE_SCALAR, -1, -1, CMP_EPSILON)); + add_options.push_back(AddOption("Phi", "Scalar", "Constants", "VisualShaderNodeFloatConstant", TTR("Phi constant (1.618034). Golden ratio."), -1, VisualShaderNode::PORT_TYPE_SCALAR, -1, -1, 1.618034f)); + add_options.push_back(AddOption("Pi/4", "Scalar", "Constants", "VisualShaderNodeFloatConstant", TTR("Pi/4 constant (0.785398) or 45 degrees."), -1, VisualShaderNode::PORT_TYPE_SCALAR, -1, -1, Math_PI / 4)); + add_options.push_back(AddOption("Pi/2", "Scalar", "Constants", "VisualShaderNodeFloatConstant", TTR("Pi/2 constant (1.570796) or 90 degrees."), -1, VisualShaderNode::PORT_TYPE_SCALAR, -1, -1, Math_PI / 2)); + add_options.push_back(AddOption("Pi", "Scalar", "Constants", "VisualShaderNodeFloatConstant", TTR("Pi constant (3.141593) or 180 degrees."), -1, VisualShaderNode::PORT_TYPE_SCALAR, -1, -1, Math_PI)); + add_options.push_back(AddOption("Tau", "Scalar", "Constants", "VisualShaderNodeFloatConstant", TTR("Tau constant (6.283185) or 360 degrees."), -1, VisualShaderNode::PORT_TYPE_SCALAR, -1, -1, Math_TAU)); + add_options.push_back(AddOption("Sqrt2", "Scalar", "Constants", "VisualShaderNodeFloatConstant", TTR("Sqrt2 constant (1.414214). Square root of 2."), -1, VisualShaderNode::PORT_TYPE_SCALAR, -1, -1, Math_SQRT2)); // FUNCTIONS - add_options.push_back(AddOption("Abs", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Returns the absolute value of the parameter."), VisualShaderNodeScalarFunc::FUNC_ABS, VisualShaderNode::PORT_TYPE_SCALAR)); - add_options.push_back(AddOption("ACos", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Returns the arc-cosine of the parameter."), VisualShaderNodeScalarFunc::FUNC_ACOS, VisualShaderNode::PORT_TYPE_SCALAR)); - add_options.push_back(AddOption("ACosH", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Returns the inverse hyperbolic cosine of the parameter."), VisualShaderNodeScalarFunc::FUNC_ACOSH, VisualShaderNode::PORT_TYPE_SCALAR)); - add_options.push_back(AddOption("ASin", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Returns the arc-sine of the parameter."), VisualShaderNodeScalarFunc::FUNC_ASIN, VisualShaderNode::PORT_TYPE_SCALAR)); - add_options.push_back(AddOption("ASinH", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Returns the inverse hyperbolic sine of the parameter."), VisualShaderNodeScalarFunc::FUNC_ASINH, VisualShaderNode::PORT_TYPE_SCALAR)); - add_options.push_back(AddOption("ATan", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Returns the arc-tangent of the parameter."), VisualShaderNodeScalarFunc::FUNC_ATAN, VisualShaderNode::PORT_TYPE_SCALAR)); - add_options.push_back(AddOption("ATan2", "Scalar", "Functions", "VisualShaderNodeScalarOp", TTR("Returns the arc-tangent of the parameters."), VisualShaderNodeScalarOp::OP_ATAN2, VisualShaderNode::PORT_TYPE_SCALAR)); - add_options.push_back(AddOption("ATanH", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Returns the inverse hyperbolic tangent of the parameter."), VisualShaderNodeScalarFunc::FUNC_ATANH, VisualShaderNode::PORT_TYPE_SCALAR)); - add_options.push_back(AddOption("Ceil", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Finds the nearest integer that is greater than or equal to the parameter."), VisualShaderNodeScalarFunc::FUNC_CEIL, VisualShaderNode::PORT_TYPE_SCALAR)); + add_options.push_back(AddOption("Abs", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Returns the absolute value of the parameter."), VisualShaderNodeFloatFunc::FUNC_ABS, VisualShaderNode::PORT_TYPE_SCALAR)); + add_options.push_back(AddOption("Abs", "Scalar", "Functions", "VisualShaderNodeIntFunc", TTR("Returns the absolute value of the parameter."), VisualShaderNodeIntFunc::FUNC_ABS, VisualShaderNode::PORT_TYPE_SCALAR_INT)); + add_options.push_back(AddOption("ACos", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Returns the arc-cosine of the parameter."), VisualShaderNodeFloatFunc::FUNC_ACOS, VisualShaderNode::PORT_TYPE_SCALAR)); + add_options.push_back(AddOption("ACosH", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Returns the inverse hyperbolic cosine of the parameter."), VisualShaderNodeFloatFunc::FUNC_ACOSH, VisualShaderNode::PORT_TYPE_SCALAR)); + add_options.push_back(AddOption("ASin", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Returns the arc-sine of the parameter."), VisualShaderNodeFloatFunc::FUNC_ASIN, VisualShaderNode::PORT_TYPE_SCALAR)); + add_options.push_back(AddOption("ASinH", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Returns the inverse hyperbolic sine of the parameter."), VisualShaderNodeFloatFunc::FUNC_ASINH, VisualShaderNode::PORT_TYPE_SCALAR)); + add_options.push_back(AddOption("ATan", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Returns the arc-tangent of the parameter."), VisualShaderNodeFloatFunc::FUNC_ATAN, VisualShaderNode::PORT_TYPE_SCALAR)); + add_options.push_back(AddOption("ATan2", "Scalar", "Functions", "VisualShaderNodeFloatOp", TTR("Returns the arc-tangent of the parameters."), VisualShaderNodeFloatOp::OP_ATAN2, VisualShaderNode::PORT_TYPE_SCALAR)); + add_options.push_back(AddOption("ATanH", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Returns the inverse hyperbolic tangent of the parameter."), VisualShaderNodeFloatFunc::FUNC_ATANH, VisualShaderNode::PORT_TYPE_SCALAR)); + add_options.push_back(AddOption("Ceil", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Finds the nearest integer that is greater than or equal to the parameter."), VisualShaderNodeFloatFunc::FUNC_CEIL, VisualShaderNode::PORT_TYPE_SCALAR)); add_options.push_back(AddOption("Clamp", "Scalar", "Functions", "VisualShaderNodeScalarClamp", TTR("Constrains a value to lie between two further values."), -1, VisualShaderNode::PORT_TYPE_SCALAR)); - add_options.push_back(AddOption("Cos", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Returns the cosine of the parameter."), VisualShaderNodeScalarFunc::FUNC_COS, VisualShaderNode::PORT_TYPE_SCALAR)); - add_options.push_back(AddOption("CosH", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Returns the hyperbolic cosine of the parameter."), VisualShaderNodeScalarFunc::FUNC_COSH, VisualShaderNode::PORT_TYPE_SCALAR)); - add_options.push_back(AddOption("Degrees", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Converts a quantity in radians to degrees."), VisualShaderNodeScalarFunc::FUNC_DEGREES, VisualShaderNode::PORT_TYPE_SCALAR)); - add_options.push_back(AddOption("Exp", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Base-e Exponential."), VisualShaderNodeScalarFunc::FUNC_EXP, VisualShaderNode::PORT_TYPE_SCALAR)); - add_options.push_back(AddOption("Exp2", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Base-2 Exponential."), VisualShaderNodeScalarFunc::FUNC_EXP2, VisualShaderNode::PORT_TYPE_SCALAR)); - add_options.push_back(AddOption("Floor", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Finds the nearest integer less than or equal to the parameter."), VisualShaderNodeScalarFunc::FUNC_FLOOR, VisualShaderNode::PORT_TYPE_SCALAR)); - add_options.push_back(AddOption("Fract", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Computes the fractional part of the argument."), VisualShaderNodeScalarFunc::FUNC_FRAC, VisualShaderNode::PORT_TYPE_SCALAR)); - add_options.push_back(AddOption("InverseSqrt", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Returns the inverse of the square root of the parameter."), VisualShaderNodeScalarFunc::FUNC_INVERSE_SQRT, VisualShaderNode::PORT_TYPE_SCALAR)); - add_options.push_back(AddOption("Log", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Natural logarithm."), VisualShaderNodeScalarFunc::FUNC_LOG, VisualShaderNode::PORT_TYPE_SCALAR)); - add_options.push_back(AddOption("Log2", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Base-2 logarithm."), VisualShaderNodeScalarFunc::FUNC_LOG2, VisualShaderNode::PORT_TYPE_SCALAR)); - add_options.push_back(AddOption("Max", "Scalar", "Functions", "VisualShaderNodeScalarOp", TTR("Returns the greater of two values."), VisualShaderNodeScalarOp::OP_MAX, VisualShaderNode::PORT_TYPE_SCALAR)); - add_options.push_back(AddOption("Min", "Scalar", "Functions", "VisualShaderNodeScalarOp", TTR("Returns the lesser of two values."), VisualShaderNodeScalarOp::OP_MIN, VisualShaderNode::PORT_TYPE_SCALAR)); + add_options.push_back(AddOption("Clamp", "Scalar", "Functions", "VisualShaderNodeIntFunc", TTR("Constrains a value to lie between two further values."), VisualShaderNodeIntFunc::FUNC_CLAMP, VisualShaderNode::PORT_TYPE_SCALAR_INT)); + add_options.push_back(AddOption("Cos", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Returns the cosine of the parameter."), VisualShaderNodeFloatFunc::FUNC_COS, VisualShaderNode::PORT_TYPE_SCALAR)); + add_options.push_back(AddOption("CosH", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Returns the hyperbolic cosine of the parameter."), VisualShaderNodeFloatFunc::FUNC_COSH, VisualShaderNode::PORT_TYPE_SCALAR)); + add_options.push_back(AddOption("Degrees", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Converts a quantity in radians to degrees."), VisualShaderNodeFloatFunc::FUNC_DEGREES, VisualShaderNode::PORT_TYPE_SCALAR)); + add_options.push_back(AddOption("Exp", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Base-e Exponential."), VisualShaderNodeFloatFunc::FUNC_EXP, VisualShaderNode::PORT_TYPE_SCALAR)); + add_options.push_back(AddOption("Exp2", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Base-2 Exponential."), VisualShaderNodeFloatFunc::FUNC_EXP2, VisualShaderNode::PORT_TYPE_SCALAR)); + add_options.push_back(AddOption("Floor", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Finds the nearest integer less than or equal to the parameter."), VisualShaderNodeFloatFunc::FUNC_FLOOR, VisualShaderNode::PORT_TYPE_SCALAR)); + add_options.push_back(AddOption("Fract", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Computes the fractional part of the argument."), VisualShaderNodeFloatFunc::FUNC_FRAC, VisualShaderNode::PORT_TYPE_SCALAR)); + add_options.push_back(AddOption("InverseSqrt", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Returns the inverse of the square root of the parameter."), VisualShaderNodeFloatFunc::FUNC_INVERSE_SQRT, VisualShaderNode::PORT_TYPE_SCALAR)); + add_options.push_back(AddOption("Log", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Natural logarithm."), VisualShaderNodeFloatFunc::FUNC_LOG, VisualShaderNode::PORT_TYPE_SCALAR)); + add_options.push_back(AddOption("Log2", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Base-2 logarithm."), VisualShaderNodeFloatFunc::FUNC_LOG2, VisualShaderNode::PORT_TYPE_SCALAR)); + add_options.push_back(AddOption("Max", "Scalar", "Functions", "VisualShaderNodeFloatOp", TTR("Returns the greater of two values."), VisualShaderNodeFloatOp::OP_MAX, VisualShaderNode::PORT_TYPE_SCALAR)); + add_options.push_back(AddOption("Min", "Scalar", "Functions", "VisualShaderNodeFloatOp", TTR("Returns the lesser of two values."), VisualShaderNodeFloatOp::OP_MIN, VisualShaderNode::PORT_TYPE_SCALAR)); add_options.push_back(AddOption("Mix", "Scalar", "Functions", "VisualShaderNodeScalarInterp", TTR("Linear interpolation between two scalars."), -1, VisualShaderNode::PORT_TYPE_SCALAR)); - add_options.push_back(AddOption("Negate", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Returns the opposite value of the parameter."), VisualShaderNodeScalarFunc::FUNC_NEGATE, VisualShaderNode::PORT_TYPE_SCALAR)); - add_options.push_back(AddOption("OneMinus", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("1.0 - scalar"), VisualShaderNodeScalarFunc::FUNC_ONEMINUS, VisualShaderNode::PORT_TYPE_SCALAR)); - add_options.push_back(AddOption("Pow", "Scalar", "Functions", "VisualShaderNodeScalarOp", TTR("Returns the value of the first parameter raised to the power of the second."), VisualShaderNodeScalarOp::OP_POW, VisualShaderNode::PORT_TYPE_SCALAR)); - add_options.push_back(AddOption("Radians", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Converts a quantity in degrees to radians."), VisualShaderNodeScalarFunc::FUNC_RADIANS, VisualShaderNode::PORT_TYPE_SCALAR)); - add_options.push_back(AddOption("Reciprocal", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("1.0 / scalar"), VisualShaderNodeScalarFunc::FUNC_RECIPROCAL, VisualShaderNode::PORT_TYPE_SCALAR)); - add_options.push_back(AddOption("Round", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Finds the nearest integer to the parameter."), VisualShaderNodeScalarFunc::FUNC_ROUND, VisualShaderNode::PORT_TYPE_SCALAR)); - add_options.push_back(AddOption("RoundEven", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Finds the nearest even integer to the parameter."), VisualShaderNodeScalarFunc::FUNC_ROUNDEVEN, VisualShaderNode::PORT_TYPE_SCALAR)); - add_options.push_back(AddOption("Saturate", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Clamps the value between 0.0 and 1.0."), VisualShaderNodeScalarFunc::FUNC_SATURATE, VisualShaderNode::PORT_TYPE_SCALAR)); - add_options.push_back(AddOption("Sign", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Extracts the sign of the parameter."), VisualShaderNodeScalarFunc::FUNC_SIGN, VisualShaderNode::PORT_TYPE_SCALAR)); - add_options.push_back(AddOption("Sin", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Returns the sine of the parameter."), VisualShaderNodeScalarFunc::FUNC_SIN, VisualShaderNode::PORT_TYPE_SCALAR)); - add_options.push_back(AddOption("SinH", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Returns the hyperbolic sine of the parameter."), VisualShaderNodeScalarFunc::FUNC_SINH, VisualShaderNode::PORT_TYPE_SCALAR)); - add_options.push_back(AddOption("Sqrt", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Returns the square root of the parameter."), VisualShaderNodeScalarFunc::FUNC_SQRT, VisualShaderNode::PORT_TYPE_SCALAR)); + add_options.push_back(AddOption("Negate", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Returns the opposite value of the parameter."), VisualShaderNodeFloatFunc::FUNC_NEGATE, VisualShaderNode::PORT_TYPE_SCALAR)); + add_options.push_back(AddOption("Negate", "Scalar", "Functions", "VisualShaderNodeIntFunc", TTR("Returns the opposite value of the parameter."), VisualShaderNodeIntFunc::FUNC_NEGATE, VisualShaderNode::PORT_TYPE_SCALAR_INT)); + add_options.push_back(AddOption("OneMinus", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("1.0 - scalar"), VisualShaderNodeFloatFunc::FUNC_ONEMINUS, VisualShaderNode::PORT_TYPE_SCALAR)); + add_options.push_back(AddOption("Pow", "Scalar", "Functions", "VisualShaderNodeFloatOp", TTR("Returns the value of the first parameter raised to the power of the second."), VisualShaderNodeFloatOp::OP_POW, VisualShaderNode::PORT_TYPE_SCALAR)); + add_options.push_back(AddOption("Radians", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Converts a quantity in degrees to radians."), VisualShaderNodeFloatFunc::FUNC_RADIANS, VisualShaderNode::PORT_TYPE_SCALAR)); + add_options.push_back(AddOption("Reciprocal", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("1.0 / scalar"), VisualShaderNodeFloatFunc::FUNC_RECIPROCAL, VisualShaderNode::PORT_TYPE_SCALAR)); + add_options.push_back(AddOption("Round", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Finds the nearest integer to the parameter."), VisualShaderNodeFloatFunc::FUNC_ROUND, VisualShaderNode::PORT_TYPE_SCALAR)); + add_options.push_back(AddOption("RoundEven", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Finds the nearest even integer to the parameter."), VisualShaderNodeFloatFunc::FUNC_ROUNDEVEN, VisualShaderNode::PORT_TYPE_SCALAR)); + add_options.push_back(AddOption("Saturate", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Clamps the value between 0.0 and 1.0."), VisualShaderNodeFloatFunc::FUNC_SATURATE, VisualShaderNode::PORT_TYPE_SCALAR)); + add_options.push_back(AddOption("Sign", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Extracts the sign of the parameter."), VisualShaderNodeFloatFunc::FUNC_SIGN, VisualShaderNode::PORT_TYPE_SCALAR)); + add_options.push_back(AddOption("Sign", "Scalar", "Functions", "VisualShaderNodeIntFunc", TTR("Extracts the sign of the parameter."), VisualShaderNodeIntFunc::FUNC_SIGN, VisualShaderNode::PORT_TYPE_SCALAR_INT)); + add_options.push_back(AddOption("Sin", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Returns the sine of the parameter."), VisualShaderNodeFloatFunc::FUNC_SIN, VisualShaderNode::PORT_TYPE_SCALAR)); + add_options.push_back(AddOption("SinH", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Returns the hyperbolic sine of the parameter."), VisualShaderNodeFloatFunc::FUNC_SINH, VisualShaderNode::PORT_TYPE_SCALAR)); + add_options.push_back(AddOption("Sqrt", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Returns the square root of the parameter."), VisualShaderNodeFloatFunc::FUNC_SQRT, VisualShaderNode::PORT_TYPE_SCALAR)); add_options.push_back(AddOption("SmoothStep", "Scalar", "Functions", "VisualShaderNodeScalarSmoothStep", TTR("SmoothStep function( scalar(edge0), scalar(edge1), scalar(x) ).\n\nReturns 0.0 if 'x' is smaller than 'edge0' and 1.0 if x is larger than 'edge1'. Otherwise the return value is interpolated between 0.0 and 1.0 using Hermite polynomials."), -1, VisualShaderNode::PORT_TYPE_SCALAR)); - add_options.push_back(AddOption("Step", "Scalar", "Functions", "VisualShaderNodeScalarOp", TTR("Step function( scalar(edge), scalar(x) ).\n\nReturns 0.0 if 'x' is smaller than 'edge' and otherwise 1.0."), VisualShaderNodeScalarOp::OP_STEP, VisualShaderNode::PORT_TYPE_SCALAR)); - add_options.push_back(AddOption("Tan", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Returns the tangent of the parameter."), VisualShaderNodeScalarFunc::FUNC_TAN, VisualShaderNode::PORT_TYPE_SCALAR)); - add_options.push_back(AddOption("TanH", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Returns the hyperbolic tangent of the parameter."), VisualShaderNodeScalarFunc::FUNC_TANH, VisualShaderNode::PORT_TYPE_SCALAR)); - add_options.push_back(AddOption("Trunc", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Finds the truncated value of the parameter."), VisualShaderNodeScalarFunc::FUNC_TRUNC, VisualShaderNode::PORT_TYPE_SCALAR)); - - add_options.push_back(AddOption("Add", "Scalar", "Operators", "VisualShaderNodeScalarOp", TTR("Adds scalar to scalar."), VisualShaderNodeScalarOp::OP_ADD, VisualShaderNode::PORT_TYPE_SCALAR)); - add_options.push_back(AddOption("Divide", "Scalar", "Operators", "VisualShaderNodeScalarOp", TTR("Divides scalar by scalar."), VisualShaderNodeScalarOp::OP_DIV, VisualShaderNode::PORT_TYPE_SCALAR)); - add_options.push_back(AddOption("Multiply", "Scalar", "Operators", "VisualShaderNodeScalarOp", TTR("Multiplies scalar by scalar."), VisualShaderNodeScalarOp::OP_MUL, VisualShaderNode::PORT_TYPE_SCALAR)); - add_options.push_back(AddOption("Remainder", "Scalar", "Operators", "VisualShaderNodeScalarOp", TTR("Returns the remainder of the two scalars."), VisualShaderNodeScalarOp::OP_MOD, VisualShaderNode::PORT_TYPE_SCALAR)); - add_options.push_back(AddOption("Subtract", "Scalar", "Operators", "VisualShaderNodeScalarOp", TTR("Subtracts scalar from scalar."), VisualShaderNodeScalarOp::OP_SUB, VisualShaderNode::PORT_TYPE_SCALAR)); - - add_options.push_back(AddOption("ScalarConstant", "Scalar", "Variables", "VisualShaderNodeScalarConstant", TTR("Scalar constant."), -1, VisualShaderNode::PORT_TYPE_SCALAR)); - add_options.push_back(AddOption("ScalarUniform", "Scalar", "Variables", "VisualShaderNodeScalarUniform", TTR("Scalar uniform."), -1, VisualShaderNode::PORT_TYPE_SCALAR)); + add_options.push_back(AddOption("Step", "Scalar", "Functions", "VisualShaderNodeFloatOp", TTR("Step function( scalar(edge), scalar(x) ).\n\nReturns 0.0 if 'x' is smaller than 'edge' and otherwise 1.0."), VisualShaderNodeFloatOp::OP_STEP, VisualShaderNode::PORT_TYPE_SCALAR)); + add_options.push_back(AddOption("Tan", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Returns the tangent of the parameter."), VisualShaderNodeFloatFunc::FUNC_TAN, VisualShaderNode::PORT_TYPE_SCALAR)); + add_options.push_back(AddOption("TanH", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Returns the hyperbolic tangent of the parameter."), VisualShaderNodeFloatFunc::FUNC_TANH, VisualShaderNode::PORT_TYPE_SCALAR)); + add_options.push_back(AddOption("Trunc", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Finds the truncated value of the parameter."), VisualShaderNodeFloatFunc::FUNC_TRUNC, VisualShaderNode::PORT_TYPE_SCALAR)); + + add_options.push_back(AddOption("Add", "Scalar", "Operators", "VisualShaderNodeFloatOp", TTR("Sums two floating-point scalars."), VisualShaderNodeFloatOp::OP_ADD, VisualShaderNode::PORT_TYPE_SCALAR)); + add_options.push_back(AddOption("Add", "Scalar", "Operators", "VisualShaderNodeIntOp", TTR("Sums two integer scalars."), VisualShaderNodeIntOp::OP_ADD, VisualShaderNode::PORT_TYPE_SCALAR_INT)); + add_options.push_back(AddOption("Divide", "Scalar", "Operators", "VisualShaderNodeFloatOp", TTR("Divides two floating-point scalars."), VisualShaderNodeFloatOp::OP_DIV, VisualShaderNode::PORT_TYPE_SCALAR)); + add_options.push_back(AddOption("Divide", "Scalar", "Operators", "VisualShaderNodeIntOp", TTR("Divides two integer scalars."), VisualShaderNodeIntOp::OP_DIV, VisualShaderNode::PORT_TYPE_SCALAR_INT)); + add_options.push_back(AddOption("Multiply", "Scalar", "Operators", "VisualShaderNodeFloatOp", TTR("Multiplies two floating-point scalars."), VisualShaderNodeFloatOp::OP_MUL, VisualShaderNode::PORT_TYPE_SCALAR)); + add_options.push_back(AddOption("Multiply", "Scalar", "Operators", "VisualShaderNodeIntOp", TTR("Multiplies two integer scalars."), VisualShaderNodeIntOp::OP_MUL, VisualShaderNode::PORT_TYPE_SCALAR_INT)); + add_options.push_back(AddOption("Remainder", "Scalar", "Operators", "VisualShaderNodeFloatOp", TTR("Returns the remainder of the two floating-point scalars."), VisualShaderNodeFloatOp::OP_MOD, VisualShaderNode::PORT_TYPE_SCALAR)); + add_options.push_back(AddOption("Remainder", "Scalar", "Operators", "VisualShaderNodeIntOp", TTR("Returns the remainder of the two integer scalars."), VisualShaderNodeIntOp::OP_MOD, VisualShaderNode::PORT_TYPE_SCALAR_INT)); + add_options.push_back(AddOption("Subtract", "Scalar", "Operators", "VisualShaderNodeFloatOp", TTR("Subtracts two floating-point scalars."), VisualShaderNodeFloatOp::OP_SUB, VisualShaderNode::PORT_TYPE_SCALAR)); + add_options.push_back(AddOption("Subtract", "Scalar", "Operators", "VisualShaderNodeIntOp", TTR("Subtracts two integer scalars."), VisualShaderNodeIntOp::OP_SUB, VisualShaderNode::PORT_TYPE_SCALAR_INT)); + + add_options.push_back(AddOption("FloatConstant", "Scalar", "Variables", "VisualShaderNodeFloatConstant", TTR("Scalar floating-point constant."), -1, VisualShaderNode::PORT_TYPE_SCALAR)); + add_options.push_back(AddOption("IntConstant", "Scalar", "Variables", "VisualShaderNodeIntConstant", TTR("Scalar integer constant."), -1, VisualShaderNode::PORT_TYPE_SCALAR_INT)); + add_options.push_back(AddOption("FloatUniform", "Scalar", "Variables", "VisualShaderNodeFloatUniform", TTR("Scalar floating-point uniform."), -1, VisualShaderNode::PORT_TYPE_SCALAR)); + add_options.push_back(AddOption("IntUniform", "Scalar", "Variables", "VisualShaderNodeIntUniform", TTR("Scalar integer uniform."), -1, VisualShaderNode::PORT_TYPE_SCALAR_INT)); // TEXTURES - add_options.push_back(AddOption("CubeMap", "Textures", "Functions", "VisualShaderNodeCubeMap", TTR("Perform the cubic texture lookup."), -1, -1)); + add_options.push_back(AddOption("CubeMap", "Textures", "Functions", "VisualShaderNodeCubemap", TTR("Perform the cubic texture lookup."), -1, -1)); texture_node_option_idx = add_options.size(); add_options.push_back(AddOption("Texture2D", "Textures", "Functions", "VisualShaderNodeTexture", TTR("Perform the texture lookup."), -1, -1)); - add_options.push_back(AddOption("CubeMapUniform", "Textures", "Variables", "VisualShaderNodeCubeMapUniform", TTR("Cubic texture uniform lookup."), -1, -1)); + add_options.push_back(AddOption("CubeMapUniform", "Textures", "Variables", "VisualShaderNodeCubemapUniform", TTR("Cubic texture uniform lookup."), -1, -1)); add_options.push_back(AddOption("TextureUniform", "Textures", "Variables", "VisualShaderNodeTextureUniform", TTR("2D texture uniform lookup."), -1, -1)); add_options.push_back(AddOption("TextureUniformTriplanar", "Textures", "Variables", "VisualShaderNodeTextureUniformTriplanar", TTR("2D texture uniform lookup with triplanar."), -1, -1, VisualShader::TYPE_FRAGMENT | VisualShader::TYPE_LIGHT, Shader::MODE_SPATIAL)); @@ -2841,7 +2929,7 @@ VisualShaderEditor::VisualShaderEditor() { property_editor = memnew(CustomPropertyEditor); add_child(property_editor); - property_editor->connect("variant_changed", this, "_port_edited"); + property_editor->connect_compat("variant_changed", this, "_port_edited"); } void VisualShaderEditorPlugin::edit(Object *p_object) { @@ -2902,7 +2990,7 @@ protected: public: void _notification(int p_what) { if (p_what == NOTIFICATION_READY) { - connect("item_selected", this, "_item_selected"); + connect_compat("item_selected", this, "_item_selected"); } } @@ -2912,8 +3000,9 @@ public: void setup(const Ref<VisualShaderNodeInput> &p_input) { input = p_input; - Ref<Texture2D> type_icon[5] = { + Ref<Texture2D> type_icon[6] = { EditorNode::get_singleton()->get_gui_base()->get_icon("float", "EditorIcons"), + EditorNode::get_singleton()->get_gui_base()->get_icon("int", "EditorIcons"), EditorNode::get_singleton()->get_gui_base()->get_icon("Vector3", "EditorIcons"), EditorNode::get_singleton()->get_gui_base()->get_icon("bool", "EditorIcons"), EditorNode::get_singleton()->get_gui_base()->get_icon("Transform", "EditorIcons"), @@ -3031,16 +3120,16 @@ public: bool res_prop = Object::cast_to<EditorPropertyResource>(p_properties[i]); if (res_prop) { - p_properties[i]->connect("resource_selected", this, "_resource_selected"); + p_properties[i]->connect_compat("resource_selected", this, "_resource_selected"); } - properties[i]->connect("property_changed", this, "_property_changed"); + properties[i]->connect_compat("property_changed", this, "_property_changed"); properties[i]->set_object_and_property(node.ptr(), p_names[i]); properties[i]->update_property(); properties[i]->set_name_split_ratio(0); } - node->connect("changed", this, "_node_changed"); - node->connect("editor_refresh_request", this, "_refresh_request", varray(), CONNECT_DEFERRED); + node->connect_compat("changed", this, "_node_changed"); + node->connect_compat("editor_refresh_request", this, "_refresh_request", varray(), CONNECT_DEFERRED); } static void _bind_methods() { @@ -3206,7 +3295,7 @@ EditorPropertyShaderMode::EditorPropertyShaderMode() { options->set_clip_text(true); add_child(options); add_focusable(options); - options->connect("item_selected", this, "_option_selected"); + options->connect_compat("item_selected", this, "_option_selected"); } bool EditorInspectorShaderModePlugin::can_handle(Object *p_object) { @@ -3279,7 +3368,7 @@ void VisualShaderNodePortPreview::_shader_changed() { void VisualShaderNodePortPreview::setup(const Ref<VisualShader> &p_shader, VisualShader::Type p_type, int p_node, int p_port) { shader = p_shader; - shader->connect("changed", this, "_shader_changed"); + shader->connect_compat("changed", this, "_shader_changed"); type = p_type; port = p_port; node = p_node; diff --git a/editor/plugins/visual_shader_editor_plugin.h b/editor/plugins/visual_shader_editor_plugin.h index 150cf16167..8756fe9fe9 100644 --- a/editor/plugins/visual_shader_editor_plugin.h +++ b/editor/plugins/visual_shader_editor_plugin.h @@ -81,6 +81,7 @@ class VisualShaderEditor : public VBoxContainer { bool saved_node_pos_dirty; ConfirmationDialog *members_dialog; + PopupMenu *popup_menu; MenuButton *tools; bool preview_showed; @@ -90,6 +91,15 @@ class VisualShaderEditor : public VBoxContainer { COLLAPSE_ALL }; + enum NodeMenuOptions { + ADD, + SEPARATOR, // ignore + COPY, + PASTE, + DELETE, + DUPLICATE, + }; + Tree *members; AcceptDialog *alert; LineEdit *node_filter; @@ -104,7 +114,6 @@ class VisualShaderEditor : public VBoxContainer { struct AddOption { String name; String category; - String sub_category; String type; String description; int sub_func; @@ -116,12 +125,12 @@ class VisualShaderEditor : public VBoxContainer { float value; bool highend; bool is_custom; + int temp_idx; AddOption(const String &p_name = String(), const String &p_category = String(), const String &p_sub_category = String(), const String &p_type = String(), const String &p_description = String(), int p_sub_func = -1, int p_return_type = -1, int p_mode = -1, int p_func = -1, float p_value = -1, bool p_highend = false) { name = p_name; type = p_type; - category = p_category; - sub_category = p_sub_category; + category = p_category + "/" + p_sub_category; description = p_description; sub_func = p_sub_func; return_type = p_return_type; @@ -135,8 +144,7 @@ class VisualShaderEditor : public VBoxContainer { AddOption(const String &p_name, const String &p_category, const String &p_sub_category, const String &p_type, const String &p_description, const String &p_sub_func, int p_return_type = -1, int p_mode = -1, int p_func = -1, float p_value = -1, bool p_highend = false) { name = p_name; type = p_type; - category = p_category; - sub_category = p_sub_category; + category = p_category + "/" + p_sub_category; description = p_description; sub_func = 0; sub_func_str = p_sub_func; @@ -148,6 +156,12 @@ class VisualShaderEditor : public VBoxContainer { is_custom = false; } }; + struct _OptionComparator { + + _FORCE_INLINE_ bool operator()(const AddOption &a, const AddOption &b) const { + return a.category.count("/") > b.category.count("/") || (a.category + "/" + a.name).naturalnocasecmp_to(b.category + "/" + b.name) < 0; + } + }; Vector<AddOption> add_options; int texture_node_option_idx; @@ -177,7 +191,7 @@ class VisualShaderEditor : public VBoxContainer { void _node_selected(Object *p_node); void _delete_request(int); - void _on_nodes_delete(); + void _delete_nodes(); void _removed_from_graph(); @@ -212,7 +226,7 @@ class VisualShaderEditor : public VBoxContainer { void _clear_buffer(); void _copy_nodes(); - void _paste_nodes(); + void _paste_nodes(bool p_use_custom_position = false, const Vector2 &p_custom_position = Vector2()); Vector<Ref<VisualShaderNodePlugin> > plugins; @@ -246,6 +260,9 @@ class VisualShaderEditor : public VBoxContainer { void _member_create(); void _member_cancel(); + Vector2 menu_point; + void _node_menu_id_pressed(int p_idx); + Variant get_drag_data_fw(const Point2 &p_point, Control *p_from); bool can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const; void drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from); @@ -265,7 +282,7 @@ public: static VisualShaderEditor *get_singleton() { return singleton; } void clear_custom_types(); - void add_custom_type(const String &p_name, const Ref<Script> &p_script, const String &p_description, int p_return_icon_type, const String &p_category, const String &p_subcategory, bool p_highend); + void add_custom_type(const String &p_name, const Ref<Script> &p_script, const String &p_description, int p_return_icon_type, const String &p_category, bool p_highend); virtual Size2 get_minimum_size() const; void edit(VisualShader *p_visual_shader); diff --git a/editor/progress_dialog.cpp b/editor/progress_dialog.cpp index 0665b1d013..59db531581 100644 --- a/editor/progress_dialog.cpp +++ b/editor/progress_dialog.cpp @@ -264,5 +264,5 @@ ProgressDialog::ProgressDialog() { cancel_hb->add_child(cancel); cancel->set_text(TTR("Cancel")); cancel_hb->add_spacer(); - cancel->connect("pressed", this, "_cancel_pressed"); + cancel->connect_compat("pressed", this, "_cancel_pressed"); } diff --git a/editor/project_export.cpp b/editor/project_export.cpp index 3c8fef6233..753125eb03 100644 --- a/editor/project_export.cpp +++ b/editor/project_export.cpp @@ -53,7 +53,7 @@ void ProjectExportDialog::_notification(int p_what) { case NOTIFICATION_READY: { duplicate_preset->set_icon(get_icon("Duplicate", "EditorIcons")); delete_preset->set_icon(get_icon("Remove", "EditorIcons")); - connect("confirmed", this, "_export_pck_zip"); + connect_compat("confirmed", this, "_export_pck_zip"); custom_feature_display->get_parent_control()->add_style_override("panel", get_stylebox("bg", "Tree")); } break; case NOTIFICATION_POPUP_HIDE: { @@ -913,10 +913,10 @@ void ProjectExportDialog::_validate_export_path(const String &p_path) { if (invalid_path) { export_project->get_ok()->set_disabled(true); - export_project->get_line_edit()->disconnect("text_entered", export_project, "_file_entered"); + export_project->get_line_edit()->disconnect_compat("text_entered", export_project, "_file_entered"); } else { export_project->get_ok()->set_disabled(false); - export_project->get_line_edit()->connect("text_entered", export_project, "_file_entered"); + export_project->get_line_edit()->connect_compat("text_entered", export_project, "_file_entered"); } } @@ -946,9 +946,9 @@ void ProjectExportDialog::_export_project() { } // Ensure that signal is connected if previous attempt left it disconnected with _validate_export_path - if (!export_project->get_line_edit()->is_connected("text_entered", export_project, "_file_entered")) { + if (!export_project->get_line_edit()->is_connected_compat("text_entered", export_project, "_file_entered")) { export_project->get_ok()->set_disabled(false); - export_project->get_line_edit()->connect("text_entered", export_project, "_file_entered"); + export_project->get_line_edit()->connect_compat("text_entered", export_project, "_file_entered"); } export_project->set_mode(EditorFileDialog::MODE_SAVE_FILE); @@ -1085,7 +1085,7 @@ ProjectExportDialog::ProjectExportDialog() { add_preset = memnew(MenuButton); add_preset->set_text(TTR("Add...")); - add_preset->get_popup()->connect("index_pressed", this, "_add_preset"); + add_preset->get_popup()->connect_compat("index_pressed", this, "_add_preset"); preset_hb->add_child(add_preset); MarginContainer *mc = memnew(MarginContainer); preset_vb->add_child(mc); @@ -1093,13 +1093,13 @@ ProjectExportDialog::ProjectExportDialog() { presets = memnew(ItemList); presets->set_drag_forwarding(this); mc->add_child(presets); - presets->connect("item_selected", this, "_edit_preset"); + presets->connect_compat("item_selected", this, "_edit_preset"); duplicate_preset = memnew(ToolButton); preset_hb->add_child(duplicate_preset); - duplicate_preset->connect("pressed", this, "_duplicate_preset"); + duplicate_preset->connect_compat("pressed", this, "_duplicate_preset"); delete_preset = memnew(ToolButton); preset_hb->add_child(delete_preset); - delete_preset->connect("pressed", this, "_delete_preset"); + delete_preset->connect_compat("pressed", this, "_delete_preset"); // Preset settings. @@ -1109,11 +1109,11 @@ ProjectExportDialog::ProjectExportDialog() { name = memnew(LineEdit); settings_vb->add_margin_child(TTR("Name:"), name); - name->connect("text_changed", this, "_name_changed"); + name->connect_compat("text_changed", this, "_name_changed"); runnable = memnew(CheckButton); runnable->set_text(TTR("Runnable")); runnable->set_tooltip(TTR("If checked, the preset will be available for use in one-click deploy.\nOnly one preset per platform may be marked as runnable.")); - runnable->connect("pressed", this, "_runnable_pressed"); + runnable->connect_compat("pressed", this, "_runnable_pressed"); settings_vb->add_child(runnable); export_path = memnew(EditorPropertyPath); @@ -1121,7 +1121,7 @@ ProjectExportDialog::ProjectExportDialog() { export_path->set_label(TTR("Export Path")); export_path->set_object_and_property(this, "export_path"); export_path->set_save_mode(); - export_path->connect("property_changed", this, "_export_path_changed"); + export_path->connect_compat("property_changed", this, "_export_path_changed"); // Subsections. @@ -1137,7 +1137,7 @@ ProjectExportDialog::ProjectExportDialog() { sections->add_child(parameters); parameters->set_name(TTR("Options")); parameters->set_v_size_flags(SIZE_EXPAND_FILL); - parameters->connect("property_edited", this, "_update_parameters"); + parameters->connect_compat("property_edited", this, "_update_parameters"); // Resources export parameters. @@ -1150,7 +1150,7 @@ ProjectExportDialog::ProjectExportDialog() { export_filter->add_item(TTR("Export selected scenes (and dependencies)")); export_filter->add_item(TTR("Export selected resources (and dependencies)")); resources_vb->add_margin_child(TTR("Export Mode:"), export_filter); - export_filter->connect("item_selected", this, "_export_type_changed"); + export_filter->connect_compat("item_selected", this, "_export_type_changed"); include_label = memnew(Label); include_label->set_text(TTR("Resources to export:")); @@ -1161,19 +1161,19 @@ ProjectExportDialog::ProjectExportDialog() { include_files = memnew(Tree); include_margin->add_child(include_files); - include_files->connect("item_edited", this, "_tree_changed"); + include_files->connect_compat("item_edited", this, "_tree_changed"); include_filters = memnew(LineEdit); resources_vb->add_margin_child( TTR("Filters to export non-resource files/folders\n(comma-separated, e.g: *.json, *.txt, docs/*)"), include_filters); - include_filters->connect("text_changed", this, "_filter_changed"); + include_filters->connect_compat("text_changed", this, "_filter_changed"); exclude_filters = memnew(LineEdit); resources_vb->add_margin_child( TTR("Filters to exclude files/folders from project\n(comma-separated, e.g: *.json, *.txt, docs/*)"), exclude_filters); - exclude_filters->connect("text_changed", this, "_filter_changed"); + exclude_filters->connect_compat("text_changed", this, "_filter_changed"); // Patch packages. @@ -1190,8 +1190,8 @@ ProjectExportDialog::ProjectExportDialog() { patch_vb->add_child(patches); patches->set_v_size_flags(SIZE_EXPAND_FILL); patches->set_hide_root(true); - patches->connect("button_pressed", this, "_patch_button_pressed"); - patches->connect("item_edited", this, "_patch_edited"); + patches->connect_compat("button_pressed", this, "_patch_button_pressed"); + patches->connect_compat("item_edited", this, "_patch_edited"); patches->set_drag_forwarding(this); patches->set_edit_checkbox_cell_only_when_checkbox_is_pressed(true); @@ -1206,12 +1206,12 @@ ProjectExportDialog::ProjectExportDialog() { patch_dialog = memnew(EditorFileDialog); patch_dialog->add_filter("*.pck ; " + TTR("Pack File")); patch_dialog->set_mode(EditorFileDialog::MODE_OPEN_FILE); - patch_dialog->connect("file_selected", this, "_patch_selected"); + patch_dialog->connect_compat("file_selected", this, "_patch_selected"); add_child(patch_dialog); patch_erase = memnew(ConfirmationDialog); patch_erase->get_ok()->set_text(TTR("Delete")); - patch_erase->connect("confirmed", this, "_patch_deleted"); + patch_erase->connect_compat("confirmed", this, "_patch_deleted"); add_child(patch_erase); // Feature tags. @@ -1219,7 +1219,7 @@ ProjectExportDialog::ProjectExportDialog() { VBoxContainer *feature_vb = memnew(VBoxContainer); feature_vb->set_name(TTR("Features")); custom_features = memnew(LineEdit); - custom_features->connect("text_changed", this, "_custom_features_changed"); + custom_features->connect_compat("text_changed", this, "_custom_features_changed"); feature_vb->add_margin_child(TTR("Custom (comma-separated):"), custom_features); Panel *features_panel = memnew(Panel); custom_feature_display = memnew(RichTextLabel); @@ -1240,9 +1240,9 @@ ProjectExportDialog::ProjectExportDialog() { script_mode->add_item(TTR("Text"), (int)EditorExportPreset::MODE_SCRIPT_TEXT); script_mode->add_item(TTR("Compiled"), (int)EditorExportPreset::MODE_SCRIPT_COMPILED); script_mode->add_item(TTR("Encrypted (Provide Key Below)"), (int)EditorExportPreset::MODE_SCRIPT_ENCRYPTED); - script_mode->connect("item_selected", this, "_script_export_mode_changed"); + script_mode->connect_compat("item_selected", this, "_script_export_mode_changed"); script_key = memnew(LineEdit); - script_key->connect("text_changed", this, "_script_encryption_key_changed"); + script_key->connect_compat("text_changed", this, "_script_encryption_key_changed"); script_key_error = memnew(Label); script_key_error->set_text("- " + TTR("Invalid Encryption Key (must be 64 characters long)")); script_key_error->add_color_override("font_color", EditorNode::get_singleton()->get_gui_base()->get_color("error_color", "Editor")); @@ -1250,7 +1250,7 @@ ProjectExportDialog::ProjectExportDialog() { script_vb->add_child(script_key_error); sections->add_child(script_vb); - sections->connect("tab_changed", this, "_tab_changed"); + sections->connect_compat("tab_changed", this, "_tab_changed"); // Disable by default. name->set_editable(false); @@ -1267,7 +1267,7 @@ ProjectExportDialog::ProjectExportDialog() { delete_confirm = memnew(ConfirmationDialog); add_child(delete_confirm); delete_confirm->get_ok()->set_text(TTR("Delete")); - delete_confirm->connect("confirmed", this, "_delete_preset_confirm"); + delete_confirm->connect_compat("confirmed", this, "_delete_preset_confirm"); // Export buttons, dialogs and errors. @@ -1276,7 +1276,7 @@ ProjectExportDialog::ProjectExportDialog() { get_cancel()->set_text(TTR("Close")); get_ok()->set_text(TTR("Export PCK/Zip")); export_button = add_button(TTR("Export Project"), !OS::get_singleton()->get_swap_ok_cancel(), "export"); - export_button->connect("pressed", this, "_export_project"); + export_button->connect_compat("pressed", this, "_export_project"); // Disable initially before we select a valid preset export_button->set_disabled(true); get_ok()->set_disabled(true); @@ -1288,10 +1288,10 @@ ProjectExportDialog::ProjectExportDialog() { export_all_dialog->get_ok()->hide(); export_all_dialog->add_button(TTR("Debug"), true, "debug"); export_all_dialog->add_button(TTR("Release"), true, "release"); - export_all_dialog->connect("custom_action", this, "_export_all_dialog_action"); + export_all_dialog->connect_compat("custom_action", this, "_export_all_dialog_action"); export_all_button = add_button(TTR("Export All"), !OS::get_singleton()->get_swap_ok_cancel(), "export"); - export_all_button->connect("pressed", this, "_export_all_dialog"); + export_all_button->connect_compat("pressed", this, "_export_all_dialog"); export_all_button->set_disabled(true); export_pck_zip = memnew(EditorFileDialog); @@ -1300,7 +1300,7 @@ ProjectExportDialog::ProjectExportDialog() { export_pck_zip->set_access(EditorFileDialog::ACCESS_FILESYSTEM); export_pck_zip->set_mode(EditorFileDialog::MODE_SAVE_FILE); add_child(export_pck_zip); - export_pck_zip->connect("file_selected", this, "_export_pck_zip_selected"); + export_pck_zip->connect_compat("file_selected", this, "_export_pck_zip_selected"); export_error = memnew(Label); main_vb->add_child(export_error); @@ -1326,13 +1326,13 @@ ProjectExportDialog::ProjectExportDialog() { download_templates->set_text(TTR("Manage Export Templates")); download_templates->set_v_size_flags(SIZE_SHRINK_CENTER); export_templates_error->add_child(download_templates); - download_templates->connect("pressed", this, "_open_export_template_manager"); + download_templates->connect_compat("pressed", this, "_open_export_template_manager"); export_project = memnew(EditorFileDialog); export_project->set_access(EditorFileDialog::ACCESS_FILESYSTEM); add_child(export_project); - export_project->connect("file_selected", this, "_export_project_to_path"); - export_project->get_line_edit()->connect("text_changed", this, "_validate_export_path"); + export_project->connect_compat("file_selected", this, "_export_project_to_path"); + export_project->get_line_edit()->connect_compat("text_changed", this, "_validate_export_path"); export_debug = memnew(CheckBox); export_debug->set_text(TTR("Export With Debug")); diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp index 0c22db075d..23a7628eeb 100644 --- a/editor/project_manager.cpp +++ b/editor/project_manager.cpp @@ -811,7 +811,7 @@ public: create_dir = memnew(Button); pnhb->add_child(create_dir); create_dir->set_text(TTR("Create Folder")); - create_dir->connect("pressed", this, "_create_folder"); + create_dir->connect_compat("pressed", this, "_create_folder"); path_container = memnew(VBoxContainer); vb->add_child(path_container); @@ -848,7 +848,7 @@ public: browse = memnew(Button); browse->set_text(TTR("Browse")); - browse->connect("pressed", this, "_browse_path"); + browse->connect_compat("pressed", this, "_browse_path"); pphb->add_child(browse); // install status icon @@ -858,7 +858,7 @@ public: install_browse = memnew(Button); install_browse->set_text(TTR("Browse")); - install_browse->connect("pressed", this, "_browse_install_path"); + install_browse->connect_compat("pressed", this, "_browse_install_path"); iphb->add_child(install_browse); msg = memnew(Label); @@ -885,7 +885,7 @@ public: rs_button->set_pressed(true); rvb->add_child(rs_button); l = memnew(Label); - l->set_text(TTR("- Higher visual quality\n- More accurate API, which produces very fast code\n- Some features not implemented yet — work in progress\n- Incompatible with older hardware\n- Not recommended for web and mobile games")); + l->set_text(TTR("- Higher visual quality\n- More accurate API, which produces very fast code\n- Some features not implemented yet - work in progress\n- Incompatible with older hardware\n- Not recommended for web and mobile games")); l->set_modulate(Color(1, 1, 1, 0.7)); rvb->add_child(l); @@ -928,13 +928,13 @@ public: fdialog_install->set_access(FileDialog::ACCESS_FILESYSTEM); add_child(fdialog); add_child(fdialog_install); - project_name->connect("text_changed", this, "_text_changed"); - project_path->connect("text_changed", this, "_path_text_changed"); - install_path->connect("text_changed", this, "_path_text_changed"); - fdialog->connect("dir_selected", this, "_path_selected"); - fdialog->connect("file_selected", this, "_file_selected"); - fdialog_install->connect("dir_selected", this, "_install_path_selected"); - fdialog_install->connect("file_selected", this, "_install_path_selected"); + project_name->connect_compat("text_changed", this, "_text_changed"); + project_path->connect_compat("text_changed", this, "_path_text_changed"); + install_path->connect_compat("text_changed", this, "_path_text_changed"); + fdialog->connect_compat("dir_selected", this, "_path_selected"); + fdialog->connect_compat("file_selected", this, "_file_selected"); + fdialog_install->connect_compat("dir_selected", this, "_install_path_selected"); + fdialog_install->connect_compat("file_selected", this, "_install_path_selected"); set_hide_on_ok(false); mode = MODE_NEW; @@ -1320,8 +1320,8 @@ void ProjectList::create_project_item_control(int p_index) { Color font_color = get_color("font_color", "Tree"); ProjectListItemControl *hb = memnew(ProjectListItemControl); - hb->connect("draw", this, "_panel_draw", varray(hb)); - hb->connect("gui_input", this, "_panel_input", varray(hb)); + hb->connect_compat("draw", this, "_panel_draw", varray(hb)); + hb->connect_compat("gui_input", this, "_panel_input", varray(hb)); hb->add_constant_override("separation", 10 * EDSCALE); hb->set_tooltip(item.description); @@ -1332,7 +1332,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", this, "_favorite_pressed", varray(hb)); + favorite->connect_compat("pressed", this, "_favorite_pressed", varray(hb)); favorite_box->add_child(favorite); favorite_box->set_alignment(BoxContainer::ALIGN_CENTER); hb->add_child(favorite_box); @@ -1380,7 +1380,7 @@ void ProjectList::create_project_item_control(int p_index) { path_hb->add_child(show); if (!item.missing) { - show->connect("pressed", this, "_show_project", varray(item.path)); + show->connect_compat("pressed", this, "_show_project", varray(item.path)); show->set_tooltip(TTR("Show in File Manager")); } else { show->set_tooltip(TTR("Error: Project is missing on the filesystem.")); @@ -2327,7 +2327,7 @@ void ProjectManager::_install_project(const String &p_zip_path, const String &p_ npdialog->show_dialog(); } -void ProjectManager::_files_dropped(PoolStringArray p_files, int p_screen) { +void ProjectManager::_files_dropped(PackedStringArray p_files, int p_screen) { Set<String> folders_set; DirAccess *da = DirAccess::create(DirAccess::ACCESS_FILESYSTEM); for (int i = 0; i < p_files.size(); i++) { @@ -2336,9 +2336,9 @@ void ProjectManager::_files_dropped(PoolStringArray p_files, int p_screen) { } memdelete(da); if (folders_set.size() > 0) { - PoolStringArray folders; + PackedStringArray folders; for (Set<String>::Element *E = folders_set.front(); E; E = E->next()) { - folders.append(E->get()); + folders.push_back(E->get()); } bool confirm = true; @@ -2358,8 +2358,8 @@ void ProjectManager::_files_dropped(PoolStringArray p_files, int p_screen) { memdelete(dir); } if (confirm) { - multi_scan_ask->get_ok()->disconnect("pressed", this, "_scan_multiple_folders"); - multi_scan_ask->get_ok()->connect("pressed", this, "_scan_multiple_folders", varray(folders)); + multi_scan_ask->get_ok()->disconnect_compat("pressed", this, "_scan_multiple_folders"); + multi_scan_ask->get_ok()->connect_compat("pressed", this, "_scan_multiple_folders", varray(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_minsize(); @@ -2369,7 +2369,7 @@ void ProjectManager::_files_dropped(PoolStringArray p_files, int p_screen) { } } -void ProjectManager::_scan_multiple_folders(PoolStringArray p_files) { +void ProjectManager::_scan_multiple_folders(PackedStringArray p_files) { for (int i = 0; i < p_files.size(); i++) { _scan_begin(p_files.get(i)); } @@ -2524,7 +2524,7 @@ ProjectManager::ProjectManager() { project_order_filter->_setup_filters(sort_filter_titles); project_order_filter->set_filter_size(150); sort_filters->add_child(project_order_filter); - project_order_filter->connect("filter_changed", this, "_on_order_option_changed"); + project_order_filter->connect_compat("filter_changed", this, "_on_order_option_changed"); project_order_filter->set_custom_minimum_size(Size2(180, 10) * EDSCALE); int projects_sorting_order = (int)EditorSettings::get_singleton()->get("project_manager/sorting_order"); @@ -2534,7 +2534,7 @@ ProjectManager::ProjectManager() { project_filter = memnew(ProjectListFilter); project_filter->add_search_box(); - project_filter->connect("filter_changed", this, "_on_filter_option_changed"); + project_filter->connect_compat("filter_changed", this, "_on_filter_option_changed"); project_filter->set_custom_minimum_size(Size2(280, 10) * EDSCALE); sort_filters->add_child(project_filter); @@ -2546,8 +2546,8 @@ ProjectManager::ProjectManager() { pc->set_v_size_flags(SIZE_EXPAND_FILL); _project_list = memnew(ProjectList); - _project_list->connect(ProjectList::SIGNAL_SELECTION_CHANGED, this, "_update_project_buttons"); - _project_list->connect(ProjectList::SIGNAL_PROJECT_ASK_OPEN, this, "_open_selected_projects_ask"); + _project_list->connect_compat(ProjectList::SIGNAL_SELECTION_CHANGED, this, "_update_project_buttons"); + _project_list->connect_compat(ProjectList::SIGNAL_PROJECT_ASK_OPEN, this, "_open_selected_projects_ask"); pc->add_child(_project_list); _project_list->set_enable_h_scroll(false); @@ -2557,13 +2557,13 @@ ProjectManager::ProjectManager() { Button *open = memnew(Button); open->set_text(TTR("Edit")); tree_vb->add_child(open); - open->connect("pressed", this, "_open_selected_projects_ask"); + open->connect_compat("pressed", this, "_open_selected_projects_ask"); open_btn = open; Button *run = memnew(Button); run->set_text(TTR("Run")); tree_vb->add_child(run); - run->connect("pressed", this, "_run_project"); + run->connect_compat("pressed", this, "_run_project"); run_btn = run; tree_vb->add_child(memnew(HSeparator)); @@ -2571,7 +2571,7 @@ ProjectManager::ProjectManager() { Button *scan = memnew(Button); scan->set_text(TTR("Scan")); tree_vb->add_child(scan); - scan->connect("pressed", this, "_scan_projects"); + scan->connect_compat("pressed", this, "_scan_projects"); tree_vb->add_child(memnew(HSeparator)); @@ -2581,34 +2581,34 @@ ProjectManager::ProjectManager() { scan_dir->set_title(TTR("Select a Folder to Scan")); // must be after mode or it's overridden scan_dir->set_current_dir(EditorSettings::get_singleton()->get("filesystem/directories/default_project_path")); gui_base->add_child(scan_dir); - scan_dir->connect("dir_selected", this, "_scan_begin"); + scan_dir->connect_compat("dir_selected", this, "_scan_begin"); Button *create = memnew(Button); create->set_text(TTR("New Project")); tree_vb->add_child(create); - create->connect("pressed", this, "_new_project"); + create->connect_compat("pressed", this, "_new_project"); Button *import = memnew(Button); import->set_text(TTR("Import")); tree_vb->add_child(import); - import->connect("pressed", this, "_import_project"); + import->connect_compat("pressed", this, "_import_project"); Button *rename = memnew(Button); rename->set_text(TTR("Rename")); tree_vb->add_child(rename); - rename->connect("pressed", this, "_rename_project"); + rename->connect_compat("pressed", this, "_rename_project"); rename_btn = rename; Button *erase = memnew(Button); erase->set_text(TTR("Remove")); tree_vb->add_child(erase); - erase->connect("pressed", this, "_erase_project"); + erase->connect_compat("pressed", this, "_erase_project"); erase_btn = erase; Button *erase_missing = memnew(Button); erase_missing->set_text(TTR("Remove Missing")); tree_vb->add_child(erase_missing); - erase_missing->connect("pressed", this, "_erase_missing_projects"); + erase_missing->connect_compat("pressed", this, "_erase_missing_projects"); erase_missing_btn = erase_missing; tree_vb->add_spacer(); @@ -2617,7 +2617,7 @@ ProjectManager::ProjectManager() { asset_library = memnew(EditorAssetLibrary(true)); asset_library->set_name(TTR("Templates")); tabs->add_child(asset_library); - asset_library->connect("install_asset", this, "_install_project"); + asset_library->connect_compat("install_asset", this, "_install_project"); } else { WARN_PRINT("Asset Library not available, as it requires SSL to work."); } @@ -2664,7 +2664,7 @@ ProjectManager::ProjectManager() { language_btn->set_icon(get_icon("Environment", "EditorIcons")); settings_hb->add_child(language_btn); - language_btn->connect("item_selected", this, "_language_selected"); + language_btn->connect_compat("item_selected", this, "_language_selected"); center_box->add_child(settings_hb); settings_hb->set_anchors_and_margins_preset(Control::PRESET_TOP_RIGHT); @@ -2673,28 +2673,28 @@ ProjectManager::ProjectManager() { language_restart_ask = memnew(ConfirmationDialog); language_restart_ask->get_ok()->set_text(TTR("Restart Now")); - language_restart_ask->get_ok()->connect("pressed", this, "_restart_confirm"); + language_restart_ask->get_ok()->connect_compat("pressed", this, "_restart_confirm"); language_restart_ask->get_cancel()->set_text(TTR("Continue")); gui_base->add_child(language_restart_ask); erase_missing_ask = memnew(ConfirmationDialog); erase_missing_ask->get_ok()->set_text(TTR("Remove All")); - erase_missing_ask->get_ok()->connect("pressed", this, "_erase_missing_projects_confirm"); + erase_missing_ask->get_ok()->connect_compat("pressed", this, "_erase_missing_projects_confirm"); gui_base->add_child(erase_missing_ask); erase_ask = memnew(ConfirmationDialog); erase_ask->get_ok()->set_text(TTR("Remove")); - erase_ask->get_ok()->connect("pressed", this, "_erase_project_confirm"); + erase_ask->get_ok()->connect_compat("pressed", this, "_erase_project_confirm"); gui_base->add_child(erase_ask); multi_open_ask = memnew(ConfirmationDialog); multi_open_ask->get_ok()->set_text(TTR("Edit")); - multi_open_ask->get_ok()->connect("pressed", this, "_open_selected_projects"); + multi_open_ask->get_ok()->connect_compat("pressed", this, "_open_selected_projects"); gui_base->add_child(multi_open_ask); multi_run_ask = memnew(ConfirmationDialog); multi_run_ask->get_ok()->set_text(TTR("Run")); - multi_run_ask->get_ok()->connect("pressed", this, "_run_project_confirm"); + multi_run_ask->get_ok()->connect_compat("pressed", this, "_run_project_confirm"); gui_base->add_child(multi_run_ask); multi_scan_ask = memnew(ConfirmationDialog); @@ -2702,7 +2702,7 @@ ProjectManager::ProjectManager() { gui_base->add_child(multi_scan_ask); ask_update_settings = memnew(ConfirmationDialog); - ask_update_settings->get_ok()->connect("pressed", this, "_confirm_update_settings"); + ask_update_settings->get_ok()->connect_compat("pressed", this, "_confirm_update_settings"); gui_base->add_child(ask_update_settings); OS::get_singleton()->set_low_processor_usage_mode(true); @@ -2710,8 +2710,8 @@ ProjectManager::ProjectManager() { npdialog = memnew(ProjectDialog); gui_base->add_child(npdialog); - npdialog->connect("projects_updated", this, "_on_projects_updated"); - npdialog->connect("project_created", this, "_on_project_created"); + npdialog->connect_compat("projects_updated", this, "_on_projects_updated"); + npdialog->connect_compat("project_created", this, "_on_project_created"); _load_recent_projects(); @@ -2719,8 +2719,8 @@ ProjectManager::ProjectManager() { _scan_begin(EditorSettings::get_singleton()->get("filesystem/directories/autoscan_project_path")); } - SceneTree::get_singleton()->connect("files_dropped", this, "_files_dropped"); - SceneTree::get_singleton()->connect("global_menu_action", this, "_global_menu_action"); + SceneTree::get_singleton()->connect_compat("files_dropped", this, "_files_dropped"); + SceneTree::get_singleton()->connect_compat("global_menu_action", this, "_global_menu_action"); run_error_diag = memnew(AcceptDialog); gui_base->add_child(run_error_diag); @@ -2732,7 +2732,7 @@ ProjectManager::ProjectManager() { open_templates = memnew(ConfirmationDialog); open_templates->set_text(TTR("You currently don't have any projects.\nWould you like to explore official example projects in the Asset Library?")); open_templates->get_ok()->set_text(TTR("Open Asset Library")); - open_templates->connect("confirmed", this, "_open_asset_library"); + open_templates->connect_compat("confirmed", this, "_open_asset_library"); add_child(open_templates); } @@ -2793,14 +2793,14 @@ void ProjectListFilter::_bind_methods() { void ProjectListFilter::add_filter_option() { filter_option = memnew(OptionButton); filter_option->set_clip_text(true); - filter_option->connect("item_selected", this, "_filter_option_selected"); + filter_option->connect_compat("item_selected", this, "_filter_option_selected"); add_child(filter_option); } void ProjectListFilter::add_search_box() { search_box = memnew(LineEdit); search_box->set_placeholder(TTR("Search")); - search_box->connect("text_changed", this, "_search_text_changed"); + search_box->connect_compat("text_changed", this, "_search_text_changed"); search_box->set_h_size_flags(SIZE_EXPAND_FILL); add_child(search_box); diff --git a/editor/project_manager.h b/editor/project_manager.h index feeea9695d..8b9c769c59 100644 --- a/editor/project_manager.h +++ b/editor/project_manager.h @@ -111,8 +111,8 @@ class ProjectManager : public Control { void _dim_window(); void _unhandled_input(const Ref<InputEvent> &p_ev); - void _files_dropped(PoolStringArray p_files, int p_screen); - void _scan_multiple_folders(PoolStringArray p_files); + void _files_dropped(PackedStringArray p_files, int p_screen); + void _scan_multiple_folders(PackedStringArray p_files); void _on_order_option_changed(); void _on_filter_option_changed(); diff --git a/editor/project_settings_editor.cpp b/editor/project_settings_editor.cpp index 6635f5cb47..9bee84b482 100644 --- a/editor/project_settings_editor.cpp +++ b/editor/project_settings_editor.cpp @@ -108,7 +108,7 @@ void ProjectSettingsEditor::_notification(int p_what) { action_add_error->add_color_override("font_color", get_color("error_color", "Editor")); - translation_list->connect("button_pressed", this, "_translation_delete"); + translation_list->connect_compat("button_pressed", this, "_translation_delete"); _update_actions(); popup_add->add_icon_item(get_icon("Keyboard", "EditorIcons"), TTR("Key "), INPUT_KEY); //"Key " - because the word 'key' has already been used as a key animation popup_add->add_icon_item(get_icon("JoyButton", "EditorIcons"), TTR("Joy Button"), INPUT_JOY_BUTTON); @@ -847,7 +847,7 @@ void ProjectSettingsEditor::_item_add() { // Initialize the property with the default value for the given type. // The type list starts at 1 (as we exclude Nil), so add 1 to the selected value. - Variant::CallError ce; + Callable::CallError ce; const Variant value = Variant::construct(Variant::Type(type->get_selected() + 1), NULL, 0, ce); String catname = category->get_text().strip_edges(); @@ -1188,7 +1188,7 @@ void ProjectSettingsEditor::add_translation(const String &p_translation) { void ProjectSettingsEditor::_translation_add(const String &p_path) { - PoolStringArray translations = ProjectSettings::get_singleton()->get("locale/translations"); + PackedStringArray translations = ProjectSettings::get_singleton()->get("locale/translations"); for (int i = 0; i < translations.size(); i++) { @@ -1219,7 +1219,7 @@ void ProjectSettingsEditor::_translation_delete(Object *p_item, int p_column, in int idx = ti->get_metadata(0); - PoolStringArray translations = ProjectSettings::get_singleton()->get("locale/translations"); + PackedStringArray translations = ProjectSettings::get_singleton()->get("locale/translations"); ERR_FAIL_INDEX(idx, translations.size()); @@ -1253,7 +1253,7 @@ void ProjectSettingsEditor::_translation_res_add(const String &p_path) { if (remaps.has(p_path)) return; //pointless already has it - remaps[p_path] = PoolStringArray(); + remaps[p_path] = PackedStringArray(); undo_redo->create_action(TTR("Add Remapped Path")); undo_redo->add_do_property(ProjectSettings::get_singleton(), "locale/translation_remaps", remaps); @@ -1281,7 +1281,7 @@ void ProjectSettingsEditor::_translation_res_option_add(const String &p_path) { String key = k->get_metadata(0); ERR_FAIL_COND(!remaps.has(key)); - PoolStringArray r = remaps[key]; + PackedStringArray r = remaps[key]; r.push_back(p_path + ":" + "en"); remaps[key] = r; @@ -1328,7 +1328,7 @@ void ProjectSettingsEditor::_translation_res_option_changed() { ERR_FAIL_INDEX(which, langs.size()); ERR_FAIL_COND(!remaps.has(key)); - PoolStringArray r = remaps[key]; + PackedStringArray r = remaps[key]; ERR_FAIL_INDEX(idx, r.size()); if (translation_locales_idxs_remap.size() > which) { r.set(idx, path + ":" + langs[translation_locales_idxs_remap[which]]); @@ -1395,7 +1395,7 @@ void ProjectSettingsEditor::_translation_res_option_delete(Object *p_item, int p int idx = ed->get_metadata(0); ERR_FAIL_COND(!remaps.has(key)); - PoolStringArray r = remaps[key]; + PackedStringArray r = remaps[key]; ERR_FAIL_INDEX(idx, r.size()); r.remove(idx); remaps[key] = r; @@ -1506,7 +1506,7 @@ void ProjectSettingsEditor::_update_translations() { translation_list->set_hide_root(true); if (ProjectSettings::get_singleton()->has_setting("locale/translations")) { - PoolStringArray translations = ProjectSettings::get_singleton()->get("locale/translations"); + PackedStringArray translations = ProjectSettings::get_singleton()->get("locale/translations"); for (int i = 0; i < translations.size(); i++) { TreeItem *t = translation_list->create_item(root); @@ -1642,7 +1642,7 @@ void ProjectSettingsEditor::_update_translations() { t->select(0); translation_res_option_add_button->set_disabled(false); - PoolStringArray selected = remaps[keys[i]]; + PackedStringArray selected = remaps[keys[i]]; for (int j = 0; j < selected.size(); j++) { String s2 = selected[j]; @@ -1805,7 +1805,7 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) { search_button->set_pressed(false); search_button->set_text(TTR("Search")); hbc->add_child(search_button); - search_button->connect("toggled", this, "_toggle_search_bar"); + search_button->connect_compat("toggled", this, "_toggle_search_bar"); hbc->add_child(memnew(VSeparator)); @@ -1820,7 +1820,7 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) { category = memnew(LineEdit); category->set_h_size_flags(Control::SIZE_EXPAND_FILL); add_prop_bar->add_child(category); - category->connect("text_entered", this, "_item_adds"); + category->connect_compat("text_entered", this, "_item_adds"); l = memnew(Label); add_prop_bar->add_child(l); @@ -1829,7 +1829,7 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) { property = memnew(LineEdit); property->set_h_size_flags(Control::SIZE_EXPAND_FILL); add_prop_bar->add_child(property); - property->connect("text_entered", this, "_item_adds"); + property->connect_compat("text_entered", this, "_item_adds"); l = memnew(Label); add_prop_bar->add_child(l); @@ -1847,7 +1847,7 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) { Button *add = memnew(Button); add_prop_bar->add_child(add); add->set_text(TTR("Add")); - add->connect("pressed", this, "_item_add"); + add->connect_compat("pressed", this, "_item_add"); search_bar = memnew(HBoxContainer); search_bar->set_h_size_flags(Control::SIZE_EXPAND_FILL); @@ -1863,14 +1863,14 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) { globals_editor->get_inspector()->set_undo_redo(EditorNode::get_singleton()->get_undo_redo()); globals_editor->set_v_size_flags(Control::SIZE_EXPAND_FILL); globals_editor->register_search_box(search_box); - globals_editor->get_inspector()->connect("property_selected", this, "_item_selected"); - globals_editor->get_inspector()->connect("property_edited", this, "_settings_prop_edited"); - globals_editor->get_inspector()->connect("restart_requested", this, "_editor_restart_request"); + globals_editor->get_inspector()->connect_compat("property_selected", this, "_item_selected"); + globals_editor->get_inspector()->connect_compat("property_edited", this, "_settings_prop_edited"); + globals_editor->get_inspector()->connect_compat("restart_requested", this, "_editor_restart_request"); Button *del = memnew(Button); hbc->add_child(del); del->set_text(TTR("Delete")); - del->connect("pressed", this, "_item_del"); + del->connect_compat("pressed", this, "_item_del"); add_prop_bar->add_child(memnew(VSeparator)); @@ -1879,8 +1879,8 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) { popup_copy_to_feature->set_disabled(true); add_prop_bar->add_child(popup_copy_to_feature); - popup_copy_to_feature->get_popup()->connect("id_pressed", this, "_copy_to_platform"); - popup_copy_to_feature->get_popup()->connect("about_to_show", this, "_copy_to_platform_about_to_show"); + popup_copy_to_feature->get_popup()->connect_compat("id_pressed", this, "_copy_to_platform"); + popup_copy_to_feature->get_popup()->connect_compat("about_to_show", this, "_copy_to_platform_about_to_show"); get_ok()->set_text(TTR("Close")); set_hide_on_ok(true); @@ -1897,11 +1897,11 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) { restart_hb->add_child(restart_label); restart_hb->add_spacer(); Button *restart_button = memnew(Button); - restart_button->connect("pressed", this, "_editor_restart"); + restart_button->connect_compat("pressed", this, "_editor_restart"); restart_hb->add_child(restart_button); restart_button->set_text(TTR("Save & Restart")); restart_close_button = memnew(ToolButton); - restart_close_button->connect("pressed", this, "_editor_restart_close"); + restart_close_button->connect_compat("pressed", this, "_editor_restart_close"); restart_hb->add_child(restart_close_button); restart_container->hide(); @@ -1929,8 +1929,8 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) { action_name = memnew(LineEdit); action_name->set_h_size_flags(SIZE_EXPAND_FILL); hbc->add_child(action_name); - action_name->connect("text_entered", this, "_action_adds"); - action_name->connect("text_changed", this, "_action_check"); + action_name->connect_compat("text_entered", this, "_action_adds"); + action_name->connect_compat("text_changed", this, "_action_check"); action_add_error = memnew(Label); hbc->add_child(action_add_error); @@ -1940,7 +1940,7 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) { hbc->add_child(add); add->set_text(TTR("Add")); add->set_disabled(true); - add->connect("pressed", this, "_action_add"); + add->connect_compat("pressed", this, "_action_add"); action_add = add; input_editor = memnew(Tree); @@ -1954,15 +1954,15 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) { input_editor->set_column_min_width(1, 80 * EDSCALE); input_editor->set_column_expand(2, false); input_editor->set_column_min_width(2, 50 * EDSCALE); - input_editor->connect("item_edited", this, "_action_edited"); - input_editor->connect("item_activated", this, "_action_activated"); - input_editor->connect("cell_selected", this, "_action_selected"); - input_editor->connect("button_pressed", this, "_action_button_pressed"); + input_editor->connect_compat("item_edited", this, "_action_edited"); + input_editor->connect_compat("item_activated", this, "_action_activated"); + input_editor->connect_compat("cell_selected", this, "_action_selected"); + input_editor->connect_compat("button_pressed", this, "_action_button_pressed"); input_editor->set_drag_forwarding(this); popup_add = memnew(PopupMenu); add_child(popup_add); - popup_add->connect("id_pressed", this, "_add_item"); + popup_add->connect_compat("id_pressed", this, "_add_item"); press_a_key = memnew(ConfirmationDialog); press_a_key->set_focus_mode(FOCUS_ALL); @@ -1977,13 +1977,13 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) { press_a_key->get_ok()->set_disabled(true); press_a_key_label = l; press_a_key->add_child(l); - press_a_key->connect("gui_input", this, "_wait_for_key"); - press_a_key->connect("confirmed", this, "_press_a_key_confirm"); + press_a_key->connect_compat("gui_input", this, "_wait_for_key"); + press_a_key->connect_compat("confirmed", this, "_press_a_key_confirm"); device_input = memnew(ConfirmationDialog); add_child(device_input); device_input->get_ok()->set_text(TTR("Add")); - device_input->connect("confirmed", this, "_device_input_add"); + device_input->connect_compat("confirmed", this, "_device_input_add"); hbc = memnew(HBoxContainer); device_input->add_child(hbc); @@ -2034,7 +2034,7 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) { thb->add_child(memnew(Label(TTR("Translations:")))); thb->add_spacer(); Button *addtr = memnew(Button(TTR("Add..."))); - addtr->connect("pressed", this, "_translation_file_open"); + addtr->connect_compat("pressed", this, "_translation_file_open"); thb->add_child(addtr); VBoxContainer *tmc = memnew(VBoxContainer); tvb->add_child(tmc); @@ -2046,7 +2046,7 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) { translation_file_open = memnew(EditorFileDialog); add_child(translation_file_open); translation_file_open->set_mode(EditorFileDialog::MODE_OPEN_FILE); - translation_file_open->connect("file_selected", this, "_translation_add"); + translation_file_open->connect_compat("file_selected", this, "_translation_add"); } { @@ -2058,28 +2058,28 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) { thb->add_child(memnew(Label(TTR("Resources:")))); thb->add_spacer(); Button *addtr = memnew(Button(TTR("Add..."))); - addtr->connect("pressed", this, "_translation_res_file_open"); + addtr->connect_compat("pressed", this, "_translation_res_file_open"); thb->add_child(addtr); VBoxContainer *tmc = memnew(VBoxContainer); tvb->add_child(tmc); tmc->set_v_size_flags(SIZE_EXPAND_FILL); translation_remap = memnew(Tree); translation_remap->set_v_size_flags(SIZE_EXPAND_FILL); - translation_remap->connect("cell_selected", this, "_translation_res_select"); + translation_remap->connect_compat("cell_selected", this, "_translation_res_select"); tmc->add_child(translation_remap); - translation_remap->connect("button_pressed", this, "_translation_res_delete"); + translation_remap->connect_compat("button_pressed", this, "_translation_res_delete"); translation_res_file_open = memnew(EditorFileDialog); add_child(translation_res_file_open); translation_res_file_open->set_mode(EditorFileDialog::MODE_OPEN_FILE); - translation_res_file_open->connect("file_selected", this, "_translation_res_add"); + translation_res_file_open->connect_compat("file_selected", this, "_translation_res_add"); thb = memnew(HBoxContainer); tvb->add_child(thb); thb->add_child(memnew(Label(TTR("Remaps by Locale:")))); thb->add_spacer(); addtr = memnew(Button(TTR("Add..."))); - addtr->connect("pressed", this, "_translation_res_option_file_open"); + addtr->connect_compat("pressed", this, "_translation_res_option_file_open"); translation_res_option_add_button = addtr; thb->add_child(addtr); tmc = memnew(VBoxContainer); @@ -2096,13 +2096,13 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) { translation_remap_options->set_column_expand(0, true); translation_remap_options->set_column_expand(1, false); translation_remap_options->set_column_min_width(1, 200); - translation_remap_options->connect("item_edited", this, "_translation_res_option_changed"); - translation_remap_options->connect("button_pressed", this, "_translation_res_option_delete"); + translation_remap_options->connect_compat("item_edited", this, "_translation_res_option_changed"); + translation_remap_options->connect_compat("button_pressed", this, "_translation_res_option_delete"); translation_res_option_file_open = memnew(EditorFileDialog); add_child(translation_res_option_file_open); translation_res_option_file_open->set_mode(EditorFileDialog::MODE_OPEN_FILE); - translation_res_option_file_open->connect("file_selected", this, "_translation_res_option_add"); + translation_res_option_file_open->connect_compat("file_selected", this, "_translation_res_option_add"); } { @@ -2118,20 +2118,20 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) { translation_locale_filter_mode->add_item(TTR("Show Selected Locales Only"), SHOW_ONLY_SELECTED_LOCALES); translation_locale_filter_mode->select(0); tmc->add_margin_child(TTR("Filter mode:"), translation_locale_filter_mode); - translation_locale_filter_mode->connect("item_selected", this, "_translation_filter_mode_changed"); + translation_locale_filter_mode->connect_compat("item_selected", this, "_translation_filter_mode_changed"); translation_filter = memnew(Tree); translation_filter->set_v_size_flags(SIZE_EXPAND_FILL); translation_filter->set_columns(1); tmc->add_child(memnew(Label(TTR("Locales:")))); tmc->add_child(translation_filter); - translation_filter->connect("item_edited", this, "_translation_filter_option_changed"); + translation_filter->connect_compat("item_edited", this, "_translation_filter_option_changed"); } autoload_settings = memnew(EditorAutoloadSettings); autoload_settings->set_name(TTR("AutoLoad")); tab_container->add_child(autoload_settings); - autoload_settings->connect("autoload_changed", this, "_settings_changed"); + autoload_settings->connect_compat("autoload_changed", this, "_settings_changed"); plugin_settings = memnew(EditorPluginSettings); plugin_settings->set_name(TTR("Plugins")); @@ -2139,7 +2139,7 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) { timer = memnew(Timer); timer->set_wait_time(1.5); - timer->connect("timeout", ProjectSettings::get_singleton(), "save"); + timer->connect_compat("timeout", ProjectSettings::get_singleton(), "save"); timer->set_one_shot(true); add_child(timer); diff --git a/editor/property_editor.cpp b/editor/property_editor.cpp index 1691ce3a63..2bcf2c3b44 100644 --- a/editor/property_editor.cpp +++ b/editor/property_editor.cpp @@ -176,9 +176,9 @@ void CustomPropertyEditor::_menu_option(int p_which) { case OBJ_MENU_EDIT: { - RefPtr RefPtr = v; + REF r = v; - if (!RefPtr.is_null()) { + if (!r.is_null()) { emit_signal("resource_edit_request"); hide(); @@ -193,8 +193,7 @@ void CustomPropertyEditor::_menu_option(int p_which) { case OBJ_MENU_MAKE_UNIQUE: { - RefPtr RefPtr = v; - Ref<Resource> res_orig = RefPtr; + Ref<Resource> res_orig = v; if (res_orig.is_null()) return; @@ -229,7 +228,7 @@ void CustomPropertyEditor::_menu_option(int p_which) { res->set(p.first, p.second); } - v = res.get_ref_ptr(); + v = res; emit_signal("variant_changed"); hide(); } break; @@ -311,7 +310,7 @@ void CustomPropertyEditor::_menu_option(int p_which) { res->call("set_instance_base_type", owner->get_class()); } - v = Ref<Resource>(res).get_ref_ptr(); + v = res; emit_signal("variant_changed"); } break; @@ -394,12 +393,12 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant:: } break; case Variant::INT: - case Variant::REAL: { + case Variant::FLOAT: { if (hint == PROPERTY_HINT_RANGE) { int c = hint_text.get_slice_count(","); - float min = 0, max = 100, step = type == Variant::REAL ? .01 : 1; + float min = 0, max = 100, step = type == Variant::FLOAT ? .01 : 1; if (c >= 1) { if (!hint_text.get_slice(",", 0).empty()) @@ -590,7 +589,7 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant:: if (!create_dialog) { create_dialog = memnew(CreateDialog); - create_dialog->connect("create", this, "_create_dialog_callback"); + create_dialog->connect_compat("create", this, "_create_dialog_callback"); add_child(create_dialog); } @@ -606,12 +605,12 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant:: return false; } else if (hint == PROPERTY_HINT_METHOD_OF_VARIANT_TYPE) { -#define MAKE_PROPSELECT \ - if (!property_select) { \ - property_select = memnew(PropertySelector); \ - property_select->connect("selected", this, "_create_selected_property"); \ - add_child(property_select); \ - } \ +#define MAKE_PROPSELECT \ + if (!property_select) { \ + property_select = memnew(PropertySelector); \ + property_select->connect_compat("selected", this, "_create_selected_property"); \ + add_child(property_select); \ + } \ hide(); MAKE_PROPSELECT; @@ -866,7 +865,7 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant:: color_picker->set_deferred_mode(true); add_child(color_picker); color_picker->hide(); - color_picker->connect("color_changed", this, "_color_changed"); + color_picker->connect_compat("color_changed", this, "_color_changed"); // get default color picker mode from editor settings int default_color_mode = EDITOR_GET("interface/inspector/default_color_picker_mode"); @@ -1046,22 +1045,28 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant:: case Variant::DICTIONARY: { } break; - case Variant::POOL_BYTE_ARRAY: { + case Variant::PACKED_BYTE_ARRAY: { } break; - case Variant::POOL_INT_ARRAY: { + case Variant::PACKED_INT32_ARRAY: { } break; - case Variant::POOL_REAL_ARRAY: { + case Variant::PACKED_FLOAT32_ARRAY: { } break; - case Variant::POOL_STRING_ARRAY: { + case Variant::PACKED_INT64_ARRAY: { } break; - case Variant::POOL_VECTOR3_ARRAY: { + case Variant::PACKED_FLOAT64_ARRAY: { } break; - case Variant::POOL_COLOR_ARRAY: { + case Variant::PACKED_STRING_ARRAY: { + + } break; + case Variant::PACKED_VECTOR3_ARRAY: { + + } break; + case Variant::PACKED_COLOR_ARRAY: { } break; default: { @@ -1103,7 +1108,7 @@ void CustomPropertyEditor::_file_selected(String p_file) { error->popup_centered_minsize(); break; } - v = res.get_ref_ptr(); + v = res; emit_signal("variant_changed"); hide(); } break; @@ -1114,7 +1119,7 @@ void CustomPropertyEditor::_file_selected(String p_file) { void CustomPropertyEditor::_type_create_selected(int p_idx) { - if (type == Variant::INT || type == Variant::REAL) { + if (type == Variant::INT || type == Variant::FLOAT) { float newval = 0; switch (p_idx) { @@ -1168,7 +1173,7 @@ void CustomPropertyEditor::_type_create_selected(int p_idx) { Resource *res = Object::cast_to<Resource>(obj); ERR_FAIL_COND(!res); - v = Ref<Resource>(res).get_ref_ptr(); + v = res; emit_signal("variant_changed"); hide(); } @@ -1373,7 +1378,7 @@ void CustomPropertyEditor::_action_pressed(int p_which) { Resource *res = Object::cast_to<Resource>(obj); ERR_BREAK(!res); - v = Ref<Resource>(res).get_ref_ptr(); + v = res; emit_signal("variant_changed"); hide(); } @@ -1395,9 +1400,9 @@ void CustomPropertyEditor::_action_pressed(int p_which) { } else if (p_which == 2) { - RefPtr RefPtr = v; + RES r = v; - if (!RefPtr.is_null()) { + if (!r.is_null()) { emit_signal("resource_edit_request"); hide(); @@ -1410,8 +1415,7 @@ void CustomPropertyEditor::_action_pressed(int p_which) { hide(); } else if (p_which == 4) { - RefPtr RefPtr = v; - Ref<Resource> res_orig = RefPtr; + Ref<Resource> res_orig = v; if (res_orig.is_null()) return; @@ -1442,7 +1446,7 @@ void CustomPropertyEditor::_action_pressed(int p_which) { res->set(p.first, p.second); } - v = res.get_ref_ptr(); + v = res; emit_signal("variant_changed"); hide(); } @@ -1565,7 +1569,7 @@ void CustomPropertyEditor::_modified(String p_string) { emit_signal("variant_changed"); } break; - case Variant::REAL: { + case Variant::FLOAT: { if (hint != PROPERTY_HINT_EXP_EASING) { String text = value_editor[0]->get_text(); @@ -1699,22 +1703,22 @@ void CustomPropertyEditor::_modified(String p_string) { case Variant::DICTIONARY: { } break; - case Variant::POOL_BYTE_ARRAY: { + case Variant::PACKED_BYTE_ARRAY: { } break; - case Variant::POOL_INT_ARRAY: { + case Variant::PACKED_INT32_ARRAY: { } break; - case Variant::POOL_REAL_ARRAY: { + case Variant::PACKED_FLOAT32_ARRAY: { } break; - case Variant::POOL_STRING_ARRAY: { + case Variant::PACKED_STRING_ARRAY: { } break; - case Variant::POOL_VECTOR3_ARRAY: { + case Variant::PACKED_VECTOR3_ARRAY: { } break; - case Variant::POOL_COLOR_ARRAY: { + case Variant::PACKED_COLOR_ARRAY: { } break; default: { @@ -1753,7 +1757,7 @@ void CustomPropertyEditor::_range_modified(double p_value) { void CustomPropertyEditor::_focus_enter() { switch (type) { - case Variant::REAL: + case Variant::FLOAT: case Variant::STRING: case Variant::VECTOR2: case Variant::RECT2: @@ -1779,7 +1783,7 @@ void CustomPropertyEditor::_focus_enter() { void CustomPropertyEditor::_focus_exit() { switch (type) { - case Variant::REAL: + case Variant::FLOAT: case Variant::STRING: case Variant::VECTOR2: case Variant::RECT2: @@ -1904,9 +1908,9 @@ CustomPropertyEditor::CustomPropertyEditor() { add_child(value_label[i]); value_editor[i]->hide(); value_label[i]->hide(); - value_editor[i]->connect("text_entered", this, "_modified"); - value_editor[i]->connect("focus_entered", this, "_focus_enter"); - value_editor[i]->connect("focus_exited", this, "_focus_exit"); + value_editor[i]->connect_compat("text_entered", this, "_modified"); + value_editor[i]->connect_compat("focus_entered", this, "_focus_enter"); + value_editor[i]->connect_compat("focus_exited", this, "_focus_exit"); } focused_value_editor = -1; @@ -1936,7 +1940,7 @@ CustomPropertyEditor::CustomPropertyEditor() { checks20[i]->set_focus_mode(FOCUS_NONE); checks20gc->add_child(checks20[i]); checks20[i]->hide(); - checks20[i]->connect("pressed", this, "_action_pressed", make_binds(i)); + checks20[i]->connect_compat("pressed", this, "_action_pressed", make_binds(i)); checks20[i]->set_tooltip(vformat(TTR("Bit %d, val %d."), i, 1 << i)); } @@ -1946,7 +1950,7 @@ CustomPropertyEditor::CustomPropertyEditor() { text_edit->set_margin(MARGIN_BOTTOM, -30); text_edit->hide(); - text_edit->connect("text_changed", this, "_text_edit_changed"); + text_edit->connect_compat("text_changed", this, "_text_edit_changed"); for (int i = 0; i < MAX_ACTION_BUTTONS; i++) { @@ -1955,7 +1959,7 @@ CustomPropertyEditor::CustomPropertyEditor() { add_child(action_buttons[i]); Vector<Variant> binds; binds.push_back(i); - action_buttons[i]->connect("pressed", this, "_action_pressed", binds); + action_buttons[i]->connect_compat("pressed", this, "_action_pressed", binds); action_buttons[i]->set_flat(true); } @@ -1966,8 +1970,8 @@ CustomPropertyEditor::CustomPropertyEditor() { add_child(file); file->hide(); - file->connect("file_selected", this, "_file_selected"); - file->connect("dir_selected", this, "_file_selected"); + file->connect_compat("file_selected", this, "_file_selected"); + file->connect_compat("dir_selected", this, "_file_selected"); error = memnew(ConfirmationDialog); error->set_title(TTR("Error!")); @@ -1975,7 +1979,7 @@ CustomPropertyEditor::CustomPropertyEditor() { scene_tree = memnew(SceneTreeDialog); add_child(scene_tree); - scene_tree->connect("selected", this, "_node_path_selected"); + scene_tree->connect_compat("selected", this, "_node_path_selected"); scene_tree->get_scene_tree()->set_show_enabled_subscene(true); texture_preview = memnew(TextureRect); @@ -1985,31 +1989,31 @@ CustomPropertyEditor::CustomPropertyEditor() { easing_draw = memnew(Control); add_child(easing_draw); easing_draw->hide(); - easing_draw->connect("draw", this, "_draw_easing"); - easing_draw->connect("gui_input", this, "_drag_easing"); + easing_draw->connect_compat("draw", this, "_draw_easing"); + easing_draw->connect_compat("gui_input", this, "_drag_easing"); easing_draw->set_default_cursor_shape(Control::CURSOR_MOVE); type_button = memnew(MenuButton); add_child(type_button); type_button->hide(); - type_button->get_popup()->connect("id_pressed", this, "_type_create_selected"); + type_button->get_popup()->connect_compat("id_pressed", this, "_type_create_selected"); menu = memnew(PopupMenu); menu->set_pass_on_modal_close_click(false); add_child(menu); - menu->connect("id_pressed", this, "_menu_option"); + menu->connect_compat("id_pressed", this, "_menu_option"); evaluator = NULL; spinbox = memnew(SpinBox); add_child(spinbox); spinbox->set_anchors_and_margins_preset(Control::PRESET_WIDE, Control::PRESET_MODE_MINSIZE, 5); - spinbox->connect("value_changed", this, "_range_modified"); + spinbox->connect_compat("value_changed", this, "_range_modified"); slider = memnew(HSlider); add_child(slider); slider->set_anchors_and_margins_preset(Control::PRESET_WIDE, Control::PRESET_MODE_MINSIZE, 5); - slider->connect("value_changed", this, "_range_modified"); + slider->connect_compat("value_changed", this, "_range_modified"); create_dialog = NULL; property_select = NULL; diff --git a/editor/property_selector.cpp b/editor/property_selector.cpp index 1de5099c4a..416ffb3fd0 100644 --- a/editor/property_selector.cpp +++ b/editor/property_selector.cpp @@ -95,7 +95,7 @@ void PropertySelector::_update_search() { instance->get_property_list(&props, true); } else if (type != Variant::NIL) { Variant v; - Variant::CallError ce; + Callable::CallError ce; v = Variant::construct(type, NULL, 0, ce); v.get_property_list(&props); @@ -141,13 +141,13 @@ void PropertySelector::_update_search() { Control::get_icon("Object", "EditorIcons"), Control::get_icon("Dictionary", "EditorIcons"), Control::get_icon("Array", "EditorIcons"), - Control::get_icon("PoolByteArray", "EditorIcons"), - Control::get_icon("PoolIntArray", "EditorIcons"), - Control::get_icon("PoolRealArray", "EditorIcons"), - Control::get_icon("PoolStringArray", "EditorIcons"), - Control::get_icon("PoolVector2Array", "EditorIcons"), - Control::get_icon("PoolVector3Array", "EditorIcons"), - Control::get_icon("PoolColorArray", "EditorIcons") + Control::get_icon("PackedByteArray", "EditorIcons"), + Control::get_icon("PackedInt32Array", "EditorIcons"), + Control::get_icon("PackedFloat32Array", "EditorIcons"), + Control::get_icon("PackedStringArray", "EditorIcons"), + Control::get_icon("PackedVector2Array", "EditorIcons"), + Control::get_icon("PackedVector3Array", "EditorIcons"), + Control::get_icon("PackedColorArray", "EditorIcons") }; for (List<PropertyInfo>::Element *E = props.front(); E; E = E->next()) { @@ -200,7 +200,7 @@ void PropertySelector::_update_search() { if (type != Variant::NIL) { Variant v; - Variant::CallError ce; + Callable::CallError ce; v = Variant::construct(type, NULL, 0, ce); v.get_method_list(&methods); } else { @@ -393,9 +393,9 @@ void PropertySelector::_notification(int p_what) { if (p_what == NOTIFICATION_ENTER_TREE) { - connect("confirmed", this, "_confirmed"); + connect_compat("confirmed", this, "_confirmed"); } else if (p_what == NOTIFICATION_EXIT_TREE) { - disconnect("confirmed", this, "_confirmed"); + disconnect_compat("confirmed", this, "_confirmed"); } } @@ -557,21 +557,21 @@ PropertySelector::PropertySelector() { //set_child_rect(vbc); search_box = memnew(LineEdit); vbc->add_margin_child(TTR("Search:"), search_box); - search_box->connect("text_changed", this, "_text_changed"); - search_box->connect("gui_input", this, "_sbox_input"); + search_box->connect_compat("text_changed", this, "_text_changed"); + search_box->connect_compat("gui_input", this, "_sbox_input"); search_options = memnew(Tree); vbc->add_margin_child(TTR("Matches:"), search_options, true); get_ok()->set_text(TTR("Open")); get_ok()->set_disabled(true); register_text_enter(search_box); set_hide_on_ok(false); - search_options->connect("item_activated", this, "_confirmed"); - search_options->connect("cell_selected", this, "_item_selected"); + search_options->connect_compat("item_activated", this, "_confirmed"); + search_options->connect_compat("cell_selected", this, "_item_selected"); search_options->set_hide_root(true); search_options->set_hide_folding(true); virtuals_only = false; help_bit = memnew(EditorHelpBit); vbc->add_margin_child(TTR("Description:"), help_bit); - help_bit->connect("request_hide", this, "_closed"); + help_bit->connect_compat("request_hide", this, "_closed"); } diff --git a/editor/quick_open.cpp b/editor/quick_open.cpp index ea92e6407c..57e3c1da70 100644 --- a/editor/quick_open.cpp +++ b/editor/quick_open.cpp @@ -257,16 +257,16 @@ void EditorQuickOpen::_notification(int p_what) { switch (p_what) { case NOTIFICATION_ENTER_TREE: { - connect("confirmed", this, "_confirmed"); + connect_compat("confirmed", this, "_confirmed"); search_box->set_clear_button_enabled(true); - FALLTHROUGH; + [[fallthrough]]; } case NOTIFICATION_THEME_CHANGED: { search_box->set_right_icon(get_icon("Search", "EditorIcons")); } break; case NOTIFICATION_EXIT_TREE: { - disconnect("confirmed", this, "_confirmed"); + disconnect_compat("confirmed", this, "_confirmed"); } break; } } @@ -291,15 +291,15 @@ EditorQuickOpen::EditorQuickOpen() { add_child(vbc); search_box = memnew(LineEdit); vbc->add_margin_child(TTR("Search:"), search_box); - search_box->connect("text_changed", this, "_text_changed"); - search_box->connect("gui_input", this, "_sbox_input"); + search_box->connect_compat("text_changed", this, "_text_changed"); + search_box->connect_compat("gui_input", this, "_sbox_input"); search_options = memnew(Tree); vbc->add_margin_child(TTR("Matches:"), search_options, true); get_ok()->set_text(TTR("Open")); get_ok()->set_disabled(true); register_text_enter(search_box); set_hide_on_ok(false); - search_options->connect("item_activated", this, "_confirmed"); + search_options->connect_compat("item_activated", this, "_confirmed"); search_options->set_hide_root(true); search_options->set_hide_folding(true); search_options->add_constant_override("draw_guides", 1); diff --git a/editor/rename_dialog.cpp b/editor/rename_dialog.cpp index 317be309a3..aa8352aa25 100644 --- a/editor/rename_dialog.cpp +++ b/editor/rename_dialog.cpp @@ -144,7 +144,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(FOCUS_NONE); - but_insert_name->connect("pressed", this, "_insert_text", make_binds("${NAME}")); + but_insert_name->connect_compat("pressed", this, "_insert_text", make_binds("${NAME}")); but_insert_name->set_h_size_flags(SIZE_EXPAND_FILL); grd_substitute->add_child(but_insert_name); @@ -154,7 +154,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(FOCUS_NONE); - but_insert_parent->connect("pressed", this, "_insert_text", make_binds("${PARENT}")); + but_insert_parent->connect_compat("pressed", this, "_insert_text", make_binds("${PARENT}")); but_insert_parent->set_h_size_flags(SIZE_EXPAND_FILL); grd_substitute->add_child(but_insert_parent); @@ -164,7 +164,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(FOCUS_NONE); - but_insert_type->connect("pressed", this, "_insert_text", make_binds("${TYPE}")); + but_insert_type->connect_compat("pressed", this, "_insert_text", make_binds("${TYPE}")); but_insert_type->set_h_size_flags(SIZE_EXPAND_FILL); grd_substitute->add_child(but_insert_type); @@ -174,7 +174,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(FOCUS_NONE); - but_insert_scene->connect("pressed", this, "_insert_text", make_binds("${SCENE}")); + but_insert_scene->connect_compat("pressed", this, "_insert_text", make_binds("${SCENE}")); but_insert_scene->set_h_size_flags(SIZE_EXPAND_FILL); grd_substitute->add_child(but_insert_scene); @@ -184,7 +184,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(FOCUS_NONE); - but_insert_root->connect("pressed", this, "_insert_text", make_binds("${ROOT}")); + but_insert_root->connect_compat("pressed", this, "_insert_text", make_binds("${ROOT}")); but_insert_root->set_h_size_flags(SIZE_EXPAND_FILL); grd_substitute->add_child(but_insert_root); @@ -194,7 +194,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(FOCUS_NONE); - but_insert_count->connect("pressed", this, "_insert_text", make_binds("${COUNTER}")); + but_insert_count->connect_compat("pressed", this, "_insert_text", make_binds("${COUNTER}")); but_insert_count->set_h_size_flags(SIZE_EXPAND_FILL); grd_substitute->add_child(but_insert_count); @@ -306,35 +306,35 @@ RenameDialog::RenameDialog(SceneTreeEditor *p_scene_tree_editor, UndoRedo *p_und // ---- Connections - cbut_collapse_features->connect("toggled", this, "_features_toggled"); + cbut_collapse_features->connect_compat("toggled", this, "_features_toggled"); // Substitite Buttons - lne_search->connect("focus_entered", this, "_update_substitute"); - lne_search->connect("focus_exited", this, "_update_substitute"); - lne_replace->connect("focus_entered", this, "_update_substitute"); - lne_replace->connect("focus_exited", this, "_update_substitute"); - lne_prefix->connect("focus_entered", this, "_update_substitute"); - lne_prefix->connect("focus_exited", this, "_update_substitute"); - lne_suffix->connect("focus_entered", this, "_update_substitute"); - lne_suffix->connect("focus_exited", this, "_update_substitute"); + lne_search->connect_compat("focus_entered", this, "_update_substitute"); + lne_search->connect_compat("focus_exited", this, "_update_substitute"); + lne_replace->connect_compat("focus_entered", this, "_update_substitute"); + lne_replace->connect_compat("focus_exited", this, "_update_substitute"); + lne_prefix->connect_compat("focus_entered", this, "_update_substitute"); + lne_prefix->connect_compat("focus_exited", this, "_update_substitute"); + lne_suffix->connect_compat("focus_entered", this, "_update_substitute"); + lne_suffix->connect_compat("focus_exited", this, "_update_substitute"); // Preview - lne_prefix->connect("text_changed", this, "_update_preview"); - lne_suffix->connect("text_changed", this, "_update_preview"); - lne_search->connect("text_changed", this, "_update_preview"); - lne_replace->connect("text_changed", this, "_update_preview"); - spn_count_start->connect("value_changed", this, "_update_preview_int"); - spn_count_step->connect("value_changed", this, "_update_preview_int"); - spn_count_padding->connect("value_changed", this, "_update_preview_int"); - opt_style->connect("item_selected", this, "_update_preview_int"); - opt_case->connect("item_selected", this, "_update_preview_int"); - cbut_substitute->connect("pressed", this, "_update_preview", varray("")); - cbut_regex->connect("pressed", this, "_update_preview", varray("")); - cbut_process->connect("pressed", this, "_update_preview", varray("")); - - but_reset->connect("pressed", this, "reset"); + lne_prefix->connect_compat("text_changed", this, "_update_preview"); + lne_suffix->connect_compat("text_changed", this, "_update_preview"); + lne_search->connect_compat("text_changed", this, "_update_preview"); + lne_replace->connect_compat("text_changed", this, "_update_preview"); + spn_count_start->connect_compat("value_changed", this, "_update_preview_int"); + spn_count_step->connect_compat("value_changed", this, "_update_preview_int"); + spn_count_padding->connect_compat("value_changed", this, "_update_preview_int"); + opt_style->connect_compat("item_selected", this, "_update_preview_int"); + opt_case->connect_compat("item_selected", this, "_update_preview_int"); + cbut_substitute->connect_compat("pressed", this, "_update_preview", varray("")); + cbut_regex->connect_compat("pressed", this, "_update_preview", varray("")); + cbut_process->connect_compat("pressed", this, "_update_preview", varray("")); + + but_reset->connect_compat("pressed", this, "reset"); reset(); _features_toggled(false); diff --git a/editor/reparent_dialog.cpp b/editor/reparent_dialog.cpp index dd35f41b7a..7c99f5d520 100644 --- a/editor/reparent_dialog.cpp +++ b/editor/reparent_dialog.cpp @@ -38,12 +38,12 @@ void ReparentDialog::_notification(int p_what) { if (p_what == NOTIFICATION_ENTER_TREE) { - connect("confirmed", this, "_reparent"); + connect_compat("confirmed", this, "_reparent"); } if (p_what == NOTIFICATION_EXIT_TREE) { - disconnect("confirmed", this, "_reparent"); + disconnect_compat("confirmed", this, "_reparent"); } if (p_what == NOTIFICATION_DRAW) { @@ -93,7 +93,7 @@ ReparentDialog::ReparentDialog() { vbc->add_margin_child(TTR("Reparent Location (Select new Parent):"), tree, true); - tree->get_scene_tree()->connect("item_activated", this, "_reparent"); + tree->get_scene_tree()->connect_compat("item_activated", this, "_reparent"); //Label *label = memnew( Label ); //label->set_position( Point2( 15,8) ); diff --git a/editor/run_settings_dialog.cpp b/editor/run_settings_dialog.cpp index 3a8d17b54e..0c7ee8d807 100644 --- a/editor/run_settings_dialog.cpp +++ b/editor/run_settings_dialog.cpp @@ -81,7 +81,7 @@ RunSettingsDialog::RunSettingsDialog() { vbc->add_margin_child(TTR("Run Mode:"), run_mode); run_mode->add_item(TTR("Current Scene")); run_mode->add_item(TTR("Main Scene")); - run_mode->connect("item_selected", this, "_run_mode_changed"); + run_mode->connect_compat("item_selected", this, "_run_mode_changed"); arguments = memnew(LineEdit); vbc->add_margin_child(TTR("Main Scene Arguments:"), arguments); arguments->set_editable(false); diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp index 34d6d0580e..ebc7d56b24 100644 --- a/editor/scene_tree_dock.cpp +++ b/editor/scene_tree_dock.cpp @@ -35,6 +35,7 @@ #include "core/os/keyboard.h" #include "core/project_settings.h" +#include "editor/debugger/editor_debugger_node.h" #include "editor/editor_feature_profile.h" #include "editor/editor_node.h" #include "editor/editor_scale.h" @@ -44,7 +45,6 @@ #include "editor/plugins/canvas_item_editor_plugin.h" #include "editor/plugins/script_editor_plugin.h" #include "editor/plugins/spatial_editor_plugin.h" -#include "editor/script_editor_debugger.h" #include "scene/main/viewport.h" #include "scene/resources/packed_scene.h" @@ -229,9 +229,9 @@ void SceneTreeDock::_perform_instance_scenes(const Vector<String> &p_files, Node editor_data->get_undo_redo().add_undo_method(parent, "remove_child", instanced_scene); String new_name = parent->validate_child_name(instanced_scene); - ScriptEditorDebugger *sed = ScriptEditor::get_singleton()->get_debugger(); - editor_data->get_undo_redo().add_do_method(sed, "live_debug_instance_node", edited_scene->get_path_to(parent), p_files[i], new_name); - editor_data->get_undo_redo().add_undo_method(sed, "live_debug_remove_node", NodePath(String(edited_scene->get_path_to(parent)).plus_file(new_name))); + EditorDebuggerNode *ed = EditorDebuggerNode::get_singleton(); + editor_data->get_undo_redo().add_do_method(ed, "live_debug_instance_node", edited_scene->get_path_to(parent), p_files[i], new_name); + editor_data->get_undo_redo().add_undo_method(ed, "live_debug_remove_node", NodePath(String(edited_scene->get_path_to(parent)).plus_file(new_name))); } editor_data->get_undo_redo().commit_action(); @@ -591,10 +591,10 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) { editor_data->get_undo_redo().add_undo_method(parent, "remove_child", dup); editor_data->get_undo_redo().add_do_reference(dup); - ScriptEditorDebugger *sed = ScriptEditor::get_singleton()->get_debugger(); + EditorDebuggerNode *ed = EditorDebuggerNode::get_singleton(); - editor_data->get_undo_redo().add_do_method(sed, "live_debug_duplicate_node", edited_scene->get_path_to(node), dup->get_name()); - editor_data->get_undo_redo().add_undo_method(sed, "live_debug_remove_node", NodePath(String(edited_scene->get_path_to(parent)).plus_file(dup->get_name()))); + editor_data->get_undo_redo().add_do_method(ed, "live_debug_duplicate_node", edited_scene->get_path_to(node), dup->get_name()); + editor_data->get_undo_redo().add_undo_method(ed, "live_debug_remove_node", NodePath(String(edited_scene->get_path_to(parent)).plus_file(dup->get_name()))); } editor_data->get_undo_redo().commit_action(); @@ -972,7 +972,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) { new_node = Object::cast_to<Node>(ClassDB::instance(ScriptServer::get_global_class_native_base(name))); Ref<Script> script = ResourceLoader::load(ScriptServer::get_global_class_path(name), "Script"); if (new_node && script.is_valid()) { - new_node->set_script(script.get_ref_ptr()); + new_node->set_script(script); new_node->set_name(name); } } else { @@ -1046,18 +1046,18 @@ void SceneTreeDock::_notification(int p_what) { break; first_enter = false; - EditorFeatureProfileManager::get_singleton()->connect("current_feature_profile_changed", this, "_feature_profile_changed"); + EditorFeatureProfileManager::get_singleton()->connect_compat("current_feature_profile_changed", this, "_feature_profile_changed"); CanvasItemEditorPlugin *canvas_item_plugin = Object::cast_to<CanvasItemEditorPlugin>(editor_data->get_editor("2D")); if (canvas_item_plugin) { - canvas_item_plugin->get_canvas_item_editor()->connect("item_lock_status_changed", scene_tree, "_update_tree"); - canvas_item_plugin->get_canvas_item_editor()->connect("item_group_status_changed", scene_tree, "_update_tree"); - scene_tree->connect("node_changed", canvas_item_plugin->get_canvas_item_editor()->get_viewport_control(), "update"); + canvas_item_plugin->get_canvas_item_editor()->connect_compat("item_lock_status_changed", scene_tree, "_update_tree"); + canvas_item_plugin->get_canvas_item_editor()->connect_compat("item_group_status_changed", scene_tree, "_update_tree"); + scene_tree->connect_compat("node_changed", canvas_item_plugin->get_canvas_item_editor()->get_viewport_control(), "update"); } SpatialEditorPlugin *spatial_editor_plugin = Object::cast_to<SpatialEditorPlugin>(editor_data->get_editor("3D")); - spatial_editor_plugin->get_spatial_editor()->connect("item_lock_status_changed", scene_tree, "_update_tree"); - spatial_editor_plugin->get_spatial_editor()->connect("item_group_status_changed", scene_tree, "_update_tree"); + spatial_editor_plugin->get_spatial_editor()->connect_compat("item_lock_status_changed", scene_tree, "_update_tree"); + spatial_editor_plugin->get_spatial_editor()->connect_compat("item_group_status_changed", scene_tree, "_update_tree"); button_add->set_icon(get_icon("Add", "EditorIcons")); button_instance->set_icon(get_icon("Instance", "EditorIcons")); @@ -1067,8 +1067,8 @@ void SceneTreeDock::_notification(int p_what) { filter->set_right_icon(get_icon("Search", "EditorIcons")); filter->set_clear_button_enabled(true); - EditorNode::get_singleton()->get_editor_selection()->connect("selection_changed", this, "_selection_changed"); - scene_tree->get_scene_tree()->connect("item_collapsed", this, "_node_collapsed"); + EditorNode::get_singleton()->get_editor_selection()->connect_compat("selection_changed", this, "_selection_changed"); + scene_tree->get_scene_tree()->connect_compat("item_collapsed", this, "_node_collapsed"); // create_root_dialog HBoxContainer *top_row = memnew(HBoxContainer); @@ -1083,7 +1083,7 @@ void SceneTreeDock::_notification(int p_what) { node_shortcuts_toggle->set_toggle_mode(true); node_shortcuts_toggle->set_pressed(EDITOR_GET("_use_favorites_root_selection")); node_shortcuts_toggle->set_anchors_and_margins_preset(Control::PRESET_CENTER_RIGHT); - node_shortcuts_toggle->connect("pressed", this, "_update_create_root_dialog"); + node_shortcuts_toggle->connect_compat("pressed", this, "_update_create_root_dialog"); top_row->add_child(node_shortcuts_toggle); create_root_dialog->add_child(top_row); @@ -1099,18 +1099,18 @@ 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_icon("Node2D", "EditorIcons")); - button_2d->connect("pressed", this, "_tool_selected", make_binds(TOOL_CREATE_2D_SCENE, false)); + button_2d->connect_compat("pressed", this, "_tool_selected", make_binds(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_icon("Spatial", "EditorIcons")); - button_3d->connect("pressed", this, "_tool_selected", make_binds(TOOL_CREATE_3D_SCENE, false)); + button_3d->connect_compat("pressed", this, "_tool_selected", make_binds(TOOL_CREATE_3D_SCENE, false)); Button *button_ui = memnew(Button); beginner_node_shortcuts->add_child(button_ui); button_ui->set_text(TTR("User Interface")); button_ui->set_icon(get_icon("Control", "EditorIcons")); - button_ui->connect("pressed", this, "_tool_selected", make_binds(TOOL_CREATE_USER_INTERFACE, false)); + button_ui->connect_compat("pressed", this, "_tool_selected", make_binds(TOOL_CREATE_USER_INTERFACE, false)); VBoxContainer *favorite_node_shortcuts = memnew(VBoxContainer); favorite_node_shortcuts->set_name("FavoriteNodeShortcuts"); @@ -1120,7 +1120,7 @@ void SceneTreeDock::_notification(int p_what) { node_shortcuts->add_child(button_custom); button_custom->set_text(TTR("Other Node")); button_custom->set_icon(get_icon("Add", "EditorIcons")); - button_custom->connect("pressed", this, "_tool_selected", make_binds(TOOL_NEW, false)); + button_custom->connect_compat("pressed", this, "_tool_selected", make_binds(TOOL_NEW, false)); node_shortcuts->add_spacer(); create_root_dialog->add_child(node_shortcuts); @@ -1128,11 +1128,11 @@ void SceneTreeDock::_notification(int p_what) { } break; case NOTIFICATION_ENTER_TREE: { - clear_inherit_confirm->connect("confirmed", this, "_tool_selected", varray(TOOL_SCENE_CLEAR_INHERITANCE_CONFIRM)); + clear_inherit_confirm->connect_compat("confirmed", this, "_tool_selected", varray(TOOL_SCENE_CLEAR_INHERITANCE_CONFIRM)); } break; case NOTIFICATION_EXIT_TREE: { - clear_inherit_confirm->disconnect("confirmed", this, "_tool_selected"); + clear_inherit_confirm->disconnect_compat("confirmed", this, "_tool_selected"); } break; case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: { button_add->set_icon(get_icon("Add", "EditorIcons")); @@ -1584,7 +1584,7 @@ void SceneTreeDock::_do_reparent(Node *p_new_parent, int p_position_in_parent, V if (p_position_in_parent >= 0) editor_data->get_undo_redo().add_do_method(new_parent, "move_child", node, p_position_in_parent + inc); - ScriptEditorDebugger *sed = ScriptEditor::get_singleton()->get_debugger(); + EditorDebuggerNode *ed = EditorDebuggerNode::get_singleton(); String old_name = former_names[ni]; String new_name = new_parent->validate_child_name(node); @@ -1609,8 +1609,8 @@ void SceneTreeDock::_do_reparent(Node *p_new_parent, int p_position_in_parent, V path_renames[ni].second = fixed_node_path; } - editor_data->get_undo_redo().add_do_method(sed, "live_debug_reparent_node", edited_scene->get_path_to(node), edited_scene->get_path_to(new_parent), new_name, p_position_in_parent + inc); - editor_data->get_undo_redo().add_undo_method(sed, "live_debug_reparent_node", NodePath(String(edited_scene->get_path_to(new_parent)).plus_file(new_name)), edited_scene->get_path_to(node->get_parent()), node->get_name(), node->get_index()); + editor_data->get_undo_redo().add_do_method(ed, "live_debug_reparent_node", edited_scene->get_path_to(node), edited_scene->get_path_to(new_parent), new_name, p_position_in_parent + inc); + editor_data->get_undo_redo().add_undo_method(ed, "live_debug_reparent_node", NodePath(String(edited_scene->get_path_to(new_parent)).plus_file(new_name)), edited_scene->get_path_to(node->get_parent()), node->get_name(), node->get_index()); if (p_keep_global_xform) { if (Object::cast_to<Node2D>(node)) @@ -1725,7 +1725,7 @@ void SceneTreeDock::_script_created(Ref<Script> p_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(E->get(), "set_script", p_script.get_ref_ptr()); + 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(this, "_update_script_button"); editor_data->get_undo_redo().add_undo_method(this, "_update_script_button"); @@ -1738,7 +1738,7 @@ void SceneTreeDock::_script_created(Ref<Script> p_script) { } void SceneTreeDock::_script_creation_closed() { - script_create_dialog->disconnect("script_created", this, "_script_created"); + script_create_dialog->disconnect_compat("script_created", this, "_script_created"); } void SceneTreeDock::_toggle_editable_children_from_selection() { @@ -1849,9 +1849,9 @@ void SceneTreeDock::_delete_confirm() { editor_data->get_undo_redo().add_undo_method(this, "_set_owners", edited_scene, owners); editor_data->get_undo_redo().add_undo_reference(n); - ScriptEditorDebugger *sed = ScriptEditor::get_singleton()->get_debugger(); - editor_data->get_undo_redo().add_do_method(sed, "live_debug_remove_and_keep_node", edited_scene->get_path_to(n), n->get_instance_id()); - editor_data->get_undo_redo().add_undo_method(sed, "live_debug_restore_node", n->get_instance_id(), edited_scene->get_path_to(n->get_parent()), n->get_index()); + EditorDebuggerNode *ed = EditorDebuggerNode::get_singleton(); + editor_data->get_undo_redo().add_do_method(ed, "live_debug_remove_and_keep_node", edited_scene->get_path_to(n), n->get_instance_id()); + editor_data->get_undo_redo().add_undo_method(ed, "live_debug_restore_node", n->get_instance_id(), edited_scene->get_path_to(n->get_parent()), n->get_index()); } } editor_data->get_undo_redo().commit_action(); @@ -1950,9 +1950,9 @@ void SceneTreeDock::_do_create(Node *p_parent) { editor_data->get_undo_redo().add_undo_method(p_parent, "remove_child", child); String new_name = p_parent->validate_child_name(child); - ScriptEditorDebugger *sed = ScriptEditor::get_singleton()->get_debugger(); - editor_data->get_undo_redo().add_do_method(sed, "live_debug_create_node", edited_scene->get_path_to(p_parent), child->get_class(), new_name); - editor_data->get_undo_redo().add_undo_method(sed, "live_debug_remove_node", NodePath(String(edited_scene->get_path_to(p_parent)).plus_file(new_name))); + EditorDebuggerNode *ed = EditorDebuggerNode::get_singleton(); + editor_data->get_undo_redo().add_do_method(ed, "live_debug_create_node", edited_scene->get_path_to(p_parent), child->get_class(), new_name); + editor_data->get_undo_redo().add_undo_method(ed, "live_debug_remove_node", NodePath(String(edited_scene->get_path_to(p_parent)).plus_file(new_name))); } else { @@ -2113,7 +2113,7 @@ void SceneTreeDock::replace_node(Node *p_node, Node *p_by_node, bool p_keep_prop Object::Connection &c = F->get(); if (!(c.flags & Object::CONNECT_PERSIST)) continue; - newnode->connect(c.signal, c.target, c.method, c.binds, Object::CONNECT_PERSIST); + newnode->connect_compat(c.signal.get_name(), c.callable.get_object(), c.callable.get_method(), c.binds, Object::CONNECT_PERSIST); } } @@ -2410,7 +2410,7 @@ void SceneTreeDock::_tree_rmb(const Vector2 &p_menu_pos) { menu->clear(); Ref<Script> existing_script; - bool exisiting_script_removable = true; + bool existing_script_removable = true; if (selection.size() == 1) { Node *selected = selection[0]; @@ -2432,7 +2432,7 @@ void SceneTreeDock::_tree_rmb(const Vector2 &p_menu_pos) { existing_script = selected->get_script(); if (EditorNode::get_singleton()->get_object_custom_type_base(selected) == existing_script) { - exisiting_script_removable = false; + existing_script_removable = false; } } @@ -2446,7 +2446,7 @@ void SceneTreeDock::_tree_rmb(const Vector2 &p_menu_pos) { menu->add_icon_shortcut(get_icon("ScriptExtend", "EditorIcons"), ED_GET_SHORTCUT("scene_tree/extend_script"), TOOL_EXTEND_SCRIPT); } } - if (existing_script.is_valid() && exisiting_script_removable) { + if (existing_script.is_valid() && existing_script_removable) { add_separator = true; menu->add_icon_shortcut(get_icon("ScriptRemove", "EditorIcons"), ED_GET_SHORTCUT("scene_tree/clear_script"), TOOL_CLEAR_SCRIPT); } else if (full_selection.size() > 1) { @@ -2616,8 +2616,8 @@ void SceneTreeDock::attach_script_to_selected(bool p_extend) { } } - script_create_dialog->connect("script_created", this, "_script_created"); - script_create_dialog->connect("popup_hide", this, "_script_creation_closed", varray(), CONNECT_ONESHOT); + script_create_dialog->connect_compat("script_created", this, "_script_created"); + script_create_dialog->connect_compat("popup_hide", this, "_script_creation_closed", varray(), CONNECT_ONESHOT); script_create_dialog->set_inheritance_base_type("Node"); script_create_dialog->config(inherits, path); script_create_dialog->popup_centered(); @@ -2719,7 +2719,7 @@ void SceneTreeDock::_update_create_root_dialog() { if (ScriptServer::is_global_class(name)) name = ScriptServer::get_global_class_native_base(name); button->set_icon(EditorNode::get_singleton()->get_class_icon(name)); - button->connect("pressed", this, "_favorite_root_selected", make_binds(l)); + button->connect_compat("pressed", this, "_favorite_root_selected", make_binds(l)); } } @@ -2850,13 +2850,13 @@ SceneTreeDock::SceneTreeDock(EditorNode *p_editor, Node *p_scene_root, EditorSel ED_SHORTCUT("scene_tree/delete", TTR("Delete"), KEY_DELETE); button_add = memnew(ToolButton); - button_add->connect("pressed", this, "_tool_selected", make_binds(TOOL_NEW, false)); + button_add->connect_compat("pressed", this, "_tool_selected", make_binds(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(ToolButton); - button_instance->connect("pressed", this, "_tool_selected", make_binds(TOOL_INSTANCE, false)); + button_instance->connect_compat("pressed", this, "_tool_selected", make_binds(TOOL_INSTANCE, false)); button_instance->set_tooltip(TTR("Instance 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); @@ -2867,17 +2867,17 @@ SceneTreeDock::SceneTreeDock(EditorNode *p_editor, Node *p_scene_root, EditorSel filter->set_placeholder(TTR("Filter nodes")); filter_hbc->add_child(filter); filter->add_constant_override("minimum_spaces", 0); - filter->connect("text_changed", this, "_filter_changed"); + filter->connect_compat("text_changed", this, "_filter_changed"); button_create_script = memnew(ToolButton); - button_create_script->connect("pressed", this, "_tool_selected", make_binds(TOOL_ATTACH_SCRIPT, false)); + button_create_script->connect_compat("pressed", this, "_tool_selected", make_binds(TOOL_ATTACH_SCRIPT, false)); button_create_script->set_tooltip(TTR("Attach a new or existing script for the selected node.")); button_create_script->set_shortcut(ED_GET_SHORTCUT("scene_tree/attach_script")); filter_hbc->add_child(button_create_script); button_create_script->hide(); button_clear_script = memnew(ToolButton); - button_clear_script->connect("pressed", this, "_tool_selected", make_binds(TOOL_CLEAR_SCRIPT, false)); + button_clear_script->connect_compat("pressed", this, "_tool_selected", make_binds(TOOL_CLEAR_SCRIPT, false)); button_clear_script->set_tooltip(TTR("Clear a script for the selected node.")); button_clear_script->set_shortcut(ED_GET_SHORTCUT("scene_tree/clear_script")); filter_hbc->add_child(button_clear_script); @@ -2891,14 +2891,14 @@ SceneTreeDock::SceneTreeDock(EditorNode *p_editor, Node *p_scene_root, EditorSel edit_remote->set_h_size_flags(SIZE_EXPAND_FILL); edit_remote->set_text(TTR("Remote")); edit_remote->set_toggle_mode(true); - edit_remote->connect("pressed", this, "_remote_tree_selected"); + edit_remote->connect_compat("pressed", this, "_remote_tree_selected"); edit_local = memnew(ToolButton); button_hb->add_child(edit_local); edit_local->set_h_size_flags(SIZE_EXPAND_FILL); edit_local->set_text(TTR("Local")); edit_local->set_toggle_mode(true); - edit_local->connect("pressed", this, "_local_tree_selected"); + edit_local->connect_compat("pressed", this, "_local_tree_selected"); remote_tree = NULL; button_hb->hide(); @@ -2911,19 +2911,19 @@ SceneTreeDock::SceneTreeDock(EditorNode *p_editor, Node *p_scene_root, EditorSel vbc->add_child(scene_tree); scene_tree->set_v_size_flags(SIZE_EXPAND | SIZE_FILL); - scene_tree->connect("rmb_pressed", this, "_tree_rmb"); + scene_tree->connect_compat("rmb_pressed", this, "_tree_rmb"); - scene_tree->connect("node_selected", this, "_node_selected", varray(), CONNECT_DEFERRED); - scene_tree->connect("node_renamed", this, "_node_renamed", varray(), CONNECT_DEFERRED); - scene_tree->connect("node_prerename", this, "_node_prerenamed"); - scene_tree->connect("open", this, "_load_request"); - scene_tree->connect("open_script", this, "_script_open_request"); - scene_tree->connect("nodes_rearranged", this, "_nodes_dragged"); - scene_tree->connect("files_dropped", this, "_files_dropped"); - scene_tree->connect("script_dropped", this, "_script_dropped"); - scene_tree->connect("nodes_dragged", this, "_nodes_drag_begin"); + scene_tree->connect_compat("node_selected", this, "_node_selected", varray(), CONNECT_DEFERRED); + scene_tree->connect_compat("node_renamed", this, "_node_renamed", varray(), CONNECT_DEFERRED); + scene_tree->connect_compat("node_prerename", this, "_node_prerenamed"); + scene_tree->connect_compat("open", this, "_load_request"); + scene_tree->connect_compat("open_script", this, "_script_open_request"); + scene_tree->connect_compat("nodes_rearranged", this, "_nodes_dragged"); + scene_tree->connect_compat("files_dropped", this, "_files_dropped"); + scene_tree->connect_compat("script_dropped", this, "_script_dropped"); + scene_tree->connect_compat("nodes_dragged", this, "_nodes_drag_begin"); - scene_tree->get_scene_tree()->connect("item_double_clicked", this, "_focus_node"); + scene_tree->get_scene_tree()->connect_compat("item_double_clicked", this, "_focus_node"); scene_tree->set_undo_redo(&editor_data->get_undo_redo()); scene_tree->set_editor_selection(editor_selection); @@ -2931,8 +2931,8 @@ SceneTreeDock::SceneTreeDock(EditorNode *p_editor, Node *p_scene_root, EditorSel create_dialog = memnew(CreateDialog); create_dialog->set_base_type("Node"); add_child(create_dialog); - create_dialog->connect("create", this, "_create"); - create_dialog->connect("favorites_updated", this, "_update_create_root_dialog"); + create_dialog->connect_compat("create", this, "_create"); + create_dialog->connect_compat("favorites_updated", this, "_update_create_root_dialog"); rename_dialog = memnew(RenameDialog(scene_tree, &editor_data->get_undo_redo())); add_child(rename_dialog); @@ -2943,44 +2943,44 @@ SceneTreeDock::SceneTreeDock(EditorNode *p_editor, Node *p_scene_root, EditorSel reparent_dialog = memnew(ReparentDialog); add_child(reparent_dialog); - reparent_dialog->connect("reparent", this, "_node_reparent"); + reparent_dialog->connect_compat("reparent", this, "_node_reparent"); accept = memnew(AcceptDialog); add_child(accept); quick_open = memnew(EditorQuickOpen); add_child(quick_open); - quick_open->connect("quick_open", this, "_quick_open"); + quick_open->connect_compat("quick_open", this, "_quick_open"); set_process_unhandled_key_input(true); delete_dialog = memnew(ConfirmationDialog); add_child(delete_dialog); - delete_dialog->connect("confirmed", this, "_delete_confirm"); + delete_dialog->connect_compat("confirmed", this, "_delete_confirm"); editable_instance_remove_dialog = memnew(ConfirmationDialog); add_child(editable_instance_remove_dialog); - editable_instance_remove_dialog->connect("confirmed", this, "_toggle_editable_children_from_selection"); + editable_instance_remove_dialog->connect_compat("confirmed", this, "_toggle_editable_children_from_selection"); placeholder_editable_instance_remove_dialog = memnew(ConfirmationDialog); add_child(placeholder_editable_instance_remove_dialog); - placeholder_editable_instance_remove_dialog->connect("confirmed", this, "_toggle_placeholder_from_selection"); + placeholder_editable_instance_remove_dialog->connect_compat("confirmed", this, "_toggle_placeholder_from_selection"); import_subscene_dialog = memnew(EditorSubScene); add_child(import_subscene_dialog); - import_subscene_dialog->connect("subscene_selected", this, "_import_subscene"); + import_subscene_dialog->connect_compat("subscene_selected", this, "_import_subscene"); new_scene_from_dialog = memnew(EditorFileDialog); new_scene_from_dialog->set_mode(EditorFileDialog::MODE_SAVE_FILE); add_child(new_scene_from_dialog); - new_scene_from_dialog->connect("file_selected", this, "_new_scene_from"); + new_scene_from_dialog->connect_compat("file_selected", this, "_new_scene_from"); menu = memnew(PopupMenu); add_child(menu); - menu->connect("id_pressed", this, "_tool_selected"); + menu->connect_compat("id_pressed", this, "_tool_selected"); menu->set_hide_on_window_lose_focus(true); menu_subresources = memnew(PopupMenu); menu_subresources->set_name("Sub-Resources"); - menu_subresources->connect("id_pressed", this, "_tool_selected"); + menu_subresources->connect_compat("id_pressed", this, "_tool_selected"); menu->add_child(menu_subresources); first_enter = true; restore_script_editor_on_drag = false; diff --git a/editor/scene_tree_editor.cpp b/editor/scene_tree_editor.cpp index a0b846beb0..ff8eaa8897 100644 --- a/editor/scene_tree_editor.cpp +++ b/editor/scene_tree_editor.cpp @@ -70,10 +70,9 @@ void SceneTreeEditor::_cell_button_pressed(Object *p_item, int p_column, int p_i emit_signal("open", n->get_filename()); } } else if (p_id == BUTTON_SCRIPT) { - RefPtr script = n->get_script(); - Ref<Script> script_typed = script; + Ref<Script> script_typed = n->get_script(); if (!script_typed.is_null()) - emit_signal("open_script", script); + emit_signal("open_script", script_typed); } else if (p_id == BUTTON_VISIBILITY) { undo_redo->create_action(TTR("Toggle Visible")); @@ -324,8 +323,8 @@ bool 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", this, "_node_script_changed")) - p_node->connect("script_changed", this, "_node_script_changed", varray(p_node)); + if (!p_node->is_connected_compat("script_changed", this, "_node_script_changed")) + p_node->connect_compat("script_changed", this, "_node_script_changed", varray(p_node)); Ref<Script> script = p_node->get_script(); if (!script.is_null()) { @@ -351,8 +350,8 @@ bool SceneTreeEditor::_add_nodes(Node *p_node, TreeItem *p_parent) { else item->add_button(0, get_icon("GuiVisibilityHidden", "EditorIcons"), BUTTON_VISIBILITY, false, TTR("Toggle Visibility")); - if (!p_node->is_connected("visibility_changed", this, "_node_visibility_changed")) - p_node->connect("visibility_changed", this, "_node_visibility_changed", varray(p_node)); + if (!p_node->is_connected_compat("visibility_changed", this, "_node_visibility_changed")) + p_node->connect_compat("visibility_changed", this, "_node_visibility_changed", varray(p_node)); _update_visibility_color(p_node, item); } else if (p_node->is_class("Spatial")) { @@ -371,8 +370,8 @@ bool SceneTreeEditor::_add_nodes(Node *p_node, TreeItem *p_parent) { else item->add_button(0, get_icon("GuiVisibilityHidden", "EditorIcons"), BUTTON_VISIBILITY, false, TTR("Toggle Visibility")); - if (!p_node->is_connected("visibility_changed", this, "_node_visibility_changed")) - p_node->connect("visibility_changed", this, "_node_visibility_changed", varray(p_node)); + if (!p_node->is_connected_compat("visibility_changed", this, "_node_visibility_changed")) + p_node->connect_compat("visibility_changed", this, "_node_visibility_changed", varray(p_node)); _update_visibility_color(p_node, item); } else if (p_node->is_class("AnimationPlayer")) { @@ -496,12 +495,12 @@ void SceneTreeEditor::_node_removed(Node *p_node) { if (EditorNode::get_singleton()->is_exiting()) return; //speed up exit - if (p_node->is_connected("script_changed", this, "_node_script_changed")) - p_node->disconnect("script_changed", this, "_node_script_changed"); + if (p_node->is_connected_compat("script_changed", this, "_node_script_changed")) + p_node->disconnect_compat("script_changed", this, "_node_script_changed"); if (p_node->is_class("Spatial") || p_node->is_class("CanvasItem")) { - if (p_node->is_connected("visibility_changed", this, "_node_visibility_changed")) - p_node->disconnect("visibility_changed", this, "_node_visibility_changed"); + if (p_node->is_connected_compat("visibility_changed", this, "_node_visibility_changed")) + p_node->disconnect_compat("visibility_changed", this, "_node_visibility_changed"); } if (p_node == selected) { @@ -641,22 +640,22 @@ void SceneTreeEditor::_notification(int p_what) { switch (p_what) { case NOTIFICATION_ENTER_TREE: { - get_tree()->connect("tree_changed", this, "_tree_changed"); - get_tree()->connect("node_removed", this, "_node_removed"); - get_tree()->connect("node_renamed", this, "_node_renamed"); - get_tree()->connect("node_configuration_warning_changed", this, "_warning_changed"); + get_tree()->connect_compat("tree_changed", this, "_tree_changed"); + get_tree()->connect_compat("node_removed", this, "_node_removed"); + get_tree()->connect_compat("node_renamed", this, "_node_renamed"); + get_tree()->connect_compat("node_configuration_warning_changed", this, "_warning_changed"); - tree->connect("item_collapsed", this, "_cell_collapsed"); + tree->connect_compat("item_collapsed", this, "_cell_collapsed"); _update_tree(); } break; case NOTIFICATION_EXIT_TREE: { - get_tree()->disconnect("tree_changed", this, "_tree_changed"); - get_tree()->disconnect("node_removed", this, "_node_removed"); - get_tree()->disconnect("node_renamed", this, "_node_renamed"); - tree->disconnect("item_collapsed", this, "_cell_collapsed"); - get_tree()->disconnect("node_configuration_warning_changed", this, "_warning_changed"); + get_tree()->disconnect_compat("tree_changed", this, "_tree_changed"); + get_tree()->disconnect_compat("node_removed", this, "_node_removed"); + get_tree()->disconnect_compat("node_renamed", this, "_node_renamed"); + tree->disconnect_compat("item_collapsed", this, "_cell_collapsed"); + get_tree()->disconnect_compat("node_configuration_warning_changed", this, "_warning_changed"); } break; case NOTIFICATION_THEME_CHANGED: { @@ -837,7 +836,7 @@ void SceneTreeEditor::set_editor_selection(EditorSelection *p_selection) { editor_selection = p_selection; tree->set_select_mode(Tree::SELECT_MULTI); tree->set_cursor_can_exit_tree(false); - editor_selection->connect("selection_changed", this, "_selection_changed"); + editor_selection->connect_compat("selection_changed", this, "_selection_changed"); } void SceneTreeEditor::_update_selection(TreeItem *item) { @@ -1121,7 +1120,7 @@ void SceneTreeEditor::_bind_methods() { ADD_SIGNAL(MethodInfo("node_changed")); ADD_SIGNAL(MethodInfo("nodes_dragged")); ADD_SIGNAL(MethodInfo("nodes_rearranged", PropertyInfo(Variant::ARRAY, "paths"), PropertyInfo(Variant::NODE_PATH, "to_path"), PropertyInfo(Variant::INT, "type"))); - ADD_SIGNAL(MethodInfo("files_dropped", PropertyInfo(Variant::POOL_STRING_ARRAY, "files"), PropertyInfo(Variant::NODE_PATH, "to_path"), PropertyInfo(Variant::INT, "type"))); + ADD_SIGNAL(MethodInfo("files_dropped", PropertyInfo(Variant::PACKED_STRING_ARRAY, "files"), PropertyInfo(Variant::NODE_PATH, "to_path"), PropertyInfo(Variant::INT, "type"))); ADD_SIGNAL(MethodInfo("script_dropped", PropertyInfo(Variant::STRING, "file"), PropertyInfo(Variant::NODE_PATH, "to_path"))); ADD_SIGNAL(MethodInfo("rmb_pressed", PropertyInfo(Variant::VECTOR2, "position"))); @@ -1164,15 +1163,15 @@ SceneTreeEditor::SceneTreeEditor(bool p_label, bool p_can_rename, bool p_can_ope tree->set_drag_forwarding(this); if (p_can_rename) { tree->set_allow_rmb_select(true); - tree->connect("item_rmb_selected", this, "_rmb_select"); - tree->connect("empty_tree_rmb_selected", this, "_rmb_select"); + tree->connect_compat("item_rmb_selected", this, "_rmb_select"); + tree->connect_compat("empty_tree_rmb_selected", this, "_rmb_select"); } - tree->connect("cell_selected", this, "_selected_changed"); - tree->connect("item_edited", this, "_renamed", varray(), CONNECT_DEFERRED); - tree->connect("multi_selected", this, "_cell_multi_selected"); - tree->connect("button_pressed", this, "_cell_button_pressed"); - tree->connect("nothing_selected", this, "_deselect_items"); + tree->connect_compat("cell_selected", this, "_selected_changed"); + tree->connect_compat("item_edited", this, "_renamed", varray(), CONNECT_DEFERRED); + tree->connect_compat("multi_selected", this, "_cell_multi_selected"); + tree->connect_compat("button_pressed", this, "_cell_button_pressed"); + tree->connect_compat("nothing_selected", this, "_deselect_items"); //tree->connect("item_edited", this,"_renamed",Vector<Variant>(),true); error = memnew(AcceptDialog); @@ -1190,7 +1189,7 @@ SceneTreeEditor::SceneTreeEditor(bool p_label, bool p_can_rename, bool p_can_ope blocked = 0; update_timer = memnew(Timer); - update_timer->connect("timeout", this, "_update_tree"); + update_timer->connect_compat("timeout", this, "_update_tree"); update_timer->set_one_shot(true); update_timer->set_wait_time(0.5); add_child(update_timer); @@ -1210,12 +1209,12 @@ void SceneTreeDialog::_notification(int p_what) { switch (p_what) { case NOTIFICATION_ENTER_TREE: { - connect("confirmed", this, "_select"); + connect_compat("confirmed", this, "_select"); filter->set_right_icon(get_icon("Search", "EditorIcons")); filter->set_clear_button_enabled(true); } break; case NOTIFICATION_EXIT_TREE: { - disconnect("confirmed", this, "_select"); + disconnect_compat("confirmed", this, "_select"); } break; case NOTIFICATION_VISIBILITY_CHANGED: { if (is_visible_in_tree()) @@ -1260,12 +1259,12 @@ SceneTreeDialog::SceneTreeDialog() { filter->set_h_size_flags(SIZE_EXPAND_FILL); filter->set_placeholder(TTR("Filter nodes")); filter->add_constant_override("minimum_spaces", 0); - filter->connect("text_changed", this, "_filter_changed"); + filter->connect_compat("text_changed", this, "_filter_changed"); vbc->add_child(filter); tree = memnew(SceneTreeEditor(false, false, true)); tree->set_v_size_flags(SIZE_EXPAND_FILL); - tree->get_scene_tree()->connect("item_activated", this, "_select"); + tree->get_scene_tree()->connect_compat("item_activated", this, "_select"); vbc->add_child(tree); } diff --git a/editor/script_create_dialog.cpp b/editor/script_create_dialog.cpp index a3764b4085..ca4baffe84 100644 --- a/editor/script_create_dialog.cpp +++ b/editor/script_create_dialog.cpp @@ -52,10 +52,9 @@ void ScriptCreateDialog::_notification(int p_what) { language_menu->set_item_icon(i, lang_icon); } } + String last_lang = EditorSettings::get_singleton()->get_project_metadata("script_setup", "last_selected_language", ""); - Ref<Texture2D> last_lang_icon; if (!last_lang.empty()) { - for (int i = 0; i < language_menu->get_item_count(); i++) { if (language_menu->get_item_text(i) == last_lang) { language_menu->select(i); @@ -63,14 +62,10 @@ void ScriptCreateDialog::_notification(int p_what) { break; } } - - last_lang_icon = get_icon(last_lang, "EditorIcons"); } else { - last_lang_icon = language_menu->get_item_icon(default_language); - } - if (last_lang_icon.is_valid()) { - language_menu->set_icon(last_lang_icon); + language_menu->select(default_language); } + path_button->set_icon(get_icon("Folder", "EditorIcons")); parent_browse_button->set_icon(get_icon("Folder", "EditorIcons")); parent_search_button->set_icon(get_icon("ClassList", "EditorIcons")); @@ -337,7 +332,7 @@ void ScriptCreateDialog::_load_exist() { return; } - emit_signal("script_created", p_script.get_ref_ptr()); + emit_signal("script_created", p_script); hide(); } @@ -809,7 +804,7 @@ ScriptCreateDialog::ScriptCreateDialog() { language_menu->select(default_language); current_language = default_language; - language_menu->connect("item_selected", this, "_lang_changed"); + language_menu->connect_compat("item_selected", this, "_lang_changed"); /* Inherits */ @@ -818,16 +813,16 @@ ScriptCreateDialog::ScriptCreateDialog() { hb = memnew(HBoxContainer); hb->set_h_size_flags(SIZE_EXPAND_FILL); parent_name = memnew(LineEdit); - parent_name->connect("text_changed", this, "_parent_name_changed"); + parent_name->connect_compat("text_changed", this, "_parent_name_changed"); parent_name->set_h_size_flags(SIZE_EXPAND_FILL); hb->add_child(parent_name); parent_search_button = memnew(Button); parent_search_button->set_flat(true); - parent_search_button->connect("pressed", this, "_browse_class_in_tree"); + parent_search_button->connect_compat("pressed", this, "_browse_class_in_tree"); hb->add_child(parent_search_button); parent_browse_button = memnew(Button); parent_browse_button->set_flat(true); - parent_browse_button->connect("pressed", this, "_browse_path", varray(true, false)); + parent_browse_button->connect_compat("pressed", this, "_browse_path", varray(true, false)); hb->add_child(parent_browse_button); gc->add_child(memnew(Label(TTR("Inherits:")))); gc->add_child(hb); @@ -836,7 +831,7 @@ ScriptCreateDialog::ScriptCreateDialog() { /* Class Name */ class_name = memnew(LineEdit); - class_name->connect("text_changed", this, "_class_name_changed"); + class_name->connect_compat("text_changed", this, "_class_name_changed"); class_name->set_h_size_flags(SIZE_EXPAND_FILL); gc->add_child(memnew(Label(TTR("Class Name:")))); gc->add_child(class_name); @@ -846,28 +841,28 @@ ScriptCreateDialog::ScriptCreateDialog() { template_menu = memnew(OptionButton); gc->add_child(memnew(Label(TTR("Template:")))); gc->add_child(template_menu); - template_menu->connect("item_selected", this, "_template_changed"); + template_menu->connect_compat("item_selected", this, "_template_changed"); /* Built-in Script */ internal = memnew(CheckBox); internal->set_text(TTR("On")); - internal->connect("pressed", this, "_built_in_pressed"); + internal->connect_compat("pressed", this, "_built_in_pressed"); gc->add_child(memnew(Label(TTR("Built-in Script:")))); gc->add_child(internal); /* Path */ hb = memnew(HBoxContainer); - hb->connect("sort_children", this, "_path_hbox_sorted"); + hb->connect_compat("sort_children", this, "_path_hbox_sorted"); file_path = memnew(LineEdit); - file_path->connect("text_changed", this, "_path_changed"); - file_path->connect("text_entered", this, "_path_entered"); + file_path->connect_compat("text_changed", this, "_path_changed"); + file_path->connect_compat("text_entered", this, "_path_entered"); file_path->set_h_size_flags(SIZE_EXPAND_FILL); hb->add_child(file_path); path_button = memnew(Button); path_button->set_flat(true); - path_button->connect("pressed", this, "_browse_path", varray(false, true)); + path_button->connect_compat("pressed", this, "_browse_path", varray(false, true)); hb->add_child(path_button); gc->add_child(memnew(Label(TTR("Path:")))); gc->add_child(hb); @@ -876,11 +871,11 @@ ScriptCreateDialog::ScriptCreateDialog() { /* Dialog Setup */ select_class = memnew(CreateDialog); - select_class->connect("create", this, "_create"); + select_class->connect_compat("create", this, "_create"); add_child(select_class); file_browse = memnew(EditorFileDialog); - file_browse->connect("file_selected", this, "_file_selected"); + file_browse->connect_compat("file_selected", this, "_file_selected"); file_browse->set_mode(EditorFileDialog::MODE_OPEN_FILE); add_child(file_browse); get_ok()->set_text(TTR("Create")); diff --git a/editor/settings_config_dialog.cpp b/editor/settings_config_dialog.cpp index 44962323e5..9f8a531762 100644 --- a/editor/settings_config_dialog.cpp +++ b/editor/settings_config_dialog.cpp @@ -32,13 +32,13 @@ #include "core/os/keyboard.h" #include "core/project_settings.h" +#include "editor/debugger/editor_debugger_node.h" #include "editor_file_system.h" #include "editor_log.h" #include "editor_node.h" #include "editor_scale.h" #include "editor_settings.h" #include "scene/gui/margin_container.h" -#include "script_editor_debugger.h" void EditorSettingsDialog::ok_pressed() { @@ -119,9 +119,8 @@ void EditorSettingsDialog::_notification(int p_what) { switch (p_what) { case NOTIFICATION_READY: { - ScriptEditorDebugger *sed = ScriptEditor::get_singleton()->get_debugger(); - undo_redo->set_method_notify_callback(sed->_method_changeds, sed); - undo_redo->set_property_notify_callback(sed->_property_changeds, sed); + undo_redo->set_method_notify_callback(EditorDebuggerNode::_method_changeds, NULL); + undo_redo->set_property_notify_callback(EditorDebuggerNode::_property_changeds, NULL); undo_redo->set_commit_notify_callback(_undo_redo_callback, this); } break; case NOTIFICATION_ENTER_TREE: { @@ -412,7 +411,7 @@ EditorSettingsDialog::EditorSettingsDialog() { tabs = memnew(TabContainer); tabs->set_tab_align(TabContainer::ALIGN_LEFT); - tabs->connect("tab_changed", this, "_tabs_tab_changed"); + tabs->connect_compat("tab_changed", this, "_tabs_tab_changed"); add_child(tabs); // General Tab @@ -435,8 +434,8 @@ EditorSettingsDialog::EditorSettingsDialog() { inspector->set_v_size_flags(Control::SIZE_EXPAND_FILL); inspector->get_inspector()->set_undo_redo(undo_redo); tab_general->add_child(inspector); - inspector->get_inspector()->connect("property_edited", this, "_settings_property_edited"); - inspector->get_inspector()->connect("restart_requested", this, "_editor_restart_request"); + inspector->get_inspector()->connect_compat("property_edited", this, "_settings_property_edited"); + inspector->get_inspector()->connect_compat("restart_requested", this, "_editor_restart_request"); restart_container = memnew(PanelContainer); tab_general->add_child(restart_container); @@ -450,11 +449,11 @@ EditorSettingsDialog::EditorSettingsDialog() { restart_hb->add_child(restart_label); restart_hb->add_spacer(); Button *restart_button = memnew(Button); - restart_button->connect("pressed", this, "_editor_restart"); + restart_button->connect_compat("pressed", this, "_editor_restart"); restart_hb->add_child(restart_button); restart_button->set_text(TTR("Save & Restart")); restart_close_button = memnew(ToolButton); - restart_close_button->connect("pressed", this, "_editor_restart_close"); + restart_close_button->connect_compat("pressed", this, "_editor_restart_close"); restart_hb->add_child(restart_close_button); restart_container->hide(); @@ -471,7 +470,7 @@ EditorSettingsDialog::EditorSettingsDialog() { shortcut_search_box = memnew(LineEdit); shortcut_search_box->set_h_size_flags(Control::SIZE_EXPAND_FILL); hbc->add_child(shortcut_search_box); - shortcut_search_box->connect("text_changed", this, "_filter_shortcuts"); + shortcut_search_box->connect_compat("text_changed", this, "_filter_shortcuts"); shortcuts = memnew(Tree); tab_shortcuts->add_child(shortcuts, true); @@ -481,7 +480,7 @@ EditorSettingsDialog::EditorSettingsDialog() { shortcuts->set_column_titles_visible(true); shortcuts->set_column_title(0, TTR("Name")); shortcuts->set_column_title(1, TTR("Binding")); - shortcuts->connect("button_pressed", this, "_shortcut_button_pressed"); + shortcuts->connect_compat("button_pressed", this, "_shortcut_button_pressed"); press_a_key = memnew(ConfirmationDialog); press_a_key->set_focus_mode(FOCUS_ALL); @@ -495,17 +494,17 @@ EditorSettingsDialog::EditorSettingsDialog() { l->set_anchor_and_margin(MARGIN_BOTTOM, ANCHOR_BEGIN, 30); press_a_key_label = l; press_a_key->add_child(l); - press_a_key->connect("gui_input", this, "_wait_for_key"); - press_a_key->connect("confirmed", this, "_press_a_key_confirm"); + press_a_key->connect_compat("gui_input", this, "_wait_for_key"); + press_a_key->connect_compat("confirmed", this, "_press_a_key_confirm"); set_hide_on_ok(true); timer = memnew(Timer); timer->set_wait_time(1.5); - timer->connect("timeout", this, "_settings_save"); + timer->connect_compat("timeout", this, "_settings_save"); timer->set_one_shot(true); add_child(timer); - EditorSettings::get_singleton()->connect("settings_changed", this, "_settings_changed"); + EditorSettings::get_singleton()->connect_compat("settings_changed", this, "_settings_changed"); get_ok()->set_text(TTR("Close")); updating = false; diff --git a/editor/spatial_editor_gizmos.cpp b/editor/spatial_editor_gizmos.cpp index 1163621815..40e1be665c 100644 --- a/editor/spatial_editor_gizmos.cpp +++ b/editor/spatial_editor_gizmos.cpp @@ -214,10 +214,10 @@ void EditorSpatialGizmo::add_lines(const Vector<Vector3> &p_lines, const Ref<Mat a[Mesh::ARRAY_VERTEX] = p_lines; - PoolVector<Color> color; + Vector<Color> color; color.resize(p_lines.size()); { - PoolVector<Color>::Write w = color.write(); + Color *w = color.ptrw(); for (int i = 0; i < p_lines.size(); i++) { if (is_selected()) w[i] = Color(1, 1, 1, 0.8) * p_modulate; @@ -348,10 +348,10 @@ void EditorSpatialGizmo::add_handles(const Vector<Vector3> &p_handles, const Ref Array a; a.resize(VS::ARRAY_MAX); a[VS::ARRAY_VERTEX] = p_handles; - PoolVector<Color> colors; + Vector<Color> colors; { colors.resize(p_handles.size()); - PoolVector<Color>::Write w = colors.write(); + Color *w = colors.ptrw(); for (int i = 0; i < p_handles.size(); i++) { Color col(1, 1, 1, 1); @@ -410,8 +410,8 @@ void EditorSpatialGizmo::add_solid_box(Ref<Material> &p_material, Vector3 p_size cubem.set_size(p_size); Array arrays = cubem.surface_get_arrays(0); - PoolVector3Array vertex = arrays[VS::ARRAY_VERTEX]; - PoolVector3Array::Write w = vertex.write(); + PackedVector3Array vertex = arrays[VS::ARRAY_VERTEX]; + Vector3 *w = vertex.ptrw(); for (int i = 0; i < vertex.size(); ++i) { w[i] += p_position; @@ -1238,7 +1238,6 @@ CameraSpatialGizmoPlugin::CameraSpatialGizmoPlugin() { Color gizmo_color = EDITOR_DEF("editors/3d_gizmos/gizmo_colors/camera", Color(0.8, 0.4, 0.8)); create_material("camera_material", gizmo_color); - create_icon_material("camera_icon", SpatialEditor::get_singleton()->get_icon("GizmoCamera", "EditorIcons")); create_handle_material("handles"); } @@ -1350,7 +1349,6 @@ void CameraSpatialGizmoPlugin::redraw(EditorSpatialGizmo *p_gizmo) { Vector<Vector3> handles; Ref<Material> material = get_material("camera_material", p_gizmo); - Ref<Material> icon = get_material("camera_icon", p_gizmo); #define ADD_TRIANGLE(m_a, m_b, m_c) \ { \ @@ -1445,7 +1443,6 @@ void CameraSpatialGizmoPlugin::redraw(EditorSpatialGizmo *p_gizmo) { #undef ADD_QUAD p_gizmo->add_lines(lines, material); - p_gizmo->add_unscaled_billboard(icon, 0.05); p_gizmo->add_handles(handles, get_material("handles")); ClippedCamera *clipcam = Object::cast_to<ClippedCamera>(camera); @@ -1566,7 +1563,7 @@ Position3DSpatialGizmoPlugin::Position3DSpatialGizmoPlugin() { pos3d_mesh = Ref<ArrayMesh>(memnew(ArrayMesh)); cursor_points = Vector<Vector3>(); - PoolVector<Color> cursor_colors; + Vector<Color> cursor_colors; float cs = 0.25; cursor_points.push_back(Vector3(+cs, 0, 0)); cursor_points.push_back(Vector3(-cs, 0, 0)); @@ -3450,7 +3447,7 @@ void CollisionShapeSpatialGizmoPlugin::redraw(EditorSpatialGizmo *p_gizmo) { Vector<Vector3> points; - Vector3 d(0, 0, height * 0.5); + Vector3 d(0, height * 0.5, 0); for (int i = 0; i < 360; i++) { float ra = Math::deg2rad((float)i); @@ -3458,24 +3455,24 @@ void CollisionShapeSpatialGizmoPlugin::redraw(EditorSpatialGizmo *p_gizmo) { Point2 a = Vector2(Math::sin(ra), Math::cos(ra)) * radius; Point2 b = Vector2(Math::sin(rb), Math::cos(rb)) * radius; - points.push_back(Vector3(a.x, a.y, 0) + d); - points.push_back(Vector3(b.x, b.y, 0) + d); + points.push_back(Vector3(a.x, 0, a.y) + d); + points.push_back(Vector3(b.x, 0, b.y) + d); - points.push_back(Vector3(a.x, a.y, 0) - d); - points.push_back(Vector3(b.x, b.y, 0) - d); + points.push_back(Vector3(a.x, 0, a.y) - d); + points.push_back(Vector3(b.x, 0, b.y) - d); if (i % 90 == 0) { - points.push_back(Vector3(a.x, a.y, 0) + d); - points.push_back(Vector3(a.x, a.y, 0) - d); + points.push_back(Vector3(a.x, 0, a.y) + d); + points.push_back(Vector3(a.x, 0, a.y) - d); } Vector3 dud = i < 180 ? d : -d; - points.push_back(Vector3(0, a.y, a.x) + dud); - points.push_back(Vector3(0, b.y, b.x) + dud); - points.push_back(Vector3(a.y, 0, a.x) + dud); - points.push_back(Vector3(b.y, 0, b.x) + dud); + points.push_back(Vector3(0, a.x, a.y) + dud); + points.push_back(Vector3(0, b.x, b.y) + dud); + points.push_back(Vector3(a.y, a.x, 0) + dud); + points.push_back(Vector3(b.y, b.x, 0) + dud); } p_gizmo->add_lines(points, material); @@ -3489,31 +3486,31 @@ void CollisionShapeSpatialGizmoPlugin::redraw(EditorSpatialGizmo *p_gizmo) { Point2 a = Vector2(Math::sin(ra), Math::cos(ra)) * radius; Point2 b = Vector2(Math::sin(rb), Math::cos(rb)) * radius; - collision_segments.push_back(Vector3(a.x, a.y, 0) + d); - collision_segments.push_back(Vector3(b.x, b.y, 0) + d); + collision_segments.push_back(Vector3(a.x, 0, a.y) + d); + collision_segments.push_back(Vector3(b.x, 0, b.y) + d); - collision_segments.push_back(Vector3(a.x, a.y, 0) - d); - collision_segments.push_back(Vector3(b.x, b.y, 0) - d); + collision_segments.push_back(Vector3(a.x, 0, a.y) - d); + collision_segments.push_back(Vector3(b.x, 0, b.y) - d); if (i % 16 == 0) { - collision_segments.push_back(Vector3(a.x, a.y, 0) + d); - collision_segments.push_back(Vector3(a.x, a.y, 0) - d); + collision_segments.push_back(Vector3(a.x, 0, a.y) + d); + collision_segments.push_back(Vector3(a.x, 0, a.y) - d); } Vector3 dud = i < 32 ? d : -d; - collision_segments.push_back(Vector3(0, a.y, a.x) + dud); - collision_segments.push_back(Vector3(0, b.y, b.x) + dud); - collision_segments.push_back(Vector3(a.y, 0, a.x) + dud); - collision_segments.push_back(Vector3(b.y, 0, b.x) + dud); + collision_segments.push_back(Vector3(0, a.x, a.y) + dud); + collision_segments.push_back(Vector3(0, b.x, b.y) + dud); + collision_segments.push_back(Vector3(a.y, a.x, 0) + dud); + collision_segments.push_back(Vector3(b.y, b.x, 0) + dud); } p_gizmo->add_collision_segments(collision_segments); Vector<Vector3> handles; handles.push_back(Vector3(cs2->get_radius(), 0, 0)); - handles.push_back(Vector3(0, 0, cs2->get_height() * 0.5 + cs2->get_radius())); + handles.push_back(Vector3(0, cs2->get_height() * 0.5 + cs2->get_radius(), 0)); p_gizmo->add_handles(handles, handles_material); } @@ -3611,7 +3608,7 @@ void CollisionShapeSpatialGizmoPlugin::redraw(EditorSpatialGizmo *p_gizmo) { if (Object::cast_to<ConvexPolygonShape>(*s)) { - PoolVector<Vector3> points = Object::cast_to<ConvexPolygonShape>(*s)->get_points(); + Vector<Vector3> points = Object::cast_to<ConvexPolygonShape>(*s)->get_points(); if (points.size() > 3) { @@ -3748,8 +3745,8 @@ void NavigationMeshSpatialGizmoPlugin::redraw(EditorSpatialGizmo *p_gizmo) { if (navmeshie.is_null()) return; - PoolVector<Vector3> vertices = navmeshie->get_vertices(); - PoolVector<Vector3>::Read vr = vertices.read(); + Vector<Vector3> vertices = navmeshie->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); @@ -3768,11 +3765,11 @@ void NavigationMeshSpatialGizmoPlugin::redraw(EditorSpatialGizmo *p_gizmo) { return; Map<_EdgeKey, bool> edge_map; - PoolVector<Vector3> tmeshfaces; + Vector<Vector3> tmeshfaces; tmeshfaces.resize(faces.size() * 3); { - PoolVector<Vector3>::Write tw = tmeshfaces.write(); + Vector3 *tw = tmeshfaces.ptrw(); int tidx = 0; for (List<Face3>::Element *E = faces.front(); E; E = E->next()) { diff --git a/editor/translations/af.po b/editor/translations/af.po index 23917c09e6..eab0005cb1 100644 --- a/editor/translations/af.po +++ b/editor/translations/af.po @@ -711,8 +711,9 @@ msgid "Line Number:" msgstr "Reël Nommer:" #: editor/code_editor.cpp -msgid "Replaced %d occurrence(s)." -msgstr "Het %d verskynsel(s) vervang." +#, fuzzy +msgid "%d replaced." +msgstr "Vervang" #: editor/code_editor.cpp editor/editor_help.cpp msgid "%d match." @@ -4009,15 +4010,16 @@ msgid "Saving..." msgstr "" #: editor/import_dock.cpp -msgid "Set as Default for '%s'" -msgstr "" +#, fuzzy +msgid "%d Files" +msgstr "Vind" #: editor/import_dock.cpp -msgid "Clear Default for '%s'" +msgid "Set as Default for '%s'" msgstr "" #: editor/import_dock.cpp -msgid " Files" +msgid "Clear Default for '%s'" msgstr "" #: editor/import_dock.cpp @@ -5930,11 +5932,12 @@ msgid "Mesh is empty!" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Trimesh Body" -msgstr "" +#, fuzzy +msgid "Couldn't create a Trimesh collision shape." +msgstr "Kon nie vouer skep nie." #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Convex Body" +msgid "Create Static Trimesh Body" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -5946,12 +5949,30 @@ msgid "Create Trimesh Static Shape" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Failed creating shapes!" +msgid "Can't create a single convex collision shape for the scene root." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Couldn't create a single convex collision shape." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp #, fuzzy -msgid "Create Convex Shape(s)" +msgid "Create Single Convex Shape" +msgstr "Skep Nuwe" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Can't create multiple convex collision shapes for the scene root." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Couldn't create any collision shapes." +msgstr "Kon nie vouer skep nie." + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Multiple Convex Shapes" msgstr "Skep Nuwe" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -6003,19 +6024,57 @@ msgid "Create Trimesh Static Body" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a StaticBody and assigns a polygon-based collision shape to it " +"automatically.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Trimesh Collision Sibling" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp #, fuzzy -msgid "Create Convex Collision Sibling(s)" +msgid "Create Single Convex Collision Siblings" msgstr "Skep Intekening" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a single convex collision shape.\n" +"This is the fastest (but least accurate) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Multiple Convex Collision Siblings" +msgstr "Skep Intekening" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is a performance middle-ground between the two above options." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Outline Mesh..." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a static outline mesh. The outline mesh will have its normals " +"flipped automatically.\n" +"This can be used instead of the SpatialMaterial Grow property when using " +"that property isn't possible." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "View UV1" msgstr "" @@ -8480,7 +8539,7 @@ msgstr "" msgid "No VCS addons are available." msgstr "" -#: editor/plugins/version_control_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/version_control_editor_plugin.cpp msgid "Error" msgstr "" @@ -9594,11 +9653,18 @@ msgid "Export With Debug" msgstr "" #: editor/project_manager.cpp -msgid "The path does not exist." -msgstr "" +#, fuzzy +msgid "The path specified doesn't exist." +msgstr "Lêer bestaan nie." #: editor/project_manager.cpp -msgid "Invalid '.zip' project file, does not contain a 'project.godot' file." +#, fuzzy +msgid "Error opening package file (it's not in ZIP format)." +msgstr "Fout met oopmaak, die pakket-lêer is nie in zip format nie." + +#: editor/project_manager.cpp +msgid "" +"Invalid \".zip\" project file; it doesn't contain a \"project.godot\" file." msgstr "" #: editor/project_manager.cpp @@ -9606,11 +9672,11 @@ msgid "Please choose an empty folder." msgstr "" #: editor/project_manager.cpp -msgid "Please choose a 'project.godot' or '.zip' file." +msgid "Please choose a \"project.godot\" or \".zip\" file." msgstr "" #: editor/project_manager.cpp -msgid "Directory already contains a Godot project." +msgid "This directory already contains a Godot project." msgstr "" #: editor/project_manager.cpp @@ -10268,6 +10334,10 @@ msgid "Suffix" msgstr "" #: editor/rename_dialog.cpp +msgid "Use Regular Expressions" +msgstr "" + +#: editor/rename_dialog.cpp msgid "Advanced Options" msgstr "" @@ -10304,7 +10374,7 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -msgid "Per Level counter" +msgid "Per-level Counter" msgstr "" #: editor/rename_dialog.cpp @@ -10335,10 +10405,6 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -msgid "Regular Expressions" -msgstr "" - -#: editor/rename_dialog.cpp msgid "Post-Process" msgstr "" @@ -10347,11 +10413,11 @@ msgid "Keep" msgstr "" #: editor/rename_dialog.cpp -msgid "CamelCase to under_scored" +msgid "PascalCase to snake_case" msgstr "" #: editor/rename_dialog.cpp -msgid "under_scored to CamelCase" +msgid "snake_case to PascalCase" msgstr "" #: editor/rename_dialog.cpp @@ -10371,6 +10437,15 @@ msgstr "" msgid "Reset" msgstr "Herset Zoem" +#: editor/rename_dialog.cpp +msgid "Regular Expression Error" +msgstr "" + +#: editor/rename_dialog.cpp +#, fuzzy +msgid "At character %s" +msgstr "Geldige karakters:" + #: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp msgid "Reparent Node" msgstr "" @@ -10826,7 +10901,7 @@ msgid "Invalid inherited parent name or path." msgstr "" #: editor/script_create_dialog.cpp -msgid "Script is valid." +msgid "Script path/name is valid." msgstr "" #: editor/script_create_dialog.cpp @@ -10928,6 +11003,10 @@ msgid "Copy Error" msgstr "" #: editor/script_editor_debugger.cpp +msgid "Video RAM" +msgstr "" + +#: editor/script_editor_debugger.cpp #, fuzzy msgid "Skip Breakpoints" msgstr "Skep" @@ -10978,10 +11057,6 @@ msgid "Total:" msgstr "" #: editor/script_editor_debugger.cpp -msgid "Video Mem" -msgstr "" - -#: editor/script_editor_debugger.cpp msgid "Resource Path" msgstr "" @@ -12540,6 +12615,9 @@ msgstr "" msgid "Constants cannot be modified." msgstr "" +#~ msgid "Replaced %d occurrence(s)." +#~ msgstr "Het %d verskynsel(s) vervang." + #, fuzzy #~ msgid "" #~ "There are currently no tutorials for this class, you can [color=$color]" diff --git a/editor/translations/ar.po b/editor/translations/ar.po index 6a3dba2b43..c9520d2669 100644 --- a/editor/translations/ar.po +++ b/editor/translations/ar.po @@ -708,8 +708,9 @@ msgid "Line Number:" msgstr "رقم الخط:" #: editor/code_editor.cpp -msgid "Replaced %d occurrence(s)." -msgstr "Ø¥Ø³ØªØ¨ÙØ¯Ù„ %d ØØ§Ø¯Ø«Ø©(ØÙˆØ§Ø¯Ø«)." +#, fuzzy +msgid "%d replaced." +msgstr "إستبدال" #: editor/code_editor.cpp editor/editor_help.cpp msgid "%d match." @@ -4069,6 +4070,11 @@ msgid "Saving..." msgstr "جاري الØÙظ..." #: editor/import_dock.cpp +#, fuzzy +msgid "%d Files" +msgstr " Ù…Ù„ÙØ§Øª" + +#: editor/import_dock.cpp msgid "Set as Default for '%s'" msgstr "ØØ¯Ø¯ ÙƒØ¥ÙØªØ±Ø§Ø¶ÙŠ Ù…Ù† أجل '%s'" @@ -4077,10 +4083,6 @@ msgid "Clear Default for '%s'" msgstr "إخلاء Ø§Ù„Ø¥ÙØªØ±Ø§Ø¶ÙŠ Ù„Ù€ '%s'" #: editor/import_dock.cpp -msgid " Files" -msgstr " Ù…Ù„ÙØ§Øª" - -#: editor/import_dock.cpp msgid "Import As:" msgstr "إستيراد كـ:" @@ -6061,12 +6063,13 @@ msgid "Mesh is empty!" msgstr "الميش ÙØ§Ø±Øº!" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Trimesh Body" -msgstr "أنشئ جسم تراميش ثابت" +#, fuzzy +msgid "Couldn't create a Trimesh collision shape." +msgstr "إنشاء متصادم تراميش قريب" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Convex Body" -msgstr "أنشئ جسم Ù…ØØ¯Ø¨ ثابت" +msgid "Create Static Trimesh Body" +msgstr "أنشئ جسم تراميش ثابت" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "This doesn't work on scene root!" @@ -6078,12 +6081,30 @@ msgid "Create Trimesh Static Shape" msgstr "أنشئ شكل تراميش" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Failed creating shapes!" +msgid "Can't create a single convex collision shape for the scene root." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Couldn't create a single convex collision shape." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Single Convex Shape" +msgstr "أنشئ شكل Ù…ØØ¯Ø¨" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Can't create multiple convex collision shapes for the scene root." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp #, fuzzy -msgid "Create Convex Shape(s)" +msgid "Couldn't create any collision shapes." +msgstr "لا يمكن إنشاء المجلد." + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Multiple Convex Shapes" msgstr "أنشئ شكل Ù…ØØ¯Ø¨" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -6135,19 +6156,57 @@ msgid "Create Trimesh Static Body" msgstr "إنشاء جسم تراميش ثابت" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a StaticBody and assigns a polygon-based collision shape to it " +"automatically.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Trimesh Collision Sibling" msgstr "إنشاء متصادم تراميش قريب" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp #, fuzzy -msgid "Create Convex Collision Sibling(s)" +msgid "Create Single Convex Collision Siblings" msgstr "إنشاء متصادم Ù…ØØ¯Ø¨ قريب" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a single convex collision shape.\n" +"This is the fastest (but least accurate) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Multiple Convex Collision Siblings" +msgstr "إنشاء متصادم Ù…ØØ¯Ø¨ قريب" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is a performance middle-ground between the two above options." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Outline Mesh..." msgstr "إنشاء شبكة الخطوط العريضة ..." #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a static outline mesh. The outline mesh will have its normals " +"flipped automatically.\n" +"This can be used instead of the SpatialMaterial Grow property when using " +"that property isn't possible." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "View UV1" msgstr "أظهر UV1" @@ -8677,7 +8736,7 @@ msgstr "مجموعة البلاط" msgid "No VCS addons are available." msgstr "" -#: editor/plugins/version_control_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/version_control_editor_plugin.cpp msgid "Error" msgstr "" @@ -9812,11 +9871,18 @@ msgid "Export With Debug" msgstr "" #: editor/project_manager.cpp -msgid "The path does not exist." +#, fuzzy +msgid "The path specified doesn't exist." msgstr "هذا المسار غير موجود." #: editor/project_manager.cpp -msgid "Invalid '.zip' project file, does not contain a 'project.godot' file." +#, fuzzy +msgid "Error opening package file (it's not in ZIP format)." +msgstr "ØØ¯Ø« خطأ Ø¹Ù†Ø¯ÙØªØ Ù…Ù„Ù Ø§Ù„ØØ²Ù…Ø© بسبب أن المل٠ليس ÙÙŠ صيغة \"ZIP\"." + +#: editor/project_manager.cpp +msgid "" +"Invalid \".zip\" project file; it doesn't contain a \"project.godot\" file." msgstr "" #: editor/project_manager.cpp @@ -9824,11 +9890,11 @@ msgid "Please choose an empty folder." msgstr "" #: editor/project_manager.cpp -msgid "Please choose a 'project.godot' or '.zip' file." +msgid "Please choose a \"project.godot\" or \".zip\" file." msgstr "" #: editor/project_manager.cpp -msgid "Directory already contains a Godot project." +msgid "This directory already contains a Godot project." msgstr "" #: editor/project_manager.cpp @@ -10489,6 +10555,11 @@ msgstr "" #: editor/rename_dialog.cpp #, fuzzy +msgid "Use Regular Expressions" +msgstr "النسخة Ø§Ù„ØØ§Ù„ية:" + +#: editor/rename_dialog.cpp +#, fuzzy msgid "Advanced Options" msgstr "إعدادات الكبس" @@ -10527,7 +10598,7 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -msgid "Per Level counter" +msgid "Per-level Counter" msgstr "" #: editor/rename_dialog.cpp @@ -10558,10 +10629,6 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -msgid "Regular Expressions" -msgstr "" - -#: editor/rename_dialog.cpp msgid "Post-Process" msgstr "" @@ -10570,11 +10637,11 @@ msgid "Keep" msgstr "" #: editor/rename_dialog.cpp -msgid "CamelCase to under_scored" +msgid "PascalCase to snake_case" msgstr "" #: editor/rename_dialog.cpp -msgid "under_scored to CamelCase" +msgid "snake_case to PascalCase" msgstr "" #: editor/rename_dialog.cpp @@ -10594,6 +10661,15 @@ msgstr "" msgid "Reset" msgstr "إرجاع التكبير" +#: editor/rename_dialog.cpp +msgid "Regular Expression Error" +msgstr "" + +#: editor/rename_dialog.cpp +#, fuzzy +msgid "At character %s" +msgstr "Ø§Ù„Ø£ØØ±Ù Ø§Ù„ØµØ§Ù„ØØ©:" + #: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp msgid "Reparent Node" msgstr "" @@ -11062,7 +11138,7 @@ msgstr "" #: editor/script_create_dialog.cpp #, fuzzy -msgid "Script is valid." +msgid "Script path/name is valid." msgstr "شجرة Ø§Ù„ØØ±ÙƒØ© صØÙŠØØ©." #: editor/script_create_dialog.cpp @@ -11169,6 +11245,10 @@ msgid "Copy Error" msgstr "خطأ ÙÙŠ نسخ" #: editor/script_editor_debugger.cpp +msgid "Video RAM" +msgstr "" + +#: editor/script_editor_debugger.cpp #, fuzzy msgid "Skip Breakpoints" msgstr "Ù…Ø³Ø Ø§Ù„Ù†Ù‚Ø§Ø·" @@ -11219,10 +11299,6 @@ msgid "Total:" msgstr "" #: editor/script_editor_debugger.cpp -msgid "Video Mem" -msgstr "" - -#: editor/script_editor_debugger.cpp msgid "Resource Path" msgstr "" @@ -12806,6 +12882,12 @@ msgstr "يمكن تعيين المتغيرات Ùقط ÙÙŠ الذروة ." msgid "Constants cannot be modified." msgstr "لا يمكن تعديل الثوابت." +#~ msgid "Replaced %d occurrence(s)." +#~ msgstr "Ø¥Ø³ØªØ¨ÙØ¯Ù„ %d ØØ§Ø¯Ø«Ø©(ØÙˆØ§Ø¯Ø«)." + +#~ msgid "Create Static Convex Body" +#~ msgstr "أنشئ جسم Ù…ØØ¯Ø¨ ثابت" + #~ msgid "" #~ "There are currently no tutorials for this class, you can [color=$color]" #~ "[url=$url]contribute one[/url][/color] or [color=$color][url=" diff --git a/editor/translations/bg.po b/editor/translations/bg.po index a42e873790..2281de6a8e 100644 --- a/editor/translations/bg.po +++ b/editor/translations/bg.po @@ -4,7 +4,7 @@ # This file is distributed under the same license as the Godot source code. # Bojidar Marinov <bojidar.marinov.bg@gmail.com>, 2016. # Иван Пенев (Ðдмирал ÐнимЕ) <aeternus.arcis@gmail.com>, 2016-2017. -# Любомир ВаÑилев <lyubomirv@abv.bg>, 2018. +# Любомир ВаÑилев <lyubomirv@abv.bg>, 2018, 2020. # MaresPW <marespw206@gmail.com>, 2018. # PakoSt <kokotekilata@gmail.com>, 2018. # Damyan Dichev <mwshock2@gmail.com>, 2019. @@ -12,8 +12,8 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2019-02-13 07:10+0000\n" -"Last-Translator: Damyan Dichev <mwshock2@gmail.com>\n" +"PO-Revision-Date: 2020-02-14 03:19+0000\n" +"Last-Translator: Любомир ВаÑилев <lyubomirv@abv.bg>\n" "Language-Team: Bulgarian <https://hosted.weblate.org/projects/godot-engine/" "godot/bg/>\n" "Language: bg\n" @@ -21,24 +21,24 @@ 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 3.5-dev\n" +"X-Generator: Weblate 3.11-dev\n" #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/visual_script/visual_script_builtin_funcs.cpp msgid "Invalid type argument to convert(), use TYPE_* constants." msgstr "" -"Ðевалиден агрумент тип на convert(), използвайте конÑтантите започващи Ñ " +"Ðеправилен тип аргумент на convert(). Използвайте конÑтантите започващи Ñ " "TYPE_*." #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp msgid "Expected a string of length 1 (a character)." -msgstr "" +msgstr "Очаква Ñе низ Ñ Ð´ÑŠÐ»Ð¶Ð¸Ð½Ð° 1 (един знак)." #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: 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 "ÐедоÑтатъчно байтове за разкодиране или недейÑтвителен формат." +msgstr "ÐедоÑтатъчно байтове за разкодиране или неправилен формат." #: core/math/expression.cpp msgid "Invalid input %i (not passed) in expression" @@ -53,7 +53,6 @@ msgid "Invalid operands to operator %s, %s and %s." msgstr "Ðевалидни операнди към оператор %s, %s и %s." #: core/math/expression.cpp -#, fuzzy msgid "Invalid index of type %s for base type %s" msgstr "Ðевалиден Ð¸Ð½Ð´ÐµÐºÑ Ð¾Ñ‚ тип %s за базов тип %s" @@ -63,7 +62,7 @@ msgstr "" #: core/math/expression.cpp msgid "Invalid arguments to construct '%s'" -msgstr "Ðевалидени агрументи за конÑÑ‚Ñ€ÑƒÐºÑ†Ð¸Ñ '%s'" +msgstr "Ðеправилни аргументи за Ñъздаване на „%s“" #: core/math/expression.cpp msgid "On call to '%s':" @@ -98,27 +97,24 @@ msgid "EiB" msgstr "" #: editor/animation_bezier_editor.cpp -#, fuzzy msgid "Free" -msgstr "Свободен" +msgstr "Свободно" #: editor/animation_bezier_editor.cpp msgid "Balanced" msgstr "" #: editor/animation_bezier_editor.cpp -#, fuzzy msgid "Mirror" -msgstr "Отрази (огледално)" +msgstr "Огледално" #: editor/animation_bezier_editor.cpp editor/editor_profiler.cpp msgid "Time:" msgstr "" #: editor/animation_bezier_editor.cpp -#, fuzzy msgid "Value:" -msgstr "СтойноÑÑ‚" +msgstr "СтойноÑÑ‚:" #: editor/animation_bezier_editor.cpp msgid "Insert Key Here" @@ -137,9 +133,8 @@ msgid "Add Bezier Point" msgstr "" #: editor/animation_bezier_editor.cpp -#, fuzzy msgid "Move Bezier Points" -msgstr "LMB: ПремеÑти Точка." +msgstr "ПремеÑтване на точки на Безие" #: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp msgid "Anim Duplicate Keys" @@ -190,9 +185,8 @@ msgid "Anim Multi Change Call" msgstr "" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Change Animation Length" -msgstr "Промени Името на ÐнимациÑта:" +msgstr "ПромÑна на продължителноÑтта на анимациÑта" #: editor/animation_track_editor.cpp #: editor/plugins/sprite_frames_editor_plugin.cpp @@ -224,24 +218,20 @@ msgid "Animation Playback Track" msgstr "" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Animation length (frames)" -msgstr "Ðово Име на ÐнимациÑ:" +msgstr "ПродължителноÑÑ‚ на анимациÑта (в кадри)" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Animation length (seconds)" -msgstr "Промени Името на ÐнимациÑта:" +msgstr "ПродължителноÑÑ‚ на анимациÑта (в Ñекунди)" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Add Track" -msgstr "ДобавÑне на нови пътечки." +msgstr "ДобавÑне на пътечка" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Animation Looping" -msgstr "Изтриване на анимациÑта?" +msgstr "ПовтарÑне на анимациÑта" #: editor/animation_track_editor.cpp #: modules/visual_script/visual_script_editor.cpp @@ -277,14 +267,12 @@ msgid "Loop Wrap Mode (Interpolate end with beginning on loop)" msgstr "" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Remove this track." msgstr "Премахване на пътечката." #: editor/animation_track_editor.cpp -#, fuzzy msgid "Time (s): " -msgstr "Стъпка (Ñек.):" +msgstr "Време (Ñек): " #: editor/animation_track_editor.cpp msgid "Toggle Track Enabled" @@ -333,29 +321,24 @@ msgid "Insert Key" msgstr "" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Duplicate Key(s)" -msgstr "Ðаправи дупликат на Key(s)" +msgstr "Дублиране на ключа/ключовете" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Delete Key(s)" -msgstr "Изтрий Key(s)" +msgstr "Изтриване на ключа/ключовете" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Change Animation Update Mode" -msgstr "Промени Името на ÐнимациÑта:" +msgstr "ПромÑна на режима на обновÑване на анимациÑта" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Change Animation Interpolation Mode" -msgstr "Промени Името на ÐнимациÑта:" +msgstr "ПромÑна на режима на интерполиране на анимациÑта" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Change Animation Loop Mode" -msgstr "Промени Името на ÐнимациÑта:" +msgstr "ПромÑна на режима на повтарÑне на анимациÑта" #: editor/animation_track_editor.cpp msgid "Remove Anim Track" @@ -363,7 +346,7 @@ msgstr "" #: editor/animation_track_editor.cpp msgid "Create NEW track for %s and insert key?" -msgstr "" +msgstr "Създаване на ÐОВРпътечка за %s и вмъкване на ключ?" #: editor/animation_track_editor.cpp msgid "Create %d NEW tracks and insert keys?" @@ -402,14 +385,12 @@ msgid "Anim Insert Key" msgstr "" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Change Animation Step" -msgstr "Промени Името на ÐнимациÑта:" +msgstr "ПромÑна на Ñтъпката на анимациÑта" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Rearrange Tracks" -msgstr "ПоÑтавÑне на възелите" +msgstr "Пренареждане на пътечките" #: editor/animation_track_editor.cpp msgid "Transform tracks only apply to Spatial-based nodes." @@ -440,9 +421,8 @@ msgid "Invalid track for Bezier (no suitable sub-properties)" msgstr "" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Add Bezier Track" -msgstr "ДобавÑне на нови пътечки." +msgstr "ДобавÑне на нова пътечка на Безие" #: editor/animation_track_editor.cpp msgid "Track path is invalid, so can't add a key." @@ -457,18 +437,16 @@ msgid "Add Transform Track Key" msgstr "" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Add Track Key" -msgstr "ДобавÑне на нови пътечки." +msgstr "ДобавÑне на ключ за пътечката" #: editor/animation_track_editor.cpp msgid "Track path is invalid, so can't add a method key." msgstr "" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Add Method Track Key" -msgstr "ДобавÑне на нови пътечки." +msgstr "ДобавÑне на ключ за пътечка Ñ Ð¼ÐµÑ‚Ð¾Ð´" #: editor/animation_track_editor.cpp msgid "Method not found in object: " @@ -483,9 +461,8 @@ msgid "Clipboard is empty" msgstr "" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Paste Tracks" -msgstr "ПоÑтавÑне на възелите" +msgstr "ПоÑтавÑне на пътечки" #: editor/animation_track_editor.cpp msgid "Anim Scale Keys" @@ -526,14 +503,12 @@ msgid "Group tracks by node or display them as plain list." msgstr "" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Snap:" -msgstr "Стъпка (Ñек.):" +msgstr "Прилепване:" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Animation step value." -msgstr "Изтриване на анимациÑта?" +msgstr "СтойноÑÑ‚ за Ñтъпката на анимациÑта." #: editor/animation_track_editor.cpp msgid "Seconds" @@ -555,7 +530,7 @@ msgstr "" #: editor/animation_track_editor.cpp msgid "Animation properties." -msgstr "ХарактериÑтики на анимациÑта." +msgstr "СвойÑтва на анимациÑта." #: editor/animation_track_editor.cpp msgid "Copy Tracks" @@ -579,17 +554,15 @@ msgstr "" #: editor/animation_track_editor.cpp msgid "Delete Selection" -msgstr "Изтрий СелекциÑта" +msgstr "Изтриване на избраното" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Go to Next Step" -msgstr "Отиди на Следваща Стъпка" +msgstr "Преминаване към Ñледващата Ñтъпка" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Go to Previous Step" -msgstr "Отиди на Предишна Стъпка" +msgstr "Преминаване към предходната Ñтъпка" #: editor/animation_track_editor.cpp msgid "Optimize Animation" @@ -601,7 +574,7 @@ msgstr "ПочиÑтване на анимациÑта" #: editor/animation_track_editor.cpp msgid "Pick the node that will be animated:" -msgstr "Избери възелa, който да бъде анимиран:" +msgstr "Изберете възелa, който да бъде анимиран:" #: editor/animation_track_editor.cpp msgid "Use Bezier Curves" @@ -625,7 +598,7 @@ msgstr "" #: editor/animation_track_editor.cpp msgid "Optimize" -msgstr "Оптимизирай" +msgstr "Оптимизиране" #: editor/animation_track_editor.cpp msgid "Remove invalid keys" @@ -652,9 +625,8 @@ msgid "Scale Ratio:" msgstr "" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Select Tracks to Copy" -msgstr "Изберете ÑвойÑтво" +msgstr "Изберете пътечки за копиране" #: editor/animation_track_editor.cpp editor/editor_log.cpp #: editor/editor_properties.cpp @@ -666,9 +638,8 @@ msgid "Copy" msgstr "Копиране" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Select All/None" -msgstr "Избиране на вÑичко" +msgstr "Избиране на вÑичко/нищо" #: editor/animation_track_editor_plugins.cpp #, fuzzy @@ -697,25 +668,24 @@ msgstr "" #: editor/code_editor.cpp msgid "Go to Line" -msgstr "Отиди на Ред" +msgstr "Преминаване към ред" #: editor/code_editor.cpp msgid "Line Number:" -msgstr "Ðомер на Реда:" +msgstr "Ðомер на реда:" #: editor/code_editor.cpp #, fuzzy -msgid "Replaced %d occurrence(s)." -msgstr "Готово - %d замеÑтване(ниÑ)." +msgid "%d replaced." +msgstr "ЗамÑна..." #: editor/code_editor.cpp editor/editor_help.cpp msgid "%d match." msgstr "" #: editor/code_editor.cpp editor/editor_help.cpp -#, fuzzy msgid "%d matches." -msgstr "ÐÑма СъвпадениÑ" +msgstr "%d ÑъвпадениÑ." #: editor/code_editor.cpp editor/find_in_files.cpp msgid "Match Case" @@ -723,19 +693,19 @@ msgstr "" #: editor/code_editor.cpp editor/find_in_files.cpp msgid "Whole Words" -msgstr "Цели Думи" +msgstr "Цели думи" #: editor/code_editor.cpp editor/rename_dialog.cpp msgid "Replace" -msgstr "Преименувай" +msgstr "ЗамÑна" #: editor/code_editor.cpp msgid "Replace All" -msgstr "Преименувай Ð’Ñички" +msgstr "ЗамÑна на вÑички" #: editor/code_editor.cpp msgid "Selection Only" -msgstr "Само СелекциÑта" +msgstr "Само избраното" #: editor/code_editor.cpp editor/plugins/script_text_editor.cpp #: editor/plugins/text_editor.cpp @@ -743,21 +713,20 @@ msgid "Standard" msgstr "" #: editor/code_editor.cpp editor/plugins/script_editor_plugin.cpp -#, fuzzy msgid "Toggle Scripts Panel" -msgstr "ВидимоÑÑ‚ на Панела ÑÑŠÑ Ð¡ÐºÑ€Ð¸Ð¿Ñ‚Ð¾Ð²Ðµ" +msgstr "Превключване на панела за Ñкриптове" #: editor/code_editor.cpp editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/texture_region_editor_plugin.cpp #: editor/plugins/tile_set_editor_plugin.cpp scene/gui/graph_edit.cpp msgid "Zoom In" -msgstr "Приближи" +msgstr "Приближаване" #: editor/code_editor.cpp editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/texture_region_editor_plugin.cpp #: editor/plugins/tile_set_editor_plugin.cpp scene/gui/graph_edit.cpp msgid "Zoom Out" -msgstr "Отдалечи" +msgstr "Отдалечаване" #: editor/code_editor.cpp msgid "Reset Zoom" @@ -782,30 +751,26 @@ msgid "" msgstr "" #: editor/connections_dialog.cpp -#, fuzzy msgid "Connect to Node:" -msgstr "ИзрÑзване на възелите" +msgstr "Свързване към възел:" #: editor/connections_dialog.cpp -#, fuzzy msgid "Connect to Script:" -msgstr "Свържи Сигнала: " +msgstr "Свързване към Ñкрипт:" #: editor/connections_dialog.cpp -#, fuzzy msgid "From Signal:" -msgstr "Свържи Сигнала: " +msgstr "От Ñигнал:" #: editor/connections_dialog.cpp -#, fuzzy msgid "Scene does not contain any script." -msgstr "Възелът не Ñъдържа геометриÑ." +msgstr "Сцената не Ñъдържа Ñкриптове." #: editor/connections_dialog.cpp editor/editor_autoload_settings.cpp #: editor/groups_editor.cpp 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/editor_feature_profile.cpp editor/groups_editor.cpp @@ -816,7 +781,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:" @@ -827,9 +792,8 @@ msgid "Extra Call Arguments:" msgstr "" #: editor/connections_dialog.cpp -#, fuzzy msgid "Receiver Method:" -msgstr "Изберете метод" +msgstr "Метод-получател:" #: editor/connections_dialog.cpp msgid "Advanced" @@ -853,9 +817,8 @@ msgid "Disconnects the signal after its first emission." msgstr "" #: editor/connections_dialog.cpp -#, fuzzy msgid "Cannot connect signal" -msgstr "Свържи Сигнала: " +msgstr "Сигналът не може да бъде Ñвързан" #: editor/connections_dialog.cpp editor/dependency_editor.cpp #: editor/export_template_manager.cpp editor/groups_editor.cpp @@ -874,43 +837,40 @@ msgstr "ЗатварÑне" #: editor/connections_dialog.cpp msgid "Connect" -msgstr "Свържи" +msgstr "Свързване" #: editor/connections_dialog.cpp -#, fuzzy msgid "Signal:" -msgstr "ÐаÑтройки на редактора" +msgstr "Сигнал:" #: editor/connections_dialog.cpp msgid "Connect '%s' to '%s'" -msgstr "Свържи '%s' Ñ '%s'" +msgstr "Свързване на „%s“ Ñ â€ž%s“" #: editor/connections_dialog.cpp msgid "Disconnect '%s' from '%s'" -msgstr "Разкачи '%s' от '%s'" +msgstr "Разкачване на „%s“ от „%s“" #: editor/connections_dialog.cpp msgid "Disconnect all from signal: '%s'" -msgstr "Разкачи вÑички Ñигнали: '%s'" +msgstr "Разкачване на вÑички от Ñигнала: „%s“" #: editor/connections_dialog.cpp msgid "Connect..." -msgstr "Свържи..." +msgstr "Свързване…" #: editor/connections_dialog.cpp #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Disconnect" -msgstr "Разкачи" +msgstr "Разкачване" #: editor/connections_dialog.cpp -#, fuzzy msgid "Connect a Signal to a Method" -msgstr "Свържи Сигнала: " +msgstr "Свързване на Ñигнала към метод" #: editor/connections_dialog.cpp -#, fuzzy msgid "Edit Connection:" -msgstr "Промени Връзката: " +msgstr "Редактиране на Връзката:" #: editor/connections_dialog.cpp msgid "Are you sure you want to remove all connections from the \"%s\" signal?" @@ -926,17 +886,15 @@ msgstr "" #: editor/connections_dialog.cpp msgid "Disconnect All" -msgstr "Разкачи Ð’Ñички" +msgstr "Разкачване на вÑички" #: editor/connections_dialog.cpp -#, fuzzy msgid "Edit..." -msgstr "ИзнаÑÑне..." +msgstr "Редактиране..." #: editor/connections_dialog.cpp -#, fuzzy msgid "Go To Method" -msgstr "Методи" +msgstr "Преминаване към метода" #: editor/create_dialog.cpp msgid "Change %s Type" @@ -948,7 +906,7 @@ msgstr "" #: editor/create_dialog.cpp msgid "Create New %s" -msgstr "Създайте нов/а %s" +msgstr "Създаване на %s" #: editor/create_dialog.cpp editor/editor_file_dialog.cpp #: editor/filesystem_dock.cpp @@ -957,7 +915,7 @@ msgstr "Любими:" #: editor/create_dialog.cpp editor/editor_file_dialog.cpp msgid "Recent:" -msgstr "Скорошни:" +msgstr "ПоÑледни:" #: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp #: editor/property_selector.cpp editor/quick_open.cpp @@ -969,7 +927,7 @@ msgstr "ТърÑене:" #: editor/property_selector.cpp editor/quick_open.cpp #: modules/visual_script/visual_script_property_selector.cpp msgid "Matches:" -msgstr "Съвпадащи:" +msgstr "СъвпадениÑ:" #: editor/create_dialog.cpp editor/editor_plugin_settings.cpp #: editor/plugin_config_dialog.cpp @@ -1037,16 +995,16 @@ msgstr "" #: modules/visual_script/visual_script_property_selector.cpp #: scene/gui/file_dialog.cpp msgid "Open" -msgstr "Отвори" +msgstr "ОтварÑне" #: editor/dependency_editor.cpp msgid "Owners Of:" msgstr "" #: editor/dependency_editor.cpp -#, fuzzy msgid "Remove selected files from the project? (Can't be restored)" -msgstr "Премахни Ñелектираните файлове от проекта? (необратимо)" +msgstr "" +"Да Ñе премахнат ли избраните файлове от проекта? (ДейÑтвието е необратимо)" #: editor/dependency_editor.cpp msgid "" @@ -1064,13 +1022,12 @@ msgid "Error loading:" msgstr "Грешка при зареждане:" #: editor/dependency_editor.cpp -#, fuzzy msgid "Load failed due to missing dependencies:" -msgstr "Сцената не уÑÐ¿Ñ Ð´Ð° Ñе зареди заради липÑващи завиÑимоÑти:" +msgstr "Зареждането беше неуÑпешно заради липÑващи завиÑимоÑти:" #: editor/dependency_editor.cpp editor/editor_node.cpp msgid "Open Anyway" -msgstr "Отвори Въпреки това" +msgstr "ОтварÑне въпреки това" #: editor/dependency_editor.cpp msgid "Which action should be taken?" @@ -1078,7 +1035,7 @@ msgstr "Кое дейÑтвие да Ñе изпълни?" #: editor/dependency_editor.cpp msgid "Fix Dependencies" -msgstr "Поправи ЗавиÑимоÑтите" +msgstr "ПоправÑне на завиÑимоÑтите" #: editor/dependency_editor.cpp msgid "Errors loading!" @@ -1089,9 +1046,8 @@ msgid "Permanently delete %d item(s)? (No undo!)" msgstr "" #: editor/dependency_editor.cpp -#, fuzzy msgid "Show Dependencies" -msgstr "ЗавиÑимоÑти" +msgstr "Показване на завиÑимоÑтите" #: editor/dependency_editor.cpp msgid "Orphan Resource Explorer" @@ -1103,7 +1059,7 @@ msgstr "" #: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_export.cpp #: editor/project_settings_editor.cpp editor/scene_tree_dock.cpp msgid "Delete" -msgstr "Изтрий" +msgstr "Изтриване" #: editor/dependency_editor.cpp msgid "Owns" @@ -1123,7 +1079,7 @@ msgstr "" #: editor/editor_about.cpp msgid "Thanks from the Godot community!" -msgstr "БлагодарÑ! От общноÑтта на Godot!" +msgstr "БлагодарноÑти от общноÑтта на Godot!" #: editor/editor_about.cpp msgid "Godot Engine contributors" @@ -1134,9 +1090,8 @@ msgid "Project Founders" msgstr "ОÑнователи на проекта" #: editor/editor_about.cpp -#, fuzzy msgid "Lead Developer" -msgstr "Главен Разработчик" +msgstr "Главен разработчик" #: editor/editor_about.cpp msgid "Project Manager " @@ -1211,22 +1166,20 @@ msgid "Error opening package file, not in ZIP format." msgstr "" #: editor/editor_asset_installer.cpp -#, fuzzy msgid "%s (Already Exists)" -msgstr "Група Ñ Ñ‚Ð¾Ð²Ð° име вече ÑъщеÑтвува." +msgstr "%s (Вече ÑъщеÑтвува)" #: editor/editor_asset_installer.cpp msgid "Uncompressing Assets" -msgstr "Разархивиране на активи" +msgstr "Разархивиране на реÑурÑите" #: editor/editor_asset_installer.cpp editor/project_manager.cpp msgid "The following files failed extraction from package:" msgstr "" #: editor/editor_asset_installer.cpp -#, fuzzy msgid "And %s more files." -msgstr "ÐеуÑпешно Ñъздаване на папка." +msgstr "И още %s файл(а)." #: editor/editor_asset_installer.cpp editor/project_manager.cpp msgid "Package installed successfully!" @@ -1238,9 +1191,8 @@ msgid "Success!" msgstr "Готово!" #: editor/editor_asset_installer.cpp -#, fuzzy msgid "Package Contents:" -msgstr "Съдържание:" +msgstr "Съдържание на пакета:" #: editor/editor_asset_installer.cpp editor/editor_node.cpp msgid "Install" @@ -1341,7 +1293,7 @@ msgstr "" #: editor/editor_audio_buses.cpp msgid "Delete Audio Bus" -msgstr "Изтриване звуковата шина" +msgstr "Изтриване на звуковата шина" #: editor/editor_audio_buses.cpp msgid "Duplicate Audio Bus" @@ -1380,9 +1332,8 @@ msgid "Invalid file, not an audio bus layout." msgstr "" #: editor/editor_audio_buses.cpp -#, fuzzy msgid "Error saving file: %s" -msgstr "Грешка при запиÑването на файла!" +msgstr "Грешка при запазването на файла: %s" #: editor/editor_audio_buses.cpp msgid "Add Bus" @@ -1475,18 +1426,16 @@ msgid "Rearrange Autoloads" msgstr "" #: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp -#, fuzzy msgid "Invalid path." -msgstr "невалидно име на Група." +msgstr "Ðеправилен път." #: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp msgid "File does not exist." msgstr "" #: editor/editor_autoload_settings.cpp -#, fuzzy msgid "Not in resource path." -msgstr "Обектът не е базиран на реÑурÑен файл" +msgstr "Ðе е в Ð¿ÑŠÑ‚Ñ Ð½Ð° реÑурÑите." #: editor/editor_autoload_settings.cpp msgid "Add AutoLoad" @@ -1534,13 +1483,12 @@ msgid "[unsaved]" msgstr "" #: editor/editor_dir_dialog.cpp -#, fuzzy msgid "Please select a base directory first." -msgstr "МолÑ, първо изберете оÑновна папка" +msgstr "МолÑ, първо изберете оÑновна папка." #: editor/editor_dir_dialog.cpp msgid "Choose a Directory" -msgstr "Избери ДиректориÑ" +msgstr "Изберете папка" #: editor/editor_dir_dialog.cpp editor/editor_file_dialog.cpp #: editor/filesystem_dock.cpp editor/project_manager.cpp @@ -1558,11 +1506,11 @@ msgstr "Име:" #: editor/editor_dir_dialog.cpp editor/editor_file_dialog.cpp #: editor/filesystem_dock.cpp scene/gui/file_dialog.cpp msgid "Could not create folder." -msgstr "ÐеуÑпешно Ñъздаване на папка." +msgstr "Папката не може да бъде Ñъздадена." #: editor/editor_dir_dialog.cpp msgid "Choose" -msgstr "Избери" +msgstr "Избиране" #: editor/editor_export.cpp msgid "Storing File:" @@ -1617,34 +1565,28 @@ msgid "On 32-bit exports the embedded PCK cannot be bigger than 4 GiB." msgstr "" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "3D Editor" -msgstr "Ðова Ñцена" +msgstr "3-измерен редактор" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Script Editor" -msgstr "Отвори Кодов Редактор" +msgstr "Редактор на Ñкриптове" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Asset Library" -msgstr "ОтварÑне на библиотеката" +msgstr "Библиотека Ñ Ñ€ÐµÑурÑи" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Scene Tree Editing" -msgstr "ÐаÑтройки за пуÑкане на Ñцена" +msgstr "Редактиране на дървото на Ñцената" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Import Dock" -msgstr "ВнаÑÑне" +msgstr "Панел за внаÑÑне" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Node Dock" -msgstr "Режим на ПремеÑтване" +msgstr "Панел за възлите" #: editor/editor_feature_profile.cpp msgid "FileSystem and Import Docks" @@ -1659,46 +1601,40 @@ msgid "Profile must be a valid filename and must not contain '.'" msgstr "" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Profile with this name already exists." -msgstr "Вече ÑъщеÑтвува файл или папка Ñ Ñ‚Ð¾Ð²Ð° име." +msgstr "Вече ÑъщеÑтвува профил Ñ Ñ‚Ð¾Ð²Ð° име." #: editor/editor_feature_profile.cpp msgid "(Editor Disabled, Properties Disabled)" msgstr "" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "(Properties Disabled)" -msgstr "Изберете ÑвойÑтво" +msgstr "(СвойÑтвата Ñа заключени)" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "(Editor Disabled)" -msgstr "Изключено" +msgstr "(Редакторът е заключен)" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Class Options:" -msgstr "ОпиÑание:" +msgstr "ÐаÑтройки на клаÑа:" #: editor/editor_feature_profile.cpp msgid "Enable Contextual Editor" msgstr "" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Enabled Properties:" -msgstr "ПоÑтавÑне на възелите" +msgstr "Включени ÑвойÑтва:" #: editor/editor_feature_profile.cpp msgid "Enabled Features:" msgstr "" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Enabled Classes:" -msgstr "ТърÑи КлаÑове" +msgstr "Включени клаÑове:" #: editor/editor_feature_profile.cpp msgid "File '%s' format is invalid, import aborted." @@ -1711,18 +1647,16 @@ msgid "" msgstr "" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Error saving profile to path: '%s'." -msgstr "Грешка при зареждането на шрифта." +msgstr "Грешка при запазването на профила в: „%s“." #: editor/editor_feature_profile.cpp msgid "Unset" msgstr "" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Current Profile:" -msgstr "Избиране на текущата папка" +msgstr "Текущ профил:" #: editor/editor_feature_profile.cpp msgid "Make Current" @@ -1744,38 +1678,32 @@ msgid "Export" msgstr "ИзнаÑÑне" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Available Profiles:" -msgstr "ПоÑтавÑне на възелите" +msgstr "Ðалични профили:" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Class Options" -msgstr "ОпиÑание" +msgstr "ÐаÑтройки на клаÑа" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "New profile name:" -msgstr "Ðово име:" +msgstr "Ðово име на профила:" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Erase Profile" -msgstr "Изтрий точки." +msgstr "Изтриване на профила" #: editor/editor_feature_profile.cpp msgid "Godot Feature Profile" msgstr "" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Import Profile(s)" -msgstr "ВнеÑен проект" +msgstr "ВнаÑÑне на профил(и)" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Export Profile" -msgstr "ИзнаÑÑне на проекта" +msgstr "ИзнаÑÑне на профила" #: editor/editor_feature_profile.cpp msgid "Manage Editor Feature Profiles" @@ -1790,24 +1718,21 @@ msgid "File Exists, Overwrite?" msgstr "Файлът ÑъщеÑтвува. ИÑкате ли да го презапишете?" #: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp -#, fuzzy msgid "Select This Folder" -msgstr "Изберете метод" +msgstr "Избиране на тази папка" #: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp msgid "Copy Path" msgstr "" #: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp -#, fuzzy msgid "Open in File Manager" -msgstr "ДиÑпечер на проектите" +msgstr "ОтварÑне във Ñ„Ð°Ð¹Ð»Ð¾Ð²Ð¸Ñ Ð¼ÐµÐ½Ð¸Ð´Ð¶ÑŠÑ€" #: editor/editor_file_dialog.cpp editor/editor_node.cpp #: editor/filesystem_dock.cpp editor/project_manager.cpp -#, fuzzy msgid "Show in File Manager" -msgstr "Покажи във Файлов Мениджър" +msgstr "Показване във Ñ„Ð°Ð¹Ð»Ð¾Ð²Ð¸Ñ Ð¼ÐµÐ½Ð¸Ð´Ð¶ÑŠÑ€" #: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp msgid "New Folder..." @@ -1820,27 +1745,27 @@ msgstr "" #: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp msgid "All Recognized" -msgstr "Ð’Ñички Разпознати" +msgstr "Ð’Ñички разпознати" #: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp msgid "All Files (*)" -msgstr "Ð’Ñички Файлове (*)" +msgstr "Ð’Ñички файлове (*)" #: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp msgid "Open a File" -msgstr "Отвори Файл" +msgstr "ОтварÑне на файл" #: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp msgid "Open File(s)" -msgstr "Отвори Файл(ове)" +msgstr "ОтварÑне на файл(ове)" #: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp msgid "Open a Directory" -msgstr "Отвори ДиректориÑ" +msgstr "ОтварÑне на папка" #: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp msgid "Open a File or Directory" -msgstr "Отвори Файл или ДиректориÑ" +msgstr "ОтварÑне на файл или папка" #: editor/editor_file_dialog.cpp editor/editor_node.cpp #: editor/editor_properties.cpp editor/inspector_dock.cpp @@ -1867,11 +1792,11 @@ msgstr "" #: editor/editor_file_dialog.cpp msgid "Toggle Hidden Files" -msgstr "Покажи Скрити Файлове" +msgstr "Превключване на Ñкритите файлове" #: editor/editor_file_dialog.cpp msgid "Toggle Favorite" -msgstr "Покажи Любими" +msgstr "Превключване на любимите" #: editor/editor_file_dialog.cpp msgid "Toggle Mode" @@ -1890,34 +1815,28 @@ msgid "Move Favorite Down" msgstr "" #: editor/editor_file_dialog.cpp -#, fuzzy msgid "Go to previous folder." -msgstr "Към горната папка" +msgstr "Преминаване към горната папка." #: editor/editor_file_dialog.cpp -#, fuzzy msgid "Go to next folder." -msgstr "Към горната папка" +msgstr "Преминаване към горната папка." #: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp -#, fuzzy msgid "Go to parent folder." -msgstr "Към горната папка" +msgstr "Преминаване към горната папка." #: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp -#, fuzzy msgid "Refresh files." -msgstr "ТърÑене" +msgstr "ОпреÑнÑване на файловете." #: editor/editor_file_dialog.cpp -#, fuzzy msgid "(Un)favorite current folder." -msgstr "ÐеуÑпешно Ñъздаване на папка." +msgstr "ДобавÑне/премахване на текущата папка в любимите." #: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp -#, fuzzy msgid "Toggle the visibility of hidden files." -msgstr "Покажи Скрити Файлове" +msgstr "Превключване на видимоÑтта на Ñкритите файлове." #: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp msgid "View items as a grid of thumbnails." @@ -1957,7 +1876,7 @@ msgstr "" #: editor/editor_file_system.cpp msgid "(Re)Importing Assets" -msgstr "Извършва Ñе повторно внаÑÑне" +msgstr "(Повторно) внаÑÑне на реÑурÑите" #: editor/editor_help.cpp editor/plugins/spatial_editor_plugin.cpp msgid "Top" @@ -1977,9 +1896,8 @@ msgid "Inherited by:" msgstr "" #: editor/editor_help.cpp -#, fuzzy msgid "Description" -msgstr "ОпиÑание:" +msgstr "ОпиÑание" #: editor/editor_help.cpp msgid "Online Tutorials" @@ -2002,9 +1920,8 @@ msgid "Methods" msgstr "Методи" #: editor/editor_help.cpp -#, fuzzy msgid "Theme Properties" -msgstr "ПоÑтавÑне на възелите" +msgstr "СвойÑтва на темата" #: editor/editor_help.cpp msgid "Enumerations" @@ -2015,14 +1932,12 @@ msgid "Constants" msgstr "КонÑтанти" #: editor/editor_help.cpp -#, fuzzy msgid "Property Descriptions" -msgstr "Кратко ОпиÑание:" +msgstr "ОпиÑÐ°Ð½Ð¸Ñ Ð½Ð° ÑвойÑтвата" #: editor/editor_help.cpp -#, fuzzy msgid "(value)" -msgstr "СтойноÑÑ‚" +msgstr "(ÑтойноÑÑ‚)" #: editor/editor_help.cpp msgid "" @@ -2031,9 +1946,8 @@ msgid "" msgstr "" #: editor/editor_help.cpp -#, fuzzy msgid "Method Descriptions" -msgstr "ОпиÑание" +msgstr "ОпиÑÐ°Ð½Ð¸Ñ Ð½Ð° методите" #: editor/editor_help.cpp msgid "" @@ -2044,84 +1958,71 @@ msgstr "" #: editor/editor_help_search.cpp editor/editor_node.cpp #: editor/plugins/script_editor_plugin.cpp msgid "Search Help" -msgstr "ТърÑи в Помощ" +msgstr "ТърÑене в помощната информациÑ" #: editor/editor_help_search.cpp -#, fuzzy msgid "Case Sensitive" -msgstr "ЗатварÑне на Ñцената" +msgstr "ЧувÑтвителноÑÑ‚ към региÑтъра" #: editor/editor_help_search.cpp -#, fuzzy msgid "Show Hierarchy" -msgstr "ТърÑене" +msgstr "Показване на йерархиÑта" #: editor/editor_help_search.cpp -#, fuzzy msgid "Display All" -msgstr "Преименувай Ð’Ñички" +msgstr "Показване на вÑичко" #: editor/editor_help_search.cpp msgid "Classes Only" msgstr "" #: editor/editor_help_search.cpp -#, fuzzy msgid "Methods Only" -msgstr "Методи" +msgstr "Само методи" #: editor/editor_help_search.cpp -#, fuzzy msgid "Signals Only" -msgstr "Само СелекциÑта" +msgstr "Само Ñигнали" #: editor/editor_help_search.cpp -#, fuzzy msgid "Constants Only" -msgstr "КонÑтанти" +msgstr "Само конÑтанти" #: editor/editor_help_search.cpp -#, fuzzy msgid "Properties Only" -msgstr "Изберете ÑвойÑтво" +msgstr "Само ÑвойÑтва" #: editor/editor_help_search.cpp -#, fuzzy msgid "Theme Properties Only" -msgstr "Изберете ÑвойÑтво" +msgstr "Само ÑвойÑтва на теми" #: editor/editor_help_search.cpp msgid "Member Type" msgstr "" #: editor/editor_help_search.cpp -#, fuzzy msgid "Class" -msgstr "КлаÑ:" +msgstr "КлаÑ" #: editor/editor_help_search.cpp -#, fuzzy msgid "Method" -msgstr "Методи" +msgstr "Метод" #: editor/editor_help_search.cpp editor/plugins/script_text_editor.cpp -#, fuzzy msgid "Signal" -msgstr "ÐаÑтройки на редактора" +msgstr "Сигнал" #: editor/editor_help_search.cpp editor/plugins/theme_editor_plugin.cpp msgid "Constant" -msgstr "ПоÑтоÑнно" +msgstr "КонÑтанта" #: editor/editor_help_search.cpp -#, fuzzy msgid "Property" -msgstr "Изберете ÑвойÑтво" +msgstr "СвойÑтво" #: editor/editor_help_search.cpp -#, fuzzy msgid "Theme Property" -msgstr "ПоÑтавÑне на възелите" +msgstr "СвойÑтво на тема" #: editor/editor_inspector.cpp editor/project_settings_editor.cpp msgid "Property:" @@ -2140,9 +2041,8 @@ msgid "Output:" msgstr "" #: editor/editor_log.cpp editor/plugins/tile_map_editor_plugin.cpp -#, fuzzy msgid "Copy Selection" -msgstr "Ðова Ñцена" +msgstr "Копиране на избраното" #: editor/editor_log.cpp editor/editor_network_profiler.cpp #: editor/editor_profiler.cpp editor/editor_properties.cpp @@ -2155,9 +2055,8 @@ msgid "Clear" msgstr "ИзчиÑтване" #: editor/editor_log.cpp -#, fuzzy msgid "Clear Output" -msgstr "Ðова Ñцена" +msgstr "ИзчиÑтване на изхода" #: editor/editor_network_profiler.cpp editor/editor_node.cpp #: editor/editor_profiler.cpp @@ -2174,9 +2073,8 @@ msgid "%s/s" msgstr "" #: editor/editor_network_profiler.cpp -#, fuzzy msgid "Down" -msgstr "ПремеÑти Ðадоло" +msgstr "Ðадолу" #: editor/editor_network_profiler.cpp msgid "Up" @@ -2231,11 +2129,11 @@ msgstr "" #: editor/editor_node.cpp msgid "Can't open file for writing:" -msgstr "Файлът не може да бъде отворен за запиÑване:" +msgstr "Файлът не може да бъде отворен за запиÑ:" #: editor/editor_node.cpp msgid "Requested file format unknown:" -msgstr "Форматът на Ð¸Ð·Ð±Ñ€Ð°Ð½Ð¸Ñ Ñ„Ð°Ð¹Ð» е неразпознат:" +msgstr "Форматът на Ð¸Ð·Ð±Ñ€Ð°Ð½Ð¸Ñ Ñ„Ð°Ð¹Ð» е непознат:" #: editor/editor_node.cpp msgid "Error while saving." @@ -2251,7 +2149,7 @@ msgstr "Грешка при анализа на „%s“." #: editor/editor_node.cpp msgid "Unexpected end of file '%s'." -msgstr "Ðеочакван край на файла '%s'." +msgstr "Ðеочакван край на файла „%s“." #: editor/editor_node.cpp msgid "Missing '%s' or its dependencies." @@ -2267,7 +2165,7 @@ msgstr "Запазване на Ñцената" #: editor/editor_node.cpp msgid "Analyzing" -msgstr "Ðнализира Ñе" +msgstr "Ðнализиране" #: editor/editor_node.cpp msgid "Creating Thumbnail" @@ -2366,7 +2264,7 @@ msgstr "" #: editor/editor_node.cpp msgid "Current scene was never saved, please save it prior to running." msgstr "" -"Сегашната Ñцена никога не е била запазена, молÑ, запазете Ñ Ð¿Ñ€ÐµÐ´Ð¸ изпълнение." +"Текущата Ñцена никога не е била запазена. МолÑ, запазете Ñ Ð¿Ñ€ÐµÐ´Ð¸ изпълнение." #: editor/editor_node.cpp msgid "Could not start subprocess!" @@ -2381,9 +2279,8 @@ msgid "Open Base Scene" msgstr "" #: editor/editor_node.cpp -#, fuzzy msgid "Quick Open..." -msgstr "Бързо отварÑне на Ñцена..." +msgstr "Бързо отварÑне..." #: editor/editor_node.cpp msgid "Quick Open Scene..." @@ -2402,9 +2299,8 @@ msgid "Save changes to '%s' before closing?" msgstr "" #: editor/editor_node.cpp -#, fuzzy msgid "Saved %s modified resource(s)." -msgstr "ÐеуÑпешно зареждане на реÑурÑите." +msgstr "%s променени реÑурÑа бÑха запазени." #: editor/editor_node.cpp msgid "A root node is required to save the scene." @@ -2424,7 +2320,7 @@ msgstr "" #: editor/editor_node.cpp msgid "This scene has never been saved. Save before running?" -msgstr "Тази Ñцена не е била запазвана преди. Запази преди да пуÑнеш?" +msgstr "Тази Ñцена не е била запазвана преди. Запазване преди изпълнението?" #: editor/editor_node.cpp editor/scene_tree_dock.cpp msgid "This operation can't be done without a scene." @@ -2448,11 +2344,11 @@ msgstr "" #: editor/editor_node.cpp msgid "Current scene not saved. Open anyway?" -msgstr "Текущата Ñцена не е запазена. Отвори въпреки това?" +msgstr "Текущата Ñцена не е запазена. ОтварÑне въпреки това?" #: editor/editor_node.cpp msgid "Can't reload a scene that was never saved." -msgstr "Сцена, коÑто никога не е била запазвана, не може да Ñе презареди." +msgstr "Сцена, коÑто никога не е била запазвана, не може да бъде презаредена." #: editor/editor_node.cpp msgid "Revert" @@ -2475,9 +2371,8 @@ msgid "Exit the editor?" msgstr "" #: editor/editor_node.cpp -#, fuzzy msgid "Open Project Manager?" -msgstr "ДиÑпечер на проектите" +msgstr "Да Ñе отвори ли мениджърът на проекти?" #: editor/editor_node.cpp msgid "Save & Quit" @@ -2506,9 +2401,8 @@ msgid "Close Scene" msgstr "ЗатварÑне на Ñцената" #: editor/editor_node.cpp -#, fuzzy msgid "Reopen Closed Scene" -msgstr "ЗатварÑне на Ñцената" +msgstr "Повторно отварÑне на затворена Ñцена" #: editor/editor_node.cpp msgid "Unable to enable addon plugin at: '%s' parsing of config failed." @@ -2519,9 +2413,8 @@ msgid "Unable to find script field for addon plugin at: 'res://addons/%s'." msgstr "" #: editor/editor_node.cpp -#, fuzzy msgid "Unable to load addon script from path: '%s'." -msgstr "Грешка при зареждането на шрифта." +msgstr "Ðе може да Ñе зареди Ñкриптът на добавка от: „%s“." #: editor/editor_node.cpp msgid "" @@ -2552,12 +2445,11 @@ msgstr "" #: editor/editor_node.cpp msgid "Scene '%s' has broken dependencies:" -msgstr "Сцената '%s' има нарушени завиÑимоÑти:" +msgstr "Сцената „%s“ има нарушени завиÑимоÑти:" #: editor/editor_node.cpp -#, fuzzy msgid "Clear Recent Scenes" -msgstr "ЗатварÑне на Ñцената" +msgstr "ИзчиÑтване на поÑледните Ñцени" #: editor/editor_node.cpp msgid "" @@ -2595,24 +2487,20 @@ msgstr "" #: editor/editor_node.cpp editor/editor_properties.cpp #: editor/plugins/script_editor_plugin.cpp editor/property_editor.cpp -#, fuzzy msgid "Show in FileSystem" -msgstr "Покажи във Файлова СиÑтема" +msgstr "Показване във файловата ÑиÑтема" #: editor/editor_node.cpp -#, fuzzy msgid "Play This Scene" -msgstr "Възпроизвеждане на Ñцената" +msgstr "ПуÑкане на Ñцената" #: editor/editor_node.cpp -#, fuzzy msgid "Close Tab" -msgstr "ЗатварÑне" +msgstr "ЗатварÑне на раздела" #: editor/editor_node.cpp -#, fuzzy msgid "Undo Close Tab" -msgstr "ЗатварÑне" +msgstr "ОтмÑна на затварÑнето на раздела" #: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp msgid "Close Other Tabs" @@ -2623,9 +2511,8 @@ msgid "Close Tabs to the Right" msgstr "" #: editor/editor_node.cpp -#, fuzzy msgid "Close All Tabs" -msgstr "ЗатварÑне на вÑичко" +msgstr "ЗатварÑне на вÑички раздели" #: editor/editor_node.cpp msgid "Switch Scene Tab" @@ -2636,9 +2523,8 @@ msgid "%d more files or folders" msgstr "" #: editor/editor_node.cpp -#, fuzzy msgid "%d more folders" -msgstr "ÐеуÑпешно Ñъздаване на папка." +msgstr "Още %d папки" #: editor/editor_node.cpp msgid "%d more files" @@ -2657,9 +2543,8 @@ msgid "Toggle distraction-free mode." msgstr "" #: editor/editor_node.cpp -#, fuzzy msgid "Add a new scene." -msgstr "ДобавÑне на нови пътечки." +msgstr "ДобавÑне на нови нова Ñцена." #: editor/editor_node.cpp msgid "Scene" @@ -2670,17 +2555,16 @@ msgid "Go to previously opened scene." msgstr "" #: editor/editor_node.cpp -#, fuzzy msgid "Copy Text" -msgstr "Копиране" +msgstr "Копиране на текÑта" #: editor/editor_node.cpp msgid "Next tab" -msgstr "Следващ подпрозорец" +msgstr "Следващ раздел" #: editor/editor_node.cpp msgid "Previous tab" -msgstr "Предишен подпрозорец" +msgstr "Предишен раздел" #: editor/editor_node.cpp msgid "Filter Files..." @@ -2711,7 +2595,6 @@ msgid "Save Scene" msgstr "Запазване на Ñцената" #: editor/editor_node.cpp -#, fuzzy msgid "Save All Scenes" msgstr "Запазване на вÑички Ñцени" @@ -2751,14 +2634,12 @@ msgid "Project" msgstr "Проект" #: editor/editor_node.cpp -#, fuzzy msgid "Project Settings..." -msgstr "ÐаÑтройки на проекта" +msgstr "ÐаÑтройки на проекта..." #: editor/editor_node.cpp editor/plugins/version_control_editor_plugin.cpp -#, fuzzy msgid "Version Control" -msgstr "ВерÑиÑ:" +msgstr "Контрол на верÑиите" #: editor/editor_node.cpp editor/plugins/version_control_editor_plugin.cpp msgid "Set Up Version Control" @@ -2769,22 +2650,20 @@ msgid "Shut Down Version Control" msgstr "" #: editor/editor_node.cpp -#, fuzzy msgid "Export..." -msgstr "ИзнаÑÑне" +msgstr "ИзнаÑÑне..." #: editor/editor_node.cpp msgid "Install Android Build Template..." msgstr "" #: editor/editor_node.cpp -#, fuzzy msgid "Open Project Data Folder" -msgstr "ДиÑпечер на проектите" +msgstr "ОтварÑне на папката Ñ Ð´Ð°Ð½Ð½Ð¸ на проекта" #: editor/editor_node.cpp editor/plugins/tile_set_editor_plugin.cpp msgid "Tools" -msgstr "Сечива" +msgstr "ИнÑтрументи" #: editor/editor_node.cpp msgid "Orphan Resource Explorer..." @@ -2792,12 +2671,12 @@ msgstr "" #: editor/editor_node.cpp msgid "Quit to Project List" -msgstr "Изход до ÑпиÑъка Ñ Ð¿Ñ€Ð¾ÐµÐºÑ‚Ð¸" +msgstr "Изход към ÑпиÑъка Ñ Ð¿Ñ€Ð¾ÐµÐºÑ‚Ð¸" #: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp #: editor/project_export.cpp msgid "Debug" -msgstr "ОтÑтранÑване на грешки" +msgstr "Дебъгване" #: editor/editor_node.cpp msgid "Deploy with Remote Debug" @@ -2872,55 +2751,48 @@ msgid "Editor" msgstr "" #: editor/editor_node.cpp -#, fuzzy msgid "Editor Settings..." -msgstr "ÐаÑтройки на редактора" +msgstr "ÐаÑтройки на редактора..." #: editor/editor_node.cpp msgid "Editor Layout" msgstr "" #: editor/editor_node.cpp -#, fuzzy msgid "Take Screenshot" -msgstr "Запазване на Ñцената" +msgstr "ЗаÑнемане на екрана" #: editor/editor_node.cpp -#, fuzzy msgid "Screenshots are stored in the Editor Data/Settings Folder." -msgstr "ÐаÑтройки на редактора" +msgstr "Снимките на екрана Ñе пазÑÑ‚ в папката Ñ Ð´Ð°Ð½Ð½Ð¸/наÑтройки на редактора." #: editor/editor_node.cpp msgid "Toggle Fullscreen" msgstr "" #: editor/editor_node.cpp -#, fuzzy msgid "Toggle System Console" -msgstr "Покажи Любими" +msgstr "Превключване на ÑиÑтемната конзола" #: editor/editor_node.cpp -#, fuzzy msgid "Open Editor Data/Settings Folder" -msgstr "ÐаÑтройки на редактора" +msgstr "ОтварÑне на папката Ñ Ð´Ð°Ð½Ð½Ð¸/наÑтройки на редактора" #: editor/editor_node.cpp msgid "Open Editor Data Folder" msgstr "" #: editor/editor_node.cpp -#, fuzzy msgid "Open Editor Settings Folder" -msgstr "ÐаÑтройки на редактора" +msgstr "ОтварÑне на папката Ñ Ð½Ð°Ñтройки на редактора" #: editor/editor_node.cpp msgid "Manage Editor Features..." msgstr "" #: editor/editor_node.cpp -#, fuzzy msgid "Manage Export Templates..." -msgstr "Шаблони" +msgstr "Управление на шаблоните за изнаÑÑне..." #: editor/editor_node.cpp editor/plugins/shader_editor_plugin.cpp msgid "Help" @@ -2958,7 +2830,7 @@ msgstr "ОтноÑно" #: editor/editor_node.cpp msgid "Play the project." -msgstr "Възпроизвеждане на проекта." +msgstr "ПуÑкане на проекта." #: editor/editor_node.cpp msgid "Play" @@ -2970,7 +2842,7 @@ msgstr "" #: editor/editor_node.cpp msgid "Pause Scene" -msgstr "ПреуÑтановÑване на Ñцената" +msgstr "Спиране на Ñцената на пауза" #: editor/editor_node.cpp msgid "Stop the scene." @@ -2978,19 +2850,19 @@ msgstr "Спиране на Ñцената." #: editor/editor_node.cpp msgid "Play the edited scene." -msgstr "Възпроизвеждане на редактирана Ñцена." +msgstr "ПуÑкане на редактираната Ñцена." #: editor/editor_node.cpp msgid "Play Scene" -msgstr "Възпроизвеждане на Ñцената" +msgstr "ПуÑкане на Ñцената" #: editor/editor_node.cpp msgid "Play custom scene" -msgstr "Възпроизвеждане на Ñцена по избор" +msgstr "ПуÑкане на перÑонализирана Ñцена" #: editor/editor_node.cpp msgid "Play Custom Scene" -msgstr "Възпроизвеждане на Ñцена по избор" +msgstr "ПуÑкане на перÑонализирана Ñцена" #: editor/editor_node.cpp msgid "Changing the video driver requires restarting the editor." @@ -2998,9 +2870,8 @@ msgstr "" #: editor/editor_node.cpp editor/project_settings_editor.cpp #: editor/settings_config_dialog.cpp -#, fuzzy msgid "Save & Restart" -msgstr "Запазване и повторно внаÑÑне" +msgstr "Запазване и реÑтартиране" #: editor/editor_node.cpp msgid "Spins when the editor window redraws." @@ -3028,7 +2899,7 @@ msgstr "ИнÑпектор" #: editor/editor_node.cpp msgid "Expand Bottom Panel" -msgstr "Разшири Ð”Ð¾Ð»Ð½Ð¸Ñ ÐŸÐ°Ð½ÐµÐ»" +msgstr "РазширÑване на Ð´Ð¾Ð»Ð½Ð¸Ñ Ð¿Ð°Ð½ÐµÐ»" #: editor/editor_node.cpp msgid "Output" @@ -3036,16 +2907,15 @@ msgstr "" #: editor/editor_node.cpp msgid "Don't Save" -msgstr "Ðе Запазвай" +msgstr "Без запазване" #: editor/editor_node.cpp msgid "Android build template is missing, please install relevant templates." msgstr "" #: editor/editor_node.cpp -#, fuzzy msgid "Manage Templates" -msgstr "Шаблони" +msgstr "Управление на шаблоните" #: editor/editor_node.cpp msgid "" @@ -3071,9 +2941,8 @@ msgid "Import Templates From ZIP File" msgstr "ВнаÑÑне на шаблони от архив във формат ZIP" #: editor/editor_node.cpp -#, fuzzy msgid "Template Package" -msgstr "Шаблони" +msgstr "Пакет Ñ ÑˆÐ°Ð±Ð»Ð¾Ð½Ð¸" #: editor/editor_node.cpp msgid "Export Library" @@ -3110,11 +2979,11 @@ msgstr "" #: editor/editor_node.cpp msgid "Open Script Editor" -msgstr "Отвори Кодов Редактор" +msgstr "ОтварÑне на редактора на Ñкриптове" #: editor/editor_node.cpp editor/project_manager.cpp msgid "Open Asset Library" -msgstr "ОтварÑне на библиотеката" +msgstr "ОтварÑне на библиотеката Ñ Ñ€ÐµÑурÑите" #: editor/editor_node.cpp msgid "Open the next Editor" @@ -3125,9 +2994,8 @@ msgid "Open the previous Editor" msgstr "" #: editor/editor_node.h -#, fuzzy msgid "Warning!" -msgstr "ПредупреждениÑ:" +msgstr "Внимание!" #: editor/editor_path.cpp msgid "No sub-resources found." @@ -3142,14 +3010,12 @@ msgid "Thumbnail..." msgstr "" #: editor/editor_plugin_settings.cpp -#, fuzzy msgid "Main Script:" -msgstr "Ðова Ñцена" +msgstr "ОÑновен Ñкрипт:" #: editor/editor_plugin_settings.cpp -#, fuzzy msgid "Edit Plugin" -msgstr "ПриÑтавки" +msgstr "Редактиране на приÑтавката" #: editor/editor_plugin_settings.cpp msgid "Installed Plugins:" @@ -3217,9 +3083,8 @@ msgid "Calls" msgstr "" #: editor/editor_properties.cpp -#, fuzzy msgid "Edit Text:" -msgstr "Файл:" +msgstr "Редактиране на текÑта:" #: editor/editor_properties.cpp editor/script_create_dialog.cpp msgid "On" @@ -3274,9 +3139,8 @@ msgid "New Script" msgstr "Ðов Ñкрипт" #: editor/editor_properties.cpp editor/scene_tree_dock.cpp -#, fuzzy msgid "Extend Script" -msgstr "Ðова Ñцена" +msgstr "РазширÑване на Ñкрипта" #: editor/editor_properties.cpp editor/property_editor.cpp msgid "New %s" @@ -3326,9 +3190,8 @@ msgid "New Key:" msgstr "" #: editor/editor_properties_array_dict.cpp -#, fuzzy msgid "New Value:" -msgstr "СтойноÑÑ‚" +msgstr "Ðова ÑтойноÑÑ‚:" #: editor/editor_properties_array_dict.cpp msgid "Add Key/Value Pair" @@ -3381,18 +3244,16 @@ msgid "Import From Node:" msgstr "" #: editor/export_template_manager.cpp -#, fuzzy msgid "Redownload" -msgstr "Презареди" +msgstr "Повторно ÑвалÑне" #: editor/export_template_manager.cpp msgid "Uninstall" msgstr "" #: editor/export_template_manager.cpp -#, fuzzy msgid "(Installed)" -msgstr "ИнÑталирани приÑтавки:" +msgstr "(ИнÑталирано)" #: editor/export_template_manager.cpp #: editor/plugins/asset_library_editor_plugin.cpp @@ -3432,9 +3293,8 @@ msgid "No version.txt found inside templates." msgstr "" #: editor/export_template_manager.cpp -#, fuzzy msgid "Error creating path for templates:" -msgstr "Имаше грешка при изнаÑÑне на проекта!" +msgstr "Грешка при Ñъздаването на път за шаблоните:" #: editor/export_template_manager.cpp msgid "Extracting Export Templates" @@ -3445,9 +3305,8 @@ msgid "Importing:" msgstr "ВнаÑÑне:" #: editor/export_template_manager.cpp -#, fuzzy msgid "Error getting the list of mirrors." -msgstr "Имаше грешка при изнаÑÑне на проекта!" +msgstr "Грешка при получаването на ÑпиÑъка от огледални меÑтоположениÑ." #: editor/export_template_manager.cpp msgid "Error parsing JSON of mirror list. Please report this issue!" @@ -3475,9 +3334,8 @@ msgid "No response." msgstr "" #: editor/export_template_manager.cpp -#, fuzzy msgid "Request Failed." -msgstr "Запитване..." +msgstr "ЗаÑвката беше неуÑпешна." #: editor/export_template_manager.cpp msgid "Redirect Loop." @@ -3493,9 +3351,8 @@ msgid "Download Complete." msgstr "" #: editor/export_template_manager.cpp -#, fuzzy msgid "Cannot remove temporary file:" -msgstr "Ðе може да Ñе премахне:" +msgstr "ВременниÑÑ‚ файл не може да бъде премахнат:" #: editor/export_template_manager.cpp msgid "" @@ -3504,14 +3361,12 @@ msgid "" msgstr "" #: editor/export_template_manager.cpp -#, fuzzy msgid "Error requesting URL:" -msgstr "Имаше грешка при внаÑÑнето:" +msgstr "Грешка при заÑвката за адреÑ:" #: editor/export_template_manager.cpp -#, fuzzy msgid "Connecting to Mirror..." -msgstr "Свързване..." +msgstr "Свързване Ñ Ð¾Ð³Ð»ÐµÐ´Ð°Ð»Ð½Ð¾Ñ‚Ð¾ меÑтоположение..." #: editor/export_template_manager.cpp msgid "Disconnected" @@ -3531,14 +3386,12 @@ msgid "Connecting..." msgstr "Свързване..." #: editor/export_template_manager.cpp -#, fuzzy msgid "Can't Connect" -msgstr "Създаване на нов проект" +msgstr "Ðе може да Ñе уÑтанови връзка" #: editor/export_template_manager.cpp -#, fuzzy msgid "Connected" -msgstr "ИзрÑзване на възелите" +msgstr "Свързан" #: editor/export_template_manager.cpp #: editor/plugins/asset_library_editor_plugin.cpp @@ -3550,27 +3403,24 @@ msgid "Downloading" msgstr "ИзтеглÑне" #: editor/export_template_manager.cpp -#, fuzzy msgid "Connection Error" -msgstr "Свързване..." +msgstr "Грешка във връзката" #: editor/export_template_manager.cpp msgid "SSL Handshake Error" msgstr "" #: editor/export_template_manager.cpp -#, fuzzy msgid "Uncompressing Android Build Sources" -msgstr "Разархивиране на активи" +msgstr "Разархивиране на Ð¸Ð·Ñ…Ð¾Ð´Ð½Ð¸Ñ ÐºÐ¾Ð´ на компилациÑта за Ðндроид" #: editor/export_template_manager.cpp msgid "Current Version:" msgstr "" #: editor/export_template_manager.cpp -#, fuzzy msgid "Installed Versions:" -msgstr "ИнÑталирани приÑтавки:" +msgstr "ИнÑталирани верÑии:" #: editor/export_template_manager.cpp msgid "Install From File" @@ -3581,32 +3431,28 @@ msgid "Remove Template" msgstr "" #: editor/export_template_manager.cpp -#, fuzzy msgid "Select Template File" -msgstr "Избиране на вÑичко" +msgstr "Избор на шаблонен файл" #: editor/export_template_manager.cpp -#, fuzzy msgid "Godot Export Templates" -msgstr "Шаблони" +msgstr "Шаблони за изнаÑÑне на Godot" #: editor/export_template_manager.cpp msgid "Export Template Manager" msgstr "" #: editor/export_template_manager.cpp -#, fuzzy msgid "Download Templates" -msgstr "Шаблони" +msgstr "СвалÑне на шаблони" #: editor/export_template_manager.cpp msgid "Select mirror from list: (Shift+Click: Open in Browser)" msgstr "" #: editor/filesystem_dock.cpp -#, fuzzy msgid "Favorites" -msgstr "Любими:" +msgstr "Любими" #: editor/filesystem_dock.cpp msgid "Status: Import of file failed. Please fix file and reimport manually." @@ -3621,19 +3467,16 @@ msgid "Cannot move a folder into itself." msgstr "" #: editor/filesystem_dock.cpp -#, fuzzy msgid "Error moving:" -msgstr "Имаше грешка при внаÑÑнето:" +msgstr "Грешка при премеÑтването:" #: editor/filesystem_dock.cpp -#, fuzzy msgid "Error duplicating:" -msgstr "Имаше грешка при внаÑÑнето:" +msgstr "Грешка при дублирането:" #: editor/filesystem_dock.cpp -#, fuzzy msgid "Unable to update dependencies:" -msgstr "Сцената '%s' има нарушени завиÑимоÑти:" +msgstr "ЗавиÑимоÑтите не могат да бъдат обновени:" #: editor/filesystem_dock.cpp editor/scene_tree_editor.cpp msgid "No name provided." @@ -3652,18 +3495,16 @@ msgid "Name contains invalid characters." msgstr "" #: editor/filesystem_dock.cpp -#, fuzzy msgid "Renaming file:" -msgstr "Имаше грешка при внаÑÑнето:" +msgstr "Преименуване на файла:" #: editor/filesystem_dock.cpp msgid "Renaming folder:" msgstr "" #: editor/filesystem_dock.cpp -#, fuzzy msgid "Duplicating file:" -msgstr "Имаше грешка при внаÑÑнето:" +msgstr "Дублиране на файла:" #: editor/filesystem_dock.cpp msgid "Duplicating folder:" @@ -3675,28 +3516,24 @@ msgid "New Inherited Scene" msgstr "Ðов Ñкрипт" #: editor/filesystem_dock.cpp -#, fuzzy msgid "Set As Main Scene" -msgstr "Изберете главна Ñцена" +msgstr "Задаване като главна Ñцена" #: editor/filesystem_dock.cpp -#, fuzzy msgid "Open Scenes" -msgstr "ОтварÑне на Ñцена" +msgstr "ОтварÑне на Ñцените" #: editor/filesystem_dock.cpp msgid "Instance" msgstr "" #: editor/filesystem_dock.cpp -#, fuzzy msgid "Add to Favorites" -msgstr "Любими:" +msgstr "ДобавÑне в любимите" #: editor/filesystem_dock.cpp -#, fuzzy msgid "Remove from Favorites" -msgstr "Премахни Ð’Ñички Breakpoint-ове" +msgstr "Премахване от любимите" #: editor/filesystem_dock.cpp msgid "Edit Dependencies..." @@ -3719,19 +3556,16 @@ msgid "Move To..." msgstr "" #: editor/filesystem_dock.cpp -#, fuzzy msgid "New Scene..." -msgstr "Ðова Ñцена" +msgstr "Ðова Ñцена..." #: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp -#, fuzzy msgid "New Script..." -msgstr "Ðов Ñкрипт" +msgstr "Ðов Ñкрипт..." #: editor/filesystem_dock.cpp -#, fuzzy msgid "New Resource..." -msgstr "Ðова папка..." +msgstr "Ðов реÑурÑ..." #: editor/filesystem_dock.cpp editor/plugins/visual_shader_editor_plugin.cpp #: editor/script_editor_debugger.cpp @@ -3740,9 +3574,8 @@ msgstr "" #: editor/filesystem_dock.cpp editor/plugins/visual_shader_editor_plugin.cpp #: editor/script_editor_debugger.cpp -#, fuzzy msgid "Collapse All" -msgstr "ЗатварÑне на вÑичко" +msgstr "Свиване на вÑичко" #: editor/filesystem_dock.cpp #: editor/plugins/animation_tree_player_editor_plugin.cpp @@ -3752,28 +3585,24 @@ msgid "Rename" msgstr "" #: editor/filesystem_dock.cpp -#, fuzzy msgid "Previous Folder/File" -msgstr "Предишен подпрозорец" +msgstr "Предишна папка/файл" #: editor/filesystem_dock.cpp -#, fuzzy msgid "Next Folder/File" -msgstr "Създаване на папка" +msgstr "Следваща папка/файл" #: editor/filesystem_dock.cpp msgid "Re-Scan Filesystem" msgstr "" #: editor/filesystem_dock.cpp -#, fuzzy msgid "Toggle Split Mode" -msgstr "Покажи Любими" +msgstr "Превключване на Ñ€Ð°Ð·Ð´ÐµÐ»ÐµÐ½Ð¸Ñ Ñ€ÐµÐ¶Ð¸Ð¼" #: editor/filesystem_dock.cpp -#, fuzzy msgid "Search files" -msgstr "ТърÑене" +msgstr "ТърÑене на файлове" #: editor/filesystem_dock.cpp msgid "" @@ -3794,33 +3623,28 @@ msgid "Overwrite" msgstr "" #: editor/filesystem_dock.cpp -#, fuzzy msgid "Create Scene" -msgstr "Запазване на Ñцената" +msgstr "Създаване на Ñцена" #: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp msgid "Create Script" msgstr "" #: editor/find_in_files.cpp editor/plugins/script_editor_plugin.cpp -#, fuzzy msgid "Find in Files" -msgstr "Ðамери във файлове" +msgstr "ТърÑене във файловете" #: editor/find_in_files.cpp -#, fuzzy msgid "Find:" -msgstr "Ðамери: " +msgstr "ТърÑене:" #: editor/find_in_files.cpp -#, fuzzy msgid "Folder:" -msgstr "Папка: " +msgstr "Папка:" #: editor/find_in_files.cpp -#, fuzzy msgid "Filters:" -msgstr "ПоÑтавÑне на възелите" +msgstr "Филтри:" #: editor/find_in_files.cpp msgid "" @@ -3831,11 +3655,11 @@ msgstr "" #: editor/find_in_files.cpp editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp msgid "Find..." -msgstr "Ðамери..." +msgstr "ТърÑене..." #: editor/find_in_files.cpp editor/plugins/script_text_editor.cpp msgid "Replace..." -msgstr "ЗамеÑти..." +msgstr "ЗамÑна..." #: editor/find_in_files.cpp editor/progress_dialog.cpp scene/gui/dialogs.cpp msgid "Cancel" @@ -3843,20 +3667,19 @@ msgstr "Отказ" #: editor/find_in_files.cpp msgid "Find: " -msgstr "Ðамери: " +msgstr "ТърÑене: " #: editor/find_in_files.cpp msgid "Replace: " -msgstr "ЗамеÑти: " +msgstr "ЗамÑна: " #: editor/find_in_files.cpp msgid "Replace all (no undo)" msgstr "" #: editor/find_in_files.cpp -#, fuzzy msgid "Searching..." -msgstr "ТърÑене" +msgstr "ТърÑене..." #: editor/find_in_files.cpp msgid "Search complete" @@ -3871,24 +3694,20 @@ msgid "Remove from Group" msgstr "" #: editor/groups_editor.cpp -#, fuzzy msgid "Group name already exists." -msgstr "Група Ñ Ñ‚Ð¾Ð²Ð° име вече ÑъщеÑтвува." +msgstr "Вече ÑъщеÑтвува група Ñ Ñ‚Ð¾Ð²Ð° име." #: editor/groups_editor.cpp -#, fuzzy msgid "Invalid group name." -msgstr "невалидно име на Група." +msgstr "Ðеправилно име на група." #: editor/groups_editor.cpp -#, fuzzy msgid "Rename Group" -msgstr "Ðов проект" +msgstr "Преименуване на групата" #: editor/groups_editor.cpp -#, fuzzy msgid "Delete Group" -msgstr "Избиране на вÑичко" +msgstr "Изтриване на групата" #: editor/groups_editor.cpp editor/node_dock.cpp msgid "Groups" @@ -3900,9 +3719,8 @@ msgstr "" #: editor/groups_editor.cpp editor/scene_tree_dock.cpp #: editor/scene_tree_editor.cpp -#, fuzzy msgid "Filter nodes" -msgstr "ПоÑтавÑне на възелите" +msgstr "Филтриране на възлите" #: editor/groups_editor.cpp msgid "Nodes in Group" @@ -3913,63 +3731,52 @@ msgid "Empty groups will be automatically removed." msgstr "" #: editor/groups_editor.cpp -#, fuzzy msgid "Group Editor" -msgstr "Отвори Кодов Редактор" +msgstr "Редактор на групи" #: editor/groups_editor.cpp msgid "Manage Groups" msgstr "" #: editor/import/resource_importer_scene.cpp -#, fuzzy msgid "Import as Single Scene" -msgstr "ВнаÑÑне на Ñцената..." +msgstr "ВнаÑÑне като ÑамоÑтоÑтелна Ñцена" #: editor/import/resource_importer_scene.cpp -#, fuzzy msgid "Import with Separate Animations" -msgstr "ВнеÑи Ñ Ðнимации поотделно" +msgstr "ВнаÑÑне Ñ Ð¾Ñ‚Ð´ÐµÐ»ÐµÐ½Ð¸ анимации" #: editor/import/resource_importer_scene.cpp -#, fuzzy msgid "Import with Separate Materials" -msgstr "ВнеÑи Ñ ÐœÐ°Ñ‚ÐµÑ€Ð¸Ð°Ð»Ð¸Ñ‚Ðµ поотделно" +msgstr "ВнаÑÑне Ñ Ð¾Ñ‚Ð´ÐµÐ»ÐµÐ½Ð¸ материали" #: editor/import/resource_importer_scene.cpp -#, fuzzy msgid "Import with Separate Objects" -msgstr "ВнеÑи Ñ ÐžÐ±ÐµÐºÑ‚Ð¸Ñ‚Ðµ поотделно" +msgstr "ВнаÑÑне Ñ Ð¾Ñ‚Ð´ÐµÐ»ÐµÐ½Ð¸ обекти" #: editor/import/resource_importer_scene.cpp -#, fuzzy msgid "Import with Separate Objects+Materials" -msgstr "ВнеÑи Ñ ÐžÐ±ÐµÐºÑ‚Ð¸Ñ‚Ðµ и Материалите поотделно" +msgstr "ВнаÑÑне Ñ Ð¾Ñ‚Ð´ÐµÐ»ÐµÐ½Ð¸ обекти и материали" #: editor/import/resource_importer_scene.cpp -#, fuzzy msgid "Import with Separate Objects+Animations" -msgstr "ВнеÑи Ñ ÐžÐ±ÐµÐºÑ‚Ð¸Ñ‚Ðµ и Ðнимациите поотделно" +msgstr "ВнаÑÑне Ñ Ð¾Ñ‚Ð´ÐµÐ»ÐµÐ½Ð¸ обекти и анимации" #: editor/import/resource_importer_scene.cpp -#, fuzzy msgid "Import with Separate Materials+Animations" -msgstr "ВнеÑи Ñ ÐœÐ°Ñ‚ÐµÑ€Ð¸Ð°Ð»Ð¸Ñ‚Ðµ и Ðнимациите поотделно" +msgstr "ВнаÑÑне Ñ Ð¾Ñ‚Ð´ÐµÐ»ÐµÐ½Ð¸ материали и анимации" #: editor/import/resource_importer_scene.cpp -#, fuzzy msgid "Import with Separate Objects+Materials+Animations" -msgstr "ВнеÑи Ñ ÐžÐ±ÐµÐºÑ‚Ð¸Ñ‚Ðµ, Материалите и Ðнимациите поотделно" +msgstr "ВнаÑÑне Ñ Ð¾Ñ‚Ð´ÐµÐ»ÐµÐ½Ð¸ обекти, материали и анимации" #: editor/import/resource_importer_scene.cpp -#, fuzzy msgid "Import as Multiple Scenes" -msgstr "ВнеÑи като ÐÑколко Сцени" +msgstr "ВнаÑÑне като нÑколко Ñцени" #: editor/import/resource_importer_scene.cpp -#, fuzzy msgid "Import as Multiple Scenes+Materials" -msgstr "ВнеÑи като ÐÑколко Сцени и Материали" +msgstr "ВнаÑÑне като нÑколко Ñцени и материали" #: editor/import/resource_importer_scene.cpp #: editor/plugins/mesh_library_editor_plugin.cpp @@ -4009,19 +3816,16 @@ msgid "Saving..." msgstr "Запазване..." #: editor/import_dock.cpp -#, fuzzy -msgid "Set as Default for '%s'" -msgstr "Задай по Подразбиране за '%s'" +msgid "%d Files" +msgstr "%d Файлове" #: editor/import_dock.cpp -#, fuzzy -msgid "Clear Default for '%s'" -msgstr "ИзчиÑти по Подразбиране за '%s'" +msgid "Set as Default for '%s'" +msgstr "Задаване по подразбиране за „%s“" #: editor/import_dock.cpp -#, fuzzy -msgid " Files" -msgstr "Файл:" +msgid "Clear Default for '%s'" +msgstr "ИзчиÑтване на подразбирането за „%s“" #: editor/import_dock.cpp msgid "Import As:" @@ -4049,23 +3853,21 @@ msgid "" msgstr "" #: editor/inspector_dock.cpp -#, fuzzy msgid "Failed to load resource." -msgstr "ÐеуÑпешно зареждане на реÑурÑите." +msgstr "РеÑурÑÑŠÑ‚ не може да бъде зареден." #: editor/inspector_dock.cpp msgid "Expand All Properties" msgstr "" #: editor/inspector_dock.cpp -#, fuzzy msgid "Collapse All Properties" -msgstr "ПоÑтавÑне на възелите" +msgstr "Свиване на вÑички ÑвойÑтва" #: editor/inspector_dock.cpp editor/plugins/animation_player_editor_plugin.cpp #: editor/plugins/script_editor_plugin.cpp msgid "Save As..." -msgstr "Запази Като..." +msgstr "Запазване като..." #: editor/inspector_dock.cpp msgid "Copy Params" @@ -4092,9 +3894,8 @@ msgid "Make Sub-Resources Unique" msgstr "" #: editor/inspector_dock.cpp -#, fuzzy msgid "Open in Help" -msgstr "Отвори в Помощника" +msgstr "ОтварÑне в помощната информациÑ" #: editor/inspector_dock.cpp msgid "Create a new resource in memory and edit it." @@ -4118,17 +3919,15 @@ msgstr "" #: editor/inspector_dock.cpp msgid "History of recently edited objects." -msgstr "" +msgstr "ИÑÑ‚Ð¾Ñ€Ð¸Ñ Ð½Ð° поÑледно редактираните обекти." #: editor/inspector_dock.cpp -#, fuzzy msgid "Object properties." -msgstr "ХарактериÑтики на обекта." +msgstr "СвойÑтва на обекта." #: editor/inspector_dock.cpp -#, fuzzy msgid "Filter properties" -msgstr "ПоÑтавÑне на възелите" +msgstr "Филтриране на ÑвойÑтвата" #: editor/inspector_dock.cpp msgid "Changes may be lost!" @@ -4143,71 +3942,62 @@ msgid "Select a single node to edit its signals and groups." msgstr "" #: editor/plugin_config_dialog.cpp -#, fuzzy msgid "Edit a Plugin" -msgstr "ПриÑтавки" +msgstr "Редактиране на приÑтавка" #: editor/plugin_config_dialog.cpp -#, fuzzy msgid "Create a Plugin" -msgstr "Създаване" +msgstr "Създаване на приÑтавка" #: editor/plugin_config_dialog.cpp -#, fuzzy msgid "Plugin Name:" -msgstr "ПриÑтавки" +msgstr "Име на приÑтавката:" #: editor/plugin_config_dialog.cpp msgid "Subfolder:" msgstr "Подпапка:" #: editor/plugin_config_dialog.cpp editor/script_create_dialog.cpp -#, fuzzy msgid "Language:" -msgstr "ВнаÑÑне на езици:" +msgstr "Език:" #: editor/plugin_config_dialog.cpp -#, fuzzy msgid "Script Name:" -msgstr "Име:" +msgstr "Име на Ñкрипта:" #: editor/plugin_config_dialog.cpp msgid "Activate now?" -msgstr "Ðктивирай Ñега?" +msgstr "Ðктивиране Ñега?" #: editor/plugins/abstract_polygon_2d_editor.cpp #: editor/plugins/polygon_2d_editor_plugin.cpp -#, fuzzy msgid "Create Polygon" -msgstr "Създаване на папка" +msgstr "Създаване на полигон" #: editor/plugins/abstract_polygon_2d_editor.cpp #: editor/plugins/animation_blend_space_1d_editor.cpp #: editor/plugins/animation_blend_space_2d_editor.cpp msgid "Create points." -msgstr "Създай точки." +msgstr "Създаване на точки." #: editor/plugins/abstract_polygon_2d_editor.cpp -#, fuzzy msgid "" "Edit points.\n" "LMB: Move Point\n" "RMB: Erase Point" msgstr "" -"Промени ÑъщеÑтвуващ полигон:\n" -"LMB: ПремеÑти Точка.\n" -"Ctrl+LMB: Раздели Сегмент.\n" -"RMB: Изтрии Точка." +"Редактиране на точки.\n" +"ЛÑв бутон на мишката: премеÑтване на точката\n" +"Ctrl+лÑв бутон: Изтриване на точката" #: editor/plugins/abstract_polygon_2d_editor.cpp #: editor/plugins/animation_blend_space_1d_editor.cpp msgid "Erase points." -msgstr "Изтрий точки." +msgstr "Изтриване на точки." #: editor/plugins/abstract_polygon_2d_editor.cpp -#, fuzzy msgid "Edit Polygon" -msgstr "ПриÑтавки" +msgstr "Редактиране на полигона" #: editor/plugins/abstract_polygon_2d_editor.cpp msgid "Insert Point" @@ -4218,9 +4008,8 @@ msgid "Edit Polygon (Remove Point)" msgstr "" #: editor/plugins/abstract_polygon_2d_editor.cpp -#, fuzzy msgid "Remove Polygon And Point" -msgstr "ПремеÑтване на Полигон" +msgstr "Премахване на полигона и точката" #: editor/plugins/animation_blend_space_1d_editor.cpp #: editor/plugins/animation_blend_space_2d_editor.cpp @@ -4228,21 +4017,19 @@ msgstr "ПремеÑтване на Полигон" #: editor/plugins/animation_state_machine_editor.cpp #: editor/plugins/sprite_frames_editor_plugin.cpp msgid "Add Animation" -msgstr "Добави ÐнимациÑ" +msgstr "ДобавÑне не анимациÑ" #: editor/plugins/animation_blend_space_1d_editor.cpp #: editor/plugins/animation_blend_space_2d_editor.cpp #: editor/plugins/animation_blend_tree_editor_plugin.cpp #: editor/plugins/animation_state_machine_editor.cpp -#, fuzzy msgid "Load..." -msgstr "Зареди..." +msgstr "Зареждане..." #: editor/plugins/animation_blend_space_1d_editor.cpp #: editor/plugins/animation_blend_space_2d_editor.cpp -#, fuzzy msgid "Move Node Point" -msgstr "LMB: ПремеÑти Точка." +msgstr "ПремеÑтване на точката на възела" #: editor/plugins/animation_blend_space_1d_editor.cpp msgid "Change BlendSpace1D Limits" @@ -4260,20 +4047,17 @@ msgstr "" #: editor/plugins/animation_blend_space_1d_editor.cpp #: editor/plugins/animation_blend_space_2d_editor.cpp -#, fuzzy msgid "Add Node Point" -msgstr "Добави Възел..." +msgstr "ДобавÑне на точка за възел" #: editor/plugins/animation_blend_space_1d_editor.cpp #: editor/plugins/animation_blend_space_2d_editor.cpp -#, fuzzy msgid "Add Animation Point" -msgstr "Добави ÐнимациÑ" +msgstr "ДобавÑне на точки за анимациÑ" #: editor/plugins/animation_blend_space_1d_editor.cpp -#, fuzzy msgid "Remove BlendSpace1D Point" -msgstr "ПремеÑтване на Полигон" +msgstr "Премахване на точка на BlendSpace1D" #: editor/plugins/animation_blend_space_1d_editor.cpp msgid "Move BlendSpace1D Node Point" @@ -4295,9 +4079,8 @@ msgstr "" #: editor/plugins/animation_blend_space_1d_editor.cpp #: editor/plugins/animation_blend_space_2d_editor.cpp -#, fuzzy msgid "Select and move points, create points with RMB." -msgstr "Селектирай и меÑти точки, Ñъздай точки Ñ RMB." +msgstr "Избиране и премеÑтване на точки; Ñъздаване на точки Ñ Ð´ÐµÑен бутон." #: editor/plugins/animation_blend_space_1d_editor.cpp #: editor/plugins/animation_blend_space_2d_editor.cpp scene/gui/graph_edit.cpp @@ -4312,27 +4095,23 @@ msgstr "" #: editor/plugins/animation_blend_space_1d_editor.cpp #: editor/plugins/animation_blend_space_2d_editor.cpp #: editor/plugins/animation_blend_tree_editor_plugin.cpp -#, fuzzy msgid "Open Editor" -msgstr "Ðова Ñцена" +msgstr "ОтварÑне на редактора" #: editor/plugins/animation_blend_space_1d_editor.cpp #: editor/plugins/animation_blend_space_2d_editor.cpp #: editor/plugins/animation_blend_tree_editor_plugin.cpp #: editor/plugins/animation_state_machine_editor.cpp -#, fuzzy msgid "Open Animation Node" -msgstr "Отвори Ðнимационен Възел" +msgstr "ОтварÑне на възела за анимациÑ" #: editor/plugins/animation_blend_space_2d_editor.cpp -#, fuzzy msgid "Triangle already exists." -msgstr "Група Ñ Ñ‚Ð¾Ð²Ð° име вече ÑъщеÑтвува." +msgstr "Триъгълникът вече ÑъщеÑтвува." #: editor/plugins/animation_blend_space_2d_editor.cpp -#, fuzzy msgid "Add Triangle" -msgstr "ДобавÑне на нови пътечки." +msgstr "ДобавÑне на триъгълник" #: editor/plugins/animation_blend_space_2d_editor.cpp msgid "Change BlendSpace2D Limits" @@ -4343,27 +4122,24 @@ msgid "Change BlendSpace2D Labels" msgstr "" #: editor/plugins/animation_blend_space_2d_editor.cpp -#, fuzzy msgid "Remove BlendSpace2D Point" -msgstr "ПремеÑтване на Полигон" +msgstr "ПремеÑтване на точка на BlendSpace2D" #: editor/plugins/animation_blend_space_2d_editor.cpp msgid "Remove BlendSpace2D Triangle" msgstr "" #: editor/plugins/animation_blend_space_2d_editor.cpp -#, fuzzy msgid "BlendSpace2D does not belong to an AnimationTree node." -msgstr "BlendSpace2D не принадлежи на възел тип AnimationTree." +msgstr "BlendSpace2D не принадлежи на възел от тип AnimationTree." #: editor/plugins/animation_blend_space_2d_editor.cpp msgid "No triangles exist, so no blending can take place." msgstr "" #: editor/plugins/animation_blend_space_2d_editor.cpp -#, fuzzy msgid "Toggle Auto Triangles" -msgstr "Покажи Любими" +msgstr "Превключване на автоматичните триъгълници" #: editor/plugins/animation_blend_space_2d_editor.cpp msgid "Create triangles by connecting points." @@ -4388,9 +4164,8 @@ msgstr "" #: editor/plugins/animation_blend_tree_editor_plugin.cpp #: editor/plugins/animation_tree_player_editor_plugin.cpp -#, fuzzy msgid "Edit Filters" -msgstr "Промени Филтрите" +msgstr "Редактиране на филтрите" #: editor/plugins/animation_blend_tree_editor_plugin.cpp msgid "Output node can't be added to the blend tree." @@ -4402,9 +4177,8 @@ msgstr "" #: editor/plugins/animation_blend_tree_editor_plugin.cpp #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Node Moved" -msgstr "Режим на ПремеÑтване" +msgstr "Възелът е премеÑтен" #: editor/plugins/animation_blend_tree_editor_plugin.cpp msgid "Unable to connect, port may be in use or connection may be invalid." @@ -4412,26 +4186,22 @@ msgstr "" #: editor/plugins/animation_blend_tree_editor_plugin.cpp #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Nodes Connected" -msgstr "ИзрÑзване на възелите" +msgstr "Възлите Ñа Ñвързани" #: editor/plugins/animation_blend_tree_editor_plugin.cpp #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Nodes Disconnected" -msgstr "Разкачи" +msgstr "Възлите Ñа разкачени" #: editor/plugins/animation_blend_tree_editor_plugin.cpp -#, fuzzy msgid "Set Animation" -msgstr "Ðово Име на ÐнимациÑ:" +msgstr "Задаване на анимациÑ" #: editor/plugins/animation_blend_tree_editor_plugin.cpp #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Delete Node" -msgstr "Избиране на вÑичко" +msgstr "Изтриване на възела" #: editor/plugins/animation_blend_tree_editor_plugin.cpp #: editor/scene_tree_dock.cpp @@ -4439,9 +4209,8 @@ msgid "Delete Node(s)" msgstr "" #: editor/plugins/animation_blend_tree_editor_plugin.cpp -#, fuzzy msgid "Toggle Filter On/Off" -msgstr "Покажи Любими" +msgstr "Превключване на филтъра ВКЛ/ИЗКЛ" #: editor/plugins/animation_blend_tree_editor_plugin.cpp msgid "Change Filter" @@ -4472,32 +4241,27 @@ msgid "Audio Clips" msgstr "ДобавÑне на нови пътечки." #: editor/plugins/animation_blend_tree_editor_plugin.cpp -#, fuzzy msgid "Functions" -msgstr "Отиди на Ред" +msgstr "Функции" #: editor/plugins/animation_blend_tree_editor_plugin.cpp #: editor/plugins/animation_state_machine_editor.cpp -#, fuzzy msgid "Node Renamed" -msgstr "Възел" +msgstr "Възелът е преименуван" #: editor/plugins/animation_blend_tree_editor_plugin.cpp #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Add Node..." -msgstr "Добави Възел..." +msgstr "ДобавÑне на възел..." #: editor/plugins/animation_blend_tree_editor_plugin.cpp #: editor/plugins/root_motion_editor_plugin.cpp -#, fuzzy msgid "Edit Filtered Tracks:" -msgstr "Файл:" +msgstr "Редактиране на филтрираните пътечки:" #: editor/plugins/animation_blend_tree_editor_plugin.cpp -#, fuzzy msgid "Enable Filtering" -msgstr "Позволи филтриране" +msgstr "Включване на филтрирането" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Toggle Autoplay" @@ -4505,7 +4269,7 @@ msgstr "" #: editor/plugins/animation_player_editor_plugin.cpp msgid "New Animation Name:" -msgstr "Ðово Име на ÐнимациÑ:" +msgstr "Ðово име на анимациÑта:" #: editor/plugins/animation_player_editor_plugin.cpp msgid "New Anim" @@ -4513,7 +4277,7 @@ msgstr "" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Change Animation Name:" -msgstr "Промени Името на ÐнимациÑта:" +msgstr "ПромÑна на името на анимациÑта:" #: editor/plugins/animation_player_editor_plugin.cpp #: editor/plugins/sprite_frames_editor_plugin.cpp @@ -4559,9 +4323,8 @@ msgid "No animation to copy!" msgstr "" #: editor/plugins/animation_player_editor_plugin.cpp -#, fuzzy msgid "No animation resource on clipboard!" -msgstr "Обектът не е базиран на реÑурÑен файл" +msgstr "ÐÑма реÑурÑâ€“Ð°Ð½Ð¸Ð¼Ð°Ñ†Ð¸Ñ Ð² буфера за обмен!" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Pasted Animation" @@ -4573,7 +4336,7 @@ msgstr "" #: editor/plugins/animation_player_editor_plugin.cpp msgid "No animation to edit!" -msgstr "ÐÑма Ð°Ð½Ð¸Ð¼Ð°Ñ†Ð¸Ñ Ð·Ð° променÑне!" +msgstr "ÐÑма Ð°Ð½Ð¸Ð¼Ð°Ñ†Ð¸Ñ Ð·Ð° редактиране!" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Play selected animation backwards from current pos. (A)" @@ -4605,16 +4368,15 @@ msgstr "" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Animation Tools" -msgstr "Ðнимационни ИнÑтрументи" +msgstr "ИнÑтрументи за анимациите" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Animation" msgstr "" #: editor/plugins/animation_player_editor_plugin.cpp -#, fuzzy msgid "Edit Transitions..." -msgstr "Преходи" +msgstr "Редактиране на преходите..." #: editor/plugins/animation_player_editor_plugin.cpp msgid "Open in Inspector" @@ -4711,19 +4473,16 @@ msgid "Cross-Animation Blend Times" msgstr "" #: editor/plugins/animation_state_machine_editor.cpp -#, fuzzy msgid "Move Node" -msgstr "Режим на ПремеÑтване" +msgstr "ПремеÑтване на възела" #: editor/plugins/animation_state_machine_editor.cpp -#, fuzzy msgid "Transition exists!" -msgstr "Преход" +msgstr "Преходът вече ÑъщеÑтвува!" #: editor/plugins/animation_state_machine_editor.cpp -#, fuzzy msgid "Add Transition" -msgstr "ДобавÑне на превод" +msgstr "ДобавÑне на преход" #: editor/plugins/animation_state_machine_editor.cpp #: modules/visual_script/visual_script_editor.cpp @@ -4760,14 +4519,12 @@ msgid "No playback resource set at path: %s." msgstr "Обектът не е базиран на реÑурÑен файл" #: editor/plugins/animation_state_machine_editor.cpp -#, fuzzy msgid "Node Removed" -msgstr "Премахни" +msgstr "Възелът е премахнат" #: editor/plugins/animation_state_machine_editor.cpp -#, fuzzy msgid "Transition Removed" -msgstr "Преход" +msgstr "Преходът е премахнат" #: editor/plugins/animation_state_machine_editor.cpp msgid "Set Start Node (Autoplay)" @@ -4781,19 +4538,16 @@ msgid "" msgstr "" #: editor/plugins/animation_state_machine_editor.cpp -#, fuzzy msgid "Create new nodes." -msgstr "Създай нови възли." +msgstr "Създаване на нови възли." #: editor/plugins/animation_state_machine_editor.cpp -#, fuzzy msgid "Connect nodes." -msgstr "Свържи възли." +msgstr "Свързване на възли." #: editor/plugins/animation_state_machine_editor.cpp -#, fuzzy msgid "Remove selected node or transition." -msgstr "Премахни ÑÐµÐ»ÐµÐºÑ‚Ð¸Ñ€Ð°Ð½Ð¸Ñ Ð²ÑŠÐ·ÐµÐ» или преход." +msgstr "Премахване на Ð¸Ð·Ð±Ñ€Ð°Ð½Ð¸Ñ Ð²ÑŠÐ·ÐµÐ» или преход." #: editor/plugins/animation_state_machine_editor.cpp msgid "Toggle autoplay this animation on start, restart or seek to zero." @@ -4804,14 +4558,12 @@ msgid "Set the end animation. This is useful for sub-transitions." msgstr "" #: editor/plugins/animation_state_machine_editor.cpp -#, fuzzy msgid "Transition: " -msgstr "Преход" +msgstr "Преход: " #: editor/plugins/animation_state_machine_editor.cpp -#, fuzzy msgid "Play Mode:" -msgstr "Панорамен режим на ОтмеÑтване (на Ñ€Ð°Ð±Ð¾Ñ‚Ð½Ð¸Ñ Ð¿Ñ€Ð¾Ð·Ð¾Ñ€ÐµÑ†)" +msgstr "Режим на възпроизвеждане:" #: editor/plugins/animation_tree_editor_plugin.cpp #: editor/plugins/animation_tree_player_editor_plugin.cpp @@ -4845,9 +4597,8 @@ msgid "Mix" msgstr "" #: editor/plugins/animation_tree_player_editor_plugin.cpp -#, fuzzy msgid "Auto Restart:" -msgstr "Ðвтоматично РеÑтартиране:" +msgstr "Ðвтоматично реÑтартиране:" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Restart (s):" @@ -4910,7 +4661,7 @@ msgstr "" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Animation Node" -msgstr "Ðнимационен Възел" +msgstr "Ðнимационен възел" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "OneShot Node" @@ -4950,7 +4701,7 @@ msgstr "ВнаÑÑне на анимации..." #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Edit Node Filters" -msgstr "Промени Възлови Филтри" +msgstr "ПромÑна на филтрите за възлите" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Filters..." @@ -4966,7 +4717,7 @@ msgstr "Преглед на файловете" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Connection error, please try again." -msgstr "Грешка във връзката, Ð¼Ð¾Ð»Ñ Ð¾Ð¿Ð¸Ñ‚Ð°Ð¹ отново." +msgstr "Грешка във връзката. МолÑ, опитайте отново." #: editor/plugins/asset_library_editor_plugin.cpp msgid "Can't connect to host:" @@ -4982,7 +4733,7 @@ msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Request failed, return code:" -msgstr "ЗаÑвката Ñе провали, върнат код:" +msgstr "ЗаÑвката Ñе провали. Код:" #: editor/plugins/asset_library_editor_plugin.cpp #, fuzzy @@ -5000,7 +4751,7 @@ msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Request failed, too many redirects" -msgstr "ЗаÑвката Ñе провали, твърде много пренаÑочваниÑ" +msgstr "ЗаÑвката Ñе провали. Твърде много пренаÑочваниÑ" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Redirect loop." @@ -5029,7 +4780,7 @@ msgstr "Получено:" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Failed sha256 hash check" -msgstr "ÐеуÑпешна проверка на sha256 hash" +msgstr "ÐеуÑпешна проверка на хеш от вид „sha256“" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Asset Download Error:" @@ -5037,19 +4788,19 @@ msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Downloading (%s / %s)..." -msgstr "ИзтеглÑне (%s / %s)..." +msgstr "СвалÑне (%s / %s)..." #: editor/plugins/asset_library_editor_plugin.cpp msgid "Downloading..." -msgstr "Ð˜Ð·Ñ‚ÐµÐ³Ð»Ñ Ñе..." +msgstr "СвалÑне..." #: editor/plugins/asset_library_editor_plugin.cpp msgid "Resolving..." -msgstr "Уреждане на връзката..." +msgstr "Инициализиране..." #: editor/plugins/asset_library_editor_plugin.cpp msgid "Error making request" -msgstr "Имаше грешка при направата на заÑвката за изтеглÑне" +msgstr "Грешка при извършването на заÑвката" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Idle" @@ -5062,24 +4813,23 @@ msgstr "ИнÑталиране" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Retry" -msgstr "Опитай пак" +msgstr "Повторен опит" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Download Error" -msgstr "Грешка при изтеглÑнето" +msgstr "Грешка при ÑвалÑнето" #: editor/plugins/asset_library_editor_plugin.cpp -#, fuzzy msgid "Download for this asset is already in progress!" -msgstr "Този актив вече Ñе ÑвалÑ!" +msgstr "Този реÑÑƒÑ€Ñ Ð²ÐµÑ‡Ðµ Ñе ÑвалÑ!" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Recently Updated" -msgstr "" +msgstr "ПоÑледно обновени" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Least Recently Updated" -msgstr "" +msgstr "Обновени отдавна" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Name (A-Z)" @@ -5101,7 +4851,7 @@ msgstr "Лиценз" #: editor/plugins/asset_library_editor_plugin.cpp msgid "First" -msgstr "Ðачална" +msgstr "Първа" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Previous" @@ -5135,7 +4885,7 @@ msgstr "ПриÑтавки" #: editor/plugins/asset_library_editor_plugin.cpp editor/project_manager.cpp msgid "Sort:" -msgstr "Подреждане:" +msgstr "Сортиране:" #: editor/plugins/asset_library_editor_plugin.cpp #: editor/project_settings_editor.cpp @@ -5144,7 +4894,7 @@ msgstr "КатегориÑ:" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Site:" -msgstr "МÑÑто:" +msgstr "Уеб Ñайт:" #: editor/plugins/asset_library_editor_plugin.cpp #, fuzzy @@ -5153,11 +4903,11 @@ msgstr "Поддръжка..." #: editor/plugins/asset_library_editor_plugin.cpp msgid "Official" -msgstr "Официална" +msgstr "Официално" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Testing" -msgstr "ТеÑтова" +msgstr "ТеÑтово" #: editor/plugins/asset_library_editor_plugin.cpp #, fuzzy @@ -5221,7 +4971,7 @@ msgstr "ИзмеÑтване при Завъртане:" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Rotation Step:" -msgstr "Съпка при Завъртане:" +msgstr "Стъпка при завъртане:" #: editor/plugins/canvas_item_editor_plugin.cpp #, fuzzy @@ -5453,11 +5203,11 @@ msgstr "Възпроизвеждане на Ñцена по избор" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Make IK Chain" -msgstr "Ðаправи IK Връзка" +msgstr "Създаване на верига за IK" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Clear IK Chain" -msgstr "ИзчиÑти IK Връзка" +msgstr "ИзчиÑтване на веригата за IK" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "" @@ -5475,15 +5225,15 @@ msgstr "Оригинално увеличение" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp msgid "Select Mode" -msgstr "Режим на Селектиране" +msgstr "Режим на избиране" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Drag: Rotate" -msgstr "Дърпане: Завъртане" +msgstr "Влачене: завъртане" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Alt+Drag: Move" -msgstr "Alt+Дърпане: ПремеÑтване" +msgstr "Alt+Влачене: премеÑтване" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Press 'v' to Change Pivot, 'Shift+v' to Drag Pivot (while moving)." @@ -5496,12 +5246,12 @@ msgstr "" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp msgid "Move Mode" -msgstr "Режим на ПремеÑтване" +msgstr "Режим на премеÑтване" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp msgid "Rotate Mode" -msgstr "Режим на Завъртане" +msgstr "Режим на завъртане" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -5515,8 +5265,8 @@ msgid "" "Show a list of all objects at the position clicked\n" "(same as Alt+RMB in select mode)." msgstr "" -"Покажи ÑпиÑък Ñ Ð²Ñички обекти на кликнатата позициÑ\n" -"(Ñъщото като Alt+RMB в режим на Ñелектиране)." +"Показване на ÑпиÑък Ñ Ð²Ñички обекти на щракнатата позициÑ\n" +"(Ñъщото като Alt+ДеÑен бутон в режим на избиране)." #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Click to change object's rotation pivot." @@ -5524,7 +5274,7 @@ msgstr "" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Pan Mode" -msgstr "Панорамен режим на ОтмеÑтване (на Ñ€Ð°Ð±Ð¾Ñ‚Ð½Ð¸Ñ Ð¿Ñ€Ð¾Ð·Ð¾Ñ€ÐµÑ†)" +msgstr "Панорамен режим" #: editor/plugins/canvas_item_editor_plugin.cpp #, fuzzy @@ -5608,23 +5358,22 @@ msgstr "Избиране на вÑичко" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp msgid "Lock the selected object in place (can't be moved)." -msgstr "Заключи ÑÐµÐ»ÐµÐºÑ‚Ð¸Ñ€Ð°Ð½Ð¸Ñ Ð¾Ð±ÐµÐºÑ‚ на мÑÑто (за да не може да Ñе премеÑтва)." +msgstr "Заключване на Ð¸Ð·Ð±Ñ€Ð°Ð½Ð¸Ñ Ð¾Ð±ÐµÐºÑ‚ на мÑÑто (за да не може да Ñе премеÑтва)." #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp msgid "Unlock the selected object (can be moved)." -msgstr "Отключи ÑÐµÐ»ÐµÐºÑ‚Ð¸Ñ€Ð°Ð½Ð¸Ñ Ð¾Ð±ÐµÐºÑ‚ (за да може да Ñе премеÑтва)." +msgstr "Отключване на Ð¸Ð·Ð±Ñ€Ð°Ð½Ð¸Ñ Ð¾Ð±ÐµÐºÑ‚ (за да може да Ñе премеÑтва)." #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Makes sure the object's children are not selectable." -msgstr "Гарантирай че децата на този обект нÑма да могат да бъдат Ñелектирани." +msgstr "Прави така, че децата на този обект да не могат да бъдат избирани." #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp msgid "Restores the object's children's ability to be selected." -msgstr "Възвръщане на ÑпоÑобноÑтта да Ñе Ñелектират децата на обекта." +msgstr "ВъзÑтановÑва на ÑпоÑобноÑтта да Ñе избират децата на обекта." #: editor/plugins/canvas_item_editor_plugin.cpp #, fuzzy @@ -5646,9 +5395,8 @@ msgstr "Възпроизвеждане на Ñцена по избор" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "View" -msgstr "Изглед" +msgstr "Преглед" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Always Show Grid" @@ -5680,7 +5428,7 @@ msgstr "" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Center Selection" -msgstr "Центрирай върху СелекциÑта" +msgstr "Центриране върху избраното" #: editor/plugins/canvas_item_editor_plugin.cpp #, fuzzy @@ -5751,7 +5499,7 @@ msgstr "Изглед Отзад." #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Add %s" -msgstr "Добави %s" +msgstr "ДобавÑне на %s" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Adding %s..." @@ -5764,7 +5512,7 @@ msgstr "" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp msgid "Create Node" -msgstr "Създай Възел" +msgstr "Създаване на възел" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp @@ -5973,11 +5721,12 @@ msgid "Mesh is empty!" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Trimesh Body" -msgstr "" +#, fuzzy +msgid "Couldn't create a Trimesh collision shape." +msgstr "ÐеуÑпешно Ñъздаване на папка." #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Convex Body" +msgid "Create Static Trimesh Body" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -5989,12 +5738,30 @@ msgid "Create Trimesh Static Shape" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Failed creating shapes!" +msgid "Can't create a single convex collision shape for the scene root." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Couldn't create a single convex collision shape." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Single Convex Shape" +msgstr "Създай нови възли." + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Can't create multiple convex collision shapes for the scene root." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Couldn't create any collision shapes." +msgstr "ÐеуÑпешно Ñъздаване на папка." + +#: editor/plugins/mesh_instance_editor_plugin.cpp #, fuzzy -msgid "Create Convex Shape(s)" +msgid "Create Multiple Convex Shapes" msgstr "Създай нови възли." #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -6031,11 +5798,11 @@ msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Could not create outline!" -msgstr "Ðе можа да Ñе Ñъздаде очертание!" +msgstr "Контурът не може да бъде Ñъздаден!" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Outline" -msgstr "Създай Очертание" +msgstr "Създаване на контур" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Mesh" @@ -6046,25 +5813,63 @@ msgid "Create Trimesh Static Body" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a StaticBody and assigns a polygon-based collision shape to it " +"automatically.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Trimesh Collision Sibling" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp #, fuzzy -msgid "Create Convex Collision Sibling(s)" +msgid "Create Single Convex Collision Siblings" msgstr "Създаване на папка" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a single convex collision shape.\n" +"This is the fastest (but least accurate) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Multiple Convex Collision Siblings" +msgstr "Създаване на папка" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is a performance middle-ground between the two above options." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Outline Mesh..." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a static outline mesh. The outline mesh will have its normals " +"flipped automatically.\n" +"This can be used instead of the SpatialMaterial Grow property when using " +"that property isn't possible." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "View UV1" -msgstr "Покажи UV1" +msgstr "Показване на UV1" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "View UV2" -msgstr "Покажи UV2" +msgstr "Показване на UV2" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Unwrap UV2 for Lightmap/AO" @@ -6076,7 +5881,7 @@ msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Outline Size:" -msgstr "Размер на Очертанието:" +msgstr "Размер на контура:" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "UV Channel Debug" @@ -6109,11 +5914,11 @@ msgstr "" #: editor/plugins/mesh_library_editor_plugin.cpp msgid "Import from Scene" -msgstr "ВнаÑÑне от Cцена" +msgstr "ВнаÑÑне от Ñцена" #: editor/plugins/mesh_library_editor_plugin.cpp msgid "Update from Scene" -msgstr "ОбновÑване от Cцена" +msgstr "ОбновÑване от Ñцена" #: editor/plugins/multimesh_editor_plugin.cpp msgid "No mesh source specified (and no MultiMesh set in node)." @@ -6366,7 +6171,7 @@ msgstr "" #: editor/plugins/path_2d_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp msgid "Delete Point" -msgstr "Изтрий Точка" +msgstr "Изтриване на точка" #: editor/plugins/path_2d_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp @@ -6528,29 +6333,28 @@ msgid "Move Points" msgstr "LMB: ПремеÑти Точка." #: editor/plugins/polygon_2d_editor_plugin.cpp -#, fuzzy msgid "Ctrl: Rotate" msgstr "Ctrl: Завъртане" #: editor/plugins/polygon_2d_editor_plugin.cpp msgid "Shift: Move All" -msgstr "Shift: ПремеÑтване на Ð’Ñичко" +msgstr "Shift: премеÑтване на вÑичко" #: editor/plugins/polygon_2d_editor_plugin.cpp msgid "Shift+Ctrl: Scale" -msgstr "Shift+Ctrl: Управление на Мащаб (размер)" +msgstr "Shift+Ctrl: мащабиране" #: editor/plugins/polygon_2d_editor_plugin.cpp msgid "Move Polygon" -msgstr "ПремеÑтване на Полигон" +msgstr "ПремеÑтване на полигона" #: editor/plugins/polygon_2d_editor_plugin.cpp msgid "Rotate Polygon" -msgstr "Завъртане на Полигон" +msgstr "Завъртане на полигона" #: editor/plugins/polygon_2d_editor_plugin.cpp msgid "Scale Polygon" -msgstr "Мащаб на Полигон" +msgstr "Мащабиране на полигона" #: editor/plugins/polygon_2d_editor_plugin.cpp msgid "Create a custom polygon. Enables custom polygon rendering." @@ -6576,15 +6380,15 @@ msgstr "РадиуÑ:" #: editor/plugins/polygon_2d_editor_plugin.cpp msgid "Polygon->UV" -msgstr "Полигон->UV" +msgstr "Полигон -> UV" #: editor/plugins/polygon_2d_editor_plugin.cpp msgid "UV->Polygon" -msgstr "UV->Полигон" +msgstr "UV -> Полигон" #: editor/plugins/polygon_2d_editor_plugin.cpp msgid "Clear UV" -msgstr "ИзчиÑти UV" +msgstr "ИзчиÑтване на UV" #: editor/plugins/polygon_2d_editor_plugin.cpp #, fuzzy @@ -6633,7 +6437,7 @@ msgstr "" #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "ERROR: Couldn't load resource!" -msgstr "ГРЕШКÐ: РеÑурÑÑŠÑ‚ не можа да бъде зареден!" +msgstr "ГРЕШКÐ: РеÑурÑÑŠÑ‚ не може да бъде зареден!" #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "Add Resource" @@ -6691,15 +6495,15 @@ msgstr "" #: editor/plugins/script_editor_plugin.cpp msgid "Clear Recent Files" -msgstr "" +msgstr "ИзчиÑтване на поÑледните файлове" #: editor/plugins/script_editor_plugin.cpp msgid "Close and save changes?" -msgstr "Затвори и запази промените?" +msgstr "ЗатвÑране и запазване на промените?" #: editor/plugins/script_editor_plugin.cpp msgid "Error writing TextFile:" -msgstr "Грешка при запиÑване на TextFile:" +msgstr "Грешка при запиÑването:" #: editor/plugins/script_editor_plugin.cpp #, fuzzy @@ -6737,11 +6541,11 @@ msgstr "Ðов TextFile..." #: editor/plugins/script_editor_plugin.cpp msgid "Open File" -msgstr "Отвори Файл" +msgstr "ОтварÑне на файл" #: editor/plugins/script_editor_plugin.cpp msgid "Save File As..." -msgstr "Запази Файла Като..." +msgstr "Запазване на файла като..." #: editor/plugins/script_editor_plugin.cpp msgid "Can't obtain the script for running." @@ -6770,11 +6574,11 @@ msgstr "" #: editor/plugins/script_editor_plugin.cpp msgid "Error saving" -msgstr "Грешка при запазване" +msgstr "Грешка при запазването" #: editor/plugins/script_editor_plugin.cpp msgid "Save Theme As..." -msgstr "Запази Темата Като..." +msgstr "Запазване на темата като..." #: editor/plugins/script_editor_plugin.cpp msgid "%s Class Reference" @@ -6783,7 +6587,7 @@ msgstr "" #: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp msgid "Find Next" -msgstr "Ðамери Ðапред" +msgstr "ТърÑене напред" #: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp @@ -6813,13 +6617,13 @@ msgstr "Подреждане:" #: editor/plugins/script_text_editor.cpp editor/scene_tree_dock.cpp #: modules/gdnative/gdnative_library_editor_plugin.cpp msgid "Move Up" -msgstr "ПремеÑти Ðагоре" +msgstr "ПремеÑтване нагоре" #: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp editor/scene_tree_dock.cpp #: modules/gdnative/gdnative_library_editor_plugin.cpp msgid "Move Down" -msgstr "ПремеÑти Ðадоло" +msgstr "ПремеÑтване надолу" #: editor/plugins/script_editor_plugin.cpp msgid "Next script" @@ -6845,7 +6649,7 @@ msgstr "Ðова Ñцена" #: editor/plugins/script_editor_plugin.cpp msgid "Save All" -msgstr "Запази Ð’Ñичко" +msgstr "Запазване на вÑичко" #: editor/plugins/script_editor_plugin.cpp msgid "Soft Reload Script" @@ -6862,7 +6666,7 @@ msgstr "ИÑÑ‚Ð¾Ñ€Ð¸Ñ Ðазад" #: editor/plugins/script_editor_plugin.cpp msgid "History Next" -msgstr "ИÑÑ‚Ð¾Ñ€Ð¸Ñ Ðапред" +msgstr "Ðапред в иÑториÑта" #: editor/plugins/script_editor_plugin.cpp #: editor/plugins/theme_editor_plugin.cpp @@ -6876,11 +6680,11 @@ msgstr "ВнаÑÑне на тема" #: editor/plugins/script_editor_plugin.cpp msgid "Reload Theme" -msgstr "Зареди Темата наново" +msgstr "Презареждане на темата" #: editor/plugins/script_editor_plugin.cpp msgid "Save Theme" -msgstr "Запази Темата" +msgstr "Запазване на темата" #: editor/plugins/script_editor_plugin.cpp msgid "Close All" @@ -6888,7 +6692,7 @@ msgstr "ЗатварÑне на вÑичко" #: editor/plugins/script_editor_plugin.cpp msgid "Close Docs" -msgstr "Затвори ДокументациÑта" +msgstr "ЗатварÑне на документациÑта" #: editor/plugins/script_editor_plugin.cpp editor/project_manager.cpp msgid "Run" @@ -6913,7 +6717,7 @@ msgstr "" #: editor/plugins/script_editor_plugin.cpp msgid "Keep Debugger Open" -msgstr "ОтÑÑ‚Ñ€Ð°Ð½Ð¸Ñ‚ÐµÐ»Ñ Ð½Ð° грешки да Ñеди отворен" +msgstr "Дебъгерът да оÑтане отворен" #: editor/plugins/script_editor_plugin.cpp msgid "Debug with External Editor" @@ -6938,15 +6742,15 @@ msgstr "" #: editor/plugins/script_editor_plugin.cpp msgid "Go to previous edited document." -msgstr "Отиди в Ð¿Ñ€ÐµÐ´Ñ…Ð¾Ð´Ð½Ð¸Ñ Ð¿Ñ€Ð¾Ð¼ÐµÐ½ÐµÐ½ документ." +msgstr "Към Ð¿Ñ€ÐµÐ´Ñ…Ð¾Ð´Ð½Ð¸Ñ Ð¿Ñ€Ð¾Ð¼ÐµÐ½ÐµÐ½ документ." #: editor/plugins/script_editor_plugin.cpp msgid "Go to next edited document." -msgstr "Отиди в ÑÐ»ÐµÐ´Ð²Ð°Ñ‰Ð¸Ñ Ð¿Ñ€Ð¾Ð¼ÐµÐ½ÐµÐ½ документ." +msgstr "Към ÑÐ»ÐµÐ´Ð²Ð°Ñ‰Ð¸Ñ Ð¿Ñ€Ð¾Ð¼ÐµÐ½ÐµÐ½ документ." #: editor/plugins/script_editor_plugin.cpp msgid "Discard" -msgstr "Захвърли (промените)" +msgstr "ОтхвърлÑне" #: editor/plugins/script_editor_plugin.cpp msgid "" @@ -6959,16 +6763,16 @@ msgstr "" #: editor/plugins/script_editor_plugin.cpp #: editor/plugins/shader_editor_plugin.cpp msgid "Reload" -msgstr "Презареди" +msgstr "Презареждане" #: editor/plugins/script_editor_plugin.cpp #: editor/plugins/shader_editor_plugin.cpp msgid "Resave" -msgstr "Презапиши" +msgstr "ПрезапиÑване" #: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp msgid "Debugger" -msgstr "ОтÑтранител на грешки" +msgstr "Дебъгер" #: editor/plugins/script_editor_plugin.cpp #, fuzzy @@ -6976,9 +6780,8 @@ msgid "Search Results" msgstr "ТърÑене" #: editor/plugins/script_editor_plugin.cpp -#, fuzzy msgid "Clear Recent Scripts" -msgstr "ЗатварÑне на Ñцената" +msgstr "ИзчиÑтване на поÑледните Ñкриптове" #: editor/plugins/script_text_editor.cpp #, fuzzy @@ -7042,7 +6845,7 @@ msgstr "Малки букви" #: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp msgid "Capitalize" -msgstr "Ð’ÑÑка дума Ñ Ð“Ð»Ð°Ð²Ð½Ð° буква" +msgstr "Ð’ÑÑка дума Ñ Ð³Ð»Ð°Ð²Ð½Ð° буква" #: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp msgid "Syntax Highlighter" @@ -7075,7 +6878,7 @@ msgstr "Избиране на вÑичко" #: editor/plugins/script_text_editor.cpp msgid "Delete Line" -msgstr "Изтрий Ред" +msgstr "Изтриване на ред" #: editor/plugins/script_text_editor.cpp msgid "Indent Left" @@ -7087,27 +6890,27 @@ msgstr "" #: editor/plugins/script_text_editor.cpp msgid "Toggle Comment" -msgstr "Вкарай Коментар" +msgstr "Превключване на коментар" #: editor/plugins/script_text_editor.cpp msgid "Fold/Unfold Line" -msgstr "Разтвори/Събери Реда" +msgstr "Разгъване/Ñвиване на реда" #: editor/plugins/script_text_editor.cpp msgid "Fold All Lines" -msgstr "Събери вÑички Редове" +msgstr "Свиване на вÑички редове" #: editor/plugins/script_text_editor.cpp msgid "Unfold All Lines" -msgstr "Разтвори Ð’Ñички Редове" +msgstr "Разгъване на вÑички редове" #: editor/plugins/script_text_editor.cpp msgid "Clone Down" -msgstr "Копирай на Долен ред" +msgstr "Копиране на Ð´Ð¾Ð»Ð½Ð¸Ñ Ñ€ÐµÐ´" #: editor/plugins/script_text_editor.cpp msgid "Complete Symbol" -msgstr "Завърши Символа (Ð¿Ñ€ÐµÐ´Ð»Ð¾Ð¶ÐµÐ½Ð¸Ñ Ð·Ð° довършване)" +msgstr "Знак за авт. довършване" #: editor/plugins/script_text_editor.cpp #, fuzzy @@ -7115,9 +6918,8 @@ msgid "Evaluate Selection" msgstr "Центрирай върху СелекциÑта" #: editor/plugins/script_text_editor.cpp -#, fuzzy msgid "Trim Trailing Whitespace" -msgstr "Премахни Празните Ñимволи в ÐºÑ€Ð°Ñ Ð½Ð° реда" +msgstr "Премахване на празните меÑта в ÐºÑ€Ð°Ñ Ð½Ð° редовете" #: editor/plugins/script_text_editor.cpp msgid "Convert Indent to Spaces" @@ -7172,11 +6974,11 @@ msgstr "Отиди на Ред" #: editor/plugins/script_text_editor.cpp #: modules/visual_script/visual_script_editor.cpp msgid "Toggle Breakpoint" -msgstr "Добави Breakpoint" +msgstr "Превключване на точка на прекъÑване" #: editor/plugins/script_text_editor.cpp msgid "Remove All Breakpoints" -msgstr "Премахни Ð’Ñички Breakpoint-ове" +msgstr "Премахване на вÑички точки на прекъÑване" #: editor/plugins/script_text_editor.cpp #, fuzzy @@ -7325,11 +7127,11 @@ msgstr "" #: editor/plugins/spatial_editor_plugin.cpp msgid "Top View." -msgstr "Изглед Отгоре." +msgstr "Изглед отгоре." #: editor/plugins/spatial_editor_plugin.cpp msgid "Bottom View." -msgstr "Изглед Отдолу." +msgstr "Изглед отдолу." #: editor/plugins/spatial_editor_plugin.cpp msgid "Bottom" @@ -7337,7 +7139,7 @@ msgstr "" #: editor/plugins/spatial_editor_plugin.cpp msgid "Left View." -msgstr "Изглед ОтлÑво." +msgstr "Изглед отлÑво." #: editor/plugins/spatial_editor_plugin.cpp msgid "Left" @@ -7345,7 +7147,7 @@ msgstr "" #: editor/plugins/spatial_editor_plugin.cpp msgid "Right View." -msgstr "Изглед ОтдÑÑно." +msgstr "Изглед отдÑÑно." #: editor/plugins/spatial_editor_plugin.cpp msgid "Right" @@ -7353,7 +7155,7 @@ msgstr "" #: editor/plugins/spatial_editor_plugin.cpp msgid "Front View." -msgstr "Изглед Отпред." +msgstr "Изглед отпред." #: editor/plugins/spatial_editor_plugin.cpp msgid "Front" @@ -7361,7 +7163,7 @@ msgstr "" #: editor/plugins/spatial_editor_plugin.cpp msgid "Rear View." -msgstr "Изглед Отзад." +msgstr "Изглед отзад." #: editor/plugins/spatial_editor_plugin.cpp msgid "Rear" @@ -7445,27 +7247,27 @@ msgstr "" #: editor/plugins/spatial_editor_plugin.cpp msgid "Freelook Left" -msgstr "Свободен Изглед ОтлÑво" +msgstr "Свободен изглед отлÑво" #: editor/plugins/spatial_editor_plugin.cpp msgid "Freelook Right" -msgstr "Свободен Изглед ОтдÑÑно" +msgstr "Свободен изглед отдÑÑно" #: editor/plugins/spatial_editor_plugin.cpp msgid "Freelook Forward" -msgstr "Свободен Изглед Отпред" +msgstr "Свободен изглед отпред" #: editor/plugins/spatial_editor_plugin.cpp msgid "Freelook Backwards" -msgstr "Свободен Изглед Отзад" +msgstr "Свободен изглед отзад" #: editor/plugins/spatial_editor_plugin.cpp msgid "Freelook Up" -msgstr "Свободен Изглед Отгоре" +msgstr "Свободен изглед отгоре" #: editor/plugins/spatial_editor_plugin.cpp msgid "Freelook Down" -msgstr "Свободен Изглед Отдолу" +msgstr "Свободен изглед отдолу" #: editor/plugins/spatial_editor_plugin.cpp msgid "Freelook Speed Modifier" @@ -7696,24 +7498,20 @@ msgid "Polygon2D Preview" msgstr "" #: editor/plugins/sprite_editor_plugin.cpp -#, fuzzy msgid "Create CollisionPolygon2D" -msgstr "Създаване на папка" +msgstr "Създаване на CollisionPolygon2D" #: editor/plugins/sprite_editor_plugin.cpp -#, fuzzy msgid "CollisionPolygon2D Preview" -msgstr "Създаване на папка" +msgstr "Предварителен преглед на CollisionPolygon2D" #: editor/plugins/sprite_editor_plugin.cpp -#, fuzzy msgid "Create LightOccluder2D" -msgstr "Създаване на папка" +msgstr "Създаване на LightOccluder2D" #: editor/plugins/sprite_editor_plugin.cpp -#, fuzzy msgid "LightOccluder2D Preview" -msgstr "Създаване на папка" +msgstr "Предварителен преглед на LightOccluder2D" #: editor/plugins/sprite_editor_plugin.cpp msgid "Sprite is empty!" @@ -7736,9 +7534,8 @@ msgid "Invalid geometry, can't create polygon." msgstr "" #: editor/plugins/sprite_editor_plugin.cpp -#, fuzzy msgid "Convert to Polygon2D" -msgstr "ПремеÑтване на Полигон" +msgstr "Превръщане в Polygon2D" #: editor/plugins/sprite_editor_plugin.cpp msgid "Invalid geometry, can't create collision polygon." @@ -7774,19 +7571,16 @@ msgid "Grow (Pixels): " msgstr "" #: editor/plugins/sprite_editor_plugin.cpp -#, fuzzy msgid "Update Preview" -msgstr "ОбновÑване от Ñцена" +msgstr "ОбновÑване на Ð¿Ñ€ÐµÐ´Ð²Ð°Ñ€Ð¸Ñ‚ÐµÐ»Ð½Ð¸Ñ Ð¿Ñ€ÐµÐ³Ð»ÐµÐ´" #: editor/plugins/sprite_editor_plugin.cpp -#, fuzzy msgid "Settings:" -msgstr "ÐаÑтройки" +msgstr "ÐаÑтройки:" #: editor/plugins/sprite_frames_editor_plugin.cpp -#, fuzzy msgid "No Frames Selected" -msgstr "Покажи СелекциÑта (вмеÑти в Ñ†ÐµÐ»Ð¸Ñ Ð¿Ñ€Ð¾Ð·Ð¾Ñ€ÐµÑ†)" +msgstr "ÐÑма избрани кадри" #: editor/plugins/sprite_frames_editor_plugin.cpp msgid "Add %d Frame(s)" @@ -7797,9 +7591,8 @@ msgid "Add Frame" msgstr "" #: editor/plugins/sprite_frames_editor_plugin.cpp -#, fuzzy msgid "Unable to load images" -msgstr "ÐеуÑпешно зареждане на реÑурÑите." +msgstr "ИзображениÑта не могат да бъдат заредени" #: editor/plugins/sprite_frames_editor_plugin.cpp msgid "ERROR: Couldn't load frame resource!" @@ -7826,19 +7619,16 @@ msgid "(empty)" msgstr "" #: editor/plugins/sprite_frames_editor_plugin.cpp -#, fuzzy msgid "Move Frame" -msgstr "Режим на ПремеÑтване" +msgstr "ПремеÑтване на кадъра" #: editor/plugins/sprite_frames_editor_plugin.cpp -#, fuzzy msgid "Animations:" -msgstr "Ðнимационни ИнÑтрументи" +msgstr "Ðнимации:" #: editor/plugins/sprite_frames_editor_plugin.cpp -#, fuzzy msgid "New Animation" -msgstr "Ðово Име на ÐнимациÑ:" +msgstr "Ðова анимациÑ" #: editor/plugins/sprite_frames_editor_plugin.cpp msgid "Speed (FPS):" @@ -7849,14 +7639,12 @@ msgid "Loop" msgstr "" #: editor/plugins/sprite_frames_editor_plugin.cpp -#, fuzzy msgid "Animation Frames:" -msgstr "Ðово Име на ÐнимациÑ:" +msgstr "Кадри на анимациÑта:" #: editor/plugins/sprite_frames_editor_plugin.cpp -#, fuzzy msgid "Add a Texture from File" -msgstr "ПремеÑтване на пътечката нагоре." +msgstr "ДобавÑне на текÑтура от файл" #: editor/plugins/sprite_frames_editor_plugin.cpp msgid "Add Frames from a Sprite Sheet" @@ -7871,18 +7659,16 @@ msgid "Insert Empty (After)" msgstr "" #: editor/plugins/sprite_frames_editor_plugin.cpp -#, fuzzy msgid "Move (Before)" -msgstr "ПоÑтавÑне на възелите" +msgstr "ПремеÑтване (преди)" #: editor/plugins/sprite_frames_editor_plugin.cpp msgid "Move (After)" msgstr "" #: editor/plugins/sprite_frames_editor_plugin.cpp -#, fuzzy msgid "Select Frames" -msgstr "Режим на Селектиране" +msgstr "Избиране на кадри" #: editor/plugins/sprite_frames_editor_plugin.cpp msgid "Horizontal:" @@ -7893,9 +7679,8 @@ msgid "Vertical:" msgstr "" #: editor/plugins/sprite_frames_editor_plugin.cpp -#, fuzzy msgid "Select/Clear All Frames" -msgstr "Избиране на вÑичко" +msgstr "Избиране/изчиÑтване на вÑички кадри" #: editor/plugins/sprite_frames_editor_plugin.cpp msgid "Create Frames from Sprite Sheet" @@ -7964,14 +7749,12 @@ msgid "Remove All Items" msgstr "" #: editor/plugins/theme_editor_plugin.cpp editor/project_manager.cpp -#, fuzzy msgid "Remove All" -msgstr "ЗатварÑне на вÑичко" +msgstr "Премахване на вÑичко" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Edit Theme" -msgstr "Файл:" +msgstr "Редактиране на темата" #: editor/plugins/theme_editor_plugin.cpp msgid "Theme editing menu." @@ -8003,18 +7786,16 @@ msgid "Toggle Button" msgstr "Средно копче" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Disabled Button" -msgstr "Средно копче" +msgstr "Заключен бутон" #: editor/plugins/theme_editor_plugin.cpp msgid "Item" msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Disabled Item" -msgstr "Изключено" +msgstr "Заключен елемент" #: editor/plugins/theme_editor_plugin.cpp msgid "Check Item" @@ -8057,9 +7838,8 @@ msgid "Many" msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Disabled LineEdit" -msgstr "Изключено" +msgstr "Заключено текÑтово поле" #: editor/plugins/theme_editor_plugin.cpp msgid "Tab 1" @@ -8074,9 +7854,8 @@ msgid "Tab 3" msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Editable Item" -msgstr "Промени Филтрите" +msgstr "Редактируем елемент" #: editor/plugins/theme_editor_plugin.cpp msgid "Subtree" @@ -8567,7 +8346,7 @@ msgstr "Файл:" msgid "No VCS addons are available." msgstr "" -#: editor/plugins/version_control_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/version_control_editor_plugin.cpp msgid "Error" msgstr "" @@ -8757,7 +8536,7 @@ msgstr "Ðаправи дупликат на Key(s)" #: editor/plugins/visual_shader_editor_plugin.cpp #: modules/visual_script/visual_script_editor.cpp msgid "Paste Nodes" -msgstr "ПоÑтавÑне на възелите" +msgstr "ПоÑтавÑне на възлите" #: editor/plugins/visual_shader_editor_plugin.cpp #, fuzzy @@ -9691,11 +9470,16 @@ msgid "Export With Debug" msgstr "" #: editor/project_manager.cpp -msgid "The path does not exist." +msgid "The path specified doesn't exist." +msgstr "" + +#: editor/project_manager.cpp +msgid "Error opening package file (it's not in ZIP format)." msgstr "" #: editor/project_manager.cpp -msgid "Invalid '.zip' project file, does not contain a 'project.godot' file." +msgid "" +"Invalid \".zip\" project file; it doesn't contain a \"project.godot\" file." msgstr "" #: editor/project_manager.cpp @@ -9705,11 +9489,11 @@ msgstr "МолÑ, изнеÑете извън папката на проекта #: editor/project_manager.cpp #, fuzzy -msgid "Please choose a 'project.godot' or '.zip' file." +msgid "Please choose a \"project.godot\" or \".zip\" file." msgstr "МолÑ, изнеÑете извън папката на проекта!" #: editor/project_manager.cpp -msgid "Directory already contains a Godot project." +msgid "This directory already contains a Godot project." msgstr "" #: editor/project_manager.cpp @@ -9790,11 +9574,11 @@ msgstr "ИнÑталиране" #: editor/project_manager.cpp msgid "Project Name:" -msgstr "Име:" +msgstr "Име на проекта:" #: editor/project_manager.cpp msgid "Project Path:" -msgstr "Път:" +msgstr "Път до проекта:" #: editor/project_manager.cpp #, fuzzy @@ -9935,7 +9719,7 @@ msgstr "" #: editor/project_manager.cpp msgid "Project Manager" -msgstr "ДиÑпечер на проектите" +msgstr "Управление на проектите" #: editor/project_manager.cpp #, fuzzy @@ -10040,15 +9824,15 @@ msgstr "" #: editor/project_settings_editor.cpp msgid "Left Button" -msgstr "ЛÑво копче" +msgstr "ЛÑв бутон" #: editor/project_settings_editor.cpp msgid "Right Button" -msgstr "ДÑÑно копче" +msgstr "ДеÑен бутон" #: editor/project_settings_editor.cpp msgid "Middle Button" -msgstr "Средно копче" +msgstr "Среден бутон" #: editor/project_settings_editor.cpp msgid "Wheel Up Button" @@ -10104,19 +9888,19 @@ msgstr "" #: editor/project_settings_editor.cpp msgid "Button" -msgstr "Копче" +msgstr "Бутон" #: editor/project_settings_editor.cpp msgid "Left Button." -msgstr "ЛÑво копче." +msgstr "ЛÑв бутон." #: editor/project_settings_editor.cpp msgid "Right Button." -msgstr "ДÑÑно копче." +msgstr "ДеÑен бутон." #: editor/project_settings_editor.cpp msgid "Middle Button." -msgstr "Средно копче." +msgstr "Среден бутон." #: editor/project_settings_editor.cpp msgid "Wheel Up." @@ -10210,7 +9994,7 @@ msgstr "" #: editor/project_settings_editor.cpp msgid "Project Settings (project.godot)" -msgstr "ÐаÑтройки на проекта" +msgstr "ÐаÑтройки на проекта (project.godot)" #: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp msgid "General" @@ -10356,7 +10140,7 @@ msgstr "" #: editor/property_selector.cpp msgid "Select Property" -msgstr "Изберете ÑвойÑтво" +msgstr "Избиране на ÑвойÑтво" #: editor/property_selector.cpp #, fuzzy @@ -10365,7 +10149,7 @@ msgstr "Изберете метод" #: editor/property_selector.cpp msgid "Select Method" -msgstr "Изберете метод" +msgstr "Избиране на метод" #: editor/rename_dialog.cpp editor/scene_tree_dock.cpp msgid "Batch Rename" @@ -10380,6 +10164,11 @@ msgid "Suffix" msgstr "" #: editor/rename_dialog.cpp +#, fuzzy +msgid "Use Regular Expressions" +msgstr "Двуизмерна текÑтура" + +#: editor/rename_dialog.cpp msgid "Advanced Options" msgstr "" @@ -10416,7 +10205,7 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -msgid "Per Level counter" +msgid "Per-level Counter" msgstr "" #: editor/rename_dialog.cpp @@ -10447,10 +10236,6 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -msgid "Regular Expressions" -msgstr "" - -#: editor/rename_dialog.cpp msgid "Post-Process" msgstr "" @@ -10459,11 +10244,11 @@ msgid "Keep" msgstr "" #: editor/rename_dialog.cpp -msgid "CamelCase to under_scored" +msgid "PascalCase to snake_case" msgstr "" #: editor/rename_dialog.cpp -msgid "under_scored to CamelCase" +msgid "snake_case to PascalCase" msgstr "" #: editor/rename_dialog.cpp @@ -10482,6 +10267,14 @@ msgstr "" msgid "Reset" msgstr "" +#: editor/rename_dialog.cpp +msgid "Regular Expression Error" +msgstr "" + +#: editor/rename_dialog.cpp +msgid "At character %s" +msgstr "" + #: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp msgid "Reparent Node" msgstr "" @@ -10718,9 +10511,8 @@ msgid "Add Child Node" msgstr "" #: editor/scene_tree_dock.cpp -#, fuzzy msgid "Expand/Collapse All" -msgstr "ЗатварÑне на вÑичко" +msgstr "Разгъване/Ñвиване на вÑичко" #: editor/scene_tree_dock.cpp msgid "Change Type" @@ -10951,7 +10743,7 @@ msgid "Invalid inherited parent name or path." msgstr "" #: editor/script_create_dialog.cpp -msgid "Script is valid." +msgid "Script path/name is valid." msgstr "" #: editor/script_create_dialog.cpp @@ -11056,6 +10848,10 @@ msgid "Copy Error" msgstr "Грешки" #: editor/script_editor_debugger.cpp +msgid "Video RAM" +msgstr "" + +#: editor/script_editor_debugger.cpp #, fuzzy msgid "Skip Breakpoints" msgstr "Създай точки." @@ -11106,10 +10902,6 @@ msgid "Total:" msgstr "" #: editor/script_editor_debugger.cpp -msgid "Video Mem" -msgstr "" - -#: editor/script_editor_debugger.cpp msgid "Resource Path" msgstr "" @@ -11334,13 +11126,13 @@ msgstr "Ðевалиден формат на инÑтанциÑта в речнР#: modules/gdscript/gdscript_functions.cpp msgid "Invalid instance dictionary format (can't load script at @path)" msgstr "" -"Ðевалиден формат на инÑтанциÑта в речника (Ñкриптът в @path не може да бъде " +"Ðеправилен формат на инÑтанциÑта в речника (Ñкриптът в @path не може да бъде " "зареден)" #: modules/gdscript/gdscript_functions.cpp msgid "Invalid instance dictionary format (invalid script at @path)" msgstr "" -"Ðевалиден формат на инÑтанциÑта в речника (Ñкриптът в @path е невалиден)" +"Ðеправилен формат на инÑтанциÑта в речника (Ñкриптът в @path е невалиден)" #: modules/gdscript/gdscript_functions.cpp #, fuzzy @@ -11895,7 +11687,7 @@ msgstr "" #: modules/visual_script/visual_script_editor.cpp msgid "Cut Nodes" -msgstr "ИзрÑзване на възелите" +msgstr "ИзрÑзване на възлите" #: modules/visual_script/visual_script_editor.cpp #, fuzzy @@ -12218,13 +12010,14 @@ msgid "" "CollisionObject2D derived node. Please only use it as a child of Area2D, " "StaticBody2D, RigidBody2D, KinematicBody2D, etc. to give them a shape." msgstr "" -"CollisionPolygon2D Ñлужи Ñамо за да даде форма за колизии на " -"CollisionObject2D. МолÑ, използвайте го Ñамо като наÑледник на Area2D, " -"StaticBody2D, RigidBody2D, KinematicBody2D, и Ñ‚.н. за да им дадете форма." +"CollisionPolygon2D Ñлужи Ñамо, за да даде форма за колизии на " +"CollisionObject2D. МолÑ, използвайте го като наÑледник на Area2D, " +"StaticBody2D, RigidBody2D, KinematicBody2D и Ñ‚.н. Ñамо, за да им дадете " +"форма." #: scene/2d/collision_polygon_2d.cpp msgid "An empty CollisionPolygon2D has no effect on collision." -msgstr "Празен CollisionPolygon2D нÑма никакъв ефект на колизиÑта." +msgstr "Празен CollisionPolygon2D не влиÑе на колизиите." #: scene/2d/collision_shape_2d.cpp msgid "" @@ -12232,9 +12025,10 @@ msgid "" "CollisionObject2D derived node. Please only use it as a child of Area2D, " "StaticBody2D, RigidBody2D, KinematicBody2D, etc. to give them a shape." msgstr "" -"CollisionShape2D Ñлужи Ñамо за да даде форма за колизии на " -"CollisionObject2D. МолÑ, използвайте го Ñамо като наÑледник на Area2D, " -"StaticBody2D, RigidBody2D, KinematicBody2D, и Ñ‚.н. за да им дадете форма." +"CollisionShape2D Ñлужи Ñамо, за да даде форма за колизии на " +"CollisionObject2D. МолÑ, използвайте го като наÑледник на Area2D, " +"StaticBody2D, RigidBody2D, KinematicBody2D, и Ñ‚.н. Ñамо, за да им дадете " +"форма." #: scene/2d/collision_shape_2d.cpp #, fuzzy @@ -12264,8 +12058,8 @@ msgstr "" msgid "" "An occluder polygon must be set (or drawn) for this occluder to take effect." msgstr "" -"ЗатъмнÑващиÑÑ‚ многоъгълник трÑбва да бъде зададен (или нариÑуван) за да може " -"да работи тази ÑÑнка." +"ЗакриващиÑÑ‚ полигон трÑбва да бъде зададен (или нариÑуван), за да може да " +"работи прикриването." #: scene/2d/light_occluder_2d.cpp #, fuzzy @@ -12277,21 +12071,21 @@ msgid "" "A NavigationPolygon resource must be set or created for this node to work. " "Please set a property or draw a polygon." msgstr "" -"За този възел трÑбва да бъде зададен или Ñъздаден един реÑÑƒÑ€Ñ " -"NavigationPolygon. МолÑ, задайте или нариÑувайте един многоъгълник." +"За този възел трÑбва да бъде зададен или Ñъздаден реÑÑƒÑ€Ñ NavigationPolygon. " +"МолÑ, задайте ÑвойÑтво или нариÑувайте полигон." #: scene/2d/navigation_polygon.cpp msgid "" "NavigationPolygonInstance must be a child or grandchild to a Navigation2D " "node. It only provides navigation data." msgstr "" -"NavigationPolygonInstance трÑбва да бъде наÑледник или наÑледник на " -"наÑледник на Navigation2D. Той Ñамо дава навигационна информациÑ." +"NavigationPolygonInstance трÑбва да бъде наÑледник или поднаÑледник на " +"Navigation2D. Той дава Ñамо навигационна информациÑ." #: scene/2d/parallax_layer.cpp msgid "" "ParallaxLayer node only works when set as child of a ParallaxBackground node." -msgstr "ParallaxLayer работи Ñамо когато е наÑледник на ParallaxBackground." +msgstr "ParallaxLayer работи Ñамо, когато е наÑледник на ParallaxBackground." #: scene/2d/particles_2d.cpp msgid "" @@ -12314,7 +12108,7 @@ msgstr "" #: scene/2d/path_2d.cpp msgid "PathFollow2D only works when set as a child of a Path2D node." -msgstr "PathFollow2D работи Ñамо когато е наÑледник на Path2D." +msgstr "PathFollow2D работи Ñамо, когато е наÑледник на Path2D." #: scene/2d/physics_body_2d.cpp msgid "" @@ -12326,8 +12120,7 @@ msgstr "" #: scene/2d/remote_transform_2d.cpp msgid "Path property must point to a valid Node2D node to work." msgstr "" -"Параметърът 'Path' трÑбва да Ñочи към дейÑтвителен възел Node2D, за да " -"работи." +"СвойÑтвото Path трÑбва да Ñочи към дейÑтвителен възел Node2D, за да работи." #: scene/2d/skeleton_2d.cpp msgid "This Bone2D chain should end at a Skeleton2D node." @@ -12725,6 +12518,9 @@ msgstr "" msgid "Constants cannot be modified." msgstr "" +#~ msgid "Replaced %d occurrence(s)." +#~ msgstr "Заменени ÑъвпадениÑ: %d ." + #, fuzzy #~ msgid "Brief Description" #~ msgstr "Кратко ОпиÑание:" diff --git a/editor/translations/bn.po b/editor/translations/bn.po index 3cfcc98809..a7f287be62 100644 --- a/editor/translations/bn.po +++ b/editor/translations/bn.po @@ -733,8 +733,9 @@ msgid "Line Number:" msgstr "লাইন নামà§à¦¬à¦¾à¦°:" #: editor/code_editor.cpp -msgid "Replaced %d occurrence(s)." -msgstr "%d সংখà§à¦¯à¦• সংঘটন পà§à¦°à¦¤à¦¿à¦¸à§à¦¥à¦¾à¦ªà¦¿à¦¤ হয়েছে ।" +#, fuzzy +msgid "%d replaced." +msgstr "পà§à¦°à¦¤à¦¿à¦¸à§à¦¥à¦¾à¦ªà¦¨..." #: editor/code_editor.cpp editor/editor_help.cpp msgid "%d match." @@ -4258,6 +4259,11 @@ msgid "Saving..." msgstr "সংরকà§à¦·à¦¿à¦¤ হচà§à¦›à§‡..." #: editor/import_dock.cpp +#, fuzzy +msgid "%d Files" +msgstr "ফাইল" + +#: editor/import_dock.cpp msgid "Set as Default for '%s'" msgstr "'%s' à¦à¦° জনà§à¦¯ ডিফলà§à¦Ÿ হিসাবে সেট করà§à¦¨" @@ -4267,11 +4273,6 @@ msgstr "'%s' à¦à¦° জনà§à¦¯ ডিফলà§à¦Ÿ কà§à¦²à¦¿à§Ÿà¦¾à¦° কঠ#: editor/import_dock.cpp #, fuzzy -msgid " Files" -msgstr "ফাইল" - -#: editor/import_dock.cpp -#, fuzzy msgid "Import As:" msgstr "ইমà§à¦ªà§‹à¦°à§à¦Ÿ" @@ -6302,12 +6303,13 @@ msgid "Mesh is empty!" msgstr "মেসটি খালি!" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Trimesh Body" -msgstr "সà§à¦¥à¦¿à¦¤-টà§à¦°à¦¾à¦‡à¦®à§‡à¦¸ বডি গঠন করà§à¦¨" +#, fuzzy +msgid "Couldn't create a Trimesh collision shape." +msgstr "টà§à¦°à¦¾à¦‡à¦®à§‡à¦¸ কলিশ়ন সহোদর তৈরি করà§à¦¨" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Convex Body" -msgstr "সà§à¦¥à¦¿à¦¤-কনà¦à§‡à¦•à§à¦¸ বডি গঠন করà§à¦¨" +msgid "Create Static Trimesh Body" +msgstr "সà§à¦¥à¦¿à¦¤-টà§à¦°à¦¾à¦‡à¦®à§‡à¦¸ বডি গঠন করà§à¦¨" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "This doesn't work on scene root!" @@ -6319,12 +6321,30 @@ msgid "Create Trimesh Static Shape" msgstr "টà§à¦°à¦¾à¦‡à¦®à§‡à¦¸ আকার তৈরি করà§à¦¨" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Failed creating shapes!" +msgid "Can't create a single convex collision shape for the scene root." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Couldn't create a single convex collision shape." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp #, fuzzy -msgid "Create Convex Shape(s)" +msgid "Create Single Convex Shape" +msgstr "কনà¦à§‡à¦•à§à¦¸ আকার তৈরি করà§à¦¨" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Can't create multiple convex collision shapes for the scene root." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Couldn't create any collision shapes." +msgstr "ফোলà§à¦¡à¦¾à¦° তৈরী করা সমà§à¦à¦¬ হয়নি।" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Multiple Convex Shapes" msgstr "কনà¦à§‡à¦•à§à¦¸ আকার তৈরি করà§à¦¨" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -6376,19 +6396,57 @@ msgid "Create Trimesh Static Body" msgstr "সà§à¦¥à¦¿à¦¤-টà§à¦°à¦¾à¦‡à¦®à§‡à¦¸ বডি তৈরি করà§à¦¨" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a StaticBody and assigns a polygon-based collision shape to it " +"automatically.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Trimesh Collision Sibling" msgstr "টà§à¦°à¦¾à¦‡à¦®à§‡à¦¸ কলিশ়ন সহোদর তৈরি করà§à¦¨" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp #, fuzzy -msgid "Create Convex Collision Sibling(s)" +msgid "Create Single Convex Collision Siblings" msgstr "কনà¦à§‡à¦•à§à¦¸ কলিশ়ন সহোদর তৈরি করà§à¦¨" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a single convex collision shape.\n" +"This is the fastest (but least accurate) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Multiple Convex Collision Siblings" +msgstr "কনà¦à§‡à¦•à§à¦¸ কলিশ়ন সহোদর তৈরি করà§à¦¨" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is a performance middle-ground between the two above options." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Outline Mesh..." msgstr "পà§à¦°à¦¾à¦¨à§à¦¤à¦°à§‡à¦–া মেস তৈরি করà§à¦¨..." #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a static outline mesh. The outline mesh will have its normals " +"flipped automatically.\n" +"This can be used instead of the SpatialMaterial Grow property when using " +"that property isn't possible." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp #, fuzzy msgid "View UV1" msgstr "দৃশà§à¦¯/পরিদরà§à¦¶à¦¨" @@ -9005,7 +9063,7 @@ msgstr "TileSet (টাইল-সেট)..." msgid "No VCS addons are available." msgstr "" -#: editor/plugins/version_control_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/version_control_editor_plugin.cpp msgid "Error" msgstr "সমসà§à¦¯à¦¾/à¦à§à¦²" @@ -10180,12 +10238,18 @@ msgstr "Tile Set à¦à¦•à§à¦¸à¦ªà§‹à¦°à§à¦Ÿ করà§à¦¨" #: editor/project_manager.cpp #, fuzzy -msgid "The path does not exist." +msgid "The path specified doesn't exist." msgstr "ফাইলটি বিদà§à¦¯à¦®à¦¾à¦¨ নয়।" #: editor/project_manager.cpp #, fuzzy -msgid "Invalid '.zip' project file, does not contain a 'project.godot' file." +msgid "Error opening package file (it's not in ZIP format)." +msgstr "জিপ ফরমà§à¦¯à¦¾à¦Ÿ খà§à¦à¦œà§‡ পেতে বà§à¦¯à¦¾à¦°à§à¦¥, পà§à¦¯à¦¾à¦•েজ ফাইল ওপেন করা যায়নি।" + +#: editor/project_manager.cpp +#, fuzzy +msgid "" +"Invalid \".zip\" project file; it doesn't contain a \"project.godot\" file." msgstr "à¦à¦®à¦¨ à¦à¦•টি ফোলà§à¦¡à¦¾à¦° বাছাই করà§à¦¨ যেখানে 'project.godot' নামে কোন ফাইল নেই।" #: editor/project_manager.cpp @@ -10195,11 +10259,11 @@ msgstr "অনà§à¦—à§à¦°à¦¹ করে পà§à¦°à¦•লà§à¦ªà§‡à¦° ফোলৠ#: editor/project_manager.cpp #, fuzzy -msgid "Please choose a 'project.godot' or '.zip' file." +msgid "Please choose a \"project.godot\" or \".zip\" file." msgstr "অনà§à¦—à§à¦°à¦¹ করে পà§à¦°à¦•লà§à¦ªà§‡à¦° ফোলà§à¦¡à¦¾à¦°à§‡à¦° বাইরে à¦à¦•à§à¦¸à¦ªà§‹à¦°à§à¦Ÿ করà§à¦¨!" #: editor/project_manager.cpp -msgid "Directory already contains a Godot project." +msgid "This directory already contains a Godot project." msgstr "" #: editor/project_manager.cpp @@ -10905,6 +10969,11 @@ msgstr "" #: editor/rename_dialog.cpp #, fuzzy +msgid "Use Regular Expressions" +msgstr "অà¦à¦¿à¦¬à§à¦¯à¦•à§à¦¤à¦¿ (Expression) পরিবরà§à¦¤à¦¨ করà§à¦¨" + +#: editor/rename_dialog.cpp +#, fuzzy msgid "Advanced Options" msgstr "অà§à¦¯à¦¾à¦¨à¦¿à¦®à§‡à¦¶à¦¨à§‡à¦° সিদà§à¦§à¦¾à¦¨à§à¦¤à¦¸à¦®à§‚হ" @@ -10943,7 +11012,7 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -msgid "Per Level counter" +msgid "Per-level Counter" msgstr "" #: editor/rename_dialog.cpp @@ -10975,11 +11044,6 @@ msgstr "" #: editor/rename_dialog.cpp #, fuzzy -msgid "Regular Expressions" -msgstr "অà¦à¦¿à¦¬à§à¦¯à¦•à§à¦¤à¦¿ (Expression) পরিবরà§à¦¤à¦¨ করà§à¦¨" - -#: editor/rename_dialog.cpp -#, fuzzy msgid "Post-Process" msgstr "পà§à¦°à¦•à§à¦°à¦¿à¦¯à¦¼à¦¾-পরবরà§à¦¤à§€ সà§à¦•à§à¦°à¦¿à¦ªà§à¦Ÿ:" @@ -10988,11 +11052,11 @@ msgid "Keep" msgstr "রাখà§à¦¨" #: editor/rename_dialog.cpp -msgid "CamelCase to under_scored" +msgid "PascalCase to snake_case" msgstr "" #: editor/rename_dialog.cpp -msgid "under_scored to CamelCase" +msgid "snake_case to PascalCase" msgstr "" #: editor/rename_dialog.cpp @@ -11014,6 +11078,16 @@ msgstr "বড় হাতের অকà§à¦·à¦°" msgid "Reset" msgstr "সমà§à¦ªà§à¦°à¦¸à¦¾à¦°à¦¨/সংকোচন অপসারণ করà§à¦¨ (রিসেট জà§à¦®à§)" +#: editor/rename_dialog.cpp +#, fuzzy +msgid "Regular Expression Error" +msgstr "অà¦à¦¿à¦¬à§à¦¯à¦•à§à¦¤à¦¿ (Expression) পরিবরà§à¦¤à¦¨ করà§à¦¨" + +#: editor/rename_dialog.cpp +#, fuzzy +msgid "At character %s" +msgstr "গà§à¦°à¦¹à¦¨à¦¯à§‹à¦—à§à¦¯ অকà§à¦·à¦°à¦¸à¦®à§‚হ:" + #: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp msgid "Reparent Node" msgstr "নোডের নতà§à¦¨ অà¦à¦¿à¦à¦¾à¦¬à¦• দান করà§à¦¨" @@ -11517,7 +11591,7 @@ msgstr "সূচক/ইনডেকà§à¦¸ মানের অগà§à¦°à¦¹à¦¨à¦¯ #: editor/script_create_dialog.cpp #, fuzzy -msgid "Script is valid." +msgid "Script path/name is valid." msgstr "সà§à¦•à§à¦°à¦¿à¦ªà§à¦Ÿ" #: editor/script_create_dialog.cpp @@ -11628,6 +11702,11 @@ msgstr "à¦à§à¦²/সমসà§à¦¯à¦¾-সমূহ লোড করà§à¦¨" #: editor/script_editor_debugger.cpp #, fuzzy +msgid "Video RAM" +msgstr "à¦à¦¿à¦¡à¦¿à¦“ মেমোরি" + +#: editor/script_editor_debugger.cpp +#, fuzzy msgid "Skip Breakpoints" msgstr "বিনà§à¦¦à§ অপসারণ করà§à¦¨" @@ -11677,10 +11756,6 @@ msgid "Total:" msgstr "সরà§à¦¬à¦®à§‹à¦Ÿ:" #: editor/script_editor_debugger.cpp -msgid "Video Mem" -msgstr "à¦à¦¿à¦¡à¦¿à¦“ মেমোরি" - -#: editor/script_editor_debugger.cpp msgid "Resource Path" msgstr "রিসোরà§à¦¸-à¦à¦° পথ" @@ -13384,6 +13459,12 @@ msgstr "" msgid "Constants cannot be modified." msgstr "" +#~ msgid "Replaced %d occurrence(s)." +#~ msgstr "%d সংখà§à¦¯à¦• সংঘটন পà§à¦°à¦¤à¦¿à¦¸à§à¦¥à¦¾à¦ªà¦¿à¦¤ হয়েছে ।" + +#~ msgid "Create Static Convex Body" +#~ msgstr "সà§à¦¥à¦¿à¦¤-কনà¦à§‡à¦•à§à¦¸ বডি গঠন করà§à¦¨" + #, fuzzy #~ msgid "" #~ "There are currently no tutorials for this class, you can [color=$color]" diff --git a/editor/translations/ca.po b/editor/translations/ca.po index dc618c880f..fb0a3af30c 100644 --- a/editor/translations/ca.po +++ b/editor/translations/ca.po @@ -4,18 +4,19 @@ # This file is distributed under the same license as the Godot source code. # BennyBeat <bennybeat@gmail.com>, 2017. # Javier Ocampos <xavier.ocampos@gmail.com>, 2018. -# Roger Blanco Ribera <roger.blancoribera@gmail.com>, 2016-2018. +# Roger Blanco Ribera <roger.blancoribera@gmail.com>, 2016-2018, 2020. # Rubén Moreno <ruben.moreno.romero@gmail.com>, 2018. -# roger <616steam@gmail.com>, 2019. +# roger <616steam@gmail.com>, 2019, 2020. # Roger BR <drai_kin@hotmail.com>, 2019. # Adolfo Jayme Barrientos <fitojb@ubuntu.com>, 2020. # Xavier Gomez <hiulit@gmail.com>, 2020. +# Aina <ainasoga@gmail.com>, 2020. msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2020-01-27 07:09+0000\n" -"Last-Translator: Xavier Gomez <hiulit@gmail.com>\n" +"PO-Revision-Date: 2020-02-07 10:32+0000\n" +"Last-Translator: Roger Blanco Ribera <roger.blancoribera@gmail.com>\n" "Language-Team: Catalan <https://hosted.weblate.org/projects/godot-engine/" "godot/ca/>\n" "Language: ca\n" @@ -31,9 +32,8 @@ msgid "Invalid type argument to convert(), use TYPE_* constants." msgstr "L'argument per a convert() no és và lid, utilitzeu constants TYPE_*." #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp -#, fuzzy msgid "Expected a string of length 1 (a character)." -msgstr "S'esperava una cadena de longitud 1 (un carà cter)." +msgstr "S'esperava una cadena de carà cters de longitud 1 (un carà cter)." #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/mono/glue/gd_glue.cpp @@ -166,29 +166,24 @@ msgid "Anim Change Call" msgstr "Canviar crida d'animació" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Anim Multi Change Keyframe Time" -msgstr "Modifica el temps de la clau" +msgstr "Modifica el temps de diverses claus d'animació" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Anim Multi Change Transition" -msgstr "Modifica la Transició d'Animació" +msgstr "Modifica diverses transicions d'animació" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Anim Multi Change Transform" -msgstr "Modifica la Transformació de l'Animació" +msgstr "Modifica diverses transformacions de l'animació" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Anim Multi Change Keyframe Value" -msgstr "Modifica el valor de la clau" +msgstr "Modifica el valor de diverses claus d'animació" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Anim Multi Change Call" -msgstr "Canviar crida d'animació" +msgstr "Canviar diverses crides d'animació" #: editor/animation_track_editor.cpp msgid "Change Animation Length" @@ -699,16 +694,15 @@ msgid "Line Number:" msgstr "LÃnia:" #: editor/code_editor.cpp -msgid "Replaced %d occurrence(s)." -msgstr "%d ocurrència/es reemplaçades." +#, fuzzy +msgid "%d replaced." +msgstr "Substitueix..." #: editor/code_editor.cpp editor/editor_help.cpp -#, fuzzy msgid "%d match." msgstr "%d coincidència." #: editor/code_editor.cpp editor/editor_help.cpp -#, fuzzy msgid "%d matches." msgstr "%d coincidències." @@ -1631,19 +1625,16 @@ msgid "Scene Tree Editing" msgstr "Edició de l'arbre d'escenes" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Import Dock" -msgstr "Importa" +msgstr "Importació" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Node Dock" -msgstr "Node mogut" +msgstr "Nodes" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "FileSystem and Import Docks" -msgstr "Sistema de Fitxers" +msgstr "Importació i sistema de fitxers" #: editor/editor_feature_profile.cpp msgid "Erase profile '%s'? (no undo)" @@ -1714,9 +1705,8 @@ msgid "Current Profile:" msgstr "Perfil Actual:" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Make Current" -msgstr "Fer Actual" +msgstr "Fés l'actual" #: editor/editor_feature_profile.cpp #: editor/plugins/animation_player_editor_plugin.cpp @@ -1750,9 +1740,8 @@ msgid "Erase Profile" msgstr "Esborrar Perfil" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Godot Feature Profile" -msgstr "Administra els Perfils de CaracterÃstiques de l'Editor" +msgstr "Perfil de les funcionalitats del Godot" #: editor/editor_feature_profile.cpp msgid "Import Profile(s)" @@ -1955,28 +1944,24 @@ msgid "Inherited by:" msgstr "Heretat per:" #: editor/editor_help.cpp -#, fuzzy msgid "Description" -msgstr "Descripció:" +msgstr "Descripció" #: editor/editor_help.cpp -#, fuzzy msgid "Online Tutorials" -msgstr "Tutorials en lÃnia:" +msgstr "Tutorials en lÃnia" #: editor/editor_help.cpp msgid "Properties" msgstr "Propietats" #: editor/editor_help.cpp -#, fuzzy msgid "override:" -msgstr "Sobreescriu" +msgstr "Sobreescriu:" #: editor/editor_help.cpp -#, fuzzy msgid "default:" -msgstr "Predeterminat" +msgstr "predeterminat:" #: editor/editor_help.cpp msgid "Methods" @@ -1999,9 +1984,8 @@ msgid "Property Descriptions" msgstr "Descripcions de la Propietat" #: editor/editor_help.cpp -#, fuzzy msgid "(value)" -msgstr "Valor" +msgstr "(valor)" #: editor/editor_help.cpp msgid "" @@ -2033,9 +2017,8 @@ msgid "Case Sensitive" msgstr "Majúscules i minúscules" #: editor/editor_help_search.cpp -#, fuzzy msgid "Show Hierarchy" -msgstr "Mostrar els Ajudants" +msgstr "Mostra la jerarquia" #: editor/editor_help_search.cpp msgid "Display All" @@ -2074,9 +2057,8 @@ msgid "Class" msgstr "Classe" #: editor/editor_help_search.cpp -#, fuzzy msgid "Method" -msgstr "Mètodes" +msgstr "Mètode" #: editor/editor_help_search.cpp editor/plugins/script_text_editor.cpp msgid "Signal" @@ -2087,9 +2069,8 @@ msgid "Constant" msgstr "Constant" #: editor/editor_help_search.cpp -#, fuzzy msgid "Property" -msgstr "Propietat:" +msgstr "Propietat" #: editor/editor_help_search.cpp #, fuzzy @@ -2145,9 +2126,8 @@ msgid "%s/s" msgstr "%s/s" #: editor/editor_network_profiler.cpp -#, fuzzy msgid "Down" -msgstr "Baixa" +msgstr "Avall" #: editor/editor_network_profiler.cpp msgid "Up" @@ -2158,32 +2138,28 @@ msgid "Node" msgstr "Node" #: editor/editor_network_profiler.cpp -#, fuzzy msgid "Incoming RPC" msgstr "RPC Entrant" #: editor/editor_network_profiler.cpp -#, fuzzy msgid "Incoming RSET" msgstr "RSET Entrant" #: editor/editor_network_profiler.cpp -#, fuzzy msgid "Outgoing RPC" msgstr "RPC Sortint" #: editor/editor_network_profiler.cpp -#, fuzzy msgid "Outgoing RSET" msgstr "RSET Sortint" #: editor/editor_node.cpp editor/project_manager.cpp msgid "New Window" -msgstr "Nova finestra" +msgstr "Finestra nova" #: editor/editor_node.cpp msgid "Imported resources can't be saved." -msgstr "Els recursos importats no es poden guardar." +msgstr "Els recursos importats no es poden desar." #: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp #: scene/gui/dialogs.cpp @@ -2192,7 +2168,7 @@ msgstr "D'acord" #: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp msgid "Error saving resource!" -msgstr "Error en desar recurs!" +msgstr "Error en desar el recurs!" #: editor/editor_node.cpp msgid "" @@ -2200,11 +2176,11 @@ msgid "" "Make it unique first." msgstr "" "Aquest recurs no es pot desar perquè no pertany a l'escena editada. Feu-lo " -"únic primer." +"únic abans." #: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp msgid "Save Resource As..." -msgstr "Anomena i Desa el Recurs..." +msgstr "Anomena i Desa el recurs..." #: editor/editor_node.cpp msgid "Can't open file for writing:" @@ -2259,6 +2235,9 @@ msgid "" "This scene can't be saved because there is a cyclic instancing inclusion.\n" "Please resolve it and then attempt to save again." msgstr "" +"Aquesta escena no es pot desar per culpa d'una inclusió cÃclica de " +"l'instanciació.\n" +"Resol-la i torna a desar altre cop." #: editor/editor_node.cpp msgid "" @@ -2343,7 +2322,6 @@ msgstr "" "més informació." #: editor/editor_node.cpp -#, fuzzy msgid "" "This is a remote object, so changes to it won't be kept.\n" "Please read the documentation relevant to debugging to better understand " @@ -2395,9 +2373,8 @@ msgid "Save changes to '%s' before closing?" msgstr "Desar els canvis a '%s' abans de tancar?" #: editor/editor_node.cpp -#, fuzzy msgid "Saved %s modified resource(s)." -msgstr "Desat(s) el(s) recurs(os) modificat(s) %s." +msgstr "Desat(s) el(s) %s recurs(os) modificat(s)." #: editor/editor_node.cpp msgid "A root node is required to save the scene." @@ -2505,7 +2482,7 @@ msgstr "Tanca l'Escena" #: editor/editor_node.cpp #, fuzzy msgid "Reopen Closed Scene" -msgstr "Tanca l'Escena" +msgstr "Reobrir l'escena tancada" #: editor/editor_node.cpp msgid "Unable to enable addon plugin at: '%s' parsing of config failed." @@ -2528,7 +2505,7 @@ msgid "" "Unable to load addon script from path: '%s' There seems to be an error in " "the code, please check the syntax." msgstr "" -"No es pot carregar el script d'addon des del camÃ: '%s' Sembla que hi ha un " +"No es pot carregar l'script d'addon des del camÃ: '%s' Sembla que hi ha un " "error en el codi, si us plau comproveu la sintaxi." #: editor/editor_node.cpp @@ -2628,7 +2605,7 @@ msgstr "Tanca la Pestanya" #: editor/editor_node.cpp #, fuzzy msgid "Undo Close Tab" -msgstr "Tanca la Pestanya" +msgstr "Desfer Tancament de Pestanya" #: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp msgid "Close Other Tabs" @@ -2762,14 +2739,12 @@ msgid "Project" msgstr "Projecte" #: editor/editor_node.cpp -#, fuzzy msgid "Project Settings..." -msgstr "Configuració del Projecte" +msgstr "Configuració del Projecte..." #: editor/editor_node.cpp editor/plugins/version_control_editor_plugin.cpp -#, fuzzy msgid "Version Control" -msgstr "Versió:" +msgstr "Control de Versions" #: editor/editor_node.cpp editor/plugins/version_control_editor_plugin.cpp #, fuzzy @@ -2782,9 +2757,8 @@ msgid "Shut Down Version Control" msgstr "Desactivar el control de versions" #: editor/editor_node.cpp -#, fuzzy msgid "Export..." -msgstr "Exportar" +msgstr "Exportar..." #: editor/editor_node.cpp #, fuzzy @@ -2906,9 +2880,8 @@ msgid "Editor" msgstr "Editor" #: editor/editor_node.cpp -#, fuzzy msgid "Editor Settings..." -msgstr "Configuració de l'Editor" +msgstr "Configuració de l'Editor..." #: editor/editor_node.cpp msgid "Editor Layout" @@ -3091,6 +3064,12 @@ msgid "" "the \"Use Custom Build\" option should be enabled in the Android export " "preset." msgstr "" +"S'inicialitzarà el projecte per a compilar per Android. La plantilla " +"s'instal·larà a \"res://android/build\".\n" +"Pots aplicar modificacions i generar el teu propi APK en exportar ( afegir " +"mòduls, canviar el manifest AndroidManifest.xml, etc.).\n" +"Habilita l'opció \"Utilitza Compilació Personalitzada\" en la configuració " +"d'exportació per a Android per personalitzar la compilació." #: editor/editor_node.cpp #, fuzzy @@ -3295,6 +3274,8 @@ msgid "" "Can't create a ViewportTexture on resources saved as a file.\n" "Resource needs to belong to a scene." msgstr "" +"No es pot crear una ViewportTexture en recursos desats en fitxers.\n" +"El Recurs ha de pertà nyer a un escena." #: editor/editor_properties.cpp msgid "" @@ -3303,6 +3284,10 @@ msgid "" "Please switch on the 'local to scene' property on it (and all resources " "containing it up to a node)." msgstr "" +"No es pot crear una ViewportTexture en aquest recurs ja que no s'ha definit " +"com local per a l'escena.\n" +"Activeu la propietat \"local a l'escena\" del recurs i també en tots els " +"recurs intermitjos que el continguin fins a un node." #: editor/editor_properties.cpp editor/property_editor.cpp msgid "Pick a Viewport" @@ -3314,7 +3299,7 @@ msgstr "Script Nou" #: editor/editor_properties.cpp editor/scene_tree_dock.cpp msgid "Extend Script" -msgstr "Estendre el script" +msgstr "Estendre l'script" #: editor/editor_properties.cpp editor/property_editor.cpp msgid "New %s" @@ -3491,6 +3476,8 @@ msgstr "No s'ha pogut l'objecte signatura." #: editor/export_template_manager.cpp msgid "Error parsing JSON of mirror list. Please report this issue!" msgstr "" +"S'ha produït un error en analitzar la llista JSON de rèpliques. Si us plau, " +"informeu d'aquest problema!" #: editor/export_template_manager.cpp msgid "" @@ -4012,6 +3999,10 @@ msgid "Saving..." msgstr "Desant..." #: editor/import_dock.cpp +msgid "%d Files" +msgstr "%d Fitxers" + +#: editor/import_dock.cpp msgid "Set as Default for '%s'" msgstr "Establir com a valor Predeterminat per a '%s'" @@ -4020,10 +4011,6 @@ msgid "Clear Default for '%s'" msgstr "Neteja el valor Predeterminat de '%s'" #: editor/import_dock.cpp -msgid " Files" -msgstr " Fitxers" - -#: editor/import_dock.cpp msgid "Import As:" msgstr "Importar com a:" @@ -4454,9 +4441,8 @@ msgid "Audio Clips" msgstr "Talls d'Àudio:" #: editor/plugins/animation_blend_tree_editor_plugin.cpp -#, fuzzy msgid "Functions" -msgstr "Funcions:" +msgstr "Funcions" #: editor/plugins/animation_blend_tree_editor_plugin.cpp #: editor/plugins/animation_state_machine_editor.cpp @@ -4766,14 +4752,12 @@ msgid "Remove selected node or transition." msgstr "Eliminar el node o transició seleccionats." #: editor/plugins/animation_state_machine_editor.cpp -#, fuzzy msgid "Toggle autoplay this animation on start, restart or seek to zero." msgstr "" -"Commuta auto reproducció d'aquesta animació en iniciar, reiniciar o buscar a " -"zero." +"Commuta l'auto reproducció d'aquesta animació en iniciar, reiniciar o buscar " +"a zero." #: editor/plugins/animation_state_machine_editor.cpp -#, fuzzy msgid "Set the end animation. This is useful for sub-transitions." msgstr "Definiu l'animació final. Això és útil per a sub-transicions." @@ -5045,20 +5029,23 @@ msgid "Download for this asset is already in progress!" msgstr "Ja s'està baixant aquest actiu!" #: editor/plugins/asset_library_editor_plugin.cpp +#, fuzzy msgid "Recently Updated" -msgstr "" +msgstr "Actualitzat Recentment" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Least Recently Updated" -msgstr "" +msgstr "Actualitzacions menys recents" #: editor/plugins/asset_library_editor_plugin.cpp +#, fuzzy msgid "Name (A-Z)" -msgstr "" +msgstr "Nom (A-Z)" #: editor/plugins/asset_library_editor_plugin.cpp +#, fuzzy msgid "Name (Z-A)" -msgstr "" +msgstr "Nom (Z-A)" #: editor/plugins/asset_library_editor_plugin.cpp #, fuzzy @@ -5269,16 +5256,15 @@ msgstr "" "anul·lats pels seus pares." #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Presets for the anchors and margins values of a Control node." -msgstr "" -"Predefinits per als ancoratges i els valors dels marges d'un node Control." +msgstr "Valors predefinits per als ancoratges i els marges d'un node Control." #: editor/plugins/canvas_item_editor_plugin.cpp msgid "" "When active, moving Control nodes changes their anchors instead of their " "margins." msgstr "" +"En activar-se, els nodes de Control afectaren les à ncores enlloc dels marges." #: editor/plugins/canvas_item_editor_plugin.cpp #, fuzzy @@ -5322,7 +5308,7 @@ msgstr "Part inferior" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Center" -msgstr "" +msgstr "Centre" #: editor/plugins/canvas_item_editor_plugin.cpp #, fuzzy @@ -5346,15 +5332,15 @@ msgstr "Vista Inferior" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "VCenter Wide" -msgstr "" +msgstr "CentreV Ample" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "HCenter Wide" -msgstr "" +msgstr "CentreH Ample" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Full Rect" -msgstr "" +msgstr "Rect. Complet" #: editor/plugins/canvas_item_editor_plugin.cpp #, fuzzy @@ -5379,6 +5365,8 @@ msgid "" "Game Camera Override\n" "Overrides game camera with editor viewport camera." msgstr "" +"Substitueix la cà mera del joc.\n" +"Substitueix la cà mera del joc per la la cà mera de l'editor." #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -5386,12 +5374,13 @@ msgid "" "Game Camera Override\n" "No game instance running." msgstr "" +"Substitueix la cà mera del joc.\n" +"Cap instà ncia del joc en execució." #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Lock Selected" -msgstr "Bloca el Seleccionat" +msgstr "Bloca la selecció" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -5548,9 +5537,8 @@ msgid "Snap Relative" msgstr "Ajustament Relatiu" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Use Pixel Snap" -msgstr "Utilitzar Ajustament amb els PÃxels" +msgstr "Utilitzar ajustament amb els PÃxels" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Smart Snapping" @@ -5571,7 +5559,6 @@ msgid "Snap to Node Anchor" msgstr "Ajustar a l'Àncora del Node" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Snap to Node Sides" msgstr "Ajustar als costats del node" @@ -5824,12 +5811,13 @@ msgstr "Mà scara d'Emissió" #: editor/plugins/cpu_particles_2d_editor_plugin.cpp #: editor/plugins/particles_2d_editor_plugin.cpp msgid "Solid Pixels" -msgstr "" +msgstr "PÃxels sòlids" #: editor/plugins/cpu_particles_2d_editor_plugin.cpp #: editor/plugins/particles_2d_editor_plugin.cpp +#, fuzzy msgid "Border Pixels" -msgstr "" +msgstr "PÃxels de la vora" #: editor/plugins/cpu_particles_2d_editor_plugin.cpp #: editor/plugins/particles_2d_editor_plugin.cpp @@ -5882,7 +5870,7 @@ msgstr "Sortida Lenta" #: editor/plugins/curve_editor_plugin.cpp msgid "Smoothstep" -msgstr "pas de Suavització" +msgstr "Progressió Suau (SmoothStep)" #: editor/plugins/curve_editor_plugin.cpp msgid "Modify Curve Point" @@ -5963,12 +5951,13 @@ msgid "Mesh is empty!" msgstr "La malla és buida!" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Trimesh Body" -msgstr "Crea un Cos Està tic a partir d'una malla de triangles" +#, fuzzy +msgid "Couldn't create a Trimesh collision shape." +msgstr "Crea una Col·lisió entre malles de triangles germanes" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Convex Body" -msgstr "Crea un Cos Està tic Convex" +msgid "Create Static Trimesh Body" +msgstr "Crea un Cos Està tic a partir d'una malla de triangles" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "This doesn't work on scene root!" @@ -5980,13 +5969,30 @@ msgid "Create Trimesh Static Shape" msgstr "Crea un forma amb una malla de triangles" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Can't create a single convex collision shape for the scene root." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Couldn't create a single convex collision shape." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp #, fuzzy -msgid "Failed creating shapes!" -msgstr "Ha fallat la creació de formes!" +msgid "Create Single Convex Shape" +msgstr "Crea una Forma Convexa" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Can't create multiple convex collision shapes for the scene root." +msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp #, fuzzy -msgid "Create Convex Shape(s)" +msgid "Couldn't create any collision shapes." +msgstr "No s'ha pogut crear el directori." + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Multiple Convex Shapes" msgstr "Crea una Forma Convexa" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -6038,19 +6044,57 @@ msgid "Create Trimesh Static Body" msgstr "Crea un Cos Està tic a partir d'una malla de triangles" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a StaticBody and assigns a polygon-based collision shape to it " +"automatically.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Trimesh Collision Sibling" msgstr "Crea una Col·lisió entre malles de triangles germanes" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Single Convex Collision Siblings" +msgstr "Crea col·lisions convexes entre nodes germans" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a single convex collision shape.\n" +"This is the fastest (but least accurate) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp #, fuzzy -msgid "Create Convex Collision Sibling(s)" +msgid "Create Multiple Convex Collision Siblings" msgstr "Crea col·lisions convexes entre nodes germans" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is a performance middle-ground between the two above options." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Outline Mesh..." msgstr "Crea una malla de contorn..." #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a static outline mesh. The outline mesh will have its normals " +"flipped automatically.\n" +"This can be used instead of the SpatialMaterial Grow property when using " +"that property isn't possible." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "View UV1" msgstr "Visualitza UV1" @@ -6072,7 +6116,7 @@ msgstr "Mida del Contorn:" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "UV Channel Debug" -msgstr "" +msgstr "Depuració del canal UV" #: editor/plugins/mesh_library_editor_plugin.cpp msgid "Remove item %d?" @@ -6376,12 +6420,12 @@ msgstr "Opcions" #: editor/plugins/path_2d_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp msgid "Mirror Handle Angles" -msgstr "" +msgstr "Reflecteix els Angles de la Nansa" #: editor/plugins/path_2d_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp msgid "Mirror Handle Lengths" -msgstr "" +msgstr "Reflecteix les mides de la Nansa" #: editor/plugins/path_editor_plugin.cpp msgid "Curve Point #" @@ -6449,6 +6493,8 @@ msgid "" "Polygon 2D has internal vertices, so it can no longer be edited in the " "viewport." msgstr "" +"El polÃgon 2D no pot ser editat en l'à rea de visualització ja que conté " +"vèrtexs interns." #: editor/plugins/polygon_2d_editor_plugin.cpp msgid "Create Polygon & UV" @@ -6675,7 +6721,7 @@ msgstr "ResourcePreloader" #: editor/plugins/root_motion_editor_plugin.cpp msgid "AnimationTree has no path set to an AnimationPlayer" -msgstr "" +msgstr "L'AnimationTree no té ruta assignada cap a un AnimationPlayer" #: editor/plugins/root_motion_editor_plugin.cpp #, fuzzy @@ -6734,20 +6780,22 @@ msgstr "Anomena i Desa..." #: editor/plugins/script_editor_plugin.cpp msgid "Can't obtain the script for running." -msgstr "" +msgstr "No s'ha trobat l'script per executar-lo." #: editor/plugins/script_editor_plugin.cpp msgid "Script failed reloading, check console for errors." -msgstr "" +msgstr "L'script ha fallat al recarregar, comproveu els errors en la consola." #: editor/plugins/script_editor_plugin.cpp msgid "Script is not in tool mode, will not be able to run." -msgstr "" +msgstr "L'script no està en mode d'eina, no es podrà executar." #: editor/plugins/script_editor_plugin.cpp msgid "" "To run this script, it must inherit EditorScript and be set to tool mode." msgstr "" +"Si es vol executar l'script, ha d'heretar de EditorScript i configuar-se en " +"mode Eina (tool)." #: editor/plugins/script_editor_plugin.cpp msgid "Import Theme" @@ -7003,6 +7051,7 @@ msgstr "Només s'hi poden deixar caure Recursos del sistema de fitxers." #: modules/visual_script/visual_script_editor.cpp msgid "Can't drop nodes because script '%s' is not used in this scene." msgstr "" +"No s'hi poden afegir els nodes ja que l'escena no utilitza l'script '%s' ." #: editor/plugins/script_text_editor.cpp #, fuzzy @@ -7250,7 +7299,7 @@ msgstr "Transformació de l'Eix Z." #: editor/plugins/spatial_editor_plugin.cpp msgid "View Plane Transform." -msgstr "Transformació de la Vista." +msgstr "Transformació en el Pla de la Vista." #: editor/plugins/spatial_editor_plugin.cpp msgid "Scaling: " @@ -7258,7 +7307,7 @@ msgstr "Escala: " #: editor/plugins/spatial_editor_plugin.cpp msgid "Translating: " -msgstr "Traslladant: " +msgstr "Translació: " #: editor/plugins/spatial_editor_plugin.cpp msgid "Rotating %s degrees." @@ -7279,7 +7328,7 @@ msgstr "commutador" #: editor/plugins/spatial_editor_plugin.cpp msgid "Yaw" -msgstr "" +msgstr "Guinyada" #: editor/plugins/spatial_editor_plugin.cpp msgid "Objects Drawn" @@ -7421,8 +7470,9 @@ msgid "Cinematic Preview" msgstr "Previsualització Cinemà tica" #: editor/plugins/spatial_editor_plugin.cpp +#, fuzzy msgid "Not available when using the GLES2 renderer." -msgstr "" +msgstr "No disponible quan s'utilitza el renderitzador GLES2." #: editor/plugins/spatial_editor_plugin.cpp msgid "Freelook Left" @@ -7685,7 +7735,7 @@ msgstr "Crear PolÃgon2D" #: editor/plugins/sprite_editor_plugin.cpp msgid "Polygon2D Preview" -msgstr "" +msgstr "Previsualització del Polygon2D" #: editor/plugins/sprite_editor_plugin.cpp #, fuzzy @@ -7762,11 +7812,11 @@ msgstr "Simplificació: " #: editor/plugins/sprite_editor_plugin.cpp msgid "Shrink (Pixels): " -msgstr "" +msgstr "Redueix (PÃxels): " #: editor/plugins/sprite_editor_plugin.cpp msgid "Grow (Pixels): " -msgstr "" +msgstr "Engrandeix (PÃxels): " #: editor/plugins/sprite_editor_plugin.cpp msgid "Update Preview" @@ -8023,7 +8073,7 @@ msgstr "Element de rà dio validat" #: editor/plugins/theme_editor_plugin.cpp msgid "Named Sep." -msgstr "" +msgstr "Separador amb nom." #: editor/plugins/theme_editor_plugin.cpp msgid "Submenu" @@ -8161,7 +8211,7 @@ msgstr "Filtrat de Fitxers..." #: editor/plugins/tile_map_editor_plugin.cpp msgid "Give a TileSet resource to this TileMap to use its tiles." -msgstr "" +msgstr "Assigna un recurs TileSet a aquest TileMap per a usar-ne les peces." #: editor/plugins/tile_map_editor_plugin.cpp msgid "Paint Tile" @@ -8220,7 +8270,7 @@ msgstr "Combina-ho a partir de l'Escena" #: editor/plugins/tile_set_editor_plugin.cpp msgid "New Single Tile" -msgstr "" +msgstr "Nova peça individual" #: editor/plugins/tile_set_editor_plugin.cpp #, fuzzy @@ -8362,6 +8412,8 @@ msgstr "Mostrar noms de les rajoles (manteniu pressionada la tecla Alt)" msgid "" "Add or select a texture on the left panel to edit the tiles bound to it." msgstr "" +"Afegeix o selecciona una textura en el plafó esquerra per a editar-ne les " +"peces assignades." #: editor/plugins/tile_set_editor_plugin.cpp msgid "Remove selected texture? This will remove all tiles which use it." @@ -8394,6 +8446,8 @@ msgid "" "Drag handles to edit Rect.\n" "Click on another Tile to edit it." msgstr "" +"Arrossega les nanses per editar el Rect.\n" +"Clica en una altra Peça per a editar-lo." #: editor/plugins/tile_set_editor_plugin.cpp #, fuzzy @@ -8557,7 +8611,7 @@ msgstr "Conjunt de rajoles" msgid "No VCS addons are available." msgstr "Nom del pare del node, si està disponible" -#: editor/plugins/version_control_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/version_control_editor_plugin.cpp msgid "Error" msgstr "Error" @@ -8568,7 +8622,7 @@ msgstr "Manca Nom" #: editor/plugins/version_control_editor_plugin.cpp msgid "No files added to stage" -msgstr "" +msgstr "No hi ha fitxers afegits a l'escenari" #: editor/plugins/version_control_editor_plugin.cpp #, fuzzy @@ -8576,12 +8630,13 @@ msgid "Commit" msgstr "Comunitat" #: editor/plugins/version_control_editor_plugin.cpp +#, fuzzy msgid "VCS Addon is not initialized" -msgstr "" +msgstr "L'Addon VCS no està inicialitzat" #: editor/plugins/version_control_editor_plugin.cpp msgid "Version Control System" -msgstr "" +msgstr "Sistema de control de versions" #: editor/plugins/version_control_editor_plugin.cpp #, fuzzy @@ -8590,7 +8645,7 @@ msgstr "Converteix a Majúscules" #: editor/plugins/version_control_editor_plugin.cpp msgid "Staging area" -msgstr "" +msgstr "Zona de posada en escena" #: editor/plugins/version_control_editor_plugin.cpp #, fuzzy @@ -8604,7 +8659,7 @@ msgstr "Modifica" #: editor/plugins/version_control_editor_plugin.cpp msgid "Modified" -msgstr "" +msgstr "Modificat" #: editor/plugins/version_control_editor_plugin.cpp #, fuzzy @@ -8632,8 +8687,9 @@ msgid "Stage All" msgstr "Desa-ho Tot" #: editor/plugins/version_control_editor_plugin.cpp +#, fuzzy msgid "Add a commit message" -msgstr "" +msgstr "Afegir un missatge de commit" #: editor/plugins/version_control_editor_plugin.cpp #, fuzzy @@ -8648,6 +8704,8 @@ msgstr "Estat" #: editor/plugins/version_control_editor_plugin.cpp msgid "View file diffs before committing them to the latest version" msgstr "" +"Verifica les diferències entre fitxers abans de publicar-les a la darrera " +"versió" #: editor/plugins/version_control_editor_plugin.cpp #, fuzzy @@ -8656,7 +8714,7 @@ msgstr "Cap fitxer seleccionat!" #: editor/plugins/version_control_editor_plugin.cpp msgid "Detect changes in file diff" -msgstr "" +msgstr "Detecta els canvis en el fitxer" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "(GLES3 only)" @@ -8816,7 +8874,7 @@ msgstr "Reanomena Funció" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Burn operator." -msgstr "" +msgstr "Operador de gravació." #: editor/plugins/visual_shader_editor_plugin.cpp #, fuzzy @@ -8829,7 +8887,7 @@ msgstr "Operador diferencial." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Dodge operator." -msgstr "" +msgstr "Operador Dodge (sobreexposició)." #: editor/plugins/visual_shader_editor_plugin.cpp #, fuzzy @@ -8843,15 +8901,15 @@ msgstr "Operador Aclarir." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Overlay operator." -msgstr "" +msgstr "Operador de superposició." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Screen operator." -msgstr "" +msgstr "Operador Screen (trama)." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "SoftLight operator." -msgstr "" +msgstr "Operador de llum suau." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Color constant." @@ -8951,7 +9009,7 @@ msgstr "Modificar una constant vectorial" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Boolean uniform." -msgstr "" +msgstr "Booleà uniforme." #: editor/plugins/visual_shader_editor_plugin.cpp #, fuzzy @@ -9165,7 +9223,7 @@ msgstr "(Només GLES3) Troba l'enter parell més proper al parà metre." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Clamps the value between 0.0 and 1.0." -msgstr "" +msgstr "Restringeix el valor entre 0.0 i 1.0." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Extracts the sign of the parameter." @@ -9192,6 +9250,11 @@ msgid "" "'edge1'. Otherwise the return value is interpolated between 0.0 and 1.0 " "using Hermite polynomials." msgstr "" +"SmoothStep function( scalar(edge0), scalar(edge1), scalar(x) ).\n" +"\n" +"Retorna 0,0 si \"x\" és menor que \"edge0\" i 1,0 si x és més gran que " +"\"edge1\". En cas contrari, el valor retornat s’interpola entre 0,0 i 1,0 " +"amb polinomis Hermite." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "" @@ -9199,6 +9262,9 @@ msgid "" "\n" "Returns 0.0 if 'x' is smaller than 'edge' and otherwise 1.0." msgstr "" +"Step function( scalar(edge), scalar(x) ).\n" +"\n" +"Retorna 0.0 si 'x' és menor que 'edge' o 1.0 en cas contrari." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Returns the tangent of the parameter." @@ -9284,6 +9350,11 @@ msgid "" "whose number of rows is the number of components in 'c' and whose number of " "columns is the number of components in 'r'." msgstr "" +"Calcula el producte exterior d'un parell de vector. \n" +"\n" +"OuterProduct tracta el primer parà metre 'c' com un vector de columna (m x 1) " +"i el segon parà metre 'r' com a vector de fila (1 x n) i en fa una " +"multiplicació de matrius 'c * r', produint una matriu de mida ( m x n )." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Composes transform from four vectors." @@ -9416,6 +9487,11 @@ msgid "" "'edge1'. Otherwise the return value is interpolated between 0.0 and 1.0 " "using Hermite polynomials." msgstr "" +"SmoothStep function( vector(edge0), vector(edge1), vector(x) ).\n" +"\n" +"Retorna 0,0 si 'x' és menor que'edge0 'i 1,0 si 'x' és més gran que'edge1 '. " +"Altrament s'interpola el valor entre 0,0 i 1,0 utilitzant polinomis " +"d'Hermite." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "" @@ -9425,6 +9501,11 @@ msgid "" "'edge1'. Otherwise the return value is interpolated between 0.0 and 1.0 " "using Hermite polynomials." msgstr "" +"SmoothStep function( scalar(edge0), scalar(edge1), vector(x) ).\n" +"\n" +"Retorna 0,0 si 'x' és menor que'edge0 'i 1,0 si 'x' és més gran que'edge1 '. " +"Altrament s'interpola el valor entre 0,0 i 1,0 utilitzant polinomis " +"d'Hermite." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "" @@ -9432,6 +9513,9 @@ msgid "" "\n" "Returns 0.0 if 'x' is smaller than 'edge' and otherwise 1.0." msgstr "" +"SmoothStep function(vector(edge), vector(x)).\n" +"\n" +"Retorna 0,0 si 'x' és menor que'edge0 ' o 1.0 en cas contrari." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "" @@ -9759,11 +9843,20 @@ msgid "Export With Debug" msgstr "Exporta en mode Depuració" #: editor/project_manager.cpp -msgid "The path does not exist." +#, fuzzy +msgid "The path specified doesn't exist." msgstr "El camà no existeix." #: editor/project_manager.cpp -msgid "Invalid '.zip' project file, does not contain a 'project.godot' file." +#, fuzzy +msgid "Error opening package file (it's not in ZIP format)." +msgstr "" +"S'ha produit un error en obrir el fitxer comprimit, no té el format ZIP." + +#: editor/project_manager.cpp +#, fuzzy +msgid "" +"Invalid \".zip\" project file; it doesn't contain a \"project.godot\" file." msgstr "Fitxer de projecte '.zip' invalid, no conte un fitxer 'project.godot'." #: editor/project_manager.cpp @@ -9771,11 +9864,13 @@ msgid "Please choose an empty folder." msgstr "Selecciona un directori buit." #: editor/project_manager.cpp -msgid "Please choose a 'project.godot' or '.zip' file." +#, fuzzy +msgid "Please choose a \"project.godot\" or \".zip\" file." msgstr "Si us plau seleccioneu un fitxer 'project.godot' o '.zip'." #: editor/project_manager.cpp -msgid "Directory already contains a Godot project." +#, fuzzy +msgid "This directory already contains a Godot project." msgstr "El directori ja conté un projecte de Godot." #: editor/project_manager.cpp @@ -10488,6 +10583,11 @@ msgid "Suffix" msgstr "Sufix" #: editor/rename_dialog.cpp +#, fuzzy +msgid "Use Regular Expressions" +msgstr "Expressions Regulars" + +#: editor/rename_dialog.cpp msgid "Advanced Options" msgstr "Opcions Avançades" @@ -10524,7 +10624,8 @@ msgstr "" "Comparar opcions de comptador." #: editor/rename_dialog.cpp -msgid "Per Level counter" +#, fuzzy +msgid "Per-level Counter" msgstr "Comptador per nivell" #: editor/rename_dialog.cpp @@ -10555,10 +10656,6 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -msgid "Regular Expressions" -msgstr "Expressions Regulars" - -#: editor/rename_dialog.cpp msgid "Post-Process" msgstr "Post-Processat" @@ -10568,11 +10665,11 @@ msgid "Keep" msgstr "Mantenir" #: editor/rename_dialog.cpp -msgid "CamelCase to under_scored" +msgid "PascalCase to snake_case" msgstr "" #: editor/rename_dialog.cpp -msgid "under_scored to CamelCase" +msgid "snake_case to PascalCase" msgstr "" #: editor/rename_dialog.cpp @@ -10592,6 +10689,16 @@ msgstr "A Majúscules" msgid "Reset" msgstr "Resetejar" +#: editor/rename_dialog.cpp +#, fuzzy +msgid "Regular Expression Error" +msgstr "Expressions Regulars" + +#: editor/rename_dialog.cpp +#, fuzzy +msgid "At character %s" +msgstr "Carà cters và lids:" + #: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp msgid "Reparent Node" msgstr "Torna a Parentar el Node" @@ -11076,8 +11183,9 @@ msgid "Invalid inherited parent name or path." msgstr "El nom o camà del pare heretat no és và lid." #: editor/script_create_dialog.cpp -msgid "Script is valid." -msgstr "El script és và lid." +#, fuzzy +msgid "Script path/name is valid." +msgstr "L' script és và lid." #: editor/script_create_dialog.cpp #, fuzzy @@ -11182,6 +11290,11 @@ msgstr "Error de Còpia" #: editor/script_editor_debugger.cpp #, fuzzy +msgid "Video RAM" +msgstr "Memòria de VÃdeo" + +#: editor/script_editor_debugger.cpp +#, fuzzy msgid "Skip Breakpoints" msgstr "Crea punts." @@ -11204,7 +11317,7 @@ msgstr "Perfilador" #: editor/script_editor_debugger.cpp #, fuzzy msgid "Network Profiler" -msgstr "Exportar Perfil" +msgstr "Profiler de xarxa" #: editor/script_editor_debugger.cpp msgid "Monitor" @@ -11231,10 +11344,6 @@ msgid "Total:" msgstr "Total:" #: editor/script_editor_debugger.cpp -msgid "Video Mem" -msgstr "Memòria de VÃdeo" - -#: editor/script_editor_debugger.cpp msgid "Resource Path" msgstr "Camà de Recursos" @@ -12846,11 +12955,15 @@ msgid "This node has been deprecated. Use AnimationTree instead." msgstr "" #: scene/gui/color_picker.cpp +#, fuzzy msgid "" "Color: #%s\n" "LMB: Set color\n" "RMB: Remove preset" msgstr "" +"Color: #%s\n" +"LMB: Defineix el color\n" +"RMB: Elimina la configuració preestablerta" #: scene/gui/color_picker.cpp #, fuzzy @@ -12976,6 +13089,16 @@ msgstr "" msgid "Constants cannot be modified." msgstr "Les constants no es poden modificar." +#~ msgid "Replaced %d occurrence(s)." +#~ msgstr "%d ocurrència/es reemplaçades." + +#~ msgid "Create Static Convex Body" +#~ msgstr "Crea un Cos Està tic Convex" + +#, fuzzy +#~ msgid "Failed creating shapes!" +#~ msgstr "Ha fallat la creació de formes!" + #~ msgid "" #~ "There are currently no tutorials for this class, you can [color=$color]" #~ "[url=$url]contribute one[/url][/color] or [color=$color][url=" diff --git a/editor/translations/cs.po b/editor/translations/cs.po index b060c0c234..39bcef5430 100644 --- a/editor/translations/cs.po +++ b/editor/translations/cs.po @@ -9,7 +9,7 @@ # LudÄ›k Novotný <gladosicek@gmail.com>, 2016, 2018. # Martin Novák <maidx@seznam.cz>, 2017, 2019. # zxey <r.hozak@seznam.cz>, 2018. -# VojtÄ›ch Å amla <auzkok@seznam.cz>, 2018, 2019. +# VojtÄ›ch Å amla <auzkok@seznam.cz>, 2018, 2019, 2020. # Peeter Angelo <contact@peeterangelo.com>, 2019. # VojtechBrezina <vojta.brezina@gmail.com>, 2019. # Garrom Orc Shaman <garromorcshaman@gmail.com>, 2019. @@ -17,12 +17,13 @@ # LuboÅ¡ NeÄas <lubosnecas506@seznam.cz>, 2019. # David KubeÅ¡ <kubesdavid@email.cz>, 2019. # Emil Jiřà Tywoniak <emil.tywoniak@gmail.com>, 2020. +# Filip Vincůrek <vincurek.f@gmail.com>, 2020. msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2020-01-03 21:21+0000\n" -"Last-Translator: Emil Jiřà Tywoniak <emil.tywoniak@gmail.com>\n" +"PO-Revision-Date: 2020-02-19 08:56+0000\n" +"Last-Translator: VojtÄ›ch Å amla <auzkok@seznam.cz>\n" "Language-Team: Czech <https://hosted.weblate.org/projects/godot-engine/godot/" "cs/>\n" "Language: cs\n" @@ -30,7 +31,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" -"X-Generator: Weblate 3.10\n" +"X-Generator: Weblate 3.11\n" #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/visual_script/visual_script_builtin_funcs.cpp @@ -50,7 +51,7 @@ msgstr "Nedostatek bajtů pro dekódovánà bajtů, nebo neplatný formát." #: core/math/expression.cpp msgid "Invalid input %i (not passed) in expression" -msgstr "Neplatný vstup %i (neproÅ¡el) ve výrazu" +msgstr "Neplatný vstup %i (nepÅ™edán) ve výrazu" #: core/math/expression.cpp msgid "self can't be used because instance is null (not passed)" @@ -131,11 +132,11 @@ msgstr "Vložit klÃÄ zde" #: editor/animation_bezier_editor.cpp msgid "Duplicate Selected Key(s)" -msgstr "Duplikovat klÃÄ(e)" +msgstr "Duplikovat vybrané klÃÄ(e)" #: editor/animation_bezier_editor.cpp msgid "Delete Selected Key(s)" -msgstr "Smazat klÃÄ(e)" +msgstr "Smazat vybrané klÃÄ(e)" #: editor/animation_bezier_editor.cpp msgid "Add Bezier Point" @@ -290,7 +291,7 @@ msgstr "PÅ™epÃnacà Stopa Povolena" #: editor/animation_track_editor.cpp msgid "Continuous" -msgstr "Spojité" +msgstr "NepÅ™etržité" #: editor/animation_track_editor.cpp msgid "Discrete" @@ -701,8 +702,9 @@ msgid "Line Number:" msgstr "ÄŒÃslo řádku:" #: editor/code_editor.cpp -msgid "Replaced %d occurrence(s)." -msgstr "Nahrazeno %d výskytů." +#, fuzzy +msgid "%d replaced." +msgstr "Nahradit..." #: editor/code_editor.cpp editor/editor_help.cpp msgid "%d match." @@ -1055,9 +1057,8 @@ msgid "Error loading:" msgstr "Chyba pÅ™i naÄÃtánÃ:" #: editor/dependency_editor.cpp -#, fuzzy msgid "Load failed due to missing dependencies:" -msgstr "Scénu se nepodaÅ™ilo naÄÃst kvůli chybÄ›jÃcÃm závislostem:" +msgstr "NaÄtenà selhalo kvůli chybÄ›jÃcÃm závislostem:" #: editor/dependency_editor.cpp editor/editor_node.cpp msgid "Open Anyway" @@ -1204,9 +1205,8 @@ msgid "Error opening package file, not in ZIP format." msgstr "NepodaÅ™ilo se otevÅ™Ãt balÃÄek, nenà ve formátu ZIP." #: editor/editor_asset_installer.cpp -#, fuzzy msgid "%s (Already Exists)" -msgstr "Již existujÃcÃ" +msgstr "%s (již existuje)" #: editor/editor_asset_installer.cpp msgid "Uncompressing Assets" @@ -1214,12 +1214,11 @@ msgstr "Dekomprese uživatelského obsahu" #: editor/editor_asset_installer.cpp editor/project_manager.cpp msgid "The following files failed extraction from package:" -msgstr "" +msgstr "Selhala extrakce následujÃcÃch souborů z balÃÄku:" #: editor/editor_asset_installer.cpp -#, fuzzy msgid "And %s more files." -msgstr "%d vÃce souborů" +msgstr "A %s dalÅ¡Ãch souborů." #: editor/editor_asset_installer.cpp editor/project_manager.cpp msgid "Package installed successfully!" @@ -1231,9 +1230,8 @@ msgid "Success!" msgstr "ÚspÄ›ch!" #: editor/editor_asset_installer.cpp -#, fuzzy msgid "Package Contents:" -msgstr "Obsah:" +msgstr "Obsah balÃÄku:" #: editor/editor_asset_installer.cpp editor/editor_node.cpp msgid "Install" @@ -1373,9 +1371,8 @@ msgid "Invalid file, not an audio bus layout." msgstr "Neplatný soubor, neni to rozloženà Audio Busu." #: editor/editor_audio_buses.cpp -#, fuzzy msgid "Error saving file: %s" -msgstr "Chyba pÅ™i ukládánà souboru!" +msgstr "Chyba pÅ™i ukládánà souboru: %s" #: editor/editor_audio_buses.cpp msgid "Add Bus" @@ -1583,7 +1580,6 @@ msgstr "" "Etc 2' v nastavenÃch projektu." #: editor/editor_export.cpp -#, fuzzy msgid "" "Target platform requires 'ETC' texture compression for the driver fallback " "to GLES2.\n" @@ -1591,8 +1587,9 @@ msgid "" "Enabled'." msgstr "" "CÃlová platforma vyžaduje kompresi textur 'ETC' pro použità GLES2 jako " -"zálohy. Povolte 'Import Etc' v nastavenÃch projektu, nebo vypnÄ›te 'Driver " -"Fallback Enabled'." +"zálohy.\n" +"Povolte 'Import Etc' v nastavenÃch projektu, nebo vypnÄ›te 'Driver Fallback " +"Enabled'." #: editor/editor_export.cpp platform/android/export/export.cpp #: platform/iphone/export/export.cpp platform/javascript/export/export.cpp @@ -1661,14 +1658,12 @@ msgid "(Editor Disabled, Properties Disabled)" msgstr "(Editor zakázán, Vlastnosti zakázány)" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "(Properties Disabled)" -msgstr "Pouze vlastnosti" +msgstr "(Vlastnosti deaktivovány)" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "(Editor Disabled)" -msgstr "Vypnuto" +msgstr "(Editor deaktivován)" #: editor/editor_feature_profile.cpp msgid "Class Options:" @@ -1859,7 +1854,7 @@ msgstr "PÅ™epnout režim" #: editor/editor_file_dialog.cpp msgid "Focus Path" -msgstr "" +msgstr "Zvýraznit cestu" #: editor/editor_file_dialog.cpp msgid "Move Favorite Up" @@ -1887,7 +1882,7 @@ msgstr "Obnovit soubory." #: editor/editor_file_dialog.cpp msgid "(Un)favorite current folder." -msgstr "PÅ™idat/odebrat složku z oblÃbených" +msgstr "PÅ™idat/odebrat složku z oblÃbených." #: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp #, fuzzy @@ -1954,9 +1949,8 @@ msgid "Inherited by:" msgstr "DÄ›dÄ›ná z:" #: editor/editor_help.cpp -#, fuzzy msgid "Description" -msgstr "Popis:" +msgstr "Popis" #: editor/editor_help.cpp msgid "Online Tutorials" @@ -1972,9 +1966,8 @@ msgid "override:" msgstr "PÅ™epsat" #: editor/editor_help.cpp -#, fuzzy msgid "default:" -msgstr "VýchozÃ" +msgstr "výchozÃ:" #: editor/editor_help.cpp msgid "Methods" @@ -1997,9 +1990,8 @@ msgid "Property Descriptions" msgstr "Popis vlastnosti" #: editor/editor_help.cpp -#, fuzzy msgid "(value)" -msgstr "Hodnota" +msgstr "(hodnota)" #: editor/editor_help.cpp msgid "" @@ -2031,9 +2023,8 @@ msgid "Case Sensitive" msgstr "RozliÅ¡ovat velká a malá pÃsmena" #: editor/editor_help_search.cpp -#, fuzzy msgid "Show Hierarchy" -msgstr "Zobrazit pomocnÃky" +msgstr "Zobrazit hierarchii" #: editor/editor_help_search.cpp msgid "Display All" @@ -2073,28 +2064,24 @@ msgid "Class" msgstr "TÅ™Ãda" #: editor/editor_help_search.cpp -#, fuzzy msgid "Method" -msgstr "Metody" +msgstr "Metoda" #: editor/editor_help_search.cpp editor/plugins/script_text_editor.cpp -#, fuzzy msgid "Signal" -msgstr "Signály" +msgstr "Signál" #: editor/editor_help_search.cpp editor/plugins/theme_editor_plugin.cpp msgid "Constant" msgstr "KonstantnÃ" #: editor/editor_help_search.cpp -#, fuzzy msgid "Property" -msgstr "Vlastnost:" +msgstr "Vlastnost" #: editor/editor_help_search.cpp -#, fuzzy msgid "Theme Property" -msgstr "Vlastnosti motivu" +msgstr "Vlastnost motivu" #: editor/editor_inspector.cpp editor/project_settings_editor.cpp msgid "Property:" @@ -2142,12 +2129,11 @@ msgstr "Start" #: editor/editor_network_profiler.cpp msgid "%s/s" -msgstr "" +msgstr "%s/s" #: editor/editor_network_profiler.cpp -#, fuzzy msgid "Down" -msgstr "Stáhnout" +msgstr "Dolů" #: editor/editor_network_profiler.cpp msgid "Up" @@ -2159,15 +2145,15 @@ msgstr "Uzel" #: editor/editor_network_profiler.cpp msgid "Incoming RPC" -msgstr "" +msgstr "PÅ™Ãchozà RPC" #: editor/editor_network_profiler.cpp msgid "Incoming RSET" -msgstr "" +msgstr "PÅ™Ãchozà RSET" #: editor/editor_network_profiler.cpp msgid "Outgoing RPC" -msgstr "" +msgstr "Odchozà RPC" #: editor/editor_network_profiler.cpp msgid "Outgoing RSET" @@ -2270,7 +2256,7 @@ msgstr "Nelze pÅ™epsat scénu, která je stále otevÅ™ená!" #: editor/editor_node.cpp msgid "Can't load MeshLibrary for merging!" -msgstr "" +msgstr "Nelze naÄÃst MeshLibrary ke slouÄenÃ!" #: editor/editor_node.cpp msgid "Error saving MeshLibrary!" @@ -2278,7 +2264,7 @@ msgstr "Chyba pÅ™i ukládánà MeshLibrary!" #: editor/editor_node.cpp msgid "Can't load TileSet for merging!" -msgstr "" +msgstr "Nelze naÄÃst TileSet ke slouÄenÃ!" #: editor/editor_node.cpp msgid "Error saving TileSet!" @@ -2392,9 +2378,8 @@ msgid "Save changes to '%s' before closing?" msgstr "Uložit zmÄ›ny '%s' pÅ™ed zavÅ™enÃm?" #: editor/editor_node.cpp -#, fuzzy msgid "Saved %s modified resource(s)." -msgstr "Selhalo nahránà zdroje." +msgstr "Uloženo %s upravených zdrojů." #: editor/editor_node.cpp msgid "A root node is required to save the scene." @@ -2497,9 +2482,8 @@ msgid "Close Scene" msgstr "ZavÅ™Ãt scénu" #: editor/editor_node.cpp -#, fuzzy msgid "Reopen Closed Scene" -msgstr "ZavÅ™Ãt scénu" +msgstr "ZnovuotevÅ™Ãt uzavÅ™enou scénu" #: editor/editor_node.cpp msgid "Unable to enable addon plugin at: '%s' parsing of config failed." @@ -2610,9 +2594,8 @@ msgid "Close Tab" msgstr "ZavÅ™Ãt záložku" #: editor/editor_node.cpp -#, fuzzy msgid "Undo Close Tab" -msgstr "ZavÅ™Ãt záložku" +msgstr "Obnovit zavÅ™enou záložku" #: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp msgid "Close Other Tabs" @@ -2620,12 +2603,11 @@ msgstr "ZavÅ™Ãt ostatnà záložky" #: editor/editor_node.cpp msgid "Close Tabs to the Right" -msgstr "" +msgstr "ZavÅ™Ãt záložky napravo" #: editor/editor_node.cpp -#, fuzzy msgid "Close All Tabs" -msgstr "ZavÅ™Ãt vÅ¡e" +msgstr "ZavÅ™Ãt vÅ¡echny záložky" #: editor/editor_node.cpp msgid "Switch Scene Tab" @@ -2668,9 +2650,8 @@ msgid "Go to previously opened scene." msgstr "PÅ™ejÃt na pÅ™edchozà scénu." #: editor/editor_node.cpp -#, fuzzy msgid "Copy Text" -msgstr "KopÃrovat cestu" +msgstr "KopÃrovat text" #: editor/editor_node.cpp msgid "Next tab" @@ -2748,9 +2729,8 @@ msgid "Project" msgstr "Projekt" #: editor/editor_node.cpp -#, fuzzy msgid "Project Settings..." -msgstr "Nastavenà projektu" +msgstr "Nastavenà projektu..." #: editor/editor_node.cpp editor/plugins/version_control_editor_plugin.cpp #, fuzzy @@ -2766,9 +2746,8 @@ msgid "Shut Down Version Control" msgstr "" #: editor/editor_node.cpp -#, fuzzy msgid "Export..." -msgstr "Exportovat" +msgstr "Exportovat..." #: editor/editor_node.cpp msgid "Install Android Build Template..." @@ -2783,9 +2762,8 @@ msgid "Tools" msgstr "Nástroje" #: editor/editor_node.cpp -#, fuzzy msgid "Orphan Resource Explorer..." -msgstr "PrůzkumnÃk osiÅ™elých zdrojů" +msgstr "PrůzkumnÃk osiÅ™elých zdrojů..." #: editor/editor_node.cpp msgid "Quit to Project List" @@ -2887,9 +2865,8 @@ msgid "Editor" msgstr "Editor" #: editor/editor_node.cpp -#, fuzzy msgid "Editor Settings..." -msgstr "Nastavenà editoru" +msgstr "Nastavenà editoru..." #: editor/editor_node.cpp msgid "Editor Layout" @@ -2932,9 +2909,8 @@ msgid "Manage Editor Features..." msgstr "Spravovat exportnà šablony" #: editor/editor_node.cpp -#, fuzzy msgid "Manage Export Templates..." -msgstr "Spravovat exportnà šablony" +msgstr "Spravovat exportnà šablony..." #: editor/editor_node.cpp editor/plugins/shader_editor_plugin.cpp msgid "Help" @@ -3059,9 +3035,8 @@ msgid "Android build template is missing, please install relevant templates." msgstr "" #: editor/editor_node.cpp -#, fuzzy msgid "Manage Templates" -msgstr "Spravovat exportnà šablony" +msgstr "Spravovat Å¡ablony" #: editor/editor_node.cpp msgid "" @@ -3087,9 +3062,8 @@ msgid "Import Templates From ZIP File" msgstr "Importovat Å¡ablony ze ZIP souboru" #: editor/editor_node.cpp -#, fuzzy msgid "Template Package" -msgstr "Správce exportnÃch Å¡ablon" +msgstr "BalÃÄek Å¡ablon" #: editor/editor_node.cpp msgid "Export Library" @@ -3140,9 +3114,8 @@ msgid "Open the previous Editor" msgstr "OtevÅ™Ãt pÅ™edchozà editor" #: editor/editor_node.h -#, fuzzy msgid "Warning!" -msgstr "VarovánÃ" +msgstr "VarovánÃ!" #: editor/editor_path.cpp #, fuzzy @@ -3158,9 +3131,8 @@ msgid "Thumbnail..." msgstr "Náhled..." #: editor/editor_plugin_settings.cpp -#, fuzzy msgid "Main Script:" -msgstr "OtevÅ™Ãt skript" +msgstr "Hlavnà skript:" #: editor/editor_plugin_settings.cpp msgid "Edit Plugin" @@ -3232,9 +3204,8 @@ msgid "Calls" msgstr "VolánÃ" #: editor/editor_properties.cpp -#, fuzzy msgid "Edit Text:" -msgstr "Editovat téma..." +msgstr "Editovat text:" #: editor/editor_properties.cpp editor/script_create_dialog.cpp msgid "On" @@ -4002,6 +3973,11 @@ msgid "Saving..." msgstr "UkládánÃ..." #: editor/import_dock.cpp +#, fuzzy +msgid "%d Files" +msgstr " Soubory" + +#: editor/import_dock.cpp msgid "Set as Default for '%s'" msgstr "Nastavit jako výchozà pro '%s'" @@ -4010,10 +3986,6 @@ msgid "Clear Default for '%s'" msgstr "VyÄistit výchozà pro '%s'" #: editor/import_dock.cpp -msgid " Files" -msgstr " Soubory" - -#: editor/import_dock.cpp msgid "Import As:" msgstr "Importovat jako:" @@ -4300,9 +4272,8 @@ msgid "Open Animation Node" msgstr "OtevÅ™Ãt uzel animace" #: editor/plugins/animation_blend_space_2d_editor.cpp -#, fuzzy msgid "Triangle already exists." -msgstr "TrojúhelnÃk již existuje" +msgstr "TrojúhelnÃk již existuje." #: editor/plugins/animation_blend_space_2d_editor.cpp msgid "Add Triangle" @@ -4431,9 +4402,8 @@ msgid "" msgstr "" #: editor/plugins/animation_blend_tree_editor_plugin.cpp -#, fuzzy msgid "Anim Clips" -msgstr "AnimaÄnà klipy:" +msgstr "AnimaÄnà klipy" #: editor/plugins/animation_blend_tree_editor_plugin.cpp msgid "Audio Clips" @@ -4675,9 +4645,8 @@ msgid "Move Node" msgstr "PÅ™esunout uzel" #: editor/plugins/animation_state_machine_editor.cpp -#, fuzzy msgid "Transition exists!" -msgstr "PÅ™echod: " +msgstr "PÅ™echod existuje!" #: editor/plugins/animation_state_machine_editor.cpp msgid "Add Transition" @@ -5169,7 +5138,6 @@ msgid "Scale Step:" msgstr "ZvÄ›tÅ¡enÃ:" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Move Vertical Guide" msgstr "PÅ™esunout svislé vodÃtko" @@ -5254,9 +5222,8 @@ msgid "Bottom Left" msgstr "Vlevo dole" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Center Left" -msgstr "Odsadit zleva" +msgstr "Vlevo uprostÅ™ed" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Center Top" @@ -5307,9 +5274,8 @@ msgid "Full Rect" msgstr "" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Keep Ratio" -msgstr "PomÄ›r zvÄ›tÅ¡enÃ:" +msgstr "Ponechat pomÄ›r" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Anchors only" @@ -5339,15 +5305,13 @@ msgstr "" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Lock Selected" -msgstr "Nástroj VýbÄ›r" +msgstr "UzamÄÃt vybraný" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Unlock Selected" -msgstr "Smazat vybraný" +msgstr "OdemÄÃt vybraný" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -5366,9 +5330,8 @@ msgid "Paste Pose" msgstr "" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Clear Guides" -msgstr "Vymazat pózu" +msgstr "Vymazat vodÃtka" #: editor/plugins/canvas_item_editor_plugin.cpp #, fuzzy @@ -5376,9 +5339,8 @@ msgid "Create Custom Bone(s) from Node(s)" msgstr "VytvoÅ™it ze scény" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Clear Bones" -msgstr "Vymazat pózu" +msgstr "Vymazat kosti" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Make IK Chain" @@ -5453,9 +5415,8 @@ msgid "Pan Mode" msgstr "" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Ruler Mode" -msgstr "Režim Å¡kálovánÃ" +msgstr "Režim pravÃtka" #: editor/plugins/canvas_item_editor_plugin.cpp #, fuzzy @@ -5463,9 +5424,8 @@ msgid "Toggle smart snapping." msgstr "PÅ™epnout pÅ™ichycovánÃ." #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Use Smart Snap" -msgstr "PoužÃt pÅ™ichycovánÃ" +msgstr "PoužÃt chytré pÅ™ichycovánÃ" #: editor/plugins/canvas_item_editor_plugin.cpp #, fuzzy @@ -5839,12 +5799,10 @@ msgid "Load Curve Preset" msgstr "" #: editor/plugins/curve_editor_plugin.cpp -#, fuzzy msgid "Add Point" msgstr "PÅ™idat bod" #: editor/plugins/curve_editor_plugin.cpp -#, fuzzy msgid "Remove Point" msgstr "Odstranit bod" @@ -5909,11 +5867,12 @@ msgid "Mesh is empty!" msgstr "Mesh je prázdný!" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Trimesh Body" -msgstr "" +#, fuzzy +msgid "Couldn't create a Trimesh collision shape." +msgstr "Nelze vytvoÅ™it složku." #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Convex Body" +msgid "Create Static Trimesh Body" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -5926,12 +5885,30 @@ msgid "Create Trimesh Static Shape" msgstr "VytvoÅ™it Trimesh Shape" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Failed creating shapes!" +msgid "Can't create a single convex collision shape for the scene root." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Couldn't create a single convex collision shape." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Single Convex Shape" +msgstr "VytvoÅ™it Convex Shape" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Can't create multiple convex collision shapes for the scene root." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp #, fuzzy -msgid "Create Convex Shape(s)" +msgid "Couldn't create any collision shapes." +msgstr "Nelze vytvoÅ™it složku." + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Multiple Convex Shapes" msgstr "VytvoÅ™it Convex Shape" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -5983,19 +5960,57 @@ msgid "Create Trimesh Static Body" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a StaticBody and assigns a polygon-based collision shape to it " +"automatically.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Trimesh Collision Sibling" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp #, fuzzy -msgid "Create Convex Collision Sibling(s)" +msgid "Create Single Convex Collision Siblings" msgstr "VytvoÅ™it navigaÄnà polygon" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a single convex collision shape.\n" +"This is the fastest (but least accurate) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Multiple Convex Collision Siblings" +msgstr "VytvoÅ™it navigaÄnà polygon" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is a performance middle-ground between the two above options." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Outline Mesh..." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a static outline mesh. The outline mesh will have its normals " +"flipped automatically.\n" +"This can be used instead of the SpatialMaterial Grow property when using " +"that property isn't possible." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "View UV1" msgstr "Zobrazit UV1" @@ -6637,9 +6652,8 @@ msgid "Error writing TextFile:" msgstr "Chyba pÅ™i zápisu textového souboru:" #: editor/plugins/script_editor_plugin.cpp -#, fuzzy msgid "Could not load file at:" -msgstr "Chyba: nelze naÄÃst soubor." +msgstr "Nelze naÄÃst soubor:" #: editor/plugins/script_editor_plugin.cpp msgid "Error saving file!" @@ -6662,7 +6676,6 @@ msgid "Error Importing" msgstr "Chyba importu" #: editor/plugins/script_editor_plugin.cpp -#, fuzzy msgid "New Text File..." msgstr "Nový textový soubor..." @@ -6708,9 +6721,8 @@ msgid "Save Theme As..." msgstr "Uložit motiv jako..." #: editor/plugins/script_editor_plugin.cpp -#, fuzzy msgid "%s Class Reference" -msgstr " Reference tÅ™Ãdy" +msgstr "Reference tÅ™Ãdy %s" #: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp @@ -6723,18 +6735,16 @@ msgid "Find Previous" msgstr "NajÃt pÅ™edchozÃ" #: editor/plugins/script_editor_plugin.cpp -#, fuzzy msgid "Filter scripts" -msgstr "Filtrovat vlastnosti" +msgstr "Filtrovat skripty" #: editor/plugins/script_editor_plugin.cpp msgid "Toggle alphabetical sorting of the method list." msgstr "PÅ™epnout abecednà řazenà seznamu metod." #: editor/plugins/script_editor_plugin.cpp -#, fuzzy msgid "Filter methods" -msgstr "Režim filtru:" +msgstr "Filtrovat metody" #: editor/plugins/script_editor_plugin.cpp msgid "Sort" @@ -6769,9 +6779,8 @@ msgid "Open..." msgstr "OtevÅ™Ãt..." #: editor/plugins/script_editor_plugin.cpp -#, fuzzy msgid "Reopen Closed Script" -msgstr "OtevÅ™Ãt skript" +msgstr "Znovu otevÅ™Ãt zavÅ™ený skript" #: editor/plugins/script_editor_plugin.cpp msgid "Save All" @@ -6786,7 +6795,6 @@ msgid "Copy Script Path" msgstr "ZkopÃrovat cestu ke skriptu" #: editor/plugins/script_editor_plugin.cpp -#, fuzzy msgid "History Previous" msgstr "Historie pÅ™edchozÃ" @@ -6824,9 +6832,8 @@ msgid "Run" msgstr "Spustit" #: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp -#, fuzzy msgid "Step Into" -msgstr "Vstoupit" +msgstr "Vstoupit do" #: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp msgid "Step Over" @@ -6850,9 +6857,8 @@ msgid "Debug with External Editor" msgstr "Debugovat v externÃm editoru" #: editor/plugins/script_editor_plugin.cpp -#, fuzzy msgid "Open Godot online documentation." -msgstr "OtevÅ™Ãt Godot online dokumentaci" +msgstr "OtevÅ™Ãt online dokumentaci Godotu." #: editor/plugins/script_editor_plugin.cpp msgid "Request Docs" @@ -6905,9 +6911,8 @@ msgid "Search Results" msgstr "Výsledky hledánÃ" #: editor/plugins/script_editor_plugin.cpp -#, fuzzy msgid "Clear Recent Scripts" -msgstr "Vymazat nedávné scény" +msgstr "Vymazat nedávné skripty" #: editor/plugins/script_text_editor.cpp #, fuzzy @@ -6915,9 +6920,8 @@ msgid "Connections to method:" msgstr "PÅ™ipojit k uzlu:" #: editor/plugins/script_text_editor.cpp editor/script_editor_debugger.cpp -#, fuzzy msgid "Source" -msgstr "Zdroj:" +msgstr "Zdroj" #: editor/plugins/script_text_editor.cpp msgid "Target" @@ -7759,9 +7763,8 @@ msgid "(empty)" msgstr "(prázdný)" #: editor/plugins/sprite_frames_editor_plugin.cpp -#, fuzzy msgid "Move Frame" -msgstr "Vložit snÃmek" +msgstr "Posunout snÃmek" #: editor/plugins/sprite_frames_editor_plugin.cpp msgid "Animations:" @@ -7780,9 +7783,8 @@ msgid "Loop" msgstr "SmyÄka" #: editor/plugins/sprite_frames_editor_plugin.cpp -#, fuzzy msgid "Animation Frames:" -msgstr "SnÃmky animace" +msgstr "SnÃmky animace:" #: editor/plugins/sprite_frames_editor_plugin.cpp #, fuzzy @@ -7810,9 +7812,8 @@ msgid "Move (After)" msgstr "PÅ™emÃstit (za)" #: editor/plugins/sprite_frames_editor_plugin.cpp -#, fuzzy msgid "Select Frames" -msgstr "Vybrat uzel" +msgstr "Vybrat snÃmky" #: editor/plugins/sprite_frames_editor_plugin.cpp #, fuzzy @@ -7901,9 +7902,8 @@ msgid "Remove All" msgstr "Odebrat vÅ¡e" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Edit Theme" -msgstr "Editovat téma..." +msgstr "Editovat téma" #: editor/plugins/theme_editor_plugin.cpp msgid "Theme editing menu." @@ -8043,9 +8043,8 @@ msgid "Color" msgstr "Barva" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Theme File" -msgstr "Téma" +msgstr "Soubor tématu" #: editor/plugins/tile_map_editor_plugin.cpp msgid "Erase Selection" @@ -8122,22 +8121,18 @@ msgid "Pick Tile" msgstr "Vybrat dlaždici" #: editor/plugins/tile_map_editor_plugin.cpp -#, fuzzy msgid "Rotate Left" msgstr "OtoÄit doleva" #: editor/plugins/tile_map_editor_plugin.cpp -#, fuzzy msgid "Rotate Right" msgstr "OtoÄit doprava" #: editor/plugins/tile_map_editor_plugin.cpp -#, fuzzy msgid "Flip Horizontally" msgstr "PÅ™evrátit horizontálnÄ›" #: editor/plugins/tile_map_editor_plugin.cpp -#, fuzzy msgid "Flip Vertically" msgstr "PÅ™evrátit vertikálnÄ›" @@ -8152,9 +8147,8 @@ msgid "Add Texture(s) to TileSet." msgstr "PÅ™idat uzel(y) ze stromu" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Remove selected Texture from TileSet." -msgstr "Odstranit aktuálnà texturu z TileSetu" +msgstr "Odstranit vybranou texturu z TileSetu." #: editor/plugins/tile_set_editor_plugin.cpp msgid "Create from Scene" @@ -8496,7 +8490,7 @@ msgstr "TileSet" msgid "No VCS addons are available." msgstr "Jméno rodiÄe uzlu, pokud dostupné" -#: editor/plugins/version_control_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/version_control_editor_plugin.cpp msgid "Error" msgstr "Chyba" @@ -8598,17 +8592,15 @@ msgstr "" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "(GLES3 only)" -msgstr "" +msgstr "(Pouze GLES3)" #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Add Output" -msgstr "PÅ™idat vstup" +msgstr "PÅ™idat výstup" #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Scalar" -msgstr "ZvÄ›tÅ¡enÃ:" +msgstr "Skalár" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Vector" @@ -8616,7 +8608,7 @@ msgstr "Vektor" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Boolean" -msgstr "" +msgstr "Boolean" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Sampler" @@ -8910,14 +8902,12 @@ msgid "'%s' input parameter for vertex and fragment shader mode." msgstr "'%s' vstupnà parametr pro mód vertexového a fragmentového shaderu." #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Scalar function." -msgstr "ZmÄ›nit skalárnà funkci" +msgstr "Skalárnà funkce." #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Scalar operator." -msgstr "ZmÄ›nit skalárnà operátor" +msgstr "Skalárnà operátor." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "E constant (2.718282). Represents the base of the natural logarithm." @@ -8960,18 +8950,16 @@ msgid "Returns the arc-cosine of the parameter." msgstr "Vrátà arkus kosinus parametru." #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Returns the inverse hyperbolic cosine of the parameter." -msgstr "(Pouze GLES3) Vrátà inverznà hyperbolický kosinus parametru." +msgstr "Vrátà inverznà hyperbolický kosinus parametru." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Returns the arc-sine of the parameter." msgstr "Vrátà arkus sinus parametru." #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Returns the inverse hyperbolic sine of the parameter." -msgstr "(Pouze GLES3) Vrátà inverznà hyperbolický sinus parametru." +msgstr "Vrátà inverznà hyperbolický sinus parametru." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Returns the arc-tangent of the parameter." @@ -8982,9 +8970,8 @@ msgid "Returns the arc-tangent of the parameters." msgstr "Vrátà arkus tangent parametrů." #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Returns the inverse hyperbolic tangent of the parameter." -msgstr "(Pouze GLES3) Vrátà inverznà hyperbolický tangent parametru." +msgstr "Vrátà inverznà hyperbolický tangent parametru." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "" @@ -9001,9 +8988,8 @@ msgid "Returns the cosine of the parameter." msgstr "Vrátà kosinus parametru." #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Returns the hyperbolic cosine of the parameter." -msgstr "(Pouze GLES3) Vrátà hyperbolický kosinus parametru." +msgstr "Vrátà hyperbolický kosinus parametru." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Converts a quantity in radians to degrees." @@ -9023,7 +9009,7 @@ msgstr "Nalezne nejbližšà celé ÄÃslo menšà nebo stejné jako parametr." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Computes the fractional part of the argument." -msgstr "" +msgstr "VypoÄÃtá desetinnou Äást argumentu." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Returns the inverse of the square root of the parameter." @@ -9071,14 +9057,12 @@ msgid "1.0 / scalar" msgstr "1.0 / skalár" #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Finds the nearest integer to the parameter." -msgstr "(Pouze GLES3) Nalezne nejbližšà celé ÄÃslo k parametru." +msgstr "Nalezne nejbližšà celé ÄÃslo k parametru." #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Finds the nearest even integer to the parameter." -msgstr "(Pouze GLES3) Nalezne nejbližšà sudé celé ÄÃslo k parametru." +msgstr "Nalezne nejbližšà sudé celé ÄÃslo k parametru." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Clamps the value between 0.0 and 1.0." @@ -9093,9 +9077,8 @@ msgid "Returns the sine of the parameter." msgstr "Vrátà sinus parametru." #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Returns the hyperbolic sine of the parameter." -msgstr "(Pouze GLES3) Vrátà hyperbolický sinus parametru." +msgstr "Vrátà hyperbolický sinus parametru." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Returns the square root of the parameter." @@ -9122,9 +9105,8 @@ msgid "Returns the tangent of the parameter." msgstr "Vrátà tangens parametru." #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Returns the hyperbolic tangent of the parameter." -msgstr "(Pouze GLES3) Vrátà hyperbolický tangens parametru." +msgstr "Vrátà hyperbolický tangens parametru." #: editor/plugins/visual_shader_editor_plugin.cpp #, fuzzy @@ -9596,7 +9578,7 @@ msgstr "Zkompilovaný" #: editor/project_export.cpp msgid "Encrypted (Provide Key Below)" -msgstr "" +msgstr "Å ifrovaný (PoskytnÄ›te klÃÄ nÞe)" #: editor/project_export.cpp msgid "Invalid Encryption Key (must be 64 characters long)" @@ -9604,7 +9586,7 @@ msgstr "Neplatný Å¡ifrovacà klÃÄ (musà být dlouhý 64 znaků)" #: editor/project_export.cpp msgid "Script Encryption Key (256-bits as hex):" -msgstr "" +msgstr "Å ifrovacà klÃÄ skriptu (256 bitový hexadecimálnÃ):" #: editor/project_export.cpp msgid "Export PCK/Zip" @@ -9623,9 +9605,8 @@ msgid "Export All" msgstr "Exportovat vÅ¡e" #: editor/project_export.cpp editor/project_manager.cpp -#, fuzzy msgid "ZIP File" -msgstr " Soubory" +msgstr "Soubor ZIP" #: editor/project_export.cpp msgid "Godot Game Pack" @@ -9644,11 +9625,19 @@ msgid "Export With Debug" msgstr "" #: editor/project_manager.cpp -msgid "The path does not exist." +#, fuzzy +msgid "The path specified doesn't exist." msgstr "Cesta neexistuje." #: editor/project_manager.cpp -msgid "Invalid '.zip' project file, does not contain a 'project.godot' file." +#, fuzzy +msgid "Error opening package file (it's not in ZIP format)." +msgstr "NepodaÅ™ilo se otevÅ™Ãt balÃÄek, nenà ve formátu ZIP." + +#: editor/project_manager.cpp +#, fuzzy +msgid "" +"Invalid \".zip\" project file; it doesn't contain a \"project.godot\" file." msgstr "Neplatný projektový '.zip' soubor; neobsahuje soubor 'project.godot'." #: editor/project_manager.cpp @@ -9656,20 +9645,22 @@ msgid "Please choose an empty folder." msgstr "Zvolte prosÃm prázdnou složku." #: editor/project_manager.cpp -msgid "Please choose a 'project.godot' or '.zip' file." +#, fuzzy +msgid "Please choose a \"project.godot\" or \".zip\" file." msgstr "Zvolte prosÃm soubor 'project.godot' nebo '.zip'." #: editor/project_manager.cpp -msgid "Directory already contains a Godot project." -msgstr "" +#, fuzzy +msgid "This directory already contains a Godot project." +msgstr "Složka již obsahuje projekt Godotu." #: editor/project_manager.cpp msgid "New Game Project" -msgstr "" +msgstr "Nový projekt hry" #: editor/project_manager.cpp msgid "Imported Project" -msgstr "" +msgstr "Importovaný projekt" #: editor/project_manager.cpp msgid "Invalid Project Name." @@ -9681,29 +9672,31 @@ msgstr "Nelze vytvoÅ™it složku." #: editor/project_manager.cpp msgid "There is already a folder in this path with the specified name." -msgstr "" +msgstr "V tomto umÃstÄ›nà již existuje složka s daným názvem." #: editor/project_manager.cpp msgid "It would be a good idea to name your project." -msgstr "" +msgstr "Bylo by dobré pojmenovat váš projekt." #: editor/project_manager.cpp msgid "Invalid project path (changed anything?)." -msgstr "" +msgstr "Neplatná cesta k projektu (nÄ›co se zmÄ›nilo?)." #: editor/project_manager.cpp msgid "" "Couldn't load project.godot in project path (error %d). It may be missing or " "corrupted." msgstr "" +"Nelze naÄÃst project.godot v umÃstÄ›nà projektu (chyba %d). Může chybÄ›t nebo " +"být poÅ¡kozený." #: editor/project_manager.cpp msgid "Couldn't edit project.godot in project path." -msgstr "" +msgstr "Nelze upravit project.godot v umÃstÄ›nà projektu." #: editor/project_manager.cpp msgid "Couldn't create project.godot in project path." -msgstr "" +msgstr "Nelze vytvoÅ™it project.godot v umÃstÄ›nà projektu." #: editor/project_manager.cpp msgid "Rename Project" @@ -9711,7 +9704,7 @@ msgstr "PÅ™ejmenovat projekt" #: editor/project_manager.cpp msgid "Import Existing Project" -msgstr "" +msgstr "Importovat existujÃcà projekt" #: editor/project_manager.cpp msgid "Import & Edit" @@ -9742,17 +9735,16 @@ msgid "Project Path:" msgstr "Cesta k projektu:" #: editor/project_manager.cpp -#, fuzzy msgid "Project Installation Path:" -msgstr "Cesta k projektu:" +msgstr "InstalaÄnà cesta k projektu:" #: editor/project_manager.cpp msgid "Renderer:" -msgstr "" +msgstr "Renderer:" #: editor/project_manager.cpp msgid "OpenGL ES 3.0" -msgstr "" +msgstr "OpenGL ES 3.0" #: editor/project_manager.cpp msgid "" @@ -9761,10 +9753,14 @@ msgid "" "Incompatible with older hardware\n" "Not recommended for web games" msgstr "" +"Vyššà vizuálnà kvalita\n" +"VÅ¡echny funkce dostupné\n" +"Nekompatibilnà se starÅ¡Ãm hardwarem\n" +"NedoporuÄené pro webové hry" #: editor/project_manager.cpp msgid "OpenGL ES 2.0" -msgstr "" +msgstr "OpenGL ES 2.0" #: editor/project_manager.cpp msgid "" @@ -9773,23 +9769,26 @@ msgid "" "Works on most hardware\n" "Recommended for web games" msgstr "" +"Nižšà vizuálnà kvalita\n" +"NÄ›které funkce nejsou dostupné\n" +"Funguje na vÄ›tÅ¡inÄ› hardwaru\n" +"DoporuÄené pro webové hry" #: editor/project_manager.cpp msgid "Renderer can be changed later, but scenes may need to be adjusted." -msgstr "" +msgstr "Renderer je možné zmÄ›nit pozdÄ›ji, ale scény mohou vyžadovat úpravy." #: editor/project_manager.cpp msgid "Unnamed Project" msgstr "Nepojmenovaný projekt" #: editor/project_manager.cpp -#, fuzzy msgid "Missing Project" -msgstr "Sestavit projekt" +msgstr "ChybÄ›jÃcà projekt" #: editor/project_manager.cpp msgid "Error: Project is missing on the filesystem." -msgstr "" +msgstr "Chyba: Projek se nevyskytuje v souborovém systému." #: editor/project_manager.cpp msgid "Can't open project at '%s'." @@ -9811,6 +9810,14 @@ msgid "" "Warning: You won't be able to open the project with previous versions of the " "engine anymore." msgstr "" +"KonfiguraÄnà soubor projektu nespecifikuje verzi Godotu ve které byl " +"vytvoÅ™en.\n" +"\n" +"%s\n" +"\n" +"Pokud se rozhodnete ho otevÅ™Ãt, tak bude pÅ™eveden do aktuálnÃho formátu " +"konfiguraÄnÃho souboru Godotu.\n" +"VarovánÃ: Nebude možné otevÅ™Ãt projekt v dÅ™ÃvÄ›jÅ¡Ãch verzÃch enginu." #: editor/project_manager.cpp msgid "" @@ -9823,12 +9830,21 @@ msgid "" "Warning: You won't be able to open the project with previous versions of the " "engine anymore." msgstr "" +"NásledujÃcà konfiguraÄnà soubor projektu byl vytvoÅ™en staršà verzà enginu a " +"potÅ™ebuje být konvertován pro aktuálnà verzi:\n" +"\n" +"%s\n" +"\n" +"PÅ™ejete si ho konvertovat?\n" +"VarovánÃ: Nebude možné otevÅ™Ãt projekt v dÅ™ÃvÄ›jÅ¡Ãch verzÃch enginu." #: editor/project_manager.cpp msgid "" "The project settings were created by a newer engine version, whose settings " "are not compatible with this version." msgstr "" +"KonfiguraÄnà soubor projektu byl vytvoÅ™en novÄ›jšà verzà enginu, jehož " +"konfigurace nenà kompatibilnà s touto verzÃ." #: editor/project_manager.cpp msgid "" @@ -9836,6 +9852,9 @@ msgid "" "Please edit the project and set the main scene in the Project Settings under " "the \"Application\" category." msgstr "" +"Nelze spustit projekt: nenà definovaná hlavnà scéna,\n" +"Upravte prosÃm projekt a nastavte hlavnà scénu v nastavenÃch projektu v " +"kategorii \"Application\"." #: editor/project_manager.cpp msgid "" @@ -10333,6 +10352,11 @@ msgstr "Sufix" #: editor/rename_dialog.cpp #, fuzzy +msgid "Use Regular Expressions" +msgstr "Regulárnà výrazy" + +#: editor/rename_dialog.cpp +#, fuzzy msgid "Advanced Options" msgstr "PokroÄilé možnosti" @@ -10367,7 +10391,7 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -msgid "Per Level counter" +msgid "Per-level Counter" msgstr "" #: editor/rename_dialog.cpp @@ -10399,10 +10423,6 @@ msgstr "" "ChybÄ›jÃcà ÄÃslice budou nahrazeny nulami." #: editor/rename_dialog.cpp -msgid "Regular Expressions" -msgstr "Regulárnà výrazy" - -#: editor/rename_dialog.cpp msgid "Post-Process" msgstr "" @@ -10411,12 +10431,14 @@ msgid "Keep" msgstr "" #: editor/rename_dialog.cpp -msgid "CamelCase to under_scored" -msgstr "" +#, fuzzy +msgid "PascalCase to snake_case" +msgstr "CamelCase na under_scored" #: editor/rename_dialog.cpp -msgid "under_scored to CamelCase" -msgstr "" +#, fuzzy +msgid "snake_case to PascalCase" +msgstr "under_scored na CamelCase" #: editor/rename_dialog.cpp msgid "Case" @@ -10434,6 +10456,16 @@ msgstr "Na velká pÃsmena" msgid "Reset" msgstr "Resetovat" +#: editor/rename_dialog.cpp +#, fuzzy +msgid "Regular Expression Error" +msgstr "Regulárnà výrazy" + +#: editor/rename_dialog.cpp +#, fuzzy +msgid "At character %s" +msgstr "Platné znaky:" + #: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp msgid "Reparent Node" msgstr "" @@ -10658,7 +10690,6 @@ msgid "Load As Placeholder" msgstr "" #: editor/scene_tree_dock.cpp -#, fuzzy msgid "Open Documentation" msgstr "OtevÅ™Ãt dokumentaci" @@ -10702,9 +10733,8 @@ msgid "Delete (No Confirm)" msgstr "Odstranit (bez potvrzenÃ)" #: editor/scene_tree_dock.cpp -#, fuzzy msgid "Add/Create a New Node." -msgstr "PÅ™idat/VytvoÅ™it nový uzel" +msgstr "PÅ™idat/VytvoÅ™it nový uzel." #: editor/scene_tree_dock.cpp msgid "" @@ -10738,9 +10768,8 @@ msgid "Toggle Visible" msgstr "PÅ™epnout viditelnost" #: editor/scene_tree_editor.cpp -#, fuzzy msgid "Unlock Node" -msgstr "Vybrat uzel" +msgstr "Odemknout uzel" #: editor/scene_tree_editor.cpp #, fuzzy @@ -10775,9 +10804,8 @@ msgid "" msgstr "" #: editor/scene_tree_editor.cpp -#, fuzzy msgid "Open Script:" -msgstr "OtevÅ™Ãt skript" +msgstr "OtevÅ™Ãt skript:" #: editor/scene_tree_editor.cpp msgid "" @@ -10803,7 +10831,7 @@ msgstr "" #: editor/scene_tree_editor.cpp msgid "Invalid node name, the following characters are not allowed:" -msgstr "" +msgstr "Neplatný název uzlu, následujÃcà znaky nejsou povoleny:" #: editor/scene_tree_editor.cpp msgid "Rename Node" @@ -10822,39 +10850,32 @@ msgid "Select a Node" msgstr "Vybrat uzel" #: editor/script_create_dialog.cpp -#, fuzzy msgid "Path is empty." -msgstr "Cesta je prázdná" +msgstr "Cesta je prázdná." #: editor/script_create_dialog.cpp -#, fuzzy msgid "Filename is empty." -msgstr "Název souboru je prázdný" +msgstr "Název souboru je prázdný." #: editor/script_create_dialog.cpp -#, fuzzy msgid "Path is not local." -msgstr "Cesta nenà mÃstnÃ" +msgstr "Cesta nenà mÃstnÃ." #: editor/script_create_dialog.cpp -#, fuzzy msgid "Invalid base path." -msgstr "Neplatná základnà cesta" +msgstr "Neplatná základnà cesta." #: editor/script_create_dialog.cpp -#, fuzzy msgid "A directory with the same name exists." -msgstr "Složka se stejným jménem již existuje" +msgstr "Složka se stejným jménem již existuje." #: editor/script_create_dialog.cpp -#, fuzzy msgid "Invalid extension." -msgstr "Neplatná pÅ™Ãpona" +msgstr "Neplatná pÅ™Ãpona." #: editor/script_create_dialog.cpp -#, fuzzy msgid "Wrong extension chosen." -msgstr "Vybrána Å¡patná pÅ™Ãpona" +msgstr "Vybrána Å¡patná pÅ™Ãpona." #: editor/script_create_dialog.cpp msgid "Error loading template '%s'" @@ -10878,23 +10899,20 @@ msgid "N/A" msgstr "N/A" #: editor/script_create_dialog.cpp -#, fuzzy msgid "Open Script / Choose Location" -msgstr "OtevÅ™Ãt editor skriptů" +msgstr "OtevÅ™Ãt skript / Vybrat umÃstÄ›nÃ" #: editor/script_create_dialog.cpp msgid "Open Script" msgstr "OtevÅ™Ãt skript" #: editor/script_create_dialog.cpp -#, fuzzy msgid "File exists, it will be reused." -msgstr "Soubor již existuje, bude znovu použit" +msgstr "Soubor již existuje, bude znovu použit." #: editor/script_create_dialog.cpp -#, fuzzy msgid "Invalid class name." -msgstr "Neplatné jméno tÅ™Ãdy" +msgstr "Neplatné jméno tÅ™Ãdy." #: editor/script_create_dialog.cpp #, fuzzy @@ -10903,13 +10921,12 @@ msgstr "Neplatné jméno vlastnosti." #: editor/script_create_dialog.cpp #, fuzzy -msgid "Script is valid." -msgstr "Skript je validnÃ" +msgid "Script path/name is valid." +msgstr "Skript je validnÃ." #: editor/script_create_dialog.cpp -#, fuzzy msgid "Allowed: a-z, A-Z, 0-9, _ and ." -msgstr "Povoleno: a-z, A-Z, 0-9 a _" +msgstr "Povoleno: a-z, A-Z, 0-9, _ a ." #: editor/script_create_dialog.cpp #, fuzzy @@ -10917,34 +10934,28 @@ msgid "Built-in script (into scene file)." msgstr "Možnostà scén." #: editor/script_create_dialog.cpp -#, fuzzy msgid "Will create a new script file." -msgstr "VytvoÅ™it nový soubor skriptu" +msgstr "Vytvořà nový soubor skriptu." #: editor/script_create_dialog.cpp -#, fuzzy msgid "Will load an existing script file." -msgstr "NaÄÃst existujÃcà soubor skriptu" +msgstr "NaÄte existujÃcà soubor skriptu." #: editor/script_create_dialog.cpp -#, fuzzy msgid "Script file already exists." -msgstr "Akce '%s' již existuje!" +msgstr "Soubor skriptu již existuje." #: editor/script_create_dialog.cpp -#, fuzzy msgid "Class Name:" -msgstr "Jméno tÅ™Ãdy" +msgstr "Jméno tÅ™Ãdy:" #: editor/script_create_dialog.cpp -#, fuzzy msgid "Template:" -msgstr "Å ablona" +msgstr "Å ablona:" #: editor/script_create_dialog.cpp -#, fuzzy msgid "Built-in Script:" -msgstr "VestavÄ›ný skript" +msgstr "VestavÄ›ný skript:" #: editor/script_create_dialog.cpp msgid "Attach Node Script" @@ -10959,7 +10970,6 @@ msgid "Bytes:" msgstr "Bajtů:" #: editor/script_editor_debugger.cpp -#, fuzzy msgid "Warning:" msgstr "VarovánÃ:" @@ -10968,29 +10978,24 @@ msgid "Error:" msgstr "Chyba:" #: editor/script_editor_debugger.cpp -#, fuzzy msgid "C++ Error" -msgstr "KopÃrovat chybu" +msgstr "Chyba C++" #: editor/script_editor_debugger.cpp -#, fuzzy msgid "C++ Error:" -msgstr "Chyba:" +msgstr "Chyba C++:" #: editor/script_editor_debugger.cpp -#, fuzzy msgid "C++ Source" -msgstr "Zdroj:" +msgstr "Zdroj C++" #: editor/script_editor_debugger.cpp -#, fuzzy msgid "Source:" msgstr "Zdroj:" #: editor/script_editor_debugger.cpp -#, fuzzy msgid "C++ Source:" -msgstr "Zdroj:" +msgstr "Zdroj C++:" #: editor/script_editor_debugger.cpp msgid "Stack Trace" @@ -11011,6 +11016,11 @@ msgstr "KopÃrovat chybu" #: editor/script_editor_debugger.cpp #, fuzzy +msgid "Video RAM" +msgstr "Video pamÄ›t" + +#: editor/script_editor_debugger.cpp +#, fuzzy msgid "Skip Breakpoints" msgstr "VytvoÅ™it body." @@ -11059,10 +11069,6 @@ msgid "Total:" msgstr "Celkem:" #: editor/script_editor_debugger.cpp -msgid "Video Mem" -msgstr "Video pamÄ›t" - -#: editor/script_editor_debugger.cpp msgid "Resource Path" msgstr "Cesta ke zdroji" @@ -11299,7 +11305,7 @@ msgstr "Neplatná instance slovnÃku (neplatné podtÅ™Ãdy)" #: modules/gdscript/gdscript_functions.cpp msgid "Object can't provide a length." -msgstr "" +msgstr "Objekt nemůže poskytnout délku." #: modules/gridmap/grid_map_editor_plugin.cpp #, fuzzy @@ -11332,19 +11338,16 @@ msgid "GridMap Delete Selection" msgstr "GridMap Smazat výbÄ›r" #: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy msgid "GridMap Fill Selection" -msgstr "GridMap Smazat výbÄ›r" +msgstr "GridMap Vyplnit výbÄ›r" #: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy msgid "GridMap Paste Selection" -msgstr "GridMap Smazat výbÄ›r" +msgstr "GridMap Vložit výbÄ›r" #: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy msgid "GridMap Paint" -msgstr "Nastavenà GridMap" +msgstr "Vykreslit GridMap" #: modules/gridmap/grid_map_editor_plugin.cpp msgid "Grid Map" @@ -11417,9 +11420,8 @@ msgid "Clear Selection" msgstr "Vymazat výbÄ›r" #: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy msgid "Fill Selection" -msgstr "VÅ¡echny vybrané" +msgstr "Vyplnit výbÄ›r" #: modules/gridmap/grid_map_editor_plugin.cpp msgid "GridMap Settings" @@ -11427,12 +11429,11 @@ msgstr "Nastavenà GridMap" #: modules/gridmap/grid_map_editor_plugin.cpp msgid "Pick Distance:" -msgstr "" +msgstr "Vybrat vzdálenost:" #: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy msgid "Filter meshes" -msgstr "Režim filtru:" +msgstr "Filtrovat meshe" #: modules/gridmap/grid_map_editor_plugin.cpp msgid "Give a MeshLibrary resource to this GridMap to use its meshes." @@ -11557,21 +11558,19 @@ msgstr "ZmÄ›nit název argumentu" #: modules/visual_script/visual_script_editor.cpp msgid "Set Variable Default Value" -msgstr "" +msgstr "Nastavit výchozà hodnotu promÄ›nné" #: modules/visual_script/visual_script_editor.cpp msgid "Set Variable Type" msgstr "Nastavit typ promÄ›nné" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Add Input Port" -msgstr "PÅ™idat vstup" +msgstr "PÅ™idat vstupnà port" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Add Output Port" -msgstr "PÅ™idat vstup" +msgstr "PÅ™idat výstupnà port" #: modules/visual_script/visual_script_editor.cpp #, fuzzy @@ -11580,27 +11579,24 @@ msgstr "" "Neplatný název. Nesmà kolidovat s existujÃcÃm jménem zabudovaného typu." #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Create a new function." -msgstr "VytvoÅ™it nové uzly." +msgstr "VytvoÅ™it novou funkci." #: modules/visual_script/visual_script_editor.cpp msgid "Variables:" msgstr "PromÄ›nné:" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Create a new variable." -msgstr "VytvoÅ™it nové uzly." +msgstr "VytvoÅ™it novou promÄ›nnou." #: modules/visual_script/visual_script_editor.cpp msgid "Signals:" msgstr "Signály:" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Create a new signal." -msgstr "VytvoÅ™it nový polygon." +msgstr "VytvoÅ™it nový signál." #: modules/visual_script/visual_script_editor.cpp msgid "Name is not a valid identifier:" @@ -11627,9 +11623,8 @@ msgid "Add Function" msgstr "PÅ™idat funkci" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Delete input port" -msgstr "Odstranit bod" +msgstr "Smazat vstupnà port" #: modules/visual_script/visual_script_editor.cpp msgid "Add Variable" @@ -11640,14 +11635,12 @@ msgid "Add Signal" msgstr "PÅ™idat signál" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Remove Input Port" -msgstr "Odstranit bod" +msgstr "Odstranit vstupnà port" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Remove Output Port" -msgstr "Odstranit bod" +msgstr "Odstranit výstupnà port" #: modules/visual_script/visual_script_editor.cpp msgid "Change Expression" @@ -11659,7 +11652,7 @@ msgstr "Odstranit uzly VisualScriptu" #: modules/visual_script/visual_script_editor.cpp msgid "Duplicate VisualScript Nodes" -msgstr "" +msgstr "Duplikovat uzly VisualScriptu" #: modules/visual_script/visual_script_editor.cpp msgid "Hold %s to drop a Getter. Hold Shift to drop a generic signature." @@ -11730,9 +11723,8 @@ msgid "Connect Nodes" msgstr "PÅ™ipojit uzly" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Disconnect Nodes" -msgstr "Odpojit uzly grafu" +msgstr "Odpojit uzly" #: modules/visual_script/visual_script_editor.cpp #, fuzzy @@ -11753,9 +11745,8 @@ msgid "Change Input Value" msgstr "ZmÄ›nit vstupnà hodnotu" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Resize Comment" -msgstr "ZmÄ›nit velikost CanvasItem" +msgstr "ZmÄ›nit velikost komentáře" #: modules/visual_script/visual_script_editor.cpp msgid "Can't copy the function node." @@ -12731,6 +12722,9 @@ msgstr "" msgid "Constants cannot be modified." msgstr "Konstanty nenà možné upravovat." +#~ msgid "Replaced %d occurrence(s)." +#~ msgstr "Nahrazeno %d výskytů." + #~ msgid "" #~ "There are currently no tutorials for this class, you can [color=$color]" #~ "[url=$url]contribute one[/url][/color] or [color=$color][url=" diff --git a/editor/translations/da.po b/editor/translations/da.po index aed35d2dc6..e575e1a015 100644 --- a/editor/translations/da.po +++ b/editor/translations/da.po @@ -15,12 +15,13 @@ # Mads K. Bredager <mbredager@gmail.com>, 2019. # Kristoffer Andersen <kjaa@google.com>, 2019. # Joe Osborne <reachjoe.o@gmail.com>, 2020. +# Autowinto <happymansi@hotmail.com>, 2020. msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2020-01-16 22:23+0000\n" -"Last-Translator: Joe Osborne <reachjoe.o@gmail.com>\n" +"PO-Revision-Date: 2020-02-02 08:51+0000\n" +"Last-Translator: Autowinto <happymansi@hotmail.com>\n" "Language-Team: Danish <https://hosted.weblate.org/projects/godot-engine/" "godot/da/>\n" "Language: da\n" @@ -28,7 +29,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 3.10.2-dev\n" +"X-Generator: Weblate 3.11-dev\n" #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/visual_script/visual_script_builtin_funcs.cpp @@ -37,7 +38,7 @@ msgstr "Ugyldigt type argument til convert(), brug TYPE_* konstanter." #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp msgid "Expected a string of length 1 (a character)." -msgstr "" +msgstr "Forventede en streng med længden 1 (en karakter)." #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/mono/glue/gd_glue.cpp @@ -134,9 +135,8 @@ msgid "Delete Selected Key(s)" msgstr "Slet valgte nøgle(r)" #: editor/animation_bezier_editor.cpp -#, fuzzy msgid "Add Bezier Point" -msgstr "Tilføj punkt" +msgstr "Tilføj Bezier-punkt" #: editor/animation_bezier_editor.cpp msgid "Move Bezier Points" @@ -721,8 +721,9 @@ msgid "Line Number:" msgstr "Linjenummer:" #: editor/code_editor.cpp -msgid "Replaced %d occurrence(s)." -msgstr "Erstattede %d forekomst(er)." +#, fuzzy +msgid "%d replaced." +msgstr "Erstat" #: editor/code_editor.cpp editor/editor_help.cpp msgid "%d match." @@ -4102,6 +4103,10 @@ msgid "Saving..." msgstr "Gemmer..." #: editor/import_dock.cpp +msgid "%d Files" +msgstr "%d Filer" + +#: editor/import_dock.cpp msgid "Set as Default for '%s'" msgstr "Sæt som Standard for '%s'" @@ -4110,10 +4115,6 @@ msgid "Clear Default for '%s'" msgstr "Fjern Standard for '%s'" #: editor/import_dock.cpp -msgid " Files" -msgstr " Filer" - -#: editor/import_dock.cpp msgid "Import As:" msgstr "Importer Som:" @@ -6062,11 +6063,12 @@ msgid "Mesh is empty!" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Trimesh Body" -msgstr "" +#, fuzzy +msgid "Couldn't create a Trimesh collision shape." +msgstr "Kunne ikke oprette mappe." #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Convex Body" +msgid "Create Static Trimesh Body" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -6078,12 +6080,30 @@ msgid "Create Trimesh Static Shape" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Failed creating shapes!" +msgid "Can't create a single convex collision shape for the scene root." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Couldn't create a single convex collision shape." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp #, fuzzy -msgid "Create Convex Shape(s)" +msgid "Create Single Convex Shape" +msgstr "Opret Ny %s" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Can't create multiple convex collision shapes for the scene root." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Couldn't create any collision shapes." +msgstr "Kunne ikke oprette mappe." + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Multiple Convex Shapes" msgstr "Opret Ny %s" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -6135,19 +6155,57 @@ msgid "Create Trimesh Static Body" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a StaticBody and assigns a polygon-based collision shape to it " +"automatically.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Trimesh Collision Sibling" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp #, fuzzy -msgid "Create Convex Collision Sibling(s)" +msgid "Create Single Convex Collision Siblings" msgstr "Opret Poly" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a single convex collision shape.\n" +"This is the fastest (but least accurate) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Multiple Convex Collision Siblings" +msgstr "Opret Poly" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is a performance middle-ground between the two above options." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Outline Mesh..." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a static outline mesh. The outline mesh will have its normals " +"flipped automatically.\n" +"This can be used instead of the SpatialMaterial Grow property when using " +"that property isn't possible." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp #, fuzzy msgid "View UV1" msgstr "Vis FPS" @@ -8660,7 +8718,7 @@ msgstr "TileSet..." msgid "No VCS addons are available." msgstr "" -#: editor/plugins/version_control_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/version_control_editor_plugin.cpp msgid "Error" msgstr "" @@ -9793,11 +9851,18 @@ msgid "Export With Debug" msgstr "" #: editor/project_manager.cpp -msgid "The path does not exist." -msgstr "" +#, fuzzy +msgid "The path specified doesn't exist." +msgstr "Fil eksisterer ikke." + +#: editor/project_manager.cpp +#, fuzzy +msgid "Error opening package file (it's not in ZIP format)." +msgstr "Fejl ved Ã¥bning af pakke fil, ikke i zip format." #: editor/project_manager.cpp -msgid "Invalid '.zip' project file, does not contain a 'project.godot' file." +msgid "" +"Invalid \".zip\" project file; it doesn't contain a \"project.godot\" file." msgstr "" #: editor/project_manager.cpp @@ -9805,11 +9870,11 @@ msgid "Please choose an empty folder." msgstr "" #: editor/project_manager.cpp -msgid "Please choose a 'project.godot' or '.zip' file." +msgid "Please choose a \"project.godot\" or \".zip\" file." msgstr "" #: editor/project_manager.cpp -msgid "Directory already contains a Godot project." +msgid "This directory already contains a Godot project." msgstr "" #: editor/project_manager.cpp @@ -10480,6 +10545,11 @@ msgid "Suffix" msgstr "" #: editor/rename_dialog.cpp +#, fuzzy +msgid "Use Regular Expressions" +msgstr "Skift udtryk" + +#: editor/rename_dialog.cpp msgid "Advanced Options" msgstr "" @@ -10518,7 +10588,7 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -msgid "Per Level counter" +msgid "Per-level Counter" msgstr "" #: editor/rename_dialog.cpp @@ -10549,11 +10619,6 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -#, fuzzy -msgid "Regular Expressions" -msgstr "Skift udtryk" - -#: editor/rename_dialog.cpp msgid "Post-Process" msgstr "" @@ -10562,11 +10627,11 @@ msgid "Keep" msgstr "" #: editor/rename_dialog.cpp -msgid "CamelCase to under_scored" +msgid "PascalCase to snake_case" msgstr "" #: editor/rename_dialog.cpp -msgid "under_scored to CamelCase" +msgid "snake_case to PascalCase" msgstr "" #: editor/rename_dialog.cpp @@ -10587,6 +10652,16 @@ msgstr "" msgid "Reset" msgstr "Nulstil Zoom" +#: editor/rename_dialog.cpp +#, fuzzy +msgid "Regular Expression Error" +msgstr "Skift udtryk" + +#: editor/rename_dialog.cpp +#, fuzzy +msgid "At character %s" +msgstr "Gyldige karakterer:" + #: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp msgid "Reparent Node" msgstr "" @@ -11058,7 +11133,7 @@ msgid "Invalid inherited parent name or path." msgstr "Ugyldigt inherited parent navn eller sti" #: editor/script_create_dialog.cpp -msgid "Script is valid." +msgid "Script path/name is valid." msgstr "" #: editor/script_create_dialog.cpp @@ -11167,6 +11242,10 @@ msgid "Copy Error" msgstr "Indlæs Fejl" #: editor/script_editor_debugger.cpp +msgid "Video RAM" +msgstr "" + +#: editor/script_editor_debugger.cpp #, fuzzy msgid "Skip Breakpoints" msgstr "Slet points" @@ -11217,10 +11296,6 @@ msgid "Total:" msgstr "" #: editor/script_editor_debugger.cpp -msgid "Video Mem" -msgstr "" - -#: editor/script_editor_debugger.cpp msgid "Resource Path" msgstr "" @@ -12868,6 +12943,9 @@ msgstr "" msgid "Constants cannot be modified." msgstr "Konstanter kan ikke ændres." +#~ msgid "Replaced %d occurrence(s)." +#~ msgstr "Erstattede %d forekomst(er)." + #~ msgid "" #~ "There are currently no tutorials for this class, you can [color=$color]" #~ "[url=$url]contribute one[/url][/color] or [color=$color][url=" diff --git a/editor/translations/de.po b/editor/translations/de.po index 1b1ada4825..3e8c61025a 100644 --- a/editor/translations/de.po +++ b/editor/translations/de.po @@ -52,7 +52,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2020-01-20 11:39+0000\n" +"PO-Revision-Date: 2020-02-16 15:20+0000\n" "Last-Translator: So Wieso <sowieso@dukun.de>\n" "Language-Team: German <https://hosted.weblate.org/projects/godot-engine/" "godot/de/>\n" @@ -734,8 +734,8 @@ msgid "Line Number:" msgstr "Zeilennummer:" #: editor/code_editor.cpp -msgid "Replaced %d occurrence(s)." -msgstr "Suchbegriff wurde %d mal ersetzt." +msgid "%d replaced." +msgstr "%d ersetzt." #: editor/code_editor.cpp editor/editor_help.cpp msgid "%d match." @@ -4022,6 +4022,10 @@ msgid "Saving..." msgstr "Speichere..." #: editor/import_dock.cpp +msgid "%d Files" +msgstr "%d Dateien" + +#: editor/import_dock.cpp msgid "Set as Default for '%s'" msgstr "Als Standard für ‚%s‘ setzen" @@ -4030,10 +4034,6 @@ msgid "Clear Default for '%s'" msgstr "Standard für ‚%s‘ löschen" #: editor/import_dock.cpp -msgid " Files" -msgstr " Dateien" - -#: editor/import_dock.cpp msgid "Import As:" msgstr "Importiere als:" @@ -5667,9 +5667,8 @@ msgid "Auto Insert Key" msgstr "Schlüsselbild automatisch einfügen" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Animation Key and Pose Options" -msgstr "Animationsschlüsselbild eingefügt." +msgstr "Schlüsselbild- und Posen-Optionen für Animationen" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Insert Key (Existing Tracks)" @@ -5914,12 +5913,12 @@ msgid "Mesh is empty!" msgstr "Mesh ist leer!" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Trimesh Body" -msgstr "Statischen Trimesh-Körper erzeugen" +msgid "Couldn't create a Trimesh collision shape." +msgstr "Konnte Trimesh-Kollisionselement nicht erzeugen." #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Convex Body" -msgstr "Statischen Konvex-Körper erzeugen" +msgid "Create Static Trimesh Body" +msgstr "Statischen Trimesh-Körper erzeugen" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "This doesn't work on scene root!" @@ -5930,12 +5929,32 @@ msgid "Create Trimesh Static Shape" msgstr "Trimesh-Statische-Form erzeugen" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Failed creating shapes!" -msgstr "Form-Erstellung fehlgeschlagen!" +msgid "Can't create a single convex collision shape for the scene root." +msgstr "" +"Aus der Szenenwurzel kann ein einzelnes konvexes Kollisionselement nicht " +"erzeugt werden." + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Couldn't create a single convex collision shape." +msgstr "Ein einzelnes konvexes Kollisionselement konnte nicht erzeugt werden." + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Single Convex Shape" +msgstr "Einzelne konvexe Form erstellen" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Can't create multiple convex collision shapes for the scene root." +msgstr "" +"Aus der Szenenwurzel konnten mehrere konvexe Kollisionselemente nicht " +"erzeugt werden." + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Couldn't create any collision shapes." +msgstr "Konnte kein einziges Kollisionselement erzeugen." #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Convex Shape(s)" -msgstr "Konvexe Form(en) erstellen" +msgid "Create Multiple Convex Shapes" +msgstr "Mehrere konvexe Formen erstellen" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Navigation Mesh" @@ -5987,18 +6006,68 @@ msgid "Create Trimesh Static Body" msgstr "Statischen Trimesh-Körper erzeugen" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a StaticBody and assigns a polygon-based collision shape to it " +"automatically.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" +"Erstellt einen StaticBody und weist ein polygon-basiertes Kollisionselement " +"automatisch zu.\n" +"Dies ist die präziseste (aber langsamste) Methode für Kollisionsberechnungen." + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Trimesh Collision Sibling" msgstr "Trimesh-Kollisionselement erzeugen" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Convex Collision Sibling(s)" -msgstr "Konvexe(s) Kollisionselement(e) erzeugen" +msgid "" +"Creates a polygon-based collision shape.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" +"Erstellt ein polygon-basiertes Kollisionselement.\n" +"Dies ist die präziseste (aber langsamste) Methode für Kollisionsberechnungen." + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Single Convex Collision Siblings" +msgstr "Ein einzelnes konvexes Kollisionsunterelement erzeugen" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a single convex collision shape.\n" +"This is the fastest (but least accurate) option for collision detection." +msgstr "" +"Erstellt ein einzelnes konvexes Kollisionselement.\n" +"Dies ist die schnellste (aber ungenauste) Methode für Kollisionsberechnungen." + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Multiple Convex Collision Siblings" +msgstr "Mehrere konvexe Kollisionsunterelemente erzeugen" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is a performance middle-ground between the two above options." +msgstr "" +"Erstellt ein polygon-basiertes Kollisionselement.\n" +"Dies liegt von der Geschwindigkeit in der Mitte der beiden anderen Methoden." #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Outline Mesh..." msgstr "Umriss-Mesh erzeugen..." #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a static outline mesh. The outline mesh will have its normals " +"flipped automatically.\n" +"This can be used instead of the SpatialMaterial Grow property when using " +"that property isn't possible." +msgstr "" +"Erstellt ein statisches Outline-Mesh. Outline-Meshes haben ihre " +"Normalenvektoren automatisch invertiert.\n" +"Dies kann als Ersatz für die SpatialMaterial-Grow-Eigenschaft genutzt werden " +"wenn sie nicht verfügbar ist." + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "View UV1" msgstr "UV1 zeigen" @@ -8422,7 +8491,7 @@ msgstr "TileSet" msgid "No VCS addons are available." msgstr "Keine Versionsverwaltungserweiterungen verfügbar." -#: editor/plugins/version_control_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/version_control_editor_plugin.cpp msgid "Error" msgstr "Fehler" @@ -9592,24 +9661,29 @@ msgid "Export With Debug" msgstr "Exportiere mit Debuginformationen" #: editor/project_manager.cpp -msgid "The path does not exist." -msgstr "Dieser Pfad existiert nicht." +msgid "The path specified doesn't exist." +msgstr "Der angegebene Pfad existiert nicht." + +#: editor/project_manager.cpp +msgid "Error opening package file (it's not in ZIP format)." +msgstr "Fehler beim Öffnen der Paketdatei (kein ZIP-Format)." #: editor/project_manager.cpp -msgid "Invalid '.zip' project file, does not contain a 'project.godot' file." -msgstr "Ungültige Projekt-Zipdatei, enthält keine ‚project.godot‘-Datei." +msgid "" +"Invalid \".zip\" project file; it doesn't contain a \"project.godot\" file." +msgstr "Ungültige „.zip“-Projektdatei, enthält keine „project.godot“-Datei." #: editor/project_manager.cpp msgid "Please choose an empty folder." msgstr "Bitte einen leeren Ordner auswählen." #: editor/project_manager.cpp -msgid "Please choose a 'project.godot' or '.zip' file." -msgstr "Eine ‚project.godot‘-Datei oder Zipdatei auswählen." +msgid "Please choose a \"project.godot\" or \".zip\" file." +msgstr "Eine „project.godot†oder „.zip“-Datei auswählen." #: editor/project_manager.cpp -msgid "Directory already contains a Godot project." -msgstr "Das Verzeichnis beinhaltet bereits ein Godot-Projekt." +msgid "This directory already contains a Godot project." +msgstr "Dieses Verzeichnis beinhaltet bereits ein Godot-Projekt." #: editor/project_manager.cpp msgid "New Game Project" @@ -10312,6 +10386,10 @@ msgid "Suffix" msgstr "Suffix" #: editor/rename_dialog.cpp +msgid "Use Regular Expressions" +msgstr "Reguläre Ausdrücke verwenden" + +#: editor/rename_dialog.cpp msgid "Advanced Options" msgstr "Erweiterte Einstellungen" @@ -10348,7 +10426,7 @@ msgstr "" "Zahleroptionen vergleichen." #: editor/rename_dialog.cpp -msgid "Per Level counter" +msgid "Per-level Counter" msgstr "Pro-Ebene-Zähler" #: editor/rename_dialog.cpp @@ -10381,10 +10459,6 @@ msgstr "" "Fehlende Ziffern werden mit führenden Nullen ergänzt." #: editor/rename_dialog.cpp -msgid "Regular Expressions" -msgstr "Reguläre Ausdrücke" - -#: editor/rename_dialog.cpp msgid "Post-Process" msgstr "Nachbearbeitung" @@ -10393,11 +10467,11 @@ msgid "Keep" msgstr "Behalten" #: editor/rename_dialog.cpp -msgid "CamelCase to under_scored" +msgid "PascalCase to snake_case" msgstr "CamelCase zu unter_strich" #: editor/rename_dialog.cpp -msgid "under_scored to CamelCase" +msgid "snake_case to PascalCase" msgstr "unter_strich zu CamelCase" #: editor/rename_dialog.cpp @@ -10416,6 +10490,14 @@ msgstr "Zu Großbuchstaben" msgid "Reset" msgstr "Zurücksetzen" +#: editor/rename_dialog.cpp +msgid "Regular Expression Error" +msgstr "Fehler in regulärem Ausdruck" + +#: editor/rename_dialog.cpp +msgid "At character %s" +msgstr "Bei Zeichen %s" + #: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp msgid "Reparent Node" msgstr "Node umhängen" @@ -10882,8 +10964,8 @@ msgid "Invalid inherited parent name or path." msgstr "Ungültiger geerbter Name oder Pfad." #: editor/script_create_dialog.cpp -msgid "Script is valid." -msgstr "Skript ist gültig." +msgid "Script path/name is valid." +msgstr "Skript-Pfad oder -Name ist gültig." #: editor/script_create_dialog.cpp msgid "Allowed: a-z, A-Z, 0-9, _ and ." @@ -10974,6 +11056,10 @@ msgid "Copy Error" msgstr "Fehlermeldung kopieren" #: editor/script_editor_debugger.cpp +msgid "Video RAM" +msgstr "Video RAM" + +#: editor/script_editor_debugger.cpp msgid "Skip Breakpoints" msgstr "Haltepunkte auslassen" @@ -11022,10 +11108,6 @@ msgid "Total:" msgstr "Insgesamt:" #: editor/script_editor_debugger.cpp -msgid "Video Mem" -msgstr "Grafikspeicher" - -#: editor/script_editor_debugger.cpp msgid "Resource Path" msgstr "Ressourcenpfad" @@ -12737,6 +12819,15 @@ msgstr "Varyings können nur in Vertex-Funktion zugewiesen werden." msgid "Constants cannot be modified." msgstr "Konstanten können nicht verändert werden." +#~ msgid "Replaced %d occurrence(s)." +#~ msgstr "Suchbegriff wurde %d mal ersetzt." + +#~ msgid "Create Static Convex Body" +#~ msgstr "Statischen Konvex-Körper erzeugen" + +#~ msgid "Failed creating shapes!" +#~ msgstr "Form-Erstellung fehlgeschlagen!" + #~ msgid "" #~ "There are currently no tutorials for this class, you can [color=$color]" #~ "[url=$url]contribute one[/url][/color] or [color=$color][url=" diff --git a/editor/translations/de_CH.po b/editor/translations/de_CH.po index fc524de9ad..f4db15a122 100644 --- a/editor/translations/de_CH.po +++ b/editor/translations/de_CH.po @@ -691,7 +691,7 @@ msgid "Line Number:" msgstr "" #: editor/code_editor.cpp -msgid "Replaced %d occurrence(s)." +msgid "%d replaced." msgstr "" #: editor/code_editor.cpp editor/editor_help.cpp @@ -3961,6 +3961,10 @@ msgid "Saving..." msgstr "" #: editor/import_dock.cpp +msgid "%d Files" +msgstr "%d Dateien" + +#: editor/import_dock.cpp msgid "Set as Default for '%s'" msgstr "" @@ -3969,11 +3973,6 @@ msgid "Clear Default for '%s'" msgstr "" #: editor/import_dock.cpp -#, fuzzy -msgid " Files" -msgstr "Datei(en) öffnen" - -#: editor/import_dock.cpp msgid "Import As:" msgstr "" @@ -5906,11 +5905,12 @@ msgid "Mesh is empty!" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Trimesh Body" -msgstr "" +#, fuzzy +msgid "Couldn't create a Trimesh collision shape." +msgstr "Node erstellen" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Convex Body" +msgid "Create Static Trimesh Body" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -5922,12 +5922,30 @@ msgid "Create Trimesh Static Shape" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Failed creating shapes!" +msgid "Can't create a single convex collision shape for the scene root." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Couldn't create a single convex collision shape." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Single Convex Shape" +msgstr "Node erstellen" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Can't create multiple convex collision shapes for the scene root." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp #, fuzzy -msgid "Create Convex Shape(s)" +msgid "Couldn't create any collision shapes." +msgstr "Node erstellen" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Multiple Convex Shapes" msgstr "Node erstellen" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -5979,19 +5997,57 @@ msgid "Create Trimesh Static Body" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a StaticBody and assigns a polygon-based collision shape to it " +"automatically.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Trimesh Collision Sibling" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp #, fuzzy -msgid "Create Convex Collision Sibling(s)" +msgid "Create Single Convex Collision Siblings" msgstr "Node erstellen" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a single convex collision shape.\n" +"This is the fastest (but least accurate) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Multiple Convex Collision Siblings" +msgstr "Node erstellen" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is a performance middle-ground between the two above options." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Outline Mesh..." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a static outline mesh. The outline mesh will have its normals " +"flipped automatically.\n" +"This can be used instead of the SpatialMaterial Grow property when using " +"that property isn't possible." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp #, fuzzy msgid "View UV1" msgstr "Datei(en) öffnen" @@ -8490,7 +8546,7 @@ msgstr "Datei(en) öffnen" msgid "No VCS addons are available." msgstr "" -#: editor/plugins/version_control_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/version_control_editor_plugin.cpp msgid "Error" msgstr "" @@ -9612,11 +9668,16 @@ msgid "Export With Debug" msgstr "" #: editor/project_manager.cpp -msgid "The path does not exist." +msgid "The path specified doesn't exist." msgstr "" #: editor/project_manager.cpp -msgid "Invalid '.zip' project file, does not contain a 'project.godot' file." +msgid "Error opening package file (it's not in ZIP format)." +msgstr "" + +#: editor/project_manager.cpp +msgid "" +"Invalid \".zip\" project file; it doesn't contain a \"project.godot\" file." msgstr "" #: editor/project_manager.cpp @@ -9626,11 +9687,11 @@ msgstr "Bitte ausserhalb des Projekt Verzeichnis exportieren!" #: editor/project_manager.cpp #, fuzzy -msgid "Please choose a 'project.godot' or '.zip' file." +msgid "Please choose a \"project.godot\" or \".zip\" file." msgstr "Bitte ausserhalb des Projekt Verzeichnis exportieren!" #: editor/project_manager.cpp -msgid "Directory already contains a Godot project." +msgid "This directory already contains a Godot project." msgstr "" #: editor/project_manager.cpp @@ -10298,6 +10359,11 @@ msgid "Suffix" msgstr "" #: editor/rename_dialog.cpp +#, fuzzy +msgid "Use Regular Expressions" +msgstr "Typ ändern" + +#: editor/rename_dialog.cpp msgid "Advanced Options" msgstr "" @@ -10334,7 +10400,7 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -msgid "Per Level counter" +msgid "Per-level Counter" msgstr "" #: editor/rename_dialog.cpp @@ -10364,11 +10430,6 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -#, fuzzy -msgid "Regular Expressions" -msgstr "Typ ändern" - -#: editor/rename_dialog.cpp msgid "Post-Process" msgstr "" @@ -10377,11 +10438,11 @@ msgid "Keep" msgstr "" #: editor/rename_dialog.cpp -msgid "CamelCase to under_scored" +msgid "PascalCase to snake_case" msgstr "" #: editor/rename_dialog.cpp -msgid "under_scored to CamelCase" +msgid "snake_case to PascalCase" msgstr "" #: editor/rename_dialog.cpp @@ -10401,6 +10462,15 @@ msgstr "" msgid "Reset" msgstr "" +#: editor/rename_dialog.cpp +#, fuzzy +msgid "Regular Expression Error" +msgstr "Typ ändern" + +#: editor/rename_dialog.cpp +msgid "At character %s" +msgstr "" + #: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp msgid "Reparent Node" msgstr "" @@ -10864,7 +10934,7 @@ msgid "Invalid inherited parent name or path." msgstr "" #: editor/script_create_dialog.cpp -msgid "Script is valid." +msgid "Script path/name is valid." msgstr "" #: editor/script_create_dialog.cpp @@ -10966,6 +11036,10 @@ msgid "Copy Error" msgstr "Connections editieren" #: editor/script_editor_debugger.cpp +msgid "Video RAM" +msgstr "" + +#: editor/script_editor_debugger.cpp #, fuzzy msgid "Skip Breakpoints" msgstr "Bild einfügen" @@ -11016,10 +11090,6 @@ msgid "Total:" msgstr "" #: editor/script_editor_debugger.cpp -msgid "Video Mem" -msgstr "" - -#: editor/script_editor_debugger.cpp msgid "Resource Path" msgstr "" diff --git a/editor/translations/editor.pot b/editor/translations/editor.pot index c1b2932a6f..1db40e52cb 100644 --- a/editor/translations/editor.pot +++ b/editor/translations/editor.pot @@ -661,7 +661,7 @@ msgid "Line Number:" msgstr "" #: editor/code_editor.cpp -msgid "Replaced %d occurrence(s)." +msgid "%d replaced." msgstr "" #: editor/code_editor.cpp editor/editor_help.cpp @@ -3797,15 +3797,15 @@ msgid "Saving..." msgstr "" #: editor/import_dock.cpp -msgid "Set as Default for '%s'" +msgid "%d Files" msgstr "" #: editor/import_dock.cpp -msgid "Clear Default for '%s'" +msgid "Set as Default for '%s'" msgstr "" #: editor/import_dock.cpp -msgid " Files" +msgid "Clear Default for '%s'" msgstr "" #: editor/import_dock.cpp @@ -5634,11 +5634,11 @@ msgid "Mesh is empty!" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Trimesh Body" +msgid "Couldn't create a Trimesh collision shape." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Convex Body" +msgid "Create Static Trimesh Body" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -5650,11 +5650,27 @@ msgid "Create Trimesh Static Shape" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Failed creating shapes!" +msgid "Can't create a single convex collision shape for the scene root." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Couldn't create a single convex collision shape." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Single Convex Shape" +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Can't create multiple convex collision shapes for the scene root." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Couldn't create any collision shapes." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Convex Shape(s)" +msgid "Create Multiple Convex Shapes" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -5706,11 +5722,40 @@ msgid "Create Trimesh Static Body" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a StaticBody and assigns a polygon-based collision shape to it " +"automatically.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Trimesh Collision Sibling" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Convex Collision Sibling(s)" +msgid "" +"Creates a polygon-based collision shape.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Single Convex Collision Siblings" +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a single convex collision shape.\n" +"This is the fastest (but least accurate) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Multiple Convex Collision Siblings" +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is a performance middle-ground between the two above options." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -5718,6 +5763,14 @@ msgid "Create Outline Mesh..." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a static outline mesh. The outline mesh will have its normals " +"flipped automatically.\n" +"This can be used instead of the SpatialMaterial Grow property when using " +"that property isn't possible." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "View UV1" msgstr "" @@ -8082,7 +8135,7 @@ msgstr "" msgid "No VCS addons are available." msgstr "" -#: editor/plugins/version_control_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/version_control_editor_plugin.cpp msgid "Error" msgstr "" @@ -9166,11 +9219,16 @@ msgid "Export With Debug" msgstr "" #: editor/project_manager.cpp -msgid "The path does not exist." +msgid "The path specified doesn't exist." +msgstr "" + +#: editor/project_manager.cpp +msgid "Error opening package file (it's not in ZIP format)." msgstr "" #: editor/project_manager.cpp -msgid "Invalid '.zip' project file, does not contain a 'project.godot' file." +msgid "" +"Invalid \".zip\" project file; it doesn't contain a \"project.godot\" file." msgstr "" #: editor/project_manager.cpp @@ -9178,11 +9236,11 @@ msgid "Please choose an empty folder." msgstr "" #: editor/project_manager.cpp -msgid "Please choose a 'project.godot' or '.zip' file." +msgid "Please choose a \"project.godot\" or \".zip\" file." msgstr "" #: editor/project_manager.cpp -msgid "Directory already contains a Godot project." +msgid "This directory already contains a Godot project." msgstr "" #: editor/project_manager.cpp @@ -9828,6 +9886,10 @@ msgid "Suffix" msgstr "" #: editor/rename_dialog.cpp +msgid "Use Regular Expressions" +msgstr "" + +#: editor/rename_dialog.cpp msgid "Advanced Options" msgstr "" @@ -9862,7 +9924,7 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -msgid "Per Level counter" +msgid "Per-level Counter" msgstr "" #: editor/rename_dialog.cpp @@ -9892,10 +9954,6 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -msgid "Regular Expressions" -msgstr "" - -#: editor/rename_dialog.cpp msgid "Post-Process" msgstr "" @@ -9904,11 +9962,11 @@ msgid "Keep" msgstr "" #: editor/rename_dialog.cpp -msgid "CamelCase to under_scored" +msgid "PascalCase to snake_case" msgstr "" #: editor/rename_dialog.cpp -msgid "under_scored to CamelCase" +msgid "snake_case to PascalCase" msgstr "" #: editor/rename_dialog.cpp @@ -9927,6 +9985,14 @@ msgstr "" msgid "Reset" msgstr "" +#: editor/rename_dialog.cpp +msgid "Regular Expression Error" +msgstr "" + +#: editor/rename_dialog.cpp +msgid "At character %s" +msgstr "" + #: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp msgid "Reparent Node" msgstr "" @@ -10366,7 +10432,7 @@ msgid "Invalid inherited parent name or path." msgstr "" #: editor/script_create_dialog.cpp -msgid "Script is valid." +msgid "Script path/name is valid." msgstr "" #: editor/script_create_dialog.cpp @@ -10458,6 +10524,10 @@ msgid "Copy Error" msgstr "" #: editor/script_editor_debugger.cpp +msgid "Video RAM" +msgstr "" + +#: editor/script_editor_debugger.cpp msgid "Skip Breakpoints" msgstr "" @@ -10506,10 +10576,6 @@ msgid "Total:" msgstr "" #: editor/script_editor_debugger.cpp -msgid "Video Mem" -msgstr "" - -#: editor/script_editor_debugger.cpp msgid "Resource Path" msgstr "" diff --git a/editor/translations/el.po b/editor/translations/el.po index 99e7a49f85..6aa7a07f5d 100644 --- a/editor/translations/el.po +++ b/editor/translations/el.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2020-01-27 07:09+0000\n" +"PO-Revision-Date: 2020-02-02 08:51+0000\n" "Last-Translator: George Tsiamasiotis <gtsiam@windowslive.com>\n" "Language-Team: Greek <https://hosted.weblate.org/projects/godot-engine/godot/" "el/>\n" @@ -693,8 +693,9 @@ msgid "Line Number:" msgstr "ΑÏ. γÏαμμής:" #: editor/code_editor.cpp -msgid "Replaced %d occurrence(s)." -msgstr "Αντικαταστάθηκαν %d εμφανίσεις." +#, fuzzy +msgid "%d replaced." +msgstr "Αντικατάσταση..." #: editor/code_editor.cpp editor/editor_help.cpp msgid "%d match." @@ -3985,6 +3986,10 @@ msgid "Saving..." msgstr "Αποθήκευση..." #: editor/import_dock.cpp +msgid "%d Files" +msgstr "%d αÏχεία" + +#: editor/import_dock.cpp msgid "Set as Default for '%s'" msgstr "ΟÏισμός ως Ï€Ïοεπιλογής για '%s'" @@ -3993,10 +3998,6 @@ msgid "Clear Default for '%s'" msgstr "ΕκκαθάÏιση Ï€Ïοεπιλογής για '%s'" #: editor/import_dock.cpp -msgid " Files" -msgstr " ΑÏχεία" - -#: editor/import_dock.cpp msgid "Import As:" msgstr "Εισαγωγή ÏŽÏ‚:" @@ -5378,8 +5379,8 @@ msgid "" "Warning: Children of a container get their position and size determined only " "by their parent." msgstr "" -"Î Ïοειδοποίηση: Τα παιδιά ενός δοχείου, παίÏνουν τη θÎση και το μÎγεθος " -"καθοÏισμÎνα μόνο από τον γονÎα τους." +"Î Ïοσοχή: Τα παιδιά ενός δοχείου λαμβάνουν θÎση και μÎγεθος μόνο από τον " +"γονÎα τους." #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/texture_region_editor_plugin.cpp @@ -5878,12 +5879,13 @@ msgid "Mesh is empty!" msgstr "Το πλÎγμα είναι άδειο!" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Trimesh Body" -msgstr "ΔημιουÏγία ÏƒÏ„Î±Ï„Î¹ÎºÎ¿Ï ÏƒÏŽÎ¼Î±Ï„Î¿Ï‚ πλÎγματος Ï„Ïιγώνων" +#, fuzzy +msgid "Couldn't create a Trimesh collision shape." +msgstr "ΔημιουÏγία Î±Î´ÎµÎ»Ï†Î¿Ï ÏƒÏγκÏουσης πλÎγατος Ï„Ïιγώνων" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Convex Body" -msgstr "ΔημιουÏγία ÏƒÏ„Î±Ï„Î¹ÎºÎ¿Ï ÎºÏ…ÏÏ„Î¿Ï ÏƒÏŽÎ¼Î±Ï„Î¿Ï‚" +msgid "Create Static Trimesh Body" +msgstr "ΔημιουÏγία ÏƒÏ„Î±Ï„Î¹ÎºÎ¿Ï ÏƒÏŽÎ¼Î±Ï„Î¿Ï‚ πλÎγματος Ï„Ïιγώνων" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "This doesn't work on scene root!" @@ -5894,11 +5896,30 @@ msgid "Create Trimesh Static Shape" msgstr "ΔημιουÏγία Î£Ï„Î±Ï„Î¹ÎºÎ¿Ï Î£Ï‡Î®Î¼Î±Ï„Î¿Ï‚ ΠλÎγματος ΤÏιγώνων" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Failed creating shapes!" -msgstr "Αποτυχία δημιουÏγίας σχημάτων!" +msgid "Can't create a single convex collision shape for the scene root." +msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Convex Shape(s)" +msgid "Couldn't create a single convex collision shape." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Single Convex Shape" +msgstr "ΔημιουÏγία ΚυÏτών Σχημάτων" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Can't create multiple convex collision shapes for the scene root." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Couldn't create any collision shapes." +msgstr "ΑδÏνατη η δημιουÏγία φακÎλου." + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Multiple Convex Shapes" msgstr "ΔημιουÏγία ΚυÏτών Σχημάτων" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -5950,18 +5971,57 @@ msgid "Create Trimesh Static Body" msgstr "ΔημιουÏγία ÏƒÏ„Î±Ï„Î¹ÎºÎ¿Ï ÏƒÏŽÎ¼Î±Ï„Î¿Ï‚ πλÎγματος Ï„Ïιγώνων" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a StaticBody and assigns a polygon-based collision shape to it " +"automatically.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Trimesh Collision Sibling" msgstr "ΔημιουÏγία Î±Î´ÎµÎ»Ï†Î¿Ï ÏƒÏγκÏουσης πλÎγατος Ï„Ïιγώνων" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Convex Collision Sibling(s)" +msgid "" +"Creates a polygon-based collision shape.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Single Convex Collision Siblings" msgstr "ΔημιουÏγία ΚυÏÏ„Î¿Ï Î‘Î´ÎµÎ»Ï†Î¿Ï Î£ÏγκÏουσης" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a single convex collision shape.\n" +"This is the fastest (but least accurate) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Multiple Convex Collision Siblings" +msgstr "ΔημιουÏγία ΚυÏÏ„Î¿Ï Î‘Î´ÎµÎ»Ï†Î¿Ï Î£ÏγκÏουσης" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is a performance middle-ground between the two above options." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Outline Mesh..." msgstr "ΔημιουÏγία πλÎγματος πεÏιγÏάμματος..." #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a static outline mesh. The outline mesh will have its normals " +"flipped automatically.\n" +"This can be used instead of the SpatialMaterial Grow property when using " +"that property isn't possible." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "View UV1" msgstr "Εμφάνιση UV1" @@ -6971,11 +7031,11 @@ msgstr "ΔιαγÏαφή γÏαμμής" #: editor/plugins/script_text_editor.cpp msgid "Indent Left" -msgstr "στοιχειοθÎτηση αÏιστεÏά" +msgstr "ΣτοιχειοθÎτηση ΑÏιστεÏά" #: editor/plugins/script_text_editor.cpp msgid "Indent Right" -msgstr "στοιχειοθÎτηση δεξιά" +msgstr "ΣτοιχειοθÎτηση Δεξιά" #: editor/plugins/script_text_editor.cpp msgid "Toggle Comment" @@ -7019,7 +7079,7 @@ msgstr "ΜετατÏοπή Εσοχών σε ΣτηλοθÎτες" #: editor/plugins/script_text_editor.cpp msgid "Auto Indent" -msgstr "Αυτόματη στοιχειοθÎτηση" +msgstr "Αυτόματη ΣτοιχειοθÎτηση" #: editor/plugins/script_text_editor.cpp msgid "Find in Files..." @@ -8387,7 +8447,7 @@ msgstr "TileSet" msgid "No VCS addons are available." msgstr "ΚανÎνα Ï€Ïόσθετο VCS δεν είναι διαθÎσιμο." -#: editor/plugins/version_control_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/version_control_editor_plugin.cpp msgid "Error" msgstr "Σφάλμα" @@ -9553,11 +9613,19 @@ msgid "Export With Debug" msgstr "Εξαγωγή με αποσφαλμάτωση" #: editor/project_manager.cpp -msgid "The path does not exist." +#, fuzzy +msgid "The path specified doesn't exist." msgstr "Η διαδÏομή δεν υπάÏχει." #: editor/project_manager.cpp -msgid "Invalid '.zip' project file, does not contain a 'project.godot' file." +#, fuzzy +msgid "Error opening package file (it's not in ZIP format)." +msgstr "Σφάλμα ανοίγματος αÏχείου πακÎτου, δεν είναι σε μοÏφή ZIP." + +#: editor/project_manager.cpp +#, fuzzy +msgid "" +"Invalid \".zip\" project file; it doesn't contain a \"project.godot\" file." msgstr "ΆκυÏο αÏχείο ÎÏγου «.zip», δεν πεÏιÎχει αÏχείο «project.godot»." #: editor/project_manager.cpp @@ -9565,11 +9633,13 @@ msgid "Please choose an empty folder." msgstr "ΠαÏακαλοÏμε επιλÎξτε Îναν άδειο φάκελο." #: editor/project_manager.cpp -msgid "Please choose a 'project.godot' or '.zip' file." +#, fuzzy +msgid "Please choose a \"project.godot\" or \".zip\" file." msgstr "ΠαÏακαλοÏμε επιλÎξτε Îνα αÏχείο «project.godot» ή «.zip»." #: editor/project_manager.cpp -msgid "Directory already contains a Godot project." +#, fuzzy +msgid "This directory already contains a Godot project." msgstr "Ο κατάλογος πεÏιÎχει ήδη Îνα ÎÏγο της Godot." #: editor/project_manager.cpp @@ -10269,6 +10339,11 @@ msgid "Suffix" msgstr "Επίθεμα" #: editor/rename_dialog.cpp +#, fuzzy +msgid "Use Regular Expressions" +msgstr "ΚανονικÎÏ‚ ΕκφÏάσεις" + +#: editor/rename_dialog.cpp msgid "Advanced Options" msgstr "Î ÏοχωÏημÎνες ΕπιλογÎÏ‚" @@ -10305,7 +10380,8 @@ msgstr "" "ΣÏγκÏιση επιλογών μετÏητή." #: editor/rename_dialog.cpp -msgid "Per Level counter" +#, fuzzy +msgid "Per-level Counter" msgstr "ΜετÏητής Ανά Επίπεδο" #: editor/rename_dialog.cpp @@ -10337,10 +10413,6 @@ msgstr "" "Τα εναπομείναντα ψηφία συμπληÏώνονται με μπÏοστινά μηδενικά." #: editor/rename_dialog.cpp -msgid "Regular Expressions" -msgstr "ΚανονικÎÏ‚ ΕκφÏάσεις" - -#: editor/rename_dialog.cpp msgid "Post-Process" msgstr "ΜετεπεξεÏγασία" @@ -10349,11 +10421,13 @@ msgid "Keep" msgstr "ΔιατήÏηση" #: editor/rename_dialog.cpp -msgid "CamelCase to under_scored" +#, fuzzy +msgid "PascalCase to snake_case" msgstr "CamelCase σε under_scored" #: editor/rename_dialog.cpp -msgid "under_scored to CamelCase" +#, fuzzy +msgid "snake_case to PascalCase" msgstr "under_scored σε CamelCase" #: editor/rename_dialog.cpp @@ -10372,9 +10446,19 @@ msgstr "Κάνε Κεφαλαία" msgid "Reset" msgstr "ΕπαναφοÏά" +#: editor/rename_dialog.cpp +#, fuzzy +msgid "Regular Expression Error" +msgstr "ΚανονικÎÏ‚ ΕκφÏάσεις" + +#: editor/rename_dialog.cpp +#, fuzzy +msgid "At character %s" +msgstr "ΈγκυÏοι χαÏακτήÏες:" + #: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp msgid "Reparent Node" -msgstr "ΕπαναπÏοσδιοÏισμός γονÎα κόμβου" +msgstr "ΕπαναπÏοσδιοÏισμός ΓονÎα Κόμβου" #: editor/reparent_dialog.cpp msgid "Reparent Location (Select new Parent):" @@ -10386,7 +10470,7 @@ msgstr "ΔιατήÏηση παγκόσμιου μετασχηματισμοÏ" #: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp msgid "Reparent" -msgstr "ΕπαναπÏοσδιοÏισμός γονÎα" +msgstr "ΕπαναπÏοσδιοÏισμός ΓονÎα" #: editor/run_settings_dialog.cpp msgid "Run Mode:" @@ -10489,7 +10573,7 @@ msgstr "ΔιαγÏαφή κόμβου \"%s\" και των παιδιών του #: editor/scene_tree_dock.cpp msgid "Delete node \"%s\"?" -msgstr "ΔιαγÏαφή κόμβων \"%s\";" +msgstr "ΔιαγÏαφή κόμβου «%s»;" #: editor/scene_tree_dock.cpp msgid "Can not perform with the root node." @@ -10622,7 +10706,7 @@ msgstr "Αλλαγή Ï„Ïπου" #: editor/scene_tree_dock.cpp msgid "Reparent to New Node" -msgstr "ΕπαναπÏοσδιοÏισμός ΓονÎα" +msgstr "ΕπαναπÏοσδιοÏισμός ΓονÎα σε ÎÎο Κόμβο" #: editor/scene_tree_dock.cpp msgid "Make Scene Root" @@ -10634,7 +10718,7 @@ msgstr "Συγχώνευση από σκηνή" #: editor/scene_tree_dock.cpp editor/script_editor_debugger.cpp msgid "Save Branch as Scene" -msgstr "Αποθήκευσι ÎºÎ»Î±Î´Î¹Î¿Ï Ï‰Ï‚ σκηνή" +msgstr "Αποθήκευση Κλάδου ως Σκηνή" #: editor/scene_tree_dock.cpp editor/script_editor_debugger.cpp msgid "Copy Node Path" @@ -10841,7 +10925,8 @@ msgid "Invalid inherited parent name or path." msgstr "ΆκυÏο όνομα κληÏονομημÎνου γονÎα ή διαδÏομή." #: editor/script_create_dialog.cpp -msgid "Script is valid." +#, fuzzy +msgid "Script path/name is valid." msgstr "ΈγκυÏη δÎσμη ενεÏγειών." #: editor/script_create_dialog.cpp @@ -10933,6 +11018,11 @@ msgid "Copy Error" msgstr "ΑντιγÏαφή σφάλματος" #: editor/script_editor_debugger.cpp +#, fuzzy +msgid "Video RAM" +msgstr "Βίντεο μνήμη" + +#: editor/script_editor_debugger.cpp msgid "Skip Breakpoints" msgstr "ΠαÏάλειψη Σημείων Διακοπής" @@ -10983,10 +11073,6 @@ msgid "Total:" msgstr "Συνολικά:" #: editor/script_editor_debugger.cpp -msgid "Video Mem" -msgstr "Βίντεο μνήμη" - -#: editor/script_editor_debugger.cpp msgid "Resource Path" msgstr "ΔιαδÏομή πόÏου" @@ -12056,13 +12142,12 @@ msgid "Invalid splash screen image dimensions (should be 620x300)." msgstr "ΆκυÏες διαστάσεις εικόνας οθόνης εκκίνησης (Ï€ÏÎπει να είναι 620x300)." #: scene/2d/animated_sprite.cpp -#, fuzzy msgid "" "A SpriteFrames resource must be created or set in the \"Frames\" property in " "order for AnimatedSprite to display frames." msgstr "" -"Ένας πόÏος SpriteFrames Ï€ÏÎπει να Îχει δημιουÏγηθεί ή οÏισθεί στην ιδιότητα " -"'Frames' για να μποÏεί το AnimatedSprite να παÏουσιάσει frames." +"Απαιτείται ο οÏισμός ενός πόÏου SpriteFrames στην ιδιότητα «Frames» για την " +"εμφάνιση καÏΠαπό το AnimatedSprite." #: scene/2d/canvas_modulate.cpp msgid "" @@ -12074,16 +12159,15 @@ msgstr "" "θα αγνοηθοÏν." #: scene/2d/collision_object_2d.cpp -#, fuzzy msgid "" "This node has no shape, so it can't collide or interact with other objects.\n" "Consider adding a CollisionShape2D or CollisionPolygon2D as a child to " "define its shape." msgstr "" -"Αυτός ο κόμβος δεν Îχει παιδιά κόμβους σχήματος, οπότε δεν μποÏεί να " -"αντιδÏάσει με το πεÏιβάλλον.\n" -"Σκεφτείτε να Ï€ÏοσθÎσετε CollisionShape2D ή CollisionPolygon2D για να οÏίσετε " -"το σχήμα του." +"Αυτός ο κόμβος δεν Îχει σχήμα, οπότε δεν μποÏεί συγκÏουσθεί ή να " +"αλληλεπιδÏάσει με άλλα αντικείμενα.\n" +"Εξετάστε την Ï€Ïοσθήκη ενός Ï€Î±Î¹Î´Î¹Î¿Ï CollisionShape2D ή CollisionPolygon2D για " +"να οÏίσετε το σχήμα του." #: scene/2d/collision_polygon_2d.cpp msgid "" @@ -12128,11 +12212,10 @@ msgstr "" "«Particles Animation» ενεÏγό." #: scene/2d/light_2d.cpp -#, fuzzy msgid "" "A texture with the shape of the light must be supplied to the \"Texture\" " "property." -msgstr "Μία υφή με το σχήμα του φωτός Ï€ÏÎπει να δοθεί στην ιδιότητα 'texture'." +msgstr "Μία υφή με το σχήμα του φωτός Ï€ÏÎπει να τεθεί στην ιδιότητα «Texture»." #: scene/2d/light_occluder_2d.cpp msgid "" @@ -12142,11 +12225,10 @@ msgstr "" "αυτό το εμπόδιο." #: scene/2d/light_occluder_2d.cpp -#, fuzzy msgid "The occluder polygon for this occluder is empty. Please draw a polygon." msgstr "" -"Το πολÏγωνο εμποδίου για αυτό το εμπόδιο είναι άδειο. ΖωγÏαφίστε Îνα " -"πολÏγονο!" +"Το πολÏγωνο εμποδίου για αυτό το εμπόδιο είναι άδειο. ΠαÏακαλοÏμε ζωγÏαφίστε " +"Îνα πολÏγωνο." #: scene/2d/navigation_polygon.cpp msgid "" @@ -12235,63 +12317,55 @@ msgstr "" "οÏίστε την." #: scene/2d/tile_map.cpp -#, fuzzy msgid "" "TileMap with Use Parent on needs a parent CollisionObject2D to give shapes " "to. Please use it as a child of Area2D, StaticBody2D, RigidBody2D, " "KinematicBody2D, etc. to give them a shape." msgstr "" -"To CollisionShape2D υπάÏχει μόνο για να δώσει Îνα σχήμα σÏγκÏουσης σε Îναν " -"κόμβο που Ï€ÏοÎÏχεται από το CollisionObject2D. ΧÏησιμοποιήστε το μόνο εάν " -"κληÏονομεί τα Area2D, StaticBody2D, RigidBody2D, KinematicBody2D, κλπ, για " -"να τους δώσετε Îνα σχήμα." +"Το TileMap με το «Use Parent» ενεÏγό χÏειάζεται Îνα γονικό CollisionObject2D " +"στο οποίο θα δίνει σχήματα. ΧÏησιμοποιήστε το σαν παιδί των Area2D, " +"StaticBody2D, RigidBody2D, KinematicBody2D, κλπ, για να τους δώσετε Îνα " +"σχήμα." #: scene/2d/visibility_notifier_2d.cpp -#, fuzzy msgid "" "VisibilityEnabler2D works best when used with the edited scene root directly " "as parent." msgstr "" -"Το VisibilityEnable2D δουλεÏει καλÏτεÏα όταν χÏησιμοποιείται μα την Ïίζα της " -"επεξεÏγασμÎνης σκηνÎÏ‚ κατευθείαν ως γονÎας." +"Το VisibilityEnabler2D δουλεÏει καλÏτεÏα όταν η Ïίζα της Ï„ÏÎχουσας σκηνής " +"είναι ο άμεσος γονÎας του." #: scene/3d/arvr_nodes.cpp -#, fuzzy msgid "ARVRCamera must have an ARVROrigin node as its parent." -msgstr "Η ARVRCamera Ï€ÏÎπει να Îχει Îναν κόμβο ARVROrigin ως γονÎα" +msgstr "Η ARVRCamera απαιτεί γονικό κόμβο ARVROrigin." #: scene/3d/arvr_nodes.cpp -#, fuzzy msgid "ARVRController must have an ARVROrigin node as its parent." -msgstr "Ο ARVRController Ï€ÏÎπει να Îχει Îναν κόμβο ARVROrigin ως γονÎα" +msgstr "Ο ARVRController απαιτεί γονικό κόμβο ARVROrigin." #: scene/3d/arvr_nodes.cpp -#, fuzzy msgid "" "The controller ID must not be 0 or this controller won't be bound to an " "actual controller." msgstr "" -"Ο δείκτης χειÏιστή δεν Ï€ÏÎπει να είναι 0 για να είναι συνδεδεμÎνος αυτός ο " -"χειÏιστής με Îναν υπαÏκτό χειÏιστή" +"Ο δείκτης χειÏιστηÏίου Ï€ÏÎπει να είναι διάφοÏος του 0 για να αντιπÏοσωπεÏει " +"Ï€Ïαγματικό χειÏιστήÏιο." #: scene/3d/arvr_nodes.cpp -#, fuzzy msgid "ARVRAnchor must have an ARVROrigin node as its parent." -msgstr "Ο ARVRAnchor Ï€ÏÎπει να Îχει Îναν κόμβο ARVROrigin ως γονÎα" +msgstr "Η ARVRAnchor απαιτεί γονικό κόμβο ARVROrigin." #: scene/3d/arvr_nodes.cpp -#, fuzzy msgid "" "The anchor ID must not be 0 or this anchor won't be bound to an actual " "anchor." msgstr "" -"Ο δείκτης άγκυÏας δεν Ï€ÏÎπει να είναι 0 για να είναι συνδεδεμÎνη αυτή η " -"άγκυÏα με μία υπαÏκτή άγκυÏα" +"Ο δείκτης άγκυÏας Ï€ÏÎπει να είναι διάφοÏος του 0 για να αντιπÏοσωπεÏει " +"Ï€Ïαγματική άγκυÏα." #: scene/3d/arvr_nodes.cpp -#, fuzzy msgid "ARVROrigin requires an ARVRCamera child node." -msgstr "Το ARVROrigin απαιτεί Îναν κόμβο ARVRCamera ως παιδί" +msgstr "Το ARVROrigin απαιτεί γονικό κόμβο ARVRCamera." #: scene/3d/baked_lightmap.cpp msgid "%d%%" @@ -12318,16 +12392,15 @@ msgid "Lighting Meshes: " msgstr "Φώτηση πλεγμάτων: " #: scene/3d/collision_object.cpp -#, fuzzy msgid "" "This node has no shape, so it can't collide or interact with other objects.\n" "Consider adding a CollisionShape or CollisionPolygon as a child to define " "its shape." msgstr "" -"Αυτός ο κόμβος δεν Îχει παιδιά κόμβους σχήματος, οπότε δεν μποÏεί να " -"αντιδÏάσει με το πεÏιβάλλον.\n" -"Σκεφτείτε να Ï€ÏοσθÎσετε CollisionShape ή CollisionPolygon για να οÏίσετε το " -"σχήμα του." +"Αυτός ο κόμβος δεν Îχει σχήμα, οπότε δεν μποÏεί συγκÏουσθεί ή να " +"αλληλεπιδÏάσει με άλλα αντικείμενα.\n" +"Εξετάστε την Ï€Ïοσθήκη ενός Ï€Î±Î¹Î´Î¹Î¿Ï CollisionShape ή CollisionPolygon για να " +"οÏίσετε το σχήμα του." #: scene/3d/collision_polygon.cpp msgid "" @@ -12356,13 +12429,12 @@ msgstr "" "δώσετε Îνα σχήμα." #: scene/3d/collision_shape.cpp -#, fuzzy msgid "" "A shape must be provided for CollisionShape to function. Please create a " "shape resource for it." msgstr "" -"Ένα σχήμα Ï€ÏÎπει να δοθεί στο CollisionShape για να λειτουÏγήσει. " -"ΔημιουÏγήστε Îνα πόÏο σχήματος για αυτό!" +"Απαιτείται Îνα σχήμα για την λειτουÏγία του CollisionShape. ΠαÏακαλοÏμε " +"δημιουÏγήστε Îνα πόÏο σχήματος για αυτό." #: scene/3d/collision_shape.cpp msgid "" @@ -12373,10 +12445,8 @@ msgstr "" "εκδόσεις. ΠαÏακαλώ μην τα χÏησιμοποιήσετε." #: scene/3d/cpu_particles.cpp -#, fuzzy msgid "Nothing is visible because no mesh has been assigned." -msgstr "" -"Τίποτα δεν είναι οÏατό, επειδή δεν Îχουν οÏιστεί πεÏάσματα για τα πλÎγματα." +msgstr "Τίποτα δεν είναι οÏατό, επειδή δεν Îχει οÏιστεί κανÎνα πλÎγματα." #: scene/3d/cpu_particles.cpp msgid "" @@ -12391,20 +12461,18 @@ msgid "Plotting Meshes" msgstr "ΤοποθÎτηση πλεγμάτων" #: scene/3d/gi_probe.cpp -#, fuzzy msgid "" "GIProbes are not supported by the GLES2 video driver.\n" "Use a BakedLightmap instead." msgstr "" -"Ται GIProbes δεν υποστηÏίζονται από το Ï€ÏόγÏαμμα οδήγησης οθόνης GLES2.\n" -"ΧÏησιμοποιήστε Îνα BakedLightmap αντ 'αυτοÏ." +"Τα GIProbes δεν υποστηÏίζονται από το Ï€ÏόγÏαμμα οδήγησης οθόνης GLES2.\n" +"Εναλλακτικά, χÏησιμοποιήστε Îνα BakedLightmap." #: scene/3d/light.cpp -#, fuzzy msgid "A SpotLight with an angle wider than 90 degrees cannot cast shadows." msgstr "" -"Ένα SpotLight (Ï€ÏοβολÎας) με γωνία ευÏÏτεÏη από 90 μοίÏες δεν μποÏεί να " -"δημιουÏγεί σκιÎÏ‚." +"Οι Ï€Ïοβολείς (SpotLight) με γωνία ευÏÏτεÏη των 90 μοιÏών δεν μποÏοÏν να " +"δημιουÏγήσουν σκιÎÏ‚." #: scene/3d/navigation_mesh.cpp msgid "A NavigationMesh resource must be set or created for this node to work." @@ -12445,9 +12513,8 @@ msgstr "" "Mode ίσο με «Particle Billboard»." #: scene/3d/path.cpp -#, fuzzy msgid "PathFollow only works when set as a child of a Path node." -msgstr "Το PathFollow2D δουλεÏει μόνο όταν κληÏονομεί Îναν κόμβο Path2D." +msgstr "Το PathFollow δουλεÏει μόνο ως παιδί ενός κόμβου Path." #: scene/3d/path.cpp msgid "" @@ -12468,37 +12535,34 @@ msgstr "" "Αλλάξτε μÎγεθος στα σχήματα σÏγκÏουσης των παιδιών." #: scene/3d/remote_transform.cpp -#, fuzzy msgid "" "The \"Remote Path\" property must point to a valid Spatial or Spatial-" "derived node to work." msgstr "" -"Η ιδιότητα Path Ï€ÏÎπει να δείχνει σε Îναν ÎγκυÏο κόμβο Spatial για να " -"δουλÎψει αυτός ο κόμβος." +"Η ιδιότητα «Remote Path» Ï€ÏÎπει να δείχνει σε ÎγκυÏο κόμβο Spatial, ή κόμβο " +"που Ï€ÏοκÏπτει από Spatial." #: scene/3d/soft_body.cpp msgid "This body will be ignored until you set a mesh." msgstr "Το σώμα αυτό δε θα ληφθεί υπόψιν μÎχÏι να οÏίσετε Îνα πλÎγμα (mesh)." #: scene/3d/soft_body.cpp -#, fuzzy msgid "" "Size changes to SoftBody will be overridden by the physics engine when " "running.\n" "Change the size in children collision shapes instead." msgstr "" -"ΑλλαγÎÏ‚ στο μÎγεθος του RigidBody (στις λειτουÏγίες character ή rigid) θα " -"αντικατασταθοÏνε από την μηχανή φυσικής κατά την εκτÎλεση.\n" +"Οι αλλαγÎÏ‚ μεγÎθους σε SoftBody θα παÏακαμφθοÏν από την μηχανή φυσικής κατά " +"την εκτÎλεση.\n" "Αλλάξτε μÎγεθος στα σχήματα σÏγκÏουσης των παιδιών." #: scene/3d/sprite_3d.cpp -#, fuzzy msgid "" "A SpriteFrames resource must be created or set in the \"Frames\" property in " "order for AnimatedSprite3D to display frames." msgstr "" -"Ένας πόÏος SpriteFrames Ï€ÏÎπει να δημιουÏγηθεί ή οÏισθεί στην ιδιότητα " -"'Frames' για να δείξει frames το AnimatedSprite3D." +"Απαιτείται ο οÏισμός ενός πόÏου SpriteFrames στην ιδιότητα «Frames» για την " +"εμφάνιση καÏΠαπό το AnimatedSprite3D." #: scene/3d/vehicle_body.cpp msgid "" @@ -12536,35 +12600,28 @@ msgid "On BlendTree node '%s', animation not found: '%s'" msgstr "Στον κόμβο BlendTree «%s», δεν βÏÎθηκε η κίνηση: «%s»" #: scene/animation/animation_blend_tree.cpp -#, fuzzy msgid "Animation not found: '%s'" -msgstr "ΕÏγαλεία κινήσεων" +msgstr "Δεν βÏÎθηκε η κίνηση: «%s»" #: scene/animation/animation_tree.cpp -#, fuzzy msgid "In node '%s', invalid animation: '%s'." -msgstr "Στον κόμβο '%s', μη ÎγκυÏο animation: '%s'." +msgstr "Στον κόμβο «%s», άκυÏη κίνηση: «%s»." #: scene/animation/animation_tree.cpp -#, fuzzy msgid "Invalid animation: '%s'." -msgstr "ΣΦΑΛΜΑ: Μη ÎγκυÏο όνομα κίνησης!" +msgstr "ΆκυÏη κίνηση: «%s»." #: scene/animation/animation_tree.cpp -#, fuzzy msgid "Nothing connected to input '%s' of node '%s'." -msgstr "ΑποσÏνδεση του '%s' απο το '%s'" +msgstr "Τίποτα δεν είναι συνδεδεμÎνο στην είσοδο «%s» του κόμβου «%s»." #: scene/animation/animation_tree.cpp msgid "No root AnimationNode for the graph is set." msgstr "Δεν Îχει οÏιστεί Ïιζικό AnimationNode για το γÏάφημα." #: scene/animation/animation_tree.cpp -#, fuzzy msgid "Path to an AnimationPlayer node containing animations is not set." -msgstr "" -"ΕπιλÎξτε Îνα AnimationPlayer από την ιεÏαÏχία της σκηνής για να " -"επεξεÏγαστείτε animations." +msgstr "Δεν Îχει οÏιστεί διαδÏομή σε AnimationPlayer με κινήσεις." #: scene/animation/animation_tree.cpp msgid "Path set for AnimationPlayer does not lead to an AnimationPlayer node." @@ -12572,9 +12629,8 @@ msgstr "" "Το ÏŒÏισμα διαδÏομής AnimationPlayer δεν οδηγεί σε κόμβο AnimationPlayer." #: scene/animation/animation_tree.cpp -#, fuzzy msgid "The AnimationPlayer root node is not a valid node." -msgstr "Το δÎντÏο κίνησης δεν είναι ÎγκυÏο." +msgstr "Ο Ïιζικός κόμβος AnimationPlayer δεν είναι ÎγκυÏος." #: scene/animation/animation_tree_player.cpp msgid "This node has been deprecated. Use AnimationTree instead." @@ -12592,18 +12648,16 @@ msgstr "" "RMB: ΚατάÏγηση διαμόÏφωσης" #: scene/gui/color_picker.cpp -#, fuzzy msgid "Pick a color from the editor window." -msgstr "ΔιαλÎξτε Îνα χÏώμα από την οθόνη." +msgstr "ΕπιλÎξτε Îνα χÏώμα από το παÏάθυÏο επεξεÏγασίας." #: scene/gui/color_picker.cpp msgid "HSV" msgstr "HSV" #: scene/gui/color_picker.cpp -#, fuzzy msgid "Raw" -msgstr "ΠαÏÎκκλιση" +msgstr "Ωμό" #: scene/gui/color_picker.cpp msgid "Switch between hexadecimal and code values." @@ -12614,16 +12668,15 @@ msgid "Add current color as a preset." msgstr "Î Ïοσθήκη Ï„ÏÎχοντος χÏώματος στα Ï€ÏοκαθοÏισμÎνα." #: scene/gui/container.cpp -#, fuzzy msgid "" "Container by itself serves no purpose unless a script configures its " "children placement behavior.\n" "If you don't intend to add a script, use a plain Control node instead." msgstr "" -"Το Container από μόνο του δεν Îχει κάποιο σκοπό αν κάποια δÎσμη ενεÏγειών " +"Ένα Container μόνο του δεν Îχει κάποια λειτουÏγία αν κάποια δÎσμη ενεÏγειών " "δεν οÏίσει την τοποθÎτηση των παιδιών του.\n" -"Εάν δεν σκοπεÏετε να Ï€ÏοσθÎσετε κάποια δÎσμη ενεÏγειών, χÏησιμοποιήστε Îνα " -"απλό «Control»." +"Εάν δεν σκοπεÏετε να Ï€ÏοσθÎσετε κάποια δÎσμη ενεÏγειών, χÏησιμοποιήστε Îνα " +"απλό Control." #: scene/gui/control.cpp msgid "" @@ -12643,15 +12696,14 @@ msgid "Please Confirm..." msgstr "ΠαÏακαλώ επιβεβαιώστε..." #: scene/gui/popup.cpp -#, fuzzy msgid "" "Popups will hide by default unless you call popup() or any of the popup*() " "functions. Making them visible for editing is fine, but they will hide upon " "running." msgstr "" -"Οι κόμβοι Ï„Ïπου Popup θα είναι κÏυμμÎνοι από Ï€Ïοεπιλογή, εκτός κι αν " -"καλÎσετε την popup() ή καμία από τις συναÏτήσεις popup*(). Το να τους κάνετε " -"οÏατοÏÏ‚ κατά την επεξεÏγασία, όμως, δεν είναι Ï€Ïόβλημα." +"Τα αναδυόμενα στοιχεία (Popup) θα είναι κÏυμμÎνα μÎχÏι την κλήση μιας από " +"τις συναÏτήσεις popup*(). Η εμφάνιση τους για επεξεÏγασία είναι αποδεκτή, " +"αλλά θα εξαφανιστοÏν κατά την εκτÎλεση." #: scene/gui/range.cpp msgid "If \"Exp Edit\" is enabled, \"Min Value\" must be greater than 0." @@ -12660,16 +12712,15 @@ msgstr "" "του 0." #: scene/gui/scroll_container.cpp -#, fuzzy msgid "" "ScrollContainer is intended to work with a single child control.\n" "Use a container as child (VBox, HBox, etc.), or a Control and set the custom " "minimum size manually." msgstr "" -"Το ScrollContainer είναι φτιαγμÎνο για να δουλεÏει με Îνα μόνο υπο-στοιχείο " -"control.\n" -"ΧÏησιμοποιήστε Îνα Container ως παιδί (VBox, HBox, κτλ), ή Îνα Control και " -"οÏίστε το Ï€ÏοσαÏμοσμÎνο ελάχιστο μÎγεθος χειÏοκίνητα." +"Το ScrollContainer είναι σχεδιασμÎνο να λειτουÏγεί με μοναδικό παιδί Ï„Ïπου " +"Control.\n" +"ΧÏησιμοποιήστε Îνα Container ως παιδί (VBox, HBox, κτλ), ή Îνα Control με " +"Ï€ÏοσαÏμοσμÎνο ελάχιστο μÎγεθος." #: scene/gui/tree.cpp msgid "(Other)" @@ -12696,19 +12747,16 @@ msgstr "" "Îναν κόμβο για απεικόνιση." #: scene/resources/visual_shader_nodes.cpp -#, fuzzy msgid "Invalid source for preview." -msgstr "Μη ÎγκυÏη πηγή!" +msgstr "ΆκυÏη πηγή για Ï€Ïοεπισκόπηση." #: scene/resources/visual_shader_nodes.cpp -#, fuzzy msgid "Invalid source for shader." -msgstr "Μη ÎγκυÏη πηγή!" +msgstr "ΆκυÏη πηγή Ï€ÏογÏάμματος σκίασης." #: scene/resources/visual_shader_nodes.cpp -#, fuzzy msgid "Invalid comparison function for that type." -msgstr "Μη ÎγκυÏη πηγή!" +msgstr "ΆκυÏη συνάÏτηση σÏγκÏισης για αυτόν τον Ï„Ïπο." #: servers/visual/shader_language.cpp msgid "Assignment to function." @@ -12726,6 +12774,15 @@ msgstr "Τα «varying» μποÏοÏν να ανατεθοÏν μόνο στηΠmsgid "Constants cannot be modified." msgstr "Οι σταθεÏÎÏ‚ δεν μποÏοÏν να Ï„ÏοποποιηθοÏν." +#~ msgid "Replaced %d occurrence(s)." +#~ msgstr "Αντικαταστάθηκαν %d εμφανίσεις." + +#~ msgid "Create Static Convex Body" +#~ msgstr "ΔημιουÏγία ÏƒÏ„Î±Ï„Î¹ÎºÎ¿Ï ÎºÏ…ÏÏ„Î¿Ï ÏƒÏŽÎ¼Î±Ï„Î¿Ï‚" + +#~ msgid "Failed creating shapes!" +#~ msgstr "Αποτυχία δημιουÏγίας σχημάτων!" + #~ msgid "" #~ "There are currently no tutorials for this class, you can [color=$color]" #~ "[url=$url]contribute one[/url][/color] or [color=$color][url=" diff --git a/editor/translations/eo.po b/editor/translations/eo.po index f8818961c6..37f49a4908 100644 --- a/editor/translations/eo.po +++ b/editor/translations/eo.po @@ -690,8 +690,9 @@ msgid "Line Number:" msgstr "Lineo-Numeron:" #: editor/code_editor.cpp -msgid "Replaced %d occurrence(s)." -msgstr "AnstataÅigis %d apero(j)n." +#, fuzzy +msgid "%d replaced." +msgstr "AnstataÅigi..." #: editor/code_editor.cpp editor/editor_help.cpp #, fuzzy @@ -3899,15 +3900,16 @@ msgid "Saving..." msgstr "" #: editor/import_dock.cpp -msgid "Set as Default for '%s'" -msgstr "" +#, fuzzy +msgid "%d Files" +msgstr "Trovi en dosierojn" #: editor/import_dock.cpp -msgid "Clear Default for '%s'" +msgid "Set as Default for '%s'" msgstr "" #: editor/import_dock.cpp -msgid " Files" +msgid "Clear Default for '%s'" msgstr "" #: editor/import_dock.cpp @@ -5747,11 +5749,12 @@ msgid "Mesh is empty!" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Trimesh Body" -msgstr "" +#, fuzzy +msgid "Couldn't create a Trimesh collision shape." +msgstr "Ne povis krei dosierujon." #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Convex Body" +msgid "Create Static Trimesh Body" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -5763,11 +5766,28 @@ msgid "Create Trimesh Static Shape" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Failed creating shapes!" +msgid "Can't create a single convex collision shape for the scene root." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Convex Shape(s)" +msgid "Couldn't create a single convex collision shape." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Single Convex Shape" +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Can't create multiple convex collision shapes for the scene root." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Couldn't create any collision shapes." +msgstr "Ne povis krei dosierujon." + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Multiple Convex Shapes" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -5819,11 +5839,40 @@ msgid "Create Trimesh Static Body" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a StaticBody and assigns a polygon-based collision shape to it " +"automatically.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Trimesh Collision Sibling" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Convex Collision Sibling(s)" +msgid "" +"Creates a polygon-based collision shape.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Single Convex Collision Siblings" +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a single convex collision shape.\n" +"This is the fastest (but least accurate) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Multiple Convex Collision Siblings" +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is a performance middle-ground between the two above options." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -5831,6 +5880,14 @@ msgid "Create Outline Mesh..." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a static outline mesh. The outline mesh will have its normals " +"flipped automatically.\n" +"This can be used instead of the SpatialMaterial Grow property when using " +"that property isn't possible." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "View UV1" msgstr "" @@ -8203,7 +8260,7 @@ msgstr "" msgid "No VCS addons are available." msgstr "" -#: editor/plugins/version_control_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/version_control_editor_plugin.cpp msgid "Error" msgstr "" @@ -9294,11 +9351,16 @@ msgid "Export With Debug" msgstr "" #: editor/project_manager.cpp -msgid "The path does not exist." +msgid "The path specified doesn't exist." msgstr "" #: editor/project_manager.cpp -msgid "Invalid '.zip' project file, does not contain a 'project.godot' file." +msgid "Error opening package file (it's not in ZIP format)." +msgstr "" + +#: editor/project_manager.cpp +msgid "" +"Invalid \".zip\" project file; it doesn't contain a \"project.godot\" file." msgstr "" #: editor/project_manager.cpp @@ -9306,11 +9368,11 @@ msgid "Please choose an empty folder." msgstr "Bonvolu, elektu malplenan dosierujon." #: editor/project_manager.cpp -msgid "Please choose a 'project.godot' or '.zip' file." +msgid "Please choose a \"project.godot\" or \".zip\" file." msgstr "" #: editor/project_manager.cpp -msgid "Directory already contains a Godot project." +msgid "This directory already contains a Godot project." msgstr "" #: editor/project_manager.cpp @@ -9971,6 +10033,10 @@ msgid "Suffix" msgstr "" #: editor/rename_dialog.cpp +msgid "Use Regular Expressions" +msgstr "" + +#: editor/rename_dialog.cpp msgid "Advanced Options" msgstr "" @@ -10005,7 +10071,7 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -msgid "Per Level counter" +msgid "Per-level Counter" msgstr "" #: editor/rename_dialog.cpp @@ -10035,10 +10101,6 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -msgid "Regular Expressions" -msgstr "" - -#: editor/rename_dialog.cpp msgid "Post-Process" msgstr "" @@ -10047,11 +10109,11 @@ msgid "Keep" msgstr "" #: editor/rename_dialog.cpp -msgid "CamelCase to under_scored" +msgid "PascalCase to snake_case" msgstr "" #: editor/rename_dialog.cpp -msgid "under_scored to CamelCase" +msgid "snake_case to PascalCase" msgstr "" #: editor/rename_dialog.cpp @@ -10070,6 +10132,14 @@ msgstr "" msgid "Reset" msgstr "" +#: editor/rename_dialog.cpp +msgid "Regular Expression Error" +msgstr "" + +#: editor/rename_dialog.cpp +msgid "At character %s" +msgstr "" + #: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp msgid "Reparent Node" msgstr "" @@ -10511,7 +10581,7 @@ msgid "Invalid inherited parent name or path." msgstr "" #: editor/script_create_dialog.cpp -msgid "Script is valid." +msgid "Script path/name is valid." msgstr "" #: editor/script_create_dialog.cpp @@ -10610,6 +10680,10 @@ msgid "Copy Error" msgstr "" #: editor/script_editor_debugger.cpp +msgid "Video RAM" +msgstr "" + +#: editor/script_editor_debugger.cpp msgid "Skip Breakpoints" msgstr "" @@ -10658,10 +10732,6 @@ msgid "Total:" msgstr "" #: editor/script_editor_debugger.cpp -msgid "Video Mem" -msgstr "" - -#: editor/script_editor_debugger.cpp msgid "Resource Path" msgstr "" @@ -12192,6 +12262,9 @@ msgstr "" msgid "Constants cannot be modified." msgstr "" +#~ msgid "Replaced %d occurrence(s)." +#~ msgstr "AnstataÅigis %d apero(j)n." + #, fuzzy #~ msgid "Brief Description" #~ msgstr "Priskribo:" diff --git a/editor/translations/es.po b/editor/translations/es.po index 7ae1e60572..80e0f9240c 100644 --- a/editor/translations/es.po +++ b/editor/translations/es.po @@ -42,11 +42,12 @@ # roger <616steam@gmail.com>, 2019. # Dario <darlex259@gmail.com>, 2019. # Adolfo Jayme Barrientos <fitojb@ubuntu.com>, 2019. +# Julián Luini <jluini@gmail.com>, 2020. msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2020-01-27 07:09+0000\n" +"PO-Revision-Date: 2020-02-04 21:53+0000\n" "Last-Translator: Javier Ocampos <xavier.ocampos@gmail.com>\n" "Language-Team: Spanish <https://hosted.weblate.org/projects/godot-engine/" "godot/es/>\n" @@ -729,8 +730,9 @@ msgid "Line Number:" msgstr "Número de LÃnea:" #: editor/code_editor.cpp -msgid "Replaced %d occurrence(s)." -msgstr "%d ocurrencia(s) reemplazada(s)." +#, fuzzy +msgid "%d replaced." +msgstr "Reemplazar..." #: editor/code_editor.cpp editor/editor_help.cpp msgid "%d match." @@ -4022,6 +4024,10 @@ msgid "Saving..." msgstr "Guardando..." #: editor/import_dock.cpp +msgid "%d Files" +msgstr "%d archivos" + +#: editor/import_dock.cpp msgid "Set as Default for '%s'" msgstr "Establecer como predeterminado para '%s'" @@ -4030,10 +4036,6 @@ msgid "Clear Default for '%s'" msgstr "Restablecer Predeterminado para '%s'" #: editor/import_dock.cpp -msgid " Files" -msgstr " Archivos" - -#: editor/import_dock.cpp msgid "Import As:" msgstr "Importar como:" @@ -5912,12 +5914,13 @@ msgid "Mesh is empty!" msgstr "¡El Mesh está vacÃo!" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Trimesh Body" -msgstr "Crear StaticBody Triangular" +#, fuzzy +msgid "Couldn't create a Trimesh collision shape." +msgstr "Crear Collider Triangular Hermano" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Convex Body" -msgstr "Crear Static Convex Body" +msgid "Create Static Trimesh Body" +msgstr "Crear StaticBody Triangular" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "This doesn't work on scene root!" @@ -5928,11 +5931,30 @@ msgid "Create Trimesh Static Shape" msgstr "Crear Shape Estático Triangular" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Failed creating shapes!" -msgstr "¡Falló en la creación de los shapes!" +msgid "Can't create a single convex collision shape for the scene root." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Couldn't create a single convex collision shape." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Single Convex Shape" +msgstr "Crear Shape(s) Convexo(s)" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Can't create multiple convex collision shapes for the scene root." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Couldn't create any collision shapes." +msgstr "No se pudo crear la carpeta." #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Convex Shape(s)" +#, fuzzy +msgid "Create Multiple Convex Shapes" msgstr "Crear Shape(s) Convexo(s)" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -5984,18 +6006,57 @@ msgid "Create Trimesh Static Body" msgstr "Crear StaticBody Triangular" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a StaticBody and assigns a polygon-based collision shape to it " +"automatically.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Trimesh Collision Sibling" msgstr "Crear Collider Triangular Hermano" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Convex Collision Sibling(s)" +msgid "" +"Creates a polygon-based collision shape.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Single Convex Collision Siblings" msgstr "Crear Collider Convexo Hermano(s)" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a single convex collision shape.\n" +"This is the fastest (but least accurate) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Multiple Convex Collision Siblings" +msgstr "Crear Collider Convexo Hermano(s)" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is a performance middle-ground between the two above options." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Outline Mesh..." msgstr "Crear Outline Mesh..." #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a static outline mesh. The outline mesh will have its normals " +"flipped automatically.\n" +"This can be used instead of the SpatialMaterial Grow property when using " +"that property isn't possible." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "View UV1" msgstr "Ver UV1" @@ -8407,7 +8468,7 @@ msgstr "TileSet" msgid "No VCS addons are available." msgstr "No hay addons de VCS disponibles." -#: editor/plugins/version_control_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/version_control_editor_plugin.cpp msgid "Error" msgstr "Error" @@ -9578,11 +9639,19 @@ msgid "Export With Debug" msgstr "Exportar Con Depuración" #: editor/project_manager.cpp -msgid "The path does not exist." +#, fuzzy +msgid "The path specified doesn't exist." msgstr "La ruta no existe." #: editor/project_manager.cpp -msgid "Invalid '.zip' project file, does not contain a 'project.godot' file." +#, fuzzy +msgid "Error opening package file (it's not in ZIP format)." +msgstr "Error al abrir el archivo comprimido, no está en formato ZIP." + +#: editor/project_manager.cpp +#, fuzzy +msgid "" +"Invalid \".zip\" project file; it doesn't contain a \"project.godot\" file." msgstr "" "Archivo de projecto '.zip' inválido, no contiene un archivo 'project.godot'." @@ -9591,11 +9660,13 @@ msgid "Please choose an empty folder." msgstr "Por favor elija una carpeta vacÃa." #: editor/project_manager.cpp -msgid "Please choose a 'project.godot' or '.zip' file." +#, fuzzy +msgid "Please choose a \"project.godot\" or \".zip\" file." msgstr "Por favor selecciona un archivo 'project.godot' o '.zip'." #: editor/project_manager.cpp -msgid "Directory already contains a Godot project." +#, fuzzy +msgid "This directory already contains a Godot project." msgstr "El directorio ya contiene un proyecto de Godot." #: editor/project_manager.cpp @@ -10295,6 +10366,11 @@ msgid "Suffix" msgstr "Sufijo" #: editor/rename_dialog.cpp +#, fuzzy +msgid "Use Regular Expressions" +msgstr "Expresiones regulares" + +#: editor/rename_dialog.cpp msgid "Advanced Options" msgstr "Opciones Avanzadas" @@ -10331,7 +10407,8 @@ msgstr "" "Comparar opciones de contador." #: editor/rename_dialog.cpp -msgid "Per Level counter" +#, fuzzy +msgid "Per-level Counter" msgstr "Contador por Nivel" #: editor/rename_dialog.cpp @@ -10363,10 +10440,6 @@ msgstr "" "Los dÃgitos faltantes serán rellenados con ceros al principio." #: editor/rename_dialog.cpp -msgid "Regular Expressions" -msgstr "Expresiones regulares" - -#: editor/rename_dialog.cpp msgid "Post-Process" msgstr "Post-Procesado" @@ -10375,11 +10448,13 @@ msgid "Keep" msgstr "Conservar" #: editor/rename_dialog.cpp -msgid "CamelCase to under_scored" +#, fuzzy +msgid "PascalCase to snake_case" msgstr "CamelCase a under_scored" #: editor/rename_dialog.cpp -msgid "under_scored to CamelCase" +#, fuzzy +msgid "snake_case to PascalCase" msgstr "under_scored a CamelCase" #: editor/rename_dialog.cpp @@ -10398,6 +10473,16 @@ msgstr "A mayúsculas" msgid "Reset" msgstr "Resetear" +#: editor/rename_dialog.cpp +#, fuzzy +msgid "Regular Expression Error" +msgstr "Expresiones regulares" + +#: editor/rename_dialog.cpp +#, fuzzy +msgid "At character %s" +msgstr "Caracteres válidos:" + #: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp msgid "Reparent Node" msgstr "Reemparentar nodo" @@ -10863,7 +10948,8 @@ msgid "Invalid inherited parent name or path." msgstr "Nombre o ruta del padre heredado inválido." #: editor/script_create_dialog.cpp -msgid "Script is valid." +#, fuzzy +msgid "Script path/name is valid." msgstr "El script es válido." #: editor/script_create_dialog.cpp @@ -10955,6 +11041,11 @@ msgid "Copy Error" msgstr "Copiar Error" #: editor/script_editor_debugger.cpp +#, fuzzy +msgid "Video RAM" +msgstr "Memoria de VÃdeo" + +#: editor/script_editor_debugger.cpp msgid "Skip Breakpoints" msgstr "Saltar Breakpoints" @@ -11003,10 +11094,6 @@ msgid "Total:" msgstr "Total:" #: editor/script_editor_debugger.cpp -msgid "Video Mem" -msgstr "Memoria de VÃdeo" - -#: editor/script_editor_debugger.cpp msgid "Resource Path" msgstr "Ruta de Recursos" @@ -12716,6 +12803,15 @@ msgstr "Solo se pueden asignar variaciones en funciones de vértice." msgid "Constants cannot be modified." msgstr "Las constantes no pueden modificarse." +#~ msgid "Replaced %d occurrence(s)." +#~ msgstr "%d ocurrencia(s) reemplazada(s)." + +#~ msgid "Create Static Convex Body" +#~ msgstr "Crear Static Convex Body" + +#~ msgid "Failed creating shapes!" +#~ msgstr "¡Falló en la creación de los shapes!" + #~ msgid "" #~ "There are currently no tutorials for this class, you can [color=$color]" #~ "[url=$url]contribute one[/url][/color] or [color=$color][url=" diff --git a/editor/translations/es_AR.po b/editor/translations/es_AR.po index c367f694c1..e7aa5cb780 100644 --- a/editor/translations/es_AR.po +++ b/editor/translations/es_AR.po @@ -11,15 +11,15 @@ # Javier Ocampos <xavier.ocampos@gmail.com>, 2018, 2019, 2020. # Andrés S <andres.segovia.dev@gmail.com>, 2019. # Florencia Menéndez <mariaflormz2@gmail.com>, 2019. -# roger <616steam@gmail.com>, 2019. +# roger <616steam@gmail.com>, 2019, 2020. # Francisco José Carllinni <panchopepe@protonmail.com>, 2019. # Nicolas Zirulnik <nicolaszirulnik@gmail.com>, 2020. msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2020-01-27 07:09+0000\n" -"Last-Translator: Javier Ocampos <xavier.ocampos@gmail.com>\n" +"PO-Revision-Date: 2020-02-18 15:09+0000\n" +"Last-Translator: Lisandro Lorea <lisandrolorea@gmail.com>\n" "Language-Team: Spanish (Argentina) <https://hosted.weblate.org/projects/" "godot-engine/godot/es_AR/>\n" "Language: es_AR\n" @@ -27,7 +27,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 3.11-dev\n" +"X-Generator: Weblate 3.11\n" #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/visual_script/visual_script_builtin_funcs.cpp @@ -681,7 +681,7 @@ msgstr "Cambiar Offset Final de Clip de Pista de Audio" #: editor/array_property_edit.cpp msgid "Resize Array" -msgstr "Redimencionar Array" +msgstr "Redimensionar Array" #: editor/array_property_edit.cpp msgid "Change Array Value Type" @@ -700,8 +700,8 @@ msgid "Line Number:" msgstr "Numero de LÃnea:" #: editor/code_editor.cpp -msgid "Replaced %d occurrence(s)." -msgstr "%d ocurrencia(s) Reemplazadas." +msgid "%d replaced." +msgstr "%d reemplazadas." #: editor/code_editor.cpp editor/editor_help.cpp msgid "%d match." @@ -3987,6 +3987,10 @@ msgid "Saving..." msgstr "Guardando..." #: editor/import_dock.cpp +msgid "%d Files" +msgstr "%d Archivos" + +#: editor/import_dock.cpp msgid "Set as Default for '%s'" msgstr "Asignar como Predeterminado para '%s'" @@ -3995,10 +3999,6 @@ msgid "Clear Default for '%s'" msgstr "Restablecer Predeterminados para '%s'" #: editor/import_dock.cpp -msgid " Files" -msgstr " Archivos" - -#: editor/import_dock.cpp msgid "Import As:" msgstr "Importar Como:" @@ -5878,12 +5878,12 @@ msgid "Mesh is empty!" msgstr "¡El Mesh está vacÃo!" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Trimesh Body" -msgstr "Crear Static Trimesh Body" +msgid "Couldn't create a Trimesh collision shape." +msgstr "No se pudo crear una forma de colisión Trimersh." #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Convex Body" -msgstr "Crear Static Convex Body" +msgid "Create Static Trimesh Body" +msgstr "Crear Static Trimesh Body" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "This doesn't work on scene root!" @@ -5894,12 +5894,31 @@ msgid "Create Trimesh Static Shape" msgstr "Crear Trimesh Static Shape" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Failed creating shapes!" -msgstr "¡Fallo al crear shapes!" +msgid "Can't create a single convex collision shape for the scene root." +msgstr "" +"No se pudo crear una única forma de colisión convexa para la raÃz de escena." + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Couldn't create a single convex collision shape." +msgstr "No se pudo crear una forma de colisión única." + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Single Convex Shape" +msgstr "Crear Forma Convexa Unica" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Can't create multiple convex collision shapes for the scene root." +msgstr "" +"No se pudo crear múltiples formas de colisión convexas para la raÃz de " +"escena." #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Convex Shape(s)" -msgstr "Crear Shape(s) Convexo(s)" +msgid "Couldn't create any collision shapes." +msgstr "No se pudo crear ninguna forma de colisión." + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Multiple Convex Shapes" +msgstr "Crear Múltiples Formas Convexas" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Navigation Mesh" @@ -5950,18 +5969,68 @@ msgid "Create Trimesh Static Body" msgstr "Crear StaticBody Triangular" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a StaticBody and assigns a polygon-based collision shape to it " +"automatically.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" +"Crea un StaticBody y le asigna automáticamente una forma de colisión basada " +"en polÃgonos .\n" +"Esta es la opción mas exacta (pero más lenta) de detección de colisiones." + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Trimesh Collision Sibling" msgstr "Crear Collider Triangular Hermano" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Convex Collision Sibling(s)" -msgstr "Crear Collider Convexo Hermano(s)" +msgid "" +"Creates a polygon-based collision shape.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" +"Crea una forma de colisión basada en polÃgonos.\n" +"Esta es la opción mas exacta (pero más lenta) de detección de colisiones." + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Single Convex Collision Siblings" +msgstr "Crear Colisión Convexa Unica como Nodo Hermano" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a single convex collision shape.\n" +"This is the fastest (but least accurate) option for collision detection." +msgstr "" +"Crear forma de colisión convexa única.\n" +"Esta es la opción mas rápida (pero menos exacta) para detectar colisiones." + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Multiple Convex Collision Siblings" +msgstr "Crear Múltiples Colisiones Convexas como Nodos Hermanos" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is a performance middle-ground between the two above options." +msgstr "" +"Crea una forma de colisión basada en polÃgonos.\n" +"Esto está en un punto medio de rendimiento entre las dos opciones de arriba." #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Outline Mesh..." msgstr "Crear Outline Mesh..." #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a static outline mesh. The outline mesh will have its normals " +"flipped automatically.\n" +"This can be used instead of the SpatialMaterial Grow property when using " +"that property isn't possible." +msgstr "" +"Crea un mesh de contorno estático. Este mesh de contorno tendrá sus normales " +"invertidas automáticamente.\n" +"Esto puede ser usado en vez de la propiedad Grow del SpatialMaterial cuando " +"no sea posible usar dicha propiedad." + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "View UV1" msgstr "Ver UV1" @@ -6646,7 +6715,7 @@ msgstr "El script falló al recargar, revisá errores en la consola." #: editor/plugins/script_editor_plugin.cpp msgid "Script is not in tool mode, will not be able to run." -msgstr "Es script no esta en modo tool, no sera posible ejecutarlo." +msgstr "El script no esta en modo tool, no sera posible ejecutarlo." #: editor/plugins/script_editor_plugin.cpp msgid "" @@ -8372,7 +8441,7 @@ msgstr "TileSet" msgid "No VCS addons are available." msgstr "No hay addons de VCS disponibles." -#: editor/plugins/version_control_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/version_control_editor_plugin.cpp msgid "Error" msgstr "Error" @@ -9543,24 +9612,30 @@ msgid "Export With Debug" msgstr "Exportar Con Depuración" #: editor/project_manager.cpp -msgid "The path does not exist." -msgstr "La ruta no existe." +msgid "The path specified doesn't exist." +msgstr "La ruta especificada no existe." + +#: editor/project_manager.cpp +msgid "Error opening package file (it's not in ZIP format)." +msgstr "Error al abrir el archivo de paquete (no esta en formato ZIP)." #: editor/project_manager.cpp -msgid "Invalid '.zip' project file, does not contain a 'project.godot' file." +msgid "" +"Invalid \".zip\" project file; it doesn't contain a \"project.godot\" file." msgstr "" -"Archivo de projecto '.zip' inválido, no contiene un archivo 'project.godot'." +"Archivo de projecto \".zip\" inválido; no contiene un archivo \"project.godot" +"\"." #: editor/project_manager.cpp msgid "Please choose an empty folder." msgstr "Por favor elegà una carpeta vacÃa." #: editor/project_manager.cpp -msgid "Please choose a 'project.godot' or '.zip' file." -msgstr "Por favor elegà un archivo 'project.godot' o '.zip'." +msgid "Please choose a \"project.godot\" or \".zip\" file." +msgstr "Por favor elegà un archivo \"project.godot\" o \".zip\"." #: editor/project_manager.cpp -msgid "Directory already contains a Godot project." +msgid "This directory already contains a Godot project." msgstr "El directorio ya contiene un proyecto de Godot." #: editor/project_manager.cpp @@ -10261,6 +10336,10 @@ msgid "Suffix" msgstr "Sufijo" #: editor/rename_dialog.cpp +msgid "Use Regular Expressions" +msgstr "Usar Expresiones Regulares" + +#: editor/rename_dialog.cpp msgid "Advanced Options" msgstr "Opciones Avanzadas" @@ -10297,8 +10376,8 @@ msgstr "" "Comparar opciones de contador." #: editor/rename_dialog.cpp -msgid "Per Level counter" -msgstr "Contador por nivel" +msgid "Per-level Counter" +msgstr "Contador Por Nivel" #: editor/rename_dialog.cpp msgid "If set the counter restarts for each group of child nodes" @@ -10329,10 +10408,6 @@ msgstr "" "Los dÃgitos faltantes serán rellenados con ceros al principio." #: editor/rename_dialog.cpp -msgid "Regular Expressions" -msgstr "Expresiones Regulares" - -#: editor/rename_dialog.cpp msgid "Post-Process" msgstr "Post-Procesado" @@ -10341,12 +10416,12 @@ msgid "Keep" msgstr "Conservar" #: editor/rename_dialog.cpp -msgid "CamelCase to under_scored" -msgstr "CamelCase a under_scored" +msgid "PascalCase to snake_case" +msgstr "PascalCase a snake_case" #: editor/rename_dialog.cpp -msgid "under_scored to CamelCase" -msgstr "under_scored a CamelCase" +msgid "snake_case to PascalCase" +msgstr "snake_case a PascalCase" #: editor/rename_dialog.cpp msgid "Case" @@ -10364,6 +10439,14 @@ msgstr "A Mayúsculas" msgid "Reset" msgstr "Resetear" +#: editor/rename_dialog.cpp +msgid "Regular Expression Error" +msgstr "Error de Expresión Regular" + +#: editor/rename_dialog.cpp +msgid "At character %s" +msgstr "En el caracter %s" + #: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp msgid "Reparent Node" msgstr "Reemparentar Nodo" @@ -10830,8 +10913,8 @@ msgid "Invalid inherited parent name or path." msgstr "Ruta o nombre del padre heredado inválido." #: editor/script_create_dialog.cpp -msgid "Script is valid." -msgstr "El script es válido." +msgid "Script path/name is valid." +msgstr "La ruta/nombre del script es inválida." #: editor/script_create_dialog.cpp msgid "Allowed: a-z, A-Z, 0-9, _ and ." @@ -10922,6 +11005,10 @@ msgid "Copy Error" msgstr "Copiar Error" #: editor/script_editor_debugger.cpp +msgid "Video RAM" +msgstr "Mem. de Video" + +#: editor/script_editor_debugger.cpp msgid "Skip Breakpoints" msgstr "Saltear Breakpoints" @@ -10970,10 +11057,6 @@ msgid "Total:" msgstr "Total:" #: editor/script_editor_debugger.cpp -msgid "Video Mem" -msgstr "Mem. de Video" - -#: editor/script_editor_debugger.cpp msgid "Resource Path" msgstr "Ruta de Recursos" @@ -12675,6 +12758,15 @@ msgstr "Solo se pueden asignar variaciones en funciones de vértice." msgid "Constants cannot be modified." msgstr "Las constantes no pueden modificarse." +#~ msgid "Replaced %d occurrence(s)." +#~ msgstr "%d ocurrencia(s) Reemplazadas." + +#~ msgid "Create Static Convex Body" +#~ msgstr "Crear Static Convex Body" + +#~ msgid "Failed creating shapes!" +#~ msgstr "¡Fallo al crear shapes!" + #~ msgid "" #~ "There are currently no tutorials for this class, you can [color=$color]" #~ "[url=$url]contribute one[/url][/color] or [color=$color][url=" diff --git a/editor/translations/et.po b/editor/translations/et.po index 1db95acc83..059a200138 100644 --- a/editor/translations/et.po +++ b/editor/translations/et.po @@ -669,7 +669,7 @@ msgid "Line Number:" msgstr "" #: editor/code_editor.cpp -msgid "Replaced %d occurrence(s)." +msgid "%d replaced." msgstr "" #: editor/code_editor.cpp editor/editor_help.cpp @@ -3810,15 +3810,15 @@ msgid "Saving..." msgstr "" #: editor/import_dock.cpp -msgid "Set as Default for '%s'" +msgid "%d Files" msgstr "" #: editor/import_dock.cpp -msgid "Clear Default for '%s'" +msgid "Set as Default for '%s'" msgstr "" #: editor/import_dock.cpp -msgid " Files" +msgid "Clear Default for '%s'" msgstr "" #: editor/import_dock.cpp @@ -5653,11 +5653,11 @@ msgid "Mesh is empty!" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Trimesh Body" +msgid "Couldn't create a Trimesh collision shape." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Convex Body" +msgid "Create Static Trimesh Body" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -5669,11 +5669,27 @@ msgid "Create Trimesh Static Shape" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Failed creating shapes!" +msgid "Can't create a single convex collision shape for the scene root." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Couldn't create a single convex collision shape." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Single Convex Shape" +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Can't create multiple convex collision shapes for the scene root." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Couldn't create any collision shapes." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Convex Shape(s)" +msgid "Create Multiple Convex Shapes" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -5725,11 +5741,40 @@ msgid "Create Trimesh Static Body" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a StaticBody and assigns a polygon-based collision shape to it " +"automatically.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Trimesh Collision Sibling" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Convex Collision Sibling(s)" +msgid "" +"Creates a polygon-based collision shape.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Single Convex Collision Siblings" +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a single convex collision shape.\n" +"This is the fastest (but least accurate) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Multiple Convex Collision Siblings" +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is a performance middle-ground between the two above options." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -5737,6 +5782,14 @@ msgid "Create Outline Mesh..." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a static outline mesh. The outline mesh will have its normals " +"flipped automatically.\n" +"This can be used instead of the SpatialMaterial Grow property when using " +"that property isn't possible." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "View UV1" msgstr "" @@ -8102,7 +8155,7 @@ msgstr "" msgid "No VCS addons are available." msgstr "" -#: editor/plugins/version_control_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/version_control_editor_plugin.cpp msgid "Error" msgstr "" @@ -9189,11 +9242,16 @@ msgid "Export With Debug" msgstr "" #: editor/project_manager.cpp -msgid "The path does not exist." +msgid "The path specified doesn't exist." +msgstr "" + +#: editor/project_manager.cpp +msgid "Error opening package file (it's not in ZIP format)." msgstr "" #: editor/project_manager.cpp -msgid "Invalid '.zip' project file, does not contain a 'project.godot' file." +msgid "" +"Invalid \".zip\" project file; it doesn't contain a \"project.godot\" file." msgstr "" #: editor/project_manager.cpp @@ -9201,11 +9259,11 @@ msgid "Please choose an empty folder." msgstr "" #: editor/project_manager.cpp -msgid "Please choose a 'project.godot' or '.zip' file." +msgid "Please choose a \"project.godot\" or \".zip\" file." msgstr "" #: editor/project_manager.cpp -msgid "Directory already contains a Godot project." +msgid "This directory already contains a Godot project." msgstr "" #: editor/project_manager.cpp @@ -9851,6 +9909,10 @@ msgid "Suffix" msgstr "" #: editor/rename_dialog.cpp +msgid "Use Regular Expressions" +msgstr "" + +#: editor/rename_dialog.cpp msgid "Advanced Options" msgstr "" @@ -9885,7 +9947,7 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -msgid "Per Level counter" +msgid "Per-level Counter" msgstr "" #: editor/rename_dialog.cpp @@ -9915,10 +9977,6 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -msgid "Regular Expressions" -msgstr "" - -#: editor/rename_dialog.cpp msgid "Post-Process" msgstr "" @@ -9927,11 +9985,11 @@ msgid "Keep" msgstr "" #: editor/rename_dialog.cpp -msgid "CamelCase to under_scored" +msgid "PascalCase to snake_case" msgstr "" #: editor/rename_dialog.cpp -msgid "under_scored to CamelCase" +msgid "snake_case to PascalCase" msgstr "" #: editor/rename_dialog.cpp @@ -9950,6 +10008,14 @@ msgstr "" msgid "Reset" msgstr "" +#: editor/rename_dialog.cpp +msgid "Regular Expression Error" +msgstr "" + +#: editor/rename_dialog.cpp +msgid "At character %s" +msgstr "" + #: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp msgid "Reparent Node" msgstr "" @@ -10391,7 +10457,7 @@ msgid "Invalid inherited parent name or path." msgstr "" #: editor/script_create_dialog.cpp -msgid "Script is valid." +msgid "Script path/name is valid." msgstr "" #: editor/script_create_dialog.cpp @@ -10484,6 +10550,10 @@ msgid "Copy Error" msgstr "" #: editor/script_editor_debugger.cpp +msgid "Video RAM" +msgstr "" + +#: editor/script_editor_debugger.cpp msgid "Skip Breakpoints" msgstr "" @@ -10532,10 +10602,6 @@ msgid "Total:" msgstr "" #: editor/script_editor_debugger.cpp -msgid "Video Mem" -msgstr "" - -#: editor/script_editor_debugger.cpp msgid "Resource Path" msgstr "" diff --git a/editor/translations/eu.po b/editor/translations/eu.po index b9a682553e..2829912826 100644 --- a/editor/translations/eu.po +++ b/editor/translations/eu.po @@ -666,7 +666,7 @@ msgid "Line Number:" msgstr "" #: editor/code_editor.cpp -msgid "Replaced %d occurrence(s)." +msgid "%d replaced." msgstr "" #: editor/code_editor.cpp editor/editor_help.cpp @@ -3802,15 +3802,15 @@ msgid "Saving..." msgstr "" #: editor/import_dock.cpp -msgid "Set as Default for '%s'" +msgid "%d Files" msgstr "" #: editor/import_dock.cpp -msgid "Clear Default for '%s'" +msgid "Set as Default for '%s'" msgstr "" #: editor/import_dock.cpp -msgid " Files" +msgid "Clear Default for '%s'" msgstr "" #: editor/import_dock.cpp @@ -5639,11 +5639,11 @@ msgid "Mesh is empty!" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Trimesh Body" +msgid "Couldn't create a Trimesh collision shape." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Convex Body" +msgid "Create Static Trimesh Body" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -5655,11 +5655,27 @@ msgid "Create Trimesh Static Shape" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Failed creating shapes!" +msgid "Can't create a single convex collision shape for the scene root." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Couldn't create a single convex collision shape." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Single Convex Shape" +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Can't create multiple convex collision shapes for the scene root." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Couldn't create any collision shapes." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Convex Shape(s)" +msgid "Create Multiple Convex Shapes" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -5711,11 +5727,40 @@ msgid "Create Trimesh Static Body" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a StaticBody and assigns a polygon-based collision shape to it " +"automatically.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Trimesh Collision Sibling" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Convex Collision Sibling(s)" +msgid "" +"Creates a polygon-based collision shape.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Single Convex Collision Siblings" +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a single convex collision shape.\n" +"This is the fastest (but least accurate) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Multiple Convex Collision Siblings" +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is a performance middle-ground between the two above options." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -5723,6 +5768,14 @@ msgid "Create Outline Mesh..." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a static outline mesh. The outline mesh will have its normals " +"flipped automatically.\n" +"This can be used instead of the SpatialMaterial Grow property when using " +"that property isn't possible." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "View UV1" msgstr "" @@ -8087,7 +8140,7 @@ msgstr "" msgid "No VCS addons are available." msgstr "" -#: editor/plugins/version_control_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/version_control_editor_plugin.cpp msgid "Error" msgstr "" @@ -9171,11 +9224,16 @@ msgid "Export With Debug" msgstr "" #: editor/project_manager.cpp -msgid "The path does not exist." +msgid "The path specified doesn't exist." +msgstr "" + +#: editor/project_manager.cpp +msgid "Error opening package file (it's not in ZIP format)." msgstr "" #: editor/project_manager.cpp -msgid "Invalid '.zip' project file, does not contain a 'project.godot' file." +msgid "" +"Invalid \".zip\" project file; it doesn't contain a \"project.godot\" file." msgstr "" #: editor/project_manager.cpp @@ -9183,11 +9241,11 @@ msgid "Please choose an empty folder." msgstr "" #: editor/project_manager.cpp -msgid "Please choose a 'project.godot' or '.zip' file." +msgid "Please choose a \"project.godot\" or \".zip\" file." msgstr "" #: editor/project_manager.cpp -msgid "Directory already contains a Godot project." +msgid "This directory already contains a Godot project." msgstr "" #: editor/project_manager.cpp @@ -9833,6 +9891,10 @@ msgid "Suffix" msgstr "" #: editor/rename_dialog.cpp +msgid "Use Regular Expressions" +msgstr "" + +#: editor/rename_dialog.cpp msgid "Advanced Options" msgstr "" @@ -9867,7 +9929,7 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -msgid "Per Level counter" +msgid "Per-level Counter" msgstr "" #: editor/rename_dialog.cpp @@ -9897,10 +9959,6 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -msgid "Regular Expressions" -msgstr "" - -#: editor/rename_dialog.cpp msgid "Post-Process" msgstr "" @@ -9909,11 +9967,11 @@ msgid "Keep" msgstr "" #: editor/rename_dialog.cpp -msgid "CamelCase to under_scored" +msgid "PascalCase to snake_case" msgstr "" #: editor/rename_dialog.cpp -msgid "under_scored to CamelCase" +msgid "snake_case to PascalCase" msgstr "" #: editor/rename_dialog.cpp @@ -9932,6 +9990,14 @@ msgstr "" msgid "Reset" msgstr "" +#: editor/rename_dialog.cpp +msgid "Regular Expression Error" +msgstr "" + +#: editor/rename_dialog.cpp +msgid "At character %s" +msgstr "" + #: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp msgid "Reparent Node" msgstr "" @@ -10371,7 +10437,7 @@ msgid "Invalid inherited parent name or path." msgstr "" #: editor/script_create_dialog.cpp -msgid "Script is valid." +msgid "Script path/name is valid." msgstr "" #: editor/script_create_dialog.cpp @@ -10463,6 +10529,10 @@ msgid "Copy Error" msgstr "" #: editor/script_editor_debugger.cpp +msgid "Video RAM" +msgstr "" + +#: editor/script_editor_debugger.cpp msgid "Skip Breakpoints" msgstr "" @@ -10511,10 +10581,6 @@ msgid "Total:" msgstr "" #: editor/script_editor_debugger.cpp -msgid "Video Mem" -msgstr "" - -#: editor/script_editor_debugger.cpp msgid "Resource Path" msgstr "" diff --git a/editor/translations/fa.po b/editor/translations/fa.po index 5d071126c6..377bbfbb67 100644 --- a/editor/translations/fa.po +++ b/editor/translations/fa.po @@ -712,8 +712,9 @@ msgid "Line Number:" msgstr "شماره خط:" #: editor/code_editor.cpp -msgid "Replaced %d occurrence(s)." -msgstr "تعداد d% رخداد جایگزین شد." +#, fuzzy +msgid "%d replaced." +msgstr "جایگزینی" #: editor/code_editor.cpp editor/editor_help.cpp msgid "%d match." @@ -4039,6 +4040,11 @@ msgid "Saving..." msgstr "" #: editor/import_dock.cpp +#, fuzzy +msgid "%d Files" +msgstr " پوشه ها" + +#: editor/import_dock.cpp msgid "Set as Default for '%s'" msgstr "" @@ -4047,10 +4053,6 @@ msgid "Clear Default for '%s'" msgstr "" #: editor/import_dock.cpp -msgid " Files" -msgstr " پوشه ها" - -#: editor/import_dock.cpp msgid "Import As:" msgstr "" @@ -5992,11 +5994,12 @@ msgid "Mesh is empty!" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Trimesh Body" -msgstr "" +#, fuzzy +msgid "Couldn't create a Trimesh collision shape." +msgstr "ناتوان در ساختن پوشه." #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Convex Body" +msgid "Create Static Trimesh Body" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -6008,12 +6011,30 @@ msgid "Create Trimesh Static Shape" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Failed creating shapes!" +msgid "Can't create a single convex collision shape for the scene root." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Couldn't create a single convex collision shape." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp #, fuzzy -msgid "Create Convex Shape(s)" +msgid "Create Single Convex Shape" +msgstr "ساختن %s جدید" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Can't create multiple convex collision shapes for the scene root." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Couldn't create any collision shapes." +msgstr "ناتوان در ساختن پوشه." + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Multiple Convex Shapes" msgstr "ساختن %s جدید" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -6065,19 +6086,57 @@ msgid "Create Trimesh Static Body" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a StaticBody and assigns a polygon-based collision shape to it " +"automatically.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Trimesh Collision Sibling" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp #, fuzzy -msgid "Create Convex Collision Sibling(s)" +msgid "Create Single Convex Collision Siblings" msgstr "انتخاب شده را تغییر مقیاس بده" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a single convex collision shape.\n" +"This is the fastest (but least accurate) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Multiple Convex Collision Siblings" +msgstr "انتخاب شده را تغییر مقیاس بده" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is a performance middle-ground between the two above options." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Outline Mesh..." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a static outline mesh. The outline mesh will have its normals " +"flipped automatically.\n" +"This can be used instead of the SpatialMaterial Grow property when using " +"that property isn't possible." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp #, fuzzy msgid "View UV1" msgstr "پرونده:" @@ -8608,7 +8667,7 @@ msgstr "صدور مجموعه کاشی" msgid "No VCS addons are available." msgstr "" -#: editor/plugins/version_control_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/version_control_editor_plugin.cpp msgid "Error" msgstr "" @@ -9747,11 +9806,16 @@ msgstr "صدور با اشکال زدا" #: editor/project_manager.cpp #, fuzzy -msgid "The path does not exist." +msgid "The path specified doesn't exist." msgstr "پرونده موجود نیست." #: editor/project_manager.cpp -msgid "Invalid '.zip' project file, does not contain a 'project.godot' file." +msgid "Error opening package file (it's not in ZIP format)." +msgstr "" + +#: editor/project_manager.cpp +msgid "" +"Invalid \".zip\" project file; it doesn't contain a \"project.godot\" file." msgstr "" #: editor/project_manager.cpp @@ -9759,11 +9823,11 @@ msgid "Please choose an empty folder." msgstr "" #: editor/project_manager.cpp -msgid "Please choose a 'project.godot' or '.zip' file." +msgid "Please choose a \"project.godot\" or \".zip\" file." msgstr "" #: editor/project_manager.cpp -msgid "Directory already contains a Godot project." +msgid "This directory already contains a Godot project." msgstr "" #: editor/project_manager.cpp @@ -10438,6 +10502,11 @@ msgid "Suffix" msgstr "" #: editor/rename_dialog.cpp +#, fuzzy +msgid "Use Regular Expressions" +msgstr "انتقال را در انیمیشن تغییر بده" + +#: editor/rename_dialog.cpp msgid "Advanced Options" msgstr "" @@ -10475,7 +10544,7 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -msgid "Per Level counter" +msgid "Per-level Counter" msgstr "" #: editor/rename_dialog.cpp @@ -10506,11 +10575,6 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -#, fuzzy -msgid "Regular Expressions" -msgstr "انتقال را در انیمیشن تغییر بده" - -#: editor/rename_dialog.cpp msgid "Post-Process" msgstr "" @@ -10519,11 +10583,11 @@ msgid "Keep" msgstr "" #: editor/rename_dialog.cpp -msgid "CamelCase to under_scored" +msgid "PascalCase to snake_case" msgstr "" #: editor/rename_dialog.cpp -msgid "under_scored to CamelCase" +msgid "snake_case to PascalCase" msgstr "" #: editor/rename_dialog.cpp @@ -10544,6 +10608,16 @@ msgstr "" msgid "Reset" msgstr "بازنشانی بزرگنمایی" +#: editor/rename_dialog.cpp +#, fuzzy +msgid "Regular Expression Error" +msgstr "انتقال را در انیمیشن تغییر بده" + +#: editor/rename_dialog.cpp +#, fuzzy +msgid "At character %s" +msgstr "کاراکترهای معتبر:" + #: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp msgid "Reparent Node" msgstr "گره تغییر والد" @@ -11018,7 +11092,7 @@ msgid "Invalid inherited parent name or path." msgstr "نام دارایی ایندکس نامعتبر." #: editor/script_create_dialog.cpp -msgid "Script is valid." +msgid "Script path/name is valid." msgstr "" #: editor/script_create_dialog.cpp @@ -11125,6 +11199,10 @@ msgid "Copy Error" msgstr "خطاهای بارگذاری" #: editor/script_editor_debugger.cpp +msgid "Video RAM" +msgstr "" + +#: editor/script_editor_debugger.cpp #, fuzzy msgid "Skip Breakpoints" msgstr "ØØ°Ù Ú©Ù†" @@ -11175,10 +11253,6 @@ msgid "Total:" msgstr "" #: editor/script_editor_debugger.cpp -msgid "Video Mem" -msgstr "" - -#: editor/script_editor_debugger.cpp msgid "Resource Path" msgstr "" @@ -12850,6 +12924,9 @@ msgstr "" msgid "Constants cannot be modified." msgstr "" +#~ msgid "Replaced %d occurrence(s)." +#~ msgstr "تعداد d% رخداد جایگزین شد." + #, fuzzy #~ msgid "Brief Description" #~ msgstr "خلاصه ØªÙˆØ¶ÛŒØØ§Øª:" diff --git a/editor/translations/fi.po b/editor/translations/fi.po index bac46bbf8b..d8fa02de0f 100644 --- a/editor/translations/fi.po +++ b/editor/translations/fi.po @@ -14,7 +14,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2020-01-27 07:10+0000\n" +"PO-Revision-Date: 2020-02-16 15:21+0000\n" "Last-Translator: Tapani Niemi <tapani.niemi@kapsi.fi>\n" "Language-Team: Finnish <https://hosted.weblate.org/projects/godot-engine/" "godot/fi/>\n" @@ -687,8 +687,8 @@ msgid "Line Number:" msgstr "Rivinumero:" #: editor/code_editor.cpp -msgid "Replaced %d occurrence(s)." -msgstr "Korvattu %d osuvuutta." +msgid "%d replaced." +msgstr "%d korvattu." #: editor/code_editor.cpp editor/editor_help.cpp msgid "%d match." @@ -806,7 +806,7 @@ msgstr "Ylimääräiset argumentit:" #: editor/connections_dialog.cpp msgid "Receiver Method:" -msgstr "Valitse metodi:" +msgstr "Vastaanottava metodi:" #: editor/connections_dialog.cpp msgid "Advanced" @@ -1734,7 +1734,7 @@ msgstr "Tyhjennä profiili" #: editor/editor_feature_profile.cpp msgid "Godot Feature Profile" -msgstr "Hallinnoi editorin ominaisuusprofiilit" +msgstr "Godotin ominaisuusprofiili" #: editor/editor_feature_profile.cpp msgid "Import Profile(s)" @@ -2252,11 +2252,11 @@ msgstr "Virhe tallennettaessa MeshLibrary resurssia!" #: editor/editor_node.cpp msgid "Can't load TileSet for merging!" -msgstr "Ei voida ladata ruutuvalikoimaa yhdistämistä varten!" +msgstr "Ei voida ladata laattavalikoimaa yhdistämistä varten!" #: editor/editor_node.cpp msgid "Error saving TileSet!" -msgstr "Virhe tallennettaessa ruutuvalikoimaa!" +msgstr "Virhe tallennettaessa laattavalikoimaa!" #: editor/editor_node.cpp msgid "Error trying to save layout!" @@ -2401,7 +2401,7 @@ msgstr "Tätä toimintoa ei voida suorittaa ilman juurisolmua." #: editor/editor_node.cpp msgid "Export Tile Set" -msgstr "Vie ruutuvalikoima" +msgstr "Vie laattavalikoima" #: editor/editor_node.cpp msgid "This operation can't be done without a selected node." @@ -2690,7 +2690,7 @@ msgstr "Mesh-kirjastoksi..." #: editor/editor_node.cpp msgid "TileSet..." -msgstr "Ruutuvalikoimaksi..." +msgstr "Laattavalikoimaksi..." #: editor/editor_node.cpp editor/plugins/script_text_editor.cpp #: scene/gui/line_edit.cpp scene/gui/text_edit.cpp @@ -3948,6 +3948,11 @@ msgid "Saving..." msgstr "Tallennetaan..." #: editor/import_dock.cpp +#, fuzzy +msgid "%d Files" +msgstr " Tiedostot" + +#: editor/import_dock.cpp msgid "Set as Default for '%s'" msgstr "Aseta oletus valinnalle '%s'" @@ -3956,10 +3961,6 @@ msgid "Clear Default for '%s'" msgstr "Poista oletus valinnalta '%s'" #: editor/import_dock.cpp -msgid " Files" -msgstr " Tiedostot" - -#: editor/import_dock.cpp msgid "Import As:" msgstr "Tuo nimellä:" @@ -5192,11 +5193,11 @@ msgstr "" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Top Left" -msgstr "Vasemmassa yläkulmassa" +msgstr "Ylävasen" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Top Right" -msgstr "Oikeassa yläkulmassa" +msgstr "Yläoikea" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Bottom Right" @@ -5228,27 +5229,27 @@ msgstr "Keskitä" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Left Wide" -msgstr "Vasen näkymä" +msgstr "Laaja vasemmalla" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Top Wide" -msgstr "Ylänäkymä" +msgstr "Laaja ylhäällä" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Right Wide" -msgstr "Oikea näkymä" +msgstr "Laaja oikealla" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Bottom Wide" -msgstr "Alanäkymä" +msgstr "Laaja alhaalla" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "VCenter Wide" -msgstr "Pystykeskitetty laaja" +msgstr "Vaakakeskitetty laaja" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "HCenter Wide" -msgstr "Vaakakeskitetty laaja" +msgstr "Pystykeskitetty laaja" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Full Rect" @@ -5256,7 +5257,7 @@ msgstr "Täysi ruutu" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Keep Ratio" -msgstr "Skaalaussuhde" +msgstr "Säilytä suhde" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Anchors only" @@ -5835,12 +5836,12 @@ msgid "Mesh is empty!" msgstr "Mesh on tyhjä!" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Trimesh Body" -msgstr "Luo konkaavi staattinen kappale" +msgid "Couldn't create a Trimesh collision shape." +msgstr "Ei voitu luoda konkaavia törmäysmuotoa." #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Convex Body" -msgstr "Luo konveksi staattinen kappale" +msgid "Create Static Trimesh Body" +msgstr "Luo konkaavi staattinen kappale" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "This doesn't work on scene root!" @@ -5851,12 +5852,28 @@ msgid "Create Trimesh Static Shape" msgstr "Luo staattinen konkaavi muoto" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Failed creating shapes!" -msgstr "Muotojen luonti epäonnistui!" +msgid "Can't create a single convex collision shape for the scene root." +msgstr "Ei voida luoda yksittäistä konveksia törmäysmuotoa skenen juurelle." #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Convex Shape(s)" -msgstr "Luo konvekseja muotoja" +msgid "Couldn't create a single convex collision shape." +msgstr "Ei voitu luoda yksittäistä konveksia törmäysmuotoa." + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Single Convex Shape" +msgstr "Luo yksittäinen konveksi muoto" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Can't create multiple convex collision shapes for the scene root." +msgstr "Ei voi luoda useata konveksia törmäysmuotoa skenen juurelle." + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Couldn't create any collision shapes." +msgstr "Yhtään törmäysmuotoa ei voitu luoda." + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Multiple Convex Shapes" +msgstr "Luo useita konvekseja muotoja" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Navigation Mesh" @@ -5907,18 +5924,68 @@ msgid "Create Trimesh Static Body" msgstr "Luo konkaavi staattinen kappale" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a StaticBody and assigns a polygon-based collision shape to it " +"automatically.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" +"Luo StaticBody solmun ja asettaa sille automaattisesti polygonipohjaisen " +"törmäysmuodon.\n" +"Tämä on tarkin (mutta hitain) vaihtoehto törmäystunnistukselle." + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Trimesh Collision Sibling" msgstr "Luo konkaavi törmäysmuoto sisareksi" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Convex Collision Sibling(s)" -msgstr "Luo konvekseja törmäysmuotoja sisariksi" +msgid "" +"Creates a polygon-based collision shape.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" +"Luo polygonipohjaisen törmäysmuodon.\n" +"Tämä on tarkin (mutta hitain) vaihtoehto törmäystunnistukselle." + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Single Convex Collision Siblings" +msgstr "Luo yksittäisen konveksin törmäysmuodon sisaret" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a single convex collision shape.\n" +"This is the fastest (but least accurate) option for collision detection." +msgstr "" +"Luo yksittäisen konveksin törmäysmuodon.\n" +"Tämä on nopein (mutta epätarkin) vaihtoehto törmäystunnistukselle." + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Multiple Convex Collision Siblings" +msgstr "Luo useita konvekseja törmäysmuotojen sisaria" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is a performance middle-ground between the two above options." +msgstr "" +"Luo polygonipohjaisen törmäysmuodon.\n" +"Tämä on suorituskyvyltään välimaastoa kahdelle yllä olevalle vaihtoehdolle." #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Outline Mesh..." msgstr "Luo ääriviivoista Mesh..." #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a static outline mesh. The outline mesh will have its normals " +"flipped automatically.\n" +"This can be used instead of the SpatialMaterial Grow property when using " +"that property isn't possible." +msgstr "" +"Luo staattisen ääriviiva-meshin. Ääriviiva-meshin normaalit on käännetty " +"automaattisesti.\n" +"Tätä voidaan käyttää SpatialMaterial Grow ominaisuuden sijaan silloin, kun " +"tuon ominaisuuden käyttäminen ei ole mahdollista." + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "View UV1" msgstr "Näytä UV1" @@ -6599,7 +6666,8 @@ msgstr "Skriptiä ei voi saada suorittamista varten." #: editor/plugins/script_editor_plugin.cpp msgid "Script failed reloading, check console for errors." -msgstr "Skriptin lataus epäonnistui. Tarkista konsolissa virheiden varalta." +msgstr "" +"Skriptin uudelleenlataus epäonnistui, tarkista konsoli virheiden varalta." #: editor/plugins/script_editor_plugin.cpp msgid "Script is not in tool mode, will not be able to run." @@ -6609,8 +6677,8 @@ msgstr "Skripti ei ole työkalutilassa, sitä ei voi suorittaa." msgid "" "To run this script, it must inherit EditorScript and be set to tool mode." msgstr "" -"Tämän skriptin suorittamiseksi sen on perittävä EditorScript ja asetettava " -"se työkalutilaan." +"Tämän skriptin suorittamiseksi sen on perittävä EditorScript ja olla " +"asetettu työkalutilaan." #: editor/plugins/script_editor_plugin.cpp msgid "Import Theme" @@ -7915,7 +7983,7 @@ msgstr "Tyhjennä valittu alue" #: editor/plugins/tile_map_editor_plugin.cpp msgid "Fix Invalid Tiles" -msgstr "Korjaa virheelliset ruudut" +msgstr "Korjaa virheelliset laatat" #: editor/plugins/tile_map_editor_plugin.cpp #: modules/gridmap/grid_map_editor_plugin.cpp @@ -7924,7 +7992,7 @@ msgstr "Leikkaa valinta" #: editor/plugins/tile_map_editor_plugin.cpp msgid "Paint TileMap" -msgstr "Täytä ruudukko" +msgstr "Täytä laattakartta" #: editor/plugins/tile_map_editor_plugin.cpp msgid "Line Draw" @@ -7940,11 +8008,11 @@ msgstr "Täyttö" #: editor/plugins/tile_map_editor_plugin.cpp msgid "Erase TileMap" -msgstr "Tyhjennä ruudukko" +msgstr "Tyhjennä laattakartta" #: editor/plugins/tile_map_editor_plugin.cpp msgid "Find Tile" -msgstr "Etsi ruutu" +msgstr "Etsi laatta" #: editor/plugins/tile_map_editor_plugin.cpp msgid "Transpose" @@ -7952,7 +8020,7 @@ msgstr "Transponoi" #: editor/plugins/tile_map_editor_plugin.cpp msgid "Disable Autotile" -msgstr "Poista automaattiruudutus käytöstä" +msgstr "Poista automaattilaatoitus käytöstä" #: editor/plugins/tile_map_editor_plugin.cpp msgid "Enable Priority" @@ -7960,17 +8028,17 @@ msgstr "Ota prioriteetti käyttöön" #: editor/plugins/tile_map_editor_plugin.cpp msgid "Filter tiles" -msgstr "Suodata ruutuja" +msgstr "Suodata laattoja" #: editor/plugins/tile_map_editor_plugin.cpp msgid "Give a TileSet resource to this TileMap to use its tiles." msgstr "" -"Anna tälle ruutukartalle (TileMap) ruutuvalikoimaresurssi (TileSet) " -"käyttääksesi sen ruutuja." +"Anna tälle laattakartalle (TileMap) laattavalikoimaresurssi (TileSet) " +"käyttääksesi sen laattoja." #: editor/plugins/tile_map_editor_plugin.cpp msgid "Paint Tile" -msgstr "Maalaa ruutu" +msgstr "Maalaa laatta" #: editor/plugins/tile_map_editor_plugin.cpp msgid "" @@ -7982,7 +8050,7 @@ msgstr "" #: editor/plugins/tile_map_editor_plugin.cpp msgid "Pick Tile" -msgstr "Poimi ruutu" +msgstr "Poimi laatta" #: editor/plugins/tile_map_editor_plugin.cpp msgid "Rotate Left" @@ -8006,11 +8074,11 @@ msgstr "Tyhjennä muunnos" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Add Texture(s) to TileSet." -msgstr "Lisää tekstuurit ruutuvalikoimaan." +msgstr "Lisää tekstuurit laattavalikoimaan." #: editor/plugins/tile_set_editor_plugin.cpp msgid "Remove selected Texture from TileSet." -msgstr "Poista valittu tekstuuri ruutuvalikoimasta." +msgstr "Poista valittu tekstuuri laattavalikoimasta." #: editor/plugins/tile_set_editor_plugin.cpp msgid "Create from Scene" @@ -8038,7 +8106,7 @@ msgstr "Seuraava koordinaatti" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Select the next shape, subtile, or Tile." -msgstr "Valitse seuraava muoto, aliruutu tai ruutu." +msgstr "Valitse seuraava muoto, alilaatta tai laatta." #: editor/plugins/tile_set_editor_plugin.cpp msgid "Previous Coordinate" @@ -8046,7 +8114,7 @@ msgstr "Edellinen koordinaatti" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Select the previous shape, subtile, or Tile." -msgstr "Valitse edellinen muoto, aliruutu tai ruutu." +msgstr "Valitse edellinen muoto, alilaatta tai laatta." #: editor/plugins/tile_set_editor_plugin.cpp msgid "Region" @@ -8058,11 +8126,11 @@ msgstr "Törmäys" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Occlusion" -msgstr "Peittotila" +msgstr "Peitto" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Navigation" -msgstr "Siirtymistila" +msgstr "Siirtyminen" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Bitmask" @@ -8138,19 +8206,19 @@ msgstr "Aseta tarttuminen ja näytä ruudukko (muokattavissa Tarkastelussa)." #: editor/plugins/tile_set_editor_plugin.cpp msgid "Display Tile Names (Hold Alt Key)" -msgstr "Näytä ruutujen nimet (pidä Alt-näppäin pohjassa)" +msgstr "Näytä laattojen nimet (pidä Alt-näppäin pohjassa)" #: editor/plugins/tile_set_editor_plugin.cpp msgid "" "Add or select a texture on the left panel to edit the tiles bound to it." msgstr "" "Lisää tai valitse tekstuuri vasemmasta paneelista muokataksesi siihen " -"sidottuja ruutuja." +"sidottuja laattoja." #: editor/plugins/tile_set_editor_plugin.cpp msgid "Remove selected texture? This will remove all tiles which use it." msgstr "" -"Poista valittu tekstuuri? Tämä poistaa kaikki ruudut, jotka käyttävät sitä." +"Poista valittu tekstuuri? Tämä poistaa kaikki laatat, jotka käyttävät sitä." #: editor/plugins/tile_set_editor_plugin.cpp msgid "You haven't selected a texture to remove." @@ -8158,7 +8226,7 @@ msgstr "Et ole valinnut poistettavaa tekstuuria." #: editor/plugins/tile_set_editor_plugin.cpp msgid "Create from scene? This will overwrite all current tiles." -msgstr "Luo skenestä? Tämä ylikirjoittaa kaikki nykyiset ruudut." +msgstr "Luo skenestä? Tämä ylikirjoittaa kaikki nykyiset laatat." #: editor/plugins/tile_set_editor_plugin.cpp msgid "Merge from scene?" @@ -8178,7 +8246,7 @@ msgid "" "Click on another Tile to edit it." msgstr "" "Vedä kahvoja muokataksesi suorakulmiota.\n" -"Napsauta toista ruutua muokataksesi sitä." +"Napsauta toista laattaa muokataksesi sitä." #: editor/plugins/tile_set_editor_plugin.cpp msgid "Delete selected Rect." @@ -8189,8 +8257,8 @@ msgid "" "Select current edited sub-tile.\n" "Click on another Tile to edit it." msgstr "" -"Valitse muokattavana oleva aliruutu.\n" -"Napsauta toista ruutua muokataksesi sitä." +"Valitse muokattavana oleva alilaatta.\n" +"Napsauta toista laattaa muokataksesi sitä." #: editor/plugins/tile_set_editor_plugin.cpp msgid "Delete polygon." @@ -8206,7 +8274,7 @@ msgstr "" "Hiiren vasen: aseta bitti päälle.\n" "Hiiren oikea: aseta bitti pois päältä.\n" "Shift+Hiiren vasen: aseta jokeribitti.\n" -"Napsauta toista ruutua muokataksesi sitä." +"Napsauta toista laattaa muokataksesi sitä." #: editor/plugins/tile_set_editor_plugin.cpp msgid "" @@ -8214,41 +8282,41 @@ msgid "" "bindings.\n" "Click on another Tile to edit it." msgstr "" -"Valitse aliruutu, jota käytetään ikonina ja myös virheellisten " -"automaattiruudutusten ilmaisemiseen.\n" -"Napsauta toista ruutua muokataksesi sitä." +"Valitse alilaatta, jota käytetään ikonina ja myös virheellisten " +"automaattilaatoitusten ilmaisemiseen.\n" +"Napsauta toista laattaa muokataksesi sitä." #: editor/plugins/tile_set_editor_plugin.cpp msgid "" "Select sub-tile to change its priority.\n" "Click on another Tile to edit it." msgstr "" -"Valitse aliruutu muuttaaksesi sen tärkeyttä.\n" -"Napsauta toista ruutua muokataksesi sitä." +"Valitse alilaatta muuttaaksesi sen tärkeyttä.\n" +"Napsauta toista laattaa muokataksesi sitä." #: editor/plugins/tile_set_editor_plugin.cpp msgid "" "Select sub-tile to change its z index.\n" "Click on another Tile to edit it." msgstr "" -"Valitse aliruutu muuttaaksesi sen z-järjestystä.\n" -"Napsauta toista ruutua muokataksesi sitä." +"Valitse alilaatta muuttaaksesi sen z-järjestystä.\n" +"Napsauta toista laattaa muokataksesi sitä." #: editor/plugins/tile_set_editor_plugin.cpp msgid "Set Tile Region" -msgstr "Aseta ruudun alue" +msgstr "Aseta laatan alue" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Create Tile" -msgstr "Luo ruutu" +msgstr "Luo laatta" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Set Tile Icon" -msgstr "Aseta ruudun ikoni" +msgstr "Aseta laatan ikoni" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Edit Tile Bitmask" -msgstr "Muokkaa ruudun bittimaskia" +msgstr "Muokkaa laatan bittimaskia" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Edit Collision Polygon" @@ -8264,11 +8332,11 @@ msgstr "Muokkaa navigointipolygonia" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Paste Tile Bitmask" -msgstr "Liitä ruudun bittimaski" +msgstr "Liitä laatan bittimaski" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Clear Tile Bitmask" -msgstr "Tyhjennä ruudun bittimaski" +msgstr "Tyhjennä laatan bittimaski" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Make Polygon Concave" @@ -8280,7 +8348,7 @@ msgstr "Tee polygonista konveksi" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Remove Tile" -msgstr "Poista ruutu" +msgstr "Poista laatta" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Remove Collision Polygon" @@ -8296,11 +8364,11 @@ msgstr "Poista navigointipolygoni" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Edit Tile Priority" -msgstr "Muokkaa ruudun prioriteettia" +msgstr "Muokkaa laatan prioriteettia" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Edit Tile Z Index" -msgstr "Muokkaa ruudun Z-indeksiä" +msgstr "Muokkaa laatan Z-indeksiä" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Make Convex" @@ -8324,13 +8392,13 @@ msgstr "Tätä ominaisuutta ei voi muuttaa." #: editor/plugins/tile_set_editor_plugin.cpp msgid "TileSet" -msgstr "Ruutuvalikoima" +msgstr "Laattavalikoima" #: editor/plugins/version_control_editor_plugin.cpp msgid "No VCS addons are available." msgstr "VCS-lisäosia ei ole saatavilla." -#: editor/plugins/version_control_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/version_control_editor_plugin.cpp msgid "Error" msgstr "Virhe" @@ -9480,7 +9548,7 @@ msgstr "ZIP-tiedosto" #: editor/project_export.cpp msgid "Godot Game Pack" -msgstr "Godot-peli paketti" +msgstr "Godot-pelipaketti" #: editor/project_export.cpp msgid "Export templates for this platform are missing:" @@ -9495,13 +9563,18 @@ msgid "Export With Debug" msgstr "Vie debugaten" #: editor/project_manager.cpp -msgid "The path does not exist." -msgstr "Polkua ei ole olemassa." +msgid "The path specified doesn't exist." +msgstr "Määritelty polku ei ole olemassa." + +#: editor/project_manager.cpp +msgid "Error opening package file (it's not in ZIP format)." +msgstr "Virhe avattaessa pakettitiedostoa (se ei ole ZIP-muodossa)." #: editor/project_manager.cpp -msgid "Invalid '.zip' project file, does not contain a 'project.godot' file." +msgid "" +"Invalid \".zip\" project file; it doesn't contain a \"project.godot\" file." msgstr "" -"Virheellinen '.zip' projektitiedosto; se ei sisällä 'project.godot' " +"Virheellinen \".zip\" projektitiedosto; se ei sisällä \"project.godot\" " "tiedostoa." #: editor/project_manager.cpp @@ -9509,12 +9582,12 @@ msgid "Please choose an empty folder." msgstr "Ole hyvä ja valitse tyhjä kansio." #: editor/project_manager.cpp -msgid "Please choose a 'project.godot' or '.zip' file." -msgstr "Ole hyvä ja valitse 'project.godot' tai '.zip' tiedosto." +msgid "Please choose a \"project.godot\" or \".zip\" file." +msgstr "Ole hyvä ja valitse \"project.godot\"- tai \".zip\"-tiedosto." #: editor/project_manager.cpp -msgid "Directory already contains a Godot project." -msgstr "Hakemisto sisältää jo Godot-projektin." +msgid "This directory already contains a Godot project." +msgstr "Tämä hakemisto sisältää jo Godot-projektin." #: editor/project_manager.cpp msgid "New Game Project" @@ -10209,6 +10282,10 @@ msgid "Suffix" msgstr "Pääte" #: editor/rename_dialog.cpp +msgid "Use Regular Expressions" +msgstr "Käytä säännöllisiä lausekkeita" + +#: editor/rename_dialog.cpp msgid "Advanced Options" msgstr "Edistyneet asetukset" @@ -10245,7 +10322,7 @@ msgstr "" "Vertaa laskurin valintoja." #: editor/rename_dialog.cpp -msgid "Per Level counter" +msgid "Per-level Counter" msgstr "Per taso -laskuri" #: editor/rename_dialog.cpp @@ -10277,10 +10354,6 @@ msgstr "" "Puuttuvat numeromerkit täytetään edeltävillä nollilla." #: editor/rename_dialog.cpp -msgid "Regular Expressions" -msgstr "Säännölliset lausekkeet" - -#: editor/rename_dialog.cpp msgid "Post-Process" msgstr "Jälkikäsittely" @@ -10289,12 +10362,12 @@ msgid "Keep" msgstr "Pidä" #: editor/rename_dialog.cpp -msgid "CamelCase to under_scored" -msgstr "CamelCase ala_viivoiksi" +msgid "PascalCase to snake_case" +msgstr "PascalCase ala_viivoiksi" #: editor/rename_dialog.cpp -msgid "under_scored to CamelCase" -msgstr "ala_viivat CamelCaseksi" +msgid "snake_case to PascalCase" +msgstr "ala_viivat PascalCaseksi" #: editor/rename_dialog.cpp msgid "Case" @@ -10312,6 +10385,14 @@ msgstr "Isoiksi kirjaimiksi" msgid "Reset" msgstr "Palauta" +#: editor/rename_dialog.cpp +msgid "Regular Expression Error" +msgstr "Säännöllisen lausekkeen virhe" + +#: editor/rename_dialog.cpp +msgid "At character %s" +msgstr "Merkissä %s" + #: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp msgid "Reparent Node" msgstr "Vaihda solmun isäntää" @@ -10778,8 +10859,8 @@ msgid "Invalid inherited parent name or path." msgstr "Virheellinen peritty isännän nimi tai polku." #: editor/script_create_dialog.cpp -msgid "Script is valid." -msgstr "Skripti kelpaa." +msgid "Script path/name is valid." +msgstr "Skriptin polku/nimi kelpaa." #: editor/script_create_dialog.cpp msgid "Allowed: a-z, A-Z, 0-9, _ and ." @@ -10870,6 +10951,10 @@ msgid "Copy Error" msgstr "Kopioi virhe" #: editor/script_editor_debugger.cpp +msgid "Video RAM" +msgstr "Näyttömuisti" + +#: editor/script_editor_debugger.cpp msgid "Skip Breakpoints" msgstr "Sivuuta keskeytyskohdat" @@ -10918,10 +11003,6 @@ msgid "Total:" msgstr "Yhteensä:" #: editor/script_editor_debugger.cpp -msgid "Video Mem" -msgstr "Näyttömuisti" - -#: editor/script_editor_debugger.cpp msgid "Resource Path" msgstr "Resurssipolku" @@ -12157,7 +12238,7 @@ msgid "" "to. Please use it as a child of Area2D, StaticBody2D, RigidBody2D, " "KinematicBody2D, etc. to give them a shape." msgstr "" -"TileMap, jolla on \"Use Parent on\", tarvitsee CollisionObject2D " +"Laattakartta, jolla on \"Use Parent\" käytössä, tarvitsee CollisionObject2D " "isäntäsolmun, jolle voi antaa muotoja. Käytä sitä ainoastaan Area2D, " "StaticBody2D, RigidBody2D, KinematicBody2D, jne. alla antaaksesi niille " "muodon." @@ -12603,6 +12684,15 @@ msgstr "Varying tyypin voi sijoittaa vain vertex-funktiossa." msgid "Constants cannot be modified." msgstr "Vakioita ei voi muokata." +#~ msgid "Replaced %d occurrence(s)." +#~ msgstr "Korvattu %d osuvuutta." + +#~ msgid "Create Static Convex Body" +#~ msgstr "Luo konveksi staattinen kappale" + +#~ msgid "Failed creating shapes!" +#~ msgstr "Muotojen luonti epäonnistui!" + #~ msgid "" #~ "There are currently no tutorials for this class, you can [color=$color]" #~ "[url=$url]contribute one[/url][/color] or [color=$color][url=" diff --git a/editor/translations/fil.po b/editor/translations/fil.po index c8a2a20684..9616bfc1be 100644 --- a/editor/translations/fil.po +++ b/editor/translations/fil.po @@ -673,8 +673,9 @@ msgid "Line Number:" msgstr "" #: editor/code_editor.cpp -msgid "Replaced %d occurrence(s)." -msgstr "" +#, fuzzy +msgid "%d replaced." +msgstr "Palitan" #: editor/code_editor.cpp editor/editor_help.cpp msgid "%d match." @@ -3812,15 +3813,15 @@ msgid "Saving..." msgstr "" #: editor/import_dock.cpp -msgid "Set as Default for '%s'" +msgid "%d Files" msgstr "" #: editor/import_dock.cpp -msgid "Clear Default for '%s'" +msgid "Set as Default for '%s'" msgstr "" #: editor/import_dock.cpp -msgid " Files" +msgid "Clear Default for '%s'" msgstr "" #: editor/import_dock.cpp @@ -5653,11 +5654,11 @@ msgid "Mesh is empty!" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Trimesh Body" +msgid "Couldn't create a Trimesh collision shape." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Convex Body" +msgid "Create Static Trimesh Body" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -5669,11 +5670,27 @@ msgid "Create Trimesh Static Shape" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Failed creating shapes!" +msgid "Can't create a single convex collision shape for the scene root." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Couldn't create a single convex collision shape." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Single Convex Shape" +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Can't create multiple convex collision shapes for the scene root." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Convex Shape(s)" +msgid "Couldn't create any collision shapes." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Multiple Convex Shapes" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -5725,11 +5742,40 @@ msgid "Create Trimesh Static Body" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a StaticBody and assigns a polygon-based collision shape to it " +"automatically.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Trimesh Collision Sibling" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Convex Collision Sibling(s)" +msgid "" +"Creates a polygon-based collision shape.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Single Convex Collision Siblings" +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a single convex collision shape.\n" +"This is the fastest (but least accurate) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Multiple Convex Collision Siblings" +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is a performance middle-ground between the two above options." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -5737,6 +5783,14 @@ msgid "Create Outline Mesh..." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a static outline mesh. The outline mesh will have its normals " +"flipped automatically.\n" +"This can be used instead of the SpatialMaterial Grow property when using " +"that property isn't possible." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "View UV1" msgstr "" @@ -8103,7 +8157,7 @@ msgstr "" msgid "No VCS addons are available." msgstr "" -#: editor/plugins/version_control_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/version_control_editor_plugin.cpp msgid "Error" msgstr "" @@ -9189,11 +9243,16 @@ msgid "Export With Debug" msgstr "" #: editor/project_manager.cpp -msgid "The path does not exist." +msgid "The path specified doesn't exist." +msgstr "" + +#: editor/project_manager.cpp +msgid "Error opening package file (it's not in ZIP format)." msgstr "" #: editor/project_manager.cpp -msgid "Invalid '.zip' project file, does not contain a 'project.godot' file." +msgid "" +"Invalid \".zip\" project file; it doesn't contain a \"project.godot\" file." msgstr "" #: editor/project_manager.cpp @@ -9201,11 +9260,11 @@ msgid "Please choose an empty folder." msgstr "" #: editor/project_manager.cpp -msgid "Please choose a 'project.godot' or '.zip' file." +msgid "Please choose a \"project.godot\" or \".zip\" file." msgstr "" #: editor/project_manager.cpp -msgid "Directory already contains a Godot project." +msgid "This directory already contains a Godot project." msgstr "" #: editor/project_manager.cpp @@ -9851,6 +9910,10 @@ msgid "Suffix" msgstr "" #: editor/rename_dialog.cpp +msgid "Use Regular Expressions" +msgstr "" + +#: editor/rename_dialog.cpp msgid "Advanced Options" msgstr "" @@ -9885,7 +9948,7 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -msgid "Per Level counter" +msgid "Per-level Counter" msgstr "" #: editor/rename_dialog.cpp @@ -9915,10 +9978,6 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -msgid "Regular Expressions" -msgstr "" - -#: editor/rename_dialog.cpp msgid "Post-Process" msgstr "" @@ -9927,11 +9986,11 @@ msgid "Keep" msgstr "" #: editor/rename_dialog.cpp -msgid "CamelCase to under_scored" +msgid "PascalCase to snake_case" msgstr "" #: editor/rename_dialog.cpp -msgid "under_scored to CamelCase" +msgid "snake_case to PascalCase" msgstr "" #: editor/rename_dialog.cpp @@ -9950,6 +10009,14 @@ msgstr "" msgid "Reset" msgstr "" +#: editor/rename_dialog.cpp +msgid "Regular Expression Error" +msgstr "" + +#: editor/rename_dialog.cpp +msgid "At character %s" +msgstr "" + #: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp msgid "Reparent Node" msgstr "" @@ -10389,7 +10456,7 @@ msgid "Invalid inherited parent name or path." msgstr "" #: editor/script_create_dialog.cpp -msgid "Script is valid." +msgid "Script path/name is valid." msgstr "" #: editor/script_create_dialog.cpp @@ -10482,6 +10549,10 @@ msgid "Copy Error" msgstr "" #: editor/script_editor_debugger.cpp +msgid "Video RAM" +msgstr "" + +#: editor/script_editor_debugger.cpp msgid "Skip Breakpoints" msgstr "" @@ -10530,10 +10601,6 @@ msgid "Total:" msgstr "" #: editor/script_editor_debugger.cpp -msgid "Video Mem" -msgstr "" - -#: editor/script_editor_debugger.cpp msgid "Resource Path" msgstr "" diff --git a/editor/translations/fr.po b/editor/translations/fr.po index c92a8d3bb0..8cbba6643c 100644 --- a/editor/translations/fr.po +++ b/editor/translations/fr.po @@ -69,12 +69,13 @@ # Sofiane <Sofiane-77@caramail.fr>, 2019. # Camille Mohr-Daurat <pouleyketchoup@gmail.com>, 2019. # Pierre Stempin <pierre.stempin@gmail.com>, 2019. +# Pierre Caye <pierrecaye@laposte.net>, 2020. msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2020-01-16 22:32+0000\n" -"Last-Translator: Rémi Verschelde <akien@godotengine.org>\n" +"PO-Revision-Date: 2020-02-18 15:09+0000\n" +"Last-Translator: Pierre Caye <pierrecaye@laposte.net>\n" "Language-Team: French <https://hosted.weblate.org/projects/godot-engine/" "godot/fr/>\n" "Language: fr\n" @@ -82,7 +83,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 3.10.2-dev\n" +"X-Generator: Weblate 3.11\n" #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/visual_script/visual_script_builtin_funcs.cpp @@ -92,7 +93,7 @@ msgstr "" #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp msgid "Expected a string of length 1 (a character)." -msgstr "Attendu une chaîne de longueur 1 (un caractère)." +msgstr "Attendu chaîne de longueur 1 (un caractère)." #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/mono/glue/gd_glue.cpp @@ -759,8 +760,8 @@ msgid "Line Number:" msgstr "Numéro de ligne :" #: editor/code_editor.cpp -msgid "Replaced %d occurrence(s)." -msgstr "%d occurrence(s) remplacée(s)." +msgid "%d replaced." +msgstr "%d remplacé." #: editor/code_editor.cpp editor/editor_help.cpp msgid "%d match." @@ -4056,6 +4057,10 @@ msgid "Saving..." msgstr "Enregistrement…" #: editor/import_dock.cpp +msgid "%d Files" +msgstr "%d fichiers" + +#: editor/import_dock.cpp msgid "Set as Default for '%s'" msgstr "Définir comme défaut pour « %s »" @@ -4064,10 +4069,6 @@ msgid "Clear Default for '%s'" msgstr "Effacer le préréglage par défaut pour « %s »" #: editor/import_dock.cpp -msgid " Files" -msgstr " Fichiers" - -#: editor/import_dock.cpp msgid "Import As:" msgstr "Importer comme :" @@ -5951,12 +5952,12 @@ msgid "Mesh is empty!" msgstr "Le maillage est vide !" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Trimesh Body" -msgstr "Créer un corps statique de type Trimesh" +msgid "Couldn't create a Trimesh collision shape." +msgstr "Impossible de créer une forme de collision Trimesh." #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Convex Body" -msgstr "Créer corps convexe statique" +msgid "Create Static Trimesh Body" +msgstr "Créer un corps statique de type Trimesh" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "This doesn't work on scene root!" @@ -5967,12 +5968,32 @@ msgid "Create Trimesh Static Shape" msgstr "Créer une forme Trimesh statique" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Failed creating shapes!" -msgstr "Échec de la création de formes !" +msgid "Can't create a single convex collision shape for the scene root." +msgstr "" +"Impossible de créer une forme de collision convexe unique pour la racine de " +"la scène." + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Couldn't create a single convex collision shape." +msgstr "Impossible de créer une forme de collision convexe unique." + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Single Convex Shape" +msgstr "Créer une forme convexe unique" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Can't create multiple convex collision shapes for the scene root." +msgstr "" +"Impossible de créer des formes de collision convexes multiples pour la " +"racine de la scène." + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Couldn't create any collision shapes." +msgstr "Impossible de créer des formes de collision." #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Convex Shape(s)" -msgstr "Créer une(des) forme(s) convexe(s)" +msgid "Create Multiple Convex Shapes" +msgstr "Créer des formes convexes multiples" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Navigation Mesh" @@ -6026,18 +6047,71 @@ msgid "Create Trimesh Static Body" msgstr "Créer un corps statique Trimesh" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a StaticBody and assigns a polygon-based collision shape to it " +"automatically.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" +"Crée un StaticBody et lui attribue automatiquement une forme de collision " +"basée sur les polygones.\n" +"C'est l'option la plus précise (mais la plus lente) pour la détection des " +"collisions." + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Trimesh Collision Sibling" msgstr "Créer une collision Trimesh" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Convex Collision Sibling(s)" -msgstr "Créer une(des) collision(s) convexe(s) sÅ“ur(s)" +msgid "" +"Creates a polygon-based collision shape.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" +"Crée une forme de collision basée sur les polygones.\n" +"C'est l'option la plus précise (mais la plus lente) pour la détection des " +"collisions." + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Single Convex Collision Siblings" +msgstr "Créer une(des) collision(s) convexe(s) unique(s) sÅ“ur(s)" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a single convex collision shape.\n" +"This is the fastest (but least accurate) option for collision detection." +msgstr "" +"Crée une forme de collision convexe unique.\n" +"C'est l'option la plus rapide (mais la moins précise) pour la détection des " +"collisions." + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Multiple Convex Collision Siblings" +msgstr "Créer une(des) collision(s) convexe(s) multiple(s) sÅ“ur(s)" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is a performance middle-ground between the two above options." +msgstr "" +"Crée une forme de collision basée sur les polygones.\n" +"Il s'agit d'une performance à mi-chemin entre les deux options ci-dessus." #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Outline Mesh..." msgstr "Créer un maillage de contour…" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a static outline mesh. The outline mesh will have its normals " +"flipped automatically.\n" +"This can be used instead of the SpatialMaterial Grow property when using " +"that property isn't possible." +msgstr "" +"Crée un maillage de contour statique. Le maillage de contour verra ses " +"normales inversées automatiquement.\n" +"Cela peut être utilisé à la place de la propriété SpatialMaterial Grow " +"lorsque l'utilisation de cette propriété n'est pas possible." + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "View UV1" msgstr "Afficher l'UV1" @@ -8460,7 +8534,7 @@ msgstr "TileSet" msgid "No VCS addons are available." msgstr "Aucun addon VCS n'est disponible." -#: editor/plugins/version_control_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/version_control_editor_plugin.cpp msgid "Error" msgstr "Erreur" @@ -9635,26 +9709,32 @@ msgid "Export With Debug" msgstr "Exporter avec debug" #: editor/project_manager.cpp -msgid "The path does not exist." -msgstr "Le chemin vers ce fichier n'existe pas." +msgid "The path specified doesn't exist." +msgstr "Le chemin spécifié n'existe pas." #: editor/project_manager.cpp -msgid "Invalid '.zip' project file, does not contain a 'project.godot' file." +msgid "Error opening package file (it's not in ZIP format)." +msgstr "" +"Erreur lors de l'ouverture du fichier package (il n'est pas au format ZIP)." + +#: editor/project_manager.cpp +msgid "" +"Invalid \".zip\" project file; it doesn't contain a \"project.godot\" file." msgstr "" -"Fichier de projet « .zip » invalide, il ne contient pas de fichier « project." -"godot »." +"Fichier de projet \".zip\" invalide ; il ne contient pas de fichier \"projet." +"godot\"." #: editor/project_manager.cpp msgid "Please choose an empty folder." msgstr "Veuillez choisir un dossier vide." #: editor/project_manager.cpp -msgid "Please choose a 'project.godot' or '.zip' file." -msgstr "Veuillez choisir un fichier « project.godot » ou « .zip »." +msgid "Please choose a \"project.godot\" or \".zip\" file." +msgstr "Veuillez choisir un fichier \"project.godot\" ou \".zip\"." #: editor/project_manager.cpp -msgid "Directory already contains a Godot project." -msgstr "Le répertoire contient déjà un projet Godot." +msgid "This directory already contains a Godot project." +msgstr "Ce répertoire contient déjà un projet Godot." #: editor/project_manager.cpp msgid "New Game Project" @@ -10355,6 +10435,10 @@ msgid "Suffix" msgstr "Suffixe" #: editor/rename_dialog.cpp +msgid "Use Regular Expressions" +msgstr "Utiliser des expressions régulières" + +#: editor/rename_dialog.cpp msgid "Advanced Options" msgstr "Options avancées" @@ -10391,7 +10475,7 @@ msgstr "" "Comparez les options du compteur." #: editor/rename_dialog.cpp -msgid "Per Level counter" +msgid "Per-level Counter" msgstr "Compteur par niveau" #: editor/rename_dialog.cpp @@ -10423,10 +10507,6 @@ msgstr "" "Les chiffres manquants sont complétés par des zéros en tête." #: editor/rename_dialog.cpp -msgid "Regular Expressions" -msgstr "Expressions régulières" - -#: editor/rename_dialog.cpp msgid "Post-Process" msgstr "Post-traitement" @@ -10435,12 +10515,12 @@ msgid "Keep" msgstr "Conserver" #: editor/rename_dialog.cpp -msgid "CamelCase to under_scored" -msgstr "CamelCase vers sous_ligné" +msgid "PascalCase to snake_case" +msgstr "PascalCase vers snake_case" #: editor/rename_dialog.cpp -msgid "under_scored to CamelCase" -msgstr "sous_ligné vers CamelCase" +msgid "snake_case to PascalCase" +msgstr "snake_case vers PascalCase" #: editor/rename_dialog.cpp msgid "Case" @@ -10458,6 +10538,14 @@ msgstr "Convertir en majuscule" msgid "Reset" msgstr "Réinitialiser" +#: editor/rename_dialog.cpp +msgid "Regular Expression Error" +msgstr "Erreur d'expression régulière" + +#: editor/rename_dialog.cpp +msgid "At character %s" +msgstr "À caractère %s" + #: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp msgid "Reparent Node" msgstr "Re-parenter le nÅ“ud" @@ -10922,8 +11010,8 @@ msgid "Invalid inherited parent name or path." msgstr "Nom ou chemin parent hérité invalide." #: editor/script_create_dialog.cpp -msgid "Script is valid." -msgstr "Script valide." +msgid "Script path/name is valid." +msgstr "Le chemin/nom du script est valide." #: editor/script_create_dialog.cpp msgid "Allowed: a-z, A-Z, 0-9, _ and ." @@ -11014,6 +11102,10 @@ msgid "Copy Error" msgstr "Copier l'erreur" #: editor/script_editor_debugger.cpp +msgid "Video RAM" +msgstr "Vidéo RAM" + +#: editor/script_editor_debugger.cpp msgid "Skip Breakpoints" msgstr "Passer les points d'arrêt" @@ -11063,10 +11155,6 @@ msgid "Total:" msgstr "Total :" #: editor/script_editor_debugger.cpp -msgid "Video Mem" -msgstr "Mémoire vidéo" - -#: editor/script_editor_debugger.cpp msgid "Resource Path" msgstr "Chemin de la ressource" @@ -12786,6 +12874,15 @@ msgstr "Les variations ne peuvent être affectées que dans la fonction vertex." msgid "Constants cannot be modified." msgstr "Les constantes ne peuvent être modifiées." +#~ msgid "Replaced %d occurrence(s)." +#~ msgstr "%d occurrence(s) remplacée(s)." + +#~ msgid "Create Static Convex Body" +#~ msgstr "Créer corps convexe statique" + +#~ msgid "Failed creating shapes!" +#~ msgstr "Échec de la création de formes !" + #~ msgid "" #~ "There are currently no tutorials for this class, you can [color=$color]" #~ "[url=$url]contribute one[/url][/color] or [color=$color][url=" diff --git a/editor/translations/ga.po b/editor/translations/ga.po index f1db3d5a78..018d095c92 100644 --- a/editor/translations/ga.po +++ b/editor/translations/ga.po @@ -667,7 +667,7 @@ msgid "Line Number:" msgstr "" #: editor/code_editor.cpp -msgid "Replaced %d occurrence(s)." +msgid "%d replaced." msgstr "" #: editor/code_editor.cpp editor/editor_help.cpp @@ -3807,15 +3807,16 @@ msgid "Saving..." msgstr "" #: editor/import_dock.cpp -msgid "Set as Default for '%s'" -msgstr "" +#, fuzzy +msgid "%d Files" +msgstr "Amharc ar Chomhaid" #: editor/import_dock.cpp -msgid "Clear Default for '%s'" +msgid "Set as Default for '%s'" msgstr "" #: editor/import_dock.cpp -msgid " Files" +msgid "Clear Default for '%s'" msgstr "" #: editor/import_dock.cpp @@ -5647,11 +5648,11 @@ msgid "Mesh is empty!" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Trimesh Body" +msgid "Couldn't create a Trimesh collision shape." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Convex Body" +msgid "Create Static Trimesh Body" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -5663,11 +5664,27 @@ msgid "Create Trimesh Static Shape" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Failed creating shapes!" +msgid "Can't create a single convex collision shape for the scene root." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Couldn't create a single convex collision shape." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Single Convex Shape" +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Can't create multiple convex collision shapes for the scene root." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Convex Shape(s)" +msgid "Couldn't create any collision shapes." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Multiple Convex Shapes" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -5719,11 +5736,40 @@ msgid "Create Trimesh Static Body" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a StaticBody and assigns a polygon-based collision shape to it " +"automatically.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Trimesh Collision Sibling" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Convex Collision Sibling(s)" +msgid "" +"Creates a polygon-based collision shape.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Single Convex Collision Siblings" +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a single convex collision shape.\n" +"This is the fastest (but least accurate) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Multiple Convex Collision Siblings" +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is a performance middle-ground between the two above options." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -5731,6 +5777,14 @@ msgid "Create Outline Mesh..." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a static outline mesh. The outline mesh will have its normals " +"flipped automatically.\n" +"This can be used instead of the SpatialMaterial Grow property when using " +"that property isn't possible." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "View UV1" msgstr "" @@ -8097,7 +8151,7 @@ msgstr "" msgid "No VCS addons are available." msgstr "" -#: editor/plugins/version_control_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/version_control_editor_plugin.cpp msgid "Error" msgstr "" @@ -9184,11 +9238,16 @@ msgid "Export With Debug" msgstr "" #: editor/project_manager.cpp -msgid "The path does not exist." +msgid "The path specified doesn't exist." msgstr "" #: editor/project_manager.cpp -msgid "Invalid '.zip' project file, does not contain a 'project.godot' file." +msgid "Error opening package file (it's not in ZIP format)." +msgstr "" + +#: editor/project_manager.cpp +msgid "" +"Invalid \".zip\" project file; it doesn't contain a \"project.godot\" file." msgstr "" #: editor/project_manager.cpp @@ -9196,11 +9255,11 @@ msgid "Please choose an empty folder." msgstr "" #: editor/project_manager.cpp -msgid "Please choose a 'project.godot' or '.zip' file." +msgid "Please choose a \"project.godot\" or \".zip\" file." msgstr "" #: editor/project_manager.cpp -msgid "Directory already contains a Godot project." +msgid "This directory already contains a Godot project." msgstr "" #: editor/project_manager.cpp @@ -9846,6 +9905,10 @@ msgid "Suffix" msgstr "" #: editor/rename_dialog.cpp +msgid "Use Regular Expressions" +msgstr "" + +#: editor/rename_dialog.cpp msgid "Advanced Options" msgstr "" @@ -9880,7 +9943,7 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -msgid "Per Level counter" +msgid "Per-level Counter" msgstr "" #: editor/rename_dialog.cpp @@ -9910,10 +9973,6 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -msgid "Regular Expressions" -msgstr "" - -#: editor/rename_dialog.cpp msgid "Post-Process" msgstr "" @@ -9922,11 +9981,11 @@ msgid "Keep" msgstr "" #: editor/rename_dialog.cpp -msgid "CamelCase to under_scored" +msgid "PascalCase to snake_case" msgstr "" #: editor/rename_dialog.cpp -msgid "under_scored to CamelCase" +msgid "snake_case to PascalCase" msgstr "" #: editor/rename_dialog.cpp @@ -9945,6 +10004,14 @@ msgstr "" msgid "Reset" msgstr "" +#: editor/rename_dialog.cpp +msgid "Regular Expression Error" +msgstr "" + +#: editor/rename_dialog.cpp +msgid "At character %s" +msgstr "" + #: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp msgid "Reparent Node" msgstr "" @@ -10384,8 +10451,9 @@ msgid "Invalid inherited parent name or path." msgstr "" #: editor/script_create_dialog.cpp -msgid "Script is valid." -msgstr "" +#, fuzzy +msgid "Script path/name is valid." +msgstr "Tá crann beochana bailÃ." #: editor/script_create_dialog.cpp msgid "Allowed: a-z, A-Z, 0-9, _ and ." @@ -10477,6 +10545,10 @@ msgid "Copy Error" msgstr "" #: editor/script_editor_debugger.cpp +msgid "Video RAM" +msgstr "" + +#: editor/script_editor_debugger.cpp msgid "Skip Breakpoints" msgstr "" @@ -10525,10 +10597,6 @@ msgid "Total:" msgstr "" #: editor/script_editor_debugger.cpp -msgid "Video Mem" -msgstr "" - -#: editor/script_editor_debugger.cpp msgid "Resource Path" msgstr "" diff --git a/editor/translations/he.po b/editor/translations/he.po index 6a153b6f11..1aa8c9d306 100644 --- a/editor/translations/he.po +++ b/editor/translations/he.po @@ -721,8 +721,9 @@ msgid "Line Number:" msgstr "מספר השורה:" #: editor/code_editor.cpp -msgid "Replaced %d occurrence(s)." -msgstr "" +#, fuzzy +msgid "%d replaced." +msgstr "החלפה…" #: editor/code_editor.cpp editor/editor_help.cpp msgid "%d match." @@ -4033,6 +4034,11 @@ msgid "Saving..." msgstr "שמירה…" #: editor/import_dock.cpp +#, fuzzy +msgid "%d Files" +msgstr " קבצי×" + +#: editor/import_dock.cpp msgid "Set as Default for '%s'" msgstr "הגדרה כבררת מחדל עבור ‚%s’" @@ -4041,10 +4047,6 @@ msgid "Clear Default for '%s'" msgstr "מחיקת בררת מחדל עבור ‚%s’" #: editor/import_dock.cpp -msgid " Files" -msgstr " קבצי×" - -#: editor/import_dock.cpp msgid "Import As:" msgstr "×™×™×‘×•× ×‘×ª×•×¨:" @@ -5994,11 +5996,11 @@ msgid "Mesh is empty!" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Trimesh Body" +msgid "Couldn't create a Trimesh collision shape." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Convex Body" +msgid "Create Static Trimesh Body" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -6010,12 +6012,30 @@ msgid "Create Trimesh Static Shape" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Failed creating shapes!" +msgid "Can't create a single convex collision shape for the scene root." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Couldn't create a single convex collision shape." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Single Convex Shape" +msgstr "יצירת %s חדש" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Can't create multiple convex collision shapes for the scene root." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp #, fuzzy -msgid "Create Convex Shape(s)" +msgid "Couldn't create any collision shapes." +msgstr "×œ× × ×™×ª×Ÿ ליצור תיקייה." + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Multiple Convex Shapes" msgstr "יצירת %s חדש" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -6067,19 +6087,57 @@ msgid "Create Trimesh Static Body" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a StaticBody and assigns a polygon-based collision shape to it " +"automatically.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Trimesh Collision Sibling" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp #, fuzzy -msgid "Create Convex Collision Sibling(s)" +msgid "Create Single Convex Collision Siblings" msgstr "יצירת מצולע" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a single convex collision shape.\n" +"This is the fastest (but least accurate) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Multiple Convex Collision Siblings" +msgstr "יצירת מצולע" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is a performance middle-ground between the two above options." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Outline Mesh..." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a static outline mesh. The outline mesh will have its normals " +"flipped automatically.\n" +"This can be used instead of the SpatialMaterial Grow property when using " +"that property isn't possible." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "View UV1" msgstr "" @@ -8593,7 +8651,7 @@ msgstr "" msgid "No VCS addons are available." msgstr "" -#: editor/plugins/version_control_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/version_control_editor_plugin.cpp msgid "Error" msgstr "" @@ -9725,11 +9783,18 @@ msgid "Export With Debug" msgstr "" #: editor/project_manager.cpp -msgid "The path does not exist." -msgstr "" +#, fuzzy +msgid "The path specified doesn't exist." +msgstr "הקובץ ×œ× ×§×™×™×." + +#: editor/project_manager.cpp +#, fuzzy +msgid "Error opening package file (it's not in ZIP format)." +msgstr "פתיחת קובץ החבילה × ×›×©×œ×”, ×”×ž×‘× ×” ××™× ×• zip." #: editor/project_manager.cpp -msgid "Invalid '.zip' project file, does not contain a 'project.godot' file." +msgid "" +"Invalid \".zip\" project file; it doesn't contain a \"project.godot\" file." msgstr "" #: editor/project_manager.cpp @@ -9737,11 +9802,11 @@ msgid "Please choose an empty folder." msgstr "" #: editor/project_manager.cpp -msgid "Please choose a 'project.godot' or '.zip' file." +msgid "Please choose a \"project.godot\" or \".zip\" file." msgstr "" #: editor/project_manager.cpp -msgid "Directory already contains a Godot project." +msgid "This directory already contains a Godot project." msgstr "" #: editor/project_manager.cpp @@ -10407,6 +10472,11 @@ msgstr "" #: editor/rename_dialog.cpp #, fuzzy +msgid "Use Regular Expressions" +msgstr "גרסה × ×•×›×—×™×ª:" + +#: editor/rename_dialog.cpp +#, fuzzy msgid "Advanced Options" msgstr "הגדרות הצמדה" @@ -10445,7 +10515,7 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -msgid "Per Level counter" +msgid "Per-level Counter" msgstr "" #: editor/rename_dialog.cpp @@ -10476,10 +10546,6 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -msgid "Regular Expressions" -msgstr "" - -#: editor/rename_dialog.cpp msgid "Post-Process" msgstr "" @@ -10488,11 +10554,11 @@ msgid "Keep" msgstr "" #: editor/rename_dialog.cpp -msgid "CamelCase to under_scored" +msgid "PascalCase to snake_case" msgstr "" #: editor/rename_dialog.cpp -msgid "under_scored to CamelCase" +msgid "snake_case to PascalCase" msgstr "" #: editor/rename_dialog.cpp @@ -10514,6 +10580,15 @@ msgstr "×ותיות גדולות" msgid "Reset" msgstr "×יפוס התקריב" +#: editor/rename_dialog.cpp +msgid "Regular Expression Error" +msgstr "" + +#: editor/rename_dialog.cpp +#, fuzzy +msgid "At character %s" +msgstr "×ª×•×•×™× ×ª×§×¤×™×:" + #: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp msgid "Reparent Node" msgstr "" @@ -10982,7 +11057,7 @@ msgid "Invalid inherited parent name or path." msgstr "×©× ×ž×פיין ×”××™× ×“×§×¡ שגוי." #: editor/script_create_dialog.cpp -msgid "Script is valid." +msgid "Script path/name is valid." msgstr "" #: editor/script_create_dialog.cpp @@ -11088,6 +11163,10 @@ msgid "Copy Error" msgstr "" #: editor/script_editor_debugger.cpp +msgid "Video RAM" +msgstr "" + +#: editor/script_editor_debugger.cpp #, fuzzy msgid "Skip Breakpoints" msgstr "מחיקת × ×§×•×“×•×ª" @@ -11138,10 +11217,6 @@ msgid "Total:" msgstr "" #: editor/script_editor_debugger.cpp -msgid "Video Mem" -msgstr "" - -#: editor/script_editor_debugger.cpp msgid "Resource Path" msgstr "" diff --git a/editor/translations/hi.po b/editor/translations/hi.po index 424a9a6bc1..9278e63fc9 100644 --- a/editor/translations/hi.po +++ b/editor/translations/hi.po @@ -3,7 +3,7 @@ # Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). # This file is distributed under the same license as the Godot source code. # Abhas Kumar Sinha <abhaskumarsinha@gmail.com>, 2017. -# Suryansh5545 <suryanshpathak5545@gmail.com>, 2018. +# Suryansh5545 <suryanshpathak5545@gmail.com>, 2018, 2020. # Vikram1323 <vikram1323@gmail.com>, 2018. # vkubre <v@kubre.in>, 2019. # Abhay Patel <abhay111patel@gmail.com>, 2019. @@ -13,8 +13,8 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2019-11-01 19:50+0000\n" -"Last-Translator: Devashishsingh98 <devashishsingh98@gmail.com>\n" +"PO-Revision-Date: 2020-01-30 03:56+0000\n" +"Last-Translator: Suryansh5545 <suryanshpathak5545@gmail.com>\n" "Language-Team: Hindi <https://hosted.weblate.org/projects/godot-engine/godot/" "hi/>\n" "Language: hi\n" @@ -22,7 +22,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 3.10-dev\n" +"X-Generator: Weblate 3.11-dev\n" #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/visual_script/visual_script_builtin_funcs.cpp @@ -31,17 +31,17 @@ msgstr "कनà¥à¤µà¤°à¥à¤Ÿ करने के लिठअमानà¥à¤¯ à #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp msgid "Expected a string of length 1 (a character)." -msgstr "" +msgstr "लंबाई 1 (à¤à¤• चरितà¥à¤°) की à¤à¤• सà¥à¤Ÿà¥à¤°à¤¿à¤‚ग की उमà¥à¤®à¥€à¤¦ है।" #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: 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 "डीकोडिंग बाइटà¥à¤¸, या अमानà¥à¤¯ पà¥à¤°à¤¾à¤°à¥‚प के लिठपरà¥à¤¯à¤¾à¤ªà¥à¤¤ बाइटà¥à¤¸ नहीं है।" +msgstr "डिकोडिंग बाइट, या अमानà¥à¤¯ पà¥à¤°à¤¾à¤°à¥‚प के लिठपरà¥à¤¯à¤¾à¤ªà¥à¤¤ बाइट नहीं।" #: core/math/expression.cpp msgid "Invalid input %i (not passed) in expression" -msgstr "अà¤à¤¿à¤µà¥à¤¯à¤•à¥à¤¤à¤¿ में अमानà¥à¤¯ इनपà¥à¤Ÿ %i (पारित नहीं)" +msgstr "अà¤à¤¿à¤µà¥à¤¯à¤•à¥à¤¤à¤¿ में अमानà¥à¤¯ इनपà¥à¤Ÿ%i (पारित नहीं)" #: core/math/expression.cpp msgid "self can't be used because instance is null (not passed)" @@ -105,7 +105,7 @@ msgstr "संतà¥à¤²à¤¿à¤¤" #: editor/animation_bezier_editor.cpp msgid "Mirror" -msgstr "पà¥à¤°à¤¤à¤¿à¤®à¤¾" +msgstr "दरà¥à¤ªà¤£" #: editor/animation_bezier_editor.cpp editor/editor_profiler.cpp msgid "Time:" @@ -164,39 +164,33 @@ msgid "Anim Change Call" msgstr "à¤à¤¨à¥€à¤®à¥‡à¤¶à¤¨ परिवरà¥à¤¤à¤¨ बà¥à¤²à¤¾à¤µà¤¾" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Anim Multi Change Keyframe Time" -msgstr "à¤à¤¨à¥€à¤®à¥‡à¤¶à¤¨ परिवरà¥à¤¤à¤¨ निधि" +msgstr "अनीम मलà¥à¤Ÿà¥€ चेंज कीफà¥à¤°à¥‡à¤® टाइम" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Anim Multi Change Transition" -msgstr "à¤à¤¨à¥€à¤®à¥‡à¤¶à¤¨ परिवरà¥à¤¤à¤¨ बà¥à¤²à¤¾à¤µà¤¾" +msgstr "अनीम मलà¥à¤Ÿà¥€ चेंज टà¥à¤°à¤¾à¤‚जिशन" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Anim Multi Change Transform" -msgstr "à¤à¤¨à¥€à¤®à¥‡à¤¶à¤¨ परिवरà¥à¤¤à¤¨ परिणत" +msgstr "अनीम मलà¥à¤Ÿà¥€ चेंज टà¥à¤°à¤¾à¤‚सफॉरà¥à¤®" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Anim Multi Change Keyframe Value" -msgstr "à¤à¤¨à¥€à¤®à¥‡à¤¶à¤¨ मà¥à¤–à¥à¤¯-फ़à¥à¤°à¥‡à¤® मूलà¥à¤¯(Value) बदलें" +msgstr "अनीम मलà¥à¤Ÿà¥€ चेंज कीफà¥à¤°à¥‡à¤® वैलà¥à¤¯à¥‚" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Anim Multi Change Call" -msgstr "à¤à¤¨à¥€à¤®à¥‡à¤¶à¤¨ परिवरà¥à¤¤à¤¨ बà¥à¤²à¤¾à¤µà¤¾" +msgstr "अनीम मलà¥à¤Ÿà¥€ चेंज कॉल" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Change Animation Length" -msgstr "शबà¥à¤¦ बदलें मूलà¥à¤¯" +msgstr "à¤à¤¨à¤¿à¤®à¥‡à¤¶à¤¨ लंबाई बदलें" #: editor/animation_track_editor.cpp #: editor/plugins/sprite_frames_editor_plugin.cpp msgid "Change Animation Loop" -msgstr "" +msgstr "à¤à¤¨à¤¿à¤®à¥‡à¤¶à¤¨ लूप बदलें" #: editor/animation_track_editor.cpp msgid "Property Track" @@ -223,17 +217,14 @@ msgid "Animation Playback Track" msgstr "à¤à¤¨à¤¿à¤®à¥‡à¤¶à¤¨ पà¥à¤²à¥‡à¤¬à¥ˆà¤• टà¥à¤°à¥ˆà¤•" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Animation length (frames)" -msgstr "à¤à¤¨à¤¿à¤®à¥‡à¤¶à¤¨ लंबाई समय (सेकंडà¥à¤¸)" +msgstr "à¤à¤¨à¥€à¤®à¥‡à¤¶à¤¨ लंबाई (फà¥à¤°à¥‡à¤®)" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Animation length (seconds)" -msgstr "à¤à¤¨à¤¿à¤®à¥‡à¤¶à¤¨ लंबाई समय (सेकंडà¥à¤¸)" +msgstr "à¤à¤¨à¤¿à¤®à¥‡à¤¶à¤¨ लंबाई (सेकंड)" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Add Track" msgstr "टà¥à¤°à¥ˆà¤• जोड़ें" @@ -248,122 +239,117 @@ msgstr "कारà¥à¤¯à¥‹à¤‚:" #: editor/animation_track_editor.cpp msgid "Audio Clips:" -msgstr "" +msgstr "ऑडियो कà¥à¤²à¤¿à¤ªà¥à¤¸:" #: editor/animation_track_editor.cpp msgid "Anim Clips:" -msgstr "" +msgstr "अनीम कà¥à¤²à¤¿à¤ªà¥à¤¸:" #: editor/animation_track_editor.cpp msgid "Change Track Path" -msgstr "" +msgstr "टà¥à¤°à¥ˆà¤• पथ बदलें" #: editor/animation_track_editor.cpp msgid "Toggle this track on/off." -msgstr "" +msgstr "इस टà¥à¤°à¥ˆà¤• को ऑन/ऑफ पर टॉगल करें ।" #: editor/animation_track_editor.cpp msgid "Update Mode (How this property is set)" -msgstr "" +msgstr "अपडेट मोड (यह संपतà¥à¤¤à¤¿ कैसे सेट की जाती है)" #: editor/animation_track_editor.cpp msgid "Interpolation Mode" -msgstr "" +msgstr "इंटरपोलेशन मोड" #: editor/animation_track_editor.cpp msgid "Loop Wrap Mode (Interpolate end with beginning on loop)" -msgstr "" +msgstr "लूप रैप मोड (लूप पर शà¥à¤°à¥à¤†à¤¤ के साथ इंटरपोलेट अंत)" #: editor/animation_track_editor.cpp msgid "Remove this track." -msgstr "" +msgstr "इस टà¥à¤°à¥ˆà¤• को हटा दें।" #: editor/animation_track_editor.cpp msgid "Time (s): " -msgstr "" +msgstr "समय (à¤à¤¸): " #: editor/animation_track_editor.cpp msgid "Toggle Track Enabled" -msgstr "" +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 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 msgid "Linear" -msgstr "" +msgstr "रैखिक" #: editor/animation_track_editor.cpp msgid "Cubic" -msgstr "" +msgstr "घन" #: editor/animation_track_editor.cpp msgid "Clamp Loop Interp" -msgstr "" +msgstr "कà¥à¤²à¥ˆà¤‚प लूप इंटरप" #: editor/animation_track_editor.cpp msgid "Wrap Loop Interp" -msgstr "" +msgstr "रैप लूप इंटरप" #: editor/animation_track_editor.cpp #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Insert Key" -msgstr "" +msgstr "कà¥à¤‚जी डालें" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Duplicate Key(s)" -msgstr "पà¥à¤°à¤¤à¤¿à¤²à¤¿à¤ªà¤¿" +msgstr "डà¥à¤ªà¥à¤²à¥€à¤•ेट कà¥à¤‚जी (ओं)" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Delete Key(s)" -msgstr "à¤à¤¨à¥€à¤®à¥‡à¤¶à¤¨ को हटाने के लिठकà¥à¤‚जी" +msgstr "कà¥à¤‚जी को हटाà¤à¤‚" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Change Animation Update Mode" -msgstr "शबà¥à¤¦ बदलें मूलà¥à¤¯" +msgstr "à¤à¤¨à¤¿à¤®à¥‡à¤¶à¤¨ अपडेट मोड बदलें" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Change Animation Interpolation Mode" -msgstr "शबà¥à¤¦ बदलें मूलà¥à¤¯" +msgstr "à¤à¤¨à¤¿à¤®à¥‡à¤¶à¤¨ इंटरपोलेशन मोड बदलें" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Change Animation Loop Mode" -msgstr "à¤à¤¨à¤¿à¤®à¥‡à¤¶à¤¨ लूप" +msgstr "à¤à¤¨à¤¿à¤®à¥‡à¤¶à¤¨ लूप मोड बदलें" #: editor/animation_track_editor.cpp msgid "Remove Anim Track" -msgstr "" +msgstr "अनीम टà¥à¤°à¥ˆà¤• निकालें" #: editor/animation_track_editor.cpp msgid "Create NEW track for %s and insert key?" -msgstr "" +msgstr "% à¤à¤¸ के लिठनया टà¥à¤°à¥ˆà¤• बनाà¤à¤‚ और कà¥à¤‚जी डालें?" #: editor/animation_track_editor.cpp msgid "Create %d NEW tracks and insert keys?" -msgstr "" +msgstr "% D नठटà¥à¤°à¥ˆà¤• बनाà¤à¤‚ और कà¥à¤‚जियाठडालें?" #: editor/animation_track_editor.cpp editor/create_dialog.cpp #: editor/editor_audio_buses.cpp editor/editor_feature_profile.cpp @@ -375,40 +361,39 @@ 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" -msgstr "" +msgstr "अनीम डालें" #: editor/animation_track_editor.cpp msgid "AnimationPlayer can't animate itself, only other players." -msgstr "" +msgstr "à¤à¤¨à¤¿à¤®à¥‡à¤¶à¤¨à¤ªà¥à¤²à¥‡à¤¯à¤° खà¥à¤¦ को चेतन नहीं कर सकता, केवल अनà¥à¤¯ खिलाड़ी।" #: editor/animation_track_editor.cpp msgid "Anim Create & Insert" -msgstr "" +msgstr "अनीम बनाà¤à¤‚ और डालें" #: editor/animation_track_editor.cpp msgid "Anim Insert Track & Key" -msgstr "" +msgstr "अनीम डालें टà¥à¤°à¥ˆà¤• और कà¥à¤‚जी" #: editor/animation_track_editor.cpp msgid "Anim Insert Key" -msgstr "" +msgstr "अनीम डालें कà¥à¤‚जी" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Change Animation Step" -msgstr "शबà¥à¤¦à¤•ोश कà¥à¤‚जी बदलें" +msgstr "à¤à¤¨à¤¿à¤®à¥‡à¤¶à¤¨ सà¥à¤Ÿà¥‡à¤ª बदलें" #: editor/animation_track_editor.cpp msgid "Rearrange Tracks" -msgstr "" +msgstr "पटरियों को पà¥à¤¨à¤°à¥à¤µà¥à¤¯à¤µà¤¸à¥à¤¥à¤¿à¤¤ करें" #: editor/animation_track_editor.cpp msgid "Transform tracks only apply to Spatial-based nodes." -msgstr "" +msgstr "पटरियों को बदलने केवल सà¥à¤¥à¤¾à¤¨à¤¿à¤• आधारित नोडà¥à¤¸ पर लागू होते हैं।" #: editor/animation_track_editor.cpp msgid "" @@ -417,79 +402,79 @@ msgid "" "-AudioStreamPlayer2D\n" "-AudioStreamPlayer3D" msgstr "" +"ऑडियो टà¥à¤°à¥ˆà¤• केवल पà¥à¤°à¤•ार के नोडà¥à¤¸ को इंगित कर सकते हैं:\n" +"-ऑडियोसà¥à¤Ÿà¥à¤°à¥€à¤®à¤ªà¥à¤²à¥‡à¤¯à¤°\n" +"-ऑडियोसà¥à¤Ÿà¥à¤°à¥€à¤®à¤ªà¥à¤²à¥‡à¤¯à¤°2डी\n" +"-ऑडियोसà¥à¤Ÿà¥à¤°à¥€à¤®à¤ªà¥à¤²à¥‡à¤¯à¤°3डी" #: editor/animation_track_editor.cpp msgid "Animation tracks can only point to AnimationPlayer nodes." -msgstr "" +msgstr "à¤à¤¨à¤¿à¤®à¥‡à¤¶à¤¨ टà¥à¤°à¥ˆà¤• केवल à¤à¤¨à¤¿à¤®à¥‡à¤¶à¤¨à¤ªà¥à¤²à¥‡à¤¯à¤° नोडà¥à¤¸ को इंगित कर सकते हैं।" #: editor/animation_track_editor.cpp msgid "An animation player can't animate itself, only other players." -msgstr "" +msgstr "à¤à¤• à¤à¤¨à¥€à¤®à¥‡à¤¶à¤¨ खिलाड़ी खà¥à¤¦ को चेतन नहीं कर सकता, केवल अनà¥à¤¯ खिलाड़ी।" #: editor/animation_track_editor.cpp msgid "Not possible to add a new track without a root" -msgstr "" +msgstr "रूट के बिना नया टà¥à¤°à¥ˆà¤• जोड़ना संà¤à¤µ नहीं" #: editor/animation_track_editor.cpp msgid "Invalid track for Bezier (no suitable sub-properties)" -msgstr "" +msgstr "बेजियर के लिठअमानà¥à¤¯ टà¥à¤°à¥ˆà¤• (कोई उपयà¥à¤•à¥à¤¤ उप-गà¥à¤£ नहीं)" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Add Bezier Track" -msgstr "टà¥à¤°à¥ˆà¤• जोड़ें" +msgstr "बेज़ियर टà¥à¤°à¥ˆà¤• जोड़ें" #: editor/animation_track_editor.cpp msgid "Track path is invalid, so can't add a key." -msgstr "" +msgstr "टà¥à¤°à¥ˆà¤• पथ अमानà¥à¤¯ है, इसलिठà¤à¤• कà¥à¤‚जी नहीं जोड़ सकते हैं।" #: editor/animation_track_editor.cpp msgid "Track is not of type Spatial, can't insert key" -msgstr "" +msgstr "टà¥à¤°à¥ˆà¤• पà¥à¤°à¤•ार का नहीं है, सà¥à¤¥à¤¾à¤¨à¤¿à¤• नहीं डाला जा सकता है" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Add Transform Track Key" -msgstr "3 डी टà¥à¤°à¥ˆà¤• रूपांतरण" +msgstr "टà¥à¤°à¤¾à¤‚सफ़ॉरà¥à¤® टà¥à¤°à¥ˆà¤• कà¥à¤‚जी जोड़ें" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Add Track Key" -msgstr "टà¥à¤°à¥ˆà¤• जोड़ें" +msgstr "टà¥à¤°à¥ˆà¤• कà¥à¤‚जी जोड़ें" #: editor/animation_track_editor.cpp msgid "Track path is invalid, so can't add a method key." -msgstr "" +msgstr "टà¥à¤°à¥ˆà¤• पथ अमानà¥à¤¯ है, इसलिठà¤à¤• विधि कà¥à¤‚जी नहीं जोड़ सकते हैं।" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Add Method Track Key" -msgstr "कॉल मेथड टà¥à¤°à¥ˆà¤•" +msgstr "विधि टà¥à¤°à¥ˆà¤• कà¥à¤‚जी जोड़ें" #: editor/animation_track_editor.cpp msgid "Method not found in object: " -msgstr "" +msgstr "ऑबà¥à¤œà¥‡à¤•à¥à¤Ÿ में नहीं पाया गया विधि: " #: editor/animation_track_editor.cpp msgid "Anim Move Keys" -msgstr "" +msgstr "à¤à¤¨à¤¿à¤®à¥‡à¤Ÿà¥‡à¤¡ मूव कीज़" #: editor/animation_track_editor.cpp msgid "Clipboard is empty" -msgstr "" +msgstr "कà¥à¤²à¤¿à¤ªà¤¬à¥‹à¤°à¥à¤¡ खाली है" #: editor/animation_track_editor.cpp msgid "Paste Tracks" -msgstr "" +msgstr "पेसà¥à¤Ÿ टà¥à¤°à¥ˆà¤•" #: editor/animation_track_editor.cpp msgid "Anim Scale Keys" -msgstr "" +msgstr "à¤à¤¨à¤¿à¤®à¥‡à¤Ÿà¥‡à¤¡ सà¥à¤•ेल कà¥à¤‚जी" #: editor/animation_track_editor.cpp msgid "" "This option does not work for Bezier editing, as it's only a single track." -msgstr "" +msgstr "यह विकलà¥à¤ª बेज़ियर संपादन के लिठकाम नहीं करता है, कà¥à¤¯à¥‹à¤‚कि यह केवल à¤à¤• ही टà¥à¤°à¥ˆà¤• है।" #: editor/animation_track_editor.cpp msgid "" @@ -503,38 +488,46 @@ msgid "" "Alternatively, use an import preset that imports animations to separate " "files." msgstr "" +"यह à¤à¤¨à¥€à¤®à¥‡à¤¶à¤¨ à¤à¤• आयातित दृशà¥à¤¯ से संबंधित है, इसलिठआयातित पटरियों में परिवरà¥à¤¤à¤¨ नहीं सहेजे " +"जाà¤à¤‚गे।\n" +"\n" +"कसà¥à¤Ÿà¤® टà¥à¤°à¥ˆà¤• जोड़ने की कà¥à¤·à¤®à¤¤à¤¾ को सकà¥à¤·à¤® करने के लिà¤, दृशà¥à¤¯ की आयात सेटिंगà¥à¤¸ और सेट पर नेविगेट " +"करें\n" +"\"à¤à¤¨à¤¿à¤®à¥‡à¤¶à¤¨ > सà¥à¤Ÿà¥‹à¤°à¥‡à¤œ\" से \"फाइलà¥à¤¸\", \"à¤à¤¨à¤¿à¤®à¥‡à¤¶à¤¨ > कसà¥à¤Ÿà¤® टà¥à¤°à¥ˆà¤• रखें\", फिर री-इमà¥à¤ªà¥‹à¤°à¥à¤Ÿ करें।\n" +"वैकलà¥à¤ªà¤¿à¤• रूप से, à¤à¤• आयात पूरà¥à¤µ निरà¥à¤§à¤¾à¤°à¤¿à¤¤ का उपयोग करें जो फ़ाइलों को अलग करने के लिठ" +"à¤à¤¨à¤¿à¤®à¥‡à¤¶à¤¨ आयात करता है।" #: editor/animation_track_editor.cpp msgid "Warning: Editing imported animation" -msgstr "" +msgstr "चेतावनी: आयातित à¤à¤¨à¥€à¤®à¥‡à¤¶à¤¨ संपादन" #: editor/animation_track_editor.cpp msgid "Select an AnimationPlayer node to create and edit animations." -msgstr "" +msgstr "à¤à¤¨à¤¿à¤®à¥‡à¤¶à¤¨ बनाने और संपादित करने के लिठà¤à¤¨à¤¿à¤®à¥‡à¤¶à¤¨à¤ªà¥à¤²à¥‡à¤¯à¤° नोड का चयन करें।" #: editor/animation_track_editor.cpp msgid "Only show tracks from nodes selected in tree." -msgstr "" +msgstr "केवल पेड़ में चयनित नोडà¥à¤¸ से पटरियों को दिखाà¤à¤‚।" #: editor/animation_track_editor.cpp msgid "Group tracks by node or display them as plain list." -msgstr "" +msgstr "समूह दà¥à¤µà¤¾à¤°à¤¾ पटरियों नोड या पà¥à¤°à¤¦à¤°à¥à¤¶à¤¨ के रूप में उनà¥à¤¹à¥‡à¤‚ सादे सूची." #: editor/animation_track_editor.cpp msgid "Snap:" -msgstr "" +msgstr "आकसà¥à¤®à¤¿à¤•:" #: editor/animation_track_editor.cpp msgid "Animation step value." -msgstr "" +msgstr "à¤à¤¨à¥€à¤®à¥‡à¤¶à¤¨ सà¥à¤Ÿà¥‡à¤ª वैलà¥à¤¯à¥‚।" #: editor/animation_track_editor.cpp msgid "Seconds" -msgstr "" +msgstr "सेकंड" #: editor/animation_track_editor.cpp msgid "FPS" -msgstr "" +msgstr "à¤à¤«à¤ªà¥€à¤à¤¸" #: editor/animation_track_editor.cpp editor/editor_properties.cpp #: editor/plugins/polygon_2d_editor_plugin.cpp @@ -544,109 +537,107 @@ msgstr "" #: editor/project_settings_editor.cpp editor/property_editor.cpp #: modules/visual_script/visual_script_editor.cpp msgid "Edit" -msgstr "" +msgstr "संपादित" #: editor/animation_track_editor.cpp msgid "Animation properties." -msgstr "" +msgstr "à¤à¤¨à¤¿à¤®à¥‡à¤¶à¤¨ गà¥à¤£à¥¤" #: editor/animation_track_editor.cpp msgid "Copy Tracks" -msgstr "" +msgstr "कॉपी टà¥à¤°à¥ˆà¤•" #: editor/animation_track_editor.cpp msgid "Scale Selection" -msgstr "" +msgstr "सà¥à¤•ेल चयन" #: editor/animation_track_editor.cpp msgid "Scale From Cursor" -msgstr "" +msgstr "करà¥à¤¸à¤° से सà¥à¤•ेल" #: editor/animation_track_editor.cpp modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy msgid "Duplicate Selection" -msgstr "डà¥à¤ªà¥à¤²à¤¿à¤•ेट चयन" +msgstr "डà¥à¤ªà¥à¤²à¥€à¤•ेट चयन" #: editor/animation_track_editor.cpp msgid "Duplicate Transposed" -msgstr "" +msgstr "डà¥à¤ªà¥à¤²à¥€à¤•ेट टà¥à¤°à¤¾à¤‚सपेश" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Delete Selection" -msgstr "डà¥à¤ªà¥à¤²à¤¿à¤•ेट चयन" +msgstr "चयन हटाà¤à¤‚" #: editor/animation_track_editor.cpp msgid "Go to Next Step" -msgstr "" +msgstr "अगले चरण में जाà¤à¤‚" #: editor/animation_track_editor.cpp msgid "Go to Previous Step" -msgstr "" +msgstr "पिछले चरण में जाà¤à¤‚" #: editor/animation_track_editor.cpp msgid "Optimize Animation" -msgstr "" +msgstr "à¤à¤¨à¤¿à¤®à¥‡à¤¶à¤¨ का अनà¥à¤•ूलन" #: editor/animation_track_editor.cpp msgid "Clean-Up Animation" -msgstr "" +msgstr "कà¥à¤²à¥€à¤¨-अप à¤à¤¨à¥€à¤®à¥‡à¤¶à¤¨" #: editor/animation_track_editor.cpp msgid "Pick the node that will be animated:" -msgstr "" +msgstr "à¤à¤¨à¤¿à¤®à¥‡à¤Ÿà¥‡à¤¡ हो जाà¤à¤—ा कि नोड उठाओ:" #: editor/animation_track_editor.cpp msgid "Use Bezier Curves" -msgstr "" +msgstr "बेज़ियर करà¥à¤µà¥à¤¸ का पà¥à¤°à¤¯à¥‹à¤— करें" #: editor/animation_track_editor.cpp msgid "Anim. Optimizer" -msgstr "" +msgstr "Anim. अनà¥à¤•ूलक" #: editor/animation_track_editor.cpp msgid "Max. Linear Error:" -msgstr "" +msgstr "अधिकतम. रैखिक तà¥à¤°à¥à¤Ÿà¤¿:" #: editor/animation_track_editor.cpp msgid "Max. Angular Error:" -msgstr "" +msgstr "अधिकतम. कोणीय तà¥à¤°à¥à¤Ÿà¤¿:" #: editor/animation_track_editor.cpp msgid "Max Optimizable Angle:" -msgstr "" +msgstr "मैकà¥à¤¸ ऑपà¥à¤Ÿà¤¿à¤®à¤¾à¤‡à¤œà¤¼à¥‡à¤¬à¤² à¤à¤‚गल:" #: editor/animation_track_editor.cpp msgid "Optimize" -msgstr "" +msgstr "ऑपà¥à¤Ÿà¤¿à¤®à¤¾à¤‡à¤œà¤¼" #: editor/animation_track_editor.cpp msgid "Remove invalid keys" -msgstr "" +msgstr "अमानà¥à¤¯ चाबियां निकालें" #: editor/animation_track_editor.cpp msgid "Remove unresolved and empty tracks" -msgstr "" +msgstr "अनसà¥à¤²à¤à¥‡ और खाली पटरियों को हटादें" #: editor/animation_track_editor.cpp msgid "Clean-up all animations" -msgstr "" +msgstr "सà¤à¥€ à¤à¤¨à¤¿à¤®à¥‡à¤¶à¤¨ को साफ-सà¥à¤¥à¤°à¤¾ करें" #: editor/animation_track_editor.cpp msgid "Clean-Up Animation(s) (NO UNDO!)" -msgstr "" +msgstr "कà¥à¤²à¥€à¤¨-अप à¤à¤¨à¥€à¤®à¥‡à¤¶à¤¨ (à¤à¤¸) (कोई पूरà¥à¤µà¤µà¤¤!)" #: editor/animation_track_editor.cpp msgid "Clean-Up" -msgstr "" +msgstr "साफ - सफाई" #: editor/animation_track_editor.cpp msgid "Scale Ratio:" -msgstr "" +msgstr "सà¥à¤•ेल अनà¥à¤ªà¤¾à¤¤:" #: editor/animation_track_editor.cpp msgid "Select Tracks to Copy" -msgstr "" +msgstr "कॉपी करने के लिठटà¥à¤°à¥ˆà¤• का चयन करें" #: editor/animation_track_editor.cpp editor/editor_log.cpp #: editor/editor_properties.cpp @@ -655,87 +646,85 @@ msgstr "" #: editor/plugins/sprite_frames_editor_plugin.cpp editor/property_editor.cpp #: scene/gui/line_edit.cpp scene/gui/text_edit.cpp msgid "Copy" -msgstr "" +msgstr "कॉपी" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Select All/None" -msgstr "डà¥à¤ªà¥à¤²à¤¿à¤•ेट चयन" +msgstr "सà¤à¥€ का चयन करें/" #: editor/animation_track_editor_plugins.cpp -#, fuzzy msgid "Add Audio Track Clip" -msgstr "टà¥à¤°à¥ˆà¤• जोड़ें" +msgstr "ऑडियो टà¥à¤°à¥ˆà¤• कà¥à¤²à¤¿à¤ª जोड़ें" #: editor/animation_track_editor_plugins.cpp msgid "Change Audio Track Clip Start Offset" -msgstr "" +msgstr "ऑडियो टà¥à¤°à¥ˆà¤• कà¥à¤²à¤¿à¤ª को बदलें ऑफसेट शà¥à¤°à¥‚ करें" #: editor/animation_track_editor_plugins.cpp msgid "Change Audio Track Clip End Offset" -msgstr "" +msgstr "ऑडियो टà¥à¤°à¥ˆà¤• कà¥à¤²à¤¿à¤ª à¤à¤‚ड ऑफसेट बदलें" #: editor/array_property_edit.cpp msgid "Resize Array" -msgstr "" +msgstr "रीसाइज रीवà¥à¤¯à¥‚" #: editor/array_property_edit.cpp msgid "Change Array Value Type" -msgstr "" +msgstr "वà¥à¤¯à¥‚ह मूलà¥à¤¯ पà¥à¤°à¤•ार बदलें" #: editor/array_property_edit.cpp msgid "Change Array Value" -msgstr "" +msgstr "वà¥à¤¯à¥‚ह मूलà¥à¤¯ बदलें" #: editor/code_editor.cpp msgid "Go to Line" -msgstr "" +msgstr "लाइन पर जाà¤à¤‚" #: editor/code_editor.cpp msgid "Line Number:" -msgstr "" +msgstr "लाइन नंबर:" #: editor/code_editor.cpp -msgid "Replaced %d occurrence(s)." -msgstr "" +#, fuzzy +msgid "%d replaced." +msgstr "बदलने के" #: editor/code_editor.cpp editor/editor_help.cpp msgid "%d match." -msgstr "" +msgstr "% d मैच।" #: editor/code_editor.cpp editor/editor_help.cpp -#, fuzzy msgid "%d matches." -msgstr "à¤à¤• जैसा:" +msgstr "% डी मैच।" #: editor/code_editor.cpp editor/find_in_files.cpp msgid "Match Case" -msgstr "" +msgstr "मैच मामला" #: editor/code_editor.cpp editor/find_in_files.cpp msgid "Whole Words" -msgstr "" +msgstr "पूरे शबà¥à¤¦" #: editor/code_editor.cpp editor/rename_dialog.cpp msgid "Replace" -msgstr "" +msgstr "बदलने के" #: editor/code_editor.cpp msgid "Replace All" -msgstr "" +msgstr "सबको बदली करें" #: editor/code_editor.cpp msgid "Selection Only" -msgstr "" +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" -msgstr "" +msgstr "टॉगल सà¥à¤•à¥à¤°à¤¿à¤ªà¥à¤Ÿ पैनल" #: editor/code_editor.cpp editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/texture_region_editor_plugin.cpp @@ -755,44 +744,38 @@ msgstr "रीसेट आकार" #: editor/code_editor.cpp msgid "Warnings" -msgstr "" +msgstr "चेतावनियाà¤" #: editor/code_editor.cpp msgid "Line and column numbers." -msgstr "" +msgstr "लाइन और कॉलम नंबर।" #: editor/connections_dialog.cpp -#, fuzzy msgid "Method in target node must be specified." -msgstr "लकà¥à¤·à¥à¤¯ नोड में विधि निरà¥à¤¦à¤¿à¤·à¥à¤Ÿ किया जाना चाहिà¤!" +msgstr "लकà¥à¤·à¥à¤¯ नोड में विधि निरà¥à¤¦à¤¿à¤·à¥à¤Ÿ की जानी चाहिà¤à¥¤" #: editor/connections_dialog.cpp -#, fuzzy msgid "" "Target method not found. Specify a valid method or attach a script to the " "target node." msgstr "" -"लकà¥à¤·à¥à¤¯ विधि नहीं मिला! à¤à¤• वैध विधि निरà¥à¤¦à¤¿à¤·à¥à¤Ÿ करें या नोड को लकà¥à¤·à¤¿à¤¤ करने के लिठà¤à¤• " -"सà¥à¤•à¥à¤°à¤¿à¤ªà¥à¤Ÿ संलगà¥à¤¨ करें।" +"लकà¥à¤·à¥à¤¯ विधि नहीं मिली। à¤à¤• मानà¥à¤¯ विधि निरà¥à¤¦à¤¿à¤·à¥à¤Ÿ करें या सà¥à¤•à¥à¤°à¤¿à¤ªà¥à¤Ÿ को लकà¥à¤·à¥à¤¯ नोड में संलगà¥à¤¨ करें।" #: editor/connections_dialog.cpp -#, fuzzy msgid "Connect to Node:" -msgstr "जà¥à¤¡à¤¿à¤¯à¥‡" +msgstr "नोड से कनेकà¥à¤Ÿ करें:" #: editor/connections_dialog.cpp -#, fuzzy msgid "Connect to Script:" -msgstr "कनेकà¥à¤Ÿ करने के लिठसंकेत:" +msgstr "सà¥à¤•à¥à¤°à¤¿à¤ªà¥à¤Ÿ से कनेकà¥à¤Ÿ:" #: editor/connections_dialog.cpp -#, fuzzy msgid "From Signal:" -msgstr "कनेकà¥à¤Ÿ करने के लिठसंकेत:" +msgstr "सिगà¥à¤¨à¤² से:" #: editor/connections_dialog.cpp msgid "Scene does not contain any script." -msgstr "" +msgstr "सीन में कोई सà¥à¤•à¥à¤°à¤¿à¤ªà¥à¤Ÿ नहीं होती।" #: editor/connections_dialog.cpp editor/editor_autoload_settings.cpp #: editor/groups_editor.cpp editor/plugins/item_list_editor_plugin.cpp @@ -813,23 +796,21 @@ msgstr "मिटाना" #: editor/connections_dialog.cpp msgid "Add Extra Call Argument:" -msgstr "" +msgstr "अतिरिकà¥à¤¤ कॉल तरà¥à¤• जोड़ें:" #: editor/connections_dialog.cpp msgid "Extra Call Arguments:" -msgstr "" +msgstr "अतिरिकà¥à¤¤ कॉल तरà¥à¤•:" #: editor/connections_dialog.cpp msgid "Receiver Method:" -msgstr "" +msgstr "रिसीवर विधि:" #: editor/connections_dialog.cpp -#, fuzzy msgid "Advanced" -msgstr "संतà¥à¤²à¤¿à¤¤" +msgstr "उनà¥à¤¨à¤¤" #: editor/connections_dialog.cpp -#, fuzzy msgid "Deferred" msgstr "सà¥à¤¥à¤—ित" @@ -837,19 +818,20 @@ msgstr "सà¥à¤¥à¤—ित" msgid "" "Defers the signal, storing it in a queue and only firing it at idle time." msgstr "" +"संकेत को सà¥à¤¥à¤—ित कर देता है, इसे à¤à¤• कतार में संगà¥à¤°à¤¹à¤¿à¤¤ करता है और केवल निषà¥à¤•à¥à¤°à¤¿à¤¯ समय पर इसे " +"फायरिंग करता है।" #: editor/connections_dialog.cpp msgid "Oneshot" -msgstr "" +msgstr "वनशॉट" #: editor/connections_dialog.cpp msgid "Disconnects the signal after its first emission." -msgstr "" +msgstr "अपने पहले उतà¥à¤¸à¤°à¥à¤œà¤¨ के बाद संकेत डिसà¥à¤•नेकà¥à¤Ÿ करता है।" #: editor/connections_dialog.cpp -#, fuzzy msgid "Cannot connect signal" -msgstr "कनेकà¥à¤Ÿ करने के लिठसंकेत:" +msgstr "सिगà¥à¤¨à¤² कनेकà¥à¤Ÿ नहीं कर सकते" #: editor/connections_dialog.cpp editor/dependency_editor.cpp #: editor/export_template_manager.cpp editor/groups_editor.cpp @@ -867,34 +849,28 @@ msgid "Close" msgstr "बंद करे" #: editor/connections_dialog.cpp -#, fuzzy msgid "Connect" -msgstr "जà¥à¤¡à¤¿à¤¯à¥‡" +msgstr "जोड़ना" #: editor/connections_dialog.cpp -#, fuzzy msgid "Signal:" -msgstr "संकेत" +msgstr "संकेत:" #: editor/connections_dialog.cpp -#, fuzzy msgid "Connect '%s' to '%s'" -msgstr "जà¥à¤¡à¤¿à¤¯à¥‡ '%s' to '%s'" +msgstr "'%' को '%' से कनेकà¥à¤Ÿ करें" #: editor/connections_dialog.cpp -#, fuzzy msgid "Disconnect '%s' from '%s'" -msgstr "जà¥à¤¡à¤¿à¤¯à¥‡ '%s' to '%s'" +msgstr "'%' से डिसà¥à¤•नेकà¥à¤Ÿ करें '%'" #: editor/connections_dialog.cpp -#, fuzzy msgid "Disconnect all from signal: '%s'" -msgstr "जà¥à¤¡à¤¿à¤¯à¥‡ '%s' to '%s'" +msgstr "सà¤à¥€ को सिगà¥à¤¨à¤² से डिसà¥à¤•नेकà¥à¤Ÿ करें: '%s'" #: editor/connections_dialog.cpp -#, fuzzy msgid "Connect..." -msgstr "जà¥à¤¡à¤¿à¤¯à¥‡..." +msgstr "जोड़ना..." #: editor/connections_dialog.cpp #: editor/plugins/animation_tree_player_editor_plugin.cpp @@ -902,18 +878,16 @@ msgid "Disconnect" msgstr "डिसà¥à¤•नेकà¥à¤Ÿ" #: editor/connections_dialog.cpp -#, fuzzy msgid "Connect a Signal to a Method" -msgstr "कनेकà¥à¤Ÿ करने के लिठसंकेत:" +msgstr "à¤à¤• विधि के लिठà¤à¤• संकेत कनेकà¥à¤Ÿ" #: editor/connections_dialog.cpp -#, fuzzy msgid "Edit Connection:" -msgstr "परिवरà¥à¤¤à¤¨ वकà¥à¤° चयन" +msgstr "संपादित करें कनेकà¥à¤¶à¤¨:" #: editor/connections_dialog.cpp msgid "Are you sure you want to remove all connections from the \"%s\" signal?" -msgstr "" +msgstr "कà¥à¤¯à¤¾ आपसà¥à¤¨à¤¿à¤¶à¥à¤šà¤¿à¤¤ हैं कि आप \"% à¤à¤¸\" सिगà¥à¤¨à¤² से सà¤à¥€ कनेकà¥à¤¶à¤¨ हटाना चाहते हैं?" #: editor/connections_dialog.cpp editor/editor_help.cpp editor/node_dock.cpp msgid "Signals" @@ -921,16 +895,15 @@ msgstr "संकेत" #: editor/connections_dialog.cpp msgid "Are you sure you want to remove all connections from this signal?" -msgstr "" +msgstr "कà¥à¤¯à¤¾ आप सà¥à¤¨à¤¿à¤¶à¥à¤šà¤¿à¤¤ हैं कि आप इस सिगà¥à¤¨à¤² से सà¤à¥€ कनेकà¥à¤¶à¤¨ हटाना चाहते हैं?" #: editor/connections_dialog.cpp -#, fuzzy msgid "Disconnect All" -msgstr "डिसà¥à¤•नेकà¥à¤Ÿ" +msgstr "सà¤à¥€ को डिसà¥à¤•नेकà¥à¤Ÿ करें" #: editor/connections_dialog.cpp msgid "Edit..." -msgstr "" +msgstr "संपादित..." #: editor/connections_dialog.cpp msgid "Go To Method" @@ -942,12 +915,11 @@ msgstr "" #: editor/create_dialog.cpp editor/project_settings_editor.cpp msgid "Change" -msgstr "" +msgstr "परिवरà¥à¤¤à¤¨" #: editor/create_dialog.cpp -#, fuzzy msgid "Create New %s" -msgstr "à¤à¤• नया बनाà¤à¤‚" +msgstr "नया%s बनाà¤à¤‚" #: editor/create_dialog.cpp editor/editor_file_dialog.cpp #: editor/filesystem_dock.cpp @@ -961,9 +933,8 @@ msgstr "हाल ही में किया:" #: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp #: editor/property_selector.cpp editor/quick_open.cpp #: modules/visual_script/visual_script_property_selector.cpp -#, fuzzy msgid "Search:" -msgstr "खोज कर:" +msgstr "खोज:" #: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp #: editor/property_selector.cpp editor/quick_open.cpp @@ -984,33 +955,29 @@ msgid "Search Replacement For:" msgstr "इसके लिठखोजी पà¥à¤°à¤¤à¤¿à¤¸à¥à¤¥à¤¾à¤ªà¤¨:" #: editor/dependency_editor.cpp -#, fuzzy msgid "Dependencies For:" -msgstr "के लिठनिरà¥à¤à¤°à¤¤à¤¾:" +msgstr "निरà¥à¤à¤°à¤¤à¤¾ के लिà¤:" #: editor/dependency_editor.cpp -#, fuzzy msgid "" "Scene '%s' is currently being edited.\n" "Changes will only take effect when reloaded." msgstr "" -"दृशà¥à¤¯ '%s' वरà¥à¤¤à¤®à¤¾à¤¨ में संपादित किया जा रहा है।\n" -"परिवरà¥à¤¤à¤¨ तब तक पà¥à¤°à¤à¤¾à¤µà¥€ नहीं होंगे जब तक कि पà¥à¤¨à¤ƒ लोड नहीं किठजाà¤à¤‚गे।" +"दृशà¥à¤¯ '%' वरà¥à¤¤à¤®à¤¾à¤¨ में संपादित किया जा रहा है।\n" +"परिवरà¥à¤¤à¤¨ केवल तà¤à¥€ पà¥à¤°à¤à¤¾à¤µà¥€ होंगे जब रीलोड किया जाà¤à¤—ा।" #: editor/dependency_editor.cpp -#, fuzzy msgid "" "Resource '%s' is in use.\n" "Changes will only take effect when reloaded." msgstr "" -"संसाधन '%s' उपयोग में है\n" -"पà¥à¤¨à¤ƒ लोड होने पर परिवरà¥à¤¤à¤¨ पà¥à¤°à¤à¤¾à¤µà¥€ होंगे।" +"संसाधन '%' उपयोग में है।\n" +"परिवरà¥à¤¤à¤¨ केवल तà¤à¥€ पà¥à¤°à¤à¤¾à¤µà¥€ होंगे जब रीलोड किया जाà¤à¤—ा।" #: editor/dependency_editor.cpp #: modules/gdnative/gdnative_library_editor_plugin.cpp -#, fuzzy msgid "Dependencies" -msgstr "निरà¥à¤à¤°à¤¤à¤¾" +msgstr "निरà¥à¤à¤°à¤¤à¤¾à¤à¤" #: editor/dependency_editor.cpp msgid "Resource" @@ -1026,9 +993,8 @@ msgid "Dependencies:" msgstr "निरà¥à¤à¤°à¤¤à¤¾:" #: editor/dependency_editor.cpp -#, fuzzy msgid "Fix Broken" -msgstr "टूटी सही कर देंगे?" +msgstr "टूटा ठीक करें" #: editor/dependency_editor.cpp msgid "Dependency Editor" @@ -1053,9 +1019,8 @@ msgid "Owners Of:" msgstr "के सà¥à¤µà¤¾à¤®à¥€:" #: editor/dependency_editor.cpp -#, fuzzy msgid "Remove selected files from the project? (Can't be restored)" -msgstr "परियोजना से चयनित फ़ाइलें निकालें? (कोई पूरà¥à¤µà¤µà¤¤ नहीं)" +msgstr "परियोजना से चयनित फ़ाइलों को हटा दें? (बहाल नहीं किया जा सकता है)" #: editor/dependency_editor.cpp msgid "" @@ -1067,18 +1032,16 @@ msgstr "" "वैसे à¤à¥€ उनà¥à¤¹à¥‡à¤‚ निकालें? (कोई पूरà¥à¤µà¤µà¤¤ नहीं)" #: editor/dependency_editor.cpp -#, fuzzy msgid "Cannot remove:" -msgstr "निकाला नहीं जा सकता:\n" +msgstr "नहीं हटा सकते:" #: editor/dependency_editor.cpp msgid "Error loading:" msgstr "लोड होने मे तà¥à¤°à¥à¤Ÿà¤¿:" #: editor/dependency_editor.cpp -#, fuzzy msgid "Load failed due to missing dependencies:" -msgstr "लापता निरà¥à¤à¤°à¤¤à¤¾à¤“ं के कारण दृशà¥à¤¯ लोड करने में विफल रहे:" +msgstr "गायब निरà¥à¤à¤°à¤¤à¤¾ के कारण लोड विफल रहा:" #: editor/dependency_editor.cpp editor/editor_node.cpp msgid "Open Anyway" @@ -1101,14 +1064,12 @@ msgid "Permanently delete %d item(s)? (No undo!)" msgstr "%d आइटम को सà¥à¤¥à¤¾à¤¯à¥€ रूप से हटाà¤à¤‚? (नहीं पूरà¥à¤µà¤µà¤¤ करें!)" #: editor/dependency_editor.cpp -#, fuzzy msgid "Show Dependencies" -msgstr "निरà¥à¤à¤°à¤¤à¤¾" +msgstr "निरà¥à¤à¤°à¤¤à¤¾ दिखाà¤à¤‚" #: editor/dependency_editor.cpp -#, fuzzy msgid "Orphan Resource Explorer" -msgstr "Orphan Resource Explorer" +msgstr "अनाथ संसाधन à¤à¤•à¥à¤¸à¤ªà¥à¤²à¥‹à¤°à¤°" #: editor/dependency_editor.cpp editor/editor_audio_buses.cpp #: editor/editor_file_dialog.cpp editor/editor_node.cpp @@ -1151,9 +1112,8 @@ msgid "Lead Developer" msgstr "पà¥à¤°à¤®à¥à¤– डेà¤µà¤²à¤ªà¤°" #: editor/editor_about.cpp -#, fuzzy msgid "Project Manager " -msgstr "पà¥à¤°à¥‹à¤œà¥‡à¤•à¥à¤Ÿ मैनेजर" +msgstr "परियोजना पà¥à¤°à¤¬à¤‚धक " #: editor/editor_about.cpp msgid "Developers" @@ -1196,21 +1156,19 @@ msgid "License" msgstr "लाइसेंस" #: editor/editor_about.cpp -#, fuzzy msgid "Third-party Licenses" -msgstr "Thirdparty License" +msgstr "थरà¥à¤¡ पारà¥à¤Ÿà¥€ लाइसेंस" #: editor/editor_about.cpp -#, fuzzy msgid "" "Godot Engine relies on a number of third-party free and open source " "libraries, all compatible with the terms of its MIT license. The following " "is an exhaustive list of all such third-party components with their " "respective copyright statements and license terms." msgstr "" -"गोडोट इंजन तीसरे पकà¥à¤· के सà¥à¤µà¤¤à¤‚तà¥à¤° और खà¥à¤²à¥‡ सà¥à¤°à¥‹à¤¤ पà¥à¤¸à¥à¤¤à¤•ालयों पर निरà¥à¤à¤° करता है, जो कि इसके " -"à¤à¤®à¤†à¤ˆà¤Ÿà¥€ लाइसेंस की शरà¥à¤¤à¥‹à¤‚ के साथ संगत है। निमà¥à¤¨à¤²à¤¿à¤–ित à¤à¤¸à¥‡ सà¤à¥€ तृतीय पकà¥à¤· घटकों की à¤à¤• विसà¥à¤¤à¥ƒà¤¤ " -"सूची है जो उनके संबंधित कॉपीराइट कथन और लाइसेंस शरà¥à¤¤à¥‹à¤‚ के साथ हैं।" +"गोडोट इंजन अपने MIT लाइसेंस की शरà¥à¤¤à¥‹à¤‚ के साथ सà¤à¥€ तृतीय-पकà¥à¤· मà¥à¤•à¥à¤¤ और मà¥à¤•à¥à¤¤ सà¥à¤°à¥‹à¤¤ पà¥à¤¸à¥à¤¤à¤•ालयों " +"पर निरà¥à¤à¤° करता है। निमà¥à¤¨à¤²à¤¿à¤–ित à¤à¤¸à¥‡ सà¤à¥€ तृतीय-पकà¥à¤· घटकों की à¤à¤• विसà¥à¤¤à¥ƒà¤¤ सूची है, जिनके " +"संबंधित कॉपीराइट सà¥à¤Ÿà¥‡à¤Ÿà¤®à¥‡à¤‚ट और लाइसेंस शरà¥à¤¤à¥‡à¤‚ हैं।" #: editor/editor_about.cpp msgid "All Components" @@ -1221,18 +1179,16 @@ msgid "Components" msgstr "अवयव" #: editor/editor_about.cpp -#, fuzzy msgid "Licenses" -msgstr "Licenses" +msgstr "लाइसेंस" #: editor/editor_asset_installer.cpp editor/project_manager.cpp -#, fuzzy msgid "Error opening package file, not in ZIP format." -msgstr "पैकेज फ़ाइल खोलने में तà¥à¤°à¥à¤Ÿà¤¿, zip पà¥à¤°à¤¾à¤°à¥‚प में नहीं |" +msgstr "ज़िप फ़ाइल खोलने में तà¥à¤°à¥à¤Ÿà¤¿, पà¥à¤°à¤¾à¤°à¥‚प में नहीं।" #: editor/editor_asset_installer.cpp msgid "%s (Already Exists)" -msgstr "" +msgstr "%s (पहले से मौजूद है)" #: editor/editor_asset_installer.cpp msgid "Uncompressing Assets" @@ -1247,9 +1203,8 @@ msgid "And %s more files." msgstr "" #: editor/editor_asset_installer.cpp editor/project_manager.cpp -#, fuzzy msgid "Package installed successfully!" -msgstr "पैकेज सफलतापूरà¥à¤µà¤• सà¥à¤¥à¤¾à¤ªà¤¿à¤¤ किया गया!" +msgstr "पैकेज सफलतापूरà¥à¤µà¤• सà¥à¤¥à¤¾à¤ªà¤¿à¤¤!" #: editor/editor_asset_installer.cpp #: editor/plugins/asset_library_editor_plugin.cpp @@ -1257,18 +1212,16 @@ msgid "Success!" msgstr "सफलता!" #: editor/editor_asset_installer.cpp -#, fuzzy msgid "Package Contents:" -msgstr "Package Installer" +msgstr "पैकेज सामगà¥à¤°à¥€:" #: editor/editor_asset_installer.cpp editor/editor_node.cpp msgid "Install" msgstr "इंसà¥à¤Ÿà¥‰à¤²" #: editor/editor_asset_installer.cpp -#, fuzzy msgid "Package Installer" -msgstr "Package Installer" +msgstr "पैकेज इंसà¥à¤Ÿà¥‰à¤²à¤°" #: editor/editor_audio_buses.cpp msgid "Speakers" @@ -1283,9 +1236,8 @@ msgid "Rename Audio Bus" msgstr "ऑडियो बस का नाम बदलें" #: editor/editor_audio_buses.cpp -#, fuzzy msgid "Change Audio Bus Volume" -msgstr "ऑडियो बस सोलो टॉगल करें" +msgstr "ऑडियो बस वॉलà¥à¤¯à¥‚म बदलें" #: editor/editor_audio_buses.cpp msgid "Toggle Audio Bus Solo" @@ -1300,7 +1252,6 @@ msgid "Toggle Audio Bus Bypass Effects" msgstr "ऑडियो बस बायपास पà¥à¤°à¤à¤¾à¤µ टॉगल करें" #: editor/editor_audio_buses.cpp -#, fuzzy msgid "Select Audio Bus Send" msgstr "ऑडियो बस à¤à¥‡à¤œà¥‡à¤‚ का चयन करें" @@ -1313,21 +1264,18 @@ msgid "Move Bus Effect" msgstr "बस पà¥à¤°à¤à¤¾à¤µ हटो" #: editor/editor_audio_buses.cpp -#, fuzzy msgid "Delete Bus Effect" -msgstr "बस पà¥à¤°à¤à¤¾à¤µ हटाना" +msgstr "बस पà¥à¤°à¤à¤¾à¤µ हटाà¤à¤‚" #: editor/editor_audio_buses.cpp -#, fuzzy msgid "Drag & drop to rearrange." -msgstr "पà¥à¤¨: वà¥à¤¯à¤µà¤¸à¥à¤¥à¤¿à¤¤ करने के लिठऑडियो बस, खींचें और डà¥à¤°à¥‰à¤ª |" +msgstr "पà¥à¤¨à¤°à¥à¤µà¥à¤¯à¤µà¤¸à¥à¤¥à¤¿à¤¤ करने के लिठखींचें और छोड़ दें।" #: editor/editor_audio_buses.cpp msgid "Solo" -msgstr "" +msgstr "à¤à¤•ल" #: editor/editor_audio_buses.cpp -#, fuzzy msgid "Mute" msgstr "मूक" @@ -1350,11 +1298,11 @@ msgstr "वॉलà¥à¤¯à¥‚म रीसेट करें" #: editor/editor_audio_buses.cpp msgid "Delete Effect" -msgstr "" +msgstr "डिलीट इफेकà¥à¤Ÿ" #: editor/editor_audio_buses.cpp msgid "Audio" -msgstr "" +msgstr "ऑडियो" #: editor/editor_audio_buses.cpp msgid "Add Audio Bus" @@ -1386,7 +1334,7 @@ msgstr "" #: editor/editor_audio_buses.cpp msgid "Location for New Layout..." -msgstr "" +msgstr "नठलेआउट के लिठसà¥à¤¥à¤¾à¤¨..." #: editor/editor_audio_buses.cpp msgid "Open Audio Bus Layout" @@ -1405,9 +1353,8 @@ msgid "Invalid file, not an audio bus layout." msgstr "" #: editor/editor_audio_buses.cpp -#, fuzzy msgid "Error saving file: %s" -msgstr "लोड हो रहा है तà¥à¤°à¥à¤Ÿà¤¿à¤¯à¤¾à¤!" +msgstr "तà¥à¤°à¥à¤Ÿà¤¿ बचत फ़ाइल: %s" #: editor/editor_audio_buses.cpp msgid "Add Bus" @@ -1500,9 +1447,8 @@ msgid "Rearrange Autoloads" msgstr "" #: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp -#, fuzzy msgid "Invalid path." -msgstr "गलत फॉणà¥à¤Ÿ का आकार |" +msgstr "अमानà¥à¤¯ रासà¥à¤¤à¤¾à¥¤" #: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp msgid "File does not exist." @@ -1640,9 +1586,8 @@ msgid "On 32-bit exports the embedded PCK cannot be bigger than 4 GiB." msgstr "" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "3D Editor" -msgstr "निरà¥à¤à¤°à¤¤à¤¾ संपादक" +msgstr "3D संपादक" #: editor/editor_feature_profile.cpp #, fuzzy @@ -1979,9 +1924,8 @@ msgid "Inherited by:" msgstr "" #: editor/editor_help.cpp -#, fuzzy msgid "Description" -msgstr "विवरण:" +msgstr "विवरण" #: editor/editor_help.cpp msgid "Online Tutorials" @@ -3455,7 +3399,7 @@ msgstr "" #: editor/export_template_manager.cpp #, fuzzy msgid "Cannot remove temporary file:" -msgstr "निकाला नहीं जा सकता:\n" +msgstr "निकाला नहीं जा सकता:" #: editor/export_template_manager.cpp msgid "" @@ -3464,7 +3408,6 @@ msgid "" msgstr "" #: editor/export_template_manager.cpp -#, fuzzy msgid "Error requesting URL:" msgstr "लोड होने मे तà¥à¤°à¥à¤Ÿà¤¿:" @@ -3490,9 +3433,8 @@ msgid "Connecting..." msgstr "" #: editor/export_template_manager.cpp -#, fuzzy msgid "Can't Connect" -msgstr "जà¥à¤¡à¤¿à¤¯à¥‡" +msgstr "कनेकà¥à¤Ÿ नहीं कर सकते" #: editor/export_template_manager.cpp msgid "Connected" @@ -3516,9 +3458,8 @@ msgid "SSL Handshake Error" msgstr "" #: editor/export_template_manager.cpp -#, fuzzy msgid "Uncompressing Android Build Sources" -msgstr "असंपीड़ित संपतà¥à¤¤à¤¿à¤¯à¤¾à¤‚" +msgstr "अनकॉमिंग à¤à¤‚डà¥à¤°à¥‰à¤‡à¤¡ बिलà¥à¤¡ सà¥à¤°à¥‹à¤¤" #: editor/export_template_manager.cpp msgid "Current Version:" @@ -3537,9 +3478,8 @@ msgid "Remove Template" msgstr "" #: editor/export_template_manager.cpp -#, fuzzy msgid "Select Template File" -msgstr "चयनित फ़ाइलें हटाà¤à¤‚?" +msgstr "टेमà¥à¤ªà¤²à¥‡à¤Ÿ फ़ाइल का चयन करें" #: editor/export_template_manager.cpp msgid "Godot Export Templates" @@ -3558,9 +3498,8 @@ msgid "Select mirror from list: (Shift+Click: Open in Browser)" msgstr "" #: editor/filesystem_dock.cpp -#, fuzzy msgid "Favorites" -msgstr "पसंदीदा:" +msgstr "पसंद" #: editor/filesystem_dock.cpp msgid "Status: Import of file failed. Please fix file and reimport manually." @@ -3575,19 +3514,16 @@ msgid "Cannot move a folder into itself." msgstr "" #: editor/filesystem_dock.cpp -#, fuzzy msgid "Error moving:" -msgstr "लोड होने मे तà¥à¤°à¥à¤Ÿà¤¿:" +msgstr "तà¥à¤°à¥à¤Ÿà¤¿ चलती:" #: editor/filesystem_dock.cpp -#, fuzzy msgid "Error duplicating:" -msgstr "लोड होने मे तà¥à¤°à¥à¤Ÿà¤¿:" +msgstr "तà¥à¤°à¥à¤Ÿà¤¿ दोहराना:" #: editor/filesystem_dock.cpp -#, fuzzy msgid "Unable to update dependencies:" -msgstr "लापता निरà¥à¤à¤°à¤¤à¤¾à¤“ं के कारण दृशà¥à¤¯ लोड करने में विफल रहे:" +msgstr "निरà¥à¤à¤°à¤¤à¤¾ को अपडेट करने में असमरà¥à¤¥:" #: editor/filesystem_dock.cpp editor/scene_tree_editor.cpp msgid "No name provided." @@ -3614,14 +3550,12 @@ msgid "Renaming folder:" msgstr "" #: editor/filesystem_dock.cpp -#, fuzzy msgid "Duplicating file:" -msgstr "पà¥à¤°à¤¤à¤¿à¤²à¤¿à¤ªà¤¿" +msgstr "डà¥à¤ªà¥à¤²à¤¿à¤•ेट फाइल:" #: editor/filesystem_dock.cpp -#, fuzzy msgid "Duplicating folder:" -msgstr "पà¥à¤°à¤¤à¤¿à¤²à¤¿à¤ªà¤¿" +msgstr "डà¥à¤ªà¥à¤²à¤¿à¤•ेटिंग फ़ोलà¥à¤¡à¤°:" #: editor/filesystem_dock.cpp msgid "New Inherited Scene" @@ -3632,23 +3566,20 @@ msgid "Set As Main Scene" msgstr "" #: editor/filesystem_dock.cpp -#, fuzzy msgid "Open Scenes" -msgstr "खोलो इसे" +msgstr "खà¥à¤²à¥‡ दृशà¥à¤¯" #: editor/filesystem_dock.cpp msgid "Instance" msgstr "" #: editor/filesystem_dock.cpp -#, fuzzy msgid "Add to Favorites" -msgstr "पसंदीदा:" +msgstr "पसंदीदा में जोड़ें" #: editor/filesystem_dock.cpp -#, fuzzy msgid "Remove from Favorites" -msgstr "पसंदीदा:" +msgstr "पसंदीदा से निकालें" #: editor/filesystem_dock.cpp msgid "Edit Dependencies..." @@ -3663,27 +3594,24 @@ msgid "Rename..." msgstr "" #: editor/filesystem_dock.cpp -#, fuzzy msgid "Duplicate..." -msgstr "पà¥à¤°à¤¤à¤¿à¤²à¤¿à¤ªà¤¿" +msgstr "डà¥à¤ªà¥à¤²à¤¿à¤•ेट..." #: editor/filesystem_dock.cpp msgid "Move To..." msgstr "" #: editor/filesystem_dock.cpp -#, fuzzy msgid "New Scene..." -msgstr "संसाधन" +msgstr "नया दृशà¥à¤¯..." #: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp msgid "New Script..." msgstr "" #: editor/filesystem_dock.cpp -#, fuzzy msgid "New Resource..." -msgstr "संसाधन" +msgstr "नया संसाधन..." #: editor/filesystem_dock.cpp editor/plugins/visual_shader_editor_plugin.cpp #: editor/script_editor_debugger.cpp @@ -3719,9 +3647,8 @@ msgid "Toggle Split Mode" msgstr "" #: editor/filesystem_dock.cpp -#, fuzzy msgid "Search files" -msgstr "खोज कर:" +msgstr "फाइलें खोजें" #: editor/filesystem_dock.cpp msgid "" @@ -3742,9 +3669,8 @@ msgid "Overwrite" msgstr "" #: editor/filesystem_dock.cpp -#, fuzzy msgid "Create Scene" -msgstr "à¤à¤• नया बनाà¤à¤‚" +msgstr "दृशà¥à¤¯ बनाà¤à¤‚" #: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp msgid "Create Script" @@ -3798,9 +3724,8 @@ msgid "Replace all (no undo)" msgstr "" #: editor/find_in_files.cpp -#, fuzzy msgid "Searching..." -msgstr "खोज कर:" +msgstr "खोज..." #: editor/find_in_files.cpp msgid "Search complete" @@ -3819,19 +3744,16 @@ msgid "Group name already exists." msgstr "" #: editor/groups_editor.cpp -#, fuzzy msgid "Invalid group name." -msgstr "गलत फॉणà¥à¤Ÿ का आकार |" +msgstr "अमानà¥à¤¯ समूह नाम।" #: editor/groups_editor.cpp -#, fuzzy msgid "Rename Group" -msgstr "ऑडियो बस का नाम बदलें" +msgstr "नाम बदलना समूह" #: editor/groups_editor.cpp -#, fuzzy msgid "Delete Group" -msgstr "को हटा दें" +msgstr "गà¥à¤°à¥à¤ª डिलीट करें" #: editor/groups_editor.cpp editor/node_dock.cpp msgid "Groups" @@ -3855,9 +3777,8 @@ msgid "Empty groups will be automatically removed." msgstr "" #: editor/groups_editor.cpp -#, fuzzy msgid "Group Editor" -msgstr "निरà¥à¤à¤°à¤¤à¤¾ संपादक" +msgstr "समूह संपादक" #: editor/groups_editor.cpp msgid "Manage Groups" @@ -3941,15 +3862,15 @@ msgid "Saving..." msgstr "" #: editor/import_dock.cpp -msgid "Set as Default for '%s'" +msgid "%d Files" msgstr "" #: editor/import_dock.cpp -msgid "Clear Default for '%s'" +msgid "Set as Default for '%s'" msgstr "" #: editor/import_dock.cpp -msgid " Files" +msgid "Clear Default for '%s'" msgstr "" #: editor/import_dock.cpp @@ -3957,9 +3878,8 @@ msgid "Import As:" msgstr "" #: editor/import_dock.cpp -#, fuzzy msgid "Preset" -msgstr "रीसेट आकार" +msgstr "पà¥à¤°à¥€à¤¸à¥‡à¤Ÿ" #: editor/import_dock.cpp msgid "Reimport" @@ -4004,9 +3924,8 @@ msgid "Paste Params" msgstr "" #: editor/inspector_dock.cpp -#, fuzzy msgid "Edit Resource Clipboard" -msgstr "संसाधन" +msgstr "à¤à¤¡à¤¿à¤Ÿ रिसोरà¥à¤¸ कà¥à¤²à¤¿à¤ªà¤¬à¥‹à¤°à¥à¤¡" #: editor/inspector_dock.cpp msgid "Copy Resource" @@ -4073,9 +3992,8 @@ msgid "Edit a Plugin" msgstr "" #: editor/plugin_config_dialog.cpp -#, fuzzy msgid "Create a Plugin" -msgstr "सदसà¥à¤¯à¤¤à¤¾ बनाà¤à¤‚" +msgstr "पà¥à¤²à¤—इन बनाà¤à¤‚" #: editor/plugin_config_dialog.cpp msgid "Plugin Name:" @@ -4099,16 +4017,14 @@ msgstr "" #: editor/plugins/abstract_polygon_2d_editor.cpp #: editor/plugins/polygon_2d_editor_plugin.cpp -#, fuzzy msgid "Create Polygon" -msgstr "सदसà¥à¤¯à¤¤à¤¾ बनाà¤à¤‚" +msgstr "बहà¥à¤à¥à¤œ बनाà¤à¤" #: editor/plugins/abstract_polygon_2d_editor.cpp #: editor/plugins/animation_blend_space_1d_editor.cpp #: editor/plugins/animation_blend_space_2d_editor.cpp -#, fuzzy msgid "Create points." -msgstr "à¤à¤• नया बनाà¤à¤‚" +msgstr "अंक बनाà¤à¤‚।" #: editor/plugins/abstract_polygon_2d_editor.cpp msgid "" @@ -4123,9 +4039,8 @@ msgid "Erase points." msgstr "" #: editor/plugins/abstract_polygon_2d_editor.cpp -#, fuzzy msgid "Edit Polygon" -msgstr "सदसà¥à¤¯à¤¤à¤¾ बनाà¤à¤‚" +msgstr "बहà¥à¤à¥à¤œ संपादित करें" #: editor/plugins/abstract_polygon_2d_editor.cpp msgid "Insert Point" @@ -4175,15 +4090,13 @@ msgstr "" #: editor/plugins/animation_blend_space_1d_editor.cpp #: editor/plugins/animation_blend_space_2d_editor.cpp -#, fuzzy msgid "Add Node Point" -msgstr "पसंदीदा:" +msgstr "नोड पà¥à¤µà¤¾à¤‡à¤‚ट जोड़ें" #: editor/plugins/animation_blend_space_1d_editor.cpp #: editor/plugins/animation_blend_space_2d_editor.cpp -#, fuzzy msgid "Add Animation Point" -msgstr "à¤à¤¨à¤¿à¤®à¥‡à¤¶à¤¨ लूप" +msgstr "à¤à¤¨à¤¿à¤®à¥‡à¤¶à¤¨ पà¥à¤µà¤¾à¤‡à¤‚ट जोड़ें" #: editor/plugins/animation_blend_space_1d_editor.cpp msgid "Remove BlendSpace1D Point" @@ -4225,9 +4138,8 @@ msgstr "" #: editor/plugins/animation_blend_space_1d_editor.cpp #: editor/plugins/animation_blend_space_2d_editor.cpp #: editor/plugins/animation_blend_tree_editor_plugin.cpp -#, fuzzy msgid "Open Editor" -msgstr "निरà¥à¤à¤°à¤¤à¤¾ संपादक" +msgstr "ओपन à¤à¤¡à¤¿à¤Ÿà¤°" #: editor/plugins/animation_blend_space_1d_editor.cpp #: editor/plugins/animation_blend_space_2d_editor.cpp @@ -4241,9 +4153,8 @@ msgid "Triangle already exists." msgstr "" #: editor/plugins/animation_blend_space_2d_editor.cpp -#, fuzzy msgid "Add Triangle" -msgstr "टà¥à¤°à¥ˆà¤• जोड़ें" +msgstr "तà¥à¤°à¤¿à¤•ोण जोड़ें" #: editor/plugins/animation_blend_space_2d_editor.cpp msgid "Change BlendSpace2D Limits" @@ -4318,26 +4229,22 @@ msgstr "" #: editor/plugins/animation_blend_tree_editor_plugin.cpp #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Nodes Connected" -msgstr "जà¥à¤¡à¤¿à¤¯à¥‡" +msgstr "नोडà¥à¤¸ कनेकà¥à¤Ÿà¥‡à¤¡" #: editor/plugins/animation_blend_tree_editor_plugin.cpp #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Nodes Disconnected" -msgstr "डिसà¥à¤•नेकà¥à¤Ÿ" +msgstr "नोडà¥à¤¸ डिसà¥à¤•नेकà¥à¤Ÿ किठगà¤" #: editor/plugins/animation_blend_tree_editor_plugin.cpp -#, fuzzy msgid "Set Animation" -msgstr "à¤à¤¨à¤¿à¤®à¥‡à¤¶à¤¨ लूप" +msgstr "सेट à¤à¤¨à¤¿à¤®à¥‡à¤¶à¤¨" #: editor/plugins/animation_blend_tree_editor_plugin.cpp #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Delete Node" -msgstr "को हटा दें" +msgstr "नोड हटाà¤à¤‚" #: editor/plugins/animation_blend_tree_editor_plugin.cpp #: editor/scene_tree_dock.cpp @@ -4372,14 +4279,12 @@ msgid "Anim Clips" msgstr "" #: editor/plugins/animation_blend_tree_editor_plugin.cpp -#, fuzzy msgid "Audio Clips" -msgstr "टà¥à¤°à¥ˆà¤• जोड़ें" +msgstr "ऑडियो कà¥à¤²à¤¿à¤ªà¥à¤¸" #: editor/plugins/animation_blend_tree_editor_plugin.cpp -#, fuzzy msgid "Functions" -msgstr "कारà¥à¤¯à¥‹à¤‚:" +msgstr "कारà¥à¤¯à¥‹à¤‚" #: editor/plugins/animation_blend_tree_editor_plugin.cpp #: editor/plugins/animation_state_machine_editor.cpp @@ -4512,9 +4417,8 @@ msgid "Animation" msgstr "" #: editor/plugins/animation_player_editor_plugin.cpp -#, fuzzy msgid "Edit Transitions..." -msgstr "अनà¥à¤µà¤¾à¤¦ में बदलाव करें:" +msgstr "à¤à¤¡à¤¿à¤Ÿ टà¥à¤°à¤¾à¤‚जिशन..." #: editor/plugins/animation_player_editor_plugin.cpp msgid "Open in Inspector" @@ -4537,9 +4441,8 @@ msgid "Onion Skinning Options" msgstr "" #: editor/plugins/animation_player_editor_plugin.cpp -#, fuzzy msgid "Directions" -msgstr "विवरण:" +msgstr "निरà¥à¤¦à¥‡à¤¶à¥‹à¤‚" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Past" @@ -4613,14 +4516,12 @@ msgid "Move Node" msgstr "" #: editor/plugins/animation_state_machine_editor.cpp -#, fuzzy msgid "Transition exists!" -msgstr "अनà¥à¤µà¤¾à¤¦ में बदलाव करें:" +msgstr "संकà¥à¤°à¤®à¤£ मौजूद है!" #: editor/plugins/animation_state_machine_editor.cpp -#, fuzzy msgid "Add Transition" -msgstr "अनà¥à¤µà¤¾à¤¦ में बदलाव करें:" +msgstr "टà¥à¤°à¤¾à¤‚जिशन जोड़ें" #: editor/plugins/animation_state_machine_editor.cpp #: modules/visual_script/visual_script_editor.cpp @@ -4656,14 +4557,12 @@ msgid "No playback resource set at path: %s." msgstr "" #: editor/plugins/animation_state_machine_editor.cpp -#, fuzzy msgid "Node Removed" -msgstr "मिटाना" +msgstr "नोड हटाया गया" #: editor/plugins/animation_state_machine_editor.cpp -#, fuzzy msgid "Transition Removed" -msgstr "अनà¥à¤µà¤¾à¤¦ में बदलाव करें:" +msgstr "संकà¥à¤°à¤®à¤£ हटाया गया" #: editor/plugins/animation_state_machine_editor.cpp msgid "Set Start Node (Autoplay)" @@ -4677,19 +4576,16 @@ msgid "" msgstr "" #: editor/plugins/animation_state_machine_editor.cpp -#, fuzzy msgid "Create new nodes." -msgstr "à¤à¤• नया बनाà¤à¤‚" +msgstr "नठनोडà¥à¤¸ बनाà¤à¤‚।" #: editor/plugins/animation_state_machine_editor.cpp -#, fuzzy msgid "Connect nodes." -msgstr "जà¥à¤¡à¤¿à¤¯à¥‡" +msgstr "नोडà¥à¤¸ कनेकà¥à¤Ÿ करें।" #: editor/plugins/animation_state_machine_editor.cpp -#, fuzzy msgid "Remove selected node or transition." -msgstr "परियोजना से चयनित फ़ाइलें निकालें? (कोई पूरà¥à¤µà¤µà¤¤ नहीं)" +msgstr "चयनित नोड या संकà¥à¤°à¤®à¤£ निकालें।" #: editor/plugins/animation_state_machine_editor.cpp msgid "Toggle autoplay this animation on start, restart or seek to zero." @@ -4700,9 +4596,8 @@ msgid "Set the end animation. This is useful for sub-transitions." msgstr "" #: editor/plugins/animation_state_machine_editor.cpp -#, fuzzy msgid "Transition: " -msgstr "अनà¥à¤µà¤¾à¤¦ में बदलाव करें:" +msgstr "संकà¥à¤°à¤®à¤£: " #: editor/plugins/animation_state_machine_editor.cpp msgid "Play Mode:" @@ -4711,7 +4606,7 @@ msgstr "" #: editor/plugins/animation_tree_editor_plugin.cpp #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "AnimationTree" -msgstr "" +msgstr "à¤à¤¨à¤¿à¤®à¥‡à¤¶à¤¨à¤Ÿà¥à¤°à¥€" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "New name:" @@ -4882,9 +4777,8 @@ msgid "Request failed." msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp -#, fuzzy msgid "Cannot save response to:" -msgstr "निकाला नहीं जा सकता:\n" +msgstr "जवाब नहीं बचा सकते:" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Write error." @@ -4947,9 +4841,8 @@ msgid "Idle" msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp -#, fuzzy msgid "Install..." -msgstr "इंसà¥à¤Ÿà¥‰à¤²" +msgstr "सà¥à¤¥à¤¾à¤ªà¤¿à¤¤..." #: editor/plugins/asset_library_editor_plugin.cpp msgid "Retry" @@ -4980,14 +4873,12 @@ msgid "Name (Z-A)" msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp -#, fuzzy msgid "License (A-Z)" -msgstr "लाइसेंस" +msgstr "लाइसेंस (à¤-जेड)" #: editor/plugins/asset_library_editor_plugin.cpp -#, fuzzy msgid "License (Z-A)" -msgstr "लाइसेंस" +msgstr "लाइसेंस (जेड-à¤)" #: editor/plugins/asset_library_editor_plugin.cpp msgid "First" @@ -5047,9 +4938,8 @@ msgid "Testing" msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp -#, fuzzy msgid "Loading..." -msgstr "खोज कर:" +msgstr "लोड..." #: editor/plugins/asset_library_editor_plugin.cpp msgid "Assets ZIP File" @@ -5118,28 +5008,24 @@ msgid "Move Vertical Guide" msgstr "" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Create Vertical Guide" -msgstr "à¤à¤• नया बनाà¤à¤‚" +msgstr "वरà¥à¤Ÿà¤¿à¤•ल गाइड बनाà¤à¤‚" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Remove Vertical Guide" -msgstr "मिटाना" +msgstr "वरà¥à¤Ÿà¤¿à¤•ल गाइड निकालें" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Move Horizontal Guide" msgstr "" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Create Horizontal Guide" -msgstr "à¤à¤• नया बनाà¤à¤‚" +msgstr "कà¥à¤·à¥ˆà¤¤à¤¿à¤œ गाइड बनाà¤à¤‚" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Remove Horizontal Guide" -msgstr "मिटाना" +msgstr "कà¥à¤·à¥ˆà¤¤à¤¿à¤œ गाइड निकालें" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Create Horizontal and Vertical Guides" @@ -5291,33 +5177,29 @@ msgstr "" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Group Selected" -msgstr "सà¤à¥€ खंड" +msgstr "समूह चयनित" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Ungroup Selected" -msgstr "सà¤à¥€ खंड" +msgstr "असमूह चयनित" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Paste Pose" msgstr "" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Clear Guides" -msgstr "à¤à¤¨à¥€à¤®à¥‡à¤¶à¤¨ परिवरà¥à¤¤à¤¨ परिणत" +msgstr "सà¥à¤ªà¤·à¥à¤Ÿ गाइड" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Create Custom Bone(s) from Node(s)" msgstr "" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Clear Bones" -msgstr "à¤à¤¨à¥€à¤®à¥‡à¤¶à¤¨ परिवरà¥à¤¤à¤¨ परिणत" +msgstr "साफ हडà¥à¤¡à¤¿à¤¯à¤¾à¤‚" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Make IK Chain" @@ -5336,9 +5218,8 @@ msgstr "" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/texture_region_editor_plugin.cpp #: editor/plugins/tile_set_editor_plugin.cpp scene/gui/graph_edit.cpp -#, fuzzy msgid "Zoom Reset" -msgstr "छोटा करो" +msgstr "ज़ूम रीसेट" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -5570,14 +5451,12 @@ msgid "" msgstr "" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Auto Insert Key" -msgstr "चाबी यहां डालें" +msgstr "ऑटो डालें कà¥à¤‚जी" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Animation Key and Pose Options" -msgstr "à¤à¤¨à¤¿à¤®à¥‡à¤¶à¤¨ लंबाई समय (सेकंडà¥à¤¸)" +msgstr "à¤à¤¨à¤¿à¤®à¥‡à¤¶à¤¨ कà¥à¤‚जी और मà¥à¤¦à¥à¤°à¤¾ विकलà¥à¤ª" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Insert Key (Existing Tracks)" @@ -5636,9 +5515,8 @@ msgid "" msgstr "" #: editor/plugins/collision_polygon_editor_plugin.cpp -#, fuzzy msgid "Create Polygon3D" -msgstr "सदसà¥à¤¯à¤¤à¤¾ बनाà¤à¤‚" +msgstr "बहà¥à¤à¥à¤œ 3डी बनाà¤à¤‚" #: editor/plugins/collision_polygon_editor_plugin.cpp msgid "Edit Poly" @@ -5757,9 +5635,8 @@ msgid "Load Curve Preset" msgstr "" #: editor/plugins/curve_editor_plugin.cpp -#, fuzzy msgid "Add Point" -msgstr "पसंदीदा:" +msgstr "पà¥à¤µà¤¾à¤‡à¤‚ट जोड़ें" #: editor/plugins/curve_editor_plugin.cpp #, fuzzy @@ -5823,11 +5700,11 @@ msgid "Mesh is empty!" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Trimesh Body" +msgid "Couldn't create a Trimesh collision shape." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Convex Body" +msgid "Create Static Trimesh Body" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -5839,12 +5716,29 @@ msgid "Create Trimesh Static Shape" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Failed creating shapes!" +msgid "Can't create a single convex collision shape for the scene root." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Couldn't create a single convex collision shape." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp #, fuzzy -msgid "Create Convex Shape(s)" +msgid "Create Single Convex Shape" +msgstr "à¤à¤• नया बनाà¤à¤‚" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Can't create multiple convex collision shapes for the scene root." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Couldn't create any collision shapes." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Multiple Convex Shapes" msgstr "à¤à¤• नया बनाà¤à¤‚" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -5896,19 +5790,57 @@ msgid "Create Trimesh Static Body" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a StaticBody and assigns a polygon-based collision shape to it " +"automatically.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Trimesh Collision Sibling" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp #, fuzzy -msgid "Create Convex Collision Sibling(s)" +msgid "Create Single Convex Collision Siblings" msgstr "सदसà¥à¤¯à¤¤à¤¾ बनाà¤à¤‚" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a single convex collision shape.\n" +"This is the fastest (but least accurate) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Multiple Convex Collision Siblings" +msgstr "सदसà¥à¤¯à¤¤à¤¾ बनाà¤à¤‚" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is a performance middle-ground between the two above options." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Outline Mesh..." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a static outline mesh. The outline mesh will have its normals " +"flipped automatically.\n" +"This can be used instead of the SpatialMaterial Grow property when using " +"that property isn't possible." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "View UV1" msgstr "" @@ -8336,7 +8268,7 @@ msgstr "" msgid "No VCS addons are available." msgstr "" -#: editor/plugins/version_control_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/version_control_editor_plugin.cpp msgid "Error" msgstr "" @@ -9443,11 +9375,17 @@ msgid "Export With Debug" msgstr "" #: editor/project_manager.cpp -msgid "The path does not exist." +msgid "The path specified doesn't exist." msgstr "" #: editor/project_manager.cpp -msgid "Invalid '.zip' project file, does not contain a 'project.godot' file." +#, fuzzy +msgid "Error opening package file (it's not in ZIP format)." +msgstr "ज़िप फ़ाइल खोलने में तà¥à¤°à¥à¤Ÿà¤¿, पà¥à¤°à¤¾à¤°à¥‚प में नहीं।" + +#: editor/project_manager.cpp +msgid "" +"Invalid \".zip\" project file; it doesn't contain a \"project.godot\" file." msgstr "" #: editor/project_manager.cpp @@ -9455,11 +9393,11 @@ msgid "Please choose an empty folder." msgstr "" #: editor/project_manager.cpp -msgid "Please choose a 'project.godot' or '.zip' file." +msgid "Please choose a \"project.godot\" or \".zip\" file." msgstr "" #: editor/project_manager.cpp -msgid "Directory already contains a Godot project." +msgid "This directory already contains a Godot project." msgstr "" #: editor/project_manager.cpp @@ -9971,9 +9909,8 @@ msgid "Action:" msgstr "" #: editor/project_settings_editor.cpp -#, fuzzy msgid "Action" -msgstr "सà¤à¥€ खंड" +msgstr "कारà¥à¤¯" #: editor/project_settings_editor.cpp msgid "Deadzone" @@ -10041,7 +9978,7 @@ msgstr "" #: editor/project_settings_editor.cpp msgid "Plugins" -msgstr "" +msgstr "पà¥à¤²à¤—इनà¥à¤¸" #: editor/property_editor.cpp msgid "Preset..." @@ -10112,6 +10049,10 @@ msgid "Suffix" msgstr "" #: editor/rename_dialog.cpp +msgid "Use Regular Expressions" +msgstr "" + +#: editor/rename_dialog.cpp msgid "Advanced Options" msgstr "" @@ -10146,7 +10087,7 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -msgid "Per Level counter" +msgid "Per-level Counter" msgstr "" #: editor/rename_dialog.cpp @@ -10176,10 +10117,6 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -msgid "Regular Expressions" -msgstr "" - -#: editor/rename_dialog.cpp msgid "Post-Process" msgstr "" @@ -10188,11 +10125,11 @@ msgid "Keep" msgstr "" #: editor/rename_dialog.cpp -msgid "CamelCase to under_scored" +msgid "PascalCase to snake_case" msgstr "" #: editor/rename_dialog.cpp -msgid "under_scored to CamelCase" +msgid "snake_case to PascalCase" msgstr "" #: editor/rename_dialog.cpp @@ -10212,6 +10149,14 @@ msgstr "" msgid "Reset" msgstr "रीसेट आकार" +#: editor/rename_dialog.cpp +msgid "Regular Expression Error" +msgstr "" + +#: editor/rename_dialog.cpp +msgid "At character %s" +msgstr "" + #: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp msgid "Reparent Node" msgstr "" @@ -10663,7 +10608,7 @@ msgid "Invalid inherited parent name or path." msgstr "" #: editor/script_create_dialog.cpp -msgid "Script is valid." +msgid "Script path/name is valid." msgstr "" #: editor/script_create_dialog.cpp @@ -10762,6 +10707,10 @@ msgid "Copy Error" msgstr "" #: editor/script_editor_debugger.cpp +msgid "Video RAM" +msgstr "" + +#: editor/script_editor_debugger.cpp #, fuzzy msgid "Skip Breakpoints" msgstr "à¤à¤• नया बनाà¤à¤‚" @@ -10811,10 +10760,6 @@ msgid "Total:" msgstr "" #: editor/script_editor_debugger.cpp -msgid "Video Mem" -msgstr "" - -#: editor/script_editor_debugger.cpp msgid "Resource Path" msgstr "" @@ -12361,6 +12306,9 @@ msgstr "" msgid "Constants cannot be modified." msgstr "" +#~ msgid "Replaced %d occurrence(s)." +#~ msgstr "बदल दिया % डी घटना (à¤à¤¸) ।" + #, fuzzy #~ msgid "Brief Description" #~ msgstr "विवरण:" diff --git a/editor/translations/hr.po b/editor/translations/hr.po index bc5abb76fc..5922d2effb 100644 --- a/editor/translations/hr.po +++ b/editor/translations/hr.po @@ -671,8 +671,9 @@ msgid "Line Number:" msgstr "Broj linije:" #: editor/code_editor.cpp -msgid "Replaced %d occurrence(s)." -msgstr "Zamijenjeno %d pojavljivanja." +#, fuzzy +msgid "%d replaced." +msgstr "Zamijeni" #: editor/code_editor.cpp editor/editor_help.cpp msgid "%d match." @@ -3825,15 +3826,16 @@ msgid "Saving..." msgstr "" #: editor/import_dock.cpp -msgid "Set as Default for '%s'" -msgstr "" +#, fuzzy +msgid "%d Files" +msgstr "Datoteka:" #: editor/import_dock.cpp -msgid "Clear Default for '%s'" +msgid "Set as Default for '%s'" msgstr "" #: editor/import_dock.cpp -msgid " Files" +msgid "Clear Default for '%s'" msgstr "" #: editor/import_dock.cpp @@ -5678,11 +5680,11 @@ msgid "Mesh is empty!" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Trimesh Body" +msgid "Couldn't create a Trimesh collision shape." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Convex Body" +msgid "Create Static Trimesh Body" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -5694,11 +5696,27 @@ msgid "Create Trimesh Static Shape" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Failed creating shapes!" +msgid "Can't create a single convex collision shape for the scene root." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Couldn't create a single convex collision shape." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Single Convex Shape" +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Can't create multiple convex collision shapes for the scene root." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Couldn't create any collision shapes." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Convex Shape(s)" +msgid "Create Multiple Convex Shapes" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -5750,11 +5768,40 @@ msgid "Create Trimesh Static Body" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a StaticBody and assigns a polygon-based collision shape to it " +"automatically.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Trimesh Collision Sibling" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Convex Collision Sibling(s)" +msgid "" +"Creates a polygon-based collision shape.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Single Convex Collision Siblings" +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a single convex collision shape.\n" +"This is the fastest (but least accurate) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Multiple Convex Collision Siblings" +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is a performance middle-ground between the two above options." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -5762,6 +5809,14 @@ msgid "Create Outline Mesh..." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a static outline mesh. The outline mesh will have its normals " +"flipped automatically.\n" +"This can be used instead of the SpatialMaterial Grow property when using " +"that property isn't possible." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "View UV1" msgstr "" @@ -8135,7 +8190,7 @@ msgstr "" msgid "No VCS addons are available." msgstr "" -#: editor/plugins/version_control_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/version_control_editor_plugin.cpp msgid "Error" msgstr "" @@ -9229,11 +9284,17 @@ msgid "Export With Debug" msgstr "" #: editor/project_manager.cpp -msgid "The path does not exist." +msgid "The path specified doesn't exist." msgstr "" #: editor/project_manager.cpp -msgid "Invalid '.zip' project file, does not contain a 'project.godot' file." +#, fuzzy +msgid "Error opening package file (it's not in ZIP format)." +msgstr "PogreÅ¡ka prilikom otvaranja datoteke paketa, nije u ZIP formatu." + +#: editor/project_manager.cpp +msgid "" +"Invalid \".zip\" project file; it doesn't contain a \"project.godot\" file." msgstr "" #: editor/project_manager.cpp @@ -9241,11 +9302,11 @@ msgid "Please choose an empty folder." msgstr "" #: editor/project_manager.cpp -msgid "Please choose a 'project.godot' or '.zip' file." +msgid "Please choose a \"project.godot\" or \".zip\" file." msgstr "" #: editor/project_manager.cpp -msgid "Directory already contains a Godot project." +msgid "This directory already contains a Godot project." msgstr "" #: editor/project_manager.cpp @@ -9891,6 +9952,10 @@ msgid "Suffix" msgstr "" #: editor/rename_dialog.cpp +msgid "Use Regular Expressions" +msgstr "" + +#: editor/rename_dialog.cpp msgid "Advanced Options" msgstr "" @@ -9925,7 +9990,7 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -msgid "Per Level counter" +msgid "Per-level Counter" msgstr "" #: editor/rename_dialog.cpp @@ -9955,10 +10020,6 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -msgid "Regular Expressions" -msgstr "" - -#: editor/rename_dialog.cpp msgid "Post-Process" msgstr "" @@ -9967,11 +10028,11 @@ msgid "Keep" msgstr "" #: editor/rename_dialog.cpp -msgid "CamelCase to under_scored" +msgid "PascalCase to snake_case" msgstr "" #: editor/rename_dialog.cpp -msgid "under_scored to CamelCase" +msgid "snake_case to PascalCase" msgstr "" #: editor/rename_dialog.cpp @@ -9990,6 +10051,14 @@ msgstr "" msgid "Reset" msgstr "" +#: editor/rename_dialog.cpp +msgid "Regular Expression Error" +msgstr "" + +#: editor/rename_dialog.cpp +msgid "At character %s" +msgstr "" + #: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp msgid "Reparent Node" msgstr "" @@ -10433,7 +10502,7 @@ msgid "Invalid inherited parent name or path." msgstr "" #: editor/script_create_dialog.cpp -msgid "Script is valid." +msgid "Script path/name is valid." msgstr "" #: editor/script_create_dialog.cpp @@ -10529,6 +10598,10 @@ msgid "Copy Error" msgstr "" #: editor/script_editor_debugger.cpp +msgid "Video RAM" +msgstr "" + +#: editor/script_editor_debugger.cpp msgid "Skip Breakpoints" msgstr "" @@ -10577,10 +10650,6 @@ msgid "Total:" msgstr "" #: editor/script_editor_debugger.cpp -msgid "Video Mem" -msgstr "" - -#: editor/script_editor_debugger.cpp msgid "Resource Path" msgstr "" @@ -12108,6 +12177,9 @@ msgstr "" msgid "Constants cannot be modified." msgstr "" +#~ msgid "Replaced %d occurrence(s)." +#~ msgstr "Zamijenjeno %d pojavljivanja." + #, fuzzy #~ msgid "Brief Description" #~ msgstr "Opis:" diff --git a/editor/translations/hu.po b/editor/translations/hu.po index af13990fdc..4a2e0eb506 100644 --- a/editor/translations/hu.po +++ b/editor/translations/hu.po @@ -10,12 +10,13 @@ # Tusa Gamer <tusagamer@mailinator.com>, 2018. # Máté Lugosi <mate.lugosi@gmail.com>, 2019. # sztrovacsek <magadeve@gmail.com>, 2019. +# Deleted User <noreply+18797@weblate.org>, 2020. msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2019-12-26 00:02+0000\n" -"Last-Translator: sztrovacsek <magadeve@gmail.com>\n" +"PO-Revision-Date: 2020-01-30 03:56+0000\n" +"Last-Translator: Deleted User <noreply+18797@weblate.org>\n" "Language-Team: Hungarian <https://hosted.weblate.org/projects/godot-engine/" "godot/hu/>\n" "Language: hu\n" @@ -23,7 +24,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 3.10\n" +"X-Generator: Weblate 3.11-dev\n" #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/visual_script/visual_script_builtin_funcs.cpp @@ -32,8 +33,9 @@ msgstr "" "Érvénytelen tÃpus argumentum a convert()-hez használjon TYPE_* konstansokat." #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp +#, fuzzy msgid "Expected a string of length 1 (a character)." -msgstr "" +msgstr "Egy karakter hosszúságú string-et várt." #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/mono/glue/gd_glue.cpp @@ -120,7 +122,6 @@ msgid "Value:" msgstr "Érték:" #: editor/animation_bezier_editor.cpp -#, fuzzy msgid "Insert Key Here" msgstr "Kulcs Beszúrása" @@ -717,8 +718,9 @@ msgid "Line Number:" msgstr "Sor Száma:" #: editor/code_editor.cpp -msgid "Replaced %d occurrence(s)." -msgstr "Lecserélve %d elÅ‘fordulás." +#, fuzzy +msgid "%d replaced." +msgstr "Csere..." #: editor/code_editor.cpp editor/editor_help.cpp msgid "%d match." @@ -4135,6 +4137,11 @@ msgid "Saving..." msgstr "Mentés..." #: editor/import_dock.cpp +#, fuzzy +msgid "%d Files" +msgstr " Fájlok" + +#: editor/import_dock.cpp msgid "Set as Default for '%s'" msgstr "BeállÃtás Alapértelmezettként '%s'-hez" @@ -4143,10 +4150,6 @@ msgid "Clear Default for '%s'" msgstr "Alapértelmezett Törlése '%s'-nél" #: editor/import_dock.cpp -msgid " Files" -msgstr " Fájlok" - -#: editor/import_dock.cpp msgid "Import As:" msgstr "Importálás Mint:" @@ -6143,12 +6146,13 @@ msgid "Mesh is empty!" msgstr "A háló üres!" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Trimesh Body" -msgstr "Statikus Trimesh Test Létrehozása" +#, fuzzy +msgid "Couldn't create a Trimesh collision shape." +msgstr "Trimesh Ütközési Testvér Létrehozása" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Convex Body" -msgstr "Statikus Konvex Test Létrehozása" +msgid "Create Static Trimesh Body" +msgstr "Statikus Trimesh Test Létrehozása" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "This doesn't work on scene root!" @@ -6160,12 +6164,30 @@ msgid "Create Trimesh Static Shape" msgstr "Trimesh Alakzat Létrehozása" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Failed creating shapes!" +msgid "Can't create a single convex collision shape for the scene root." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Couldn't create a single convex collision shape." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Single Convex Shape" +msgstr "Konvex Alakzat Létrehozása" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Can't create multiple convex collision shapes for the scene root." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp #, fuzzy -msgid "Create Convex Shape(s)" +msgid "Couldn't create any collision shapes." +msgstr "KörvonalkészÃtés sikertelen!" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Multiple Convex Shapes" msgstr "Konvex Alakzat Létrehozása" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -6218,19 +6240,57 @@ msgid "Create Trimesh Static Body" msgstr "Trimesh Statikus Test Létrehozása" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a StaticBody and assigns a polygon-based collision shape to it " +"automatically.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Trimesh Collision Sibling" msgstr "Trimesh Ütközési Testvér Létrehozása" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp #, fuzzy -msgid "Create Convex Collision Sibling(s)" +msgid "Create Single Convex Collision Siblings" msgstr "Konvex Ütközési Testvér Létrehozása" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a single convex collision shape.\n" +"This is the fastest (but least accurate) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Multiple Convex Collision Siblings" +msgstr "Konvex Ütközési Testvér Létrehozása" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is a performance middle-ground between the two above options." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Outline Mesh..." msgstr "Körvonalháló Létrehozása..." #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a static outline mesh. The outline mesh will have its normals " +"flipped automatically.\n" +"This can be used instead of the SpatialMaterial Grow property when using " +"that property isn't possible." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "View UV1" msgstr "UV1 Megtekintése" @@ -8768,7 +8828,7 @@ msgstr "TileSet-re..." msgid "No VCS addons are available." msgstr "" -#: editor/plugins/version_control_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/version_control_editor_plugin.cpp msgid "Error" msgstr "" @@ -9912,11 +9972,18 @@ msgid "Export With Debug" msgstr "" #: editor/project_manager.cpp -msgid "The path does not exist." -msgstr "" +#, fuzzy +msgid "The path specified doesn't exist." +msgstr "A fájl nem létezik." #: editor/project_manager.cpp -msgid "Invalid '.zip' project file, does not contain a 'project.godot' file." +#, fuzzy +msgid "Error opening package file (it's not in ZIP format)." +msgstr "Hiba a csomagfájl megnyitása során, nem zip formátumú." + +#: editor/project_manager.cpp +msgid "" +"Invalid \".zip\" project file; it doesn't contain a \"project.godot\" file." msgstr "" #: editor/project_manager.cpp @@ -9924,11 +9991,11 @@ msgid "Please choose an empty folder." msgstr "" #: editor/project_manager.cpp -msgid "Please choose a 'project.godot' or '.zip' file." +msgid "Please choose a \"project.godot\" or \".zip\" file." msgstr "" #: editor/project_manager.cpp -msgid "Directory already contains a Godot project." +msgid "This directory already contains a Godot project." msgstr "" #: editor/project_manager.cpp @@ -10590,6 +10657,11 @@ msgstr "" #: editor/rename_dialog.cpp #, fuzzy +msgid "Use Regular Expressions" +msgstr "Jelenlegi Verzió:" + +#: editor/rename_dialog.cpp +#, fuzzy msgid "Advanced Options" msgstr "Illesztési beállÃtások" @@ -10628,7 +10700,7 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -msgid "Per Level counter" +msgid "Per-level Counter" msgstr "" #: editor/rename_dialog.cpp @@ -10659,10 +10731,6 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -msgid "Regular Expressions" -msgstr "" - -#: editor/rename_dialog.cpp msgid "Post-Process" msgstr "" @@ -10671,11 +10739,11 @@ msgid "Keep" msgstr "" #: editor/rename_dialog.cpp -msgid "CamelCase to under_scored" +msgid "PascalCase to snake_case" msgstr "" #: editor/rename_dialog.cpp -msgid "under_scored to CamelCase" +msgid "snake_case to PascalCase" msgstr "" #: editor/rename_dialog.cpp @@ -10697,6 +10765,15 @@ msgstr "Mind Nagybetű" msgid "Reset" msgstr "NagyÃtás VisszaállÃtása" +#: editor/rename_dialog.cpp +msgid "Regular Expression Error" +msgstr "" + +#: editor/rename_dialog.cpp +#, fuzzy +msgid "At character %s" +msgstr "Érvényes karakterek:" + #: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp msgid "Reparent Node" msgstr "" @@ -11165,7 +11242,7 @@ msgstr "" #: editor/script_create_dialog.cpp #, fuzzy -msgid "Script is valid." +msgid "Script path/name is valid." msgstr "Az animációs fa érvényes." #: editor/script_create_dialog.cpp @@ -11271,6 +11348,10 @@ msgid "Copy Error" msgstr "Hiba Másolása" #: editor/script_editor_debugger.cpp +msgid "Video RAM" +msgstr "" + +#: editor/script_editor_debugger.cpp #, fuzzy msgid "Skip Breakpoints" msgstr "Pontok Törlése" @@ -11321,10 +11402,6 @@ msgid "Total:" msgstr "" #: editor/script_editor_debugger.cpp -msgid "Video Mem" -msgstr "" - -#: editor/script_editor_debugger.cpp msgid "Resource Path" msgstr "" @@ -12903,6 +12980,12 @@ msgstr "" msgid "Constants cannot be modified." msgstr "" +#~ msgid "Replaced %d occurrence(s)." +#~ msgstr "Lecserélve %d elÅ‘fordulás." + +#~ msgid "Create Static Convex Body" +#~ msgstr "Statikus Konvex Test Létrehozása" + #~ msgid "" #~ "There are currently no tutorials for this class, you can [color=$color]" #~ "[url=$url]contribute one[/url][/color] or [color=$color][url=" diff --git a/editor/translations/id.po b/editor/translations/id.po index 4208edb582..6a76af5db6 100644 --- a/editor/translations/id.po +++ b/editor/translations/id.po @@ -11,7 +11,7 @@ # Khairul Hidayat <khairulcyber4rt@gmail.com>, 2016. # Reza Hidayat Bayu Prabowo <rh.bayu.prabowo@gmail.com>, 2018, 2019. # Romi Kusuma Bakti <romikusumab@gmail.com>, 2017, 2018. -# Sofyan Sugianto <sofyanartem@gmail.com>, 2017-2018, 2019. +# Sofyan Sugianto <sofyanartem@gmail.com>, 2017-2018, 2019, 2020. # Tito <ijavadroid@gmail.com>, 2018. # Tom My <tom.asadinawan@gmail.com>, 2017. # yursan9 <rizal.sagi@gmail.com>, 2016. @@ -22,12 +22,15 @@ # herri siagian <herry.it.2007@gmail.com>, 2019. # MonsterGila <fikrirazor@outlook.co.id>, 2019. # Modeus Darksono <garuga17@gmail.com>, 2019. +# Akhmad Zulfikar <azuldegratz@gmail.com>, 2020. +# Ade Fikri Malihuddin <ade.fm97@gmail.com>, 2020. +# zephyroths <ridho.hikaru@gmail.com>, 2020. msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2019-12-13 09:38+0000\n" -"Last-Translator: Modeus Darksono <garuga17@gmail.com>\n" +"PO-Revision-Date: 2020-02-16 15:21+0000\n" +"Last-Translator: Sofyan Sugianto <sofyanartem@gmail.com>\n" "Language-Team: Indonesian <https://hosted.weblate.org/projects/godot-engine/" "godot/id/>\n" "Language: id\n" @@ -35,7 +38,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Weblate 3.10-dev\n" +"X-Generator: Weblate 3.11-dev\n" #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/visual_script/visual_script_builtin_funcs.cpp @@ -45,13 +48,13 @@ msgstr "" #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp msgid "Expected a string of length 1 (a character)." -msgstr "" +msgstr "String dengan panjang 1 (karakter) yang diharapkan." #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: 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 "Tidak cukup bytes untuk menerjemahkan, atau format tidak sah." +msgstr "Tidak cukup bytes untuk mendekode bytes, atau format tidak valid." #: core/math/expression.cpp msgid "Invalid input %i (not passed) in expression" @@ -438,7 +441,7 @@ msgstr "Tidak memungkinkan untuk menambah track baru tanpa akar" #: editor/animation_track_editor.cpp msgid "Invalid track for Bezier (no suitable sub-properties)" -msgstr "" +msgstr "Track tidak valid untuk Bezier (tidak ada sub-properti yang cocok)" #: editor/animation_track_editor.cpp msgid "Add Bezier Track" @@ -535,7 +538,7 @@ msgstr "Susun Track-track dengan node atau tampilkan sebagai daftar biasa." #: editor/animation_track_editor.cpp msgid "Snap:" -msgstr "Snap:" +msgstr "Pengancingan:" #: editor/animation_track_editor.cpp msgid "Animation step value." @@ -657,7 +660,7 @@ msgstr "Rasio Skala:" #: editor/animation_track_editor.cpp msgid "Select Tracks to Copy" -msgstr "Pilih track untuk disalin:" +msgstr "Pilih Trek untuk Disalin" #: editor/animation_track_editor.cpp editor/editor_log.cpp #: editor/editor_properties.cpp @@ -705,8 +708,9 @@ msgid "Line Number:" msgstr "Nomor Baris:" #: editor/code_editor.cpp -msgid "Replaced %d occurrence(s)." -msgstr "kejadian %d diganti." +#, fuzzy +msgid "%d replaced." +msgstr "Gantikan..." #: editor/code_editor.cpp editor/editor_help.cpp msgid "%d match." @@ -823,9 +827,8 @@ msgid "Extra Call Arguments:" msgstr "Argumen-argumen Panggilan Ekstra:" #: editor/connections_dialog.cpp -#, fuzzy msgid "Receiver Method:" -msgstr "Pilih Method/Fungsi" +msgstr "Fungsi Penerima:" #: editor/connections_dialog.cpp msgid "Advanced" @@ -1048,7 +1051,7 @@ msgid "" "work.\n" "Remove them anyway? (no undo)" msgstr "" -"File-file yang telah dihapus diperlukan oleh sumber lain agar mereka dapat " +"File-file yang telah dihapus diperlukan oleh resource lain agar mereka dapat " "bekerja.\n" "Hapus saja? (tidak bisa dibatalkan/undo)" @@ -1106,7 +1109,7 @@ msgstr "Memiliki" #: editor/dependency_editor.cpp msgid "Resources Without Explicit Ownership:" -msgstr "Resource-resource tanpa kepemilikan yang jelas:" +msgstr "Resource Tanpa Kepemilikan yang Jelas:" #: editor/dictionary_property_edit.cpp msgid "Change Dictionary Key" @@ -1209,9 +1212,8 @@ msgid "Error opening package file, not in ZIP format." msgstr "Gagal saat membuka paket, tidak dalam bentuk zip." #: editor/editor_asset_installer.cpp -#, fuzzy msgid "%s (Already Exists)" -msgstr "Autoload '%s' telah ada!" +msgstr "%s (Sudah Ada)" #: editor/editor_asset_installer.cpp msgid "Uncompressing Assets" @@ -1222,9 +1224,8 @@ msgid "The following files failed extraction from package:" msgstr "Berkas berikut gagal diekstrak dari paket:" #: editor/editor_asset_installer.cpp -#, fuzzy msgid "And %s more files." -msgstr "%d file lagi" +msgstr "Dan %s berkas lebih banyak." #: editor/editor_asset_installer.cpp editor/project_manager.cpp msgid "Package installed successfully!" @@ -1236,9 +1237,8 @@ msgid "Success!" msgstr "Sukses!" #: editor/editor_asset_installer.cpp -#, fuzzy msgid "Package Contents:" -msgstr "Konten:" +msgstr "Isi Paket:" #: editor/editor_asset_installer.cpp editor/editor_node.cpp msgid "Install" @@ -1378,9 +1378,8 @@ msgid "Invalid file, not an audio bus layout." msgstr "Berkas salah, tidak layout suara bus." #: editor/editor_audio_buses.cpp -#, fuzzy msgid "Error saving file: %s" -msgstr "Galat saat menyimpan berkas!" +msgstr "Galat menyimpan berkas: %s" #: editor/editor_audio_buses.cpp msgid "Add Bus" @@ -1482,7 +1481,7 @@ msgstr "File tidak ada." #: editor/editor_autoload_settings.cpp msgid "Not in resource path." -msgstr "Tidak didalam path resource." +msgstr "Tidak dalam lokasi resource." #: editor/editor_autoload_settings.cpp msgid "Add AutoLoad" @@ -1603,7 +1602,7 @@ msgstr "" #: platform/iphone/export/export.cpp platform/javascript/export/export.cpp #: platform/osx/export/export.cpp platform/uwp/export/export.cpp msgid "Custom debug template not found." -msgstr "Debug template kustom tidak ditemukan." +msgstr "Templat awakutu kustom tidak ditemukan." #: editor/editor_export.cpp platform/android/export/export.cpp #: platform/iphone/export/export.cpp platform/javascript/export/export.cpp @@ -1751,9 +1750,8 @@ msgid "Erase Profile" msgstr "Hapus Profil" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Godot Feature Profile" -msgstr "Kelola Editor Fitur Profil" +msgstr "Profil Fitur Godot" #: editor/editor_feature_profile.cpp msgid "Import Profile(s)" @@ -1765,7 +1763,7 @@ msgstr "Ekspor Profil" #: editor/editor_feature_profile.cpp msgid "Manage Editor Feature Profiles" -msgstr "Kelola Editor Fitur Profil" +msgstr "Kelola Editor Profil Fitur" #: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp msgid "Select Current Folder" @@ -1956,9 +1954,8 @@ msgid "Inherited by:" msgstr "Diturunkan oleh:" #: editor/editor_help.cpp -#, fuzzy msgid "Description" -msgstr "Deskripsi:" +msgstr "Deskripsi" #: editor/editor_help.cpp msgid "Online Tutorials" @@ -1969,14 +1966,12 @@ msgid "Properties" msgstr "Properti Objek" #: editor/editor_help.cpp -#, fuzzy msgid "override:" -msgstr "Menimpa" +msgstr "menimpa:" #: editor/editor_help.cpp -#, fuzzy msgid "default:" -msgstr "Bawaan" +msgstr "baku:" #: editor/editor_help.cpp msgid "Methods" @@ -1999,9 +1994,8 @@ msgid "Property Descriptions" msgstr "Deskripsi Properti" #: editor/editor_help.cpp -#, fuzzy msgid "(value)" -msgstr "Nilai:" +msgstr "(nilai)" #: editor/editor_help.cpp msgid "" @@ -2030,12 +2024,11 @@ msgstr "Mencari Bantuan" #: editor/editor_help_search.cpp msgid "Case Sensitive" -msgstr "Case Sensitive" +msgstr "Peka terhadap Huruf Besar/Kecil" #: editor/editor_help_search.cpp -#, fuzzy msgid "Show Hierarchy" -msgstr "Tampilkan Bantuan-bantuan" +msgstr "Tampilkan Hirarki" #: editor/editor_help_search.cpp msgid "Display All" @@ -2074,7 +2067,6 @@ msgid "Class" msgstr "Kelas" #: editor/editor_help_search.cpp -#, fuzzy msgid "Method" msgstr "Fungsi" @@ -2087,14 +2079,12 @@ msgid "Constant" msgstr "Konstan" #: editor/editor_help_search.cpp -#, fuzzy msgid "Property" -msgstr "Properti:" +msgstr "Properti" #: editor/editor_help_search.cpp -#, fuzzy msgid "Theme Property" -msgstr "Properti-properti Tema" +msgstr "Properti Tema" #: editor/editor_inspector.cpp editor/project_settings_editor.cpp msgid "Property:" @@ -2178,7 +2168,7 @@ msgstr "Jendela Baru" #: editor/editor_node.cpp msgid "Imported resources can't be saved." -msgstr "Sumber daya yang diimpor tidak dapat disimpan." +msgstr "Resource yang diimpor tidak dapat disimpan." #: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp #: scene/gui/dialogs.cpp @@ -2187,15 +2177,15 @@ msgstr "Oke" #: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp msgid "Error saving resource!" -msgstr "Error menyimpan resource!" +msgstr "Galat saat menyimpan resource!" #: editor/editor_node.cpp msgid "" "This resource can't be saved because it does not belong to the edited scene. " "Make it unique first." msgstr "" -"Sumber daya ini tidak dapat disimpan karena bukan milik skena yang " -"disunting. Buatlah unik terlebih dahulu." +"Resource ini tidak dapat disimpan karena bukan milik skena yang disunting. " +"Buatlah unik terlebih dahulu." #: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp msgid "Save Resource As..." @@ -2292,7 +2282,7 @@ msgstr "Error mencoba untuk menyimpan layout!" #: editor/editor_node.cpp msgid "Default editor layout overridden." -msgstr "Layout editor default ditimpa." +msgstr "Tata letak baku editor ditimpa." #: editor/editor_node.cpp msgid "Layout name not found!" @@ -2308,7 +2298,7 @@ msgid "" "Please read the documentation relevant to importing scenes to better " "understand this workflow." msgstr "" -"Sumber daya ini milik skena yang telah diimpor, jadi tidak dapat disunting.\n" +"Resource ini milik skena yang telah diimpor, jadi tidak dapat disunting.\n" "Harap baca dokumentasi yang relevan dalam mengimpor skena untuk lebih " "memahami alur kerjanya." @@ -2317,7 +2307,7 @@ msgid "" "This resource belongs to a scene that was instanced or inherited.\n" "Changes to it won't be kept when saving the current scene." msgstr "" -"Sumber daya ini milik skena yang di-instance atau diwariskan.\n" +"Resource ini milik skena yang di-instance atau diwariskan.\n" "Perubahan tidak akan disimpan ketika menyimpan skena saat ini." #: editor/editor_node.cpp @@ -2325,8 +2315,8 @@ msgid "" "This resource was imported, so it's not editable. Change its settings in the " "import panel and then re-import." msgstr "" -"Sumber daya ini telah diimpor, jadi tidak dapat disunting. Ubah " -"pengaturannya pada panel impor kemudian impor kembali." +"Resource ini telah diimpor, jadi tidak dapat disunting. Ubah pengaturannya " +"pada panel impor kemudian impor kembali." #: editor/editor_node.cpp msgid "" @@ -2347,7 +2337,7 @@ msgid "" "Please read the documentation relevant to debugging to better understand " "this workflow." msgstr "" -"Ini merupakan objek jarak jauh, jadi perubahan tidak akan tersimpan.\n" +"Ini merupakan objek remote, jadi perubahan tidak akan tersimpan.\n" "Harap baca dokumentasi yang relevan dalam mengawakutu untuk lebih memahami " "alur kerjanya." @@ -2395,7 +2385,7 @@ msgstr "Simpan perubahan '%s' sebelum menutupnya?" #: editor/editor_node.cpp msgid "Saved %s modified resource(s)." -msgstr "Menyimpan sumber daya %s yang diubah." +msgstr "Menyimpan resource %s yang diubah." #: editor/editor_node.cpp msgid "A root node is required to save the scene." @@ -2528,7 +2518,7 @@ msgstr "" msgid "" "Unable to load addon script from path: '%s' Base type is not EditorPlugin." msgstr "" -"Tidak dapat memuat addon script dari jalur: '%s' tipe basis tidak " +"Tidak dapat memuat skrip addon dari jalur: '%s' karena jenis Basisnya bukan " "EditorPlugin." #: editor/editor_node.cpp @@ -2666,7 +2656,7 @@ msgstr "Tambah skena baru." #: editor/editor_node.cpp msgid "Scene" -msgstr "Suasana" +msgstr "Skena" #: editor/editor_node.cpp msgid "Go to previously opened scene." @@ -2686,7 +2676,7 @@ msgstr "Tab sebelumnya" #: editor/editor_node.cpp msgid "Filter Files..." -msgstr "Saring berkas..." +msgstr "Filter Berkas..." #: editor/editor_node.cpp msgid "Operations with scene files." @@ -2785,7 +2775,7 @@ msgstr "Alat-alat" #: editor/editor_node.cpp msgid "Orphan Resource Explorer..." -msgstr "Penjelajah Resource Orphan…" +msgstr "Penjelajah Resource Orphan..." #: editor/editor_node.cpp msgid "Quit to Project List" @@ -2794,19 +2784,19 @@ msgstr "Keluar ke daftar proyek" #: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp #: editor/project_export.cpp msgid "Debug" -msgstr "\"Debug\"" +msgstr "Awakutu" #: editor/editor_node.cpp msgid "Deploy with Remote Debug" -msgstr "Deploy dengan Remote Debug" +msgstr "Deploy dengan Awakutu Jarak Jauh" #: editor/editor_node.cpp msgid "" "When exporting or deploying, the resulting executable will attempt to " "connect to the IP of this computer in order to be debugged." msgstr "" -"Ketika ekspor atau deploying, hasil executable akan mencoba terhubung ke IP " -"komputer dengan untuk debug." +"Saat mengekspor atau mendeploy, hasil executable akan mencoba terhubung ke " +"IP komputer untuk diawakutu." #: editor/editor_node.cpp msgid "Small Deploy with Network FS" @@ -2823,7 +2813,7 @@ msgid "" msgstr "" "Ketika opsi ini aktif, ekspor atau deploy akan menghasilkan minimal " "executable.\n" -"Filesystem akan tersedia dari proyek dari editor melalui jaringan.\n" +"Berkas sistem akan tersedia dari proyek dari editor melalui jaringan.\n" "Pada Android, deploy akan menggunakan kabel USB untuk performa yang lebih " "cepat. Opsi ini mempercepat pengujian dengan jejak kaki yang besar." @@ -2862,10 +2852,10 @@ msgid "" "When used remotely on a device, this is more efficient with network " "filesystem." msgstr "" -"Ketika opsi ini aktif, perubahan yang dibuat pada scene lewat editor akan di " -"replika pada permainan yang sedang berjalan.\n" +"Ketika opsi ini aktif, perubahan yang dibuat pada skena melalui editor akan " +"direplika pada gim yang sedang berjalan.\n" "Ketika penggunaan remote pada sebuah perangkat, akan lebih efisien dengan " -"jaringan filesystem." +"berkas sistem jaringan." #: editor/editor_node.cpp msgid "Sync Script Changes" @@ -2889,7 +2879,7 @@ msgstr "Editor" #: editor/editor_node.cpp msgid "Editor Settings..." -msgstr "Pengaturan Editor…" +msgstr "Pengaturan Editor..." #: editor/editor_node.cpp msgid "Editor Layout" @@ -2901,7 +2891,7 @@ msgstr "Ambil Tangkapan Layar" #: editor/editor_node.cpp msgid "Screenshots are stored in the Editor Data/Settings Folder." -msgstr "Tangkapan Layar disimpan di folder Data/Pengaturan Editor." +msgstr "Tangkapan layar disimpan dalam folder Data/Pengaturan Editor." #: editor/editor_node.cpp msgid "Toggle Fullscreen" @@ -2913,7 +2903,7 @@ msgstr "Jungkitkan Konsol Sistem" #: editor/editor_node.cpp msgid "Open Editor Data/Settings Folder" -msgstr "Buka Direktori Editor Data/Pengaturan" +msgstr "Buka Direktori Data/Pengaturan Editor" #: editor/editor_node.cpp msgid "Open Editor Data Folder" @@ -2921,11 +2911,11 @@ msgstr "Buka Folder Data Editor" #: editor/editor_node.cpp msgid "Open Editor Settings Folder" -msgstr "Buka Direktori Editor Pengaturan" +msgstr "Buka Direktori Pengaturan Editor" #: editor/editor_node.cpp msgid "Manage Editor Features..." -msgstr "Kelola Editor Fitur…" +msgstr "Kelola Fitur Editor..." #: editor/editor_node.cpp msgid "Manage Export Templates..." @@ -2975,7 +2965,7 @@ msgstr "Mainkan" #: editor/editor_node.cpp msgid "Pause the scene execution for debugging." -msgstr "" +msgstr "Hentikan sementara skena untuk mengawakutu." #: editor/editor_node.cpp msgid "Pause Scene" @@ -3089,9 +3079,8 @@ msgid "Import Templates From ZIP File" msgstr "Impor Templat dari Berkas ZIP" #: editor/editor_node.cpp -#, fuzzy msgid "Template Package" -msgstr "Manajer Templat Ekspor" +msgstr "Paket Templat" #: editor/editor_node.cpp msgid "Export Library" @@ -3142,13 +3131,12 @@ msgid "Open the previous Editor" msgstr "Buka Editor Sebelumnya" #: editor/editor_node.h -#, fuzzy msgid "Warning!" -msgstr "Peringatan" +msgstr "Peringatan!" #: editor/editor_path.cpp msgid "No sub-resources found." -msgstr "Tidak ada sub-sumber yang ditemukan." +msgstr "Tidak ada sub-resourc yang ditemukan." #: editor/editor_plugin.cpp msgid "Creating Mesh Previews" @@ -3272,9 +3260,9 @@ msgid "" "Can't create a ViewportTexture on resources saved as a file.\n" "Resource needs to belong to a scene." msgstr "" -"Tidak dapat membuat ViewportTexture pada sumber daya yang disimpan sebagai " +"Tidak dapat membuat ViewportTexture pada resource yang disimpan sebagai " "berkas.\n" -"Sumber daya harus dimiliki oleh sebuah skena." +"Resource harus dimiliki oleh sebuah skena." #: editor/editor_properties.cpp msgid "" @@ -3285,7 +3273,7 @@ msgid "" msgstr "" "Tidak dapat membuat ViewportTexture pada resource ini karena tidak dibuat " "lokal ke skena.\n" -"Silakan aktifkan properti 'lokal ke skena' di atasnya (dan semua sumber daya " +"Silakan aktifkan properti 'lokal ke skena' di atasnya (dan semua resource " "yang memuatnya sampai node)." #: editor/editor_properties.cpp editor/property_editor.cpp @@ -3466,11 +3454,11 @@ msgstr "Mengimpor:" #: editor/export_template_manager.cpp msgid "Error getting the list of mirrors." -msgstr "" +msgstr "Galat dalam mendapatkan daftar mirror." #: editor/export_template_manager.cpp msgid "Error parsing JSON of mirror list. Please report this issue!" -msgstr "" +msgstr "Galat mengurai JSON dari daftar mirror. Silakan laporkan masalah ini!" #: editor/export_template_manager.cpp msgid "" @@ -3599,9 +3587,8 @@ msgid "Select Template File" msgstr "Pilih berkas templat" #: editor/export_template_manager.cpp -#, fuzzy msgid "Godot Export Templates" -msgstr "Memuat Ekspor Template-template." +msgstr "Templat Ekspor Godot" #: editor/export_template_manager.cpp msgid "Export Template Manager" @@ -3627,7 +3614,7 @@ msgstr "" #: editor/filesystem_dock.cpp msgid "Cannot move/rename resources root." -msgstr "Tidak bisa memindah/mengubah nama aset root." +msgstr "Tidak bisa memindah/mengubah nama resource root." #: editor/filesystem_dock.cpp msgid "Cannot move a folder into itself." @@ -3682,9 +3669,8 @@ msgid "New Inherited Scene" msgstr "Skena Warisan Baru" #: editor/filesystem_dock.cpp -#, fuzzy msgid "Set As Main Scene" -msgstr "Skena Utama" +msgstr "Jadikan sebagai Skena Utama" #: editor/filesystem_dock.cpp msgid "Open Scenes" @@ -3732,7 +3718,7 @@ msgstr "Skrip Baru..." #: editor/filesystem_dock.cpp msgid "New Resource..." -msgstr "Sumber Daya Baru..." +msgstr "Resource Baru..." #: editor/filesystem_dock.cpp editor/plugins/visual_shader_editor_plugin.cpp #: editor/script_editor_debugger.cpp @@ -3891,7 +3877,7 @@ msgstr "Node tidak dalam Grup" #: editor/groups_editor.cpp editor/scene_tree_dock.cpp #: editor/scene_tree_editor.cpp msgid "Filter nodes" -msgstr "Saring node" +msgstr "Filter node" #: editor/groups_editor.cpp msgid "Nodes in Group" @@ -3987,6 +3973,11 @@ msgid "Saving..." msgstr "Menyimpan..." #: editor/import_dock.cpp +#, fuzzy +msgid "%d Files" +msgstr " Berkas" + +#: editor/import_dock.cpp msgid "Set as Default for '%s'" msgstr "Jadikan Baku untuk '%s'" @@ -3995,10 +3986,6 @@ msgid "Clear Default for '%s'" msgstr "Bersihkan Baku untuk '%s'" #: editor/import_dock.cpp -msgid " Files" -msgstr " Berkas" - -#: editor/import_dock.cpp msgid "Import As:" msgstr "Impor sebagai:" @@ -4052,7 +4039,7 @@ msgstr "Tempel Parameter" #: editor/inspector_dock.cpp msgid "Edit Resource Clipboard" -msgstr "Sunting PapanKlip SumberDaya" +msgstr "Sunting Papan Klip Resource" #: editor/inspector_dock.cpp msgid "Copy Resource" @@ -4064,7 +4051,7 @@ msgstr "Buat Menjadi Bawaan" #: editor/inspector_dock.cpp msgid "Make Sub-Resources Unique" -msgstr "Membuat sub-Resource Unik" +msgstr "Membuat Unik Sub-Resource" #: editor/inspector_dock.cpp msgid "Open in Help" @@ -4072,15 +4059,15 @@ msgstr "Buka di Bantuan" #: editor/inspector_dock.cpp msgid "Create a new resource in memory and edit it." -msgstr "Buat sumber baru pada memori dan ubah." +msgstr "Buat resource baru pada memori dan mengubahnya." #: editor/inspector_dock.cpp msgid "Load an existing resource from disk and edit it." -msgstr "Muat sumber tersedia dari disk dan ubah." +msgstr "Muat resource yang ada dari diska dan mengubahnya." #: editor/inspector_dock.cpp msgid "Save the currently edited resource." -msgstr "Simpan sumber yang sedang diatur." +msgstr "Simpan resource yang sedang disunting saat ini." #: editor/inspector_dock.cpp msgid "Go to the previous edited object in history." @@ -4100,7 +4087,7 @@ msgstr "Properti Objek." #: editor/inspector_dock.cpp msgid "Filter properties" -msgstr "Saring properti" +msgstr "Filter properti" #: editor/inspector_dock.cpp msgid "Changes may be lost!" @@ -4341,7 +4328,7 @@ msgstr "Parameter Berubah" #: editor/plugins/animation_blend_tree_editor_plugin.cpp #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Edit Filters" -msgstr "Sunting Penyaring" +msgstr "Sunting Filter" #: editor/plugins/animation_blend_tree_editor_plugin.cpp msgid "Output node can't be added to the blend tree." @@ -4387,11 +4374,11 @@ msgstr "Hapus Node" #: editor/plugins/animation_blend_tree_editor_plugin.cpp msgid "Toggle Filter On/Off" -msgstr "Jungkitkan Penyaring Nyala/Mati" +msgstr "Jungkitkan Filter Nyala/Mati" #: editor/plugins/animation_blend_tree_editor_plugin.cpp msgid "Change Filter" -msgstr "Ganti Penyaring" +msgstr "Ganti Filter" #: editor/plugins/animation_blend_tree_editor_plugin.cpp msgid "No animation player set, so unable to retrieve track names." @@ -4413,19 +4400,16 @@ msgstr "" "nama track." #: editor/plugins/animation_blend_tree_editor_plugin.cpp -#, fuzzy msgid "Anim Clips" -msgstr "Klip-klip Animasi:" +msgstr "Klip Anim" #: editor/plugins/animation_blend_tree_editor_plugin.cpp -#, fuzzy msgid "Audio Clips" -msgstr "Klip-klip Suara:" +msgstr "Klip Audio" #: editor/plugins/animation_blend_tree_editor_plugin.cpp -#, fuzzy msgid "Functions" -msgstr "Fungsi-fungsi:" +msgstr "Fungsi" #: editor/plugins/animation_blend_tree_editor_plugin.cpp #: editor/plugins/animation_state_machine_editor.cpp @@ -4440,11 +4424,11 @@ msgstr "Tambah Node..." #: editor/plugins/animation_blend_tree_editor_plugin.cpp #: editor/plugins/root_motion_editor_plugin.cpp msgid "Edit Filtered Tracks:" -msgstr "Sunting Trek yang Disaring:" +msgstr "Sunting Trek yang Difilter:" #: editor/plugins/animation_blend_tree_editor_plugin.cpp msgid "Enable Filtering" -msgstr "Aktifkan penyaringan" +msgstr "Aktifkan Penyaringan" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Toggle Autoplay" @@ -4507,7 +4491,7 @@ msgstr "Tidak ada animasi untuk disalin!" #: editor/plugins/animation_player_editor_plugin.cpp msgid "No animation resource on clipboard!" -msgstr "Tidak ada aset animasi di papan klip!" +msgstr "Tidak ada resource animasi di papan klip!" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Pasted Animation" @@ -4657,9 +4641,8 @@ msgid "Move Node" msgstr "Pindahkan Node" #: editor/plugins/animation_state_machine_editor.cpp -#, fuzzy msgid "Transition exists!" -msgstr "Transisi: " +msgstr "Transisi sudah ada!" #: editor/plugins/animation_state_machine_editor.cpp msgid "Add Transition" @@ -4696,7 +4679,7 @@ msgstr "Node awal dan akhir dibutuhkan untuk sub-transisi." #: editor/plugins/animation_state_machine_editor.cpp msgid "No playback resource set at path: %s." -msgstr "Tidak ada aset playback yang diatur di lokasi: %s." +msgstr "Tidak ada resource playback yang diatur di lokasi: %s." #: editor/plugins/animation_state_machine_editor.cpp msgid "Node Removed" @@ -4745,14 +4728,13 @@ msgid "Transition: " msgstr "Transisi: " #: editor/plugins/animation_state_machine_editor.cpp -#, fuzzy msgid "Play Mode:" -msgstr "Mode Geser Pandangan" +msgstr "Mode Putar:" #: editor/plugins/animation_tree_editor_plugin.cpp #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "AnimationTree" -msgstr "AnimationTree" +msgstr "AnimationTree(Daftar animasi)" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "New name:" @@ -4884,11 +4866,11 @@ msgstr "Impor Animasi..." #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Edit Node Filters" -msgstr "Sunting Penyaring Node" +msgstr "Sunting Filter Node" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Filters..." -msgstr "Penyaring..." +msgstr "Filter..." #: editor/plugins/asset_library_editor_plugin.cpp msgid "Contents:" @@ -4935,7 +4917,6 @@ msgid "Request failed, too many redirects" msgstr "Permintaan gagal, terlalu banyak pengalihan" #: editor/plugins/asset_library_editor_plugin.cpp -#, fuzzy msgid "Redirect loop." msgstr "Mengalihkan berulang-ulang." @@ -5005,29 +4986,27 @@ msgstr "Unduhan untuk aset ini sedang diproses!" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Recently Updated" -msgstr "" +msgstr "Baru-baru Ini Diperbarui" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Least Recently Updated" -msgstr "" +msgstr "Paling Baru Diperbarui" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Name (A-Z)" -msgstr "" +msgstr "Nama (A-Z)" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Name (Z-A)" -msgstr "" +msgstr "Nama (Z-A)" #: editor/plugins/asset_library_editor_plugin.cpp -#, fuzzy msgid "License (A-Z)" -msgstr "Lisensi" +msgstr "Lisensi (A-Z)" #: editor/plugins/asset_library_editor_plugin.cpp -#, fuzzy msgid "License (Z-A)" -msgstr "Lisensi" +msgstr "Lisensi (Z-A)" #: editor/plugins/asset_library_editor_plugin.cpp msgid "First" @@ -5051,7 +5030,7 @@ msgstr "Semua" #: editor/plugins/asset_library_editor_plugin.cpp msgid "No results for \"%s\"." -msgstr "" +msgstr "Tidak ada hasil untuk \"%s\"." #: editor/plugins/asset_library_editor_plugin.cpp msgid "Import..." @@ -5139,12 +5118,11 @@ msgstr "Jangkah Kotak-kotak:" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Primary Line Every:" -msgstr "" +msgstr "Garis Primer Setiap:" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "steps" -msgstr "2 langkah" +msgstr "langkah" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Rotation Offset:" @@ -5155,9 +5133,8 @@ msgid "Rotation Step:" msgstr "Jangkah Perputaran:" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Scale Step:" -msgstr "Skala:" +msgstr "Langkah Skala:" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Move Vertical Guide" @@ -5232,85 +5209,72 @@ msgstr "" "batasnya." #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Top Left" -msgstr "Kiri" +msgstr "Kiri Atas" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Top Right" -msgstr "Kanan" +msgstr "Kanan Atas" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Bottom Right" -msgstr "Putar ke kanan" +msgstr "Kanan Bawah" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Bottom Left" -msgstr "Tampilan Bawah" +msgstr "Kiri Bawah" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Center Left" -msgstr "Indentasi Kiri" +msgstr "Kiri Tengah" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Center Top" -msgstr "Seleksi Tengah" +msgstr "Atas Tengah" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Center Right" -msgstr "Indentasi Kanan" +msgstr "Kanan Tengah" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Center Bottom" -msgstr "Bawah" +msgstr "Bawah Tengah" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Center" -msgstr "" +msgstr "Tengah" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Left Wide" -msgstr "Tampilan Kiri" +msgstr "Kiri Lebar" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Top Wide" -msgstr "Tampilan Atas" +msgstr "Atas Lebar" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Right Wide" -msgstr "Tampilan Kanan" +msgstr "Kanan Lebar" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Bottom Wide" -msgstr "Tampilan Bawah" +msgstr "Bawah Lebar" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "VCenter Wide" -msgstr "" +msgstr "VTengah Lebar" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "HCenter Wide" -msgstr "" +msgstr "HTengah Lebar" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Full Rect" -msgstr "" +msgstr "Kotak Penuh" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Keep Ratio" -msgstr "Rasio Skala:" +msgstr "Jaga Rasio" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Anchors only" @@ -5330,6 +5294,8 @@ msgid "" "Game Camera Override\n" "Overrides game camera with editor viewport camera." msgstr "" +"Timpa Kamera Gim\n" +"Menimpa kamera gim dengan kamera viewport editor." #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -5337,6 +5303,8 @@ msgid "" "Game Camera Override\n" "No game instance running." msgstr "" +"Timpa Kamera Gim\n" +"Tidak ada instance gim yang berjalan." #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -5455,24 +5423,20 @@ msgid "Ruler Mode" msgstr "Mode Penggaris" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Toggle smart snapping." -msgstr "Jungkitkan Pengancingan." +msgstr "Jungkitkan pengancingan cerdas." #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Use Smart Snap" -msgstr "Gunakan Snap" +msgstr "Gunakan Pengancingan Cerdas" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Toggle grid snapping." -msgstr "Jungkitkan Pengancingan." +msgstr "Jungkitkan pengancingan kisi." #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Use Grid Snap" -msgstr "Pengancingan Kisi" +msgstr "Gunakan Pengancingan Kisi" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Snapping Options" @@ -5483,9 +5447,8 @@ msgid "Use Rotation Snap" msgstr "Gunakan Snap Rotasi" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Use Scale Snap" -msgstr "Gunakan Snap" +msgstr "Gunakan Pengancingan Skala" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Snap Relative" @@ -5570,9 +5533,8 @@ msgid "View" msgstr "Pandangan" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Always Show Grid" -msgstr "Tampilkan Kotak-kotak" +msgstr "Selalu Tampilkan Kisi" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Show Helpers" @@ -5627,7 +5589,6 @@ msgid "Insert keys (based on mask)." msgstr "Sisipkan Kunci (berdasarkan mask)." #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "" "Auto insert keys when objects are translated, rotated or scaled (based on " "mask).\n" @@ -5645,9 +5606,8 @@ msgid "Auto Insert Key" msgstr "Otomatis Sisipkan Kunci" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Animation Key and Pose Options" -msgstr "Kunci Animasi Dimasukkan." +msgstr "Opsi Kunci Animasi dan Pose" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Insert Key (Existing Tracks)" @@ -5758,20 +5718,18 @@ msgstr "Masker Emisi" #: editor/plugins/cpu_particles_2d_editor_plugin.cpp #: editor/plugins/particles_2d_editor_plugin.cpp -#, fuzzy msgid "Solid Pixels" -msgstr "Pertumbuhan (Piksel): " +msgstr "Piksel Solid" #: editor/plugins/cpu_particles_2d_editor_plugin.cpp #: editor/plugins/particles_2d_editor_plugin.cpp msgid "Border Pixels" -msgstr "" +msgstr "Piksel Pembatas" #: editor/plugins/cpu_particles_2d_editor_plugin.cpp #: editor/plugins/particles_2d_editor_plugin.cpp -#, fuzzy msgid "Directed Border Pixels" -msgstr "Direktori-direktori & File-file:" +msgstr "Piksel Pembatas yang Diarahkan" #: editor/plugins/cpu_particles_2d_editor_plugin.cpp #: editor/plugins/particles_2d_editor_plugin.cpp @@ -5862,9 +5820,8 @@ msgid "Hold Shift to edit tangents individually" msgstr "Tahan Shift untuk menyunting tangen kurva satu-persatu" #: editor/plugins/curve_editor_plugin.cpp -#, fuzzy msgid "Right click to add point" -msgstr "Klik Kanan: Hapus Titik" +msgstr "Klik kanan untuk menambah titik" #: editor/plugins/gi_probe_editor_plugin.cpp msgid "Bake GI Probe" @@ -5895,12 +5852,13 @@ msgid "Mesh is empty!" msgstr "Mesh kosong!" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Trimesh Body" -msgstr "Buat Badan Trimesh Statis" +#, fuzzy +msgid "Couldn't create a Trimesh collision shape." +msgstr "Buat Trimesh Collision Sibling" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Convex Body" -msgstr "Buat Bodi Cembung Statis" +msgid "Create Static Trimesh Body" +msgstr "Buat Badan Trimesh Statis" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "This doesn't work on scene root!" @@ -5911,11 +5869,30 @@ msgid "Create Trimesh Static Shape" msgstr "Buat Bentuk Trimesh Statis" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Failed creating shapes!" -msgstr "Gagal membuat bentuk!" +msgid "Can't create a single convex collision shape for the scene root." +msgstr "Tidak dapat membuat convex collision shape tunggal untuk skena root." + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Couldn't create a single convex collision shape." +msgstr "Tidak dapat membuat convex collision shape tunggal." #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Convex Shape(s)" +#, fuzzy +msgid "Create Single Convex Shape" +msgstr "Buat Bentuk Cembung" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Can't create multiple convex collision shapes for the scene root." +msgstr "Tidak dapat membuat beberapa convex collision shape untuk skena root." + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Couldn't create any collision shapes." +msgstr "Tidak dapat membuat folder." + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Multiple Convex Shapes" msgstr "Buat Bentuk Cembung" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -5967,18 +5944,69 @@ msgid "Create Trimesh Static Body" msgstr "Buat Tubuh Statis Trimesh" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a StaticBody and assigns a polygon-based collision shape to it " +"automatically.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" +"Buat StaticBody dan tetapkan collision shape berbasis poligon untuknya " +"secara otomatis.\n" +"Opsi ini merupakan yang paling akurat (tapi paling lambat) untuk deteksi " +"collision." + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Trimesh Collision Sibling" msgstr "Buat Trimesh Collision Sibling" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Convex Collision Sibling(s)" +msgid "" +"Creates a polygon-based collision shape.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" +"Buat collision shape berbasis poligon.\n" +"Opsi ini merupakan yang paling akurat (tapi paling lambat) untuk deteksi " +"collision." + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Single Convex Collision Siblings" msgstr "Buat Convex Collision Sibling" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a single convex collision shape.\n" +"This is the fastest (but least accurate) option for collision detection." +msgstr "" +"Buat convex collision shape tunggal.\n" +"Opsi ini merupakan yang paling cepat (tapi paling tidak akurat) untuk " +"deteksi collision." + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Multiple Convex Collision Siblings" +msgstr "Buat Convex Collision Sibling" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is a performance middle-ground between the two above options." +msgstr "" +"Buat collision shape berbasis poligon.\n" +"Opsi ini kinerjanya berada di antara dua opsi di atas." + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Outline Mesh..." msgstr "Buat Garis Mesh..." #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a static outline mesh. The outline mesh will have its normals " +"flipped automatically.\n" +"This can be used instead of the SpatialMaterial Grow property when using " +"that property isn't possible." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "View UV1" msgstr "Tampilkan UV1" @@ -6000,23 +6028,23 @@ msgstr "Ukuran Garis Tepi:" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "UV Channel Debug" -msgstr "" +msgstr "Awakutu Kanal UV" #: editor/plugins/mesh_library_editor_plugin.cpp msgid "Remove item %d?" msgstr "Hapus item %d?" #: editor/plugins/mesh_library_editor_plugin.cpp -#, fuzzy msgid "" "Update from existing scene?:\n" "%s" -msgstr "Perbarui dari Skena" +msgstr "" +"Perbarui dari skena yang ada?:\n" +"%s" #: editor/plugins/mesh_library_editor_plugin.cpp -#, fuzzy msgid "Mesh Library" -msgstr "PerpustakaanMesh..." +msgstr "Pustaka Mesh" #: editor/plugins/mesh_library_editor_plugin.cpp #: editor/plugins/theme_editor_plugin.cpp @@ -6311,7 +6339,7 @@ msgstr "Cermin Pengatur Panjang" #: editor/plugins/path_editor_plugin.cpp msgid "Curve Point #" -msgstr "Titik #" +msgstr "Titik # Curve" #: editor/plugins/path_editor_plugin.cpp msgid "Set Curve Point Position" @@ -6548,24 +6576,24 @@ msgstr "Sinkronkan Tulang ke Poligon" #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "ERROR: Couldn't load resource!" -msgstr "KESALAHAN: Tidak dapat memuat sumber daya!" +msgstr "KESALAHAN: Tidak dapat memuat resource!" #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "Add Resource" -msgstr "Tambah Sumber Daya" +msgstr "Tambah Resource" #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "Rename Resource" -msgstr "Ubah Nama Sumber Daya" +msgstr "Ubah Nama Resource" #: editor/plugins/resource_preloader_editor_plugin.cpp #: editor/plugins/sprite_frames_editor_plugin.cpp msgid "Delete Resource" -msgstr "Hapus Sumber Daya" +msgstr "Hapus Resource" #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "Resource clipboard is empty!" -msgstr "Papan klip sumber daya kosong!" +msgstr "Papan klip resource kosong!" #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "Paste Resource" @@ -6590,11 +6618,11 @@ msgstr "Buka dalam Editor" #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "Load Resource" -msgstr "Muat Sumber Daya" +msgstr "Muat Resource" #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "ResourcePreloader" -msgstr "PreloaderSumberDaya" +msgstr "ResourcePreloader" #: editor/plugins/root_motion_editor_plugin.cpp msgid "AnimationTree has no path set to an AnimationPlayer" @@ -6654,20 +6682,22 @@ msgstr "Simpan Berkas Sebagai..." #: editor/plugins/script_editor_plugin.cpp msgid "Can't obtain the script for running." -msgstr "" +msgstr "Tidak dapat mendapatkan skrip untuk menjalankannya." #: editor/plugins/script_editor_plugin.cpp msgid "Script failed reloading, check console for errors." -msgstr "" +msgstr "Gagal memuat ulang skrip, cek konsol untuk informasi galatnya." #: editor/plugins/script_editor_plugin.cpp msgid "Script is not in tool mode, will not be able to run." -msgstr "" +msgstr "Skrip tidak dalam mode tool, tidak akan bisa dijalankan." #: editor/plugins/script_editor_plugin.cpp msgid "" "To run this script, it must inherit EditorScript and be set to tool mode." msgstr "" +"Untuk menjalankan skrip ini, skrip haris mewarisi EditorScript dan diatur ke " +"mode tool." #: editor/plugins/script_editor_plugin.cpp msgid "Import Theme" @@ -6701,7 +6731,7 @@ msgstr "Cari Sebelumnya" #: editor/plugins/script_editor_plugin.cpp msgid "Filter scripts" -msgstr "Penyaring Skrip" +msgstr "Filter skrip" #: editor/plugins/script_editor_plugin.cpp msgid "Toggle alphabetical sorting of the method list." @@ -6709,7 +6739,7 @@ msgstr "Beralih penyortiran alfabetis dari daftar fungsi." #: editor/plugins/script_editor_plugin.cpp msgid "Filter methods" -msgstr "Penyaring fungsi" +msgstr "Filter method" #: editor/plugins/script_editor_plugin.cpp msgid "Sort" @@ -6912,12 +6942,14 @@ msgstr "Pergi ke Fungsi" #: editor/plugins/script_text_editor.cpp msgid "Only resources from filesystem can be dropped." -msgstr "Hanya sumber daya dari berkas sistem yang dapat dihapus." +msgstr "Hanya resource dari berkas sistem yang dapat dihapus." #: editor/plugins/script_text_editor.cpp #: modules/visual_script/visual_script_editor.cpp msgid "Can't drop nodes because script '%s' is not used in this scene." msgstr "" +"Tidak bisa menghapus node karena skrip '%s' tidak sedang digunakan dalam " +"skena ini." #: editor/plugins/script_text_editor.cpp msgid "Lookup Symbol" @@ -7323,7 +7355,7 @@ msgstr "Pratinjau Sinematik" #: editor/plugins/spatial_editor_plugin.cpp msgid "Not available when using the GLES2 renderer." -msgstr "" +msgstr "Tidak tersedia ketika menggunakan perender GLES2." #: editor/plugins/spatial_editor_plugin.cpp msgid "Freelook Left" @@ -7354,9 +7386,8 @@ msgid "Freelook Speed Modifier" msgstr "Pengubah Kecepatan TampilanBebas" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Freelook Slow Modifier" -msgstr "Pengubah Kecepatan TampilanBebas" +msgstr "Pengubah Lambat Tampilan Bebas" #: editor/plugins/spatial_editor_plugin.cpp msgid "" @@ -7364,7 +7395,7 @@ msgid "" "It cannot be used as a reliable indication of in-game performance." msgstr "" "Catatan: Nilai FPS yang ditampilkan adalah framerate-nya editor.\n" -"Tidak bisa digunakan sebagai indikasi kinerja game yang dapat dihandalkan." +"Tidak bisa digunakan sebagai indikasi kinerja gim yang dapat dihandalkan." #: editor/plugins/spatial_editor_plugin.cpp msgid "View Rotation Locked" @@ -7568,9 +7599,8 @@ msgid "Create Mesh2D" msgstr "Buat Mesh2D" #: editor/plugins/sprite_editor_plugin.cpp -#, fuzzy msgid "Mesh2D Preview" -msgstr "Buat Pratinjau Mesh" +msgstr "Pratinjau Mesh2D" #: editor/plugins/sprite_editor_plugin.cpp msgid "Create Polygon2D" @@ -7578,25 +7608,23 @@ msgstr "Buat Polygon2D" #: editor/plugins/sprite_editor_plugin.cpp msgid "Polygon2D Preview" -msgstr "" +msgstr "Pratinjau Polygon2D" #: editor/plugins/sprite_editor_plugin.cpp msgid "Create CollisionPolygon2D" msgstr "Buat CollisionPolygon2D" #: editor/plugins/sprite_editor_plugin.cpp -#, fuzzy msgid "CollisionPolygon2D Preview" -msgstr "Buat CollisionPolygon2D" +msgstr "Pratinjau CollisionPolygon2D" #: editor/plugins/sprite_editor_plugin.cpp msgid "Create LightOccluder2D" msgstr "Buat LightOccluder2D" #: editor/plugins/sprite_editor_plugin.cpp -#, fuzzy msgid "LightOccluder2D Preview" -msgstr "Buat LightOccluder2D" +msgstr "Pratinjau LightOccluder2D" #: editor/plugins/sprite_editor_plugin.cpp msgid "Sprite is empty!" @@ -7647,9 +7675,8 @@ msgid "Simplification: " msgstr "Penyederhanaan: " #: editor/plugins/sprite_editor_plugin.cpp -#, fuzzy msgid "Shrink (Pixels): " -msgstr "Pertumbuhan (Piksel): " +msgstr "Penciutan (Piksel): " #: editor/plugins/sprite_editor_plugin.cpp msgid "Grow (Pixels): " @@ -7676,17 +7703,16 @@ msgid "Add Frame" msgstr "Tambah Frame" #: editor/plugins/sprite_frames_editor_plugin.cpp -#, fuzzy msgid "Unable to load images" -msgstr "Gagal memuat resource." +msgstr "Tidak dapat memuat gambar" #: editor/plugins/sprite_frames_editor_plugin.cpp msgid "ERROR: Couldn't load frame resource!" -msgstr "GALAT: Tidak dapat memuat aset frame!" +msgstr "GALAT: Tidak dapat memuat resource frame!" #: editor/plugins/sprite_frames_editor_plugin.cpp msgid "Resource clipboard is empty or not a texture!" -msgstr "Papan klip sumber daya kosong atau bukan tekstur!" +msgstr "Papan klip resource kosong atau memang bukan tekstur!" #: editor/plugins/sprite_frames_editor_plugin.cpp msgid "Paste Frame" @@ -7863,7 +7889,7 @@ msgstr "Buat Templat Editor Kosong" #: editor/plugins/theme_editor_plugin.cpp msgid "Create From Current Editor Theme" -msgstr "Buat dari Tema Editor Saat Ini" +msgstr "Buat dari Editor Tema Saat Ini" #: editor/plugins/theme_editor_plugin.cpp msgid "Toggle Button" @@ -7971,9 +7997,8 @@ msgid "Color" msgstr "Warna" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Theme File" -msgstr "Tema" +msgstr "Berkas Tema" #: editor/plugins/tile_map_editor_plugin.cpp msgid "Erase Selection" @@ -8026,11 +8051,11 @@ msgstr "Aktifkan Prioritas" #: editor/plugins/tile_map_editor_plugin.cpp msgid "Filter tiles" -msgstr "Saring tile" +msgstr "Filter tile" #: editor/plugins/tile_map_editor_plugin.cpp msgid "Give a TileSet resource to this TileMap to use its tiles." -msgstr "Berikan sumber TileSet untuk TileMap ini untuk menggunakan Tile-nya." +msgstr "Berikan resource TileSet ke TileMap ini untuk menggunakan tile-nya." #: editor/plugins/tile_map_editor_plugin.cpp msgid "Paint Tile" @@ -8086,17 +8111,15 @@ msgstr "Gabung dari Skena" #: editor/plugins/tile_set_editor_plugin.cpp msgid "New Single Tile" -msgstr "" +msgstr "Tile Tunggal Baru" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "New Autotile" -msgstr "Nonaktifkan Autotile" +msgstr "Autotile Baru" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "New Atlas" -msgstr "%s baru" +msgstr "Atlas Baru" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Next Coordinate" @@ -8115,39 +8138,32 @@ msgid "Select the previous shape, subtile, or Tile." msgstr "Pilih bentuk sebelumnya, subtile, atau Tile." #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Region" -msgstr "Mode Wilayah" +msgstr "Wilayah" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Collision" -msgstr "Mode Tabrakan" +msgstr "Area Tabrakan" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Occlusion" -msgstr "Mode Oklusi" +msgstr "Oklusi" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Navigation" -msgstr "Mode Navigasi" +msgstr "Navigasi" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Bitmask" -msgstr "Mode Bitmask" +msgstr "Masker Bit" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Priority" -msgstr "Mode Prioritas" +msgstr "Prioritas" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Z Index" -msgstr "Indeks:" +msgstr "Indeks Z" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Region Mode" @@ -8219,6 +8235,8 @@ msgstr "Tampilkan Nama Tile (Tahan Tombol Alt)" msgid "" "Add or select a texture on the left panel to edit the tiles bound to it." msgstr "" +"Tambah atau pilih tekstur di panel kiri untuk menyunting tile yang terikat " +"padanya." #: editor/plugins/tile_set_editor_plugin.cpp msgid "Remove selected texture? This will remove all tiles which use it." @@ -8377,12 +8395,10 @@ msgid "Edit Tile Z Index" msgstr "Sunting Index Z Tile" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Make Convex" msgstr "Buat Poligon Cembung" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Make Concave" msgstr "Buat Poligon Cekung" @@ -8406,7 +8422,7 @@ msgstr "TileSet" msgid "No VCS addons are available." msgstr "Tidak ada ekstensi VCS yang tersedia." -#: editor/plugins/version_control_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/version_control_editor_plugin.cpp msgid "Error" msgstr "Galat" @@ -8416,7 +8432,7 @@ msgstr "Tidak ada pesan komit yang diberikan" #: editor/plugins/version_control_editor_plugin.cpp msgid "No files added to stage" -msgstr "" +msgstr "Tidak ada berkas yang ditambahkan ke staging" #: editor/plugins/version_control_editor_plugin.cpp msgid "Commit" @@ -8424,11 +8440,11 @@ msgstr "Komit" #: editor/plugins/version_control_editor_plugin.cpp msgid "VCS Addon is not initialized" -msgstr "" +msgstr "Pengaya VCS tidak diinisialisasi" #: editor/plugins/version_control_editor_plugin.cpp msgid "Version Control System" -msgstr "" +msgstr "Sistem Kontrol Versi" #: editor/plugins/version_control_editor_plugin.cpp msgid "Initialize" @@ -8436,7 +8452,7 @@ msgstr "Inisialisasi" #: editor/plugins/version_control_editor_plugin.cpp msgid "Staging area" -msgstr "" +msgstr "Area staging" #: editor/plugins/version_control_editor_plugin.cpp msgid "Detect new changes" @@ -8448,7 +8464,7 @@ msgstr "Perubahan" #: editor/plugins/version_control_editor_plugin.cpp msgid "Modified" -msgstr "" +msgstr "Dimodifikasi" #: editor/plugins/version_control_editor_plugin.cpp msgid "Renamed" @@ -8472,7 +8488,7 @@ msgstr "Stage Semua" #: editor/plugins/version_control_editor_plugin.cpp msgid "Add a commit message" -msgstr "" +msgstr "Tambahkan pesan komit" #: editor/plugins/version_control_editor_plugin.cpp msgid "Commit Changes" @@ -8481,28 +8497,27 @@ msgstr "Komit Perubahan" #: editor/plugins/version_control_editor_plugin.cpp #: modules/gdnative/gdnative_library_singleton_editor.cpp msgid "Status" -msgstr "" +msgstr "Status" #: editor/plugins/version_control_editor_plugin.cpp msgid "View file diffs before committing them to the latest version" -msgstr "" +msgstr "Tampilkan perbedaan berkas sebelum mengkomitnya ke versi terbaru" #: editor/plugins/version_control_editor_plugin.cpp msgid "No file diff is active" -msgstr "" +msgstr "Tidak ada berkas diff yang sedang aktif" #: editor/plugins/version_control_editor_plugin.cpp msgid "Detect changes in file diff" -msgstr "" +msgstr "Deteksi perubahan dalam berkas diff" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "(GLES3 only)" msgstr "(Hanya GLES3)" #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Add Output" -msgstr "Tambah keluaran +" +msgstr "Tambah Keluaran" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Scalar" @@ -8518,7 +8533,7 @@ msgstr "Boolean" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Sampler" -msgstr "" +msgstr "Sampler" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Add input port" @@ -8650,9 +8665,8 @@ msgid "Dodge operator." msgstr "Operator dodge." #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "HardLight operator." -msgstr "Operator HardLight" +msgstr "Operator HardLight." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Lighten operator." @@ -9297,16 +9311,15 @@ msgstr "" "permukaan dan arah pandangan kamera (berikan masukan yang terkait dengannya)." #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "" "Custom Godot Shader Language expression, which is placed on top of the " "resulted shader. You can place various function definitions inside and call " "it later in the Expressions. You can also declare varyings, uniforms and " "constants." msgstr "" -"Ekspresi Bahasa Kustom Godot Shader, yang ditempatkan di atas shader yang " +"Ekspresi Kustom Godot Shader Language, yang ditempatkan di atas shader yang " "dihasilkan. Anda dapat menempatkan berbagai definisi fungsi di dalamnya dan " -"memanggilnya nanti melalui Ekspresi. Anda juga dapat mendeklarasikan " +"memanggilnya nanti melalui Daftar Ekspresi. Anda juga dapat mendeklarasikan " "variasi, seragam, dan konstanta." #: editor/plugins/visual_shader_editor_plugin.cpp @@ -9382,13 +9395,12 @@ msgid "Runnable" msgstr "Dapat dijalankan" #: editor/project_export.cpp -#, fuzzy msgid "Add initial export..." -msgstr "Tambah port masukan" +msgstr "Tambah ekspor awal..." #: editor/project_export.cpp msgid "Add previous patches..." -msgstr "" +msgstr "Tambahkan patch sebelumnya..." #: editor/project_export.cpp msgid "Delete patch '%s' from list?" @@ -9445,6 +9457,9 @@ msgid "" "If checked, the preset will be available for use in one-click deploy.\n" "Only one preset per platform may be marked as runnable." msgstr "" +"Jika dicentang, preset akan tersedia untuk digunakan dalam deploy sekali " +"klik.\n" +"Hanya satu preset per platform yang dapat ditandai sebagai runnable." #: editor/project_export.cpp msgid "Export Path" @@ -9452,11 +9467,11 @@ msgstr "Lokasi Ekspor" #: editor/project_export.cpp msgid "Resources" -msgstr "Sumber Daya" +msgstr "Resource" #: editor/project_export.cpp msgid "Export all resources in the project" -msgstr "Ekspor semua sumber daya dalam proyek" +msgstr "Ekspor semua resource dalam proyek" #: editor/project_export.cpp msgid "Export selected scenes (and dependencies)" @@ -9464,7 +9479,7 @@ msgstr "Ekspor skena terpilih (dan dependensinya)" #: editor/project_export.cpp msgid "Export selected resources (and dependencies)" -msgstr "Expor sumber daya terpilih (dan dependensinya)" +msgstr "Ekspor resource terpilih (dan dependensinya)" #: editor/project_export.cpp msgid "Export Mode:" @@ -9472,25 +9487,23 @@ msgstr "Mode Ekspor:" #: editor/project_export.cpp msgid "Resources to export:" -msgstr "Sumber daya yang akan diexpor:" +msgstr "Resource yang akan diekspor:" #: editor/project_export.cpp -#, fuzzy msgid "" "Filters to export non-resource files/folders\n" "(comma-separated, e.g: *.json, *.txt, docs/*)" msgstr "" -"Penyaringan untuk mengekspor berkas non-sumber (dipisahkan koma, contoh: *." -"json, *.txt)" +"Filter untuk mengekspor berkas/folder non-resource\n" +"(pisahkan dengan koma, contoh: *.json, *.txt, docs/*)" #: editor/project_export.cpp -#, fuzzy msgid "" "Filters to exclude files/folders from project\n" "(comma-separated, e.g: *.json, *.txt, docs/*)" msgstr "" -"Penyaringan untuk mengecualikan berkas dalam proyek (dipisahkan koma, " -"contoh: *.json, *.txt)" +"Filter untuk mengecualikan berkas/folder dari proyek\n" +"(pisahkan dengan koma, contoh: *.json, *.txt, docs/*)" #: editor/project_export.cpp msgid "Patches" @@ -9501,9 +9514,8 @@ msgid "Make Patch" msgstr "Buat Tambalan" #: editor/project_export.cpp -#, fuzzy msgid "Pack File" -msgstr " Berkas" +msgstr "Berkas Pack" #: editor/project_export.cpp msgid "Features" @@ -9562,13 +9574,12 @@ msgid "Export All" msgstr "Ekspor Semua" #: editor/project_export.cpp editor/project_manager.cpp -#, fuzzy msgid "ZIP File" -msgstr " Berkas" +msgstr "Berkas ZIP" #: editor/project_export.cpp msgid "Godot Game Pack" -msgstr "" +msgstr "Paket Gim Godot" #: editor/project_export.cpp msgid "Export templates for this platform are missing:" @@ -9583,11 +9594,19 @@ msgid "Export With Debug" msgstr "Ekspor dengan Awakutu" #: editor/project_manager.cpp -msgid "The path does not exist." +#, fuzzy +msgid "The path specified doesn't exist." msgstr "Lokasi ini tidak ada." #: editor/project_manager.cpp -msgid "Invalid '.zip' project file, does not contain a 'project.godot' file." +#, fuzzy +msgid "Error opening package file (it's not in ZIP format)." +msgstr "Gagal saat membuka paket, tidak dalam bentuk zip." + +#: editor/project_manager.cpp +#, fuzzy +msgid "" +"Invalid \".zip\" project file; it doesn't contain a \"project.godot\" file." msgstr "Berkas proyek '.zip' tidak valid, tidak berisi berkas 'project.godot'." #: editor/project_manager.cpp @@ -9595,11 +9614,13 @@ msgid "Please choose an empty folder." msgstr "Silakan pilih direktori kosong." #: editor/project_manager.cpp -msgid "Please choose a 'project.godot' or '.zip' file." +#, fuzzy +msgid "Please choose a \"project.godot\" or \".zip\" file." msgstr "Silakan pilih berkas 'project.godot' atau '.zip'." #: editor/project_manager.cpp -msgid "Directory already contains a Godot project." +#, fuzzy +msgid "This directory already contains a Godot project." msgstr "Direktori ini sudah berisi proyek Godot." #: editor/project_manager.cpp @@ -9869,7 +9890,7 @@ msgstr "Proyek" #: editor/project_manager.cpp msgid "Last Modified" -msgstr "" +msgstr "Terakhir Diubah" #: editor/project_manager.cpp msgid "Scan" @@ -10109,27 +10130,27 @@ msgstr "Tambah Lokasi yang Dipetakan Ulang" #: editor/project_settings_editor.cpp msgid "Resource Remap Add Remap" -msgstr "Sumber Daya Remap Tambah Remap" +msgstr "Resource Remap Tambah Remap" #: editor/project_settings_editor.cpp msgid "Change Resource Remap Language" -msgstr "Ubah Sumber Daya Pemetaan Ulang Bahasa" +msgstr "Ubah Bahasa Resource Remap" #: editor/project_settings_editor.cpp msgid "Remove Resource Remap" -msgstr "Hapus Remap Sumber Daya" +msgstr "Hapus Resource Remap" #: editor/project_settings_editor.cpp msgid "Remove Resource Remap Option" -msgstr "Hapus Opsi Remap Sumber Daya" +msgstr "Hapus Opsi Resource Remap" #: editor/project_settings_editor.cpp msgid "Changed Locale Filter" -msgstr "Penyaringan Lokalisasi Diubah" +msgstr "Filter Locale Diubah" #: editor/project_settings_editor.cpp msgid "Changed Locale Filter Mode" -msgstr "Mode Penyaringan Lokalisasi Diubah" +msgstr "Mode Filter Locale Diubah" #: editor/project_settings_editor.cpp msgid "Project Settings (project.godot)" @@ -10161,7 +10182,7 @@ msgstr "Aksi" #: editor/project_settings_editor.cpp msgid "Deadzone" -msgstr "" +msgstr "Deadzone" #: editor/project_settings_editor.cpp msgid "Device:" @@ -10189,7 +10210,7 @@ msgstr "Pemetaan Ulang" #: editor/project_settings_editor.cpp msgid "Resources:" -msgstr "Sumber daya:" +msgstr "Resource:" #: editor/project_settings_editor.cpp msgid "Remaps by Locale:" @@ -10201,7 +10222,7 @@ msgstr "Pelokalan" #: editor/project_settings_editor.cpp msgid "Locales Filter" -msgstr "Penyaring Pelokalan" +msgstr "Filter Locale" #: editor/project_settings_editor.cpp msgid "Show All Locales" @@ -10213,7 +10234,7 @@ msgstr "Tampilkan Hanya Pelokalan yang Dipilih" #: editor/project_settings_editor.cpp msgid "Filter mode:" -msgstr "Mode penyaringan:" +msgstr "Mode filter:" #: editor/project_settings_editor.cpp msgid "Locales:" @@ -10261,7 +10282,7 @@ msgstr "Pilih Node" #: editor/property_editor.cpp msgid "Error loading file: Not a resource!" -msgstr "Galat saat memuat berkas: Bukan sumber daya!" +msgstr "Galat saat memuat berkas: Bukan resource!" #: editor/property_editor.cpp msgid "Pick a Node" @@ -10296,6 +10317,11 @@ msgid "Suffix" msgstr "Akhiran" #: editor/rename_dialog.cpp +#, fuzzy +msgid "Use Regular Expressions" +msgstr "Ekspresi Reguler" + +#: editor/rename_dialog.cpp msgid "Advanced Options" msgstr "Opsi Lanjutan" @@ -10332,7 +10358,8 @@ msgstr "" "Bandingkan opsi penghitung." #: editor/rename_dialog.cpp -msgid "Per Level counter" +#, fuzzy +msgid "Per-level Counter" msgstr "Penghitung per Level" #: editor/rename_dialog.cpp @@ -10364,10 +10391,6 @@ msgstr "" "Digit yang hilang diisi dengan angka nol di depan." #: editor/rename_dialog.cpp -msgid "Regular Expressions" -msgstr "Ekspresi Reguler" - -#: editor/rename_dialog.cpp msgid "Post-Process" msgstr "Pasca Proses" @@ -10376,11 +10399,13 @@ msgid "Keep" msgstr "Pertahankan" #: editor/rename_dialog.cpp -msgid "CamelCase to under_scored" +#, fuzzy +msgid "PascalCase to snake_case" msgstr "CamelCase ke under_score" #: editor/rename_dialog.cpp -msgid "under_scored to CamelCase" +#, fuzzy +msgid "snake_case to PascalCase" msgstr "under_score ke CamelCase" #: editor/rename_dialog.cpp @@ -10399,6 +10424,16 @@ msgstr "Jadikan Huruf Kapital" msgid "Reset" msgstr "Reset" +#: editor/rename_dialog.cpp +#, fuzzy +msgid "Regular Expression Error" +msgstr "Ekspresi Reguler" + +#: editor/rename_dialog.cpp +#, fuzzy +msgid "At character %s" +msgstr "Karakter sah:" + #: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp msgid "Reparent Node" msgstr "Pengindukan Ulang Node" @@ -10457,7 +10492,7 @@ msgstr "Instansi Skena" #: editor/scene_tree_dock.cpp msgid "Replace with Branch Scene" -msgstr "" +msgstr "Ganti dengan Skena Cabang" #: editor/scene_tree_dock.cpp msgid "Instance Child Scene" @@ -10507,11 +10542,11 @@ msgstr "Hapus %d node?" #: editor/scene_tree_dock.cpp msgid "Delete the root node \"%s\"?" -msgstr "" +msgstr "Hapus node root \"%s\" ?" #: editor/scene_tree_dock.cpp msgid "Delete node \"%s\" and its children?" -msgstr "" +msgstr "Hapus node \"%s\" dan anak-anaknya?" #: editor/scene_tree_dock.cpp msgid "Delete node \"%s\"?" @@ -10534,16 +10569,21 @@ msgid "" "Disabling \"editable_instance\" will cause all properties of the node to be " "reverted to their default." msgstr "" +"Menonaktifkan \"editable_instance\" mengakibatkan semua properti node akan " +"dikembalikan ke properti bakunya." #: editor/scene_tree_dock.cpp msgid "" "Enabling \"Load As Placeholder\" will disable \"Editable Children\" and " "cause all properties of the node to be reverted to their default." msgstr "" +"Mengaktifkan \"Muas sebagai Placeholder\" akan menonaktifkan \"Anakan yang " +"Dapat Disunting\" dan mengakibatkan semua properti node dikembalikan ke " +"properti bakunya." #: editor/scene_tree_dock.cpp msgid "Make Local" -msgstr "" +msgstr "Jadikan Local" #: editor/scene_tree_dock.cpp msgid "New Scene Root" @@ -10563,7 +10603,7 @@ msgstr "Skena 3D" #: editor/scene_tree_dock.cpp msgid "User Interface" -msgstr "" +msgstr "Antarmuka Pengguna" #: editor/scene_tree_dock.cpp msgid "Other Node" @@ -10571,7 +10611,7 @@ msgstr "Node Lainnya" #: editor/scene_tree_dock.cpp msgid "Can't operate on nodes from a foreign scene!" -msgstr "" +msgstr "Tidak dapat bekerja pada node dari skena luar!" #: editor/scene_tree_dock.cpp msgid "Can't operate on nodes the current scene inherits from!" @@ -10583,7 +10623,7 @@ msgstr "Lampirkan Skrip" #: editor/scene_tree_dock.cpp msgid "Remove Node(s)" -msgstr "" +msgstr "Hapus Node" #: editor/scene_tree_dock.cpp msgid "Change type of node(s)" @@ -10594,31 +10634,32 @@ msgid "" "Couldn't save new scene. Likely dependencies (instances) couldn't be " "satisfied." msgstr "" +"Tidak dapat menyimpan skena. Kemungkinan dependensinya (instance-nya) tidak " +"terpenuhi." #: editor/scene_tree_dock.cpp msgid "Error saving scene." -msgstr "" +msgstr "Galat menyimpan skena." #: editor/scene_tree_dock.cpp msgid "Error duplicating scene to save it." -msgstr "" +msgstr "Galat menduplikasi skena untuk menyimpannya." #: editor/scene_tree_dock.cpp -#, fuzzy msgid "Sub-Resources" -msgstr "Sub-Sumber Daya" +msgstr "Sub-Resource" #: editor/scene_tree_dock.cpp msgid "Clear Inheritance" -msgstr "" +msgstr "Bersihkan Pewarisan" #: editor/scene_tree_dock.cpp msgid "Editable Children" -msgstr "" +msgstr "Anakan yang Dapat Disunting" #: editor/scene_tree_dock.cpp msgid "Load As Placeholder" -msgstr "" +msgstr "Muat sebagai Placeholder" #: editor/scene_tree_dock.cpp msgid "Open Documentation" @@ -10626,7 +10667,7 @@ msgstr "Buka Dokumentasi" #: editor/scene_tree_dock.cpp msgid "Add Child Node" -msgstr "" +msgstr "Tambah Node Anak" #: editor/scene_tree_dock.cpp msgid "Expand/Collapse All" @@ -10634,7 +10675,7 @@ msgstr "Bentangkan/Ciutkan Semua" #: editor/scene_tree_dock.cpp msgid "Change Type" -msgstr "" +msgstr "Ubah Tipe" #: editor/scene_tree_dock.cpp msgid "Reparent to New Node" @@ -10646,11 +10687,11 @@ msgstr "Jadikan Skena Dasar" #: editor/scene_tree_dock.cpp msgid "Merge From Scene" -msgstr "" +msgstr "Gabung dari Skena" #: editor/scene_tree_dock.cpp editor/script_editor_debugger.cpp msgid "Save Branch as Scene" -msgstr "" +msgstr "Simpan Cabang sebagai Skena" #: editor/scene_tree_dock.cpp editor/script_editor_debugger.cpp msgid "Copy Node Path" @@ -10658,7 +10699,7 @@ msgstr "Salin Lokasi Node" #: editor/scene_tree_dock.cpp msgid "Delete (No Confirm)" -msgstr "" +msgstr "Hapus (Tanpa Konfirmasi)" #: editor/scene_tree_dock.cpp msgid "Add/Create a New Node." @@ -10669,14 +10710,16 @@ msgid "" "Instance a scene file as a Node. Creates an inherited scene if no root node " "exists." msgstr "" +"Instance berkas skena sebagai Node. Buat skena warisan jika tidak ada node " +"akar." #: editor/scene_tree_dock.cpp msgid "Attach a new or existing script for the selected node." -msgstr "" +msgstr "Lampirkan skrip baru atau yang sudah ada untuk node yang dipilih." #: editor/scene_tree_dock.cpp msgid "Clear a script for the selected node." -msgstr "" +msgstr "Bersihkan skrip untuk node yang dipilih." #: editor/scene_tree_dock.cpp msgid "Remote" @@ -10684,16 +10727,15 @@ msgstr "Remot" #: editor/scene_tree_dock.cpp msgid "Local" -msgstr "" +msgstr "Lokal" #: editor/scene_tree_dock.cpp msgid "Clear Inheritance? (No Undo!)" -msgstr "" +msgstr "Bersihkan Pewarisan? (Tidak Bisa Dibatalkan!)" #: editor/scene_tree_editor.cpp -#, fuzzy msgid "Toggle Visible" -msgstr "Beralih File Tersembunyi" +msgstr "Jungkitkan Keterlihatan" #: editor/scene_tree_editor.cpp msgid "Unlock Node" @@ -10709,25 +10751,31 @@ msgstr "(Menghubungkan dari)" #: editor/scene_tree_editor.cpp msgid "Node configuration warning:" -msgstr "" +msgstr "Peringatan pengaturan node:" #: editor/scene_tree_editor.cpp msgid "" "Node has %s connection(s) and %s group(s).\n" "Click to show signals dock." msgstr "" +"Node memiliki %s koneksi dan %s grup.\n" +"Klik untuk menampilkan dock sinyal." #: editor/scene_tree_editor.cpp msgid "" "Node has %s connection(s).\n" "Click to show signals dock." msgstr "" +"Node memiliki %s koneksi.\n" +"Klik untuk menampilkan dock sinyal." #: editor/scene_tree_editor.cpp msgid "" "Node is in %s group(s).\n" "Click to show groups dock." msgstr "" +"Node berada dalam %s grup.\n" +"Klik untuk menampilkan dock grup." #: editor/scene_tree_editor.cpp msgid "Open Script:" @@ -10738,42 +10786,48 @@ msgid "" "Node is locked.\n" "Click to unlock it." msgstr "" +"Node terkunci.\n" +"Klik untuk membukanya." #: editor/scene_tree_editor.cpp msgid "" "Children are not selectable.\n" "Click to make selectable." msgstr "" +"Anakan tidak dapat dipilih.\n" +"Klik untuk membuatnya dapat dipilih." #: editor/scene_tree_editor.cpp msgid "Toggle Visibility" -msgstr "" +msgstr "Jungkitkan Visibilitas" #: editor/scene_tree_editor.cpp msgid "" "AnimationPlayer is pinned.\n" "Click to unpin." msgstr "" +"AnimationPlayer disematkan.\n" +"Klik untuk menghapus sematan." #: editor/scene_tree_editor.cpp msgid "Invalid node name, the following characters are not allowed:" -msgstr "" +msgstr "Nama node tidak valid, karakter berikut tidak diperbolehkan:" #: editor/scene_tree_editor.cpp msgid "Rename Node" -msgstr "" +msgstr "Ubah Nama Node" #: editor/scene_tree_editor.cpp msgid "Scene Tree (Nodes):" -msgstr "" +msgstr "Pohon Skena (Node):" #: editor/scene_tree_editor.cpp msgid "Node Configuration Warning!" -msgstr "" +msgstr "Peringatan Konfigurasi Node!" #: editor/scene_tree_editor.cpp msgid "Select a Node" -msgstr "" +msgstr "Pilih Node" #: editor/script_create_dialog.cpp msgid "Path is empty." @@ -10801,7 +10855,7 @@ msgstr "Ekstensi tidak valid." #: editor/script_create_dialog.cpp msgid "Wrong extension chosen." -msgstr "" +msgstr "Ekstensi salah dipilih." #: editor/script_create_dialog.cpp msgid "Error loading template '%s'" @@ -10821,7 +10875,7 @@ msgstr "Menimpa" #: editor/script_create_dialog.cpp msgid "N/A" -msgstr "" +msgstr "N/A" #: editor/script_create_dialog.cpp msgid "Open Script / Choose Location" @@ -10844,12 +10898,13 @@ msgid "Invalid inherited parent name or path." msgstr "Nama atau lokasi parent yang diwariskan tidak valid." #: editor/script_create_dialog.cpp -msgid "Script is valid." +#, fuzzy +msgid "Script path/name is valid." msgstr "Skrip valid." #: editor/script_create_dialog.cpp msgid "Allowed: a-z, A-Z, 0-9, _ and ." -msgstr "" +msgstr "Diizinkan: a-z, A-Z, 0-9, _ dan ." #: editor/script_create_dialog.cpp msgid "Built-in script (into scene file)." @@ -10864,24 +10919,20 @@ msgid "Will load an existing script file." msgstr "Akan memuat berkas skrip yang ada." #: editor/script_create_dialog.cpp -#, fuzzy msgid "Script file already exists." -msgstr "Autoload '%s' telah ada!" +msgstr "Berkas skrip sudah ada." #: editor/script_create_dialog.cpp -#, fuzzy msgid "Class Name:" -msgstr "Nama Kelas" +msgstr "Nama Kelas:" #: editor/script_create_dialog.cpp -#, fuzzy msgid "Template:" -msgstr "Templat" +msgstr "Templat:" #: editor/script_create_dialog.cpp -#, fuzzy msgid "Built-in Script:" -msgstr "Skrip Utama:" +msgstr "Skrip Internal:" #: editor/script_create_dialog.cpp msgid "Attach Node Script" @@ -10893,7 +10944,7 @@ msgstr "Remot " #: editor/script_editor_debugger.cpp msgid "Bytes:" -msgstr "" +msgstr "Bytes:" #: editor/script_editor_debugger.cpp msgid "Warning:" @@ -10925,11 +10976,11 @@ msgstr "Sumber C++ :" #: editor/script_editor_debugger.cpp msgid "Stack Trace" -msgstr "" +msgstr "Stack Trace" #: editor/script_editor_debugger.cpp msgid "Errors" -msgstr "" +msgstr "Galat" #: editor/script_editor_debugger.cpp msgid "Child process connected." @@ -10940,97 +10991,97 @@ msgid "Copy Error" msgstr "Salin Galat" #: editor/script_editor_debugger.cpp +#, fuzzy +msgid "Video RAM" +msgstr "Memori Video" + +#: editor/script_editor_debugger.cpp msgid "Skip Breakpoints" msgstr "Lewati Breakpoint" #: editor/script_editor_debugger.cpp msgid "Inspect Previous Instance" -msgstr "" +msgstr "Inspeksi Instance Sebelumnya" #: editor/script_editor_debugger.cpp msgid "Inspect Next Instance" -msgstr "" +msgstr "Inspeksi Instance Berikutnya" #: editor/script_editor_debugger.cpp msgid "Stack Frames" -msgstr "" +msgstr "Stack Frame" #: editor/script_editor_debugger.cpp msgid "Profiler" -msgstr "" +msgstr "Profiler(debugger/pemantauan)" #: editor/script_editor_debugger.cpp msgid "Network Profiler" -msgstr "Profiler Jaringan" +msgstr "Network Profiler(Debug jaringan)" #: editor/script_editor_debugger.cpp msgid "Monitor" -msgstr "" +msgstr "Pemantau" #: editor/script_editor_debugger.cpp msgid "Value" -msgstr "" +msgstr "Nilai" #: editor/script_editor_debugger.cpp msgid "Monitors" -msgstr "" +msgstr "Pemantau" #: editor/script_editor_debugger.cpp msgid "Pick one or more items from the list to display the graph." -msgstr "" +msgstr "Pilih satu atau lebih item dari daftar untuk menampilkan grafiknya." #: editor/script_editor_debugger.cpp msgid "List of Video Memory Usage by Resource:" -msgstr "" +msgstr "Daftar Penggunaan Memori Video oleh Resource:" #: editor/script_editor_debugger.cpp msgid "Total:" -msgstr "" - -#: editor/script_editor_debugger.cpp -msgid "Video Mem" -msgstr "" +msgstr "Total:" #: editor/script_editor_debugger.cpp msgid "Resource Path" -msgstr "" +msgstr "Lokasi Resource" #: editor/script_editor_debugger.cpp msgid "Type" -msgstr "" +msgstr "Tipe" #: editor/script_editor_debugger.cpp msgid "Format" -msgstr "" +msgstr "Format" #: editor/script_editor_debugger.cpp msgid "Usage" -msgstr "" +msgstr "Pemakaian" #: editor/script_editor_debugger.cpp msgid "Misc" -msgstr "" +msgstr "Lain-lain" #: editor/script_editor_debugger.cpp msgid "Clicked Control:" -msgstr "" +msgstr "Kontrol yang Diklik:" #: editor/script_editor_debugger.cpp msgid "Clicked Control Type:" -msgstr "" +msgstr "Tipe Kontrol yang Diklik:" #: editor/script_editor_debugger.cpp msgid "Live Edit Root:" -msgstr "" +msgstr "Sunting Root Langsung:" #: editor/script_editor_debugger.cpp -#, fuzzy msgid "Set From Tree" -msgstr "Menyetel Dari Keturunan" +msgstr "Setel dari Pohon" #: editor/script_editor_debugger.cpp msgid "Export measures as CSV" -msgstr "" +msgstr "Ekspor pengukuran sebagai CSV" #: editor/settings_config_dialog.cpp msgid "Erase Shortcut" @@ -11038,11 +11089,11 @@ msgstr "Hapus Pintasan" #: editor/settings_config_dialog.cpp msgid "Restore Shortcut" -msgstr "" +msgstr "Kembalikan Tombol Pintasan" #: editor/settings_config_dialog.cpp msgid "Change Shortcut" -msgstr "" +msgstr "Ubah Tombol Pintasan" #: editor/settings_config_dialog.cpp msgid "Editor Settings" @@ -11050,11 +11101,11 @@ msgstr "Pengaturan Editor" #: editor/settings_config_dialog.cpp msgid "Shortcuts" -msgstr "" +msgstr "Tombol Pintasan" #: editor/settings_config_dialog.cpp msgid "Binding" -msgstr "" +msgstr "Mengikat" #: editor/spatial_editor_gizmos.cpp msgid "Change Light Radius" @@ -11062,7 +11113,7 @@ msgstr "Ganti Radius Lampu" #: editor/spatial_editor_gizmos.cpp msgid "Change AudioStreamPlayer3D Emission Angle" -msgstr "" +msgstr "Ubah Sudut Emisi AudioStreamPlayer3D" #: editor/spatial_editor_gizmos.cpp msgid "Change Camera FOV" @@ -11074,15 +11125,15 @@ msgstr "Ubah Ukuran Kamera" #: editor/spatial_editor_gizmos.cpp msgid "Change Notifier AABB" -msgstr "" +msgstr "Ubah AABB Notifier" #: editor/spatial_editor_gizmos.cpp msgid "Change Particles AABB" -msgstr "" +msgstr "Ubah Partikel AABB" #: editor/spatial_editor_gizmos.cpp msgid "Change Probe Extents" -msgstr "" +msgstr "Ubah Batas Probe" #: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp msgid "Change Sphere Shape Radius" @@ -11090,15 +11141,15 @@ msgstr "Ganti Radius Bentuk Bola" #: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp msgid "Change Box Shape Extents" -msgstr "" +msgstr "Ubah Batas Box Shape" #: editor/spatial_editor_gizmos.cpp msgid "Change Capsule Shape Radius" -msgstr "" +msgstr "Ubah Radius Shape Kapsul" #: editor/spatial_editor_gizmos.cpp msgid "Change Capsule Shape Height" -msgstr "" +msgstr "Ubah Tinggi Shape Kapsul" #: editor/spatial_editor_gizmos.cpp msgid "Change Cylinder Shape Radius" @@ -11110,7 +11161,7 @@ msgstr "Ubah Tinggi Bentuk Silinder" #: editor/spatial_editor_gizmos.cpp msgid "Change Ray Shape Length" -msgstr "" +msgstr "Ubah Panjang Shape Ray" #: modules/csg/csg_gizmos.cpp msgid "Change Cylinder Radius" @@ -11130,11 +11181,11 @@ msgstr "Ubah Torus Radius Luar" #: modules/gdnative/gdnative_library_editor_plugin.cpp msgid "Select the dynamic library for this entry" -msgstr "" +msgstr "Pilih pustaka dinamis untuk entri ini" #: modules/gdnative/gdnative_library_editor_plugin.cpp msgid "Select dependencies of the library for this entry" -msgstr "" +msgstr "Pilih dependensi pustaka untuk entri ini" #: modules/gdnative/gdnative_library_editor_plugin.cpp msgid "Remove current entry" @@ -11142,15 +11193,15 @@ msgstr "Hapus entri saat ini" #: modules/gdnative/gdnative_library_editor_plugin.cpp msgid "Double click to create a new entry" -msgstr "" +msgstr "Klik ganda untuk membuat entri baru" #: modules/gdnative/gdnative_library_editor_plugin.cpp msgid "Platform:" -msgstr "" +msgstr "Platform:" #: modules/gdnative/gdnative_library_editor_plugin.cpp msgid "Platform" -msgstr "" +msgstr "Platform" #: modules/gdnative/gdnative_library_editor_plugin.cpp msgid "Dynamic Library" @@ -11158,7 +11209,7 @@ msgstr "Pustaka Dinamis" #: modules/gdnative/gdnative_library_editor_plugin.cpp msgid "Add an architecture entry" -msgstr "" +msgstr "Tambah entri arsitektur" #: modules/gdnative/gdnative_library_editor_plugin.cpp msgid "GDNativeLibrary" @@ -11166,7 +11217,7 @@ msgstr "Pustaka GDNative" #: modules/gdnative/gdnative_library_singleton_editor.cpp msgid "Enabled GDNative Singleton" -msgstr "" +msgstr "Aktifkan Singleton GDNative" #: modules/gdnative/gdnative_library_singleton_editor.cpp msgid "Disabled GDNative Singleton" @@ -11178,11 +11229,11 @@ msgstr "Pustaka" #: modules/gdnative/gdnative_library_singleton_editor.cpp msgid "Libraries: " -msgstr "" +msgstr "Pustaka: " #: modules/gdnative/register_types.cpp msgid "GDNative" -msgstr "" +msgstr "GDNative" #: modules/gdscript/gdscript_functions.cpp msgid "Step argument is zero!" @@ -11218,49 +11269,43 @@ msgstr "Kamus acuan tidak sah (sub kelas tidak sah)" #: modules/gdscript/gdscript_functions.cpp msgid "Object can't provide a length." -msgstr "" +msgstr "Objek tidak dapat memberikan panjang." #: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy msgid "Next Plane" -msgstr "Tab selanjutnya" +msgstr "Plane Selanjutnya" #: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy msgid "Previous Plane" -msgstr "Tab sebelumnya" +msgstr "Plane Sebelumnya" #: modules/gridmap/grid_map_editor_plugin.cpp msgid "Plane:" -msgstr "" +msgstr "Plane:" #: modules/gridmap/grid_map_editor_plugin.cpp msgid "Next Floor" -msgstr "" +msgstr "Floor Selanjutnya" #: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy msgid "Previous Floor" -msgstr "Tab sebelumnya" +msgstr "Floor Sebelumnya" #: modules/gridmap/grid_map_editor_plugin.cpp msgid "Floor:" -msgstr "" +msgstr "Floor:" #: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy msgid "GridMap Delete Selection" -msgstr "Hapus yang Dipilih" +msgstr "Hapus Seleksi GridMap" #: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy msgid "GridMap Fill Selection" -msgstr "Hapus yang Dipilih" +msgstr "Isi Seleksi GridMap" #: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy msgid "GridMap Paste Selection" -msgstr "Hapus yang Dipilih" +msgstr "Rekat(Paste) Seleksi GridMap" #: modules/gridmap/grid_map_editor_plugin.cpp msgid "GridMap Paint" @@ -11268,141 +11313,136 @@ msgstr "" #: modules/gridmap/grid_map_editor_plugin.cpp msgid "Grid Map" -msgstr "" +msgstr "Grid Map" #: modules/gridmap/grid_map_editor_plugin.cpp msgid "Snap View" -msgstr "" +msgstr "Tampilan Pengancingan" #: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy msgid "Clip Disabled" -msgstr "Dinonaktifkan" +msgstr "Klip Dinonaktifkan" #: modules/gridmap/grid_map_editor_plugin.cpp msgid "Clip Above" -msgstr "" +msgstr "Klip Di Atas" #: modules/gridmap/grid_map_editor_plugin.cpp msgid "Clip Below" -msgstr "" +msgstr "Klip Di Bawah" #: modules/gridmap/grid_map_editor_plugin.cpp msgid "Edit X Axis" -msgstr "" +msgstr "Sunting Sumbu X" #: modules/gridmap/grid_map_editor_plugin.cpp msgid "Edit Y Axis" -msgstr "" +msgstr "Sunting Sumbu Y" #: modules/gridmap/grid_map_editor_plugin.cpp msgid "Edit Z Axis" -msgstr "" +msgstr "Sunting Sumbu Z" #: modules/gridmap/grid_map_editor_plugin.cpp msgid "Cursor Rotate X" -msgstr "" +msgstr "Kursor Rotasi X" #: modules/gridmap/grid_map_editor_plugin.cpp msgid "Cursor Rotate Y" -msgstr "" +msgstr "Kursor Rotasi Y" #: modules/gridmap/grid_map_editor_plugin.cpp msgid "Cursor Rotate Z" -msgstr "" +msgstr "Kursor Rotasi Z" #: modules/gridmap/grid_map_editor_plugin.cpp msgid "Cursor Back Rotate X" -msgstr "" +msgstr "Kursor Rotasi Balik X" #: modules/gridmap/grid_map_editor_plugin.cpp msgid "Cursor Back Rotate Y" -msgstr "" +msgstr "Kursor Rotasi Balik Y" #: modules/gridmap/grid_map_editor_plugin.cpp msgid "Cursor Back Rotate Z" -msgstr "" +msgstr "Kursor Rotasi Balik Z" #: modules/gridmap/grid_map_editor_plugin.cpp msgid "Cursor Clear Rotation" -msgstr "" +msgstr "Kursor Bersihkan Rotasi" #: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy msgid "Paste Selects" -msgstr "Hapus Pilihan" +msgstr "Rekatkan Pilihan" #: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy msgid "Clear Selection" -msgstr "Beri Skala Seleksi" +msgstr "Bersihkan Seleksi" #: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy msgid "Fill Selection" -msgstr "Semua pilihan" +msgstr "Isi Pilihan" #: modules/gridmap/grid_map_editor_plugin.cpp msgid "GridMap Settings" -msgstr "" +msgstr "Pengaturan GridMap" #: modules/gridmap/grid_map_editor_plugin.cpp msgid "Pick Distance:" -msgstr "" +msgstr "Pilih Jarak:" #: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy msgid "Filter meshes" -msgstr "Penyaring fungsi" +msgstr "Filter mesh" #: modules/gridmap/grid_map_editor_plugin.cpp msgid "Give a MeshLibrary resource to this GridMap to use its meshes." msgstr "" +"Berikan resource MeshLibrary ke GridMap ini untuk menggunakan mesh-nya." #: modules/mono/csharp_script.cpp msgid "Class name can't be a reserved keyword" -msgstr "" +msgstr "Nama kelas tidak boleh reserved keyword" #: modules/mono/mono_gd/gd_mono_utils.cpp msgid "End of inner exception stack trace" -msgstr "" +msgstr "Akhir dari inner exception stack trace" #: modules/recast/navigation_mesh_editor_plugin.cpp msgid "Bake NavMesh" -msgstr "" +msgstr "Bake NavMesh" #: modules/recast/navigation_mesh_editor_plugin.cpp msgid "Clear the navigation mesh." -msgstr "" +msgstr "Bersihkan mesh navigasi." #: modules/recast/navigation_mesh_generator.cpp msgid "Setting up Configuration..." -msgstr "" +msgstr "Menyiapkan Konfigurasi..." #: modules/recast/navigation_mesh_generator.cpp msgid "Calculating grid size..." -msgstr "" +msgstr "Menghitung ukuran kisi..." #: modules/recast/navigation_mesh_generator.cpp msgid "Creating heightfield..." -msgstr "" +msgstr "Membuat bidang ketinggian..." #: modules/recast/navigation_mesh_generator.cpp -#, fuzzy msgid "Marking walkable triangles..." -msgstr "Menyimpan perubahan-perubahan lokal..." +msgstr "Segitiga penanda walkable..." #: modules/recast/navigation_mesh_generator.cpp msgid "Constructing compact heightfield..." -msgstr "" +msgstr "Membangun dataran tinggi..." #: modules/recast/navigation_mesh_generator.cpp msgid "Eroding walkable area..." -msgstr "" +msgstr "Mengikis area jalan..." #: modules/recast/navigation_mesh_generator.cpp msgid "Partitioning..." -msgstr "" +msgstr "Mempartisi..." #: modules/recast/navigation_mesh_generator.cpp msgid "Creating contours..." @@ -11487,42 +11527,36 @@ msgid "Set Variable Type" msgstr "Atur Jenis variabel" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Add Input Port" -msgstr "Tambah port masukan" +msgstr "Tambah Port Masukan" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Add Output Port" -msgstr "Tambah port keluaran" +msgstr "Tambah Port Keluaran" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Override an existing built-in function." -msgstr "Tidak boleh sama dengan nama tipe bawaan yang ada." +msgstr "Menimpa fungsi built-in yang ada." #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Create a new function." -msgstr "Buat persegi panjang baru." +msgstr "Buat fungsi baru." #: modules/visual_script/visual_script_editor.cpp msgid "Variables:" msgstr "Variabel-variabel:" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Create a new variable." -msgstr "Buat persegi panjang baru." +msgstr "Buat variabel baru." #: modules/visual_script/visual_script_editor.cpp msgid "Signals:" msgstr "Sinyal-sinyal:" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Create a new signal." -msgstr "Buat poligon baru." +msgstr "Buat sinyal baru." #: modules/visual_script/visual_script_editor.cpp msgid "Name is not a valid identifier:" @@ -11549,7 +11583,6 @@ msgid "Add Function" msgstr "Tambahkan Fungsi" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Delete input port" msgstr "Hapus port masukan" @@ -11562,59 +11595,56 @@ msgid "Add Signal" msgstr "Tambahkan Sinyal" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Remove Input Port" -msgstr "Hapus port masukan" +msgstr "Hapus Port Masukan" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Remove Output Port" -msgstr "Hapus port keluaran" +msgstr "Hapus Port Keluaran" #: modules/visual_script/visual_script_editor.cpp msgid "Change Expression" msgstr "Ubah Pernyataan" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Remove VisualScript Nodes" -msgstr "Hapus Tombol-tombol yang tidak sah" +msgstr "Hapus Node VisualScript" #: modules/visual_script/visual_script_editor.cpp msgid "Duplicate VisualScript Nodes" -msgstr "" +msgstr "Duplikasi Node VisualSkrip" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Hold %s to drop a Getter. Hold Shift to drop a generic signature." msgstr "" -"Tahan Meta untuk meletakkan sebuah Getter. Tahan Shift untuk meletakkan " +"Tahan %s untuk meletakkan sebuah Getter. Tahan Shift untuk meletakkan " "generic signature." #: modules/visual_script/visual_script_editor.cpp msgid "Hold Ctrl to drop a Getter. Hold Shift to drop a generic signature." msgstr "" +"Tahan Ctrl untuk meletakkan Getter. Tahan Shift untuk meletakkan generic " +"signature." #: modules/visual_script/visual_script_editor.cpp msgid "Hold %s to drop a simple reference to the node." -msgstr "" +msgstr "Tahan %s untuk meletakkan referensi sederhana ke node." #: modules/visual_script/visual_script_editor.cpp msgid "Hold Ctrl to drop a simple reference to the node." -msgstr "" +msgstr "Tahan Ctrl untuk menjatuhkan referensi sederhana ke node." #: modules/visual_script/visual_script_editor.cpp msgid "Hold %s to drop a Variable Setter." -msgstr "" +msgstr "Tahan %s untuk menjatuhkan Variabel Setter." #: modules/visual_script/visual_script_editor.cpp msgid "Hold Ctrl to drop a Variable Setter." -msgstr "" +msgstr "Tahan Ctrl untuk menjatuhkan Variabel Setter." #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Add Preload Node" -msgstr "Tambahkan Node" +msgstr "Tambah Node Preload" #: modules/visual_script/visual_script_editor.cpp msgid "Add Node(s) From Tree" @@ -11635,70 +11665,60 @@ msgid "Add Setter Property" msgstr "Tambahkan Properti Setter" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Change Base Type" -msgstr "Ubah Tipe Nilai Array" +msgstr "Ubah Tipe Basis" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Move Node(s)" -msgstr "Salin Resource" +msgstr "Pindahkan Node" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Remove VisualScript Node" -msgstr "Hapus Variabel" +msgstr "Hapus Node VisualScript" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Connect Nodes" -msgstr "Sambungkan Ke Node:" +msgstr "Sambungkan Node" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Disconnect Nodes" -msgstr "Sambungkan Ke Node:" +msgstr "Putuskan Node" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Connect Node Data" -msgstr "Sambungkan Ke Node:" +msgstr "Sambungkan Data Node" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Connect Node Sequence" -msgstr "Sambungkan Ke Node:" +msgstr "Sambungkan Sequence Node" #: modules/visual_script/visual_script_editor.cpp msgid "Script already has function '%s'" -msgstr "" +msgstr "Skrip sudah memiliki fungsi '%s'" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Change Input Value" -msgstr "Ubah Nilai Array" +msgstr "Ubah Nilai Input" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Resize Comment" -msgstr "Sunting CanvasItem" +msgstr "Ubah Ukuran Komentar" #: modules/visual_script/visual_script_editor.cpp msgid "Can't copy the function node." -msgstr "" +msgstr "Tidak dapat menyalin node fungsi." #: modules/visual_script/visual_script_editor.cpp msgid "Clipboard is empty!" -msgstr "" +msgstr "Papan klip kosong!" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Paste VisualScript Nodes" -msgstr "Path ke Node:" +msgstr "Rekatkan Node VisualScript" #: modules/visual_script/visual_script_editor.cpp msgid "Can't create function with a function node." -msgstr "" +msgstr "Tidak dapat membuat fungsi dengan node fungsi." #: modules/visual_script/visual_script_editor.cpp msgid "Can't create function of nodes from nodes of multiple functions." @@ -11713,9 +11733,8 @@ msgid "Try to only have one sequence input in selection." msgstr "" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Create Function" -msgstr "Namai kembali Fungsi" +msgstr "Buat Fungsi" #: modules/visual_script/visual_script_editor.cpp msgid "Remove Function" @@ -11746,62 +11765,52 @@ msgid "Members:" msgstr "Member-member:" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Change Base Type:" -msgstr "Ubah Tipe Nilai Array" +msgstr "Ubah Tipe Basis:" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Add Nodes..." msgstr "Tambah Node..." #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Add Function..." -msgstr "Tambahkan Fungsi" +msgstr "Tambah Fungsi..." #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "function_name" -msgstr "Fungsi-fungsi:" +msgstr "function_name" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Select or create a function to edit its graph." -msgstr "Pilih atau ciptakan sebuah fungsi untuk mengedit grafik" +msgstr "Pilih atau buat fungsi untuk menyunting grafiknya." #: modules/visual_script/visual_script_editor.cpp msgid "Delete Selected" msgstr "Hapus yang Dipilih" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Find Node Type" msgstr "Cari Tipe Node" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Copy Nodes" -msgstr "Salin Resource" +msgstr "Salin Node" #: modules/visual_script/visual_script_editor.cpp msgid "Cut Nodes" msgstr "" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Make Function" -msgstr "Namai kembali Fungsi" +msgstr "Buat Fungsi" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Refresh Graph" -msgstr "Segarkan" +msgstr "Segarkan Grafik" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Edit Member" -msgstr "Anggota" +msgstr "Sunting Anggota" #: modules/visual_script/visual_script_flow_control.cpp msgid "Input type not iterable: " @@ -11861,9 +11870,8 @@ msgstr "" "string (error)." #: modules/visual_script/visual_script_property_selector.cpp -#, fuzzy msgid "Search VisualScript" -msgstr "Hapus Variabel" +msgstr "Cari VisualScript" #: modules/visual_script/visual_script_property_selector.cpp msgid "Get %s" @@ -11895,7 +11903,7 @@ msgstr "" #: platform/android/export/export.cpp msgid "The package must have at least one '.' separator." -msgstr "" +msgstr "Package setidaknya harus memiliki sebuah pemisah '.'." #: platform/android/export/export.cpp msgid "Select device from the list" @@ -11903,39 +11911,45 @@ msgstr "Pilih perangkat pada daftar" #: platform/android/export/export.cpp msgid "ADB executable not configured in the Editor Settings." -msgstr "" +msgstr "Lokasi executable ADB belum dikonfigurasi dalam Pengaturan Editor." #: platform/android/export/export.cpp msgid "OpenJDK jarsigner not configured in the Editor Settings." -msgstr "" +msgstr "Lokasi jarsigner OpenJDK belum dikonfigurasi dalam Pengaturan Editor." #: platform/android/export/export.cpp msgid "Debug keystore not configured in the Editor Settings nor in the preset." msgstr "" +"Berkas debug keystore belum dikonfigurasi dalam Pengaturan Editor maupun di " +"prasetel proyek." #: platform/android/export/export.cpp msgid "Custom build requires a valid Android SDK path in Editor Settings." msgstr "" +"Membangun kustom APK memerlukan lokasi Android SDK yang valid dalam " +"Pengaturan Editor." #: platform/android/export/export.cpp msgid "Invalid Android SDK path for custom build in Editor Settings." msgstr "" +"Lokasi Android SDK tidak valid untuk membuat kustom APK dalam Pengaturan " +"Editor." #: platform/android/export/export.cpp -#, fuzzy msgid "" "Android build template not installed in the project. Install it from the " "Project menu." -msgstr "Templat build Android tidak ada, harap pasang templat yang relevan." +msgstr "" +"Templat build Android belum terpasang dalam proyek. Pasanglah dari menu " +"Proyek." #: platform/android/export/export.cpp msgid "Invalid public key for APK expansion." msgstr "" #: platform/android/export/export.cpp -#, fuzzy msgid "Invalid package name:" -msgstr "Nama tidak sah." +msgstr "Nama paket tidak valid:" #: platform/android/export/export.cpp msgid "" @@ -11970,18 +11984,16 @@ msgid "Identifier is missing." msgstr "" #: platform/iphone/export/export.cpp -#, fuzzy msgid "The character '%s' is not allowed in Identifier." -msgstr "Nama bukan sebuah pengidentifikasi yang sah:" +msgstr "Karakter '%s' tidak diizinkan dalam Identifier." #: platform/iphone/export/export.cpp msgid "App Store Team ID not specified - cannot configure the project." msgstr "" #: platform/iphone/export/export.cpp -#, fuzzy msgid "Invalid Identifier:" -msgstr "Nama bukan sebuah pengidentifikasi yang sah:" +msgstr "Identifier tidak valid:" #: platform/iphone/export/export.cpp msgid "Required icon is not specified in the preset." @@ -12000,64 +12012,52 @@ msgid "Run exported HTML in the system's default browser." msgstr "" #: platform/javascript/export/export.cpp -#, fuzzy msgid "Could not write file:" -msgstr "Tidak dapat membuat folder." +msgstr "Tidak dapat menulis berkas:" #: platform/javascript/export/export.cpp -#, fuzzy msgid "Could not open template for export:" -msgstr "Tidak dapat membuat folder." +msgstr "Tidak dapat membuka templat untuk ekspor:" #: platform/javascript/export/export.cpp -#, fuzzy msgid "Invalid export template:" -msgstr "Memuat Ekspor Template-template." +msgstr "Templat ekspor tidak valid:" #: platform/javascript/export/export.cpp -#, fuzzy msgid "Could not read custom HTML shell:" -msgstr "Tidak dapat membuat folder." +msgstr "Tidak dapat membaca shell HTML kustom:" #: platform/javascript/export/export.cpp -#, fuzzy msgid "Could not read boot splash image file:" -msgstr "Tidak dapat membuat folder." +msgstr "Tidak dapat membaca berkas citra boot splash:" #: platform/javascript/export/export.cpp -#, fuzzy msgid "Using default boot splash image." -msgstr "Tidak dapat membuat folder." +msgstr "Menggunakan citra boot splash baku." #: platform/uwp/export/export.cpp -#, fuzzy msgid "Invalid package short name." -msgstr "Nama tidak sah." +msgstr "Nama pendek paket tidak valid." #: platform/uwp/export/export.cpp -#, fuzzy msgid "Invalid package unique name." -msgstr "Nama tidak sah." +msgstr "Nama unik paket tidak valid." #: platform/uwp/export/export.cpp -#, fuzzy msgid "Invalid package publisher display name." -msgstr "Nama tidak sah." +msgstr "Nama penerbit paket tidak valid." #: platform/uwp/export/export.cpp -#, fuzzy msgid "Invalid product GUID." -msgstr "Ukuran font tidak sah." +msgstr "GUID produk tidak valid." #: platform/uwp/export/export.cpp -#, fuzzy msgid "Invalid publisher GUID." -msgstr "Ukuran font tidak sah." +msgstr "GUID penerbit tidak valid." #: platform/uwp/export/export.cpp -#, fuzzy msgid "Invalid background color." -msgstr "Nama tidak sah." +msgstr "Warna latar belakang tidak valid." #: platform/uwp/export/export.cpp msgid "Invalid Store Logo image dimensions (should be 50x50)." @@ -12088,13 +12088,12 @@ msgid "Invalid splash screen image dimensions (should be 620x300)." msgstr "" #: scene/2d/animated_sprite.cpp -#, fuzzy msgid "" "A SpriteFrames resource must be created or set in the \"Frames\" property in " "order for AnimatedSprite to display frames." msgstr "" -"Sebuah resource SpriteFrames seharusnya diciptakan atau diatur dalam " -"properti 'Frames' agar AnimatedSprite menampilkan frame-frame." +"Resource SpriteFrames seharusnya diciptakan atau diatur dalam properti " +"'Frames' agar AnimatedSprite menampilkan frame-frame." #: scene/2d/canvas_modulate.cpp msgid "" @@ -12144,8 +12143,8 @@ msgid "" "A shape must be provided for CollisionShape2D to function. Please create a " "shape resource for it!" msgstr "" -"Sebuah bentuk harus disediakan untuk CollisionShape2D untuk fungsi. Mohon " -"ciptakan resource bentuk untuk itu!" +"Sebuah shape harus disediakan untuk CollisionShape2D supaya berfungsi. Mohon " +"ciptakan resource shape untuknya!" #: scene/2d/cpu_particles_2d.cpp msgid "" @@ -12154,12 +12153,11 @@ msgid "" msgstr "" #: scene/2d/light_2d.cpp -#, fuzzy msgid "" "A texture with the shape of the light must be supplied to the \"Texture\" " "property." msgstr "" -"Sebuah tekstur dengan bentuk cahaya harus disuplai ke properti 'texture'." +"Sebuah tekstur dengan bentuk cahaya harus disuplai ke properti 'Texture'." #: scene/2d/light_occluder_2d.cpp msgid "" @@ -12169,18 +12167,17 @@ msgstr "" "berpengaruh." #: scene/2d/light_occluder_2d.cpp -#, fuzzy msgid "The occluder polygon for this occluder is empty. Please draw a polygon." msgstr "" -"Polygon occluder untuk occluder ini kosong. Mohon gambar dulu sebuah polygon!" +"Polygon occluder untuk occluder ini kosong. Mohon gambar dulu sebuah poligon." #: scene/2d/navigation_polygon.cpp msgid "" "A NavigationPolygon resource must be set or created for this node to work. " "Please set a property or draw a polygon." msgstr "" -"Sebuah resource NavigationPolygon harus diatur atau diciptakan untuk node " -"ini bekerja. Mohon atur sebuah properti atau gambar sebuah polygon." +"Sebuah resource NavigationPolygon harus diatur atau diciptakan supaya node " +"ini bekerja. Silakan atur sebuah properti atau gambar sebuah polygon." #: scene/2d/navigation_polygon.cpp msgid "" @@ -12248,19 +12245,16 @@ msgid "" msgstr "" #: scene/2d/tile_map.cpp -#, fuzzy msgid "" "TileMap with Use Parent on needs a parent CollisionObject2D to give shapes " "to. Please use it as a child of Area2D, StaticBody2D, RigidBody2D, " "KinematicBody2D, etc. to give them a shape." msgstr "" -"CollisionShape2D hanya berfungsi untuk menyediakan sebuah bentuk collision " -"pada sebuah CollisionObject2D node asal. Mohon hanya gunakan itu sebagai " -"sebuah child dari Area2D, StaticBody2D, RigidBody2D, KinematicBody2D, dll. " -"untuk memberikan mereka sebuah bentuk." +"TileMap dengan Gunakan Induk memerlukan induk CollisionObject2D diberikan " +"shape. Silakan gunakan itu sebagai anak dari Area2D, StaticBody2D, " +"RigidBody2D, KinematicBody2D, dll. untuk memberikan mereka shape." #: scene/2d/visibility_notifier_2d.cpp -#, fuzzy msgid "" "VisibilityEnabler2D works best when used with the edited scene root directly " "as parent." @@ -12354,13 +12348,12 @@ msgstr "" "bentuk." #: scene/3d/collision_shape.cpp -#, fuzzy msgid "" "A shape must be provided for CollisionShape to function. Please create a " "shape resource for it." msgstr "" -"Sebuah bentuk harus disediakan untuk CollisionShape untuk fungsi. Mohon " -"ciptakan sebuah resource bentuk untuk itu!" +"Sebuah shape harus disediakan untuk CollisionShape supaya berfungsi. Silakan " +"buat shape untuknya." #: scene/3d/collision_shape.cpp msgid "" @@ -12395,7 +12388,7 @@ msgstr "" #: scene/3d/navigation_mesh.cpp msgid "A NavigationMesh resource must be set or created for this node to work." msgstr "" -"Sebuah resource NavigationMesh harus diatur atau diciptakan untuk node ini " +"Sebuah resource NavigationMesh harus diatur atau diciptakan supaya node ini " "bekerja." #: scene/3d/navigation_mesh.cpp @@ -12425,17 +12418,18 @@ msgid "" msgstr "" #: scene/3d/path.cpp -#, fuzzy msgid "PathFollow only works when set as a child of a Path node." msgstr "" -"PathFollow2D hanya bekerja ketika diatur sebagai sebuah child dari sebuah " -"node Path2D." +"PathFollow2D hanya bekerja ketika diatur sebagai sebuah anak dari sebuah " +"node Path." #: scene/3d/path.cpp msgid "" "PathFollow's ROTATION_ORIENTED requires \"Up Vector\" to be enabled in its " "parent Path's Curve resource." msgstr "" +"ROTATION_ORIENTED PathFollow membutuhkan \"Up Vector\" yang diaktifkan dalam " +"resource Curve Path induknya." #: scene/3d/physics_body.cpp msgid "" @@ -12465,12 +12459,11 @@ msgid "" msgstr "" #: scene/3d/sprite_3d.cpp -#, fuzzy msgid "" "A SpriteFrames resource must be created or set in the \"Frames\" property in " "order for AnimatedSprite3D to display frames." msgstr "" -"Sebuah resource SpriteFrames harus diciptakan atau diatur didalam properti " +"Sebuah resource SpriteFrames harus diciptakan atau diatur di dalam properti " "'Frames' agar AnimatedSprite3D menampilkan frame-frame." #: scene/3d/vehicle_body.cpp @@ -12484,6 +12477,8 @@ msgid "" "WorldEnvironment requires its \"Environment\" property to contain an " "Environment to have a visible effect." msgstr "" +"WorldEnvironment memerlukan properti \"Environment\" berisikan sebuah " +"Environment agar hasilnya dapat dilihat." #: scene/3d/world_environment.cpp msgid "" @@ -12503,26 +12498,22 @@ msgid "On BlendTree node '%s', animation not found: '%s'" msgstr "Di Node BlendTree '%s', animasi tidak ditemukan: '%s'" #: scene/animation/animation_blend_tree.cpp -#, fuzzy msgid "Animation not found: '%s'" -msgstr "Perkakas Animasi" +msgstr "Animasi tidak ditemukan: '%s'" #: scene/animation/animation_tree.cpp msgid "In node '%s', invalid animation: '%s'." msgstr "Di node '%s', animasi tidak valid: '%s'." #: scene/animation/animation_tree.cpp -#, fuzzy msgid "Invalid animation: '%s'." -msgstr "KESALAHAN: Nama animasi tidak valid!" +msgstr "Animasi tidak valid: '%s'." #: scene/animation/animation_tree.cpp -#, fuzzy msgid "Nothing connected to input '%s' of node '%s'." -msgstr "Memutuskan '%s' dari '%s'" +msgstr "Tidak ada yang terhubung ke input '%s' dari node '%s'." #: scene/animation/animation_tree.cpp -#, fuzzy msgid "No root AnimationNode for the graph is set." msgstr "Akar AnimationNode untuk grafik belum diatur." @@ -12538,7 +12529,6 @@ msgstr "" "AnimationPlayer." #: scene/animation/animation_tree.cpp -#, fuzzy msgid "The AnimationPlayer root node is not a valid node." msgstr "Akar AnimationPlayer bukanlah node yang valid." @@ -12554,30 +12544,26 @@ msgid "" msgstr "" #: scene/gui/color_picker.cpp -#, fuzzy msgid "Pick a color from the editor window." -msgstr "Ambil warna dari layar." +msgstr "Ambil warna dari layar editor." #: scene/gui/color_picker.cpp msgid "HSV" -msgstr "" +msgstr "HSV" #: scene/gui/color_picker.cpp -#, fuzzy msgid "Raw" -msgstr "Mentah" +msgstr "Raw (%)" #: scene/gui/color_picker.cpp msgid "Switch between hexadecimal and code values." msgstr "Beralih antara nilai heksadesimal dan kode." #: scene/gui/color_picker.cpp -#, fuzzy msgid "Add current color as a preset." -msgstr "Tambahkan warna yang sekarang sebagai preset" +msgstr "Tambahkan warna yang sekarang sebagai preset." #: scene/gui/container.cpp -#, fuzzy msgid "" "Container by itself serves no purpose unless a script configures its " "children placement behavior.\n" @@ -12593,6 +12579,9 @@ msgid "" "The Hint Tooltip won't be displayed as the control's Mouse Filter is set to " "\"Ignore\". To solve this, set the Mouse Filter to \"Stop\" or \"Pass\"." msgstr "" +"Tips Petunjuk tidak akan ditampilkan karena Filter Tetikus kontrolnya diatur " +"ke \"Abaikan/Ignore\". Untuk mengatasinya, setel Filter Tetikus ke \"Stop\" " +"atau \"Pass\"." #: scene/gui/dialogs.cpp msgid "Alert!" @@ -12603,24 +12592,23 @@ msgid "Please Confirm..." msgstr "Mohon konfirmasi..." #: scene/gui/popup.cpp -#, fuzzy msgid "" "Popups will hide by default unless you call popup() or any of the popup*() " "functions. Making them visible for editing is fine, but they will hide upon " "running." msgstr "" -"Popup-popup akan disembunyikan secara default kecuali anda memanggil fungsi " +"Popup akan disembunyikan secara default kecuali anda memanggil fungsi " "popup() atau salah satu dari semua fungsi popup*() yang ada. Membuat mereka " -"terlihat saat mengedit bisa dilakukan, namun mereka akan disembunyikan saat " -"game dijalankan." +"terlihat saat mengedit bisa dilakukan, namun mereka akan disembunyikan saat " +"gim dijalankan." #: scene/gui/range.cpp -#, fuzzy msgid "If \"Exp Edit\" is enabled, \"Min Value\" must be greater than 0." -msgstr "jika exp_edit adalah true min_value seharusnya > 0." +msgstr "" +"Jika \"Exp Edit\" diaktifkan, \"Nilai Minimal\" seharusnya lebih besar dari " +"0." #: scene/gui/scroll_container.cpp -#, fuzzy msgid "" "ScrollContainer is intended to work with a single child control.\n" "Use a container as child (VBox, HBox, etc.), or a Control and set the custom " @@ -12683,6 +12671,15 @@ msgstr "Variasi hanya bisa ditetapkan dalam fungsi vertex." msgid "Constants cannot be modified." msgstr "Konstanta tidak dapat dimodifikasi." +#~ msgid "Replaced %d occurrence(s)." +#~ msgstr "kejadian %d diganti." + +#~ msgid "Create Static Convex Body" +#~ msgstr "Buat Bodi Cembung Statis" + +#~ msgid "Failed creating shapes!" +#~ msgstr "Gagal membuat bentuk!" + #~ msgid "" #~ "There are currently no tutorials for this class, you can [color=$color]" #~ "[url=$url]contribute one[/url][/color] or [color=$color][url=" diff --git a/editor/translations/is.po b/editor/translations/is.po index 7a2250c0b2..7f0ab2f719 100644 --- a/editor/translations/is.po +++ b/editor/translations/is.po @@ -699,7 +699,7 @@ msgid "Line Number:" msgstr "" #: editor/code_editor.cpp -msgid "Replaced %d occurrence(s)." +msgid "%d replaced." msgstr "" #: editor/code_editor.cpp editor/editor_help.cpp @@ -3850,15 +3850,15 @@ msgid "Saving..." msgstr "" #: editor/import_dock.cpp -msgid "Set as Default for '%s'" +msgid "%d Files" msgstr "" #: editor/import_dock.cpp -msgid "Clear Default for '%s'" +msgid "Set as Default for '%s'" msgstr "" #: editor/import_dock.cpp -msgid " Files" +msgid "Clear Default for '%s'" msgstr "" #: editor/import_dock.cpp @@ -5710,11 +5710,11 @@ msgid "Mesh is empty!" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Trimesh Body" +msgid "Couldn't create a Trimesh collision shape." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Convex Body" +msgid "Create Static Trimesh Body" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -5726,11 +5726,27 @@ msgid "Create Trimesh Static Shape" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Failed creating shapes!" +msgid "Can't create a single convex collision shape for the scene root." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Couldn't create a single convex collision shape." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Convex Shape(s)" +msgid "Create Single Convex Shape" +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Can't create multiple convex collision shapes for the scene root." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Couldn't create any collision shapes." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Multiple Convex Shapes" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -5782,19 +5798,57 @@ msgid "Create Trimesh Static Body" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a StaticBody and assigns a polygon-based collision shape to it " +"automatically.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Trimesh Collision Sibling" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp #, fuzzy -msgid "Create Convex Collision Sibling(s)" +msgid "Create Single Convex Collision Siblings" msgstr "Breyta Viðbót" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a single convex collision shape.\n" +"This is the fastest (but least accurate) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Multiple Convex Collision Siblings" +msgstr "Breyta Viðbót" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is a performance middle-ground between the two above options." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Outline Mesh..." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a static outline mesh. The outline mesh will have its normals " +"flipped automatically.\n" +"This can be used instead of the SpatialMaterial Grow property when using " +"that property isn't possible." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "View UV1" msgstr "" @@ -8191,7 +8245,7 @@ msgstr "" msgid "No VCS addons are available." msgstr "" -#: editor/plugins/version_control_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/version_control_editor_plugin.cpp msgid "Error" msgstr "" @@ -9286,11 +9340,16 @@ msgid "Export With Debug" msgstr "" #: editor/project_manager.cpp -msgid "The path does not exist." +msgid "The path specified doesn't exist." +msgstr "" + +#: editor/project_manager.cpp +msgid "Error opening package file (it's not in ZIP format)." msgstr "" #: editor/project_manager.cpp -msgid "Invalid '.zip' project file, does not contain a 'project.godot' file." +msgid "" +"Invalid \".zip\" project file; it doesn't contain a \"project.godot\" file." msgstr "" #: editor/project_manager.cpp @@ -9298,11 +9357,11 @@ msgid "Please choose an empty folder." msgstr "" #: editor/project_manager.cpp -msgid "Please choose a 'project.godot' or '.zip' file." +msgid "Please choose a \"project.godot\" or \".zip\" file." msgstr "" #: editor/project_manager.cpp -msgid "Directory already contains a Godot project." +msgid "This directory already contains a Godot project." msgstr "" #: editor/project_manager.cpp @@ -9955,6 +10014,10 @@ msgid "Suffix" msgstr "" #: editor/rename_dialog.cpp +msgid "Use Regular Expressions" +msgstr "" + +#: editor/rename_dialog.cpp msgid "Advanced Options" msgstr "" @@ -9989,7 +10052,7 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -msgid "Per Level counter" +msgid "Per-level Counter" msgstr "" #: editor/rename_dialog.cpp @@ -10019,10 +10082,6 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -msgid "Regular Expressions" -msgstr "" - -#: editor/rename_dialog.cpp msgid "Post-Process" msgstr "" @@ -10031,11 +10090,11 @@ msgid "Keep" msgstr "" #: editor/rename_dialog.cpp -msgid "CamelCase to under_scored" +msgid "PascalCase to snake_case" msgstr "" #: editor/rename_dialog.cpp -msgid "under_scored to CamelCase" +msgid "snake_case to PascalCase" msgstr "" #: editor/rename_dialog.cpp @@ -10054,6 +10113,14 @@ msgstr "" msgid "Reset" msgstr "" +#: editor/rename_dialog.cpp +msgid "Regular Expression Error" +msgstr "" + +#: editor/rename_dialog.cpp +msgid "At character %s" +msgstr "" + #: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp msgid "Reparent Node" msgstr "" @@ -10497,7 +10564,7 @@ msgid "Invalid inherited parent name or path." msgstr "" #: editor/script_create_dialog.cpp -msgid "Script is valid." +msgid "Script path/name is valid." msgstr "" #: editor/script_create_dialog.cpp @@ -10589,6 +10656,10 @@ msgid "Copy Error" msgstr "" #: editor/script_editor_debugger.cpp +msgid "Video RAM" +msgstr "" + +#: editor/script_editor_debugger.cpp msgid "Skip Breakpoints" msgstr "" @@ -10637,10 +10708,6 @@ msgid "Total:" msgstr "" #: editor/script_editor_debugger.cpp -msgid "Video Mem" -msgstr "" - -#: editor/script_editor_debugger.cpp msgid "Resource Path" msgstr "" diff --git a/editor/translations/it.po b/editor/translations/it.po index a549df218c..77956e9233 100644 --- a/editor/translations/it.po +++ b/editor/translations/it.po @@ -43,12 +43,13 @@ # Katia Piazza <gydey@ridiculousglitch.com>, 2019. # nickfla1 <lanterniniflavio@gmail.com>, 2019. # Fabio Iotti <fabiogiopla@gmail.com>, 2020. +# Douglas Fiedler <dognew@gmail.com>, 2020. msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2020-01-27 07:09+0000\n" -"Last-Translator: Micila Micillotto <micillotto@gmail.com>\n" +"PO-Revision-Date: 2020-02-18 15:09+0000\n" +"Last-Translator: Douglas Fiedler <dognew@gmail.com>\n" "Language-Team: Italian <https://hosted.weblate.org/projects/godot-engine/" "godot/it/>\n" "Language: it\n" @@ -56,7 +57,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 3.11-dev\n" +"X-Generator: Weblate 3.11\n" #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/visual_script/visual_script_builtin_funcs.cpp @@ -726,8 +727,8 @@ msgid "Line Number:" msgstr "Numero linea:" #: editor/code_editor.cpp -msgid "Replaced %d occurrence(s)." -msgstr "Rimpiazzate %d occorrenze." +msgid "%d replaced." +msgstr "%d rimpiazzato." #: editor/code_editor.cpp editor/editor_help.cpp msgid "%d match." @@ -4014,6 +4015,10 @@ msgid "Saving..." msgstr "Salvataggio..." #: editor/import_dock.cpp +msgid "%d Files" +msgstr "%d File" + +#: editor/import_dock.cpp msgid "Set as Default for '%s'" msgstr "Imposta come Default per '%s'" @@ -4022,10 +4027,6 @@ msgid "Clear Default for '%s'" msgstr "Elimina Default per '%s'" #: editor/import_dock.cpp -msgid " Files" -msgstr " Files" - -#: editor/import_dock.cpp msgid "Import As:" msgstr "Importa Come:" @@ -5905,12 +5906,12 @@ msgid "Mesh is empty!" msgstr "La mesh è vuota!" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Trimesh Body" -msgstr "Crea Corpo Trimesh Statico" +msgid "Couldn't create a Trimesh collision shape." +msgstr "Non poteva creare una forma di collisione Trimesh." #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Convex Body" -msgstr "Crea Corpo Convesso Statico" +msgid "Create Static Trimesh Body" +msgstr "Crea Corpo Trimesh Statico" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "This doesn't work on scene root!" @@ -5921,11 +5922,30 @@ msgid "Create Trimesh Static Shape" msgstr "Crea Forma Statica Trimesh" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Failed creating shapes!" -msgstr "Errore nella creazione delle forme!" +msgid "Can't create a single convex collision shape for the scene root." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Couldn't create a single convex collision shape." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Single Convex Shape" +msgstr "Crea una o più forme Convesse" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Can't create multiple convex collision shapes for the scene root." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Couldn't create any collision shapes." +msgstr "Impossibile creare la cartella." #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Convex Shape(s)" +#, fuzzy +msgid "Create Multiple Convex Shapes" msgstr "Crea una o più forme Convesse" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -5978,18 +5998,57 @@ msgid "Create Trimesh Static Body" msgstr "Crea Corpo Statico Trimesh" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a StaticBody and assigns a polygon-based collision shape to it " +"automatically.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Trimesh Collision Sibling" msgstr "Crea Fratello di Collisione Trimesh" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Convex Collision Sibling(s)" +msgid "" +"Creates a polygon-based collision shape.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Single Convex Collision Siblings" +msgstr "Crea Fratello(i) di Collisione Convessa" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a single convex collision shape.\n" +"This is the fastest (but least accurate) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Multiple Convex Collision Siblings" msgstr "Crea Fratello(i) di Collisione Convessa" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is a performance middle-ground between the two above options." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Outline Mesh..." msgstr "Crea Mesh di Outline..." #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a static outline mesh. The outline mesh will have its normals " +"flipped automatically.\n" +"This can be used instead of the SpatialMaterial Grow property when using " +"that property isn't possible." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "View UV1" msgstr "Vista UV1" @@ -7178,7 +7237,7 @@ msgstr "Scalatura: " #: editor/plugins/spatial_editor_plugin.cpp msgid "Translating: " -msgstr "Traducendo: " +msgstr "Spostamento: " #: editor/plugins/spatial_editor_plugin.cpp msgid "Rotating %s degrees." @@ -8408,7 +8467,7 @@ msgstr "TileSet" msgid "No VCS addons are available." msgstr "Non sono disponibili addons VCS." -#: editor/plugins/version_control_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/version_control_editor_plugin.cpp msgid "Error" msgstr "Errore" @@ -9577,11 +9636,19 @@ msgid "Export With Debug" msgstr "Esporta Con Debug" #: editor/project_manager.cpp -msgid "The path does not exist." +#, fuzzy +msgid "The path specified doesn't exist." msgstr "Percorso non esistente." #: editor/project_manager.cpp -msgid "Invalid '.zip' project file, does not contain a 'project.godot' file." +#, fuzzy +msgid "Error opening package file (it's not in ZIP format)." +msgstr "Errore nell'apertura del file package: non è in formato ZIP." + +#: editor/project_manager.cpp +#, fuzzy +msgid "" +"Invalid \".zip\" project file; it doesn't contain a \"project.godot\" file." msgstr "" "File di progetto '.zip' non valido, non contiene un file 'project.godot'." @@ -9590,11 +9657,13 @@ msgid "Please choose an empty folder." msgstr "Si prega di scegliere una cartella vuota." #: editor/project_manager.cpp -msgid "Please choose a 'project.godot' or '.zip' file." +#, fuzzy +msgid "Please choose a \"project.godot\" or \".zip\" file." msgstr "Si prega di scegliere un file 'project.godot' o '.zip'." #: editor/project_manager.cpp -msgid "Directory already contains a Godot project." +#, fuzzy +msgid "This directory already contains a Godot project." msgstr "La Cartella contiene già un progetto di Godot." #: editor/project_manager.cpp @@ -10294,6 +10363,11 @@ msgid "Suffix" msgstr "Suffisso" #: editor/rename_dialog.cpp +#, fuzzy +msgid "Use Regular Expressions" +msgstr "Espressioni Regolari" + +#: editor/rename_dialog.cpp msgid "Advanced Options" msgstr "Opzioni avanzate" @@ -10330,7 +10404,8 @@ msgstr "" "Confronta le opzioni del contatore." #: editor/rename_dialog.cpp -msgid "Per Level counter" +#, fuzzy +msgid "Per-level Counter" msgstr "Contatore per Livello" #: editor/rename_dialog.cpp @@ -10362,10 +10437,6 @@ msgstr "" "La cifre mancanti vengono riempite con zeri iniziali." #: editor/rename_dialog.cpp -msgid "Regular Expressions" -msgstr "Espressioni Regolari" - -#: editor/rename_dialog.cpp msgid "Post-Process" msgstr "Post-Processo" @@ -10374,11 +10445,13 @@ msgid "Keep" msgstr "Mantieni" #: editor/rename_dialog.cpp -msgid "CamelCase to under_scored" +#, fuzzy +msgid "PascalCase to snake_case" msgstr "CamelCase a under_score" #: editor/rename_dialog.cpp -msgid "under_scored to CamelCase" +#, fuzzy +msgid "snake_case to PascalCase" msgstr "under_score a CamelCase" #: editor/rename_dialog.cpp @@ -10397,6 +10470,16 @@ msgstr "In Maiuscolo" msgid "Reset" msgstr "Reset" +#: editor/rename_dialog.cpp +#, fuzzy +msgid "Regular Expression Error" +msgstr "Espressioni Regolari" + +#: editor/rename_dialog.cpp +#, fuzzy +msgid "At character %s" +msgstr "Caratteri validi:" + #: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp msgid "Reparent Node" msgstr "Reparent Nodo" @@ -10861,7 +10944,8 @@ msgid "Invalid inherited parent name or path." msgstr "Nome o percorso genitore ereditato non valido." #: editor/script_create_dialog.cpp -msgid "Script is valid." +#, fuzzy +msgid "Script path/name is valid." msgstr "Lo script è valido." #: editor/script_create_dialog.cpp @@ -10953,6 +11037,11 @@ msgid "Copy Error" msgstr "Errore di Copia" #: editor/script_editor_debugger.cpp +#, fuzzy +msgid "Video RAM" +msgstr "Mem Video" + +#: editor/script_editor_debugger.cpp msgid "Skip Breakpoints" msgstr "Salta Punti di rottura" @@ -11001,10 +11090,6 @@ msgid "Total:" msgstr "Totale:" #: editor/script_editor_debugger.cpp -msgid "Video Mem" -msgstr "Mem Video" - -#: editor/script_editor_debugger.cpp msgid "Resource Path" msgstr "Percorso Risorsa" @@ -12707,6 +12792,15 @@ msgstr "Varyings può essere assegnato soltanto nella funzione del vertice." msgid "Constants cannot be modified." msgstr "Le constanti non possono essere modificate." +#~ msgid "Replaced %d occurrence(s)." +#~ msgstr "Rimpiazzate %d occorrenze." + +#~ msgid "Create Static Convex Body" +#~ msgstr "Crea Corpo Convesso Statico" + +#~ msgid "Failed creating shapes!" +#~ msgstr "Errore nella creazione delle forme!" + #~ msgid "" #~ "There are currently no tutorials for this class, you can [color=$color]" #~ "[url=$url]contribute one[/url][/color] or [color=$color][url=" diff --git a/editor/translations/ja.po b/editor/translations/ja.po index af2cca2ca6..c0298bb075 100644 --- a/editor/translations/ja.po +++ b/editor/translations/ja.po @@ -35,8 +35,8 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2020-01-27 07:09+0000\n" -"Last-Translator: Wataru Onuki <bettawat@yahoo.co.jp>\n" +"PO-Revision-Date: 2020-02-16 15:20+0000\n" +"Last-Translator: Akihiro Ogoshi <technical@palsystem-game.com>\n" "Language-Team: Japanese <https://hosted.weblate.org/projects/godot-engine/" "godot/ja/>\n" "Language: ja\n" @@ -59,7 +59,7 @@ msgstr "é•·ã•ãŒ1ã®æ–‡å—列(文å—)を予期ã—ã¾ã—ãŸã€‚" #: 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 "デコードãƒã‚¤ãƒˆã®ãƒã‚¤ãƒˆã¯è¶³ã‚Šã¾ã›ã‚“ã€ã¾ãŸã¯ç„¡åйãªå½¢å¼ã§ã™ã€‚" +msgstr "デコードã™ã‚‹ã«ã¯ãƒã‚¤ãƒˆãŒè¶³ã‚Šãªã„ã‹ã€ã¾ãŸã¯ç„¡åйãªå½¢å¼ã§ã™ã€‚" #: core/math/expression.cpp msgid "Invalid input %i (not passed) in expression" @@ -464,7 +464,7 @@ msgstr "トラック㌠spatial åž‹ã§ã¯ãªã„ãŸã‚ã€ã‚ーを挿入ã§ãã¾ #: editor/animation_track_editor.cpp msgid "Add Transform Track Key" -msgstr "変æ›ãƒˆãƒ©ãƒƒã‚¯ã‚ãƒ¼ã‚’è¿½åŠ " +msgstr "トランスフォームトラック ã‚ãƒ¼ã‚’è¿½åŠ " #: editor/animation_track_editor.cpp msgid "Add Track Key" @@ -716,8 +716,8 @@ msgid "Line Number:" msgstr "行番å·:" #: editor/code_editor.cpp -msgid "Replaced %d occurrence(s)." -msgstr "%d 箇所を置æ›ã—ã¾ã—ãŸã€‚" +msgid "%d replaced." +msgstr "%d ã‚’ç½®æ›ã—ã¾ã—ãŸã€‚" #: editor/code_editor.cpp editor/editor_help.cpp msgid "%d match." @@ -1670,11 +1670,11 @@ msgstr "(エディタ無効ã€ãƒ—ãƒãƒ‘ティ無効)" #: editor/editor_feature_profile.cpp msgid "(Properties Disabled)" -msgstr "(プãƒãƒ‘ティ無効)" +msgstr "(プãƒãƒ‘ティ無効)" #: editor/editor_feature_profile.cpp msgid "(Editor Disabled)" -msgstr "(エディタ無効)" +msgstr "(エディタ無効)" #: editor/editor_feature_profile.cpp msgid "Class Options:" @@ -2203,7 +2203,7 @@ msgstr "書込むファイルを開ã‘ã¾ã›ã‚“:" #: editor/editor_node.cpp msgid "Requested file format unknown:" -msgstr "ファイル形å¼ãŒä¸æ˜Ž:" +msgstr "è¦æ±‚ã•れãŸãƒ•ァイル形å¼ã¯ä¸æ˜Žã§ã™:" #: editor/editor_node.cpp msgid "Error while saving." @@ -3975,6 +3975,11 @@ msgid "Saving..." msgstr "ä¿å˜ä¸..." #: editor/import_dock.cpp +#, fuzzy +msgid "%d Files" +msgstr " ファイル" + +#: editor/import_dock.cpp msgid "Set as Default for '%s'" msgstr "'%s' ã®ãƒ‡ãƒ•ォルトã¨ã—ã¦è¨å®š" @@ -3983,10 +3988,6 @@ msgid "Clear Default for '%s'" msgstr "'%s' ã®ãƒ‡ãƒ•ォルトをクリア" #: editor/import_dock.cpp -msgid " Files" -msgstr " ファイル" - -#: editor/import_dock.cpp msgid "Import As:" msgstr "åå‰ã‚’付ã‘ã¦ã‚¤ãƒ³ãƒãƒ¼ãƒˆ:" @@ -4291,7 +4292,7 @@ msgstr "BlendSpace2Dã®ãƒã‚¤ãƒ³ãƒˆã‚’削除ã™ã‚‹" #: editor/plugins/animation_blend_space_2d_editor.cpp msgid "Remove BlendSpace2D Triangle" -msgstr "BlendSpace2D三角形を削除ã™ã‚‹" +msgstr "BlendSpace2Dã®ä¸‰è§’形を削除ã™ã‚‹" #: editor/plugins/animation_blend_space_2d_editor.cpp msgid "BlendSpace2D does not belong to an AnimationTree node." @@ -4578,7 +4579,7 @@ msgstr "未æ¥" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Depth" -msgstr "深度" +msgstr "Depth(深度/奥行)" #: editor/plugins/animation_player_editor_plugin.cpp msgid "1 step" @@ -5065,7 +5066,7 @@ msgstr "å…¬å¼" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Testing" -msgstr "テストä¸" +msgstr "テストã™ã‚‹" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Loading..." @@ -5607,9 +5608,8 @@ msgid "Auto Insert Key" msgstr "自動ã‚ー挿入" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Animation Key and Pose Options" -msgstr "アニメーションã‚ãƒ¼ãŒæŒ¿å…¥ã•れã¾ã—ãŸã€‚" +msgstr "アニメーションã‚ーã¨ãƒãƒ¼ã‚ºã®ã‚ªãƒ—ション" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Insert Key (Existing Tracks)" @@ -5827,7 +5827,7 @@ msgstr "å³ã‚¯ãƒªãƒƒã‚¯ã§ç‚¹ã‚’è¿½åŠ " #: editor/plugins/gi_probe_editor_plugin.cpp msgid "Bake GI Probe" -msgstr "ã‚°ãƒãƒ¼ãƒãƒ«ã‚¤ãƒ«ãƒŸãƒãƒ¼ã‚·ãƒ§ãƒ³ã®äº‹å‰è¨ˆç®—" +msgstr "GIプãƒãƒ¼ãƒ–ã®ç„¼ãè¾¼ã¿" #: editor/plugins/gradient_editor_plugin.cpp msgid "Gradient Edited" @@ -5854,28 +5854,46 @@ msgid "Mesh is empty!" msgstr "メッシュãŒã‚りã¾ã›ã‚“!" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Trimesh Body" -msgstr "三角形メッシュé™çš„ボディを作æˆ" +msgid "Couldn't create a Trimesh collision shape." +msgstr "トライメッシュコリジョンシェイプを作æˆã§ãã¾ã›ã‚“ã§ã—ãŸã€‚" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Convex Body" -msgstr "é™çš„凸状ボディを生æˆ" +msgid "Create Static Trimesh Body" +msgstr "三角形メッシュé™çš„ボディを作æˆ" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "This doesn't work on scene root!" -msgstr "シーンã®ãƒ«ãƒ¼ãƒˆã§ã¯ç„¡åйã§ã™!" +msgstr "ã“れã¯ã‚·ãƒ¼ãƒ³ã®ãƒ«ãƒ¼ãƒˆã§ã¯æ©Ÿèƒ½ã—ã¾ã›ã‚“!" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Trimesh Static Shape" msgstr "三角形メッシュé™çš„シェイプを生æˆ" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Failed creating shapes!" -msgstr "図形ã®ä½œæˆã«å¤±æ•—ã—ã¾ã—ãŸ!" +msgid "Can't create a single convex collision shape for the scene root." +msgstr "" +"シーンã®ãƒ«ãƒ¼ãƒˆã«å˜ä¸€ã®å‡¸åž‹ã®ã‚³ãƒªã‚¸ãƒ§ãƒ³ã‚·ã‚§ã‚¤ãƒ—を作æˆã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Couldn't create a single convex collision shape." +msgstr "å˜ä¸€ã®å‡¸åž‹ã‚³ãƒªã‚¸ãƒ§ãƒ³ã‚·ã‚§ã‚¤ãƒ—を作æˆã§ãã¾ã›ã‚“ã§ã—ãŸã€‚" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Single Convex Shape" +msgstr "å˜ä¸€ã®å‡¸åž‹ã‚·ã‚§ã‚¤ãƒ—を作æˆã™ã‚‹" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Can't create multiple convex collision shapes for the scene root." +msgstr "" +"シーンã®ãƒ«ãƒ¼ãƒˆã«è¤‡æ•°ã®å‡¸åž‹ã‚³ãƒªã‚¸ãƒ§ãƒ³ã‚·ã‚§ã‚¤ãƒ—を作æˆã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Convex Shape(s)" -msgstr "凸状シェイプを作æˆ" +msgid "Couldn't create any collision shapes." +msgstr "コリジョンシェイプを作æˆã§ãã¾ã›ã‚“ã§ã—ãŸã€‚" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Multiple Convex Shapes" +msgstr "複数ã®å‡¸åž‹ã‚·ã‚§ã‚¤ãƒ—を作æˆã™ã‚‹" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Navigation Mesh" @@ -5899,7 +5917,7 @@ msgstr "モデルã«ã¯ã“ã®ãƒ¬ã‚¤ãƒ¤ãƒ¼ã«UVãŒã‚りã¾ã›ã‚“" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "MeshInstance lacks a Mesh!" -msgstr "メッシュインスタンスã«ãƒ¡ãƒƒã‚·ãƒ¥ãŒä¸è¶³ã—ã¦ã„ã¾ã™!" +msgstr "MeshInstanceã«ãƒ¡ãƒƒã‚·ãƒ¥ãŒã‚りã¾ã›ã‚“ï¼" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Mesh has not surface to create outlines from!" @@ -5926,18 +5944,68 @@ msgid "Create Trimesh Static Body" msgstr "三角形メッシュé™çš„ボディを作æˆ" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a StaticBody and assigns a polygon-based collision shape to it " +"automatically.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" +"StaticBodyを作æˆã—ã€ãƒãƒªã‚´ãƒ³ãƒ™ãƒ¼ã‚¹ã®ã‚³ãƒªã‚¸ãƒ§ãƒ³ã‚·ã‚§ã‚¤ãƒ—を自動的ã«å‰²ã‚Šå½“ã¦ã¾" +"ã™ã€‚\n" +"ã“れã¯ã€è¡çªæ¤œå‡ºã®æœ€ã‚‚æ£ç¢ºãª(ãŸã ã—æœ€ã‚‚é…ã„)オプションã§ã™ã€‚" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Trimesh Collision Sibling" msgstr "三角形メッシュ兄弟コリジョンを生æˆ" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Convex Collision Sibling(s)" -msgstr "凸型兄弟関係コリジョンを生æˆ" +msgid "" +"Creates a polygon-based collision shape.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" +"ãƒãƒªã‚´ãƒ³ãƒ™ãƒ¼ã‚¹ã®ã‚³ãƒªã‚¸ãƒ§ãƒ³ã‚·ã‚§ã‚¤ãƒ—を作æˆã—ã¾ã™ã€‚\n" +"ã“れã¯ã€è¡çªæ¤œå‡ºã®æœ€ã‚‚æ£ç¢ºãª(ãŸã ã—æœ€ã‚‚é…ã„)オプションã§ã™ã€‚" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Single Convex Collision Siblings" +msgstr "å˜ä¸€ã®å‡¸åž‹ã‚³ãƒªã‚¸ãƒ§ãƒ³ã®å…„弟を作æˆ" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a single convex collision shape.\n" +"This is the fastest (but least accurate) option for collision detection." +msgstr "" +"å˜ä¸€ã®å‡¸åž‹ã‚³ãƒªã‚¸ãƒ§ãƒ³ã‚·ã‚§ã‚¤ãƒ—を作æˆã—ã¾ã™ã€‚\n" +"ã“れã¯ã€è¡çªæ¤œå‡ºã®æœ€é€Ÿã®(ãŸã ã—ç²¾åº¦ãŒæœ€ã‚‚低ã„)オプションã§ã™ã€‚" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Multiple Convex Collision Siblings" +msgstr "複数ã®å‡¸åž‹ã‚³ãƒªã‚¸ãƒ§ãƒ³ã®å…„弟を作æˆã™ã‚‹" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is a performance middle-ground between the two above options." +msgstr "" +"ãƒãƒªã‚´ãƒ³ãƒ™ãƒ¼ã‚¹ã®ã‚³ãƒªã‚¸ãƒ§ãƒ³ã‚·ã‚§ã‚¤ãƒ—を作æˆã—ã¾ã™ã€‚\n" +"ã“れã¯ã€ä¸Šè¨˜ã®2ã¤ã®ã‚ªãƒ—ションã®ä¸é–“çš„ãªãƒ‘フォーマンスã§ã™ã€‚" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Outline Mesh..." msgstr "アウトラインメッシュを生æˆ..." #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a static outline mesh. The outline mesh will have its normals " +"flipped automatically.\n" +"This can be used instead of the SpatialMaterial Grow property when using " +"that property isn't possible." +msgstr "" +"é™çš„ãªã‚¢ã‚¦ãƒˆãƒ©ã‚¤ãƒ³ãƒ¡ãƒƒã‚·ãƒ¥ã‚’作æˆã—ã¾ã™ã€‚ã‚¢ã‚¦ãƒˆãƒ©ã‚¤ãƒ³ãƒ¡ãƒƒã‚·ãƒ¥ã®æ³•ç·šã¯è‡ªå‹•çš„ã«" +"å転ã—ã¾ã™ã€‚\n" +"ã“ã®ãƒ—ãƒãƒ‘ティを使用ã§ããªã„å ´åˆã¯ã€SpatialMaterialã®Growプãƒãƒ‘ティを代ã‚りã«" +"使用ã§ãã¾ã™ã€‚" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "View UV1" msgstr "UV1を表示" @@ -6171,11 +6239,11 @@ msgstr "AABBを生æˆä¸" #: editor/plugins/particles_editor_plugin.cpp msgid "Generate Visibility AABB" -msgstr "軸平行境界ボックスã®å¯è¦–性を生æˆã™ã‚‹" +msgstr "å¯è¦–性ã®AABBを生æˆ" #: editor/plugins/particles_editor_plugin.cpp msgid "Generate AABB" -msgstr "軸平行境界ボックス(AABB)を生æˆ" +msgstr "AABBを生æˆ" #: editor/plugins/path_2d_editor_plugin.cpp msgid "Remove Point from Curve" @@ -6278,14 +6346,12 @@ msgid "Set Curve Point Position" msgstr "カーブãƒã‚¤ãƒ³ãƒˆã®ä½ç½®ã‚’è¨å®š" #: editor/plugins/path_editor_plugin.cpp -#, fuzzy msgid "Set Curve In Position" -msgstr "曲線ã®ä½ç½®ã‚’è¨å®š" +msgstr "曲線ã®In-Controlã®ä½ç½®ã‚’指定" #: editor/plugins/path_editor_plugin.cpp -#, fuzzy msgid "Set Curve Out Position" -msgstr "曲線ã®Out-ãƒãƒ³ãƒ‰ãƒ«ã®ä½ç½®ã‚’指定" +msgstr "曲線ã®Out-Controlã®ä½ç½®ã‚’指定" #: editor/plugins/path_editor_plugin.cpp msgid "Split Path" @@ -6554,7 +6620,7 @@ msgstr "リソースをèªã¿è¾¼ã‚€" #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "ResourcePreloader" -msgstr "リソースプリãƒãƒ¼ãƒ€ãƒ¼" +msgstr "ResourcePreloader" #: editor/plugins/root_motion_editor_plugin.cpp msgid "AnimationTree has no path set to an AnimationPlayer" @@ -6959,11 +7025,11 @@ msgstr "行を折りãŸãŸã‚€/展開ã™ã‚‹" #: editor/plugins/script_text_editor.cpp msgid "Fold All Lines" -msgstr "ã™ã¹ã¦ã®è¡Œã‚’折りãŸãŸã‚€" +msgstr "å…¨ã¦ã®è¡Œã‚’折りãŸãŸã‚€" #: editor/plugins/script_text_editor.cpp msgid "Unfold All Lines" -msgstr "ã™ã¹ã¦ã®è¡Œã‚’展開ã™ã‚‹" +msgstr "å…¨ã¦ã®è¡Œã‚’展開ã™ã‚‹" #: editor/plugins/script_text_editor.cpp msgid "Clone Down" @@ -7068,7 +7134,7 @@ msgstr "ボーンã¸ãƒ¬ã‚¹ãƒˆãƒ»ãƒãƒ¼ã‚ºã‚’è¨å®šã™ã‚‹" #: editor/plugins/skeleton_2d_editor_plugin.cpp msgid "Skeleton2D" -msgstr "スケルトン2D" +msgstr "Skeleton2D" #: editor/plugins/skeleton_2d_editor_plugin.cpp msgid "Make Rest Pose (From Bones)" @@ -7104,7 +7170,7 @@ msgstr "é€è¦–投影" #: editor/plugins/spatial_editor_plugin.cpp msgid "Transform Aborted." -msgstr "変æ›ã¯ä¸æ¢ã•れã¾ã—ãŸ." +msgstr "トランスフォームã¯ä¸æ¢ã•れã¾ã—ãŸã€‚" #: editor/plugins/spatial_editor_plugin.cpp msgid "X-Axis Transform." @@ -7220,7 +7286,7 @@ msgstr "後é¢" #: editor/plugins/spatial_editor_plugin.cpp msgid "Align Transform with View" -msgstr "変æ›ã‚’ビューã«åˆã‚ã›ã‚‹" +msgstr "トランスフォームをビューã«åˆã‚ã›ã‚‹" #: editor/plugins/spatial_editor_plugin.cpp msgid "Align Rotation with View" @@ -7228,7 +7294,7 @@ msgstr "回転をビューã«åˆã‚ã›ã‚‹" #: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp msgid "No parent to instance a child at." -msgstr "åインスタンスを生æˆã™ã‚‹ãŸã‚ã®è¦ªãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“。" +msgstr "åをインスタンス化ã™ã‚‹ãŸã‚ã®è¦ªãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“。" #: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp msgid "This operation requires a single selected node." @@ -7248,7 +7314,7 @@ msgstr "ワイヤーフレーム表示" #: editor/plugins/spatial_editor_plugin.cpp msgid "Display Overdraw" -msgstr "オーãƒãƒ¼ãƒ‰ãƒãƒ¼ã‚’表示" +msgstr "オーãƒãƒ¼ãƒ‰ãƒãƒ¼è¡¨ç¤º" #: editor/plugins/spatial_editor_plugin.cpp msgid "Display Unshaded" @@ -7319,9 +7385,8 @@ msgid "Freelook Speed Modifier" msgstr "フリールックã®é€Ÿåº¦ã‚’調整" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Freelook Slow Modifier" -msgstr "フリールックã®é€Ÿåº¦ã‚’調整" +msgstr "ãƒ•ãƒªãƒ¼ãƒ«ãƒƒã‚¯ã®æ¸›é€Ÿã‚’調整" #: editor/plugins/spatial_editor_plugin.cpp msgid "" @@ -7341,7 +7406,7 @@ msgstr "Xformダイアãƒã‚°" #: editor/plugins/spatial_editor_plugin.cpp msgid "Snap Nodes To Floor" -msgstr "ノードを底é¢ã«ã‚¹ãƒŠãƒƒãƒ—ã•ã›ã‚‹" +msgstr "ノードをフãƒã‚¢ã«ã‚¹ãƒŠãƒƒãƒ—" #: editor/plugins/spatial_editor_plugin.cpp msgid "Couldn't find a solid floor to snap the selection to." @@ -7358,9 +7423,8 @@ msgstr "" "Alt+å³ã‚¯ãƒªãƒƒã‚¯: 奥行ãリストã®é¸æŠž" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Use Local Space" -msgstr "ãƒãƒ¼ã‚«ãƒ«ç©ºé–“モード (%s)" +msgstr "ãƒãƒ¼ã‚«ãƒ«ç©ºé–“を使用" #: editor/plugins/spatial_editor_plugin.cpp msgid "Use Snap" @@ -7413,15 +7477,15 @@ msgstr "フリールックã®åˆ‡ã‚Šæ›¿ãˆ" #: editor/plugins/spatial_editor_plugin.cpp #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Transform" -msgstr "幾何å¦å¤‰æ›(変形)" +msgstr "トランスフォーム" #: editor/plugins/spatial_editor_plugin.cpp msgid "Snap Object to Floor" -msgstr "オブジェクトを底é¢ã«ã‚¹ãƒŠãƒƒãƒ—" +msgstr "オブジェクトをフãƒã‚¢ã«ã‚¹ãƒŠãƒƒãƒ—" #: editor/plugins/spatial_editor_plugin.cpp msgid "Transform Dialog..." -msgstr "変æ›ã®ãƒ€ã‚¤ã‚¢ãƒã‚°..." +msgstr "トランスフォームã®ãƒ€ã‚¤ã‚¢ãƒã‚°..." #: editor/plugins/spatial_editor_plugin.cpp msgid "1 Viewport" @@ -7514,7 +7578,7 @@ msgstr "縮尺(比):" #: editor/plugins/spatial_editor_plugin.cpp msgid "Transform Type" -msgstr "変æ›ã‚¿ã‚¤ãƒ—" +msgstr "トランスフォームタイプ" #: editor/plugins/spatial_editor_plugin.cpp msgid "Pre" @@ -7850,14 +7914,12 @@ msgid "Checked Item" msgstr "ãƒã‚§ãƒƒã‚¯æ¸ˆã¿ã‚¢ã‚¤ãƒ†ãƒ " #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Radio Item" -msgstr "ã‚¢ã‚¤ãƒ†ãƒ ã‚’è¿½åŠ " +msgstr "ラジオ アイテム" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Checked Radio Item" -msgstr "ãƒã‚§ãƒƒã‚¯æ¸ˆã¿ã‚¢ã‚¤ãƒ†ãƒ " +msgstr "ãƒã‚§ãƒƒã‚¯æ¸ˆã¿ãƒ©ã‚¸ã‚ª アイテム" #: editor/plugins/theme_editor_plugin.cpp msgid "Named Sep." @@ -7908,9 +7970,8 @@ msgid "Subtree" msgstr "サブツリー" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Has,Many,Options" -msgstr "オプション" +msgstr "ã‚りã¾ã™ã‚ˆ,ãŸãã•ã‚“,オプション" #: editor/plugins/theme_editor_plugin.cpp msgid "Data Type:" @@ -8030,7 +8091,7 @@ msgstr "上下å転" #: editor/plugins/tile_map_editor_plugin.cpp msgid "Clear Transform" -msgstr "変æ›ã‚’クリア" +msgstr "トランスフォームをクリア" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Add Texture(s) to TileSet." @@ -8158,7 +8219,7 @@ msgstr "æ–°è¦ãƒãƒªã‚´ãƒ³ã‚’生æˆã€‚" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Keep polygon inside region Rect." -msgstr "é ˜åŸŸRect内ã«ãƒãƒªã‚´ãƒ³ã‚’ä¿æŒã—ã¾ã™ã€‚" +msgstr "é ˜åŸŸRect内ã®ãƒãƒªã‚´ãƒ³ã‚’ä¿æŒã—ã¾ã™ã€‚" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Enable snap and show grid (configurable via the Inspector)." @@ -8207,8 +8268,8 @@ msgid "" "Drag handles to edit Rect.\n" "Click on another Tile to edit it." msgstr "" -"四角形を編集ã™ã‚‹ãŸã‚ãƒãƒ³ãƒ‰ãƒ«ã‚’ドラッグã—ã¾ã™ã€‚編集ã®ãŸã‚別ã®ã‚¿ã‚¤ãƒ«ã‚’クリック" -"ã—ã¾ã™ã€‚" +"ãƒãƒ³ãƒ‰ãƒ«ã‚’ドラッグã—ã¦çŸ©å½¢ã‚’編集ã—ã¾ã™ã€‚\n" +"別ã®ã‚¿ã‚¤ãƒ«ã‚’クリックã—ã¦ãれを編集ã—ã¾ã™ã€‚" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Delete selected Rect." @@ -8220,7 +8281,7 @@ msgid "" "Click on another Tile to edit it." msgstr "" "ç¾åœ¨ç·¨é›†ä¸ã®ã‚µãƒ–ã‚¿ã‚¤ãƒ«ã‚’é¸æŠžã—ã¾ã™ã€‚\n" -"別ã®ã‚¿ã‚¤ãƒ«ã‚’クリックã—ã¦ç·¨é›†ã—ã¾ã™ã€‚" +"別ã®ã‚¿ã‚¤ãƒ«ã‚’クリックã—ã¦ãれを編集ã—ã¾ã™ã€‚" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Delete polygon." @@ -8233,10 +8294,10 @@ msgid "" "Shift+LMB: Set wildcard bit.\n" "Click on another Tile to edit it." msgstr "" -"左クリック:ビットをオンã«è¨å®šã—ã¾ã™ã€‚\n" +"左クリック:ビットをオンã«ã—ã¾ã™ã€‚\n" "å³ã‚¯ãƒªãƒƒã‚¯:ビットをオフã«ã—ã¾ã™ã€‚\n" "Shift+左クリック:ワイルドカード・ビットをè¨å®šã—ã¾ã™ã€‚\n" -"別ã®ã‚¿ã‚¤ãƒ«ã‚’クリックã—ã¦ç·¨é›†ã—ã¾ã™ã€‚" +"別ã®ã‚¿ã‚¤ãƒ«ã‚’クリックã—ã¦ãれを編集ã—ã¾ã™ã€‚" #: editor/plugins/tile_set_editor_plugin.cpp msgid "" @@ -8261,8 +8322,8 @@ msgid "" "Select sub-tile to change its z index.\n" "Click on another Tile to edit it." msgstr "" -"Zインデックスを変更ã™ã‚‹ã«ã¯ã€ã‚µãƒ–ã‚¿ã‚¤ãƒ«ã‚’é¸æŠžã—ã¾ã™ã€‚\n" -"別ã®ã‚¿ã‚¤ãƒ«ã‚’クリックã—ã¦ç·¨é›†ã—ã¾ã™ã€‚" +"ã‚µãƒ–ã‚¿ã‚¤ãƒ«ã‚’é¸æŠžã—ã¦ã€zインデックスを変更ã—ã¾ã™ã€‚\n" +"別ã®ã‚¿ã‚¤ãƒ«ã‚’クリックã—ã¦ãれを編集ã—ã¾ã™ã€‚" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Set Tile Region" @@ -8333,14 +8394,12 @@ msgid "Edit Tile Z Index" msgstr "タイルã®Zインデックスを編集" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Make Convex" -msgstr "ãƒãƒªã‚´ãƒ³ã‚’凸é¢ã«ã™ã‚‹" +msgstr "凸é¢ã‚’作る" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Make Concave" -msgstr "ãƒãƒªã‚´ãƒ³ã‚’凹é¢ã«ã™ã‚‹" +msgstr "凹é¢ã‚’作る" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Create Collision Polygon" @@ -8362,7 +8421,7 @@ msgstr "タイルセット" msgid "No VCS addons are available." msgstr "VCSアドオンã¯åˆ©ç”¨ã§ãã¾ã›ã‚“。" -#: editor/plugins/version_control_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/version_control_editor_plugin.cpp msgid "Error" msgstr "エラー" @@ -8420,20 +8479,19 @@ msgstr "タイプã®å¤‰æ›´" #: editor/plugins/version_control_editor_plugin.cpp msgid "Stage Selected" -msgstr "é¸æŠžã•れãŸã‚‚ã®ã‚’公開ã™ã‚‹" +msgstr "é¸æŠžç‰©ã‚’ã‚¹ãƒ†ãƒ¼ã‚¸ã™ã‚‹" #: editor/plugins/version_control_editor_plugin.cpp msgid "Stage All" -msgstr "ã™ã¹ã¦ã‚’公開ã™ã‚‹" +msgstr "ã™ã¹ã¦ã‚’ステージã™ã‚‹" #: editor/plugins/version_control_editor_plugin.cpp msgid "Add a commit message" msgstr "ã‚³ãƒŸãƒƒãƒˆãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’è¿½åŠ ã™ã‚‹" #: editor/plugins/version_control_editor_plugin.cpp -#, fuzzy msgid "Commit Changes" -msgstr "スクリプトã®å¤‰æ›´ã‚’åŒæœŸ" +msgstr "変更をコミットã™ã‚‹" #: editor/plugins/version_control_editor_plugin.cpp #: modules/gdnative/gdnative_library_singleton_editor.cpp @@ -8462,19 +8520,19 @@ msgstr "å‡ºåŠ›ã‚’è¿½åŠ " #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Scalar" -msgstr "スカラー" +msgstr "スカラー(Scaler)" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Vector" -msgstr "ベクター(Vector)" +msgstr "ベクトル(Vector)" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Boolean" -msgstr "ブール" +msgstr "ブール(Boolean)" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Sampler" -msgstr "サンプラー" +msgstr "サンプラー(Sampler)" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Add input port" @@ -8514,7 +8572,7 @@ msgstr "å¼ã®è¨å®š" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Resize VisualShader node" -msgstr "ビジュアルシェーダーノードã®ã‚µã‚¤ã‚ºã‚’変更ã™ã‚‹" +msgstr "VisualShaderノードã®ã‚µã‚¤ã‚ºã‚’変更" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Set Uniform Name" @@ -8554,9 +8612,8 @@ msgid "Fragment" msgstr "フラグメント" #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Light" -msgstr "å³å´é¢" +msgstr "ライト" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Show resulted shader code." @@ -8568,7 +8625,7 @@ msgstr "シェーダーノードã®ä½œæˆ" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Color function." -msgstr "カラー関数。" +msgstr "Color関数。" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Color operator." @@ -8628,12 +8685,11 @@ msgstr "SoftLight演算å。" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Color constant." -msgstr "カラー定数。" +msgstr "Color定数。" #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Color uniform." -msgstr "トランスフォーム" +msgstr "Colorã®uniform。" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Returns the boolean result of the %s comparison between two parameters." @@ -8761,7 +8817,7 @@ msgstr "ãƒã‚¤ãƒ”ア数(2.718282)。自然対数ã®ãƒ™ãƒ¼ã‚¹ã‚’表ã—ã¾ã™ã€‚" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Epsilon constant (0.00001). Smallest possible scalar number." -msgstr "Î¥(イプシãƒãƒ³)定数(0.00001)。å¯èƒ½ãªæœ€å°ã®ã‚¹ã‚«ãƒ©ãƒ¼æ•°ã€‚" +msgstr "Î¥(イプシãƒãƒ³)定数(0.00001)。使用å¯èƒ½ãªæœ€å°ã®ã‚¹ã‚«ãƒ©ãƒ¼æ•°ã€‚" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Phi constant (1.618034). Golden ratio." @@ -8930,7 +8986,6 @@ msgid "Returns the square root of the parameter." msgstr "パラメータã®å¹³æ–¹æ ¹ã‚’è¿”ã—ã¾ã™ã€‚" #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "" "SmoothStep function( scalar(edge0), scalar(edge1), scalar(x) ).\n" "\n" @@ -8938,22 +8993,21 @@ msgid "" "'edge1'. Otherwise the return value is interpolated between 0.0 and 1.0 " "using Hermite polynomials." msgstr "" -"SmoothStep関数(scalar(エッジ0)ã€scalar(エッジ1)ã€scalar (x))。\n" +"SmoothStep関数( scalar(edge0), scalar(edge1), scalar(x) )。\n" "\n" -"'x' ㌠'edge0' よりå°ã•ã„å ´åˆã¯0.0ã‚’è¿”ã—ã€x㌠'edge1' より大ãã„å ´åˆã¯1.0ã‚’è¿”" -"ã—ã¾ã™ã€‚ãれ以外ã®å ´åˆã€æˆ»ã‚Šå€¤ã¯ã‚¨ãƒ«ãƒŸãƒ¼ãƒˆå¤šé …å¼ã‚’使用ã—ã¦0.0ã¨1.0ã®é–“ã§è£œé–“" -"ã•れã¾ã™ã€‚" +"'x' ㌠'edge0' よりå°ã•ã„å ´åˆã¯ 0.0 ã‚’è¿”ã—ã€x㌠'edge1' より大ãã„å ´åˆã¯ 1.0 " +"ã‚’è¿”ã—ã¾ã™ã€‚ãれ以外ã®å ´åˆã€æˆ»ã‚Šå€¤ã¯ã‚¨ãƒ«ãƒŸãƒ¼ãƒˆå¤šé …å¼ã‚’使用ã—㦠0.0 㨠1.0 ã®" +"é–“ã§è£œé–“ã•れã¾ã™ã€‚" #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "" "Step function( scalar(edge), scalar(x) ).\n" "\n" "Returns 0.0 if 'x' is smaller than 'edge' and otherwise 1.0." msgstr "" -"Step関数( scalar(edge)ã€scalar(x))。\n" +"Step関数( scalar(edge), scalar(x) )。\n" "\n" -"'x' ㌠'edge' よりå°ã•ã„å ´åˆã¯0.0ã‚’è¿”ã—ã€ãれ以外ã®å ´åˆã¯1.0ã‚’è¿”ã—ã¾ã™ã€‚" +"'x' ㌠'edge' よりå°ã•ã„å ´åˆã¯ 0.0 ã‚’è¿”ã—ã€ãれ以外ã®å ´åˆã¯ 1.0 ã‚’è¿”ã—ã¾ã™ã€‚" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Returns the tangent of the parameter." @@ -8992,9 +9046,8 @@ msgid "Scalar constant." msgstr "スカラー定数。" #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Scalar uniform." -msgstr "スカラUniformを変更" +msgstr "Scalarã®uniform。" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Perform the cubic texture lookup." @@ -9005,27 +9058,22 @@ msgid "Perform the texture lookup." msgstr "テクスãƒãƒ£ãƒ»ãƒ«ãƒƒã‚¯ã‚¢ãƒƒãƒ—を実行ã—ã¾ã™ã€‚" #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Cubic texture uniform lookup." -msgstr "テクスãƒãƒ£Uniformを変更" +msgstr "ã‚ュービックテクスãƒãƒ£uniformルックアップ。" #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "2D texture uniform lookup." -msgstr "テクスãƒãƒ£Uniformを変更" +msgstr "2Dテクスãƒãƒ£uniformルックアップ。" #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "2D texture uniform lookup with triplanar." -msgstr "テクスãƒãƒ£Uniformを変更" +msgstr "triplanarã®2Dテクスãƒãƒ£uniformルックアップ。" #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Transform function." -msgstr "トランスフォームã®ãƒ€ã‚¤ã‚¢ãƒã‚°..." +msgstr "トランスフォーム関数。" #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "" "Calculate the outer product of a pair of vectors.\n" "\n" @@ -9035,7 +9083,7 @@ msgid "" "whose number of rows is the number of components in 'c' and whose number of " "columns is the number of components in 'r'." msgstr "" -"(GLES3ã®ã¿)ベクトルã®ãƒšã‚¢ã®å¤–ç©ã‚’計算ã—ã¾ã™ã€‚\n" +"ベクトルã®ãƒšã‚¢ã®å¤–ç©ã‚’計算ã—ã¾ã™ã€‚\n" "\n" "OuterProductã¯ã€æœ€åˆã®ãƒ‘ラメータ 'c' を列ベクトル(1列ã®è¡Œåˆ—)ã¨ã—ã¦ã€2番目ã®ãƒ‘" "ラメータ 'r' を行ベクトル(1行ã®è¡Œåˆ—)ã¨ã—ã¦å‡¦ç†ã—ã€ç·šå½¢ä»£æ•°è¡Œåˆ—ä¹—ç®— 'c * r' ã‚’" @@ -9044,41 +9092,39 @@ msgstr "" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Composes transform from four vectors." -msgstr "4ã¤ã®ãƒ™ã‚¯ãƒˆãƒ«ã‹ã‚‰å¤‰æ›ã‚’作æˆã—ã¾ã™ã€‚" +msgstr "4ã¤ã®ãƒ™ã‚¯ãƒˆãƒ«ã‹ã‚‰ãƒˆãƒ©ãƒ³ã‚¹ãƒ•ォームを作æˆã—ã¾ã™ã€‚" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Decomposes transform to four vectors." -msgstr "変æ›ã‚’4ã¤ã®ãƒ™ã‚¯ãƒˆãƒ«ã«åˆ†è§£ã—ã¾ã™ã€‚" +msgstr "トランスフォームを4ã¤ã®ãƒ™ã‚¯ãƒˆãƒ«ã«åˆ†è§£ã—ã¾ã™ã€‚" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Calculates the determinant of a transform." -msgstr "変æ›ã®è¡Œåˆ—å¼ã‚’計算ã—ã¾ã™ã€‚" +msgstr "トランスフォームã®è¡Œåˆ—å¼ã‚’計算ã—ã¾ã™ã€‚" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Calculates the inverse of a transform." -msgstr "変æ›ã®é€†è¡Œåˆ—を計算ã—ã¾ã™ã€‚" +msgstr "トランスフォームã®é€†è¡Œåˆ—を計算ã—ã¾ã™ã€‚" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Calculates the transpose of a transform." -msgstr "変æ›ã®è»¢ç½®ã‚’計算ã—ã¾ã™ã€‚" +msgstr "トランスフォームã®è»¢ç½®ã‚’計算ã—ã¾ã™ã€‚" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Multiplies transform by transform." -msgstr "変æ›ã§å¤‰æ›ã‚’ä¹—ç®—ã—ã¾ã™ã€‚" +msgstr "トランスフォームã§ãƒˆãƒ©ãƒ³ã‚¹ãƒ•ォームを乗算ã—ã¾ã™ã€‚" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Multiplies vector by transform." -msgstr "変æ›ã§ãƒ™ã‚¯ãƒˆãƒ«ã‚’ä¹—ç®—ã—ã¾ã™ã€‚" +msgstr "トランスフォームã§ãƒ™ã‚¯ãƒˆãƒ«ã‚’ä¹—ç®—ã—ã¾ã™ã€‚" #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Transform constant." -msgstr "トランスフォームã¯ä¸æ¢ã•れã¾ã—ãŸ." +msgstr "トランスフォーム定数。" #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Transform uniform." -msgstr "トランスフォームã¯ä¸æ¢ã•れã¾ã—ãŸ." +msgstr "トランスフォーム用uniform。" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Vector function." @@ -9109,7 +9155,6 @@ msgid "Calculates the dot product of two vectors." msgstr "2ã¤ã®ãƒ™ã‚¯ãƒˆãƒ«ã®å†…ç©ã‚’計算ã—ã¾ã™ã€‚" #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "" "Returns the vector that points in the same direction as a reference vector. " "The function has three vector parameters : N, the vector to orient, I, the " @@ -9117,9 +9162,9 @@ msgid "" "Nref is smaller than zero the return value is N. Otherwise -N is returned." msgstr "" "å‚照ベクトルã¨åŒã˜æ–¹å‘を指ã™ãƒ™ã‚¯ãƒˆãƒ«ã‚’è¿”ã—ã¾ã™ã€‚ ã“ã®é–¢æ•°ã«ã¯3ã¤ã®ãƒ™ã‚¯ãƒˆãƒ«ãƒ‘" -"ラメータãŒã‚りã¾ã™ã€‚Nã¯é…å‘ã™ã‚‹ãƒ™ã‚¯ãƒˆãƒ«ã€Iã¯å…¥å°„ベクトルã€Nrefã¯å‚照ベクトル" -"ã§ã™ã€‚ Iã¨Nrefã®å†…ç©ãŒ0よりå°ã•ã„å ´åˆã€æˆ»ã‚Šå€¤ã¯Nã§ã™ã€‚ãれ以外ã®å ´åˆã€-NãŒè¿”" -"ã•れã¾ã™ã€‚" +"ラメータãŒã‚りã¾ã™ã€‚Nã¯æ–¹å‘ベクトルã€Iã¯å…¥å°„ベクトルã€Nrefã¯å‚照ベクトルã§" +"ã™ã€‚ Iã¨Nrefã®å†…ç©ãŒ0よりå°ã•ã„å ´åˆã€æˆ»ã‚Šå€¤ã¯Nã§ã™ã€‚ãれ以外ã®å ´åˆã€-NãŒè¿”ã•" +"れã¾ã™ã€‚" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Calculates the length of a vector." @@ -9229,9 +9274,8 @@ msgid "Vector constant." msgstr "ベクトル定数。" #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Vector uniform." -msgstr "uniform ã¸ã®å‰²ã‚Šå½“ã¦ã€‚" +msgstr "ベクトルuniform。" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "" @@ -9252,7 +9296,6 @@ msgstr "" "è¿”ã—ã¾ã™ã€‚" #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "" "Custom Godot Shader Language expression, which is placed on top of the " "resulted shader. You can place various function definitions inside and call " @@ -9319,7 +9362,7 @@ msgstr "" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "VisualShader" -msgstr "ビジュアルシェーダー" +msgstr "VisualShader" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Edit Visual Property" @@ -9484,7 +9527,7 @@ msgstr "テã‚スト" #: editor/project_export.cpp msgid "Compiled" -msgstr "コンパイル" +msgstr "コンパイル済ã¿" #: editor/project_export.cpp msgid "Encrypted (Provide Key Below)" @@ -9535,13 +9578,19 @@ msgid "Export With Debug" msgstr "デãƒãƒƒã‚°ä»˜ãエクスãƒãƒ¼ãƒˆ" #: editor/project_manager.cpp -msgid "The path does not exist." -msgstr "å˜åœ¨ã—ãªã„パスã§ã™ã€‚" +msgid "The path specified doesn't exist." +msgstr "指定ã•れãŸãƒ‘スã¯å˜åœ¨ã—ã¾ã›ã‚“。" + +#: editor/project_manager.cpp +msgid "Error opening package file (it's not in ZIP format)." +msgstr "" +"パッケージ ファイルを開ãã¨ãã«ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ã¾ã—㟠(ZIPå½¢å¼ã§ã¯ã‚りã¾ã›ã‚“)。" #: editor/project_manager.cpp -msgid "Invalid '.zip' project file, does not contain a 'project.godot' file." +msgid "" +"Invalid \".zip\" project file; it doesn't contain a \"project.godot\" file." msgstr "" -"無効㪠'.zip' プãƒã‚¸ã‚§ã‚¯ãƒˆãƒ•ァイルã§ã™ã€‚'project.godot' ファイルãŒå«ã¾ã‚Œã¦ã„" +"無効ãª\".zip\"プãƒã‚¸ã‚§ã‚¯ãƒˆãƒ•ァイルã§ã™ã€‚\"project.godot\"ファイルãŒå«ã¾ã‚Œã¦ã„" "ã¾ã›ã‚“。" #: editor/project_manager.cpp @@ -9549,12 +9598,12 @@ msgid "Please choose an empty folder." msgstr "空ã®ãƒ•ã‚©ãƒ«ãƒ€ãƒ¼ã‚’é¸æŠžã—ã¦ãã ã•ã„。" #: editor/project_manager.cpp -msgid "Please choose a 'project.godot' or '.zip' file." -msgstr "'project.godot' ã‚‚ã—ã㯠'.zip' ãƒ•ã‚¡ã‚¤ãƒ«ã‚’é¸æŠžã—ã¦ãã ã•ã„." +msgid "Please choose a \"project.godot\" or \".zip\" file." +msgstr "\"project.godot\"ã¾ãŸã¯\".zip\"ãƒ•ã‚¡ã‚¤ãƒ«ã‚’é¸æŠžã—ã¦ãã ã•ã„。" #: editor/project_manager.cpp -msgid "Directory already contains a Godot project." -msgstr "ディレクトリã«ã¯Godotプãƒã‚¸ã‚§ã‚¯ãƒˆãŒã™ã§ã«å«ã¾ã‚Œã¦ã„ã¾ã™ã€‚" +msgid "This directory already contains a Godot project." +msgstr "ã“ã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã«ã¯ã™ã§ã«Godotプãƒã‚¸ã‚§ã‚¯ãƒˆãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚" #: editor/project_manager.cpp msgid "New Game Project" @@ -10040,9 +10089,8 @@ msgid "Settings saved OK." msgstr "è¨å®šã®ä¿å˜ã«æˆåŠŸã—ã¾ã—ãŸ." #: editor/project_settings_editor.cpp -#, fuzzy msgid "Moved Input Action Event" -msgstr "å…¥åŠ›ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã‚¤ãƒ™ãƒ³ãƒˆã‚’è¿½åŠ " +msgstr "入力アクションイベントを移動" #: editor/project_settings_editor.cpp msgid "Override for Feature" @@ -10249,6 +10297,10 @@ msgid "Suffix" msgstr "サフィックス" #: editor/rename_dialog.cpp +msgid "Use Regular Expressions" +msgstr "æ£è¦è¡¨ç¾ã‚’使用ã™ã‚‹" + +#: editor/rename_dialog.cpp msgid "Advanced Options" msgstr "高度ãªã‚ªãƒ—ション" @@ -10285,8 +10337,8 @@ msgstr "" "カウンタオプションを比較ã—ã¾ã™ã€‚" #: editor/rename_dialog.cpp -msgid "Per Level counter" -msgstr "レベルã”ã¨ã®ã‚«ã‚¦ãƒ³ã‚¿" +msgid "Per-level Counter" +msgstr "レベルã”ã¨ã®ã‚«ã‚¦ãƒ³ã‚¿ãƒ¼" #: editor/rename_dialog.cpp msgid "If set the counter restarts for each group of child nodes" @@ -10317,10 +10369,6 @@ msgstr "" "æ¬ è½ã—ãŸæ•°å—ã¯ã€å…ˆé ã«ã‚¼ãƒãŒåŸ‹ã‚è¾¼ã¾ã‚Œã¾ã™ã€‚" #: editor/rename_dialog.cpp -msgid "Regular Expressions" -msgstr "æ£è¦è¡¨ç¾" - -#: editor/rename_dialog.cpp msgid "Post-Process" msgstr "ãƒã‚¹ãƒˆãƒ—ãƒã‚»ã‚¹" @@ -10329,12 +10377,12 @@ msgid "Keep" msgstr "ä¿æŒ" #: editor/rename_dialog.cpp -msgid "CamelCase to under_scored" -msgstr "ã‚ャメルケースをアンダースコアã«" +msgid "PascalCase to snake_case" +msgstr "PascalCaseã‹ã‚‰snake_caseã¸" #: editor/rename_dialog.cpp -msgid "under_scored to CamelCase" -msgstr "アンダースコアをã‚ャメルケースã«" +msgid "snake_case to PascalCase" +msgstr "snake_caseã‚’PascalCaseã¸" #: editor/rename_dialog.cpp msgid "Case" @@ -10352,6 +10400,14 @@ msgstr "大文å—ã«" msgid "Reset" msgstr "リセット" +#: editor/rename_dialog.cpp +msgid "Regular Expression Error" +msgstr "æ£è¦è¡¨ç¾ã‚¨ãƒ©ãƒ¼" + +#: editor/rename_dialog.cpp +msgid "At character %s" +msgstr "æ–‡å— %s" + #: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp msgid "Reparent Node" msgstr "親ノードを変更" @@ -10362,7 +10418,7 @@ msgstr "親を変更(æ–°ã—ã„è¦ªã‚’é¸æŠž):" #: editor/reparent_dialog.cpp msgid "Keep Global Transform" -msgstr "ã‚°ãƒãƒ¼ãƒãƒ«å¤‰æ›ã‚’ä¿æŒ" +msgstr "ã‚°ãƒãƒ¼ãƒãƒ« ãƒˆãƒ©ãƒ³ã‚¹ãƒ•ã‚©ãƒ¼ãƒ ã‚’ä¿æŒ" #: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp msgid "Reparent" @@ -10490,13 +10546,12 @@ msgstr "" "ã«æˆ»ã‚Šã¾ã™ã€‚" #: editor/scene_tree_dock.cpp -#, fuzzy msgid "" "Enabling \"Load As Placeholder\" will disable \"Editable Children\" and " "cause all properties of the node to be reverted to their default." msgstr "" -"\"editable_instance\" を無効ã«ã™ã‚‹ã¨ã€ãƒŽãƒ¼ãƒ‰ã®ã™ã¹ã¦ã®ãƒ—ãƒãƒ‘ティãŒãƒ‡ãƒ•ォルト" -"ã«æˆ»ã‚Šã¾ã™ã€‚" +"『プレースホルダã¨ã—ã¦ãƒãƒ¼ãƒ‰ã€ã‚’有効ã«ã™ã‚‹ã¨ã€Žç·¨é›†å¯èƒ½ãªåã€ã¯ç„¡åйã«ã•れã€ã“" +"ã®ãƒŽãƒ¼ãƒ‰ã«ã‚ã‚‹ã™ã¹ã¦ã®ãƒ—ãƒãƒ‘ティã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã«æˆ»ã•れã¾ã™ã€‚" #: editor/scene_tree_dock.cpp msgid "Make Local" @@ -10576,7 +10631,7 @@ msgstr "編集å¯èƒ½ãªå" #: editor/scene_tree_dock.cpp msgid "Load As Placeholder" -msgstr "プレースホルダーã¨ã—ã¦ãƒãƒ¼ãƒ‰" +msgstr "プレースホルダã¨ã—ã¦ãƒãƒ¼ãƒ‰" #: editor/scene_tree_dock.cpp msgid "Open Documentation" @@ -10711,7 +10766,7 @@ msgid "" "Children are not selectable.\n" "Click to make selectable." msgstr "" -"åã‚’é¸æŠžã§ãã¾ã›ã‚“.\n" +"åã‚’é¸æŠžã§ãã¾ã›ã‚“。\n" "クリックã—ã¦é¸æŠžå¯èƒ½ã«ã—ã¦ãã ã•ã„。" #: editor/scene_tree_editor.cpp @@ -10804,19 +10859,19 @@ msgstr "スクリプトを開ã" #: editor/script_create_dialog.cpp msgid "File exists, it will be reused." -msgstr "ファイルã¯å˜åœ¨ã—ã¾ã™ã€‚å†åˆ©ç”¨ã•れã¾ã™ã€‚" +msgstr "ãƒ•ã‚¡ã‚¤ãƒ«ãŒæ—¢ã«å˜åœ¨ã—ã¾ã™ã€‚ãã¡ã‚‰ã‚’å†åˆ©ç”¨ã—ã¾ã™ã€‚" #: editor/script_create_dialog.cpp msgid "Invalid class name." -msgstr "クラスåãŒç„¡åйã§ã™ã€‚" +msgstr "無効ãªã‚¯ãƒ©ã‚¹å。" #: editor/script_create_dialog.cpp msgid "Invalid inherited parent name or path." msgstr "継承ã•れãŸè¦ªã®åå‰ã¾ãŸã¯ãƒ‘スãŒç„¡åйã§ã™ã€‚" #: editor/script_create_dialog.cpp -msgid "Script is valid." -msgstr "ã‚¹ã‚¯ãƒªãƒ—ãƒˆã¯æœ‰åйã§ã™ã€‚" +msgid "Script path/name is valid." +msgstr "スクリプトã®ãƒ‘ス/åå‰ã¯æœ‰åйã§ã™ã€‚" #: editor/script_create_dialog.cpp msgid "Allowed: a-z, A-Z, 0-9, _ and ." @@ -10907,6 +10962,10 @@ msgid "Copy Error" msgstr "エラーをコピー" #: editor/script_editor_debugger.cpp +msgid "Video RAM" +msgstr "ビデオRAM" + +#: editor/script_editor_debugger.cpp msgid "Skip Breakpoints" msgstr "ブレークãƒã‚¤ãƒ³ãƒˆã‚’スã‚ップã™ã‚‹" @@ -10955,10 +11014,6 @@ msgid "Total:" msgstr "åˆè¨ˆ:" #: editor/script_editor_debugger.cpp -msgid "Video Mem" -msgstr "ビデオメモリー" - -#: editor/script_editor_debugger.cpp msgid "Resource Path" msgstr "リソースã®ãƒ‘ス(ResourcePath)" @@ -11036,12 +11091,11 @@ msgstr "カメラã®FOVを変更" #: editor/spatial_editor_gizmos.cpp msgid "Change Camera Size" -msgstr "カメラã®ã‚µã‚¤ã‚ºã‚’変更" +msgstr "カメラサイズを変更" #: editor/spatial_editor_gizmos.cpp -#, fuzzy msgid "Change Notifier AABB" -msgstr "パーティクルã®è»¸å¹³è¡Œå¢ƒç•Œãƒœãƒƒã‚¯ã‚¹ã‚’変更" +msgstr "Notifierã®AABBを変更" #: editor/spatial_editor_gizmos.cpp msgid "Change Particles AABB" @@ -11057,7 +11111,7 @@ msgstr "çƒå½¢ã®åŠå¾„を変更" #: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp msgid "Change Box Shape Extents" -msgstr "ボックスシェイプ範囲ã®å¤‰æ›´" +msgstr "ボックスシェイプã®ç¯„囲を変更" #: editor/spatial_editor_gizmos.cpp msgid "Change Capsule Shape Radius" @@ -11065,7 +11119,7 @@ msgstr "カプセルシェイプã®åŠå¾„を変更" #: editor/spatial_editor_gizmos.cpp msgid "Change Capsule Shape Height" -msgstr "カプセル形状ã®é«˜ã•を変更ã™ã‚‹" +msgstr "カプセルシェイプã®é«˜ã•を変更" #: editor/spatial_editor_gizmos.cpp msgid "Change Cylinder Shape Radius" @@ -11232,14 +11286,12 @@ msgid "Grid Map" msgstr "グリッドマップ" #: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy msgid "Snap View" -msgstr "上é¢å›³" +msgstr "スナップビュー" #: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy msgid "Clip Disabled" -msgstr "無効" +msgstr "クリップ無効" #: modules/gridmap/grid_map_editor_plugin.cpp msgid "Clip Above" @@ -11290,18 +11342,16 @@ msgid "Cursor Clear Rotation" msgstr "カーソル回転をクリア" #: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy msgid "Paste Selects" -msgstr "é¸æŠžå¯¾è±¡ã‚’æ¶ˆåŽ»" +msgstr "é¸æŠžé …ç›®ã®è²¼ã‚Šä»˜ã‘" #: modules/gridmap/grid_map_editor_plugin.cpp msgid "Clear Selection" msgstr "é¸æŠžã‚’ã‚¯ãƒªã‚¢" #: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy msgid "Fill Selection" -msgstr "ã™ã¹ã¦é¸æŠž" +msgstr "é¸æŠžéƒ¨ã®å¡—り潰ã—" #: modules/gridmap/grid_map_editor_plugin.cpp msgid "GridMap Settings" @@ -11312,9 +11362,8 @@ msgid "Pick Distance:" msgstr "è·é›¢ã‚’å–å¾—:" #: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy msgid "Filter meshes" -msgstr "フィルタメッシュ" +msgstr "メッシュを絞り込む" #: modules/gridmap/grid_map_editor_plugin.cpp msgid "Give a MeshLibrary resource to this GridMap to use its meshes." @@ -11364,7 +11413,7 @@ msgstr "移動å¯èƒ½ãªé ˜åŸŸã‚’作æˆä¸..." #: modules/recast/navigation_mesh_generator.cpp msgid "Partitioning..." -msgstr "パーティションを作æˆã—ã¦ã„ã¾ã™..." +msgstr "分割ä¸..." #: modules/recast/navigation_mesh_generator.cpp msgid "Creating contours..." @@ -11441,7 +11490,7 @@ msgstr "引数åã®å¤‰æ›´" #: modules/visual_script/visual_script_editor.cpp msgid "Set Variable Default Value" -msgstr "変数ã®ãƒ‡ãƒ•ォルト値をè¨å®šã™ã‚‹" +msgstr "変数ã®ãƒ‡ãƒ•ォルト値をè¨å®š" #: modules/visual_script/visual_script_editor.cpp msgid "Set Variable Type" @@ -11576,15 +11625,13 @@ msgid "Add Node(s) From Tree" msgstr "ツリーã‹ã‚‰ãƒŽãƒ¼ãƒ‰ã‚’è¿½åŠ " #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "" "Can't drop properties because script '%s' is not used in this scene.\n" "Drop holding 'Shift' to just copy the signature." msgstr "" -"スクリプト '%s' ã¯ã“ã®ã‚·ãƒ¼ãƒ³ã§ä½¿ã‚れã¦ã„ãªã„ãŸã‚ã€ãƒŽãƒ¼ãƒ‰ã‚’è½ã¨ã™ã“ã¨ãŒã§ãã¾" +"ã“ã®ã‚·ãƒ¼ãƒ³ã§ã¯ã‚¹ã‚¯ãƒªãƒ—ト 'ï¼…s'ãŒä½¿ç”¨ã•れã¦ã„ãªã„ãŸã‚ã€ãƒ—ãƒãƒ‘ティを削除ã§ãã¾" "ã›ã‚“。\n" -"'shift' ã‚ーを押ã—ãªãŒã‚‰ãƒ‰ãƒãƒƒãƒ—ã™ã‚‹ã“ã¨ã§ã‚·ã‚°ãƒãƒãƒ£ã‚’コピーã™ã‚‹ã“ã¨ãŒã§ãã¾" -"ã™ã€‚" +"「Shiftã€ã‚’押ã—ãªãŒã‚‰ãƒ‰ãƒãƒƒãƒ—ã™ã‚‹ã¨ã€ç½²åãŒã‚³ãƒ”ーã•れã¾ã™ã€‚" #: modules/visual_script/visual_script_editor.cpp msgid "Add Getter Property" @@ -11647,18 +11694,16 @@ msgid "Paste VisualScript Nodes" msgstr "VisualScriptノードを貼り付ã‘" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Can't create function with a function node." -msgstr "ファンクションノードをコピーã§ãã¾ã›ã‚“。" +msgstr "関数ノードã§é–¢æ•°ã‚’作æˆã§ãã¾ã›ã‚“。" #: modules/visual_script/visual_script_editor.cpp msgid "Can't create function of nodes from nodes of multiple functions." msgstr "複数ã®é–¢æ•°ã‚’æŒã¤ãƒŽãƒ¼ãƒ‰ã‹ã‚‰ã€ãƒŽãƒ¼ãƒ‰ã®é–¢æ•°ã‚’作るã“ã¨ãŒã§ãã¾ã›ã‚“。" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Select at least one node with sequence port." -msgstr "シーケンスãƒãƒ¼ãƒˆã§ã¯æœ€ä½Žã§ã‚‚一ã¤ã®ãƒŽãƒ¼ãƒ‰ã‚’é¸æŠžã—ã¦ãã ã•ã„。" +msgstr "シーケンス ãƒãƒ¼ãƒˆã‚’æŒã¤ãƒŽãƒ¼ãƒ‰ã‚’å°‘ãªãã¨ã‚‚ 1 ã¤é¸æŠžã—ã¾ã™ã€‚" #: modules/visual_script/visual_script_editor.cpp msgid "Try to only have one sequence input in selection." @@ -11709,9 +11754,8 @@ msgid "Add Function..." msgstr "é–¢æ•°ã‚’è¿½åŠ â€¦" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "function_name" -msgstr "関数:" +msgstr "関数å" #: modules/visual_script/visual_script_editor.cpp msgid "Select or create a function to edit its graph." @@ -11771,7 +11815,7 @@ msgstr "パスãŒãƒŽãƒ¼ãƒ‰ã«é”ã—ã¾ã›ã‚“ï¼" #: modules/visual_script/visual_script_func_nodes.cpp msgid "Invalid index property name '%s' in node %s." -msgstr "ノード%sã®ä¸æ£ãªã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã®ãƒ—ãƒãƒ‘ティå'%s' ." +msgstr "ノード%sã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã®ãƒ—ãƒãƒ‘ティå'%s'ã¯ç„¡åйã§ã™ã€‚" #: modules/visual_script/visual_script_nodes.cpp msgid ": Invalid argument of type: " @@ -11961,7 +12005,7 @@ msgstr "無効ãªã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆ テンプレート:" #: platform/javascript/export/export.cpp msgid "Could not read custom HTML shell:" -msgstr "カスタムHTMLシェルをèªã¿å–ã‚‹ã“ã¨ãŒã§ãã¾ã›ã‚“ã§ã—ãŸ:" +msgstr "カスタムHTMLシェルをèªã¿è¾¼ã‚ã¾ã›ã‚“ã§ã—ãŸ:" #: platform/javascript/export/export.cpp msgid "Could not read boot splash image file:" @@ -12001,37 +12045,39 @@ msgstr "Storeãƒã‚´ã®ç”»åƒã‚µã‚¤ã‚ºãŒç„¡åйã§ã™(縦横50x50ã§ãªã„ã¨ã„ã #: platform/uwp/export/export.cpp msgid "Invalid square 44x44 logo image dimensions (should be 44x44)." -msgstr "無効ãª44X44四角ãƒã‚´ã‚¤ãƒ¡ãƒ¼ã‚¸ï¼ˆç¸¦æ¨ª44x44ã§ãªã„ã¨ã„ã‘ã¾ã›ã‚“)。" +msgstr "44X44ã®æ£æ–¹å½¢ãƒã‚´ã®ç”»åƒã‚µã‚¤ã‚ºãŒç„¡åйã§ã™(縦横44x44ã§ãªã„ã¨ã„ã‘ã¾ã›ã‚“)。" #: platform/uwp/export/export.cpp msgid "Invalid square 71x71 logo image dimensions (should be 71x71)." -msgstr "無効ãª71x71四角ãƒã‚´ã‚¤ãƒ¡ãƒ¼ã‚¸ï¼ˆç¸¦æ¨ª71x71ã§ãªã„ã¨ã„ã‘ã¾ã›ã‚“)。" +msgstr "71x71ã®æ£æ–¹å½¢ãƒã‚´ã®ç”»åƒã‚µã‚¤ã‚ºãŒç„¡åйã§ã™(縦横71x71ã§ãªã„ã¨ã„ã‘ã¾ã›ã‚“)。" #: platform/uwp/export/export.cpp msgid "Invalid square 150x150 logo image dimensions (should be 150x150)." -msgstr "無効ãª150X150四角ãƒã‚´ã‚¤ãƒ¡ãƒ¼ã‚¸ï¼ˆç¸¦æ¨ª150x150ã§ãªã„ã¨ã„ã‘ã¾ã›ã‚“)。" +msgstr "" +"150X150ã®æ£æ–¹å½¢ãƒã‚´ã®ç”»åƒã‚µã‚¤ã‚ºãŒç„¡åйã§ã™(縦横150x150ã§ãªã„ã¨ã„ã‘ã¾ã›ã‚“)。" #: platform/uwp/export/export.cpp msgid "Invalid square 310x310 logo image dimensions (should be 310x310)." -msgstr "無効ãª310X310四角ãƒã‚´ã‚¤ãƒ¡ãƒ¼ã‚¸ï¼ˆç¸¦æ¨ª310x310ã§ãªã„ã¨ã„ã‘ã¾ã›ã‚“)。" +msgstr "" +"310X310ã®æ£æ–¹å½¢ãƒã‚´ã®ç”»åƒã‚µã‚¤ã‚ºãŒç„¡åйã§ã™(縦横310x310ã§ãªã„ã¨ã„ã‘ã¾ã›ã‚“)。" #: platform/uwp/export/export.cpp msgid "Invalid wide 310x150 logo image dimensions (should be 310x150)." -msgstr "無効ãª310X150ワイドãƒã‚´ã‚¤ãƒ¡ãƒ¼ã‚¸ï¼ˆç¸¦æ¨ª310x150ã§ãªã„ã¨ã„ã‘ã¾ã›ã‚“)。" +msgstr "" +"310X150ã®ãƒ¯ã‚¤ãƒ‰ãƒã‚´ã®ç”»åƒã‚µã‚¤ã‚ºãŒç„¡åйã§ã™(縦横310x150ã§ãªã„ã¨ã„ã‘ã¾ã›ã‚“)。" #: platform/uwp/export/export.cpp msgid "Invalid splash screen image dimensions (should be 620x300)." msgstr "" -"無効ãªã‚¹ãƒ—ラッシュスクリーンイメージ(縦横620x300ã§ãªã„ã¨ã„ã‘ã¾ã›ã‚“)。" +"スプラッシュスクリーンã®ç”»åƒã‚µã‚¤ã‚ºãŒç„¡åйã§ã™(縦横620x300ã§ãªã„ã¨ã„ã‘ã¾ã›ã‚“)。" #: scene/2d/animated_sprite.cpp -#, fuzzy msgid "" "A SpriteFrames resource must be created or set in the \"Frames\" property in " "order for AnimatedSprite to display frames." msgstr "" -"SpriteFrames リソースを作æˆã¾ãŸã¯ AnimatedSprite フレームを表示ã™ã‚‹ãŸã‚ã«ã¯ " -"'Frames' プãƒãƒ‘ティã«è¨å®šã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚" +"AnimatedSpriteã§ãƒ•レームを表示ã™ã‚‹ã«ã¯ã€\"Frames\"プãƒãƒ‘ティã§SpriteFramesリ" +"ソースを作æˆã¾ãŸã¯è¨å®šã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚" #: scene/2d/canvas_modulate.cpp msgid "" @@ -12059,10 +12105,9 @@ msgid "" "CollisionObject2D derived node. Please only use it as a child of Area2D, " "StaticBody2D, RigidBody2D, KinematicBody2D, etc. to give them a shape." msgstr "" -"CollisionPolygon2D ã¯ã€CollisionObject2D 派生ノードã«è¡çªã‚·ã‚§ã‚¤ãƒ—ã‚’æä¾›ã™ã‚‹ãŸ" -"ã‚ã«ã®ã¿æ©Ÿèƒ½ã—ã¾ã™ã€‚2Dã®å½¢çŠ¶ï¼ˆã‚·ã‚§ã‚¤ãƒ—ï¼‰ã‚’ä»˜ä¸Žã™ã‚‹ãŸã‚ã«ã¯ Area2Dã€" -"StaticBody2Dã€RigidBody2Dã€KinematicBody2D ãªã©ã®åオブジェクトã¨ã—ã¦åˆ©ç”¨ã—ã¦" -"ãã ã•ã„。" +"CollisionPolygon2Dã¯ã€CollisionObject2D派生ノードã«ã‚³ãƒªã‚¸ãƒ§ãƒ³ã‚·ã‚§ã‚¤ãƒ—ã‚’æä¾›ã™" +"ã‚‹ãŸã‚ã«ã®ã¿æ©Ÿèƒ½ã—ã¾ã™ã€‚ã‚·ã‚§ã‚¤ãƒ—ã‚’è¿½åŠ ã™ã‚‹å ´åˆã¯ã€Area2Dã€StaticBody2Dã€" +"RigidBody2Dã€KinematicBody2Dãªã©ã®åã¨ã—ã¦ä½¿ç”¨ã—ã¦ãã ã•ã„。" #: scene/2d/collision_polygon_2d.cpp msgid "An empty CollisionPolygon2D has no effect on collision." @@ -12074,9 +12119,9 @@ msgid "" "CollisionObject2D derived node. Please only use it as a child of Area2D, " "StaticBody2D, RigidBody2D, KinematicBody2D, etc. to give them a shape." msgstr "" -"CollisionShape2D ã¯ã€CollisionObject2D派生ノードã«è¡çªã‚·ã‚§ã‚¤ãƒ—ã‚’æä¾›ã™ã‚‹å ´åˆ" -"ã«ã®ã¿æ©Ÿèƒ½ã—ã¾ã™ã€‚Area2Dã€staticBody2Dã€RigidBody2Dã€KinematicBody2Dãªã©ã®å" -"ã¨ã—ã¦ä½¿ç”¨ã—ã¦ãã ã•ã„。" +"CollisionShape2Dã¯ã€CollisionObject2D派生ノードã«ã‚³ãƒªã‚¸ãƒ§ãƒ³ã‚·ã‚§ã‚¤ãƒ—ã‚’æä¾›ã™ã‚‹" +"å ´åˆã«ã®ã¿æ©Ÿèƒ½ã—ã¾ã™ã€‚ã‚·ã‚§ã‚¤ãƒ—ã‚’è¿½åŠ ã™ã‚‹å ´åˆã¯ã€Area2Dã€staticBody2Dã€" +"RigidBody2Dã€KinematicBody2Dãªã©ã®åã¨ã—ã¦ä½¿ç”¨ã—ã¦ãã ã•ã„。" #: scene/2d/collision_shape_2d.cpp msgid "" @@ -12095,11 +12140,11 @@ msgstr "" "CanvasItemMaterialを使用ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚" #: scene/2d/light_2d.cpp -#, fuzzy msgid "" "A texture with the shape of the light must be supplied to the \"Texture\" " "property." -msgstr "å…‰ã®å½¢çжã¨ãƒ†ã‚¯ã‚¹ãƒãƒ£ã¯ã€'texture'プãƒãƒ‘ãƒ†ã‚£ã«æŒ‡å®šã—ã¾ã™ã€‚" +msgstr "" +"å…‰ã®å½¢çŠ¶ã‚’æŒã¤ãƒ†ã‚¯ã‚¹ãƒãƒ£ã¯\"Texture\"プãƒãƒ‘ãƒ†ã‚£ã«æŒ‡å®šã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚" #: scene/2d/light_occluder_2d.cpp msgid "" @@ -12234,7 +12279,7 @@ msgstr "" #: scene/3d/arvr_nodes.cpp msgid "ARVRAnchor must have an ARVROrigin node as its parent." -msgstr "ARVRAnchorã¯ARVROriginã‚’è¦ªã«æŒã¤å¿…è¦ãŒã‚りã¾ã™ã€‚" +msgstr "ARVRAnchorã¯ARVROriginãƒŽãƒ¼ãƒ‰ã‚’è¦ªã«æŒã¤å¿…è¦ãŒã‚りã¾ã™ã€‚" #: scene/3d/arvr_nodes.cpp msgid "" @@ -12246,7 +12291,7 @@ msgstr "" #: scene/3d/arvr_nodes.cpp msgid "ARVROrigin requires an ARVRCamera child node." -msgstr "ARVROriginã¯ARVRCameraåノードãŒå¿…è¦ã§ã™ã€‚" +msgstr "ARVROriginã¯åノードã«ARVRCameraãŒå¿…è¦ã§ã™ã€‚" #: scene/3d/baked_lightmap.cpp msgid "%d%%" @@ -12289,9 +12334,9 @@ msgid "" "CollisionObject derived node. Please only use it as a child of Area, " "StaticBody, RigidBody, KinematicBody, etc. to give them a shape." msgstr "" -"CollisionPolygonã¯ã€CollisionObject派生ノードã«è¡çªã‚·ã‚§ã‚¤ãƒ—ã‚’æä¾›ã™ã‚‹å ´åˆã«ã®" -"ã¿æ©Ÿèƒ½ã—ã¾ã™ã€‚Areaã€StaticBodyã€RigidBodyã€KinematicBodyãªã©ã®åã¨ã—ã¦ä½¿ç”¨ã—" -"ã¦ãã ã•ã„。" +"CollisionPolygonã¯ã€CollisionObject派生ノードã«ã‚³ãƒªã‚¸ãƒ§ãƒ³ã‚·ã‚§ã‚¤ãƒ—ã‚’æä¾›ã™ã‚‹å ´" +"åˆã«ã®ã¿æ©Ÿèƒ½ã—ã¾ã™ã€‚ã‚·ã‚§ã‚¤ãƒ—ã‚’è¿½åŠ ã™ã‚‹å ´åˆã¯ã€Areaã€StaticBodyã€RigidBodyã€" +"KinematicBodyãªã©ã®åã¨ã—ã¦ä½¿ç”¨ã—ã¦ãã ã•ã„。" #: scene/3d/collision_polygon.cpp msgid "An empty CollisionPolygon has no effect on collision." @@ -12303,9 +12348,9 @@ msgid "" "derived node. Please only use it as a child of Area, StaticBody, RigidBody, " "KinematicBody, etc. to give them a shape." msgstr "" -"CollisionShapeã¯ã€CollisionObject派生ノードã«è¡çªã‚·ã‚§ã‚¤ãƒ—ã‚’æä¾›ã™ã‚‹å ´åˆã«ã®ã¿" -"機能ã—ã¾ã™ã€‚Areaã€StaticBodyã€RigidBodyã€KinematicBodyãªã©ã®åã¨ã—ã¦ä½¿ç”¨ã—ã¦" -"ãã ã•ã„。" +"CollisionShapeã¯ã€CollisionObject派生ノードã«ã‚³ãƒªã‚¸ãƒ§ãƒ³ã‚·ã‚§ã‚¤ãƒ—ã‚’æä¾›ã™ã‚‹å ´åˆ" +"ã«ã®ã¿æ©Ÿèƒ½ã—ã¾ã™ã€‚ã‚·ã‚§ã‚¤ãƒ—ã‚’è¿½åŠ ã™ã‚‹å ´åˆã¯ã€Areaã€StaticBodyã€RigidBodyã€" +"KinematicBodyãªã©ã®åã¨ã—ã¦ä½¿ç”¨ã—ã¦ãã ã•ã„。" #: scene/3d/collision_shape.cpp msgid "" @@ -12393,13 +12438,12 @@ msgid "PathFollow only works when set as a child of a Path node." msgstr "PathFollow ã¯ã€Path ノードã®åã¨ã—ã¦è¨å®šã•れã¦ã„ã‚‹å ´åˆã®ã¿å‹•作ã—ã¾ã™ã€‚" #: scene/3d/path.cpp -#, fuzzy msgid "" "PathFollow's ROTATION_ORIENTED requires \"Up Vector\" to be enabled in its " "parent Path's Curve resource." msgstr "" -"PathFollow ROTATION_ORIENTEDã§ã¯ã€è¦ªãƒ‘スã®Curveリソース㧠\"Up Vector\"を有効" -"ã«ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚" +"PathFollowã®ROTATION_ORIENTEDã§ã¯ã€è¦ªã®Pathã®Curveリソースã§\"Up Vector\"を有" +"効ã«ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚" #: scene/3d/physics_body.cpp msgid "" @@ -12412,13 +12456,12 @@ msgstr "" "代ã‚りã«ã€åã®è¡çªã‚·ã‚§ã‚¤ãƒ—ã®ã‚µã‚¤ã‚ºã‚’変更ã—ã¦ãã ã•ã„。" #: scene/3d/remote_transform.cpp -#, fuzzy msgid "" "The \"Remote Path\" property must point to a valid Spatial or Spatial-" "derived node to work." msgstr "" -"Path プãƒãƒ‘ティã¯ã€å‹•作ã™ã‚‹ã‚ˆã†ã«æœ‰åŠ¹ãª Particles2D ノードを示ã™å¿…è¦ãŒã‚りã¾" -"ã™ã€‚" +"\"Remote Path\"プãƒãƒ‘ティã¯ã€æœ‰åйãªSpatialã¾ãŸã¯Spatialã‹ã‚‰æ´¾ç”Ÿã—ãŸãƒŽãƒ¼ãƒ‰ã‚’指" +"ã™å¿…è¦ãŒã‚りã¾ã™ã€‚" #: scene/3d/soft_body.cpp msgid "This body will be ignored until you set a mesh." @@ -12526,9 +12569,8 @@ msgstr "" "å³ãƒžã‚¦ã‚¹ãƒœã‚¿ãƒ³: プリセットã®é™¤åŽ»" #: scene/gui/color_picker.cpp -#, fuzzy msgid "Pick a color from the editor window." -msgstr "スクリーンã‹ã‚‰è‰²ã‚’é¸æŠžã—ã¦ãã ã•ã„。" +msgstr "エディタウィンドウã‹ã‚‰è‰²ã‚’é¸æŠžã€‚" #: scene/gui/color_picker.cpp msgid "HSV" @@ -12589,15 +12631,14 @@ msgid "If \"Exp Edit\" is enabled, \"Min Value\" must be greater than 0." msgstr "「Exp Editã€ãŒtrueã®å ´åˆã€ã€ŒMin Valueã€ã¯0より大ãã„å¿…è¦ãŒã‚りã¾ã™ã€‚" #: scene/gui/scroll_container.cpp -#, fuzzy msgid "" "ScrollContainer is intended to work with a single child control.\n" "Use a container as child (VBox, HBox, etc.), or a Control and set the custom " "minimum size manually." msgstr "" -"ScrollContainerã¯å˜ä¸€ã®åコントãƒãƒ¼ãƒ«ã§å‹•作ã™ã‚‹ã‚ˆã†ã«æ„図ã•れã¦ã„ã¾ã™ã€‚コンテ" -"ナ(VBox, HBoxãªã©)ã‚’åã¨ã—ã¦ä½¿ç”¨ã™ã‚‹ã‹ã€ã‚³ãƒ³ãƒˆãƒãƒ¼ãƒ«ã‚’使用ã—ã¦ã‚«ã‚¹ã‚¿ãƒ 最å°ã‚µ" -"イズを手動ã§è¨å®šã—ã¦ãã ã•ã„。" +"ScrollContainer ã¯åコントãƒãƒ¼ãƒ«ã²ã¨ã¤ã®ã¿ã§å‹•作ã™ã‚‹ã‚ˆã†ã«ãªã£ã¦ã„ã¾ã™ã€‚\n" +"コンテナ (VBox, HBoxãªã©) ã‚’åã¨ã™ã‚‹ã‹ã€ã‚³ãƒ³ãƒˆãƒãƒ¼ãƒ«ã‚’カスタム最å°ã‚µã‚¤ã‚ºã‚’手" +"å‹•è¨å®šã—ã¦ä½¿ç”¨ã—ã¦ãã ã•ã„。" #: scene/gui/tree.cpp msgid "(Other)" @@ -12608,21 +12649,20 @@ msgid "" "Default Environment as specified in Project Settings (Rendering -> " "Environment -> Default Environment) could not be loaded." msgstr "" -"プãƒã‚¸ã‚§ã‚¯ãƒˆè¨å®šã§æŒ‡å®šã•れã¦ã„る既定ã®ç’°å¢ƒ (レンダリング -> 環境 -> 既定ã®ç’°" -"境) ã‚’èªã¿è¾¼ã‚ã¾ã›ã‚“ã§ã—ãŸã€‚" +"プãƒã‚¸ã‚§ã‚¯ãƒˆè¨å®šã§æŒ‡å®šã•れã¦ã„る既定ã®ç’°å¢ƒ (Rendering -> Environment -> " +"Default Environment) ã‚’èªã¿è¾¼ã‚ã¾ã›ã‚“ã§ã—ãŸã€‚" #: scene/main/viewport.cpp -#, fuzzy msgid "" "This viewport is not set as render target. If you intend for it to display " "its contents directly to the screen, make it a child of a Control so it can " "obtain a size. Otherwise, make it a RenderTarget and assign its internal " "texture to some node for display." msgstr "" -"ã“ã®ãƒ“ューãƒãƒ¼ãƒˆã¯ã€ãƒ¬ãƒ³ãƒ€ãƒ¼ ターゲットã¨ã—ã¦è¨å®šã•れã¦ã„ã¾ã›ã‚“。ãã®å†…容を画" -"é¢ã«ç›´æŽ¥è¡¨ç¤ºã™ã‚‹å ´åˆã¯ã€ã‚µã‚¤ã‚ºã‚’å¾—ã‚‹ã“ã¨ãŒã§ãるよã†ã«ã€ã‚³ãƒ³ãƒˆãƒãƒ¼ãƒ«ã®åã‚’ã¤" -"ãりã¾ã™ã€‚ãれ以外ã®å ´åˆã€ãƒ¬ãƒ³ãƒ€ãƒ¼ ターゲットã—ã€ãã®å†…部ã®ãƒ†ã‚¯ã‚¹ãƒãƒ£è¡¨ç¤ºã®ã„" -"ãã¤ã‹ã®ãƒŽãƒ¼ãƒ‰ã«å‰²ã‚Šå½“ã¦ã¾ã™ã€‚" +"ã“ã®ãƒ“ューãƒãƒ¼ãƒˆã¯ãƒ¬ãƒ³ãƒ€ãƒ¼ ターゲットã¨ã—ã¦è¨å®šã•れã¦ã„ã¾ã›ã‚“。コンテンツを画" +"é¢ã«ç›´æŽ¥è¡¨ç¤ºã™ã‚‹å ´åˆã¯ã€ã‚µã‚¤ã‚ºã‚’å–å¾—ã§ãるよã†ã«ã‚³ãƒ³ãƒˆãƒãƒ¼ãƒ«ã®åã«ã—ã¾ã™ã€‚ã" +"れ以外ã®å ´åˆã¯ã€RenderTarget ã«ã—ã¦ã€ãã®å†…部テクスãƒãƒ£ã‚’表示ã™ã‚‹ãƒŽãƒ¼ãƒ‰ã«å‰²ã‚Š" +"当ã¦ã¾ã™ã€‚" #: scene/resources/visual_shader_nodes.cpp msgid "Invalid source for preview." @@ -12645,14 +12685,22 @@ msgid "Assignment to uniform." msgstr "uniform ã¸ã®å‰²ã‚Šå½“ã¦ã€‚" #: servers/visual/shader_language.cpp -#, fuzzy msgid "Varyings can only be assigned in vertex function." -msgstr "Varyingã¯é ‚点関数ã«ã®ã¿å‰²ã‚Šå½“ã¦ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚" +msgstr "Varying変数ã¯é ‚点関数ã«ã®ã¿å‰²ã‚Šå½“ã¦ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚" #: servers/visual/shader_language.cpp msgid "Constants cannot be modified." msgstr "定数ã¯å¤‰æ›´ã§ãã¾ã›ã‚“。" +#~ msgid "Replaced %d occurrence(s)." +#~ msgstr "%d 箇所を置æ›ã—ã¾ã—ãŸã€‚" + +#~ msgid "Create Static Convex Body" +#~ msgstr "é™çš„凸状ボディを生æˆ" + +#~ msgid "Failed creating shapes!" +#~ msgstr "図形ã®ä½œæˆã«å¤±æ•—ã—ã¾ã—ãŸ!" + #~ msgid "" #~ "There are currently no tutorials for this class, you can [color=$color]" #~ "[url=$url]contribute one[/url][/color] or [color=$color][url=" diff --git a/editor/translations/ka.po b/editor/translations/ka.po index 4808e9177b..3c9ab6c79e 100644 --- a/editor/translations/ka.po +++ b/editor/translations/ka.po @@ -717,8 +717,9 @@ msgid "Line Number:" msgstr "ხáƒáƒ–ის ნáƒáƒ›áƒ”რი:" #: editor/code_editor.cpp -msgid "Replaced %d occurrence(s)." -msgstr "შეცვლილირ%d დáƒáƒ›áƒ—ხვევები." +#, fuzzy +msgid "%d replaced." +msgstr "ჩáƒáƒœáƒáƒªáƒ•ლებáƒ" #: editor/code_editor.cpp editor/editor_help.cpp msgid "%d match." @@ -3949,15 +3950,15 @@ msgid "Saving..." msgstr "" #: editor/import_dock.cpp -msgid "Set as Default for '%s'" +msgid "%d Files" msgstr "" #: editor/import_dock.cpp -msgid "Clear Default for '%s'" +msgid "Set as Default for '%s'" msgstr "" #: editor/import_dock.cpp -msgid " Files" +msgid "Clear Default for '%s'" msgstr "" #: editor/import_dock.cpp @@ -5846,11 +5847,11 @@ msgid "Mesh is empty!" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Trimesh Body" +msgid "Couldn't create a Trimesh collision shape." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Convex Body" +msgid "Create Static Trimesh Body" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -5862,12 +5863,29 @@ msgid "Create Trimesh Static Shape" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Failed creating shapes!" +msgid "Can't create a single convex collision shape for the scene root." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Couldn't create a single convex collision shape." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp #, fuzzy -msgid "Create Convex Shape(s)" +msgid "Create Single Convex Shape" +msgstr "áƒáƒ®áƒáƒšáƒ˜ %s შექმნáƒ" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Can't create multiple convex collision shapes for the scene root." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Couldn't create any collision shapes." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Multiple Convex Shapes" msgstr "áƒáƒ®áƒáƒšáƒ˜ %s შექმნáƒ" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -5919,19 +5937,57 @@ msgid "Create Trimesh Static Body" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a StaticBody and assigns a polygon-based collision shape to it " +"automatically.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Trimesh Collision Sibling" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Single Convex Collision Siblings" +msgstr "შექმნáƒ" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a single convex collision shape.\n" +"This is the fastest (but least accurate) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp #, fuzzy -msgid "Create Convex Collision Sibling(s)" +msgid "Create Multiple Convex Collision Siblings" msgstr "შექმნáƒ" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is a performance middle-ground between the two above options." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Outline Mesh..." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a static outline mesh. The outline mesh will have its normals " +"flipped automatically.\n" +"This can be used instead of the SpatialMaterial Grow property when using " +"that property isn't possible." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "View UV1" msgstr "" @@ -8369,7 +8425,7 @@ msgstr "" msgid "No VCS addons are available." msgstr "" -#: editor/plugins/version_control_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/version_control_editor_plugin.cpp msgid "Error" msgstr "" @@ -9483,11 +9539,17 @@ msgid "Export With Debug" msgstr "" #: editor/project_manager.cpp -msgid "The path does not exist." +msgid "The path specified doesn't exist." msgstr "" #: editor/project_manager.cpp -msgid "Invalid '.zip' project file, does not contain a 'project.godot' file." +#, fuzzy +msgid "Error opening package file (it's not in ZIP format)." +msgstr "შეცდáƒáƒ›áƒ პáƒáƒ™áƒ”ტის გáƒáƒ®áƒ¡áƒœáƒ˜áƒ¡áƒáƒ¡, უნდრიყáƒáƒ¡ zip ფáƒáƒ მáƒáƒ¢áƒ¨áƒ˜." + +#: editor/project_manager.cpp +msgid "" +"Invalid \".zip\" project file; it doesn't contain a \"project.godot\" file." msgstr "" #: editor/project_manager.cpp @@ -9495,11 +9557,11 @@ msgid "Please choose an empty folder." msgstr "" #: editor/project_manager.cpp -msgid "Please choose a 'project.godot' or '.zip' file." +msgid "Please choose a \"project.godot\" or \".zip\" file." msgstr "" #: editor/project_manager.cpp -msgid "Directory already contains a Godot project." +msgid "This directory already contains a Godot project." msgstr "" #: editor/project_manager.cpp @@ -10151,6 +10213,10 @@ msgid "Suffix" msgstr "" #: editor/rename_dialog.cpp +msgid "Use Regular Expressions" +msgstr "" + +#: editor/rename_dialog.cpp msgid "Advanced Options" msgstr "" @@ -10185,7 +10251,7 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -msgid "Per Level counter" +msgid "Per-level Counter" msgstr "" #: editor/rename_dialog.cpp @@ -10216,10 +10282,6 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -msgid "Regular Expressions" -msgstr "" - -#: editor/rename_dialog.cpp msgid "Post-Process" msgstr "" @@ -10228,11 +10290,11 @@ msgid "Keep" msgstr "" #: editor/rename_dialog.cpp -msgid "CamelCase to under_scored" +msgid "PascalCase to snake_case" msgstr "" #: editor/rename_dialog.cpp -msgid "under_scored to CamelCase" +msgid "snake_case to PascalCase" msgstr "" #: editor/rename_dialog.cpp @@ -10252,6 +10314,14 @@ msgstr "" msgid "Reset" msgstr "ზუმის სáƒáƒ¬áƒ§áƒ˜áƒ¡áƒ–ე დáƒáƒ§áƒ”ნებáƒ" +#: editor/rename_dialog.cpp +msgid "Regular Expression Error" +msgstr "" + +#: editor/rename_dialog.cpp +msgid "At character %s" +msgstr "" + #: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp msgid "Reparent Node" msgstr "" @@ -10705,7 +10775,7 @@ msgid "Invalid inherited parent name or path." msgstr "" #: editor/script_create_dialog.cpp -msgid "Script is valid." +msgid "Script path/name is valid." msgstr "" #: editor/script_create_dialog.cpp @@ -10804,6 +10874,10 @@ msgid "Copy Error" msgstr "" #: editor/script_editor_debugger.cpp +msgid "Video RAM" +msgstr "" + +#: editor/script_editor_debugger.cpp #, fuzzy msgid "Skip Breakpoints" msgstr "შექმნáƒ" @@ -10853,10 +10927,6 @@ msgid "Total:" msgstr "" #: editor/script_editor_debugger.cpp -msgid "Video Mem" -msgstr "" - -#: editor/script_editor_debugger.cpp msgid "Resource Path" msgstr "" @@ -12408,6 +12478,9 @@ msgstr "" msgid "Constants cannot be modified." msgstr "" +#~ msgid "Replaced %d occurrence(s)." +#~ msgstr "შეცვლილირ%d დáƒáƒ›áƒ—ხვევები." + #, fuzzy #~ msgid "Brief Description" #~ msgstr "áƒáƒ¦áƒ¬áƒ”რáƒ:" diff --git a/editor/translations/ko.po b/editor/translations/ko.po index ae7e1edf52..fc23015cf8 100644 --- a/editor/translations/ko.po +++ b/editor/translations/ko.po @@ -11,7 +11,7 @@ # 박한얼 (volzhs) <volzhs@gmail.com>, 2016-2018. # ì†¡íƒœì„ <xotjq237@gmail.com>, 2018, 2019, 2020. # JY <yimjisoo@mailfence.com>, 2018. -# Ch. <ccwpc@hanmail.net>, 2018. +# Ch. <ccwpc@hanmail.net>, 2018, 2020. # moolow <copyhyeon@gmail.com>, 2019. # Jiyoon Kim <kimjiy@dickinson.edu>, 2019. # Ervin <zetsmart@gmail.com>, 2019. @@ -19,8 +19,8 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2020-01-27 07:09+0000\n" -"Last-Translator: ì†¡íƒœì„ <xotjq237@gmail.com>\n" +"PO-Revision-Date: 2020-02-02 08:52+0000\n" +"Last-Translator: Ch. <ccwpc@hanmail.net>\n" "Language-Team: Korean <https://hosted.weblate.org/projects/godot-engine/" "godot/ko/>\n" "Language: ko\n" @@ -33,41 +33,42 @@ msgstr "" #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/visual_script/visual_script_builtin_funcs.cpp msgid "Invalid type argument to convert(), use TYPE_* constants." -msgstr "convert() ë©”ì„œë“œì˜ ì¸ìˆ˜ ìœ í˜•ì´ ìž˜ëª»ëì–´ìš”. TYPE_* ìƒìˆ˜ë¥¼ 사용하세요." +msgstr "" +"convert() ë©”ì„œë“œì˜ ì¸ìˆ˜ ìœ í˜•ì´ ì˜¬ë°”ë¥´ì§€ 않습니다. TYPE_* ìƒìˆ˜ë¥¼ 사용하세요." #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp msgid "Expected a string of length 1 (a character)." -msgstr "길ì´ê°€ 1ì¸ ë¬¸ìžì—´ (문ìž)ì´ í•„ìš”í•´ìš”." +msgstr "길ì´ê°€ 1ì¸ ë¬¸ìžì—´(ë‹¨ì¼ ë¬¸ìž)ì´ í•„ìš”í•©ë‹ˆë‹¤." #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: 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 "ë””ì½”ë”©í• ë°”ì´íŠ¸ê°€ 모ìžë¼ê±°ë‚˜ ìž˜ëª»ëœ í˜•ì‹ì´ì—ìš”." +msgstr "ë””ì½”ë”©í• ë°”ì´íŠ¸ê°€ 모ìžë¼ê±°ë‚˜ ìž˜ëª»ëœ í˜•ì‹ìž…니다." #: core/math/expression.cpp msgid "Invalid input %i (not passed) in expression" -msgstr "표현ì‹ì—서 ìž…ë ¥ %iì´(ê°€) 잘못ëì–´ìš” (ì „ë‹¬ë˜ì§€ 않ìŒ)" +msgstr "표현ì‹ì˜ ìž…ë ¥ %i (ì „ë‹¬ë˜ì§€ 않ìŒ) ì´(ê°€) 올바르지 않습니다" #: core/math/expression.cpp msgid "self can't be used because instance is null (not passed)" -msgstr "ì¸ìŠ¤í„´ìŠ¤ê°€ 비어있어서 Self를 ì‚¬ìš©í• ìˆ˜ 없어요 (ì „ë‹¬ë˜ì§€ 않ìŒ)" +msgstr "ì¸ìŠ¤í„´ìŠ¤ê°€ null (ì „ë‹¬ë˜ì§€ 않ìŒ) ì´ë¯€ë¡œ self 를 ì‚¬ìš©í• ìˆ˜ 없습니다" #: core/math/expression.cpp msgid "Invalid operands to operator %s, %s and %s." -msgstr "ì—°ì‚°ìž %s와(ê³¼) %s, %sì˜ ì—°ì‚° 대ìƒì´ 잘못ëì–´ìš”." +msgstr "ì—°ì‚°ìž %s, %s, %sì˜ í”¼ì—°ì‚°ìžê°€ 올바르지 않습니다." #: core/math/expression.cpp msgid "Invalid index of type %s for base type %s" -msgstr "기본 ìœ í˜•ì´ %sì¸ %s ìœ í˜•ì˜ ì¸ë±ìŠ¤ê°€ 잘못ëì–´ìš”" +msgstr "ìžë£Œí˜• %s ì˜ ì¸ë±ìŠ¤ê°€ 기본형 %s 기준으로 올바르지 않습니다" #: core/math/expression.cpp msgid "Invalid named index '%s' for base type %s" -msgstr "기본 ìœ í˜•ì´ %sì¸ '%s' ì¸ë±ìŠ¤ì˜ ì´ë¦„ì´ ìž˜ëª»ëì–´ìš”" +msgstr "ì¸ë±ìФ ì´ë¦„ '%s' ì´ ê¸°ë³¸í˜• %s 기준으로 올바르지 않습니다" #: core/math/expression.cpp msgid "Invalid arguments to construct '%s'" -msgstr "ì´ ì¸ìˆ˜ë¡œëŠ” '%s'ì„(를) êµ¬ì„±í• ìˆ˜ 없어요" +msgstr "'%s' 를 ìƒì„±í•˜ê¸° 위한 ì¸ìˆ˜ê°€ 올바르지 않습니다" #: core/math/expression.cpp msgid "On call to '%s':" @@ -123,31 +124,31 @@ msgstr "ê°’:" #: editor/animation_bezier_editor.cpp msgid "Insert Key Here" -msgstr "ì—¬ê¸°ì— í‚¤ë¥¼ 삽입하기" +msgstr "ì—¬ê¸°ì— í‚¤ 삽입" #: editor/animation_bezier_editor.cpp msgid "Duplicate Selected Key(s)" -msgstr "ì„ íƒí•œ 키를 ë³µì œí•˜ê¸°" +msgstr "ì„ íƒí•œ 키 ë³µì œ" #: editor/animation_bezier_editor.cpp msgid "Delete Selected Key(s)" -msgstr "ì„ íƒí•œ 키를 ì‚ì œí•˜ê¸°" +msgstr "ì„ íƒí•œ 키 ì‚ì œ" #: editor/animation_bezier_editor.cpp msgid "Add Bezier Point" -msgstr "ë² ì§€ì–´ ì 추가하기" +msgstr "ë² ì§€ì–´ ì 추가" #: editor/animation_bezier_editor.cpp msgid "Move Bezier Points" -msgstr "ë² ì§€ì–´ ì ì´ë™í•˜ê¸°" +msgstr "ë² ì§€ì–´ ì ì´ë™" #: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp msgid "Anim Duplicate Keys" -msgstr "ì• ë‹ˆë©”ì´ì…˜ 키 ë³µì œí•˜ê¸°" +msgstr "ì• ë‹ˆë©”ì´ì…˜ 키 ë³µì œ" #: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp msgid "Anim Delete Keys" -msgstr "ì• ë‹ˆë©”ì´ì…˜ 키 ì‚ì œí•˜ê¸°" +msgstr "ì• ë‹ˆë©”ì´ì…˜ 키 ì‚ì œ" #: editor/animation_track_editor.cpp msgid "Anim Change Keyframe Time" @@ -196,7 +197,7 @@ msgstr "ì• ë‹ˆë©”ì´ì…˜ ê¸¸ì´ ë°”ê¾¸ê¸°" #: editor/animation_track_editor.cpp #: editor/plugins/sprite_frames_editor_plugin.cpp msgid "Change Animation Loop" -msgstr "ì• ë‹ˆë©”ì´ì…˜ 루프 변경하기" +msgstr "ì• ë‹ˆë©”ì´ì…˜ 루프 변경" #: editor/animation_track_editor.cpp msgid "Property Track" @@ -232,11 +233,11 @@ msgstr "ì• ë‹ˆë©”ì´ì…˜ ê¸¸ì´ (ì´ˆ)" #: editor/animation_track_editor.cpp msgid "Add Track" -msgstr "트랙 추가하기" +msgstr "트랙 추가" #: editor/animation_track_editor.cpp msgid "Animation Looping" -msgstr "ì• ë‹ˆë©”ì´ì…˜ 반복하기" +msgstr "ì• ë‹ˆë©”ì´ì…˜ 반복" #: editor/animation_track_editor.cpp #: modules/visual_script/visual_script_editor.cpp @@ -257,11 +258,11 @@ msgstr "트랙 경로 바꾸기" #: editor/animation_track_editor.cpp msgid "Toggle this track on/off." -msgstr "ì´ íŠ¸ëž™ì„ ì¼œê±°ë‚˜ 꺼요." +msgstr "ì´ íŠ¸ëž™ì„ ì¼¬/êº¼ì§ ì—¬ë¶€ë¥¼ ì „í™˜í•©ë‹ˆë‹¤." #: editor/animation_track_editor.cpp msgid "Update Mode (How this property is set)" -msgstr "ì—…ë°ì´íЏ 모드 (ì´ ì†ì„±ì„ ì„¤ì •í•˜ëŠ” 방법)" +msgstr "ì—…ë°ì´íЏ 모드 (ì´ ì†ì„±ì´ ì„¤ì •ë˜ëŠ” 방법)" #: editor/animation_track_editor.cpp msgid "Interpolation Mode" @@ -269,11 +270,11 @@ msgstr "ë³´ê°„ 모드" #: editor/animation_track_editor.cpp msgid "Loop Wrap Mode (Interpolate end with beginning on loop)" -msgstr "루프 마무리 모드 (시작 루프와 ëì„ ë³´ê°„)" +msgstr "루프 래핑 모드 (시작 루프와 ëì„ ë³´ê°„)" #: editor/animation_track_editor.cpp msgid "Remove this track." -msgstr "ì´ íŠ¸ëž™ì„ ì‚ì œí• ê²Œìš”." +msgstr "ì´ íŠ¸ëž™ì„ ì‚ì œí•©ë‹ˆë‹¤." #: editor/animation_track_editor.cpp msgid "Time (s): " @@ -314,24 +315,24 @@ msgstr "입방형" #: editor/animation_track_editor.cpp msgid "Clamp Loop Interp" -msgstr "루프 ë³´ê°„ ê³ ì •í•˜ê¸°" +msgstr "루프 ë³´ê°„ ê³ ì •" #: editor/animation_track_editor.cpp msgid "Wrap Loop Interp" -msgstr "루프 ë³´ê°„ 마무리하기" +msgstr "루프 ë³´ê°„ 래핑" #: editor/animation_track_editor.cpp #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Insert Key" -msgstr "키 삽입하기" +msgstr "키 삽입" #: editor/animation_track_editor.cpp msgid "Duplicate Key(s)" -msgstr "키 ë³µì œí•˜ê¸°" +msgstr "키 ë³µì œ" #: editor/animation_track_editor.cpp msgid "Delete Key(s)" -msgstr "키 ì‚ì œí•˜ê¸°" +msgstr "키 ì‚ì œ" #: editor/animation_track_editor.cpp msgid "Change Animation Update Mode" @@ -347,7 +348,7 @@ msgstr "ì• ë‹ˆë©”ì´ì…˜ 루프 모드 바꾸기" #: editor/animation_track_editor.cpp msgid "Remove Anim Track" -msgstr "ì• ë‹ˆë©”ì´ì…˜ 트랙 ì‚ì œí•˜ê¸°" +msgstr "ì• ë‹ˆë©”ì´ì…˜ 트랙 ì‚ì œ" #: editor/animation_track_editor.cpp msgid "Create NEW track for %s and insert key?" @@ -371,25 +372,25 @@ msgstr "만들기" #: editor/animation_track_editor.cpp msgid "Anim Insert" -msgstr "ì• ë‹ˆë©”ì´ì…˜ 삽입하기" +msgstr "ì• ë‹ˆë©”ì´ì…˜ 삽입" #: editor/animation_track_editor.cpp msgid "AnimationPlayer can't animate itself, only other players." msgstr "" -"AnimationPlayer는 ìžì‹ ì—게 ì• ë‹ˆë©”ì´ì…˜ì„ 줄 수 없어요. 다른 AnimationPlayerë§Œ " -"ì• ë‹ˆë©”ì´ì…˜ì„ 줄 수 ìžˆì£ ." +"AnimationPlayer는 ìžì‹ ì´ ì•„ë‹Œ 다른 í”Œë ˆì´ì–´ì—ë§Œ ì• ë‹ˆë©”ì´ì…˜ì„ ë¶€ì—¬í• ìˆ˜ 있습니" +"다." #: editor/animation_track_editor.cpp msgid "Anim Create & Insert" -msgstr "ì• ë‹ˆë©”ì´ì…˜ 만들기 & 삽입하기" +msgstr "ì• ë‹ˆë©”ì´ì…˜ 만들기 & 삽입" #: editor/animation_track_editor.cpp msgid "Anim Insert Track & Key" -msgstr "ì• ë‹ˆë©”ì´ì…˜ 트랙 & 키 삽입하기" +msgstr "ì• ë‹ˆë©”ì´ì…˜ 트랙 & 키 삽입" #: editor/animation_track_editor.cpp msgid "Anim Insert Key" -msgstr "ì• ë‹ˆë©”ì´ì…˜ 키 삽입하기" +msgstr "ì• ë‹ˆë©”ì´ì…˜ 키 삽입" #: editor/animation_track_editor.cpp msgid "Change Animation Step" @@ -397,11 +398,11 @@ msgstr "ì• ë‹ˆë©”ì´ì…˜ 단계 바꾸기" #: editor/animation_track_editor.cpp msgid "Rearrange Tracks" -msgstr "트랙 다시 ì •ë ¬í•˜ê¸°" +msgstr "트랙 다시 ì •ë ¬" #: editor/animation_track_editor.cpp msgid "Transform tracks only apply to Spatial-based nodes." -msgstr "변형 íŠ¸ëž™ì€ ì˜¤ì§ Spatial 기반 노드ì—ë§Œ ì ìš©ë¼ìš”." +msgstr "변형 íŠ¸ëž™ì€ ì˜¤ì§ Spatial 기반 노드ì—ë§Œ 해당ë©ë‹ˆë‹¤." #: editor/animation_track_editor.cpp msgid "" @@ -410,20 +411,20 @@ msgid "" "-AudioStreamPlayer2D\n" "-AudioStreamPlayer3D" msgstr "" -"오디오 íŠ¸ëž™ì€ ì˜¤ì§ ë‹¤ìŒ ìœ í˜•ì˜ ë…¸ë“œë§Œ 가리켜요:\n" +"오디오 íŠ¸ëž™ì€ ë‹¤ìŒ í˜•ì‹ì˜ 노드만 가리킬 수 있습니다.\n" "-AudioStreamPlayer\n" "-AudioStreamPlayer2D\n" "-AudioStreamPlayer3D" #: editor/animation_track_editor.cpp msgid "Animation tracks can only point to AnimationPlayer nodes." -msgstr "ì• ë‹ˆë©”ì´ì…˜ íŠ¸ëž™ì€ ì˜¤ì§ AnimationPlayer 노드만 가리킬 수 있어요." +msgstr "ì• ë‹ˆë©”ì´ì…˜ íŠ¸ëž™ì€ ì˜¤ì§ AnimationPlayer 노드만 가리킬 수 있습니다." #: editor/animation_track_editor.cpp msgid "An animation player can't animate itself, only other players." msgstr "" -"AnimationPlayer는 ìžì‹ ì—게 ì• ë‹ˆë©”ì´ì…˜ì„ 줄 수 없어요. 다른 AnimationPlayerë§Œ " -"ì• ë‹ˆë©”ì´ì…˜ì„ 줄 수 ìžˆì£ ." +"ì• ë‹ˆë©”ì´ì…˜ í”Œë ˆì´ì–´ëŠ” ìžì‹ ì´ ì•„ë‹Œ 다른 í”Œë ˆì´ì–´ì—ë§Œ ì• ë‹ˆë©”ì´ì…˜ì„ ë¶€ì—¬í• ìˆ˜ 있" +"습니다." #: editor/animation_track_editor.cpp msgid "Not possible to add a new track without a root" @@ -431,35 +432,35 @@ msgstr "루트 ì—†ì´ ìƒˆ íŠ¸ëž™ì„ ì¶”ê°€í• ìˆ˜ ì—†ìŒ" #: editor/animation_track_editor.cpp msgid "Invalid track for Bezier (no suitable sub-properties)" -msgstr "ë² ì§€ì–´ì— ìž˜ëª»ëœ íŠ¸ëž™ (ì 당한 하위 ì†ì„±ì´ ì—†ìŒ)" +msgstr "ë² ì§€ì–´ì— ì•Œë§žì§€ ì•Šì€ íŠ¸ëž™ (ì 당한 하위 ì†ì„±ì´ ì—†ìŒ)" #: editor/animation_track_editor.cpp msgid "Add Bezier Track" -msgstr "ë² ì§€ì–´ 트랙 추가하기" +msgstr "ë² ì§€ì–´ 트랙 추가" #: editor/animation_track_editor.cpp msgid "Track path is invalid, so can't add a key." -msgstr "트랙 경로가 잘못ëì–´ìš”. 키를 ì¶”ê°€í• ìˆ˜ 없어요." +msgstr "트랙 경로가 올바르지 않아 키를 ì¶”ê°€í• ìˆ˜ 없습니다." #: editor/animation_track_editor.cpp msgid "Track is not of type Spatial, can't insert key" -msgstr "íŠ¸ëž™ì´ Spatial ìœ í˜•ì´ ì•„ë‹ˆì—ìš”. 키를 ì‚½ìž…í• ìˆ˜ 없어요" +msgstr "íŠ¸ëž™ì´ Spatial 형ì‹ì´ 아니어서 키를 ì¶”ê°€í• ìˆ˜ 없습니다" #: editor/animation_track_editor.cpp msgid "Add Transform Track Key" -msgstr "변형 트랙 키 추가하기" +msgstr "변형 트랙 키 추가" #: editor/animation_track_editor.cpp msgid "Add Track Key" -msgstr "트랙 키 추가하기" +msgstr "트랙 키 추가" #: editor/animation_track_editor.cpp msgid "Track path is invalid, so can't add a method key." -msgstr "트랙 경로가 잘못ëì–´ìš”. 메서드 키를 ì¶”ê°€í• ìˆ˜ 없어요." +msgstr "트랙 경로가 올바르지 않아 메서드 키를 ì¶”ê°€í• ìˆ˜ 없습니다." #: editor/animation_track_editor.cpp msgid "Add Method Track Key" -msgstr "메서드 트랙 키 추가하기" +msgstr "메서드 트랙 키 추가" #: editor/animation_track_editor.cpp msgid "Method not found in object: " @@ -467,7 +468,7 @@ msgstr "ê°ì²´ì— 메서드가 ì—†ìŒ: " #: editor/animation_track_editor.cpp msgid "Anim Move Keys" -msgstr "ì• ë‹ˆë©”ì´ì…˜ 키 ì´ë™í•˜ê¸°" +msgstr "ì• ë‹ˆë©”ì´ì…˜ 키 ì´ë™" #: editor/animation_track_editor.cpp msgid "Clipboard is empty" @@ -479,12 +480,13 @@ msgstr "트랙 붙여 넣기" #: editor/animation_track_editor.cpp msgid "Anim Scale Keys" -msgstr "ì• ë‹ˆë©”ì´ì…˜ 키 í¬ê¸° ì¡°ì ˆí•˜ê¸°" +msgstr "ì• ë‹ˆë©”ì´ì…˜ 키 í¬ê¸° ì¡°ì ˆ" #: editor/animation_track_editor.cpp msgid "" "This option does not work for Bezier editing, as it's only a single track." -msgstr "ì´ ì„¤ì •ì€ ë‹¨ì¼ íŠ¸ëž™ì—ë§Œ 해당ë˜ì–´ì„œ, ë² ì§€ì–´ íŽ¸ì§‘ì— ìž‘ë™í•˜ì§€ 않아요." +msgstr "" +"ì´ ì„¤ì •ì€ ë‹¨ì¼ íŠ¸ëž™ì—ë§Œ ì ìš© 가능하므로 ë² ì§€ì–´ íŽ¸ì§‘ì— ì‚¬ìš©í• ìˆ˜ 없습니다." #: editor/animation_track_editor.cpp msgid "" @@ -498,13 +500,13 @@ msgid "" "Alternatively, use an import preset that imports animations to separate " "files." msgstr "" -"ì´ ì• ë‹ˆë©”ì´ì…˜ì€ ê°€ì ¸ì˜¨ ì”¬ì— ì†í•´ 있어요. ê°€ì ¸ì˜¨ íŠ¸ëž™ì˜ ë³€ê²½ 사í•ì€ ì €ìž¥ë˜ì§€ " -"않아요.\n" +"ì´ ì• ë‹ˆë©”ì´ì…˜ì€ ê°€ì ¸ì˜¨ ì”¬ì— ì†í•´ 있습니다. ê°€ì ¸ì˜¨ íŠ¸ëž™ì˜ ë³€ê²½ 사í•ì€ ì €ìž¥ë˜" +"ì§€ 않습니다.\n" "\n" "ì €ìž¥ ê¸°ëŠ¥ì„ ì¼œë ¤ë©´ 맞춤 íŠ¸ëž™ì„ ì¶”ê°€í•˜ê³ , ì”¬ì˜ ê°€ì ¸ì˜¤ê¸° ì„¤ì •ìœ¼ë¡œ 가서\n" "\"Animation > Storage\" ì„¤ì •ì„ \"Files\"로, \"Animation > Keep Custom Tracks" -"\" ì„¤ì •ì„ ì¼ ë’¤, 다시 ê°€ì ¸ì˜¤ì„¸ìš”.\n" -"아니면 ê°€ì ¸ì˜¤ê¸° 프리셋으로 ì• ë‹ˆë©”ì´ì…˜ì„ 별ë„ì˜ íŒŒì¼ë¡œ ê°€ì ¸ì˜¬ ìˆ˜ë„ ìžˆì–´ìš”." +"\" ì„¤ì •ì„ ì¼ ë’¤, 다시 ê°€ì ¸ì˜¤ì‹ì‹œì˜¤.\n" +"아니면 ê°€ì ¸ì˜¤ê¸° 프리셋으로 ì• ë‹ˆë©”ì´ì…˜ì„ 별ë„ì˜ íŒŒì¼ë¡œ ê°€ì ¸ì˜¬ ìˆ˜ë„ ìžˆìŠµë‹ˆë‹¤." #: editor/animation_track_editor.cpp msgid "Warning: Editing imported animation" @@ -516,11 +518,11 @@ msgstr "ì• ë‹ˆë©”ì´ì…˜ì„ ë§Œë“¤ê³ íŽ¸ì§‘í•˜ë ¤ë©´ AnimationPlayer노드를 ì„ #: editor/animation_track_editor.cpp msgid "Only show tracks from nodes selected in tree." -msgstr "ì˜¤ì§ íŠ¸ë¦¬ì—서 ì„ íƒí•œ 노드만 íŠ¸ëž™ì— í‘œì‹œë¼ìš”." +msgstr "트리ì—서 ì„ íƒí•œ 노드만 íŠ¸ëž™ì— í‘œì‹œë©ë‹ˆë‹¤." #: editor/animation_track_editor.cpp msgid "Group tracks by node or display them as plain list." -msgstr "노드 별로 íŠ¸ëž™ì„ ë¬¶ì–´ì„œ 보거나, 묶지 ì•Šê³ ë‚˜ì—´í•´ì„œ ë³¼ 수 있어요." +msgstr "노드 별로 íŠ¸ëž™ì„ ë¬¶ì–´ì„œ 보거나, 묶지 ì•Šê³ ë‚˜ì—´í•´ì„œ ë³¼ 수 있습니다." #: editor/animation_track_editor.cpp msgid "Snap:" @@ -546,7 +548,7 @@ msgstr "초당 í”„ë ˆìž„" #: editor/project_settings_editor.cpp editor/property_editor.cpp #: modules/visual_script/visual_script_editor.cpp msgid "Edit" -msgstr "편집하기" +msgstr "편집" #: editor/animation_track_editor.cpp msgid "Animation properties." @@ -554,43 +556,43 @@ msgstr "ì• ë‹ˆë©”ì´ì…˜ ì†ì„±." #: editor/animation_track_editor.cpp msgid "Copy Tracks" -msgstr "트랙 복사하기" +msgstr "트랙 복사" #: editor/animation_track_editor.cpp msgid "Scale Selection" -msgstr "ì„ íƒ í•목 규모 ì¡°ì ˆí•˜ê¸°" +msgstr "ì„ íƒ í•목 배율 ì¡°ì ˆ" #: editor/animation_track_editor.cpp msgid "Scale From Cursor" -msgstr "커서 위치ì—서 규모 ì¡°ì ˆí•˜ê¸°" +msgstr "커서 위치ì—서 배율 ì¡°ì ˆ" #: editor/animation_track_editor.cpp modules/gridmap/grid_map_editor_plugin.cpp msgid "Duplicate Selection" -msgstr "ì„ íƒ í•목 ë³µì œí•˜ê¸°" +msgstr "ì„ íƒ í•목 ë³µì œ" #: editor/animation_track_editor.cpp msgid "Duplicate Transposed" -msgstr "ì„ íƒëœ íŠ¸ëž™ì— ë³µì œí•˜ê¸°" +msgstr "ì„ íƒëœ íŠ¸ëž™ì— ë³µì œ" #: editor/animation_track_editor.cpp msgid "Delete Selection" -msgstr "ì„ íƒ í•목 ì‚ì œí•˜ê¸°" +msgstr "ì„ íƒ í•목 ì‚ì œ" #: editor/animation_track_editor.cpp msgid "Go to Next Step" -msgstr "ë‹¤ìŒ ë‹¨ê³„ë¡œ ì´ë™í•˜ê¸°" +msgstr "ë‹¤ìŒ ë‹¨ê³„ë¡œ ì´ë™" #: editor/animation_track_editor.cpp msgid "Go to Previous Step" -msgstr "ì´ì „ 단계로 ì´ë™í•˜ê¸°" +msgstr "ì´ì „ 단계로 ì´ë™" #: editor/animation_track_editor.cpp msgid "Optimize Animation" -msgstr "ì• ë‹ˆë©”ì´ì…˜ 최ì 화하기" +msgstr "ì• ë‹ˆë©”ì´ì…˜ 최ì í™”" #: editor/animation_track_editor.cpp msgid "Clean-Up Animation" -msgstr "ì• ë‹ˆë©”ì´ì…˜ ì •ë¦¬í•˜ê¸°" +msgstr "ì• ë‹ˆë©”ì´ì…˜ ì •ë¦¬" #: editor/animation_track_editor.cpp msgid "Pick the node that will be animated:" @@ -598,19 +600,19 @@ msgstr "ì• ë‹ˆë©”ì´ì…˜ì„ 줄 노드를 ì„ íƒí•˜ì„¸ìš”:" #: editor/animation_track_editor.cpp msgid "Use Bezier Curves" -msgstr "ë² ì§€ì–´ ê³¡ì„ ì‚¬ìš©í•˜ê¸°" +msgstr "ë² ì§€ì–´ ê³¡ì„ ì‚¬ìš©" #: editor/animation_track_editor.cpp msgid "Anim. Optimizer" -msgstr "ì• ë‹ˆë©”ì´ì…˜. 최ì í™”" +msgstr "ì• ë‹ˆë©”ì´ì…˜ 최ì í™”" #: editor/animation_track_editor.cpp msgid "Max. Linear Error:" -msgstr "최대. ì„ í˜• 오류:" +msgstr "최대 ì„ í˜• 오류:" #: editor/animation_track_editor.cpp msgid "Max. Angular Error:" -msgstr "최대. ê°ë„ 오류:" +msgstr "최대 ê°ë„ 오류:" #: editor/animation_track_editor.cpp msgid "Max Optimizable Angle:" @@ -618,35 +620,35 @@ msgstr "최ì í™” 가능한 최대 ê°ë„:" #: editor/animation_track_editor.cpp msgid "Optimize" -msgstr "최ì 화하기" +msgstr "최ì í™”" #: editor/animation_track_editor.cpp msgid "Remove invalid keys" -msgstr "ìž˜ëª»ëœ í‚¤ ì‚ì œí•˜ê¸°" +msgstr "ìž˜ëª»ëœ í‚¤ ì‚ì œ" #: editor/animation_track_editor.cpp msgid "Remove unresolved and empty tracks" -msgstr "í•´ê²°ë˜ì§€ ì•Šê³ ë¹ˆ 트랙 ì‚ì œí•˜ê¸°" +msgstr "í•´ê²°ë˜ì§€ ì•Šê³ ë¹ˆ 트랙 ì‚ì œ" #: editor/animation_track_editor.cpp msgid "Clean-up all animations" -msgstr "ëª¨ë“ ì• ë‹ˆë©”ì´ì…˜ ì •ë¦¬í•˜ê¸°" +msgstr "ëª¨ë“ ì• ë‹ˆë©”ì´ì…˜ ì •ë¦¬" #: editor/animation_track_editor.cpp msgid "Clean-Up Animation(s) (NO UNDO!)" -msgstr "ì• ë‹ˆë©”ì´ì…˜ ì •ë¦¬í•˜ê¸° (ë˜ëŒë¦´ 수 없어요!)" +msgstr "ì• ë‹ˆë©”ì´ì…˜ ì •ë¦¬ (ë˜ëŒë¦´ 수 없습니다!)" #: editor/animation_track_editor.cpp msgid "Clean-Up" -msgstr "ì •ë¦¬í•˜ê¸°" +msgstr "ì •ë¦¬" #: editor/animation_track_editor.cpp msgid "Scale Ratio:" -msgstr "규모 비율:" +msgstr "배율값:" #: editor/animation_track_editor.cpp msgid "Select Tracks to Copy" -msgstr "ë³µì‚¬í• íŠ¸ëž™ì„ ì„ íƒí•˜ê¸°" +msgstr "ë³µì‚¬í• íŠ¸ëž™ ì„ íƒ" #: editor/animation_track_editor.cpp editor/editor_log.cpp #: editor/editor_properties.cpp @@ -655,15 +657,15 @@ msgstr "ë³µì‚¬í• íŠ¸ëž™ì„ ì„ íƒí•˜ê¸°" #: editor/plugins/sprite_frames_editor_plugin.cpp editor/property_editor.cpp #: scene/gui/line_edit.cpp scene/gui/text_edit.cpp msgid "Copy" -msgstr "복사하기" +msgstr "복사" #: editor/animation_track_editor.cpp msgid "Select All/None" -msgstr "ëª¨ë‘ ì„ íƒí•˜ê¸°/ì„ íƒí•˜ì§€ 않기" +msgstr "ëª¨ë‘ ì„ íƒ/í•´ì œ" #: editor/animation_track_editor_plugins.cpp msgid "Add Audio Track Clip" -msgstr "오디오 트랙 í´ë¦½ 추가하기" +msgstr "오디오 트랙 í´ë¦½ 추가" #: editor/animation_track_editor_plugins.cpp msgid "Change Audio Track Clip Start Offset" @@ -687,23 +689,24 @@ msgstr "ë°°ì—´ ê°’ 바꾸기" #: editor/code_editor.cpp msgid "Go to Line" -msgstr "행으로 ì´ë™í•˜ê¸°" +msgstr "행으로 ì´ë™" #: editor/code_editor.cpp msgid "Line Number:" msgstr "í–‰ 번호:" #: editor/code_editor.cpp -msgid "Replaced %d occurrence(s)." -msgstr "%dê°œì˜ ë‹¨ì–´ë¥¼ êµì²´í–ˆì–´ìš”." +#, fuzzy +msgid "%d replaced." +msgstr "바꾸기..." #: editor/code_editor.cpp editor/editor_help.cpp msgid "%d match." -msgstr "%d개가 ì¼ì¹˜í•´ìš”." +msgstr "%dê°œ ì¼ì¹˜." #: editor/code_editor.cpp editor/editor_help.cpp msgid "%d matches." -msgstr "%d개가 ì¼ì¹˜í•´ìš”." +msgstr "%dê°œ ì¼ì¹˜." #: editor/code_editor.cpp editor/find_in_files.cpp msgid "Match Case" @@ -711,19 +714,19 @@ msgstr "ëŒ€ì†Œë¬¸ìž êµ¬ë¶„" #: editor/code_editor.cpp editor/find_in_files.cpp msgid "Whole Words" -msgstr "ì „ì²´ 단어" +msgstr "단어 단위로" #: editor/code_editor.cpp editor/rename_dialog.cpp msgid "Replace" -msgstr "êµì²´í•˜ê¸°" +msgstr "바꾸기" #: editor/code_editor.cpp msgid "Replace All" -msgstr "ëª¨ë‘ êµì²´í•˜ê¸°" +msgstr "ëª¨ë‘ ë°”ê¾¸ê¸°" #: editor/code_editor.cpp msgid "Selection Only" -msgstr "ì„ íƒ í•목만" +msgstr "ì„ íƒ ì˜ì—ë§Œ" #: editor/code_editor.cpp editor/plugins/script_text_editor.cpp #: editor/plugins/text_editor.cpp @@ -738,17 +741,17 @@ msgstr "스í¬ë¦½íЏ íŒ¨ë„ í† ê¸€" #: editor/plugins/texture_region_editor_plugin.cpp #: editor/plugins/tile_set_editor_plugin.cpp scene/gui/graph_edit.cpp msgid "Zoom In" -msgstr "확대하기" +msgstr "확대" #: editor/code_editor.cpp editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/texture_region_editor_plugin.cpp #: editor/plugins/tile_set_editor_plugin.cpp scene/gui/graph_edit.cpp msgid "Zoom Out" -msgstr "축소하기" +msgstr "축소" #: editor/code_editor.cpp msgid "Reset Zoom" -msgstr "확대 비율 ì›ëž˜ëŒ€ë¡œ" +msgstr "확대/축소 다시 ì„¤ì •" #: editor/code_editor.cpp msgid "Warnings" @@ -760,23 +763,23 @@ msgstr "í–‰ ë° ì—´ 번호." #: editor/connections_dialog.cpp msgid "Method in target node must be specified." -msgstr "ëŒ€ìƒ ë…¸ë“œì—서 메서드를 ì§€ì •í•´ì•¼ í•´ìš”." +msgstr "ëŒ€ìƒ ë…¸ë“œì— ìžˆëŠ” 메서드는 반드시 ì§€ì •í•´ì•¼ 합니다." #: editor/connections_dialog.cpp msgid "" "Target method not found. Specify a valid method or attach a script to the " "target node." msgstr "" -"ëŒ€ìƒ ë©”ì„œë“œë¥¼ ì°¾ì„ ìˆ˜ 없어요. 올바른 메서드를 ì§€ì •í•˜ê±°ë‚˜ ëŒ€ìƒ ë…¸ë“œì— ìŠ¤í¬ë¦½íЏ" -"를 붙여보세요." +"ëŒ€ìƒ ë©”ì„œë“œë¥¼ ì°¾ì„ ìˆ˜ 없습니다. 올바른 메서드를 ì§€ì •í•˜ê±°ë‚˜ ëŒ€ìƒ ë…¸ë“œì— ìŠ¤í¬ë¦½" +"트를 붙여보세요." #: editor/connections_dialog.cpp msgid "Connect to Node:" -msgstr "ì´ ë…¸ë“œì— ì—°ê²°ë¨:" +msgstr "ì´ ë…¸ë“œì— ì—°ê²°:" #: editor/connections_dialog.cpp msgid "Connect to Script:" -msgstr "ì´ ìŠ¤í¬ë¦½íŠ¸ì— ì—°ê²°ë¨:" +msgstr "ì´ ìŠ¤í¬ë¦½íŠ¸ì— ì—°ê²°:" #: editor/connections_dialog.cpp msgid "From Signal:" @@ -784,13 +787,13 @@ msgstr "ì´ ì‹œê·¸ë„ì—서:" #: editor/connections_dialog.cpp msgid "Scene does not contain any script." -msgstr "ì”¬ì´ ì–´ë–¤ 스í¬ë¦½íŠ¸ë„ ê°–ê³ ìžˆì§€ 않아요." +msgstr "ì”¬ì— ìŠ¤í¬ë¦½íŠ¸ê°€ 없습니다." #: editor/connections_dialog.cpp editor/editor_autoload_settings.cpp #: editor/groups_editor.cpp 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/editor_feature_profile.cpp editor/groups_editor.cpp @@ -801,11 +804,11 @@ 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:" -msgstr "별ë„ì˜ í˜¸ì¶œ ì¸ìˆ˜ 추가하기:" +msgstr "별ë„ì˜ í˜¸ì¶œ ì¸ìˆ˜ 추가:" #: editor/connections_dialog.cpp msgid "Extra Call Arguments:" @@ -827,7 +830,8 @@ msgstr "지연" msgid "" "Defers the signal, storing it in a queue and only firing it at idle time." msgstr "" -"시그ë„ì„ ì§€ì—°í•˜ë©´, 시그ë„ì€ íì— ì €ìž¥ë˜ê¸° ë•Œë¬¸ì— ëŒ€ê¸° 시간ì—ë§Œ 방출해요." +"시그ë„ì„ ì§€ì—°í•©ë‹ˆë‹¤. ì§€ì—°ëœ ì‹œê·¸ë„ì€ íì— ë³´ê´€ë˜ì—ˆë‹¤ê°€ 대기 ìƒíƒœê°€ ë˜ë©´ ë°œìƒ" +"ë©ë‹ˆë‹¤." #: editor/connections_dialog.cpp msgid "Oneshot" @@ -835,7 +839,7 @@ msgstr "1회" #: editor/connections_dialog.cpp msgid "Disconnects the signal after its first emission." -msgstr "ì²˜ìŒ ë°©ì¶œí•˜ë©´ ì‹œê·¸ë„ ì—°ê²°ì„ í’€ì–´ë²„ë ¤ìš”." +msgstr "시그ë„ì´ ì²˜ìŒ ë°œìƒëœ ì´í›„ 시그ë„ì˜ ì—°ê²°ì„ ëŠìŠµë‹ˆë‹¤." #: editor/connections_dialog.cpp msgid "Cannot connect signal" @@ -866,32 +870,32 @@ msgstr "시그ë„:" #: editor/connections_dialog.cpp msgid "Connect '%s' to '%s'" -msgstr "'%s'ì„(를) '%s'ì— ì—°ê²°í•˜ê¸°" +msgstr "'%s'ì„(를) '%s'ì— ì—°ê²°" #: editor/connections_dialog.cpp msgid "Disconnect '%s' from '%s'" -msgstr "'%s'ì„(를) '%s'ì—서 ì—°ê²° 풀기" +msgstr "'%s'ì„(를) '%s'ì—서 ì—°ê²° ëŠê¸°" #: editor/connections_dialog.cpp msgid "Disconnect all from signal: '%s'" -msgstr "ëª¨ë‘ ì‹œê·¸ë„ì—서 ì—°ê²° 풀기: '%s'" +msgstr "ëª¨ë‘ ì‹œê·¸ë„ì—서 ì—°ê²° ëŠê¸°: '%s'" #: editor/connections_dialog.cpp msgid "Connect..." -msgstr "연결하기..." +msgstr "ì—°ê²°..." #: editor/connections_dialog.cpp #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Disconnect" -msgstr "ì—°ê²° 풀기" +msgstr "ì—°ê²° ëŠê¸°" #: editor/connections_dialog.cpp msgid "Connect a Signal to a Method" -msgstr "시그ë„ì„ ë©”ì„œë“œì— ì—°ê²°í•˜ê¸°" +msgstr "시그ë„ì„ ë©”ì„œë“œì— ì—°ê²°" #: editor/connections_dialog.cpp msgid "Edit Connection:" -msgstr "ì—°ê²° 편집하기:" +msgstr "ì—°ê²° 변경:" #: editor/connections_dialog.cpp msgid "Are you sure you want to remove all connections from the \"%s\" signal?" @@ -899,7 +903,7 @@ msgstr "\"%s\" 시그ë„ì˜ ëª¨ë“ ì—°ê²°ì„ ì‚ì œí• ê¹Œìš”?" #: editor/connections_dialog.cpp editor/editor_help.cpp editor/node_dock.cpp msgid "Signals" -msgstr "시그ë„(Signal)" +msgstr "시그ë„" #: editor/connections_dialog.cpp msgid "Are you sure you want to remove all connections from this signal?" @@ -907,19 +911,19 @@ msgstr "ì´ ì‹œê·¸ë„ì˜ ëª¨ë“ ì—°ê²°ì„ ì‚ì œí• ê¹Œìš”?" #: editor/connections_dialog.cpp msgid "Disconnect All" -msgstr "ëª¨ë‘ ì—°ê²° 풀기" +msgstr "ì—°ê²° ëª¨ë‘ ëŠê¸°" #: editor/connections_dialog.cpp msgid "Edit..." -msgstr "편집하기..." +msgstr "편집..." #: editor/connections_dialog.cpp msgid "Go To Method" -msgstr "메서드로 ì´ë™í•˜ê¸°" +msgstr "메서드로 ì´ë™" #: editor/create_dialog.cpp msgid "Change %s Type" -msgstr "%s(으)로 ìœ í˜• 바꾸기" +msgstr "%s ìœ í˜• 바꾸기" #: editor/create_dialog.cpp editor/project_settings_editor.cpp msgid "Change" @@ -942,7 +946,7 @@ msgstr "최근 기ë¡:" #: editor/property_selector.cpp editor/quick_open.cpp #: modules/visual_script/visual_script_property_selector.cpp msgid "Search:" -msgstr "검색하기:" +msgstr "검색:" #: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp #: editor/property_selector.cpp editor/quick_open.cpp @@ -960,7 +964,7 @@ msgstr "설명:" #: editor/dependency_editor.cpp msgid "Search Replacement For:" -msgstr "êµì²´í• ëŒ€ìƒ ì°¾ê¸°:" +msgstr "바꿀 ëŒ€ìƒ ì°¾ê¸°:" #: editor/dependency_editor.cpp msgid "Dependencies For:" @@ -971,16 +975,16 @@ msgid "" "Scene '%s' is currently being edited.\n" "Changes will only take effect when reloaded." msgstr "" -"씬 '%s'ì„(를) íŽ¸ì§‘í•˜ê³ ìžˆì–´ìš”.\n" -"다시 불러와야 변경 사í•ì´ ì ìš©ë¼ìš”." +"씬 '%s'ì´(ê°€) 현재 편집중입니다.\n" +"변경 사í•ì€ ë‹¤ì‹œ ë¡œë“œëœ ë’¤ì— ë°˜ì˜ë©ë‹ˆë‹¤." #: editor/dependency_editor.cpp msgid "" "Resource '%s' is in use.\n" "Changes will only take effect when reloaded." msgstr "" -"리소스 '%s'ì„(를) ì‚¬ìš©í•˜ê³ ìžˆì–´ìš”.\n" -"다시 불러와야 변경 사í•ì´ ì ìš©ë¼ìš”." +"리소스 '%s'ì´(ê°€) 현재 사용중입니다.\n" +"변경 사í•ì€ ë‹¤ì‹œ ë¡œë“œëœ ë’¤ì— ë°˜ì˜ë©ë‹ˆë‹¤." #: editor/dependency_editor.cpp #: modules/gdnative/gdnative_library_editor_plugin.cpp @@ -994,7 +998,7 @@ msgstr "리소스" #: editor/dependency_editor.cpp editor/editor_autoload_settings.cpp #: editor/project_manager.cpp editor/project_settings_editor.cpp msgid "Path" -msgstr "Path(경로)" +msgstr "경로" #: editor/dependency_editor.cpp msgid "Dependencies:" @@ -1010,7 +1014,7 @@ msgstr "ì¢…ì† ê´€ê³„ 편집기" #: editor/dependency_editor.cpp msgid "Search Replacement Resource:" -msgstr "대체 리소스 검색하기:" +msgstr "대체 리소스 검색:" #: editor/dependency_editor.cpp editor/editor_file_dialog.cpp #: editor/editor_help_search.cpp editor/editor_node.cpp @@ -1028,7 +1032,7 @@ msgstr "ì†Œìœ ìž:" #: editor/dependency_editor.cpp msgid "Remove selected files from the project? (Can't be restored)" -msgstr "프로ì 트ì—서 ì„ íƒí•œ 파ì¼ì„ ì‚ì œí• ê¹Œìš”? (ë˜ëŒë¦´ 수 없어요)" +msgstr "프로ì 트ì—서 ì„ íƒí•œ 파ì¼ì„ ì‚ì œí• ê¹Œìš”? (ë˜ëŒë¦´ 수 없습니다)" #: editor/dependency_editor.cpp msgid "" @@ -1036,8 +1040,8 @@ msgid "" "work.\n" "Remove them anyway? (no undo)" msgstr "" -"ì‚ì œí•˜ë ¤ëŠ” 파ì¼ì€ ìž‘ì—…ì„ ìœ„í•´ 다른 리소스ì—서 필요한 파ì¼ì´ì—ìš”.\n" -"ë¬´ì‹œí•˜ê³ ì‚ì œí• ê±´ê°€ìš”? (ë˜ëŒë¦´ 수 없어요)" +"ì‚ì œí•˜ë ¤ëŠ” 파ì¼ì€ 다른 리소스가 ë™ìž‘하기 위해 필요한 파ì¼ìž…니다.\n" +"ë¬´ì‹œí•˜ê³ ì‚ì œí• ê¹Œìš”? (ë˜ëŒë¦´ 수 없습니다)" #: editor/dependency_editor.cpp msgid "Cannot remove:" @@ -1045,7 +1049,7 @@ msgstr "ì‚ì œí• ìˆ˜ ì—†ìŒ:" #: editor/dependency_editor.cpp msgid "Error loading:" -msgstr "불러오는 중 오류:" +msgstr "불러오기 오류:" #: editor/dependency_editor.cpp msgid "Load failed due to missing dependencies:" @@ -1057,7 +1061,7 @@ msgstr "ë¬´ì‹œí•˜ê³ ì—´ê¸°" #: editor/dependency_editor.cpp msgid "Which action should be taken?" -msgstr "ì–´ë–¤ ìž‘ì—…ì„ í• ê±´ê°€ìš”?" +msgstr "ì–´ë–¤ ìž‘ì—…ì„ í•˜ì‹œê² ìŠµë‹ˆê¹Œ?" #: editor/dependency_editor.cpp msgid "Fix Dependencies" @@ -1065,11 +1069,11 @@ msgstr "ì¢…ì† ê´€ê³„ ê³ ì¹˜ê¸°" #: editor/dependency_editor.cpp msgid "Errors loading!" -msgstr "불러오는 중 오류!" +msgstr "불러오기 오류!" #: editor/dependency_editor.cpp msgid "Permanently delete %d item(s)? (No undo!)" -msgstr "%dê°œì˜ í•ëª©ì„ ì˜êµ¬ì 으로 ì‚ì œí• ê¹Œìš”? (ë˜ëŒë¦´ 수 없어요!)" +msgstr "%dê°œì˜ í•ëª©ì„ ì˜êµ¬ì 으로 ì‚ì œí• ê¹Œìš”? (ë˜ëŒë¦´ 수 없습니다!)" #: editor/dependency_editor.cpp msgid "Show Dependencies" @@ -1085,7 +1089,7 @@ msgstr "미사용 리소스 íƒìƒ‰ê¸°" #: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_export.cpp #: editor/project_settings_editor.cpp editor/scene_tree_dock.cpp msgid "Delete" -msgstr "ì‚ì œí•˜ê¸°" +msgstr "ì‚ì œ" #: editor/dependency_editor.cpp msgid "Owns" @@ -1097,15 +1101,15 @@ msgstr "명확한 ì†Œìœ ê´€ê³„ê°€ 없는 리소스:" #: editor/dictionary_property_edit.cpp msgid "Change Dictionary Key" -msgstr "ë””ë ‰í† ë¦¬ 키 변경하기" +msgstr "딕셔너리 키 변경" #: editor/dictionary_property_edit.cpp msgid "Change Dictionary Value" -msgstr "ë””ë ‰í† ë¦¬ ê°’ 변경하기" +msgstr "딕셔너리 ê°’ 변경" #: editor/editor_about.cpp msgid "Thanks from the Godot community!" -msgstr "Godot ì»¤ë®¤ë‹ˆí‹°ì˜ ê°ì‚¬ì˜ ë§ì”€!" +msgstr "Godot 커뮤니티ì—서 ê°ì‚¬ë“œë¦½ë‹ˆë‹¤!" #: editor/editor_about.cpp msgid "Godot Engine contributors" @@ -1192,7 +1196,7 @@ msgstr "ë¼ì´ì„ 스" #: editor/editor_asset_installer.cpp editor/project_manager.cpp msgid "Error opening package file, not in ZIP format." -msgstr "패키지 파ì¼ì„ 여는 중 오류. ZIP 형ì‹ì´ 아니ì—ìš”." +msgstr "패키지 파ì¼ì„ 여는 중 오류. ZIP 형ì‹ì´ 아닙니다." #: editor/editor_asset_installer.cpp msgid "%s (Already Exists)" @@ -1212,7 +1216,7 @@ msgstr "외 %d ê°œì˜ íŒŒì¼." #: editor/editor_asset_installer.cpp editor/project_manager.cpp msgid "Package installed successfully!" -msgstr "패키지를 성공ì 으로 설치했어요!" +msgstr "패키지를 성공ì 으로 설치했습니다!" #: editor/editor_asset_installer.cpp #: editor/plugins/asset_library_editor_plugin.cpp @@ -1225,7 +1229,7 @@ msgstr "패키지 ë‚´ìš©:" #: editor/editor_asset_installer.cpp editor/editor_node.cpp msgid "Install" -msgstr "설치하기" +msgstr "설치" #: editor/editor_asset_installer.cpp msgid "Package Installer" @@ -1237,7 +1241,7 @@ msgstr "스피커" #: editor/editor_audio_buses.cpp msgid "Add Effect" -msgstr "효과 추가하기" +msgstr "효과 추가" #: editor/editor_audio_buses.cpp msgid "Rename Audio Bus" @@ -1261,23 +1265,23 @@ msgstr "오디오 버스 ë°”ì´íŒ¨ìФ 효과 í† ê¸€" #: editor/editor_audio_buses.cpp msgid "Select Audio Bus Send" -msgstr "오디오 버스 ì „ì†¡ ì„ íƒí•˜ê¸°" +msgstr "오디오 버스 ì „ì†¡ ì„ íƒ" #: editor/editor_audio_buses.cpp msgid "Add Audio Bus Effect" -msgstr "오디오 버스 효과 추가하기" +msgstr "오디오 버스 효과 추가" #: editor/editor_audio_buses.cpp msgid "Move Bus Effect" -msgstr "버스 효과 ì´ë™í•˜ê¸°" +msgstr "버스 효과 ì´ë™" #: editor/editor_audio_buses.cpp msgid "Delete Bus Effect" -msgstr "버스 효과 ì‚ì œí•˜ê¸°" +msgstr "버스 효과 ì‚ì œ" #: editor/editor_audio_buses.cpp msgid "Drag & drop to rearrange." -msgstr "드래그 & 드ë¡ìœ¼ë¡œ 다시 ì •ë ¬í•´ìš”." +msgstr "드래그 & 드ë¡ìœ¼ë¡œ 다시 ì •ë ¬í•©ë‹ˆë‹¤." #: editor/editor_audio_buses.cpp msgid "Solo" @@ -1298,47 +1302,47 @@ msgstr "버스 ì„¤ì •" #: editor/editor_audio_buses.cpp editor/filesystem_dock.cpp #: editor/plugins/animation_player_editor_plugin.cpp editor/scene_tree_dock.cpp msgid "Duplicate" -msgstr "ë³µì œí•˜ê¸°" +msgstr "ë³µì œ" #: editor/editor_audio_buses.cpp msgid "Reset Volume" -msgstr "볼륨 리셋" +msgstr "볼륨 초기화" #: editor/editor_audio_buses.cpp msgid "Delete Effect" -msgstr "효과 ì‚ì œí•˜ê¸°" +msgstr "효과 ì‚ì œ" #: editor/editor_audio_buses.cpp msgid "Audio" -msgstr "오디오(Audio)" +msgstr "오디오" #: editor/editor_audio_buses.cpp msgid "Add Audio Bus" -msgstr "오디오 버스 추가하기" +msgstr "오디오 버스 추가" #: editor/editor_audio_buses.cpp msgid "Master bus can't be deleted!" -msgstr "마스터 버스는 ì‚ì œí• ìˆ˜ 없어요!" +msgstr "마스터 버스는 ì‚ì œí• ìˆ˜ 없습니다!" #: editor/editor_audio_buses.cpp msgid "Delete Audio Bus" -msgstr "오디오 버스 ì‚ì œí•˜ê¸°" +msgstr "오디오 버스 ì‚ì œ" #: editor/editor_audio_buses.cpp msgid "Duplicate Audio Bus" -msgstr "오디오 버스 ë³µì œí•˜ê¸°" +msgstr "오디오 버스 ë³µì œ" #: editor/editor_audio_buses.cpp msgid "Reset Bus Volume" -msgstr "버스 볼륨 리셋하기" +msgstr "버스 볼륨 초기화" #: editor/editor_audio_buses.cpp msgid "Move Audio Bus" -msgstr "오디오 버스 ì´ë™í•˜ê¸°" +msgstr "오디오 버스 ì´ë™" #: editor/editor_audio_buses.cpp msgid "Save Audio Bus Layout As..." -msgstr "오디오 버스 ë ˆì´ì•„ì›ƒì„ ë‹¤ë¥¸ ì´ë¦„으로 ì €ìž¥í•˜ê¸°..." +msgstr "오디오 버스 ë ˆì´ì•„ì›ƒì„ ë‹¤ë¥¸ ì´ë¦„으로 ì €ìž¥..." #: editor/editor_audio_buses.cpp msgid "Location for New Layout..." @@ -1350,7 +1354,7 @@ msgstr "오디오 버스 ë ˆì´ì•„웃 열기" #: editor/editor_audio_buses.cpp msgid "There is no '%s' file." -msgstr "'%s' 파ì¼ì´ 없어요." +msgstr "'%s' 파ì¼ì´ 없습니다." #: editor/editor_audio_buses.cpp editor/plugins/canvas_item_editor_plugin.cpp msgid "Layout" @@ -1358,7 +1362,7 @@ msgstr "ë ˆì´ì•„웃" #: editor/editor_audio_buses.cpp msgid "Invalid file, not an audio bus layout." -msgstr "ìž˜ëª»ëœ íŒŒì¼. 오디오 버스 ë ˆì´ì•„ì›ƒì´ ì•„ë‹ˆì—ìš”." +msgstr "ìž˜ëª»ëœ íŒŒì¼. 오디오 버스 ë ˆì´ì•„ì›ƒì´ ì•„ë‹™ë‹ˆë‹¤." #: editor/editor_audio_buses.cpp msgid "Error saving file: %s" @@ -1366,11 +1370,11 @@ msgstr "íŒŒì¼ ì €ìž¥ 중 오류: %s" #: editor/editor_audio_buses.cpp msgid "Add Bus" -msgstr "버스 추가하기" +msgstr "버스 추가" #: editor/editor_audio_buses.cpp msgid "Add a new Audio Bus to this layout." -msgstr "ì´ ë ˆì´ì•„ì›ƒì— ìƒˆ 오디오 버스를 추가해요." +msgstr "ì´ ë ˆì´ì•„ì›ƒì— ìƒˆ 오디오 버스를 추가합니다." #: editor/editor_audio_buses.cpp editor/editor_properties.cpp #: editor/plugins/animation_player_editor_plugin.cpp editor/property_editor.cpp @@ -1380,15 +1384,15 @@ msgstr "불러오기" #: editor/editor_audio_buses.cpp msgid "Load an existing Bus Layout." -msgstr "존재하는 버스 ë ˆì´ì•„ì›ƒì„ ë¶ˆëŸ¬ì™€ìš”." +msgstr "ê¸°ì¡´ì— ìžˆë˜ ë²„ìŠ¤ ë ˆì´ì•„ì›ƒì„ ë¶ˆëŸ¬ì˜µë‹ˆë‹¤." #: editor/editor_audio_buses.cpp msgid "Save As" -msgstr "다른 ì´ë¦„으로 ì €ìž¥í•˜ê¸°" +msgstr "다른 ì´ë¦„으로 ì €ìž¥" #: editor/editor_audio_buses.cpp msgid "Save this Bus Layout to a file." -msgstr "ì´ ë²„ìŠ¤ ë ˆì´ì•„ì›ƒì„ íŒŒì¼ë¡œ ì €ìž¥í•´ìš”..." +msgstr "ì´ ë²„ìŠ¤ ë ˆì´ì•„ì›ƒì„ íŒŒì¼ë¡œ ì €ìž¥í•©ë‹ˆë‹¤." #: editor/editor_audio_buses.cpp editor/import_dock.cpp msgid "Load Default" @@ -1396,15 +1400,15 @@ msgstr "기본값 불러오기" #: editor/editor_audio_buses.cpp msgid "Load the default Bus Layout." -msgstr "기본 버스 ë ˆì´ì•„ì›ƒì„ ë¶ˆëŸ¬ì™€ìš”." +msgstr "기본 버스 ë ˆì´ì•„ì›ƒì„ ë¶ˆëŸ¬ì˜µë‹ˆë‹¤." #: editor/editor_audio_buses.cpp msgid "Create a new Bus Layout." -msgstr "새로운 버스 ë ˆì´ì•„ì›ƒì„ ë§Œë“¤ì–´ìš”." +msgstr "새로운 버스 ë ˆì´ì•„ì›ƒì„ ë§Œë“니다." #: editor/editor_autoload_settings.cpp msgid "Invalid name." -msgstr "ìž˜ëª»ëœ ì´ë¦„ì´ì—ìš”." +msgstr "올바르지 ì•Šì€ ì´ë¦„입니다." #: editor/editor_autoload_settings.cpp msgid "Valid characters:" @@ -1412,23 +1416,23 @@ msgstr "올바른 문ìž:" #: editor/editor_autoload_settings.cpp msgid "Must not collide with an existing engine class name." -msgstr "ì—”ì§„ì— ìžˆëŠ” í´ëž˜ìФ ì´ë¦„ê³¼ 같으면 안ë¼ìš”." +msgstr "ì—”ì§„ì— ì´ë¯¸ 있는 í´ëž˜ìФ ì´ë¦„ê³¼ 겹치지 않아야 합니다." #: editor/editor_autoload_settings.cpp msgid "Must not collide with an existing built-in type name." -msgstr "내장으로 있는 ìœ í˜•ì˜ ì´ë¦„ê³¼ 같으면 안ë¼ìš”." +msgstr "기본 ìžë£Œí˜•ê³¼ ì´ë¦„ê³¼ 겹치지 않아야 합니다." #: editor/editor_autoload_settings.cpp msgid "Must not collide with an existing global constant name." -msgstr "ì „ì—으로 있는 ìƒìˆ˜ ì´ë¦„ê³¼ 같으면 안ë¼ìš”." +msgstr "ì „ì— ìƒìˆ˜ì™€ ì´ë¦„ì´ ê²¹ì¹˜ì§€ 않아야 합니다." #: editor/editor_autoload_settings.cpp msgid "Keyword cannot be used as an autoload name." -msgstr "키워드를 ì˜¤í† ë¡œë“œ ì´ë¦„으로 쓸 수 없어요." +msgstr "키워드를 ì˜¤í† ë¡œë“œ ì´ë¦„으로 ì‚¬ìš©í• ìˆ˜ 없습니다." #: editor/editor_autoload_settings.cpp msgid "Autoload '%s' already exists!" -msgstr "ì˜¤í† ë¡œë“œ '%s'ì´(ê°€) ì´ë¯¸ 있어요!" +msgstr "ì˜¤í† ë¡œë“œ '%s'ì´(ê°€) ì´ë¯¸ 있습니다!" #: editor/editor_autoload_settings.cpp msgid "Rename Autoload" @@ -1436,15 +1440,15 @@ msgstr "ì˜¤í† ë¡œë“œ ì´ë¦„ 바꾸기" #: editor/editor_autoload_settings.cpp msgid "Toggle AutoLoad Globals" -msgstr "ì˜¤í† ë¡œë“œ ì „ì— í† ê¸€" +msgstr "ì „ì— ì˜¤í† ë¡œë“œ í† ê¸€" #: editor/editor_autoload_settings.cpp msgid "Move Autoload" -msgstr "ì˜¤í† ë¡œë“œ ì´ë™í•˜ê¸°" +msgstr "ì˜¤í† ë¡œë“œ ì´ë™" #: editor/editor_autoload_settings.cpp msgid "Remove Autoload" -msgstr "ì˜¤í† ë¡œë“œ ì‚ì œí•˜ê¸°" +msgstr "ì˜¤í† ë¡œë“œ ì‚ì œ" #: editor/editor_autoload_settings.cpp msgid "Enable" @@ -1452,23 +1456,23 @@ msgstr "켜기" #: editor/editor_autoload_settings.cpp msgid "Rearrange Autoloads" -msgstr "ì˜¤í† ë¡œë“œ 다시 ì •ë ¬í•˜ê¸°" +msgstr "ì˜¤í† ë¡œë“œ 다시 ì •ë ¬" #: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp msgid "Invalid path." -msgstr "ìž˜ëª»ëœ ê²½ë¡œì´ì—ìš”." +msgstr "올바르지 ì•Šì€ ê²½ë¡œìž…ë‹ˆë‹¤." #: editor/editor_autoload_settings.cpp editor/script_create_dialog.cpp msgid "File does not exist." -msgstr "파ì¼ì´ 없어요." +msgstr "파ì¼ì´ 존재하지 않습니다." #: editor/editor_autoload_settings.cpp msgid "Not in resource path." -msgstr "리소스 경로가 아니ì—ìš”." +msgstr "리소스 ê²½ë¡œì— ì—†ìŠµë‹ˆë‹¤." #: editor/editor_autoload_settings.cpp msgid "Add AutoLoad" -msgstr "ì˜¤í† ë¡œë“œ 추가하기" +msgstr "ì˜¤í† ë¡œë“œ 추가" #: editor/editor_autoload_settings.cpp editor/editor_file_dialog.cpp #: editor/editor_plugin_settings.cpp @@ -1535,30 +1539,30 @@ msgstr "ì´ë¦„:" #: editor/editor_dir_dialog.cpp editor/editor_file_dialog.cpp #: editor/filesystem_dock.cpp scene/gui/file_dialog.cpp msgid "Could not create folder." -msgstr "í´ë”를 만들 수 없어요." +msgstr "í´ë”를 만들 수 없습니다." #: editor/editor_dir_dialog.cpp msgid "Choose" -msgstr "ì„ íƒí•˜ê¸°" +msgstr "ì„ íƒ" #: editor/editor_export.cpp msgid "Storing File:" -msgstr "íŒŒì¼ ì €ìž¥í•˜ê¸°:" +msgstr "ì €ìž¥í•˜ë ¤ëŠ” 파ì¼:" #: editor/editor_export.cpp msgid "No export template found at the expected path:" -msgstr "ì˜ˆìƒ ê²½ë¡œì—서 내보낸 í…œí”Œë¦¿ì„ ì°¾ì„ ìˆ˜ 없어요:" +msgstr "ì˜ˆìƒ ê²½ë¡œì—서 내보내기 í…œí”Œë¦¿ì„ ì°¾ì„ ìˆ˜ 없습니다:" #: editor/editor_export.cpp msgid "Packing" -msgstr "í¬ìž¥í•˜ê¸°" +msgstr "묶는 중" #: editor/editor_export.cpp msgid "" "Target platform requires 'ETC' texture compression for GLES2. Enable 'Import " "Etc' in Project Settings." msgstr "" -"ëŒ€ìƒ í”Œëž«í¼ì—서는 GLES2 ìš© 'ETC' í…스처 ì••ì¶•ì´ í•„ìš”í•´ìš”. 프로ì 트 ì„¤ì •ì—서 " +"ëŒ€ìƒ í”Œëž«í¼ì—서 GLES2 ìš© 'ETC' í…스처 ì••ì¶•ì´ í•„ìš”í•©ë‹ˆë‹¤. 프로ì 트 ì„¤ì •ì—서 " "'Import Etc' ì„¤ì •ì„ ì¼œì„¸ìš”." #: editor/editor_export.cpp @@ -1566,7 +1570,7 @@ msgid "" "Target platform requires 'ETC2' texture compression for GLES3. Enable " "'Import Etc 2' in Project Settings." msgstr "" -"ëŒ€ìƒ í”Œëž«í¼ì—서는 GLES3 ìš© 'ETC2' í…스처 ì••ì¶•ì´ í•„ìš”í•´ìš”. 프로ì 트 ì„¤ì •ì—서 " +"ëŒ€ìƒ í”Œëž«í¼ì—서 GLES3 ìš© 'ETC2' í…스처 ì••ì¶•ì´ í•„ìš”í•©ë‹ˆë‹¤. 프로ì 트 ì„¤ì •ì—서 " "'Import Etc 2' ì„¤ì •ì„ ì¼œì„¸ìš”." #: editor/editor_export.cpp @@ -1576,29 +1580,29 @@ msgid "" "Enable 'Import Etc' in Project Settings, or disable 'Driver Fallback " "Enabled'." msgstr "" -"ëŒ€ìƒ í”Œëž«í¼ì€ 드ë¼ì´ë²„ê°€ GLES2로 í´ë°±í•˜ê¸° 위해 'ETC' í…스처 ì••ì¶•ì´ í•„ìš”í•´ìš”. " -"프로ì 트 ì„¤ì •ì—서 'Import Etc' ì„¤ì •ì„ ì¼œê±°ë‚˜, 'Driver Fallback Enabled' ì„¤ì •" -"ì„ ë„세요." +"ëŒ€ìƒ í”Œëž«í¼ì—서 드ë¼ì´ë²„ê°€ GLES2로 í´ë°±í•˜ê¸° 위해 'ETC' í…스처 ì••ì¶•ì´ í•„ìš”í•©ë‹ˆ" +"다. 프로ì 트 ì„¤ì •ì—서 'Import Etc' ì„¤ì •ì„ ì¼œê±°ë‚˜, 'Driver Fallback Enabled' " +"ì„¤ì •ì„ ë„세요." #: editor/editor_export.cpp platform/android/export/export.cpp #: platform/iphone/export/export.cpp platform/javascript/export/export.cpp #: platform/osx/export/export.cpp platform/uwp/export/export.cpp msgid "Custom debug template not found." -msgstr "맞춤 디버그 í…œí”Œë¦¿ì„ ì°¾ì„ ìˆ˜ 없어요." +msgstr "ì‚¬ìš©ìž ì§€ì • 디버그 í…œí”Œë¦¿ì„ ì°¾ì„ ìˆ˜ 없습니다." #: editor/editor_export.cpp platform/android/export/export.cpp #: platform/iphone/export/export.cpp platform/javascript/export/export.cpp #: platform/osx/export/export.cpp platform/uwp/export/export.cpp msgid "Custom release template not found." -msgstr "맞춤 출시 í…œí”Œë¦¿ì„ ì°¾ì„ ìˆ˜ 없어요." +msgstr "ì‚¬ìš©ìž ì§€ì • 출시 í…œí”Œë¦¿ì„ ì°¾ì„ ìˆ˜ 없습니다." #: editor/editor_export.cpp platform/javascript/export/export.cpp msgid "Template file not found:" -msgstr "템플릿 파ì¼ì„ ì°¾ì„ ìˆ˜ 없어요:" +msgstr "템플릿 파ì¼ì„ ì°¾ì„ ìˆ˜ 없습니다:" #: editor/editor_export.cpp msgid "On 32-bit exports the embedded PCK cannot be bigger than 4 GiB." -msgstr "32비트 환경ì—서는 4 GiB보다 í° ë‚´ìž¥ëœ PCK를 내보낼 수 없어요." +msgstr "32비트 환경ì—서는 4 GiB보다 í° ë‚´ìž¥ PCK를 내보낼 수 없습니다." #: editor/editor_feature_profile.cpp msgid "3D Editor" @@ -1614,7 +1618,7 @@ msgstr "ì• ì…‹ ë¼ì´ë¸ŒëŸ¬ë¦¬" #: editor/editor_feature_profile.cpp msgid "Scene Tree Editing" -msgstr "씬 트리 편집하기" +msgstr "씬 트리 편집" #: editor/editor_feature_profile.cpp msgid "Import Dock" @@ -1622,7 +1626,7 @@ msgstr "ë… ê°€ì ¸ì˜¤ê¸°" #: editor/editor_feature_profile.cpp msgid "Node Dock" -msgstr "노드 ë…" +msgstr "노드 ë„킹" #: editor/editor_feature_profile.cpp msgid "FileSystem and Import Docks" @@ -1630,15 +1634,15 @@ msgstr "íŒŒì¼ ì‹œìŠ¤í…œê³¼ ê°€ì ¸ì˜¤ê¸° ë…" #: editor/editor_feature_profile.cpp msgid "Erase profile '%s'? (no undo)" -msgstr "프로필 '%s'ì„(를) 지울까요? (ë˜ëŒë¦´ 수 없어요)" +msgstr "프로필 '%s'ì„(를) 지울까요? (ë˜ëŒë¦´ 수 없습니다)" #: editor/editor_feature_profile.cpp msgid "Profile must be a valid filename and must not contain '.'" -msgstr "프로필ì—는 올바른 íŒŒì¼ ì´ë¦„ì´ë©´ì„œ, '.'ì´ ì—†ì–´ì•¼ í•´ìš”" +msgstr "프로필 ì´ë¦„ì€ '.' ì´ ì—†ëŠ” 올바른 íŒŒì¼ ì´ë¦„ì´ì–´ì•¼ 합니다" #: editor/editor_feature_profile.cpp msgid "Profile with this name already exists." -msgstr "ì´ ì´ë¦„으로 ëœ í”„ë¡œí•„ì´ ì´ë¯¸ 있어요." +msgstr "ì´ ì´ë¦„으로 ëœ í”„ë¡œí•„ì´ ì´ë¯¸ 있습니다." #: editor/editor_feature_profile.cpp msgid "(Editor Disabled, Properties Disabled)" @@ -1658,7 +1662,7 @@ msgstr "í´ëž˜ìФ ì„¤ì •:" #: editor/editor_feature_profile.cpp msgid "Enable Contextual Editor" -msgstr "ë§¥ë½ íŽ¸ì§‘ê¸° 켜기" +msgstr "ìƒí™©ë³„ 편집기 켜기" #: editor/editor_feature_profile.cpp msgid "Enabled Properties:" @@ -1674,15 +1678,15 @@ msgstr "켜진 í´ëž˜ìФ:" #: editor/editor_feature_profile.cpp msgid "File '%s' format is invalid, import aborted." -msgstr "íŒŒì¼ '%s' 형ì‹ì´ 잘못ëì–´ìš”. ê°€ì ¸ì˜¬ 수 없어요." +msgstr "íŒŒì¼ '%s' 형ì‹ì´ 올바르지 않습니다. ê°€ì ¸ì˜¤ê¸°ë¥¼ 중단합니다." #: editor/editor_feature_profile.cpp msgid "" "Profile '%s' already exists. Remove it first before importing, import " "aborted." msgstr "" -"프로필 '%s'ì´(ê°€) ì´ë¯¸ 있어요. ê°€ì ¸ì˜¤ê¸° ì „ì— ì´ë¯¸ 있는 í”„ë¡œí•„ì„ ë¨¼ì € ì‚ì œí•˜ì„¸" -"ìš”. ê°€ì ¸ì˜¬ 수 없어요." +"프로필 '%s'ì´(ê°€) ì´ë¯¸ 있습니다. ê°€ì ¸ì˜¤ê¸° ì „ì— ì´ë¯¸ 있는 í”„ë¡œí•„ì„ ë¨¼ì € ì‚ì œí•˜" +"세요. ê°€ì ¸ì˜¤ê¸°ë¥¼ 중단합니다." #: editor/editor_feature_profile.cpp msgid "Error saving profile to path: '%s'." @@ -1698,7 +1702,7 @@ msgstr "현재 프로필:" #: editor/editor_feature_profile.cpp msgid "Make Current" -msgstr "í˜„ìž¬ì˜ ê²ƒìœ¼ë¡œ 만들기" +msgstr "현재 프로필로 ì„¤ì •" #: editor/editor_feature_profile.cpp #: editor/plugins/animation_player_editor_plugin.cpp @@ -1745,23 +1749,23 @@ msgstr "프로필 내보내기" #: editor/editor_feature_profile.cpp msgid "Manage Editor Feature Profiles" -msgstr "편집기 기능 프로필 관리하기" +msgstr "편집기 기능 프로필 관리" #: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp msgid "Select Current Folder" -msgstr "현재 í´ë” ì„ íƒí•˜ê¸°" +msgstr "현재 í´ë” ì„ íƒ" #: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp msgid "File Exists, Overwrite?" -msgstr "파ì¼ì´ ì´ë¯¸ 있어요. ë®ì–´ì“¸ê¹Œìš”?" +msgstr "파ì¼ì´ ì´ë¯¸ 있습니다. ë®ì–´ì“¸ê¹Œìš”?" #: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp msgid "Select This Folder" -msgstr "ì´ í´ë” ì„ íƒí•˜ê¸°" +msgstr "ì´ í´ë” ì„ íƒ" #: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp msgid "Copy Path" -msgstr "경로 복사하기" +msgstr "경로 복사" #: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp msgid "Open in File Manager" @@ -1810,23 +1814,23 @@ msgstr "ë””ë ‰í† ë¦¬ ë˜ëŠ” íŒŒì¼ ì—´ê¸°" #: editor/plugins/animation_player_editor_plugin.cpp #: editor/plugins/script_editor_plugin.cpp scene/gui/file_dialog.cpp msgid "Save" -msgstr "ì €ìž¥í•˜ê¸°" +msgstr "ì €ìž¥" #: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp msgid "Save a File" -msgstr "파ì¼ë¡œ ì €ìž¥í•˜ê¸°" +msgstr "파ì¼ë¡œ ì €ìž¥" #: editor/editor_file_dialog.cpp msgid "Go Back" -msgstr "뒤로 가기" +msgstr "뒤로" #: editor/editor_file_dialog.cpp msgid "Go Forward" -msgstr "앞으로 가기" +msgstr "앞으로" #: editor/editor_file_dialog.cpp msgid "Go Up" -msgstr "위로 가기" +msgstr "ìƒìœ„로" #: editor/editor_file_dialog.cpp msgid "Toggle Hidden Files" @@ -1846,43 +1850,43 @@ msgstr "경로 í¬ì»¤ìФ" #: editor/editor_file_dialog.cpp msgid "Move Favorite Up" -msgstr "ì¦ê²¨ì°¾ê¸° 위로 ì´ë™í•˜ê¸°" +msgstr "ì¦ê²¨ì°¾ê¸° 위로 ì´ë™" #: editor/editor_file_dialog.cpp msgid "Move Favorite Down" -msgstr "ì¦ê²¨ì°¾ê¸° 아래로 ì´ë™í•˜ê¸°" +msgstr "ì¦ê²¨ì°¾ê¸° 아래로 ì´ë™" #: editor/editor_file_dialog.cpp msgid "Go to previous folder." -msgstr "ì´ì „ í´ë”로 ì´ë™í•´ìš”." +msgstr "ì´ì „ í´ë”로 ì´ë™í•©ë‹ˆë‹¤." #: editor/editor_file_dialog.cpp msgid "Go to next folder." -msgstr "ë‹¤ìŒ í´ë”로 ì´ë™í•´ìš”." +msgstr "ë‹¤ìŒ í´ë”로 ì´ë™í•©ë‹ˆë‹¤." #: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp msgid "Go to parent folder." -msgstr "부모 í´ë”로 ì´ë™í•´ìš”." +msgstr "부모 í´ë”로 ì´ë™í•©ë‹ˆë‹¤." #: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp msgid "Refresh files." -msgstr "파ì¼ì„ ìƒˆë¡œê³ ì¹¨í•´ìš”." +msgstr "파ì¼ì„ ìƒˆë¡œê³ ì¹¨í•©ë‹ˆë‹¤." #: editor/editor_file_dialog.cpp msgid "(Un)favorite current folder." -msgstr "현재 í´ë”를 ì¦ê²¨ì°¾ê¸°í•˜ê±°ë‚˜ 하지 않아요." +msgstr "현재 í´ë”를 ì¦ê²¨ì°¾ê¸° ì„¤ì •/ì¦ê²¨ì°¾ê¸° í•´ì œí•©ë‹ˆë‹¤." #: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp msgid "Toggle the visibility of hidden files." -msgstr "숨긴 파ì¼ì˜ 표시 여부 í† ê¸€." +msgstr "숨긴 파ì¼ì˜ 표시 여부를 í† ê¸€í•©ë‹ˆë‹¤." #: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp msgid "View items as a grid of thumbnails." -msgstr "ì¸ë„¤ì¼ 바둑íŒìœ¼ë¡œ 보기." +msgstr "í•ëª©ì„ ë°”ë‘‘íŒ í˜•ì‹ì˜ ì¸ë„¤ì¼ë¡œ 봅니다." #: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp msgid "View items as a list." -msgstr "목ë¡ìœ¼ë¡œ 보기." +msgstr "í•ëª©ì„ ëª©ë¡ í˜•ì‹ìœ¼ë¡œ 봅니다." #: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp msgid "Directories & Files:" @@ -1900,17 +1904,17 @@ msgstr "파ì¼:" #: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp msgid "Must use a valid extension." -msgstr "올바른 확장ìžë¥¼ 사용해야 í•´ìš”." +msgstr "올바른 확장ìžë¥¼ 사용해야 합니다." #: editor/editor_file_system.cpp msgid "ScanSources" -msgstr "소스 조사" +msgstr "소스 스캔중" #: editor/editor_file_system.cpp msgid "" "There are multiple importers for different types pointing to file %s, import " "aborted" -msgstr "íŒŒì¼ %sì„(를) 가리키는 다른 ìœ í˜•ì˜ ê°€ì ¸ì˜¤ê¸°ê°€ ë§Žì•„ìš”. ê°€ì ¸ì˜¬ 수 없어요" +msgstr "íŒŒì¼ % ì— í•´ë‹¹í•˜ëŠ” ê°€ì ¸ì˜¤ê¸° í¬ë§·ì´ 여러 종류입니다. ê°€ì ¸ì˜¤ê¸° 중단ë¨" #: editor/editor_file_system.cpp msgid "(Re)Importing Assets" @@ -1947,7 +1951,7 @@ msgstr "ì†ì„±" #: editor/editor_help.cpp msgid "override:" -msgstr "다시 ì •ì˜í•˜ê¸°:" +msgstr "오버ë¼ì´ë“œ:" #: editor/editor_help.cpp msgid "default:" @@ -1963,11 +1967,11 @@ msgstr "테마 ì†ì„±" #: editor/editor_help.cpp msgid "Enumerations" -msgstr "ì—´ê±°" +msgstr "열거형" #: editor/editor_help.cpp msgid "Constants" -msgstr "ìƒìˆ˜(Constant)" +msgstr "ìƒìˆ˜" #: editor/editor_help.cpp msgid "Property Descriptions" @@ -1982,8 +1986,8 @@ msgid "" "There is currently no description for this property. Please help us by " "[color=$color][url=$url]contributing one[/url][/color]!" msgstr "" -"현재 ì´ ì†ì„±ì˜ ì„¤ëª…ì´ ì—†ì–´ìš”. [color=$color][url=$url]ê´€ë ¨ ì •ë³´ë¥¼ 기여하여[/" -"url][/color] ê°œì„ í• ìˆ˜ 있ë„ë¡ ë„와주세요!" +"현재 ì´ ì†ì„±ì˜ ì„¤ëª…ì´ ì—†ìŠµë‹ˆë‹¤. [color=$color][url=$url]ê´€ë ¨ ì •ë³´ë¥¼ 기여하여" +"[/url][/color] ê°œì„ í• ìˆ˜ 있ë„ë¡ ë„와주세요!" #: editor/editor_help.cpp msgid "Method Descriptions" @@ -1994,8 +1998,8 @@ msgid "" "There is currently no description for this method. Please help us by [color=" "$color][url=$url]contributing one[/url][/color]!" msgstr "" -"현재 ì´ ë©”ì„œë“œì˜ ì„¤ëª…ì´ ì—†ì–´ìš”. [color=$color][url=$url]ê´€ë ¨ ì •ë³´ë¥¼ 기여하여" -"[/url][/color] ê°œì„ í• ìˆ˜ 있ë„ë¡ ë„와주세요!" +"현재 ì´ ë©”ì„œë“œì˜ ì„¤ëª…ì´ ì—†ìŠµë‹ˆë‹¤. [color=$color][url=$url]ê´€ë ¨ ì •ë³´ë¥¼ 기여하" +"ì—¬[/url][/color] ê°œì„ í• ìˆ˜ 있ë„ë¡ ë„와주세요!" #: editor/editor_help_search.cpp editor/editor_node.cpp #: editor/plugins/script_editor_plugin.cpp @@ -2012,31 +2016,31 @@ msgstr "계층 구조 ë³´ì´ê¸°" #: editor/editor_help_search.cpp msgid "Display All" -msgstr "ëª¨ë‘ í‘œì‹œí•˜ê¸°" +msgstr "ëª¨ë‘ í‘œì‹œ" #: editor/editor_help_search.cpp msgid "Classes Only" -msgstr "í´ëž˜ìŠ¤ë§Œ 표시하기" +msgstr "í´ëž˜ìŠ¤ë§Œ 표시" #: editor/editor_help_search.cpp msgid "Methods Only" -msgstr "메서드만 표시하기" +msgstr "메서드만 표시" #: editor/editor_help_search.cpp msgid "Signals Only" -msgstr "시그ë„ë§Œ 표시하기" +msgstr "시그ë„ë§Œ 표시" #: editor/editor_help_search.cpp msgid "Constants Only" -msgstr "ìƒìˆ˜ë§Œ 표시하기" +msgstr "ìƒìˆ˜ë§Œ 표시" #: editor/editor_help_search.cpp msgid "Properties Only" -msgstr "ì†ì„±ë§Œ 표시하기" +msgstr "ì†ì„±ë§Œ 표시" #: editor/editor_help_search.cpp msgid "Theme Properties Only" -msgstr "테마 ì†ì„±ë§Œ 표시하기" +msgstr "테마 ì†ì„±ë§Œ 표시" #: editor/editor_help_search.cpp msgid "Member Type" @@ -2056,7 +2060,7 @@ msgstr "시그ë„" #: editor/editor_help_search.cpp editor/plugins/theme_editor_plugin.cpp msgid "Constant" -msgstr "ë¹„ì„ í˜•" +msgstr "ìƒìˆ˜" #: editor/editor_help_search.cpp msgid "Property" @@ -2076,7 +2080,7 @@ msgstr "ì„¤ì •" #: editor/editor_inspector.cpp msgid "Set Multiple:" -msgstr "여러 ì„¤ì •:" +msgstr "다수 ì„¤ì •:" #: editor/editor_log.cpp msgid "Output:" @@ -2084,7 +2088,7 @@ msgstr "ì¶œë ¥:" #: editor/editor_log.cpp editor/plugins/tile_map_editor_plugin.cpp msgid "Copy Selection" -msgstr "ì„ íƒ í•목 복사하기" +msgstr "ì„ íƒ í•목 복사" #: editor/editor_log.cpp editor/editor_network_profiler.cpp #: editor/editor_profiler.cpp editor/editor_properties.cpp @@ -2103,12 +2107,12 @@ msgstr "ì¶œë ¥ 지우기" #: editor/editor_network_profiler.cpp editor/editor_node.cpp #: editor/editor_profiler.cpp msgid "Stop" -msgstr "중단하기" +msgstr "중단" #: editor/editor_network_profiler.cpp editor/editor_profiler.cpp #: editor/plugins/animation_state_machine_editor.cpp editor/rename_dialog.cpp msgid "Start" -msgstr "시작하기" +msgstr "시작" #: editor/editor_network_profiler.cpp msgid "%s/s" @@ -2148,12 +2152,12 @@ msgstr "새 ì°½" #: editor/editor_node.cpp msgid "Imported resources can't be saved." -msgstr "ê°€ì ¸ì˜¨ 리소스를 ì €ìž¥í• ìˆ˜ 없어요." +msgstr "ê°€ì ¸ì˜¨ 리소스를 ì €ìž¥í• ìˆ˜ 없습니다." #: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp #: scene/gui/dialogs.cpp msgid "OK" -msgstr "네" +msgstr "확ì¸" #: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp msgid "Error saving resource!" @@ -2164,16 +2168,16 @@ msgid "" "This resource can't be saved because it does not belong to the edited scene. " "Make it unique first." msgstr "" -"ì´ ë¦¬ì†ŒìŠ¤ëŠ” 편집 ì¤‘ì¸ ì”¬ì— ì†í•œ ê²ƒì´ ì•„ë‹ˆë¼ì„œ ì €ìž¥í• ìˆ˜ 없어요. ì €ìž¥í•˜ê¸° ì „" +"ì´ ë¦¬ì†ŒìŠ¤ëŠ” 편집 ì¤‘ì¸ ì”¬ì— ì†í•œ ê²ƒì´ ì•„ë‹ˆë¼ì„œ ì €ìž¥í• ìˆ˜ 없습니다. ì €ìž¥í•˜ê¸° ì „" "ì— ë¨¼ì € 리소스를 ìœ ì¼í•˜ê²Œ 만드세요." #: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp msgid "Save Resource As..." -msgstr "리소스를 다른 ì´ë¦„으로 ì €ìž¥í•˜ê¸°..." +msgstr "리소스를 다른 ì´ë¦„으로 ì €ìž¥..." #: editor/editor_node.cpp msgid "Can't open file for writing:" -msgstr "파ì¼ì„ ìž‘ì„±í•˜ë ¤ê³ ì—´ 수 ì—†ìŒ:" +msgstr "파ì¼ì„ 쓰기 모드로 ì—´ 수 ì—†ìŒ:" #: editor/editor_node.cpp msgid "Requested file format unknown:" @@ -2185,7 +2189,7 @@ msgstr "ì €ìž¥ 중 오류." #: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp msgid "Can't open '%s'. The file could have been moved or deleted." -msgstr "'%s'ì„(를) ì—´ 수 없어요. 파ì¼ì´ ì´ë™í–ˆê±°ë‚˜ ì‚ì œëœ ëª¨ì–‘ì´ì—ìš”." +msgstr "'%s'ì„(를) ì—´ 수 없습니다. 파ì¼ì´ ì´ë™í–ˆê±°ë‚˜ ì‚ì œë˜ì—ˆì„ 수 있습니다." #: editor/editor_node.cpp msgid "Error while parsing '%s'." @@ -2197,7 +2201,7 @@ msgstr "예기치 못한 '%s' 파ì¼ì˜ ë." #: editor/editor_node.cpp msgid "Missing '%s' or its dependencies." -msgstr "'%s' ë˜ëŠ” ì´ê²ƒì˜ ì¢…ì† í•ëª©ì´ ì—†ì–´ìš”." +msgstr "'%s' ë˜ëŠ” ì´ê²ƒì˜ ì¢…ì† í•ëª©ì´ ì—†ìŠµë‹ˆë‹¤." #: editor/editor_node.cpp msgid "Error while loading '%s'." @@ -2205,26 +2209,26 @@ msgstr "'%s' 불러오는 중 오류." #: editor/editor_node.cpp msgid "Saving Scene" -msgstr "씬 ì €ìž¥í•˜ê¸°" +msgstr "씬 ì €ìž¥ 중" #: editor/editor_node.cpp msgid "Analyzing" -msgstr "ë¶„ì„하기" +msgstr "ë¶„ì„ ì¤‘" #: editor/editor_node.cpp msgid "Creating Thumbnail" -msgstr "ì¸ë„¤ì¼ 만들기" +msgstr "ì¸ë„¤ì¼ 만드는 중" #: editor/editor_node.cpp msgid "This operation can't be done without a tree root." -msgstr "ì´ ìž‘ì—…ì€ íŠ¸ë¦¬ 루트가 필요해요." +msgstr "ì´ ìž‘ì—…ì€ íŠ¸ë¦¬ 루트가 필요합니다." #: editor/editor_node.cpp msgid "" "This scene can't be saved because there is a cyclic instancing inclusion.\n" "Please resolve it and then attempt to save again." msgstr "" -"ì´ ì”¬ì—는 순환하는 ì¸ìŠ¤í„´ìŠ¤ë¥¼ í¬í•¨í•˜ê³ 있어서 ì €ìž¥í• ìˆ˜ 없어요.\n" +"ì´ ì”¬ì— ìˆœí™˜ ì¸ìŠ¤í„´ìŠ¤í™”ê°€ 있어서 ì €ìž¥í• ìˆ˜ 없습니다.\n" "ì´ë¥¼ 해결한 후 다시 ì €ìž¥í•´ë³´ì„¸ìš”." #: editor/editor_node.cpp @@ -2232,16 +2236,16 @@ msgid "" "Couldn't save scene. Likely dependencies (instances or inheritance) couldn't " "be satisfied." msgstr "" -"ì”¬ì„ ì €ìž¥í• ìˆ˜ 없어요. (ì¸ìŠ¤í„´ìŠ¤ ë˜ëŠ” ìƒì†ê³¼ ê°™ì€) ì¢…ì† ê´€ê³„ê°€ 만족스럽지 않" -"ì€ ëª¨ì–‘ì´ì—ìš”." +"ì”¬ì„ ì €ìž¥í• ìˆ˜ 없습니다. (ì¸ìŠ¤í„´ìŠ¤ ë˜ëŠ” ìƒì†ê³¼ ê°™ì€) ì¢…ì† ê´€ê³„ë¥¼ ì„±ë¦½í• ìˆ˜ ì—†" +"는 것 같습니다." #: editor/editor_node.cpp editor/scene_tree_dock.cpp msgid "Can't overwrite scene that is still open!" -msgstr "ì—´ë ¤ìžˆëŠ” ì”¬ì€ ë®ì–´ì“¸ 수 없어요!" +msgstr "ì—´ë ¤ìžˆëŠ” ì”¬ì€ ë®ì–´ì“¸ 수 없습니다!" #: editor/editor_node.cpp msgid "Can't load MeshLibrary for merging!" -msgstr "ë³‘í•©í• ë©”ì‹œ ë¼ì´ë¸ŒëŸ¬ë¦¬ë¥¼ 불러올 수 없어요!" +msgstr "ë³‘í•©í• ë©”ì‹œ ë¼ì´ë¸ŒëŸ¬ë¦¬ë¥¼ 불러올 수 없습니다!" #: editor/editor_node.cpp msgid "Error saving MeshLibrary!" @@ -2249,7 +2253,7 @@ msgstr "메시 ë¼ì´ë¸ŒëŸ¬ë¦¬ ì €ìž¥ 중 오류!" #: editor/editor_node.cpp msgid "Can't load TileSet for merging!" -msgstr "ë³‘í•©í• íƒ€ì¼ì…‹ì„ 불러올 수 없어요!" +msgstr "ë³‘í•©í• íƒ€ì¼ì…‹ì„ 불러올 수 없습니다!" #: editor/editor_node.cpp msgid "Error saving TileSet!" @@ -2261,15 +2265,15 @@ msgstr "ë ˆì´ì•„웃 ì €ìž¥ 중 오류!" #: editor/editor_node.cpp msgid "Default editor layout overridden." -msgstr "편집기 기본 ë ˆì´ì•„ì›ƒì´ ìƒˆë¡œ ì •ì˜ëì–´ìš”." +msgstr "기본 편집기 ë ˆì´ì•„ì›ƒì„ ë®ì–´ì”니다." #: editor/editor_node.cpp msgid "Layout name not found!" -msgstr "ë ˆì´ì•„웃 ì´ë¦„ì„ ì°¾ì„ ìˆ˜ 없어요!" +msgstr "ë ˆì´ì•„웃 ì´ë¦„ì„ ì°¾ì„ ìˆ˜ 없습니다!" #: editor/editor_node.cpp msgid "Restored default layout to base settings." -msgstr "기본 ë ˆì´ì•„ì›ƒì´ ì´ˆê¸° ì„¤ì •ìœ¼ë¡œ ëŒì•„왔어요." +msgstr "기본 ë ˆì´ì•„ì›ƒì„ ì´ˆê¸°í™”í•˜ì˜€ìŠµë‹ˆë‹¤." #: editor/editor_node.cpp msgid "" @@ -2277,7 +2281,7 @@ msgid "" "Please read the documentation relevant to importing scenes to better " "understand this workflow." msgstr "" -"ì´ ë¦¬ì†ŒìŠ¤ëŠ” ê°€ì ¸ì˜¨ ì”¬ì— ì†í•œ ê±°ë¼ íŽ¸ì§‘í• ìˆ˜ 없어요.\n" +"ì´ ë¦¬ì†ŒìŠ¤ëŠ” ê°€ì ¸ì˜¨ ì”¬ì— ì†í•œ 리소스ì´ë¯€ë¡œ íŽ¸ì§‘í• ìˆ˜ 없습니다.\n" "ì´ ì›Œí¬í”Œë¡œë¥¼ ì´í•´í•˜ë ¤ë©´ 씬 ê°€ì ¸ì˜¤ê¸°(Importing Scenes)와 ê´€ë ¨ëœ ë¬¸ì„œë¥¼ ì½ì–´ì£¼" "세요." @@ -2286,16 +2290,16 @@ msgid "" "This resource belongs to a scene that was instanced or inherited.\n" "Changes to it won't be kept when saving the current scene." msgstr "" -"ì´ ë¦¬ì†ŒìŠ¤ëŠ” ì¸ìŠ¤í„´ìŠ¤ë˜ê±°ë‚˜ ìƒì†ëœ ì”¬ì— ì†í•´ 있어요.\n" -"현재 ì”¬ì„ ì €ìž¥í•˜ëŠ” 경우 ë¦¬ì†ŒìŠ¤ì˜ ë³€ê²½ 사í•ì€ ì ìš©ë˜ì§€ ì•Šì„ ê±°ì˜ˆìš”." +"ì´ ë¦¬ì†ŒìŠ¤ëŠ” ì¸ìŠ¤í„´ìŠ¤ë˜ê±°ë‚˜ ìƒì†ëœ ì”¬ì— ì†í•´ 있습니다.\n" +"현재 ì”¬ì„ ì €ìž¥í•´ë„ ë¦¬ì†ŒìŠ¤ì˜ ë³€ê²½ 사í•ì´ ìœ ì§€ë˜ì§€ ì•Šì„ ê²ƒìž…ë‹ˆë‹¤." #: editor/editor_node.cpp msgid "" "This resource was imported, so it's not editable. Change its settings in the " "import panel and then re-import." msgstr "" -"ì´ ë¦¬ì†ŒìŠ¤ëŠ” ê°€ì ¸ì˜¨ 것ì´ë¼ íŽ¸ì§‘í• ìˆ˜ 없어요. ê°€ì ¸ì˜¤ê¸° 패ë„ì—서 ì„¤ì •ì„ ë³€ê²½í•œ " -"ë’¤ 다시 ê°€ì ¸ì˜¤ì„¸ìš”." +"ì´ ë¦¬ì†ŒìŠ¤ëŠ” ê°€ì ¸ì˜¨ 것ì´ë¯€ë¡œ íŽ¸ì§‘í• ìˆ˜ 없습니다. ê°€ì ¸ì˜¤ê¸° 패ë„ì—서 ì„¤ì •ì„ ë³€ê²½" +"한 ë’¤ 다시 ê°€ì ¸ì˜¤ì„¸ìš”." #: editor/editor_node.cpp msgid "" @@ -2304,8 +2308,8 @@ msgid "" "Please read the documentation relevant to importing scenes to better " "understand this workflow." msgstr "" -"ì´ ì”¬ì€ ê°€ì ¸ì˜¨ 것ì´ë¼ 변경 사í•ì€ ì ìš©ë˜ì§€ 않아요.\n" -"ì´ ì”¬ì„ ì¸ìŠ¤í„´ìŠ¤í•˜ê±°ë‚˜ ìƒì†í•˜ë©´ íŽ¸ì§‘í• ìˆ˜ 있어요.\n" +"ì´ ì”¬ì€ ê°€ì ¸ì˜¨ 것ì´ë¯€ë¡œ 변경 사í•ì´ ìœ ì§€ë˜ì§€ 않습니다.\n" +"ì´ ì”¬ì„ ì¸ìŠ¤í„´ìŠ¤í™”í•˜ê±°ë‚˜ ìƒì†í•˜ë©´ íŽ¸ì§‘í• ìˆ˜ 있습니다.\n" "ì´ ì›Œí¬í”Œë¡œë¥¼ ì´í•´í•˜ë ¤ë©´ 씬 ê°€ì ¸ì˜¤ê¸°(Importing Scenes)와 ê´€ë ¨ëœ ë¬¸ì„œë¥¼ ì½ì–´ì£¼" "세요." @@ -2315,20 +2319,20 @@ msgid "" "Please read the documentation relevant to debugging to better understand " "this workflow." msgstr "" -"ì›ê²© ê°ì²´ëŠ” 변경사í•ì´ ì ìš©ë˜ì§€ 않아요.\n" +"ì›ê²© ê°ì²´ëŠ” 변경사í•ì´ ì ìš©ë˜ì§€ 않습니다.\n" "ì´ ì›Œí¬í”Œë¡œë¥¼ ì´í•´í•˜ë ¤ë©´ 디버깅(Debugging)ê³¼ ê´€ë ¨ëœ ë¬¸ì„œë¥¼ ì½ì–´ì£¼ì„¸ìš”." #: editor/editor_node.cpp msgid "There is no defined scene to run." -msgstr "실행하기로 ì •ì˜í•œ ì”¬ì´ ì—†ì–´ìš”." +msgstr "ì‹¤í–‰í• ì”¬ì´ ì„¤ì •ë˜ì§€ 않았습니다." #: editor/editor_node.cpp msgid "Current scene was never saved, please save it prior to running." -msgstr "현재 ì”¬ì´ ì €ìž¥ë˜ì§€ 않았어요. 실행하기 ì „ì— ì €ìž¥í•´ì£¼ì„¸ìš”." +msgstr "현재 ì”¬ì´ ì•„ì§ ì €ìž¥ë˜ì§€ 않았습니다. 실행하기 ì „ì— ì €ìž¥í•´ì£¼ì„¸ìš”." #: editor/editor_node.cpp msgid "Could not start subprocess!" -msgstr "하위 프로세스를 ì‹œìž‘í• ìˆ˜ 없어요!" +msgstr "하위 프로세스를 ì‹œìž‘í• ìˆ˜ 없습니다!" #: editor/editor_node.cpp editor/filesystem_dock.cpp msgid "Open Scene" @@ -2352,7 +2356,7 @@ msgstr "ë¹ ë¥¸ 스í¬ë¦½íЏ 열기..." #: editor/editor_node.cpp msgid "Save & Close" -msgstr "ì €ìž¥í•˜ê¸° & 닫기" +msgstr "ì €ìž¥ & 닫기" #: editor/editor_node.cpp msgid "Save changes to '%s' before closing?" @@ -2360,15 +2364,15 @@ msgstr "닫기 ì „ì— '%s'ì— ë³€ê²½ 사í•ì„ ì €ìž¥í• ê¹Œìš”?" #: editor/editor_node.cpp msgid "Saved %s modified resource(s)." -msgstr "ìˆ˜ì •ëœ ë¦¬ì†ŒìŠ¤ %sì´(ê°€) ì €ìž¥ëì–´ìš”." +msgstr "ìˆ˜ì •ëœ ë¦¬ì†ŒìŠ¤ %sì„(를) ì €ìž¥í•˜ì˜€ìŠµë‹ˆë‹¤." #: editor/editor_node.cpp msgid "A root node is required to save the scene." -msgstr "ì”¬ì„ ì €ìž¥í•˜ë ¤ë©´ 루트 노드가 필요해요." +msgstr "ì”¬ì„ ì €ìž¥í•˜ë ¤ë©´ 루트 노드가 필요합니다." #: editor/editor_node.cpp msgid "Save Scene As..." -msgstr "ì”¬ì„ ë‹¤ë¥¸ ì´ë¦„으로 ì €ìž¥í•˜ê¸°..." +msgstr "ì”¬ì„ ë‹¤ë¥¸ ì´ë¦„으로 ì €ìž¥..." #: editor/editor_node.cpp msgid "No" @@ -2376,15 +2380,15 @@ msgstr "아니오" #: editor/editor_node.cpp msgid "Yes" -msgstr "네" +msgstr "예" #: editor/editor_node.cpp msgid "This scene has never been saved. Save before running?" -msgstr "ì´ ì”¬ì€ ì•„ì§ ì €ìž¥í•˜ì§€ 않았어요. 실행하기 ì „ì— ì €ìž¥í• ê¹Œìš”?" +msgstr "ì´ ì”¬ì€ ì•„ì§ ì €ìž¥í•˜ì§€ 않았습니다. 실행하기 ì „ì— ì €ìž¥í• ê¹Œìš”?" #: editor/editor_node.cpp editor/scene_tree_dock.cpp msgid "This operation can't be done without a scene." -msgstr "ì´ ìž‘ì—…ì—는 ì”¬ì´ í•„ìš”í•´ìš”." +msgstr "ì´ ìž‘ì—…ì—는 ì”¬ì´ í•„ìš”í•©ë‹ˆë‹¤." #: editor/editor_node.cpp msgid "Export Mesh Library" @@ -2392,7 +2396,7 @@ msgstr "메시 ë¼ì´ë¸ŒëŸ¬ë¦¬ 내보내기" #: editor/editor_node.cpp msgid "This operation can't be done without a root node." -msgstr "ì´ ìž‘ì—…ì—는 루트 노드가 필요해요." +msgstr "ì´ ìž‘ì—…ì—는 루트 노드가 필요합니다." #: editor/editor_node.cpp msgid "Export Tile Set" @@ -2400,15 +2404,15 @@ msgstr "타ì¼ì…‹ 내보내기" #: editor/editor_node.cpp msgid "This operation can't be done without a selected node." -msgstr "ì´ ìž‘ì—…ì—는 ì„ íƒí•œ 노드가 필요해요." +msgstr "ì´ ìž‘ì—…ì—는 ì„ íƒí•œ 노드가 필요합니다." #: editor/editor_node.cpp msgid "Current scene not saved. Open anyway?" -msgstr "현재 ì”¬ì„ ì €ìž¥í•˜ì§€ 않았어요. ë¬´ì‹œí•˜ê³ ì—´ê¹Œìš”?" +msgstr "현재 ì”¬ì„ ì €ìž¥í•˜ì§€ 않았습니다. ë¬´ì‹œí•˜ê³ ì—´ê¹Œìš”?" #: editor/editor_node.cpp msgid "Can't reload a scene that was never saved." -msgstr "ì €ìž¥í•˜ì§€ ì•Šì€ ì”¬ì€ ë‹¤ì‹œ 불러올 수 없어요." +msgstr "ì €ìž¥í•˜ì§€ ì•Šì€ ì”¬ì€ ìƒˆë¡œê³ ì¹¨í• ìˆ˜ 없습니다." #: editor/editor_node.cpp msgid "Revert" @@ -2416,15 +2420,15 @@ msgstr "ë˜ëŒë¦¬ê¸°" #: editor/editor_node.cpp msgid "This action cannot be undone. Revert anyway?" -msgstr "ì´ í–‰ë™ì€ ì·¨ì†Œí• ìˆ˜ 없어요. ë¬´ì‹œí•˜ê³ ë˜ëŒë¦´ê¹Œìš”?" +msgstr "ì´ í–‰ë™ì€ ì·¨ì†Œí• ìˆ˜ 없습니다. ë¬´ì‹œí•˜ê³ ë˜ëŒë¦´ê¹Œìš”?" #: editor/editor_node.cpp msgid "Quick Run Scene..." -msgstr "ë¹ ë¥¸ 씬 실행하기..." +msgstr "씬 ë¹ ë¥¸ 실행..." #: editor/editor_node.cpp msgid "Quit" -msgstr "종료하기" +msgstr "종료" #: editor/editor_node.cpp msgid "Exit the editor?" @@ -2436,7 +2440,7 @@ msgstr "프로ì 트 ë§¤ë‹ˆì €ë¥¼ 열까요?" #: editor/editor_node.cpp msgid "Save & Quit" -msgstr "ì €ìž¥í•˜ê¸° & 종료하기" +msgstr "ì €ìž¥ & 종료" #: editor/editor_node.cpp msgid "Save changes to the following scene(s) before quitting?" @@ -2451,12 +2455,12 @@ msgid "" "This option is deprecated. Situations where refresh must be forced are now " "considered a bug. Please report." msgstr "" -"ì´ ì„¤ì •ì€ ë” ì´ìƒ ì‚¬ìš©í• ìˆ˜ 없어요. ìƒˆë¡œê³ ì¹¨ì„ ê°•ì œë¡œ 해야 하는 ìƒí™©ì€ 버그" -"로 간주ë¼ìš”. ì‹ ê³ í•´ì£¼ì„¸ìš”." +"ì´ ì„¤ì •ì€ ì œê±°ë˜ì—ˆìŠµë‹ˆë‹¤. ê°•ì œë¡œ ìƒˆë¡œê³ ì¹¨í•´ì•¼ 하는 ìƒí™©ì€ ì´ì œ 버그입니다. ì‹ " +"ê³ í•´ì£¼ì„¸ìš”." #: editor/editor_node.cpp msgid "Pick a Main Scene" -msgstr "ë©”ì¸ ì”¬ì„ ê³ ë¥´ì„¸ìš”" +msgstr "ë©”ì¸ ì”¬ ì„ íƒ" #: editor/editor_node.cpp msgid "Close Scene" @@ -2469,7 +2473,8 @@ msgstr "ë‹«ì€ ì”¬ 다시 열기" #: editor/editor_node.cpp msgid "Unable to enable addon plugin at: '%s' parsing of config failed." msgstr "" -"ì• ë“œì˜¨ 플러그ì¸ì„ 여기서 켤 수 ì—†ìŒ: '%s' ì„¤ì •ì„ êµ¬ë¬¸ ë¶„ì„í• ìˆ˜ 없어요." +"ë‹¤ìŒ ê²½ë¡œì— ìžˆëŠ” ì• ë“œì˜¨ 플러그ì¸ì„ í™œì„±í™”í• ìˆ˜ ì—†ìŒ: '%s' ì„¤ì •ì˜ êµ¬ë¬¸ ë¶„ì„ì„ " +"실패했습니다." #: editor/editor_node.cpp msgid "Unable to find script field for addon plugin at: 'res://addons/%s'." @@ -2484,37 +2489,37 @@ msgid "" "Unable to load addon script from path: '%s' There seems to be an error in " "the code, please check the syntax." msgstr "" -"ë‹¤ìŒ ê²½ë¡œì—서 ì• ë“œì˜¨ 스í¬ë¦½íŠ¸ë¥¼ 불러올 수 ì—†ìŒ: '%s' ì½”ë“œì— ì˜¤ë¥˜ê°€ 있는 모양" -"ì´ì—ìš”. ë¬¸ë²•ì„ í™•ì¸í•´ë³´ì„¸ìš”." +"ë‹¤ìŒ ê²½ë¡œì—서 ì• ë“œì˜¨ 스í¬ë¦½íŠ¸ë¥¼ 불러올 수 ì—†ìŒ: '%s' ì½”ë“œì— ì˜¤ë¥˜ê°€ 있는 것 ê°™" +"습니다. ë¬¸ë²•ì„ í™•ì¸í•´ë³´ì„¸ìš”." #: editor/editor_node.cpp msgid "" "Unable to load addon script from path: '%s' Base type is not EditorPlugin." msgstr "" "ë‹¤ìŒ ê²½ë¡œì—서 ì• ë“œì˜¨ 스í¬ë¦½íŠ¸ë¥¼ 불러올 수 ì—†ìŒ: '%s' 기본 ìœ í˜•ì´ EditorPlugin" -"ì´ ì•„ë‹ˆì—ìš”." +"ì´ ì•„ë‹™ë‹ˆë‹¤." #: editor/editor_node.cpp msgid "Unable to load addon script from path: '%s' Script is not in tool mode." msgstr "" -"ë‹¤ìŒ ê²½ë¡œì—서 ì• ë“œì˜¨ 스í¬ë¦½íŠ¸ë¥¼ 불러올 수 ì—†ìŒ: '%s' 스í¬ë¦½íŠ¸ê°€ Tool 모드가 " -"아니ì—ìš”." +"ë‹¤ìŒ ê²½ë¡œì—서 ì• ë“œì˜¨ 스í¬ë¦½íŠ¸ë¥¼ 불러올 수 ì—†ìŒ: '%s' 스í¬ë¦½íŠ¸ê°€ tool 모드가 " +"아닙니다." #: editor/editor_node.cpp msgid "" "Scene '%s' was automatically imported, so it can't be modified.\n" "To make changes to it, a new inherited scene can be created." msgstr "" -"씬 '%s'ì„(를) ìžë™ìœ¼ë¡œ ê°€ì ¸ì™”ê¸° 때문ì—, ìˆ˜ì •í• ìˆ˜ 없어요.\n" -"ì´ ì”¬ì„ íŽ¸ì§‘í•˜ë ¤ë©´ 새로운 ìƒì† ì”¬ì„ ë§Œë“¤ì–´ì•¼ í•´ìš”." +"씬 '%s'ì„(를) ìžë™ìœ¼ë¡œ ê°€ì ¸ì™”ìœ¼ë¯€ë¡œ ìˆ˜ì •í• ìˆ˜ 없습니다.\n" +"ì´ ì”¬ì„ íŽ¸ì§‘í•˜ë ¤ë©´ 새로운 ìƒì† ì”¬ì„ ë§Œë“¤ì–´ì•¼ 합니다." #: editor/editor_node.cpp msgid "" "Error loading scene, it must be inside the project path. Use 'Import' to " "open the scene, then save it inside the project path." msgstr "" -"ì”¬ì„ ë¶ˆëŸ¬ì˜¤ëŠ” 중 오류가 ë°œìƒí–ˆì–´ìš”. ì”¬ì€ í”„ë¡œì 트 ê²½ë¡œì— ìžˆì„ ê±°ì˜ˆìš”. 'ê°€ì ¸ì˜¤" -"기'를 사용해서 ì”¬ì„ ì—´ê³ , ê·¸ ì”¬ì„ í”„ë¡œì 트 경로 ì•ˆì— ì €ìž¥í•˜ì„¸ìš”." +"ì”¬ì„ ë¶ˆëŸ¬ì˜¤ëŠ” 중 오류가 ë°œìƒí–ˆìŠµë‹ˆë‹¤. ì”¬ì€ í”„ë¡œì 트 경로 ë‚´ì— ìžˆì–´ì•¼ 합니다. " +"'ê°€ì ¸ì˜¤ê¸°'를 사용해서 ì”¬ì„ ì—´ê³ , ê·¸ ì”¬ì„ í”„ë¡œì 트 경로 ì•ˆì— ì €ìž¥í•˜ì„¸ìš”." #: editor/editor_node.cpp msgid "Scene '%s' has broken dependencies:" @@ -2530,8 +2535,8 @@ msgid "" "You can change it later in \"Project Settings\" under the 'application' " "category." msgstr "" -"ë©”ì¸ ì”¬ì„ ì§€ì •í•˜ì§€ 않았네요. 하나 ì •í• ê¹Œìš”?\n" -"ì´ê±´ ë‚˜ì¤‘ì— \"프로ì 트 ì„¤ì •\"ì˜ 'application' ì¹´í…Œê³ ë¦¬ì—서 바꿀 수 있어요." +"ë©”ì¸ ì”¬ì„ ì§€ì •í•˜ì§€ 않았습니다. ì„ íƒí•˜ì‹œê² 습니까?\n" +"ë‚˜ì¤‘ì— \"프로ì 트 ì„¤ì •\"ì˜ 'application' ì¹´í…Œê³ ë¦¬ì—서 ë³€ê²½í• ìˆ˜ 있습니다." #: editor/editor_node.cpp msgid "" @@ -2539,8 +2544,8 @@ msgid "" "You can change it later in \"Project Settings\" under the 'application' " "category." msgstr "" -"ì„ íƒí•œ 씬 '%s'ì´(ê°€) 없어요, 다른 씬으로 ì •í• ê¹Œìš”?\n" -"ì´ê±´ ë‚˜ì¤‘ì— \"프로ì 트 ì„¤ì •\"ì˜ 'application' ì¹´í…Œê³ ë¦¬ì—서 바꿀 수 있어요." +"ì„ íƒí•œ 씬 '%s'ì´(ê°€) 없습니다. 다른 씬으로 ì§€ì •í• ê¹Œìš”?\n" +"ë‚˜ì¤‘ì— \"프로ì 트 ì„¤ì •\"ì˜ 'application' ì¹´í…Œê³ ë¦¬ì—서 바꿀 수 있습니다." #: editor/editor_node.cpp msgid "" @@ -2548,16 +2553,16 @@ msgid "" "You can change it later in \"Project Settings\" under the 'application' " "category." msgstr "" -"ì„ íƒí•œ 씬 '%s'ì€(는) 씬 파ì¼ì´ 아니ì—ìš”, 다른 씬으로 ì •í• ê¹Œìš”?\n" -"ì´ê±´ ë‚˜ì¤‘ì— \"프로ì 트 ì„¤ì •\"ì˜ 'application' ì¹´í…Œê³ ë¦¬ì—서 바꿀 수 있어요." +"ì„ íƒí•œ 씬 '%s'ì€(는) 씬 파ì¼ì´ 아닙니다, 다른 씬으로 ì •í• ê¹Œìš”?\n" +"ì´ê±´ ë‚˜ì¤‘ì— \"프로ì 트 ì„¤ì •\"ì˜ 'application' ì¹´í…Œê³ ë¦¬ì—서 바꿀 수 있습니다." #: editor/editor_node.cpp msgid "Save Layout" -msgstr "ë ˆì´ì•„웃 ì €ìž¥í•˜ê¸°" +msgstr "ë ˆì´ì•„웃 ì €ìž¥" #: editor/editor_node.cpp msgid "Delete Layout" -msgstr "ë ˆì´ì•„웃 ì‚ì œí•˜ê¸°" +msgstr "ë ˆì´ì•„웃 ì‚ì œ" #: editor/editor_node.cpp editor/import_dock.cpp #: editor/script_create_dialog.cpp @@ -2571,7 +2576,7 @@ msgstr "íŒŒì¼ ì‹œìŠ¤í…œì—서 보기" #: editor/editor_node.cpp msgid "Play This Scene" -msgstr "ì´ ì”¬ 실행하기" +msgstr "ì´ ì”¬ 실행" #: editor/editor_node.cpp msgid "Close Tab" @@ -2595,7 +2600,7 @@ msgstr "ëª¨ë“ íƒ ë‹«ê¸°" #: editor/editor_node.cpp msgid "Switch Scene Tab" -msgstr "씬 íƒ ì „í™˜í•˜ê¸°" +msgstr "씬 íƒ ì „í™˜" #: editor/editor_node.cpp msgid "%d more files or folders" @@ -2623,7 +2628,7 @@ msgstr "집중 모드 í† ê¸€." #: editor/editor_node.cpp msgid "Add a new scene." -msgstr "새 ì”¬ì„ ì¶”ê°€í•´ìš”." +msgstr "새 ì”¬ì„ ì¶”ê°€í•©ë‹ˆë‹¤." #: editor/editor_node.cpp msgid "Scene" @@ -2631,11 +2636,11 @@ msgstr "씬" #: editor/editor_node.cpp msgid "Go to previously opened scene." -msgstr "ì´ì „ì— ì—´ì—ˆë˜ ì”¬ìœ¼ë¡œ 가요." +msgstr "ì´ì „ì— ì—´ì—ˆë˜ ì”¬ìœ¼ë¡œ ì´ë™í•©ë‹ˆë‹¤." #: editor/editor_node.cpp msgid "Copy Text" -msgstr "ë¬¸ìž ë³µì‚¬í•˜ê¸°" +msgstr "ë¬¸ìž ë³µì‚¬" #: editor/editor_node.cpp msgid "Next tab" @@ -2651,7 +2656,7 @@ msgstr "íŒŒì¼ í•„í„°..." #: editor/editor_node.cpp msgid "Operations with scene files." -msgstr "씬 파ì¼ë¡œ 작업해요." +msgstr "씬 파ì¼ì— 대한 작업입니다." #: editor/editor_node.cpp msgid "New Scene" @@ -2671,15 +2676,15 @@ msgstr "최근 ê¸°ë¡ ì—´ê¸°" #: editor/editor_node.cpp msgid "Save Scene" -msgstr "씬 ì €ìž¥í•˜ê¸°" +msgstr "씬 ì €ìž¥" #: editor/editor_node.cpp msgid "Save All Scenes" -msgstr "ëª¨ë“ ì”¬ ì €ìž¥í•˜ê¸°" +msgstr "ëª¨ë“ ì”¬ ì €ìž¥" #: editor/editor_node.cpp msgid "Convert To..." -msgstr "다ìŒìœ¼ë¡œ 변환하기..." +msgstr "다ìŒìœ¼ë¡œ 변환..." #: editor/editor_node.cpp msgid "MeshLibrary..." @@ -2697,7 +2702,7 @@ msgstr "ë˜ëŒë¦¬ê¸°" #: editor/editor_node.cpp editor/plugins/script_text_editor.cpp #: scene/gui/line_edit.cpp scene/gui/text_edit.cpp msgid "Redo" -msgstr "다시 실행하기" +msgstr "다시 실행" #: editor/editor_node.cpp msgid "Revert Scene" @@ -2722,11 +2727,11 @@ msgstr "ë²„ì „ 컨트롤" #: editor/editor_node.cpp editor/plugins/version_control_editor_plugin.cpp msgid "Set Up Version Control" -msgstr "ë²„ì „ 컨트롤 설치하기" +msgstr "ë²„ì „ 컨트롤 ì„¤ì •" #: editor/editor_node.cpp msgid "Shut Down Version Control" -msgstr "ë²„ì „ 컨트롤 종료하기" +msgstr "ë²„ì „ 컨트롤 종료" #: editor/editor_node.cpp msgid "Export..." @@ -2734,7 +2739,7 @@ msgstr "내보내기..." #: editor/editor_node.cpp msgid "Install Android Build Template..." -msgstr "안드로ì´ë“œ 빌드 템플릿 설치하기..." +msgstr "안드로ì´ë“œ 빌드 템플릿 설치..." #: editor/editor_node.cpp msgid "Open Project Data Folder" @@ -2759,7 +2764,7 @@ msgstr "디버그" #: editor/editor_node.cpp msgid "Deploy with Remote Debug" -msgstr "ì›ê²© 디버그와 함께 ë°°í¬í•˜ê¸°" +msgstr "ì›ê²© 디버그와 함께 ë°°í¬" #: editor/editor_node.cpp msgid "" @@ -2767,11 +2772,11 @@ msgid "" "connect to the IP of this computer in order to be debugged." msgstr "" "내보내거나 ë°°í¬í• 때, ê²°ê³¼ 실행 파ì¼ì€ ë””ë²„ê¹…ì„ ìœ„í•´ ì´ ì»´í“¨í„°ì˜ IP와 ì—°ê²°ì„ " -"시ë„í• ê±°ì˜ˆìš”." +"시ë„í• ê²ƒìž…ë‹ˆë‹¤." #: editor/editor_node.cpp msgid "Small Deploy with Network FS" -msgstr "ë„¤íŠ¸ì›Œí¬ íŒŒì¼ ì‹œìŠ¤í…œê³¼ 함께 작게 ë°°í¬í•˜ê¸°" +msgstr "ë„¤íŠ¸ì›Œí¬ íŒŒì¼ ì‹œìŠ¤í…œì„ ì‚¬ìš©í•˜ì—¬ 작게 ë°°í¬" #: editor/editor_node.cpp msgid "" @@ -2782,10 +2787,11 @@ msgid "" "On Android, deploy will use the USB cable for faster performance. This " "option speeds up testing for games with a large footprint." msgstr "" -"ì´ ì„¤ì •ì„ ì¼œë©´, 내보내거나 ë°°í¬í• 때 ìµœì†Œí•œì˜ ì‹¤í–‰ 파ì¼ì„ 만들어요.\n" -"ë„¤íŠ¸ì›Œí¬ ë„ˆë¨¸ 편집기가 프로ì 트ì—서 íŒŒì¼ ì‹œìŠ¤í…œì„ ì œê³µí• ê±°ì˜ˆìš”.\n" -"Androidì˜ ê²½ìš°, ë” ë¹ ë¥¸ ì„±ëŠ¥ì„ ì›í•œë‹¤ë©´ ë°°í¬í• 때 USB ì¼€ì´ë¸”ì„ ì‚¬ìš©í•˜ì„¸ìš”. " -"ì´ ì„¤ì •ì€ ì„¤ì¹˜ ê³µê°„ì´ í° ê²Œìž„ì„ ë¹¨ë¦¬ í…ŒìŠ¤íŠ¸í• ë•Œ 쓸 수 있어요." +"ì´ ì„¤ì •ì„ ì¼œë©´, 내보내거나 ë°°í¬í• 때 ìµœì†Œí•œì˜ ì‹¤í–‰ 파ì¼ì„ ë§Œë“니다.\n" +"ì´ ê²½ìš°, 실행 파ì¼ì´ ë„¤íŠ¸ì›Œí¬ ë„ˆë¨¸ì— ìžˆëŠ” íŽ¸ì§‘ê¸°ì˜ íŒŒì¼ ì‹œìŠ¤í…œì„ ì‚¬ìš©í•©ë‹ˆ" +"다.\n" +"Androidì˜ ê²½ìš°, ë°°í¬ ì‹œ ë” ë¹ ë¥¸ ì†ë„를 위해 USB ì¼€ì´ë¸”ì„ ì‚¬ìš©í•©ë‹ˆë‹¤. ì´ ì„¤ì •" +"ì€ ìš©ëŸ‰ì´ í° ê²Œìž„ì˜ í…ŒìŠ¤íŠ¸ ë°°í¬ ì†ë„를 í–¥ìƒì‹œí‚¬ 수 있습니다." #: editor/editor_node.cpp msgid "Visible Collision Shapes" @@ -2797,7 +2803,7 @@ msgid "" "running game if this option is turned on." msgstr "" "ì´ ì„¤ì •ì„ ì¼œë©´ ê²Œìž„ì„ ì‹¤í–‰í•˜ëŠ” ë™ì•ˆ (2D와 3Dìš©) Collision 모양과 Raycast 노드" -"ê°€ ë³´ì´ê²Œ ë¼ìš”." +"ê°€ ë³´ì´ê²Œ ë©ë‹ˆë‹¤." #: editor/editor_node.cpp msgid "Visible Navigation" @@ -2808,11 +2814,12 @@ msgid "" "Navigation meshes and polygons will be visible on the running game if this " "option is turned on." msgstr "" -"ì´ ì„¤ì •ì„ ì¼œë©´, ê²Œìž„ì„ ì‹¤í–‰í•˜ëŠ” ë™ì•ˆ Navigation 메시와 í´ë¦¬ê³¤ì´ ë³´ì´ê²Œ ë¼ìš”." +"ì´ ì„¤ì •ì„ ì¼œë©´, ê²Œìž„ì„ ì‹¤í–‰í•˜ëŠ” ë™ì•ˆ Navigation 메시와 í´ë¦¬ê³¤ì´ ë³´ì´ê²Œ ë©ë‹ˆ" +"다." #: editor/editor_node.cpp msgid "Sync Scene Changes" -msgstr "씬 변경 ì‚¬í• ë™ê¸°í™”하기" +msgstr "씬 변경 ì‚¬í• ë™ê¸°í™”" #: editor/editor_node.cpp msgid "" @@ -2821,13 +2828,14 @@ msgid "" "When used remotely on a device, this is more efficient with network " "filesystem." msgstr "" -"ì´ ì„¤ì •ì„ ì¼œë©´, ê²Œìž„ì„ ì‹¤í–‰í•˜ëŠ” ë™ì•ˆ 편집기ì—서 ì”¬ì˜ ë³€ê²½ 사í•ì´ ê²Œìž„ì— ì ìš©" -"ë¼ìš”.\n" -"기기를 ì›ê²©ì—서 ì‚¬ìš©í• ë•Œ, ì´ê²ƒì€ ë„¤íŠ¸ì›Œí¬ íŒŒì¼ ì‹œìŠ¤í…œìœ¼ë¡œ ë”ìš± 효과ì ì´ì—ìš”." +"ì´ ì„¤ì •ì´ í™œì„±í™”ëœ ê²½ìš°, 편집기ì—서 ì”¬ì„ ìˆ˜ì •í•˜ë©´ 실행 ì¤‘ì¸ ê²Œìž„ì—ë„ ë°˜ì˜ë©ë‹ˆ" +"다.\n" +"ì›ê²© 장치ì—서 ì‚¬ìš©ì¤‘ì¸ ê²½ìš° ë„¤íŠ¸ì›Œí¬ íŒŒì¼ ì‹œìŠ¤í…œ ê¸°ëŠ¥ì„ í™œì„±í™”í•˜ë©´ ë”ìš± 효율" +"ì 입니다." #: editor/editor_node.cpp msgid "Sync Script Changes" -msgstr "스í¬ë¦½íЏ 변경 ì‚¬í• ë™ê¸°í™”하기" +msgstr "스í¬ë¦½íЏ 변경 ì‚¬í• ë™ê¸°í™”" #: editor/editor_node.cpp msgid "" @@ -2836,12 +2844,14 @@ msgid "" "When used remotely on a device, this is more efficient with network " "filesystem." msgstr "" -"ì´ ì„¤ì •ì„ ì¼œë©´, ê²Œìž„ì„ ì‹¤í–‰í•˜ëŠ” ë™ì•ˆ ì €ìž¥í•œ ëª¨ë“ ìŠ¤í¬ë¦½íŠ¸ë¥¼ 새로 불러와요.\n" -"기기를 ì›ê²©ì—서 ì‚¬ìš©í• ë•Œ, ì´ê²ƒì€ ë„¤íŠ¸ì›Œí¬ íŒŒì¼ ì‹œìŠ¤í…œìœ¼ë¡œ ë”ìš± 효과ì ì´ì—ìš”." +"ì´ ì„¤ì •ì´ í™œì„±í™”ëœ ê²½ìš°, ì–´ë–¤ 스í¬ë¦½íŠ¸ë“ ì €ìž¥í•˜ë©´ ì‹¤í–‰ì¤‘ì¸ ê²Œìž„ì—ë„ ë°˜ì˜ë©ë‹ˆ" +"다.\n" +"ì›ê²© 장치ì—서 ì‚¬ìš©ì¤‘ì¸ ê²½ìš° ë„¤íŠ¸ì›Œí¬ íŒŒì¼ ì‹œìŠ¤í…œ ê¸°ëŠ¥ì„ í™œì„±í™”í•˜ë©´ ë”ìš± 효율" +"ì 입니다." #: editor/editor_node.cpp editor/script_create_dialog.cpp msgid "Editor" -msgstr "편집기(Editor)" +msgstr "편집기" #: editor/editor_node.cpp msgid "Editor Settings..." @@ -2857,7 +2867,7 @@ msgstr "스í¬ë¦°ìƒ· ì°ê¸°" #: editor/editor_node.cpp msgid "Screenshots are stored in the Editor Data/Settings Folder." -msgstr "스í¬ë¦°ìƒ·ì€ Editor Data/Settings í´ë”ì— ì €ìž¥ëì–´ìš”." +msgstr "스í¬ë¦°ìƒ·ì´ Editor Data/Settings í´ë”ì— ì €ìž¥ë˜ì—ˆìŠµë‹ˆë‹¤." #: editor/editor_node.cpp msgid "Toggle Fullscreen" @@ -2881,7 +2891,7 @@ msgstr "편집기 ì„¤ì • í´ë” 열기" #: editor/editor_node.cpp msgid "Manage Editor Features..." -msgstr "편집기 기능 관리하기..." +msgstr "편집기 기능 관리..." #: editor/editor_node.cpp msgid "Manage Export Templates..." @@ -2923,15 +2933,15 @@ msgstr "ì •ë³´" #: editor/editor_node.cpp msgid "Play the project." -msgstr "프로ì 트를 실행해요." +msgstr "프로ì 트를 실행합니다." #: editor/editor_node.cpp msgid "Play" -msgstr "실행하기" +msgstr "실행" #: editor/editor_node.cpp msgid "Pause the scene execution for debugging." -msgstr "ë””ë²„ê¹…ì„ í•˜ê¸° 위해 씬 ì‹¤í–‰ì„ ë©ˆì¶°ìš”." +msgstr "ë””ë²„ê¹…ì„ í•˜ê¸° 위해 씬 ì‹¤í–‰ì„ ì¤‘ë‹¨í•©ë‹ˆë‹¤." #: editor/editor_node.cpp msgid "Pause Scene" @@ -2939,19 +2949,19 @@ msgstr "씬 멈추기" #: editor/editor_node.cpp msgid "Stop the scene." -msgstr "ì”¬ì„ ë©ˆì¶°ìš”." +msgstr "ì”¬ì„ ì¤‘ë‹¨í•©ë‹ˆë‹¤." #: editor/editor_node.cpp msgid "Play the edited scene." -msgstr "íŽ¸ì§‘í•˜ê³ ìžˆë˜ ì”¬ì„ ì‹¤í–‰í•´ìš”." +msgstr "íŽ¸ì§‘í•˜ê³ ìžˆë˜ ì”¬ì„ ì‹¤í–‰í•©ë‹ˆë‹¤." #: editor/editor_node.cpp msgid "Play Scene" -msgstr "씬 실행하기" +msgstr "씬 실행" #: editor/editor_node.cpp msgid "Play custom scene" -msgstr "ì”¬ì„ ì§€ì •í•´ì„œ 실행해요" +msgstr "ì”¬ì„ ì§€ì •í•´ì„œ 실행합니다" #: editor/editor_node.cpp msgid "Play Custom Scene" @@ -2959,16 +2969,16 @@ msgstr "맞춤 씬 실행하기" #: editor/editor_node.cpp msgid "Changing the video driver requires restarting the editor." -msgstr "비디오 드ë¼ì´ë²„를 ë³€ê²½í•˜ë ¤ë©´ 편집기를 다시 ê»ë‹¤ 켜야 í•´ìš”." +msgstr "비디오 드ë¼ì´ë²„를 ë³€ê²½í•˜ë ¤ë©´ 편집기를 다시 ê»ë‹¤ 켜야 합니다." #: editor/editor_node.cpp editor/project_settings_editor.cpp #: editor/settings_config_dialog.cpp msgid "Save & Restart" -msgstr "ì €ìž¥ & 다시 시작하기" +msgstr "ì €ìž¥ & 다시 시작" #: editor/editor_node.cpp msgid "Spins when the editor window redraws." -msgstr "편집기 ì°½ì— ë³€í™”ê°€ ìžˆì„ ë•Œë§ˆë‹¤ ëŒì•„ìš”." +msgstr "편집기 ì°½ì— ë³€í™”ê°€ ìžˆì„ ë•Œë§ˆë‹¤ íšŒì „í•©ë‹ˆë‹¤." #: editor/editor_node.cpp msgid "Update Continuously" @@ -3004,7 +3014,7 @@ msgstr "ì €ìž¥í•˜ì§€ 않ìŒ" #: editor/editor_node.cpp msgid "Android build template is missing, please install relevant templates." -msgstr "안드로ì´ë“œ 빌드 í…œí”Œë¦¿ì´ ì—†ì–´ìš”, ê´€ë ¨ í…œí”Œë¦¿ì„ ì„¤ì¹˜í•´ì£¼ì„¸ìš”." +msgstr "안드로ì´ë“œ 빌드 í…œí”Œë¦¿ì´ ì—†ìŠµë‹ˆë‹¤, ê´€ë ¨ í…œí”Œë¦¿ì„ ì„¤ì¹˜í•´ì£¼ì„¸ìš”." #: editor/editor_node.cpp msgid "Manage Templates" @@ -3021,11 +3031,11 @@ msgid "" "preset." msgstr "" "\"res://android/build\"ì— ì†ŒìŠ¤ í…œí”Œë¦¿ì„ ì„¤ì¹˜í•´ì„œ, 프로ì 트를 맞춤 안드로ì´ë“œ " -"ë¹Œë“œì— ë§žê²Œ ì„¤ì •í• ê±°ì˜ˆìš”.\n" -"그런 ë‹¤ìŒ ìˆ˜ì • 사í•ì„ ì ìš©í•˜ê³ ë§žì¶¤ APK를 만들어 내보낼 수 있어요 (모듈 추가" -"하기, AndroidManifest.xml 바꾸기 등).\n" +"ë¹Œë“œì— ë§žê²Œ ì„¤ì •í• ê²ƒìž…ë‹ˆë‹¤.\n" +"그런 ë‹¤ìŒ ìˆ˜ì • 사í•ì„ ì ìš©í•˜ê³ ë§žì¶¤ APK를 만들어 내보낼 수 있습니다 (모듈 ì¶”" +"ê°€, AndroidManifest.xml 바꾸기 등).\n" "미리 ë¹Œë“œëœ APK를 사용하는 ëŒ€ì‹ ë§žì¶¤ 빌드를 ë§Œë“¤ë ¤ë©´, 안드로ì´ë“œ 내보내기 프" -"리셋ì—서 \"맞춤 빌드 사용하기\" ì„¤ì •ì„ ì¼œ 놓아야 í•´ìš”." +"리셋ì—서 \"맞춤 빌드 사용\" ì„¤ì •ì„ ì¼œ 놓아야 합니다." #: editor/editor_node.cpp msgid "" @@ -3034,8 +3044,8 @@ msgid "" "Remove the \"res://android/build\" directory manually before attempting this " "operation again." msgstr "" -"안드로ì´ë“œ 빌드 í…œí”Œë¦¿ì´ ì´ë¯¸ ì´ í”„ë¡œì íŠ¸ì— ì„¤ì¹˜í–ˆê³ , ë®ì–´ 쓸 수 없어요.\n" -"ì´ ëª…ë ¹ì„ ë‹¤ì‹œ 실행하기 ì „ì— \"res://android/build\" ë””ë ‰í† ë¦¬ë¥¼ ì‚ì œí•˜ì„¸ìš”." +"안드로ì´ë“œ 빌드 í…œí”Œë¦¿ì´ ì´ë¯¸ ì´ í”„ë¡œì íŠ¸ì— ì„¤ì¹˜í–ˆê³ , ë®ì–´ 쓸 수 없습니다.\n" +"ì´ ëª…ë ¹ì„ ë‹¤ì‹œ 실행 ì „ì— \"res://android/build\" ë””ë ‰í† ë¦¬ë¥¼ ì‚ì œí•˜ì„¸ìš”." #: editor/editor_node.cpp msgid "Import Templates From ZIP File" @@ -3051,11 +3061,11 @@ msgstr "ë¼ì´ë¸ŒëŸ¬ë¦¬ 내보내기" #: editor/editor_node.cpp msgid "Merge With Existing" -msgstr "ê¸°ì¡´ì˜ ê²ƒê³¼ 병합하기" +msgstr "ê¸°ì¡´ì˜ ê²ƒê³¼ 병합" #: editor/editor_node.cpp msgid "Open & Run a Script" -msgstr "스í¬ë¦½íЏ 열기 & 실행하기" +msgstr "스í¬ë¦½íЏ 열기 & 실행" #: editor/editor_node.cpp msgid "New Inherited" @@ -3067,7 +3077,7 @@ msgstr "불러오기 오류" #: editor/editor_node.cpp editor/plugins/tile_map_editor_plugin.cpp msgid "Select" -msgstr "ì„ íƒí•˜ê¸°" +msgstr "ì„ íƒ" #: editor/editor_node.cpp msgid "Open 2D Editor" @@ -3099,11 +3109,11 @@ msgstr "ê²½ê³ !" #: editor/editor_path.cpp msgid "No sub-resources found." -msgstr "하위 리소스를 ì°¾ì„ ìˆ˜ 없어요." +msgstr "하위 리소스를 ì°¾ì„ ìˆ˜ 없습니다." #: editor/editor_plugin.cpp msgid "Creating Mesh Previews" -msgstr "메시 미리 보기 만들기" +msgstr "메시 미리 보기 만드는 중" #: editor/editor_plugin.cpp msgid "Thumbnail..." @@ -3115,7 +3125,7 @@ msgstr "기본 스í¬ë¦½íЏ:" #: editor/editor_plugin_settings.cpp msgid "Edit Plugin" -msgstr "í”ŒëŸ¬ê·¸ì¸ íŽ¸ì§‘í•˜ê¸°" +msgstr "í”ŒëŸ¬ê·¸ì¸ íŽ¸ì§‘" #: editor/editor_plugin_settings.cpp msgid "Installed Plugins:" @@ -3204,7 +3214,7 @@ msgstr "[비어있ìŒ]" #: editor/editor_properties.cpp editor/plugins/root_motion_editor_plugin.cpp msgid "Assign..." -msgstr "ì§€ì •í•˜ê¸°..." +msgstr "ì§€ì •..." #: editor/editor_properties.cpp msgid "Invalid RID" @@ -3214,15 +3224,15 @@ msgstr "ìž˜ëª»ëœ RID" msgid "" "The selected resource (%s) does not match any type expected for this " "property (%s)." -msgstr "ì„ íƒí•œ 리소스 (%s)ê°€ ì´ ì†ì„± (%s)ì— ì 합한 ëª¨ë“ ìœ í˜•ì— ë§žì§€ 않아요." +msgstr "ì„ íƒí•œ 리소스 (%s)ê°€ ì´ ì†ì„± (%s)ì— ì 합한 ëª¨ë“ ìœ í˜•ì— ë§žì§€ 않습니다." #: editor/editor_properties.cpp msgid "" "Can't create a ViewportTexture on resources saved as a file.\n" "Resource needs to belong to a scene." msgstr "" -"파ì¼ë¡œ ì €ìž¥í•œ ë¦¬ì†ŒìŠ¤ì— ViewportTexture를 만들 수 없어요.\n" -"리소스가 ì”¬ì— ì†í•´ 있어야 í•´ìš”." +"파ì¼ë¡œ ì €ìž¥í•œ ë¦¬ì†ŒìŠ¤ì— ViewportTexture를 만들 수 없습니다.\n" +"리소스가 ì”¬ì— ì†í•´ 있어야 합니다." #: editor/editor_properties.cpp msgid "" @@ -3232,7 +3242,7 @@ msgid "" "containing it up to a node)." msgstr "" "ì”¬ì— ì§€ì—으로 ì„¤ì •ë˜ì§€ 않았기 ë•Œë¬¸ì— ì´ ë¦¬ì†ŒìŠ¤ì— ViewportTexture를 만들 수 ì—†" -"ì–´ìš”.\n" +"습니다.\n" "리소스 (ê·¸ë¦¬ê³ í•œ ë…¸ë“œì— ìžˆëŠ” ëª¨ë“ ë¦¬ì†ŒìŠ¤)ì˜ 'local to scene' ì†ì„±ì„ 켜주세" "ìš” ." @@ -3272,7 +3282,7 @@ msgstr "붙여넣기" #: editor/editor_properties.cpp editor/property_editor.cpp msgid "Convert To %s" -msgstr "%s(으)로 변환하기" +msgstr "%s(으)로 변환" #: editor/editor_properties.cpp editor/property_editor.cpp msgid "Selected node is not a Viewport!" @@ -3289,7 +3299,7 @@ msgstr "페ì´ì§€: " #: editor/editor_properties_array_dict.cpp #: editor/plugins/theme_editor_plugin.cpp msgid "Remove Item" -msgstr "í•목 ì‚ì œí•˜ê¸°" +msgstr "í•목 ì‚ì œ" #: editor/editor_properties_array_dict.cpp msgid "New Key:" @@ -3301,14 +3311,14 @@ msgstr "새 ê°’:" #: editor/editor_properties_array_dict.cpp msgid "Add Key/Value Pair" -msgstr "키/ê°’ ìŒ ì¶”ê°€í•˜ê¸°" +msgstr "키/ê°’ ìŒ ì¶”ê°€" #: editor/editor_run_native.cpp msgid "" "No runnable export preset found for this platform.\n" "Please add a runnable preset in the export menu." msgstr "" -"ì´ í”Œëž«í¼ìœ¼ë¡œ ì‹¤í–‰í• ìˆ˜ 있는 내보내기 í”„ë¦¬ì…‹ì´ ì—†ì–´ìš”.\n" +"ì´ í”Œëž«í¼ìœ¼ë¡œ ì‹¤í–‰í• ìˆ˜ 있는 내보내기 í”„ë¦¬ì…‹ì´ ì—†ìŠµë‹ˆë‹¤.\n" "내보내기 메뉴ì—서 ì‹¤í–‰í• ìˆ˜ 있는 í”„ë¦¬ì…‹ì„ ì¶”ê°€í•´ì£¼ì„¸ìš”." #: editor/editor_run_script.cpp @@ -3317,7 +3327,7 @@ msgstr "_run() ë©”ì„œë“œì— ë‹¹ì‹ ì˜ ë…¼ë¦¬ë¥¼ 작성하세요." #: editor/editor_run_script.cpp msgid "There is an edited scene already." -msgstr "ì´ë¯¸ íŽ¸ì§‘ëœ ì”¬ì´ ìžˆì–´ìš”." +msgstr "ì´ë¯¸ íŽ¸ì§‘ëœ ì”¬ì´ ìžˆìŠµë‹ˆë‹¤." #: editor/editor_run_script.cpp msgid "Couldn't instance script:" @@ -3337,11 +3347,11 @@ msgstr "'_run' 메서드를 잊었나요?" #: editor/editor_sub_scene.cpp msgid "Select Node(s) to Import" -msgstr "ê°€ì ¸ì˜¬ 노드 ì„ íƒí•˜ê¸°" +msgstr "ê°€ì ¸ì˜¬ 노드 ì„ íƒ" #: editor/editor_sub_scene.cpp editor/project_manager.cpp msgid "Browse" -msgstr "검색하기" +msgstr "íƒìƒ‰" #: editor/editor_sub_scene.cpp msgid "Scene Path:" @@ -3353,11 +3363,11 @@ msgstr "노드ì—서 ê°€ì ¸ì˜¤ê¸°:" #: editor/export_template_manager.cpp msgid "Redownload" -msgstr "다시 다운로드하기" +msgstr "다시 다운로드" #: editor/export_template_manager.cpp msgid "Uninstall" -msgstr "ì‚ì œí•˜ê¸°" +msgstr "ì‚ì œ" #: editor/export_template_manager.cpp msgid "(Installed)" @@ -3366,11 +3376,11 @@ msgstr "(설치ë¨)" #: editor/export_template_manager.cpp #: editor/plugins/asset_library_editor_plugin.cpp msgid "Download" -msgstr "다운로드하기" +msgstr "다운로드" #: editor/export_template_manager.cpp msgid "Official export templates aren't available for development builds." -msgstr "ê³µì‹ ë‚´ë³´ë‚´ê¸° í…œí”Œë¦¿ì€ ê°œë°œ 빌드ì—서는 ì´ìš©í• 수 없어요." +msgstr "ê³µì‹ ë‚´ë³´ë‚´ê¸° í…œí”Œë¦¿ì€ ê°œë°œ 빌드ì—서는 ì´ìš©í• 수 없습니다." #: editor/export_template_manager.cpp msgid "(Missing)" @@ -3382,7 +3392,7 @@ msgstr "(현재)" #: editor/export_template_manager.cpp msgid "Retrieving mirrors, please wait..." -msgstr "미러를 검색 중ì´ì—ìš”. ê¸°ë‹¤ë ¤ì£¼ì„¸ìš”..." +msgstr "미러를 검색 중입니다. ê¸°ë‹¤ë ¤ì£¼ì„¸ìš”..." #: editor/export_template_manager.cpp msgid "Remove template version '%s'?" @@ -3390,7 +3400,7 @@ msgstr "템플릿 ë²„ì „ '%s'ì„(를) ì‚ì œí• ê¹Œìš”?" #: editor/export_template_manager.cpp msgid "Can't open export templates zip." -msgstr "내보내기 템플릿 zip 파ì¼ì„ ì—´ 수 없어요." +msgstr "내보내기 템플릿 zip 파ì¼ì„ ì—´ 수 없습니다." #: editor/export_template_manager.cpp msgid "Invalid version.txt format inside templates: %s." @@ -3398,7 +3408,7 @@ msgstr "템플릿 ì†ì˜ version.txtê°€ ìž˜ëª»ëœ í˜•ì‹ìž„: %s." #: editor/export_template_manager.cpp msgid "No version.txt found inside templates." -msgstr "í…œí”Œë¦¿ì— version.txt를 ì°¾ì„ ìˆ˜ 없어요." +msgstr "í…œí”Œë¦¿ì— version.txt를 ì°¾ì„ ìˆ˜ 없습니다." #: editor/export_template_manager.cpp msgid "Error creating path for templates:" @@ -3425,18 +3435,18 @@ msgid "" "No download links found for this version. Direct download is only available " "for official releases." msgstr "" -"ì´ ë²„ì „ì˜ ë‹¤ìš´ë¡œë“œ ë§í¬ë¥¼ ì°¾ì„ ìˆ˜ 없어요. ê³µì‹ ì¶œì‹œ ë²„ì „ë§Œ 바로 ë‹¤ìš´ë¡œë“œí• " -"수 있어요." +"ì´ ë²„ì „ì˜ ë‹¤ìš´ë¡œë“œ ë§í¬ë¥¼ ì°¾ì„ ìˆ˜ 없습니다. ê³µì‹ ì¶œì‹œ ë²„ì „ë§Œ 바로 ë‹¤ìš´ë¡œë“œí• " +"수 있습니다." #: editor/export_template_manager.cpp #: editor/plugins/asset_library_editor_plugin.cpp msgid "Can't resolve." -msgstr "í•´ê²°í• ìˆ˜ 없어요." +msgstr "í•´ê²°í• ìˆ˜ 없습니다." #: editor/export_template_manager.cpp #: editor/plugins/asset_library_editor_plugin.cpp msgid "Can't connect." -msgstr "ì—°ê²°í• ìˆ˜ 없어요." +msgstr "ì—°ê²°í• ìˆ˜ 없습니다." #: editor/export_template_manager.cpp #: editor/plugins/asset_library_editor_plugin.cpp @@ -3469,8 +3479,8 @@ msgid "" "Templates installation failed.\n" "The problematic templates archives can be found at '%s'." msgstr "" -"템플릿 ì„¤ì¹˜ì— ì‹¤íŒ¨í–ˆì–´ìš”.\n" -"ë¬¸ì œê°€ 있는 템플릿 기ë¡ì€ '%s'ì—서 찾아 ë³¼ 수 있어요." +"템플릿 ì„¤ì¹˜ì— ì‹¤íŒ¨í–ˆìŠµë‹ˆë‹¤.\n" +"ë¬¸ì œê°€ 있는 템플릿 기ë¡ì€ '%s'ì—서 찾아 ë³¼ 수 있습니다." #: editor/export_template_manager.cpp msgid "Error requesting URL:" @@ -3536,15 +3546,15 @@ msgstr "ì„¤ì¹˜ëœ ë²„ì „:" #: editor/export_template_manager.cpp msgid "Install From File" -msgstr "파ì¼ì—서 설치하기" +msgstr "파ì¼ì—서 설치" #: editor/export_template_manager.cpp msgid "Remove Template" -msgstr "템플릿 ì‚ì œí•˜ê¸°" +msgstr "템플릿 ì‚ì œ" #: editor/export_template_manager.cpp msgid "Select Template File" -msgstr "템플릿 íŒŒì¼ ì„ íƒí•˜ê¸°" +msgstr "템플릿 íŒŒì¼ ì„ íƒ" #: editor/export_template_manager.cpp msgid "Godot Export Templates" @@ -3556,7 +3566,7 @@ msgstr "내보내기 템플릿 ë§¤ë‹ˆì €" #: editor/export_template_manager.cpp msgid "Download Templates" -msgstr "템플릿 다운로드하기" +msgstr "템플릿 다운로드" #: editor/export_template_manager.cpp msgid "Select mirror from list: (Shift+Click: Open in Browser)" @@ -3569,16 +3579,16 @@ msgstr "ì¦ê²¨ì°¾ê¸°" #: editor/filesystem_dock.cpp msgid "Status: Import of file failed. Please fix file and reimport manually." msgstr "" -"ìƒíƒœ: íŒŒì¼ ê°€ì ¸ì˜¤ê¸°ì— ì‹¤íŒ¨í–ˆì–´ìš”. 수ë™ìœ¼ë¡œ 파ì¼ì„ ìˆ˜ì •í•˜ê³ ë‹¤ì‹œ ê°€ì ¸ 와주세" +"ìƒíƒœ: íŒŒì¼ ê°€ì ¸ì˜¤ê¸°ì— ì‹¤íŒ¨í–ˆìŠµë‹ˆë‹¤. 수ë™ìœ¼ë¡œ 파ì¼ì„ ìˆ˜ì •í•˜ê³ ë‹¤ì‹œ ê°€ì ¸ 와주세" "ìš”." #: editor/filesystem_dock.cpp msgid "Cannot move/rename resources root." -msgstr "리소스 루트를 옮기거나 ì´ë¦„ì„ ë°”ê¿€ 수 없어요." +msgstr "리소스 루트를 옮기거나 ì´ë¦„ì„ ë°”ê¿€ 수 없습니다." #: editor/filesystem_dock.cpp msgid "Cannot move a folder into itself." -msgstr "í´ë”를 ìžì‹ ì˜ í•˜ìœ„ë¡œ 옮길 수 없어요." +msgstr "í´ë”를 ìžì‹ ì˜ í•˜ìœ„ë¡œ 옮길 수 없습니다." #: editor/filesystem_dock.cpp msgid "Error moving:" @@ -3594,19 +3604,19 @@ msgstr "ì¢…ì† í•ëª©ì„ ì—…ë°ì´íŠ¸í• ìˆ˜ ì—†ìŒ:" #: editor/filesystem_dock.cpp editor/scene_tree_editor.cpp msgid "No name provided." -msgstr "ì´ë¦„ì„ ì œê³µí•˜ì§€ 않았어요." +msgstr "ì´ë¦„ì„ ì œê³µí•˜ì§€ 않았습니다." #: editor/filesystem_dock.cpp msgid "Provided name contains invalid characters." -msgstr "ì œê³µí•œ ì´ë¦„ì— ìž˜ëª»ëœ ë¬¸ìžê°€ 있어요." +msgstr "ì œê³µí•œ ì´ë¦„ì— ìž˜ëª»ëœ ë¬¸ìžê°€ 있습니다." #: editor/filesystem_dock.cpp msgid "A file or folder with this name already exists." -msgstr "ì´ ì´ë¦„ì€ ì´ë¯¸ ì–´ë–¤ 파ì¼ì´ë‚˜ í´ë”ê°€ ì“°ê³ ìžˆì–´ìš”." +msgstr "ì´ ì´ë¦„ì€ ì´ë¯¸ ì–´ë–¤ 파ì¼ì´ë‚˜ í´ë”ê°€ ì“°ê³ ìžˆìŠµë‹ˆë‹¤." #: editor/filesystem_dock.cpp msgid "Name contains invalid characters." -msgstr "ì´ë¦„ì— ìž˜ëª»ëœ ë¬¸ìžê°€ 있어요." +msgstr "ì´ë¦„ì— ìž˜ëª»ëœ ë¬¸ìžê°€ 있습니다." #: editor/filesystem_dock.cpp msgid "Renaming file:" @@ -3618,11 +3628,11 @@ msgstr "í´ë” ì´ë¦„ 바꾸기:" #: editor/filesystem_dock.cpp msgid "Duplicating file:" -msgstr "íŒŒì¼ ë³µì œí•˜ê¸°:" +msgstr "íŒŒì¼ ë³µì œ:" #: editor/filesystem_dock.cpp msgid "Duplicating folder:" -msgstr "í´ë” ë³µì œí•˜ê¸°:" +msgstr "í´ë” ë³µì œ:" #: editor/filesystem_dock.cpp msgid "New Inherited Scene" @@ -3630,7 +3640,7 @@ msgstr "새 ìƒì† 씬" #: editor/filesystem_dock.cpp msgid "Set As Main Scene" -msgstr "ë©”ì¸ ì”¬ìœ¼ë¡œ ì„¤ì •í•˜ê¸°" +msgstr "ë©”ì¸ ì”¬ìœ¼ë¡œ ì„¤ì •" #: editor/filesystem_dock.cpp msgid "Open Scenes" @@ -3642,15 +3652,15 @@ msgstr "ì¸ìŠ¤í„´ìŠ¤í•˜ê¸°" #: editor/filesystem_dock.cpp msgid "Add to Favorites" -msgstr "ì¦ê²¨ì°¾ê¸°ë¡œ 추가하기" +msgstr "ì¦ê²¨ì°¾ê¸°ë¡œ 추가" #: editor/filesystem_dock.cpp msgid "Remove from Favorites" -msgstr "ì¦ê²¨ì°¾ê¸°ì—서 ì‚ì œí•˜ê¸°" +msgstr "ì¦ê²¨ì°¾ê¸°ì—서 ì‚ì œ" #: editor/filesystem_dock.cpp msgid "Edit Dependencies..." -msgstr "ì¢…ì† ê´€ê³„ 편집하기..." +msgstr "ì¢…ì† ê´€ê³„ 편집..." #: editor/filesystem_dock.cpp msgid "View Owners..." @@ -3662,11 +3672,11 @@ msgstr "ì´ë¦„ 바꾸기..." #: editor/filesystem_dock.cpp msgid "Duplicate..." -msgstr "ë³µì œí•˜ê¸°..." +msgstr "ë³µì œ..." #: editor/filesystem_dock.cpp msgid "Move To..." -msgstr "여기로 ì´ë™í•˜ê¸°..." +msgstr "여기로 ì´ë™..." #: editor/filesystem_dock.cpp msgid "New Scene..." @@ -3707,7 +3717,7 @@ msgstr "ë‹¤ìŒ í´ë”/파ì¼" #: editor/filesystem_dock.cpp msgid "Re-Scan Filesystem" -msgstr "íŒŒì¼ ì‹œìŠ¤í…œ 다시 스캔하기" +msgstr "íŒŒì¼ ì‹œìŠ¤í…œ 다시 스캔" #: editor/filesystem_dock.cpp msgid "Toggle Split Mode" @@ -3715,23 +3725,23 @@ msgstr "ë¶„í• ëª¨ë“œ í† ê¸€" #: editor/filesystem_dock.cpp msgid "Search files" -msgstr "íŒŒì¼ ê²€ìƒ‰í•˜ê¸°" +msgstr "íŒŒì¼ ê²€ìƒ‰" #: editor/filesystem_dock.cpp msgid "" "Scanning Files,\n" "Please Wait..." msgstr "" -"íŒŒì¼ ìŠ¤ìº” 중ì´ì—ìš”.\n" -"ê¸°ë‹¤ë ¤ì£¼ì„¸ìš”..." +"íŒŒì¼ ìŠ¤ìº”ì¤‘.\n" +"ê¸°ë‹¤ë ¤ì£¼ì‹ì‹œì˜¤..." #: editor/filesystem_dock.cpp msgid "Move" -msgstr "ì´ë™í•˜ê¸°" +msgstr "ì´ë™" #: editor/filesystem_dock.cpp msgid "There is already file or folder with the same name in this location." -msgstr "ì´ ìœ„ì¹˜ì—는 ê°™ì€ ì´ë¦„ì˜ íŒŒì¼ì´ë‚˜ í´ë”ê°€ 있어요." +msgstr "ì´ ìœ„ì¹˜ì—는 ê°™ì€ ì´ë¦„ì˜ íŒŒì¼ì´ë‚˜ í´ë”ê°€ 있습니다." #: editor/filesystem_dock.cpp msgid "Overwrite" @@ -3766,8 +3776,8 @@ msgid "" "Include the files with the following extensions. Add or remove them in " "ProjectSettings." msgstr "" -"해당 í™•ìž¥ìž ì´ë¦„ì„ ê°–ëŠ” 파ì¼ì´ 있어요. 프로ì 트 ì„¤ì •ì— íŒŒì¼ì„ 추가하거나 ì‚ì œ" -"하세요." +"해당 í™•ìž¥ìž ì´ë¦„ì„ ê°–ëŠ” 파ì¼ì´ 있습니다. 프로ì 트 ì„¤ì •ì— íŒŒì¼ì„ 추가하거나 ì‚" +"ì œí•˜ì„¸ìš”." #: editor/find_in_files.cpp editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp @@ -3780,7 +3790,7 @@ msgstr "바꾸기..." #: editor/find_in_files.cpp editor/progress_dialog.cpp scene/gui/dialogs.cpp msgid "Cancel" -msgstr "취소하기" +msgstr "취소" #: editor/find_in_files.cpp msgid "Find: " @@ -3792,7 +3802,7 @@ msgstr "바꾸기: " #: editor/find_in_files.cpp msgid "Replace all (no undo)" -msgstr "ëª¨ë‘ ë°”ê¾¸ê¸° (ë˜ëŒë¦´ 수 없어요)" +msgstr "ëª¨ë‘ ë°”ê¾¸ê¸° (ë˜ëŒë¦´ 수 없습니다)" #: editor/find_in_files.cpp msgid "Searching..." @@ -3804,19 +3814,19 @@ msgstr "검색 완료" #: editor/groups_editor.cpp msgid "Add to Group" -msgstr "ê·¸ë£¹ì— ì¶”ê°€í•˜ê¸°" +msgstr "ê·¸ë£¹ì— ì¶”ê°€" #: editor/groups_editor.cpp msgid "Remove from Group" -msgstr "그룹ì—서 ì‚ì œí•˜ê¸°" +msgstr "그룹ì—서 ì‚ì œ" #: editor/groups_editor.cpp msgid "Group name already exists." -msgstr "ì´ ê·¸ë£¹ ì´ë¦„ì€ ì´ë¯¸ 누가 ì“°ê³ ìžˆì–´ìš”." +msgstr "ì´ ê·¸ë£¹ ì´ë¦„ì€ ì´ë¯¸ 누가 ì“°ê³ ìžˆìŠµë‹ˆë‹¤." #: editor/groups_editor.cpp msgid "Invalid group name." -msgstr "ì´ ê·¸ë£¹ ì´ë¦„ì€ ìž˜ëª»ëì–´ìš”." +msgstr "ì´ ê·¸ë£¹ ì´ë¦„ì€ ìž˜ëª»ë˜ì—ˆìŠµë‹ˆë‹¤." #: editor/groups_editor.cpp msgid "Rename Group" @@ -3824,7 +3834,7 @@ msgstr "그룹 ì´ë¦„ 바꾸기" #: editor/groups_editor.cpp msgid "Delete Group" -msgstr "그룹 ì‚ì œí•˜ê¸°" +msgstr "그룹 ì‚ì œ" #: editor/groups_editor.cpp editor/node_dock.cpp msgid "Groups" @@ -3845,7 +3855,7 @@ msgstr "ê·¸ë£¹ì— ì†í•œ 노드" #: editor/groups_editor.cpp msgid "Empty groups will be automatically removed." -msgstr "빈 ê·¸ë£¹ì€ ìžë™ìœ¼ë¡œ ì‚ì œë¼ìš”." +msgstr "빈 ê·¸ë£¹ì€ ìžë™ìœ¼ë¡œ ì‚ì œë©ë‹ˆë‹¤." #: editor/groups_editor.cpp msgid "Group Editor" @@ -3853,7 +3863,7 @@ msgstr "그룹 편집기" #: editor/groups_editor.cpp msgid "Manage Groups" -msgstr "그룹 관리하기" +msgstr "그룹 관리" #: editor/import/resource_importer_scene.cpp msgid "Import as Single Scene" @@ -3933,18 +3943,19 @@ msgid "Saving..." msgstr "ì €ìž¥ 중..." #: editor/import_dock.cpp +#, fuzzy +msgid "%d Files" +msgstr " 파ì¼" + +#: editor/import_dock.cpp msgid "Set as Default for '%s'" -msgstr "'%s'ì„(를) 기본으로 ì„¤ì •í•˜ê¸°" +msgstr "'%s'ì„(를) 기본으로 ì„¤ì •" #: editor/import_dock.cpp msgid "Clear Default for '%s'" msgstr "'%s'ì„(를) 기본ì—서 지우기" #: editor/import_dock.cpp -msgid " Files" -msgstr " 파ì¼" - -#: editor/import_dock.cpp msgid "Import As:" msgstr "ë‹¤ìŒ í˜•ì‹ìœ¼ë¡œ ê°€ì ¸ì˜¤ê¸°:" @@ -3962,18 +3973,18 @@ msgstr "씬 ì €ìž¥, 다시 ê°€ì ¸ì˜¤ê¸° ë° ë‹¤ì‹œ 시작" #: editor/import_dock.cpp msgid "Changing the type of an imported file requires editor restart." -msgstr "ê°€ì ¸ì˜¨ 파ì¼ì˜ ìœ í˜•ì„ ë°”ê¾¸ë ¤ë©´ 편집기를 다시 켜아 í•´ìš”." +msgstr "ê°€ì ¸ì˜¨ 파ì¼ì˜ ìœ í˜•ì„ ë°”ê¾¸ë ¤ë©´ 편집기를 다시 켜아 합니다." #: editor/import_dock.cpp msgid "" "WARNING: Assets exist that use this resource, they may stop loading properly." msgstr "" -"ê²½ê³ : ì´ ë¦¬ì†ŒìŠ¤ë¥¼ 사용하는 ì• ì…‹ì´ ìžˆì–´ìš”. ì •ìƒì 으로 불러오지 ëª»í• ìˆ˜ë„ ìžˆì–´" -"ìš”." +"ê²½ê³ : ì´ ë¦¬ì†ŒìŠ¤ë¥¼ 사용하는 ì• ì…‹ì´ ìžˆìŠµë‹ˆë‹¤. ì •ìƒì 으로 불러오지 ëª»í• ìˆ˜ë„ ìžˆ" +"습니다." #: editor/inspector_dock.cpp msgid "Failed to load resource." -msgstr "리소스 ë¶ˆëŸ¬ì˜¤ê¸°ì— ì‹¤íŒ¨í–ˆì–´ìš”." +msgstr "리소스 ë¶ˆëŸ¬ì˜¤ê¸°ì— ì‹¤íŒ¨í–ˆìŠµë‹ˆë‹¤." #: editor/inspector_dock.cpp msgid "Expand All Properties" @@ -3990,7 +4001,7 @@ msgstr "다른 ì´ë¦„으로 ì €ìž¥..." #: editor/inspector_dock.cpp msgid "Copy Params" -msgstr "매개변수 복사하기" +msgstr "매개변수 복사" #: editor/inspector_dock.cpp msgid "Paste Params" @@ -3998,11 +4009,11 @@ msgstr "매개변수 붙여넣기" #: editor/inspector_dock.cpp msgid "Edit Resource Clipboard" -msgstr "리소스 í´ë¦½ë³´ë“œ 편집하기" +msgstr "리소스 í´ë¦½ë³´ë“œ 편집" #: editor/inspector_dock.cpp msgid "Copy Resource" -msgstr "리소스 복사하기" +msgstr "리소스 복사" #: editor/inspector_dock.cpp msgid "Make Built-In" @@ -4018,27 +4029,27 @@ msgstr "ë„움ë§ì—서 열기" #: editor/inspector_dock.cpp msgid "Create a new resource in memory and edit it." -msgstr "새 리소스를 메모리ì—서 ë§Œë“¤ê³ íŽ¸ì§‘í•´ìš”." +msgstr "새 리소스를 메모리ì—서 ë§Œë“¤ê³ íŽ¸ì§‘í•©ë‹ˆë‹¤." #: editor/inspector_dock.cpp msgid "Load an existing resource from disk and edit it." -msgstr "디스í¬ì—서 기존 리소스를 ë¶ˆëŸ¬ì˜¤ê³ íŽ¸ì§‘í•´ìš”." +msgstr "디스í¬ì—서 기존 리소스를 ë¶ˆëŸ¬ì˜¤ê³ íŽ¸ì§‘í•©ë‹ˆë‹¤." #: editor/inspector_dock.cpp msgid "Save the currently edited resource." -msgstr "현재 편집하는 리소스를 ì €ìž¥í•´ìš”." +msgstr "현재 편집하는 리소스를 ì €ìž¥í•©ë‹ˆë‹¤." #: editor/inspector_dock.cpp msgid "Go to the previous edited object in history." -msgstr "기ë¡ì—서 ì´ì „ì— íŽ¸ì§‘í•œ ê°ì²´ë¡œ 가요." +msgstr "기ë¡ìƒ ì´ì „ì— íŽ¸ì§‘í–ˆë˜ ê°ì²´ë¡œ ì´ë™í•©ë‹ˆë‹¤." #: editor/inspector_dock.cpp msgid "Go to the next edited object in history." -msgstr "기ë¡ì—서 다ìŒì— 편집한 ê°ì²´ë¡œ 가요." +msgstr "기ë¡ìƒ 다ìŒì— íŽ¸ì§‘í–ˆë˜ ê°ì²´ë¡œ ì´ë™í•©ë‹ˆë‹¤." #: editor/inspector_dock.cpp msgid "History of recently edited objects." -msgstr "ìµœê·¼ì— íŽ¸ì§‘í•œ ê°ì²´ 기ë¡ì´ì—ìš”." +msgstr "ìµœê·¼ì— íŽ¸ì§‘í•œ ê°ì²´ 기ë¡ìž…니다." #: editor/inspector_dock.cpp msgid "Object properties." @@ -4050,11 +4061,11 @@ msgstr "í•„í„° ì†ì„±" #: editor/inspector_dock.cpp msgid "Changes may be lost!" -msgstr "변경 사í•ì„ ìžƒì„ ìˆ˜ë„ ìžˆì–´ìš”!" +msgstr "변경 사í•ì„ ìžƒì„ ìˆ˜ë„ ìžˆìŠµë‹ˆë‹¤!" #: editor/multi_node_edit.cpp msgid "MultiNode Set" -msgstr "다중 노드 ì„¤ì •í•˜ê¸°" +msgstr "다중 노드 ì„¤ì •" #: editor/node_dock.cpp msgid "Select a single node to edit its signals and groups." @@ -4062,7 +4073,7 @@ msgstr "시그ë„ê³¼ ê·¸ë£¹ì„ íŽ¸ì§‘í• ë…¸ë“œ 하나를 ì„ íƒí•˜ì„¸ìš”." #: editor/plugin_config_dialog.cpp msgid "Edit a Plugin" -msgstr "í”ŒëŸ¬ê·¸ì¸ íŽ¸ì§‘í•˜ê¸°" +msgstr "í”ŒëŸ¬ê·¸ì¸ íŽ¸ì§‘" #: editor/plugin_config_dialog.cpp msgid "Create a Plugin" @@ -4097,7 +4108,7 @@ msgstr "í´ë¦¬ê³¤ 만들기" #: editor/plugins/animation_blend_space_1d_editor.cpp #: editor/plugins/animation_blend_space_2d_editor.cpp msgid "Create points." -msgstr "ì 만들기." +msgstr "ì ì„ ë§Œë“니다." #: editor/plugins/abstract_polygon_2d_editor.cpp msgid "" @@ -4105,8 +4116,8 @@ msgid "" "LMB: Move Point\n" "RMB: Erase Point" msgstr "" -"ì 편집하기.\n" -"좌í´ë¦: ì ì´ë™í•˜ê¸°\n" +"ì ì„ íŽ¸ì§‘í•©ë‹ˆë‹¤.\n" +"좌í´ë¦: ì ì´ë™\n" "ìš°í´ë¦: ì 지우기" #: editor/plugins/abstract_polygon_2d_editor.cpp @@ -4116,19 +4127,19 @@ msgstr "ì 지우기." #: editor/plugins/abstract_polygon_2d_editor.cpp msgid "Edit Polygon" -msgstr "í´ë¦¬ê³¤ 편집하기" +msgstr "í´ë¦¬ê³¤ 편집" #: editor/plugins/abstract_polygon_2d_editor.cpp msgid "Insert Point" -msgstr "ì 삽입하기" +msgstr "ì 삽입" #: editor/plugins/abstract_polygon_2d_editor.cpp msgid "Edit Polygon (Remove Point)" -msgstr "í´ë¦¬ê³¤ 편집하기 (ì ì‚ì œí•˜ê¸°)" +msgstr "í´ë¦¬ê³¤ 편집 (ì ì‚ì œ)" #: editor/plugins/abstract_polygon_2d_editor.cpp msgid "Remove Polygon And Point" -msgstr "í´ë¦¬ê³¤ê³¼ ì ì‚ì œí•˜ê¸°" +msgstr "í´ë¦¬ê³¤ê³¼ ì ì‚ì œ" #: editor/plugins/animation_blend_space_1d_editor.cpp #: editor/plugins/animation_blend_space_2d_editor.cpp @@ -4136,7 +4147,7 @@ msgstr "í´ë¦¬ê³¤ê³¼ ì ì‚ì œí•˜ê¸°" #: editor/plugins/animation_state_machine_editor.cpp #: editor/plugins/sprite_frames_editor_plugin.cpp msgid "Add Animation" -msgstr "ì• ë‹ˆë©”ì´ì…˜ 추가하기" +msgstr "ì• ë‹ˆë©”ì´ì…˜ 추가" #: editor/plugins/animation_blend_space_1d_editor.cpp #: editor/plugins/animation_blend_space_2d_editor.cpp @@ -4148,7 +4159,7 @@ msgstr "불러오기..." #: editor/plugins/animation_blend_space_1d_editor.cpp #: editor/plugins/animation_blend_space_2d_editor.cpp msgid "Move Node Point" -msgstr "노드 ì ì´ë™í•˜ê¸°" +msgstr "노드 ì ì´ë™" #: editor/plugins/animation_blend_space_1d_editor.cpp msgid "Change BlendSpace1D Limits" @@ -4162,25 +4173,25 @@ msgstr "BlendSpace1D ë¼ë²¨ 바꾸기" #: editor/plugins/animation_blend_space_2d_editor.cpp #: editor/plugins/animation_state_machine_editor.cpp msgid "This type of node can't be used. Only root nodes are allowed." -msgstr "ì´ ìœ í˜•ì˜ ë…¸ë“œë¥¼ ì‚¬ìš©í• ìˆ˜ 없어요. 루트 노드만 쓸 수 있어요." +msgstr "ì´ ìœ í˜•ì˜ ë…¸ë“œë¥¼ ì‚¬ìš©í• ìˆ˜ 없습니다. 루트 노드만 쓸 수 있습니다." #: editor/plugins/animation_blend_space_1d_editor.cpp #: editor/plugins/animation_blend_space_2d_editor.cpp msgid "Add Node Point" -msgstr "노드 ì 추가하기" +msgstr "노드 ì 추가" #: editor/plugins/animation_blend_space_1d_editor.cpp #: editor/plugins/animation_blend_space_2d_editor.cpp msgid "Add Animation Point" -msgstr "ì• ë‹ˆë©”ì´ì…˜ ì 추가하기" +msgstr "ì• ë‹ˆë©”ì´ì…˜ ì 추가" #: editor/plugins/animation_blend_space_1d_editor.cpp msgid "Remove BlendSpace1D Point" -msgstr "BlendSpace1D ì ì‚ì œí•˜ê¸°" +msgstr "BlendSpace1D ì ì‚ì œ" #: editor/plugins/animation_blend_space_1d_editor.cpp msgid "Move BlendSpace1D Node Point" -msgstr "BlendSpace1D 노드 ì ì´ë™í•˜ê¸°" +msgstr "BlendSpace1D 노드 ì ì´ë™" #: editor/plugins/animation_blend_space_1d_editor.cpp #: editor/plugins/animation_blend_space_2d_editor.cpp @@ -4190,23 +4201,23 @@ msgid "" "AnimationTree is inactive.\n" "Activate to enable playback, check node warnings if activation fails." msgstr "" -"AnimationTreeê°€ êº¼ì ¸ 있어요.\n" +"AnimationTreeê°€ êº¼ì ¸ 있습니다.\n" "재ìƒí•˜ë ¤ë©´ AnimationTree를 ì¼œê³ , ì‹¤í–‰ì— ì‹¤íŒ¨í•˜ë©´ 노드 ê²½ê³ ë¥¼ 확ì¸í•˜ì„¸ìš”." #: editor/plugins/animation_blend_space_1d_editor.cpp #: editor/plugins/animation_blend_space_2d_editor.cpp msgid "Set the blending position within the space" -msgstr "공간 ë‚´ì˜ í˜¼í•© ì§€ì ì„¤ì •í•˜ê¸°" +msgstr "공간 ë‚´ì˜ í˜¼í•© ì§€ì ì„¤ì •" #: editor/plugins/animation_blend_space_1d_editor.cpp #: editor/plugins/animation_blend_space_2d_editor.cpp msgid "Select and move points, create points with RMB." -msgstr "ì ì„ ì„ íƒí•˜ê³ ì´ë™í•´ìš”. ìš°í´ë¦ìœ¼ë¡œ ì ì„ ë§Œë“œì„¸ìš”." +msgstr "ì ì„ ì„ íƒí•˜ê³ ì´ë™í•©ë‹ˆë‹¤. ìš°í´ë¦ìœ¼ë¡œ ì ì„ ë§Œë“œì„¸ìš”." #: editor/plugins/animation_blend_space_1d_editor.cpp #: editor/plugins/animation_blend_space_2d_editor.cpp scene/gui/graph_edit.cpp msgid "Enable snap and show grid." -msgstr "ìŠ¤ëƒ…ì„ ì¼œê³ ê²©ìžë¥¼ ë³´ì´ê²Œ í•´ìš”." +msgstr "ìŠ¤ëƒ…ì„ ì¼œê³ ê²©ìžë¥¼ ë³´ì´ê²Œ 합니다." #: editor/plugins/animation_blend_space_1d_editor.cpp #: editor/plugins/animation_blend_space_2d_editor.cpp @@ -4228,11 +4239,11 @@ msgstr "ì• ë‹ˆë©”ì´ì…˜ 노드 열기" #: editor/plugins/animation_blend_space_2d_editor.cpp msgid "Triangle already exists." -msgstr "삼ê°í˜•ì´ ì´ë¯¸ 있어요." +msgstr "삼ê°í˜•ì´ ì´ë¯¸ 있습니다." #: editor/plugins/animation_blend_space_2d_editor.cpp msgid "Add Triangle" -msgstr "삼ê°í˜• 추가하기" +msgstr "삼ê°í˜• 추가" #: editor/plugins/animation_blend_space_2d_editor.cpp msgid "Change BlendSpace2D Limits" @@ -4244,19 +4255,19 @@ msgstr "BlendSpace2D ë¼ë²¨ 바꾸기" #: editor/plugins/animation_blend_space_2d_editor.cpp msgid "Remove BlendSpace2D Point" -msgstr "BlendSpace2D ì ì‚ì œí•˜ê¸°" +msgstr "BlendSpace2D ì ì‚ì œ" #: editor/plugins/animation_blend_space_2d_editor.cpp msgid "Remove BlendSpace2D Triangle" -msgstr "BlendSpace2D 삼ê°í˜• ì‚ì œí•˜ê¸°" +msgstr "BlendSpace2D 삼ê°í˜• ì‚ì œ" #: editor/plugins/animation_blend_space_2d_editor.cpp msgid "BlendSpace2D does not belong to an AnimationTree node." -msgstr "BlendSpace2Dê°€ AnimationTree ë…¸ë“œì— ì†í•´ìžˆì§€ 않아요." +msgstr "BlendSpace2Dê°€ AnimationTree ë…¸ë“œì— ì†í•´ìžˆì§€ 않습니다." #: editor/plugins/animation_blend_space_2d_editor.cpp msgid "No triangles exist, so no blending can take place." -msgstr "삼ê°í˜•ì´ ì—†ì–´ìš”. í˜¼í•©ì´ ì¼ì–´ë‚˜ì§€ ì•Šì„ ê±°ì˜ˆìš”." +msgstr "삼ê°í˜•ì´ ì—†ìŠµë‹ˆë‹¤. í˜¼í•©ì´ ì¼ì–´ë‚˜ì§€ ì•Šì„ ê²ƒìž…ë‹ˆë‹¤." #: editor/plugins/animation_blend_space_2d_editor.cpp msgid "Toggle Auto Triangles" @@ -4264,7 +4275,7 @@ msgstr "ìžë™ 삼ê°í˜• í† ê¸€" #: editor/plugins/animation_blend_space_2d_editor.cpp msgid "Create triangles by connecting points." -msgstr "ì ì„ ì—°ê²°í•´ì„œ 삼ê°í˜•ì„ ë§Œë“¤ì–´ìš”." +msgstr "ì ì„ ì—°ê²°í•´ì„œ 삼ê°í˜•ì„ ë§Œë“니다." #: editor/plugins/animation_blend_space_2d_editor.cpp msgid "Erase points and triangles." @@ -4286,15 +4297,15 @@ msgstr "매개변수 변경ë¨" #: editor/plugins/animation_blend_tree_editor_plugin.cpp #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Edit Filters" -msgstr "í•„í„° 편집하기" +msgstr "í•„í„° 편집" #: editor/plugins/animation_blend_tree_editor_plugin.cpp msgid "Output node can't be added to the blend tree." -msgstr "ì¶œë ¥ 노드를 혼합 íŠ¸ë¦¬ì— ì¶”ê°€í• ìˆ˜ 없어요." +msgstr "ì¶œë ¥ 노드를 혼합 íŠ¸ë¦¬ì— ì¶”ê°€í• ìˆ˜ 없습니다." #: editor/plugins/animation_blend_tree_editor_plugin.cpp msgid "Add Node to BlendTree" -msgstr "BlendTreeì— ë…¸ë“œ 추가하기" +msgstr "BlendTreeì— ë…¸ë“œ 추가" #: editor/plugins/animation_blend_tree_editor_plugin.cpp #: editor/plugins/visual_shader_editor_plugin.cpp @@ -4303,7 +4314,7 @@ msgstr "노드 ì´ë™ë¨" #: editor/plugins/animation_blend_tree_editor_plugin.cpp msgid "Unable to connect, port may be in use or connection may be invalid." -msgstr "ì—°ê²°í• ìˆ˜ 없어요. í¬íŠ¸ê°€ 사용 중ì´ê±°ë‚˜ ì—°ê²°ì´ ìž˜ëª»ëœ ëª¨ì–‘ì´ì—ìš”." +msgstr "ì—°ê²°í• ìˆ˜ 없습니다. í¬íŠ¸ê°€ 사용 중ì´ê±°ë‚˜ ì—°ê²°ì´ ìž˜ëª»ëœ ê²ƒ 같습니다." #: editor/plugins/animation_blend_tree_editor_plugin.cpp #: editor/plugins/visual_shader_editor_plugin.cpp @@ -4317,17 +4328,17 @@ msgstr "노드 ì—°ê²° í•´ì œë¨" #: editor/plugins/animation_blend_tree_editor_plugin.cpp msgid "Set Animation" -msgstr "ì• ë‹ˆë©”ì´ì…˜ ì„¤ì •í•˜ê¸°" +msgstr "ì• ë‹ˆë©”ì´ì…˜ ì„¤ì •" #: editor/plugins/animation_blend_tree_editor_plugin.cpp #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Delete Node" -msgstr "노드 ì‚ì œí•˜ê¸°" +msgstr "노드 ì‚ì œ" #: editor/plugins/animation_blend_tree_editor_plugin.cpp #: editor/scene_tree_dock.cpp msgid "Delete Node(s)" -msgstr "노드 ì‚ì œí•˜ê¸°" +msgstr "노드 ì‚ì œ" #: editor/plugins/animation_blend_tree_editor_plugin.cpp msgid "Toggle Filter On/Off" @@ -4340,11 +4351,13 @@ msgstr "í•„í„° 바꾸기" #: editor/plugins/animation_blend_tree_editor_plugin.cpp msgid "No animation player set, so unable to retrieve track names." msgstr "" -"ì• ë‹ˆë©”ì´ì…˜ í”Œë ˆì´ì–´ê°€ ì„¤ì •ë˜ì§€ 않았어요. 그래서 트랙 ì´ë¦„ì„ ê²€ìƒ‰í• ìˆ˜ 없어요." +"ì• ë‹ˆë©”ì´ì…˜ í”Œë ˆì´ì–´ê°€ ì„¤ì •ë˜ì§€ 않았습니다. 그래서 트랙 ì´ë¦„ì„ ê²€ìƒ‰í• ìˆ˜ 없습" +"니다." #: editor/plugins/animation_blend_tree_editor_plugin.cpp msgid "Player path set is invalid, so unable to retrieve track names." -msgstr "í”Œë ˆì´ì–´ 경로 ì„¤ì •ì´ ìž˜ëª»ëì–´ìš”. 그래서 트랙 ì´ë¦„ì„ ê²€ìƒ‰í• ìˆ˜ 없어요." +msgstr "" +"í”Œë ˆì´ì–´ 경로 ì„¤ì •ì´ ìž˜ëª»ë˜ì—ˆìŠµë‹ˆë‹¤. 그래서 트랙 ì´ë¦„ì„ ê²€ìƒ‰í• ìˆ˜ 없습니다." #: editor/plugins/animation_blend_tree_editor_plugin.cpp #: editor/plugins/root_motion_editor_plugin.cpp @@ -4352,8 +4365,8 @@ msgid "" "Animation player has no valid root node path, so unable to retrieve track " "names." msgstr "" -"ì• ë‹ˆë©”ì´ì…˜ í”Œë ˆì´ì–´ê°€ ìž˜ëª»ëœ ë£¨íŠ¸ 경로를 ê°–ê³ ìžˆì–´ìš”. 그래서 트랙 ì´ë¦„ì„ ê²€ìƒ‰" -"í• ìˆ˜ 없어요." +"ì• ë‹ˆë©”ì´ì…˜ í”Œë ˆì´ì–´ê°€ ìž˜ëª»ëœ ë£¨íŠ¸ 경로를 ê°–ê³ ìžˆìŠµë‹ˆë‹¤. 그래서 트랙 ì´ë¦„ì„ ê²€" +"ìƒ‰í• ìˆ˜ 없습니다." #: editor/plugins/animation_blend_tree_editor_plugin.cpp msgid "Anim Clips" @@ -4375,7 +4388,7 @@ msgstr "노드 ì´ë¦„ 바뀜" #: editor/plugins/animation_blend_tree_editor_plugin.cpp #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Add Node..." -msgstr "노드 추가하기..." +msgstr "노드 추가..." #: editor/plugins/animation_blend_tree_editor_plugin.cpp #: editor/plugins/root_motion_editor_plugin.cpp @@ -4410,15 +4423,15 @@ msgstr "ì• ë‹ˆë©”ì´ì…˜ì„ ì‚ì œí• ê¹Œìš”?" #: editor/plugins/animation_player_editor_plugin.cpp #: editor/plugins/sprite_frames_editor_plugin.cpp msgid "Remove Animation" -msgstr "ì• ë‹ˆë©”ì´ì…˜ ì‚ì œí•˜ê¸°" +msgstr "ì• ë‹ˆë©”ì´ì…˜ ì‚ì œ" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Invalid animation name!" -msgstr "ì• ë‹ˆë©”ì´ì…˜ ì´ë¦„ì´ ìž˜ëª»ëì–´ìš”!" +msgstr "ì• ë‹ˆë©”ì´ì…˜ ì´ë¦„ì´ ìž˜ëª»ë˜ì—ˆìŠµë‹ˆë‹¤!" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Animation name already exists!" -msgstr "ì• ë‹ˆë©”ì´ì…˜ ì´ë¦„ì´ ì´ë¯¸ 있어요!" +msgstr "ì• ë‹ˆë©”ì´ì…˜ ì´ë¦„ì´ ì´ë¯¸ 있습니다!" #: editor/plugins/animation_player_editor_plugin.cpp #: editor/plugins/sprite_frames_editor_plugin.cpp @@ -4439,15 +4452,15 @@ msgstr "ì• ë‹ˆë©”ì´ì…˜ 불러오기" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Duplicate Animation" -msgstr "ì• ë‹ˆë©”ì´ì…˜ ë³µì œí•˜ê¸°" +msgstr "ì• ë‹ˆë©”ì´ì…˜ ë³µì œ" #: editor/plugins/animation_player_editor_plugin.cpp msgid "No animation to copy!" -msgstr "ë³µì‚¬í• ì• ë‹ˆë©”ì´ì…˜ì´ 없어요!" +msgstr "ë³µì‚¬í• ì• ë‹ˆë©”ì´ì…˜ì´ 없습니다!" #: editor/plugins/animation_player_editor_plugin.cpp msgid "No animation resource on clipboard!" -msgstr "í´ë¦½ë³´ë“œì— ì• ë‹ˆë©”ì´ì…˜ 리소스가 없어요!" +msgstr "í´ë¦½ë³´ë“œì— ì• ë‹ˆë©”ì´ì…˜ 리소스가 없습니다!" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Pasted Animation" @@ -4459,27 +4472,27 @@ msgstr "ì• ë‹ˆë©”ì´ì…˜ 붙여넣기" #: editor/plugins/animation_player_editor_plugin.cpp msgid "No animation to edit!" -msgstr "íŽ¸ì§‘í• ì• ë‹ˆë©”ì´ì…˜ì´ 없어요!" +msgstr "íŽ¸ì§‘í• ì• ë‹ˆë©”ì´ì…˜ì´ 없습니다!" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Play selected animation backwards from current pos. (A)" -msgstr "ì„ íƒí•œ ì• ë‹ˆë©”ì´ì…˜ì„ 현재 위치ì—서 거꾸로 재ìƒí•´ìš”. (A)" +msgstr "ì„ íƒí•œ ì• ë‹ˆë©”ì´ì…˜ì„ 현재 위치ì—서 거꾸로 재ìƒí•©ë‹ˆë‹¤. (A)" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Play selected animation backwards from end. (Shift+A)" -msgstr "ì„ íƒí•œ ì• ë‹ˆë©”ì´ì…˜ì„ ëì—서 거꾸로 재ìƒí•´ìš”. (Shift+A)" +msgstr "ì„ íƒí•œ ì• ë‹ˆë©”ì´ì…˜ì„ ëì—서 거꾸로 재ìƒí•©ë‹ˆë‹¤. (Shift+A)" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Stop animation playback. (S)" -msgstr "ì• ë‹ˆë©”ì´ì…˜ 재ìƒì„ 멈춰요. (S)" +msgstr "ì• ë‹ˆë©”ì´ì…˜ 재ìƒì„ 중단합니다. (S)" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Play selected animation from start. (Shift+D)" -msgstr "ì„ íƒí•œ ì• ë‹ˆë©”ì´ì…˜ì„ 처ìŒë¶€í„° 재ìƒí•´ìš”. (Shift+D)" +msgstr "ì„ íƒí•œ ì• ë‹ˆë©”ì´ì…˜ì„ 처ìŒë¶€í„° 재ìƒí•©ë‹ˆë‹¤. (Shift+D)" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Play selected animation from current pos. (D)" -msgstr "ì„ íƒí•œ ì• ë‹ˆë©”ì´ì…˜ì„ 현재 위치부터 재ìƒí•´ìš”. (D)" +msgstr "ì„ íƒí•œ ì• ë‹ˆë©”ì´ì…˜ì„ 현재 위치부터 재ìƒí•©ë‹ˆë‹¤. (D)" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Animation position (in seconds)." @@ -4487,7 +4500,7 @@ msgstr "ì• ë‹ˆë©”ì´ì…˜ 위치 (ì´ˆ)." #: editor/plugins/animation_player_editor_plugin.cpp msgid "Scale animation playback globally for the node." -msgstr "ë…¸ë“œì˜ ì• ë‹ˆë©”ì´ì…˜ ìž¬ìƒ ê¸¸ì´ë¥¼ ì „ì²´ì 으로 ì¡°ì ˆí•´ìš”." +msgstr "ë…¸ë“œì˜ ì• ë‹ˆë©”ì´ì…˜ ìž¬ìƒ ê¸¸ì´ë¥¼ ì „ì²´ì 으로 ì¡°ì ˆí•©ë‹ˆë‹¤." #: editor/plugins/animation_player_editor_plugin.cpp msgid "Animation Tools" @@ -4499,7 +4512,7 @@ msgstr "ì• ë‹ˆë©”ì´ì…˜(Animation)" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Edit Transitions..." -msgstr "ì „í™˜ 편집하기..." +msgstr "ì „í™˜ 편집..." #: editor/plugins/animation_player_editor_plugin.cpp msgid "Open in Inspector" @@ -4507,11 +4520,11 @@ msgstr "ì¸ìŠ¤íŽ™í„°ì—서 열기" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Display list of animations in player." -msgstr "ì• ë‹ˆë©”ì´ì…˜ 목ë¡ì„ 표시해요." +msgstr "ì• ë‹ˆë©”ì´ì…˜ 목ë¡ì„ 표시합니다." #: editor/plugins/animation_player_editor_plugin.cpp msgid "Autoplay on Load" -msgstr "불러올 시 ìžë™ìœ¼ë¡œ 재ìƒí•˜ê¸°" +msgstr "불러올 시 ìžë™ìœ¼ë¡œ 재ìƒ" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Enable Onion Skinning" @@ -4555,7 +4568,7 @@ msgstr "변경 사í•ë§Œ" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Force White Modulate" -msgstr "ê°•ì œ í°ìƒ‰ ì¡°ì ˆí•˜ê¸°" +msgstr "ê°•ì œ í°ìƒ‰ ì¡°ì ˆ" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Include Gizmos (3D)" @@ -4563,7 +4576,7 @@ msgstr "기즈모 í¬í•¨ (3D)" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Pin AnimationPlayer" -msgstr "AnimationPlayer ê³ ì •í•˜ê¸°" +msgstr "AnimationPlayer ê³ ì •" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Create New Animation" @@ -4594,20 +4607,20 @@ msgstr "êµì°¨-ì• ë‹ˆë©”ì´ì…˜ 혼합 시간" #: editor/plugins/animation_state_machine_editor.cpp msgid "Move Node" -msgstr "노드 ì´ë™í•˜ê¸°" +msgstr "노드 ì´ë™" #: editor/plugins/animation_state_machine_editor.cpp msgid "Transition exists!" -msgstr "ì „í™˜ì´ ìžˆì–´ìš”!" +msgstr "ì „í™˜ì´ ìžˆìŠµë‹ˆë‹¤!" #: editor/plugins/animation_state_machine_editor.cpp msgid "Add Transition" -msgstr "ì „í™˜ 추가하기" +msgstr "ì „í™˜ 추가" #: editor/plugins/animation_state_machine_editor.cpp #: modules/visual_script/visual_script_editor.cpp msgid "Add Node" -msgstr "노드 추가하기" +msgstr "노드 추가" #: editor/plugins/animation_state_machine_editor.cpp msgid "End" @@ -4631,7 +4644,7 @@ msgstr "ì§„í–‰" #: editor/plugins/animation_state_machine_editor.cpp msgid "Start and end nodes are needed for a sub-transition." -msgstr "하위 ì „í™˜ì—는 시작과 ë 노드가 필요해요." +msgstr "하위 ì „í™˜ì—는 시작과 ë 노드가 필요합니다." #: editor/plugins/animation_state_machine_editor.cpp msgid "No playback resource set at path: %s." @@ -4647,7 +4660,7 @@ msgstr "ì „í™˜ ì‚ì œë¨" #: editor/plugins/animation_state_machine_editor.cpp msgid "Set Start Node (Autoplay)" -msgstr "시작 노드 ì„¤ì •í•˜ê¸° (ìžë™ 재ìƒ)" +msgstr "시작 노드 ì„¤ì • (ìžë™ 재ìƒ)" #: editor/plugins/animation_state_machine_editor.cpp msgid "" @@ -4655,29 +4668,30 @@ msgid "" "RMB to add new nodes.\n" "Shift+LMB to create connections." msgstr "" -"노드를 ì„ íƒí•˜ê³ ì´ë™í•´ìš”.\n" -"ìš°í´ë¦ìœ¼ë¡œ 새 노드를 추가해요.\n" -"Shift+좌í´ë¦ìœ¼ë¡œ ì—°ê²°ì„ ë§Œë“¤ì–´ìš”." +"노드를 ì„ íƒí•˜ê³ ì´ë™í•©ë‹ˆë‹¤.\n" +"ìš°í´ë¦ìœ¼ë¡œ 새 노드를 추가합니다.\n" +"Shift+좌í´ë¦ìœ¼ë¡œ ì—°ê²°ì„ ë§Œë“니다." #: editor/plugins/animation_state_machine_editor.cpp msgid "Create new nodes." -msgstr "새 노드를 만들어요." +msgstr "새 노드를 ë§Œë“니다." #: editor/plugins/animation_state_machine_editor.cpp msgid "Connect nodes." -msgstr "노드를 ì—°ê²°í•´ìš”." +msgstr "노드를 연결합니다." #: editor/plugins/animation_state_machine_editor.cpp msgid "Remove selected node or transition." -msgstr "ì„ íƒí•œ 노드나 ì „í™˜ì„ ì‚ì œí•´ìš”." +msgstr "ì„ íƒí•œ 노드나 ì „í™˜ì„ ì‚ì œí•©ë‹ˆë‹¤." #: editor/plugins/animation_state_machine_editor.cpp msgid "Toggle autoplay this animation on start, restart or seek to zero." -msgstr "ì´ ì• ë‹ˆë©”ì´ì…˜ì„ 시작, 재시작, í˜¹ì€ 0으로 ê°€ë„ë¡ ìžë™ 재ìƒì„ í† ê¸€í•´ìš”." +msgstr "" +"ì´ ì• ë‹ˆë©”ì´ì…˜ì„ 시작, 재시작, í˜¹ì€ 0으로 ê°€ë„ë¡ ìžë™ 재ìƒì„ í† ê¸€í•©ë‹ˆë‹¤." #: editor/plugins/animation_state_machine_editor.cpp msgid "Set the end animation. This is useful for sub-transitions." -msgstr "ë ì• ë‹ˆë©”ì´ì…˜ì„ ì„¤ì •í•´ìš”. ì´ê²ƒì€ 하위 ì „í™˜ì— ìœ ìš©í•´ìš”." +msgstr "ë ì• ë‹ˆë©”ì´ì…˜ì„ ì„¤ì •í•©ë‹ˆë‹¤. ì´ê²ƒì€ 하위 ì „í™˜ì— ìœ ìš©í•©ë‹ˆë‹¤." #: editor/plugins/animation_state_machine_editor.cpp msgid "Transition: " @@ -4758,7 +4772,7 @@ msgstr "현재:" #: editor/plugins/visual_shader_editor_plugin.cpp #: modules/visual_script/visual_script_editor.cpp msgid "Add Input" -msgstr "ìž…ë ¥ 추가하기" +msgstr "ìž…ë ¥ 추가" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Clear Auto-Advance" @@ -4766,19 +4780,19 @@ msgstr "ìžë™ ì§„í–‰ 지우기" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Set Auto-Advance" -msgstr "ìžë™ ì§„í–‰ ì„¤ì •í•˜ê¸°" +msgstr "ìžë™ ì§„í–‰ ì„¤ì •" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Delete Input" -msgstr "ìž…ë ¥ ì‚ì œí•˜ê¸°" +msgstr "ìž…ë ¥ ì‚ì œ" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Animation tree is valid." -msgstr "ì• ë‹ˆë©”ì´ì…˜ 트리는 ì •ìƒì´ì—ìš”." +msgstr "ì• ë‹ˆë©”ì´ì…˜ 트리는 ì •ìƒìž…니다." #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Animation tree is invalid." -msgstr "ì• ë‹ˆë©”ì´ì…˜ 트리가 잘못ëì–´ìš”." +msgstr "ì• ë‹ˆë©”ì´ì…˜ 트리가 잘못ë˜ì—ˆìŠµë‹ˆë‹¤." #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Animation Node" @@ -4822,7 +4836,7 @@ msgstr "ì• ë‹ˆë©”ì´ì…˜ ê°€ì ¸ì˜¤ê¸°..." #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Edit Node Filters" -msgstr "노드 í•„í„° 편집하기" +msgstr "노드 í•„í„° 편집" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Filters..." @@ -4926,11 +4940,11 @@ msgstr "대기" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Install..." -msgstr "설치하기..." +msgstr "설치..." #: editor/plugins/asset_library_editor_plugin.cpp msgid "Retry" -msgstr "다시 시ë„하기" +msgstr "다시 시ë„" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Download Error" @@ -4938,7 +4952,7 @@ msgstr "다운로드 오류" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Download for this asset is already in progress!" -msgstr "ì´ ì• ì…‹ì€ ì´ë¯¸ 다운로드 중ì´ì—ìš”!" +msgstr "ì´ ì• ì…‹ì€ ì´ë¯¸ 다운로드 중입니다!" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Recently Updated" @@ -4986,7 +5000,7 @@ msgstr "모ë‘" #: editor/plugins/asset_library_editor_plugin.cpp msgid "No results for \"%s\"." -msgstr "\"%s\"ì— ëŒ€í•œ 결과가 없어요." +msgstr "\"%s\"ì— ëŒ€í•œ 결과가 없습니다." #: editor/plugins/asset_library_editor_plugin.cpp msgid "Import..." @@ -5035,7 +5049,7 @@ msgid "" "Save your scene (for images to be saved in the same dir), or pick a save " "path from the BakedLightmap properties." msgstr "" -"ë¼ì´íŠ¸ë§µ ì´ë¯¸ì§€ì˜ ì €ìž¥ 경로를 íŒŒì•…í• ìˆ˜ 없어요.\n" +"ë¼ì´íŠ¸ë§µ ì´ë¯¸ì§€ì˜ ì €ìž¥ 경로를 íŒŒì•…í• ìˆ˜ 없습니다.\n" "(ê°™ì€ ê²½ë¡œì— ì´ë¯¸ì§€ë¥¼ ì €ìž¥í• ìˆ˜ 있ë„ë¡) ì”¬ì„ ì €ìž¥í•˜ê±°ë‚˜, BakedLightmap ì†ì„±ì—" "서 ì €ìž¥ 경로를 ì§€ì •í•˜ì„¸ìš”." @@ -5044,8 +5058,8 @@ msgid "" "No meshes to bake. Make sure they contain an UV2 channel and that the 'Bake " "Light' flag is on." msgstr "" -"ë¼ì´íŠ¸ë§µì„ êµ¬ìš¸ 메시가 없어요. 메시가 UV2 채ë„ì„ ê°–ê³ ìžˆê³ 'Bake Light' 플래" -"그가 ì¼œì ¸ 있는지 확ì¸í•´ì£¼ì„¸ìš”." +"ë¼ì´íŠ¸ë§µì„ êµ¬ìš¸ 메시가 없습니다. 메시가 UV2 채ë„ì„ ê°–ê³ ìžˆê³ 'Bake Light' 플" +"래그가 ì¼œì ¸ 있는지 확ì¸í•´ì£¼ì„¸ìš”." #: editor/plugins/baked_lightmap_editor_plugin.cpp msgid "Failed creating lightmap images, make sure path is writable." @@ -5094,7 +5108,7 @@ msgstr "í¬ê¸° ì¡°ì ˆ 단계:" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Move Vertical Guide" -msgstr "ìˆ˜ì§ ê°€ì´ë“œ ì´ë™í•˜ê¸°" +msgstr "ìˆ˜ì§ ê°€ì´ë“œ ì´ë™" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Create Vertical Guide" @@ -5102,11 +5116,11 @@ msgstr "ìˆ˜ì§ ê°€ì´ë“œ 만들기" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Remove Vertical Guide" -msgstr "ìˆ˜ì§ ê°€ì´ë“œ ì‚ì œí•˜ê¸°" +msgstr "ìˆ˜ì§ ê°€ì´ë“œ ì‚ì œ" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Move Horizontal Guide" -msgstr "ìˆ˜í‰ ê°€ì´ë“œ ì´ë™í•˜ê¸°" +msgstr "ìˆ˜í‰ ê°€ì´ë“œ ì´ë™" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Create Horizontal Guide" @@ -5114,7 +5128,7 @@ msgstr "ìˆ˜í‰ ê°€ì´ë“œ 만들기" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Remove Horizontal Guide" -msgstr "ìˆ˜í‰ ê°€ì´ë“œ ì‚ì œí•˜ê¸°" +msgstr "ìˆ˜í‰ ê°€ì´ë“œ ì‚ì œ" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Create Horizontal and Vertical Guides" @@ -5122,19 +5136,19 @@ msgstr "ìˆ˜í‰ ë° ìˆ˜ì§ ê°€ì´ë“œ 만들기" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Move pivot" -msgstr "피벗 ì´ë™í•˜ê¸°" +msgstr "피벗 ì´ë™" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Rotate CanvasItem" -msgstr "CanvasItem íšŒì „í•˜ê¸°" +msgstr "CanvasItem íšŒì „" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Move anchor" -msgstr "앵커 ì´ë™í•˜ê¸°" +msgstr "앵커 ì´ë™" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Resize CanvasItem" -msgstr "CanvasItem í¬ê¸° ì¡°ì ˆí•˜ê¸°" +msgstr "CanvasItem í¬ê¸° ì¡°ì ˆ" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Scale CanvasItem" @@ -5142,13 +5156,13 @@ msgstr "CanvasItem 규모" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Move CanvasItem" -msgstr "CanvasItem ì´ë™í•˜ê¸°" +msgstr "CanvasItem ì´ë™" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "" "Children of containers have their anchors and margins values overridden by " "their parent." -msgstr "컨테ì´ë„ˆì˜ ìžì‹ì€ 부모로 ì¸í•´ 다시 ì •ì˜ëœ 앵커와 여백 ê°’ì„ ê°€ì ¸ìš”." +msgstr "컨테ì´ë„ˆì˜ ìžì‹ì€ 부모로 ì¸í•´ ìž¬ì •ì˜ëœ 앵커와 여백 ê°’ì„ ê°€ì§‘ë‹ˆë‹¤." #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Presets for the anchors and margins values of a Control node." @@ -5158,7 +5172,7 @@ msgstr "Control ë…¸ë“œì˜ ì•µì»¤ì™€ 여백 ê°’ì˜ í”„ë¦¬ì…‹." msgid "" "When active, moving Control nodes changes their anchors instead of their " "margins." -msgstr "ì´ ì„¤ì •ì„ ì¼œë©´, Control 노드는 움ì§ì´ë©´ì„œ ì—¬ë°±ì´ ì•„ë‹Œ 앵커를 바꿔요." +msgstr "ì´ ì„¤ì •ì„ ì¼œë©´, Control 노드는 움ì§ì´ë©´ì„œ ì—¬ë°±ì´ ì•„ë‹Œ 앵커를 바꿉니다." #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Top Left" @@ -5226,7 +5240,7 @@ msgstr "사ê°í˜• ì „ì²´" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Keep Ratio" -msgstr "비율 ìœ ì§€í•˜ê¸°" +msgstr "비율 ìœ ì§€" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Anchors only" @@ -5246,8 +5260,8 @@ msgid "" "Game Camera Override\n" "Overrides game camera with editor viewport camera." msgstr "" -"게임 ì¹´ë©”ë¼ ë‹¤ì‹œ ì •ì˜í•˜ê¸°\n" -"편집기 ë·°í¬íЏ ì¹´ë©”ë¼ë¡œ 게임 ì¹´ë©”ë¼ë¥¼ 다시 ì •ì˜í•´ìš”." +"게임 ì¹´ë©”ë¼ ë‹¤ì‹œ ì •ì˜\n" +"편집기 ë·°í¬íЏ ì¹´ë©”ë¼ë¡œ 게임 ì¹´ë©”ë¼ë¥¼ 다시 ì •ì˜í•©ë‹ˆë‹¤." #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -5255,8 +5269,8 @@ msgid "" "Game Camera Override\n" "No game instance running." msgstr "" -"게임 ì¹´ë©”ë¼ ë‹¤ì‹œ ì •ì˜í•˜ê¸°\n" -"ì‹¤í–‰í•˜ê³ ìžˆëŠ” 게임 ì¸ìŠ¤í„´ìŠ¤ê°€ 없어요." +"게임 ì¹´ë©”ë¼ ë‹¤ì‹œ ì •ì˜\n" +"ì‹¤í–‰í•˜ê³ ìžˆëŠ” 게임 ì¸ìŠ¤í„´ìŠ¤ê°€ 없습니다." #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -5306,7 +5320,7 @@ msgstr "IK ì²´ì¸ ì§€ìš°ê¸°" msgid "" "Warning: Children of a container get their position and size determined only " "by their parent." -msgstr "ê²½ê³ : 컨테ì´ë„ˆì˜ ìžì‹ 규모와 위치는 ë¶€ëª¨ì— ì˜í•´ ê²°ì •ë¼ìš”." +msgstr "ê²½ê³ : 컨테ì´ë„ˆì˜ ìžì‹ 규모와 위치는 ë¶€ëª¨ì— ì˜í•´ ê²°ì •ë©ë‹ˆë‹¤." #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/texture_region_editor_plugin.cpp @@ -5325,7 +5339,7 @@ msgstr "드래그: íšŒì „" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Alt+Drag: Move" -msgstr "Alt+드래그: ì´ë™í•˜ê¸°" +msgstr "Alt+드래그: ì´ë™" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Press 'v' to Change Pivot, 'Shift+v' to Drag Pivot (while moving)." @@ -5333,7 +5347,7 @@ msgstr "'v'키로 피벗 바꾸기. 'Shift+v'키로 피벗 드래그 (ì´ë™í•˜ë #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Alt+RMB: Depth list selection" -msgstr "Alt+ìš°í´ë¦: 겹친 ëª©ë¡ ì„ íƒí•˜ê¸°" +msgstr "Alt+ìš°í´ë¦: 겹친 ëª©ë¡ ì„ íƒ" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -5361,7 +5375,7 @@ msgstr "" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Click to change object's rotation pivot." -msgstr "í´ë¦ìœ¼ë¡œ ê°ì²´ì˜ íšŒì „ í”¼ë²—ì„ ë°”ê¿”ìš”." +msgstr "í´ë¦ìœ¼ë¡œ ê°ì²´ì˜ íšŒì „ í”¼ë²—ì„ ë°”ê¿‰ë‹ˆë‹¤." #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Pan Mode" @@ -5377,7 +5391,7 @@ msgstr "스마트 스냅 í† ê¸€." #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Use Smart Snap" -msgstr "스마트 스냅 사용하기" +msgstr "스마트 스냅 사용" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Toggle grid snapping." @@ -5385,7 +5399,7 @@ msgstr "ê²©ìž ìŠ¤ëƒ… í† ê¸€." #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Use Grid Snap" -msgstr "ê²©ìž ìŠ¤ëƒ… 사용하기" +msgstr "ê²©ìž ìŠ¤ëƒ… 사용" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Snapping Options" @@ -5393,11 +5407,11 @@ msgstr "스냅 ì„¤ì •" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Use Rotation Snap" -msgstr "íšŒì „ 스냅 사용하기" +msgstr "íšŒì „ 스냅 사용" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Use Scale Snap" -msgstr "스마트 스냅 사용하기" +msgstr "스마트 스냅 사용" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Snap Relative" @@ -5405,7 +5419,7 @@ msgstr "ìƒëŒ€ì ì¸ ìŠ¤ëƒ…" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Use Pixel Snap" -msgstr "픽셀 스냅 사용하기" +msgstr "픽셀 스냅 사용" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Smart Snapping" @@ -5414,7 +5428,7 @@ msgstr "스마트 스냅" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp msgid "Configure Snap..." -msgstr "스냅 ì„¤ì •í•˜ê¸°..." +msgstr "스냅 ì„¤ì •..." #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Snap to Parent" @@ -5443,22 +5457,22 @@ msgstr "ê°€ì´ë“œì— 스냅" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp msgid "Lock the selected object in place (can't be moved)." -msgstr "ì„ íƒí•œ ê°ì²´ë¥¼ ê·¸ ìžë¦¬ì— ìž ê°€ìš” (움ì§ì¼ 수 없어요)." +msgstr "ì„ íƒí•œ ê°ì²´ë¥¼ ê·¸ ìžë¦¬ì— ìž ê°€ìš” (움ì§ì¼ 수 없습니다)." #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp msgid "Unlock the selected object (can be moved)." -msgstr "ì„ íƒí•œ ê°ì²´ë¥¼ ìž ê¸ˆì—서 풀어요 (움ì§ì¼ 수 있어요)." +msgstr "ì„ íƒí•œ ê°ì²´ë¥¼ ìž ê¸ˆì—서 í’€ (움ì§ì¼ 수 있습니다)." #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp msgid "Makes sure the object's children are not selectable." -msgstr "ê°ì²´ì˜ ìžì‹ì„ ì„ íƒí•˜ì§€ 않ë„ë¡ í•´ìš”." +msgstr "ê°ì²´ì˜ ìžì‹ì„ ì„ íƒí•˜ì§€ 않ë„ë¡ í•©ë‹ˆë‹¤." #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp msgid "Restores the object's children's ability to be selected." -msgstr "ê°ì²´ì˜ ìžì‹ì„ ì„ íƒí• 수 있ë„ë¡ í•´ìš”." +msgstr "ê°ì²´ì˜ ìžì‹ì„ ì„ íƒí• 수 있ë„ë¡ í•©ë‹ˆë‹¤." #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Skeleton Options" @@ -5544,14 +5558,14 @@ msgid "" "Keys are only added to existing tracks, no new tracks will be created.\n" "Keys must be inserted manually for the first time." msgstr "" -"ê°ì²´ë¥¼ ì „í™˜, íšŒì „ ë˜ëŠ” í¬ê¸° ì¡°ì ˆí• ë•Œë§ˆë‹¤ ìžë™ìœ¼ë¡œ 키를 삽입해요 (ë§ˆìŠ¤í¬ ê¸°" +"ê°ì²´ë¥¼ ì „í™˜, íšŒì „ ë˜ëŠ” í¬ê¸° ì¡°ì ˆí• ë•Œë§ˆë‹¤ ìžë™ìœ¼ë¡œ 키를 삽입합니다 (ë§ˆìŠ¤í¬ ê¸°" "준).\n" -"키는 기존 트랙ì—ë§Œ 추가ë˜ê³ , 새 íŠ¸ëž™ì„ ì¶”ê°€í•˜ì§„ 않아요.\n" -"처ìŒì—는 수ë™ìœ¼ë¡œ 키를 삽입해야 í•´ìš”." +"키는 기존 트랙ì—ë§Œ 추가ë˜ê³ , 새 íŠ¸ëž™ì„ ì¶”ê°€í•˜ì§„ 않습니다.\n" +"처ìŒì—는 수ë™ìœ¼ë¡œ 키를 삽입해야 합니다." #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Auto Insert Key" -msgstr "ìžë™ìœ¼ë¡œ 키 삽입하기" +msgstr "ìžë™ìœ¼ë¡œ 키 삽입" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Animation Key and Pose Options" @@ -5559,11 +5573,11 @@ msgstr "ì• ë‹ˆë©”ì´ì…˜ 키와 í¬ì¦ˆ ì„¤ì •" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Insert Key (Existing Tracks)" -msgstr "키 삽입하기 (기존 트랙)" +msgstr "키 삽입 (기존 트랙)" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Copy Pose" -msgstr "í¬ì¦ˆ 복사하기" +msgstr "í¬ì¦ˆ 복사" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Clear Pose" @@ -5583,7 +5597,7 @@ msgstr "팬 보기" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Add %s" -msgstr "%s 추가하기" +msgstr "%s 추가" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Adding %s..." @@ -5591,7 +5605,7 @@ msgstr "%s 추가하는 중..." #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Cannot instantiate multiple nodes without root." -msgstr "루트 노드 ì—†ì´ëŠ” 여러 노드를 ì¸ìŠ¤í„´ìŠ¤í• ìˆ˜ 없어요." +msgstr "루트 노드 ì—†ì´ëŠ” 여러 노드를 ì¸ìŠ¤í„´ìŠ¤í• ìˆ˜ 없습니다." #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp @@ -5612,7 +5626,7 @@ msgid "" "Drag & drop + Shift : Add node as sibling\n" "Drag & drop + Alt : Change node type" msgstr "" -"드래그 & ë“œë¡ + Shift : í˜•ì œ 노드로 추가하기\n" +"드래그 & ë“œë¡ + Shift : í˜•ì œ 노드로 추가\n" "드래그 & ë“œë¡ + Alt : 노드 ìœ í˜• 바꾸기" #: editor/plugins/collision_polygon_editor_plugin.cpp @@ -5621,15 +5635,15 @@ msgstr "Polygon3D 만들기" #: editor/plugins/collision_polygon_editor_plugin.cpp msgid "Edit Poly" -msgstr "í´ë¦¬ê³¤ 편집하기" +msgstr "í´ë¦¬ê³¤ 편집" #: editor/plugins/collision_polygon_editor_plugin.cpp msgid "Edit Poly (Remove Point)" -msgstr "í´ë¦¬ê³¤ 편집하기 (ì ì‚ì œí•˜ê¸°)" +msgstr "í´ë¦¬ê³¤ 편집 (ì ì‚ì œ)" #: editor/plugins/collision_shape_2d_editor_plugin.cpp msgid "Set Handle" -msgstr "핸들 ì„¤ì •í•˜ê¸°" +msgstr "핸들 ì„¤ì •" #: editor/plugins/cpu_particles_2d_editor_plugin.cpp #: editor/plugins/particles_2d_editor_plugin.cpp @@ -5641,7 +5655,7 @@ msgstr "ë°©ì¶œ ë§ˆìŠ¤í¬ ë¶ˆëŸ¬ì˜¤ê¸°" #: editor/plugins/particles_2d_editor_plugin.cpp #: editor/plugins/particles_editor_plugin.cpp msgid "Restart" -msgstr "다시 시작하기" +msgstr "다시 시작" #: editor/plugins/cpu_particles_2d_editor_plugin.cpp #: editor/plugins/particles_2d_editor_plugin.cpp @@ -5725,11 +5739,11 @@ msgstr "부드러운 단계" #: editor/plugins/curve_editor_plugin.cpp msgid "Modify Curve Point" -msgstr "ê³¡ì„ ì ìˆ˜ì •í•˜ê¸°" +msgstr "ê³¡ì„ ì ìˆ˜ì •" #: editor/plugins/curve_editor_plugin.cpp msgid "Modify Curve Tangent" -msgstr "ê³¡ì„ íƒ„ì 트 ìˆ˜ì •í•˜ê¸°" +msgstr "ê³¡ì„ íƒ„ì 트 ìˆ˜ì •" #: editor/plugins/curve_editor_plugin.cpp msgid "Load Curve Preset" @@ -5737,11 +5751,11 @@ msgstr "ê³¡ì„ í”„ë¦¬ì…‹ 불러오기" #: editor/plugins/curve_editor_plugin.cpp msgid "Add Point" -msgstr "ì 추가하기" +msgstr "ì 추가" #: editor/plugins/curve_editor_plugin.cpp msgid "Remove Point" -msgstr "ì ì‚ì œí•˜ê¸°" +msgstr "ì ì‚ì œ" #: editor/plugins/curve_editor_plugin.cpp msgid "Left Linear" @@ -5757,7 +5771,7 @@ msgstr "프리셋 불러오기" #: editor/plugins/curve_editor_plugin.cpp msgid "Remove Curve Point" -msgstr "ê³¡ì„ ì ì‚ì œí•˜ê¸°" +msgstr "ê³¡ì„ ì ì‚ì œ" #: editor/plugins/curve_editor_plugin.cpp msgid "Toggle Curve Linear Tangent" @@ -5765,7 +5779,7 @@ msgstr "ê³¡ì„ ì„ í˜• 탄ì 트 í† ê¸€" #: editor/plugins/curve_editor_plugin.cpp msgid "Hold Shift to edit tangents individually" -msgstr "Shift키를 눌러서 탄ì 트를 개별ì 으로 편집하기" +msgstr "Shift키를 눌러서 탄ì 트를 개별ì 으로 편집" #: editor/plugins/curve_editor_plugin.cpp msgid "Right click to add point" @@ -5797,30 +5811,50 @@ msgstr "Occluder í´ë¦¬ê³¤ 만들기" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Mesh is empty!" -msgstr "메시가 없어요!" +msgstr "메시가 없습니다!" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Trimesh Body" -msgstr "Static Trimesh Body 만들기" +#, fuzzy +msgid "Couldn't create a Trimesh collision shape." +msgstr "Trimesh ì¶©ëŒ í˜•ì œ 만들기" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Convex Body" -msgstr "Static Convex Body 만들기" +msgid "Create Static Trimesh Body" +msgstr "Static Trimesh Body 만들기" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "This doesn't work on scene root!" -msgstr "씬 루트ì—서 ìž‘ì—…í• ìˆ˜ 없어요!" +msgstr "씬 루트ì—서 ìž‘ì—…í• ìˆ˜ 없습니다!" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Trimesh Static Shape" msgstr "Trimesh Static Shape 만들기" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Failed creating shapes!" -msgstr "Shape 만들기 실패!" +msgid "Can't create a single convex collision shape for the scene root." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Couldn't create a single convex collision shape." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Single Convex Shape" +msgstr "Convex Shape 만들기" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Can't create multiple convex collision shapes for the scene root." +msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Convex Shape(s)" +#, fuzzy +msgid "Couldn't create any collision shapes." +msgstr "í´ë”를 만들 수 없습니다." + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Multiple Convex Shapes" msgstr "Convex Shape 만들기" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -5829,35 +5863,35 @@ msgstr "내비게ì´ì…˜ 메시 만들기" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Contained Mesh is not of type ArrayMesh." -msgstr "ê°–ê³ ìžˆëŠ” 메시가 ArrayMesh ìœ í˜•ì´ ì•„ë‹ˆì—ìš”." +msgstr "ê°–ê³ ìžˆëŠ” 메시가 ArrayMesh ìœ í˜•ì´ ì•„ë‹™ë‹ˆë‹¤." #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "UV Unwrap failed, mesh may not be manifold?" -msgstr "UV 펼치기를 실패했어요. 메시가 다양한 것 ê°™ì€ë°ìš”?" +msgstr "UV 펼치기를 실패했습니다. 메시가 다양한 것 ê°™ì€ë°ìš”?" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "No mesh to debug." -msgstr "ë””ë²„ê·¸í• ë©”ì‹œê°€ 없어요." +msgstr "ë””ë²„ê·¸í• ë©”ì‹œê°€ 없습니다." #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Model has no UV in this layer" -msgstr "ì´ ë ˆì´ì–´ì—서 모ë¸ì€ UVê°€ 없어요" +msgstr "ì´ ë ˆì´ì–´ì—서 모ë¸ì€ UVê°€ 없습니다" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "MeshInstance lacks a Mesh!" -msgstr "MeshInstanceì— ë©”ì‹œê°€ 없어요!" +msgstr "MeshInstanceì— ë©”ì‹œê°€ 없습니다!" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Mesh has not surface to create outlines from!" -msgstr "ë©”ì‹œì— ìœ¤ê³½ì„ ë§Œë“¤ í‘œë©´ì´ ì—†ì–´ìš”!" +msgstr "ë©”ì‹œì— ìœ¤ê³½ì„ ë§Œë“¤ í‘œë©´ì´ ì—†ìŠµë‹ˆë‹¤!" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Mesh primitive type is not PRIMITIVE_TRIANGLES!" -msgstr "메시 기본 ìœ í˜•ì´ PRIMITIVE_TRIANGLESì´ ì•„ë‹ˆì—ìš”!" +msgstr "메시 기본 ìœ í˜•ì´ PRIMITIVE_TRIANGLESì´ ì•„ë‹™ë‹ˆë‹¤!" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Could not create outline!" -msgstr "ìœ¤ê³½ì„ ë§Œë“¤ 수 없어요!" +msgstr "ìœ¤ê³½ì„ ë§Œë“¤ 수 없습니다!" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Outline" @@ -5872,18 +5906,57 @@ msgid "Create Trimesh Static Body" msgstr "Trimesh Static Body 만들기" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a StaticBody and assigns a polygon-based collision shape to it " +"automatically.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Trimesh Collision Sibling" msgstr "Trimesh ì¶©ëŒ í˜•ì œ 만들기" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Convex Collision Sibling(s)" +msgid "" +"Creates a polygon-based collision shape.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Single Convex Collision Siblings" msgstr "Convex ì¶©ëŒ í˜•ì œ 만들기" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a single convex collision shape.\n" +"This is the fastest (but least accurate) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Multiple Convex Collision Siblings" +msgstr "Convex ì¶©ëŒ í˜•ì œ 만들기" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is a performance middle-ground between the two above options." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Outline Mesh..." msgstr "윤곽 메시 만들기..." #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a static outline mesh. The outline mesh will have its normals " +"flipped automatically.\n" +"This can be used instead of the SpatialMaterial Grow property when using " +"that property isn't possible." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "View UV1" msgstr "UV1 보기" @@ -5926,11 +5999,11 @@ msgstr "메시 ë¼ì´ë¸ŒëŸ¬ë¦¬" #: editor/plugins/mesh_library_editor_plugin.cpp #: editor/plugins/theme_editor_plugin.cpp msgid "Add Item" -msgstr "í•목 추가하기" +msgstr "í•목 추가" #: editor/plugins/mesh_library_editor_plugin.cpp msgid "Remove Selected Item" -msgstr "ì„ íƒí•œ í•목 ì‚ì œí•˜ê¸°" +msgstr "ì„ íƒí•œ í•목 ì‚ì œ" #: editor/plugins/mesh_library_editor_plugin.cpp msgid "Import from Scene" @@ -5938,52 +6011,53 @@ msgstr "씬ì—서 ê°€ì ¸ì˜¤ê¸°" #: editor/plugins/mesh_library_editor_plugin.cpp msgid "Update from Scene" -msgstr "씬ì—서 ì—…ë°ì´íŠ¸í•˜ê¸°" +msgstr "씬ì—서 ì—…ë°ì´íЏ" #: editor/plugins/multimesh_editor_plugin.cpp msgid "No mesh source specified (and no MultiMesh set in node)." msgstr "" -"메시 소스를 ì§€ì •í•˜ì§€ 않았어요 (ê·¸ë¦¬ê³ ë…¸ë“œì— MultiMesh를 ì„¤ì •í•˜ì§€ 않았어요)." +"메시 소스를 ì§€ì •í•˜ì§€ 않았습니다 (ê·¸ë¦¬ê³ ë…¸ë“œì— MultiMesh를 ì„¤ì •í•˜ì§€ 않았습니" +"다)." #: editor/plugins/multimesh_editor_plugin.cpp msgid "No mesh source specified (and MultiMesh contains no Mesh)." -msgstr "메시 소스를 ì§€ì •í•˜ì§€ 않았어요 (ê·¸ë¦¬ê³ MultiMeshì— ë©”ì‹œê°€ 없어요)." +msgstr "메시 소스를 ì§€ì •í•˜ì§€ 않았습니다 (ê·¸ë¦¬ê³ MultiMeshì— ë©”ì‹œê°€ 없습니다)." #: editor/plugins/multimesh_editor_plugin.cpp msgid "Mesh source is invalid (invalid path)." -msgstr "메시 소스가 잘못ëì–´ìš” (ìž˜ëª»ëœ ê²½ë¡œ)." +msgstr "메시 소스가 잘못ë˜ì—ˆìŠµë‹ˆë‹¤ (ìž˜ëª»ëœ ê²½ë¡œ)." #: editor/plugins/multimesh_editor_plugin.cpp msgid "Mesh source is invalid (not a MeshInstance)." -msgstr "메시 소스가 잘못ëì–´ìš” (MeshInstanceê°€ 아님)." +msgstr "메시 소스가 잘못ë˜ì—ˆìŠµë‹ˆë‹¤ (MeshInstanceê°€ 아님)." #: editor/plugins/multimesh_editor_plugin.cpp msgid "Mesh source is invalid (contains no Mesh resource)." -msgstr "메시 소스가 잘못ëì–´ìš” (Mesh 리소스가 ì—†ìŒ)." +msgstr "메시 소스가 잘못ë˜ì—ˆìŠµë‹ˆë‹¤ (Mesh 리소스가 ì—†ìŒ)." #: editor/plugins/multimesh_editor_plugin.cpp msgid "No surface source specified." -msgstr "표면 소스를 ì§€ì •í•˜ì§€ 않았어요." +msgstr "표면 소스를 ì§€ì •í•˜ì§€ 않았습니다." #: editor/plugins/multimesh_editor_plugin.cpp msgid "Surface source is invalid (invalid path)." -msgstr "표면 소스가 잘못ëì–´ìš” (ìž˜ëª»ëœ ê²½ë¡œ)." +msgstr "표면 소스가 잘못ë˜ì—ˆìŠµë‹ˆë‹¤ (ìž˜ëª»ëœ ê²½ë¡œ)." #: editor/plugins/multimesh_editor_plugin.cpp msgid "Surface source is invalid (no geometry)." -msgstr "표면 소스가 잘못ëì–´ìš” (형태 ì—†ìŒ)." +msgstr "표면 소스가 잘못ë˜ì—ˆìŠµë‹ˆë‹¤ (형태 ì—†ìŒ)." #: editor/plugins/multimesh_editor_plugin.cpp msgid "Surface source is invalid (no faces)." -msgstr "표면 소스가 잘못ëì–´ìš” (ë©´ ì—†ìŒ)." +msgstr "표면 소스가 잘못ë˜ì—ˆìŠµë‹ˆë‹¤ (ë©´ ì—†ìŒ)." #: editor/plugins/multimesh_editor_plugin.cpp msgid "Select a Source Mesh:" -msgstr "소스 메시 ì„ íƒí•˜ê¸°:" +msgstr "소스 메시를 ì„ íƒí•˜ì„¸ìš”:" #: editor/plugins/multimesh_editor_plugin.cpp msgid "Select a Target Surface:" -msgstr "ëŒ€ìƒ í‘œë©´ ì„ íƒí•˜ê¸°:" +msgstr "ëŒ€ìƒ í‘œë©´ì„ ì„ íƒí•˜ì„¸ìš”:" #: editor/plugins/multimesh_editor_plugin.cpp msgid "Populate Surface" @@ -6041,7 +6115,7 @@ msgstr "내비게ì´ì…˜ í´ë¦¬ê³¤ 만들기" #: editor/plugins/particles_2d_editor_plugin.cpp #: editor/plugins/particles_editor_plugin.cpp msgid "Convert to CPUParticles" -msgstr "CPU파티í´ë¡œ 변환하기" +msgstr "CPU파티í´ë¡œ 변환" #: editor/plugins/particles_2d_editor_plugin.cpp msgid "Generating Visibility Rect" @@ -6049,11 +6123,11 @@ msgstr "가시성 ì§ì‚¬ê°í˜• 만들기" #: editor/plugins/particles_2d_editor_plugin.cpp msgid "Generate Visibility Rect" -msgstr "가시성 ì§ì‚¬ê°í˜•ì„ ë§Œë“¤ì–´ìš”" +msgstr "가시성 ì§ì‚¬ê°í˜•ì„ ë§Œë“니다" #: editor/plugins/particles_2d_editor_plugin.cpp msgid "Can only set point into a ParticlesMaterial process material" -msgstr "ParticlesMaterial 프로세스 머티리얼 안ì—ë§Œ ì ì„ ì„¤ì •í• ìˆ˜ 있어요" +msgstr "ParticlesMaterial 프로세스 머티리얼 안ì—ë§Œ ì ì„ ì„¤ì •í• ìˆ˜ 있습니다" #: editor/plugins/particles_2d_editor_plugin.cpp #: editor/plugins/particles_editor_plugin.cpp @@ -6062,23 +6136,23 @@ msgstr "ìƒì„± 시간 (ì´ˆ):" #: editor/plugins/particles_editor_plugin.cpp msgid "The geometry's faces don't contain any area." -msgstr "í˜•íƒœì˜ í‘œë©´ì— ì˜ì—ì´ ì—†ì–´ìš”." +msgstr "í˜•íƒœì˜ í‘œë©´ì— ì˜ì—ì´ ì—†ìŠµë‹ˆë‹¤." #: editor/plugins/particles_editor_plugin.cpp msgid "The geometry doesn't contain any faces." -msgstr "í˜•íƒœì— ë©´ì´ ì—†ì–´ìš”." +msgstr "í˜•íƒœì— ë©´ì´ ì—†ìŠµë‹ˆë‹¤." #: editor/plugins/particles_editor_plugin.cpp msgid "\"%s\" doesn't inherit from Spatial." -msgstr "\"%s\"ì€(는) Spatialì„ ìƒì†ë°›ì§€ 않아요." +msgstr "\"%s\"ì€(는) Spatialì„ ìƒì†ë°›ì§€ 않습니다." #: editor/plugins/particles_editor_plugin.cpp msgid "\"%s\" doesn't contain geometry." -msgstr "\"%s\"ì— í˜•íƒœê°€ 없어요." +msgstr "\"%s\"ì— í˜•íƒœê°€ 없습니다." #: editor/plugins/particles_editor_plugin.cpp msgid "\"%s\" doesn't contain face geometry." -msgstr "\"%s\"ì— ë©´ 형태가 없어요." +msgstr "\"%s\"ì— ë©´ 형태가 없습니다." #: editor/plugins/particles_editor_plugin.cpp msgid "Create Emitter" @@ -6106,7 +6180,7 @@ msgstr "ë°©ì¶œ 소스: " #: editor/plugins/particles_editor_plugin.cpp msgid "A processor material of type 'ParticlesMaterial' is required." -msgstr "'ParticlesMaterial' ìœ í˜•ì˜ í”„ë¡œì„¸ì„œ ë¨¸í‹°ë¦¬ì–¼ì´ í•„ìš”í•´ìš”." +msgstr "'ParticlesMaterial' ìœ í˜•ì˜ í”„ë¡œì„¸ì„œ ë¨¸í‹°ë¦¬ì–¼ì´ í•„ìš”í•©ë‹ˆë‹¤." #: editor/plugins/particles_editor_plugin.cpp msgid "Generating AABB" @@ -6122,20 +6196,20 @@ msgstr "AABB 만들기" #: editor/plugins/path_2d_editor_plugin.cpp msgid "Remove Point from Curve" -msgstr "ê³¡ì„ ì—서 ì ì‚ì œí•˜ê¸°" +msgstr "ê³¡ì„ ì—서 ì ì‚ì œ" #: editor/plugins/path_2d_editor_plugin.cpp msgid "Remove Out-Control from Curve" -msgstr "ê³¡ì„ ì˜ ì•„ì›ƒ-컨트롤 ì‚ì œí•˜ê¸°" +msgstr "ê³¡ì„ ì˜ ì•„ì›ƒ-컨트롤 ì‚ì œ" #: editor/plugins/path_2d_editor_plugin.cpp msgid "Remove In-Control from Curve" -msgstr "ê³¡ì„ ì˜ ì¸-컨트롤 ì‚ì œí•˜ê¸°" +msgstr "ê³¡ì„ ì˜ ì¸-컨트롤 ì‚ì œ" #: editor/plugins/path_2d_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp msgid "Add Point to Curve" -msgstr "ê³¡ì„ ì— ì 추가하기" +msgstr "ê³¡ì„ ì— ì 추가" #: editor/plugins/path_2d_editor_plugin.cpp msgid "Split Curve" @@ -6143,30 +6217,30 @@ msgstr "ê³¡ì„ ê°€ë¥´ê¸°" #: editor/plugins/path_2d_editor_plugin.cpp msgid "Move Point in Curve" -msgstr "ê³¡ì„ ì˜ ì ì´ë™í•˜ê¸°" +msgstr "ê³¡ì„ ì˜ ì ì´ë™" #: editor/plugins/path_2d_editor_plugin.cpp msgid "Move In-Control in Curve" -msgstr "ê³¡ì„ ì˜ ì¸-컨트롤 ì´ë™í•˜ê¸°" +msgstr "ê³¡ì„ ì˜ ì¸-컨트롤 ì´ë™" #: editor/plugins/path_2d_editor_plugin.cpp msgid "Move Out-Control in Curve" -msgstr "ê³¡ì„ ì˜ ì•„ì›ƒ-컨트롤 ì´ë™í•˜ê¸°" +msgstr "ê³¡ì„ ì˜ ì•„ì›ƒ-컨트롤 ì´ë™" #: editor/plugins/path_2d_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp msgid "Select Points" -msgstr "ì ì„ íƒí•˜ê¸°" +msgstr "ì ì„ íƒ" #: editor/plugins/path_2d_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp msgid "Shift+Drag: Select Control Points" -msgstr "Shift+드래그: 컨트롤 ì ì„ íƒí•˜ê¸°" +msgstr "Shift+드래그: 컨트롤 ì ì„ íƒ" #: editor/plugins/path_2d_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp msgid "Click: Add Point" -msgstr "í´ë¦: ì 추가하기" +msgstr "í´ë¦: ì 추가" #: editor/plugins/path_2d_editor_plugin.cpp msgid "Left Click: Split Segment (in curve)" @@ -6175,21 +6249,21 @@ msgstr "좌í´ë¦: (ê³¡ì„ ì—서) ì„ ë¶„ 가르기" #: editor/plugins/path_2d_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp msgid "Right Click: Delete Point" -msgstr "ìš°í´ë¦: ì ì‚ì œí•˜ê¸°" +msgstr "ìš°í´ë¦: ì ì‚ì œ" #: editor/plugins/path_2d_editor_plugin.cpp msgid "Select Control Points (Shift+Drag)" -msgstr "컨트롤 ì ì„ íƒí•˜ê¸° (Shift+드래그)" +msgstr "컨트롤 ì ì„ íƒ (Shift+드래그)" #: editor/plugins/path_2d_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp msgid "Add Point (in empty space)" -msgstr "(빈 공간ì—) ì 추가하기" +msgstr "(빈 공간ì—) ì 추가" #: editor/plugins/path_2d_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp msgid "Delete Point" -msgstr "ì ì‚ì œí•˜ê¸°" +msgstr "ì ì‚ì œ" #: editor/plugins/path_2d_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp @@ -6218,15 +6292,15 @@ msgstr "ê³¡ì„ ì #" #: editor/plugins/path_editor_plugin.cpp msgid "Set Curve Point Position" -msgstr "ê³¡ì„ ì 위치 ì„¤ì •í•˜ê¸°" +msgstr "ê³¡ì„ ì 위치 ì„¤ì •" #: editor/plugins/path_editor_plugin.cpp msgid "Set Curve In Position" -msgstr "ê³¡ì„ ì˜ ì¸ ìœ„ì¹˜ ì„¤ì •í•˜ê¸°" +msgstr "ê³¡ì„ ì˜ ì¸ ìœ„ì¹˜ ì„¤ì •" #: editor/plugins/path_editor_plugin.cpp msgid "Set Curve Out Position" -msgstr "ê³¡ì„ ì˜ ì•„ì›ƒ 위치 ì„¤ì •í•˜ê¸°" +msgstr "ê³¡ì„ ì˜ ì•„ì›ƒ 위치 ì„¤ì •" #: editor/plugins/path_editor_plugin.cpp msgid "Split Path" @@ -6234,15 +6308,15 @@ msgstr "경로 가르기" #: editor/plugins/path_editor_plugin.cpp msgid "Remove Path Point" -msgstr "경로 ì ì‚ì œí•˜ê¸°" +msgstr "경로 ì ì‚ì œ" #: editor/plugins/path_editor_plugin.cpp msgid "Remove Out-Control Point" -msgstr "아웃-컨트롤 ì ì‚ì œí•˜ê¸°" +msgstr "아웃-컨트롤 ì ì‚ì œ" #: editor/plugins/path_editor_plugin.cpp msgid "Remove In-Control Point" -msgstr "ì¸-컨트롤 ì ì‚ì œí•˜ê¸°" +msgstr "ì¸-컨트롤 ì ì‚ì œ" #: editor/plugins/path_editor_plugin.cpp msgid "Split Segment (in curve)" @@ -6250,12 +6324,12 @@ msgstr "(ê³¡ì„ ì—서) ì„ ë¶„ 가르기" #: editor/plugins/physical_bone_plugin.cpp msgid "Move Joint" -msgstr "ê´€ì ˆ ì´ë™í•˜ê¸°" +msgstr "ê´€ì ˆ ì´ë™" #: editor/plugins/polygon_2d_editor_plugin.cpp msgid "" "The skeleton property of the Polygon2D does not point to a Skeleton2D node" -msgstr "Polygon2Dì˜ Skeleton ì†ì„±ì´ Skeleton2D 노드를 향하지 않아요" +msgstr "Polygon2Dì˜ Skeleton ì†ì„±ì´ Skeleton2D 노드를 향하지 않습니다" #: editor/plugins/polygon_2d_editor_plugin.cpp msgid "Sync Bones" @@ -6266,7 +6340,7 @@ msgid "" "No texture in this polygon.\n" "Set a texture to be able to edit UV." msgstr "" -"ì´ í´ë¦¬ê³¤ì— í…스처가 없어요.\n" +"ì´ í´ë¦¬ê³¤ì— í…스처가 없습니다.\n" "UV를 íŽ¸ì§‘í•˜ë ¤ë©´ í…스처를 ì„¤ì •í•˜ì„¸ìš”." #: editor/plugins/polygon_2d_editor_plugin.cpp @@ -6277,7 +6351,8 @@ msgstr "UV ë§µ 만들기" msgid "" "Polygon 2D has internal vertices, so it can no longer be edited in the " "viewport." -msgstr "Polygon2Dì— ë‚´ë¶€ ê¼ì§“ì ì´ ìžˆì–´ìš”. ë” ì´ìƒ ë·°í¬íЏì—서 íŽ¸ì§‘í• ìˆ˜ 없어요." +msgstr "" +"Polygon2Dì— ë‚´ë¶€ ê¼ì§“ì ì´ ìžˆìŠµë‹ˆë‹¤. ë” ì´ìƒ ë·°í¬íЏì—서 íŽ¸ì§‘í• ìˆ˜ 없습니다." #: editor/plugins/polygon_2d_editor_plugin.cpp msgid "Create Polygon & UV" @@ -6289,31 +6364,31 @@ msgstr "ë‚´ë¶€ ê¼ì§“ì 만들기" #: editor/plugins/polygon_2d_editor_plugin.cpp msgid "Remove Internal Vertex" -msgstr "ë‚´ë¶€ ê¼ì§“ì ì‚ì œí•˜ê¸°" +msgstr "ë‚´ë¶€ ê¼ì§“ì ì‚ì œ" #: editor/plugins/polygon_2d_editor_plugin.cpp msgid "Invalid Polygon (need 3 different vertices)" -msgstr "ìž˜ëª»ëœ í´ë¦¬ê³¤ (3ê°œì˜ ë‹¤ë¥¸ ê¼ì§“ì ì´ í•„ìš”í•´ìš”)" +msgstr "ìž˜ëª»ëœ í´ë¦¬ê³¤ (3ê°œì˜ ë‹¤ë¥¸ ê¼ì§“ì ì´ í•„ìš”í•©ë‹ˆë‹¤)" #: editor/plugins/polygon_2d_editor_plugin.cpp msgid "Add Custom Polygon" -msgstr "맞춤 í´ë¦¬ê³¤ 추가하기" +msgstr "맞춤 í´ë¦¬ê³¤ 추가" #: editor/plugins/polygon_2d_editor_plugin.cpp msgid "Remove Custom Polygon" -msgstr "맞춤 í´ë¦¬ê³¤ ì‚ì œí•˜ê¸°" +msgstr "맞춤 í´ë¦¬ê³¤ ì‚ì œ" #: editor/plugins/polygon_2d_editor_plugin.cpp msgid "Transform UV Map" -msgstr "UV ë§µ 변형하기" +msgstr "UV ë§µ 변형" #: editor/plugins/polygon_2d_editor_plugin.cpp msgid "Transform Polygon" -msgstr "í´ë¦¬ê³¤ 변형하기" +msgstr "í´ë¦¬ê³¤ 변형" #: editor/plugins/polygon_2d_editor_plugin.cpp msgid "Paint Bone Weights" -msgstr "본 가중치 ì¹ í•˜ê¸°" +msgstr "본 가중치 ì¹ " #: editor/plugins/polygon_2d_editor_plugin.cpp msgid "Open Polygon 2D UV editor." @@ -6341,51 +6416,51 @@ msgstr "본" #: editor/plugins/polygon_2d_editor_plugin.cpp msgid "Move Points" -msgstr "ì ì´ë™í•˜ê¸°" +msgstr "ì ì´ë™" #: editor/plugins/polygon_2d_editor_plugin.cpp msgid "Ctrl: Rotate" -msgstr "Ctrl: íšŒì „í•˜ê¸°" +msgstr "Ctrl: íšŒì „" #: editor/plugins/polygon_2d_editor_plugin.cpp msgid "Shift: Move All" -msgstr "Shift: ëª¨ë‘ ì´ë™í•˜ê¸°" +msgstr "Shift: ëª¨ë‘ ì´ë™" #: editor/plugins/polygon_2d_editor_plugin.cpp msgid "Shift+Ctrl: Scale" -msgstr "Shift+Ctrl: í¬ê¸° ì¡°ì ˆí•˜ê¸°" +msgstr "Shift+Ctrl: í¬ê¸° ì¡°ì ˆ" #: editor/plugins/polygon_2d_editor_plugin.cpp msgid "Move Polygon" -msgstr "í´ë¦¬ê³¤ ì´ë™í•˜ê¸°" +msgstr "í´ë¦¬ê³¤ ì´ë™" #: editor/plugins/polygon_2d_editor_plugin.cpp msgid "Rotate Polygon" -msgstr "í´ë¦¬ê³¤ íšŒì „í•˜ê¸°" +msgstr "í´ë¦¬ê³¤ íšŒì „" #: editor/plugins/polygon_2d_editor_plugin.cpp msgid "Scale Polygon" -msgstr "í´ë¦¬ê³¤ í¬ê¸° ì¡°ì ˆí•˜ê¸°" +msgstr "í´ë¦¬ê³¤ í¬ê¸° ì¡°ì ˆ" #: editor/plugins/polygon_2d_editor_plugin.cpp msgid "Create a custom polygon. Enables custom polygon rendering." -msgstr "맞춤 í´ë¦¬ê³¤ì„ 만들어요. 맞춤 í´ë¦¬ê³¤ ë Œë”ë§ì„ 켜세요." +msgstr "맞춤 í´ë¦¬ê³¤ì„ ë§Œë“니다. 맞춤 í´ë¦¬ê³¤ ë Œë”ë§ì„ 켜세요." #: editor/plugins/polygon_2d_editor_plugin.cpp msgid "" "Remove a custom polygon. If none remain, custom polygon rendering is " "disabled." msgstr "" -"맞춤 í´ë¦¬ê³¤ì„ ì‚ì œí•´ìš”. 남아있는 맞춤 í´ë¦¬ê³¤ì´ 없으면, 맞춤 í´ë¦¬ê³¤ ë Œë”ë§ì€ " -"êº¼ì ¸ìš”." +"맞춤 í´ë¦¬ê³¤ì„ ì‚ì œí•©ë‹ˆë‹¤. 남아있는 맞춤 í´ë¦¬ê³¤ì´ 없으면, 맞춤 í´ë¦¬ê³¤ ë Œë”ë§" +"ì€ êº¼ì§‘ë‹ˆë‹¤." #: editor/plugins/polygon_2d_editor_plugin.cpp msgid "Paint weights with specified intensity." -msgstr "ì§€ì •í•œ ê°•ë„로 가중치를 ì¹ í•´ìš”." +msgstr "ì§€ì •í•œ ê°•ë„로 가중치를 ì¹ í•©ë‹ˆë‹¤." #: editor/plugins/polygon_2d_editor_plugin.cpp msgid "Unpaint weights with specified intensity." -msgstr "ì§€ì •í•œ ê°•ë„로 가중치를 지워요." +msgstr "ì§€ì •í•œ ê°•ë„로 가중치를 ì§€ì›ë‹ˆë‹¤." #: editor/plugins/polygon_2d_editor_plugin.cpp msgid "Radius:" @@ -6449,11 +6524,11 @@ msgstr "ë³¸ì„ í´ë¦¬ê³¤ì— ë™ê¸°í™”" #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "ERROR: Couldn't load resource!" -msgstr "오류: 리소스를 불러올 수 없어요!" +msgstr "오류: 리소스를 불러올 수 없습니다!" #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "Add Resource" -msgstr "리소스 추가하기" +msgstr "리소스 추가" #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "Rename Resource" @@ -6462,11 +6537,11 @@ msgstr "리소스 ì´ë¦„ 바꾸기" #: editor/plugins/resource_preloader_editor_plugin.cpp #: editor/plugins/sprite_frames_editor_plugin.cpp msgid "Delete Resource" -msgstr "리소스 ì‚ì œí•˜ê¸°" +msgstr "리소스 ì‚ì œ" #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "Resource clipboard is empty!" -msgstr "리소스 í´ë¦½ë³´ë“œê°€ 비었어요!" +msgstr "리소스 í´ë¦½ë³´ë“œê°€ 비었습니다!" #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "Paste Resource" @@ -6499,11 +6574,11 @@ msgstr "리소스 프리로ë”" #: editor/plugins/root_motion_editor_plugin.cpp msgid "AnimationTree has no path set to an AnimationPlayer" -msgstr "AnimationTreeì— AnimationPlayer를 향하는 경로가 없어요" +msgstr "AnimationTreeì— AnimationPlayer를 향하는 경로가 없습니다" #: editor/plugins/root_motion_editor_plugin.cpp msgid "Path to AnimationPlayer is invalid" -msgstr "AnimationPlayer를 향하는 경로가 잘못ëì–´ìš”" +msgstr "AnimationPlayer를 향하는 경로가 잘못ë˜ì—ˆìŠµë‹ˆë‹¤" #: editor/plugins/script_editor_plugin.cpp msgid "Clear Recent Files" @@ -6551,26 +6626,26 @@ msgstr "íŒŒì¼ ì—´ê¸°" #: editor/plugins/script_editor_plugin.cpp msgid "Save File As..." -msgstr "다른 ì´ë¦„으로 ì €ìž¥í•˜ê¸°..." +msgstr "다른 ì´ë¦„으로 ì €ìž¥..." #: editor/plugins/script_editor_plugin.cpp msgid "Can't obtain the script for running." -msgstr "실행하기 위한 스í¬ë¦½íŠ¸ë¥¼ 가질 수 없어요." +msgstr "실행하기 위한 스í¬ë¦½íŠ¸ë¥¼ 가질 수 없습니다." #: editor/plugins/script_editor_plugin.cpp msgid "Script failed reloading, check console for errors." -msgstr "스í¬ë¦½íЏ 다시 ë¶ˆëŸ¬ì˜¤ê¸°ì— ì‹¤íŒ¨í–ˆì–´ìš”. 콘솔ì—서 오류를 확ì¸í•˜ì„¸ìš”." +msgstr "스í¬ë¦½íЏ 다시 ë¶ˆëŸ¬ì˜¤ê¸°ì— ì‹¤íŒ¨í–ˆìŠµë‹ˆë‹¤. 콘솔ì—서 오류를 확ì¸í•˜ì„¸ìš”." #: editor/plugins/script_editor_plugin.cpp msgid "Script is not in tool mode, will not be able to run." -msgstr "스í¬ë¦½íŠ¸ê°€ Tool 모드가 아니ì—ìš”. ì‹¤í–‰í• ìˆ˜ ì—†ì„ ê±°ì˜ˆìš”." +msgstr "스í¬ë¦½íŠ¸ê°€ Tool 모드가 아닙니다. ì‹¤í–‰í• ìˆ˜ ì—†ì„ ê²ƒìž…ë‹ˆë‹¤." #: editor/plugins/script_editor_plugin.cpp msgid "" "To run this script, it must inherit EditorScript and be set to tool mode." msgstr "" "ì´ ìŠ¤í¬ë¦½íŠ¸ë¥¼ ì‹¤í–‰í•˜ë ¤ë©´, 반드시 EditorScriptì— ì†í•´ì•¼ 하며, Tool 모드로 ì„¤ì •" -"ë˜ì–´ 있어야 í•´ìš”." +"ë˜ì–´ 있어야 합니다." #: editor/plugins/script_editor_plugin.cpp msgid "Import Theme" @@ -6586,7 +6661,7 @@ msgstr "ì €ìž¥ 중 오류" #: editor/plugins/script_editor_plugin.cpp msgid "Save Theme As..." -msgstr "테마를 다른 ì´ë¦„으로 ì €ìž¥í•˜ê¸°..." +msgstr "테마를 다른 ì´ë¦„으로 ì €ìž¥..." #: editor/plugins/script_editor_plugin.cpp msgid "%s Class Reference" @@ -6608,7 +6683,7 @@ msgstr "스í¬ë¦½íЏ í•„í„°" #: editor/plugins/script_editor_plugin.cpp msgid "Toggle alphabetical sorting of the method list." -msgstr "메서드 목ë¡ì˜ ì‚¬ì „ ì‹ ì •ë ¬ì„ í† ê¸€í•´ìš”." +msgstr "메서드 목ë¡ì˜ ì‚¬ì „ ì‹ ì •ë ¬ì„ í† ê¸€í•©ë‹ˆë‹¤." #: editor/plugins/script_editor_plugin.cpp msgid "Filter methods" @@ -6616,19 +6691,19 @@ msgstr "메서드 í•„í„°" #: editor/plugins/script_editor_plugin.cpp msgid "Sort" -msgstr "ì •ë ¬í•˜ê¸°" +msgstr "ì •ë ¬" #: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp editor/scene_tree_dock.cpp #: modules/gdnative/gdnative_library_editor_plugin.cpp msgid "Move Up" -msgstr "위로 ì´ë™í•˜ê¸°" +msgstr "위로 ì´ë™" #: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp editor/scene_tree_dock.cpp #: modules/gdnative/gdnative_library_editor_plugin.cpp msgid "Move Down" -msgstr "아래로 ì´ë™í•˜ê¸°" +msgstr "아래로 ì´ë™" #: editor/plugins/script_editor_plugin.cpp msgid "Next script" @@ -6652,7 +6727,7 @@ msgstr "ë‹«ì€ ìŠ¤í¬ë¦½íЏ 다시 열기" #: editor/plugins/script_editor_plugin.cpp msgid "Save All" -msgstr "ëª¨ë‘ ì €ìž¥í•˜ê¸°" +msgstr "ëª¨ë‘ ì €ìž¥" #: editor/plugins/script_editor_plugin.cpp msgid "Soft Reload Script" @@ -6660,7 +6735,7 @@ msgstr "스í¬ë¦½íЏ 다시 불러오기" #: editor/plugins/script_editor_plugin.cpp msgid "Copy Script Path" -msgstr "스í¬ë¦½íЏ 경로 복사하기" +msgstr "스í¬ë¦½íЏ 경로 복사" #: editor/plugins/script_editor_plugin.cpp msgid "History Previous" @@ -6685,7 +6760,7 @@ msgstr "테마 다시 불러오기" #: editor/plugins/script_editor_plugin.cpp msgid "Save Theme" -msgstr "테마 ì €ìž¥í•˜ê¸°" +msgstr "테마 ì €ìž¥" #: editor/plugins/script_editor_plugin.cpp msgid "Close All" @@ -6697,24 +6772,24 @@ msgstr "문서 닫기" #: editor/plugins/script_editor_plugin.cpp editor/project_manager.cpp msgid "Run" -msgstr "실행하기" +msgstr "실행" #: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp msgid "Step Into" -msgstr "í”„ë¡œì‹œì € 단위 실행하기" +msgstr "í”„ë¡œì‹œì € 단위 실행" #: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp msgid "Step Over" -msgstr "한 ë‹¨ê³„ì‹ ì½”ë“œ 실행하기" +msgstr "한 ë‹¨ê³„ì‹ ì½”ë“œ 실행" #: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp msgid "Break" -msgstr "ì •ì§€í•˜ê¸°" +msgstr "ì •ì§€" #: editor/plugins/script_editor_plugin.cpp editor/project_manager.cpp #: editor/script_editor_debugger.cpp msgid "Continue" -msgstr "계ì†í•˜ê¸°" +msgstr "계ì†" #: editor/plugins/script_editor_plugin.cpp msgid "Keep Debugger Open" @@ -6726,7 +6801,7 @@ msgstr "외부 편집기로 디버깅" #: editor/plugins/script_editor_plugin.cpp msgid "Open Godot online documentation." -msgstr "Godot 온ë¼ì¸ 문서를 ì—´ì–´ìš”." +msgstr "Godot 온ë¼ì¸ 문서를 ì—´." #: editor/plugins/script_editor_plugin.cpp msgid "Request Docs" @@ -6738,15 +6813,15 @@ msgstr "피드백으로 Godot 문서를 ê°œì„ í•˜ëŠ”ë° ë„와주세요." #: editor/plugins/script_editor_plugin.cpp msgid "Search the reference documentation." -msgstr "참조 문서 검색하기." +msgstr "참조 문서 검색." #: editor/plugins/script_editor_plugin.cpp msgid "Go to previous edited document." -msgstr "ì´ì „ì— íŽ¸ì§‘í•œ 문서로 ì´ë™í•´ìš”." +msgstr "ì´ì „ì— íŽ¸ì§‘í•œ 문서로 ì´ë™í•©ë‹ˆë‹¤." #: editor/plugins/script_editor_plugin.cpp msgid "Go to next edited document." -msgstr "다ìŒì— 편집한 문서로 ì´ë™í•´ìš”." +msgstr "다ìŒì— 편집한 문서로 ì´ë™í•©ë‹ˆë‹¤." #: editor/plugins/script_editor_plugin.cpp msgid "Discard" @@ -6757,7 +6832,7 @@ msgid "" "The following files are newer on disk.\n" "What action should be taken?:" msgstr "" -"해당 파ì¼ì€ 디스í¬ì— 있는 게 ë” ìµœì‹ ì´ì—ìš”.\n" +"해당 파ì¼ì€ 디스í¬ì— 있는 게 ë” ìµœì‹ ìž…ë‹ˆë‹¤.\n" "어떻게 í• ê±´ê°€ìš”?:" #: editor/plugins/script_editor_plugin.cpp @@ -6768,7 +6843,7 @@ msgstr "다시 불러오기" #: editor/plugins/script_editor_plugin.cpp #: editor/plugins/shader_editor_plugin.cpp msgid "Resave" -msgstr "다시 ì €ìž¥í•˜ê¸°" +msgstr "다시 ì €ìž¥" #: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp msgid "Debugger" @@ -6784,7 +6859,7 @@ msgstr "최근 스í¬ë¦½íЏ 지우기" #: editor/plugins/script_text_editor.cpp msgid "Connections to method:" -msgstr "ë©”ì„œë“œì— ì—°ê²°í•˜ê¸°:" +msgstr "ë©”ì„œë“œì— ì—°ê²°:" #: editor/plugins/script_text_editor.cpp editor/script_editor_debugger.cpp msgid "Source" @@ -6798,8 +6873,8 @@ msgstr "Target(대ìƒ)" msgid "" "Missing connected method '%s' for signal '%s' from node '%s' to node '%s'." msgstr "" -"메서드 '%s'ì´(ê°€) ì‹œê·¸ë„ '%s'ì„ ë…¸ë“œ '%s'ì—서 노드 '%s'으로 연결하지 않았어" -"ìš”." +"메서드 '%s'ì´(ê°€) ì‹œê·¸ë„ '%s'ì„ ë…¸ë“œ '%s'ì—서 노드 '%s'으로 연결하지 않았습니" +"다." #: editor/plugins/script_text_editor.cpp msgid "Line" @@ -6811,17 +6886,17 @@ msgstr "(무시함)" #: editor/plugins/script_text_editor.cpp msgid "Go to Function" -msgstr "함수로 ì´ë™í•˜ê¸°" +msgstr "함수로 ì´ë™" #: editor/plugins/script_text_editor.cpp msgid "Only resources from filesystem can be dropped." -msgstr "íŒŒì¼ ì‹œìŠ¤í…œì˜ ë¦¬ì†ŒìŠ¤ë§Œ 드ë¡í• 수 있어요." +msgstr "íŒŒì¼ ì‹œìŠ¤í…œì˜ ë¦¬ì†ŒìŠ¤ë§Œ 드ë¡í• 수 있습니다." #: editor/plugins/script_text_editor.cpp #: modules/visual_script/visual_script_editor.cpp msgid "Can't drop nodes because script '%s' is not used in this scene." msgstr "" -"스í¬ë¦½íЏ '%s'ì´(ê°€) ì´ ì”¬ì—서 사용ë˜ì§€ ì•Šê³ ìžˆì–´ì„œ 노드를 드ë¡í• 수 없어요." +"스í¬ë¦½íЏ '%s'ì´(ê°€) ì´ ì”¬ì—서 사용ë˜ì§€ ì•Šê³ ìžˆì–´ì„œ 노드를 드ë¡í• 수 없습니다." #: editor/plugins/script_text_editor.cpp msgid "Lookup Symbol" @@ -6829,11 +6904,11 @@ msgstr "룩업 기호" #: editor/plugins/script_text_editor.cpp msgid "Pick Color" -msgstr "ìƒ‰ìƒ ì„ íƒí•˜ê¸°" +msgstr "ìƒ‰ìƒ ì„ íƒ" #: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp msgid "Convert Case" -msgstr "ëŒ€ì†Œë¬¸ìž ë³€í™˜í•˜ê¸°" +msgstr "ëŒ€ì†Œë¬¸ìž ë³€í™˜" #: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp msgid "Uppercase" @@ -6845,16 +6920,16 @@ msgstr "소문ìžë¡œ 바꾸기" #: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp msgid "Capitalize" -msgstr "대문ìžë¡œ 시작하기" +msgstr "대문ìžë¡œ 시작" #: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp msgid "Syntax Highlighter" -msgstr "구문 강조하기" +msgstr "구문 ê°•ì¡°" #: editor/plugins/script_text_editor.cpp #: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp msgid "Go To" -msgstr "ì´ë™í•˜ê¸°" +msgstr "ì´ë™" #: editor/plugins/script_text_editor.cpp #: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp @@ -6873,11 +6948,11 @@ msgstr "잘ë¼ë‚´ê¸°" #: editor/plugins/script_text_editor.cpp scene/gui/line_edit.cpp #: scene/gui/text_edit.cpp msgid "Select All" -msgstr "ëª¨ë‘ ì„ íƒí•˜ê¸°" +msgstr "ëª¨ë‘ ì„ íƒ" #: editor/plugins/script_text_editor.cpp msgid "Delete Line" -msgstr "í–‰ ì‚ì œí•˜ê¸°" +msgstr "í–‰ ì‚ì œ" #: editor/plugins/script_text_editor.cpp msgid "Indent Left" @@ -6905,7 +6980,7 @@ msgstr "ëª¨ë“ í–‰ 펼치기" #: editor/plugins/script_text_editor.cpp msgid "Clone Down" -msgstr "아래로 ë³µì œí•˜ê¸°" +msgstr "아래로 ë³µì œ" #: editor/plugins/script_text_editor.cpp msgid "Complete Symbol" @@ -6913,19 +6988,19 @@ msgstr "ìžë™ 완성" #: editor/plugins/script_text_editor.cpp msgid "Evaluate Selection" -msgstr "ì„ íƒ í•목 í‰ê°€í•˜ê¸°" +msgstr "ì„ íƒ í•목 í‰ê°€" #: editor/plugins/script_text_editor.cpp msgid "Trim Trailing Whitespace" -msgstr "후행 공백 ë¬¸ìž ì‚ì œí•˜ê¸°" +msgstr "후행 공백 ë¬¸ìž ì‚ì œ" #: editor/plugins/script_text_editor.cpp msgid "Convert Indent to Spaces" -msgstr "공백으로 들여쓰ë„ë¡ ë³€í™˜í•˜ê¸°" +msgstr "공백으로 들여쓰ë„ë¡ ë³€í™˜" #: editor/plugins/script_text_editor.cpp msgid "Convert Indent to Tabs" -msgstr "íƒìœ¼ë¡œ 들여쓰ë„ë¡ ë³€í™˜í•˜ê¸°" +msgstr "íƒìœ¼ë¡œ 들여쓰ë„ë¡ ë³€í™˜" #: editor/plugins/script_text_editor.cpp msgid "Auto Indent" @@ -6945,23 +7020,23 @@ msgstr "ë¶ë§ˆí¬ í† ê¸€" #: editor/plugins/script_text_editor.cpp msgid "Go to Next Bookmark" -msgstr "ë‹¤ìŒ ë¶ë§ˆí¬ë¡œ ì´ë™í•˜ê¸°" +msgstr "ë‹¤ìŒ ë¶ë§ˆí¬ë¡œ ì´ë™" #: editor/plugins/script_text_editor.cpp msgid "Go to Previous Bookmark" -msgstr "ì´ì „ ë¶ë§ˆí¬ë¡œ ì´ë™í•˜ê¸°" +msgstr "ì´ì „ ë¶ë§ˆí¬ë¡œ ì´ë™" #: editor/plugins/script_text_editor.cpp msgid "Remove All Bookmarks" -msgstr "ëª¨ë“ ë¶ë§ˆí¬ ì‚ì œí•˜ê¸°" +msgstr "ëª¨ë“ ë¶ë§ˆí¬ ì‚ì œ" #: editor/plugins/script_text_editor.cpp msgid "Go to Function..." -msgstr "함수로 ì´ë™í•˜ê¸°..." +msgstr "함수로 ì´ë™..." #: editor/plugins/script_text_editor.cpp msgid "Go to Line..." -msgstr "행으로 ì´ë™í•˜ê¸°..." +msgstr "행으로 ì´ë™..." #: editor/plugins/script_text_editor.cpp #: modules/visual_script/visual_script_editor.cpp @@ -6970,22 +7045,22 @@ msgstr "중단ì í† ê¸€" #: editor/plugins/script_text_editor.cpp msgid "Remove All Breakpoints" -msgstr "중단ì ëª¨ë‘ ì‚ì œí•˜ê¸°" +msgstr "중단ì ëª¨ë‘ ì‚ì œ" #: editor/plugins/script_text_editor.cpp msgid "Go to Next Breakpoint" -msgstr "ë‹¤ìŒ ì¤‘ë‹¨ì 으로 ì´ë™í•˜ê¸°" +msgstr "ë‹¤ìŒ ì¤‘ë‹¨ì 으로 ì´ë™" #: editor/plugins/script_text_editor.cpp msgid "Go to Previous Breakpoint" -msgstr "ì´ì „ 중단ì 으로 ì´ë™í•˜ê¸°" +msgstr "ì´ì „ 중단ì 으로 ì´ë™" #: editor/plugins/shader_editor_plugin.cpp msgid "" "This shader has been modified on on disk.\n" "What action should be taken?" msgstr "" -"ì´ ì…°ì´ë”는 디스í¬ì—서 ìˆ˜ì •í–ˆì–´ìš”.\n" +"ì´ ì…°ì´ë”는 디스í¬ì—서 ìˆ˜ì •í–ˆìŠµë‹ˆë‹¤.\n" "ì–´ë–¤ í–‰ë™ì„ í• ê±´ê°€ìš”?" #: editor/plugins/shader_editor_plugin.cpp @@ -6994,7 +7069,7 @@ msgstr "ì…°ì´ë”" #: editor/plugins/skeleton_2d_editor_plugin.cpp msgid "This skeleton has no bones, create some children Bone2D nodes." -msgstr "ì´ ìŠ¤ì¼ˆë ˆí†¤ì—는 ë³¸ì´ ì—†ì–´ìš”. Bone2D노드를 ìžì‹ìœ¼ë¡œ 만드세요." +msgstr "ì´ ìŠ¤ì¼ˆë ˆí†¤ì—는 ë³¸ì´ ì—†ìŠµë‹ˆë‹¤. Bone2D노드를 ìžì‹ìœ¼ë¡œ 만드세요." #: editor/plugins/skeleton_2d_editor_plugin.cpp msgid "Create Rest Pose from Bones" @@ -7002,7 +7077,7 @@ msgstr "ë³¸ì˜ ëŒ€ê¸° ìžì„¸ 만들기" #: editor/plugins/skeleton_2d_editor_plugin.cpp msgid "Set Rest Pose to Bones" -msgstr "본ì—게 대기 ìžì„¸ ì„¤ì •í•˜ê¸°" +msgstr "본ì—게 대기 ìžì„¸ ì„¤ì •" #: editor/plugins/skeleton_2d_editor_plugin.cpp msgid "Skeleton2D" @@ -7014,7 +7089,7 @@ msgstr "(본ì˜) 대기 ìžì„¸ 만들기" #: editor/plugins/skeleton_2d_editor_plugin.cpp msgid "Set Bones to Rest Pose" -msgstr "ë³¸ì„ ëŒ€ê¸° ìžì„¸ë¡œ ì„¤ì •í•˜ê¸°" +msgstr "ë³¸ì„ ëŒ€ê¸° ìžì„¸ë¡œ ì„¤ì •" #: editor/plugins/skeleton_editor_plugin.cpp msgid "Create physical bones" @@ -7030,7 +7105,7 @@ msgstr "물리ì ìŠ¤ì¼ˆë ˆí†¤ 만들기" #: editor/plugins/skeleton_ik_editor_plugin.cpp msgid "Play IK" -msgstr "IK 실행하기" +msgstr "IK 실행" #: editor/plugins/spatial_editor_plugin.cpp msgid "Orthogonal" @@ -7070,15 +7145,15 @@ msgstr "ì´ë™ 중: " #: editor/plugins/spatial_editor_plugin.cpp msgid "Rotating %s degrees." -msgstr "%së„로 íšŒì „í•˜ê¸°." +msgstr "%së„로 íšŒì „." #: editor/plugins/spatial_editor_plugin.cpp msgid "Keying is disabled (no key inserted)." -msgstr "키가 êº¼ì ¸ 있어요 (키가 삽입ë˜ì§€ 않아요)." +msgstr "키가 êº¼ì ¸ 있습니다 (키가 삽입ë˜ì§€ 않습니다)." #: editor/plugins/spatial_editor_plugin.cpp msgid "Animation Key Inserted." -msgstr "ì• ë‹ˆë©”ì´ì…˜ 키를 삽입했어요." +msgstr "ì• ë‹ˆë©”ì´ì…˜ 키를 삽입했습니다." #: editor/plugins/spatial_editor_plugin.cpp msgid "Pitch" @@ -7158,19 +7233,19 @@ msgstr "ë’·ë©´" #: editor/plugins/spatial_editor_plugin.cpp msgid "Align Transform with View" -msgstr "ë³€í˜•ì„ ë·°ì— ì •ë ¬í•˜ê¸°" +msgstr "ë³€í˜•ì„ ë·°ì— ì •ë ¬" #: editor/plugins/spatial_editor_plugin.cpp msgid "Align Rotation with View" -msgstr "íšŒì „ì„ ë·°ì— ì •ë ¬í•˜ê¸°" +msgstr "íšŒì „ì„ ë·°ì— ì •ë ¬" #: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp msgid "No parent to instance a child at." -msgstr "ìžì‹ì„ ì¸ìŠ¤í„´ìŠ¤í• ë¶€ëª¨ê°€ 없어요." +msgstr "ìžì‹ì„ ì¸ìŠ¤í„´ìŠ¤í• ë¶€ëª¨ê°€ 없습니다." #: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp msgid "This operation requires a single selected node." -msgstr "ì´ ìž‘ì—…ì€ í•˜ë‚˜ì˜ ë…¸ë“œë¥¼ ì„ íƒí•´ì•¼ í•´ìš”." +msgstr "ì´ ìž‘ì—…ì€ í•˜ë‚˜ì˜ ë…¸ë“œë¥¼ ì„ íƒí•´ì•¼ 합니다." #: editor/plugins/spatial_editor_plugin.cpp msgid "Lock View Rotation" @@ -7178,19 +7253,19 @@ msgstr "ë·° íšŒì „ ìž ê¸ˆ" #: editor/plugins/spatial_editor_plugin.cpp msgid "Display Normal" -msgstr "노멀 표시하기" +msgstr "노멀 표시" #: editor/plugins/spatial_editor_plugin.cpp msgid "Display Wireframe" -msgstr "와ì´ì–´í”„ë ˆìž„ 표시하기" +msgstr "와ì´ì–´í”„ë ˆìž„ 표시" #: editor/plugins/spatial_editor_plugin.cpp msgid "Display Overdraw" -msgstr "오버드로 표시하기" +msgstr "오버드로 표시" #: editor/plugins/spatial_editor_plugin.cpp msgid "Display Unshaded" -msgstr "ì…°ì´ë” ì—†ìŒ í‘œì‹œí•˜ê¸°" +msgstr "ì…°ì´ë” ì—†ìŒ í‘œì‹œ" #: editor/plugins/spatial_editor_plugin.cpp msgid "View Environment" @@ -7226,7 +7301,7 @@ msgstr "시네마틱 미리 보기" #: editor/plugins/spatial_editor_plugin.cpp msgid "Not available when using the GLES2 renderer." -msgstr "GLES2 ë Œë”러ì—서 ì‚¬ìš©í• ìˆ˜ 없어요." +msgstr "GLES2 ë Œë”러ì—서 ì‚¬ìš©í• ìˆ˜ 없습니다." #: editor/plugins/spatial_editor_plugin.cpp msgid "Freelook Left" @@ -7265,8 +7340,8 @@ msgid "" "Note: The FPS value displayed is the editor's framerate.\n" "It cannot be used as a reliable indication of in-game performance." msgstr "" -"ì°¸ê³ : FPS ê°’ì€ íŽ¸ì§‘ê¸°ì˜ í”„ë ˆìž„ìœ¼ë¡œ 표시ë¼ìš”.\n" -"ì´ê²ƒì´ 게임 ë‚´ ì„±ëŠ¥ì„ ë³´ìž¥í• ìˆ˜ 없어요." +"ì°¸ê³ : FPS ê°’ì€ íŽ¸ì§‘ê¸°ì˜ í”„ë ˆìž„ìœ¼ë¡œ 표시ë©ë‹ˆë‹¤.\n" +"ì´ê²ƒì´ 게임 ë‚´ ì„±ëŠ¥ì„ ë³´ìž¥í• ìˆ˜ 없습니다." #: editor/plugins/spatial_editor_plugin.cpp msgid "View Rotation Locked" @@ -7282,7 +7357,7 @@ msgstr "노드를 ë°”ë‹¥ì— ìŠ¤ëƒ…" #: editor/plugins/spatial_editor_plugin.cpp msgid "Couldn't find a solid floor to snap the selection to." -msgstr "ì„ íƒ í•ëª©ì„ ìŠ¤ëƒ…í• ë°”ë‹¥ì„ ì°¾ì„ ìˆ˜ 없어요." +msgstr "ì„ íƒ í•ëª©ì„ ìŠ¤ëƒ…í• ë°”ë‹¥ì„ ì°¾ì„ ìˆ˜ 없습니다." #: editor/plugins/spatial_editor_plugin.cpp msgid "" @@ -7290,17 +7365,17 @@ msgid "" "Alt+Drag: Move\n" "Alt+RMB: Depth list selection" msgstr "" -"드래그: íšŒì „í•˜ê¸°\n" -"Alt+드래그: ì´ë™í•˜ê¸°\n" -"Alt+ìš°í´ë¦: 겹친 ëª©ë¡ ì„ íƒí•˜ê¸°" +"드래그: íšŒì „\n" +"Alt+드래그: ì´ë™\n" +"Alt+ìš°í´ë¦: 겹친 ëª©ë¡ ì„ íƒ" #: editor/plugins/spatial_editor_plugin.cpp msgid "Use Local Space" -msgstr "로컬 스페ì´ìФ 사용하기" +msgstr "로컬 스페ì´ìФ 사용" #: editor/plugins/spatial_editor_plugin.cpp msgid "Use Snap" -msgstr "스냅 사용하기" +msgstr "스냅 사용" #: editor/plugins/spatial_editor_plugin.cpp msgid "Bottom View" @@ -7332,7 +7407,7 @@ msgstr "ì›ê·¼/ì§êµ ë·° ì „í™˜" #: editor/plugins/spatial_editor_plugin.cpp msgid "Insert Animation Key" -msgstr "ì• ë‹ˆë©”ì´ì…˜ 키 삽입하기" +msgstr "ì• ë‹ˆë©”ì´ì…˜ 키 삽입" #: editor/plugins/spatial_editor_plugin.cpp msgid "Focus Origin" @@ -7349,7 +7424,7 @@ msgstr "ìžìœ 시ì í† ê¸€" #: editor/plugins/spatial_editor_plugin.cpp #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Transform" -msgstr "변형하기" +msgstr "변형" #: editor/plugins/spatial_editor_plugin.cpp msgid "Snap Object to Floor" @@ -7438,7 +7513,7 @@ msgstr "변형 바꾸기" #: editor/plugins/spatial_editor_plugin.cpp msgid "Translate:" -msgstr "ì´ë™í•˜ê¸°:" +msgstr "ì´ë™:" #: editor/plugins/spatial_editor_plugin.cpp msgid "Rotate (deg.):" @@ -7498,31 +7573,31 @@ msgstr "LightOccluder2D 미리 보기" #: editor/plugins/sprite_editor_plugin.cpp msgid "Sprite is empty!" -msgstr "스프ë¼ì´íŠ¸ê°€ 없어요!" +msgstr "스프ë¼ì´íŠ¸ê°€ 없습니다!" #: editor/plugins/sprite_editor_plugin.cpp msgid "Can't convert a sprite using animation frames to mesh." -msgstr "ì• ë‹ˆë©”ì´ì…˜ í”„ë ˆìž„ì„ ì‚¬ìš©í•˜ëŠ” 스프ë¼ì´íŠ¸ë¥¼ 메시로 ë³€í™˜í• ìˆ˜ 없어요." +msgstr "ì• ë‹ˆë©”ì´ì…˜ í”„ë ˆìž„ì„ ì‚¬ìš©í•˜ëŠ” 스프ë¼ì´íŠ¸ë¥¼ 메시로 ë³€í™˜í• ìˆ˜ 없습니다." #: editor/plugins/sprite_editor_plugin.cpp msgid "Invalid geometry, can't replace by mesh." -msgstr "ìž˜ëª»ëœ í˜•íƒœ. 메시로 ëŒ€ì²´í• ìˆ˜ 없어요." +msgstr "ìž˜ëª»ëœ í˜•íƒœ. 메시로 ëŒ€ì²´í• ìˆ˜ 없습니다." #: editor/plugins/sprite_editor_plugin.cpp msgid "Convert to Mesh2D" -msgstr "Mesh2D로 변환하기" +msgstr "Mesh2D로 변환" #: editor/plugins/sprite_editor_plugin.cpp msgid "Invalid geometry, can't create polygon." -msgstr "ìž˜ëª»ëœ í˜•íƒœ. í´ë¦¬ê³¤ì„ 만들 수 없어요." +msgstr "ìž˜ëª»ëœ í˜•íƒœ. í´ë¦¬ê³¤ì„ 만들 수 없습니다." #: editor/plugins/sprite_editor_plugin.cpp msgid "Convert to Polygon2D" -msgstr "Polygon2D로 변환하기" +msgstr "Polygon2D로 변환" #: editor/plugins/sprite_editor_plugin.cpp msgid "Invalid geometry, can't create collision polygon." -msgstr "ìž˜ëª»ëœ í˜•íƒœ. ì¶©ëŒ í´ë¦¬ê³¤ì„ 만들 수 없어요." +msgstr "ìž˜ëª»ëœ í˜•íƒœ. ì¶©ëŒ í´ë¦¬ê³¤ì„ 만들 수 없습니다." #: editor/plugins/sprite_editor_plugin.cpp msgid "Create CollisionPolygon2D Sibling" @@ -7530,7 +7605,7 @@ msgstr "CollisionPolygon2D 노드 만들기" #: editor/plugins/sprite_editor_plugin.cpp msgid "Invalid geometry, can't create light occluder." -msgstr "ìž˜ëª»ëœ í˜•íƒœ, 조명 ì–´í´ë£¨ë”를 만들 수 없어요." +msgstr "ìž˜ëª»ëœ í˜•íƒœ, 조명 ì–´í´ë£¨ë”를 만들 수 없습니다." #: editor/plugins/sprite_editor_plugin.cpp msgid "Create LightOccluder2D Sibling" @@ -7566,11 +7641,11 @@ msgstr "ì„ íƒí•œ í”„ë ˆìž„ ì—†ìŒ" #: editor/plugins/sprite_frames_editor_plugin.cpp msgid "Add %d Frame(s)" -msgstr "%dê°œì˜ í”„ë ˆìž„ 추가하기" +msgstr "%dê°œì˜ í”„ë ˆìž„ 추가" #: editor/plugins/sprite_frames_editor_plugin.cpp msgid "Add Frame" -msgstr "í”„ë ˆìž„ 추가하기" +msgstr "í”„ë ˆìž„ 추가" #: editor/plugins/sprite_frames_editor_plugin.cpp msgid "Unable to load images" @@ -7578,11 +7653,11 @@ msgstr "ì´ë¯¸ì§€ë¥¼ 불러올 수 ì—†ìŒ" #: editor/plugins/sprite_frames_editor_plugin.cpp msgid "ERROR: Couldn't load frame resource!" -msgstr "오류: í”„ë ˆìž„ 리소스를 불러올 수 없어요!" +msgstr "오류: í”„ë ˆìž„ 리소스를 불러올 수 없습니다!" #: editor/plugins/sprite_frames_editor_plugin.cpp msgid "Resource clipboard is empty or not a texture!" -msgstr "리소스 í´ë¦½ë³´ë“œê°€ 비었거나 í…스처가 아니ì—ìš”!" +msgstr "리소스 í´ë¦½ë³´ë“œê°€ 비었거나 í…스처가 아닙니다!" #: editor/plugins/sprite_frames_editor_plugin.cpp msgid "Paste Frame" @@ -7590,7 +7665,7 @@ msgstr "í”„ë ˆìž„ 붙여넣기" #: editor/plugins/sprite_frames_editor_plugin.cpp msgid "Add Empty" -msgstr "빈 í”„ë ˆìž„ 추가하기" +msgstr "빈 í”„ë ˆìž„ 추가" #: editor/plugins/sprite_frames_editor_plugin.cpp msgid "Change Animation FPS" @@ -7602,7 +7677,7 @@ msgstr "(비었ìŒ)" #: editor/plugins/sprite_frames_editor_plugin.cpp msgid "Move Frame" -msgstr "í”„ë ˆìž„ ì´ë™í•˜ê¸°" +msgstr "í”„ë ˆìž„ ì´ë™" #: editor/plugins/sprite_frames_editor_plugin.cpp msgid "Animations:" @@ -7626,31 +7701,31 @@ msgstr "ì• ë‹ˆë©”ì´ì…˜ í”„ë ˆìž„:" #: editor/plugins/sprite_frames_editor_plugin.cpp msgid "Add a Texture from File" -msgstr "파ì¼ì—서 í…스처 추가하기" +msgstr "파ì¼ì—서 í…스처 추가" #: editor/plugins/sprite_frames_editor_plugin.cpp msgid "Add Frames from a Sprite Sheet" -msgstr "스프ë¼ì´íЏ 시트ì—서 í”„ë ˆìž„ 추가하기" +msgstr "스프ë¼ì´íЏ 시트ì—서 í”„ë ˆìž„ 추가" #: editor/plugins/sprite_frames_editor_plugin.cpp msgid "Insert Empty (Before)" -msgstr "빈 í”„ë ˆìž„ 삽입하기 (ì´ì „)" +msgstr "빈 í”„ë ˆìž„ 삽입 (ì´ì „)" #: editor/plugins/sprite_frames_editor_plugin.cpp msgid "Insert Empty (After)" -msgstr "빈 í”„ë ˆìž„ 삽입하기 (ì´í›„)" +msgstr "빈 í”„ë ˆìž„ 삽입 (ì´í›„)" #: editor/plugins/sprite_frames_editor_plugin.cpp msgid "Move (Before)" -msgstr "ì´ë™í•˜ê¸° (ì´ì „)" +msgstr "ì´ë™ (ì´ì „)" #: editor/plugins/sprite_frames_editor_plugin.cpp msgid "Move (After)" -msgstr "ì´ë™í•˜ê¸° (ì´í›„)" +msgstr "ì´ë™ (ì´í›„)" #: editor/plugins/sprite_frames_editor_plugin.cpp msgid "Select Frames" -msgstr "í”„ë ˆìž„ ì„ íƒí•˜ê¸°" +msgstr "í”„ë ˆìž„ ì„ íƒ" #: editor/plugins/sprite_frames_editor_plugin.cpp msgid "Horizontal:" @@ -7662,7 +7737,7 @@ msgstr "수ì§:" #: editor/plugins/sprite_frames_editor_plugin.cpp msgid "Select/Clear All Frames" -msgstr "ëª¨ë“ í”„ë ˆìž„ ì„ íƒí•˜ê¸°/지우기" +msgstr "ëª¨ë“ í”„ë ˆìž„ ì„ íƒ/지우기" #: editor/plugins/sprite_frames_editor_plugin.cpp msgid "Create Frames from Sprite Sheet" @@ -7674,11 +7749,11 @@ msgstr "스프ë¼ì´íЏ í”„ë ˆìž„" #: editor/plugins/texture_region_editor_plugin.cpp msgid "Set Region Rect" -msgstr "ì‚¬ê° ì˜ì— ì„¤ì •í•˜ê¸°" +msgstr "ì‚¬ê° ì˜ì— ì„¤ì •" #: editor/plugins/texture_region_editor_plugin.cpp msgid "Set Margin" -msgstr "여백 ì„¤ì •í•˜ê¸°" +msgstr "여백 ì„¤ì •" #: editor/plugins/texture_region_editor_plugin.cpp msgid "Snap Mode:" @@ -7719,23 +7794,23 @@ msgstr "í…스처 ì˜ì—" #: editor/plugins/theme_editor_plugin.cpp msgid "Add All Items" -msgstr "ëª¨ë“ í•목 추가하기" +msgstr "ëª¨ë“ í•목 추가" #: editor/plugins/theme_editor_plugin.cpp msgid "Add All" -msgstr "ëª¨ë‘ ì¶”ê°€í•˜ê¸°" +msgstr "ëª¨ë‘ ì¶”ê°€" #: editor/plugins/theme_editor_plugin.cpp msgid "Remove All Items" -msgstr "ëª¨ë“ í•목 ì‚ì œí•˜ê¸°" +msgstr "ëª¨ë“ í•목 ì‚ì œ" #: editor/plugins/theme_editor_plugin.cpp editor/project_manager.cpp msgid "Remove All" -msgstr "ëª¨ë‘ ì‚ì œí•˜ê¸°" +msgstr "ëª¨ë‘ ì‚ì œ" #: editor/plugins/theme_editor_plugin.cpp msgid "Edit Theme" -msgstr "테마 편집하기" +msgstr "테마 편집" #: editor/plugins/theme_editor_plugin.cpp msgid "Theme editing menu." @@ -7743,11 +7818,11 @@ msgstr "테마 편집 메뉴." #: editor/plugins/theme_editor_plugin.cpp msgid "Add Class Items" -msgstr "í´ëž˜ìФ í•목 추가하기" +msgstr "í´ëž˜ìФ í•목 추가" #: editor/plugins/theme_editor_plugin.cpp msgid "Remove Class Items" -msgstr "í´ëž˜ìФ í•목 ì‚ì œí•˜ê¸°" +msgstr "í´ëž˜ìФ í•목 ì‚ì œ" #: editor/plugins/theme_editor_plugin.cpp msgid "Create Empty Template" @@ -7885,7 +7960,7 @@ msgstr "ì„ íƒ í•목 잘ë¼ë‚´ê¸°" #: editor/plugins/tile_map_editor_plugin.cpp msgid "Paint TileMap" -msgstr "타ì¼ë§µ ì¹ í•˜ê¸°" +msgstr "타ì¼ë§µ ì¹ " #: editor/plugins/tile_map_editor_plugin.cpp msgid "Line Draw" @@ -7941,15 +8016,15 @@ msgstr "" #: editor/plugins/tile_map_editor_plugin.cpp msgid "Pick Tile" -msgstr "íƒ€ì¼ ì„ íƒí•˜ê¸°" +msgstr "íƒ€ì¼ ì„ íƒ" #: editor/plugins/tile_map_editor_plugin.cpp msgid "Rotate Left" -msgstr "왼쪽으로 íšŒì „í•˜ê¸°" +msgstr "왼쪽으로 íšŒì „" #: editor/plugins/tile_map_editor_plugin.cpp msgid "Rotate Right" -msgstr "오른쪽으로 íšŒì „í•˜ê¸°" +msgstr "오른쪽으로 íšŒì „" #: editor/plugins/tile_map_editor_plugin.cpp msgid "Flip Horizontally" @@ -7965,11 +8040,11 @@ msgstr "변형 지우기" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Add Texture(s) to TileSet." -msgstr "TileSetì— í…스처 추가하기." +msgstr "TileSetì— í…스처를 추가합니다." #: editor/plugins/tile_set_editor_plugin.cpp msgid "Remove selected Texture from TileSet." -msgstr "ì„ íƒí•œ í…스처를 TileSetì—서 ì‚ì œí•˜ê¸°." +msgstr "ì„ íƒí•œ í…스처를 TileSetì—서 ì‚ì œ." #: editor/plugins/tile_set_editor_plugin.cpp msgid "Create from Scene" @@ -8069,7 +8144,7 @@ msgstr "Z ì¸ë±ìФ 모드" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Copy bitmask." -msgstr "비트 ë§ˆìŠ¤í¬ ë³µì‚¬í•˜ê¸°." +msgstr "비트 ë§ˆìŠ¤í¬ ë³µì‚¬." #: editor/plugins/tile_set_editor_plugin.cpp msgid "Paste bitmask." @@ -8081,15 +8156,15 @@ msgstr "비트 ë§ˆìŠ¤í¬ ì§€ìš°ê¸°." #: editor/plugins/tile_set_editor_plugin.cpp msgid "Create a new rectangle." -msgstr "새로운 사ê°í˜• 만들기." +msgstr "새로운 사ê°í˜•ì„ ë§Œë“니다." #: editor/plugins/tile_set_editor_plugin.cpp msgid "Create a new polygon." -msgstr "새로운 í´ë¦¬ê³¤ 만들기." +msgstr "새로운 í´ë¦¬ê³¤ì„ ë§Œë“니다." #: editor/plugins/tile_set_editor_plugin.cpp msgid "Keep polygon inside region Rect." -msgstr "사ê°í˜• ë‚´ë¶€ì— í´ë¦¬ê³¤ì„ ìœ ì§€í•˜ê¸°." +msgstr "사ê°í˜• ë‚´ë¶€ì— í´ë¦¬ê³¤ì„ ìœ ì§€." #: editor/plugins/tile_set_editor_plugin.cpp msgid "Enable snap and show grid (configurable via the Inspector)." @@ -8108,15 +8183,15 @@ msgstr "" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Remove selected texture? This will remove all tiles which use it." msgstr "" -"ì„ íƒí•œ í…스처를 ì‚ì œí• ê¹Œìš”? ì´ í…스처를 사용하는 ëª¨ë“ íƒ€ì¼ë„ ì‚ì œë 거예요." +"ì„ íƒí•œ í…스처를 ì‚ì œí• ê¹Œìš”? ì´ í…스처를 사용하는 ëª¨ë“ íƒ€ì¼ë„ ì‚ì œë 것입니다." #: editor/plugins/tile_set_editor_plugin.cpp msgid "You haven't selected a texture to remove." -msgstr "ì‚ì œí• í…스처를 ì„ íƒí•˜ì§€ 않았어요." +msgstr "ì‚ì œí• í…스처를 ì„ íƒí•˜ì§€ 않았습니다." #: editor/plugins/tile_set_editor_plugin.cpp msgid "Create from scene? This will overwrite all current tiles." -msgstr "씬ì—서 만들까요? ëª¨ë“ í˜„ìž¬ 파ì¼ì„ ë®ì–´ 씌울 거예요." +msgstr "씬ì—서 만들까요? ëª¨ë“ í˜„ìž¬ 파ì¼ì„ ë®ì–´ 씌울 것입니다." #: editor/plugins/tile_set_editor_plugin.cpp msgid "Merge from scene?" @@ -8124,35 +8199,35 @@ msgstr "씬ì—서 ë³‘í•©í• ê¹Œìš”?" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Remove Texture" -msgstr "í…스처 ì‚ì œí•˜ê¸°" +msgstr "í…스처 ì‚ì œ" #: editor/plugins/tile_set_editor_plugin.cpp msgid "%s file(s) were not added because was already on the list." -msgstr "%s 파ì¼ì´ ì´ë¯¸ 목ë¡ì— 있어서 추가하지 않았어요." +msgstr "%s 파ì¼ì´ ì´ë¯¸ 목ë¡ì— 있어서 추가하지 않았습니다." #: editor/plugins/tile_set_editor_plugin.cpp msgid "" "Drag handles to edit Rect.\n" "Click on another Tile to edit it." msgstr "" -"í•¸ë“¤ì„ ë“œëž˜ê·¸í•˜ì—¬ 사ê°í˜•ì„ íŽ¸ì§‘í•´ìš”.\n" +"í•¸ë“¤ì„ ë“œëž˜ê·¸í•˜ì—¬ 사ê°í˜•ì„ íŽ¸ì§‘í•©ë‹ˆë‹¤.\n" "다른 타ì¼ì„ íŽ¸ì§‘í•˜ë ¤ë©´ í´ë¦í•˜ì„¸ìš”." #: editor/plugins/tile_set_editor_plugin.cpp msgid "Delete selected Rect." -msgstr "ì„ íƒí•œ 사ê°í˜•ì„ ì‚ì œí•˜ê¸°." +msgstr "ì„ íƒí•œ 사ê°í˜•ì„ ì‚ì œí•©ë‹ˆë‹¤." #: editor/plugins/tile_set_editor_plugin.cpp msgid "" "Select current edited sub-tile.\n" "Click on another Tile to edit it." msgstr "" -"현재 편집한 하위 타ì¼ì„ ì„ íƒí•´ìš”.\n" +"현재 편집한 하위 타ì¼ì„ ì„ íƒí•©ë‹ˆë‹¤.\n" "다른 타ì¼ì„ íŽ¸ì§‘í•˜ë ¤ë©´ í´ë¦í•˜ì„¸ìš”." #: editor/plugins/tile_set_editor_plugin.cpp msgid "Delete polygon." -msgstr "í´ë¦¬ê³¤ ì‚ì œí•˜ê¸°." +msgstr "í´ë¦¬ê³¤ì„ ì‚ì œí•©ë‹ˆë‹¤." #: editor/plugins/tile_set_editor_plugin.cpp msgid "" @@ -8161,9 +8236,9 @@ msgid "" "Shift+LMB: Set wildcard bit.\n" "Click on another Tile to edit it." msgstr "" -"좌í´ë¦: 비트를 켜요.\n" -"ìš°í´ë¦: 비트를 꺼요.\n" -"Shift+좌í´ë¦: 와ì¼ë“œì¹´ë“œ 비트를 ì„¤ì •í•´ìš”.\n" +"좌í´ë¦: 비트를 ì¼ë‹ˆë‹¤.\n" +"ìš°í´ë¦: 비트를 ë•니다.\n" +"Shift+좌í´ë¦: 와ì¼ë“œì¹´ë“œ 비트를 ì„¤ì •í•©ë‹ˆë‹¤.\n" "다른 타ì¼ì„ íŽ¸ì§‘í•˜ë ¤ë©´ í´ë¦í•˜ì„¸ìš”." #: editor/plugins/tile_set_editor_plugin.cpp @@ -8173,7 +8248,7 @@ msgid "" "Click on another Tile to edit it." msgstr "" "ì•„ì´ì½˜ìœ¼ë¡œ 쓸 하위 타ì¼ì„ ì„ íƒí•˜ì„¸ìš”. ì´ê²ƒì€ ìž˜ëª»ëœ ì˜¤í† íƒ€ì¼ ë°”ì¸ë”©ì—ë„ ì‚¬ìš©" -"ë¼ìš”.\n" +"ë©ë‹ˆë‹¤.\n" "다른 타ì¼ì„ íŽ¸ì§‘í•˜ë ¤ë©´ í´ë¦í•˜ì„¸ìš”." #: editor/plugins/tile_set_editor_plugin.cpp @@ -8181,7 +8256,7 @@ msgid "" "Select sub-tile to change its priority.\n" "Click on another Tile to edit it." msgstr "" -"하위 타ì¼ì„ ì„ íƒí•´ì„œ ìš°ì„ ìˆœìœ„ë¥¼ 바꿔요.\n" +"하위 타ì¼ì„ ì„ íƒí•´ì„œ ìš°ì„ ìˆœìœ„ë¥¼ 바꿉니다.\n" "다른 타ì¼ì„ íŽ¸ì§‘í•˜ë ¤ë©´ í´ë¦í•˜ì„¸ìš”." #: editor/plugins/tile_set_editor_plugin.cpp @@ -8189,12 +8264,12 @@ msgid "" "Select sub-tile to change its z index.\n" "Click on another Tile to edit it." msgstr "" -"하위 타ì¼ì„ ì„ íƒí•´ì„œ Z ì¸ë±ìŠ¤ë¥¼ 바꿔요.\n" +"하위 타ì¼ì„ ì„ íƒí•´ì„œ Z ì¸ë±ìŠ¤ë¥¼ 바꿉니다.\n" "다른 타ì¼ì„ íŽ¸ì§‘í•˜ë ¤ë©´ í´ë¦í•˜ì„¸ìš”." #: editor/plugins/tile_set_editor_plugin.cpp msgid "Set Tile Region" -msgstr "íƒ€ì¼ ì˜ì— ì„¤ì •í•˜ê¸°" +msgstr "íƒ€ì¼ ì˜ì— ì„¤ì •" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Create Tile" @@ -8202,23 +8277,23 @@ msgstr "íƒ€ì¼ ë§Œë“¤ê¸°" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Set Tile Icon" -msgstr "íƒ€ì¼ ì•„ì´ì½˜ ì„¤ì •í•˜ê¸°" +msgstr "íƒ€ì¼ ì•„ì´ì½˜ ì„¤ì •" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Edit Tile Bitmask" -msgstr "íƒ€ì¼ ë¹„íŠ¸ ë§ˆìŠ¤í¬ íŽ¸ì§‘í•˜ê¸°" +msgstr "íƒ€ì¼ ë¹„íŠ¸ ë§ˆìŠ¤í¬ íŽ¸ì§‘" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Edit Collision Polygon" -msgstr "ì¶©ëŒ í´ë¦¬ê³¤ 편집하기" +msgstr "ì¶©ëŒ í´ë¦¬ê³¤ 편집" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Edit Occlusion Polygon" -msgstr "ì–´í´ë£¨ì „ í´ë¦¬ê³¤ 편집하기" +msgstr "ì–´í´ë£¨ì „ í´ë¦¬ê³¤ 편집" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Edit Navigation Polygon" -msgstr "내비게ì´ì…˜ í´ë¦¬ê³¤ 편집하기" +msgstr "내비게ì´ì…˜ í´ë¦¬ê³¤ 편집" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Paste Tile Bitmask" @@ -8238,27 +8313,27 @@ msgstr "ë³¼ë¡í•œ í´ë¦¬ê³¤ 만들기" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Remove Tile" -msgstr "íƒ€ì¼ ì‚ì œí•˜ê¸°" +msgstr "íƒ€ì¼ ì‚ì œ" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Remove Collision Polygon" -msgstr "ì¶©ëŒ í´ë¦¬ê³¤ ì‚ì œí•˜ê¸°" +msgstr "ì¶©ëŒ í´ë¦¬ê³¤ ì‚ì œ" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Remove Occlusion Polygon" -msgstr "ì–´í´ë£¨ì „ í´ë¦¬ê³¤ ì‚ì œí•˜ê¸°" +msgstr "ì–´í´ë£¨ì „ í´ë¦¬ê³¤ ì‚ì œ" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Remove Navigation Polygon" -msgstr "내비게ì´ì…˜ í´ë¦¬ê³¤ ì‚ì œí•˜ê¸°" +msgstr "내비게ì´ì…˜ í´ë¦¬ê³¤ ì‚ì œ" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Edit Tile Priority" -msgstr "í•„í„° ìš°ì„ ìˆœìœ„ 편집하기" +msgstr "í•„í„° ìš°ì„ ìˆœìœ„ 편집" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Edit Tile Z Index" -msgstr "íƒ€ì¼ Z ì¸ë±ìФ 편집하기" +msgstr "íƒ€ì¼ Z ì¸ë±ìФ 편집" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Make Convex" @@ -8278,7 +8353,7 @@ msgstr "ì–´í´ë£¨ì „ í´ë¦¬ê³¤ 만들기" #: editor/plugins/tile_set_editor_plugin.cpp msgid "This property can't be changed." -msgstr "ì´ ì†ì„±ì€ 바꿀 수 없어요." +msgstr "ì´ ì†ì„±ì€ 바꿀 수 없습니다." #: editor/plugins/tile_set_editor_plugin.cpp msgid "TileSet" @@ -8286,19 +8361,19 @@ msgstr "타ì¼ì…‹" #: editor/plugins/version_control_editor_plugin.cpp msgid "No VCS addons are available." -msgstr "ì´ìš©í• 수 있는 ë²„ì „ 관리 시스템(VCS)ì´ ì—†ì–´ìš”." +msgstr "ì´ìš©í• 수 있는 ë²„ì „ 관리 시스템(VCS)ì´ ì—†ìŠµë‹ˆë‹¤." -#: editor/plugins/version_control_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/version_control_editor_plugin.cpp msgid "Error" msgstr "오류" #: editor/plugins/version_control_editor_plugin.cpp msgid "No commit message was provided" -msgstr "커밋 메시지를 ì œê³µí•˜ì§€ 않았어요" +msgstr "커밋 메시지를 ì œê³µí•˜ì§€ 않았습니다" #: editor/plugins/version_control_editor_plugin.cpp msgid "No files added to stage" -msgstr "스테ì´ì§€ì— ì¶”ê°€ëœ íŒŒì¼ì´ 없어요" +msgstr "스테ì´ì§€ì— ì¶”ê°€ëœ íŒŒì¼ì´ 없습니다" #: editor/plugins/version_control_editor_plugin.cpp msgid "Commit" @@ -8306,7 +8381,7 @@ msgstr "커밋" #: editor/plugins/version_control_editor_plugin.cpp msgid "VCS Addon is not initialized" -msgstr "ë²„ì „ 관리 시스템(VCS)ì´ ì´ˆê¸°í™”ë˜ì§€ 않았어요" +msgstr "ë²„ì „ 관리 시스템(VCS)ì´ ì´ˆê¸°í™”ë˜ì§€ 않았습니다" #: editor/plugins/version_control_editor_plugin.cpp msgid "Version Control System" @@ -8354,7 +8429,7 @@ msgstr "ëª¨ë‘ ìŠ¤í…Œì´ì§€ë¡œ 보내기" #: editor/plugins/version_control_editor_plugin.cpp msgid "Add a commit message" -msgstr "커밋 메시지 추가하기" +msgstr "커밋 메시지 추가" #: editor/plugins/version_control_editor_plugin.cpp msgid "Commit Changes" @@ -8371,7 +8446,7 @@ msgstr "ìµœì‹ ë²„ì „ìœ¼ë¡œ 커밋하기 ì „ì— íŒŒì¼ diff 보기" #: editor/plugins/version_control_editor_plugin.cpp msgid "No file diff is active" -msgstr "íŒŒì¼ diffê°€ ì¼œì ¸ 있지 않아요" +msgstr "íŒŒì¼ diffê°€ ì¼œì ¸ 있지 않습니다" #: editor/plugins/version_control_editor_plugin.cpp msgid "Detect changes in file diff" @@ -8383,7 +8458,7 @@ msgstr "(GLES3ë§Œ 가능)" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Add Output" -msgstr "ì¶œë ¥ 추가하기" +msgstr "ì¶œë ¥ 추가" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Scalar" @@ -8435,27 +8510,27 @@ msgstr "ì¶œë ¥ í¬íЏ ì‚ì œí•˜ê¸°" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Set expression" -msgstr "í‘œí˜„ì‹ ì„¤ì •í•˜ê¸°" +msgstr "í‘œí˜„ì‹ ì„¤ì •" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Resize VisualShader node" -msgstr "비주얼 ì…°ì´ë” 노드 í¬ê¸° ì¡°ì •í•˜ê¸°" +msgstr "비주얼 ì…°ì´ë” 노드 í¬ê¸° ì¡°ì •" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Set Uniform Name" -msgstr "Uniform ì´ë¦„ ì„¤ì •í•˜ê¸°" +msgstr "Uniform ì´ë¦„ ì„¤ì •" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Set Input Default Port" -msgstr "ìž…ë ¥ 기본 í¬íЏ ì„¤ì •í•˜ê¸°" +msgstr "ìž…ë ¥ 기본 í¬íЏ ì„¤ì •" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Add Node to Visual Shader" -msgstr "노드를 비주얼 ì…°ì´ë”ì— ì¶”ê°€í•˜ê¸°" +msgstr "노드를 비주얼 ì…°ì´ë”ì— ì¶”ê°€" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Duplicate Nodes" -msgstr "노드 ë³µì œí•˜ê¸°" +msgstr "노드 ë³µì œ" #: editor/plugins/visual_shader_editor_plugin.cpp #: modules/visual_script/visual_script_editor.cpp @@ -8464,7 +8539,7 @@ msgstr "노드 붙여넣기" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Delete Nodes" -msgstr "노드 ì‚ì œí•˜ê¸°" +msgstr "노드 ì‚ì œ" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Visual Shader Input Type Changed" @@ -8504,11 +8579,11 @@ msgstr "회색조 함수." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Converts HSV vector to RGB equivalent." -msgstr "HSV 벡터를 RGB로 변환해요." +msgstr "HSV 벡터를 RGB로 변환합니다." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Converts RGB vector to HSV equivalent." -msgstr "RGB 벡터를 HSV로 변환해요." +msgstr "RGB 벡터를 HSV로 변환합니다." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Sepia function." @@ -8560,7 +8635,7 @@ msgstr "ìƒ‰ìƒ Uniform." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Returns the boolean result of the %s comparison between two parameters." -msgstr "ë‘ ë§¤ê°œë³€ìˆ˜ ì‚¬ì´ %s 비êµì˜ 불리언 ê²°ê³¼ ê°’ì„ ë°˜í™˜í•´ìš”." +msgstr "ë‘ ë§¤ê°œë³€ìˆ˜ ì‚¬ì´ %s 비êµì˜ 불리언 ê²°ê³¼ ê°’ì„ ë°˜í™˜í•©ë‹ˆë‹¤." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Equal (==)" @@ -8578,20 +8653,20 @@ msgstr "보다 í¬ê±°ë‚˜ 같다 (>=)" msgid "" "Returns an associated vector if the provided scalars are equal, greater or " "less." -msgstr "ì œê³µëœ ìŠ¤ì¹¼ë¼ê°€ 같거나, ë” í¬ê±°ë‚˜, ë” ìž‘ìœ¼ë©´ ê´€ë ¨ 벡터를 반환해요." +msgstr "ì œê³µëœ ìŠ¤ì¹¼ë¼ê°€ 같거나, ë” í¬ê±°ë‚˜, ë” ìž‘ìœ¼ë©´ ê´€ë ¨ 벡터를 반환합니다." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "" "Returns the boolean result of the comparison between INF and a scalar " "parameter." -msgstr "INF(무한)ê³¼ ìŠ¤ì¹¼ë¼ ë§¤ê°œë³€ìˆ˜ ì‚¬ì´ ë¹„êµì˜ 불리언 ê²°ê³¼ ê°’ì„ ë°˜í™˜í•´ìš”." +msgstr "INF(무한)ê³¼ ìŠ¤ì¹¼ë¼ ë§¤ê°œë³€ìˆ˜ ì‚¬ì´ ë¹„êµì˜ 불리언 ê²°ê³¼ ê°’ì„ ë°˜í™˜í•©ë‹ˆë‹¤." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "" "Returns the boolean result of the comparison between NaN and a scalar " "parameter." msgstr "" -"NaN(ìˆ«ìž ì•„ë‹˜)ê³¼ ìŠ¤ì¹¼ë¼ ë§¤ê°œë³€ìˆ˜ ì‚¬ì´ ë¹„êµì˜ 불리언 ê²°ê³¼ ê°’ì„ ë°˜í™˜í•´ìš”." +"NaN(ìˆ«ìž ì•„ë‹˜)ê³¼ ìŠ¤ì¹¼ë¼ ë§¤ê°œë³€ìˆ˜ ì‚¬ì´ ë¹„êµì˜ 불리언 ê²°ê³¼ ê°’ì„ ë°˜í™˜í•©ë‹ˆë‹¤." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Less Than (<)" @@ -8608,16 +8683,16 @@ msgstr "같지 않다 (!=)" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "" "Returns an associated vector if the provided boolean value is true or false." -msgstr "불리언 ê°’ì´ ì°¸ì´ê±°ë‚˜ ê±°ì§“ì´ë©´ ê´€ë ¨ 벡터를 반환해요." +msgstr "불리언 ê°’ì´ ì°¸ì´ê±°ë‚˜ ê±°ì§“ì´ë©´ ê´€ë ¨ 벡터를 반환합니다." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "" "Returns an associated scalar if the provided boolean value is true or false." -msgstr "불리언 ê°’ì´ ì°¸ì´ê±°ë‚˜ ê±°ì§“ì´ë©´ ê´€ë ¨ 스칼ë¼ë¥¼ 반환해요." +msgstr "불리언 ê°’ì´ ì°¸ì´ê±°ë‚˜ ê±°ì§“ì´ë©´ ê´€ë ¨ 스칼ë¼ë¥¼ 반환합니다." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Returns the boolean result of the comparison between two parameters." -msgstr "ë‘ ë§¤ê°œë³€ìˆ˜ ì‚¬ì´ ë¹„êµì˜ 불리언 ê²°ê³¼ ê°’ì„ ë°˜í™˜í•´ìš”." +msgstr "ë‘ ë§¤ê°œë³€ìˆ˜ ì‚¬ì´ ë¹„êµì˜ 불리언 ê²°ê³¼ ê°’ì„ ë°˜í™˜í•©ë‹ˆë‹¤." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "" @@ -8625,7 +8700,7 @@ msgid "" "scalar parameter." msgstr "" "INF(무한) (ë˜ëŠ” NaN(ìˆ«ìž ì•„ë‹˜))ê³¼ ìŠ¤ì¹¼ë¼ ë§¤ê°œë³€ìˆ˜ ì‚¬ì´ ë¹„êµì˜ 불리언 ê²°ê³¼ ê°’" -"ì„ ë°˜í™˜í•´ìš”." +"ì„ ë°˜í™˜í•©ë‹ˆë‹¤." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Boolean constant." @@ -8709,35 +8784,35 @@ msgstr "Sqrt2 ìƒìˆ˜ (1.414214). 2ì˜ ì œê³±ê·¼." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Returns the absolute value of the parameter." -msgstr "ë§¤ê°œë³€ìˆ˜ì˜ ì ˆëŒ€ê°’ì„ ë°˜í™˜í•´ìš”." +msgstr "ë§¤ê°œë³€ìˆ˜ì˜ ì ˆëŒ€ê°’ì„ ë°˜í™˜í•©ë‹ˆë‹¤." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Returns the arc-cosine of the parameter." -msgstr "ë§¤ê°œë³€ìˆ˜ì˜ ì•„í¬ì½”ì‚¬ì¸ ê°’ì„ ë°˜í™˜í•´ìš”." +msgstr "ë§¤ê°œë³€ìˆ˜ì˜ ì•„í¬ì½”ì‚¬ì¸ ê°’ì„ ë°˜í™˜í•©ë‹ˆë‹¤." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Returns the inverse hyperbolic cosine of the parameter." -msgstr "ë§¤ê°œë³€ìˆ˜ì˜ ì—ìŒê³¡ì½”ì‚¬ì¸ ê°’ì„ ë°˜í™˜í•´ìš”." +msgstr "ë§¤ê°œë³€ìˆ˜ì˜ ì—ìŒê³¡ì½”ì‚¬ì¸ ê°’ì„ ë°˜í™˜í•©ë‹ˆë‹¤." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Returns the arc-sine of the parameter." -msgstr "ë§¤ê°œë³€ìˆ˜ì˜ ì•„í¬ì‚¬ì¸ ê°’ì„ ë°˜í™˜í•´ìš”." +msgstr "ë§¤ê°œë³€ìˆ˜ì˜ ì•„í¬ì‚¬ì¸ ê°’ì„ ë°˜í™˜í•©ë‹ˆë‹¤." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Returns the inverse hyperbolic sine of the parameter." -msgstr "ë§¤ê°œë³€ìˆ˜ì˜ ì—ìŒê³¡ì‚¬ì¸ ê°’ì„ ë°˜í™˜í•´ìš”." +msgstr "ë§¤ê°œë³€ìˆ˜ì˜ ì—ìŒê³¡ì‚¬ì¸ ê°’ì„ ë°˜í™˜í•©ë‹ˆë‹¤." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Returns the arc-tangent of the parameter." -msgstr "ë§¤ê°œë³€ìˆ˜ì˜ ì•„í¬íƒ„ì 트 ê°’ì„ ë°˜í™˜í•´ìš”." +msgstr "ë§¤ê°œë³€ìˆ˜ì˜ ì•„í¬íƒ„ì 트 ê°’ì„ ë°˜í™˜í•©ë‹ˆë‹¤." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Returns the arc-tangent of the parameters." -msgstr "ë§¤ê°œë³€ìˆ˜ë“¤ì˜ ì•„í¬íƒ„ì 트 ê°’ì„ ë°˜í™˜í•´ìš”." +msgstr "ë§¤ê°œë³€ìˆ˜ë“¤ì˜ ì•„í¬íƒ„ì 트 ê°’ì„ ë°˜í™˜í•©ë‹ˆë‹¤." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Returns the inverse hyperbolic tangent of the parameter." -msgstr "ë§¤ê°œë³€ìˆ˜ì˜ ì—ìŒê³¡íƒ„ì 트 ê°’ì„ ë°˜í™˜í•´ìš”." +msgstr "ë§¤ê°œë³€ìˆ˜ì˜ ì—ìŒê³¡íƒ„ì 트 ê°’ì„ ë°˜í™˜í•©ë‹ˆë‹¤." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "" @@ -8746,19 +8821,19 @@ msgstr "매개변수보다 í¬ê±°ë‚˜ ê°™ì€ ê°€ìž¥ 가까운 ì •ìˆ˜ë¥¼ 찾아요 #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Constrains a value to lie between two further values." -msgstr "ë–¨ì–´ì ¸ 있는 ë‘ ê°’ 사ì´ì— 놓ì´ëŠ” ê°’ì„ ì œí•œí•´ìš”." +msgstr "ë–¨ì–´ì ¸ 있는 ë‘ ê°’ 사ì´ì— 놓ì´ëŠ” ê°’ì„ ì œí•œí•©ë‹ˆë‹¤." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Returns the cosine of the parameter." -msgstr "ë§¤ê°œë³€ìˆ˜ì˜ ì½”ì‚¬ì¸ ê°’ì„ ë°˜í™˜í•´ìš”." +msgstr "ë§¤ê°œë³€ìˆ˜ì˜ ì½”ì‚¬ì¸ ê°’ì„ ë°˜í™˜í•©ë‹ˆë‹¤." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Returns the hyperbolic cosine of the parameter." -msgstr "ë§¤ê°œë³€ìˆ˜ì˜ ìŒê³¡ì½”ì‚¬ì¸ ê°’ì„ ë°˜í™˜í•´ìš”." +msgstr "ë§¤ê°œë³€ìˆ˜ì˜ ìŒê³¡ì½”ì‚¬ì¸ ê°’ì„ ë°˜í™˜í•©ë‹ˆë‹¤." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Converts a quantity in radians to degrees." -msgstr "ê°ë„ 단위를 ë¼ë””안ì—서 ë„로 변환해요." +msgstr "ê°ë„ 단위를 ë¼ë””안ì—서 ë„로 변환합니다." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Base-e Exponential." @@ -8774,11 +8849,11 @@ msgstr "매개변수보다 ì 거나 ê°™ì€ ê°€ìž¥ 가까운 ì •ìˆ˜ë¥¼ 찾아요 #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Computes the fractional part of the argument." -msgstr "ì¸ìˆ˜ì˜ 소수 ë¶€ë¶„ì„ ê³„ì‚°í•´ìš”." +msgstr "ì¸ìˆ˜ì˜ 소수 ë¶€ë¶„ì„ ê³„ì‚°í•©ë‹ˆë‹¤." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Returns the inverse of the square root of the parameter." -msgstr "ë§¤ê°œë³€ìˆ˜ì˜ ì œê³±ê·¼ ì—함수 ê°’ì„ ë°˜í™˜í•´ìš”." +msgstr "ë§¤ê°œë³€ìˆ˜ì˜ ì œê³±ê·¼ ì—함수 ê°’ì„ ë°˜í™˜í•©ë‹ˆë‹¤." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Natural logarithm." @@ -8790,11 +8865,11 @@ msgstr "2ê°€ ë°‘ì¸ ë¡œê·¸ 함수." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Returns the greater of two values." -msgstr "ë‘ ê°’ 중 ë” í° ê°’ì„ ë°˜í™˜í•´ìš”." +msgstr "ë‘ ê°’ 중 ë” í° ê°’ì„ ë°˜í™˜í•©ë‹ˆë‹¤." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Returns the lesser of two values." -msgstr "ë‘ ê°’ 중 ë” ìž‘ì€ ê°’ì„ ë°˜í™˜í•´ìš”." +msgstr "ë‘ ê°’ 중 ë” ìž‘ì€ ê°’ì„ ë°˜í™˜í•©ë‹ˆë‹¤." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Linear interpolation between two scalars." @@ -8802,7 +8877,7 @@ msgstr "ë‘ ìŠ¤ì¹¼ë¼ ê°’ ì‚¬ì´ ì„ í˜• ë³´ê°„." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Returns the opposite value of the parameter." -msgstr "ë§¤ê°œë³€ìˆ˜ì˜ ë°˜ëŒ€ ê°’ì„ ë°˜í™˜í•´ìš”." +msgstr "ë§¤ê°œë³€ìˆ˜ì˜ ë°˜ëŒ€ ê°’ì„ ë°˜í™˜í•©ë‹ˆë‹¤." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "1.0 - scalar" @@ -8811,11 +8886,11 @@ msgstr "1.0 - 스칼ë¼" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "" "Returns the value of the first parameter raised to the power of the second." -msgstr "첫 번째 매개변수를 ë‘ ë²ˆì§¸ 매개변수로 ì œê³±í•œ ê°’ì„ ë°˜í™˜í•´ìš”." +msgstr "첫 번째 매개변수를 ë‘ ë²ˆì§¸ 매개변수로 ì œê³±í•œ ê°’ì„ ë°˜í™˜í•©ë‹ˆë‹¤." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Converts a quantity in degrees to radians." -msgstr "ê°ë„ 단위를 ë„ì—서 ë¼ë””안으로 변환해요." +msgstr "ê°ë„ 단위를 ë„ì—서 ë¼ë””안으로 변환합니다." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "1.0 / scalar" @@ -8831,23 +8906,23 @@ msgstr "매개변수ì—서 가장 가까운 ì§ìˆ˜ ì •ìˆ˜ë¥¼ 찾아요." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Clamps the value between 0.0 and 1.0." -msgstr "ê°’ì„ 0.0ì—서 1.0 사ì´ë¡œ ê³ ì •í•´ìš”." +msgstr "ê°’ì„ 0.0ì—서 1.0 사ì´ë¡œ ê³ ì •í•©ë‹ˆë‹¤." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Extracts the sign of the parameter." -msgstr "ë§¤ê°œë³€ìˆ˜ì˜ ë¶€í˜¸ë¥¼ 추출해요." +msgstr "ë§¤ê°œë³€ìˆ˜ì˜ ë¶€í˜¸ë¥¼ 추출합니다." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Returns the sine of the parameter." -msgstr "ë§¤ê°œë³€ìˆ˜ì˜ ì‚¬ì¸ ê°’ì„ ë°˜í™˜í•´ìš”." +msgstr "ë§¤ê°œë³€ìˆ˜ì˜ ì‚¬ì¸ ê°’ì„ ë°˜í™˜í•©ë‹ˆë‹¤." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Returns the hyperbolic sine of the parameter." -msgstr "ë§¤ê°œë³€ìˆ˜ì˜ ìŒê³¡ì‚¬ì¸ ê°’ì„ ë°˜í™˜í•´ìš”." +msgstr "ë§¤ê°œë³€ìˆ˜ì˜ ìŒê³¡ì‚¬ì¸ ê°’ì„ ë°˜í™˜í•©ë‹ˆë‹¤." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Returns the square root of the parameter." -msgstr "ë§¤ê°œë³€ìˆ˜ì˜ ì œê³±ê·¼ì„ ë°˜í™˜í•´ìš”." +msgstr "ë§¤ê°œë³€ìˆ˜ì˜ ì œê³±ê·¼ì„ ë°˜í™˜í•©ë‹ˆë‹¤." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "" @@ -8859,8 +8934,8 @@ msgid "" msgstr "" "SmoothStep 함수( 스칼ë¼(edge0), 스칼ë¼(edge1), 스칼ë¼(x) ).\n" "\n" -"'x'ê°€ 'edge0'보다 작으면 0.0ì„ ë°˜í™˜í•˜ê³ , 'edge1'보다 í¬ë©´ 1.0ì„ ë°˜í™˜í•´ìš”. ê·¸" -"ë ‡ì§€ ì•Šì€ ê²½ìš°, ì—르미트 다í•ì‹ì„ í†µí•´ë°˜í™˜ê°’ì„ 0.0ê³¼ 1.0사ì´ë¡œ ë³´ê°„í•´ìš”." +"'x'ê°€ 'edge0'보다 작으면 0.0ì„ ë°˜í™˜í•˜ê³ , 'edge1'보다 í¬ë©´ 1.0ì„ ë°˜í™˜í•©ë‹ˆë‹¤. " +"ê·¸ë ‡ì§€ ì•Šì€ ê²½ìš°, ì—르미트 다í•ì‹ì„ í†µí•´ë°˜í™˜ê°’ì„ 0.0ê³¼ 1.0사ì´ë¡œ 보간합니다." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "" @@ -8870,15 +8945,15 @@ msgid "" msgstr "" "Step 함수( 스칼ë¼(edge), 스칼ë¼(x) ).\n" "\n" -"'x'ê°€ 'edge'보다 작으면 0.0ì„ ë°˜í™˜í•˜ê³ ê·¸ë ‡ì§€ 않으면 1.0ì„ ë°˜í™˜í•´ìš”." +"'x'ê°€ 'edge'보다 작으면 0.0ì„ ë°˜í™˜í•˜ê³ ê·¸ë ‡ì§€ 않으면 1.0ì„ ë°˜í™˜í•©ë‹ˆë‹¤." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Returns the tangent of the parameter." -msgstr "ë§¤ê°œë³€ìˆ˜ì˜ íƒ„ì 트 ê°’ì„ ë°˜í™˜í•´ìš”." +msgstr "ë§¤ê°œë³€ìˆ˜ì˜ íƒ„ì 트 ê°’ì„ ë°˜í™˜í•©ë‹ˆë‹¤." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Returns the hyperbolic tangent of the parameter." -msgstr "ë§¤ê°œë³€ìˆ˜ì˜ ìŒê³¡íƒ„ì 트 ê°’ì„ ë°˜í™˜í•´ìš”." +msgstr "ë§¤ê°œë³€ìˆ˜ì˜ ìŒê³¡íƒ„ì 트 ê°’ì„ ë°˜í™˜í•©ë‹ˆë‹¤." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Finds the truncated value of the parameter." @@ -8886,23 +8961,23 @@ msgstr "ë§¤ê°œë³€ìˆ˜ì˜ ì ˆì‚¬ëœ ê°’ì„ ì°¾ì•„ìš”." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Adds scalar to scalar." -msgstr "스칼ë¼ì— 스칼ë¼ë¥¼ ë”í•´ìš”." +msgstr "스칼ë¼ì— 스칼ë¼ë¥¼ ë”합니다." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Divides scalar by scalar." -msgstr "스칼ë¼ë¥¼ 스칼ë¼ë¡œ 나누어요." +msgstr "스칼ë¼ë¥¼ 스칼ë¼ë¡œ 나눕니다." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Multiplies scalar by scalar." -msgstr "스칼ë¼ë¥¼ 스칼ë¼ë¡œ 곱해요." +msgstr "스칼ë¼ë¥¼ 스칼ë¼ë¡œ 곱합니다." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Returns the remainder of the two scalars." -msgstr "ë‘ ìŠ¤ì¹¼ë¼ì˜ 나머지를 반환해요." +msgstr "ë‘ ìŠ¤ì¹¼ë¼ì˜ 나머지를 반환합니다." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Subtracts scalar from scalar." -msgstr "스칼ë¼ì—서 스칼ë¼ë¥¼ 빼요." +msgstr "스칼ë¼ì—서 스칼ë¼ë¥¼ ëºë‹ˆë‹¤." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Scalar constant." @@ -8914,11 +8989,11 @@ msgstr "ìŠ¤ì¹¼ë¼ Uniform." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Perform the cubic texture lookup." -msgstr "ì„¸ì œê³± í…스처 ë£©ì—…ì„ ìˆ˜í–‰í•´ìš”." +msgstr "ì„¸ì œê³± í…스처 ë£©ì—…ì„ ìˆ˜í–‰í•©ë‹ˆë‹¤." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Perform the texture lookup." -msgstr "í…스처 ë£©ì—…ì„ ìˆ˜í–‰í•´ìš”." +msgstr "í…스처 ë£©ì—…ì„ ìˆ˜í–‰í•©ë‹ˆë‹¤." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Cubic texture uniform lookup." @@ -8946,40 +9021,40 @@ msgid "" "whose number of rows is the number of components in 'c' and whose number of " "columns is the number of components in 'r'." msgstr "" -"벡터 한 ìŒì˜ 외ì ì„ ê³„ì‚°í•´ìš”.\n" +"벡터 한 ìŒì˜ 외ì ì„ ê³„ì‚°í•©ë‹ˆë‹¤.\n" "\n" "OuterProduct는 첫 매개변수 'c'를 ì—´ 벡터로 ì·¨ê¸‰í•˜ê³ (1열로 ì´ë£¨ì–´ì§„ í–‰ë ¬) ë‘ " -"번째 매개변수 'r'ì„ í–‰ 벡터로 취급해요 (1행으로 ì´ë£¨ì–´ì§„ í–‰ë ¬), ê·¸ë¦¬ê³ ì„ í˜• " -"대수 í–‰ë ¬ì— 'c * r'ì„ ê³±í•´ì„œ í–‰ë ¬ì„ ì‚°ì¶œí•˜ëŠ”ë°, í–‰ 수는 'c'ì˜ êµ¬ì„± 요소 수ì´" -"ê³ ì—´ 수는 'r'ì˜ êµ¬ì„± 요소 수가 ë¼ìš”." +"번째 매개변수 'r'ì„ í–‰ 벡터로 취급합니다 (1행으로 ì´ë£¨ì–´ì§„ í–‰ë ¬), ê·¸ë¦¬ê³ ì„ " +"형 대수 í–‰ë ¬ì— 'c * r'ì„ ê³±í•´ì„œ í–‰ë ¬ì„ ì‚°ì¶œí•˜ëŠ”ë°, í–‰ 수는 'c'ì˜ êµ¬ì„± 요소 수" +"ì´ê³ ì—´ 수는 'r'ì˜ êµ¬ì„± 요소 수가 ë©ë‹ˆë‹¤." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Composes transform from four vectors." -msgstr "4ê°œì˜ ë²¡í„°ë¡œ ë³€í˜•ì„ í•©ì„±í•´ìš”." +msgstr "4ê°œì˜ ë²¡í„°ë¡œ ë³€í˜•ì„ í•©ì„±í•©ë‹ˆë‹¤." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Decomposes transform to four vectors." -msgstr "ë³€í˜•ì„ 4ê°œì˜ ë²¡í„°ë¡œ ë¶„í•´í•´ìš”." +msgstr "ë³€í˜•ì„ 4ê°œì˜ ë²¡í„°ë¡œ 분해합니다." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Calculates the determinant of a transform." -msgstr "ë³€í˜•ì˜ í–‰ë ¬ì‹ì„ 계산해요." +msgstr "ë³€í˜•ì˜ í–‰ë ¬ì‹ì„ 계산합니다." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Calculates the inverse of a transform." -msgstr "ë³€í˜•ì˜ ì—함수를 계산해요." +msgstr "ë³€í˜•ì˜ ì—함수를 계산합니다." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Calculates the transpose of a transform." -msgstr "ë³€í˜•ì˜ ì „ì¹˜ë¥¼ 계산해요." +msgstr "ë³€í˜•ì˜ ì „ì¹˜ë¥¼ 계산합니다." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Multiplies transform by transform." -msgstr "ë³€í˜•ì— ë³€í˜•ì„ ê³±í•´ìš”." +msgstr "ë³€í˜•ì— ë³€í˜•ì„ ê³±í•©ë‹ˆë‹¤." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Multiplies vector by transform." -msgstr "ë³€í˜•ì— ë²¡í„°ë¥¼ 곱해요." +msgstr "ë³€í˜•ì— ë²¡í„°ë¥¼ 곱합니다." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Transform constant." @@ -8999,23 +9074,23 @@ msgstr "벡터 ì—°ì‚°ìž." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Composes vector from three scalars." -msgstr "세 ê°œì˜ ìŠ¤ì¹¼ë¼ë¡œ 벡터를 합성해요." +msgstr "세 ê°œì˜ ìŠ¤ì¹¼ë¼ë¡œ 벡터를 합성합니다." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Decomposes vector to three scalars." -msgstr "벡터를 세 ê°œì˜ ìŠ¤ì¹¼ë¼ë¡œ ë¶„í•´í•´ìš”." +msgstr "벡터를 세 ê°œì˜ ìŠ¤ì¹¼ë¼ë¡œ 분해합니다." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Calculates the cross product of two vectors." -msgstr "ë‘ ë²¡í„°ì˜ ë²¡í„°ê³± ê°’ì„ ê³„ì‚°í•´ìš”." +msgstr "ë‘ ë²¡í„°ì˜ ë²¡í„°ê³± ê°’ì„ ê³„ì‚°í•©ë‹ˆë‹¤." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Returns the distance between two points." -msgstr "ë‘ ì 사ì´ì˜ 거리를 반환해요." +msgstr "ë‘ ì 사ì´ì˜ 거리를 반환합니다." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Calculates the dot product of two vectors." -msgstr "ë‘ ë²¡í„°ì˜ ìŠ¤ì¹¼ë¼ê³± ê°’ì„ ê³„ì‚°í•´ìš”." +msgstr "ë‘ ë²¡í„°ì˜ ìŠ¤ì¹¼ë¼ê³± ê°’ì„ ê³„ì‚°í•©ë‹ˆë‹¤." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "" @@ -9024,14 +9099,14 @@ msgid "" "incident vector, and Nref, the reference vector. If the dot product of I and " "Nref is smaller than zero the return value is N. Otherwise -N is returned." msgstr "" -"ê°™ì€ ë°©í–¥ì„ ê°€ë¦¬í‚¤ëŠ” 벡터를 참조 벡터로 반환해요. 함수ì—는 세 ê°œì˜ ë²¡í„° 매개" -"변수가 있어요 : ë°©í–¥ì„ ì§€ì •í•˜ëŠ” 벡터 N, ì¸ì‹œë˜íЏ 벡터 I, ê·¸ë¦¬ê³ ì°¸ì¡° 벡터 " -"Nref. 만약 I와 Nrefê°€ 0ì˜ ë²¡í„°ê³±ì´ 0보다 작다면 ë°˜í™˜ê°’ì€ Nì´ ë¼ìš”. ê·¸ë ‡ì§€ 않" -"으면 -Nì´ ë°˜í™˜ë¼ìš”." +"ê°™ì€ ë°©í–¥ì„ ê°€ë¦¬í‚¤ëŠ” 벡터를 참조 벡터로 반환합니다. 함수ì—는 세 ê°œì˜ ë²¡í„° 매" +"개변수가 있습니다 : ë°©í–¥ì„ ì§€ì •í•˜ëŠ” 벡터 N, ì¸ì‹œë˜íЏ 벡터 I, ê·¸ë¦¬ê³ ì°¸ì¡° 벡" +"í„° Nref. 만약 I와 Nrefê°€ 0ì˜ ë²¡í„°ê³±ì´ 0보다 작다면 ë°˜í™˜ê°’ì€ Nì´ ë©ë‹ˆë‹¤. ê·¸ë ‡" +"ì§€ 않으면 -Nì´ ë°˜í™˜ë©ë‹ˆë‹¤." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Calculates the length of a vector." -msgstr "ë²¡í„°ì˜ ê¸¸ì´ë¥¼ 계산해요." +msgstr "ë²¡í„°ì˜ ê¸¸ì´ë¥¼ 계산합니다." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Linear interpolation between two vectors." @@ -9043,7 +9118,7 @@ msgstr "스칼ë¼ë¥¼ 사용하 ë‘ ë²¡í„° ê°„ì˜ ì„ í˜• ë³´ê°„." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Calculates the normalize product of vector." -msgstr "ë²¡í„°ì˜ ë…¸ë©€ ê°’ì„ ê³„ì‚°í•´ìš”." +msgstr "ë²¡í„°ì˜ ë…¸ë©€ ê°’ì„ ê³„ì‚°í•©ë‹ˆë‹¤." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "1.0 - vector" @@ -9058,11 +9133,11 @@ msgid "" "Returns the vector that points in the direction of reflection ( a : incident " "vector, b : normal vector )." msgstr "" -"반사 ë°©í–¥ì„ ê°€ë¦¬í‚¤ëŠ” 벡터를 반환해요 (a : ì¸ì‹œë˜íЏ 벡터, b : 노멀 벡터)." +"반사 ë°©í–¥ì„ ê°€ë¦¬í‚¤ëŠ” 벡터를 반환합니다 (a : ì¸ì‹œë˜íЏ 벡터, b : 노멀 벡터)." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Returns the vector that points in the direction of refraction." -msgstr "반사 ë°©í–¥ì„ ê°€ë¦¬í‚¤ëŠ” 벡터를 반환해요." +msgstr "반사 ë°©í–¥ì„ ê°€ë¦¬í‚¤ëŠ” 벡터를 반환합니다." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "" @@ -9074,8 +9149,8 @@ msgid "" msgstr "" "SmoothStep 함수( 벡터(edge0), 벡터(edge1), 벡터(x) ).\n" "\n" -"'x'ê°€ 'edge0'보다 작으면 0.0ì„, 'x'ê°€ 'edge1'보다 í¬ë©´ 1.0ì„ ë°˜í™˜í•´ìš”. ê·¸ë ‡" -"ì§€ ì•Šì€ ê²½ìš° ì—르미트 다í•ì‹ìœ¼ë¡œ ë°˜í™˜ê°’ì„ 0.0ê³¼ 1.0 사ì´ë¡œ ë³´ê°„í•´ìš”." +"'x'ê°€ 'edge0'보다 작으면 0.0ì„, 'x'ê°€ 'edge1'보다 í¬ë©´ 1.0ì„ ë°˜í™˜í•©ë‹ˆë‹¤. ê·¸ë ‡" +"ì§€ ì•Šì€ ê²½ìš° ì—르미트 다í•ì‹ìœ¼ë¡œ ë°˜í™˜ê°’ì„ 0.0ê³¼ 1.0 사ì´ë¡œ 보간합니다." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "" @@ -9087,8 +9162,8 @@ msgid "" msgstr "" "SmoothStep 함수( 스칼ë¼(edge0), 스칼ë¼(edge1), 벡터(x) ).\n" "\n" -"'x'ê°€ 'edge0'보다 작으면 0.0ì„, 'x'ê°€ 'edge1'보다 í¬ë©´ 1.0ì„ ë°˜í™˜í•´ìš”. ê·¸ë ‡" -"ì§€ ì•Šì€ ê²½ìš° ì—르미트 다í•ì‹ìœ¼ë¡œ ë°˜í™˜ê°’ì„ 0.0ê³¼ 1.0 사ì´ë¡œ ë³´ê°„í•´ìš”." +"'x'ê°€ 'edge0'보다 작으면 0.0ì„, 'x'ê°€ 'edge1'보다 í¬ë©´ 1.0ì„ ë°˜í™˜í•©ë‹ˆë‹¤. ê·¸ë ‡" +"ì§€ ì•Šì€ ê²½ìš° ì—르미트 다í•ì‹ìœ¼ë¡œ ë°˜í™˜ê°’ì„ 0.0ê³¼ 1.0 사ì´ë¡œ 보간합니다." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "" @@ -9098,7 +9173,7 @@ msgid "" msgstr "" "Step 함수( 벡터(edge), 벡터(x) ).\n" "\n" -"'x'ê°€ 'edge'보다 작으면 0.0ì„ ë°˜í™˜í•˜ê³ , ê·¸ë ‡ì§€ ì•Šì€ ê²½ìš° 1.0ì„ ë°˜í™˜í•´ìš”." +"'x'ê°€ 'edge'보다 작으면 0.0ì„ ë°˜í™˜í•˜ê³ , ê·¸ë ‡ì§€ ì•Šì€ ê²½ìš° 1.0ì„ ë°˜í™˜í•©ë‹ˆë‹¤." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "" @@ -9108,27 +9183,27 @@ msgid "" msgstr "" "Step 함수( 스칼ë¼(edge), 벡터(x) ).\n" "\n" -"'x'ê°€ 'edge'보다 작으면 0.0ì„ ë°˜í™˜í•˜ê³ , ê·¸ë ‡ì§€ ì•Šì€ ê²½ìš° 1.0ì„ ë°˜í™˜í•´ìš”." +"'x'ê°€ 'edge'보다 작으면 0.0ì„ ë°˜í™˜í•˜ê³ , ê·¸ë ‡ì§€ ì•Šì€ ê²½ìš° 1.0ì„ ë°˜í™˜í•©ë‹ˆë‹¤." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Adds vector to vector." -msgstr "ë²¡í„°ì— ë²¡í„°ë¥¼ ë”í•´ìš”." +msgstr "ë²¡í„°ì— ë²¡í„°ë¥¼ ë”합니다." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Divides vector by vector." -msgstr "벡터를 벡터로 나누어요." +msgstr "벡터를 벡터로 나눕니다." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Multiplies vector by vector." -msgstr "벡터를 벡터로 곱해요." +msgstr "벡터를 벡터로 곱합니다." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Returns the remainder of the two vectors." -msgstr "ë‘ ë²¡í„°ì˜ ë‚˜ë¨¸ì§€ë¥¼ 반환해요." +msgstr "ë‘ ë²¡í„°ì˜ ë‚˜ë¨¸ì§€ë¥¼ 반환합니다." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Subtracts vector from vector." -msgstr "벡터ì—서 벡터를 빼요." +msgstr "벡터ì—서 벡터를 ëºë‹ˆë‹¤." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Vector constant." @@ -9153,8 +9228,8 @@ msgid "" "Returns falloff based on the dot product of surface normal and view " "direction of camera (pass associated inputs to it)." msgstr "" -"ì¹´ë©”ë¼ì˜ 화면 방향과 표면 ë…¸ë©€ì˜ ìŠ¤ì¹¼ë¼ê³±ì„ 기반으로 하는 í´ì˜¤í”„를 반환해요 " -"(í´ì˜¤í”„와 ê´€ë ¨ëœ ìž…ë ¥ì„ ì „ë‹¬í•¨)." +"ì¹´ë©”ë¼ì˜ 화면 방향과 표면 ë…¸ë©€ì˜ ìŠ¤ì¹¼ë¼ê³±ì„ 기반으로 하는 í´ì˜¤í”„를 반환합니" +"다 (í´ì˜¤í”„와 ê´€ë ¨ëœ ìž…ë ¥ì„ ì „ë‹¬í•¨)." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "" @@ -9164,8 +9239,8 @@ msgid "" "constants." msgstr "" "ê²°ê³¼ ì…°ì´ë” ìœ„ì— ë°°ì¹˜ëœ, 맞춤 Godot ì…°ì´ë” 언어 표현ì‹. 다양한 함수 ì„ ì–¸ì„ ë†“" -"ì€ ë’¤ ë‚˜ì¤‘ì— í‘œí˜„ì‹ì—서 í˜¸ì¶œí• ìˆ˜ 있어요. Varying, Uniform, ìƒìˆ˜ë„ ì •ì˜í• 수 " -"있어요." +"ì€ ë’¤ ë‚˜ì¤‘ì— í‘œí˜„ì‹ì—서 í˜¸ì¶œí• ìˆ˜ 있습니다. Varying, Uniform, ìƒìˆ˜ë„ ì •ì˜í• " +"수 있습니다." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "(Fragment/Light mode only) Scalar derivative function." @@ -9219,7 +9294,7 @@ msgstr "비주얼 ì…°ì´ë”" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Edit Visual Property" -msgstr "비주얼 ì†ì„± 편집하기" +msgstr "비주얼 ì†ì„± 편집" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Visual Shader Mode Changed" @@ -9231,11 +9306,11 @@ msgstr "실행가능" #: editor/project_export.cpp msgid "Add initial export..." -msgstr "초기 내보내기 추가하기..." +msgstr "초기 내보내기 추가..." #: editor/project_export.cpp msgid "Add previous patches..." -msgstr "ì´ì „ 패치 추가하기..." +msgstr "ì´ì „ 패치 추가..." #: editor/project_export.cpp msgid "Delete patch '%s' from list?" @@ -9250,8 +9325,8 @@ msgid "" "Failed to export the project for platform '%s'.\n" "Export templates seem to be missing or invalid." msgstr "" -"'%s' 플랫í¼ì— 프로ì 트를 내보낼 수 없어요.\n" -"내보내기 í…œí”Œë¦¿ì´ ëˆ„ë½ë˜ê±°ë‚˜ ìž˜ëª»ëœ ëª¨ì–‘ì´ì—ìš”." +"'%s' 플랫í¼ì— 프로ì 트를 내보낼 수 없습니다.\n" +"내보내기 í…œí”Œë¦¿ì´ ëˆ„ë½ë˜ê±°ë‚˜ ìž˜ëª»ëœ ê²ƒ 같습니다." #: editor/project_export.cpp msgid "" @@ -9259,8 +9334,8 @@ msgid "" "This might be due to a configuration issue in the export preset or your " "export settings." msgstr "" -"'%s' 플랫í¼ì— 프로ì 트를 내보낼 수 없어요.\n" -"내보내기 프리셋ì´ë‚˜ 내보내기 ì„¤ì •ì˜ ë¬¸ì œë¡œ 보여요." +"'%s' 플랫í¼ì— 프로ì 트를 내보낼 수 없습니다.\n" +"내보내기 프리셋ì´ë‚˜ 내보내기 ì„¤ì •ì˜ ë¬¸ì œì¸ ê²ƒ 같습니다." #: editor/project_export.cpp msgid "Release" @@ -9284,15 +9359,15 @@ msgstr "프리셋" #: editor/project_export.cpp editor/project_settings_editor.cpp msgid "Add..." -msgstr "추가하기..." +msgstr "추가..." #: editor/project_export.cpp msgid "" "If checked, the preset will be available for use in one-click deploy.\n" "Only one preset per platform may be marked as runnable." msgstr "" -"ì²´í¬í•˜ë©´ í”„ë¦¬ì…‹ì€ ì› í´ë¦ ë°°í¬ë¡œ ì‚¬ìš©í• ìˆ˜ 있게 ë¼ìš”.\n" -"í”Œëž«í¼ ë‹¹ í•˜ë‚˜ì˜ í”„ë¦¬ì…‹ë§Œ 실행 ê°€ëŠ¥í•˜ë‹¤ê³ í‘œì‹œë ê±°ì—ìš”." +"ì²´í¬í•˜ë©´ í”„ë¦¬ì…‹ì€ ì› í´ë¦ ë°°í¬ë¡œ ì‚¬ìš©í• ìˆ˜ 있게 ë©ë‹ˆë‹¤.\n" +"í”Œëž«í¼ ë‹¹ í•˜ë‚˜ì˜ í”„ë¦¬ì…‹ë§Œ 실행 ê°€ëŠ¥í•˜ë‹¤ê³ í‘œì‹œë 것입니다." #: editor/project_export.cpp msgid "Export Path" @@ -9379,11 +9454,11 @@ msgstr "컴파ì¼ë¨" #: editor/project_export.cpp msgid "Encrypted (Provide Key Below)" -msgstr "암호화 (ì•„ëž˜ì— í‚¤ê°€ 필요해요)" +msgstr "암호화 (ì•„ëž˜ì— í‚¤ê°€ 필요합니다)" #: editor/project_export.cpp msgid "Invalid Encryption Key (must be 64 characters long)" -msgstr "ìž˜ëª»ëœ ì•”í˜¸í™” 키 (길ì´ê°€ 64ìžì´ì–´ì•¼ í•´ìš”)" +msgstr "ìž˜ëª»ëœ ì•”í˜¸í™” 키 (길ì´ê°€ 64ìžì´ì–´ì•¼ 합니다)" #: editor/project_export.cpp msgid "Script Encryption Key (256-bits as hex):" @@ -9426,25 +9501,35 @@ msgid "Export With Debug" msgstr "디버그와 함께 내보내기" #: editor/project_manager.cpp -msgid "The path does not exist." -msgstr "경로가 없어요." +#, fuzzy +msgid "The path specified doesn't exist." +msgstr "경로가 없습니다." #: editor/project_manager.cpp -msgid "Invalid '.zip' project file, does not contain a 'project.godot' file." +#, fuzzy +msgid "Error opening package file (it's not in ZIP format)." +msgstr "패키지 파ì¼ì„ 여는 중 오류. ZIP 형ì‹ì´ 아닙니다." + +#: editor/project_manager.cpp +#, fuzzy +msgid "" +"Invalid \".zip\" project file; it doesn't contain a \"project.godot\" file." msgstr "" -"ìž˜ëª»ëœ '.zip' 프로ì 트 파ì¼ì´ì—ìš”. 'project.godot' 파ì¼ì„ ê°–ê³ ìžˆì§€ 않아요." +"ìž˜ëª»ëœ '.zip' 프로ì 트 파ì¼ìž…니다. 'project.godot' 파ì¼ì„ ê°–ê³ ìžˆì§€ 않습니다." #: editor/project_manager.cpp msgid "Please choose an empty folder." msgstr "비어있는 í´ë”를 ì„ íƒí•´ì£¼ì„¸ìš”." #: editor/project_manager.cpp -msgid "Please choose a 'project.godot' or '.zip' file." +#, fuzzy +msgid "Please choose a \"project.godot\" or \".zip\" file." msgstr "'project.godot' íŒŒì¼ ë˜ëŠ” '.zip' 파ì¼ì„ ì„ íƒí•´ì£¼ì„¸ìš”." #: editor/project_manager.cpp -msgid "Directory already contains a Godot project." -msgstr "ë””ë ‰í† ë¦¬ì— Godot 프로ì 트가 ì´ë¯¸ 있어요." +#, fuzzy +msgid "This directory already contains a Godot project." +msgstr "ë””ë ‰í† ë¦¬ì— Godot 프로ì 트가 ì´ë¯¸ 있습니다." #: editor/project_manager.cpp msgid "New Game Project" @@ -9460,35 +9545,35 @@ msgstr "ìž˜ëª»ëœ í”„ë¡œì 트 ì´ë¦„." #: editor/project_manager.cpp msgid "Couldn't create folder." -msgstr "í´ë”를 만들 수 없어요." +msgstr "í´ë”를 만들 수 없습니다." #: editor/project_manager.cpp msgid "There is already a folder in this path with the specified name." -msgstr "ì´ë¯¸ ì´ ê²½ë¡œì— ì´ ì´ë¦„ê³¼ ê°™ì€ í´ë”ê°€ 있어요." +msgstr "ì´ë¯¸ ì´ ê²½ë¡œì— ì´ ì´ë¦„ê³¼ ê°™ì€ í´ë”ê°€ 있습니다." #: editor/project_manager.cpp msgid "It would be a good idea to name your project." -msgstr "프로ì 트 ì´ë¦„ì„ ì •í•˜ëŠ” 게 ì¢‹ì„ ê±°ì˜ˆìš”." +msgstr "프로ì 트 ì´ë¦„ì„ ì •í•˜ëŠ” 게 ì¢‹ì„ ê²ƒìž…ë‹ˆë‹¤." #: editor/project_manager.cpp msgid "Invalid project path (changed anything?)." -msgstr "ìž˜ëª»ëœ í”„ë¡œì 트 경로 (프로ì íŠ¸ì— ì†ëŒ€ì…¨ë‚˜ìš”?)." +msgstr "ìž˜ëª»ëœ í”„ë¡œì 트 경로 (무언가를 변경하셨습니까?)." #: editor/project_manager.cpp msgid "" "Couldn't load project.godot in project path (error %d). It may be missing or " "corrupted." msgstr "" -"프로ì 트 경로ì—서 project.godotì„ ë¶ˆëŸ¬ì˜¬ 수 없어요 (error %d). 누ë½ë˜ê±°ë‚˜ ì†" -"ìƒëœ 모양ì´ì—ìš”." +"프로ì 트 경로ì—서 project.godotì„ ë¶ˆëŸ¬ì˜¬ 수 없습니다 (error %d). 누ë½ë˜ê±°ë‚˜ " +"ì†ìƒëœ 모양입니다." #: editor/project_manager.cpp msgid "Couldn't edit project.godot in project path." -msgstr "프로ì 트 경로ì—서 project.godot 파ì¼ì„ íŽ¸ì§‘í• ìˆ˜ 없어요." +msgstr "프로ì 트 경로ì—서 project.godot 파ì¼ì„ íŽ¸ì§‘í• ìˆ˜ 없습니다." #: editor/project_manager.cpp msgid "Couldn't create project.godot in project path." -msgstr "프로ì 트 경로ì—서 project.godot 파ì¼ì„ 만들 수 없어요." +msgstr "프로ì 트 경로ì—서 project.godot 파ì¼ì„ 만들 수 없습니다." #: editor/project_manager.cpp msgid "Rename Project" @@ -9500,7 +9585,7 @@ msgstr "기존 프로ì 트 ê°€ì ¸ì˜¤ê¸°" #: editor/project_manager.cpp msgid "Import & Edit" -msgstr "ê°€ì ¸ì˜¤ê¸° & 편집하기" +msgstr "ê°€ì ¸ì˜¤ê¸° & 편집" #: editor/project_manager.cpp msgid "Create New Project" @@ -9508,7 +9593,7 @@ msgstr "새 프로ì 트 만들기" #: editor/project_manager.cpp msgid "Create & Edit" -msgstr "만들기 & 편집하기" +msgstr "만들기 & 편집" #: editor/project_manager.cpp msgid "Install Project:" @@ -9516,7 +9601,7 @@ msgstr "프로ì 트 설치:" #: editor/project_manager.cpp msgid "Install & Edit" -msgstr "설치하기 & 편집하기" +msgstr "설치 & 편집" #: editor/project_manager.cpp msgid "Project Name:" @@ -9568,7 +9653,7 @@ msgstr "" #: editor/project_manager.cpp msgid "Renderer can be changed later, but scenes may need to be adjusted." -msgstr "ë Œë”러는 ë‚˜ì¤‘ì— ë°”ê¿€ 수 있지만, ì”¬ì„ ì¡°ì •í•´ì•¼ í• ì§€ë„ ëª°ë¼ìš”." +msgstr "ë Œë”러는 ë‚˜ì¤‘ì— ë°”ê¿€ 수 있지만, ì”¬ì„ ì¡°ì •í•´ì•¼ í• ìˆ˜ë„ ìžˆìŠµë‹ˆë‹¤." #: editor/project_manager.cpp msgid "Unnamed Project" @@ -9580,15 +9665,15 @@ msgstr "누ë½ëœ 프로ì 트" #: editor/project_manager.cpp msgid "Error: Project is missing on the filesystem." -msgstr "오류: 프로ì 트가 íŒŒì¼ ì‹œìŠ¤í…œì—서 누ë½ëì–´ìš”." +msgstr "오류: 프로ì 트가 íŒŒì¼ ì‹œìŠ¤í…œì—서 누ë½ë˜ì—ˆìŠµë‹ˆë‹¤." #: editor/project_manager.cpp msgid "Can't open project at '%s'." -msgstr "'%s'ì—서 프로ì 트를 ì—´ 수 없어요." +msgstr "'%s'ì—서 프로ì 트를 ì—´ 수 없습니다." #: editor/project_manager.cpp msgid "Are you sure to open more than one project?" -msgstr "ë‘ ê°œ ì´ìƒì˜ 프로ì 트를 ì—´ 건가요?" +msgstr "ë‘ ê°œ ì´ìƒì˜ 프로ì 트를 ì—¬ì‹œê² ìŠµë‹ˆê¹Œ?" #: editor/project_manager.cpp msgid "" @@ -9602,12 +9687,12 @@ msgid "" "Warning: You won't be able to open the project with previous versions of the " "engine anymore." msgstr "" -"ë‹¤ìŒ í”„ë¡œì 트 ì„¤ì • 파ì¼ì€ 현재 ë²„ì „ì˜ Godotì—서 ë§Œë“ ê²ƒì´ ì•„ë‹ˆì—ìš”.\n" +"ë‹¤ìŒ í”„ë¡œì 트 ì„¤ì • 파ì¼ì€ 현재 ë²„ì „ì˜ Godotì—서 ë§Œë“ ê²ƒì´ ì•„ë‹™ë‹ˆë‹¤.\n" "↵\n" "%s↵\n" "↵\n" -"íŒŒì¼ ì—´ê¸°ë¥¼ 계ì†í•œë‹¤ë©´, 현재 Godotì˜ êµ¬ì„± íŒŒì¼ í˜•ì‹ìœ¼ë¡œ 변환ë 거예요.\n" -"ê²½ê³ : ë” ì´ìƒ ì´ í”„ë¡œì 트를 ì´ì „ ë²„ì „ì˜ ì—”ì§„ì—서 ì—´ 수 ì—†ì„ ê±°ì˜ˆìš”." +"íŒŒì¼ ì—´ê¸°ë¥¼ 계ì†í•œë‹¤ë©´, 현재 Godotì˜ êµ¬ì„± íŒŒì¼ í˜•ì‹ìœ¼ë¡œ 변환ë 것입니다.\n" +"ê²½ê³ : ë” ì´ìƒ ì´ í”„ë¡œì 트를 ì´ì „ ë²„ì „ì˜ ì—”ì§„ì—서 ì—´ 수 ì—†ì„ ê²ƒìž…ë‹ˆë‹¤." #: editor/project_manager.cpp msgid "" @@ -9621,19 +9706,20 @@ msgid "" "engine anymore." msgstr "" "ë‹¤ìŒ í”„ë¡œì 트 ì„¤ì • 파ì¼ì€ ì´ì „ ë²„ì „ì— ë§Œë“ ê²ƒìœ¼ë¡œ, 현재 ë²„ì „ì— ë§žê²Œ 변환해야 " -"í•´ìš”:\n" +"합니다:\n" "\n" "%s\n" "\n" "ë³€í™˜í• ê¹Œìš”?\n" -"ê²½ê³ : ë” ì´ìƒ ì´ í”„ë¡œì 트를 ì´ì „ ë²„ì „ì˜ ì—”ì§„ì—서 ì—´ 수 ì—†ì„ ê±°ì˜ˆìš”." +"ê²½ê³ : ë” ì´ìƒ ì´ í”„ë¡œì 트를 ì´ì „ ë²„ì „ì˜ ì—”ì§„ì—서 ì—´ 수 ì—†ì„ ê²ƒìž…ë‹ˆë‹¤." #: editor/project_manager.cpp msgid "" "The project settings were created by a newer engine version, whose settings " "are not compatible with this version." msgstr "" -"프로ì 트 ì„¤ì •ì´ ìƒˆ ë²„ì „ì— ë§žê²Œ 만들어졌어요. ì´ ë²„ì „ì—서는 호환하지 않아요." +"프로ì 트 ì„¤ì •ì´ ìƒˆ ë²„ì „ì— ë§žê²Œ 만들어졌습니다. ì´ ë²„ì „ì—서는 호환하지 않습니" +"다." #: editor/project_manager.cpp msgid "" @@ -9641,7 +9727,7 @@ msgid "" "Please edit the project and set the main scene in the Project Settings under " "the \"Application\" category." msgstr "" -"프로ì 트를 ì‹¤í–‰í• ìˆ˜ ì—†ìŒ: ë©”ì¸ ì”¬ì„ ì •ì˜í•˜ì§€ 않았어요.\n" +"프로ì 트를 ì‹¤í–‰í• ìˆ˜ ì—†ìŒ: ë©”ì¸ ì”¬ì„ ì •ì˜í•˜ì§€ 않았습니다.\n" "프로ì 트를 íŽ¸ì§‘í•˜ê³ í”„ë¡œì 트 ì„¤ì •ì˜ \"Application\" ì¹´í…Œê³ ë¦¬ì—서 ë©”ì¸ ì”¬ì„ ì„¤" "ì •í•´ì£¼ì„¸ìš”." @@ -9650,7 +9736,7 @@ msgid "" "Can't run project: Assets need to be imported.\n" "Please edit the project to trigger the initial import." msgstr "" -"프로ì 트를 ì‹¤í–‰í• ìˆ˜ ì—†ìŒ: ì• ì…‹ì„ ê°€ì ¸ì™€ì•¼ í•´ìš”.\n" +"프로ì 트를 ì‹¤í–‰í• ìˆ˜ ì—†ìŒ: ì• ì…‹ì„ ê°€ì ¸ì™€ì•¼ 합니다.\n" "프로ì 트를 편집해서 최초 ê°€ì ¸ì˜¤ê¸°ê°€ 실행ë˜ë„ë¡ í•˜ì„¸ìš”." #: editor/project_manager.cpp @@ -9663,7 +9749,7 @@ msgid "" "The project folders' contents won't be modified." msgstr "" "%dê°œì˜ í”„ë¡œì 트를 ì‚ì œí• ê¹Œìš”?\n" -"프로ì 트 í´ë”ì˜ ë‚´ìš©ì€ ìˆ˜ì •ë˜ì§€ 않아요." +"프로ì 트 í´ë”ì˜ ë‚´ìš©ì€ ìˆ˜ì •ë˜ì§€ 않습니다." #: editor/project_manager.cpp msgid "" @@ -9671,7 +9757,7 @@ msgid "" "The project folder's contents won't be modified." msgstr "" "ì´ í”„ë¡œì 트를 목ë¡ì—서 ì‚ì œí• ê¹Œìš”?\n" -"프로ì 트 í´ë”ì˜ ë‚´ìš©ì€ ìˆ˜ì •ë˜ì§€ 않아요." +"프로ì 트 í´ë”ì˜ ë‚´ìš©ì€ ìˆ˜ì •ë˜ì§€ 않습니다." #: editor/project_manager.cpp msgid "" @@ -9679,15 +9765,15 @@ msgid "" "The project folders' contents won't be modified." msgstr "" "ëª¨ë“ ëˆ„ë½ëœ 프로ì 트를 ì‚ì œí• ê¹Œìš”?\n" -"프로ì 트 í´ë”ì˜ ë‚´ìš©ì€ ìˆ˜ì •ë˜ì§€ 않아요." +"프로ì 트 í´ë”ì˜ ë‚´ìš©ì€ ìˆ˜ì •ë˜ì§€ 않습니다." #: editor/project_manager.cpp msgid "" "Language changed.\n" "The interface will update after restarting the editor or project manager." msgstr "" -"언어가 바뀌었어요.\n" -"ì¸í„°íŽ˜ì´ìŠ¤ëŠ” 편집기나 프로ì 트 ë§¤ë‹ˆì €ë¥¼ 다시 켜면 ì ìš©ë¼ìš”." +"언어가 바뀌었.\n" +"ì¸í„°íŽ˜ì´ìŠ¤ëŠ” 편집기나 프로ì 트 ë§¤ë‹ˆì €ë¥¼ 다시 켜면 ì ìš©ë©ë‹ˆë‹¤." #: editor/project_manager.cpp msgid "" @@ -9695,7 +9781,7 @@ msgid "" "This could take a while." msgstr "" "Godot 프로ì 트를 확ì¸í•˜ê¸° 위해 %s í´ë”를 ìŠ¤ìº”í• ê¹Œìš”?\n" -"ì‹œê°„ì´ ê±¸ë¦´ 수 있어요." +"ì‹œê°„ì´ ê±¸ë¦´ 수 있습니다." #: editor/project_manager.cpp msgid "Project Manager" @@ -9723,7 +9809,7 @@ msgstr "새 프로ì 트" #: editor/project_manager.cpp msgid "Remove Missing" -msgstr "누ë½ëœ 부분 ì‚ì œí•˜ê¸°" +msgstr "누ë½ëœ 부분 ì‚ì œ" #: editor/project_manager.cpp msgid "Templates" @@ -9735,14 +9821,14 @@ msgstr "지금 다시 시작" #: editor/project_manager.cpp msgid "Can't run project" -msgstr "프로ì 트를 ì‹¤í–‰í• ìˆ˜ 없어요" +msgstr "프로ì 트를 ì‹¤í–‰í• ìˆ˜ 없습니다" #: editor/project_manager.cpp msgid "" "You currently don't have any projects.\n" "Would you like to explore official example projects in the Asset Library?" msgstr "" -"현재 프로ì 트가 í•˜ë‚˜ë„ ì—†ì–´ìš”.\n" +"현재 프로ì 트가 í•˜ë‚˜ë„ ì—†ìŠµë‹ˆë‹¤.\n" "ì• ì…‹ ë¼ì´ë¸ŒëŸ¬ë¦¬ì—서 ê³µì‹ ì˜ˆì œ 프로ì 트를 찾아볼까요?" #: editor/project_settings_editor.cpp @@ -9766,11 +9852,12 @@ msgid "" "Invalid action name. it cannot be empty nor contain '/', ':', '=', '\\' or " "'\"'" msgstr "" -"ìž˜ëª»ëœ ì•¡ì…˜ ì´ë¦„. 공백ì´ê±°ë‚˜, '/' , ':', '=', '\\', '\"' 를 í¬í•¨í•˜ë©´ 안 ë¼ìš”" +"ìž˜ëª»ëœ ì•¡ì…˜ ì´ë¦„. 공백ì´ê±°ë‚˜, '/' , ':', '=', '\\', '\"' 를 í¬í•¨í•˜ë©´ 안 ë©ë‹ˆ" +"다" #: editor/project_settings_editor.cpp msgid "An action with the name '%s' already exists." -msgstr "ì´ë¦„ '%s'ì„(를) 가진 ì•¡ì…˜ì´ ì´ë¯¸ 있어요." +msgstr "ì´ë¦„ '%s'ì„(를) 가진 ì•¡ì…˜ì´ ì´ë¯¸ 있습니다." #: editor/project_settings_editor.cpp msgid "Rename Input Action Event" @@ -9782,7 +9869,7 @@ msgstr "ì•¡ì…˜ ë°ë“œì¡´ 바꾸기" #: editor/project_settings_editor.cpp msgid "Add Input Action Event" -msgstr "ìž…ë ¥ ì•¡ì…˜ ì´ë²¤íЏ 추가하기" +msgstr "ìž…ë ¥ ì•¡ì…˜ ì´ë²¤íЏ 추가" #: editor/project_settings_editor.cpp msgid "All Devices" @@ -9854,11 +9941,11 @@ msgstr "ìž…ë ¥ ì•¡ì…˜ 지우기" #: editor/project_settings_editor.cpp msgid "Erase Input Action Event" -msgstr "ìž…ë ¥ ì•¡ì…˜ ì´ë²¤íЏ ì‚ì œí•˜ê¸°" +msgstr "ìž…ë ¥ ì•¡ì…˜ ì´ë²¤íЏ ì‚ì œ" #: editor/project_settings_editor.cpp msgid "Add Event" -msgstr "ì´ë²¤íЏ 추가하기" +msgstr "ì´ë²¤íЏ 추가" #: editor/project_settings_editor.cpp msgid "Button" @@ -9886,7 +9973,7 @@ msgstr "íœ ì•„ëž˜ë¡œ." #: editor/project_settings_editor.cpp msgid "Add Global Property" -msgstr "ì „ì— ì†ì„± 추가하기" +msgstr "ì „ì— ì†ì„± 추가" #: editor/project_settings_editor.cpp msgid "Select a setting item first!" @@ -9894,26 +9981,27 @@ msgstr "ë¨¼ì € ì„¤ì • í•ëª©ì„ ì„ íƒí•˜ì„¸ìš”!" #: editor/project_settings_editor.cpp msgid "No property '%s' exists." -msgstr "'%s' ì†ì„±ì´ 없어요." +msgstr "'%s' ì†ì„±ì´ 없습니다." #: editor/project_settings_editor.cpp msgid "Setting '%s' is internal, and it can't be deleted." -msgstr "'%s' ì„¤ì •ì€ ë‚´ë¶€ì ì¸ ê²ƒì´ì—ìš”. ì‚ì œí• ìˆ˜ 없어요." +msgstr "'%s' ì„¤ì •ì€ ë‚´ë¶€ì ì¸ ê²ƒìž…ë‹ˆë‹¤. ì‚ì œí• ìˆ˜ 없습니다." #: editor/project_settings_editor.cpp msgid "Delete Item" -msgstr "í•목 ì‚ì œí•˜ê¸°" +msgstr "í•목 ì‚ì œ" #: editor/project_settings_editor.cpp msgid "" "Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or " "'\"'." msgstr "" -"ìž˜ëª»ëœ ì•¡ì…˜ ì´ë¦„. 공백ì´ê±°ë‚˜, '/' , ':', '=', '\\', '\"'를 í¬í•¨í•˜ë©´ 안 ë¼ìš”." +"ìž˜ëª»ëœ ì•¡ì…˜ ì´ë¦„. 공백ì´ê±°ë‚˜, '/' , ':', '=', '\\', '\"'를 í¬í•¨í•˜ë©´ 안 ë©ë‹ˆ" +"다." #: editor/project_settings_editor.cpp msgid "Add Input Action" -msgstr "ìž…ë ¥ ì•¡ì…˜ 추가하기" +msgstr "ìž…ë ¥ ì•¡ì…˜ 추가" #: editor/project_settings_editor.cpp msgid "Error saving settings." @@ -9933,19 +10021,19 @@ msgstr "기능 ìž¬ì •ì˜" #: editor/project_settings_editor.cpp msgid "Add Translation" -msgstr "ë²ˆì— ì¶”ê°€í•˜ê¸°" +msgstr "ë²ˆì— ì¶”ê°€" #: editor/project_settings_editor.cpp msgid "Remove Translation" -msgstr "ë²ˆì— ì‚ì œí•˜ê¸°" +msgstr "ë²ˆì— ì‚ì œ" #: editor/project_settings_editor.cpp msgid "Add Remapped Path" -msgstr "리맵핑 경로 추가하기" +msgstr "리맵핑 경로 추가" #: editor/project_settings_editor.cpp msgid "Resource Remap Add Remap" -msgstr "리소스 리맵핑 추가하기" +msgstr "리소스 리맵핑 추가" #: editor/project_settings_editor.cpp msgid "Change Resource Remap Language" @@ -9953,11 +10041,11 @@ msgstr "리소스 리맵핑 언어 바꾸기" #: editor/project_settings_editor.cpp msgid "Remove Resource Remap" -msgstr "리소스 리맵핑 ì‚ì œí•˜ê¸°" +msgstr "리소스 리맵핑 ì‚ì œ" #: editor/project_settings_editor.cpp msgid "Remove Resource Remap Option" -msgstr "리소스 리맵핑 ì„¤ì • ì‚ì œí•˜ê¸°" +msgstr "리소스 리맵핑 ì„¤ì • ì‚ì œ" #: editor/project_settings_editor.cpp msgid "Changed Locale Filter" @@ -9981,7 +10069,7 @@ msgstr "ìž¬ì •ì˜..." #: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp msgid "The editor must be restarted for changes to take effect." -msgstr "변경 사í•ì„ ì ìš©í•˜ë ¤ë©´ 편집기를 다시 켜야 í•´ìš”." +msgstr "변경 사í•ì„ ì ìš©í•˜ë ¤ë©´ 편집기를 다시 켜야 합니다." #: editor/project_settings_editor.cpp msgid "Input Map" @@ -10089,15 +10177,15 @@ msgstr "ë””ë ‰í† ë¦¬..." #: editor/property_editor.cpp msgid "Assign" -msgstr "ì§€ì •í•˜ê¸°" +msgstr "ì§€ì •" #: editor/property_editor.cpp msgid "Select Node" -msgstr "노드 ì„ íƒí•˜ê¸°" +msgstr "노드 ì„ íƒ" #: editor/property_editor.cpp msgid "Error loading file: Not a resource!" -msgstr "íŒŒì¼ ë¶ˆëŸ¬ì˜¤ê¸° 오류: 리소스가 아니ì—ìš”!" +msgstr "íŒŒì¼ ë¶ˆëŸ¬ì˜¤ê¸° 오류: 리소스가 아닙니다!" #: editor/property_editor.cpp msgid "Pick a Node" @@ -10109,15 +10197,15 @@ msgstr "비트 %d, ê°’ %d." #: editor/property_selector.cpp msgid "Select Property" -msgstr "ì†ì„± ì„ íƒí•˜ê¸°" +msgstr "ì†ì„± ì„ íƒ" #: editor/property_selector.cpp msgid "Select Virtual Method" -msgstr "ê°€ìƒ ë©”ì„œë“œ ì„ íƒí•˜ê¸°" +msgstr "ê°€ìƒ ë©”ì„œë“œ ì„ íƒ" #: editor/property_selector.cpp msgid "Select Method" -msgstr "메서드 ì„ íƒí•˜ê¸°" +msgstr "메서드 ì„ íƒ" #: editor/rename_dialog.cpp editor/scene_tree_dock.cpp msgid "Batch Rename" @@ -10132,6 +10220,11 @@ msgid "Suffix" msgstr "ì ‘ë¯¸ì‚¬" #: editor/rename_dialog.cpp +#, fuzzy +msgid "Use Regular Expressions" +msgstr "ì •ê·œ 표현ì‹" + +#: editor/rename_dialog.cpp msgid "Advanced Options" msgstr "ê³ ê¸‰ ì„¤ì •" @@ -10165,15 +10258,16 @@ msgid "" "Compare counter options." msgstr "" "순차 ì •ìˆ˜ ì¹´ìš´í„°.\n" -"ì¹´ìš´í„° ì„¤ì •ê³¼ 비êµí•´ìš”." +"ì¹´ìš´í„° ì„¤ì •ê³¼ 비êµí•©ë‹ˆë‹¤." #: editor/rename_dialog.cpp -msgid "Per Level counter" +#, fuzzy +msgid "Per-level Counter" msgstr "단계 별 ì¹´ìš´í„°" #: editor/rename_dialog.cpp msgid "If set the counter restarts for each group of child nodes" -msgstr "ì„¤ì •í•˜ë©´ ê° ê·¸ë£¹ì˜ ìžì‹ ë…¸ë“œì˜ ì¹´ìš´í„°ë¥¼ 다시 시작해요" +msgstr "ì„¤ì •í•˜ë©´ ê° ê·¸ë£¹ì˜ ìžì‹ ë…¸ë“œì˜ ì¹´ìš´í„°ë¥¼ 다시 시작합니다" #: editor/rename_dialog.cpp msgid "Initial value for the counter" @@ -10197,11 +10291,7 @@ msgid "" "Missing digits are padded with leading zeros." msgstr "" "ì¹´ìš´í„°ì˜ ìµœì†Œ ìžë¦¿ìˆ˜.\n" -"빈 ìžë¦¬ëŠ” 0으로 채워요." - -#: editor/rename_dialog.cpp -msgid "Regular Expressions" -msgstr "ì •ê·œ 표현ì‹" +"빈 ìžë¦¬ëŠ” 0으로 채ì›ë‹ˆë‹¤." #: editor/rename_dialog.cpp msgid "Post-Process" @@ -10209,15 +10299,17 @@ msgstr "후처리" #: editor/rename_dialog.cpp msgid "Keep" -msgstr "ìœ ì§€í•˜ê¸°" +msgstr "ìœ ì§€" #: editor/rename_dialog.cpp -msgid "CamelCase to under_scored" -msgstr "CamelCase를 under_scored로 하기" +#, fuzzy +msgid "PascalCase to snake_case" +msgstr "CamelCase를 under_scored로" #: editor/rename_dialog.cpp -msgid "under_scored to CamelCase" -msgstr "under_scored를 CamelCase로 하기" +#, fuzzy +msgid "snake_case to PascalCase" +msgstr "under_scored를 CamelCase로" #: editor/rename_dialog.cpp msgid "Case" @@ -10225,31 +10317,41 @@ msgstr "문ìž" #: editor/rename_dialog.cpp msgid "To Lowercase" -msgstr "소문ìžë¡œ 하기" +msgstr "소문ìží™”" #: editor/rename_dialog.cpp msgid "To Uppercase" -msgstr "대문ìžë¡œ 하기" +msgstr "대문ìží™”" #: editor/rename_dialog.cpp msgid "Reset" msgstr "ë˜ëŒë¦¬ê¸°" +#: editor/rename_dialog.cpp +#, fuzzy +msgid "Regular Expression Error" +msgstr "ì •ê·œ 표현ì‹" + +#: editor/rename_dialog.cpp +#, fuzzy +msgid "At character %s" +msgstr "올바른 문ìž:" + #: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp msgid "Reparent Node" -msgstr "부모 노드 다시 ì§€ì •í•˜ê¸°" +msgstr "부모 노드 다시 ì§€ì •" #: editor/reparent_dialog.cpp msgid "Reparent Location (Select new Parent):" -msgstr "부모 노드 다시 ì§€ì • 위치 (새 부모 노드를 ì„ íƒí•´ìš”):" +msgstr "부모 노드 다시 ì§€ì • 위치 (새 부모 노드를 ì„ íƒí•©ë‹ˆë‹¤):" #: editor/reparent_dialog.cpp msgid "Keep Global Transform" -msgstr "ì „ì— ë³€í˜• ìœ ì§€í•˜ê¸°" +msgstr "ì „ì— ë³€í˜• ìœ ì§€" #: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp msgid "Reparent" -msgstr "부모 다시 ì§€ì •í•˜ê¸°" +msgstr "부모 다시 ì§€ì •" #: editor/run_settings_dialog.cpp msgid "Run Mode:" @@ -10273,7 +10375,7 @@ msgstr "씬 실행 ì„¤ì •" #: editor/scene_tree_dock.cpp msgid "No parent to instance the scenes at." -msgstr "ì”¬ì„ ì¸ìŠ¤í„´ìŠ¤í• ìˆ˜ 있는 부모가 없어요." +msgstr "ì”¬ì„ ì¸ìŠ¤í„´ìŠ¤í• ìˆ˜ 있는 부모가 없습니다." #: editor/scene_tree_dock.cpp msgid "Error loading scene from %s" @@ -10283,52 +10385,53 @@ msgstr "%sì—서 씬 불러오는 중 오류" msgid "" "Cannot instance the scene '%s' because the current scene exists within one " "of its nodes." -msgstr "한 ë…¸ë“œì— í˜„ìž¬ ì”¬ì´ ìžˆê¸° 때문ì—, '%s' ì”¬ì„ ì¸ìŠ¤í„´ìŠ¤í• ìˆ˜ 없어요." +msgstr "한 ë…¸ë“œì— í˜„ìž¬ ì”¬ì´ ìžˆê¸° 때문ì—, '%s' ì”¬ì„ ì¸ìŠ¤í„´ìŠ¤í• ìˆ˜ 없습니다." #: editor/scene_tree_dock.cpp msgid "Instance Scene(s)" -msgstr "씬 ì¸ìŠ¤í„´ìŠ¤í•˜ê¸°" +msgstr "씬 ì¸ìŠ¤í„´ìŠ¤í™”" #: editor/scene_tree_dock.cpp msgid "Replace with Branch Scene" -msgstr "분기 씬으로 êµì²´í•˜ê¸°" +msgstr "분기 씬으로 êµì²´" #: editor/scene_tree_dock.cpp msgid "Instance Child Scene" -msgstr "ìžì‹ 씬 ì¸ìŠ¤í„´ìŠ¤í•˜ê¸°" +msgstr "ìžì‹ 씬 ì¸ìŠ¤í„´ìŠ¤í™”" #: editor/scene_tree_dock.cpp msgid "Clear Script" -msgstr "스í¬ë¦½íЏ ì‚ì œí•˜ê¸°" +msgstr "스í¬ë¦½íЏ ì‚ì œ" #: editor/scene_tree_dock.cpp msgid "This operation can't be done on the tree root." -msgstr "ì´ ìž‘ì—…ì€ íŠ¸ë¦¬ 루트ì—서 í• ìˆ˜ 없어요." +msgstr "ì´ ìž‘ì—…ì€ íŠ¸ë¦¬ 루트ì—서 í• ìˆ˜ 없습니다." #: editor/scene_tree_dock.cpp msgid "Move Node In Parent" -msgstr "노드를 부모 노드로 ì´ë™í•˜ê¸°" +msgstr "노드를 부모 노드로 ì´ë™" #: editor/scene_tree_dock.cpp msgid "Move Nodes In Parent" -msgstr "ë…¸ë“œë“¤ì„ ë¶€ëª¨ 노드로 ì´ë™í•˜ê¸°" +msgstr "ë…¸ë“œë“¤ì„ ë¶€ëª¨ 노드로 ì´ë™" #: editor/scene_tree_dock.cpp msgid "Duplicate Node(s)" -msgstr "노드 ë³µì œí•˜ê¸°" +msgstr "노드 ë³µì œ" #: editor/scene_tree_dock.cpp msgid "Can't reparent nodes in inherited scenes, order of nodes can't change." msgstr "" -"ìƒì†í•œ 씬ì—서 ë…¸ë“œì˜ ë¶€ëª¨ë¥¼ 다시 ì§€ì •í• ìˆ˜ 없어요. 노드 순서는 바뀌지 않아요." +"ìƒì†í•œ 씬ì—서 ë…¸ë“œì˜ ë¶€ëª¨ë¥¼ 다시 ì§€ì •í• ìˆ˜ 없습니다. 노드 순서는 바뀌지 않습" +"니다." #: editor/scene_tree_dock.cpp msgid "Node must belong to the edited scene to become root." -msgstr "노드는 루트가 ë˜ê¸° ìœ„í•´ì„ íŽ¸ì§‘í•œ ì”¬ì— ì†í•´ì•¼ í•´ìš”." +msgstr "노드는 루트가 ë˜ê¸° ìœ„í•´ì„ íŽ¸ì§‘í•œ ì”¬ì— ì†í•´ì•¼ 합니다." #: editor/scene_tree_dock.cpp msgid "Instantiated scenes can't become root" -msgstr "ì¸ìŠ¤í„´íŠ¸í™”ëœ ì”¬ì€ ë£¨íŠ¸ê°€ ë 수 없어요" +msgstr "ì¸ìŠ¤í„´íŠ¸í™”ëœ ì”¬ì€ ë£¨íŠ¸ê°€ ë 수 없습니다" #: editor/scene_tree_dock.cpp msgid "Make node as Root" @@ -10352,22 +10455,22 @@ msgstr "노드 \"%s\"ì„(를) ì‚ì œí• ê¹Œìš”?" #: editor/scene_tree_dock.cpp msgid "Can not perform with the root node." -msgstr "루트 노드로는 ìˆ˜í–‰í• ìˆ˜ 없어요." +msgstr "루트 노드로는 ìˆ˜í–‰í• ìˆ˜ 없습니다." #: editor/scene_tree_dock.cpp msgid "This operation can't be done on instanced scenes." -msgstr "ì´ ìž‘ì—…ì€ ì¸ìŠ¤í„´ìŠ¤ëœ ì”¬ì—서 í• ìˆ˜ 없어요." +msgstr "ì´ ìž‘ì—…ì€ ì¸ìŠ¤í„´ìŠ¤ëœ ì”¬ì—서 í• ìˆ˜ 없습니다." #: editor/scene_tree_dock.cpp msgid "Save New Scene As..." -msgstr "새 ì”¬ì„ ë‹¤ë¥¸ ì´ë¦„으로 ì €ìž¥í•˜ê¸°..." +msgstr "새 ì”¬ì„ ë‹¤ë¥¸ ì´ë¦„으로 ì €ìž¥..." #: editor/scene_tree_dock.cpp msgid "" "Disabling \"editable_instance\" will cause all properties of the node to be " "reverted to their default." msgstr "" -"\"editable_instance\"를 ë„게 ë˜ë©´ ë…¸ë“œì˜ ëª¨ë“ ì†ì„±ì´ 기본 값으로 ë˜ëŒì•„와요." +"\"editable_instance\"를 ë„게 ë˜ë©´ ë…¸ë“œì˜ ëª¨ë“ ì†ì„±ì´ 기본 값으로 ë³µì›ë©ë‹ˆë‹¤." #: editor/scene_tree_dock.cpp msgid "" @@ -10375,7 +10478,7 @@ msgid "" "cause all properties of the node to be reverted to their default." msgstr "" "\"ìžë¦¬ 표시ìžë¡œ 불러오기\"를 켜면 \"íŽ¸ì§‘í• ìˆ˜ 있는 ìžì‹\" ì„¤ì •ì´ êº¼ì§€ê³ , 그러" -"ë©´ ê·¸ ë…¸ë“œì˜ ëª¨ë“ ì†ì„±ì´ 기본값으로 ëŒì•„와요." +"ë©´ ê·¸ ë…¸ë“œì˜ ëª¨ë“ ì†ì„±ì´ 기본값으로 ë³µì›ë©ë‹ˆë‹¤." #: editor/scene_tree_dock.cpp msgid "Make Local" @@ -10407,11 +10510,11 @@ msgstr "다른 노드" #: editor/scene_tree_dock.cpp msgid "Can't operate on nodes from a foreign scene!" -msgstr "다른 씬ì—서 ìˆ˜í–‰í• ìˆ˜ 없는 작업ì´ì—ìš”!" +msgstr "다른 씬ì—서 ìˆ˜í–‰í• ìˆ˜ 없는 작업입니다!" #: editor/scene_tree_dock.cpp msgid "Can't operate on nodes the current scene inherits from!" -msgstr "ìƒì† 씬 ë‚´ì—서 ìˆ˜í–‰í• ìˆ˜ 없는 작업ì´ì—ìš”!" +msgstr "ìƒì† 씬 ë‚´ì—서 ìˆ˜í–‰í• ìˆ˜ 없는 작업입니다!" #: editor/scene_tree_dock.cpp msgid "Attach Script" @@ -10419,7 +10522,7 @@ msgstr "스í¬ë¦½íЏ ë¶™ì´ê¸°" #: editor/scene_tree_dock.cpp msgid "Remove Node(s)" -msgstr "노드 ì‚ì œí•˜ê¸°" +msgstr "노드 ì‚ì œ" #: editor/scene_tree_dock.cpp msgid "Change type of node(s)" @@ -10430,7 +10533,7 @@ msgid "" "Couldn't save new scene. Likely dependencies (instances) couldn't be " "satisfied." msgstr "" -"ì”¬ì„ ì €ìž¥í• ìˆ˜ 없어요. ì¢…ì† ê´€ê³„ (ì¸ìŠ¤í„´ìŠ¤)ê°€ 만족스럽지 ì•Šì€ ëª¨ì–‘ì´ì—ìš”." +"ì”¬ì„ ì €ìž¥í• ìˆ˜ 없습니다. ì¢…ì† ê´€ê³„ (ì¸ìŠ¤í„´ìŠ¤)ê°€ 만족ë˜ì§€ ì•Šì€ ê²ƒ 같습니다." #: editor/scene_tree_dock.cpp msgid "Error saving scene." @@ -10462,7 +10565,7 @@ msgstr "문서 열기" #: editor/scene_tree_dock.cpp msgid "Add Child Node" -msgstr "ìžì‹ 노드 추가하기" +msgstr "ìžì‹ 노드 추가" #: editor/scene_tree_dock.cpp msgid "Expand/Collapse All" @@ -10474,7 +10577,7 @@ msgstr "ìœ í˜• 바꾸기" #: editor/scene_tree_dock.cpp msgid "Reparent to New Node" -msgstr "새 ë…¸ë“œì— ë¶€ëª¨ 노드 다시 ì§€ì •í•˜ê¸°" +msgstr "새 ë…¸ë“œì— ë¶€ëª¨ 노드 다시 ì§€ì •" #: editor/scene_tree_dock.cpp msgid "Make Scene Root" @@ -10486,34 +10589,34 @@ msgstr "다른 씬ì—서 병합하기" #: editor/scene_tree_dock.cpp editor/script_editor_debugger.cpp msgid "Save Branch as Scene" -msgstr "분기를 씬으로 ì €ìž¥í•˜ê¸°" +msgstr "분기를 씬으로 ì €ìž¥" #: editor/scene_tree_dock.cpp editor/script_editor_debugger.cpp msgid "Copy Node Path" -msgstr "노드 경로 복사하기" +msgstr "노드 경로 복사" #: editor/scene_tree_dock.cpp msgid "Delete (No Confirm)" -msgstr "ì‚ì œí•˜ê¸° (í™•ì¸ ì—†ìŒ)" +msgstr "ì‚ì œ (í™•ì¸ ì—†ìŒ)" #: editor/scene_tree_dock.cpp msgid "Add/Create a New Node." -msgstr "새 노드 추가하기/만들기." +msgstr "새 노드를 추가하거나 ë§Œë“니다." #: editor/scene_tree_dock.cpp msgid "" "Instance a scene file as a Node. Creates an inherited scene if no root node " "exists." msgstr "" -"씬 파ì¼ì„ 노드로 ì¸ìŠ¤í„´ìŠ¤í•´ìš”. 루트 노드가 없으면 ìƒì†ëœ ì”¬ì„ ë§Œë“¤ì–´ìš”." +"씬 파ì¼ì„ 노드로 ì¸ìŠ¤í„´ìŠ¤í•©ë‹ˆë‹¤. 루트 노드가 없으면 ìƒì†ëœ ì”¬ì„ ë§Œë“니다." #: editor/scene_tree_dock.cpp msgid "Attach a new or existing script for the selected node." -msgstr "ì„ íƒí•œ ë…¸ë“œì— ìƒˆë¡œìš´ í˜¹ì€ ì¡´ìž¬í•˜ëŠ” 스í¬ë¦½íŠ¸ë¥¼ 붙여요." +msgstr "ì„ íƒí•œ ë…¸ë“œì— ìƒˆë¡œìš´ í˜¹ì€ ì¡´ìž¬í•˜ëŠ” 스í¬ë¦½íŠ¸ë¥¼ 붙입니다." #: editor/scene_tree_dock.cpp msgid "Clear a script for the selected node." -msgstr "ì„ íƒí•œ ë…¸ë“œì˜ ìŠ¤í¬ë¦½íŠ¸ë¥¼ ì‚ì œí•´ìš”." +msgstr "ì„ íƒí•œ ë…¸ë“œì˜ ìŠ¤í¬ë¦½íŠ¸ë¥¼ ì‚ì œí•©ë‹ˆë‹¤." #: editor/scene_tree_dock.cpp msgid "Remote" @@ -10525,7 +10628,7 @@ msgstr "로컬" #: editor/scene_tree_dock.cpp msgid "Clear Inheritance? (No Undo!)" -msgstr "ìƒì†ì„ 지울까요? (ë˜ëŒë¦´ 수 없어요!)" +msgstr "ìƒì†ì„ 지울까요? (ë˜ëŒë¦´ 수 없습니다!)" #: editor/scene_tree_editor.cpp msgid "Toggle Visible" @@ -10552,7 +10655,7 @@ msgid "" "Node has %s connection(s) and %s group(s).\n" "Click to show signals dock." msgstr "" -"노드가 %s ì—°ê²°ê³¼ %s ê·¸ë£¹ì„ ê°–ê³ ìžˆì–´ìš”.\n" +"노드가 %s ì—°ê²°ê³¼ %s ê·¸ë£¹ì„ ê°–ê³ ìžˆìŠµë‹ˆë‹¤.\n" "í´ë¦í•˜ë©´ ì‹œê·¸ë„ ë…ì„ ë³´ì—¬ì¤˜ìš”." #: editor/scene_tree_editor.cpp @@ -10560,7 +10663,7 @@ msgid "" "Node has %s connection(s).\n" "Click to show signals dock." msgstr "" -"노드가 %s ì—°ê²°ì„ ê°–ê³ ìžˆì–´ìš”.\n" +"노드가 %s ì—°ê²°ì„ ê°–ê³ ìžˆìŠµë‹ˆë‹¤.\n" "í´ë¦í•˜ë©´ ì‹œê·¸ë„ ë…ì„ ë³´ì—¬ì¤˜ìš”." #: editor/scene_tree_editor.cpp @@ -10568,7 +10671,7 @@ msgid "" "Node is in %s group(s).\n" "Click to show groups dock." msgstr "" -"노드가 그룹 ì•ˆì— ìžˆì–´ìš”.\n" +"노드가 그룹 ì•ˆì— ìžˆìŠµë‹ˆë‹¤.\n" "í´ë¦í•˜ë©´ 그룹 ë…ì„ ë³´ì—¬ì¤˜ìš”." #: editor/scene_tree_editor.cpp @@ -10580,16 +10683,16 @@ msgid "" "Node is locked.\n" "Click to unlock it." msgstr "" -"노드가 ìž ê²¨ìžˆì–´ìš”.\n" -"í´ë¦í•˜ë©´ ìž ê¸ˆì„ í’€ì–´ìš”." +"노드가 ìž ê²¨ìžˆìŠµë‹ˆë‹¤.\n" +"í´ë¦í•˜ë©´ ìž ê¸ˆì„ í•´ì œí•©ë‹ˆë‹¤." #: editor/scene_tree_editor.cpp msgid "" "Children are not selectable.\n" "Click to make selectable." msgstr "" -"ìžì‹ì„ ì„ íƒí• 수 없어요.\n" -"í´ë¦í•˜ë©´ ì„ íƒí• 수 있어요." +"ìžì‹ì„ ì„ íƒí• 수 없습니다.\n" +"í´ë¦í•˜ë©´ ì„ íƒí• 수 있습니다." #: editor/scene_tree_editor.cpp msgid "Toggle Visibility" @@ -10600,12 +10703,12 @@ msgid "" "AnimationPlayer is pinned.\n" "Click to unpin." msgstr "" -"AnimationPlayerê°€ ê³ ì •ë˜ì–´ 있어요.\n" -"í´ë¦í•˜ë©´ ê³ ì •ì„ í’€ì–´ìš”." +"AnimationPlayerê°€ ê³ ì •ë˜ì–´ 있습니다.\n" +"í´ë¦í•˜ë©´ ê³ ì •ì„ í•´ì œí•©ë‹ˆë‹¤." #: editor/scene_tree_editor.cpp msgid "Invalid node name, the following characters are not allowed:" -msgstr "ìž˜ëª»ëœ ë…¸ë“œ ì´ë¦„ì´ì—ìš”. ë‹¤ìŒ ë¬¸ìžëŠ” 허용하지 않아요:" +msgstr "ìž˜ëª»ëœ ë…¸ë“œ ì´ë¦„입니다. ë‹¤ìŒ ë¬¸ìžëŠ” 허용하지 않습니다:" #: editor/scene_tree_editor.cpp msgid "Rename Node" @@ -10625,15 +10728,15 @@ msgstr "노드를 ì„ íƒí•˜ì„¸ìš”" #: editor/script_create_dialog.cpp msgid "Path is empty." -msgstr "경로가 비었어요." +msgstr "경로가 비었습니다." #: editor/script_create_dialog.cpp msgid "Filename is empty." -msgstr "íŒŒì¼ ì´ë¦„ì´ ë¹„ì—ˆì–´ìš”." +msgstr "íŒŒì¼ ì´ë¦„ì´ ë¹„ì—ˆìŠµë‹ˆë‹¤." #: editor/script_create_dialog.cpp msgid "Path is not local." -msgstr "경로가 ë¡œì»¬ì´ ì•„ë‹ˆì—ìš”." +msgstr "경로가 ë¡œì»¬ì´ ì•„ë‹™ë‹ˆë‹¤." #: editor/script_create_dialog.cpp msgid "Invalid base path." @@ -10641,7 +10744,7 @@ msgstr "ìž˜ëª»ëœ ê¸°ë³¸ 경로." #: editor/script_create_dialog.cpp msgid "A directory with the same name exists." -msgstr "ê°™ì€ ì´ë¦„ì˜ ë””ë ‰í† ë¦¬ê°€ 있어요." +msgstr "ê°™ì€ ì´ë¦„ì˜ ë””ë ‰í† ë¦¬ê°€ 있습니다." #: editor/script_create_dialog.cpp msgid "Invalid extension." @@ -10657,7 +10760,7 @@ msgstr "'%s' 템플릿 불러오는 중 오류" #: editor/script_create_dialog.cpp msgid "Error - Could not create script in filesystem." -msgstr "오류 - íŒŒì¼ ì‹œìŠ¤í…œì— ìŠ¤í¬ë¦½íŠ¸ë¥¼ 만들 수 없어요." +msgstr "오류 - íŒŒì¼ ì‹œìŠ¤í…œì— ìŠ¤í¬ë¦½íŠ¸ë¥¼ 만들 수 없습니다." #: editor/script_create_dialog.cpp msgid "Error loading script from %s" @@ -10665,7 +10768,7 @@ msgstr "'%s' 스í¬ë¦½íЏ 불러오는 중 오류" #: editor/script_create_dialog.cpp msgid "Overrides" -msgstr "다시 ì •ì˜í•˜ê¸°" +msgstr "ìž¬ì •ì˜" #: editor/script_create_dialog.cpp msgid "N/A" @@ -10673,7 +10776,7 @@ msgstr "해당 ì—†ìŒ" #: editor/script_create_dialog.cpp msgid "Open Script / Choose Location" -msgstr "스í¬ë¦½íЏ 열기 / 위치 ì„ íƒí•˜ê¸°" +msgstr "스í¬ë¦½íЏ 열기 / 위치 ì„ íƒ" #: editor/script_create_dialog.cpp msgid "Open Script" @@ -10681,7 +10784,7 @@ msgstr "스í¬ë¦½íЏ 열기" #: editor/script_create_dialog.cpp msgid "File exists, it will be reused." -msgstr "파ì¼ì´ 있어요. 다시 ì‚¬ìš©í• ê±°ì˜ˆìš”." +msgstr "파ì¼ì´ 있습니다. 다시 ì‚¬ìš©í• ê²ƒìž…ë‹ˆë‹¤." #: editor/script_create_dialog.cpp msgid "Invalid class name." @@ -10692,7 +10795,8 @@ msgid "Invalid inherited parent name or path." msgstr "ìž˜ëª»ëœ ìƒì†ëœ 부모 ì´ë¦„ ë˜ëŠ” 경로." #: editor/script_create_dialog.cpp -msgid "Script is valid." +#, fuzzy +msgid "Script path/name is valid." msgstr "스í¬ë¦½íŠ¸ê°€ 올바릅니다." #: editor/script_create_dialog.cpp @@ -10705,15 +10809,15 @@ msgstr "내장 스í¬ë¦½íЏ (씬 íŒŒì¼ ì•ˆ)." #: editor/script_create_dialog.cpp msgid "Will create a new script file." -msgstr "새 스í¬ë¦½íЏ 파ì¼ì„ 만들어요." +msgstr "새 스í¬ë¦½íЏ 파ì¼ì„ ë§Œë“니다." #: editor/script_create_dialog.cpp msgid "Will load an existing script file." -msgstr "기존 스í¬ë¦½íЏ 파ì¼ì„ 불러와요." +msgstr "기존 스í¬ë¦½íЏ 파ì¼ì„ 불러옵니다." #: editor/script_create_dialog.cpp msgid "Script file already exists." -msgstr "스í¬ë¦½íЏ 파ì¼ì´ ì´ë¯¸ 있어요." +msgstr "스í¬ë¦½íЏ 파ì¼ì´ ì´ë¯¸ 있습니다." #: editor/script_create_dialog.cpp msgid "Class Name:" @@ -10781,7 +10885,12 @@ msgstr "ìžì‹ 프로세스 ì—°ê²°ë¨." #: editor/script_editor_debugger.cpp msgid "Copy Error" -msgstr "복사하기 오류" +msgstr "복사 오류" + +#: editor/script_editor_debugger.cpp +#, fuzzy +msgid "Video RAM" +msgstr "비디오 메모리" #: editor/script_editor_debugger.cpp msgid "Skip Breakpoints" @@ -10789,11 +10898,11 @@ msgstr "중단ì 넘기기" #: editor/script_editor_debugger.cpp msgid "Inspect Previous Instance" -msgstr "ì´ì „ ì¸ìŠ¤í„´ìŠ¤ 검사하기" +msgstr "ì´ì „ ì¸ìŠ¤í„´ìŠ¤ 검사" #: editor/script_editor_debugger.cpp msgid "Inspect Next Instance" -msgstr "ë‹¤ìŒ ì¸ìŠ¤í„´ìŠ¤ 검사하기" +msgstr "ë‹¤ìŒ ì¸ìŠ¤í„´ìŠ¤ 검사" #: editor/script_editor_debugger.cpp msgid "Stack Frames" @@ -10832,10 +10941,6 @@ msgid "Total:" msgstr "ì „ì²´:" #: editor/script_editor_debugger.cpp -msgid "Video Mem" -msgstr "비디오 메모리" - -#: editor/script_editor_debugger.cpp msgid "Resource Path" msgstr "리소스 경로" @@ -10869,7 +10974,7 @@ msgstr "실시간 편집 루트:" #: editor/script_editor_debugger.cpp msgid "Set From Tree" -msgstr "트리ì—서 ì„¤ì •í•˜ê¸°" +msgstr "트리ì—서 ì„¤ì •" #: editor/script_editor_debugger.cpp msgid "Export measures as CSV" @@ -10881,7 +10986,7 @@ msgstr "단축키 지우기" #: editor/settings_config_dialog.cpp msgid "Restore Shortcut" -msgstr "단축키 ë³µì›í•˜ê¸°" +msgstr "단축키 ë³µì›" #: editor/settings_config_dialog.cpp msgid "Change Shortcut" @@ -10973,15 +11078,15 @@ msgstr "ë„ë„› 외부 반지름 바꾸기" #: modules/gdnative/gdnative_library_editor_plugin.cpp msgid "Select the dynamic library for this entry" -msgstr "ì´ í•ëª©ì˜ ë™ì ë¼ì´ë¸ŒëŸ¬ë¦¬ ì„ íƒí•˜ê¸°" +msgstr "ì´ í•ëª©ì˜ ë™ì ë¼ì´ë¸ŒëŸ¬ë¦¬ ì„ íƒ" #: modules/gdnative/gdnative_library_editor_plugin.cpp msgid "Select dependencies of the library for this entry" -msgstr "ì´ í•ëª©ì˜ ë™ì ë¼ì´ë¸ŒëŸ¬ë¦¬ì˜ ì¢…ì† ê´€ê³„ë¥¼ ì„ íƒí•˜ê¸°" +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" @@ -11001,7 +11106,7 @@ msgstr "ë™ì ë¼ì´ë¸ŒëŸ¬ë¦¬" #: modules/gdnative/gdnative_library_editor_plugin.cpp msgid "Add an architecture entry" -msgstr "구조 í•ëª©ì„ ì¶”ê°€í•˜ê¸°" +msgstr "구조 í•ëª©ì„ ì¶”ê°€" #: modules/gdnative/gdnative_library_editor_plugin.cpp msgid "GDNativeLibrary" @@ -11029,7 +11134,7 @@ msgstr "GDNative" #: modules/gdscript/gdscript_functions.cpp msgid "Step argument is zero!" -msgstr "ìŠ¤í… ì¸ìˆ˜ê°€ 0ì´ì—ìš”!" +msgstr "ìŠ¤í… ì¸ìˆ˜ê°€ 0입니다!" #: modules/gdscript/gdscript_functions.cpp msgid "Not a script with an instance" @@ -11061,7 +11166,7 @@ msgstr "ìž˜ëª»ëœ ì¸ìŠ¤í„´ìŠ¤ Dictionary (하위 í´ëž˜ìŠ¤ê°€ 올바르지 않ì #: modules/gdscript/gdscript_functions.cpp msgid "Object can't provide a length." -msgstr "ê°ì²´ëŠ” 길ì´ë¥¼ ì œê³µí• ìˆ˜ 없어요." +msgstr "ê°ì²´ëŠ” 길ì´ë¥¼ ì œê³µí• ìˆ˜ 없습니다." #: modules/gridmap/grid_map_editor_plugin.cpp msgid "Next Plane" @@ -11089,7 +11194,7 @@ msgstr "층:" #: modules/gridmap/grid_map_editor_plugin.cpp msgid "GridMap Delete Selection" -msgstr "그리드맵 ì„ íƒ í•목 ì‚ì œí•˜ê¸°" +msgstr "그리드맵 ì„ íƒ í•목 ì‚ì œ" #: modules/gridmap/grid_map_editor_plugin.cpp msgid "GridMap Fill Selection" @@ -11181,7 +11286,7 @@ msgstr "그리드맵 ì„¤ì •" #: modules/gridmap/grid_map_editor_plugin.cpp msgid "Pick Distance:" -msgstr "거리 ì„ íƒí•˜ê¸°:" +msgstr "거리 ì„ íƒ:" #: modules/gridmap/grid_map_editor_plugin.cpp msgid "Filter meshes" @@ -11193,7 +11298,7 @@ msgstr "메시를 ì‚¬ìš©í•˜ë ¤ë©´ ì´ GridMapì— MeshLibrary 리소스를 주세 #: modules/mono/csharp_script.cpp msgid "Class name can't be a reserved keyword" -msgstr "í´ëž˜ìФ ì´ë¦„ì€ í‚¤ì›Œë“œê°€ ë 수 없어요" +msgstr "í´ëž˜ìФ ì´ë¦„ì€ í‚¤ì›Œë“œê°€ ë 수 없습니다" #: modules/mono/mono_gd/gd_mono_utils.cpp msgid "End of inner exception stack trace" @@ -11264,7 +11369,7 @@ msgid "" "A node yielded without working memory, please read the docs on how to yield " "properly!" msgstr "" -"작업 메모리 ì—†ì´ Yieldëœ ë…¸ë“œì´ì—ìš” 문서ì—서 노드ì—게 ì ì ˆížˆ Yield하는 방법" +"작업 메모리 ì—†ì´ Yieldëœ ë…¸ë“œìž…ë‹ˆë‹¤. 문서ì—서 노드ì—게 ì ì ˆížˆ Yield하는 방법" "ì„ ì½ì–´ì£¼ì„¸ìš”!" #: modules/visual_script/visual_script.cpp @@ -11272,15 +11377,15 @@ msgid "" "Node yielded, but did not return a function state in the first working " "memory." msgstr "" -"노드가 Yieldë지만, 첫번째 작업 ë©”ëª¨ë¦¬ì˜ í•¨ìˆ˜ ìƒíƒœë¥¼ 반환하지 않았어요." +"노드가 Yieldë지만, 첫번째 작업 ë©”ëª¨ë¦¬ì˜ í•¨ìˆ˜ ìƒíƒœë¥¼ 반환하지 않았습니다." #: modules/visual_script/visual_script.cpp msgid "" "Return value must be assigned to first element of node working memory! Fix " "your node please." msgstr "" -"반환 ê°’ì€ ë°˜ë“œì‹œ 노드 작업 ë©”ëª¨ë¦¬ì˜ ì²« 번째 요소로 ì§€ì •í•´ì•¼ í•´ìš”! 노드를 ê³ ì³" -"주세요." +"반환 ê°’ì€ ë°˜ë“œì‹œ 노드 작업 ë©”ëª¨ë¦¬ì˜ ì²« 번째 요소로 ì§€ì •í•´ì•¼ 합니다! 노드를 ê³ " +"ì³ì£¼ì„¸ìš”." #: modules/visual_script/visual_script.cpp msgid "Node returned an invalid sequence output: " @@ -11288,7 +11393,8 @@ msgstr "ìž˜ëª»ëœ ì‹œí€€ìŠ¤ ì¶œë ¥ì„ ë°˜í™˜í•œ 노드: " #: modules/visual_script/visual_script.cpp msgid "Found sequence bit but not the node in the stack, report bug!" -msgstr "시퀀스 비트를 발견했지만 ìŠ¤íƒ ì•ˆì˜ ë…¸ë“œì—는 없어요. 버그를 ì‹ ê³ í•˜ì„¸ìš”!" +msgstr "" +"시퀀스 비트를 발견했지만 ìŠ¤íƒ ì•ˆì˜ ë…¸ë“œì—는 없습니다. 버그를 ì‹ ê³ í•˜ì„¸ìš”!" #: modules/visual_script/visual_script.cpp msgid "Stack overflow with stack depth: " @@ -11324,11 +11430,11 @@ msgstr "ì¶œë ¥ í¬íЏ 추가하기" #: modules/visual_script/visual_script_editor.cpp msgid "Override an existing built-in function." -msgstr "존재하는 내장 함수를 다시 ì •ì˜í•´ìš”." +msgstr "존재하는 내장 함수를 ìž¬ì •ì˜í•©ë‹ˆë‹¤." #: modules/visual_script/visual_script_editor.cpp msgid "Create a new function." -msgstr "새 함수를 만들어요." +msgstr "새 함수를 ë§Œë“니다." #: modules/visual_script/visual_script_editor.cpp msgid "Variables:" @@ -11336,7 +11442,7 @@ msgstr "변수:" #: modules/visual_script/visual_script_editor.cpp msgid "Create a new variable." -msgstr "새 변수를 만들어요." +msgstr "새 변수를 ë§Œë“니다." #: modules/visual_script/visual_script_editor.cpp msgid "Signals:" @@ -11344,7 +11450,7 @@ msgstr "시그ë„:" #: modules/visual_script/visual_script_editor.cpp msgid "Create a new signal." -msgstr "새 시그ë„ì„ ë§Œë“¤ì–´ìš”." +msgstr "새 시그ë„ì„ ë§Œë“니다." #: modules/visual_script/visual_script_editor.cpp msgid "Name is not a valid identifier:" @@ -11368,19 +11474,19 @@ msgstr "ì‹œê·¸ë„ ì´ë¦„ 바꾸기" #: modules/visual_script/visual_script_editor.cpp msgid "Add Function" -msgstr "함수 추가하기" +msgstr "함수 추가" #: modules/visual_script/visual_script_editor.cpp msgid "Delete input port" -msgstr "ìž…ë ¥ í¬íЏ ì‚ì œí•˜ê¸°" +msgstr "ìž…ë ¥ í¬íЏ ì‚ì œ" #: modules/visual_script/visual_script_editor.cpp msgid "Add Variable" -msgstr "변수 추가하기" +msgstr "변수 추가" #: modules/visual_script/visual_script_editor.cpp msgid "Add Signal" -msgstr "ì‹œê·¸ë„ ì¶”ê°€í•˜ê¸°" +msgstr "ì‹œê·¸ë„ ì¶”ê°€" #: modules/visual_script/visual_script_editor.cpp msgid "Remove Input Port" @@ -11396,63 +11502,64 @@ msgstr "í‘œí˜„ì‹ ë°”ê¾¸ê¸°" #: modules/visual_script/visual_script_editor.cpp msgid "Remove VisualScript Nodes" -msgstr "비주얼 스í¬ë¦½íЏ 노드 ì‚ì œí•˜ê¸°" +msgstr "비주얼 스í¬ë¦½íЏ 노드 ì‚ì œ" #: modules/visual_script/visual_script_editor.cpp msgid "Duplicate VisualScript Nodes" -msgstr "비주얼 스í¬ë¦½íЏ 노드 ë³µì œí•˜ê¸°" +msgstr "비주얼 스í¬ë¦½íЏ 노드 ë³µì œ" #: modules/visual_script/visual_script_editor.cpp msgid "Hold %s to drop a Getter. Hold Shift to drop a generic signature." msgstr "" -"%sì„(를) ëˆ„ë¥´ê³ ìžˆìœ¼ë©´ Getter를 드ë¡í•´ìš”. Shift를 ëˆ„ë¥´ê³ ìžˆìœ¼ë©´ ì¼ë°˜ì ì¸ ì‹œê·¸" -"니처를 드ë¡í•´ìš”." +"%sì„(를) ëˆ„ë¥´ê³ ìžˆìœ¼ë©´ Getter를 드ë¡í•©ë‹ˆë‹¤. Shift를 ëˆ„ë¥´ê³ ìžˆìœ¼ë©´ ì¼ë°˜ì ì¸ ì‹œ" +"그니처를 드ë¡í•©ë‹ˆë‹¤." #: modules/visual_script/visual_script_editor.cpp msgid "Hold Ctrl to drop a Getter. Hold Shift to drop a generic signature." msgstr "" -"Ctrlì„ ëˆ„ë¥´ê³ ìžˆìœ¼ë©´ Getter를 드ë¡í•´ìš”. Shift를 ëˆ„ë¥´ê³ ìžˆìœ¼ë©´ ì¼ë°˜ì ì¸ ì‹œê·¸ë‹ˆ" -"처를 드ë¡í•´ìš”." +"Ctrlì„ ëˆ„ë¥´ê³ ìžˆìœ¼ë©´ Getter를 드ë¡í•©ë‹ˆë‹¤. Shift를 ëˆ„ë¥´ê³ ìžˆìœ¼ë©´ ì¼ë°˜ì ì¸ ì‹œê·¸" +"니처를 드ë¡í•©ë‹ˆë‹¤." #: modules/visual_script/visual_script_editor.cpp msgid "Hold %s to drop a simple reference to the node." -msgstr "%sì„(를) ëˆ„ë¥´ê³ ìžˆìœ¼ë©´ ë…¸ë“œì— ëŒ€í•œ 간단한 참조를 드ë¡í•´ìš”." +msgstr "%sì„(를) ëˆ„ë¥´ê³ ìžˆìœ¼ë©´ ë…¸ë“œì— ëŒ€í•œ 간단한 참조를 드ë¡í•©ë‹ˆë‹¤." #: modules/visual_script/visual_script_editor.cpp msgid "Hold Ctrl to drop a simple reference to the node." -msgstr "Ctrlì„ ëˆ„ë¥´ê³ ìžˆìœ¼ë©´ ë…¸ë“œì— ëŒ€í•œ 간단한 참조를 드ë¡í•´ìš”." +msgstr "Ctrlì„ ëˆ„ë¥´ê³ ìžˆìœ¼ë©´ ë…¸ë“œì— ëŒ€í•œ 간단한 참조를 드ë¡í•©ë‹ˆë‹¤." #: modules/visual_script/visual_script_editor.cpp msgid "Hold %s to drop a Variable Setter." -msgstr "%sì„(를) ëˆ„ë¥´ê³ ìžˆë¥´ë©´ 변수 Setter를 드ë¡í•´ìš”." +msgstr "%sì„(를) ëˆ„ë¥´ê³ ìžˆë¥´ë©´ 변수 Setter를 드ë¡í•©ë‹ˆë‹¤." #: modules/visual_script/visual_script_editor.cpp msgid "Hold Ctrl to drop a Variable Setter." -msgstr "Ctrlì„ ëˆ„ë¥´ê³ ìžˆìœ¼ë©´ 변수 Setter를 드ë¡í•´ìš”." +msgstr "Ctrlì„ ëˆ„ë¥´ê³ ìžˆìœ¼ë©´ 변수 Setter를 드ë¡í•©ë‹ˆë‹¤." #: modules/visual_script/visual_script_editor.cpp msgid "Add Preload Node" -msgstr "Preload 노드 추가하기" +msgstr "Preload 노드 추가" #: modules/visual_script/visual_script_editor.cpp msgid "Add Node(s) From Tree" -msgstr "트리ì—서 노드 추가하기" +msgstr "트리ì—서 노드 추가" #: modules/visual_script/visual_script_editor.cpp msgid "" "Can't drop properties because script '%s' is not used in this scene.\n" "Drop holding 'Shift' to just copy the signature." msgstr "" -"스í¬ë¦½íЏ '%s'ì´(ê°€) ì´ ì”¬ì—서 사용ë˜ì§€ ì•Šê³ ìžˆì–´ì„œ ì†ì„±ì„ 드ë¡í• 수 없어요.\n" -"'Shift' 키를 누른 채로 드ë¡í•˜ë©´ 시그니처를 복사해요." +"스í¬ë¦½íЏ '%s'ì´(ê°€) ì´ ì”¬ì—서 사용ë˜ì§€ ì•Šê³ ìžˆì–´ì„œ ì†ì„±ì„ 드ë¡í• 수 없습니" +"다.\n" +"'Shift' 키를 누른 채로 드ë¡í•˜ë©´ 시그니처를 복사합니다." #: modules/visual_script/visual_script_editor.cpp msgid "Add Getter Property" -msgstr "Getter ì†ì„± 추가하기" +msgstr "Getter ì†ì„± 추가" #: modules/visual_script/visual_script_editor.cpp msgid "Add Setter Property" -msgstr "Setter ì†ì„± 추가하기" +msgstr "Setter ì†ì„± 추가" #: modules/visual_script/visual_script_editor.cpp msgid "Change Base Type" @@ -11460,15 +11567,15 @@ msgstr "기본 ìœ í˜• 바꾸기" #: modules/visual_script/visual_script_editor.cpp msgid "Move Node(s)" -msgstr "노드 ì´ë™í•˜ê¸°" +msgstr "노드 ì´ë™" #: modules/visual_script/visual_script_editor.cpp msgid "Remove VisualScript Node" -msgstr "비주얼 스í¬ë¦½íЏ 노드 ì‚ì œí•˜ê¸°" +msgstr "비주얼 스í¬ë¦½íЏ 노드 ì‚ì œ" #: modules/visual_script/visual_script_editor.cpp msgid "Connect Nodes" -msgstr "노드 연결하기" +msgstr "노드 ì—°ê²°" #: modules/visual_script/visual_script_editor.cpp msgid "Disconnect Nodes" @@ -11476,15 +11583,15 @@ msgstr "그래프 노드 ì—°ê²° 풀기" #: modules/visual_script/visual_script_editor.cpp msgid "Connect Node Data" -msgstr "노드 ë°ì´í„° 연결하기" +msgstr "노드 ë°ì´í„° ì—°ê²°" #: modules/visual_script/visual_script_editor.cpp msgid "Connect Node Sequence" -msgstr "노드 시퀀스 연결하기" +msgstr "노드 시퀀스 ì—°ê²°" #: modules/visual_script/visual_script_editor.cpp msgid "Script already has function '%s'" -msgstr "스í¬ë¦½íŠ¸ê°€ ì´ë¯¸ '%s' 함수를 ê°–ê³ ìžˆì–´ìš”" +msgstr "스í¬ë¦½íŠ¸ê°€ ì´ë¯¸ '%s' 함수를 ê°–ê³ ìžˆìŠµë‹ˆë‹¤" #: modules/visual_script/visual_script_editor.cpp msgid "Change Input Value" @@ -11492,15 +11599,15 @@ msgstr "ìž…ë ¥ ê°’ 바꾸기" #: modules/visual_script/visual_script_editor.cpp msgid "Resize Comment" -msgstr "ì£¼ì„ í¬ê¸° ì¡°ì ˆí•˜ê¸°" +msgstr "ì£¼ì„ í¬ê¸° ì¡°ì ˆ" #: modules/visual_script/visual_script_editor.cpp msgid "Can't copy the function node." -msgstr "함수 노드를 ë³µì‚¬í• ìˆ˜ 없어요." +msgstr "함수 노드를 ë³µì‚¬í• ìˆ˜ 없습니다." #: modules/visual_script/visual_script_editor.cpp msgid "Clipboard is empty!" -msgstr "í´ë¦½ë³´ë“œê°€ 비었어요!" +msgstr "í´ë¦½ë³´ë“œê°€ 비었습니다!" #: modules/visual_script/visual_script_editor.cpp msgid "Paste VisualScript Nodes" @@ -11508,11 +11615,11 @@ msgstr "비주얼 스í¬ë¦½íЏ 노드 붙여넣기" #: modules/visual_script/visual_script_editor.cpp msgid "Can't create function with a function node." -msgstr "함수 노드가 있으면 함수를 만들 수 없어요." +msgstr "함수 노드가 있으면 함수를 만들 수 없습니다." #: modules/visual_script/visual_script_editor.cpp msgid "Can't create function of nodes from nodes of multiple functions." -msgstr "ë§Žì€ í•¨ìˆ˜ì˜ ë…¸ë“œì—서 ë…¸ë“œì˜ í•¨ìˆ˜ë¥¼ 만들 수 없어요." +msgstr "ë§Žì€ í•¨ìˆ˜ì˜ ë…¸ë“œì—서 ë…¸ë“œì˜ í•¨ìˆ˜ë¥¼ 만들 수 없습니다." #: modules/visual_script/visual_script_editor.cpp msgid "Select at least one node with sequence port." @@ -11528,23 +11635,23 @@ msgstr "함수 만들기" #: modules/visual_script/visual_script_editor.cpp msgid "Remove Function" -msgstr "함수 ì‚ì œí•˜ê¸°" +msgstr "함수 ì‚ì œ" #: modules/visual_script/visual_script_editor.cpp msgid "Remove Variable" -msgstr "변수 ì‚ì œí•˜ê¸°" +msgstr "변수 ì‚ì œ" #: modules/visual_script/visual_script_editor.cpp msgid "Editing Variable:" -msgstr "변수 편집하기:" +msgstr "변수 편집:" #: modules/visual_script/visual_script_editor.cpp msgid "Remove Signal" -msgstr "ì‹œê·¸ë„ ì‚ì œí•˜ê¸°" +msgstr "ì‹œê·¸ë„ ì‚ì œ" #: modules/visual_script/visual_script_editor.cpp msgid "Editing Signal:" -msgstr "ì‹œê·¸ë„ íŽ¸ì§‘í•˜ê¸°:" +msgstr "ì‹œê·¸ë„ íŽ¸ì§‘:" #: modules/visual_script/visual_script_editor.cpp msgid "Make Tool:" @@ -11560,11 +11667,11 @@ msgstr "기본 ìœ í˜• 바꾸기:" #: modules/visual_script/visual_script_editor.cpp msgid "Add Nodes..." -msgstr "노드 추가하기..." +msgstr "노드 추가..." #: modules/visual_script/visual_script_editor.cpp msgid "Add Function..." -msgstr "함수 추가하기..." +msgstr "함수 추가..." #: modules/visual_script/visual_script_editor.cpp msgid "function_name" @@ -11576,7 +11683,7 @@ msgstr "그래프를 편집하기 위한 함수를 ì„ íƒí•˜ê±°ë‚˜ 만드세요. #: modules/visual_script/visual_script_editor.cpp msgid "Delete Selected" -msgstr "ì„ íƒ í•목 ì‚ì œí•˜ê¸°" +msgstr "ì„ íƒ í•목 ì‚ì œ" #: modules/visual_script/visual_script_editor.cpp msgid "Find Node Type" @@ -11584,7 +11691,7 @@ msgstr "노드 ìœ í˜• 찾기" #: modules/visual_script/visual_script_editor.cpp msgid "Copy Nodes" -msgstr "노드 복사하기" +msgstr "노드 복사" #: modules/visual_script/visual_script_editor.cpp msgid "Cut Nodes" @@ -11600,7 +11707,7 @@ msgstr "그래프 ìƒˆë¡œê³ ì¹¨" #: modules/visual_script/visual_script_editor.cpp msgid "Edit Member" -msgstr "멤버 편집하기" +msgstr "멤버 편집" #: modules/visual_script/visual_script_flow_control.cpp msgid "Input type not iterable: " @@ -11608,7 +11715,7 @@ msgstr "ë°˜ë³µí• ìˆ˜ 없는 ìž…ë ¥ ìœ í˜•: " #: modules/visual_script/visual_script_flow_control.cpp msgid "Iterator became invalid" -msgstr "Iteratorê°€ 잘못ëì–´ìš”" +msgstr "Iteratorê°€ 잘못ë˜ì—ˆìŠµë‹ˆë‹¤" #: modules/visual_script/visual_script_flow_control.cpp msgid "Iterator became invalid: " @@ -11620,15 +11727,15 @@ msgstr "ìž˜ëª»ëœ ì¸ë±ìФ ì†ì„± ì´ë¦„." #: modules/visual_script/visual_script_func_nodes.cpp msgid "Base object is not a Node!" -msgstr "기본 ê°ì²´ëŠ” 노드가 아니ì—ìš”!" +msgstr "기본 ê°ì²´ëŠ” 노드가 아닙니다!" #: modules/visual_script/visual_script_func_nodes.cpp msgid "Path does not lead Node!" -msgstr "노드를 ì§€ì •í•˜ëŠ” 경로가 아니ì—ìš”!" +msgstr "노드를 ì§€ì •í•˜ëŠ” 경로가 아닙니다!" #: modules/visual_script/visual_script_func_nodes.cpp msgid "Invalid index property name '%s' in node %s." -msgstr "노드 %s ì•ˆì— ì¸ë±ìФ ì†ì„± ì´ë¦„ '%s'ì´(ê°€) 잘못ëì–´ìš”." +msgstr "노드 %s ì•ˆì— ì¸ë±ìФ ì†ì„± ì´ë¦„ '%s'ì´(ê°€) 잘못ë˜ì—ˆìŠµë‹ˆë‹¤." #: modules/visual_script/visual_script_nodes.cpp msgid ": Invalid argument of type: " @@ -11648,19 +11755,19 @@ msgstr "VariableSetì„ ìŠ¤í¬ë¦½íЏì—서 ì°¾ì„ ìˆ˜ ì—†ìŒ: " #: modules/visual_script/visual_script_nodes.cpp msgid "Custom node has no _step() method, can't process graph." -msgstr "맞춤 ë…¸ë“œì— _step() 메서드가 없어요. 그래프를 ì²˜ë¦¬í• ìˆ˜ 없어요." +msgstr "맞춤 ë…¸ë“œì— _step() 메서드가 없습니다. 그래프를 ì²˜ë¦¬í• ìˆ˜ 없습니다." #: modules/visual_script/visual_script_nodes.cpp msgid "" "Invalid return value from _step(), must be integer (seq out), or string " "(error)." msgstr "" -"_step()ì—서 ìž˜ëª»ëœ ë°˜í™˜ ê°’ì´ì—ìš”. ì •ìˆ˜ (seq out), ë˜ëŠ” 문ìžì—´ (error)ì´ì–´ì•¼ " -"í•´ìš”." +"_step()ì—서 ìž˜ëª»ëœ ë°˜í™˜ 값입니다. ì •ìˆ˜ (seq out), ë˜ëŠ” 문ìžì—´ (error)ì´ì–´ì•¼ " +"합니다." #: modules/visual_script/visual_script_property_selector.cpp msgid "Search VisualScript" -msgstr "비주얼 스í¬ë¦½íЏ 검색하기" +msgstr "비주얼 스í¬ë¦½íЏ 검색" #: modules/visual_script/visual_script_property_selector.cpp msgid "Get %s" @@ -11672,63 +11779,64 @@ msgstr "Set %s" #: platform/android/export/export.cpp msgid "Package name is missing." -msgstr "패키지 ì´ë¦„ì´ ì—†ì–´ìš”." +msgstr "패키지 ì´ë¦„ì´ ì—†ìŠµë‹ˆë‹¤." #: platform/android/export/export.cpp msgid "Package segments must be of non-zero length." -msgstr "패키지 세그먼트는 길ì´ê°€ 0ì´ ì•„ë‹ˆì–´ì•¼ í•´ìš”." +msgstr "패키지 세그먼트는 길ì´ê°€ 0ì´ ì•„ë‹ˆì–´ì•¼ 합니다." #: platform/android/export/export.cpp msgid "The character '%s' is not allowed in Android application package names." -msgstr "ë¬¸ìž '%s'ì€(는) 안드로ì´ë“œ ì• í”Œë¦¬ì¼€ì´ì…˜ 패키지 ì´ë¦„으로 쓸 수 없어요." +msgstr "" +"ë¬¸ìž '%s'ì€(는) 안드로ì´ë“œ ì• í”Œë¦¬ì¼€ì´ì…˜ 패키지 ì´ë¦„으로 쓸 수 없습니다." #: platform/android/export/export.cpp msgid "A digit cannot be the first character in a package segment." -msgstr "숫ìžëŠ” 패키지 ì„¸ê·¸ë¨¼íŠ¸ì˜ ì²« 문ìžë¡œ 쓸 수 없어요." +msgstr "숫ìžëŠ” 패키지 ì„¸ê·¸ë¨¼íŠ¸ì˜ ì²« 문ìžë¡œ 쓸 수 없습니다." #: platform/android/export/export.cpp msgid "The character '%s' cannot be the first character in a package segment." -msgstr "ë¬¸ìž '%s'ì€(는) 패키지 ì„¸ê·¸ë¨¼íŠ¸ì˜ ì²« 문ìžë¡œ 쓸 수 없어요." +msgstr "ë¬¸ìž '%s'ì€(는) 패키지 ì„¸ê·¸ë¨¼íŠ¸ì˜ ì²« 문ìžë¡œ 쓸 수 없습니다." #: platform/android/export/export.cpp msgid "The package must have at least one '.' separator." -msgstr "패키지는 ì ì–´ë„ í•˜ë‚˜ì˜ '.' 분리 기호가 있어야 í•´ìš”." +msgstr "패키지는 ì ì–´ë„ í•˜ë‚˜ì˜ '.' 분리 기호가 있어야 합니다." #: platform/android/export/export.cpp msgid "Select device from the list" -msgstr "목ë¡ì—서 기기 ì„ íƒí•˜ê¸°" +msgstr "목ë¡ì—서 기기 ì„ íƒ" #: platform/android/export/export.cpp msgid "ADB executable not configured in the Editor Settings." -msgstr "ADB 실행 파ì¼ì„ 편집기 ì„¤ì •ì—서 ì„¤ì •í•˜ì§€ 않았어요." +msgstr "ADB 실행 파ì¼ì„ 편집기 ì„¤ì •ì—서 ì„¤ì •í•˜ì§€ 않았습니다." #: platform/android/export/export.cpp msgid "OpenJDK jarsigner not configured in the Editor Settings." -msgstr "OpenJDK jarsigner를 편집기 ì„¤ì •ì—서 ì„¤ì •í•˜ì§€ 않았어요." +msgstr "OpenJDK jarsigner를 편집기 ì„¤ì •ì—서 ì„¤ì •í•˜ì§€ 않았습니다." #: platform/android/export/export.cpp msgid "Debug keystore not configured in the Editor Settings nor in the preset." -msgstr "Debug keystore를 편집기 ì„¤ì •ê³¼ í”„ë¦¬ì…‹ì— ì„¤ì •í•˜ì§€ 않았어요." +msgstr "Debug keystore를 편집기 ì„¤ì •ê³¼ í”„ë¦¬ì…‹ì— ì„¤ì •í•˜ì§€ 않았습니다." #: platform/android/export/export.cpp msgid "Custom build requires a valid Android SDK path in Editor Settings." -msgstr "맞춤 빌드ì—는 편집기 ì„¤ì •ì—서 올바른 안드로ì´ë“œ SDK 경로가 필요해요." +msgstr "맞춤 빌드ì—는 편집기 ì„¤ì •ì—서 올바른 안드로ì´ë“œ SDK 경로가 필요합니다." #: platform/android/export/export.cpp msgid "Invalid Android SDK path for custom build in Editor Settings." -msgstr "편집기 ì„¤ì •ì—서 맞춤 ë¹Œë“œì— ìž˜ëª»ëœ ì•ˆë“œë¡œì´ë“œ SDK 경로ì´ì—ìš”." +msgstr "편집기 ì„¤ì •ì—서 맞춤 ë¹Œë“œì— ìž˜ëª»ëœ ì•ˆë“œë¡œì´ë“œ SDK 경로입니다." #: platform/android/export/export.cpp msgid "" "Android build template not installed in the project. Install it from the " "Project menu." msgstr "" -"프로ì íŠ¸ì— ì•ˆë“œë¡œì´ë“œ 빌드 í…œí”Œë¦¿ì„ ì„¤ì¹˜í•˜ì§€ 않았네요. 프로ì 트 메뉴ì—서 설치" -"하세요." +"프로ì íŠ¸ì— ì•ˆë“œë¡œì´ë“œ 빌드 í…œí”Œë¦¿ì„ ì„¤ì¹˜í•˜ì§€ 않았습니다. 프로ì 트 메뉴ì—서 설" +"치하세요." #: platform/android/export/export.cpp msgid "Invalid public key for APK expansion." -msgstr "APK í™•ìž¥ì— ìž˜ëª»ëœ ê³µê°œ 키ì—ìš”." +msgstr "APK í™•ìž¥ì— ìž˜ëª»ëœ ê³µê°œ 키입니다." #: platform/android/export/export.cpp msgid "Invalid package name:" @@ -11739,8 +11847,8 @@ msgid "" "Trying to build from a custom built template, but no version info for it " "exists. Please reinstall from the 'Project' menu." msgstr "" -"맞춤 빌드 템플릿으로 ë¹Œë“œí•˜ë ¤ 했으나, ë²„ì „ ì •ë³´ê°€ê°€ 없어요. '프로ì 트' 메뉴ì—" -"서 다시 설치해주세요." +"맞춤 빌드 템플릿으로 ë¹Œë“œí•˜ë ¤ 했으나, ë²„ì „ ì •ë³´ê°€ê°€ 없습니다. '프로ì 트' 메뉴" +"ì—서 다시 설치해주세요." #: platform/android/export/export.cpp msgid "" @@ -11763,7 +11871,7 @@ msgid "" "Building of Android project failed, check output for the error.\n" "Alternatively visit docs.godotengine.org for Android build documentation." msgstr "" -"안드로ì´ë“œ 프로ì íŠ¸ì˜ ë¹Œë“œì— ì‹¤íŒ¨í–ˆì–´ìš”, ì¶œë ¥í•œ 오류를 확ì¸í•˜ì„¸ìš”.\n" +"안드로ì´ë“œ 프로ì íŠ¸ì˜ ë¹Œë“œì— ì‹¤íŒ¨í–ˆ, ì¶œë ¥í•œ 오류를 확ì¸í•˜ì„¸ìš”.\n" "ë˜ëŠ” docs.godotengine.orgì—서 안드로ì´ë“œ 빌드 문서를 찾아 보세요." #: platform/android/export/export.cpp @@ -11772,15 +11880,15 @@ msgstr "ì—¬ê¸°ì— ë¹Œë“œ apk를 만들지 않ìŒ: " #: platform/iphone/export/export.cpp msgid "Identifier is missing." -msgstr "ì‹ë³„ìžê°€ 없어요." +msgstr "ì‹ë³„ìžê°€ 없습니다." #: platform/iphone/export/export.cpp msgid "The character '%s' is not allowed in Identifier." -msgstr "ë¬¸ìž '%s'ì€(는) ì‹ë³„ìžì— 쓸 수 없어요." +msgstr "ë¬¸ìž '%s'ì€(는) ì‹ë³„ìžì— 쓸 수 없습니다." #: platform/iphone/export/export.cpp msgid "App Store Team ID not specified - cannot configure the project." -msgstr "App Store 팀 ID를 ì§€ì •í•˜ì§€ 않았어요 - 프로ì 트를 êµ¬ì„±í• ìˆ˜ 없어요." +msgstr "App Store 팀 ID를 ì§€ì •í•˜ì§€ 않았습니다 - 프로ì 트를 êµ¬ì„±í• ìˆ˜ 없습니다." #: platform/iphone/export/export.cpp msgid "Invalid Identifier:" @@ -11788,7 +11896,7 @@ msgstr "ìž˜ëª»ëœ ì‹ë³„ìž:" #: platform/iphone/export/export.cpp msgid "Required icon is not specified in the preset." -msgstr "요구하는 ì•„ì´ì½˜ì„ 프리셋ì—서 ì§€ì •í•˜ì§€ 않았어요." +msgstr "요구하는 ì•„ì´ì½˜ì„ 프리셋ì—서 ì§€ì •í•˜ì§€ 않았습니다." #: platform/javascript/export/export.cpp msgid "Stop HTTP Server" @@ -11796,11 +11904,11 @@ msgstr "HTTP 서버 멈추기" #: platform/javascript/export/export.cpp msgid "Run in Browser" -msgstr "브ë¼ìš°ì €ì—서 실행하기" +msgstr "브ë¼ìš°ì €ì—서 실행" #: platform/javascript/export/export.cpp msgid "Run exported HTML in the system's default browser." -msgstr "내보낸 HTMLì„ ì‹œìŠ¤í…œì˜ ê¸°ë³¸ 브ë¼ìš°ì €ë¥¼ 사용하여 실행해요." +msgstr "내보낸 HTMLì„ ì‹œìŠ¤í…œì˜ ê¸°ë³¸ 브ë¼ìš°ì €ë¥¼ 사용하여 실행합니다." #: platform/javascript/export/export.cpp msgid "Could not write file:" @@ -11824,7 +11932,7 @@ msgstr "부트 스플래시 ì´ë¯¸ì§€ 파ì¼ì„ ì½ì„ 수 ì—†ìŒ:" #: platform/javascript/export/export.cpp msgid "Using default boot splash image." -msgstr "기본 부트 스플래시 ì´ë¯¸ì§€ 사용하기." +msgstr "기본 부트 스플래시 ì´ë¯¸ì§€ 사용." #: platform/uwp/export/export.cpp msgid "Invalid package short name." @@ -11852,31 +11960,31 @@ msgstr "ìž˜ëª»ëœ ë°°ê²½ 색ìƒ." #: platform/uwp/export/export.cpp msgid "Invalid Store Logo image dimensions (should be 50x50)." -msgstr "ìž˜ëª»ëœ Store ë¡œê³ ì´ë¯¸ì§€ í¬ê¸°(50x50ì´ì–´ì•¼ í•´ìš”)." +msgstr "ìž˜ëª»ëœ Store ë¡œê³ ì´ë¯¸ì§€ í¬ê¸°(50x50ì´ì–´ì•¼ 합니다)." #: platform/uwp/export/export.cpp msgid "Invalid square 44x44 logo image dimensions (should be 44x44)." -msgstr "ìž˜ëª»ëœ ì‚¬ê°í˜• 44x44 ë¡œê³ ì´ë¯¸ì§€ í¬ê¸° (44x44ì´ì–´ì•¼ í•´ìš”)." +msgstr "ìž˜ëª»ëœ ì‚¬ê°í˜• 44x44 ë¡œê³ ì´ë¯¸ì§€ í¬ê¸° (44x44ì´ì–´ì•¼ 합니다)." #: platform/uwp/export/export.cpp msgid "Invalid square 71x71 logo image dimensions (should be 71x71)." -msgstr "ìž˜ëª»ëœ ì‚¬ê°í˜• 71x71 ë¡œê³ ì´ë¯¸ì§€ í¬ê¸° (71x71ì´ì–´ì•¼ í•´ìš”)." +msgstr "ìž˜ëª»ëœ ì‚¬ê°í˜• 71x71 ë¡œê³ ì´ë¯¸ì§€ í¬ê¸° (71x71ì´ì–´ì•¼ 합니다)." #: platform/uwp/export/export.cpp msgid "Invalid square 150x150 logo image dimensions (should be 150x150)." -msgstr "ìž˜ëª»ëœ ì‚¬ê°í˜• 150x150 ë¡œê³ ì´ë¯¸ì§€ í¬ê¸° (150x150ì´ì–´ì•¼ í•´ìš”)." +msgstr "ìž˜ëª»ëœ ì‚¬ê°í˜• 150x150 ë¡œê³ ì´ë¯¸ì§€ í¬ê¸° (150x150ì´ì–´ì•¼ 합니다)." #: platform/uwp/export/export.cpp msgid "Invalid square 310x310 logo image dimensions (should be 310x310)." -msgstr "ìž˜ëª»ëœ ì‚¬ê°í˜• 310x310 ë¡œê³ ì´ë¯¸ì§€ í¬ê¸° (310x310ì´ì–´ì•¼ í•´ìš”)." +msgstr "ìž˜ëª»ëœ ì‚¬ê°í˜• 310x310 ë¡œê³ ì´ë¯¸ì§€ í¬ê¸° (310x310ì´ì–´ì•¼ 합니다)." #: platform/uwp/export/export.cpp msgid "Invalid wide 310x150 logo image dimensions (should be 310x150)." -msgstr "ìž˜ëª»ëœ ë„“ì€ 310x150 ë¡œê³ ì´ë¯¸ì§€ í¬ê¸° (310x150ì´ì–´ì•¼ í•´ìš”)." +msgstr "ìž˜ëª»ëœ ë„“ì€ 310x150 ë¡œê³ ì´ë¯¸ì§€ í¬ê¸° (310x150ì´ì–´ì•¼ 합니다)." #: platform/uwp/export/export.cpp msgid "Invalid splash screen image dimensions (should be 620x300)." -msgstr "ìž˜ëª»ëœ ìŠ¤í”Œëž˜ì‹œ 스í¬ë¦° ì´ë¯¸ì§€ í¬ê¸° (620x300ì´ì–´ì•¼ í•´ìš”)." +msgstr "ìž˜ëª»ëœ ìŠ¤í”Œëž˜ì‹œ 스í¬ë¦° ì´ë¯¸ì§€ í¬ê¸° (620x300ì´ì–´ì•¼ 합니다)." #: scene/2d/animated_sprite.cpp msgid "" @@ -11884,15 +11992,15 @@ msgid "" "order for AnimatedSprite to display frames." msgstr "" "AnimatedSpriteì´ í”„ë ˆìž„ì„ ë³´ì—¬ì£¼ë ¤ë©´ \"Frames\" ì†ì„±ì— SpriteFrames 리소스를 " -"만들거나 ì§€ì •í•´ì•¼ í•´ìš”." +"만들거나 ì§€ì •í•´ì•¼ 합니다." #: scene/2d/canvas_modulate.cpp msgid "" "Only one visible CanvasModulate is allowed per scene (or set of instanced " "scenes). The first created one will work, while the rest will be ignored." msgstr "" -"CanvasModulate는 씬 당 단 하나만 ë³´ì¼ ìˆ˜ 있어요. 처ìŒì— ë§Œë“ ê²ƒë§Œ ìž‘ë™í•˜ê³ , " -"나머지는 무시ë¼ìš”." +"CanvasModulate는 씬 당 단 하나만 ë³´ì¼ ìˆ˜ 있습니다. 처ìŒì— ë§Œë“ ê²ƒë§Œ ìž‘ë™í•˜" +"ê³ , 나머지는 무시ë©ë‹ˆë‹¤." #: scene/2d/collision_object_2d.cpp msgid "" @@ -11900,7 +12008,7 @@ msgid "" "Consider adding a CollisionShape2D or CollisionPolygon2D as a child to " "define its shape." msgstr "" -"ì´ ë…¸ë“œëŠ” Shapeê°€ 없어요, 다른 물체와 ì¶©ëŒí•˜ê±°ë‚˜ ìƒí˜¸ ìž‘ìš©í• ìˆ˜ 없어요.\n" +"ì´ ë…¸ë“œëŠ” Shapeê°€ 없습니다, 다른 물체와 ì¶©ëŒí•˜ê±°ë‚˜ ìƒí˜¸ ìž‘ìš©í• ìˆ˜ 없습니다.\n" "CollisionShape2D ë˜ëŠ” CollisionPolygon2D를 ìžì‹ 노드로 추가하여 Shape를 ì •ì˜" "하세요." @@ -11910,13 +12018,13 @@ msgid "" "CollisionObject2D derived node. Please only use it as a child of Area2D, " "StaticBody2D, RigidBody2D, KinematicBody2D, etc. to give them a shape." msgstr "" -"CollisionPolygon2D는 CollisionObject2Dì— ì¶©ëŒ ëª¨ì–‘ì„ ì§€ì •í•˜ëŠ” ìš©ë„로만 사용ë¼" -"ìš”. Shape를 ì •ì˜í•´ì•¼ 하는 Area2D, StaticBody2D, RigidBody2D, KinematicBody2D " -"ë“±ì˜ ìžì‹ìœ¼ë¡œë§Œ 사용해주세요." +"CollisionPolygon2D는 CollisionObject2Dì— ì¶©ëŒ ëª¨ì–‘ì„ ì§€ì •í•˜ëŠ” ìš©ë„로만 사용ë©" +"니다. Shape를 ì •ì˜í•´ì•¼ 하는 Area2D, StaticBody2D, RigidBody2D, " +"KinematicBody2D ë“±ì˜ ìžì‹ìœ¼ë¡œë§Œ 사용해주세요." #: scene/2d/collision_polygon_2d.cpp msgid "An empty CollisionPolygon2D has no effect on collision." -msgstr "빈 CollisionPolygon2D는 ì¶©ëŒì— ì˜í–¥ì„ 주지 않아요." +msgstr "빈 CollisionPolygon2D는 ì¶©ëŒì— ì˜í–¥ì„ 주지 않습니다." #: scene/2d/collision_shape_2d.cpp msgid "" @@ -11924,8 +12032,8 @@ msgid "" "CollisionObject2D derived node. Please only use it as a child of Area2D, " "StaticBody2D, RigidBody2D, KinematicBody2D, etc. to give them a shape." msgstr "" -"CollisionShape2D는 CollisionObject2Dì— ì¶©ëŒ ëª¨ì–‘ì„ ì§€ì •í•˜ëŠ” ìš©ë„로만 사용ë¼" -"ìš”. Shape를 ì •ì˜í•´ì•¼ 하는 Area2D, StaticBody2D, RigidBody2D, KinematicBody2D " +"CollisionShape2D는 CollisionObject2Dì— ì¶©ëŒ ëª¨ì–‘ì„ ì§€ì •í•˜ëŠ” ìš©ë„로만 사용ë©ë‹ˆ" +"다. Shape를 ì •ì˜í•´ì•¼ 하는 Area2D, StaticBody2D, RigidBody2D, KinematicBody2D " "ë“±ì˜ ìžì‹ìœ¼ë¡œë§Œ 사용해주세요." #: scene/2d/collision_shape_2d.cpp @@ -11933,8 +12041,8 @@ msgid "" "A shape must be provided for CollisionShape2D to function. Please create a " "shape resource for it!" msgstr "" -"CollisionShape2Dê°€ ìž‘ë™í•˜ë ¤ë©´ 반드시 Shapeê°€ 있어야 í•´ìš”. Shape 리소스를 만들" -"어주세요!" +"CollisionShape2Dê°€ ìž‘ë™í•˜ë ¤ë©´ 반드시 Shapeê°€ 있어야 합니다. Shape 리소스를 ë§Œ" +"들어주세요!" #: scene/2d/cpu_particles_2d.cpp msgid "" @@ -11942,46 +12050,46 @@ msgid "" "\"Particles Animation\" enabled." msgstr "" "CPUParticles2D ì• ë‹ˆë©”ì´ì…˜ì—는 \"Particles Animation\"ì´ ì¼œì§„ " -"CanvasItemMaterialì„ ì‚¬ìš©í•´ì•¼ í•´ìš”." +"CanvasItemMaterialì„ ì‚¬ìš©í•´ì•¼ 합니다." #: scene/2d/light_2d.cpp msgid "" "A texture with the shape of the light must be supplied to the \"Texture\" " "property." -msgstr "ì¡°ëª…ì˜ ëª¨ì–‘ì„ ë‚˜íƒ€ë‚¼ í…스처를 \"Texture\" ì†ì„±ì— ì§€ì •í•´ì•¼ í•´ìš”." +msgstr "ì¡°ëª…ì˜ ëª¨ì–‘ì„ ë‚˜íƒ€ë‚¼ í…스처를 \"Texture\" ì†ì„±ì— ì§€ì •í•´ì•¼ 합니다." #: scene/2d/light_occluder_2d.cpp msgid "" "An occluder polygon must be set (or drawn) for this occluder to take effect." msgstr "" -"ì´ Occluderê°€ ì˜í–¥ì„ 주게 í•˜ë ¤ë©´ Occluder í´ë¦¬ê³¤ì„ ì„¤ì •í•´ì•¼ (í˜¹ì€ ê·¸ë ¤ì•¼) í•´" -"ìš”." +"ì´ Occluderê°€ ì˜í–¥ì„ 주게 í•˜ë ¤ë©´ Occluder í´ë¦¬ê³¤ì„ ì„¤ì •í•´ì•¼ (í˜¹ì€ ê·¸ë ¤ì•¼) í•©" +"니다." #: scene/2d/light_occluder_2d.cpp msgid "The occluder polygon for this occluder is empty. Please draw a polygon." -msgstr "Occluder í´ë¦¬ê³¤ì´ 비어있어요. í´ë¦¬ê³¤ì„ ê·¸ë ¤ì£¼ì„¸ìš”." +msgstr "Occluder í´ë¦¬ê³¤ì´ 비어있습니다. í´ë¦¬ê³¤ì„ ê·¸ë ¤ì£¼ì„¸ìš”." #: scene/2d/navigation_polygon.cpp msgid "" "A NavigationPolygon resource must be set or created for this node to work. " "Please set a property or draw a polygon." msgstr "" -"ì´ ë…¸ë“œê°€ ìž‘ë™í•˜ë ¤ë©´ NavigationPolygon 리소스를 ì„¤ì •í•˜ê±°ë‚˜ 만들어야 í•´ìš”. ì†" -"ì„±ì„ ì„¤ì •í•˜ê±°ë‚˜ í´ë¦¬ê³¤ì„ ê·¸ë ¤ì£¼ì„¸ìš”." +"ì´ ë…¸ë“œê°€ ìž‘ë™í•˜ë ¤ë©´ NavigationPolygon 리소스를 ì„¤ì •í•˜ê±°ë‚˜ 만들어야 합니다. " +"ì†ì„±ì„ ì„¤ì •í•˜ê±°ë‚˜ í´ë¦¬ê³¤ì„ ê·¸ë ¤ì£¼ì„¸ìš”." #: scene/2d/navigation_polygon.cpp msgid "" "NavigationPolygonInstance must be a child or grandchild to a Navigation2D " "node. It only provides navigation data." msgstr "" -"NavigationPolygonInstance는 Navigation2D ë…¸ë“œì˜ ìžì‹ ë˜ëŠ” ê·¸ ì•„ëž˜ì— ìžˆì–´ì•¼ í•´" -"ìš”. ì´ê²ƒì€ 내비게ì´ì…˜ ë°ì´í„°ë§Œì„ ì œê³µí•´ìš”." +"NavigationPolygonInstance는 Navigation2D ë…¸ë“œì˜ ìžì‹ ë˜ëŠ” ê·¸ ì•„ëž˜ì— ìžˆì–´ì•¼ í•©" +"니다. ì´ê²ƒì€ 내비게ì´ì…˜ ë°ì´í„°ë§Œì„ ì œê³µí•©ë‹ˆë‹¤." #: scene/2d/parallax_layer.cpp msgid "" "ParallaxLayer node only works when set as child of a ParallaxBackground node." msgstr "" -"ParallaxLayer는 ParallaxBackground ë…¸ë“œì˜ ìžì‹ 노드로 ìžˆì„ ë•Œë§Œ ìž‘ë™í•´ìš”." +"ParallaxLayer는 ParallaxBackground ë…¸ë“œì˜ ìžì‹ 노드로 ìžˆì„ ë•Œë§Œ ìž‘ë™í•©ë‹ˆë‹¤." #: scene/2d/particles_2d.cpp msgid "" @@ -11989,16 +12097,17 @@ msgid "" "Use the CPUParticles2D node instead. You can use the \"Convert to " "CPUParticles\" option for this purpose." msgstr "" -"GPU 기반 파티í´ì€ GLES2 비디오 드ë¼ì´ë²„ì—서 ì§€ì›í•˜ì§€ 않아요.\n" -"ëŒ€ì‹ CPUParticles2D 노드를 사용하세요. ì´ ê²½ìš° \"CPU파티í´ë¡œ 변환하기\" 옵션" -"ì„ ì‚¬ìš©í• ìˆ˜ 있어요." +"GPU 기반 파티í´ì€ GLES2 비디오 드ë¼ì´ë²„ì—서 ì§€ì›í•˜ì§€ 않습니다.\n" +"ëŒ€ì‹ CPUParticles2D 노드를 사용하세요. ì´ ê²½ìš° \"CPU파티í´ë¡œ 변환\" ì˜µì…˜ì„ ì‚¬" +"ìš©í• ìˆ˜ 있습니다." #: scene/2d/particles_2d.cpp scene/3d/particles.cpp msgid "" "A material to process the particles is not assigned, so no behavior is " "imprinted." msgstr "" -"파티í´ì„ ì²˜ë¦¬í• ë¨¸í‹°ë¦¬ì–¼ì„ ì§€ì •í•˜ì§€ 않았어요. 아무런 ë™ìž‘ë„ ì°ížˆì§€ 않아요." +"파티í´ì„ ì²˜ë¦¬í• ë¨¸í‹°ë¦¬ì–¼ì„ ì§€ì •í•˜ì§€ 않았습니다. 아무런 ë™ìž‘ë„ ì°ížˆì§€ 않습니" +"다." #: scene/2d/particles_2d.cpp msgid "" @@ -12006,11 +12115,11 @@ msgid "" "\"Particles Animation\" enabled." msgstr "" "Particles2D ì• ë‹ˆë©”ì´ì…˜ì€ \"Particles Animation\"ì´ ì¼œì ¸ 있는 " -"CanvasItemMaterialì„ ì‚¬ìš©í•´ì•¼ í•´ìš”." +"CanvasItemMaterialì„ ì‚¬ìš©í•´ì•¼ 합니다." #: scene/2d/path_2d.cpp msgid "PathFollow2D only works when set as a child of a Path2D node." -msgstr "PathFollow2D는 Path2D ë…¸ë“œì˜ ìžì‹ 노드로 ìžˆì„ ë•Œë§Œ ìž‘ë™í•´ìš”." +msgstr "PathFollow2D는 Path2D ë…¸ë“œì˜ ìžì‹ 노드로 ìžˆì„ ë•Œë§Œ ìž‘ë™í•©ë‹ˆë‹¤." #: scene/2d/physics_body_2d.cpp msgid "" @@ -12019,27 +12128,27 @@ msgid "" "Change the size in children collision shapes instead." msgstr "" "(ìºë¦í„°ë‚˜ 리지드 모드ì—서) RigidBody2Dì˜ í¬ê¸° ë³€ê²½ì€ ë¬¼ë¦¬ ì—”ì§„ì´ ìž‘ë™í•˜ëŠ” ë™" -"안 í° ë¶€ë‹´ì´ ë¼ìš”.\n" +"안 í° ë¶€ë‹´ì´ ë©ë‹ˆë‹¤.\n" "ëŒ€ì‹ ìžì‹ ì¶©ëŒ í˜•íƒœì˜ í¬ê¸°ë¥¼ 변경해보세요." #: scene/2d/remote_transform_2d.cpp msgid "Path property must point to a valid Node2D node to work." -msgstr "Path ì†ì„±ì€ 올바른 Node2D 노드를 가리켜야 í•´ìš”." +msgstr "Path ì†ì„±ì€ 올바른 Node2D 노드를 가리켜야 합니다." #: scene/2d/skeleton_2d.cpp msgid "This Bone2D chain should end at a Skeleton2D node." -msgstr "ì´ Bone2D ì²´ì¸ì€ Skeleton2D 노드ì—서 ë나야 í•´ìš”." +msgstr "ì´ Bone2D ì²´ì¸ì€ Skeleton2D 노드ì—서 ë나야 합니다." #: scene/2d/skeleton_2d.cpp msgid "A Bone2D only works with a Skeleton2D or another Bone2D as parent node." -msgstr "Bone2D는 Skeleton2D나 다른 Bone2Dê°€ 부모 노드로 있어야만 ìž‘ë™í•´ìš”." +msgstr "Bone2D는 Skeleton2D나 다른 Bone2Dê°€ 부모 노드로 있어야만 ìž‘ë™í•©ë‹ˆë‹¤." #: scene/2d/skeleton_2d.cpp msgid "" "This bone lacks a proper REST pose. Go to the Skeleton2D node and set one." msgstr "" -"ì´ ë³¸ì— ì ì ˆí•œ 대기 ìžì„¸ê°€ 없어요. Skeleton2D 노드로 가서 대기 ìžì„¸ë¥¼ ì„¤ì •í•˜" -"세요." +"ì´ ë³¸ì— ì ì ˆí•œ 대기 ìžì„¸ê°€ 없습니다. Skeleton2D 노드로 가서 대기 ìžì„¸ë¥¼ ì„¤ì •" +"하세요." #: scene/2d/tile_map.cpp msgid "" @@ -12047,46 +12156,46 @@ msgid "" "to. Please use it as a child of Area2D, StaticBody2D, RigidBody2D, " "KinematicBody2D, etc. to give them a shape." msgstr "" -"Use Parentê°€ 켜진 TileMapì€ í˜•íƒœë¥¼ 주는 부모 CollisionObject2Dê°€ 필요해요. 형" -"태를 주기 위해 Area2D, StaticBody2D, RigidBody2D, KinematicBody2D ë“±ì„ ìžì‹ " -"노드로 사용해주세요." +"Use Parentê°€ 켜진 TileMapì€ í˜•íƒœë¥¼ 주는 부모 CollisionObject2Dê°€ 필요합니다. " +"형태를 주기 위해 Area2D, StaticBody2D, RigidBody2D, KinematicBody2D ë“±ì„ ìž" +"ì‹ ë…¸ë“œë¡œ 사용해주세요." #: scene/2d/visibility_notifier_2d.cpp msgid "" "VisibilityEnabler2D works best when used with the edited scene root directly " "as parent." msgstr "" -"VisibilityEnabler2D는 편집한 ì”¬ì˜ ë£¨íŠ¸ì— ì§ì ‘ 부모로 ì‚¬ìš©í• ë•Œ 가장 잘 ìž‘ë™í•´" -"ìš”." +"VisibilityEnabler2D는 편집한 ì”¬ì˜ ë£¨íŠ¸ì— ì§ì ‘ 부모로 ì‚¬ìš©í• ë•Œ 가장 잘 ìž‘ë™í•©" +"니다." #: scene/3d/arvr_nodes.cpp msgid "ARVRCamera must have an ARVROrigin node as its parent." -msgstr "ARVRCamera는 반드시 ARVROrigin 노드를 부모로 ê°–ê³ ìžˆì–´ì•¼ í•´ìš”." +msgstr "ARVRCamera는 반드시 ARVROrigin 노드를 부모로 ê°–ê³ ìžˆì–´ì•¼ 합니다." #: scene/3d/arvr_nodes.cpp msgid "ARVRController must have an ARVROrigin node as its parent." -msgstr "ARVRController는 반드시 ARVROrigin 노드를 부모로 ê°–ê³ ìžˆì–´ì•¼ í•´ìš”." +msgstr "ARVRController는 반드시 ARVROrigin 노드를 부모로 ê°–ê³ ìžˆì–´ì•¼ 합니다." #: scene/3d/arvr_nodes.cpp msgid "" "The controller ID must not be 0 or this controller won't be bound to an " "actual controller." msgstr "" -"컨트롤러 IDê°€ 0ì´ ë˜ë©´ 컨트롤러가 ì‹¤ì œ ì»¨íŠ¸ë¡¤ëŸ¬ì— ë°”ì¸ë”©í•˜ì§€ 않게 ë¼ìš”." +"컨트롤러 IDê°€ 0ì´ ë˜ë©´ 컨트롤러가 ì‹¤ì œ ì»¨íŠ¸ë¡¤ëŸ¬ì— ë°”ì¸ë”©í•˜ì§€ 않게 ë©ë‹ˆë‹¤." #: scene/3d/arvr_nodes.cpp msgid "ARVRAnchor must have an ARVROrigin node as its parent." -msgstr "ARVRAnchor는 반드시 ARVROrigin 노드를 부모로 ê°–ê³ ìžˆì–´ì•¼ í•´ìš”." +msgstr "ARVRAnchor는 반드시 ARVROrigin 노드를 부모로 ê°–ê³ ìžˆì–´ì•¼ 합니다." #: scene/3d/arvr_nodes.cpp msgid "" "The anchor ID must not be 0 or this anchor won't be bound to an actual " "anchor." -msgstr "앵커 IDê°€ 0ì´ ë˜ë©´ 앵커가 ì‹¤ì œ ì•µì»¤ì— ë°”ì¸ë”©í•˜ì§€ 않게 ë¼ìš”." +msgstr "앵커 IDê°€ 0ì´ ë˜ë©´ 앵커가 ì‹¤ì œ ì•µì»¤ì— ë°”ì¸ë”©í•˜ì§€ 않게 ë©ë‹ˆë‹¤." #: scene/3d/arvr_nodes.cpp msgid "ARVROrigin requires an ARVRCamera child node." -msgstr "ARVROriginì€ ìžì‹ìœ¼ë¡œ ARVRCamera 노드가 필요해요." +msgstr "ARVROriginì€ ìžì‹ìœ¼ë¡œ ARVRCamera 노드가 필요합니다." #: scene/3d/baked_lightmap.cpp msgid "%d%%" @@ -12118,7 +12227,7 @@ msgid "" "Consider adding a CollisionShape or CollisionPolygon as a child to define " "its shape." msgstr "" -"ì´ ë…¸ë“œëŠ” Shapeê°€ 없어요. 다른 물체와 ì¶©ëŒí•˜ê±°ë‚˜ ìƒí˜¸ ìž‘ìš©í• ìˆ˜ 없어요.\n" +"ì´ ë…¸ë“œëŠ” Shapeê°€ 없습니다. 다른 물체와 ì¶©ëŒí•˜ê±°ë‚˜ ìƒí˜¸ ìž‘ìš©í• ìˆ˜ 없습니다.\n" "CollisionShape ë˜ëŠ” CollisionPolygonì„ ìžì‹ 노드로 추가해서 Shapeì„ ì •ì˜í•´ë³´" "세요." @@ -12128,13 +12237,13 @@ msgid "" "CollisionObject derived node. Please only use it as a child of Area, " "StaticBody, RigidBody, KinematicBody, etc. to give them a shape." msgstr "" -"CollisionPolygonì€ CollisionObjectì— ì¶©ëŒ Shape를 ì§€ì •í•˜ëŠ” ìš©ë„로만 사용ë¼" -"ìš”. Area, StaticBody, RigidBody, KinematicBody ë“±ì— ìžì‹ 노드로 추가해서 사용" +"CollisionPolygonì€ CollisionObjectì— ì¶©ëŒ Shape를 ì§€ì •í•˜ëŠ” ìš©ë„로만 사용ë©ë‹ˆ" +"다. Area, StaticBody, RigidBody, KinematicBody ë“±ì— ìžì‹ 노드로 추가해서 사용" "해주세요." #: scene/3d/collision_polygon.cpp msgid "An empty CollisionPolygon has no effect on collision." -msgstr "빈 CollisionPolygon는 ì¶©ëŒì— ì˜í–¥ì„ 주지 않아요." +msgstr "빈 CollisionPolygon는 ì¶©ëŒì— ì˜í–¥ì„ 주지 않습니다." #: scene/3d/collision_shape.cpp msgid "" @@ -12142,29 +12251,29 @@ msgid "" "derived node. Please only use it as a child of Area, StaticBody, RigidBody, " "KinematicBody, etc. to give them a shape." msgstr "" -"CollisionShapeì€ CollisionObjectì— ì¶©ëŒ Shape를 ì§€ì •í•˜ëŠ” ìš©ë„로만 사용ë¼ìš”. " -"Area, StaticBody, RigidBody, KinematicBody ë“±ì— ìžì‹ 노드로 추가해서 사용해주" -"세요." +"CollisionShapeì€ CollisionObjectì— ì¶©ëŒ Shape를 ì§€ì •í•˜ëŠ” ìš©ë„로만 사용ë©ë‹ˆ" +"다. Area, StaticBody, RigidBody, KinematicBody ë“±ì— ìžì‹ 노드로 추가해서 사용" +"해주세요." #: scene/3d/collision_shape.cpp msgid "" "A shape must be provided for CollisionShape to function. Please create a " "shape resource for it." msgstr "" -"CollisionShapeê°€ ì œ ê¸°ëŠ¥ì„ í•˜ë ¤ë©´ Shapeê°€ 있어야 í•´ìš”. Shape 리소스를 만들어" -"주세요." +"CollisionShapeê°€ ì œ ê¸°ëŠ¥ì„ í•˜ë ¤ë©´ Shapeê°€ 있어야 합니다. Shape 리소스를 만들" +"어주세요." #: scene/3d/collision_shape.cpp msgid "" "Plane shapes don't work well and will be removed in future versions. Please " "don't use them." msgstr "" -"í‰ë©´ Shape는 잘 ìž‘ë™í•˜ì§€ 않으며 ì´í›„ ë²„ì „ì—서 ì œê±°ë ì˜ˆì •ì´ì—ìš”. 사용하지 ë§" +"í‰ë©´ Shape는 잘 ìž‘ë™í•˜ì§€ 않으며 ì´í›„ ë²„ì „ì—서 ì œê±°ë ì˜ˆì •ìž…ë‹ˆë‹¤. 사용하지 ë§" "아주세요." #: scene/3d/cpu_particles.cpp msgid "Nothing is visible because no mesh has been assigned." -msgstr "ì§€ì •í•œ 메시가 없어서 아무 ê²ƒë„ ë³´ì´ì§€ 않아요." +msgstr "ì§€ì •í•œ 메시가 없어서 아무 ê²ƒë„ ë³´ì´ì§€ 않습니다." #: scene/3d/cpu_particles.cpp msgid "" @@ -12172,35 +12281,36 @@ msgid "" "Billboard Mode is set to \"Particle Billboard\"." msgstr "" "CPUParticles ì• ë‹ˆë©”ì´ì…˜ì„ ì‚¬ìš©í•˜ë ¤ë©´ Billboard Modeê°€ \"Particle Billboard" -"\"로 ì„¤ì •ëœ SpatialMaterialì´ í•„ìš”í•´ìš”." +"\"로 ì„¤ì •ëœ SpatialMaterialì´ í•„ìš”í•©ë‹ˆë‹¤." #: scene/3d/gi_probe.cpp msgid "Plotting Meshes" -msgstr "메시 구분하기" +msgstr "메시 구분" #: scene/3d/gi_probe.cpp msgid "" "GIProbes are not supported by the GLES2 video driver.\n" "Use a BakedLightmap instead." msgstr "" -"GIProbe는 GLES2 비디오 드ë¼ì´ë²„ì—서 ì§€ì›í•˜ì§€ 않아요.\n" +"GIProbe는 GLES2 비디오 드ë¼ì´ë²„ì—서 ì§€ì›í•˜ì§€ 않습니다.\n" "ëŒ€ì‹ BakedLightmapì„ ì‚¬ìš©í•˜ì„¸ìš”." #: scene/3d/light.cpp msgid "A SpotLight with an angle wider than 90 degrees cannot cast shadows." -msgstr "SpotLightì˜ ê°ë„를 90ë„ ì´ìƒìœ¼ë¡œ 잡게ë˜ë©´ 그림ìžë¥¼ 투ì˜í• 수 없어요." +msgstr "SpotLightì˜ ê°ë„를 90ë„ ì´ìƒìœ¼ë¡œ 잡게ë˜ë©´ 그림ìžë¥¼ 투ì˜í• 수 없습니다." #: scene/3d/navigation_mesh.cpp msgid "A NavigationMesh resource must be set or created for this node to work." -msgstr "ì´ ë…¸ë“œê°€ ìž‘ë™í•˜ë ¤ë©´ NavigationMesh 리소스를 ì„¤ì •í•˜ê±°ë‚˜ 만들어야 í•´ìš”." +msgstr "" +"ì´ ë…¸ë“œê°€ ìž‘ë™í•˜ë ¤ë©´ NavigationMesh 리소스를 ì„¤ì •í•˜ê±°ë‚˜ 만들어야 합니다." #: scene/3d/navigation_mesh.cpp msgid "" "NavigationMeshInstance must be a child or grandchild to a Navigation node. " "It only provides navigation data." msgstr "" -"NavigationMeshInstance는 Navigation ë…¸ë“œì˜ ìžì‹ì´ë‚˜ ë” í•˜ìœ„ì— ìžˆì–´ì•¼ í•´ìš”. ì´" -"ê²ƒì€ ë‚´ë¹„ê²Œì´ì…˜ ë°ì´í„°ë§Œ ì œê³µí•´ìš”." +"NavigationMeshInstance는 Navigation ë…¸ë“œì˜ ìžì‹ì´ë‚˜ ë” í•˜ìœ„ì— ìžˆì–´ì•¼ 합니다. " +"ì´ê²ƒì€ 내비게ì´ì…˜ ë°ì´í„°ë§Œ ì œê³µí•©ë‹ˆë‹¤." #: scene/3d/particles.cpp msgid "" @@ -12208,14 +12318,14 @@ msgid "" "Use the CPUParticles node instead. You can use the \"Convert to CPUParticles" "\" option for this purpose." msgstr "" -"GPU 기반 파티í´ì€ GLES2 비디오 드ë¼ì´ë²„ì—서 ì§€ì›í•˜ì§€ 않아요.\n" -"ëŒ€ì‹ CPUParticles 노드를 사용하세요. ì´ ê²½ìš° \"CPU파티í´ë¡œ 변환하기\" ì„¤ì •ì„ " -"ì‚¬ìš©í• ìˆ˜ 있어요." +"GPU 기반 파티í´ì€ GLES2 비디오 드ë¼ì´ë²„ì—서 ì§€ì›í•˜ì§€ 않습니다.\n" +"ëŒ€ì‹ CPUParticles 노드를 사용하세요. ì´ ê²½ìš° \"CPU파티í´ë¡œ 변환\" ì„¤ì •ì„ ì‚¬ìš©" +"í• ìˆ˜ 있습니다." #: scene/3d/particles.cpp msgid "" "Nothing is visible because meshes have not been assigned to draw passes." -msgstr "메시가 패스를 그리ë„ë¡ ì§€ì •í•˜ì§€ 않아서, 아무 ê²ƒë„ ë³´ì´ì§€ 않아요." +msgstr "메시가 패스를 그리ë„ë¡ ì§€ì •í•˜ì§€ 않아서, 아무 ê²ƒë„ ë³´ì´ì§€ 않습니다." #: scene/3d/particles.cpp msgid "" @@ -12223,11 +12333,11 @@ msgid "" "Mode is set to \"Particle Billboard\"." msgstr "" "Particles ì• ë‹ˆë©”ì´ì…˜ì„ ì‚¬ìš©í•˜ë ¤ë©´ Billboard Modeê°€ \"Particle Billboard\"로 " -"ì„¤ì •ëœ SpatialMaterialì´ í•„ìš”í•´ìš”." +"ì„¤ì •ëœ SpatialMaterialì´ í•„ìš”í•©ë‹ˆë‹¤." #: scene/3d/path.cpp msgid "PathFollow only works when set as a child of a Path node." -msgstr "PathFollow는 Path ë…¸ë“œì˜ ìžì‹ìœ¼ë¡œ ìžˆì„ ë•Œë§Œ ìž‘ë™í•´ìš”." +msgstr "PathFollow는 Path ë…¸ë“œì˜ ìžì‹ìœ¼ë¡œ ìžˆì„ ë•Œë§Œ ìž‘ë™í•©ë‹ˆë‹¤." #: scene/3d/path.cpp msgid "" @@ -12235,7 +12345,7 @@ msgid "" "parent Path's Curve resource." msgstr "" "PathFollowì˜ ROTATION_ORIENTED는 부모 Pathì˜ Curve 리소스ì—서 \"Up Vector" -"\"ê°€ ì¼œì ¸ 있어야 í•´ìš”." +"\"ê°€ ì¼œì ¸ 있어야 합니다." #: scene/3d/physics_body.cpp msgid "" @@ -12244,7 +12354,7 @@ msgid "" "Change the size in children collision shapes instead." msgstr "" "(ìºë¦í„°ë‚˜ 리지드 모드ì—서) RigidBodyì˜ í¬ê¸° ë³€ê²½ì€ ë¬¼ë¦¬ ì—”ì§„ì´ ìž‘ë™í•˜ëŠ” ë™ì•ˆ " -"í° ë¶€ë‹´ì´ ë¼ìš”.\n" +"í° ë¶€ë‹´ì´ ë©ë‹ˆë‹¤.\n" "ëŒ€ì‹ ìžì‹ ì¶©ëŒ ëª¨ì–‘ì˜ í¬ê¸°ë¥¼ 변경하세요." #: scene/3d/remote_transform.cpp @@ -12253,11 +12363,11 @@ msgid "" "derived node to work." msgstr "" "\"Remote Path\" ì†ì„±ì€ 올바른 Spatial 노드, ë˜ëŠ” Spatialì—서 파ìƒëœ 노드를 ê°€" -"리켜야 í•´ìš”." +"리켜야 합니다." #: scene/3d/soft_body.cpp msgid "This body will be ignored until you set a mesh." -msgstr "ì´ ë°”ë””ëŠ” 메시를 ì„¤ì •í• ë•Œê¹Œì§€ 무시ë¼ìš”." +msgstr "ì´ ë°”ë””ëŠ” 메시를 ì„¤ì •í• ë•Œê¹Œì§€ 무시ë©ë‹ˆë‹¤." #: scene/3d/soft_body.cpp msgid "" @@ -12265,7 +12375,7 @@ msgid "" "running.\n" "Change the size in children collision shapes instead." msgstr "" -"실행 ì¤‘ì— SoftBodyì˜ í¬ê¸° ë³€ê²½ì€ ë¬¼ë¦¬ ì—”ì§„ì— ì˜í•´ 다시 ì •ì˜ë¼ìš”.\n" +"실행 ì¤‘ì— SoftBodyì˜ í¬ê¸° ë³€ê²½ì€ ë¬¼ë¦¬ ì—”ì§„ì— ì˜í•´ ìž¬ì •ì˜ë©ë‹ˆë‹¤.\n" "ëŒ€ì‹ ìžì‹ì˜ ì¶©ëŒ ëª¨ì–‘ í¬ê¸°ë¥¼ 변경하세요." #: scene/3d/sprite_3d.cpp @@ -12274,14 +12384,14 @@ msgid "" "order for AnimatedSprite3D to display frames." msgstr "" "AnimatedSprite3Dê°€ í”„ë ˆìž„ì„ ë³´ì—¬ì£¼ê¸° 위해서는 \"Frames\" ì†ì„±ì— SpriteFrames " -"리소스를 만들거나 ì„¤ì •í•´ì•¼ í•´ìš”." +"리소스를 만들거나 ì„¤ì •í•´ì•¼ 합니다." #: scene/3d/vehicle_body.cpp msgid "" "VehicleWheel serves to provide a wheel system to a VehicleBody. Please use " "it as a child of a VehicleBody." msgstr "" -"VehicleWheelì€ VehicleBody로 바퀴 ì‹œìŠ¤í…œì„ ì œê³µí•˜ëŠ” ì—í• ì´ì—ìš”. VehicleBody" +"VehicleWheelì€ VehicleBody로 바퀴 ì‹œìŠ¤í…œì„ ì œê³µí•˜ëŠ” ì—í• ìž…ë‹ˆë‹¤. VehicleBody" "ì˜ ìžì‹ìœ¼ë¡œ 사용해주세요." #: scene/3d/world_environment.cpp @@ -12290,20 +12400,20 @@ msgid "" "Environment to have a visible effect." msgstr "" "WorldEnvironmentê°€ ì‹œê° íš¨ê³¼ë¥¼ ê°–ë„ë¡ Environment를 ê°–ê³ ìžˆëŠ” \"Environment" -"\" ì†ì„±ì´ 필요해요." +"\" ì†ì„±ì´ 필요합니다." #: scene/3d/world_environment.cpp msgid "" "Only one WorldEnvironment is allowed per scene (or set of instanced scenes)." msgstr "" -"씬마다 (í˜¹ì€ ì¸ìŠ¤í„´ìŠ¤ëœ ì”¬ 세트마다) WorldEnvironment는 하나만 허용ë¼ìš”." +"씬마다 (í˜¹ì€ ì¸ìŠ¤í„´ìŠ¤ëœ ì”¬ 세트마다) WorldEnvironment는 하나만 허용ë©ë‹ˆë‹¤." #: scene/3d/world_environment.cpp msgid "" "This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set " "this environment's Background Mode to Canvas (for 2D scenes)." msgstr "" -"ì´ WorldEnvironment는 무시ë¼ìš”. (3D ì”¬ì„ ìœ„í•´) Camera를 추가하거나 아니면 " +"ì´ WorldEnvironment는 무시ë©ë‹ˆë‹¤. (3D ì”¬ì„ ìœ„í•´) Camera를 추가하거나 아니면 " "(2D ì”¬ì„ ìœ„í•´) ì´ í™˜ê²½ì˜ Background Mode를 Canvas로 ì„¤ì •í•˜ì„¸ìš”." #: scene/animation/animation_blend_tree.cpp @@ -12324,29 +12434,30 @@ msgstr "ìž˜ëª»ëœ ì• ë‹ˆë©”ì´ì…˜: '%s'." #: scene/animation/animation_tree.cpp msgid "Nothing connected to input '%s' of node '%s'." -msgstr "노드 '%s'ì˜ '%s' ìž…ë ¥ì— ì•„ë¬´ê²ƒë„ ì—°ê²°ë˜ì§€ 않았어요." +msgstr "노드 '%s'ì˜ '%s' ìž…ë ¥ì— ì•„ë¬´ê²ƒë„ ì—°ê²°ë˜ì§€ 않았습니다." #: scene/animation/animation_tree.cpp msgid "No root AnimationNode for the graph is set." -msgstr "그래프를 위한 루트 AnimationNode를 ì„¤ì •í•˜ì§€ 않았어요." +msgstr "그래프를 위한 루트 AnimationNode를 ì„¤ì •í•˜ì§€ 않았습니다." #: scene/animation/animation_tree.cpp msgid "Path to an AnimationPlayer node containing animations is not set." msgstr "" -"ì• ë‹ˆë©”ì´ì…˜ì„ ê°–ê³ ìžˆëŠ” AnimationPlayer ë…¸ë“œì˜ ê²½ë¡œë¥¼ ì„¤ì •í•˜ì§€ 않았어요." +"ì• ë‹ˆë©”ì´ì…˜ì„ ê°–ê³ ìžˆëŠ” AnimationPlayer ë…¸ë“œì˜ ê²½ë¡œë¥¼ ì„¤ì •í•˜ì§€ 않았습니다." #: scene/animation/animation_tree.cpp msgid "Path set for AnimationPlayer does not lead to an AnimationPlayer node." msgstr "" -"AnimationPlayerì— ëŒ€í•œ 경로 ì„¤ì •ì´ AnimationPlayer 노드를 í–¥í•˜ê³ ìžˆì§€ 않아요." +"AnimationPlayerì— ëŒ€í•œ 경로 ì„¤ì •ì´ AnimationPlayer 노드를 í–¥í•˜ê³ ìžˆì§€ 않습니" +"다." #: scene/animation/animation_tree.cpp msgid "The AnimationPlayer root node is not a valid node." -msgstr "AnimationPlayer 루트 노드가 올바른 노드가 아니ì—ìš”." +msgstr "AnimationPlayer 루트 노드가 올바른 노드가 아닙니다." #: scene/animation/animation_tree_player.cpp msgid "This node has been deprecated. Use AnimationTree instead." -msgstr "ì´ ë…¸ë“œëŠ” ë” ì´ìƒ ì‚¬ìš©í• ìˆ˜ 없어요. ëŒ€ì‹ AnimationTree를 사용하세요." +msgstr "ì´ ë…¸ë“œëŠ” ë” ì´ìƒ ì‚¬ìš©í• ìˆ˜ 없습니다. ëŒ€ì‹ AnimationTree를 사용하세요." #: scene/gui/color_picker.cpp msgid "" @@ -12355,8 +12466,8 @@ msgid "" "RMB: Remove preset" msgstr "" "색ìƒ: #%s\n" -"좌í´ë¦: ìƒ‰ìƒ ì„¤ì •í•˜ê¸°\n" -"ìš°í´ë¦: 프리셋 ì œê±°í•˜ê¸°" +"좌í´ë¦: ìƒ‰ìƒ ì„¤ì •\n" +"ìš°í´ë¦: 프리셋 ì œê±°" #: scene/gui/color_picker.cpp msgid "Pick a color from the editor window." @@ -12372,11 +12483,11 @@ msgstr "Raw" #: scene/gui/color_picker.cpp msgid "Switch between hexadecimal and code values." -msgstr "16진수나 코드 값으로 ì „í™˜í•´ìš”." +msgstr "16진수나 코드 값으로 ì „í™˜í•©ë‹ˆë‹¤." #: scene/gui/color_picker.cpp msgid "Add current color as a preset." -msgstr "현재 색ìƒì„ 프리셋으로 추가해요." +msgstr "현재 색ìƒì„ 프리셋으로 추가합니다." #: scene/gui/container.cpp msgid "" @@ -12384,7 +12495,7 @@ msgid "" "children placement behavior.\n" "If you don't intend to add a script, use a plain Control node instead." msgstr "" -"Container ìžì²´ëŠ” ìžì‹ 배치 ìž‘ì—…ì„ êµ¬ì„±í•˜ëŠ” 스í¬ë¦½íЏ 외ì—는 목ì ì´ ì—†ì–´ìš”.\n" +"Container ìžì²´ëŠ” ìžì‹ 배치 ìž‘ì—…ì„ êµ¬ì„±í•˜ëŠ” 스í¬ë¦½íЏ 외ì—는 목ì ì´ ì—†ìŠµë‹ˆë‹¤.\n" "스í¬ë¦½íŠ¸ë¥¼ 추가하는 ì˜ë„ê°€ 없으면, 순수한 Control 노드를 사용해주세요." #: scene/gui/control.cpp @@ -12393,7 +12504,8 @@ msgid "" "\"Ignore\". To solve this, set the Mouse Filter to \"Stop\" or \"Pass\"." msgstr "" "Hint Tooltipì€ Controlì˜ Mouse Filterê°€ \"Ignore\"으로 ì„¤ì •ë˜ì–´ 있기 ë•Œë¬¸ì— " -"ë³´ì´ì§€ 않아요. í•´ê²°í•˜ë ¤ë©´ Mouse Filter를 \"Stop\"ì´ë‚˜ \"Pass\"로 ì„¤ì •í•˜ì„¸ìš”." +"ë³´ì´ì§€ 않습니다. í•´ê²°í•˜ë ¤ë©´ Mouse Filter를 \"Stop\"ì´ë‚˜ \"Pass\"로 ì„¤ì •í•˜ì„¸" +"ìš”." #: scene/gui/dialogs.cpp msgid "Alert!" @@ -12409,12 +12521,12 @@ msgid "" "functions. Making them visible for editing is fine, but they will hide upon " "running." msgstr "" -"Popupì€ popup() ë˜ëŠ” 기타 popup*() 함수로 호출하기 ì „ê¹Œì§€ 기본ì 으로 숨어있어" -"ìš”. 편집하는 ë™ì•ˆ ë³´ì´ë„ë¡ í• ìˆ˜ëŠ” 있으나, 실행 시ì—는 ë³´ì´ì§€ 않아요." +"Popupì€ popup() ë˜ëŠ” 기타 popup*() 함수로 호출하기 ì „ê¹Œì§€ 기본ì 으로 숨어있습" +"니다. 편집하는 ë™ì•ˆ ë³´ì´ë„ë¡ í• ìˆ˜ëŠ” 있으나, 실행 시ì—는 ë³´ì´ì§€ 않습니다." #: scene/gui/range.cpp msgid "If \"Exp Edit\" is enabled, \"Min Value\" must be greater than 0." -msgstr "\"Exp Edit\"ì„ ì¼œë©´, \"Min Value\"는 반드시 0보다 커야 í•´ìš”." +msgstr "\"Exp Edit\"ì„ ì¼œë©´, \"Min Value\"는 반드시 0보다 커야 합니다." #: scene/gui/scroll_container.cpp msgid "" @@ -12422,7 +12534,7 @@ msgid "" "Use a container as child (VBox, HBox, etc.), or a Control and set the custom " "minimum size manually." msgstr "" -"ScrollContainer는 ë‹¨ì¼ ìžì‹ Controlì„ ìž‘ì—…í•˜ê¸° 위한 것ì´ì—ìš”.\n" +"ScrollContainer는 ë‹¨ì¼ ìžì‹ Controlì„ ìž‘ì—…í•˜ê¸° 위한 것입니다.\n" "(VBox, HBox 등) 컨테ì´ë„ˆë¥¼ ìžì‹ìœ¼ë¡œ 사용하거나, Controlì„ ì‚¬ìš©í•˜ê³ ë§žì¶¤ 최소 " "수치를 수ë™ìœ¼ë¡œ ì„¤ì •í•˜ì„¸ìš”." @@ -12436,7 +12548,7 @@ msgid "" "Environment -> Default Environment) could not be loaded." msgstr "" "프로ì 트 ì„¤ì • (Rendering -> Environment -> Default Environment)ì— ì§€ì •í•œ 기" -"본 í™˜ê²½ì„ ë¶ˆëŸ¬ì˜¬ 수 없어요." +"본 í™˜ê²½ì„ ë¶ˆëŸ¬ì˜¬ 수 없습니다." #: scene/main/viewport.cpp msgid "" @@ -12445,10 +12557,10 @@ msgid "" "obtain a size. Otherwise, make it a RenderTarget and assign its internal " "texture to some node for display." msgstr "" -"ë·°í¬íŠ¸ë¥¼ ë Œë” ëŒ€ìƒìœ¼ë¡œ ì„¤ì •í•˜ì§€ 않았어요. ë·°í¬íŠ¸ì˜ ë‚´ìš©ì„ í™”ë©´ì— ì§ì ‘ 표시하" -"ë ¤ë©´, Controlì˜ ìžì‹ 노드로 만들어서 í¬ê¸°ë¥¼ 얻어야 í•´ìš”. ê·¸ë ‡ì§€ ì•Šì„ ê²½ìš°, í™”" -"ë©´ì— í‘œì‹œí•˜ê¸° 위해서는 ë·°í¬íŠ¸ë¥¼ RenderTarget으로 ë§Œë“¤ê³ ë‚´ë¶€ì ì¸ í…스처를 다" -"른 ë…¸ë“œì— ì§€ì •í•´ì•¼ í•´ìš”." +"ë·°í¬íŠ¸ë¥¼ ë Œë” ëŒ€ìƒìœ¼ë¡œ ì„¤ì •í•˜ì§€ 않았습니다. ë·°í¬íŠ¸ì˜ ë‚´ìš©ì„ í™”ë©´ì— ì§ì ‘ 표시" +"í•˜ë ¤ë©´, Controlì˜ ìžì‹ 노드로 만들어서 í¬ê¸°ë¥¼ 얻어야 합니다. ê·¸ë ‡ì§€ ì•Šì„ ê²½" +"ìš°, í™”ë©´ì— í‘œì‹œí•˜ê¸° 위해서는 ë·°í¬íŠ¸ë¥¼ RenderTarget으로 ë§Œë“¤ê³ ë‚´ë¶€ì ì¸ í…스처" +"를 다른 ë…¸ë“œì— ì§€ì •í•´ì•¼ 합니다." #: scene/resources/visual_shader_nodes.cpp msgid "Invalid source for preview." @@ -12472,11 +12584,20 @@ msgstr "Uniformì— ëŒ€ìž…." #: servers/visual/shader_language.cpp msgid "Varyings can only be assigned in vertex function." -msgstr "Varyingì€ ê¼ì§“ì 함수ì—ë§Œ ì§€ì •í• ìˆ˜ 있어요." +msgstr "Varyingì€ ê¼ì§“ì 함수ì—ë§Œ ì§€ì •í• ìˆ˜ 있습니다." #: servers/visual/shader_language.cpp msgid "Constants cannot be modified." -msgstr "ìƒìˆ˜ëŠ” ìˆ˜ì •í• ìˆ˜ 없어요." +msgstr "ìƒìˆ˜ëŠ” ìˆ˜ì •í• ìˆ˜ 없습니다." + +#~ msgid "Replaced %d occurrence(s)." +#~ msgstr "%d개를 바꿨습니다." + +#~ msgid "Create Static Convex Body" +#~ msgstr "Static Convex Body 만들기" + +#~ msgid "Failed creating shapes!" +#~ msgstr "Shape 만들기 실패!" #~ msgid "" #~ "There are currently no tutorials for this class, you can [color=$color]" diff --git a/editor/translations/lt.po b/editor/translations/lt.po index f3118b9942..60d2adc418 100644 --- a/editor/translations/lt.po +++ b/editor/translations/lt.po @@ -702,7 +702,7 @@ msgid "Line Number:" msgstr "" #: editor/code_editor.cpp -msgid "Replaced %d occurrence(s)." +msgid "%d replaced." msgstr "" #: editor/code_editor.cpp editor/editor_help.cpp @@ -3923,15 +3923,16 @@ msgid "Saving..." msgstr "" #: editor/import_dock.cpp -msgid "Set as Default for '%s'" -msgstr "" +#, fuzzy +msgid "%d Files" +msgstr "Redaguoti Filtrus" #: editor/import_dock.cpp -msgid "Clear Default for '%s'" +msgid "Set as Default for '%s'" msgstr "" #: editor/import_dock.cpp -msgid " Files" +msgid "Clear Default for '%s'" msgstr "" #: editor/import_dock.cpp @@ -5821,11 +5822,11 @@ msgid "Mesh is empty!" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Trimesh Body" +msgid "Couldn't create a Trimesh collision shape." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Convex Body" +msgid "Create Static Trimesh Body" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -5837,12 +5838,29 @@ msgid "Create Trimesh Static Shape" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Failed creating shapes!" +msgid "Can't create a single convex collision shape for the scene root." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Couldn't create a single convex collision shape." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp #, fuzzy -msgid "Create Convex Shape(s)" +msgid "Create Single Convex Shape" +msgstr "Sukurti NaujÄ…" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Can't create multiple convex collision shapes for the scene root." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Couldn't create any collision shapes." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Multiple Convex Shapes" msgstr "Sukurti NaujÄ…" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -5894,19 +5912,57 @@ msgid "Create Trimesh Static Body" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a StaticBody and assigns a polygon-based collision shape to it " +"automatically.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Trimesh Collision Sibling" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp #, fuzzy -msgid "Create Convex Collision Sibling(s)" +msgid "Create Single Convex Collision Siblings" msgstr "Keisti Poligono SkalÄ™" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a single convex collision shape.\n" +"This is the fastest (but least accurate) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Multiple Convex Collision Siblings" +msgstr "Keisti Poligono SkalÄ™" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is a performance middle-ground between the two above options." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Outline Mesh..." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a static outline mesh. The outline mesh will have its normals " +"flipped automatically.\n" +"This can be used instead of the SpatialMaterial Grow property when using " +"that property isn't possible." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "View UV1" msgstr "" @@ -8356,7 +8412,7 @@ msgstr "" msgid "No VCS addons are available." msgstr "" -#: editor/plugins/version_control_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/version_control_editor_plugin.cpp msgid "Error" msgstr "" @@ -9468,11 +9524,16 @@ msgid "Export With Debug" msgstr "" #: editor/project_manager.cpp -msgid "The path does not exist." +msgid "The path specified doesn't exist." +msgstr "" + +#: editor/project_manager.cpp +msgid "Error opening package file (it's not in ZIP format)." msgstr "" #: editor/project_manager.cpp -msgid "Invalid '.zip' project file, does not contain a 'project.godot' file." +msgid "" +"Invalid \".zip\" project file; it doesn't contain a \"project.godot\" file." msgstr "" #: editor/project_manager.cpp @@ -9480,11 +9541,11 @@ msgid "Please choose an empty folder." msgstr "" #: editor/project_manager.cpp -msgid "Please choose a 'project.godot' or '.zip' file." +msgid "Please choose a \"project.godot\" or \".zip\" file." msgstr "" #: editor/project_manager.cpp -msgid "Directory already contains a Godot project." +msgid "This directory already contains a Godot project." msgstr "" #: editor/project_manager.cpp @@ -10137,6 +10198,10 @@ msgid "Suffix" msgstr "" #: editor/rename_dialog.cpp +msgid "Use Regular Expressions" +msgstr "" + +#: editor/rename_dialog.cpp msgid "Advanced Options" msgstr "" @@ -10172,7 +10237,7 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -msgid "Per Level counter" +msgid "Per-level Counter" msgstr "" #: editor/rename_dialog.cpp @@ -10203,10 +10268,6 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -msgid "Regular Expressions" -msgstr "" - -#: editor/rename_dialog.cpp msgid "Post-Process" msgstr "" @@ -10215,11 +10276,11 @@ msgid "Keep" msgstr "" #: editor/rename_dialog.cpp -msgid "CamelCase to under_scored" +msgid "PascalCase to snake_case" msgstr "" #: editor/rename_dialog.cpp -msgid "under_scored to CamelCase" +msgid "snake_case to PascalCase" msgstr "" #: editor/rename_dialog.cpp @@ -10239,6 +10300,14 @@ msgstr "" msgid "Reset" msgstr "Atstatyti PriartinimÄ…" +#: editor/rename_dialog.cpp +msgid "Regular Expression Error" +msgstr "" + +#: editor/rename_dialog.cpp +msgid "At character %s" +msgstr "" + #: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp msgid "Reparent Node" msgstr "" @@ -10691,7 +10760,7 @@ msgid "Invalid inherited parent name or path." msgstr "" #: editor/script_create_dialog.cpp -msgid "Script is valid." +msgid "Script path/name is valid." msgstr "" #: editor/script_create_dialog.cpp @@ -10788,6 +10857,10 @@ msgid "Copy Error" msgstr "" #: editor/script_editor_debugger.cpp +msgid "Video RAM" +msgstr "" + +#: editor/script_editor_debugger.cpp #, fuzzy msgid "Skip Breakpoints" msgstr "Sukurti" @@ -10838,10 +10911,6 @@ msgid "Total:" msgstr "" #: editor/script_editor_debugger.cpp -msgid "Video Mem" -msgstr "" - -#: editor/script_editor_debugger.cpp msgid "Resource Path" msgstr "" diff --git a/editor/translations/lv.po b/editor/translations/lv.po index b6066df271..9a6454d81b 100644 --- a/editor/translations/lv.po +++ b/editor/translations/lv.po @@ -693,8 +693,9 @@ msgid "Line Number:" msgstr "" #: editor/code_editor.cpp -msgid "Replaced %d occurrence(s)." -msgstr "" +#, fuzzy +msgid "%d replaced." +msgstr "Aizvietot" #: editor/code_editor.cpp editor/editor_help.cpp msgid "%d match." @@ -3915,15 +3916,16 @@ msgid "Saving..." msgstr "" #: editor/import_dock.cpp -msgid "Set as Default for '%s'" -msgstr "" +#, fuzzy +msgid "%d Files" +msgstr "NederÄ«gs nosaukums." #: editor/import_dock.cpp -msgid "Clear Default for '%s'" +msgid "Set as Default for '%s'" msgstr "" #: editor/import_dock.cpp -msgid " Files" +msgid "Clear Default for '%s'" msgstr "" #: editor/import_dock.cpp @@ -5806,11 +5808,11 @@ msgid "Mesh is empty!" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Trimesh Body" +msgid "Couldn't create a Trimesh collision shape." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Convex Body" +msgid "Create Static Trimesh Body" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -5822,12 +5824,29 @@ msgid "Create Trimesh Static Shape" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Failed creating shapes!" +msgid "Can't create a single convex collision shape for the scene root." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Couldn't create a single convex collision shape." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp #, fuzzy -msgid "Create Convex Shape(s)" +msgid "Create Single Convex Shape" +msgstr "Izveidot Jaunu %s" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Can't create multiple convex collision shapes for the scene root." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Couldn't create any collision shapes." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Multiple Convex Shapes" msgstr "Izveidot Jaunu %s" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -5879,19 +5898,57 @@ msgid "Create Trimesh Static Body" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a StaticBody and assigns a polygon-based collision shape to it " +"automatically.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Trimesh Collision Sibling" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Single Convex Collision Siblings" +msgstr "Izveidot" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a single convex collision shape.\n" +"This is the fastest (but least accurate) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp #, fuzzy -msgid "Create Convex Collision Sibling(s)" +msgid "Create Multiple Convex Collision Siblings" msgstr "Izveidot" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is a performance middle-ground between the two above options." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Outline Mesh..." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a static outline mesh. The outline mesh will have its normals " +"flipped automatically.\n" +"This can be used instead of the SpatialMaterial Grow property when using " +"that property isn't possible." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "View UV1" msgstr "" @@ -8329,7 +8386,7 @@ msgstr "" msgid "No VCS addons are available." msgstr "" -#: editor/plugins/version_control_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/version_control_editor_plugin.cpp msgid "Error" msgstr "" @@ -9438,11 +9495,17 @@ msgid "Export With Debug" msgstr "" #: editor/project_manager.cpp -msgid "The path does not exist." +msgid "The path specified doesn't exist." msgstr "" #: editor/project_manager.cpp -msgid "Invalid '.zip' project file, does not contain a 'project.godot' file." +#, fuzzy +msgid "Error opening package file (it's not in ZIP format)." +msgstr "Kļūme atverot arhÄ«vu failu, nav ZIP formÄtÄ." + +#: editor/project_manager.cpp +msgid "" +"Invalid \".zip\" project file; it doesn't contain a \"project.godot\" file." msgstr "" #: editor/project_manager.cpp @@ -9450,11 +9513,11 @@ msgid "Please choose an empty folder." msgstr "" #: editor/project_manager.cpp -msgid "Please choose a 'project.godot' or '.zip' file." +msgid "Please choose a \"project.godot\" or \".zip\" file." msgstr "" #: editor/project_manager.cpp -msgid "Directory already contains a Godot project." +msgid "This directory already contains a Godot project." msgstr "" #: editor/project_manager.cpp @@ -10103,6 +10166,10 @@ msgid "Suffix" msgstr "" #: editor/rename_dialog.cpp +msgid "Use Regular Expressions" +msgstr "" + +#: editor/rename_dialog.cpp msgid "Advanced Options" msgstr "" @@ -10137,7 +10204,7 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -msgid "Per Level counter" +msgid "Per-level Counter" msgstr "" #: editor/rename_dialog.cpp @@ -10168,10 +10235,6 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -msgid "Regular Expressions" -msgstr "" - -#: editor/rename_dialog.cpp msgid "Post-Process" msgstr "" @@ -10180,11 +10243,11 @@ msgid "Keep" msgstr "" #: editor/rename_dialog.cpp -msgid "CamelCase to under_scored" +msgid "PascalCase to snake_case" msgstr "" #: editor/rename_dialog.cpp -msgid "under_scored to CamelCase" +msgid "snake_case to PascalCase" msgstr "" #: editor/rename_dialog.cpp @@ -10204,6 +10267,15 @@ msgstr "" msgid "Reset" msgstr "AtiestatÄ«t tÄlummaiņu" +#: editor/rename_dialog.cpp +msgid "Regular Expression Error" +msgstr "" + +#: editor/rename_dialog.cpp +#, fuzzy +msgid "At character %s" +msgstr "DerÄ«gie simboli:" + #: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp msgid "Reparent Node" msgstr "" @@ -10655,7 +10727,7 @@ msgid "Invalid inherited parent name or path." msgstr "" #: editor/script_create_dialog.cpp -msgid "Script is valid." +msgid "Script path/name is valid." msgstr "" #: editor/script_create_dialog.cpp @@ -10755,6 +10827,10 @@ msgid "Copy Error" msgstr "" #: editor/script_editor_debugger.cpp +msgid "Video RAM" +msgstr "" + +#: editor/script_editor_debugger.cpp #, fuzzy msgid "Skip Breakpoints" msgstr "Izveidot" @@ -10804,10 +10880,6 @@ msgid "Total:" msgstr "" #: editor/script_editor_debugger.cpp -msgid "Video Mem" -msgstr "" - -#: editor/script_editor_debugger.cpp msgid "Resource Path" msgstr "" diff --git a/editor/translations/mi.po b/editor/translations/mi.po index 24d1f213e2..2e6c563aec 100644 --- a/editor/translations/mi.po +++ b/editor/translations/mi.po @@ -659,7 +659,7 @@ msgid "Line Number:" msgstr "" #: editor/code_editor.cpp -msgid "Replaced %d occurrence(s)." +msgid "%d replaced." msgstr "" #: editor/code_editor.cpp editor/editor_help.cpp @@ -3795,15 +3795,15 @@ msgid "Saving..." msgstr "" #: editor/import_dock.cpp -msgid "Set as Default for '%s'" +msgid "%d Files" msgstr "" #: editor/import_dock.cpp -msgid "Clear Default for '%s'" +msgid "Set as Default for '%s'" msgstr "" #: editor/import_dock.cpp -msgid " Files" +msgid "Clear Default for '%s'" msgstr "" #: editor/import_dock.cpp @@ -5632,11 +5632,11 @@ msgid "Mesh is empty!" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Trimesh Body" +msgid "Couldn't create a Trimesh collision shape." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Convex Body" +msgid "Create Static Trimesh Body" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -5648,11 +5648,27 @@ msgid "Create Trimesh Static Shape" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Failed creating shapes!" +msgid "Can't create a single convex collision shape for the scene root." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Couldn't create a single convex collision shape." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Single Convex Shape" +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Can't create multiple convex collision shapes for the scene root." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Couldn't create any collision shapes." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Convex Shape(s)" +msgid "Create Multiple Convex Shapes" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -5704,11 +5720,40 @@ msgid "Create Trimesh Static Body" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a StaticBody and assigns a polygon-based collision shape to it " +"automatically.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Trimesh Collision Sibling" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Convex Collision Sibling(s)" +msgid "" +"Creates a polygon-based collision shape.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Single Convex Collision Siblings" +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a single convex collision shape.\n" +"This is the fastest (but least accurate) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Multiple Convex Collision Siblings" +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is a performance middle-ground between the two above options." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -5716,6 +5761,14 @@ msgid "Create Outline Mesh..." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a static outline mesh. The outline mesh will have its normals " +"flipped automatically.\n" +"This can be used instead of the SpatialMaterial Grow property when using " +"that property isn't possible." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "View UV1" msgstr "" @@ -8080,7 +8133,7 @@ msgstr "" msgid "No VCS addons are available." msgstr "" -#: editor/plugins/version_control_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/version_control_editor_plugin.cpp msgid "Error" msgstr "" @@ -9164,11 +9217,16 @@ msgid "Export With Debug" msgstr "" #: editor/project_manager.cpp -msgid "The path does not exist." +msgid "The path specified doesn't exist." +msgstr "" + +#: editor/project_manager.cpp +msgid "Error opening package file (it's not in ZIP format)." msgstr "" #: editor/project_manager.cpp -msgid "Invalid '.zip' project file, does not contain a 'project.godot' file." +msgid "" +"Invalid \".zip\" project file; it doesn't contain a \"project.godot\" file." msgstr "" #: editor/project_manager.cpp @@ -9176,11 +9234,11 @@ msgid "Please choose an empty folder." msgstr "" #: editor/project_manager.cpp -msgid "Please choose a 'project.godot' or '.zip' file." +msgid "Please choose a \"project.godot\" or \".zip\" file." msgstr "" #: editor/project_manager.cpp -msgid "Directory already contains a Godot project." +msgid "This directory already contains a Godot project." msgstr "" #: editor/project_manager.cpp @@ -9826,6 +9884,10 @@ msgid "Suffix" msgstr "" #: editor/rename_dialog.cpp +msgid "Use Regular Expressions" +msgstr "" + +#: editor/rename_dialog.cpp msgid "Advanced Options" msgstr "" @@ -9860,7 +9922,7 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -msgid "Per Level counter" +msgid "Per-level Counter" msgstr "" #: editor/rename_dialog.cpp @@ -9890,10 +9952,6 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -msgid "Regular Expressions" -msgstr "" - -#: editor/rename_dialog.cpp msgid "Post-Process" msgstr "" @@ -9902,11 +9960,11 @@ msgid "Keep" msgstr "" #: editor/rename_dialog.cpp -msgid "CamelCase to under_scored" +msgid "PascalCase to snake_case" msgstr "" #: editor/rename_dialog.cpp -msgid "under_scored to CamelCase" +msgid "snake_case to PascalCase" msgstr "" #: editor/rename_dialog.cpp @@ -9925,6 +9983,14 @@ msgstr "" msgid "Reset" msgstr "" +#: editor/rename_dialog.cpp +msgid "Regular Expression Error" +msgstr "" + +#: editor/rename_dialog.cpp +msgid "At character %s" +msgstr "" + #: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp msgid "Reparent Node" msgstr "" @@ -10364,7 +10430,7 @@ msgid "Invalid inherited parent name or path." msgstr "" #: editor/script_create_dialog.cpp -msgid "Script is valid." +msgid "Script path/name is valid." msgstr "" #: editor/script_create_dialog.cpp @@ -10456,6 +10522,10 @@ msgid "Copy Error" msgstr "" #: editor/script_editor_debugger.cpp +msgid "Video RAM" +msgstr "" + +#: editor/script_editor_debugger.cpp msgid "Skip Breakpoints" msgstr "" @@ -10504,10 +10574,6 @@ msgid "Total:" msgstr "" #: editor/script_editor_debugger.cpp -msgid "Video Mem" -msgstr "" - -#: editor/script_editor_debugger.cpp msgid "Resource Path" msgstr "" diff --git a/editor/translations/ml.po b/editor/translations/ml.po index dbf8e76d3f..500a1d9156 100644 --- a/editor/translations/ml.po +++ b/editor/translations/ml.po @@ -669,7 +669,7 @@ msgid "Line Number:" msgstr "" #: editor/code_editor.cpp -msgid "Replaced %d occurrence(s)." +msgid "%d replaced." msgstr "" #: editor/code_editor.cpp editor/editor_help.cpp @@ -3807,15 +3807,15 @@ msgid "Saving..." msgstr "" #: editor/import_dock.cpp -msgid "Set as Default for '%s'" +msgid "%d Files" msgstr "" #: editor/import_dock.cpp -msgid "Clear Default for '%s'" +msgid "Set as Default for '%s'" msgstr "" #: editor/import_dock.cpp -msgid " Files" +msgid "Clear Default for '%s'" msgstr "" #: editor/import_dock.cpp @@ -5648,11 +5648,11 @@ msgid "Mesh is empty!" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Trimesh Body" +msgid "Couldn't create a Trimesh collision shape." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Convex Body" +msgid "Create Static Trimesh Body" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -5664,11 +5664,27 @@ msgid "Create Trimesh Static Shape" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Failed creating shapes!" +msgid "Can't create a single convex collision shape for the scene root." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Couldn't create a single convex collision shape." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Single Convex Shape" +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Can't create multiple convex collision shapes for the scene root." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Couldn't create any collision shapes." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Convex Shape(s)" +msgid "Create Multiple Convex Shapes" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -5720,11 +5736,40 @@ msgid "Create Trimesh Static Body" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a StaticBody and assigns a polygon-based collision shape to it " +"automatically.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Trimesh Collision Sibling" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Convex Collision Sibling(s)" +msgid "" +"Creates a polygon-based collision shape.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Single Convex Collision Siblings" +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a single convex collision shape.\n" +"This is the fastest (but least accurate) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Multiple Convex Collision Siblings" +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is a performance middle-ground between the two above options." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -5732,6 +5777,14 @@ msgid "Create Outline Mesh..." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a static outline mesh. The outline mesh will have its normals " +"flipped automatically.\n" +"This can be used instead of the SpatialMaterial Grow property when using " +"that property isn't possible." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "View UV1" msgstr "" @@ -8096,7 +8149,7 @@ msgstr "" msgid "No VCS addons are available." msgstr "" -#: editor/plugins/version_control_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/version_control_editor_plugin.cpp msgid "Error" msgstr "" @@ -9180,11 +9233,16 @@ msgid "Export With Debug" msgstr "" #: editor/project_manager.cpp -msgid "The path does not exist." +msgid "The path specified doesn't exist." +msgstr "" + +#: editor/project_manager.cpp +msgid "Error opening package file (it's not in ZIP format)." msgstr "" #: editor/project_manager.cpp -msgid "Invalid '.zip' project file, does not contain a 'project.godot' file." +msgid "" +"Invalid \".zip\" project file; it doesn't contain a \"project.godot\" file." msgstr "" #: editor/project_manager.cpp @@ -9192,11 +9250,11 @@ msgid "Please choose an empty folder." msgstr "" #: editor/project_manager.cpp -msgid "Please choose a 'project.godot' or '.zip' file." +msgid "Please choose a \"project.godot\" or \".zip\" file." msgstr "" #: editor/project_manager.cpp -msgid "Directory already contains a Godot project." +msgid "This directory already contains a Godot project." msgstr "" #: editor/project_manager.cpp @@ -9842,6 +9900,10 @@ msgid "Suffix" msgstr "" #: editor/rename_dialog.cpp +msgid "Use Regular Expressions" +msgstr "" + +#: editor/rename_dialog.cpp msgid "Advanced Options" msgstr "" @@ -9876,7 +9938,7 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -msgid "Per Level counter" +msgid "Per-level Counter" msgstr "" #: editor/rename_dialog.cpp @@ -9906,10 +9968,6 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -msgid "Regular Expressions" -msgstr "" - -#: editor/rename_dialog.cpp msgid "Post-Process" msgstr "" @@ -9918,11 +9976,11 @@ msgid "Keep" msgstr "" #: editor/rename_dialog.cpp -msgid "CamelCase to under_scored" +msgid "PascalCase to snake_case" msgstr "" #: editor/rename_dialog.cpp -msgid "under_scored to CamelCase" +msgid "snake_case to PascalCase" msgstr "" #: editor/rename_dialog.cpp @@ -9941,6 +9999,14 @@ msgstr "" msgid "Reset" msgstr "" +#: editor/rename_dialog.cpp +msgid "Regular Expression Error" +msgstr "" + +#: editor/rename_dialog.cpp +msgid "At character %s" +msgstr "" + #: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp msgid "Reparent Node" msgstr "" @@ -10380,7 +10446,7 @@ msgid "Invalid inherited parent name or path." msgstr "" #: editor/script_create_dialog.cpp -msgid "Script is valid." +msgid "Script path/name is valid." msgstr "" #: editor/script_create_dialog.cpp @@ -10472,6 +10538,10 @@ msgid "Copy Error" msgstr "" #: editor/script_editor_debugger.cpp +msgid "Video RAM" +msgstr "" + +#: editor/script_editor_debugger.cpp msgid "Skip Breakpoints" msgstr "" @@ -10520,10 +10590,6 @@ msgid "Total:" msgstr "" #: editor/script_editor_debugger.cpp -msgid "Video Mem" -msgstr "" - -#: editor/script_editor_debugger.cpp msgid "Resource Path" msgstr "" diff --git a/editor/translations/mr.po b/editor/translations/mr.po index 43f7620d28..ca97848940 100644 --- a/editor/translations/mr.po +++ b/editor/translations/mr.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" -"PO-Revision-Date: 2020-01-11 03:05+0000\n" +"PO-Revision-Date: 2020-01-30 03:56+0000\n" "Last-Translator: Prachi Joshi <josprachi@yahoo.com>\n" "Language-Team: Marathi <https://hosted.weblate.org/projects/godot-engine/" "godot/mr/>\n" @@ -14,7 +14,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 3.10.1\n" +"X-Generator: Weblate 3.11-dev\n" #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/visual_script/visual_script_builtin_funcs.cpp @@ -665,7 +665,7 @@ msgid "Line Number:" msgstr "" #: editor/code_editor.cpp -msgid "Replaced %d occurrence(s)." +msgid "%d replaced." msgstr "" #: editor/code_editor.cpp editor/editor_help.cpp @@ -3802,15 +3802,15 @@ msgid "Saving..." msgstr "" #: editor/import_dock.cpp -msgid "Set as Default for '%s'" +msgid "%d Files" msgstr "" #: editor/import_dock.cpp -msgid "Clear Default for '%s'" +msgid "Set as Default for '%s'" msgstr "" #: editor/import_dock.cpp -msgid " Files" +msgid "Clear Default for '%s'" msgstr "" #: editor/import_dock.cpp @@ -4398,95 +4398,95 @@ msgstr "" #: editor/plugins/animation_player_editor_plugin.cpp msgid "1 step" -msgstr "" +msgstr "1 पायरी" #: editor/plugins/animation_player_editor_plugin.cpp msgid "2 steps" -msgstr "" +msgstr "2 पायऱà¥à¤¯à¤¾" #: editor/plugins/animation_player_editor_plugin.cpp msgid "3 steps" -msgstr "" +msgstr "3 पायरà¥â€à¤¯à¤¾" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Differences Only" -msgstr "" +msgstr "फकà¥à¤¤ फरक" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Force White Modulate" -msgstr "" +msgstr "वà¥à¤¹à¤¾à¤‡à¤Ÿ मॉडà¥à¤¯à¥à¤²à¥‡à¤Ÿà¥‡à¤¡ सकà¥à¤¤à¥€ करा" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Include Gizmos (3D)" -msgstr "" +msgstr "गिà¤à¥à¤®à¥‹à¤¸ (3 डी) समाविषà¥à¤Ÿ करा" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Pin AnimationPlayer" -msgstr "" +msgstr "अâ€à¥…निमेशनपà¥à¤²à¥‡à¤…र पिन करा" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Create New Animation" -msgstr "" +msgstr "नवीन अâ€à¥…निमेशन तयार करा" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Animation Name:" -msgstr "" +msgstr "अâ€à¥…निमेशन नाव:" #: editor/plugins/animation_player_editor_plugin.cpp #: editor/plugins/resource_preloader_editor_plugin.cpp #: editor/plugins/script_editor_plugin.cpp #: editor/plugins/sprite_frames_editor_plugin.cpp editor/property_editor.cpp msgid "Error!" -msgstr "" +msgstr "तà¥à¤°à¥à¤Ÿà¥€!" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Blend Times:" -msgstr "" +msgstr "बà¥à¤²à¥‡à¤‚ड टाइमà¥à¤¸:" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Next (Auto Queue):" -msgstr "" +msgstr "पà¥à¤¢à¥€à¤² (सà¥à¤µà¤¯à¤‚ रांग):" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Cross-Animation Blend Times" -msgstr "" +msgstr "कà¥à¤°à¥‰à¤¸-अâ€à¥…निमेशन बà¥à¤²à¥‡à¤‚ड टाइमà¥à¤¸" #: editor/plugins/animation_state_machine_editor.cpp msgid "Move Node" -msgstr "" +msgstr "नोड हलवा" #: editor/plugins/animation_state_machine_editor.cpp msgid "Transition exists!" -msgstr "" +msgstr "संकà¥à¤°à¤®à¤£ विदà¥à¤¯à¤®à¤¾à¤¨ आहे!" #: editor/plugins/animation_state_machine_editor.cpp msgid "Add Transition" -msgstr "" +msgstr "संकà¥à¤°à¤®à¤£ जोडा" #: editor/plugins/animation_state_machine_editor.cpp #: modules/visual_script/visual_script_editor.cpp msgid "Add Node" -msgstr "" +msgstr "नोड जोडा" #: editor/plugins/animation_state_machine_editor.cpp msgid "End" -msgstr "" +msgstr "समापà¥à¤¤" #: editor/plugins/animation_state_machine_editor.cpp msgid "Immediate" -msgstr "" +msgstr "तà¥à¤µà¤°à¤¿à¤¤" #: editor/plugins/animation_state_machine_editor.cpp msgid "Sync" -msgstr "" +msgstr "समकà¥à¤°à¤®à¤¿à¤¤ करा" #: editor/plugins/animation_state_machine_editor.cpp msgid "At End" -msgstr "" +msgstr "शेवटी" #: editor/plugins/animation_state_machine_editor.cpp msgid "Travel" -msgstr "" +msgstr "पà¥à¤°à¤µà¤¾à¤¸" #: editor/plugins/animation_state_machine_editor.cpp msgid "Start and end nodes are needed for a sub-transition." @@ -4498,15 +4498,15 @@ msgstr "" #: editor/plugins/animation_state_machine_editor.cpp msgid "Node Removed" -msgstr "" +msgstr "नोड काढला" #: editor/plugins/animation_state_machine_editor.cpp msgid "Transition Removed" -msgstr "" +msgstr "संकà¥à¤°à¤®à¤£ काढले" #: editor/plugins/animation_state_machine_editor.cpp msgid "Set Start Node (Autoplay)" -msgstr "" +msgstr "सà¥à¤Ÿà¤¾à¤°à¥à¤Ÿ नोड सेट करा (ऑटोपà¥à¤²à¥‡)" #: editor/plugins/animation_state_machine_editor.cpp msgid "" @@ -4517,15 +4517,15 @@ msgstr "" #: editor/plugins/animation_state_machine_editor.cpp msgid "Create new nodes." -msgstr "" +msgstr "नवीन नोड तयार करा." #: editor/plugins/animation_state_machine_editor.cpp msgid "Connect nodes." -msgstr "" +msgstr "नोड कनेकà¥à¤Ÿ करा." #: editor/plugins/animation_state_machine_editor.cpp msgid "Remove selected node or transition." -msgstr "" +msgstr "निवडलेले नोड किंवा संकà¥à¤°à¤®à¤£ काढा." #: editor/plugins/animation_state_machine_editor.cpp msgid "Toggle autoplay this animation on start, restart or seek to zero." @@ -4533,29 +4533,29 @@ msgstr "" #: editor/plugins/animation_state_machine_editor.cpp msgid "Set the end animation. This is useful for sub-transitions." -msgstr "" +msgstr "शेवटचे अâ€à¥…निमेशन सेट करा. हे उप-संकà¥à¤°à¤®à¤£à¤¾à¤‚साठी उपयà¥à¤•à¥à¤¤ आहे." #: editor/plugins/animation_state_machine_editor.cpp msgid "Transition: " -msgstr "" +msgstr "संकà¥à¤°à¤®à¤£: " #: editor/plugins/animation_state_machine_editor.cpp msgid "Play Mode:" -msgstr "" +msgstr "पà¥à¤²à¥‡ मोड:" #: editor/plugins/animation_tree_editor_plugin.cpp #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "AnimationTree" -msgstr "" +msgstr "अâ€à¥…निमेशन टà¥à¤°à¥€" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "New name:" -msgstr "" +msgstr "नवीन नाव:" #: editor/plugins/animation_tree_player_editor_plugin.cpp #: editor/plugins/multimesh_editor_plugin.cpp msgid "Scale:" -msgstr "" +msgstr "सà¥à¤•ेल:" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Fade In (s):" @@ -5639,11 +5639,11 @@ msgid "Mesh is empty!" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Trimesh Body" +msgid "Couldn't create a Trimesh collision shape." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Convex Body" +msgid "Create Static Trimesh Body" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -5655,11 +5655,27 @@ msgid "Create Trimesh Static Shape" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Failed creating shapes!" +msgid "Can't create a single convex collision shape for the scene root." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Couldn't create a single convex collision shape." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Single Convex Shape" +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Can't create multiple convex collision shapes for the scene root." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Convex Shape(s)" +msgid "Couldn't create any collision shapes." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Multiple Convex Shapes" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -5711,11 +5727,40 @@ msgid "Create Trimesh Static Body" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a StaticBody and assigns a polygon-based collision shape to it " +"automatically.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Trimesh Collision Sibling" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Convex Collision Sibling(s)" +msgid "" +"Creates a polygon-based collision shape.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Single Convex Collision Siblings" +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a single convex collision shape.\n" +"This is the fastest (but least accurate) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Multiple Convex Collision Siblings" +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is a performance middle-ground between the two above options." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -5723,6 +5768,14 @@ msgid "Create Outline Mesh..." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a static outline mesh. The outline mesh will have its normals " +"flipped automatically.\n" +"This can be used instead of the SpatialMaterial Grow property when using " +"that property isn't possible." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "View UV1" msgstr "" @@ -8087,7 +8140,7 @@ msgstr "" msgid "No VCS addons are available." msgstr "" -#: editor/plugins/version_control_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/version_control_editor_plugin.cpp msgid "Error" msgstr "" @@ -9171,11 +9224,16 @@ msgid "Export With Debug" msgstr "" #: editor/project_manager.cpp -msgid "The path does not exist." +msgid "The path specified doesn't exist." +msgstr "" + +#: editor/project_manager.cpp +msgid "Error opening package file (it's not in ZIP format)." msgstr "" #: editor/project_manager.cpp -msgid "Invalid '.zip' project file, does not contain a 'project.godot' file." +msgid "" +"Invalid \".zip\" project file; it doesn't contain a \"project.godot\" file." msgstr "" #: editor/project_manager.cpp @@ -9183,11 +9241,11 @@ msgid "Please choose an empty folder." msgstr "" #: editor/project_manager.cpp -msgid "Please choose a 'project.godot' or '.zip' file." +msgid "Please choose a \"project.godot\" or \".zip\" file." msgstr "" #: editor/project_manager.cpp -msgid "Directory already contains a Godot project." +msgid "This directory already contains a Godot project." msgstr "" #: editor/project_manager.cpp @@ -9833,6 +9891,10 @@ msgid "Suffix" msgstr "" #: editor/rename_dialog.cpp +msgid "Use Regular Expressions" +msgstr "" + +#: editor/rename_dialog.cpp msgid "Advanced Options" msgstr "" @@ -9867,7 +9929,7 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -msgid "Per Level counter" +msgid "Per-level Counter" msgstr "" #: editor/rename_dialog.cpp @@ -9897,10 +9959,6 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -msgid "Regular Expressions" -msgstr "" - -#: editor/rename_dialog.cpp msgid "Post-Process" msgstr "" @@ -9909,11 +9967,11 @@ msgid "Keep" msgstr "" #: editor/rename_dialog.cpp -msgid "CamelCase to under_scored" +msgid "PascalCase to snake_case" msgstr "" #: editor/rename_dialog.cpp -msgid "under_scored to CamelCase" +msgid "snake_case to PascalCase" msgstr "" #: editor/rename_dialog.cpp @@ -9932,6 +9990,14 @@ msgstr "" msgid "Reset" msgstr "" +#: editor/rename_dialog.cpp +msgid "Regular Expression Error" +msgstr "" + +#: editor/rename_dialog.cpp +msgid "At character %s" +msgstr "" + #: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp msgid "Reparent Node" msgstr "" @@ -10371,7 +10437,7 @@ msgid "Invalid inherited parent name or path." msgstr "" #: editor/script_create_dialog.cpp -msgid "Script is valid." +msgid "Script path/name is valid." msgstr "" #: editor/script_create_dialog.cpp @@ -10463,6 +10529,10 @@ msgid "Copy Error" msgstr "" #: editor/script_editor_debugger.cpp +msgid "Video RAM" +msgstr "" + +#: editor/script_editor_debugger.cpp msgid "Skip Breakpoints" msgstr "" @@ -10511,10 +10581,6 @@ msgid "Total:" msgstr "" #: editor/script_editor_debugger.cpp -msgid "Video Mem" -msgstr "" - -#: editor/script_editor_debugger.cpp msgid "Resource Path" msgstr "" diff --git a/editor/translations/ms.po b/editor/translations/ms.po index 0207d83de5..d7e9bd443a 100644 --- a/editor/translations/ms.po +++ b/editor/translations/ms.po @@ -689,7 +689,7 @@ msgid "Line Number:" msgstr "" #: editor/code_editor.cpp -msgid "Replaced %d occurrence(s)." +msgid "%d replaced." msgstr "" #: editor/code_editor.cpp editor/editor_help.cpp @@ -3830,15 +3830,15 @@ msgid "Saving..." msgstr "" #: editor/import_dock.cpp -msgid "Set as Default for '%s'" +msgid "%d Files" msgstr "" #: editor/import_dock.cpp -msgid "Clear Default for '%s'" +msgid "Set as Default for '%s'" msgstr "" #: editor/import_dock.cpp -msgid " Files" +msgid "Clear Default for '%s'" msgstr "" #: editor/import_dock.cpp @@ -5686,11 +5686,11 @@ msgid "Mesh is empty!" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Trimesh Body" +msgid "Couldn't create a Trimesh collision shape." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Convex Body" +msgid "Create Static Trimesh Body" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -5702,11 +5702,27 @@ msgid "Create Trimesh Static Shape" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Failed creating shapes!" +msgid "Can't create a single convex collision shape for the scene root." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Couldn't create a single convex collision shape." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Single Convex Shape" +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Can't create multiple convex collision shapes for the scene root." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Couldn't create any collision shapes." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Convex Shape(s)" +msgid "Create Multiple Convex Shapes" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -5758,11 +5774,40 @@ msgid "Create Trimesh Static Body" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a StaticBody and assigns a polygon-based collision shape to it " +"automatically.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Trimesh Collision Sibling" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Convex Collision Sibling(s)" +msgid "" +"Creates a polygon-based collision shape.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Single Convex Collision Siblings" +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a single convex collision shape.\n" +"This is the fastest (but least accurate) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Multiple Convex Collision Siblings" +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is a performance middle-ground between the two above options." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -5770,6 +5815,14 @@ msgid "Create Outline Mesh..." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a static outline mesh. The outline mesh will have its normals " +"flipped automatically.\n" +"This can be used instead of the SpatialMaterial Grow property when using " +"that property isn't possible." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "View UV1" msgstr "" @@ -8144,7 +8197,7 @@ msgstr "" msgid "No VCS addons are available." msgstr "" -#: editor/plugins/version_control_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/version_control_editor_plugin.cpp msgid "Error" msgstr "" @@ -9237,11 +9290,16 @@ msgid "Export With Debug" msgstr "" #: editor/project_manager.cpp -msgid "The path does not exist." +msgid "The path specified doesn't exist." +msgstr "" + +#: editor/project_manager.cpp +msgid "Error opening package file (it's not in ZIP format)." msgstr "" #: editor/project_manager.cpp -msgid "Invalid '.zip' project file, does not contain a 'project.godot' file." +msgid "" +"Invalid \".zip\" project file; it doesn't contain a \"project.godot\" file." msgstr "" #: editor/project_manager.cpp @@ -9249,11 +9307,11 @@ msgid "Please choose an empty folder." msgstr "" #: editor/project_manager.cpp -msgid "Please choose a 'project.godot' or '.zip' file." +msgid "Please choose a \"project.godot\" or \".zip\" file." msgstr "" #: editor/project_manager.cpp -msgid "Directory already contains a Godot project." +msgid "This directory already contains a Godot project." msgstr "" #: editor/project_manager.cpp @@ -9900,6 +9958,10 @@ msgid "Suffix" msgstr "" #: editor/rename_dialog.cpp +msgid "Use Regular Expressions" +msgstr "" + +#: editor/rename_dialog.cpp msgid "Advanced Options" msgstr "" @@ -9934,7 +9996,7 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -msgid "Per Level counter" +msgid "Per-level Counter" msgstr "" #: editor/rename_dialog.cpp @@ -9964,10 +10026,6 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -msgid "Regular Expressions" -msgstr "" - -#: editor/rename_dialog.cpp msgid "Post-Process" msgstr "" @@ -9976,11 +10034,11 @@ msgid "Keep" msgstr "" #: editor/rename_dialog.cpp -msgid "CamelCase to under_scored" +msgid "PascalCase to snake_case" msgstr "" #: editor/rename_dialog.cpp -msgid "under_scored to CamelCase" +msgid "snake_case to PascalCase" msgstr "" #: editor/rename_dialog.cpp @@ -9999,6 +10057,14 @@ msgstr "" msgid "Reset" msgstr "" +#: editor/rename_dialog.cpp +msgid "Regular Expression Error" +msgstr "" + +#: editor/rename_dialog.cpp +msgid "At character %s" +msgstr "" + #: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp msgid "Reparent Node" msgstr "" @@ -10441,7 +10507,7 @@ msgid "Invalid inherited parent name or path." msgstr "" #: editor/script_create_dialog.cpp -msgid "Script is valid." +msgid "Script path/name is valid." msgstr "" #: editor/script_create_dialog.cpp @@ -10533,6 +10599,10 @@ msgid "Copy Error" msgstr "" #: editor/script_editor_debugger.cpp +msgid "Video RAM" +msgstr "" + +#: editor/script_editor_debugger.cpp msgid "Skip Breakpoints" msgstr "" @@ -10581,10 +10651,6 @@ msgid "Total:" msgstr "" #: editor/script_editor_debugger.cpp -msgid "Video Mem" -msgstr "" - -#: editor/script_editor_debugger.cpp msgid "Resource Path" msgstr "" diff --git a/editor/translations/nb.po b/editor/translations/nb.po index dcbe8e6950..9060ee7249 100644 --- a/editor/translations/nb.po +++ b/editor/translations/nb.po @@ -727,8 +727,9 @@ msgid "Line Number:" msgstr "Linjenummer:" #: editor/code_editor.cpp -msgid "Replaced %d occurrence(s)." -msgstr "Erstattet %d forekomst(er)." +#, fuzzy +msgid "%d replaced." +msgstr "Erstatt..." #: editor/code_editor.cpp editor/editor_help.cpp #, fuzzy @@ -4195,6 +4196,10 @@ msgid "Saving..." msgstr "Lagrer..." #: editor/import_dock.cpp +msgid "%d Files" +msgstr "%d Filer" + +#: editor/import_dock.cpp msgid "Set as Default for '%s'" msgstr "Sett som Standard for '%s'" @@ -4203,10 +4208,6 @@ msgid "Clear Default for '%s'" msgstr "Fjern Standard for '%s'" #: editor/import_dock.cpp -msgid " Files" -msgstr " Filer" - -#: editor/import_dock.cpp msgid "Import As:" msgstr "Importer Som:" @@ -6221,11 +6222,12 @@ msgid "Mesh is empty!" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Trimesh Body" -msgstr "" +#, fuzzy +msgid "Couldn't create a Trimesh collision shape." +msgstr "Kunne ikke opprette mappe." #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Convex Body" +msgid "Create Static Trimesh Body" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -6237,12 +6239,30 @@ msgid "Create Trimesh Static Shape" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Failed creating shapes!" +msgid "Can't create a single convex collision shape for the scene root." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Couldn't create a single convex collision shape." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Single Convex Shape" +msgstr "Lag ny %s" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Can't create multiple convex collision shapes for the scene root." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp #, fuzzy -msgid "Create Convex Shape(s)" +msgid "Couldn't create any collision shapes." +msgstr "Kunne ikke opprette mappe." + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Multiple Convex Shapes" msgstr "Lag ny %s" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -6294,19 +6314,57 @@ msgid "Create Trimesh Static Body" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a StaticBody and assigns a polygon-based collision shape to it " +"automatically.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Trimesh Collision Sibling" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Single Convex Collision Siblings" +msgstr "Lag Poly" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a single convex collision shape.\n" +"This is the fastest (but least accurate) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp #, fuzzy -msgid "Create Convex Collision Sibling(s)" +msgid "Create Multiple Convex Collision Siblings" msgstr "Lag Poly" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is a performance middle-ground between the two above options." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Outline Mesh..." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a static outline mesh. The outline mesh will have its normals " +"flipped automatically.\n" +"This can be used instead of the SpatialMaterial Grow property when using " +"that property isn't possible." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp #, fuzzy msgid "View UV1" msgstr "Vis" @@ -8859,7 +8917,7 @@ msgstr "TileSet..." msgid "No VCS addons are available." msgstr "" -#: editor/plugins/version_control_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/version_control_editor_plugin.cpp msgid "Error" msgstr "" @@ -9997,11 +10055,18 @@ msgid "Export With Debug" msgstr "" #: editor/project_manager.cpp -msgid "The path does not exist." -msgstr "" +#, fuzzy +msgid "The path specified doesn't exist." +msgstr "Fil eksisterer ikke." + +#: editor/project_manager.cpp +#, fuzzy +msgid "Error opening package file (it's not in ZIP format)." +msgstr "Feil ved Ã¥pning av pakkefil, ikke i zip format." #: editor/project_manager.cpp -msgid "Invalid '.zip' project file, does not contain a 'project.godot' file." +msgid "" +"Invalid \".zip\" project file; it doesn't contain a \"project.godot\" file." msgstr "" #: editor/project_manager.cpp @@ -10009,11 +10074,11 @@ msgid "Please choose an empty folder." msgstr "" #: editor/project_manager.cpp -msgid "Please choose a 'project.godot' or '.zip' file." +msgid "Please choose a \"project.godot\" or \".zip\" file." msgstr "" #: editor/project_manager.cpp -msgid "Directory already contains a Godot project." +msgid "This directory already contains a Godot project." msgstr "" #: editor/project_manager.cpp @@ -10697,6 +10762,11 @@ msgstr "" #: editor/rename_dialog.cpp #, fuzzy +msgid "Use Regular Expressions" +msgstr "Gjeldende Versjon:" + +#: editor/rename_dialog.cpp +#, fuzzy msgid "Advanced Options" msgstr "Snapping innstillinger" @@ -10735,7 +10805,7 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -msgid "Per Level counter" +msgid "Per-level Counter" msgstr "" #: editor/rename_dialog.cpp @@ -10766,10 +10836,6 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -msgid "Regular Expressions" -msgstr "" - -#: editor/rename_dialog.cpp msgid "Post-Process" msgstr "" @@ -10778,11 +10844,11 @@ msgid "Keep" msgstr "" #: editor/rename_dialog.cpp -msgid "CamelCase to under_scored" +msgid "PascalCase to snake_case" msgstr "" #: editor/rename_dialog.cpp -msgid "under_scored to CamelCase" +msgid "snake_case to PascalCase" msgstr "" #: editor/rename_dialog.cpp @@ -10804,6 +10870,15 @@ msgstr "Store versaler" msgid "Reset" msgstr "Nullstill Zoom" +#: editor/rename_dialog.cpp +msgid "Regular Expression Error" +msgstr "" + +#: editor/rename_dialog.cpp +#, fuzzy +msgid "At character %s" +msgstr "Gyldige karakterer:" + #: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp msgid "Reparent Node" msgstr "" @@ -11278,7 +11353,7 @@ msgstr "Ugyldig indeks egenskap navn '%s' i node %s." #: editor/script_create_dialog.cpp #, fuzzy -msgid "Script is valid." +msgid "Script path/name is valid." msgstr "Animasjonstre er gyldig." #: editor/script_create_dialog.cpp @@ -11387,6 +11462,10 @@ msgid "Copy Error" msgstr "Last Errors" #: editor/script_editor_debugger.cpp +msgid "Video RAM" +msgstr "" + +#: editor/script_editor_debugger.cpp #, fuzzy msgid "Skip Breakpoints" msgstr "Slett punkter" @@ -11437,10 +11516,6 @@ msgid "Total:" msgstr "" #: editor/script_editor_debugger.cpp -msgid "Video Mem" -msgstr "" - -#: editor/script_editor_debugger.cpp msgid "Resource Path" msgstr "" @@ -13034,6 +13109,9 @@ msgstr "" msgid "Constants cannot be modified." msgstr "Konstanter kan ikke endres." +#~ msgid "Replaced %d occurrence(s)." +#~ msgstr "Erstattet %d forekomst(er)." + #~ msgid "" #~ "There are currently no tutorials for this class, you can [color=$color]" #~ "[url=$url]contribute one[/url][/color] or [color=$color][url=" diff --git a/editor/translations/nl.po b/editor/translations/nl.po index 39bca63def..cc5c2c978f 100644 --- a/editor/translations/nl.po +++ b/editor/translations/nl.po @@ -721,8 +721,9 @@ msgid "Line Number:" msgstr "Regelnummer:" #: editor/code_editor.cpp -msgid "Replaced %d occurrence(s)." -msgstr "%d voorgekomen waarde(s) vervangen." +#, fuzzy +msgid "%d replaced." +msgstr "Vervang..." #: editor/code_editor.cpp editor/editor_help.cpp msgid "%d match." @@ -3996,6 +3997,10 @@ msgid "Saving..." msgstr "Opslaan..." #: editor/import_dock.cpp +msgid "%d Files" +msgstr "%d Bestanden" + +#: editor/import_dock.cpp msgid "Set as Default for '%s'" msgstr "Stel in als Standaard voor '%s'" @@ -4004,10 +4009,6 @@ msgid "Clear Default for '%s'" msgstr "Wis Standaard voor '%s'" #: editor/import_dock.cpp -msgid " Files" -msgstr " Bestanden" - -#: editor/import_dock.cpp msgid "Import As:" msgstr "Importeer als:" @@ -5884,12 +5885,13 @@ msgid "Mesh is empty!" msgstr "Mesh is leeg!" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Trimesh Body" -msgstr "Creëer een statisch tri-mesh lichaam" +#, fuzzy +msgid "Couldn't create a Trimesh collision shape." +msgstr "Creëer Trimesh Botsing Broer" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Convex Body" -msgstr "Creëer een statisch convex lichaam" +msgid "Create Static Trimesh Body" +msgstr "Creëer een statisch tri-mesh lichaam" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "This doesn't work on scene root!" @@ -5900,11 +5902,30 @@ msgid "Create Trimesh Static Shape" msgstr "Creëer Trimesh Static Shape" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Failed creating shapes!" -msgstr "Shapes maken mislukt!" +msgid "Can't create a single convex collision shape for the scene root." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Couldn't create a single convex collision shape." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Single Convex Shape" +msgstr "Creëer Convex Shape(s)" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Can't create multiple convex collision shapes for the scene root." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Couldn't create any collision shapes." +msgstr "Kon map niet aanmaken." #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Convex Shape(s)" +#, fuzzy +msgid "Create Multiple Convex Shapes" msgstr "Creëer Convex Shape(s)" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -5956,18 +5977,57 @@ msgid "Create Trimesh Static Body" msgstr "Creëer Trimesh Statisch Lichaam" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a StaticBody and assigns a polygon-based collision shape to it " +"automatically.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Trimesh Collision Sibling" msgstr "Creëer Trimesh Botsing Broer" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Convex Collision Sibling(s)" +msgid "" +"Creates a polygon-based collision shape.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Single Convex Collision Siblings" msgstr "Creëer Convex Collision Sibling(s)" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a single convex collision shape.\n" +"This is the fastest (but least accurate) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Multiple Convex Collision Siblings" +msgstr "Creëer Convex Collision Sibling(s)" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is a performance middle-ground between the two above options." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Outline Mesh..." msgstr "Creëer Outline Mesh..." #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a static outline mesh. The outline mesh will have its normals " +"flipped automatically.\n" +"This can be used instead of the SpatialMaterial Grow property when using " +"that property isn't possible." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "View UV1" msgstr "Geef UV1 Weer" @@ -8380,7 +8440,7 @@ msgstr "TileSet" msgid "No VCS addons are available." msgstr "Geen VCS addons beschikbaar." -#: editor/plugins/version_control_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/version_control_editor_plugin.cpp msgid "Error" msgstr "Fout" @@ -9559,11 +9619,19 @@ msgid "Export With Debug" msgstr "Exporteer Met Debug" #: editor/project_manager.cpp -msgid "The path does not exist." +#, fuzzy +msgid "The path specified doesn't exist." msgstr "Dit pad bestaat niet." #: editor/project_manager.cpp -msgid "Invalid '.zip' project file, does not contain a 'project.godot' file." +#, fuzzy +msgid "Error opening package file (it's not in ZIP format)." +msgstr "Fout bij het openen van het pakketbestand, geen zip-formaat." + +#: editor/project_manager.cpp +#, fuzzy +msgid "" +"Invalid \".zip\" project file; it doesn't contain a \"project.godot\" file." msgstr "Ongeldig '.zip' projectbestand, bevat geen 'project.godot' bestand." #: editor/project_manager.cpp @@ -9571,11 +9639,13 @@ msgid "Please choose an empty folder." msgstr "Kies alstublieft een lege map." #: editor/project_manager.cpp -msgid "Please choose a 'project.godot' or '.zip' file." +#, fuzzy +msgid "Please choose a \"project.godot\" or \".zip\" file." msgstr "Kies alstublieft een 'project.godot' of '.zip' bestand." #: editor/project_manager.cpp -msgid "Directory already contains a Godot project." +#, fuzzy +msgid "This directory already contains a Godot project." msgstr "Map bevat al een Godot project." #: editor/project_manager.cpp @@ -10274,6 +10344,11 @@ msgid "Suffix" msgstr "Achtervoegsel" #: editor/rename_dialog.cpp +#, fuzzy +msgid "Use Regular Expressions" +msgstr "Reguliere Expressie" + +#: editor/rename_dialog.cpp msgid "Advanced Options" msgstr "Geavanceerde opties" @@ -10310,7 +10385,8 @@ msgstr "" "Vergelijk tellersopties." #: editor/rename_dialog.cpp -msgid "Per Level counter" +#, fuzzy +msgid "Per-level Counter" msgstr "Per Niveau teller" #: editor/rename_dialog.cpp @@ -10344,10 +10420,6 @@ msgstr "" "Missende cijfers worden met voorloopnullen opgevuld." #: editor/rename_dialog.cpp -msgid "Regular Expressions" -msgstr "Reguliere Expressie" - -#: editor/rename_dialog.cpp msgid "Post-Process" msgstr "Post-Process" @@ -10356,11 +10428,13 @@ msgid "Keep" msgstr "Houd" #: editor/rename_dialog.cpp -msgid "CamelCase to under_scored" +#, fuzzy +msgid "PascalCase to snake_case" msgstr "CamelCase naar under_scored" #: editor/rename_dialog.cpp -msgid "under_scored to CamelCase" +#, fuzzy +msgid "snake_case to PascalCase" msgstr "under_scored naar CamelCase" #: editor/rename_dialog.cpp @@ -10379,6 +10453,16 @@ msgstr "Naar hoofdletters" msgid "Reset" msgstr "Resetten" +#: editor/rename_dialog.cpp +#, fuzzy +msgid "Regular Expression Error" +msgstr "Reguliere Expressie" + +#: editor/rename_dialog.cpp +#, fuzzy +msgid "At character %s" +msgstr "Geldige karakters:" + #: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp msgid "Reparent Node" msgstr "Knoopouder wijzigen" @@ -10843,7 +10927,8 @@ msgid "Invalid inherited parent name or path." msgstr "Ongeldige overgenomen oudernaam of pad." #: editor/script_create_dialog.cpp -msgid "Script is valid." +#, fuzzy +msgid "Script path/name is valid." msgstr "Script is geldig." #: editor/script_create_dialog.cpp @@ -10935,6 +11020,11 @@ msgid "Copy Error" msgstr "Kopieer Fout" #: editor/script_editor_debugger.cpp +#, fuzzy +msgid "Video RAM" +msgstr "Videogeheugen" + +#: editor/script_editor_debugger.cpp msgid "Skip Breakpoints" msgstr "Breakpoint overslaan" @@ -10983,10 +11073,6 @@ msgid "Total:" msgstr "Totaal:" #: editor/script_editor_debugger.cpp -msgid "Video Mem" -msgstr "Videogeheugen" - -#: editor/script_editor_debugger.cpp msgid "Resource Path" msgstr "Bronpad" @@ -12673,6 +12759,15 @@ msgstr "Varyings kunnen alleen worden toegewezenin vertex functies." msgid "Constants cannot be modified." msgstr "Constanten kunnen niet worden aangepast." +#~ msgid "Replaced %d occurrence(s)." +#~ msgstr "%d voorgekomen waarde(s) vervangen." + +#~ msgid "Create Static Convex Body" +#~ msgstr "Creëer een statisch convex lichaam" + +#~ msgid "Failed creating shapes!" +#~ msgstr "Shapes maken mislukt!" + #~ msgid "" #~ "There are currently no tutorials for this class, you can [color=$color]" #~ "[url=$url]contribute one[/url][/color] or [color=$color][url=" diff --git a/editor/translations/or.po b/editor/translations/or.po index 5cddf8dee7..1e2acc1c86 100644 --- a/editor/translations/or.po +++ b/editor/translations/or.po @@ -665,7 +665,7 @@ msgid "Line Number:" msgstr "" #: editor/code_editor.cpp -msgid "Replaced %d occurrence(s)." +msgid "%d replaced." msgstr "" #: editor/code_editor.cpp editor/editor_help.cpp @@ -3801,15 +3801,15 @@ msgid "Saving..." msgstr "" #: editor/import_dock.cpp -msgid "Set as Default for '%s'" +msgid "%d Files" msgstr "" #: editor/import_dock.cpp -msgid "Clear Default for '%s'" +msgid "Set as Default for '%s'" msgstr "" #: editor/import_dock.cpp -msgid " Files" +msgid "Clear Default for '%s'" msgstr "" #: editor/import_dock.cpp @@ -5638,11 +5638,11 @@ msgid "Mesh is empty!" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Trimesh Body" +msgid "Couldn't create a Trimesh collision shape." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Convex Body" +msgid "Create Static Trimesh Body" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -5654,11 +5654,27 @@ msgid "Create Trimesh Static Shape" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Failed creating shapes!" +msgid "Can't create a single convex collision shape for the scene root." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Couldn't create a single convex collision shape." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Single Convex Shape" +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Can't create multiple convex collision shapes for the scene root." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Couldn't create any collision shapes." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Convex Shape(s)" +msgid "Create Multiple Convex Shapes" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -5710,11 +5726,40 @@ msgid "Create Trimesh Static Body" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a StaticBody and assigns a polygon-based collision shape to it " +"automatically.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Trimesh Collision Sibling" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Convex Collision Sibling(s)" +msgid "" +"Creates a polygon-based collision shape.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Single Convex Collision Siblings" +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a single convex collision shape.\n" +"This is the fastest (but least accurate) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Multiple Convex Collision Siblings" +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is a performance middle-ground between the two above options." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -5722,6 +5767,14 @@ msgid "Create Outline Mesh..." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a static outline mesh. The outline mesh will have its normals " +"flipped automatically.\n" +"This can be used instead of the SpatialMaterial Grow property when using " +"that property isn't possible." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "View UV1" msgstr "" @@ -8086,7 +8139,7 @@ msgstr "" msgid "No VCS addons are available." msgstr "" -#: editor/plugins/version_control_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/version_control_editor_plugin.cpp msgid "Error" msgstr "" @@ -9170,11 +9223,16 @@ msgid "Export With Debug" msgstr "" #: editor/project_manager.cpp -msgid "The path does not exist." +msgid "The path specified doesn't exist." +msgstr "" + +#: editor/project_manager.cpp +msgid "Error opening package file (it's not in ZIP format)." msgstr "" #: editor/project_manager.cpp -msgid "Invalid '.zip' project file, does not contain a 'project.godot' file." +msgid "" +"Invalid \".zip\" project file; it doesn't contain a \"project.godot\" file." msgstr "" #: editor/project_manager.cpp @@ -9182,11 +9240,11 @@ msgid "Please choose an empty folder." msgstr "" #: editor/project_manager.cpp -msgid "Please choose a 'project.godot' or '.zip' file." +msgid "Please choose a \"project.godot\" or \".zip\" file." msgstr "" #: editor/project_manager.cpp -msgid "Directory already contains a Godot project." +msgid "This directory already contains a Godot project." msgstr "" #: editor/project_manager.cpp @@ -9832,6 +9890,10 @@ msgid "Suffix" msgstr "" #: editor/rename_dialog.cpp +msgid "Use Regular Expressions" +msgstr "" + +#: editor/rename_dialog.cpp msgid "Advanced Options" msgstr "" @@ -9866,7 +9928,7 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -msgid "Per Level counter" +msgid "Per-level Counter" msgstr "" #: editor/rename_dialog.cpp @@ -9896,10 +9958,6 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -msgid "Regular Expressions" -msgstr "" - -#: editor/rename_dialog.cpp msgid "Post-Process" msgstr "" @@ -9908,11 +9966,11 @@ msgid "Keep" msgstr "" #: editor/rename_dialog.cpp -msgid "CamelCase to under_scored" +msgid "PascalCase to snake_case" msgstr "" #: editor/rename_dialog.cpp -msgid "under_scored to CamelCase" +msgid "snake_case to PascalCase" msgstr "" #: editor/rename_dialog.cpp @@ -9931,6 +9989,14 @@ msgstr "" msgid "Reset" msgstr "" +#: editor/rename_dialog.cpp +msgid "Regular Expression Error" +msgstr "" + +#: editor/rename_dialog.cpp +msgid "At character %s" +msgstr "" + #: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp msgid "Reparent Node" msgstr "" @@ -10370,7 +10436,7 @@ msgid "Invalid inherited parent name or path." msgstr "" #: editor/script_create_dialog.cpp -msgid "Script is valid." +msgid "Script path/name is valid." msgstr "" #: editor/script_create_dialog.cpp @@ -10462,6 +10528,10 @@ msgid "Copy Error" msgstr "" #: editor/script_editor_debugger.cpp +msgid "Video RAM" +msgstr "" + +#: editor/script_editor_debugger.cpp msgid "Skip Breakpoints" msgstr "" @@ -10510,10 +10580,6 @@ msgid "Total:" msgstr "" #: editor/script_editor_debugger.cpp -msgid "Video Mem" -msgstr "" - -#: editor/script_editor_debugger.cpp msgid "Resource Path" msgstr "" diff --git a/editor/translations/pl.po b/editor/translations/pl.po index e5e5e91d65..48c51e8ea1 100644 --- a/editor/translations/pl.po +++ b/editor/translations/pl.po @@ -42,7 +42,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2020-01-27 07:10+0000\n" +"PO-Revision-Date: 2020-02-18 15:09+0000\n" "Last-Translator: Tomek <kobewi4e@gmail.com>\n" "Language-Team: Polish <https://hosted.weblate.org/projects/godot-engine/" "godot/pl/>\n" @@ -52,7 +52,7 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " "|| n%100>=20) ? 1 : 2;\n" -"X-Generator: Weblate 3.11-dev\n" +"X-Generator: Weblate 3.11\n" #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/visual_script/visual_script_builtin_funcs.cpp @@ -721,8 +721,8 @@ msgid "Line Number:" msgstr "Numer linii:" #: editor/code_editor.cpp -msgid "Replaced %d occurrence(s)." -msgstr "ZastÄ…piono %d wystÄ…pieÅ„." +msgid "%d replaced." +msgstr "%d zamieniono." #: editor/code_editor.cpp editor/editor_help.cpp msgid "%d match." @@ -3980,6 +3980,11 @@ msgid "Saving..." msgstr "Zapisywanie..." #: editor/import_dock.cpp +#, fuzzy +msgid "%d Files" +msgstr " Pliki" + +#: editor/import_dock.cpp msgid "Set as Default for '%s'" msgstr "Ustaw jako domyÅ›lne dla \"%s\"" @@ -3988,10 +3993,6 @@ msgid "Clear Default for '%s'" msgstr "UsuÅ„ domyÅ›lne dla \"%s\"" #: editor/import_dock.cpp -msgid " Files" -msgstr " Pliki" - -#: editor/import_dock.cpp msgid "Import As:" msgstr "Importuj jako:" @@ -5868,12 +5869,12 @@ msgid "Mesh is empty!" msgstr "Siatka jest pusta!" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Trimesh Body" -msgstr "Stwórz Static Trimesh Body" +msgid "Couldn't create a Trimesh collision shape." +msgstr "Nie udaÅ‚o siÄ™ utworzyć ksztaÅ‚tu trójsiatki." #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Convex Body" -msgstr "Stwórz statycznych ciaÅ‚o wypukÅ‚e" +msgid "Create Static Trimesh Body" +msgstr "Stwórz Static Trimesh Body" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "This doesn't work on scene root!" @@ -5884,12 +5885,31 @@ msgid "Create Trimesh Static Shape" msgstr "Utwórz statyczny ksztaÅ‚t trójsiatki" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Failed creating shapes!" -msgstr "Tworzenie ksztaÅ‚tów nieudane!" +msgid "Can't create a single convex collision shape for the scene root." +msgstr "" +"Nie można utworzyć pojedynczego wypukÅ‚ego ksztaÅ‚tu kolizji dla korzenia " +"sceny." + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Couldn't create a single convex collision shape." +msgstr "Nie udaÅ‚o siÄ™ utworzyć pojedynczego wypukÅ‚ego ksztaÅ‚tu kolizji." + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Single Convex Shape" +msgstr "Utwórz pojedynczy wypukÅ‚y ksztaÅ‚t" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Can't create multiple convex collision shapes for the scene root." +msgstr "" +"Nie można utworzyć wielu wypukÅ‚ych ksztaÅ‚tów kolizji dla korzenia sceny." + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Couldn't create any collision shapes." +msgstr "Nie udaÅ‚o siÄ™ utworzyć żadnego ksztaÅ‚tu kolizji." #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Convex Shape(s)" -msgstr "Utwórz ksztaÅ‚t wypukÅ‚y" +msgid "Create Multiple Convex Shapes" +msgstr "Utwórz wiele wypukÅ‚ych ksztaÅ‚tów" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Navigation Mesh" @@ -5940,18 +5960,57 @@ msgid "Create Trimesh Static Body" msgstr "Utwórz statyczne ciaÅ‚o trójsiatki" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a StaticBody and assigns a polygon-based collision shape to it " +"automatically.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Trimesh Collision Sibling" msgstr "Utwórz sÄ…siadujÄ…cÄ… trójsiatkÄ™ kolizji" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Convex Collision Sibling(s)" +msgid "" +"Creates a polygon-based collision shape.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Single Convex Collision Siblings" +msgstr "Utwórz wypukÅ‚ego sÄ…siada kolizji" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a single convex collision shape.\n" +"This is the fastest (but least accurate) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Multiple Convex Collision Siblings" msgstr "Utwórz wypukÅ‚ego sÄ…siada kolizji" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is a performance middle-ground between the two above options." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Outline Mesh..." msgstr "Utwórz siatkÄ™ zarysu..." #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a static outline mesh. The outline mesh will have its normals " +"flipped automatically.\n" +"This can be used instead of the SpatialMaterial Grow property when using " +"that property isn't possible." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "View UV1" msgstr "Widok UV1" @@ -8360,7 +8419,7 @@ msgstr "TileSet" msgid "No VCS addons are available." msgstr "Brak dostÄ™pnych dodatków VCS." -#: editor/plugins/version_control_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/version_control_editor_plugin.cpp msgid "Error" msgstr "Błąd" @@ -9526,11 +9585,19 @@ msgid "Export With Debug" msgstr "Eksport z debugowaniem" #: editor/project_manager.cpp -msgid "The path does not exist." +#, fuzzy +msgid "The path specified doesn't exist." msgstr "Åšcieżka nie istnieje." #: editor/project_manager.cpp -msgid "Invalid '.zip' project file, does not contain a 'project.godot' file." +#, fuzzy +msgid "Error opening package file (it's not in ZIP format)." +msgstr "Błąd otwierania pliku pakietu, nie jest w formacie ZIP." + +#: editor/project_manager.cpp +#, fuzzy +msgid "" +"Invalid \".zip\" project file; it doesn't contain a \"project.godot\" file." msgstr "" "NiewÅ‚aÅ›ciwy projekt pliku \".zip\", nie zawiera pliku \"project.godot\"." @@ -9539,11 +9606,13 @@ msgid "Please choose an empty folder." msgstr "ProszÄ™ wybrać pusty folder." #: editor/project_manager.cpp -msgid "Please choose a 'project.godot' or '.zip' file." +#, fuzzy +msgid "Please choose a \"project.godot\" or \".zip\" file." msgstr "ProszÄ™ wybrać plik \"project.godot\" lub \".zip\"." #: editor/project_manager.cpp -msgid "Directory already contains a Godot project." +#, fuzzy +msgid "This directory already contains a Godot project." msgstr "Folder już zawiera projekt Godota." #: editor/project_manager.cpp @@ -10242,6 +10311,11 @@ msgid "Suffix" msgstr "Przyrostek" #: editor/rename_dialog.cpp +#, fuzzy +msgid "Use Regular Expressions" +msgstr "Wyrażenia regularne" + +#: editor/rename_dialog.cpp msgid "Advanced Options" msgstr "Opcje zaawansowane" @@ -10278,7 +10352,8 @@ msgstr "" "Porównaj opcje licznika." #: editor/rename_dialog.cpp -msgid "Per Level counter" +#, fuzzy +msgid "Per-level Counter" msgstr "Poziomowy licznik" #: editor/rename_dialog.cpp @@ -10310,10 +10385,6 @@ msgstr "" "BrakujÄ…ce cyfry sÄ… wyrównywane zerami poprzedzajÄ…cymi." #: editor/rename_dialog.cpp -msgid "Regular Expressions" -msgstr "Wyrażenia regularne" - -#: editor/rename_dialog.cpp msgid "Post-Process" msgstr "Przetwarzanie koÅ„cowe" @@ -10322,12 +10393,12 @@ msgid "Keep" msgstr "Bez zmian" #: editor/rename_dialog.cpp -msgid "CamelCase to under_scored" -msgstr "CamelCase na under_scored" +msgid "PascalCase to snake_case" +msgstr "PascalCase na snake_case" #: editor/rename_dialog.cpp -msgid "under_scored to CamelCase" -msgstr "under_scored na CamelCase" +msgid "snake_case to PascalCase" +msgstr "snake_case na PascalCase" #: editor/rename_dialog.cpp msgid "Case" @@ -10345,6 +10416,14 @@ msgstr "Na wielkie litery" msgid "Reset" msgstr "Resetuj" +#: editor/rename_dialog.cpp +msgid "Regular Expression Error" +msgstr "Błąd wyrażenia regularnego" + +#: editor/rename_dialog.cpp +msgid "At character %s" +msgstr "Przy znaku %s" + #: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp msgid "Reparent Node" msgstr "ZmieÅ„ nadrzÄ™dny wÄ™zeÅ‚" @@ -10808,8 +10887,8 @@ msgid "Invalid inherited parent name or path." msgstr "NieprawidÅ‚owa nazwa lub Å›cieżka klasy bazowej." #: editor/script_create_dialog.cpp -msgid "Script is valid." -msgstr "Skrypt jest prawidÅ‚owy." +msgid "Script path/name is valid." +msgstr "Åšcieżka/nazwa skryptu jest prawidÅ‚owa." #: editor/script_create_dialog.cpp msgid "Allowed: a-z, A-Z, 0-9, _ and ." @@ -10900,6 +10979,10 @@ msgid "Copy Error" msgstr "Kopiuj błąd" #: editor/script_editor_debugger.cpp +msgid "Video RAM" +msgstr "Wideo RAM" + +#: editor/script_editor_debugger.cpp msgid "Skip Breakpoints" msgstr "PomiÅ„ punkty wstrzymania" @@ -10948,10 +11031,6 @@ msgid "Total:" msgstr "CaÅ‚kowity:" #: editor/script_editor_debugger.cpp -msgid "Video Mem" -msgstr "Pamięć wideo" - -#: editor/script_editor_debugger.cpp msgid "Resource Path" msgstr "Åšcieżka zasobu" @@ -12636,6 +12715,15 @@ msgstr "Varying może być przypisane tylko w funkcji wierzchoÅ‚ków." msgid "Constants cannot be modified." msgstr "StaÅ‚e nie mogÄ… być modyfikowane." +#~ msgid "Replaced %d occurrence(s)." +#~ msgstr "ZastÄ…piono %d wystÄ…pieÅ„." + +#~ msgid "Create Static Convex Body" +#~ msgstr "Stwórz statycznych ciaÅ‚o wypukÅ‚e" + +#~ msgid "Failed creating shapes!" +#~ msgstr "Tworzenie ksztaÅ‚tów nieudane!" + #~ msgid "" #~ "There are currently no tutorials for this class, you can [color=$color]" #~ "[url=$url]contribute one[/url][/color] or [color=$color][url=" diff --git a/editor/translations/pr.po b/editor/translations/pr.po index e77bf47b81..2be9100ab8 100644 --- a/editor/translations/pr.po +++ b/editor/translations/pr.po @@ -698,7 +698,7 @@ msgid "Line Number:" msgstr "" #: editor/code_editor.cpp -msgid "Replaced %d occurrence(s)." +msgid "%d replaced." msgstr "" #: editor/code_editor.cpp editor/editor_help.cpp @@ -3927,15 +3927,16 @@ msgid "Saving..." msgstr "" #: editor/import_dock.cpp -msgid "Set as Default for '%s'" -msgstr "" +#, fuzzy +msgid "%d Files" +msgstr "Edit yer Variable:" #: editor/import_dock.cpp -msgid "Clear Default for '%s'" +msgid "Set as Default for '%s'" msgstr "" #: editor/import_dock.cpp -msgid " Files" +msgid "Clear Default for '%s'" msgstr "" #: editor/import_dock.cpp @@ -5826,11 +5827,11 @@ msgid "Mesh is empty!" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Trimesh Body" +msgid "Couldn't create a Trimesh collision shape." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Convex Body" +msgid "Create Static Trimesh Body" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -5842,11 +5843,27 @@ msgid "Create Trimesh Static Shape" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Failed creating shapes!" +msgid "Can't create a single convex collision shape for the scene root." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Couldn't create a single convex collision shape." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Single Convex Shape" +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Can't create multiple convex collision shapes for the scene root." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Convex Shape(s)" +msgid "Couldn't create any collision shapes." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Multiple Convex Shapes" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -5898,19 +5915,57 @@ msgid "Create Trimesh Static Body" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a StaticBody and assigns a polygon-based collision shape to it " +"automatically.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Trimesh Collision Sibling" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp #, fuzzy -msgid "Create Convex Collision Sibling(s)" +msgid "Create Single Convex Collision Siblings" msgstr "Yar, Blow th' Selected Down!" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a single convex collision shape.\n" +"This is the fastest (but least accurate) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Multiple Convex Collision Siblings" +msgstr "Yar, Blow th' Selected Down!" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is a performance middle-ground between the two above options." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Outline Mesh..." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a static outline mesh. The outline mesh will have its normals " +"flipped automatically.\n" +"This can be used instead of the SpatialMaterial Grow property when using " +"that property isn't possible." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "View UV1" msgstr "" @@ -8377,7 +8432,7 @@ msgstr "" msgid "No VCS addons are available." msgstr "" -#: editor/plugins/version_control_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/version_control_editor_plugin.cpp msgid "Error" msgstr "" @@ -9486,11 +9541,16 @@ msgid "Export With Debug" msgstr "" #: editor/project_manager.cpp -msgid "The path does not exist." +msgid "The path specified doesn't exist." msgstr "" #: editor/project_manager.cpp -msgid "Invalid '.zip' project file, does not contain a 'project.godot' file." +msgid "Error opening package file (it's not in ZIP format)." +msgstr "" + +#: editor/project_manager.cpp +msgid "" +"Invalid \".zip\" project file; it doesn't contain a \"project.godot\" file." msgstr "" #: editor/project_manager.cpp @@ -9498,11 +9558,11 @@ msgid "Please choose an empty folder." msgstr "" #: editor/project_manager.cpp -msgid "Please choose a 'project.godot' or '.zip' file." +msgid "Please choose a \"project.godot\" or \".zip\" file." msgstr "" #: editor/project_manager.cpp -msgid "Directory already contains a Godot project." +msgid "This directory already contains a Godot project." msgstr "" #: editor/project_manager.cpp @@ -10160,6 +10220,11 @@ msgid "Suffix" msgstr "" #: editor/rename_dialog.cpp +#, fuzzy +msgid "Use Regular Expressions" +msgstr "Swap yer Expression" + +#: editor/rename_dialog.cpp msgid "Advanced Options" msgstr "" @@ -10195,7 +10260,7 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -msgid "Per Level counter" +msgid "Per-level Counter" msgstr "" #: editor/rename_dialog.cpp @@ -10225,11 +10290,6 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -#, fuzzy -msgid "Regular Expressions" -msgstr "Swap yer Expression" - -#: editor/rename_dialog.cpp msgid "Post-Process" msgstr "" @@ -10238,11 +10298,11 @@ msgid "Keep" msgstr "" #: editor/rename_dialog.cpp -msgid "CamelCase to under_scored" +msgid "PascalCase to snake_case" msgstr "" #: editor/rename_dialog.cpp -msgid "under_scored to CamelCase" +msgid "snake_case to PascalCase" msgstr "" #: editor/rename_dialog.cpp @@ -10261,6 +10321,15 @@ msgstr "" msgid "Reset" msgstr "" +#: editor/rename_dialog.cpp +#, fuzzy +msgid "Regular Expression Error" +msgstr "Swap yer Expression" + +#: editor/rename_dialog.cpp +msgid "At character %s" +msgstr "" + #: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp msgid "Reparent Node" msgstr "" @@ -10718,7 +10787,7 @@ msgid "Invalid inherited parent name or path." msgstr "Yer index property name be thrown overboard!" #: editor/script_create_dialog.cpp -msgid "Script is valid." +msgid "Script path/name is valid." msgstr "" #: editor/script_create_dialog.cpp @@ -10819,6 +10888,10 @@ msgid "Copy Error" msgstr "Slit th' Node" #: editor/script_editor_debugger.cpp +msgid "Video RAM" +msgstr "" + +#: editor/script_editor_debugger.cpp #, fuzzy msgid "Skip Breakpoints" msgstr "Yar, Blow th' Selected Down!" @@ -10869,10 +10942,6 @@ msgid "Total:" msgstr "" #: editor/script_editor_debugger.cpp -msgid "Video Mem" -msgstr "" - -#: editor/script_editor_debugger.cpp msgid "Resource Path" msgstr "" diff --git a/editor/translations/pt_BR.po b/editor/translations/pt_BR.po index a7d921b78e..8fc0ef4f39 100644 --- a/editor/translations/pt_BR.po +++ b/editor/translations/pt_BR.po @@ -48,7 +48,7 @@ # joel silva <joelgbsilva@gmail.com>, 2019. # Heitor Novais Pereira <heitornovais394@outlook.com>, 2019. # Joel Landgraf Filho <joel.landgraf@gmail.com>, 2019. -# Alan Valmorbida <alanvalmorbida@gmail.com>, 2019. +# Alan Valmorbida <alanvalmorbida@gmail.com>, 2019, 2020. # João Vitor Ferreira Cavalcante <jvfecav@gmail.com>, 2019. # Thiago Amendola <amendolathiago@gmail.com>, 2019. # Raphael Nogueira Campos <raphaelncampos@gmail.com>, 2019. @@ -61,12 +61,12 @@ # Ivo Nascimento <iannsp@gmail.com>, 2019. # Klaus Dellano <klausdell@hotmail.com>, 2019. # Esdras Tarsis <esdrastarsis@gmail.com>, 2019. -# Douglas Fiedler <dognew@gmail.com>, 2019. +# Douglas Fiedler <dognew@gmail.com>, 2019, 2020. # Rarysson Guilherme <r_guilherme12@hotmail.com>, 2019. # Gustavo da Silva Santos <gustavo94.rb@gmail.com>, 2019. # Rafael Roque <rafael.roquec@gmail.com>, 2019. # José Victor Dias Rodrigues <zoldyakopersonal@gmail.com>, 2019. -# Fupi Brazil <fupicat@gmail.com>, 2019. +# Fupi Brazil <fupicat@gmail.com>, 2019, 2020. # Julio Pinto Coelho <juliopcrj@gmail.com>, 2019. # Perrottacooking <perrottacooking@gmail.com>, 2019. # Wow Bitch <hahaj@itmailr.com>, 2019. @@ -80,12 +80,14 @@ # sribgui <sribgui@gmail.com>, 2020. # patrickvob <patrickvob@gmail.com>, 2020. # Michael Leocádio <aeronmike@gmail.com>, 2020. +# Z <rainromes@gmail.com>, 2020. +# Leonardo Dimano <leodimano@live.com>, 2020. msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: 2016-05-30\n" -"PO-Revision-Date: 2020-01-27 07:10+0000\n" -"Last-Translator: Michael Leocádio <aeronmike@gmail.com>\n" +"PO-Revision-Date: 2020-02-18 15:09+0000\n" +"Last-Translator: Douglas Fiedler <dognew@gmail.com>\n" "Language-Team: Portuguese (Brazil) <https://hosted.weblate.org/projects/" "godot-engine/godot/pt_BR/>\n" "Language: pt_BR\n" @@ -93,16 +95,16 @@ 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 3.11-dev\n" +"X-Generator: Weblate 3.11\n" #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/visual_script/visual_script_builtin_funcs.cpp msgid "Invalid type argument to convert(), use TYPE_* constants." -msgstr "Argumento de tipo inválido para convert(), use constantes TYPE_*." +msgstr "Argumento de tipo inválido para converter(), use TYPE_* constantes." #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp msgid "Expected a string of length 1 (a character)." -msgstr "Esperado string de comprimento 1 (a caractere)." +msgstr "Esperado uma string de comprimento 1 (um caractere)." #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/mono/glue/gd_glue.cpp @@ -346,7 +348,7 @@ msgstr "Tempo (s): " #: editor/animation_track_editor.cpp msgid "Toggle Track Enabled" -msgstr "Habilitar/Desabilitar Trilha" +msgstr "Habilitar Trilha" #: editor/animation_track_editor.cpp msgid "Continuous" @@ -761,8 +763,8 @@ msgid "Line Number:" msgstr "Número da Linha:" #: editor/code_editor.cpp -msgid "Replaced %d occurrence(s)." -msgstr "%d ocorrência(s) substituÃda(s)." +msgid "%d replaced." +msgstr "%d substituÃdo." #: editor/code_editor.cpp editor/editor_help.cpp msgid "%d match." @@ -4033,6 +4035,10 @@ msgid "Saving..." msgstr "Salvando..." #: editor/import_dock.cpp +msgid "%d Files" +msgstr "%d Arquivos" + +#: editor/import_dock.cpp msgid "Set as Default for '%s'" msgstr "Definir como Padrão para '%s'" @@ -4041,10 +4047,6 @@ msgid "Clear Default for '%s'" msgstr "Limpar Padrão para '%s'" #: editor/import_dock.cpp -msgid " Files" -msgstr " Arquivos" - -#: editor/import_dock.cpp msgid "Import As:" msgstr "Importar como:" @@ -5924,12 +5926,12 @@ msgid "Mesh is empty!" msgstr "Mesh está vazia!" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Trimesh Body" -msgstr "Criar Corpo Trimesh Estático" +msgid "Couldn't create a Trimesh collision shape." +msgstr "Não foi possÃvel criar uma forma de colisão Trimesh." #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Convex Body" -msgstr "Criar Corpo Convexo Estático" +msgid "Create Static Trimesh Body" +msgstr "Criar Corpo Trimesh Estático" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "This doesn't work on scene root!" @@ -5940,12 +5942,28 @@ msgid "Create Trimesh Static Shape" msgstr "Criar Forma Estática Trimesh" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Failed creating shapes!" -msgstr "Falha ao criar formas!" +msgid "Can't create a single convex collision shape for the scene root." +msgstr "Não foi possÃvel criar forma de colisão convexa para a cena raiz." #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Convex Shape(s)" -msgstr "Criar Forma(s) Convexa(s)" +msgid "Couldn't create a single convex collision shape." +msgstr "Não foi possÃvel criar uma forma de colisão convexa simples." + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Single Convex Shape" +msgstr "Criar Forma(s) Convexa(s) Simples" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Can't create multiple convex collision shapes for the scene root." +msgstr "Não foi possÃvel criar uma forma de colisão convexa para a cena raiz." + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Couldn't create any collision shapes." +msgstr "Não foi possÃvel criar nenhuma forma de colisão." + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Multiple Convex Shapes" +msgstr "Criar Múltiplas Forma(s) Convexa(s)" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Navigation Mesh" @@ -5996,18 +6014,68 @@ msgid "Create Trimesh Static Body" msgstr "Criar Corpo Trimesh Estático" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a StaticBody and assigns a polygon-based collision shape to it " +"automatically.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" +"Criar um Staticbody e atribuir uma forma de colisão baseado em polÃgono para " +"isto automaticamente.\n" +"Esta é a opção mais precisa (mas lenta) para detecção de colisão." + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Trimesh Collision Sibling" msgstr "Criar Colisão Trimesh Irmã" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Convex Collision Sibling(s)" -msgstr "Criar Colisão Convexa Irmã(s)" +msgid "" +"Creates a polygon-based collision shape.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" +"Criar uma forma de colisão baseada em polÃgono.\n" +"Este é a opção mais precisa (mas lenta) para detecção de colisão." + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Single Convex Collision Siblings" +msgstr "Criar Simples Colisão Convexa Irmã(s)" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a single convex collision shape.\n" +"This is the fastest (but least accurate) option for collision detection." +msgstr "" +"Criar uma simples forma convexa de colisão.\n" +"Esta é a opção mais rápida (mas menos precisa) para detecção de colisão." + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Multiple Convex Collision Siblings" +msgstr "Criar Múltipla Colisão Convexa Irmã(s)" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is a performance middle-ground between the two above options." +msgstr "" +"Cria um polÃgono base de colisão forma.\n" +"Este é um meio-termo entre as duas opções acima." #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Outline Mesh..." msgstr "Criar Malha de Contorno..." #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a static outline mesh. The outline mesh will have its normals " +"flipped automatically.\n" +"This can be used instead of the SpatialMaterial Grow property when using " +"that property isn't possible." +msgstr "" +"Cria uma malha de contorno estática. A malha de contorno pode ter suas " +"normals viradas automaticamente.\n" +"Isso pode ser usado em vez da propriedade SpatialMaterial Grow quando o uso " +"dessa propriedade não for possÃvel." + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "View UV1" msgstr "Visualizar UV1" @@ -8417,7 +8485,7 @@ msgstr "Conjunto de Telha" msgid "No VCS addons are available." msgstr "Nenhum complemento VCS está disponÃvel." -#: editor/plugins/version_control_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/version_control_editor_plugin.cpp msgid "Error" msgstr "Erro" @@ -9583,24 +9651,28 @@ msgid "Export With Debug" msgstr "Exportar Com Depuração" #: editor/project_manager.cpp -msgid "The path does not exist." -msgstr "O caminho não existe." +msgid "The path specified doesn't exist." +msgstr "O caminho especificado não existe." #: editor/project_manager.cpp -msgid "Invalid '.zip' project file, does not contain a 'project.godot' file." -msgstr "" -"Projeto '.zip' inválido, o projeto não contém um arquivo 'project.godot'." +msgid "Error opening package file (it's not in ZIP format)." +msgstr "Erro ao abrir arquivo compactado (não está em formato ZIP)." + +#: editor/project_manager.cpp +msgid "" +"Invalid \".zip\" project file; it doesn't contain a \"project.godot\" file." +msgstr "Projeto '.zip' inválido; não contém um arquivo 'project.godot'." #: editor/project_manager.cpp msgid "Please choose an empty folder." msgstr "Por favor, escolha uma pasta vazia." #: editor/project_manager.cpp -msgid "Please choose a 'project.godot' or '.zip' file." -msgstr "Por favor, escolha um arquivo 'project.godot' ou '.zip'." +msgid "Please choose a \"project.godot\" or \".zip\" file." +msgstr "Por favor, escolha um arquivo 'project.godot' ou arquivo '.zip'." #: editor/project_manager.cpp -msgid "Directory already contains a Godot project." +msgid "This directory already contains a Godot project." msgstr "O diretório já contém um projeto Godot." #: editor/project_manager.cpp @@ -10224,7 +10296,7 @@ msgstr "Idiomas:" #: editor/project_settings_editor.cpp msgid "AutoLoad" -msgstr "Carregamento Automático" +msgstr "O AutoLoad" #: editor/project_settings_editor.cpp msgid "Plugins" @@ -10299,6 +10371,10 @@ msgid "Suffix" msgstr "Sufixo" #: editor/rename_dialog.cpp +msgid "Use Regular Expressions" +msgstr "Utilize Expressões Regulares" + +#: editor/rename_dialog.cpp msgid "Advanced Options" msgstr "Opções Avançadas" @@ -10335,7 +10411,7 @@ msgstr "" "Compare as opções do contador." #: editor/rename_dialog.cpp -msgid "Per Level counter" +msgid "Per-level Counter" msgstr "Contador de nÃvel" #: editor/rename_dialog.cpp @@ -10367,10 +10443,6 @@ msgstr "" "Os dÃgitos ausentes são preenchidos com zeros à esquerda." #: editor/rename_dialog.cpp -msgid "Regular Expressions" -msgstr "Expressões regulares" - -#: editor/rename_dialog.cpp msgid "Post-Process" msgstr "Pós-Processamento" @@ -10379,12 +10451,12 @@ msgid "Keep" msgstr "Manter" #: editor/rename_dialog.cpp -msgid "CamelCase to under_scored" -msgstr "CamelCase para under_scored" +msgid "PascalCase to snake_case" +msgstr "PascalCase para snake_case" #: editor/rename_dialog.cpp -msgid "under_scored to CamelCase" -msgstr "under_scored para CamelCase" +msgid "snake_case to PascalCase" +msgstr "snake_case para PascalCase" #: editor/rename_dialog.cpp msgid "Case" @@ -10402,6 +10474,14 @@ msgstr "Para Maiúscula" msgid "Reset" msgstr "Recompor" +#: editor/rename_dialog.cpp +msgid "Regular Expression Error" +msgstr "Erro de Expressão Regular" + +#: editor/rename_dialog.cpp +msgid "At character %s" +msgstr "Para caractere %s" + #: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp msgid "Reparent Node" msgstr "Reparentar Nó" @@ -10865,8 +10945,8 @@ msgid "Invalid inherited parent name or path." msgstr "Nome ou caminho do pai herdado inválido." #: editor/script_create_dialog.cpp -msgid "Script is valid." -msgstr "Script válido." +msgid "Script path/name is valid." +msgstr "O caminho/nome do script é válido." #: editor/script_create_dialog.cpp msgid "Allowed: a-z, A-Z, 0-9, _ and ." @@ -10957,6 +11037,10 @@ msgid "Copy Error" msgstr "Copiar Erro" #: editor/script_editor_debugger.cpp +msgid "Video RAM" +msgstr "Memória de VÃdeo" + +#: editor/script_editor_debugger.cpp msgid "Skip Breakpoints" msgstr "Pular Breakpoints" @@ -11005,10 +11089,6 @@ msgid "Total:" msgstr "Total:" #: editor/script_editor_debugger.cpp -msgid "Video Mem" -msgstr "Mem. de VÃdeo" - -#: editor/script_editor_debugger.cpp msgid "Resource Path" msgstr "Caminho do Recurso" @@ -12693,6 +12773,15 @@ msgstr "Variáveis só podem ser atribuÃdas na função de vértice." msgid "Constants cannot be modified." msgstr "Constantes não podem serem modificadas." +#~ msgid "Replaced %d occurrence(s)." +#~ msgstr "%d ocorrência(s) substituÃda(s)." + +#~ msgid "Create Static Convex Body" +#~ msgstr "Criar Corpo Convexo Estático" + +#~ msgid "Failed creating shapes!" +#~ msgstr "Falha ao criar formas!" + #~ msgid "" #~ "There are currently no tutorials for this class, you can [color=$color]" #~ "[url=$url]contribute one[/url][/color] or [color=$color][url=" diff --git a/editor/translations/pt_PT.po b/editor/translations/pt_PT.po index d293860dec..6bd8da8610 100644 --- a/editor/translations/pt_PT.po +++ b/editor/translations/pt_PT.po @@ -19,7 +19,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2020-01-27 07:10+0000\n" +"PO-Revision-Date: 2020-02-18 15:09+0000\n" "Last-Translator: João Lopes <linux-man@hotmail.com>\n" "Language-Team: Portuguese (Portugal) <https://hosted.weblate.org/projects/" "godot-engine/godot/pt_PT/>\n" @@ -28,7 +28,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 3.11-dev\n" +"X-Generator: Weblate 3.11\n" #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/visual_script/visual_script_builtin_funcs.cpp @@ -37,7 +37,7 @@ msgstr "Tipo de argumento inválido para convert(), use constantes TYPE_*." #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp msgid "Expected a string of length 1 (a character)." -msgstr "Esperado um string de comprimento 1 (um caráter)." +msgstr "Esperado um string de comprimento 1 (um carácter)." #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/mono/glue/gd_glue.cpp @@ -428,7 +428,7 @@ msgstr "" #: editor/animation_track_editor.cpp msgid "Not possible to add a new track without a root" -msgstr "Não é possÃvel adicionar nova pista sem uma raÃz" +msgstr "Não é possÃvel adicionar nova pista sem uma raiz" #: editor/animation_track_editor.cpp msgid "Invalid track for Bezier (no suitable sub-properties)" @@ -444,7 +444,7 @@ msgstr "Caminho da pista é inválido, não se consegue adicionar uma chave." #: editor/animation_track_editor.cpp msgid "Track is not of type Spatial, can't insert key" -msgstr "Pista não do tipo Spatial, impossÃvel inserir chave" +msgstr "Pista não é do tipo Spatial, não consigo inserir chave" #: editor/animation_track_editor.cpp msgid "Add Transform Track Key" @@ -456,7 +456,7 @@ msgstr "Adicionar Chave da Pista" #: editor/animation_track_editor.cpp msgid "Track path is invalid, so can't add a method key." -msgstr "Caminho da pista é inválido, impossÃvel adicionar uma chave método." +msgstr "Caminho da pista é inválido, não consigo adicionar uma chave método." #: editor/animation_track_editor.cpp msgid "Add Method Track Key" @@ -698,8 +698,8 @@ msgid "Line Number:" msgstr "Numero da linha:" #: editor/code_editor.cpp -msgid "Replaced %d occurrence(s)." -msgstr "SubstituÃdo %d ocorrência(s)." +msgid "%d replaced." +msgstr "%d substituÃdo." #: editor/code_editor.cpp editor/editor_help.cpp msgid "%d match." @@ -764,7 +764,7 @@ msgstr "Números de Linha e Coluna." #: editor/connections_dialog.cpp msgid "Method in target node must be specified." -msgstr "Método no Nó alvo deve ser especificado." +msgstr "Método no nó alvo deve ser especificado." #: editor/connections_dialog.cpp msgid "" @@ -772,7 +772,7 @@ msgid "" "target node." msgstr "" "Método alvo não encontrado. Especifique um método válido ou anexe um script " -"ao Nó de destino." +"ao nó de destino." #: editor/connections_dialog.cpp msgid "Connect to Node:" @@ -788,7 +788,7 @@ msgstr "Do Sinal:" #: editor/connections_dialog.cpp msgid "Scene does not contain any script." -msgstr "A Cena não contém qualquer script." +msgstr "A cena não contém qualquer script." #: editor/connections_dialog.cpp editor/editor_autoload_settings.cpp #: editor/groups_editor.cpp editor/plugins/item_list_editor_plugin.cpp @@ -844,7 +844,7 @@ msgstr "Desconecta o sinal após a primeira emissão." #: editor/connections_dialog.cpp msgid "Cannot connect signal" -msgstr "ImpossÃvel conectar sinal" +msgstr "Não consigo conectar sinal" #: editor/connections_dialog.cpp editor/dependency_editor.cpp #: editor/export_template_manager.cpp editor/groups_editor.cpp @@ -976,7 +976,7 @@ msgid "" "Scene '%s' is currently being edited.\n" "Changes will only take effect when reloaded." msgstr "" -"A Cena '%s' está a ser editada.\n" +"A cena '%s' está a ser editada.\n" "As alterações só terão efeito quando recarregar." #: editor/dependency_editor.cpp @@ -1047,7 +1047,7 @@ msgstr "" #: editor/dependency_editor.cpp msgid "Cannot remove:" -msgstr "ImpossÃvel remover:" +msgstr "Não consigo remover:" #: editor/dependency_editor.cpp msgid "Error loading:" @@ -1207,7 +1207,7 @@ msgstr "%s (Já Existe)" #: editor/editor_asset_installer.cpp msgid "Uncompressing Assets" -msgstr "A descompactar Ativos" +msgstr "A Descomprimir Ativos" #: editor/editor_asset_installer.cpp editor/project_manager.cpp msgid "The following files failed extraction from package:" @@ -1415,7 +1415,7 @@ msgstr "Nome inválido." #: editor/editor_autoload_settings.cpp msgid "Valid characters:" -msgstr "Carateres válidos:" +msgstr "Caracteres válidos:" #: editor/editor_autoload_settings.cpp msgid "Must not collide with an existing engine class name." @@ -1501,7 +1501,7 @@ msgstr "Instância única" #: editor/editor_data.cpp msgid "Updating Scene" -msgstr "Atualizando a Cena" +msgstr "A atualizar Cena" #: editor/editor_data.cpp msgid "Storing local changes..." @@ -1509,7 +1509,7 @@ msgstr "Armazenando alterações locais..." #: editor/editor_data.cpp msgid "Updating scene..." -msgstr "Atualizando a Cena..." +msgstr "A atualizar cena..." #: editor/editor_data.cpp editor/editor_properties.cpp msgid "[empty]" @@ -1543,7 +1543,7 @@ msgstr "Nome:" #: editor/editor_dir_dialog.cpp editor/editor_file_dialog.cpp #: editor/filesystem_dock.cpp scene/gui/file_dialog.cpp msgid "Could not create folder." -msgstr "Não foi possÃvel criar pasta." +msgstr "Não consegui criar pasta." #: editor/editor_dir_dialog.cpp msgid "Choose" @@ -1632,7 +1632,7 @@ msgstr "Importar Doca" #: editor/editor_feature_profile.cpp msgid "Node Dock" -msgstr "Nó Doca" +msgstr "Doca de Nó" #: editor/editor_feature_profile.cpp msgid "FileSystem and Import Docks" @@ -2184,7 +2184,7 @@ msgstr "Guardar Recurso Como..." #: editor/editor_node.cpp msgid "Can't open file for writing:" -msgstr "ImpossÃvel abrir o Ficheiro para escrita:" +msgstr "Não consigo abrir o ficheiro para escrita:" #: editor/editor_node.cpp msgid "Requested file format unknown:" @@ -2196,7 +2196,7 @@ msgstr "Erro ao guardar." #: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp msgid "Can't open '%s'. The file could have been moved or deleted." -msgstr "ImpossÃvel abrir '%s'. O ficheiro pode ter sido movido ou apagado." +msgstr "Não consigo abrir '%s'. O ficheiro pode ter sido movido ou apagado." #: editor/editor_node.cpp msgid "Error while parsing '%s'." @@ -2216,7 +2216,7 @@ msgstr "Erro ao carregar '%s'." #: editor/editor_node.cpp msgid "Saving Scene" -msgstr "A guardar a Cena" +msgstr "A guardar Cena" #: editor/editor_node.cpp msgid "Analyzing" @@ -2244,7 +2244,7 @@ msgid "" "Couldn't save scene. Likely dependencies (instances or inheritance) couldn't " "be satisfied." msgstr "" -"ImpossÃvel guardar Cena. Provavelmente, as dependências (instâncias ou " +"Não consigo guardar cena. Provavelmente, as dependências (instâncias ou " "heranças) não puderam ser satisfeitas." #: editor/editor_node.cpp editor/scene_tree_dock.cpp @@ -2253,7 +2253,7 @@ msgstr "Não se consegue sobrescrever cena ainda aberta!" #: editor/editor_node.cpp msgid "Can't load MeshLibrary for merging!" -msgstr "ImpossÃvel carregar MeshLibrary para fundir!" +msgstr "Não consigo carregar MeshLibrary para combinar!" #: editor/editor_node.cpp msgid "Error saving MeshLibrary!" @@ -2261,7 +2261,7 @@ msgstr "Erro ao guardar MeshLibrary!" #: editor/editor_node.cpp msgid "Can't load TileSet for merging!" -msgstr "ImpossÃvel carregar TileSet para fundir!" +msgstr "Não consigo carregar TileSet para combinar!" #: editor/editor_node.cpp msgid "Error saving TileSet!" @@ -2289,9 +2289,8 @@ msgid "" "Please read the documentation relevant to importing scenes to better " "understand this workflow." msgstr "" -"Este recurso pertence a uma Cena que foi importado, portanto, não é " -"editável.\n" -"Por favor, leia a documentação relevante sobre importação de Cenas, para um " +"Este recurso pertence a uma cena que foi importado, não sendo editável.\n" +"Por favor, leia a documentação relevante sobre importação de cenas, para um " "melhor entendimento deste fluxo de trabalho." #: editor/editor_node.cpp @@ -2336,15 +2335,15 @@ msgstr "" #: editor/editor_node.cpp msgid "There is no defined scene to run." -msgstr "Não existe nenhuma Cena definida para executar." +msgstr "Não existe cena definida para execução." #: editor/editor_node.cpp msgid "Current scene was never saved, please save it prior to running." -msgstr "A Cena atual nunca foi guardada, por favor guarde-a antes de executar." +msgstr "A cena atual nunca foi guardada, por favor guarde-a antes de executar." #: editor/editor_node.cpp msgid "Could not start subprocess!" -msgstr "Não foi possÃvel iniciar o subprocesso!" +msgstr "Não consegui iniciar o subprocesso!" #: editor/editor_node.cpp editor/filesystem_dock.cpp msgid "Open Scene" @@ -2360,7 +2359,7 @@ msgstr "Abertura rápida..." #: editor/editor_node.cpp msgid "Quick Open Scene..." -msgstr "Abrir Cena de forma rápida..." +msgstr "Abrir Cena Rapidamente..." #: editor/editor_node.cpp msgid "Quick Open Script..." @@ -2380,11 +2379,11 @@ msgstr "Guardado(s) %s recurso(s) modificado(s)." #: editor/editor_node.cpp msgid "A root node is required to save the scene." -msgstr "É necessário um Nó Raiz para guardar a cena." +msgstr "É necessário um nó raiz para guardar a cena." #: editor/editor_node.cpp msgid "Save Scene As..." -msgstr "Guardar Cena como..." +msgstr "Guardar Cena Como..." #: editor/editor_node.cpp msgid "No" @@ -2396,11 +2395,11 @@ msgstr "Sim" #: editor/editor_node.cpp msgid "This scene has never been saved. Save before running?" -msgstr "Esta Cena nunca foi guardada. Guardar antes de executar?" +msgstr "Esta cena nunca foi guardada. Guardar antes de executar?" #: editor/editor_node.cpp editor/scene_tree_dock.cpp msgid "This operation can't be done without a scene." -msgstr "Esta operação não pode ser efetuada sem uma Cena." +msgstr "Esta operação não pode ser efetuada sem uma cena." #: editor/editor_node.cpp msgid "Export Mesh Library" @@ -2408,7 +2407,7 @@ msgstr "Exportar Biblioteca de Malhas" #: editor/editor_node.cpp msgid "This operation can't be done without a root node." -msgstr "Esta operação não pode ser efetuada sem um Nó raiz." +msgstr "Esta operação não pode ser efetuada sem um nó raiz." #: editor/editor_node.cpp msgid "Export Tile Set" @@ -2416,15 +2415,15 @@ msgstr "Exportar conjunto de Tiles" #: editor/editor_node.cpp msgid "This operation can't be done without a selected node." -msgstr "Esta operação não pode ser efetuada sem um Nó selecionado." +msgstr "Esta operação não pode ser efetuada sem um nó selecionado." #: editor/editor_node.cpp msgid "Current scene not saved. Open anyway?" -msgstr "A Cena atual não foi guardada. Abrir na mesma?" +msgstr "A cena atual não foi guardada. Abrir na mesma?" #: editor/editor_node.cpp msgid "Can't reload a scene that was never saved." -msgstr "ImpossÃvel recarregar uma Cena que nunca foi guardada." +msgstr "Não consigo recarregar uma cena que nunca foi guardada." #: editor/editor_node.cpp msgid "Revert" @@ -2436,7 +2435,7 @@ msgstr "Esta acção não pode ser desfeita. Reverter na mesma?" #: editor/editor_node.cpp msgid "Quick Run Scene..." -msgstr "Executar Cena de forma rápida..." +msgstr "Executar Cena Rapidamente..." #: editor/editor_node.cpp msgid "Quit" @@ -2456,12 +2455,12 @@ msgstr "Guardar & Sair" #: editor/editor_node.cpp msgid "Save changes to the following scene(s) before quitting?" -msgstr "Guardar alterações da(s) seguinte(s) Cena(s) antes de sair?" +msgstr "Guardar alterações da(s) seguinte(s) cena(s) antes de sair?" #: editor/editor_node.cpp msgid "Save changes the following scene(s) before opening Project Manager?" msgstr "" -"Guardar alterações da(s) seguinte(s) Cena(s) antes de abrir o Gestor de " +"Guardar alterações da(s) seguinte(s) cena(s) antes de abrir o Gestor de " "Projeto?" #: editor/editor_node.cpp @@ -2523,19 +2522,19 @@ msgid "" "To make changes to it, a new inherited scene can be created." msgstr "" "Cena '%s' foi importada automaticamente, não podendo ser alterada.\n" -"Para fazer alterações, pode ser criada uma nova Cena herdada." +"Para fazer alterações, pode ser criada uma nova cena herdada." #: editor/editor_node.cpp msgid "" "Error loading scene, it must be inside the project path. Use 'Import' to " "open the scene, then save it inside the project path." msgstr "" -"Erro ao carregar a Cena, tem de estar no Caminho do Projeto. Use 'Importar' " -"para abrir a Cena, e guarde-a dentro do Caminho do Projeto." +"Erro ao carregar cena, tem de estar no caminho do projeto. Use 'Importar' " +"para abrir a cena, e guarde-a dentro do caminho do projeto." #: editor/editor_node.cpp msgid "Scene '%s' has broken dependencies:" -msgstr "A Cena '%s' tem dependências não satisfeitas:" +msgstr "Cena '%s' tem dependências não satisfeitas:" #: editor/editor_node.cpp msgid "Clear Recent Scenes" @@ -2547,7 +2546,7 @@ msgid "" "You can change it later in \"Project Settings\" under the 'application' " "category." msgstr "" -"Não foi definida nenhuma Cena principal. Selecionar uma?\n" +"Não foi definida nenhuma cena principal. Selecionar uma?\n" "Poderá alterá-la depois nas \"Definições do Projeto\", na categoria " "'aplicação'." @@ -2557,8 +2556,8 @@ msgid "" "You can change it later in \"Project Settings\" under the 'application' " "category." msgstr "" -"A Cena selecionada '%s' não existe, selecionar uma válida?\n" -"Poderá alterá-la depois em \"Configurações de Projeto\", na categoria de " +"A cena selecionada '%s' não existe, selecionar uma válida?\n" +"Poderá alterá-la depois em \"Configurações de Projeto\", na categoria " "'aplicação'." #: editor/editor_node.cpp @@ -2567,7 +2566,7 @@ msgid "" "You can change it later in \"Project Settings\" under the 'application' " "category." msgstr "" -"A Cena selecionada '%s' não é um Ficheiro de Cena, selecione um Ficheiro " +"A cena selecionada '%s' não é um ficheiro de cena, selecione um ficheiro " "válido?\n" "Poderá alterá-la depois em \"Configurações de Projeto\", na categoria " "'aplicação'." @@ -2592,7 +2591,7 @@ msgstr "Mostrar no Sistema de Ficheiros" #: editor/editor_node.cpp msgid "Play This Scene" -msgstr "Executar esta Cena" +msgstr "Executar Esta Cena" #: editor/editor_node.cpp msgid "Close Tab" @@ -2616,7 +2615,7 @@ msgstr "Fechar Todos os Separadores" #: editor/editor_node.cpp msgid "Switch Scene Tab" -msgstr "Trocar Tab de Cena" +msgstr "Trocar Aba de Cena" #: editor/editor_node.cpp msgid "%d more files or folders" @@ -2644,7 +2643,7 @@ msgstr "Alternar modo livre de distrações." #: editor/editor_node.cpp msgid "Add a new scene." -msgstr "Adicionar nova Cena." +msgstr "Adicionar nova cena." #: editor/editor_node.cpp msgid "Scene" @@ -2652,7 +2651,7 @@ msgstr "Cena" #: editor/editor_node.cpp msgid "Go to previously opened scene." -msgstr "Ir para Cena aberta anteriormente." +msgstr "Ir para cena aberta anteriormente." #: editor/editor_node.cpp msgid "Copy Text" @@ -2672,7 +2671,7 @@ msgstr "Filtrar Ficheiro..." #: editor/editor_node.cpp msgid "Operations with scene files." -msgstr "Operações com Ficheiros de Cena." +msgstr "Operações com ficheiros de cena." #: editor/editor_node.cpp msgid "New Scene" @@ -2726,7 +2725,7 @@ msgstr "Reverter Cena" #: editor/editor_node.cpp msgid "Miscellaneous project or scene-wide tools." -msgstr "Ferramentas diversas de Projeto ou Cena." +msgstr "Ferramentas diversas de projeto ou cena." #: editor/editor_node.cpp editor/project_manager.cpp #: editor/script_create_dialog.cpp @@ -2818,7 +2817,7 @@ msgid "" "Collision shapes and raycast nodes (for 2D and 3D) will be visible on the " "running game if this option is turned on." msgstr "" -"Com esta opção ativa, formas de colisão e Nós raycast (para 2D e 3D) serão " +"Com esta opção ativa, formas de colisão e nós raycast (para 2D e 3D) serão " "visÃveis no jogo em execução." #: editor/editor_node.cpp @@ -2843,10 +2842,10 @@ msgid "" "When used remotely on a device, this is more efficient with network " "filesystem." msgstr "" -"Com esta opção ativa, alterações da Cena no Editor serão replicadas no jogo " +"Com esta opção ativa, alterações da cena no editor serão replicadas no jogo " "em execução.\n" -"Quando usada num dispositivo remoto, é mais eficiente com um Sistema de " -"Ficheiros em rede." +"Quando usada num dispositivo remoto, é mais eficiente com um sistema de " +"ficheiros em rede." #: editor/editor_node.cpp msgid "Sync Script Changes" @@ -2961,11 +2960,11 @@ msgstr "Pausar a execução da cena para depuração." #: editor/editor_node.cpp msgid "Pause Scene" -msgstr "Pausar a Cena" +msgstr "Pausar Cena" #: editor/editor_node.cpp msgid "Stop the scene." -msgstr "Para a Cena." +msgstr "Para a cena." #: editor/editor_node.cpp msgid "Play the edited scene." @@ -2973,11 +2972,11 @@ msgstr "Executa a cena editada." #: editor/editor_node.cpp msgid "Play Scene" -msgstr "Executar a Cena" +msgstr "Executar Cena" #: editor/editor_node.cpp msgid "Play custom scene" -msgstr "Executa a cena personalizada" +msgstr "Executa cena personalizada" #: editor/editor_node.cpp msgid "Play Custom Scene" @@ -3080,7 +3079,7 @@ msgstr "Exportar Biblioteca" #: editor/editor_node.cpp msgid "Merge With Existing" -msgstr "Fundir com o Existente" +msgstr "Combinar com o Existente" #: editor/editor_node.cpp msgid "Open & Run a Script" @@ -3265,7 +3264,7 @@ msgstr "" "Não se consegue criar Textura Viewport neste recurso porque não está " "definido na cena como local.\n" "Ative a sua propriedade 'local to scene' (e em todos os recursos que o " -"contêm até a um Nó)." +"contêm até a um nó)." #: editor/editor_properties.cpp editor/property_editor.cpp msgid "Pick a Viewport" @@ -3348,11 +3347,11 @@ msgstr "Escreva a sua lógica no Método _run()." #: editor/editor_run_script.cpp msgid "There is an edited scene already." -msgstr "Já existe uma Cena editada." +msgstr "Já existe uma cena editada." #: editor/editor_run_script.cpp msgid "Couldn't instance script:" -msgstr "Não foi possÃvel instanciar o Script:" +msgstr "Não consegui instanciar o script:" #: editor/editor_run_script.cpp msgid "Did you forget the 'tool' keyword?" @@ -3360,7 +3359,7 @@ msgstr "Esqueceu-se da palavra chave 'tool'?" #: editor/editor_run_script.cpp msgid "Couldn't run script:" -msgstr "Não foi possÃvel executar o Script:" +msgstr "Não consegui executar o script:" #: editor/editor_run_script.cpp msgid "Did you forget the '_run' method?" @@ -3368,7 +3367,7 @@ msgstr "Esqueceu-se do médodo '_run'?" #: editor/editor_sub_scene.cpp msgid "Select Node(s) to Import" -msgstr "Selecionar Nó(s) para importar" +msgstr "Selecionar Nó(s) para Importar" #: editor/editor_sub_scene.cpp editor/project_manager.cpp msgid "Browse" @@ -3423,7 +3422,7 @@ msgstr "Remover versão '%s' do Modelo?" #: editor/export_template_manager.cpp msgid "Can't open export templates zip." -msgstr "ImpossÃvel abrir o zip de Modelos." +msgstr "Não consigo abrir zip de modelos de exportação." #: editor/export_template_manager.cpp msgid "Invalid version.txt format inside templates: %s." @@ -3465,12 +3464,12 @@ msgstr "" #: editor/export_template_manager.cpp #: editor/plugins/asset_library_editor_plugin.cpp msgid "Can't resolve." -msgstr "ImpossÃvel resolver." +msgstr "Não consigo resolver." #: editor/export_template_manager.cpp #: editor/plugins/asset_library_editor_plugin.cpp msgid "Can't connect." -msgstr "ImpossÃvel conectar." +msgstr "Não consigo conectar." #: editor/export_template_manager.cpp #: editor/plugins/asset_library_editor_plugin.cpp @@ -3496,7 +3495,7 @@ msgstr "Download Completo." #: editor/export_template_manager.cpp msgid "Cannot remove temporary file:" -msgstr "ImpossÃvel remover ficheiro temporário:" +msgstr "Não consigo remover ficheiro temporário:" #: editor/export_template_manager.cpp msgid "" @@ -3524,7 +3523,7 @@ msgstr "A resolver" #: editor/export_template_manager.cpp msgid "Can't Resolve" -msgstr "ImpossÃvel resolver" +msgstr "Não consigo Resolver" #: editor/export_template_manager.cpp #: editor/plugins/asset_library_editor_plugin.cpp @@ -3533,7 +3532,7 @@ msgstr "A ligar..." #: editor/export_template_manager.cpp msgid "Can't Connect" -msgstr "ImpossÃvel conetar" +msgstr "Não consigo Conectar" #: editor/export_template_manager.cpp msgid "Connected" @@ -3608,7 +3607,7 @@ msgstr "" #: editor/filesystem_dock.cpp msgid "Cannot move/rename resources root." -msgstr "Não foi possÃvel mover/renomear raÃz dos recursos." +msgstr "Não consegui mover/renomear raiz dos recursos." #: editor/filesystem_dock.cpp msgid "Cannot move a folder into itself." @@ -3632,7 +3631,7 @@ msgstr "Nome não fornecido." #: editor/filesystem_dock.cpp msgid "Provided name contains invalid characters." -msgstr "O nome fornecido contém carateres inválidos." +msgstr "O nome fornecido contém caracteres inválidos." #: editor/filesystem_dock.cpp msgid "A file or folder with this name already exists." @@ -3640,7 +3639,7 @@ msgstr "Um Ficheiro ou diretoria já existe com este nome." #: editor/filesystem_dock.cpp msgid "Name contains invalid characters." -msgstr "O nome contém carateres inválidos." +msgstr "O nome contém caracteres inválidos." #: editor/filesystem_dock.cpp msgid "Renaming file:" @@ -3871,7 +3870,7 @@ msgstr "Nós fora do Grupo" #: editor/groups_editor.cpp editor/scene_tree_dock.cpp #: editor/scene_tree_editor.cpp msgid "Filter nodes" -msgstr "Filtrar Nós" +msgstr "Filtrar nós" #: editor/groups_editor.cpp msgid "Nodes in Group" @@ -3891,7 +3890,7 @@ msgstr "Gerir Grupos" #: editor/import/resource_importer_scene.cpp msgid "Import as Single Scene" -msgstr "Importar como Cena única" +msgstr "Importar como Cena Única" #: editor/import/resource_importer_scene.cpp msgid "Import with Separate Animations" @@ -3927,7 +3926,7 @@ msgstr "Importar como Cenas Múltiplas" #: editor/import/resource_importer_scene.cpp msgid "Import as Multiple Scenes+Materials" -msgstr "Importar como Cenas e Materiais Múltiplos" +msgstr "Importar como Cenas Múltiplas + Materiais" #: editor/import/resource_importer_scene.cpp #: editor/plugins/mesh_library_editor_plugin.cpp @@ -3967,6 +3966,10 @@ msgid "Saving..." msgstr "A guardar..." #: editor/import_dock.cpp +msgid "%d Files" +msgstr "%d Ficheiros" + +#: editor/import_dock.cpp msgid "Set as Default for '%s'" msgstr "Definir como Padrão para '%s'" @@ -3975,10 +3978,6 @@ msgid "Clear Default for '%s'" msgstr "Limpar Padrão para '%s'" #: editor/import_dock.cpp -msgid " Files" -msgstr " Ficheiros" - -#: editor/import_dock.cpp msgid "Import As:" msgstr "Importar Como:" @@ -4088,7 +4087,7 @@ msgstr "As alterações podem ser perdidas!" #: editor/multi_node_edit.cpp msgid "MultiNode Set" -msgstr "Conjunto MultiNode" +msgstr "Conjunto MultiNó" #: editor/node_dock.cpp msgid "Select a single node to edit its signals and groups." @@ -4526,7 +4525,7 @@ msgstr "Posição da Animação (em segundos)." #: editor/plugins/animation_player_editor_plugin.cpp msgid "Scale animation playback globally for the node." -msgstr "Escalar globalmente a reprodução da Animação para o Nó." +msgstr "Escalar globalmente a reprodução da animação para o nó." #: editor/plugins/animation_player_editor_plugin.cpp msgid "Animation Tools" @@ -4670,7 +4669,7 @@ msgstr "Viagem" #: editor/plugins/animation_state_machine_editor.cpp msgid "Start and end nodes are needed for a sub-transition." -msgstr "Nodos de inÃcio e fim são necessários para uma sub-transição." +msgstr "Nós de inÃcio e fim são necessários para uma sub-transição." #: editor/plugins/animation_state_machine_editor.cpp msgid "No playback resource set at path: %s." @@ -4862,7 +4861,7 @@ msgstr "Importar Animações..." #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Edit Node Filters" -msgstr "Editar filtros de Nó" +msgstr "Editar Filtros de Nó" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Filters..." @@ -4882,7 +4881,7 @@ msgstr "Erro de ligação, tente novamente." #: editor/plugins/asset_library_editor_plugin.cpp msgid "Can't connect to host:" -msgstr "ImpossÃvel ligar ao host:" +msgstr "Não consigo ligar ao host:" #: editor/plugins/asset_library_editor_plugin.cpp msgid "No response from host:" @@ -4890,7 +4889,7 @@ msgstr "Sem resposta do host:" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Can't resolve hostname:" -msgstr "ImpossÃvel resolver hostname:" +msgstr "Não consigo resolver hostname:" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Request failed, return code:" @@ -4902,7 +4901,7 @@ msgstr "Pedido falhado." #: editor/plugins/asset_library_editor_plugin.cpp msgid "Cannot save response to:" -msgstr "ImpossÃvel guardar resposta para:" +msgstr "Não consigo guardar resposta para:" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Write error." @@ -5075,8 +5074,8 @@ msgid "" "Save your scene (for images to be saved in the same dir), or pick a save " "path from the BakedLightmap properties." msgstr "" -"ImpossÃvel determinar um caminho para guardar imagens lightmap.\n" -"Guarde a sua Cena (para as imagens serem guardadas na mesma diretoria), ou " +"Não consigo determinar um caminho para guardar imagens lightmap.\n" +"Guarde a sua cena (para as imagens serem guardadas na mesma diretoria), ou " "escolha um caminho nas propriedades BakedLightmap." #: editor/plugins/baked_lightmap_editor_plugin.cpp @@ -5194,7 +5193,7 @@ msgstr "" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Presets for the anchors and margins values of a Control node." -msgstr "Pré-definições para âncoras e margens de um Nó Control." +msgstr "Pré-definições para âncoras e margens de um nó Control." #: editor/plugins/canvas_item_editor_plugin.cpp msgid "" @@ -5490,7 +5489,7 @@ msgstr "Ajustar à s Guias" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp msgid "Lock the selected object in place (can't be moved)." -msgstr "Bloquear a posição do Objeto selecionado (não pode ser movido)." +msgstr "Bloquear a posição do objeto selecionado (não pode ser movido)." #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -5639,7 +5638,7 @@ msgstr "A adicionar %s..." #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Cannot instantiate multiple nodes without root." -msgstr "ImpossÃvel instanciar nós múltiplos sem raiz." +msgstr "Não consigo instanciar nós múltiplos sem raiz." #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp @@ -5649,7 +5648,7 @@ msgstr "Criar Nó" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp msgid "Error instancing scene from %s" -msgstr "Erro a instanciar Cena de %s" +msgstr "Erro a instanciar cena de %s" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Change Default Type" @@ -5660,8 +5659,8 @@ msgid "" "Drag & drop + Shift : Add node as sibling\n" "Drag & drop + Alt : Change node type" msgstr "" -"Arrastar & largar + Shift : Adiciona Nó como irmão\n" -"Arrastar & largar + Alt : Altera o tipo de Nó" +"Arrastar & largar + Shift : Adiciona nó como irmão\n" +"Arrastar & largar + Alt : Altera o tipo de nó" #: editor/plugins/collision_polygon_editor_plugin.cpp msgid "Create Polygon3D" @@ -5848,28 +5847,45 @@ msgid "Mesh is empty!" msgstr "A Malha está vazia!" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Trimesh Body" -msgstr "Criar corpo estático Trimesh" +msgid "Couldn't create a Trimesh collision shape." +msgstr "Não consegui criar uma forma de colisão Trimesh." #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Convex Body" -msgstr "Criar corpo estático convexo" +msgid "Create Static Trimesh Body" +msgstr "Criar corpo estático Trimesh" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "This doesn't work on scene root!" -msgstr "Não funciona na raiz da Cena!" +msgstr "Isto não funciona na raiz da cena!" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Trimesh Static Shape" msgstr "Criar Forma Estática Trimesh" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Failed creating shapes!" -msgstr "Falha na criação de formas!" +msgid "Can't create a single convex collision shape for the scene root." +msgstr "Não consigo criar uma única forma convexa para a raiz da cena." + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Couldn't create a single convex collision shape." +msgstr "Não consegui criar uma forma única de colisão convexa." #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Convex Shape(s)" -msgstr "Criar Forma(s) Convexa(s)" +msgid "Create Single Convex Shape" +msgstr "Criar Forma Convexa Simples" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Can't create multiple convex collision shapes for the scene root." +msgstr "" +"Não consigo criar múltiplas formas de colisão convexas para a raiz da cena." + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Couldn't create any collision shapes." +msgstr "Não consegui criar qualquer forma de colisão." + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Multiple Convex Shapes" +msgstr "Criar Múltiplas Formas Convexas" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Navigation Mesh" @@ -5920,18 +5936,68 @@ msgid "Create Trimesh Static Body" msgstr "Criar corpo estático Trimesh" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a StaticBody and assigns a polygon-based collision shape to it " +"automatically.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" +"Cria um StaticBody e atribui-lhe automaticamente uma forma de colisão " +"baseada em polÃgonos.\n" +"Esta é a mais precisa (mas mais lenta) opção para deteção de colisão." + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Trimesh Collision Sibling" -msgstr "Criar irmão de colisão Trimesh" +msgstr "Criar Irmão de Colisão Trimesh" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" +"Cria uma forma de colisão baseada em polÃgonos.\n" +"Esta é a mais precisa (mas mais lenta) opção para deteção de colisão." + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Single Convex Collision Siblings" +msgstr "Criar Irmãos Únicos de Colisão Convexa" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a single convex collision shape.\n" +"This is the fastest (but least accurate) option for collision detection." +msgstr "" +"Cria uma única forma de colisão convexa.\n" +"Esta é a mais rápida (mas menos precisa) opção para deteção de colisão." #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Convex Collision Sibling(s)" -msgstr "Criar Irmão(s) de Colisão Convexa" +msgid "Create Multiple Convex Collision Siblings" +msgstr "Criar Vários Irmãos de Colisão Convexa" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is a performance middle-ground between the two above options." +msgstr "" +"Cria uma forma de colisão baseada em polÃgonos.\n" +"Esta uma opção de desempenho intermédio entre as duas opções acima." #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Outline Mesh..." msgstr "Criar Malha de Contorno..." #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a static outline mesh. The outline mesh will have its normals " +"flipped automatically.\n" +"This can be used instead of the SpatialMaterial Grow property when using " +"that property isn't possible." +msgstr "" +"Cria uma malha de contorno estática. A malha de contorno terá as suas " +"normais automaticamente invertidas.\n" +"Pode ser usada no lugar da propriedade Aumentar de SpatialMaterial quando " +"não é possÃvel usar essa propriedade." + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "View UV1" msgstr "Ver UV1" @@ -5986,11 +6052,11 @@ msgstr "Importar da Cena" #: editor/plugins/mesh_library_editor_plugin.cpp msgid "Update from Scene" -msgstr "Atualizar da Cena" +msgstr "Atualizar a partir da Cena" #: editor/plugins/multimesh_editor_plugin.cpp msgid "No mesh source specified (and no MultiMesh set in node)." -msgstr "Fonte da Malha não especificada (nem MultiMesh no Nó)." +msgstr "Fonte da Malha não especificada (nem MultiMesh no nó)." #: editor/plugins/multimesh_editor_plugin.cpp msgid "No mesh source specified (and MultiMesh contains no Mesh)." @@ -6498,7 +6564,7 @@ msgstr "Sincronizar Ossos com PolÃgono" #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "ERROR: Couldn't load resource!" -msgstr "ERRO: Não foi possÃvel carregar recurso!" +msgstr "ERRO: Não consegui carregar recurso!" #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "Add Resource" @@ -6568,7 +6634,7 @@ msgstr "Erro ao escrever TextFile:" #: editor/plugins/script_editor_plugin.cpp msgid "Could not load file at:" -msgstr "ImpossÃvel carregar ficheiro em:" +msgstr "Não consigo carregar ficheiro em:" #: editor/plugins/script_editor_plugin.cpp msgid "Error saving file!" @@ -6604,7 +6670,7 @@ msgstr "Guardar Ficheiro Como..." #: editor/plugins/script_editor_plugin.cpp msgid "Can't obtain the script for running." -msgstr "Não é possÃvel obter o script para executar." +msgstr "Não consigo obter o script para executar." #: editor/plugins/script_editor_plugin.cpp msgid "Script failed reloading, check console for errors." @@ -6867,7 +6933,7 @@ msgstr "Só podem ser largados recursos do Sistema de Ficheiros ." #: editor/plugins/script_text_editor.cpp #: modules/visual_script/visual_script_editor.cpp msgid "Can't drop nodes because script '%s' is not used in this scene." -msgstr "ImpossÃvel largar nós porque o script '%s' não é usado neste cena." +msgstr "Não consigo largar nós porque o script '%s' não é usado neste cena." #: editor/plugins/script_text_editor.cpp msgid "Lookup Symbol" @@ -7040,7 +7106,7 @@ msgstr "Shader" #: editor/plugins/skeleton_2d_editor_plugin.cpp msgid "This skeleton has no bones, create some children Bone2D nodes." -msgstr "Este esqueleto não tem ossos, crie alguns nós Bone2D filhos." +msgstr "Este esqueleto não tem ossos, crie alguns nós filhos Bone2D." #: editor/plugins/skeleton_2d_editor_plugin.cpp msgid "Create Rest Pose from Bones" @@ -7216,7 +7282,7 @@ msgstr "Sem parente para criar instância de filho." #: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp msgid "This operation requires a single selected node." -msgstr "Esta operação requer um único Nó selecionado." +msgstr "Esta operação requer um único nó selecionado." #: editor/plugins/spatial_editor_plugin.cpp msgid "Lock View Rotation" @@ -7548,7 +7614,7 @@ msgstr "Sprite está vazia!" #: editor/plugins/sprite_editor_plugin.cpp msgid "Can't convert a sprite using animation frames to mesh." -msgstr "ImpossÃvel converter sprite com frames de animação para malha." +msgstr "Não consigo converter sprite com frames de animação para malha." #: editor/plugins/sprite_editor_plugin.cpp msgid "Invalid geometry, can't replace by mesh." @@ -7560,7 +7626,7 @@ msgstr "Converter para Mesh2D" #: editor/plugins/sprite_editor_plugin.cpp msgid "Invalid geometry, can't create polygon." -msgstr "Geometria inválida, impossÃvel criar polÃgono." +msgstr "Geometria inválida, não consigo criar polÃgono." #: editor/plugins/sprite_editor_plugin.cpp msgid "Convert to Polygon2D" @@ -7568,19 +7634,19 @@ msgstr "Converter para Polygon2D" #: editor/plugins/sprite_editor_plugin.cpp msgid "Invalid geometry, can't create collision polygon." -msgstr "Geometria inválida, impossÃvel criar polÃgono de colisão." +msgstr "Geometria inválida, não consigo criar polÃgono de colisão." #: editor/plugins/sprite_editor_plugin.cpp msgid "Create CollisionPolygon2D Sibling" -msgstr "Criar irmão de CollisionPolygon2D" +msgstr "Criar Irmão de CollisionPolygon2D" #: editor/plugins/sprite_editor_plugin.cpp msgid "Invalid geometry, can't create light occluder." -msgstr "Geometria inválida, impossÃvel criar oclusor de luz." +msgstr "Geometria inválida, não consigo criar oclusor de luz." #: editor/plugins/sprite_editor_plugin.cpp msgid "Create LightOccluder2D Sibling" -msgstr "Criar irmão de LightOccluder2D" +msgstr "Criar Irmão de LightOccluder2D" #: editor/plugins/sprite_editor_plugin.cpp msgid "Sprite" @@ -8023,7 +8089,7 @@ msgstr "Criar a partir da Cena" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Merge from Scene" -msgstr "Fundir a partir da Cena" +msgstr "Combinar a partir da Cena" #: editor/plugins/tile_set_editor_plugin.cpp msgid "New Single Tile" @@ -8163,11 +8229,11 @@ msgstr "Não selecionou uma textura para remover." #: editor/plugins/tile_set_editor_plugin.cpp msgid "Create from scene? This will overwrite all current tiles." -msgstr "Criar a partir de cena? Irá substituir todos os Tiles atuais." +msgstr "Criar a partir de cena? Irá substituir todos os tiles atuais." #: editor/plugins/tile_set_editor_plugin.cpp msgid "Merge from scene?" -msgstr "Fundir a partir da Cena?" +msgstr "Combinar a partir da cena?" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Remove Texture" @@ -8335,7 +8401,7 @@ msgstr "TileSet" msgid "No VCS addons are available." msgstr "Não existem addons VCS disponÃveis." -#: editor/plugins/version_control_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/version_control_editor_plugin.cpp msgid "Error" msgstr "Erro" @@ -9377,7 +9443,7 @@ msgstr "Exportar todos os recursos do Projeto" #: editor/project_export.cpp msgid "Export selected scenes (and dependencies)" -msgstr "Exportar Cenas (e dependências) selecionadas" +msgstr "Exportar cenas (e dependências) selecionadas" #: editor/project_export.cpp msgid "Export selected resources (and dependencies)" @@ -9429,7 +9495,7 @@ msgstr "Personalizado (separados por vÃrgula):" #: editor/project_export.cpp msgid "Feature List:" -msgstr "Lista de caracterÃsticas:" +msgstr "Lista de CaracterÃsticas:" #: editor/project_export.cpp msgid "Script" @@ -9496,25 +9562,31 @@ msgid "Export With Debug" msgstr "Exportar com Depuração" #: editor/project_manager.cpp -msgid "The path does not exist." -msgstr "O Caminho não existe." +msgid "The path specified doesn't exist." +msgstr "O caminho especificado não existe." #: editor/project_manager.cpp -msgid "Invalid '.zip' project file, does not contain a 'project.godot' file." +msgid "Error opening package file (it's not in ZIP format)." +msgstr "Erro ao abrir ficheiro comprimido (não está no formato ZIP)." + +#: editor/project_manager.cpp +msgid "" +"Invalid \".zip\" project file; it doesn't contain a \"project.godot\" file." msgstr "" -"Ficheiro de projeto '.zip' inválido, não contém um ficheiro 'project.godot'." +"Ficheiro de projeto \".zip\" inválido, não contém um ficheiro \"project.godot" +"\"." #: editor/project_manager.cpp msgid "Please choose an empty folder." msgstr "Por favor escolha uma pasta vazia." #: editor/project_manager.cpp -msgid "Please choose a 'project.godot' or '.zip' file." -msgstr "Escolha um ficheiro 'project.godot' ou '.zip'." +msgid "Please choose a \"project.godot\" or \".zip\" file." +msgstr "Escolha um ficheiro \"project.godot\" ou \".zip\"." #: editor/project_manager.cpp -msgid "Directory already contains a Godot project." -msgstr "A pasta já contém um projeto Godot." +msgid "This directory already contains a Godot project." +msgstr "Esta diretoria já contém um projeto Godot." #: editor/project_manager.cpp msgid "New Game Project" @@ -9530,7 +9602,7 @@ msgstr "Nome do Projeto Inválido." #: editor/project_manager.cpp msgid "Couldn't create folder." -msgstr "ImpossÃvel criar pasta." +msgstr "Não consigo criar pasta." #: editor/project_manager.cpp msgid "There is already a folder in this path with the specified name." @@ -9549,16 +9621,16 @@ msgid "" "Couldn't load project.godot in project path (error %d). It may be missing or " "corrupted." msgstr "" -"Não foi possÃvel carregar o project.godot no caminho do projeto (erro %d). " +"Não consegui carregar o project.godot no caminho do projeto (erro %d). " "Poderá estar em falta ou corrompido." #: editor/project_manager.cpp msgid "Couldn't edit project.godot in project path." -msgstr "ImpossÃvel editar project.godot no Caminho do Projeto." +msgstr "Não consigo editar project.godot no caminho do projeto." #: editor/project_manager.cpp msgid "Couldn't create project.godot in project path." -msgstr "ImpossÃvel criar project.godot no Caminho do Projeto." +msgstr "Não consigo criar project.godot no caminho do projeto." #: editor/project_manager.cpp msgid "Rename Project" @@ -9639,7 +9711,7 @@ msgstr "" #: editor/project_manager.cpp msgid "Renderer can be changed later, but scenes may need to be adjusted." msgstr "" -"O Renderizador pode ser alterado mais tarde, mas as cenas poderão ter de ser " +"O renderizador pode ser alterado mais tarde, mas as cenas poderão ter de ser " "ajustadas." #: editor/project_manager.cpp @@ -9656,7 +9728,7 @@ msgstr "Erro: Projeto inexistente no sistema de ficheiros." #: editor/project_manager.cpp msgid "Can't open project at '%s'." -msgstr "ImpossÃvel abrir Projeto em '%s'." +msgstr "Não consigo abrir projeto em '%s'." #: editor/project_manager.cpp msgid "Are you sure to open more than one project?" @@ -9718,8 +9790,8 @@ msgid "" "Please edit the project and set the main scene in the Project Settings under " "the \"Application\" category." msgstr "" -"ImpossÃvel executar o Projeto: Cena principal não definida.\n" -"Edite o Projeto e defina a Cena principal em Definições do Projeto dentro da " +"Não consigo executar o projeto: cena principal não definida.\n" +"Edite o projeto e defina a cena principal em Definições do Projeto dentro da " "categoria \"Aplicação\"." #: editor/project_manager.cpp @@ -9727,8 +9799,8 @@ msgid "" "Can't run project: Assets need to be imported.\n" "Please edit the project to trigger the initial import." msgstr "" -"ImpossÃvel executar o Projeto: Ativos têm de ser importados.\n" -"Edite o Projeto para desencadear a importação inicial." +"Não consigo executar o projeto: Ativos têm de ser importados.\n" +"Edite o projeto para desencadear a importação inicial." #: editor/project_manager.cpp msgid "Are you sure to run %d projects at once?" @@ -9813,7 +9885,7 @@ msgstr "Reiniciar agora" #: editor/project_manager.cpp msgid "Can't run project" -msgstr "ImpossÃvel executar o Projeto" +msgstr "Não consigo executar o Projeto" #: editor/project_manager.cpp msgid "" @@ -10212,6 +10284,10 @@ msgid "Suffix" msgstr "Sufixo" #: editor/rename_dialog.cpp +msgid "Use Regular Expressions" +msgstr "Usar Expressões Regulares" + +#: editor/rename_dialog.cpp msgid "Advanced Options" msgstr "Opções Avançadas" @@ -10221,15 +10297,15 @@ msgstr "Substituto" #: editor/rename_dialog.cpp msgid "Node name" -msgstr "Nome do Nó" +msgstr "Nome do nó" #: editor/rename_dialog.cpp msgid "Node's parent name, if available" -msgstr "Nome do parente do Nó, se disponÃvel" +msgstr "Nome do parente do nó, se disponÃvel" #: editor/rename_dialog.cpp msgid "Node type" -msgstr "Tipo de Nó" +msgstr "Tipo de nó" #: editor/rename_dialog.cpp msgid "Current scene name" @@ -10237,7 +10313,7 @@ msgstr "Nome da cena atual" #: editor/rename_dialog.cpp msgid "Root node name" -msgstr "Nome do Nó raiz" +msgstr "Nome do nó raiz" #: editor/rename_dialog.cpp msgid "" @@ -10248,7 +10324,7 @@ msgstr "" "Comparar opções do contador." #: editor/rename_dialog.cpp -msgid "Per Level counter" +msgid "Per-level Counter" msgstr "Contador por nÃvel" #: editor/rename_dialog.cpp @@ -10280,10 +10356,6 @@ msgstr "" "DÃgitos ausentes são preenchidos com zeros." #: editor/rename_dialog.cpp -msgid "Regular Expressions" -msgstr "Expressões Regulares" - -#: editor/rename_dialog.cpp msgid "Post-Process" msgstr "Pós-processamento" @@ -10292,12 +10364,12 @@ msgid "Keep" msgstr "Manter" #: editor/rename_dialog.cpp -msgid "CamelCase to under_scored" -msgstr "CamelCase para under_scored" +msgid "PascalCase to snake_case" +msgstr "PascalCase para snake_case" #: editor/rename_dialog.cpp -msgid "under_scored to CamelCase" -msgstr "under_scored para CamelCase" +msgid "snake_case to PascalCase" +msgstr "snake_case para PascalCase" #: editor/rename_dialog.cpp msgid "Case" @@ -10315,6 +10387,14 @@ msgstr "Para Maiúsculas" msgid "Reset" msgstr "Repor" +#: editor/rename_dialog.cpp +msgid "Regular Expression Error" +msgstr "Erro em Expressão Regular" + +#: editor/rename_dialog.cpp +msgid "At character %s" +msgstr "No carácter %s" + #: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp msgid "Reparent Node" msgstr "Recolocar Nó" @@ -10337,35 +10417,35 @@ msgstr "Modo Execução:" #: editor/run_settings_dialog.cpp msgid "Current Scene" -msgstr "Cena atual" +msgstr "Cena Atual" #: editor/run_settings_dialog.cpp msgid "Main Scene" -msgstr "Cena principal" +msgstr "Cena Principal" #: editor/run_settings_dialog.cpp msgid "Main Scene Arguments:" -msgstr "Argumentos da Cena principal:" +msgstr "Argumentos da Cena Principal:" #: editor/run_settings_dialog.cpp msgid "Scene Run Settings" -msgstr "Configurações de execução da Cena" +msgstr "Configurações de Execução da Cena" #: editor/scene_tree_dock.cpp msgid "No parent to instance the scenes at." -msgstr "Nenhum parente para instanciar a Cena." +msgstr "Nenhum parente para instância das cenas." #: editor/scene_tree_dock.cpp msgid "Error loading scene from %s" -msgstr "Erro ao carregar a Cena de %s" +msgstr "Erro ao carregar a cena de %s" #: editor/scene_tree_dock.cpp msgid "" "Cannot instance the scene '%s' because the current scene exists within one " "of its nodes." msgstr "" -"ImpossÃvel instanciar a Cena '%s' porque a Cena atual existe dentro de um " -"dos seus Nós." +"Não consigo instanciar a cena '%s' porque a cena atual existe dentro de um " +"dos seus nós." #: editor/scene_tree_dock.cpp msgid "Instance Scene(s)" @@ -10377,7 +10457,7 @@ msgstr "Substituir com Cena-Ramo" #: editor/scene_tree_dock.cpp msgid "Instance Child Scene" -msgstr "Instanciar Cena filha" +msgstr "Instanciar Cena Filha" #: editor/scene_tree_dock.cpp msgid "Clear Script" @@ -10401,15 +10481,16 @@ msgstr "Duplicar Nó(s)" #: editor/scene_tree_dock.cpp msgid "Can't reparent nodes in inherited scenes, order of nodes can't change." -msgstr "ImpossÃvel mudar nó em cenas herdadas, a ordem dos nós não pode mudar." +msgstr "" +"Não consigo mudar nó em cenas herdadas, a ordem dos nós não pode mudar." #: editor/scene_tree_dock.cpp msgid "Node must belong to the edited scene to become root." -msgstr "O nó deve pertencer à cena editada para se tornar root." +msgstr "O nó deve pertencer à cena editada para se tornar raiz." #: editor/scene_tree_dock.cpp msgid "Instantiated scenes can't become root" -msgstr "Cenas instantâneas não se podem tornar root" +msgstr "Cenas instanciadas não se podem tornar raÃzes" #: editor/scene_tree_dock.cpp msgid "Make node as Root" @@ -10417,38 +10498,38 @@ msgstr "Tornar Nó Raiz" #: editor/scene_tree_dock.cpp msgid "Delete %d nodes?" -msgstr "Apagar %d Nós?" +msgstr "Apagar %d nós?" #: editor/scene_tree_dock.cpp msgid "Delete the root node \"%s\"?" -msgstr "Apagar Nó raiz \"%s\"?" +msgstr "Apagar nó raiz \"%s\"?" #: editor/scene_tree_dock.cpp msgid "Delete node \"%s\" and its children?" -msgstr "Apagar Nó \"%s\" e filhos?" +msgstr "Apagar nó \"%s\" e filhos?" #: editor/scene_tree_dock.cpp msgid "Delete node \"%s\"?" -msgstr "Apagar Nó \"%s\"?" +msgstr "Apagar nó \"%s\"?" #: editor/scene_tree_dock.cpp msgid "Can not perform with the root node." -msgstr "ImpossÃvel executar com o Nó raiz." +msgstr "Não consigo executar com o nó raiz." #: editor/scene_tree_dock.cpp msgid "This operation can't be done on instanced scenes." -msgstr "Esta operação não pode ser feita numa Cena instanciada." +msgstr "Esta operação não pode ser feita numa cena instanciada." #: editor/scene_tree_dock.cpp msgid "Save New Scene As..." -msgstr "Guardar nova Cena como..." +msgstr "Guardar Nova Cena Como..." #: editor/scene_tree_dock.cpp msgid "" "Disabling \"editable_instance\" will cause all properties of the node to be " "reverted to their default." msgstr "" -"Desativar \"editable_instance\" irá reverter todas as propriedades do Nó " +"Desativar \"editable_instance\" irá reverter todas as propriedades do nó " "para os seus valores padrão." #: editor/scene_tree_dock.cpp @@ -10465,7 +10546,7 @@ msgstr "Tornar Local" #: editor/scene_tree_dock.cpp msgid "New Scene Root" -msgstr "Nova Raiz de Cena" +msgstr "Nova Raiz da Cena" #: editor/scene_tree_dock.cpp msgid "Create Root Node:" @@ -10489,11 +10570,11 @@ msgstr "Outro Nó" #: editor/scene_tree_dock.cpp msgid "Can't operate on nodes from a foreign scene!" -msgstr "ImpossÃvel operar em Nós de uma Cena externa!" +msgstr "Não consigo operar em nós de uma cena externa!" #: editor/scene_tree_dock.cpp msgid "Can't operate on nodes the current scene inherits from!" -msgstr "ImpossÃvel operar em Nós herdados pela Cena atual!" +msgstr "Não consigo operar em nós herdados pela cena atual!" #: editor/scene_tree_dock.cpp msgid "Attach Script" @@ -10512,16 +10593,16 @@ msgid "" "Couldn't save new scene. Likely dependencies (instances) couldn't be " "satisfied." msgstr "" -"ImpossÃvel guardar nova Cena. Provavelmente dependências (instâncias) não " +"Não consigo guardar nova cena. Provavelmente dependências (instâncias) não " "foram satisfeitas." #: editor/scene_tree_dock.cpp msgid "Error saving scene." -msgstr "Erro ao guardar Cena." +msgstr "Erro ao guardar cena." #: editor/scene_tree_dock.cpp msgid "Error duplicating scene to save it." -msgstr "Erro ao duplicar Cena para guardar." +msgstr "Erro ao duplicar cena para guardar." #: editor/scene_tree_dock.cpp msgid "Sub-Resources" @@ -10545,7 +10626,7 @@ msgstr "Abrir documentação" #: editor/scene_tree_dock.cpp msgid "Add Child Node" -msgstr "Adicionar Nó filho" +msgstr "Adicionar Nó Filho" #: editor/scene_tree_dock.cpp msgid "Expand/Collapse All" @@ -10561,15 +10642,15 @@ msgstr "Recolocar o Novo Nó" #: editor/scene_tree_dock.cpp msgid "Make Scene Root" -msgstr "Tornar Nó Raiz" +msgstr "Tornar Raiz da Cena" #: editor/scene_tree_dock.cpp msgid "Merge From Scene" -msgstr "Fundir a partir da Cena" +msgstr "Combinar a partir da Cena" #: editor/scene_tree_dock.cpp editor/script_editor_debugger.cpp msgid "Save Branch as Scene" -msgstr "Guardar ramo como Cena" +msgstr "Guardar Ramo como Cena" #: editor/scene_tree_dock.cpp editor/script_editor_debugger.cpp msgid "Copy Node Path" @@ -10588,16 +10669,16 @@ msgid "" "Instance a scene file as a Node. Creates an inherited scene if no root node " "exists." msgstr "" -"Instanciar Ficheiro de Cena como Nó. Cria uma Cena herdada se não existir Nó " -"raiz." +"Instanciar um ficheiro de cena como um Nó. Cria uma cena herdada se não " +"existir nó raiz." #: editor/scene_tree_dock.cpp msgid "Attach a new or existing script for the selected node." -msgstr "Anexar Script novo ou existente ao Nó selecionado." +msgstr "Anexar script novo ou existente ao nó selecionado." #: editor/scene_tree_dock.cpp msgid "Clear a script for the selected node." -msgstr "Limpar Script do Nó selecionado." +msgstr "Limpar script do nó selecionado." #: editor/scene_tree_dock.cpp msgid "Remote" @@ -10629,7 +10710,7 @@ msgstr "(A Ligar de)" #: editor/scene_tree_editor.cpp msgid "Node configuration warning:" -msgstr "Aviso de configuração do Nó:" +msgstr "Aviso de configuração do nó:" #: editor/scene_tree_editor.cpp msgid "" @@ -10689,7 +10770,7 @@ msgstr "" #: editor/scene_tree_editor.cpp msgid "Invalid node name, the following characters are not allowed:" -msgstr "Nome de Nó inválido, os carateres seguintes não são permitidos:" +msgstr "Nome de nó inválido, os caracteres seguintes não são permitidos:" #: editor/scene_tree_editor.cpp msgid "Rename Node" @@ -10701,7 +10782,7 @@ msgstr "Ãrvore de Cena (Nós):" #: editor/scene_tree_editor.cpp msgid "Node Configuration Warning!" -msgstr "Aviso de configuração de Nó!" +msgstr "Aviso de Configuração de Nó!" #: editor/scene_tree_editor.cpp msgid "Select a Node" @@ -10741,7 +10822,7 @@ msgstr "Erro ao carregar Modelo '%s'" #: editor/script_create_dialog.cpp msgid "Error - Could not create script in filesystem." -msgstr "Erro - ImpossÃvel criar Script no Sistema de Ficheiros." +msgstr "Erro - Não consigo criar script no sistema de ficheiros." #: editor/script_create_dialog.cpp msgid "Error loading script from %s" @@ -10776,8 +10857,8 @@ msgid "Invalid inherited parent name or path." msgstr "Nome ou Caminho de parente herdado inválido." #: editor/script_create_dialog.cpp -msgid "Script is valid." -msgstr "Script é válido." +msgid "Script path/name is valid." +msgstr "Caminho/nome de Script é válido." #: editor/script_create_dialog.cpp msgid "Allowed: a-z, A-Z, 0-9, _ and ." @@ -10868,6 +10949,10 @@ msgid "Copy Error" msgstr "Copiar Erro" #: editor/script_editor_debugger.cpp +msgid "Video RAM" +msgstr "Memória VÃdeo" + +#: editor/script_editor_debugger.cpp msgid "Skip Breakpoints" msgstr "Saltar Pontos de Paragem" @@ -10916,10 +11001,6 @@ msgid "Total:" msgstr "Total:" #: editor/script_editor_debugger.cpp -msgid "Video Mem" -msgstr "Memória VÃdeo" - -#: editor/script_editor_debugger.cpp msgid "Resource Path" msgstr "Caminho do recurso" @@ -10949,7 +11030,7 @@ msgstr "Tipo de controlo clicado:" #: editor/script_editor_debugger.cpp msgid "Live Edit Root:" -msgstr "Raiz de edição ao vivo:" +msgstr "Raiz de Edição ao Vivo:" #: editor/script_editor_debugger.cpp msgid "Set From Tree" @@ -11134,8 +11215,8 @@ msgstr "Formato de dicionário de instância inválido (falta @path)" #: modules/gdscript/gdscript_functions.cpp msgid "Invalid instance dictionary format (can't load script at @path)" msgstr "" -"Formato de dicionário de instância inválido (não foi possÃvel carregar o " -"Script em @path)" +"Formato de dicionário de instância inválido (não consigo carregar o script " +"em @path)" #: modules/gdscript/gdscript_functions.cpp msgid "Invalid instance dictionary format (invalid script at @path)" @@ -11350,7 +11431,7 @@ msgid "" "A node yielded without working memory, please read the docs on how to yield " "properly!" msgstr "" -"Um Nó fez yield sem memória para usar, por favor leia os documentos para " +"Um nó fez yield sem memória para usar, por favor leia os documentos para " "saber como fazer yield corretamente!" #: modules/visual_script/visual_script.cpp @@ -11358,7 +11439,7 @@ msgid "" "Node yielded, but did not return a function state in the first working " "memory." msgstr "" -"O Nó fez yield, mas não retornou um estado de Função na primeira memória de " +"O nó fez yield, mas não retornou um estado de função na primeira memória de " "trabalho." #: modules/visual_script/visual_script.cpp @@ -11367,15 +11448,15 @@ msgid "" "your node please." msgstr "" "O valor de retorno deve ser atribuÃdo ao primeiro elemento da memória de " -"trabalho de Nós! Corrija o seu Nó por favor." +"trabalho de nós! Corrija o seu nó por favor." #: modules/visual_script/visual_script.cpp msgid "Node returned an invalid sequence output: " -msgstr "O Nó retornou uma sequência de saÃda (output) incorreta: " +msgstr "O nó retornou uma sequência de saÃda (output) incorreta: " #: modules/visual_script/visual_script.cpp msgid "Found sequence bit but not the node in the stack, report bug!" -msgstr "Foi encontrada o bit da sequência mas não o Nó na pilha, relate o bug!" +msgstr "Foi encontrada o bit da sequência mas não o nó na pilha, relate o bug!" #: modules/visual_script/visual_script.cpp msgid "Stack overflow with stack depth: " @@ -11503,11 +11584,11 @@ msgstr "" #: modules/visual_script/visual_script_editor.cpp msgid "Hold %s to drop a simple reference to the node." -msgstr "Pressione %s para largar uma referência simples no Nó." +msgstr "Pressione %s para largar uma referência simples no nó." #: modules/visual_script/visual_script_editor.cpp msgid "Hold Ctrl to drop a simple reference to the node." -msgstr "Pressione Ctrl para largar uma referência simples no Nó." +msgstr "Pressione Ctrl para largar uma referência simples no nó." #: modules/visual_script/visual_script_editor.cpp msgid "Hold %s to drop a Variable Setter." @@ -11515,7 +11596,7 @@ msgstr "Pressione %s para largar um Setter variável." #: modules/visual_script/visual_script_editor.cpp msgid "Hold Ctrl to drop a Variable Setter." -msgstr "Pressione Ctrl para largar um Setter variável." +msgstr "Pressione Ctrl para largar um Setter Variável." #: modules/visual_script/visual_script_editor.cpp msgid "Add Preload Node" @@ -11523,14 +11604,15 @@ msgstr "Adicionar Nó de Pré-carregamento" #: modules/visual_script/visual_script_editor.cpp msgid "Add Node(s) From Tree" -msgstr "Adicionar Nó da Ãrvore" +msgstr "Adicionar Nó(s) da Ãrvore" #: modules/visual_script/visual_script_editor.cpp msgid "" "Can't drop properties because script '%s' is not used in this scene.\n" "Drop holding 'Shift' to just copy the signature." msgstr "" -"ImpossÃvel largar propriedades porque o script '%s' não é usado neste cena.\n" +"Não consigo largar propriedades porque o script '%s' não é usado neste " +"cena.\n" "Largue com 'Shift' para copiar apenas a assinatura." #: modules/visual_script/visual_script_editor.cpp @@ -11563,11 +11645,11 @@ msgstr "Desconectar Nós" #: modules/visual_script/visual_script_editor.cpp msgid "Connect Node Data" -msgstr "Conectar Dados de Nó" +msgstr "Conectar Dados do Nó" #: modules/visual_script/visual_script_editor.cpp msgid "Connect Node Sequence" -msgstr "Conectar Sequência de Nós" +msgstr "Conectar Sequência do Nó" #: modules/visual_script/visual_script_editor.cpp msgid "Script already has function '%s'" @@ -11583,7 +11665,7 @@ msgstr "Redimensionar Comentário" #: modules/visual_script/visual_script_editor.cpp msgid "Can't copy the function node." -msgstr "ImpossÃvel copiar o Nó Função." +msgstr "Não consigo copiar o nó função." #: modules/visual_script/visual_script_editor.cpp msgid "Clipboard is empty!" @@ -11595,11 +11677,11 @@ msgstr "Colar Nós VisualScript" #: modules/visual_script/visual_script_editor.cpp msgid "Can't create function with a function node." -msgstr "ImpossÃvel criar função com um nó função." +msgstr "Não consigo criar função com um nó função." #: modules/visual_script/visual_script_editor.cpp msgid "Can't create function of nodes from nodes of multiple functions." -msgstr "ImpossÃvel criar função de nós com nós de várias funções." +msgstr "Não consigo criar função de nós a partir de nós de várias funções." #: modules/visual_script/visual_script_editor.cpp msgid "Select at least one node with sequence port." @@ -11715,7 +11797,7 @@ msgstr "Caminho não conduz Nó!" #: modules/visual_script/visual_script_func_nodes.cpp msgid "Invalid index property name '%s' in node %s." -msgstr "Nome de Propriedade Ãndice '%s' inválido em Nó %s." +msgstr "Nome de propriedade Ãndice '%s' inválido no nó %s." #: modules/visual_script/visual_script_nodes.cpp msgid ": Invalid argument of type: " @@ -11735,15 +11817,16 @@ msgstr "VariableSet não encontrado no script: " #: modules/visual_script/visual_script_nodes.cpp msgid "Custom node has no _step() method, can't process graph." -msgstr "ImpossÃvel processar gráfico, Nó personalizado sem método _step()." +msgstr "" +"Nó personalizado não tem método _step(), não podendo processar um gráfico." #: modules/visual_script/visual_script_nodes.cpp msgid "" "Invalid return value from _step(), must be integer (seq out), or string " "(error)." msgstr "" -"Valor de retorno de _step() inválido, tem de ser inteiro (seq out), ou " -"string (error)." +"Retorno de valor inválido a partir do _step(), tem de ser inteiro (seq out), " +"ou string (error)." #: modules/visual_script/visual_script_property_selector.cpp msgid "Search VisualScript" @@ -11768,15 +11851,16 @@ msgstr "Os segmentos de pacote devem ser de comprimento diferente de zero." #: platform/android/export/export.cpp msgid "The character '%s' is not allowed in Android application package names." msgstr "" -"O caráter '%s' não é permitido em nomes de pacotes de aplicações Android." +"O carácter '%s' não é permitido em nomes de pacotes de aplicações Android." #: platform/android/export/export.cpp msgid "A digit cannot be the first character in a package segment." -msgstr "Um dÃgito não pode ser o primeiro caráter num segmento de pacote." +msgstr "Um dÃgito não pode ser o primeiro carácter num segmento de pacote." #: platform/android/export/export.cpp msgid "The character '%s' cannot be the first character in a package segment." -msgstr "O caráter '%s' não pode ser o primeiro caráter num segmento de pacote." +msgstr "" +"O carácter '%s' não pode ser o primeiro carácter num segmento de pacote." #: platform/android/export/export.cpp msgid "The package must have at least one '.' separator." @@ -11871,13 +11955,13 @@ msgstr "Falta o identificador." #: platform/iphone/export/export.cpp msgid "The character '%s' is not allowed in Identifier." -msgstr "O caráter \"%s\" não é permitido no Identificador." +msgstr "O carácter \"%s\" não é permitido no Identificador." #: platform/iphone/export/export.cpp msgid "App Store Team ID not specified - cannot configure the project." msgstr "" -"ID da equipa da App Store não especificado - não é possÃvel configurar o " -"projecto." +"ID da equipa da App Store não especificado - não consigo configurar o " +"projeto." #: platform/iphone/export/export.cpp msgid "Invalid Identifier:" @@ -11901,11 +11985,11 @@ msgstr "Executar HTML exportado no Navegador padrão do sistema." #: platform/javascript/export/export.cpp msgid "Could not write file:" -msgstr "ImpossÃvel escrever Ficheiro:" +msgstr "Não consigo escrever ficheiro:" #: platform/javascript/export/export.cpp msgid "Could not open template for export:" -msgstr "ImpossÃvel abrir Modelo para exportar:" +msgstr "Não consigo abrir modelo para exportação:" #: platform/javascript/export/export.cpp msgid "Invalid export template:" @@ -11913,11 +11997,11 @@ msgstr "Modelo de exportação inválido:" #: platform/javascript/export/export.cpp msgid "Could not read custom HTML shell:" -msgstr "ImpossÃvel ler Shell HTML personalizado:" +msgstr "Não consigo ler shell HTML personalizado:" #: platform/javascript/export/export.cpp msgid "Could not read boot splash image file:" -msgstr "ImpossÃvel ler Ficheiro de imagem do ecrã de inicialização:" +msgstr "Não consigo ler ficheiro de imagem do ecrã de inicialização:" #: platform/javascript/export/export.cpp msgid "Using default boot splash image." @@ -12004,8 +12088,7 @@ msgid "" "Consider adding a CollisionShape2D or CollisionPolygon2D as a child to " "define its shape." msgstr "" -"Este nó não tem forma, não conseguindo assim colidir ou interagir com outros " -"objetos.\n" +"Este nó não tem forma, não podendo colidir ou interagir com outros objetos.\n" "Considere adicionar nós CollisionShape2D ou CollisionPolygon2D como filhos " "para definir a sua forma." @@ -12015,7 +12098,7 @@ msgid "" "CollisionObject2D derived node. Please only use it as a child of Area2D, " "StaticBody2D, RigidBody2D, KinematicBody2D, etc. to give them a shape." msgstr "" -"CollisionPolygon2D serve apenas para fornecer uma forma de colisão a um Nó " +"CollisionPolygon2D serve apenas para fornecer uma forma de colisão a um nó " "derivado de CollisionObject2D. Use-o apenas como um filho de Area2D, " "StaticBody2D, RigidBody2D, KinematicBody2D, etc. para lhes dar uma forma." @@ -12029,7 +12112,7 @@ msgid "" "CollisionObject2D derived node. Please only use it as a child of Area2D, " "StaticBody2D, RigidBody2D, KinematicBody2D, etc. to give them a shape." msgstr "" -"CollisionShape2D serve apenas para fornecer uma forma de colisão a um Nó " +"CollisionShape2D serve apenas para fornecer uma forma de colisão a um nó " "derivado de CollisionObject2D. Use-o apenas como um filho de Area2D, " "StaticBody2D, RigidBody2D, KinematicBody2D, etc. para lhes dar uma forma." @@ -12073,22 +12156,22 @@ msgid "" "A NavigationPolygon resource must be set or created for this node to work. " "Please set a property or draw a polygon." msgstr "" -"Um recurso NavigationPolygon tem de ser definido ou criado para este Nó " -"funcionar. Defina a Propriedade ou desenhe o PolÃgono." +"Um recurso NavigationPolygon tem de ser definido ou criado para este nó " +"funcionar. Defina a propriedade ou desenhe o polÃgono." #: scene/2d/navigation_polygon.cpp msgid "" "NavigationPolygonInstance must be a child or grandchild to a Navigation2D " "node. It only provides navigation data." msgstr "" -"NavigationPolygonInstance tem de ser filho ou neto de um Nó Navigation2D. " +"NavigationPolygonInstance tem de ser filho ou neto de um nó Navigation2D. " "Apenas fornece dados de navegação." #: scene/2d/parallax_layer.cpp msgid "" "ParallaxLayer node only works when set as child of a ParallaxBackground node." msgstr "" -"O Nó ParallaxLayer só funciona quando definido como filho de um Nó " +"O nó ParallaxLayer só funciona quando definido como filho de um nó " "ParallaxBackground." #: scene/2d/particles_2d.cpp @@ -12098,7 +12181,7 @@ msgid "" "CPUParticles\" option for this purpose." msgstr "" "PartÃculas baseadas em GPU não são suportadas pelo driver de vÃdeo GLES2.\n" -"Use o Nó CPUParticles2D. Pode usar a opção \"Converter em CPUParticles\" " +"Use o nó CPUParticles2D. Pode usar a opção \"Converter em CPUParticles\" " "para este efeito." #: scene/2d/particles_2d.cpp scene/3d/particles.cpp @@ -12120,7 +12203,7 @@ msgstr "" #: scene/2d/path_2d.cpp msgid "PathFollow2D only works when set as a child of a Path2D node." msgstr "" -"PathFollow2D apenas funciona quando definido como filho de um Nó Path2D." +"PathFollow2D apenas funciona quando definido como filho de um nó Path2D." #: scene/2d/physics_body_2d.cpp msgid "" @@ -12128,14 +12211,14 @@ msgid "" "by the physics engine when running.\n" "Change the size in children collision shapes instead." msgstr "" -"Mudanças no tamanho do RigidBody2D (em modos caráter ou rÃgido) serão " +"Mudanças no tamanho do RigidBody2D (em modos carácter ou rÃgido) serão " "reescritas pelo motor de fÃsica na execução.\n" "Mude antes o tamanho das formas de colisão filhas." #: scene/2d/remote_transform_2d.cpp msgid "Path property must point to a valid Node2D node to work." msgstr "" -"Para funcionar, a Propriedade Caminho tem de apontar para um Nó Node2D " +"Para funcionar, a Propriedade Caminho tem de apontar para um nó Node2D " "válido." #: scene/2d/skeleton_2d.cpp @@ -12167,15 +12250,15 @@ msgid "" "as parent." msgstr "" "VisibilityEnabler2D funciona melhor quando usado diretamente como parente na " -"Cena raiz editada." +"cena raiz editada." #: scene/3d/arvr_nodes.cpp msgid "ARVRCamera must have an ARVROrigin node as its parent." -msgstr "ARVRCamera precisa de um Nó ARVROrigin como parente." +msgstr "ARVRCamera precisa de um nó ARVROrigin como parente." #: scene/3d/arvr_nodes.cpp msgid "ARVRController must have an ARVROrigin node as its parent." -msgstr "ARVRController precisa de um Nó ARVROrigin como parente." +msgstr "ARVRController precisa de um nó ARVROrigin como parente." #: scene/3d/arvr_nodes.cpp msgid "" @@ -12187,7 +12270,7 @@ msgstr "" #: scene/3d/arvr_nodes.cpp msgid "ARVRAnchor must have an ARVROrigin node as its parent." -msgstr "ARVRAnchor precisa de um Nó ARVROrigin como parente." +msgstr "ARVRAnchor precisa de um nó ARVROrigin como parente." #: scene/3d/arvr_nodes.cpp msgid "" @@ -12199,7 +12282,7 @@ msgstr "" #: scene/3d/arvr_nodes.cpp msgid "ARVROrigin requires an ARVRCamera child node." -msgstr "ARVROrigin exige um Nó filho ARVRCamera." +msgstr "ARVROrigin exige um nó filho ARVRCamera." #: scene/3d/baked_lightmap.cpp msgid "%d%%" @@ -12231,8 +12314,7 @@ msgid "" "Consider adding a CollisionShape or CollisionPolygon as a child to define " "its shape." msgstr "" -"Este nó não tem forma, não conseguindo assim colidir ou interagir com outros " -"objetos.\n" +"Este nó não tem forma, não podendo colidir ou interagir com outros objetos.\n" "Considere adicionar nós CollisionShape ou CollisionPolygon como filhos para " "definir a sua forma." @@ -12242,7 +12324,7 @@ msgid "" "CollisionObject derived node. Please only use it as a child of Area, " "StaticBody, RigidBody, KinematicBody, etc. to give them a shape." msgstr "" -"CollisionPolygon serve apenas para fornecer uma forma de colisão a um Nó " +"CollisionPolygon serve apenas para fornecer uma forma de colisão a um nó " "derivado de CollisionObject. Use-o apenas como um filho de Area, StaticBody, " "RigidBody, KinematicBody, etc. para lhes dar uma forma." @@ -12256,7 +12338,7 @@ msgid "" "derived node. Please only use it as a child of Area, StaticBody, RigidBody, " "KinematicBody, etc. to give them a shape." msgstr "" -"CollisionShape serve apenas para fornecer uma forma de colisão a um Nó " +"CollisionShape serve apenas para fornecer uma forma de colisão a um nó " "derivado de CollisionObject. Use-o apenas como um filho de Area, StaticBody, " "RigidBody, KinematicBody, etc. para lhes dar uma forma." @@ -12307,7 +12389,7 @@ msgstr "Uma SpotLight com ângulo superior a 90 graus não cria sombras." #: scene/3d/navigation_mesh.cpp msgid "A NavigationMesh resource must be set or created for this node to work." msgstr "" -"Um recurso NavigationMesh tem de ser definido ou criado para este Nó " +"Um recurso NavigationMesh tem de ser definido ou criado para este nó " "funcionar." #: scene/3d/navigation_mesh.cpp @@ -12315,7 +12397,7 @@ msgid "" "NavigationMeshInstance must be a child or grandchild to a Navigation node. " "It only provides navigation data." msgstr "" -"NavigationMeshInstance tem de ser filho ou neto de um Nó Navigation. Apenas " +"NavigationMeshInstance tem de ser filho ou neto de um nó Navigation. Apenas " "fornece dados de navegação." #: scene/3d/particles.cpp @@ -12325,7 +12407,7 @@ msgid "" "\" option for this purpose." msgstr "" "PartÃculas baseadas em GPU não são suportadas pelo driver de vÃdeo GLES2.\n" -"Use o Nó CPUParticles. Pode usar a opção \"Converter em CPUParticles\" para " +"Use o nó CPUParticles. Pode usar a opção \"Converter em CPUParticles\" para " "este efeito." #: scene/3d/particles.cpp @@ -12344,7 +12426,7 @@ msgstr "" #: scene/3d/path.cpp msgid "PathFollow only works when set as a child of a Path node." -msgstr "PathFollow apenas funciona quando definido como filho de um Nó Path." +msgstr "PathFollow apenas funciona quando definido como filho de um nó Path." #: scene/3d/path.cpp msgid "" @@ -12360,7 +12442,7 @@ msgid "" "by the physics engine when running.\n" "Change the size in children collision shapes instead." msgstr "" -"Mudanças no tamanho do RigidBody (em modos caráter ou rÃgido) serão " +"Mudanças no tamanho do RigidBody (em modos carácter ou rÃgido) serão " "reescritas pelo motor de fÃsica na execução.\n" "Mude antes o tamanho das formas de colisão filhas." @@ -12369,7 +12451,7 @@ msgid "" "The \"Remote Path\" property must point to a valid Spatial or Spatial-" "derived node to work." msgstr "" -"Para funcionar, a Propriedade \"Caminho Remoto\" tem de apontar para um Nó " +"Para funcionar, a Propriedade \"Caminho Remoto\" tem de apontar para um nó " "Spatial válido ou seu derivado." #: scene/3d/soft_body.cpp @@ -12414,7 +12496,7 @@ msgstr "" msgid "" "Only one WorldEnvironment is allowed per scene (or set of instanced scenes)." msgstr "" -"Apenas um WorldEnvironment é permitido por Cena (ou grupo de cenas " +"Apenas um WorldEnvironment é permitido por cena (ou grupo de cenas " "instanciadas)." #: scene/3d/world_environment.cpp @@ -12447,7 +12529,7 @@ msgstr "Nada conectado à entrada '%s' do nó '%s'." #: scene/animation/animation_tree.cpp msgid "No root AnimationNode for the graph is set." -msgstr "Não foi definida uma raÃz AnimationNode para o gráfico." +msgstr "Não foi definida uma raiz AnimationNode para o gráfico." #: scene/animation/animation_tree.cpp msgid "Path to an AnimationPlayer node containing animations is not set." @@ -12461,11 +12543,11 @@ msgstr "" #: scene/animation/animation_tree.cpp msgid "The AnimationPlayer root node is not a valid node." -msgstr "O Nó raiz de AnimationPlayer não é um Nó válido." +msgstr "O nó raiz de AnimationPlayer não é um nó válido." #: scene/animation/animation_tree_player.cpp msgid "This node has been deprecated. Use AnimationTree instead." -msgstr "Este nó foi depreciado. Use AnimationTree em vez disso." +msgstr "Este nó foi descontinuado. Use antes AnimationTree." #: scene/gui/color_picker.cpp msgid "" @@ -12505,7 +12587,7 @@ msgid "" msgstr "" "Por si só um Contentor não tem utilidade, a não ser que um script configure " "a disposição dos seu filhos.\n" -"Se não pretende adicionar um script, use antes um simples Nó Control." +"Se não pretende adicionar um script, use antes um simples nó Control." #: scene/gui/control.cpp msgid "" @@ -12570,7 +12652,7 @@ msgstr "" "Esta vista não está definida como alvo de Renderização. Se pretende " "apresentar o seu conteúdo diretamente no ecrã, torne-a um filho de um " "Control de modo a que obtenha um tamanho. Caso contrário, torne-a um " -"RenderTarget e atribua a sua textura interna a outro Nó para visualizar." +"RenderTarget e atribua a sua textura interna a outro nó para visualizar." #: scene/resources/visual_shader_nodes.cpp msgid "Invalid source for preview." @@ -12600,6 +12682,15 @@ msgstr "Variações só podem ser atribuÃdas na função vértice." msgid "Constants cannot be modified." msgstr "Constantes não podem ser modificadas." +#~ msgid "Replaced %d occurrence(s)." +#~ msgstr "SubstituÃdo %d ocorrência(s)." + +#~ msgid "Create Static Convex Body" +#~ msgstr "Criar corpo estático convexo" + +#~ msgid "Failed creating shapes!" +#~ msgstr "Falha na criação de formas!" + #~ msgid "" #~ "There are currently no tutorials for this class, you can [color=$color]" #~ "[url=$url]contribute one[/url][/color] or [color=$color][url=" diff --git a/editor/translations/ro.po b/editor/translations/ro.po index e73e0c1703..7bd5c90156 100644 --- a/editor/translations/ro.po +++ b/editor/translations/ro.po @@ -679,8 +679,9 @@ msgid "Line Number:" msgstr "Linia Numărul:" #: editor/code_editor.cpp -msgid "Replaced %d occurrence(s)." -msgstr "ÃŽnlocuit %d potriviri." +#, fuzzy +msgid "%d replaced." +msgstr "ÃŽnlocuiÈ›i" #: editor/code_editor.cpp editor/editor_help.cpp msgid "%d match." @@ -3995,6 +3996,11 @@ msgid "Saving..." msgstr "Se Salvează..." #: editor/import_dock.cpp +#, fuzzy +msgid "%d Files" +msgstr " FiÈ™iere" + +#: editor/import_dock.cpp msgid "Set as Default for '%s'" msgstr "Setează ca Implicit pentru '%s'" @@ -4003,10 +4009,6 @@ msgid "Clear Default for '%s'" msgstr "Curăță setarea Implicită pentru '%s'" #: editor/import_dock.cpp -msgid " Files" -msgstr " FiÈ™iere" - -#: editor/import_dock.cpp msgid "Import As:" msgstr "Importă Ca:" @@ -5999,12 +6001,13 @@ msgid "Mesh is empty!" msgstr "Mesh-ul este gol!" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Trimesh Body" -msgstr "Creează un Corp Static Trimesh" +#, fuzzy +msgid "Couldn't create a Trimesh collision shape." +msgstr "Creează un Frate de Coliziune Trimesh" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Convex Body" -msgstr "Creează un Corp Static Convex" +msgid "Create Static Trimesh Body" +msgstr "Creează un Corp Static Trimesh" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "This doesn't work on scene root!" @@ -6016,12 +6019,30 @@ msgid "Create Trimesh Static Shape" msgstr "Creează o Formă Trimesh" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Failed creating shapes!" +msgid "Can't create a single convex collision shape for the scene root." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Couldn't create a single convex collision shape." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp #, fuzzy -msgid "Create Convex Shape(s)" +msgid "Create Single Convex Shape" +msgstr "Creează o Formă Convexă" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Can't create multiple convex collision shapes for the scene root." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Couldn't create any collision shapes." +msgstr "Nu s-a putut creea un contur!" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Multiple Convex Shapes" msgstr "Creează o Formă Convexă" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -6073,19 +6094,57 @@ msgid "Create Trimesh Static Body" msgstr "Creează un Corp Static Trimesh" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a StaticBody and assigns a polygon-based collision shape to it " +"automatically.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Trimesh Collision Sibling" msgstr "Creează un Frate de Coliziune Trimesh" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp #, fuzzy -msgid "Create Convex Collision Sibling(s)" +msgid "Create Single Convex Collision Siblings" msgstr "Creează un Frate de Coliziune Convex" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a single convex collision shape.\n" +"This is the fastest (but least accurate) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Multiple Convex Collision Siblings" +msgstr "Creează un Frate de Coliziune Convex" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is a performance middle-ground between the two above options." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Outline Mesh..." msgstr "Se Creează un Mesh de Contur..." #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a static outline mesh. The outline mesh will have its normals " +"flipped automatically.\n" +"This can be used instead of the SpatialMaterial Grow property when using " +"that property isn't possible." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "View UV1" msgstr "Vizionare UV1" @@ -8613,7 +8672,7 @@ msgstr "Set_de_Plăci..." msgid "No VCS addons are available." msgstr "" -#: editor/plugins/version_control_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/version_control_editor_plugin.cpp msgid "Error" msgstr "" @@ -9746,11 +9805,18 @@ msgid "Export With Debug" msgstr "" #: editor/project_manager.cpp -msgid "The path does not exist." -msgstr "" +#, fuzzy +msgid "The path specified doesn't exist." +msgstr "FiÈ™ierul nu există." + +#: editor/project_manager.cpp +#, fuzzy +msgid "Error opening package file (it's not in ZIP format)." +msgstr "Eroare la deschiderea fiÅŸierului pachet, nu este în format ZIP." #: editor/project_manager.cpp -msgid "Invalid '.zip' project file, does not contain a 'project.godot' file." +msgid "" +"Invalid \".zip\" project file; it doesn't contain a \"project.godot\" file." msgstr "" #: editor/project_manager.cpp @@ -9758,11 +9824,11 @@ msgid "Please choose an empty folder." msgstr "" #: editor/project_manager.cpp -msgid "Please choose a 'project.godot' or '.zip' file." +msgid "Please choose a \"project.godot\" or \".zip\" file." msgstr "" #: editor/project_manager.cpp -msgid "Directory already contains a Godot project." +msgid "This directory already contains a Godot project." msgstr "" #: editor/project_manager.cpp @@ -10430,6 +10496,11 @@ msgstr "" #: editor/rename_dialog.cpp #, fuzzy +msgid "Use Regular Expressions" +msgstr "Versiune Curentă:" + +#: editor/rename_dialog.cpp +#, fuzzy msgid "Advanced Options" msgstr "OpÈ›iuni Snapping" @@ -10468,7 +10539,7 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -msgid "Per Level counter" +msgid "Per-level Counter" msgstr "" #: editor/rename_dialog.cpp @@ -10499,10 +10570,6 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -msgid "Regular Expressions" -msgstr "" - -#: editor/rename_dialog.cpp msgid "Post-Process" msgstr "" @@ -10511,11 +10578,11 @@ msgid "Keep" msgstr "" #: editor/rename_dialog.cpp -msgid "CamelCase to under_scored" +msgid "PascalCase to snake_case" msgstr "" #: editor/rename_dialog.cpp -msgid "under_scored to CamelCase" +msgid "snake_case to PascalCase" msgstr "" #: editor/rename_dialog.cpp @@ -10535,6 +10602,15 @@ msgstr "" msgid "Reset" msgstr "ResetaÈ›i Zoom-area" +#: editor/rename_dialog.cpp +msgid "Regular Expression Error" +msgstr "" + +#: editor/rename_dialog.cpp +#, fuzzy +msgid "At character %s" +msgstr "Caractere valide:" + #: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp msgid "Reparent Node" msgstr "" @@ -11003,7 +11079,7 @@ msgstr "" #: editor/script_create_dialog.cpp #, fuzzy -msgid "Script is valid." +msgid "Script path/name is valid." msgstr "Arborele AnimaÈ›iei este valid." #: editor/script_create_dialog.cpp @@ -11109,6 +11185,10 @@ msgid "Copy Error" msgstr "" #: editor/script_editor_debugger.cpp +msgid "Video RAM" +msgstr "" + +#: editor/script_editor_debugger.cpp #, fuzzy msgid "Skip Breakpoints" msgstr "Șterge puncte" @@ -11158,10 +11238,6 @@ msgid "Total:" msgstr "" #: editor/script_editor_debugger.cpp -msgid "Video Mem" -msgstr "" - -#: editor/script_editor_debugger.cpp msgid "Resource Path" msgstr "" @@ -12726,6 +12802,12 @@ msgstr "" msgid "Constants cannot be modified." msgstr "" +#~ msgid "Replaced %d occurrence(s)." +#~ msgstr "ÃŽnlocuit %d potriviri." + +#~ msgid "Create Static Convex Body" +#~ msgstr "Creează un Corp Static Convex" + #~ msgid "" #~ "There are currently no tutorials for this class, you can [color=$color]" #~ "[url=$url]contribute one[/url][/color] or [color=$color][url=" diff --git a/editor/translations/ru.po b/editor/translations/ru.po index 9c56393ae8..d4efabc2cd 100644 --- a/editor/translations/ru.po +++ b/editor/translations/ru.po @@ -62,12 +62,14 @@ # Rei <clxgamer12@gmail.com>, 2019. # Vitaly <arkology11@gmail.com>, 2019. # Andy <8ofproject@gmail.com>, 2020. +# Ðндрей БелÑков <andbelandantrus@gmail.com>, 2020. +# Artur Tretiak <stikyt@protonmail.com>, 2020. msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2020-01-27 07:10+0000\n" -"Last-Translator: Danil Alexeev <danil@alexeev.xyz>\n" +"PO-Revision-Date: 2020-02-14 03:18+0000\n" +"Last-Translator: Artur Tretiak <stikyt@protonmail.com>\n" "Language-Team: Russian <https://hosted.weblate.org/projects/godot-engine/" "godot/ru/>\n" "Language: ru\n" @@ -223,9 +225,8 @@ msgid "Anim Multi Change Keyframe Time" msgstr "Ð’Ñ€ÐµÐ¼Ñ Ñмены ключевых кадров анимации" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Anim Multi Change Transition" -msgstr "ÐÐ½Ð¸Ð¼Ð°Ñ†Ð¸Ñ ÐœÐ½Ð¾Ð³Ð¾ÐºÑ€Ð°Ñ‚Ð½Ð¾Ðµ изменение Переход" +msgstr "Многократное изменение перехода" #: editor/animation_track_editor.cpp #, fuzzy @@ -233,9 +234,8 @@ msgid "Anim Multi Change Transform" msgstr "Ðнимационное многоÑменное преобразование" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Anim Multi Change Keyframe Value" -msgstr "ÐÐ½Ð¸Ð¼Ð°Ñ†Ð¸Ñ Ð¼Ð½Ð¾Ð³Ð¾ÐºÑ€Ð°Ñ‚Ð½Ð¾Ðµ изменение ключевых кадров Значение" +msgstr "Изменить значение ключевого кадра" #: editor/animation_track_editor.cpp msgid "Anim Multi Change Call" @@ -479,7 +479,6 @@ msgid "Not possible to add a new track without a root" msgstr "ÐÐµÐ»ÑŒÐ·Ñ Ð´Ð¾Ð±Ð°Ð²Ð¸Ñ‚ÑŒ новый трек без корневого узла" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Invalid track for Bezier (no suitable sub-properties)" msgstr "Ðеверный трек Ð´Ð»Ñ ÐºÑ€Ð¸Ð²Ð¾Ð¹ Безье (нет подходÑщих подÑвойÑтв)" @@ -749,8 +748,9 @@ msgid "Line Number:" msgstr "Ðомер Ñтроки:" #: editor/code_editor.cpp -msgid "Replaced %d occurrence(s)." -msgstr "Заменено %d Ñовпадений." +#, fuzzy +msgid "%d replaced." +msgstr "Заменить..." #: editor/code_editor.cpp editor/editor_help.cpp msgid "%d match." @@ -2007,14 +2007,12 @@ msgid "Properties" msgstr "СвойÑтва" #: editor/editor_help.cpp -#, fuzzy msgid "override:" -msgstr "Переопределить" +msgstr "Переопределить:" #: editor/editor_help.cpp -#, fuzzy msgid "default:" -msgstr "По умолчанию" +msgstr "По умолчанию:" #: editor/editor_help.cpp msgid "Methods" @@ -2037,9 +2035,8 @@ msgid "Property Descriptions" msgstr "ОпиÑание ÑвойÑтв" #: editor/editor_help.cpp -#, fuzzy msgid "(value)" -msgstr "Значение" +msgstr "(значение)" #: editor/editor_help.cpp msgid "" @@ -4016,6 +4013,11 @@ msgid "Saving..." msgstr "Сохранение..." #: editor/import_dock.cpp +#, fuzzy +msgid "%d Files" +msgstr " Файлы" + +#: editor/import_dock.cpp msgid "Set as Default for '%s'" msgstr "УÑтановить по умолчанию Ð´Ð»Ñ '%s'" @@ -4024,10 +4026,6 @@ msgid "Clear Default for '%s'" msgstr "ОчиÑтить по умолчанию Ð´Ð»Ñ '%s'" #: editor/import_dock.cpp -msgid " Files" -msgstr " Файлы" - -#: editor/import_dock.cpp msgid "Import As:" msgstr "Импортировать как:" @@ -5613,9 +5611,8 @@ msgid "Frame Selection" msgstr "Кадрировать выбранное" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Preview Canvas Scale" -msgstr "ПредпроÑмотр маÑштаба холÑта" +msgstr "МаÑштаб при проÑмотре холÑта" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Translation mask for inserting keys." @@ -5676,9 +5673,8 @@ msgid "Divide grid step by 2" msgstr "Разделить шаг Ñетки на 2" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Pan View" -msgstr "Вид Ñзади" +msgstr "Панорама" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Add %s" @@ -5772,7 +5768,7 @@ msgstr "Твёрдые пикÑели" #: editor/plugins/cpu_particles_2d_editor_plugin.cpp #: editor/plugins/particles_2d_editor_plugin.cpp msgid "Border Pixels" -msgstr "" +msgstr "Граничные пикÑели" #: editor/plugins/cpu_particles_2d_editor_plugin.cpp #: editor/plugins/particles_2d_editor_plugin.cpp @@ -5901,12 +5897,13 @@ msgid "Mesh is empty!" msgstr "ПолиÑетка пуÑта!" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Trimesh Body" -msgstr "Создать вогнутое Ñтатичное тело" +#, fuzzy +msgid "Couldn't create a Trimesh collision shape." +msgstr "Создать вогнутую облаÑть ÑтолкновениÑ" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Convex Body" -msgstr "Создать выпуклое Ñтатичное тело" +msgid "Create Static Trimesh Body" +msgstr "Создать вогнутое Ñтатичное тело" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "This doesn't work on scene root!" @@ -5918,11 +5915,30 @@ msgid "Create Trimesh Static Shape" msgstr "Создать вогнутую форму" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Failed creating shapes!" -msgstr "Ðе удалоÑÑŒ Ñоздать форму!" +msgid "Can't create a single convex collision shape for the scene root." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Couldn't create a single convex collision shape." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Single Convex Shape" +msgstr "Создать выпуклую форму(Ñ‹)" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Convex Shape(s)" +msgid "Can't create multiple convex collision shapes for the scene root." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Couldn't create any collision shapes." +msgstr "Ðе удалоÑÑŒ Ñоздать папку." + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Multiple Convex Shapes" msgstr "Создать выпуклую форму(Ñ‹)" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -5974,19 +5990,57 @@ msgid "Create Trimesh Static Body" msgstr "Создать вогнутое Ñтатичное тело" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a StaticBody and assigns a polygon-based collision shape to it " +"automatically.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Trimesh Collision Sibling" msgstr "Создать вогнутую облаÑть ÑтолкновениÑ" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Single Convex Collision Siblings" +msgstr "Создать выпуклую облаÑть ÑтолкновениÑ" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a single convex collision shape.\n" +"This is the fastest (but least accurate) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp #, fuzzy -msgid "Create Convex Collision Sibling(s)" +msgid "Create Multiple Convex Collision Siblings" msgstr "Создать выпуклую облаÑть ÑтолкновениÑ" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is a performance middle-ground between the two above options." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Outline Mesh..." msgstr "Создать полиÑетку обводки..." #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a static outline mesh. The outline mesh will have its normals " +"flipped automatically.\n" +"This can be used instead of the SpatialMaterial Grow property when using " +"that property isn't possible." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "View UV1" msgstr "ПроÑмотр UV1" @@ -6167,7 +6221,6 @@ msgid "The geometry's faces don't contain any area." msgstr "Грани данной геометрии не Ñодержат никакой облаÑти." #: editor/plugins/particles_editor_plugin.cpp -#, fuzzy msgid "The geometry doesn't contain any faces." msgstr "Ð”Ð°Ð½Ð½Ð°Ñ Ð³ÐµÐ¾Ð¼ÐµÑ‚Ñ€Ð¸Ñ Ð½Ðµ Ñодержит граней." @@ -8400,7 +8453,7 @@ msgstr "Ðабор тайлов" msgid "No VCS addons are available." msgstr "Ðет доÑтупных VCS плагинов." -#: editor/plugins/version_control_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/version_control_editor_plugin.cpp msgid "Error" msgstr "Ошибка" @@ -8453,9 +8506,8 @@ msgid "Deleted" msgstr "Удалён" #: editor/plugins/version_control_editor_plugin.cpp -#, fuzzy msgid "Typechange" -msgstr "Изменить" +msgstr "Изменить тип" #: editor/plugins/version_control_editor_plugin.cpp msgid "Stage Selected" @@ -9534,7 +9586,7 @@ msgstr "" #: editor/project_export.cpp msgid "Script Encryption Key (256-bits as hex):" -msgstr "Ключ ÑˆÐ¸Ñ„Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ Ñкрипта (256-бит, а в шеÑтнадцатеричном виде):" +msgstr "Ключ ÑˆÐ¸Ñ„Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ Ñкрипта (256-бит, в шеÑтнадцатеричном виде):" #: editor/project_export.cpp msgid "Export PCK/Zip" @@ -9573,11 +9625,19 @@ msgid "Export With Debug" msgstr "ÐкÑпорт в режиме отладки" #: editor/project_manager.cpp -msgid "The path does not exist." +#, fuzzy +msgid "The path specified doesn't exist." msgstr "Путь не ÑущеÑтвует." #: editor/project_manager.cpp -msgid "Invalid '.zip' project file, does not contain a 'project.godot' file." +#, fuzzy +msgid "Error opening package file (it's not in ZIP format)." +msgstr "Ошибка при открытии файла пакета, не в формате zip." + +#: editor/project_manager.cpp +#, fuzzy +msgid "" +"Invalid \".zip\" project file; it doesn't contain a \"project.godot\" file." msgstr "" "ÐедейÑтвительный '.zip' файл проекта, не Ñодержит файл 'project.godot'." @@ -9586,11 +9646,13 @@ msgid "Please choose an empty folder." msgstr "ПожалуйÑта, выберите пуÑтую папку." #: editor/project_manager.cpp -msgid "Please choose a 'project.godot' or '.zip' file." +#, fuzzy +msgid "Please choose a \"project.godot\" or \".zip\" file." msgstr "ПожалуйÑта, выберите файл 'project.godot' или '.zip'." #: editor/project_manager.cpp -msgid "Directory already contains a Godot project." +#, fuzzy +msgid "This directory already contains a Godot project." msgstr "Каталог уже Ñодержит проект Godot." #: editor/project_manager.cpp @@ -10288,6 +10350,11 @@ msgid "Suffix" msgstr "СуффикÑ" #: editor/rename_dialog.cpp +#, fuzzy +msgid "Use Regular Expressions" +msgstr "РегулÑрное выражение" + +#: editor/rename_dialog.cpp msgid "Advanced Options" msgstr "Дополнительные параметры" @@ -10324,7 +10391,8 @@ msgstr "" "Сравните параметры Ñчетчика." #: editor/rename_dialog.cpp -msgid "Per Level counter" +#, fuzzy +msgid "Per-level Counter" msgstr "Счетчик уровнÑ" #: editor/rename_dialog.cpp @@ -10358,10 +10426,6 @@ msgstr "" "ÐедоÑтающие цифры заполнÑÑŽÑ‚ÑÑ Ð½ÑƒÐ»Ñми." #: editor/rename_dialog.cpp -msgid "Regular Expressions" -msgstr "РегулÑрное выражение" - -#: editor/rename_dialog.cpp msgid "Post-Process" msgstr "ПоÑÑ‚-обработка" @@ -10370,11 +10434,13 @@ msgid "Keep" msgstr "ОÑтавить оригинал" #: editor/rename_dialog.cpp -msgid "CamelCase to under_scored" +#, fuzzy +msgid "PascalCase to snake_case" msgstr "CamelCase в under_scored" #: editor/rename_dialog.cpp -msgid "under_scored to CamelCase" +#, fuzzy +msgid "snake_case to PascalCase" msgstr "under_scored к CamelCase" #: editor/rename_dialog.cpp @@ -10393,6 +10459,16 @@ msgstr "Ð’ верхний региÑтр" msgid "Reset" msgstr "СброÑить" +#: editor/rename_dialog.cpp +#, fuzzy +msgid "Regular Expression Error" +msgstr "РегулÑрное выражение" + +#: editor/rename_dialog.cpp +#, fuzzy +msgid "At character %s" +msgstr "ДопуÑтимые Ñимволы:" + #: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp msgid "Reparent Node" msgstr "Переподчинить узел" @@ -10857,7 +10933,8 @@ msgid "Invalid inherited parent name or path." msgstr "Ðеверное Ð¸Ð¼Ñ Ð¸Ð»Ð¸ путь наÑледуемого предка." #: editor/script_create_dialog.cpp -msgid "Script is valid." +#, fuzzy +msgid "Script path/name is valid." msgstr "Скрипт корректен." #: editor/script_create_dialog.cpp @@ -10949,6 +11026,11 @@ msgid "Copy Error" msgstr "Копировать ошибку" #: editor/script_editor_debugger.cpp +#, fuzzy +msgid "Video RAM" +msgstr "Видео памÑть" + +#: editor/script_editor_debugger.cpp msgid "Skip Breakpoints" msgstr "ПропуÑтить точки оÑтанова" @@ -10998,10 +11080,6 @@ msgid "Total:" msgstr "Ð’Ñего:" #: editor/script_editor_debugger.cpp -msgid "Video Mem" -msgstr "Видео памÑть" - -#: editor/script_editor_debugger.cpp msgid "Resource Path" msgstr "Путь к реÑурÑу" @@ -11332,9 +11410,8 @@ msgid "Cursor Clear Rotation" msgstr "КурÑор очиÑтить поворот" #: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy msgid "Paste Selects" -msgstr "ОчиÑтить выделенное" +msgstr "Ð’Ñтавить выделение" #: modules/gridmap/grid_map_editor_plugin.cpp msgid "Clear Selection" @@ -11720,7 +11797,6 @@ msgid "Editing Signal:" msgstr "Редактирование Ñигнала:" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Make Tool:" msgstr "Сделать инÑтрументом:" @@ -12687,6 +12763,15 @@ msgstr "Ð˜Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ð¼Ð¾Ð³ÑƒÑ‚ быть назначены только Ð msgid "Constants cannot be modified." msgstr "КонÑтанты не могут быть изменены." +#~ msgid "Replaced %d occurrence(s)." +#~ msgstr "Заменено %d Ñовпадений." + +#~ msgid "Create Static Convex Body" +#~ msgstr "Создать выпуклое Ñтатичное тело" + +#~ msgid "Failed creating shapes!" +#~ msgstr "Ðе удалоÑÑŒ Ñоздать форму!" + #~ msgid "" #~ "There are currently no tutorials for this class, you can [color=$color]" #~ "[url=$url]contribute one[/url][/color] or [color=$color][url=" diff --git a/editor/translations/si.po b/editor/translations/si.po index bd57c6a782..15bc5975ef 100644 --- a/editor/translations/si.po +++ b/editor/translations/si.po @@ -687,7 +687,7 @@ msgid "Line Number:" msgstr "" #: editor/code_editor.cpp -msgid "Replaced %d occurrence(s)." +msgid "%d replaced." msgstr "" #: editor/code_editor.cpp editor/editor_help.cpp @@ -3828,15 +3828,15 @@ msgid "Saving..." msgstr "" #: editor/import_dock.cpp -msgid "Set as Default for '%s'" +msgid "%d Files" msgstr "" #: editor/import_dock.cpp -msgid "Clear Default for '%s'" +msgid "Set as Default for '%s'" msgstr "" #: editor/import_dock.cpp -msgid " Files" +msgid "Clear Default for '%s'" msgstr "" #: editor/import_dock.cpp @@ -5689,11 +5689,11 @@ msgid "Mesh is empty!" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Trimesh Body" +msgid "Couldn't create a Trimesh collision shape." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Convex Body" +msgid "Create Static Trimesh Body" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -5705,11 +5705,27 @@ msgid "Create Trimesh Static Shape" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Failed creating shapes!" +msgid "Can't create a single convex collision shape for the scene root." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Couldn't create a single convex collision shape." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Single Convex Shape" +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Can't create multiple convex collision shapes for the scene root." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Couldn't create any collision shapes." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Convex Shape(s)" +msgid "Create Multiple Convex Shapes" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -5761,11 +5777,40 @@ msgid "Create Trimesh Static Body" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a StaticBody and assigns a polygon-based collision shape to it " +"automatically.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Trimesh Collision Sibling" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Convex Collision Sibling(s)" +msgid "" +"Creates a polygon-based collision shape.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Single Convex Collision Siblings" +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a single convex collision shape.\n" +"This is the fastest (but least accurate) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Multiple Convex Collision Siblings" +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is a performance middle-ground between the two above options." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -5773,6 +5818,14 @@ msgid "Create Outline Mesh..." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a static outline mesh. The outline mesh will have its normals " +"flipped automatically.\n" +"This can be used instead of the SpatialMaterial Grow property when using " +"that property isn't possible." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "View UV1" msgstr "" @@ -8152,7 +8205,7 @@ msgstr "" msgid "No VCS addons are available." msgstr "" -#: editor/plugins/version_control_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/version_control_editor_plugin.cpp msgid "Error" msgstr "" @@ -9246,11 +9299,16 @@ msgid "Export With Debug" msgstr "" #: editor/project_manager.cpp -msgid "The path does not exist." +msgid "The path specified doesn't exist." +msgstr "" + +#: editor/project_manager.cpp +msgid "Error opening package file (it's not in ZIP format)." msgstr "" #: editor/project_manager.cpp -msgid "Invalid '.zip' project file, does not contain a 'project.godot' file." +msgid "" +"Invalid \".zip\" project file; it doesn't contain a \"project.godot\" file." msgstr "" #: editor/project_manager.cpp @@ -9258,11 +9316,11 @@ msgid "Please choose an empty folder." msgstr "" #: editor/project_manager.cpp -msgid "Please choose a 'project.godot' or '.zip' file." +msgid "Please choose a \"project.godot\" or \".zip\" file." msgstr "" #: editor/project_manager.cpp -msgid "Directory already contains a Godot project." +msgid "This directory already contains a Godot project." msgstr "" #: editor/project_manager.cpp @@ -9908,6 +9966,10 @@ msgid "Suffix" msgstr "" #: editor/rename_dialog.cpp +msgid "Use Regular Expressions" +msgstr "" + +#: editor/rename_dialog.cpp msgid "Advanced Options" msgstr "" @@ -9942,7 +10004,7 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -msgid "Per Level counter" +msgid "Per-level Counter" msgstr "" #: editor/rename_dialog.cpp @@ -9972,10 +10034,6 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -msgid "Regular Expressions" -msgstr "" - -#: editor/rename_dialog.cpp msgid "Post-Process" msgstr "" @@ -9984,11 +10042,11 @@ msgid "Keep" msgstr "" #: editor/rename_dialog.cpp -msgid "CamelCase to under_scored" +msgid "PascalCase to snake_case" msgstr "" #: editor/rename_dialog.cpp -msgid "under_scored to CamelCase" +msgid "snake_case to PascalCase" msgstr "" #: editor/rename_dialog.cpp @@ -10007,6 +10065,14 @@ msgstr "" msgid "Reset" msgstr "" +#: editor/rename_dialog.cpp +msgid "Regular Expression Error" +msgstr "" + +#: editor/rename_dialog.cpp +msgid "At character %s" +msgstr "" + #: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp msgid "Reparent Node" msgstr "" @@ -10449,7 +10515,7 @@ msgid "Invalid inherited parent name or path." msgstr "" #: editor/script_create_dialog.cpp -msgid "Script is valid." +msgid "Script path/name is valid." msgstr "" #: editor/script_create_dialog.cpp @@ -10542,6 +10608,10 @@ msgid "Copy Error" msgstr "" #: editor/script_editor_debugger.cpp +msgid "Video RAM" +msgstr "" + +#: editor/script_editor_debugger.cpp msgid "Skip Breakpoints" msgstr "" @@ -10590,10 +10660,6 @@ msgid "Total:" msgstr "" #: editor/script_editor_debugger.cpp -msgid "Video Mem" -msgstr "" - -#: editor/script_editor_debugger.cpp msgid "Resource Path" msgstr "" diff --git a/editor/translations/sk.po b/editor/translations/sk.po index a81d842616..709d2964ca 100644 --- a/editor/translations/sk.po +++ b/editor/translations/sk.po @@ -696,7 +696,7 @@ msgid "Line Number:" msgstr "" #: editor/code_editor.cpp -msgid "Replaced %d occurrence(s)." +msgid "%d replaced." msgstr "" #: editor/code_editor.cpp editor/editor_help.cpp @@ -3942,6 +3942,11 @@ msgid "Saving..." msgstr "" #: editor/import_dock.cpp +#, fuzzy +msgid "%d Files" +msgstr "Súbor:" + +#: editor/import_dock.cpp msgid "Set as Default for '%s'" msgstr "" @@ -3950,11 +3955,6 @@ msgid "Clear Default for '%s'" msgstr "" #: editor/import_dock.cpp -#, fuzzy -msgid " Files" -msgstr "Súbor:" - -#: editor/import_dock.cpp msgid "Import As:" msgstr "" @@ -5854,11 +5854,12 @@ msgid "Mesh is empty!" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Trimesh Body" -msgstr "" +#, fuzzy +msgid "Couldn't create a Trimesh collision shape." +msgstr "VytvoriÅ¥ adresár" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Convex Body" +msgid "Create Static Trimesh Body" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -5870,12 +5871,30 @@ msgid "Create Trimesh Static Shape" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Failed creating shapes!" +msgid "Can't create a single convex collision shape for the scene root." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Couldn't create a single convex collision shape." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Single Convex Shape" +msgstr "VytvoriÅ¥ adresár" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Can't create multiple convex collision shapes for the scene root." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp #, fuzzy -msgid "Create Convex Shape(s)" +msgid "Couldn't create any collision shapes." +msgstr "VytvoriÅ¥ adresár" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Multiple Convex Shapes" msgstr "VytvoriÅ¥ adresár" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -5927,19 +5946,57 @@ msgid "Create Trimesh Static Body" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a StaticBody and assigns a polygon-based collision shape to it " +"automatically.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Trimesh Collision Sibling" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp #, fuzzy -msgid "Create Convex Collision Sibling(s)" +msgid "Create Single Convex Collision Siblings" msgstr "VytvoriÅ¥ adresár" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a single convex collision shape.\n" +"This is the fastest (but least accurate) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Multiple Convex Collision Siblings" +msgstr "VytvoriÅ¥ adresár" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is a performance middle-ground between the two above options." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Outline Mesh..." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a static outline mesh. The outline mesh will have its normals " +"flipped automatically.\n" +"This can be used instead of the SpatialMaterial Grow property when using " +"that property isn't possible." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp #, fuzzy msgid "View UV1" msgstr "Súbor:" @@ -8413,7 +8470,7 @@ msgstr "Súbor:" msgid "No VCS addons are available." msgstr "" -#: editor/plugins/version_control_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/version_control_editor_plugin.cpp msgid "Error" msgstr "" @@ -9530,11 +9587,17 @@ msgid "Export With Debug" msgstr "" #: editor/project_manager.cpp -msgid "The path does not exist." +msgid "The path specified doesn't exist." msgstr "" #: editor/project_manager.cpp -msgid "Invalid '.zip' project file, does not contain a 'project.godot' file." +#, fuzzy +msgid "Error opening package file (it's not in ZIP format)." +msgstr "Chyba pri otváranà súboru balÃka, nie je vo formáte zip." + +#: editor/project_manager.cpp +msgid "" +"Invalid \".zip\" project file; it doesn't contain a \"project.godot\" file." msgstr "" #: editor/project_manager.cpp @@ -9542,11 +9605,11 @@ msgid "Please choose an empty folder." msgstr "" #: editor/project_manager.cpp -msgid "Please choose a 'project.godot' or '.zip' file." +msgid "Please choose a \"project.godot\" or \".zip\" file." msgstr "" #: editor/project_manager.cpp -msgid "Directory already contains a Godot project." +msgid "This directory already contains a Godot project." msgstr "" #: editor/project_manager.cpp @@ -10207,6 +10270,10 @@ msgid "Suffix" msgstr "" #: editor/rename_dialog.cpp +msgid "Use Regular Expressions" +msgstr "" + +#: editor/rename_dialog.cpp msgid "Advanced Options" msgstr "" @@ -10241,7 +10308,7 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -msgid "Per Level counter" +msgid "Per-level Counter" msgstr "" #: editor/rename_dialog.cpp @@ -10271,10 +10338,6 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -msgid "Regular Expressions" -msgstr "" - -#: editor/rename_dialog.cpp msgid "Post-Process" msgstr "" @@ -10283,11 +10346,11 @@ msgid "Keep" msgstr "" #: editor/rename_dialog.cpp -msgid "CamelCase to under_scored" +msgid "PascalCase to snake_case" msgstr "" #: editor/rename_dialog.cpp -msgid "under_scored to CamelCase" +msgid "snake_case to PascalCase" msgstr "" #: editor/rename_dialog.cpp @@ -10306,6 +10369,14 @@ msgstr "" msgid "Reset" msgstr "" +#: editor/rename_dialog.cpp +msgid "Regular Expression Error" +msgstr "" + +#: editor/rename_dialog.cpp +msgid "At character %s" +msgstr "" + #: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp msgid "Reparent Node" msgstr "" @@ -10763,7 +10834,7 @@ msgid "Invalid inherited parent name or path." msgstr "" #: editor/script_create_dialog.cpp -msgid "Script is valid." +msgid "Script path/name is valid." msgstr "" #: editor/script_create_dialog.cpp @@ -10866,6 +10937,10 @@ msgid "Copy Error" msgstr "" #: editor/script_editor_debugger.cpp +msgid "Video RAM" +msgstr "" + +#: editor/script_editor_debugger.cpp #, fuzzy msgid "Skip Breakpoints" msgstr "VÅ¡etky vybrané" @@ -10916,10 +10991,6 @@ msgid "Total:" msgstr "" #: editor/script_editor_debugger.cpp -msgid "Video Mem" -msgstr "" - -#: editor/script_editor_debugger.cpp msgid "Resource Path" msgstr "" diff --git a/editor/translations/sl.po b/editor/translations/sl.po index 6f63bb7483..3a30fcac1a 100644 --- a/editor/translations/sl.po +++ b/editor/translations/sl.po @@ -726,8 +726,9 @@ msgid "Line Number:" msgstr "Å tevilka Vrste:" #: editor/code_editor.cpp -msgid "Replaced %d occurrence(s)." -msgstr "Zamenjana %d ponovitev/e." +#, fuzzy +msgid "%d replaced." +msgstr "Zamenjaj" #: editor/code_editor.cpp editor/editor_help.cpp msgid "%d match." @@ -4124,6 +4125,11 @@ msgid "Saving..." msgstr "Shranjevanje..." #: editor/import_dock.cpp +#, fuzzy +msgid "%d Files" +msgstr " Datoteke" + +#: editor/import_dock.cpp msgid "Set as Default for '%s'" msgstr "Nastavi kot Privzeto za '%s'" @@ -4132,10 +4138,6 @@ msgid "Clear Default for '%s'" msgstr "PoÄisti privzeto za '%s'" #: editor/import_dock.cpp -msgid " Files" -msgstr " Datoteke" - -#: editor/import_dock.cpp msgid "Import As:" msgstr "Uvozi Kot:" @@ -6122,28 +6124,46 @@ msgid "Mesh is empty!" msgstr "Model je prazen!" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Couldn't create a Trimesh collision shape." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Static Trimesh Body" msgstr "Ustvari StatiÄno Telo TriModel" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Convex Body" +msgid "This doesn't work on scene root!" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "This doesn't work on scene root!" +msgid "Create Trimesh Static Shape" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Trimesh Static Shape" +msgid "Can't create a single convex collision shape for the scene root." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Failed creating shapes!" +msgid "Couldn't create a single convex collision shape." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp #, fuzzy -msgid "Create Convex Shape(s)" +msgid "Create Single Convex Shape" +msgstr "Ustvari Nov %s" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Can't create multiple convex collision shapes for the scene root." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Couldn't create any collision shapes." +msgstr "Mape ni mogoÄe ustvariti." + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Multiple Convex Shapes" msgstr "Ustvari Nov %s" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -6195,19 +6215,57 @@ msgid "Create Trimesh Static Body" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a StaticBody and assigns a polygon-based collision shape to it " +"automatically.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Trimesh Collision Sibling" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp #, fuzzy -msgid "Create Convex Collision Sibling(s)" +msgid "Create Single Convex Collision Siblings" msgstr "Ustvarite Poligon" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a single convex collision shape.\n" +"This is the fastest (but least accurate) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Multiple Convex Collision Siblings" +msgstr "Ustvarite Poligon" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is a performance middle-ground between the two above options." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Outline Mesh..." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a static outline mesh. The outline mesh will have its normals " +"flipped automatically.\n" +"This can be used instead of the SpatialMaterial Grow property when using " +"that property isn't possible." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "View UV1" msgstr "" @@ -8725,7 +8783,7 @@ msgstr "Izvozi PloÅ¡Äno Zbirko" msgid "No VCS addons are available." msgstr "" -#: editor/plugins/version_control_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/version_control_editor_plugin.cpp msgid "Error" msgstr "" @@ -9858,11 +9916,18 @@ msgid "Export With Debug" msgstr "" #: editor/project_manager.cpp -msgid "The path does not exist." -msgstr "" +#, fuzzy +msgid "The path specified doesn't exist." +msgstr "Datoteka ne obstaja." + +#: editor/project_manager.cpp +#, fuzzy +msgid "Error opening package file (it's not in ZIP format)." +msgstr "Napaka pri odpiranju datoteke paketa, ker ni v formatu zip." #: editor/project_manager.cpp -msgid "Invalid '.zip' project file, does not contain a 'project.godot' file." +msgid "" +"Invalid \".zip\" project file; it doesn't contain a \"project.godot\" file." msgstr "" #: editor/project_manager.cpp @@ -9871,11 +9936,11 @@ msgstr "Izberite prazno mapo." #: editor/project_manager.cpp #, fuzzy -msgid "Please choose a 'project.godot' or '.zip' file." +msgid "Please choose a \"project.godot\" or \".zip\" file." msgstr "Izberite datoteko 'projekt.godot'." #: editor/project_manager.cpp -msgid "Directory already contains a Godot project." +msgid "This directory already contains a Godot project." msgstr "" #: editor/project_manager.cpp @@ -10539,6 +10604,11 @@ msgstr "" #: editor/rename_dialog.cpp #, fuzzy +msgid "Use Regular Expressions" +msgstr "Trenutna RazliÄica:" + +#: editor/rename_dialog.cpp +#, fuzzy msgid "Advanced Options" msgstr "Možnosti pripenjanja" @@ -10577,7 +10647,7 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -msgid "Per Level counter" +msgid "Per-level Counter" msgstr "" #: editor/rename_dialog.cpp @@ -10608,10 +10678,6 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -msgid "Regular Expressions" -msgstr "" - -#: editor/rename_dialog.cpp msgid "Post-Process" msgstr "" @@ -10620,11 +10686,11 @@ msgid "Keep" msgstr "" #: editor/rename_dialog.cpp -msgid "CamelCase to under_scored" +msgid "PascalCase to snake_case" msgstr "" #: editor/rename_dialog.cpp -msgid "under_scored to CamelCase" +msgid "snake_case to PascalCase" msgstr "" #: editor/rename_dialog.cpp @@ -10644,6 +10710,15 @@ msgstr "" msgid "Reset" msgstr "Ponastavi PoveÄavo/PomanjÅ¡avo" +#: editor/rename_dialog.cpp +msgid "Regular Expression Error" +msgstr "" + +#: editor/rename_dialog.cpp +#, fuzzy +msgid "At character %s" +msgstr "Veljavni znaki:" + #: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp msgid "Reparent Node" msgstr "" @@ -11112,7 +11187,7 @@ msgstr "Neveljaveno prevzeto ime ali pot nadrejenega" #: editor/script_create_dialog.cpp #, fuzzy -msgid "Script is valid." +msgid "Script path/name is valid." msgstr "Drevo animacije je veljavno." #: editor/script_create_dialog.cpp @@ -11218,6 +11293,10 @@ msgid "Copy Error" msgstr "" #: editor/script_editor_debugger.cpp +msgid "Video RAM" +msgstr "" + +#: editor/script_editor_debugger.cpp #, fuzzy msgid "Skip Breakpoints" msgstr "IzbriÅ¡i toÄke" @@ -11268,10 +11347,6 @@ msgid "Total:" msgstr "" #: editor/script_editor_debugger.cpp -msgid "Video Mem" -msgstr "" - -#: editor/script_editor_debugger.cpp msgid "Resource Path" msgstr "" @@ -12876,6 +12951,9 @@ msgstr "" msgid "Constants cannot be modified." msgstr "Konstante ni možno spreminjati." +#~ msgid "Replaced %d occurrence(s)." +#~ msgstr "Zamenjana %d ponovitev/e." + #~ msgid "" #~ "There are currently no tutorials for this class, you can [color=$color]" #~ "[url=$url]contribute one[/url][/color] or [color=$color][url=" diff --git a/editor/translations/sq.po b/editor/translations/sq.po index 3c55191a34..65ea4fdb56 100644 --- a/editor/translations/sq.po +++ b/editor/translations/sq.po @@ -673,8 +673,9 @@ msgid "Line Number:" msgstr "" #: editor/code_editor.cpp -msgid "Replaced %d occurrence(s)." -msgstr "" +#, fuzzy +msgid "%d replaced." +msgstr "Zëvendëso..." #: editor/code_editor.cpp editor/editor_help.cpp msgid "%d match." @@ -4035,6 +4036,11 @@ msgid "Saving..." msgstr "Duke Ruajtur..." #: editor/import_dock.cpp +#, fuzzy +msgid "%d Files" +msgstr " Skedarët" + +#: editor/import_dock.cpp msgid "Set as Default for '%s'" msgstr "Vendos si të Parazgjedhur për '%s'" @@ -4043,10 +4049,6 @@ msgid "Clear Default for '%s'" msgstr "Pastro të Parazgjedhurat për '%s'" #: editor/import_dock.cpp -msgid " Files" -msgstr " Skedarët" - -#: editor/import_dock.cpp msgid "Import As:" msgstr "Importo Si:" @@ -5912,11 +5914,11 @@ msgid "Mesh is empty!" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Trimesh Body" +msgid "Couldn't create a Trimesh collision shape." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Convex Body" +msgid "Create Static Trimesh Body" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -5928,11 +5930,28 @@ msgid "Create Trimesh Static Shape" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Failed creating shapes!" +msgid "Can't create a single convex collision shape for the scene root." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Couldn't create a single convex collision shape." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Convex Shape(s)" +msgid "Create Single Convex Shape" +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Can't create multiple convex collision shapes for the scene root." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Couldn't create any collision shapes." +msgstr "Nuk mund të krijoj folderin." + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Multiple Convex Shapes" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -5984,19 +6003,57 @@ msgid "Create Trimesh Static Body" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a StaticBody and assigns a polygon-based collision shape to it " +"automatically.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Trimesh Collision Sibling" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Single Convex Collision Siblings" +msgstr "Krijo një Poligon" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a single convex collision shape.\n" +"This is the fastest (but least accurate) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp #, fuzzy -msgid "Create Convex Collision Sibling(s)" +msgid "Create Multiple Convex Collision Siblings" msgstr "Krijo një Poligon" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is a performance middle-ground between the two above options." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Outline Mesh..." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a static outline mesh. The outline mesh will have its normals " +"flipped automatically.\n" +"This can be used instead of the SpatialMaterial Grow property when using " +"that property isn't possible." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "View UV1" msgstr "" @@ -8402,7 +8459,7 @@ msgstr "" msgid "No VCS addons are available." msgstr "" -#: editor/plugins/version_control_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/version_control_editor_plugin.cpp msgid "Error" msgstr "" @@ -9510,11 +9567,18 @@ msgid "Export With Debug" msgstr "" #: editor/project_manager.cpp -msgid "The path does not exist." -msgstr "" +#, fuzzy +msgid "The path specified doesn't exist." +msgstr "Skedari nuk egziston." + +#: editor/project_manager.cpp +#, fuzzy +msgid "Error opening package file (it's not in ZIP format)." +msgstr "Gabim në hapjen e skedarit paketë, nuk është në formatin zip." #: editor/project_manager.cpp -msgid "Invalid '.zip' project file, does not contain a 'project.godot' file." +msgid "" +"Invalid \".zip\" project file; it doesn't contain a \"project.godot\" file." msgstr "" #: editor/project_manager.cpp @@ -9522,11 +9586,11 @@ msgid "Please choose an empty folder." msgstr "" #: editor/project_manager.cpp -msgid "Please choose a 'project.godot' or '.zip' file." +msgid "Please choose a \"project.godot\" or \".zip\" file." msgstr "" #: editor/project_manager.cpp -msgid "Directory already contains a Godot project." +msgid "This directory already contains a Godot project." msgstr "" #: editor/project_manager.cpp @@ -10180,6 +10244,11 @@ msgid "Suffix" msgstr "" #: editor/rename_dialog.cpp +#, fuzzy +msgid "Use Regular Expressions" +msgstr "Versioni Aktual:" + +#: editor/rename_dialog.cpp msgid "Advanced Options" msgstr "" @@ -10214,7 +10283,7 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -msgid "Per Level counter" +msgid "Per-level Counter" msgstr "" #: editor/rename_dialog.cpp @@ -10244,10 +10313,6 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -msgid "Regular Expressions" -msgstr "" - -#: editor/rename_dialog.cpp msgid "Post-Process" msgstr "" @@ -10256,11 +10321,11 @@ msgid "Keep" msgstr "" #: editor/rename_dialog.cpp -msgid "CamelCase to under_scored" +msgid "PascalCase to snake_case" msgstr "" #: editor/rename_dialog.cpp -msgid "under_scored to CamelCase" +msgid "snake_case to PascalCase" msgstr "" #: editor/rename_dialog.cpp @@ -10279,6 +10344,15 @@ msgstr "" msgid "Reset" msgstr "" +#: editor/rename_dialog.cpp +msgid "Regular Expression Error" +msgstr "" + +#: editor/rename_dialog.cpp +#, fuzzy +msgid "At character %s" +msgstr "Karakteret e lejuar:" + #: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp msgid "Reparent Node" msgstr "" @@ -10735,7 +10809,7 @@ msgid "Invalid inherited parent name or path." msgstr "" #: editor/script_create_dialog.cpp -msgid "Script is valid." +msgid "Script path/name is valid." msgstr "" #: editor/script_create_dialog.cpp @@ -10838,6 +10912,10 @@ msgid "Copy Error" msgstr "" #: editor/script_editor_debugger.cpp +msgid "Video RAM" +msgstr "" + +#: editor/script_editor_debugger.cpp #, fuzzy msgid "Skip Breakpoints" msgstr "Krijo pika." @@ -10888,10 +10966,6 @@ msgid "Total:" msgstr "" #: editor/script_editor_debugger.cpp -msgid "Video Mem" -msgstr "" - -#: editor/script_editor_debugger.cpp msgid "Resource Path" msgstr "" diff --git a/editor/translations/sr_Cyrl.po b/editor/translations/sr_Cyrl.po index 366c12b77c..7b6f9a73b1 100644 --- a/editor/translations/sr_Cyrl.po +++ b/editor/translations/sr_Cyrl.po @@ -722,8 +722,9 @@ msgid "Line Number:" msgstr "Број линије:" #: editor/code_editor.cpp -msgid "Replaced %d occurrence(s)." -msgstr "Замени %d појаве/а." +#, fuzzy +msgid "%d replaced." +msgstr "Замени..." #: editor/code_editor.cpp editor/editor_help.cpp msgid "%d match." @@ -4150,6 +4151,11 @@ msgid "Saving..." msgstr "Чување..." #: editor/import_dock.cpp +#, fuzzy +msgid "%d Files" +msgstr " Датотеке" + +#: editor/import_dock.cpp msgid "Set as Default for '%s'" msgstr "ПоÑтави као уобичајено за „%s“" @@ -4158,10 +4164,6 @@ msgid "Clear Default for '%s'" msgstr "Обриши уобичајено за „%s“" #: editor/import_dock.cpp -msgid " Files" -msgstr " Датотеке" - -#: editor/import_dock.cpp msgid "Import As:" msgstr "Увези као:" @@ -6152,12 +6154,13 @@ msgid "Mesh is empty!" msgstr "Мрежа је празна!" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Trimesh Body" -msgstr "Ðаправи Ñтатичо тело од троуглова" +#, fuzzy +msgid "Couldn't create a Trimesh collision shape." +msgstr "Ðаправи троуглаÑтог Ñударног брата" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Convex Body" -msgstr "Ðаправи конвекÑно Ñтатичко тело" +msgid "Create Static Trimesh Body" +msgstr "Ðаправи Ñтатичо тело од троуглова" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "This doesn't work on scene root!" @@ -6169,12 +6172,30 @@ msgid "Create Trimesh Static Shape" msgstr "Ðаправи фигуру од троуглова" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Failed creating shapes!" +msgid "Can't create a single convex collision shape for the scene root." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Couldn't create a single convex collision shape." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp #, fuzzy -msgid "Create Convex Shape(s)" +msgid "Create Single Convex Shape" +msgstr "Ðаправи конвекÑну фигуру" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Can't create multiple convex collision shapes for the scene root." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Couldn't create any collision shapes." +msgstr "ÐеуÑпех при прављењу директоријума." + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Multiple Convex Shapes" msgstr "Ðаправи конвекÑну фигуру" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -6226,19 +6247,57 @@ msgid "Create Trimesh Static Body" msgstr "Ðаправи троуглаÑто Ñтатично тело" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a StaticBody and assigns a polygon-based collision shape to it " +"automatically.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Trimesh Collision Sibling" msgstr "Ðаправи троуглаÑтог Ñударног брата" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Single Convex Collision Siblings" +msgstr "Ðаправи конвекÑног Ñударног брата" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a single convex collision shape.\n" +"This is the fastest (but least accurate) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp #, fuzzy -msgid "Create Convex Collision Sibling(s)" +msgid "Create Multiple Convex Collision Siblings" msgstr "Ðаправи конвекÑног Ñударног брата" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is a performance middle-ground between the two above options." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Outline Mesh..." msgstr "Ðаправи ивичну мрежу..." #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a static outline mesh. The outline mesh will have its normals " +"flipped automatically.\n" +"This can be used instead of the SpatialMaterial Grow property when using " +"that property isn't possible." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp #, fuzzy msgid "View UV1" msgstr "Поглед" @@ -8819,7 +8878,7 @@ msgstr "TileSet..." msgid "No VCS addons are available." msgstr "" -#: editor/plugins/version_control_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/version_control_editor_plugin.cpp msgid "Error" msgstr "Грешка" @@ -9977,11 +10036,18 @@ msgid "Export With Debug" msgstr "" #: editor/project_manager.cpp -msgid "The path does not exist." +#, fuzzy +msgid "The path specified doesn't exist." msgstr "Путања не поÑтоји." #: editor/project_manager.cpp -msgid "Invalid '.zip' project file, does not contain a 'project.godot' file." +#, fuzzy +msgid "Error opening package file (it's not in ZIP format)." +msgstr "Грешка при отварању датотеку пакета. Датотека није zip формата." + +#: editor/project_manager.cpp +msgid "" +"Invalid \".zip\" project file; it doesn't contain a \"project.godot\" file." msgstr "" #: editor/project_manager.cpp @@ -9989,11 +10055,11 @@ msgid "Please choose an empty folder." msgstr "" #: editor/project_manager.cpp -msgid "Please choose a 'project.godot' or '.zip' file." +msgid "Please choose a \"project.godot\" or \".zip\" file." msgstr "" #: editor/project_manager.cpp -msgid "Directory already contains a Godot project." +msgid "This directory already contains a Godot project." msgstr "" #: editor/project_manager.cpp @@ -10661,6 +10727,11 @@ msgstr "" #: editor/rename_dialog.cpp #, fuzzy +msgid "Use Regular Expressions" +msgstr "ПоÑтави правоугаони регион" + +#: editor/rename_dialog.cpp +#, fuzzy msgid "Advanced Options" msgstr "ПоÑтавке залепљавања" @@ -10699,7 +10770,7 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -msgid "Per Level counter" +msgid "Per-level Counter" msgstr "" #: editor/rename_dialog.cpp @@ -10730,10 +10801,6 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -msgid "Regular Expressions" -msgstr "" - -#: editor/rename_dialog.cpp msgid "Post-Process" msgstr "" @@ -10742,11 +10809,11 @@ msgid "Keep" msgstr "" #: editor/rename_dialog.cpp -msgid "CamelCase to under_scored" +msgid "PascalCase to snake_case" msgstr "" #: editor/rename_dialog.cpp -msgid "under_scored to CamelCase" +msgid "snake_case to PascalCase" msgstr "" #: editor/rename_dialog.cpp @@ -10768,6 +10835,15 @@ msgstr "Велика Ñлова" msgid "Reset" msgstr "РеÑетуј увеличање" +#: editor/rename_dialog.cpp +msgid "Regular Expression Error" +msgstr "" + +#: editor/rename_dialog.cpp +#, fuzzy +msgid "At character %s" +msgstr "Важећа Ñлова:" + #: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp msgid "Reparent Node" msgstr "" @@ -11239,7 +11315,7 @@ msgstr "" #: editor/script_create_dialog.cpp #, fuzzy -msgid "Script is valid." +msgid "Script path/name is valid." msgstr "Ðнимационо дрво је важеће." #: editor/script_create_dialog.cpp @@ -11352,6 +11428,10 @@ msgid "Copy Error" msgstr "Учитај грешке" #: editor/script_editor_debugger.cpp +msgid "Video RAM" +msgstr "" + +#: editor/script_editor_debugger.cpp #, fuzzy msgid "Skip Breakpoints" msgstr "Обриши тачке" @@ -11402,10 +11482,6 @@ msgid "Total:" msgstr "" #: editor/script_editor_debugger.cpp -msgid "Video Mem" -msgstr "" - -#: editor/script_editor_debugger.cpp msgid "Resource Path" msgstr "" @@ -12981,6 +13057,12 @@ msgstr "" msgid "Constants cannot be modified." msgstr "" +#~ msgid "Replaced %d occurrence(s)." +#~ msgstr "Замени %d појаве/а." + +#~ msgid "Create Static Convex Body" +#~ msgstr "Ðаправи конвекÑно Ñтатичко тело" + #, fuzzy #~ msgid "" #~ "There are currently no tutorials for this class, you can [color=$color]" diff --git a/editor/translations/sr_Latn.po b/editor/translations/sr_Latn.po index e55a90f6f8..3bbd854cb0 100644 --- a/editor/translations/sr_Latn.po +++ b/editor/translations/sr_Latn.po @@ -696,7 +696,7 @@ msgid "Line Number:" msgstr "" #: editor/code_editor.cpp -msgid "Replaced %d occurrence(s)." +msgid "%d replaced." msgstr "" #: editor/code_editor.cpp editor/editor_help.cpp @@ -3845,15 +3845,15 @@ msgid "Saving..." msgstr "" #: editor/import_dock.cpp -msgid "Set as Default for '%s'" +msgid "%d Files" msgstr "" #: editor/import_dock.cpp -msgid "Clear Default for '%s'" +msgid "Set as Default for '%s'" msgstr "" #: editor/import_dock.cpp -msgid " Files" +msgid "Clear Default for '%s'" msgstr "" #: editor/import_dock.cpp @@ -5718,11 +5718,11 @@ msgid "Mesh is empty!" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Trimesh Body" +msgid "Couldn't create a Trimesh collision shape." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Convex Body" +msgid "Create Static Trimesh Body" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -5734,11 +5734,27 @@ msgid "Create Trimesh Static Shape" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Failed creating shapes!" +msgid "Can't create a single convex collision shape for the scene root." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Couldn't create a single convex collision shape." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Convex Shape(s)" +msgid "Create Single Convex Shape" +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Can't create multiple convex collision shapes for the scene root." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Couldn't create any collision shapes." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Multiple Convex Shapes" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -5790,19 +5806,57 @@ msgid "Create Trimesh Static Body" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a StaticBody and assigns a polygon-based collision shape to it " +"automatically.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Trimesh Collision Sibling" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp #, fuzzy -msgid "Create Convex Collision Sibling(s)" +msgid "Create Single Convex Collision Siblings" msgstr "Napravi" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a single convex collision shape.\n" +"This is the fastest (but least accurate) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Multiple Convex Collision Siblings" +msgstr "Napravi" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is a performance middle-ground between the two above options." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Outline Mesh..." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a static outline mesh. The outline mesh will have its normals " +"flipped automatically.\n" +"This can be used instead of the SpatialMaterial Grow property when using " +"that property isn't possible." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "View UV1" msgstr "" @@ -8219,7 +8273,7 @@ msgstr "" msgid "No VCS addons are available." msgstr "" -#: editor/plugins/version_control_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/version_control_editor_plugin.cpp msgid "Error" msgstr "" @@ -9320,11 +9374,16 @@ msgid "Export With Debug" msgstr "" #: editor/project_manager.cpp -msgid "The path does not exist." +msgid "The path specified doesn't exist." +msgstr "" + +#: editor/project_manager.cpp +msgid "Error opening package file (it's not in ZIP format)." msgstr "" #: editor/project_manager.cpp -msgid "Invalid '.zip' project file, does not contain a 'project.godot' file." +msgid "" +"Invalid \".zip\" project file; it doesn't contain a \"project.godot\" file." msgstr "" #: editor/project_manager.cpp @@ -9332,11 +9391,11 @@ msgid "Please choose an empty folder." msgstr "" #: editor/project_manager.cpp -msgid "Please choose a 'project.godot' or '.zip' file." +msgid "Please choose a \"project.godot\" or \".zip\" file." msgstr "" #: editor/project_manager.cpp -msgid "Directory already contains a Godot project." +msgid "This directory already contains a Godot project." msgstr "" #: editor/project_manager.cpp @@ -9986,6 +10045,10 @@ msgid "Suffix" msgstr "" #: editor/rename_dialog.cpp +msgid "Use Regular Expressions" +msgstr "" + +#: editor/rename_dialog.cpp msgid "Advanced Options" msgstr "" @@ -10020,7 +10083,7 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -msgid "Per Level counter" +msgid "Per-level Counter" msgstr "" #: editor/rename_dialog.cpp @@ -10050,10 +10113,6 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -msgid "Regular Expressions" -msgstr "" - -#: editor/rename_dialog.cpp msgid "Post-Process" msgstr "" @@ -10062,11 +10121,11 @@ msgid "Keep" msgstr "" #: editor/rename_dialog.cpp -msgid "CamelCase to under_scored" +msgid "PascalCase to snake_case" msgstr "" #: editor/rename_dialog.cpp -msgid "under_scored to CamelCase" +msgid "snake_case to PascalCase" msgstr "" #: editor/rename_dialog.cpp @@ -10085,6 +10144,14 @@ msgstr "" msgid "Reset" msgstr "" +#: editor/rename_dialog.cpp +msgid "Regular Expression Error" +msgstr "" + +#: editor/rename_dialog.cpp +msgid "At character %s" +msgstr "" + #: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp msgid "Reparent Node" msgstr "" @@ -10529,7 +10596,7 @@ msgid "Invalid inherited parent name or path." msgstr "" #: editor/script_create_dialog.cpp -msgid "Script is valid." +msgid "Script path/name is valid." msgstr "" #: editor/script_create_dialog.cpp @@ -10623,6 +10690,10 @@ msgid "Copy Error" msgstr "" #: editor/script_editor_debugger.cpp +msgid "Video RAM" +msgstr "" + +#: editor/script_editor_debugger.cpp #, fuzzy msgid "Skip Breakpoints" msgstr "Napravi" @@ -10672,10 +10743,6 @@ msgid "Total:" msgstr "" #: editor/script_editor_debugger.cpp -msgid "Video Mem" -msgstr "" - -#: editor/script_editor_debugger.cpp msgid "Resource Path" msgstr "" diff --git a/editor/translations/sv.po b/editor/translations/sv.po index 0da6531121..0c35991d32 100644 --- a/editor/translations/sv.po +++ b/editor/translations/sv.po @@ -709,8 +709,9 @@ msgid "Line Number:" msgstr "Radnummer:" #: editor/code_editor.cpp -msgid "Replaced %d occurrence(s)." -msgstr "Ersatte %d förekomst(er)." +#, fuzzy +msgid "%d replaced." +msgstr "Ersätt..." #: editor/code_editor.cpp editor/editor_help.cpp msgid "%d match." @@ -4109,6 +4110,10 @@ msgid "Saving..." msgstr "Sparar..." #: editor/import_dock.cpp +msgid "%d Files" +msgstr "%d Filer" + +#: editor/import_dock.cpp msgid "Set as Default for '%s'" msgstr "Ange som Standard för '%s'" @@ -4117,10 +4122,6 @@ msgid "Clear Default for '%s'" msgstr "Rensa Standarden för '%s'" #: editor/import_dock.cpp -msgid " Files" -msgstr "" - -#: editor/import_dock.cpp msgid "Import As:" msgstr "Importera Som:" @@ -6069,11 +6070,12 @@ msgid "Mesh is empty!" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Trimesh Body" -msgstr "" +#, fuzzy +msgid "Couldn't create a Trimesh collision shape." +msgstr "Kunde inte skapa mapp." #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Convex Body" +msgid "Create Static Trimesh Body" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -6085,12 +6087,30 @@ msgid "Create Trimesh Static Shape" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Failed creating shapes!" +msgid "Can't create a single convex collision shape for the scene root." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Couldn't create a single convex collision shape." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp #, fuzzy -msgid "Create Convex Shape(s)" +msgid "Create Single Convex Shape" +msgstr "Skapa Ny" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Can't create multiple convex collision shapes for the scene root." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Couldn't create any collision shapes." +msgstr "Kunde inte skapa mapp." + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Multiple Convex Shapes" msgstr "Skapa Ny" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -6142,19 +6162,57 @@ msgid "Create Trimesh Static Body" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a StaticBody and assigns a polygon-based collision shape to it " +"automatically.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Trimesh Collision Sibling" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Single Convex Collision Siblings" +msgstr "Skapa Prenumeration" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a single convex collision shape.\n" +"This is the fastest (but least accurate) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp #, fuzzy -msgid "Create Convex Collision Sibling(s)" +msgid "Create Multiple Convex Collision Siblings" msgstr "Skapa Prenumeration" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is a performance middle-ground between the two above options." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Outline Mesh..." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a static outline mesh. The outline mesh will have its normals " +"flipped automatically.\n" +"This can be used instead of the SpatialMaterial Grow property when using " +"that property isn't possible." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp #, fuzzy msgid "View UV1" msgstr "Visa" @@ -8669,7 +8727,7 @@ msgstr "TileSet..." msgid "No VCS addons are available." msgstr "" -#: editor/plugins/version_control_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/version_control_editor_plugin.cpp msgid "Error" msgstr "Fel" @@ -9797,11 +9855,18 @@ msgid "Export With Debug" msgstr "" #: editor/project_manager.cpp -msgid "The path does not exist." +#, fuzzy +msgid "The path specified doesn't exist." msgstr "Sökvägen finns inte." #: editor/project_manager.cpp -msgid "Invalid '.zip' project file, does not contain a 'project.godot' file." +#, fuzzy +msgid "Error opening package file (it's not in ZIP format)." +msgstr "Fel vid öppning av paketetfil, inte i zip-format." + +#: editor/project_manager.cpp +msgid "" +"Invalid \".zip\" project file; it doesn't contain a \"project.godot\" file." msgstr "" #: editor/project_manager.cpp @@ -9809,11 +9874,11 @@ msgid "Please choose an empty folder." msgstr "" #: editor/project_manager.cpp -msgid "Please choose a 'project.godot' or '.zip' file." +msgid "Please choose a \"project.godot\" or \".zip\" file." msgstr "" #: editor/project_manager.cpp -msgid "Directory already contains a Godot project." +msgid "This directory already contains a Godot project." msgstr "" #: editor/project_manager.cpp @@ -10482,6 +10547,11 @@ msgstr "" #: editor/rename_dialog.cpp #, fuzzy +msgid "Use Regular Expressions" +msgstr "Nuvarande Version:" + +#: editor/rename_dialog.cpp +#, fuzzy msgid "Advanced Options" msgstr "Alternativ" @@ -10520,7 +10590,7 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -msgid "Per Level counter" +msgid "Per-level Counter" msgstr "" #: editor/rename_dialog.cpp @@ -10551,10 +10621,6 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -msgid "Regular Expressions" -msgstr "" - -#: editor/rename_dialog.cpp msgid "Post-Process" msgstr "" @@ -10563,11 +10629,11 @@ msgid "Keep" msgstr "" #: editor/rename_dialog.cpp -msgid "CamelCase to under_scored" +msgid "PascalCase to snake_case" msgstr "" #: editor/rename_dialog.cpp -msgid "under_scored to CamelCase" +msgid "snake_case to PascalCase" msgstr "" #: editor/rename_dialog.cpp @@ -10589,6 +10655,15 @@ msgstr "Versaler" msgid "Reset" msgstr "Ã…terställ Zoom" +#: editor/rename_dialog.cpp +msgid "Regular Expression Error" +msgstr "" + +#: editor/rename_dialog.cpp +#, fuzzy +msgid "At character %s" +msgstr "Giltiga tecken:" + #: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp msgid "Reparent Node" msgstr "Byt Förälder-Node" @@ -11062,7 +11137,7 @@ msgstr "" #: editor/script_create_dialog.cpp #, fuzzy -msgid "Script is valid." +msgid "Script path/name is valid." msgstr "Skript giltigt" #: editor/script_create_dialog.cpp @@ -11170,6 +11245,10 @@ msgid "Copy Error" msgstr "Fel" #: editor/script_editor_debugger.cpp +msgid "Video RAM" +msgstr "" + +#: editor/script_editor_debugger.cpp #, fuzzy msgid "Skip Breakpoints" msgstr "Radera punkter" @@ -11219,10 +11298,6 @@ msgid "Total:" msgstr "Totalt:" #: editor/script_editor_debugger.cpp -msgid "Video Mem" -msgstr "" - -#: editor/script_editor_debugger.cpp msgid "Resource Path" msgstr "" @@ -12822,6 +12897,9 @@ msgstr "" msgid "Constants cannot be modified." msgstr "" +#~ msgid "Replaced %d occurrence(s)." +#~ msgstr "Ersatte %d förekomst(er)." + #, fuzzy #~ msgid "" #~ "There are currently no tutorials for this class, you can [color=$color]" diff --git a/editor/translations/ta.po b/editor/translations/ta.po index 0c08e2f565..ae6b41bf5c 100644 --- a/editor/translations/ta.po +++ b/editor/translations/ta.po @@ -688,7 +688,7 @@ msgid "Line Number:" msgstr "" #: editor/code_editor.cpp -msgid "Replaced %d occurrence(s)." +msgid "%d replaced." msgstr "" #: editor/code_editor.cpp editor/editor_help.cpp @@ -3832,15 +3832,15 @@ msgid "Saving..." msgstr "" #: editor/import_dock.cpp -msgid "Set as Default for '%s'" +msgid "%d Files" msgstr "" #: editor/import_dock.cpp -msgid "Clear Default for '%s'" +msgid "Set as Default for '%s'" msgstr "" #: editor/import_dock.cpp -msgid " Files" +msgid "Clear Default for '%s'" msgstr "" #: editor/import_dock.cpp @@ -5688,11 +5688,11 @@ msgid "Mesh is empty!" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Trimesh Body" +msgid "Couldn't create a Trimesh collision shape." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Convex Body" +msgid "Create Static Trimesh Body" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -5704,11 +5704,27 @@ msgid "Create Trimesh Static Shape" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Failed creating shapes!" +msgid "Can't create a single convex collision shape for the scene root." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Couldn't create a single convex collision shape." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Single Convex Shape" +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Can't create multiple convex collision shapes for the scene root." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Couldn't create any collision shapes." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Convex Shape(s)" +msgid "Create Multiple Convex Shapes" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -5760,11 +5776,40 @@ msgid "Create Trimesh Static Body" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a StaticBody and assigns a polygon-based collision shape to it " +"automatically.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Trimesh Collision Sibling" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Convex Collision Sibling(s)" +msgid "" +"Creates a polygon-based collision shape.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Single Convex Collision Siblings" +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a single convex collision shape.\n" +"This is the fastest (but least accurate) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Multiple Convex Collision Siblings" +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is a performance middle-ground between the two above options." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -5772,6 +5817,14 @@ msgid "Create Outline Mesh..." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a static outline mesh. The outline mesh will have its normals " +"flipped automatically.\n" +"This can be used instead of the SpatialMaterial Grow property when using " +"that property isn't possible." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "View UV1" msgstr "" @@ -8149,7 +8202,7 @@ msgstr "" msgid "No VCS addons are available." msgstr "" -#: editor/plugins/version_control_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/version_control_editor_plugin.cpp msgid "Error" msgstr "" @@ -9241,11 +9294,16 @@ msgid "Export With Debug" msgstr "" #: editor/project_manager.cpp -msgid "The path does not exist." +msgid "The path specified doesn't exist." +msgstr "" + +#: editor/project_manager.cpp +msgid "Error opening package file (it's not in ZIP format)." msgstr "" #: editor/project_manager.cpp -msgid "Invalid '.zip' project file, does not contain a 'project.godot' file." +msgid "" +"Invalid \".zip\" project file; it doesn't contain a \"project.godot\" file." msgstr "" #: editor/project_manager.cpp @@ -9253,11 +9311,11 @@ msgid "Please choose an empty folder." msgstr "" #: editor/project_manager.cpp -msgid "Please choose a 'project.godot' or '.zip' file." +msgid "Please choose a \"project.godot\" or \".zip\" file." msgstr "" #: editor/project_manager.cpp -msgid "Directory already contains a Godot project." +msgid "This directory already contains a Godot project." msgstr "" #: editor/project_manager.cpp @@ -9905,6 +9963,10 @@ msgid "Suffix" msgstr "" #: editor/rename_dialog.cpp +msgid "Use Regular Expressions" +msgstr "" + +#: editor/rename_dialog.cpp msgid "Advanced Options" msgstr "" @@ -9939,7 +10001,7 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -msgid "Per Level counter" +msgid "Per-level Counter" msgstr "" #: editor/rename_dialog.cpp @@ -9969,10 +10031,6 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -msgid "Regular Expressions" -msgstr "" - -#: editor/rename_dialog.cpp msgid "Post-Process" msgstr "" @@ -9981,11 +10039,11 @@ msgid "Keep" msgstr "" #: editor/rename_dialog.cpp -msgid "CamelCase to under_scored" +msgid "PascalCase to snake_case" msgstr "" #: editor/rename_dialog.cpp -msgid "under_scored to CamelCase" +msgid "snake_case to PascalCase" msgstr "" #: editor/rename_dialog.cpp @@ -10004,6 +10062,14 @@ msgstr "" msgid "Reset" msgstr "" +#: editor/rename_dialog.cpp +msgid "Regular Expression Error" +msgstr "" + +#: editor/rename_dialog.cpp +msgid "At character %s" +msgstr "" + #: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp msgid "Reparent Node" msgstr "" @@ -10447,7 +10513,7 @@ msgid "Invalid inherited parent name or path." msgstr "" #: editor/script_create_dialog.cpp -msgid "Script is valid." +msgid "Script path/name is valid." msgstr "" #: editor/script_create_dialog.cpp @@ -10539,6 +10605,10 @@ msgid "Copy Error" msgstr "" #: editor/script_editor_debugger.cpp +msgid "Video RAM" +msgstr "" + +#: editor/script_editor_debugger.cpp msgid "Skip Breakpoints" msgstr "" @@ -10587,10 +10657,6 @@ msgid "Total:" msgstr "" #: editor/script_editor_debugger.cpp -msgid "Video Mem" -msgstr "" - -#: editor/script_editor_debugger.cpp msgid "Resource Path" msgstr "" diff --git a/editor/translations/te.po b/editor/translations/te.po index 2efe179ce6..836675db64 100644 --- a/editor/translations/te.po +++ b/editor/translations/te.po @@ -667,7 +667,7 @@ msgid "Line Number:" msgstr "" #: editor/code_editor.cpp -msgid "Replaced %d occurrence(s)." +msgid "%d replaced." msgstr "" #: editor/code_editor.cpp editor/editor_help.cpp @@ -3803,15 +3803,15 @@ msgid "Saving..." msgstr "" #: editor/import_dock.cpp -msgid "Set as Default for '%s'" +msgid "%d Files" msgstr "" #: editor/import_dock.cpp -msgid "Clear Default for '%s'" +msgid "Set as Default for '%s'" msgstr "" #: editor/import_dock.cpp -msgid " Files" +msgid "Clear Default for '%s'" msgstr "" #: editor/import_dock.cpp @@ -5640,11 +5640,11 @@ msgid "Mesh is empty!" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Trimesh Body" +msgid "Couldn't create a Trimesh collision shape." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Convex Body" +msgid "Create Static Trimesh Body" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -5656,11 +5656,27 @@ msgid "Create Trimesh Static Shape" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Failed creating shapes!" +msgid "Can't create a single convex collision shape for the scene root." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Couldn't create a single convex collision shape." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Single Convex Shape" +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Can't create multiple convex collision shapes for the scene root." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Couldn't create any collision shapes." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Convex Shape(s)" +msgid "Create Multiple Convex Shapes" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -5712,11 +5728,40 @@ msgid "Create Trimesh Static Body" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a StaticBody and assigns a polygon-based collision shape to it " +"automatically.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Trimesh Collision Sibling" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Convex Collision Sibling(s)" +msgid "" +"Creates a polygon-based collision shape.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Single Convex Collision Siblings" +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a single convex collision shape.\n" +"This is the fastest (but least accurate) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Multiple Convex Collision Siblings" +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is a performance middle-ground between the two above options." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -5724,6 +5769,14 @@ msgid "Create Outline Mesh..." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a static outline mesh. The outline mesh will have its normals " +"flipped automatically.\n" +"This can be used instead of the SpatialMaterial Grow property when using " +"that property isn't possible." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "View UV1" msgstr "" @@ -8088,7 +8141,7 @@ msgstr "" msgid "No VCS addons are available." msgstr "" -#: editor/plugins/version_control_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/version_control_editor_plugin.cpp msgid "Error" msgstr "" @@ -9173,11 +9226,16 @@ msgid "Export With Debug" msgstr "" #: editor/project_manager.cpp -msgid "The path does not exist." +msgid "The path specified doesn't exist." +msgstr "" + +#: editor/project_manager.cpp +msgid "Error opening package file (it's not in ZIP format)." msgstr "" #: editor/project_manager.cpp -msgid "Invalid '.zip' project file, does not contain a 'project.godot' file." +msgid "" +"Invalid \".zip\" project file; it doesn't contain a \"project.godot\" file." msgstr "" #: editor/project_manager.cpp @@ -9185,11 +9243,11 @@ msgid "Please choose an empty folder." msgstr "" #: editor/project_manager.cpp -msgid "Please choose a 'project.godot' or '.zip' file." +msgid "Please choose a \"project.godot\" or \".zip\" file." msgstr "" #: editor/project_manager.cpp -msgid "Directory already contains a Godot project." +msgid "This directory already contains a Godot project." msgstr "" #: editor/project_manager.cpp @@ -9835,6 +9893,10 @@ msgid "Suffix" msgstr "" #: editor/rename_dialog.cpp +msgid "Use Regular Expressions" +msgstr "" + +#: editor/rename_dialog.cpp msgid "Advanced Options" msgstr "" @@ -9869,7 +9931,7 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -msgid "Per Level counter" +msgid "Per-level Counter" msgstr "" #: editor/rename_dialog.cpp @@ -9899,10 +9961,6 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -msgid "Regular Expressions" -msgstr "" - -#: editor/rename_dialog.cpp msgid "Post-Process" msgstr "" @@ -9911,11 +9969,11 @@ msgid "Keep" msgstr "" #: editor/rename_dialog.cpp -msgid "CamelCase to under_scored" +msgid "PascalCase to snake_case" msgstr "" #: editor/rename_dialog.cpp -msgid "under_scored to CamelCase" +msgid "snake_case to PascalCase" msgstr "" #: editor/rename_dialog.cpp @@ -9934,6 +9992,14 @@ msgstr "" msgid "Reset" msgstr "" +#: editor/rename_dialog.cpp +msgid "Regular Expression Error" +msgstr "" + +#: editor/rename_dialog.cpp +msgid "At character %s" +msgstr "" + #: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp msgid "Reparent Node" msgstr "" @@ -10373,7 +10439,7 @@ msgid "Invalid inherited parent name or path." msgstr "" #: editor/script_create_dialog.cpp -msgid "Script is valid." +msgid "Script path/name is valid." msgstr "" #: editor/script_create_dialog.cpp @@ -10465,6 +10531,10 @@ msgid "Copy Error" msgstr "" #: editor/script_editor_debugger.cpp +msgid "Video RAM" +msgstr "" + +#: editor/script_editor_debugger.cpp msgid "Skip Breakpoints" msgstr "" @@ -10513,10 +10583,6 @@ msgid "Total:" msgstr "" #: editor/script_editor_debugger.cpp -msgid "Video Mem" -msgstr "" - -#: editor/script_editor_debugger.cpp msgid "Resource Path" msgstr "" diff --git a/editor/translations/th.po b/editor/translations/th.po index 73a18a006d..30dba54a16 100644 --- a/editor/translations/th.po +++ b/editor/translations/th.po @@ -725,8 +725,9 @@ msgid "Line Number:" msgstr "บรรทัดที่:" #: editor/code_editor.cpp -msgid "Replaced %d occurrence(s)." -msgstr "à¹à¸—นที่à¹à¸¥à¹‰à¸§ %d ครั้ง" +#, fuzzy +msgid "%d replaced." +msgstr "à¹à¸—นที่..." #: editor/code_editor.cpp editor/editor_help.cpp msgid "%d match." @@ -4079,6 +4080,11 @@ msgid "Saving..." msgstr "à¸à¸³à¸¥à¸±à¸‡à¸šà¸±à¸™à¸—ึà¸..." #: editor/import_dock.cpp +#, fuzzy +msgid "%d Files" +msgstr " ไฟล์" + +#: editor/import_dock.cpp msgid "Set as Default for '%s'" msgstr "à¸à¸³à¸«à¸™à¸”เป็นค่าเริ่มต้นขà¸à¸‡ '%s'" @@ -4087,10 +4093,6 @@ msgid "Clear Default for '%s'" msgstr "ลบค่าเริ่มต้นขà¸à¸‡ '%s'" #: editor/import_dock.cpp -msgid " Files" -msgstr " ไฟล์" - -#: editor/import_dock.cpp msgid "Import As:" msgstr "นำเข้าเป็น:" @@ -6074,12 +6076,13 @@ msgid "Mesh is empty!" msgstr "Mesh ว่างเปล่า!" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Trimesh Body" -msgstr "สร้าง Static Trimesh Body" +#, fuzzy +msgid "Couldn't create a Trimesh collision shape." +msgstr "สร้างรูปทรงà¸à¸²à¸¢à¸ าพเป็นโหนดà¸à¸²à¸•ิ" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Convex Body" -msgstr "สร้าง StaticBody ทรงตัน" +msgid "Create Static Trimesh Body" +msgstr "สร้าง Static Trimesh Body" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "This doesn't work on scene root!" @@ -6091,12 +6094,30 @@ msgid "Create Trimesh Static Shape" msgstr "สร้างรูปทรง Trimesh" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Failed creating shapes!" +msgid "Can't create a single convex collision shape for the scene root." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Couldn't create a single convex collision shape." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Single Convex Shape" +msgstr "สร้างรูปทรงนูน" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Can't create multiple convex collision shapes for the scene root." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp #, fuzzy -msgid "Create Convex Shape(s)" +msgid "Couldn't create any collision shapes." +msgstr "ไม่สามารถสร้างโฟลเดà¸à¸£à¹Œ" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Multiple Convex Shapes" msgstr "สร้างรูปทรงนูน" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -6148,19 +6169,57 @@ msgid "Create Trimesh Static Body" msgstr "สร้าง Trimesh Static Body" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a StaticBody and assigns a polygon-based collision shape to it " +"automatically.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Trimesh Collision Sibling" msgstr "สร้างรูปทรงà¸à¸²à¸¢à¸ าพเป็นโหนดà¸à¸²à¸•ิ" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp #, fuzzy -msgid "Create Convex Collision Sibling(s)" +msgid "Create Single Convex Collision Siblings" msgstr "สร้างรูปทรงตันà¸à¸²à¸¢à¸ าพเป็นโหนดà¸à¸²à¸•ิ" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a single convex collision shape.\n" +"This is the fastest (but least accurate) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Multiple Convex Collision Siblings" +msgstr "สร้างรูปทรงตันà¸à¸²à¸¢à¸ าพเป็นโหนดà¸à¸²à¸•ิ" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is a performance middle-ground between the two above options." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Outline Mesh..." msgstr "สร้างเส้นขà¸à¸š Mesh..." #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a static outline mesh. The outline mesh will have its normals " +"flipped automatically.\n" +"This can be used instead of the SpatialMaterial Grow property when using " +"that property isn't possible." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "View UV1" msgstr "à¹à¸ªà¸”ง UV1" @@ -8730,7 +8789,7 @@ msgstr "Tile Set" msgid "No VCS addons are available." msgstr "" -#: editor/plugins/version_control_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/version_control_editor_plugin.cpp msgid "Error" msgstr "ผิดพลาด" @@ -9886,12 +9945,19 @@ msgid "Export With Debug" msgstr "ส่งà¸à¸à¸à¸žà¸£à¹‰à¸à¸¡à¸à¸²à¸£à¹à¸à¹‰à¹„ขจุดบà¸à¸žà¸£à¹ˆà¸à¸‡" #: editor/project_manager.cpp -msgid "The path does not exist." +#, fuzzy +msgid "The path specified doesn't exist." msgstr "ไม่พบไฟล์" #: editor/project_manager.cpp #, fuzzy -msgid "Invalid '.zip' project file, does not contain a 'project.godot' file." +msgid "Error opening package file (it's not in ZIP format)." +msgstr "ผิดพลาดขณะเปิดไฟล์à¹à¸žà¸„เà¸à¸ˆ, ไม่ใช่รูปà¹à¸šà¸š zip" + +#: editor/project_manager.cpp +#, fuzzy +msgid "" +"Invalid \".zip\" project file; it doesn't contain a \"project.godot\" file." msgstr "à¸à¸£à¸¸à¸“าเลืà¸à¸à¹‚ฟลเดà¸à¸£à¹Œà¸—ี่ไม่มีไฟล์ 'project.godot'" #: editor/project_manager.cpp @@ -9900,11 +9966,11 @@ msgstr "à¸à¸£à¸¸à¸“าเลืà¸à¸à¹‚ฟลเดà¸à¸£à¹Œà¸§à¹ˆà¸²à¸‡à¹€à¸› #: editor/project_manager.cpp #, fuzzy -msgid "Please choose a 'project.godot' or '.zip' file." +msgid "Please choose a \"project.godot\" or \".zip\" file." msgstr "à¸à¸£à¸¸à¸“าเลืà¸à¸à¹„ฟล์ 'project.godot'" #: editor/project_manager.cpp -msgid "Directory already contains a Godot project." +msgid "This directory already contains a Godot project." msgstr "" #: editor/project_manager.cpp @@ -10586,6 +10652,11 @@ msgstr "" #: editor/rename_dialog.cpp #, fuzzy +msgid "Use Regular Expressions" +msgstr "à¹à¸à¹‰à¹„ขสมà¸à¸²à¸£" + +#: editor/rename_dialog.cpp +#, fuzzy msgid "Advanced Options" msgstr "ตัวเลืà¸à¸à¸à¸²à¸£à¸ˆà¸³à¸à¸±à¸”" @@ -10624,7 +10695,7 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -msgid "Per Level counter" +msgid "Per-level Counter" msgstr "" #: editor/rename_dialog.cpp @@ -10656,11 +10727,6 @@ msgstr "" #: editor/rename_dialog.cpp #, fuzzy -msgid "Regular Expressions" -msgstr "à¹à¸à¹‰à¹„ขสมà¸à¸²à¸£" - -#: editor/rename_dialog.cpp -#, fuzzy msgid "Post-Process" msgstr "สคริปต์หลังประมวลผล:" @@ -10669,11 +10735,11 @@ msgid "Keep" msgstr "เà¸à¹‡à¸š" #: editor/rename_dialog.cpp -msgid "CamelCase to under_scored" +msgid "PascalCase to snake_case" msgstr "" #: editor/rename_dialog.cpp -msgid "under_scored to CamelCase" +msgid "snake_case to PascalCase" msgstr "" #: editor/rename_dialog.cpp @@ -10695,6 +10761,16 @@ msgstr "ตัวพิมพ์ใหà¸à¹ˆ" msgid "Reset" msgstr "รีเซ็ตซูม" +#: editor/rename_dialog.cpp +#, fuzzy +msgid "Regular Expression Error" +msgstr "à¹à¸à¹‰à¹„ขสมà¸à¸²à¸£" + +#: editor/rename_dialog.cpp +#, fuzzy +msgid "At character %s" +msgstr "ตัวà¸à¸±à¸à¸©à¸£à¸—ี่ใช้ได้:" + #: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp msgid "Reparent Node" msgstr "หาโหนดà¹à¸¡à¹ˆà¹ƒà¸«à¸¡à¹ˆ" @@ -11186,7 +11262,7 @@ msgstr "ชื่à¸à¸«à¸£à¸·à¸à¸•ำà¹à¸«à¸™à¹ˆà¸‡à¸—ีสืบทà¸à¸”ไ #: editor/script_create_dialog.cpp #, fuzzy -msgid "Script is valid." +msgid "Script path/name is valid." msgstr "สคริปต์ถูà¸à¸•้à¸à¸‡" #: editor/script_create_dialog.cpp @@ -11295,6 +11371,11 @@ msgstr "คัดลà¸à¸à¸œà¸´à¸”พลาด" #: editor/script_editor_debugger.cpp #, fuzzy +msgid "Video RAM" +msgstr "หน่วยความจำวีดีโà¸" + +#: editor/script_editor_debugger.cpp +#, fuzzy msgid "Skip Breakpoints" msgstr "ลบจุด" @@ -11344,10 +11425,6 @@ msgid "Total:" msgstr "ทั้งหมด:" #: editor/script_editor_debugger.cpp -msgid "Video Mem" -msgstr "หน่วยความจำวีดีโà¸" - -#: editor/script_editor_debugger.cpp msgid "Resource Path" msgstr "ตำà¹à¸«à¸™à¹ˆà¸‡à¸£à¸µà¸‹à¸à¸£à¹Œà¸ª" @@ -12983,6 +13060,12 @@ msgstr "" msgid "Constants cannot be modified." msgstr "" +#~ msgid "Replaced %d occurrence(s)." +#~ msgstr "à¹à¸—นที่à¹à¸¥à¹‰à¸§ %d ครั้ง" + +#~ msgid "Create Static Convex Body" +#~ msgstr "สร้าง StaticBody ทรงตัน" + #~ msgid "" #~ "There are currently no tutorials for this class, you can [color=$color]" #~ "[url=$url]contribute one[/url][/color] or [color=$color][url=" diff --git a/editor/translations/tr.po b/editor/translations/tr.po index 192364f0c6..207c91e7c3 100644 --- a/editor/translations/tr.po +++ b/editor/translations/tr.po @@ -41,12 +41,13 @@ # isimsiz <isimsiz@mailinator.com>, 2019. # Muhammet Mustafa Tozlu <m.mustafatozlu@gmail.com>, 2019. # HALİL ATAÅž <halillatass@gmail.com>, 2019. +# Zsosu Ktosu <zktosu@gmail.com>, 2020. msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2019-11-20 14:07+0000\n" -"Last-Translator: HALİL ATAÅž <halillatass@gmail.com>\n" +"PO-Revision-Date: 2020-01-30 03:56+0000\n" +"Last-Translator: Zsosu Ktosu <zktosu@gmail.com>\n" "Language-Team: Turkish <https://hosted.weblate.org/projects/godot-engine/" "godot/tr/>\n" "Language: tr\n" @@ -54,7 +55,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 3.10-dev\n" +"X-Generator: Weblate 3.11-dev\n" #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/visual_script/visual_script_builtin_funcs.cpp @@ -65,13 +66,13 @@ msgstr "" #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp msgid "Expected a string of length 1 (a character)." -msgstr "" +msgstr "1 (karakter) uzunlukta metin bekleniyor." #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: 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 "Byte kodu çözmek için yetersiz byte, ya da geçersiz format." +msgstr "Baytları çözümlemek için yetersiz miktarda bayt ya da geçersiz format." #: core/math/expression.cpp msgid "Invalid input %i (not passed) in expression" @@ -131,7 +132,7 @@ msgstr "EiB" #: editor/animation_bezier_editor.cpp msgid "Free" -msgstr "Ücretsiz" +msgstr "Serbest" #: editor/animation_bezier_editor.cpp msgid "Balanced" @@ -458,7 +459,7 @@ msgstr "Bir kök olmadan yeni bir iz eklemek mümkün deÄŸildir" #: editor/animation_track_editor.cpp msgid "Invalid track for Bezier (no suitable sub-properties)" -msgstr "" +msgstr "Geçersiz Bezier eÄŸrisi izi (uygun alt-nitelik yok)" #: editor/animation_track_editor.cpp msgid "Add Bezier Track" @@ -490,7 +491,7 @@ msgstr "Yöntem İz Anahtarı Ekle" #: editor/animation_track_editor.cpp msgid "Method not found in object: " -msgstr "Yöntem, nesne içinde bulunamadı " +msgstr "Metot, nesne içinde bulunamadı: " #: editor/animation_track_editor.cpp msgid "Anim Move Keys" @@ -542,7 +543,8 @@ msgstr "Uyarı: İçe aktarılan animasyonu düzenleme" #: editor/animation_track_editor.cpp msgid "Select an AnimationPlayer node to create and edit animations." -msgstr "Animasyonları düzenleyebilmek için Animasyon Oynatıcı düğümü seçin." +msgstr "" +"Animasyonları oluÅŸturup düzenlemek için Animasyon Oynatıcı düğümü seçin." #: editor/animation_track_editor.cpp msgid "Only show tracks from nodes selected in tree." @@ -648,7 +650,7 @@ msgstr "Maks. EniyileÅŸtirilebilir Açı:" #: editor/animation_track_editor.cpp msgid "Optimize" -msgstr "EniyileÅŸtir" +msgstr "İyileÅŸtir" #: editor/animation_track_editor.cpp msgid "Remove invalid keys" @@ -724,8 +726,9 @@ msgid "Line Number:" msgstr "Satır Numarası:" #: editor/code_editor.cpp -msgid "Replaced %d occurrence(s)." -msgstr "DeÄŸiÅŸtirildi %d oluÅŸ(sn)." +#, fuzzy +msgid "%d replaced." +msgstr "DeÄŸiÅŸtir..." #: editor/code_editor.cpp editor/editor_help.cpp msgid "%d match." @@ -842,9 +845,8 @@ msgid "Extra Call Arguments:" msgstr "Ekstra ÇaÄŸrı Argümanları:" #: editor/connections_dialog.cpp -#, fuzzy msgid "Receiver Method:" -msgstr "Metot Seç" +msgstr "Alıcı Metodu:" #: editor/connections_dialog.cpp msgid "Advanced" @@ -857,7 +859,7 @@ msgstr "ErtelenmiÅŸ" #: editor/connections_dialog.cpp msgid "" "Defers the signal, storing it in a queue and only firing it at idle time." -msgstr "Sinyali savunur, sıraya kaydeder ve sadece rölantide iken ateÅŸler." +msgstr "Sinyali erteler, sıraya kaydeder ve sadece iÅŸlemci boÅŸta iken ateÅŸler." #: editor/connections_dialog.cpp msgid "Oneshot" @@ -942,7 +944,7 @@ msgstr "Tüm BaÄŸlantıları Kes" #: editor/connections_dialog.cpp msgid "Edit..." -msgstr "Düzenle" +msgstr "Düzenle..." #: editor/connections_dialog.cpp msgid "Go To Method" @@ -1228,9 +1230,8 @@ msgid "Error opening package file, not in ZIP format." msgstr "Paket dosyası açılırken hata oluÅŸtu, zip formatında deÄŸil." #: editor/editor_asset_installer.cpp -#, fuzzy msgid "%s (Already Exists)" -msgstr "Zaten mevcut" +msgstr "%s (Zaten Var)" #: editor/editor_asset_installer.cpp msgid "Uncompressing Assets" @@ -1241,9 +1242,8 @@ msgid "The following files failed extraction from package:" msgstr "AÅŸağıdaki dosyaların, çıkından ayıklanma iÅŸlemi baÅŸarısız oldu:" #: editor/editor_asset_installer.cpp -#, fuzzy msgid "And %s more files." -msgstr "%d daha fazla dosyalar" +msgstr "Ve %s kadar dosya daha." #: editor/editor_asset_installer.cpp editor/project_manager.cpp msgid "Package installed successfully!" @@ -1255,9 +1255,8 @@ msgid "Success!" msgstr "BaÅŸarılı!" #: editor/editor_asset_installer.cpp -#, fuzzy msgid "Package Contents:" -msgstr "İçerikler:" +msgstr "Paket İçerikleri:" #: editor/editor_asset_installer.cpp editor/editor_node.cpp msgid "Install" @@ -1397,9 +1396,8 @@ msgid "Invalid file, not an audio bus layout." msgstr "Geçersiz dosya, bu bir audio bus yerleÅŸim düzeni deÄŸil." #: editor/editor_audio_buses.cpp -#, fuzzy msgid "Error saving file: %s" -msgstr "Dosya kaydedilirken hata!" +msgstr "%s dosyası kaydedilirken hata" #: editor/editor_audio_buses.cpp msgid "Add Bus" @@ -1445,7 +1443,7 @@ msgstr "Geçersiz ad." #: editor/editor_autoload_settings.cpp msgid "Valid characters:" -msgstr "Geçerli damgalar:" +msgstr "Geçerli karakterler:" #: editor/editor_autoload_settings.cpp msgid "Must not collide with an existing engine class name." @@ -1769,9 +1767,8 @@ msgid "Erase Profile" msgstr "Profili Sil" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Godot Feature Profile" -msgstr "Dışa Aktarım Åžablonlarını Yönet" +msgstr "Godot Özellik Profili" #: editor/editor_feature_profile.cpp msgid "Import Profile(s)" @@ -1974,9 +1971,8 @@ msgid "Inherited by:" msgstr "Åžundan miras alındı:" #: editor/editor_help.cpp -#, fuzzy msgid "Description" -msgstr "Açıklama:" +msgstr "Tanım" #: editor/editor_help.cpp msgid "Online Tutorials" @@ -1987,14 +1983,12 @@ msgid "Properties" msgstr "Özellikler" #: editor/editor_help.cpp -#, fuzzy msgid "override:" -msgstr "Üzerine Yaz" +msgstr "üzerine yaz:" #: editor/editor_help.cpp -#, fuzzy msgid "default:" -msgstr "Varsayılan" +msgstr "varsayılan:" #: editor/editor_help.cpp msgid "Methods" @@ -2017,9 +2011,8 @@ msgid "Property Descriptions" msgstr "Özellik Açıklamaları" #: editor/editor_help.cpp -#, fuzzy msgid "(value)" -msgstr "DeÄŸer" +msgstr "(deÄŸer)" #: editor/editor_help.cpp msgid "" @@ -2051,9 +2044,8 @@ msgid "Case Sensitive" msgstr "Büyük Küçük Harf Duyarlı" #: editor/editor_help_search.cpp -#, fuzzy msgid "Show Hierarchy" -msgstr "Yardımcıları Göster" +msgstr "HiyerarÅŸiyi Göster" #: editor/editor_help_search.cpp msgid "Display All" @@ -2092,9 +2084,8 @@ msgid "Class" msgstr "Sınıf" #: editor/editor_help_search.cpp -#, fuzzy msgid "Method" -msgstr "Metotlar" +msgstr "Metot" #: editor/editor_help_search.cpp editor/plugins/script_text_editor.cpp msgid "Signal" @@ -2105,14 +2096,12 @@ msgid "Constant" msgstr "Sabit" #: editor/editor_help_search.cpp -#, fuzzy msgid "Property" -msgstr "Özellik:" +msgstr "Nitelik" #: editor/editor_help_search.cpp -#, fuzzy msgid "Theme Property" -msgstr "Tema Özellikleri" +msgstr "Tema ÖzelliÄŸi" #: editor/editor_inspector.cpp editor/project_settings_editor.cpp msgid "Property:" @@ -2989,7 +2978,7 @@ msgstr "Oynat" #: editor/editor_node.cpp msgid "Pause the scene execution for debugging." -msgstr "" +msgstr "Hata ayıklama için sahnenin çalıştırılmasını duraklat." #: editor/editor_node.cpp msgid "Pause Scene" @@ -3098,9 +3087,8 @@ msgid "Import Templates From ZIP File" msgstr "Åžablonları Zip Dosyasından İçeri Aktar" #: editor/editor_node.cpp -#, fuzzy msgid "Template Package" -msgstr "Dışa Aktarım Åžablonu Yöneticisi" +msgstr "Åžablon Paketi" #: editor/editor_node.cpp msgid "Export Library" @@ -3151,9 +3139,8 @@ msgid "Open the previous Editor" msgstr "Önceki Düzenleyiciyi Aç" #: editor/editor_node.h -#, fuzzy msgid "Warning!" -msgstr "Uyarı" +msgstr "Uyarı!" #: editor/editor_path.cpp msgid "No sub-resources found." @@ -3476,13 +3463,12 @@ msgid "Importing:" msgstr "İçe Aktarım:" #: editor/export_template_manager.cpp -#, fuzzy msgid "Error getting the list of mirrors." -msgstr "İmza nesnesini oluÅŸturmada sorun." +msgstr "Kaynaklar listesini alırken hata." #: editor/export_template_manager.cpp msgid "Error parsing JSON of mirror list. Please report this issue!" -msgstr "" +msgstr "JSON sunucuları listesini alırken hata. Lütfen bu hatayı bildirin!" #: editor/export_template_manager.cpp msgid "" @@ -3611,9 +3597,8 @@ msgid "Select Template File" msgstr "Åžablon Dosyası Seç" #: editor/export_template_manager.cpp -#, fuzzy msgid "Godot Export Templates" -msgstr "Dışa Aktarım Kalıpları Yükleniyor" +msgstr "Godot Dışa Aktarım Åžablonları" #: editor/export_template_manager.cpp msgid "Export Template Manager" @@ -3694,9 +3679,8 @@ msgid "New Inherited Scene" msgstr "Yeni Miras Alınmış Sahne" #: editor/filesystem_dock.cpp -#, fuzzy msgid "Set As Main Scene" -msgstr "Ana Sahne" +msgstr "Sahneyi Ana Sahne Yap" #: editor/filesystem_dock.cpp msgid "Open Scenes" @@ -4001,6 +3985,11 @@ msgid "Saving..." msgstr "Kaydediliyor..." #: editor/import_dock.cpp +#, fuzzy +msgid "%d Files" +msgstr " Dosyalar" + +#: editor/import_dock.cpp msgid "Set as Default for '%s'" msgstr "'%s' için Varsayılanı Ayarla" @@ -4009,10 +3998,6 @@ msgid "Clear Default for '%s'" msgstr "'%s' İçin Varsayılanı Temizle" #: editor/import_dock.cpp -msgid " Files" -msgstr " Dosyalar" - -#: editor/import_dock.cpp msgid "Import As:" msgstr "Åžu Åžekilde İçe Aktar:" @@ -4427,19 +4412,16 @@ msgstr "" "alınamadı." #: editor/plugins/animation_blend_tree_editor_plugin.cpp -#, fuzzy msgid "Anim Clips" -msgstr "Animasyon Klipleri:" +msgstr "Animasyon Klipleri" #: editor/plugins/animation_blend_tree_editor_plugin.cpp -#, fuzzy msgid "Audio Clips" -msgstr "Ses Parçası:" +msgstr "Ses Parçaları" #: editor/plugins/animation_blend_tree_editor_plugin.cpp -#, fuzzy msgid "Functions" -msgstr "İşlevler:" +msgstr "İşlevler" #: editor/plugins/animation_blend_tree_editor_plugin.cpp #: editor/plugins/animation_state_machine_editor.cpp @@ -4505,7 +4487,7 @@ msgstr "Sonraki DeÄŸiÅŸeni Karıştır" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Change Blend Time" -msgstr "Karışım Süresini DeÄŸiÅŸtir" +msgstr "OluÅŸturma Süresini DeÄŸiÅŸtir" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Load Animation" @@ -4671,9 +4653,8 @@ msgid "Move Node" msgstr "Düğümü Taşı" #: editor/plugins/animation_state_machine_editor.cpp -#, fuzzy msgid "Transition exists!" -msgstr "GeçiÅŸ: " +msgstr "GeçiÅŸ zaten var!" #: editor/plugins/animation_state_machine_editor.cpp msgid "Add Transition" @@ -4763,9 +4744,8 @@ msgid "Transition: " msgstr "GeçiÅŸ: " #: editor/plugins/animation_state_machine_editor.cpp -#, fuzzy msgid "Play Mode:" -msgstr "Kaydırma Biçimi" +msgstr "Oynatma Modu:" #: editor/plugins/animation_tree_editor_plugin.cpp #: editor/plugins/animation_tree_player_editor_plugin.cpp @@ -5022,29 +5002,27 @@ msgstr "Bu nesne için zaten sürdürülen bir indirme var!" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Recently Updated" -msgstr "" +msgstr "Henüz Güncellenenler" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Least Recently Updated" -msgstr "" +msgstr "Pek Eski Güncellenenler" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Name (A-Z)" -msgstr "" +msgstr "İsim (A-Z)" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Name (Z-A)" -msgstr "" +msgstr "Name (Z-A)" #: editor/plugins/asset_library_editor_plugin.cpp -#, fuzzy msgid "License (A-Z)" -msgstr "Lisans" +msgstr "Lisans (A-Z)" #: editor/plugins/asset_library_editor_plugin.cpp -#, fuzzy msgid "License (Z-A)" -msgstr "Lisans" +msgstr "Lisans (Z-A)" #: editor/plugins/asset_library_editor_plugin.cpp msgid "First" @@ -5158,12 +5136,11 @@ msgstr "Izgara Adımı:" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Primary Line Every:" -msgstr "" +msgstr "Birincil Satır Her:" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "steps" -msgstr "2 kademe" +msgstr "adımlar" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Rotation Offset:" @@ -5174,9 +5151,8 @@ msgid "Rotation Step:" msgstr "Dönme Adımı:" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Scale Step:" -msgstr "Ölçekle:" +msgstr "Ölçek Adımı:" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Move Vertical Guide" @@ -5251,86 +5227,72 @@ msgstr "" "noktasını deÄŸiÅŸtirir." #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Top Left" -msgstr "Sol" +msgstr "Sol Üst" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Top Right" -msgstr "SaÄŸ" +msgstr "SaÄŸ Üst" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Bottom Right" -msgstr "SaÄŸa Döndür" +msgstr "Alt SaÄŸ" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Bottom Left" -msgstr "Alttan Görünüm" +msgstr "Alt Sol" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Center Left" -msgstr "Sola Girintile" +msgstr "Sol Merkez" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Center Top" -msgstr "İçre Seçimi" +msgstr "Merkez Üst" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Center Right" -msgstr "SaÄŸa Girintile" +msgstr "Merkez SaÄŸ" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Center Bottom" -msgstr "Alt" +msgstr "Merkez Alt" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Center" -msgstr "" +msgstr "Merkez" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Left Wide" msgstr "Soldan Görünüm" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Top Wide" msgstr "Üstten Görünüm" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Right Wide" msgstr "SaÄŸdan Görünüm" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Bottom Wide" msgstr "Alttan Görünüm" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "VCenter Wide" -msgstr "" +msgstr "DikeyMerkez Görünüm" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "HCenter Wide" -msgstr "" +msgstr "YatayMerkez Görünüm" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Full Rect" -msgstr "Tam adı" +msgstr "Tam Kare" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Keep Ratio" -msgstr "Ölçek Oranı:" +msgstr "Oranı Koru" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Anchors only" @@ -5350,6 +5312,8 @@ msgid "" "Game Camera Override\n" "Overrides game camera with editor viewport camera." msgstr "" +"Oyun Kamerası DeÄŸiÅŸtir\n" +"Oyun kamerasını, düzenleme arayüzü kamerası ile deÄŸiÅŸtirir." #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -5357,6 +5321,8 @@ msgid "" "Game Camera Override\n" "No game instance running." msgstr "" +"Oyun Kamera DeÄŸiÅŸtir\n" +"Çalışan oyun örneÄŸi yok." #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -5500,9 +5466,8 @@ msgid "Use Rotation Snap" msgstr "Döndürme Yapışması Kullan" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Use Scale Snap" -msgstr "Akıllı Hizalama Kullan" +msgstr "Esnetme Hizalaması Kullan" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Snap Relative" @@ -5643,15 +5608,14 @@ msgid "Insert keys (based on mask)." msgstr "Anahtar Gir (maskeye dayalı olarak)." #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "" "Auto insert keys when objects are translated, rotated or scaled (based on " "mask).\n" "Keys are only added to existing tracks, no new tracks will be created.\n" "Keys must be inserted manually for the first time." msgstr "" -"Anahtarları otomatik olarak yerleÅŸtir eÄŸer nesne yer deÄŸiÅŸtirdiyse, döndüyse " -"ya da esnetildiyse (maskeye göre).\n" +"EÄŸer nesne hareket ettiyle, döndürüldüyse ya da esnetildiyse anahtarları " +"otomatik yerleÅŸtir (maskeye göre).\n" "Anahtarlar yalnızca mevcut izlere eklenir, yeni izler oluÅŸturulmayacak.\n" "İlkinde anahtarlar elle girilmeli." @@ -5660,9 +5624,8 @@ msgid "Auto Insert Key" msgstr "Otomatik Anahtar Gir" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Animation Key and Pose Options" -msgstr "Animasyon Anahtarı Eklendi." +msgstr "Animasyon Anahtarı ve Pozlama Seçenekleri" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Insert Key (Existing Tracks)" @@ -5773,20 +5736,18 @@ msgstr "Emisyon Maskesi" #: editor/plugins/cpu_particles_2d_editor_plugin.cpp #: editor/plugins/particles_2d_editor_plugin.cpp -#, fuzzy msgid "Solid Pixels" -msgstr "Sıkıştır (Pikselleri): " +msgstr "Åžekil Pikselleri" #: editor/plugins/cpu_particles_2d_editor_plugin.cpp #: editor/plugins/particles_2d_editor_plugin.cpp msgid "Border Pixels" -msgstr "" +msgstr "Kenar Pikselleri" #: editor/plugins/cpu_particles_2d_editor_plugin.cpp #: editor/plugins/particles_2d_editor_plugin.cpp -#, fuzzy msgid "Directed Border Pixels" -msgstr "Dizinler & Dosyalar:" +msgstr "Yönelimli Kenar Pikselleri" #: editor/plugins/cpu_particles_2d_editor_plugin.cpp #: editor/plugins/particles_2d_editor_plugin.cpp @@ -5909,12 +5870,13 @@ msgid "Mesh is empty!" msgstr "Örüntü boÅŸ!" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Trimesh Body" -msgstr "DuraÄŸan Üçlü Örüntü OluÅŸtur" +#, fuzzy +msgid "Couldn't create a Trimesh collision shape." +msgstr "Üçlü Örüntü Çarpışma KardeÅŸi OluÅŸtur" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Convex Body" -msgstr "DuraÄŸan Dışbükey Gövde OluÅŸtur" +msgid "Create Static Trimesh Body" +msgstr "DuraÄŸan Üçlü Örüntü OluÅŸtur" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "This doesn't work on scene root!" @@ -5925,11 +5887,30 @@ msgid "Create Trimesh Static Shape" msgstr "Üçlü Örüntü Yüzeyi OluÅŸtur" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Failed creating shapes!" -msgstr "Åžekil oluÅŸturma baÅŸarısız!" +msgid "Can't create a single convex collision shape for the scene root." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Couldn't create a single convex collision shape." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Single Convex Shape" +msgstr "Dışbükey Åžekil[ler] OluÅŸtur" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Can't create multiple convex collision shapes for the scene root." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Couldn't create any collision shapes." +msgstr "Klasör oluÅŸturulamadı." #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Convex Shape(s)" +#, fuzzy +msgid "Create Multiple Convex Shapes" msgstr "Dışbükey Åžekil[ler] OluÅŸtur" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -5981,18 +5962,57 @@ msgid "Create Trimesh Static Body" msgstr "Üçlü Örüntü DuraÄŸan Gövdesi OluÅŸtur" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a StaticBody and assigns a polygon-based collision shape to it " +"automatically.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Trimesh Collision Sibling" msgstr "Üçlü Örüntü Çarpışma KardeÅŸi OluÅŸtur" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Convex Collision Sibling(s)" +msgid "" +"Creates a polygon-based collision shape.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Single Convex Collision Siblings" msgstr "Dışbükey Çarpışma KomÅŸusu OluÅŸtur" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a single convex collision shape.\n" +"This is the fastest (but least accurate) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Multiple Convex Collision Siblings" +msgstr "Dışbükey Çarpışma KomÅŸusu OluÅŸtur" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is a performance middle-ground between the two above options." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Outline Mesh..." msgstr "Anahat Örüntüsü OluÅŸtur..." #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a static outline mesh. The outline mesh will have its normals " +"flipped automatically.\n" +"This can be used instead of the SpatialMaterial Grow property when using " +"that property isn't possible." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "View UV1" msgstr "UV1'i Göster" @@ -6014,23 +6034,23 @@ msgstr "Kontur Boyutu:" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "UV Channel Debug" -msgstr "" +msgstr "UV Kanal Hata Ayıkla" #: editor/plugins/mesh_library_editor_plugin.cpp msgid "Remove item %d?" msgstr "%d öğe kaldırılsın mı?" #: editor/plugins/mesh_library_editor_plugin.cpp -#, fuzzy msgid "" "Update from existing scene?:\n" "%s" -msgstr "Sahneden Güncelle" +msgstr "" +"Mevcut sahneden güncellensin mi?:\n" +"%s" #: editor/plugins/mesh_library_editor_plugin.cpp -#, fuzzy msgid "Mesh Library" -msgstr "MeshLibrary ..." +msgstr "Model Kütüphanesi" #: editor/plugins/mesh_library_editor_plugin.cpp #: editor/plugins/theme_editor_plugin.cpp @@ -6665,20 +6685,22 @@ msgstr "Farklı Kaydet..." #: editor/plugins/script_editor_plugin.cpp msgid "Can't obtain the script for running." -msgstr "" +msgstr "Çalıştırmak için komut dosyası alınamıyor." #: editor/plugins/script_editor_plugin.cpp msgid "Script failed reloading, check console for errors." -msgstr "" +msgstr "Komut dosyası yeniden yüklenemedi, konsolda hataları denetleyin." #: editor/plugins/script_editor_plugin.cpp msgid "Script is not in tool mode, will not be able to run." -msgstr "" +msgstr "Komut dosyası araç modunda deÄŸil, çalıştırılamayacak." #: editor/plugins/script_editor_plugin.cpp msgid "" "To run this script, it must inherit EditorScript and be set to tool mode." msgstr "" +"Komut dosyasının çalışabilmesi için EditörScript'den devrolunmalı ve araç " +"moduna ayarlandmalı." #: editor/plugins/script_editor_plugin.cpp msgid "Import Theme" @@ -6928,6 +6950,7 @@ msgstr "Sadece dosya sisteminden kaynaklar bırakılabilir." #: modules/visual_script/visual_script_editor.cpp msgid "Can't drop nodes because script '%s' is not used in this scene." msgstr "" +"Bu sahnede '% s' komut dosyası kullanılmadığı için düğümler bırakılamıyor." #: editor/plugins/script_text_editor.cpp msgid "Lookup Symbol" @@ -7332,7 +7355,7 @@ msgstr "Sinematik Önizleme" #: editor/plugins/spatial_editor_plugin.cpp msgid "Not available when using the GLES2 renderer." -msgstr "" +msgstr "GLES2 iÅŸleyici kullanılırken kullanılamaz." #: editor/plugins/spatial_editor_plugin.cpp msgid "Freelook Left" @@ -7575,9 +7598,8 @@ msgid "Create Mesh2D" msgstr "Örüntü2D OluÅŸtur" #: editor/plugins/sprite_editor_plugin.cpp -#, fuzzy msgid "Mesh2D Preview" -msgstr "Mesh Önizlemeleri OluÅŸturuluyor" +msgstr "Mesh2B Önizleme" #: editor/plugins/sprite_editor_plugin.cpp msgid "Create Polygon2D" @@ -7585,25 +7607,23 @@ msgstr "Çokgen2D OluÅŸtur" #: editor/plugins/sprite_editor_plugin.cpp msgid "Polygon2D Preview" -msgstr "" +msgstr "Çokgen2B Önizleme" #: editor/plugins/sprite_editor_plugin.cpp msgid "Create CollisionPolygon2D" msgstr "TemasÇokgen2D OluÅŸtur" #: editor/plugins/sprite_editor_plugin.cpp -#, fuzzy msgid "CollisionPolygon2D Preview" -msgstr "TemasÇokgen2D OluÅŸtur" +msgstr "TemasÇokgen2B Önizle" #: editor/plugins/sprite_editor_plugin.cpp msgid "Create LightOccluder2D" msgstr "IşıkEngelleyici2D OluÅŸtur" #: editor/plugins/sprite_editor_plugin.cpp -#, fuzzy msgid "LightOccluder2D Preview" -msgstr "IşıkEngelleyici2D OluÅŸtur" +msgstr "IşıkEngelleyici2D Önizle" #: editor/plugins/sprite_editor_plugin.cpp msgid "Sprite is empty!" @@ -7683,9 +7703,8 @@ msgid "Add Frame" msgstr "Çerçeve Ekle" #: editor/plugins/sprite_frames_editor_plugin.cpp -#, fuzzy msgid "Unable to load images" -msgstr "Bediz yüklenemedi:" +msgstr "Resimler yüklenemiyor" #: editor/plugins/sprite_frames_editor_plugin.cpp msgid "ERROR: Couldn't load frame resource!" @@ -7954,7 +7973,7 @@ msgstr "AltaÄŸaç" #: editor/plugins/theme_editor_plugin.cpp msgid "Has,Many,Options" -msgstr "Birçok,Seçenek,Var" +msgstr "Var,Çok,Seçenekler" #: editor/plugins/theme_editor_plugin.cpp msgid "Data Type:" @@ -7978,9 +7997,8 @@ msgid "Color" msgstr "Renk" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Theme File" -msgstr "Tema" +msgstr "Tema Dosyası" #: editor/plugins/tile_map_editor_plugin.cpp msgid "Erase Selection" @@ -8095,17 +8113,15 @@ msgstr "Sahneden BirleÅŸtir" #: editor/plugins/tile_set_editor_plugin.cpp msgid "New Single Tile" -msgstr "" +msgstr "Yeni Döşeme Parçacığı" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "New Autotile" -msgstr "Oto-döşemeleri PasifleÅŸtir" +msgstr "Yeni oto-döşeme" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "New Atlas" -msgstr "Atlas :" +msgstr "Yeni Atlas" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Next Coordinate" @@ -8124,39 +8140,32 @@ msgid "Select the previous shape, subtile, or Tile." msgstr "Önceki ÅŸekil, altdöşeme ya da Döşemeyi Seç." #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Region" -msgstr "Bölge Åžekli" +msgstr "Bölge" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Collision" -msgstr "Temas Åžekli" +msgstr "Temas" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Occlusion" -msgstr "Örtü Åžekli" +msgstr "Engel" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Navigation" -msgstr "Gezinim Åžekli" +msgstr "Gezinim" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Bitmask" -msgstr "BitMaskeleme Åžekli" +msgstr "Bitmaskesi" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Priority" -msgstr "Öncelik Åžekli" +msgstr "Öncelik" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Z Index" -msgstr "İndeks:" +msgstr "Derinlik İndeksi" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Region Mode" @@ -8388,14 +8397,12 @@ msgid "Edit Tile Z Index" msgstr "Döşeme Z DerinliÄŸini DeÄŸiÅŸtir" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Make Convex" -msgstr "Çokgeni Dışbükey Yap" +msgstr "Dışbükey Yap" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Make Concave" -msgstr "Çokgeni İçbükey Yap" +msgstr "İçbükey Yap" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Create Collision Polygon" @@ -8417,7 +8424,7 @@ msgstr "DöşemeTakımı" msgid "No VCS addons are available." msgstr "Hiçbir VCS eklentisi mevcut deÄŸil." -#: editor/plugins/version_control_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/version_control_editor_plugin.cpp msgid "Error" msgstr "Hata" @@ -8660,9 +8667,8 @@ msgid "Dodge operator." msgstr "Dodge operatörü." #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "HardLight operator." -msgstr "HardLight opeartörü" +msgstr "HardLight opeartörü." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Lighten operator." @@ -9085,7 +9091,7 @@ msgstr "" "\n" "OuterProduct ilk parametre 'c' 'yi kolon vektör olarak ele alır. (tek " "sütunlu matrix) ve ikinci parametre 'r' yi ise yatay vektör (tek satırlı " -"matrix) olarak ele alır. doÄŸrusal cebirsel çarpım yapar: 'c * r', 'c' 'nin " +"matrix) olarak ele alır. doÄŸrusal cebirsel çarpım yapar: 'c * r', 'c' 'nin " "bileÅŸenleri miktarınca satırı olan bir matrix üretir. Bu matrix'in kolon " "sayısı ise 'r' 'nin bileÅŸen sayısına eÅŸit olur." @@ -9210,8 +9216,8 @@ msgid "" msgstr "" "SmoothStep iÅŸlevi( vektör(edge0), vektör(edge1), vektör(x) ).\n" "\n" -"0.0 döndürür eÄŸer 'x' 'edge0''den küçükse, ve 1.0 eÄŸer 'x' 'edge1'' den " -"büyükse. Aksi takdirde dönen deÄŸer 0.0 ve 1.0 arasından Hermite polinom " +"0.0 döndürür eÄŸer 'x' 'edge0''den küçükse, ve 1.0 eÄŸer 'x' 'edge1'' den " +"büyükse. Aksi takdirde dönen deÄŸer 0.0 ve 1.0 arasından Hermite polinom " "hesabıyla döndürürlür." #: editor/plugins/visual_shader_editor_plugin.cpp @@ -9224,7 +9230,7 @@ msgid "" msgstr "" "SmoothStep iÅŸlevi( katsayı(edge0), katsayı(edge1), katsayı(x) ).\n" "\n" -"0.0 döndürür eÄŸer 'x' 'edge0''den küçükse, ve 1.0 eÄŸer 'x' 'edge1'' den " +"0.0 döndürür eÄŸer 'x' 'edge0''den küçükse, ve 1.0 eÄŸer 'x' 'edge1'' den " "büyükse. Aksi takdirde dönen deÄŸer 0.0 ve 1.0 arasından Hermite polinom " "hesabıyla döndürülür." @@ -9282,12 +9288,17 @@ msgid "" "output ports. This is a direct injection of code into the vertex/fragment/" "light function, do not use it to write the function declarations inside." msgstr "" +"İstenilen kadar girdi ve çıktı miktarı ile Özel Godot Shader Dili giriÅŸi. Bu " +"yöntemle doÄŸrudan vertex/fragment/light shaderları giriÅŸi yapılıyor, " +"içerisinde iÅŸlev tanımları yapmayın." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "" "Returns falloff based on the dot product of surface normal and view " "direction of camera (pass associated inputs to it)." msgstr "" +"Kamera görüş yönü ile yüzey normali arasındaki Nokta Ürüne dayalı geçiÅŸ " +"deÄŸerleri döndürür (ilgili girdileri geçirir)." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "" @@ -9296,78 +9307,90 @@ msgid "" "it later in the Expressions. You can also declare varyings, uniforms and " "constants." msgstr "" +"Elde edilen sonuç shader'ın üzerine yerleÅŸtirilen Özel Godot Shader dili " +"ifadesi. İçerisinde İşlev tanımlarını yapabilir ve daha sonra İfadeler " +"bölümünden çağırabilirsiniz. Ayrıca varaying, uniforms ve constant " +"deÄŸiÅŸkenleri tanımlayabilirsiniz." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "(Fragment/Light mode only) Scalar derivative function." -msgstr "" +msgstr "(Yalnızca Fragment/Light modu) Sayısal Türetim İşlevi SDF." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "(Fragment/Light mode only) Vector derivative function." -msgstr "" +msgstr "(Yalnızca Fragment/Light modu) Vektörel Türetim İşlevi." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "" "(Fragment/Light mode only) (Vector) Derivative in 'x' using local " "differencing." msgstr "" +"(Yalnızca Fragment/Light modu) (Vektör) Yerel farklar kullanılarak 'x' " +"cinsinden türev." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "" "(Fragment/Light mode only) (Scalar) Derivative in 'x' using local " "differencing." msgstr "" +"(Yalnızca Fragment/Light Modu) (Sayısal) Yerel farklar kullanılarak 'x' " +"cinsinden türev." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "" "(Fragment/Light mode only) (Vector) Derivative in 'y' using local " "differencing." msgstr "" +"(Yalnızca Fragment/Light modu) (Vektör) Yerel farklar kullanılarak 'y' " +"cinsinden türev." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "" "(Fragment/Light mode only) (Scalar) Derivative in 'y' using local " "differencing." msgstr "" +"(Yalnızca Fragment/Light modu) (Sayısal) Yerel farklar kullanılarak 'y' " +"cinsinden türev." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "" "(Fragment/Light mode only) (Vector) Sum of absolute derivative in 'x' and " "'y'." msgstr "" +"(Yalnızca Fragment/Light modu) (Vektör) 'X' ve 'y' de mutlak türevlerin " +"toplamı." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "" "(Fragment/Light mode only) (Scalar) Sum of absolute derivative in 'x' and " "'y'." msgstr "" +"(Yalnızca Fragment/Light modu) (Sayısal) 'X' ve 'y' de mutlak türevlerin " +"toplamı." #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "VisualShader" -msgstr "Gölgelendirici" +msgstr "GörselShader" #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Edit Visual Property" -msgstr "Süzgeçleri Düzenle" +msgstr "Görsel NiteliÄŸi Düzenle" #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Visual Shader Mode Changed" -msgstr "Shader DeÄŸiÅŸiklikleri" +msgstr "Görsel Shader Modu DeÄŸiÅŸti" #: editor/project_export.cpp msgid "Runnable" msgstr "KoÅŸturulabilir" #: editor/project_export.cpp -#, fuzzy msgid "Add initial export..." -msgstr "GiriÅŸ noktası ekle" +msgstr "İlk dışa aktarmayı ekle ..." #: editor/project_export.cpp msgid "Add previous patches..." -msgstr "" +msgstr "Önceki yamaları ekle..." #: editor/project_export.cpp msgid "Delete patch '%s' from list?" @@ -9404,9 +9427,8 @@ msgid "Exporting All" msgstr "Tümünü Dışa Aktarma" #: editor/project_export.cpp -#, fuzzy msgid "The given export path doesn't exist:" -msgstr "Yol mevcut deÄŸil." +msgstr "Belirtilen Dışa aktarım yolu mevcut deÄŸil:" #: editor/project_export.cpp msgid "Export templates for this platform are missing/corrupted:" @@ -9425,11 +9447,13 @@ msgid "" "If checked, the preset will be available for use in one-click deploy.\n" "Only one preset per platform may be marked as runnable." msgstr "" +"EÄŸer bu seçenek seçilirse önayar, tek tıklamalı dağıtımda kullanılabilir.\n" +"Her platform için sadece tek bir önayar çalıştırılabilir olarak " +"iÅŸaretlenebilir." #: editor/project_export.cpp -#, fuzzy msgid "Export Path" -msgstr "Ön Ayarları Dışa Aktar:" +msgstr "Dışa aktarım Yolu" #: editor/project_export.cpp msgid "Resources" @@ -9456,22 +9480,20 @@ msgid "Resources to export:" msgstr "Dışa aktarılacak kaynaklar:" #: editor/project_export.cpp -#, fuzzy msgid "" "Filters to export non-resource files/folders\n" "(comma-separated, e.g: *.json, *.txt, docs/*)" msgstr "" -"Kaynak olmayan dosyaları dışa aktarmak için kullanılan süzgeçler (virgülle " -"ayrılmış, ör. * .json, * .txt)" +"Kaynak olmayan dosyaları / klasörleri dışa aktarmak için filtreler\n" +"(virgülle-ayrık, e.g: *.json, *.txt, docs/*)" #: editor/project_export.cpp -#, fuzzy msgid "" "Filters to exclude files/folders from project\n" "(comma-separated, e.g: *.json, *.txt, docs/*)" msgstr "" -"Dışa aktarma iÅŸleminden hariç tutulacak süzgeçler (virgülle ayrılmış, ör. * ." -"json, * .txt)" +"Dosyaları / klasörleri projeden hariç tutmak için filtreler\n" +"(virgülle-ayrık, e.g: *.json, *.txt, docs/*)" #: editor/project_export.cpp msgid "Patches" @@ -9482,9 +9504,8 @@ msgid "Make Patch" msgstr "Yama Yap" #: editor/project_export.cpp -#, fuzzy msgid "Pack File" -msgstr " Dosyalar" +msgstr "Paket Dosyası" #: editor/project_export.cpp msgid "Features" @@ -9499,9 +9520,8 @@ msgid "Feature List:" msgstr "Özellik Listesi:" #: editor/project_export.cpp -#, fuzzy msgid "Script" -msgstr "Yeni Betik" +msgstr "Betik" #: editor/project_export.cpp msgid "Script Export Mode:" @@ -9521,7 +9541,7 @@ msgstr "Åžifreli (Açarı AÅŸağıda Belirtin)" #: editor/project_export.cpp msgid "Invalid Encryption Key (must be 64 characters long)" -msgstr "" +msgstr "Geçersiz Åžifreleme Anahtarı (64 karakter uzunluÄŸunda olmalı)" #: editor/project_export.cpp msgid "Script Encryption Key (256-bits as hex):" @@ -9536,23 +9556,20 @@ msgid "Export Project" msgstr "Projeyi Dışa Aktar" #: editor/project_export.cpp -#, fuzzy msgid "Export mode?" -msgstr "Dışa Aktarma Biçimi:" +msgstr "Dışa Aktarma Modu?" #: editor/project_export.cpp -#, fuzzy msgid "Export All" -msgstr "Dışa Aktar" +msgstr "Tümünü Dışa Aktar" #: editor/project_export.cpp editor/project_manager.cpp -#, fuzzy msgid "ZIP File" -msgstr " Dosyalar" +msgstr "ZIP Dosyası" #: editor/project_export.cpp msgid "Godot Game Pack" -msgstr "" +msgstr "Godot Oyun Paketi" #: editor/project_export.cpp msgid "Export templates for this platform are missing:" @@ -9567,13 +9584,20 @@ msgid "Export With Debug" msgstr "Hata Ayıklama İle Dışa Aktar" #: editor/project_manager.cpp -msgid "The path does not exist." +#, fuzzy +msgid "The path specified doesn't exist." msgstr "Yol mevcut deÄŸil." #: editor/project_manager.cpp #, fuzzy -msgid "Invalid '.zip' project file, does not contain a 'project.godot' file." -msgstr "Lütfen 'proje.godot' dosyası içermeyen bir klasör seçin." +msgid "Error opening package file (it's not in ZIP format)." +msgstr "Paket dosyası açılırken hata oluÅŸtu, zip formatında deÄŸil." + +#: editor/project_manager.cpp +#, fuzzy +msgid "" +"Invalid \".zip\" project file; it doesn't contain a \"project.godot\" file." +msgstr "Geçersiz '.zip' proje dosyası, 'project.godot' dosyası içermiyor." #: editor/project_manager.cpp msgid "Please choose an empty folder." @@ -9581,12 +9605,13 @@ msgstr "Lütfen boÅŸ bir klasör seçin." #: editor/project_manager.cpp #, fuzzy -msgid "Please choose a 'project.godot' or '.zip' file." -msgstr "Lütfen bir 'proje.godot' dosyası seçin." +msgid "Please choose a \"project.godot\" or \".zip\" file." +msgstr "Lütfen bir 'project.godot' veya '.zip' dosyası seçin." #: editor/project_manager.cpp -msgid "Directory already contains a Godot project." -msgstr "" +#, fuzzy +msgid "This directory already contains a Godot project." +msgstr "Bu dizinde zaten bir Godot projesi var." #: editor/project_manager.cpp msgid "New Game Project" @@ -9621,7 +9646,8 @@ msgid "" "Couldn't load project.godot in project path (error %d). It may be missing or " "corrupted." msgstr "" -"Proje yolundaki proje.godot düzenlenemedi.Eksik veya bozulmuÅŸ olabilir." +"Proje yolundaki proje.godot düzenlenemedi (error %d). Eksik veya bozulmuÅŸ " +"olabilir." #: editor/project_manager.cpp msgid "Couldn't edit project.godot in project path." @@ -9668,17 +9694,16 @@ msgid "Project Path:" msgstr "Proje Yolu:" #: editor/project_manager.cpp -#, fuzzy msgid "Project Installation Path:" -msgstr "Proje Yolu:" +msgstr "Proje Yükleme Yolu:" #: editor/project_manager.cpp msgid "Renderer:" -msgstr "" +msgstr "OluÅŸturucu:" #: editor/project_manager.cpp msgid "OpenGL ES 3.0" -msgstr "" +msgstr "OpenGL ES 3" #: editor/project_manager.cpp msgid "" @@ -9687,10 +9712,14 @@ msgid "" "Incompatible with older hardware\n" "Not recommended for web games" msgstr "" +"Daha yüksek görsel kalite\n" +"Tüm özellikler mevcut\n" +"Eski donanımla uyumsuz\n" +"Web oyunları için önerilmez" #: editor/project_manager.cpp msgid "OpenGL ES 2.0" -msgstr "" +msgstr "OpenGL ES 2" #: editor/project_manager.cpp msgid "" @@ -9699,28 +9728,32 @@ msgid "" "Works on most hardware\n" "Recommended for web games" msgstr "" +"Daha Düşük Görsel Kalite\n" +"Bazı özellikler eksik\n" +"ÇoÄŸu donanımda çalışır\n" +"Web uygulamaları için önerilir" #: editor/project_manager.cpp msgid "Renderer can be changed later, but scenes may need to be adjusted." msgstr "" +"OluÅŸturucu daha sonra deÄŸiÅŸtirilebilir, ancak sahnelerin ayarlanması " +"gerekebilir." #: editor/project_manager.cpp msgid "Unnamed Project" msgstr "Adsız Proje" #: editor/project_manager.cpp -#, fuzzy msgid "Missing Project" -msgstr "Var Olan Projeyi İçe Aktar" +msgstr "Eksik Proje" #: editor/project_manager.cpp msgid "Error: Project is missing on the filesystem." -msgstr "" +msgstr "Hata: Proje dosya sisteminde mevcut deÄŸil.." #: editor/project_manager.cpp -#, fuzzy msgid "Can't open project at '%s'." -msgstr "Proje Açılamadı" +msgstr "'%s' adresindeki proje açılamıyor." #: editor/project_manager.cpp msgid "Are you sure to open more than one project?" @@ -9738,6 +9771,14 @@ msgid "" "Warning: You won't be able to open the project with previous versions of the " "engine anymore." msgstr "" +"AÅŸağıdaki proje ayarları dosyası, içinden oluÅŸturulduÄŸu Godot sürümünü " +"belirtmiyor.\n" +"\n" +"%s\n" +"\n" +"Açmaya devam ederseniz, Godot'un geçerli yapılandırma dosyası biçimine " +"dönüştürülecektir..\n" +"Uyarı: Projeyi artık motorun önceki sürümleriyle açamayacaksınız." #: editor/project_manager.cpp msgid "" @@ -9750,15 +9791,23 @@ msgid "" "Warning: You won't be able to open the project with previous versions of the " "engine anymore." msgstr "" +"AÅŸağıdaki proje ayarları dosyası daha eski bir motor sürümü tarafından " +"oluÅŸturulmuÅŸtur ve bu sürüm için dönüştürülmesi gerekir:\n" +"\n" +"%s\n" +"\n" +"Dönüştürmek ister misiniz?\n" +"Uyarı: Projeyi artık motorun önceki sürümleriyle açamayacaksınız." #: editor/project_manager.cpp msgid "" "The project settings were created by a newer engine version, whose settings " "are not compatible with this version." msgstr "" +"Proje ayarları, ayarları bu sürümle uyumlu olmayan daha yeni bir motor " +"sürümü tarafından oluÅŸturuldu." #: editor/project_manager.cpp -#, fuzzy msgid "" "Can't run project: no main scene defined.\n" "Please edit the project and set the main scene in the Project Settings under " @@ -9777,33 +9826,34 @@ msgstr "" "Lütfen ilk içe aktarmayı tetiklemek için projeyi düzenleyin." #: editor/project_manager.cpp -#, fuzzy msgid "Are you sure to run %d projects at once?" -msgstr "Birden fazla projeyi çalıştırmaya kararlı mısınız?" +msgstr "Birden fazla projeyi çalıştırmak istediÄŸinize emin misiniz?" #: editor/project_manager.cpp -#, fuzzy msgid "" "Remove %d projects from the list?\n" "The project folders' contents won't be modified." -msgstr "Proje listeden kaldırılsın mı? (Klasör içerikleri deÄŸiÅŸtirilmeyecek)" +msgstr "" +"%d projeleri listeden kalksın mı?\n" +"Proje klasörü'nün içeriÄŸi deÄŸiÅŸtirilmeyecek." #: editor/project_manager.cpp -#, fuzzy msgid "" "Remove this project from the list?\n" "The project folder's contents won't be modified." -msgstr "Proje listeden kaldırılsın mı? (Klasör içerikleri deÄŸiÅŸtirilmeyecek)" +msgstr "" +"Bu projeyi listeden kaldır?\n" +"Proje klasörünün içeriÄŸi deÄŸiÅŸtirilmeyecek." #: editor/project_manager.cpp -#, fuzzy msgid "" "Remove all missing projects from the list?\n" "The project folders' contents won't be modified." -msgstr "Proje listeden kaldırılsın mı? (Klasör içerikleri deÄŸiÅŸtirilmeyecek)" +msgstr "" +"Tüm eksik projeleri listeden kaldır?\n" +"Proje klasörlerinin içeriÄŸi deÄŸiÅŸtirilmeyecek." #: editor/project_manager.cpp -#, fuzzy msgid "" "Language changed.\n" "The interface will update after restarting the editor or project manager." @@ -9813,27 +9863,25 @@ msgstr "" "olacak." #: editor/project_manager.cpp -#, fuzzy msgid "" "Are you sure to scan %s folders for existing Godot projects?\n" "This could take a while." msgstr "" -"Var olan Godot projeleri için %s klasör taraması yapıyorsunuz. Onaylıyor " -"musunuz?" +"Var olan Godot projeleri için %s klasör taraması yapmak istediÄŸinize emin " +"misiniz?\n" +"Bu biraz zaman alabilir." #: editor/project_manager.cpp msgid "Project Manager" msgstr "Proje Yöneticisi" #: editor/project_manager.cpp -#, fuzzy msgid "Projects" -msgstr "Proje" +msgstr "Projeler" #: editor/project_manager.cpp -#, fuzzy msgid "Last Modified" -msgstr "DeÄŸiÅŸti" +msgstr "Son DeÄŸiÅŸiklik" #: editor/project_manager.cpp msgid "Scan" @@ -9848,9 +9896,8 @@ msgid "New Project" msgstr "Yeni Proje" #: editor/project_manager.cpp -#, fuzzy msgid "Remove Missing" -msgstr "Noktayı kaldır" +msgstr "Eksikleri Kaldır" #: editor/project_manager.cpp msgid "Templates" @@ -9865,7 +9912,6 @@ msgid "Can't run project" msgstr "Proje çalıştırılamadı" #: editor/project_manager.cpp -#, fuzzy msgid "" "You currently don't have any projects.\n" "Would you like to explore official example projects in the Asset Library?" @@ -9890,35 +9936,31 @@ msgid "Mouse Button" msgstr "Fare Düğmesi" #: editor/project_settings_editor.cpp -#, fuzzy msgid "" "Invalid action name. it cannot be empty nor contain '/', ':', '=', '\\' or " "'\"'" msgstr "" -"Geçersiz iÅŸlem adı. BoÅŸ olamaz ve '/', ':', '=', '\\' veya '\"' içeremez." +"Geçersiz iÅŸlem adı. BoÅŸ olamaz ve '/', ':', '=', '\\' veya '\"' içeremez" #: editor/project_settings_editor.cpp -#, fuzzy msgid "An action with the name '%s' already exists." -msgstr "İşlem '%s' zaten var!" +msgstr "İşlem '%s' zaten var." #: editor/project_settings_editor.cpp msgid "Rename Input Action Event" msgstr "Girdi Eylem Olayını Yeniden Adlandır" #: editor/project_settings_editor.cpp -#, fuzzy msgid "Change Action deadzone" -msgstr "Animasyonun Adını DeÄŸiÅŸtir:" +msgstr "Eylem DeÄŸiÅŸtir ölübölgesi" #: editor/project_settings_editor.cpp msgid "Add Input Action Event" msgstr "GiriÅŸ İşlem Olayı Ekle" #: editor/project_settings_editor.cpp -#, fuzzy msgid "All Devices" -msgstr "Aygıt" +msgstr "Tüm Aygıtlar" #: editor/project_settings_editor.cpp msgid "Device" @@ -9953,24 +9995,20 @@ msgid "Wheel Down Button" msgstr "Tekerlek AÅŸağı Düğmesi" #: editor/project_settings_editor.cpp -#, fuzzy msgid "Wheel Left Button" -msgstr "Tekerlek Yukarı Düğmesi" +msgstr "Tekerlek Sol Düğmesi" #: editor/project_settings_editor.cpp -#, fuzzy msgid "Wheel Right Button" -msgstr "SaÄŸ Düğme" +msgstr "Tekerlek SaÄŸ Düğme" #: editor/project_settings_editor.cpp -#, fuzzy msgid "X Button 1" -msgstr "Düğme 6" +msgstr "X Düğmesi 1" #: editor/project_settings_editor.cpp -#, fuzzy msgid "X Button 2" -msgstr "Düğme 6" +msgstr "X Düğmesi 2" #: editor/project_settings_editor.cpp msgid "Joypad Axis Index:" @@ -10060,9 +10098,8 @@ msgid "Settings saved OK." msgstr "Ayarlar kaydedildi TAMAM." #: editor/project_settings_editor.cpp -#, fuzzy msgid "Moved Input Action Event" -msgstr "GiriÅŸ İşlem Olayı Ekle" +msgstr "Taşınan GiriÅŸ Eylemi Olayı" #: editor/project_settings_editor.cpp msgid "Override for Feature" @@ -10119,6 +10156,8 @@ msgstr "Åžunun Üzerine Yaz..." #: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp msgid "The editor must be restarted for changes to take effect." msgstr "" +"DeÄŸiÅŸikliklerin geçerli olması için düzenleyicinin yeniden baÅŸlatılması " +"gerekir." #: editor/project_settings_editor.cpp msgid "Input Map" @@ -10134,7 +10173,7 @@ msgstr "Eylem" #: editor/project_settings_editor.cpp msgid "Deadzone" -msgstr "" +msgstr "Ölü bölge" #: editor/project_settings_editor.cpp msgid "Device:" @@ -10177,14 +10216,12 @@ msgid "Locales Filter" msgstr "Yereller Süzgeci" #: editor/project_settings_editor.cpp -#, fuzzy msgid "Show All Locales" -msgstr "Tüm yerelleri göster" +msgstr "Tüm Dilleri Göster" #: editor/project_settings_editor.cpp -#, fuzzy msgid "Show Selected Locales Only" -msgstr "Sadece seçili yerelleri göster" +msgstr "Sadece Seçili Dilleri Göster" #: editor/project_settings_editor.cpp msgid "Filter mode:" @@ -10259,128 +10296,134 @@ msgid "Select Method" msgstr "Metot Seç" #: editor/rename_dialog.cpp editor/scene_tree_dock.cpp -#, fuzzy msgid "Batch Rename" -msgstr "Yeniden Adlandır" +msgstr "Tümden Yeniden Adlandır" #: editor/rename_dialog.cpp msgid "Prefix" -msgstr "" +msgstr "Ön Ek" #: editor/rename_dialog.cpp msgid "Suffix" -msgstr "" +msgstr "Son Ek" #: editor/rename_dialog.cpp #, fuzzy +msgid "Use Regular Expressions" +msgstr "Düzenli İfadeler" + +#: editor/rename_dialog.cpp msgid "Advanced Options" -msgstr "Yapışma ayarları" +msgstr "GeliÅŸmiÅŸ Ayarlar" #: editor/rename_dialog.cpp msgid "Substitute" -msgstr "" +msgstr "Yer Tutucu" #: editor/rename_dialog.cpp -#, fuzzy msgid "Node name" -msgstr "Düğüm adı:" +msgstr "Düğüm adı" #: editor/rename_dialog.cpp msgid "Node's parent name, if available" -msgstr "" +msgstr "Düğüm'ün üst düğüm ismi, eÄŸer varsa" #: editor/rename_dialog.cpp -#, fuzzy msgid "Node type" -msgstr "Düğüm Türü Bul" +msgstr "Düğüm Türü" #: editor/rename_dialog.cpp -#, fuzzy msgid "Current scene name" -msgstr "Åžu anki Sahne" +msgstr "Mevcut sahne adı" #: editor/rename_dialog.cpp -#, fuzzy msgid "Root node name" -msgstr "Kök Düğüm adı:" +msgstr "Kök düğüm adı" #: editor/rename_dialog.cpp msgid "" "Sequential integer counter.\n" "Compare counter options." msgstr "" +"Sıralı tamsayı sayacı.\n" +"Sayaç seçeneklerini karşılaÅŸtırın." #: editor/rename_dialog.cpp -msgid "Per Level counter" -msgstr "" +#, fuzzy +msgid "Per-level Counter" +msgstr "Seviye Başına sayaç" #: editor/rename_dialog.cpp msgid "If set the counter restarts for each group of child nodes" -msgstr "" +msgstr "Ayarlanmışsa, sayaç her bir alt düğüm grubu için yeniden baÅŸlar" #: editor/rename_dialog.cpp msgid "Initial value for the counter" -msgstr "" +msgstr "Sayaç için baÅŸlangıç deÄŸeri" #: editor/rename_dialog.cpp -#, fuzzy msgid "Step" -msgstr "Adım:" +msgstr "Adım" #: editor/rename_dialog.cpp msgid "Amount by which counter is incremented for each node" -msgstr "" +msgstr "Her düğüm için sayacın artırılacağı miktar" #: editor/rename_dialog.cpp msgid "Padding" -msgstr "" +msgstr "Dolgulama" #: editor/rename_dialog.cpp msgid "" "Minimum number of digits for the counter.\n" "Missing digits are padded with leading zeros." msgstr "" +"Sayaç için minimum basamak sayısı.\n" +"Eksik rakamları baÅŸtaki sıfırlarla doldurulur." #: editor/rename_dialog.cpp -#, fuzzy -msgid "Regular Expressions" -msgstr "İfadeyi DeÄŸiÅŸtir" - -#: editor/rename_dialog.cpp -#, fuzzy msgid "Post-Process" -msgstr "İşlem Sonrası Betik Dizeci:" +msgstr "Artçıl-İşlem" #: editor/rename_dialog.cpp msgid "Keep" msgstr "Tut" #: editor/rename_dialog.cpp -msgid "CamelCase to under_scored" -msgstr "" +#, fuzzy +msgid "PascalCase to snake_case" +msgstr "DeveÅžekilli'den alt_tireli'ye dönüştür" #: editor/rename_dialog.cpp -msgid "under_scored to CamelCase" -msgstr "" +#, fuzzy +msgid "snake_case to PascalCase" +msgstr "alt_tireli'den DeveÅžekilli'ye dönüştür" #: editor/rename_dialog.cpp msgid "Case" -msgstr "" +msgstr "Büyük/Küçük" #: editor/rename_dialog.cpp -#, fuzzy msgid "To Lowercase" -msgstr "Küçük harf" +msgstr "Küçük Harfe Döndür" #: editor/rename_dialog.cpp -#, fuzzy msgid "To Uppercase" -msgstr "Büyük harf" +msgstr "Büyük Harfe Döndür" #: editor/rename_dialog.cpp -#, fuzzy msgid "Reset" -msgstr "YaklaÅŸmayı Sıfırla" +msgstr "Sıfırla" + +#: editor/rename_dialog.cpp +#, fuzzy +msgid "Regular Expression Error" +msgstr "Düzenli İfadeler" + +#: editor/rename_dialog.cpp +#, fuzzy +msgid "At character %s" +msgstr "Geçerli karakterler:" #: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp msgid "Reparent Node" @@ -10439,9 +10482,8 @@ msgid "Instance Scene(s)" msgstr "Sahne(leri) Örnekle" #: editor/scene_tree_dock.cpp -#, fuzzy msgid "Replace with Branch Scene" -msgstr "Dalı Sahne olarak Kaydet" +msgstr "Dal Sahnesi ile DeÄŸiÅŸtir" #: editor/scene_tree_dock.cpp msgid "Instance Child Scene" @@ -10470,38 +10512,36 @@ msgstr "Düğüm(leri) ÇoÄŸalt" #: editor/scene_tree_dock.cpp msgid "Can't reparent nodes in inherited scenes, order of nodes can't change." msgstr "" +"Devralınan sahnelerde düğümler yeniden oluÅŸturulamaz, düğümlerin sırası " +"deÄŸiÅŸemez." #: editor/scene_tree_dock.cpp msgid "Node must belong to the edited scene to become root." -msgstr "" +msgstr "Kök olabilmek için düğümün düzenlenen sahneye ait olması gerekir." #: editor/scene_tree_dock.cpp msgid "Instantiated scenes can't become root" -msgstr "" +msgstr "Örneklenen sahneler kök olamaz" #: editor/scene_tree_dock.cpp -#, fuzzy msgid "Make node as Root" -msgstr "Anlamlı!" +msgstr "Düğümü Kök düğüm yap" #: editor/scene_tree_dock.cpp -#, fuzzy msgid "Delete %d nodes?" -msgstr "Düğümleri Sil" +msgstr "%d düğümleri silelim mi?" #: editor/scene_tree_dock.cpp -#, fuzzy msgid "Delete the root node \"%s\"?" -msgstr "Gölgelendirici Çizge Düğümünü Sil" +msgstr "\"%s\" kök düğümü silinsin mi?" #: editor/scene_tree_dock.cpp msgid "Delete node \"%s\" and its children?" -msgstr "" +msgstr "\"%s\" düğümü ve alt düğümleri silinsin mi?" #: editor/scene_tree_dock.cpp -#, fuzzy msgid "Delete node \"%s\"?" -msgstr "Düğümleri Sil" +msgstr "\"%s\" düğümü silinsin mi?" #: editor/scene_tree_dock.cpp msgid "Can not perform with the root node." @@ -10520,46 +10560,45 @@ msgid "" "Disabling \"editable_instance\" will cause all properties of the node to be " "reverted to their default." msgstr "" +"\"düzenlenebilir_örnek\" seçeneÄŸi iptal edilince düğümün nitelikleri " +"varsayılan deÄŸerlere döner." #: editor/scene_tree_dock.cpp msgid "" "Enabling \"Load As Placeholder\" will disable \"Editable Children\" and " "cause all properties of the node to be reverted to their default." msgstr "" +"\"Yer Tutucu Olarak Yükle\" seçeneÄŸinin etkinleÅŸtirilmesi \"Düzenlenebilir " +"alt Düğüm\" seçeneÄŸini pasifleÅŸtirir ve düğümün niteliklerini varsayılanlara " +"döndürür." #: editor/scene_tree_dock.cpp msgid "Make Local" msgstr "YerelleÅŸtir" #: editor/scene_tree_dock.cpp -#, fuzzy msgid "New Scene Root" -msgstr "Anlamlı!" +msgstr "Yeni Sahne Kökü" #: editor/scene_tree_dock.cpp -#, fuzzy msgid "Create Root Node:" -msgstr "Düğüm OluÅŸtur" +msgstr "Kök Düğüm OluÅŸtur:" #: editor/scene_tree_dock.cpp -#, fuzzy msgid "2D Scene" -msgstr "Sahne" +msgstr "2B Sahne" #: editor/scene_tree_dock.cpp -#, fuzzy msgid "3D Scene" -msgstr "Sahne" +msgstr "3B Sahne" #: editor/scene_tree_dock.cpp -#, fuzzy msgid "User Interface" -msgstr "Kalıtı Temizle" +msgstr "Kullanıcı Arayüzü" #: editor/scene_tree_dock.cpp -#, fuzzy msgid "Other Node" -msgstr "Düğümleri Sil" +msgstr "DiÄŸer Düğüm" #: editor/scene_tree_dock.cpp msgid "Can't operate on nodes from a foreign scene!" @@ -10578,9 +10617,8 @@ msgid "Remove Node(s)" msgstr "Düğümleri Kaldır" #: editor/scene_tree_dock.cpp -#, fuzzy msgid "Change type of node(s)" -msgstr "GiriÅŸ Adını DeÄŸiÅŸtir" +msgstr "Düğüm(ler) türünü deÄŸiÅŸtir" #: editor/scene_tree_dock.cpp msgid "" @@ -10614,32 +10652,28 @@ msgid "Load As Placeholder" msgstr "Yer Tutucu Olarak Yükle" #: editor/scene_tree_dock.cpp -#, fuzzy msgid "Open Documentation" -msgstr "Çevrimiçi Godot dökümanlarını aç" +msgstr "Klavuzu Aç" #: editor/scene_tree_dock.cpp msgid "Add Child Node" msgstr "Çocuk Düğüm Ekle" #: editor/scene_tree_dock.cpp -#, fuzzy msgid "Expand/Collapse All" -msgstr "Hepsini Daralt" +msgstr "Hepsini Aç/Kapa" #: editor/scene_tree_dock.cpp msgid "Change Type" msgstr "Türü DeÄŸiÅŸtir" #: editor/scene_tree_dock.cpp -#, fuzzy msgid "Reparent to New Node" -msgstr "Düğümün EbeveynliÄŸini DeÄŸiÅŸtir" +msgstr "BaÅŸka Düğüme Eklemle" #: editor/scene_tree_dock.cpp -#, fuzzy msgid "Make Scene Root" -msgstr "Anlamlı!" +msgstr "Sahne Kökü Yap" #: editor/scene_tree_dock.cpp msgid "Merge From Scene" @@ -10658,9 +10692,8 @@ msgid "Delete (No Confirm)" msgstr "Sil (DoÄŸrulama Yok)" #: editor/scene_tree_dock.cpp -#, fuzzy msgid "Add/Create a New Node." -msgstr "Yeni Bir Düğüm Ekle / OluÅŸtur" +msgstr "Yeni Bir Düğüm Ekle/OluÅŸtur." #: editor/scene_tree_dock.cpp msgid "" @@ -10691,78 +10724,68 @@ msgid "Clear Inheritance? (No Undo!)" msgstr "Miras Silinsin mi? (Geri Alınamaz!)" #: editor/scene_tree_editor.cpp -#, fuzzy msgid "Toggle Visible" msgstr "GörünebilirliÄŸi Aç/Kapa" #: editor/scene_tree_editor.cpp -#, fuzzy msgid "Unlock Node" -msgstr "Düğüm Seç" +msgstr "Düğüm Kilidi Aç" #: editor/scene_tree_editor.cpp -#, fuzzy msgid "Button Group" -msgstr "Düğme 7" +msgstr "Düğme Grubu" #: editor/scene_tree_editor.cpp -#, fuzzy msgid "(Connecting From)" -msgstr "BaÄŸlantı Hatası" +msgstr "(Gelen BaÄŸlantı)" #: editor/scene_tree_editor.cpp msgid "Node configuration warning:" msgstr "Düğüm yapılandırma uyarısı:" #: editor/scene_tree_editor.cpp -#, fuzzy msgid "" "Node has %s connection(s) and %s group(s).\n" "Click to show signals dock." msgstr "" -"Düğüm baÄŸlantı(lar) ve grup(lar)a sahip\n" -"Sinyaller dokunu göstermek için tıkla." +"Düğüm %s baÄŸlantı(lar) ve %s grup(lar)a sahip\n" +"Sinyaller bölümünü göstermek için tıkla." #: editor/scene_tree_editor.cpp -#, fuzzy msgid "" "Node has %s connection(s).\n" "Click to show signals dock." msgstr "" -"Düğüm baÄŸlantılara sahip.\n" -"Sinyaller dokunu göstermek için tıkla." +"Düğüm %s baÄŸlantılara sahip.\n" +"Sinyaller bölümünü göstermek için tıkla." #: editor/scene_tree_editor.cpp -#, fuzzy msgid "" "Node is in %s group(s).\n" "Click to show groups dock." msgstr "" -"Düğüm grup(lar)ın içinde.\n" -"Gruplar dokunu göstermek için tıkla." +"Düğüm %s grup(lar)ı içinde.\n" +"Gruplar bölümünü göstermek için tıkla." #: editor/scene_tree_editor.cpp -#, fuzzy msgid "Open Script:" -msgstr "Betik Aç" +msgstr "Betik Aç:" #: editor/scene_tree_editor.cpp -#, fuzzy msgid "" "Node is locked.\n" "Click to unlock it." msgstr "" "Düğüm kilitli.\n" -"Kiliti açmak için tıkla" +"Kiliti açmak için tıkla." #: editor/scene_tree_editor.cpp -#, fuzzy msgid "" "Children are not selectable.\n" "Click to make selectable." msgstr "" -"Çocuklar seçilebilir deÄŸil.\n" -"Seçilebilir yapmak için tıkla" +"Alt düğümler seçilebilir deÄŸil.\n" +"Seçilebilir yapmak için tıkla." #: editor/scene_tree_editor.cpp msgid "Toggle Visibility" @@ -10773,6 +10796,8 @@ msgid "" "AnimationPlayer is pinned.\n" "Click to unpin." msgstr "" +"AnimasyonOynatıcı sabitlendi.\n" +"Çözmek için tıklayın." #: editor/scene_tree_editor.cpp msgid "Invalid node name, the following characters are not allowed:" @@ -10795,39 +10820,32 @@ msgid "Select a Node" msgstr "Bir Düğüm Seç" #: editor/script_create_dialog.cpp -#, fuzzy msgid "Path is empty." -msgstr "Yol boÅŸ" +msgstr "Yol boÅŸ." #: editor/script_create_dialog.cpp -#, fuzzy msgid "Filename is empty." -msgstr "Kayıt yolu boÅŸ!" +msgstr "Dosya ismi boÅŸ." #: editor/script_create_dialog.cpp -#, fuzzy msgid "Path is not local." -msgstr "Yol yerel deÄŸil" +msgstr "Yol yerel deÄŸil." #: editor/script_create_dialog.cpp -#, fuzzy msgid "Invalid base path." -msgstr "Geçersiz üst yol" +msgstr "Geçersiz ana yol." #: editor/script_create_dialog.cpp -#, fuzzy msgid "A directory with the same name exists." -msgstr "Aynı isimde dizin zaten var" +msgstr "Aynı isimde dizin zaten var." #: editor/script_create_dialog.cpp -#, fuzzy msgid "Invalid extension." -msgstr "Geçersiz uzantı" +msgstr "Geçersiz uzantı." #: editor/script_create_dialog.cpp -#, fuzzy msgid "Wrong extension chosen." -msgstr "Yanlış uzantı seçili" +msgstr "Yanlış uzantı seçili." #: editor/script_create_dialog.cpp msgid "Error loading template '%s'" @@ -10842,7 +10860,6 @@ msgid "Error loading script from %s" msgstr "Åžuradan: %s betik yüklenirken hata" #: editor/script_create_dialog.cpp -#, fuzzy msgid "Overrides" msgstr "Üzerine Yaz" @@ -10851,74 +10868,61 @@ msgid "N/A" msgstr "Uygulanamaz" #: editor/script_create_dialog.cpp -#, fuzzy msgid "Open Script / Choose Location" -msgstr "Betik Düzenleyiciyi Aç" +msgstr "Betik Aç / Konum Seç" #: editor/script_create_dialog.cpp -#, fuzzy msgid "Open Script" msgstr "Betik Aç" #: editor/script_create_dialog.cpp -#, fuzzy msgid "File exists, it will be reused." -msgstr "Dosya mevcut, yeniden kullanılacak" +msgstr "Dosya mevcut, yeniden kullanılacak." #: editor/script_create_dialog.cpp -#, fuzzy msgid "Invalid class name." -msgstr "Geçersiz sınıf ismi" +msgstr "Geçersiz sınıf ismi." #: editor/script_create_dialog.cpp -#, fuzzy msgid "Invalid inherited parent name or path." -msgstr "Geçersiz miras alınmış ebeveyn ismi veya yolu" +msgstr "Geçersiz devralınan üst ad veya yol." #: editor/script_create_dialog.cpp #, fuzzy -msgid "Script is valid." -msgstr "Betik geçerli" +msgid "Script path/name is valid." +msgstr "Betik geçerli." #: editor/script_create_dialog.cpp -#, fuzzy msgid "Allowed: a-z, A-Z, 0-9, _ and ." -msgstr "İzin verilenler: a-z, A-Z, 0-9 ve _" +msgstr "İzin verilenler: a-z, A-Z, 0-9, _ ve ." #: editor/script_create_dialog.cpp -#, fuzzy msgid "Built-in script (into scene file)." -msgstr "Gömülü betik (sahne dosyasına)" +msgstr "Gömülü betik (sahne dosyasına)." #: editor/script_create_dialog.cpp -#, fuzzy msgid "Will create a new script file." -msgstr "Yeni betik dosyası oluÅŸtur" +msgstr "Yeni betik dosyası oluÅŸturulacak." #: editor/script_create_dialog.cpp -#, fuzzy msgid "Will load an existing script file." -msgstr "Mevcut betik dosyasını yükle" +msgstr "Mevcut betik dosyasını yükle." #: editor/script_create_dialog.cpp -#, fuzzy msgid "Script file already exists." -msgstr "İşlem '%s' zaten var!" +msgstr "Betik dosyası zaten mevcut." #: editor/script_create_dialog.cpp -#, fuzzy msgid "Class Name:" -msgstr "Sınıf İsmi" +msgstr "Sınıf İsmi:" #: editor/script_create_dialog.cpp -#, fuzzy msgid "Template:" -msgstr "Åžablon" +msgstr "Åžablon:" #: editor/script_create_dialog.cpp -#, fuzzy msgid "Built-in Script:" -msgstr "Gömme Betik" +msgstr "Gömülü Betik:" #: editor/script_create_dialog.cpp msgid "Attach Node Script" @@ -10933,52 +10937,44 @@ msgid "Bytes:" msgstr "Baytlar:" #: editor/script_editor_debugger.cpp -#, fuzzy msgid "Warning:" -msgstr "Uyarılar" +msgstr "Uyarılar:" #: editor/script_editor_debugger.cpp msgid "Error:" msgstr "Hata:" #: editor/script_editor_debugger.cpp -#, fuzzy msgid "C++ Error" -msgstr "Hatayı Kopyala" +msgstr "C++ Hatası" #: editor/script_editor_debugger.cpp -#, fuzzy msgid "C++ Error:" -msgstr "Hata:" +msgstr "C++ Hatası:" #: editor/script_editor_debugger.cpp -#, fuzzy msgid "C++ Source" -msgstr "Kaynak:" +msgstr "C++ Kaynağı" #: editor/script_editor_debugger.cpp -#, fuzzy msgid "Source:" msgstr "Kaynak:" #: editor/script_editor_debugger.cpp -#, fuzzy msgid "C++ Source:" -msgstr "Kaynak:" +msgstr "C++ Kaynak:" #: editor/script_editor_debugger.cpp -#, fuzzy msgid "Stack Trace" -msgstr "Çerçeveleri Yığ" +msgstr "Bellek Dökümü" #: editor/script_editor_debugger.cpp msgid "Errors" msgstr "Hatalar" #: editor/script_editor_debugger.cpp -#, fuzzy msgid "Child process connected." -msgstr "Çocuk Süreç BaÄŸlandı" +msgstr "Alt süreç connected." #: editor/script_editor_debugger.cpp msgid "Copy Error" @@ -10986,8 +10982,12 @@ msgstr "Hatayı Kopyala" #: editor/script_editor_debugger.cpp #, fuzzy +msgid "Video RAM" +msgstr "Görüntü BelleÄŸi" + +#: editor/script_editor_debugger.cpp msgid "Skip Breakpoints" -msgstr "Noktalar oluÅŸtur." +msgstr "İşaret Noktalarını Atla" #: editor/script_editor_debugger.cpp msgid "Inspect Previous Instance" @@ -11034,10 +11034,6 @@ msgid "Total:" msgstr "Toplam:" #: editor/script_editor_debugger.cpp -msgid "Video Mem" -msgstr "Görüntü BelleÄŸi" - -#: editor/script_editor_debugger.cpp msgid "Resource Path" msgstr "Kaynak Yolu" @@ -11075,22 +11071,19 @@ msgstr "AÄŸaçtan Ayarla" #: editor/script_editor_debugger.cpp msgid "Export measures as CSV" -msgstr "" +msgstr "Ölçüleri CSV olarak dışa aktar" #: editor/settings_config_dialog.cpp -#, fuzzy msgid "Erase Shortcut" -msgstr "Kararma" +msgstr "Kısayol Sil" #: editor/settings_config_dialog.cpp -#, fuzzy msgid "Restore Shortcut" -msgstr "Kısayollar" +msgstr "Kısayolları Geri Yükle" #: editor/settings_config_dialog.cpp -#, fuzzy msgid "Change Shortcut" -msgstr "Çapaları DeÄŸiÅŸtir" +msgstr "Kısayol DeÄŸiÅŸtir" #: editor/settings_config_dialog.cpp msgid "Editor Settings" @@ -11121,9 +11114,8 @@ msgid "Change Camera Size" msgstr "Kamera Boyutunu DeÄŸiÅŸtir" #: editor/spatial_editor_gizmos.cpp -#, fuzzy msgid "Change Notifier AABB" -msgstr "Bildirim Kapsamını DeÄŸiÅŸtir" +msgstr "Bildirici DeÄŸiÅŸtir AABB" #: editor/spatial_editor_gizmos.cpp msgid "Change Particles AABB" @@ -11150,38 +11142,32 @@ msgid "Change Capsule Shape Height" msgstr "Kapsülün YüksekliÄŸini DeÄŸiÅŸtir" #: editor/spatial_editor_gizmos.cpp -#, fuzzy msgid "Change Cylinder Shape Radius" -msgstr "Kapsülün Çapını DeÄŸiÅŸtir" +msgstr "Silindir Åžekli Yarıçapını DeÄŸiÅŸtir" #: editor/spatial_editor_gizmos.cpp -#, fuzzy msgid "Change Cylinder Shape Height" -msgstr "Kapsülün YüksekliÄŸini DeÄŸiÅŸtir" +msgstr "Silindir Åžekli YüksekliÄŸini DeÄŸiÅŸtir" #: editor/spatial_editor_gizmos.cpp msgid "Change Ray Shape Length" msgstr "Işın Åžeklinin UzunluÄŸunu DeÄŸiÅŸtir" #: modules/csg/csg_gizmos.cpp -#, fuzzy msgid "Change Cylinder Radius" -msgstr "Işın Çapını DeÄŸiÅŸtir" +msgstr "Silindir Yarıçapını DeÄŸiÅŸtir" #: modules/csg/csg_gizmos.cpp -#, fuzzy msgid "Change Cylinder Height" -msgstr "Kapsülün YüksekliÄŸini DeÄŸiÅŸtir" +msgstr "Silindir YüksekliÄŸini DeÄŸiÅŸtir" #: modules/csg/csg_gizmos.cpp -#, fuzzy msgid "Change Torus Inner Radius" -msgstr "Küresel Åžeklin Çapını DeÄŸiÅŸtir" +msgstr "Simit Åžekli İç Yarıçapını DeÄŸiÅŸtir" #: modules/csg/csg_gizmos.cpp -#, fuzzy msgid "Change Torus Outer Radius" -msgstr "Işın Çapını DeÄŸiÅŸtir" +msgstr "Simit Åžekli Dış Yarıçapını DeÄŸiÅŸtir" #: modules/gdnative/gdnative_library_editor_plugin.cpp msgid "Select the dynamic library for this entry" @@ -11221,12 +11207,11 @@ msgstr "GDYerelKütüphanesi" #: modules/gdnative/gdnative_library_singleton_editor.cpp msgid "Enabled GDNative Singleton" -msgstr "" +msgstr "GDNative İskelet EtkinleÅŸtirildi" #: modules/gdnative/gdnative_library_singleton_editor.cpp -#, fuzzy msgid "Disabled GDNative Singleton" -msgstr "Güncelleme Topacını Devre Dışı Bırak" +msgstr "GDNative İskeleti PasifleÅŸtirildi" #: modules/gdnative/gdnative_library_singleton_editor.cpp msgid "Library" @@ -11241,9 +11226,8 @@ msgid "GDNative" msgstr "GDYerel" #: modules/gdscript/gdscript_functions.cpp -#, fuzzy msgid "Step argument is zero!" -msgstr "adım deÄŸiÅŸtirgeni sıfır!" +msgstr "Adım argümanı sıfır!" #: modules/gdscript/gdscript_functions.cpp msgid "Not a script with an instance" @@ -11306,19 +11290,16 @@ msgid "GridMap Delete Selection" msgstr "IzgaraHaritası Seçimi Sil" #: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy msgid "GridMap Fill Selection" -msgstr "IzgaraHaritası Seçimi Sil" +msgstr "IzgaraHaritası Seçimi Doldur" #: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy msgid "GridMap Paste Selection" -msgstr "IzgaraHaritası Seçimi Sil" +msgstr "IzgaraHaritası Seçimi Yapıştır" #: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy msgid "GridMap Paint" -msgstr "IzgaraHaritası Ayarları" +msgstr "IzgaraHaritası Boyama" #: modules/gridmap/grid_map_editor_plugin.cpp msgid "Grid Map" @@ -11381,18 +11362,16 @@ msgid "Cursor Clear Rotation" msgstr "İmleç Döndürme Temizle" #: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy msgid "Paste Selects" -msgstr "Seçimi Sil" +msgstr "Seçimleri Yapıştır" #: modules/gridmap/grid_map_editor_plugin.cpp msgid "Clear Selection" msgstr "Seçimi Temizle" #: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy msgid "Fill Selection" -msgstr "Tüm Seçim" +msgstr "Seçimi Doldur" #: modules/gridmap/grid_map_editor_plugin.cpp msgid "GridMap Settings" @@ -11403,13 +11382,12 @@ msgid "Pick Distance:" msgstr "Uzaklık Seç:" #: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy msgid "Filter meshes" -msgstr "Süzgeç kipi:" +msgstr "Modelleri Süz" #: modules/gridmap/grid_map_editor_plugin.cpp msgid "Give a MeshLibrary resource to this GridMap to use its meshes." -msgstr "" +msgstr "Model olarak kullanması için bu GridMap'e MeshLibrary kaynağı atayın." #: modules/mono/csharp_script.cpp msgid "Class name can't be a reserved keyword" @@ -11421,7 +11399,7 @@ msgstr "İç özel durum yığını izlemesinin sonu" #: modules/recast/navigation_mesh_editor_plugin.cpp msgid "Bake NavMesh" -msgstr "" +msgstr "NavMesh'i Sabitle" #: modules/recast/navigation_mesh_editor_plugin.cpp msgid "Clear the navigation mesh." @@ -11536,42 +11514,36 @@ msgid "Set Variable Type" msgstr "DeÄŸiÅŸken Tipini Ayarla" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Add Input Port" -msgstr "GiriÅŸ Ekle" +msgstr "GiriÅŸ Portu Ekle" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Add Output Port" -msgstr "GiriÅŸ Ekle" +msgstr "Çıkış Portu Ekle" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Override an existing built-in function." -msgstr "Geçersiz ad. Var olan gömülü türdeki ad ile çakışmamalı." +msgstr "Varolan gömülü iÅŸlevi deÄŸiÅŸtir." #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Create a new function." -msgstr "Yeni %s oluÅŸtur" +msgstr "Yeni iÅŸlev oluÅŸtur." #: modules/visual_script/visual_script_editor.cpp msgid "Variables:" msgstr "DeÄŸiÅŸkenler:" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Create a new variable." -msgstr "Yeni %s oluÅŸtur" +msgstr "Yeni deÄŸiÅŸken oluÅŸtur." #: modules/visual_script/visual_script_editor.cpp msgid "Signals:" msgstr "Sinyaller:" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Create a new signal." -msgstr "Sıfırdan yeni bir çokgen oluÅŸturun." +msgstr "Yeni sinyal oluÅŸtur." #: modules/visual_script/visual_script_editor.cpp msgid "Name is not a valid identifier:" @@ -11598,9 +11570,8 @@ msgid "Add Function" msgstr "Fonksiyon Ekle" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Delete input port" -msgstr "Noktayı kaldır" +msgstr "Girdi portunu sil" #: modules/visual_script/visual_script_editor.cpp msgid "Add Variable" @@ -11611,14 +11582,12 @@ msgid "Add Signal" msgstr "Sinyal Ekle" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Remove Input Port" -msgstr "Noktayı kaldır" +msgstr "Girdi Portunu Kaldır" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Remove Output Port" -msgstr "Noktayı kaldır" +msgstr "Çıktı Portunu Kaldır" #: modules/visual_script/visual_script_editor.cpp msgid "Change Expression" @@ -11673,6 +11642,9 @@ msgid "" "Can't drop properties because script '%s' is not used in this scene.\n" "Drop holding 'Shift' to just copy the signature." msgstr "" +"Bu sahnede '% s' komut dosyası kullanılmadığı için özellikler " +"bırakılamıyor.\n" +"Sadece imzayı kopyalamak için 'Shift' tuÅŸunu basılı tutarak bırakın." #: modules/visual_script/visual_script_editor.cpp msgid "Add Getter Property" @@ -11699,19 +11671,16 @@ msgid "Connect Nodes" msgstr "Düğümleri BaÄŸla" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Disconnect Nodes" -msgstr "Çizge Düğümlerinin BaÄŸlantılarını Kes" +msgstr "Düğümleri Ayır" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Connect Node Data" -msgstr "Düğümleri BaÄŸla" +msgstr "Düğüm Verisi BaÄŸla" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Connect Node Sequence" -msgstr "Düğümleri BaÄŸla" +msgstr "Düğüm Dizisi BaÄŸla" #: modules/visual_script/visual_script_editor.cpp msgid "Script already has function '%s'" @@ -11722,9 +11691,8 @@ msgid "Change Input Value" msgstr "Girdi DeÄŸerini DeÄŸiÅŸtir" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Resize Comment" -msgstr "CanvasItem Düzenle" +msgstr "Yorumu Boyutlandır" #: modules/visual_script/visual_script_editor.cpp msgid "Can't copy the function node." @@ -11739,26 +11707,24 @@ msgid "Paste VisualScript Nodes" msgstr "GörselBetik Düğümleri Yapıştır" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Can't create function with a function node." -msgstr "Fonksiyon düğümü kopyalanamıyor." +msgstr "İşlev düğümü ile iÅŸlev oluÅŸturulamıyor." #: modules/visual_script/visual_script_editor.cpp msgid "Can't create function of nodes from nodes of multiple functions." -msgstr "" +msgstr "Birden çok iÅŸlevin düğümlerinden düğüm iÅŸlevi oluÅŸturulamıyor." #: modules/visual_script/visual_script_editor.cpp msgid "Select at least one node with sequence port." -msgstr "" +msgstr "Dizi portlu en az bir düğüm seçin." #: modules/visual_script/visual_script_editor.cpp msgid "Try to only have one sequence input in selection." -msgstr "" +msgstr "Seçimde yalnızca bir dizi giriÅŸi olmasını deneyin." #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Create Function" -msgstr "İşlevi Yeniden Adlandır" +msgstr "İşlev OluÅŸtur" #: modules/visual_script/visual_script_editor.cpp msgid "Remove Function" @@ -11781,38 +11747,32 @@ msgid "Editing Signal:" msgstr "Sinyal Düzenleniyor:" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Make Tool:" -msgstr "YerelleÅŸtir" +msgstr "Araç Yap:" #: modules/visual_script/visual_script_editor.cpp msgid "Members:" msgstr "Üyeler:" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Change Base Type:" -msgstr "Temel Tipi DeÄŸiÅŸtir" +msgstr "Temel Tipi DeÄŸiÅŸtir:" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Add Nodes..." -msgstr "Düğüm Ekle..." +msgstr "Düğümler Ekle..." #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Add Function..." -msgstr "Fonksiyon Ekle" +msgstr "İşlev Ekle..." #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "function_name" -msgstr "Fonksiyon:" +msgstr "iÅŸlev_ismi" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Select or create a function to edit its graph." -msgstr "Çizgeyi düzenlemek için bir fonksiyon seçin ya da oluÅŸturun" +msgstr "GrafiÄŸi düzenlemek için iÅŸlev seçin ya da oluÅŸturun." #: modules/visual_script/visual_script_editor.cpp msgid "Delete Selected" @@ -11831,19 +11791,16 @@ msgid "Cut Nodes" msgstr "Düğümleri Kes" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Make Function" -msgstr "İşlevi Yeniden Adlandır" +msgstr "İşlev Yap" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Refresh Graph" -msgstr "Yenile" +msgstr "GrafiÄŸi Yenile" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Edit Member" -msgstr "Üyeler" +msgstr "Üye Düzenle" #: modules/visual_script/visual_script_flow_control.cpp msgid "Input type not iterable: " @@ -11902,41 +11859,40 @@ msgstr "" "(hatası) olmalı." #: modules/visual_script/visual_script_property_selector.cpp -#, fuzzy msgid "Search VisualScript" -msgstr "GörselBetik Düğümü Kaldır" +msgstr "Görsel Betikte Ara" #: modules/visual_script/visual_script_property_selector.cpp msgid "Get %s" -msgstr "" +msgstr "Getir %s" #: modules/visual_script/visual_script_property_selector.cpp msgid "Set %s" -msgstr "" +msgstr "Ayarla %s" #: platform/android/export/export.cpp msgid "Package name is missing." -msgstr "" +msgstr "Paket ismi eksik." #: platform/android/export/export.cpp msgid "Package segments must be of non-zero length." -msgstr "" +msgstr "Paket segmentleri sıfır olmayan uzunlukta olmalıdır." #: platform/android/export/export.cpp msgid "The character '%s' is not allowed in Android application package names." -msgstr "" +msgstr "Android uygulama paketi adlarında '% s' karakterine izin verilmiyor." #: platform/android/export/export.cpp msgid "A digit cannot be the first character in a package segment." -msgstr "" +msgstr "Rakam, paket segmentindeki ilk karakter olamaz." #: platform/android/export/export.cpp msgid "The character '%s' cannot be the first character in a package segment." -msgstr "" +msgstr "'%s' karakteri bir paket segmentindeki ilk karakter olamaz." #: platform/android/export/export.cpp msgid "The package must have at least one '.' separator." -msgstr "" +msgstr "Paket en azından bir tane '.' ayıracına sahip olmalıdır." #: platform/android/export/export.cpp msgid "Select device from the list" @@ -11944,45 +11900,49 @@ msgstr "Listeden aygıt seç" #: platform/android/export/export.cpp msgid "ADB executable not configured in the Editor Settings." -msgstr "" +msgstr "Editör Ayarlarında ADB uygulaması tayin edilmemiÅŸ." #: platform/android/export/export.cpp msgid "OpenJDK jarsigner not configured in the Editor Settings." -msgstr "" +msgstr "OpenJDK jarimzalayıcı Editör Ayarlarında yapılandırılmamış." #: platform/android/export/export.cpp msgid "Debug keystore not configured in the Editor Settings nor in the preset." msgstr "" +"Anahtar deposunda Hata Ayıklayıcı Ayarları'nda veya ön ayarda " +"yapılandırılmamış." #: platform/android/export/export.cpp msgid "Custom build requires a valid Android SDK path in Editor Settings." msgstr "" +"Özel derleme için Editör Ayarları'nda geçerli bir Android SDK yolu gerekir." #: platform/android/export/export.cpp msgid "Invalid Android SDK path for custom build in Editor Settings." -msgstr "" +msgstr "Editör Ayarlarında özel derleme için geçersiz Android SDK yolu." #: platform/android/export/export.cpp -#, fuzzy msgid "" "Android build template not installed in the project. Install it from the " "Project menu." -msgstr "Android yapı ÅŸablonu eksik, lütfen ilgili ÅŸablonları yükleyin." +msgstr "" +"Android derleme ÅŸablonu projede yüklü deÄŸil. Proje menüsünden yükleyin." #: platform/android/export/export.cpp msgid "Invalid public key for APK expansion." -msgstr "" +msgstr "APK geniÅŸletmesi için geçersiz ortak anahtar." #: platform/android/export/export.cpp -#, fuzzy msgid "Invalid package name:" -msgstr "Geçersiz sınıf ismi" +msgstr "Geçersiz paket ismi:" #: platform/android/export/export.cpp msgid "" "Trying to build from a custom built template, but no version info for it " "exists. Please reinstall from the 'Project' menu." msgstr "" +"Özel olarak oluÅŸturulmuÅŸ bir ÅŸablondan oluÅŸturmaya çalışılıyor, ancak bunun " +"için sürüm bilgisi yok. Lütfen 'Proje' menüsünden yeniden yükleyin." #: platform/android/export/export.cpp msgid "" @@ -11991,46 +11951,52 @@ msgid "" " Godot Version: %s\n" "Please reinstall Android build template from 'Project' menu." msgstr "" +"Android derlemesi sürüm uyumsuzluÄŸu:\n" +" Yüklü Åžablon: %s\n" +" Godot Versiyonu: %s\n" +"Lütfen 'Derleme' menüsünden Android derleme ÅŸablonunu yeniden yükleyin." #: platform/android/export/export.cpp msgid "Building Android Project (gradle)" -msgstr "" +msgstr "Android Projesi OluÅŸturma (gradle)" #: platform/android/export/export.cpp msgid "" "Building of Android project failed, check output for the error.\n" "Alternatively visit docs.godotengine.org for Android build documentation." msgstr "" +"Android projesinin oluÅŸturulması baÅŸarısız oldu, hatayı çıktı için kontrol " +"edin.\n" +"Alternatif olarak, Android derleme dokümantasyonu için docs.godotengine.org " +"adresini ziyaret edin.." #: platform/android/export/export.cpp msgid "No build apk generated at: " -msgstr "" +msgstr "Åžurada derleme apk oluÅŸturulmadı: " #: platform/iphone/export/export.cpp msgid "Identifier is missing." -msgstr "" +msgstr "Tanımlayıcı eksik." #: platform/iphone/export/export.cpp -#, fuzzy msgid "The character '%s' is not allowed in Identifier." -msgstr "Ad doÄŸru bir belirleyici deÄŸil:" +msgstr "Tanımlayıcı'da '%s' karakterine izin verilmiyor." #: platform/iphone/export/export.cpp msgid "App Store Team ID not specified - cannot configure the project." -msgstr "" +msgstr "App Store Ekip KimliÄŸi belirtilmedi - proje yapılandırılamıyor." #: platform/iphone/export/export.cpp -#, fuzzy msgid "Invalid Identifier:" -msgstr "Ad doÄŸru bir belirleyici deÄŸil:" +msgstr "Geçersiz Tanımlayıcı:" #: platform/iphone/export/export.cpp msgid "Required icon is not specified in the preset." -msgstr "" +msgstr "Ön ayarda gerekli simge belirtilmemiÅŸ." #: platform/javascript/export/export.cpp msgid "Stop HTTP Server" -msgstr "" +msgstr "HTTP sunucuyu durdur" #: platform/javascript/export/export.cpp msgid "Run in Browser" @@ -12065,19 +12031,16 @@ msgid "Using default boot splash image." msgstr "Açılış ekranı resim dosyası okunamadı." #: platform/uwp/export/export.cpp -#, fuzzy msgid "Invalid package short name." -msgstr "Geçersiz sınıf ismi" +msgstr "Geçersiz paket kısa ismi." #: platform/uwp/export/export.cpp -#, fuzzy msgid "Invalid package unique name." -msgstr "Benzersiz Ad Geçersiz." +msgstr "Geçersiz benzersiz paket ismi." #: platform/uwp/export/export.cpp -#, fuzzy msgid "Invalid package publisher display name." -msgstr "Benzersiz Ad Geçersiz." +msgstr "Geçersiz paket yayıncı görünen adı." #: platform/uwp/export/export.cpp msgid "Invalid product GUID." @@ -12120,13 +12083,12 @@ msgid "Invalid splash screen image dimensions (should be 620x300)." msgstr "Geçersiz açılış görüntülüğü bediz boyutları (620x300 olmalı)." #: scene/2d/animated_sprite.cpp -#, fuzzy msgid "" "A SpriteFrames resource must be created or set in the \"Frames\" property in " "order for AnimatedSprite to display frames." msgstr "" -"Bir SpriteFrames kaynağı oluÅŸturulmalı ya da 'Kareler' özelliÄŸine atanmalı " -"ki AnimatedSprite düğümü kareleri gösterebilsin." +"AnimatedSprite öğesinin çerçeveleri görüntülemesi için \"Çerçeveler\" " +"özelliÄŸinde bir SpriteFrames kaynağı oluÅŸturulmalı veya ayarlanmalıdır." #: scene/2d/canvas_modulate.cpp msgid "" @@ -12138,15 +12100,15 @@ msgstr "" "edilecektir." #: scene/2d/collision_object_2d.cpp -#, fuzzy msgid "" "This node has no shape, so it can't collide or interact with other objects.\n" "Consider adding a CollisionShape2D or CollisionPolygon2D as a child to " "define its shape." msgstr "" -"Bu düğüm alt ÅŸekillere sahip deÄŸil, bu yüzden uzayla etkileÅŸime giremez.\n" -"Åžeklini belirlemek için CollisionShape2D ya da CollisionPolygon2D eklemeyi " -"düşünebilirsiniz." +"Bu düğümün ÅŸekli yoktur, bu nedenle diÄŸer nesnelerle çarpışamaz veya " +"etkileÅŸime giremez.\n" +"Åžeklini tanımlamak için alt düğüm olarak bir TemasÅžekli2B veya TemasÇokgen2B " +"eklemeyi düşünün." #: scene/2d/collision_polygon_2d.cpp msgid "" @@ -12187,13 +12149,14 @@ msgid "" "CPUParticles2D animation requires the usage of a CanvasItemMaterial with " "\"Particles Animation\" enabled." msgstr "" +"CPUParçacık2B animasyonu \"Parçacık Animasyonu\" seçimi etkin olarak " +"CanvasÖgesiMalzemesi kullanımı gerektirir." #: scene/2d/light_2d.cpp -#, fuzzy msgid "" "A texture with the shape of the light must be supplied to the \"Texture\" " "property." -msgstr "Işık yüzeyli bir doku, 'texture' özelliÄŸine saÄŸlanmalıdır." +msgstr "\"Doku\" özelliÄŸine ışık ÅŸeklinde bir doku saÄŸlanmalıdır." #: scene/2d/light_occluder_2d.cpp msgid "" @@ -12203,9 +12166,8 @@ msgstr "" "(ya da çizilmelidir)." #: scene/2d/light_occluder_2d.cpp -#, fuzzy msgid "The occluder polygon for this occluder is empty. Please draw a polygon." -msgstr "Bu engelleyici için engelleyici çokgeni boÅŸ. Lütfen bir çokgen çizin!" +msgstr "Bu engelleyici için engelleyici çokgeni boÅŸ. Lütfen bir çokgen çizin." #: scene/2d/navigation_polygon.cpp msgid "" @@ -12237,6 +12199,9 @@ msgid "" "Use the CPUParticles2D node instead. You can use the \"Convert to " "CPUParticles\" option for this purpose." msgstr "" +"GPU tabanlı parçacıklar GLES2 video sürücüsü tarafından desteklenmez.\n" +"Bunun yerine CPUParçacıklar2B düğümünü kullanın. Bu amaçla " +"\"CPUParçacıklar'a Dönüştür\" seçeneÄŸini kullanabilirsiniz." #: scene/2d/particles_2d.cpp scene/3d/particles.cpp msgid "" @@ -12251,6 +12216,8 @@ msgid "" "Particles2D animation requires the usage of a CanvasItemMaterial with " "\"Particles Animation\" enabled." msgstr "" +"Particles2D animasyonu, \"Parçacık Animasyonu\" etkinleÅŸtirilmiÅŸ bir " +"CanvasÖgesiMalzemesi kullanımını gerektirir." #: scene/2d/path_2d.cpp msgid "PathFollow2D only works when set as a child of a Path2D node." @@ -12274,74 +12241,70 @@ msgstr "" #: scene/2d/skeleton_2d.cpp msgid "This Bone2D chain should end at a Skeleton2D node." -msgstr "" +msgstr "Bu İskelet2B zinciri İskelet2B düğümünde sonlanmalı." #: scene/2d/skeleton_2d.cpp msgid "A Bone2D only works with a Skeleton2D or another Bone2D as parent node." msgstr "" +"Bir Kemit2B yalnızca İskelet2B ya da baÅŸka bir Kemik2B'nin alt düğümü olarak " +"çalışabilir." #: scene/2d/skeleton_2d.cpp msgid "" "This bone lacks a proper REST pose. Go to the Skeleton2D node and set one." msgstr "" +"Bu kemik uygun bir DİNLENME pozundan yoksun. İskelet2B düğümüne gidip bir " +"tane atayın." #: scene/2d/tile_map.cpp -#, fuzzy msgid "" "TileMap with Use Parent on needs a parent CollisionObject2D to give shapes " "to. Please use it as a child of Area2D, StaticBody2D, RigidBody2D, " "KinematicBody2D, etc. to give them a shape." msgstr "" "CollisionShape2D yalnızca CollisionObject2D'den türeyen düğümlere bir ÅŸekil " -"elde etmeye hizmet eder. Lütfen onu yalnızca ÅŸunların çocuÄŸu olarak kullanın " -"ve Area2D, StaticBody2D, RigidBody2D, KinematicBody2D vs.'ye bir ÅŸekil " -"vermek için kullanın." +"elde etmeye hizmet eder. Lütfen onu yalnızca Area2D, StaticBody2D, " +"RigidBody2D, KinematicBody2D vs.'nin alt ÅŸekli olarak ve onlara ÅŸekil vermek " +"için kullanın." #: scene/2d/visibility_notifier_2d.cpp -#, fuzzy msgid "" "VisibilityEnabler2D works best when used with the edited scene root directly " "as parent." msgstr "" -"VisibilityEnable2D düğümü düzenlenmiÅŸ sahne kökü doÄŸrudan ebeveyn olarak " -"kullanıldığında çalışır." +"VisibilityEnabler2D, düzenlenmiÅŸ sahne köküyle doÄŸrudan üst öğe olarak " +"kullanıldığında en iyi sonucu verir." #: scene/3d/arvr_nodes.cpp -#, fuzzy msgid "ARVRCamera must have an ARVROrigin node as its parent." -msgstr "ARVRCamera ebeveyni olarak ARVROrigin düğümüne sahip olmalı" +msgstr "ARVRCamera üst düğüm olarak ARVROrigin düğümüne sahip olmalı." #: scene/3d/arvr_nodes.cpp -#, fuzzy msgid "ARVRController must have an ARVROrigin node as its parent." -msgstr "ARVRController ebeveyni olarak ARVROrigin düğümüne sahip olmalı" +msgstr "ARVRController üst düğüm olarak ARVROrigin düğümüne sahip olmalı." #: scene/3d/arvr_nodes.cpp -#, fuzzy msgid "" "The controller ID must not be 0 or this controller won't be bound to an " "actual controller." msgstr "" "Deneytleyici kimliÄŸi 0 olmamalı aksi taktirde bu denetleyici gerçek bir " -"denetleyiciye baÄŸlı olmayacak" +"denetleyiciye baÄŸlı olmayacak." #: scene/3d/arvr_nodes.cpp -#, fuzzy msgid "ARVRAnchor must have an ARVROrigin node as its parent." -msgstr "ARVRAnchor ebeveyni olarak ARVROrigin düğümüne sahip olmalı" +msgstr "ARVRAnchor üst düğüm olarak ARVROrigin düğümüne sahip olmalı." #: scene/3d/arvr_nodes.cpp -#, fuzzy msgid "" "The anchor ID must not be 0 or this anchor won't be bound to an actual " "anchor." msgstr "" -"Çapa kimliÄŸi 0 olmamalı aksi halde bu çapa gerçek bir çapaya baÄŸlı olmayacak" +"Çapa kimliÄŸi 0 olmamalı aksi halde bu çapa gerçek bir çapaya baÄŸlı olmayacak." #: scene/3d/arvr_nodes.cpp -#, fuzzy msgid "ARVROrigin requires an ARVRCamera child node." -msgstr "ARVROrigin bir ARVRCamera çocuk düğümü gerektirir" +msgstr "ARVROrigin bir ARVRCamera alt düğümü gerektirir." #: scene/3d/baked_lightmap.cpp msgid "%d%%" @@ -12368,15 +12331,14 @@ msgid "Lighting Meshes: " msgstr "Örüntüler Haritalanıyor: " #: scene/3d/collision_object.cpp -#, fuzzy msgid "" "This node has no shape, so it can't collide or interact with other objects.\n" "Consider adding a CollisionShape or CollisionPolygon as a child to define " "its shape." msgstr "" -"Bu düğüm alt ÅŸekillere sahip deÄŸil, bu yüzden uzayla etkileÅŸime giremez.\n" -"Åžeklini belirlemek için CollisionShape ya da CollisionPolygon eklemeyi " -"düşünebilirsiniz." +"Bu düğüm ÅŸekle sahip deÄŸil, bu yüzden diÄŸer nesnelerle etkileÅŸime giremez.\n" +"Åžeklini belirlemek için alt düğüm olarak CollisionShape ya da " +"CollisionPolygon eklemeyi düşünebilirsiniz." #: scene/3d/collision_polygon.cpp msgid "" @@ -12404,31 +12366,32 @@ msgstr "" "RigidBody, KinematicBody, v.b. onu sadece bunların çocuÄŸu olarak kullanın." #: scene/3d/collision_shape.cpp -#, fuzzy msgid "" "A shape must be provided for CollisionShape to function. Please create a " "shape resource for it." msgstr "" -"CollisionShape'in çalışması için bir ÅŸekil verilmelidir. Lütfen bunun için " -"bir ÅŸekil kaynağı oluÅŸturun!" +"CollisionShape'in çalışması için ona bir ÅŸekil verilmelidir. Lütfen bunun " +"için bir ÅŸekil kaynağı oluÅŸturun." #: scene/3d/collision_shape.cpp msgid "" "Plane shapes don't work well and will be removed in future versions. Please " "don't use them." msgstr "" +"Düzlem ÅŸekli iyi çalışmıyor ve gelecek versiyonlarda çıkarılacak. Lütfen " +"kullanmayın." #: scene/3d/cpu_particles.cpp -#, fuzzy msgid "Nothing is visible because no mesh has been assigned." -msgstr "" -"HiçbirÅŸey görünebilir deÄŸil çünkü örüntüler çizim geçiÅŸlerine atanmış deÄŸil." +msgstr "HiçbirÅŸey görünebilir deÄŸil çünkü hiçbir model atanmış deÄŸil." #: scene/3d/cpu_particles.cpp msgid "" "CPUParticles animation requires the usage of a SpatialMaterial whose " "Billboard Mode is set to \"Particle Billboard\"." msgstr "" +"CPUParçacık animasyonu Billboard Modu \"Parçacık Billboard\" olarak " +"belirlenmiÅŸ UzamsalMalzeme kullanımı gerektirir." #: scene/3d/gi_probe.cpp msgid "Plotting Meshes" @@ -12439,10 +12402,12 @@ msgid "" "GIProbes are not supported by the GLES2 video driver.\n" "Use a BakedLightmap instead." msgstr "" +"GIProbes GLES2 video sürücüsü tarafından desteklenmez.\n" +"Bunun yerine bir BakedLightmap kullanın." #: scene/3d/light.cpp msgid "A SpotLight with an angle wider than 90 degrees cannot cast shadows." -msgstr "" +msgstr "90 dereceden geniÅŸ açılı SpotIşık gölge oluÅŸturamaz." #: scene/3d/navigation_mesh.cpp msgid "A NavigationMesh resource must be set or created for this node to work." @@ -12464,6 +12429,9 @@ msgid "" "Use the CPUParticles node instead. You can use the \"Convert to CPUParticles" "\" option for this purpose." msgstr "" +"GPU tabanlı parçacıklar GLES2 video sürücüsü tarafından desteklenmez.\n" +"Bunun yerine CPUParçacık düğümünü kullanın. Bu amaçla \"CPUParçacık'a " +"Dönüştür\" seçeneÄŸini kullanabilirsiniz." #: scene/3d/particles.cpp msgid "" @@ -12476,18 +12444,21 @@ msgid "" "Particles animation requires the usage of a SpatialMaterial whose Billboard " "Mode is set to \"Particle Billboard\"." msgstr "" +"Parçacık animasyonu, Reklam Panosu Modu \"Parçacık Reklam Panosu\" olarak " +"ayarlanmış bir SpatialMaterial'ın kullanılmasını gerektirir." #: scene/3d/path.cpp -#, fuzzy msgid "PathFollow only works when set as a child of a Path node." msgstr "" -"PathFollow2D yalnızca Path2D düğümünün çocuÄŸu olarak ayarlanınca çalışır." +"PathFollow yalnızca Path düğümünün alt düğümü olarak ayarlanınca çalışır." #: scene/3d/path.cpp msgid "" "PathFollow's ROTATION_ORIENTED requires \"Up Vector\" to be enabled in its " "parent Path's Curve resource." msgstr "" +"YolTakibet'in DÖNME_ODAKLI öğesi, üst Yol'un EÄŸri kaynağında \"Yukarı Vektör" +"\" özelliÄŸinin etkinleÅŸtirilmesini gerektiriyor." #: scene/3d/physics_body.cpp msgid "" @@ -12500,36 +12471,34 @@ msgstr "" "Boyu deÄŸiÅŸikliÄŸini bunun yerine çocuk çarpışma ÅŸekilleri içinden yapın." #: scene/3d/remote_transform.cpp -#, fuzzy msgid "" "The \"Remote Path\" property must point to a valid Spatial or Spatial-" "derived node to work." msgstr "" -"Yol özelliÄŸi, çalışmak için geçerli bir Spatial düğümüne iÅŸaret etmelidir." +"\"Uzak Yol\" özelliÄŸi çalışması için geçerli bir Uzamsal veya Uzamsal türevi " +"düğüme iÅŸaret etmelidir." #: scene/3d/soft_body.cpp msgid "This body will be ignored until you set a mesh." -msgstr "" +msgstr "Bir model ayarlanana kadar bu gövde yok sayılır." #: scene/3d/soft_body.cpp -#, fuzzy msgid "" "Size changes to SoftBody will be overridden by the physics engine when " "running.\n" "Change the size in children collision shapes instead." msgstr "" -"RigidBody boyut deÄŸiÅŸikliÄŸi(karakter yada rigid kipleri) fizik motoru " -"çalıştığında geçersiz kılınacak.\n" -"Boyu deÄŸiÅŸikliÄŸini bunun yerine çocuk çarpışma ÅŸekilleri içinden yapın." +"SoftBody'deki boyut deÄŸiÅŸiklikleri çalışırken fizik motoru tarafından " +"geçersiz kılınır.\n" +"Bunun yerine alt düğümlerde çarpışma ÅŸekillerindeki boyutu deÄŸiÅŸtirin." #: scene/3d/sprite_3d.cpp -#, fuzzy msgid "" "A SpriteFrames resource must be created or set in the \"Frames\" property in " "order for AnimatedSprite3D to display frames." msgstr "" -"AnimatedSprite3D 'nin çerçeveleri görüntülemek için bir SpriteFrames kaynağı " -"oluÅŸturulmalı veya 'Çerçeveler' niteliÄŸinde ayarlanmalıdır." +"AnimatedSprite3D'nin kareleri görüntüleyebilmesi için \"Çerçeveler\" " +"özelliÄŸinde bir SpriteFrames kaynağı oluÅŸturulmalı veya ayarlanmalıdır." #: scene/3d/vehicle_body.cpp msgid "" @@ -12544,6 +12513,8 @@ msgid "" "WorldEnvironment requires its \"Environment\" property to contain an " "Environment to have a visible effect." msgstr "" +"WorldEnvironment, \"Ortam\" özelliÄŸinin görünür bir etkiye sahip olması için " +"bir Ortam içermesi gereklidir." #: scene/3d/world_environment.cpp msgid "" @@ -12562,50 +12533,45 @@ msgstr "" #: scene/animation/animation_blend_tree.cpp msgid "On BlendTree node '%s', animation not found: '%s'" -msgstr "" +msgstr "'%s' BlendTree düğümünde, animasyon bulunamadı: '% s'" #: scene/animation/animation_blend_tree.cpp -#, fuzzy msgid "Animation not found: '%s'" -msgstr "Animasyon Araçları" +msgstr "Animasyon bulunamadı: '%s'" #: scene/animation/animation_tree.cpp msgid "In node '%s', invalid animation: '%s'." -msgstr "" +msgstr "'%s' düğümünde geçersiz animasyon: '%s'." #: scene/animation/animation_tree.cpp -#, fuzzy msgid "Invalid animation: '%s'." -msgstr "HATA: Geçersiz animasyon adı!" +msgstr "Geçersiz animasyon: '%s'." #: scene/animation/animation_tree.cpp -#, fuzzy msgid "Nothing connected to input '%s' of node '%s'." -msgstr "Åžunun: '%s' ÅŸununla: '%s' baÄŸlantısını kes" +msgstr "'%s' düğümünün '%s' giriÅŸine hiçbir ÅŸey baÄŸlı deÄŸil." #: scene/animation/animation_tree.cpp msgid "No root AnimationNode for the graph is set." -msgstr "" +msgstr "Grafik için hiçbir kök AnimationNode ayarlanmadı." #: scene/animation/animation_tree.cpp -#, fuzzy msgid "Path to an AnimationPlayer node containing animations is not set." -msgstr "" -"Sahne AÄŸacı'ndan animasyonları düzenleyebilmek için bir AnimationPlayer " -"seçin." +msgstr "Animasyon içeren bir AnimationPlayer düğümünün yolu ayarlanmadı." #: scene/animation/animation_tree.cpp msgid "Path set for AnimationPlayer does not lead to an AnimationPlayer node." msgstr "" +"AnimasyonOynatıcı için ayarlanan yol, bir AnimasyonOynatıcı düğümüne yol " +"açmaz." #: scene/animation/animation_tree.cpp -#, fuzzy msgid "The AnimationPlayer root node is not a valid node." -msgstr "Animasyon aÄŸacı geçersizdir." +msgstr "AnimationOynatıcı kök düğümü geçerli bir düğüm deÄŸil." #: scene/animation/animation_tree_player.cpp msgid "This node has been deprecated. Use AnimationTree instead." -msgstr "" +msgstr "Bu düğüm kullanımdan kaldırıldı. Bunun yerine AnimasyonAÄŸacı kullanın." #: scene/gui/color_picker.cpp msgid "" @@ -12613,27 +12579,29 @@ msgid "" "LMB: Set color\n" "RMB: Remove preset" msgstr "" +"Renk: #%s\n" +"SFD: Renk ata\n" +"RMB: Önayar kaldır" #: scene/gui/color_picker.cpp msgid "Pick a color from the editor window." -msgstr "" +msgstr "Düzenleme penceresinden renk seç." #: scene/gui/color_picker.cpp msgid "HSV" -msgstr "" +msgstr "HSV" #: scene/gui/color_picker.cpp msgid "Raw" -msgstr "" +msgstr "Ham" #: scene/gui/color_picker.cpp msgid "Switch between hexadecimal and code values." -msgstr "" +msgstr "Hex ve kod deÄŸerleri arasında geçiÅŸ yap." #: scene/gui/color_picker.cpp -#, fuzzy msgid "Add current color as a preset." -msgstr "Åžuanki rengi bir önayar olarak kaydet" +msgstr "Åžuanki rengi bir önayar olarak kaydet." #: scene/gui/container.cpp msgid "" @@ -12641,12 +12609,19 @@ msgid "" "children placement behavior.\n" "If you don't intend to add a script, use a plain Control node instead." msgstr "" +"Bir komut dosyası alt öğelerin yerleÅŸtirme davranışını yapılandırmadıkça, " +"kapsayıcı kendi başına hiçbir amaca hizmet etmez.\n" +"Komut dosyası eklemek istemiyorsanız bunun yerine düz bir Kontrol düğümü " +"kullanın." #: scene/gui/control.cpp msgid "" "The Hint Tooltip won't be displayed as the control's Mouse Filter is set to " "\"Ignore\". To solve this, set the Mouse Filter to \"Stop\" or \"Pass\"." msgstr "" +"İpucu Araç İpucu, kontrolün Fare Filtresi \"Yoksay\" olarak ayarlandığı için " +"görüntülenmez. Bu sorunu çözmek için Fare Filtresini \"Durdur\" veya " +"\"BaÅŸarılı\" olarak ayarlayın." #: scene/gui/dialogs.cpp msgid "Alert!" @@ -12657,30 +12632,28 @@ msgid "Please Confirm..." msgstr "Lütfen DoÄŸrulayın..." #: scene/gui/popup.cpp -#, fuzzy msgid "" "Popups will hide by default unless you call popup() or any of the popup*() " "functions. Making them visible for editing is fine, but they will hide upon " "running." msgstr "" -"Açılır pencereler popup() veya popup*() iÅŸlevleri çaÄŸrılmadıkça varsayılan " -"olarak gizlenecektir. Onları düzenleme için görünür kılmak da iyidir, ancak " -"çalışırken gizlenecekler." +"Popup() veya popup*() iÅŸlevlerinden herhangi birini çağırmazsanız pop-up'lar " +"varsayılan olarak gizlenir. Bunları düzenleme için görünür yapmak iyidir, " +"ancak çalıştırıldıktan sonra gizlenirler." #: scene/gui/range.cpp msgid "If \"Exp Edit\" is enabled, \"Min Value\" must be greater than 0." -msgstr "" +msgstr "\"Exp Edit\" etkinse, \"Min DeÄŸer\" 0'dan büyük olmalıdır." #: scene/gui/scroll_container.cpp -#, fuzzy msgid "" "ScrollContainer is intended to work with a single child control.\n" "Use a container as child (VBox, HBox, etc.), or a Control and set the custom " "minimum size manually." msgstr "" -"ScrollContainer tek bir çocuk denetimi ile çalışmak için tasarlanmıştır.\n" -"Bir kapsayıcı (VBox,HBox, vb) veya bir Control'ü çocuk olarak kullanın ve " -"özel minimum boyutu elle ayarlayın." +"ScrollContainer tek bir alt denetimi ile çalışmak için tasarlanmıştır.\n" +"Bir kapsayıcı (VBox,HBox, vb) ya da Control'ü alt düğüm olarak kullanın ve " +"minimum boyutu elle ayarlayın." #: scene/gui/tree.cpp msgid "(Other)" @@ -12711,9 +12684,8 @@ msgid "Invalid source for preview." msgstr "Önizleme için geçersiz kaynak." #: scene/resources/visual_shader_nodes.cpp -#, fuzzy msgid "Invalid source for shader." -msgstr "Gölgelendirici için geçersiz kaynak." +msgstr "Shader için geçersiz kaynak." #: scene/resources/visual_shader_nodes.cpp msgid "Invalid comparison function for that type." @@ -12724,19 +12696,26 @@ msgid "Assignment to function." msgstr "İşleve atama." #: servers/visual/shader_language.cpp -#, fuzzy msgid "Assignment to uniform." -msgstr "DeÄŸiÅŸmeze atama." +msgstr "uniform için atama." #: servers/visual/shader_language.cpp -#, fuzzy msgid "Varyings can only be assigned in vertex function." -msgstr "DeÄŸiÅŸkenler yalnızca tepe iÅŸlevinde atanabilir." +msgstr "varyings yalnızca vertex iÅŸlevinde atanabilir." #: servers/visual/shader_language.cpp msgid "Constants cannot be modified." msgstr "Sabit deÄŸerler deÄŸiÅŸtirilemez." +#~ msgid "Replaced %d occurrence(s)." +#~ msgstr "%d deÄŸiÅŸiklik gerçekleÅŸtirildi." + +#~ msgid "Create Static Convex Body" +#~ msgstr "DuraÄŸan Dışbükey Gövde OluÅŸtur" + +#~ msgid "Failed creating shapes!" +#~ msgstr "Åžekil oluÅŸturma baÅŸarısız!" + #~ msgid "" #~ "There are currently no tutorials for this class, you can [color=$color]" #~ "[url=$url]contribute one[/url][/color] or [color=$color][url=" diff --git a/editor/translations/uk.po b/editor/translations/uk.po index aca5040517..32cb1e33cd 100644 --- a/editor/translations/uk.po +++ b/editor/translations/uk.po @@ -17,7 +17,7 @@ msgid "" msgstr "" "Project-Id-Version: Ukrainian (Godot Engine)\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2020-01-27 07:10+0000\n" +"PO-Revision-Date: 2020-02-16 15:20+0000\n" "Last-Translator: Yuri Chornoivan <yurchor@ukr.net>\n" "Language-Team: Ukrainian <https://hosted.weblate.org/projects/godot-engine/" "godot/uk/>\n" @@ -702,8 +702,8 @@ msgid "Line Number:" msgstr "Ðомер Ñ€Ñдка:" #: editor/code_editor.cpp -msgid "Replaced %d occurrence(s)." -msgstr "Замінено %d випадок(-ів)." +msgid "%d replaced." +msgstr "%d замінено." #: editor/code_editor.cpp editor/editor_help.cpp msgid "%d match." @@ -3973,6 +3973,11 @@ msgid "Saving..." msgstr "ЗбереженнÑ..." #: editor/import_dock.cpp +#, fuzzy +msgid "%d Files" +msgstr " Файли" + +#: editor/import_dock.cpp msgid "Set as Default for '%s'" msgstr "Ð’Ñтановити Ñк типове Ð´Ð»Ñ '%s'" @@ -3981,10 +3986,6 @@ msgid "Clear Default for '%s'" msgstr "ОчиÑтити типове Ð´Ð»Ñ '%s'" #: editor/import_dock.cpp -msgid " Files" -msgstr " Файли" - -#: editor/import_dock.cpp msgid "Import As:" msgstr "Імпортувати Ñк:" @@ -5864,12 +5865,12 @@ msgid "Mesh is empty!" msgstr "Сітка порожнÑ!" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Trimesh Body" -msgstr "Створіть увігнуте Ñтатичне тіло" +msgid "Couldn't create a Trimesh collision shape." +msgstr "Ðе вдалоÑÑ Ñтворити форму Ð·Ñ–Ñ‚ÐºÐ½ÐµÐ½Ð½Ñ Trimesh." #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Convex Body" -msgstr "Створити опукле Ñтатичне тіло" +msgid "Create Static Trimesh Body" +msgstr "Створіть увігнуте Ñтатичне тіло" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "This doesn't work on scene root!" @@ -5880,12 +5881,28 @@ msgid "Create Trimesh Static Shape" msgstr "Створити триÑіткову Ñтатичну форму" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Failed creating shapes!" -msgstr "Ðе вдалоÑÑ Ñтворити форми!" +msgid "Can't create a single convex collision shape for the scene root." +msgstr "Ðе вдалоÑÑ Ñтворити єдину опуклу форму Ð·Ñ–Ñ‚ÐºÐ½ÐµÐ½Ð½Ñ Ð´Ð»Ñ ÐºÐ¾Ñ€ÐµÐ½Ñ Ñцени." + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Couldn't create a single convex collision shape." +msgstr "Ðе вдалоÑÑ Ñтворити єдину опуклу форму зіткненнÑ." + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Single Convex Shape" +msgstr "Створити єдину опуклу форму" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Can't create multiple convex collision shapes for the scene root." +msgstr "Ðе вдалоÑÑ Ñтворити декілька опуклих форм Ð·Ñ–Ñ‚ÐºÐ½ÐµÐ½Ð½Ñ Ð´Ð»Ñ ÐºÐ¾Ñ€ÐµÐ½Ñ Ñцени." #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Convex Shape(s)" -msgstr "Створити вигнуті форми" +msgid "Couldn't create any collision shapes." +msgstr "Ðе вдалоÑÑ Ñтворити жодних форм зіткненнÑ." + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Multiple Convex Shapes" +msgstr "Створити декілька опуклих форм" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Navigation Mesh" @@ -5936,18 +5953,68 @@ msgid "Create Trimesh Static Body" msgstr "Створити увігнуте Ñтатичне тіло" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a StaticBody and assigns a polygon-based collision shape to it " +"automatically.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" +"Створює StaticBody Ñ– автоматично пов'Ñзує з ним заÑновану на багатокутниках " +"форму зіткненнÑ.\n" +"Це найточніший (але найповільніший) варіант Ð´Ð»Ñ Ð²Ð¸ÑÐ²Ð»ÐµÐ½Ð½Ñ Ð·Ñ–Ñ‚ÐºÐ½ÐµÐ½Ð½Ñ." + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Trimesh Collision Sibling" msgstr "Створити увігнуту облаÑть зіткненнÑ" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Convex Collision Sibling(s)" -msgstr "Створити опуклу облаÑті зіткненнÑ" +msgid "" +"Creates a polygon-based collision shape.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" +"Створює заÑновану на багатокутниках форму зіткненнÑ.\n" +"Цей найточніший (але найповільніший) варіант Ð´Ð»Ñ Ð²Ð¸ÑÐ²Ð»ÐµÐ½Ð½Ñ Ð·Ñ–Ñ‚ÐºÐ½ÐµÐ½ÑŒ." + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Single Convex Collision Siblings" +msgstr "Створити єдині опуклі облаÑті зіткненнÑ" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a single convex collision shape.\n" +"This is the fastest (but least accurate) option for collision detection." +msgstr "" +"Створює єдину опуклу форму зіткненнÑ.\n" +"Цей найшвидший (але найменш точний) варіант Ð´Ð»Ñ Ð²Ð¸ÑÐ²Ð»ÐµÐ½Ð½Ñ Ð·Ñ–Ñ‚ÐºÐ½ÐµÐ½ÑŒ." + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Multiple Convex Collision Siblings" +msgstr "Створити декілька опуклих облаÑтей зіткненнÑ" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is a performance middle-ground between the two above options." +msgstr "" +"Створює заÑновану на багатокутниках форму зіткненнÑ.\n" +"Цей проміжний за швидкіÑтю варіант між наведеними вище двома варіантами." #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Outline Mesh..." msgstr "Створити контурну Ñітку ..." #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a static outline mesh. The outline mesh will have its normals " +"flipped automatically.\n" +"This can be used instead of the SpatialMaterial Grow property when using " +"that property isn't possible." +msgstr "" +"Створює Ñтатичну контурну Ñітку. Ðормалі контурної Ñітки " +"віддзеркалюватимутьÑÑ Ð°Ð²Ñ‚Ð¾Ð¼Ð°Ñ‚Ð¸Ñ‡Ð½Ð¾.\n" +"Цим можна ÑкориÑтатиÑÑ Ð·Ð°Ð¼Ñ–Ñть влаÑтивоÑті Grow SpatialMaterial, Ñкщо " +"викориÑÑ‚Ð°Ð½Ð½Ñ Ñ†Ñ–Ñ”Ñ— влаÑтивоÑті Ñ” неможливим." + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "View UV1" msgstr "ПереглÑд UV1" @@ -8366,7 +8433,7 @@ msgstr "Ðабір плиток" msgid "No VCS addons are available." msgstr "Ðемає доÑтупних доданків ÑиÑтем ÐºÐµÑ€ÑƒÐ²Ð°Ð½Ð½Ñ Ð²ÐµÑ€ÑÑ–Ñми." -#: editor/plugins/version_control_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/version_control_editor_plugin.cpp msgid "Error" msgstr "Помилка" @@ -9534,11 +9601,16 @@ msgid "Export With Debug" msgstr "ЕкÑпортувати із діагноÑтикою" #: editor/project_manager.cpp -msgid "The path does not exist." -msgstr "ШлÑху не Ñ–Ñнує." +msgid "The path specified doesn't exist." +msgstr "Вказаного шлÑху не Ñ–Ñнує." + +#: editor/project_manager.cpp +msgid "Error opening package file (it's not in ZIP format)." +msgstr "Помилка під Ñ‡Ð°Ñ Ñпроби відкрити файл пакунка (дані не у форматі ZIP)." #: editor/project_manager.cpp -msgid "Invalid '.zip' project file, does not contain a 'project.godot' file." +msgid "" +"Invalid \".zip\" project file; it doesn't contain a \"project.godot\" file." msgstr "Ðекоректний файл проєкту «.zip»: у ньому немає файла «project.godot»." #: editor/project_manager.cpp @@ -9546,12 +9618,12 @@ msgid "Please choose an empty folder." msgstr "Будь лаÑка, виберіть порожню теку." #: editor/project_manager.cpp -msgid "Please choose a 'project.godot' or '.zip' file." +msgid "Please choose a \"project.godot\" or \".zip\" file." msgstr "Будь лаÑка, виберіть файл «project.godot» або «.zip»." #: editor/project_manager.cpp -msgid "Directory already contains a Godot project." -msgstr "У каталозі вже міÑтитьÑÑ Ð¿Ñ€Ð¾Ñ”ÐºÑ‚ Godot." +msgid "This directory already contains a Godot project." +msgstr "У цьому каталозі вже міÑтитьÑÑ Ð¿Ñ€Ð¾Ñ”ÐºÑ‚ Godot." #: editor/project_manager.cpp msgid "New Game Project" @@ -10249,6 +10321,10 @@ msgid "Suffix" msgstr "СуфікÑ" #: editor/rename_dialog.cpp +msgid "Use Regular Expressions" +msgstr "ВикориÑтовувати формальні вирази" + +#: editor/rename_dialog.cpp msgid "Advanced Options" msgstr "Додаткові параметри" @@ -10285,7 +10361,7 @@ msgstr "" "ПорівнÑйте параметри лічильника." #: editor/rename_dialog.cpp -msgid "Per Level counter" +msgid "Per-level Counter" msgstr "Лічильник на рівень" #: editor/rename_dialog.cpp @@ -10319,10 +10395,6 @@ msgstr "" "Якщо цифр буде менше, Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð´Ð¾Ð¿Ð¾Ð²Ð½ÑŽÐ²Ð°Ñ‚Ð¸Ð¼ÐµÑ‚ÑŒÑÑ Ð¿Ð¾Ñ‡Ð°Ñ‚ÐºÐ¾Ð²Ð¸Ð¼Ð¸ нулÑми." #: editor/rename_dialog.cpp -msgid "Regular Expressions" -msgstr "Формальні вирази" - -#: editor/rename_dialog.cpp msgid "Post-Process" msgstr "ПоÑÑ‚-обробка" @@ -10331,11 +10403,11 @@ msgid "Keep" msgstr "Ðе змінювати" #: editor/rename_dialog.cpp -msgid "CamelCase to under_scored" +msgid "PascalCase to snake_case" msgstr "ГорбатийРегіÑтр у під_креÑлюваннÑ" #: editor/rename_dialog.cpp -msgid "under_scored to CamelCase" +msgid "snake_case to PascalCase" msgstr "під_креÑÐ»ÑŽÐ²Ð°Ð½Ð½Ñ Ñƒ ГорбатийРегіÑтр" #: editor/rename_dialog.cpp @@ -10354,6 +10426,14 @@ msgstr "ВЕРХÐІЙ РЕГІСТР" msgid "Reset" msgstr "Скинути" +#: editor/rename_dialog.cpp +msgid "Regular Expression Error" +msgstr "Помилка у формальному виразі" + +#: editor/rename_dialog.cpp +msgid "At character %s" +msgstr "Ðа Ñимволі %s" + #: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp msgid "Reparent Node" msgstr "Змінити батьківÑький вузол" @@ -10817,8 +10897,8 @@ msgid "Invalid inherited parent name or path." msgstr "Ðекоректна назва або шлÑÑ… до уÑпадкованого батьківÑького елемента." #: editor/script_create_dialog.cpp -msgid "Script is valid." -msgstr "Скрипт Ñ” коректним." +msgid "Script path/name is valid." +msgstr "ШлÑÑ… до Ñкрипту Ñ– назва Ñкрипту Ñ” коректними." #: editor/script_create_dialog.cpp msgid "Allowed: a-z, A-Z, 0-9, _ and ." @@ -10909,6 +10989,10 @@ msgid "Copy Error" msgstr "Помилка копіюваннÑ" #: editor/script_editor_debugger.cpp +msgid "Video RAM" +msgstr "Відеопам'Ñть" + +#: editor/script_editor_debugger.cpp msgid "Skip Breakpoints" msgstr "ПропуÑтити точки зупину" @@ -10957,10 +11041,6 @@ msgid "Total:" msgstr "Загалом:" #: editor/script_editor_debugger.cpp -msgid "Video Mem" -msgstr "Відеопам'Ñть" - -#: editor/script_editor_debugger.cpp msgid "Resource Path" msgstr "ШлÑÑ… до реÑурÑу" @@ -12658,6 +12738,15 @@ msgstr "Змінні величини можна пов'Ñзувати лише msgid "Constants cannot be modified." msgstr "Сталі не можна змінювати." +#~ msgid "Replaced %d occurrence(s)." +#~ msgstr "Замінено %d випадок(-ів)." + +#~ msgid "Create Static Convex Body" +#~ msgstr "Створити опукле Ñтатичне тіло" + +#~ msgid "Failed creating shapes!" +#~ msgstr "Ðе вдалоÑÑ Ñтворити форми!" + #~ msgid "" #~ "There are currently no tutorials for this class, you can [color=$color]" #~ "[url=$url]contribute one[/url][/color] or [color=$color][url=" diff --git a/editor/translations/ur_PK.po b/editor/translations/ur_PK.po index 5cbc202847..00c647fba1 100644 --- a/editor/translations/ur_PK.po +++ b/editor/translations/ur_PK.po @@ -677,7 +677,7 @@ msgid "Line Number:" msgstr "" #: editor/code_editor.cpp -msgid "Replaced %d occurrence(s)." +msgid "%d replaced." msgstr "" #: editor/code_editor.cpp editor/editor_help.cpp @@ -3878,15 +3878,16 @@ msgid "Saving..." msgstr "" #: editor/import_dock.cpp -msgid "Set as Default for '%s'" -msgstr "" +#, fuzzy +msgid "%d Files" +msgstr "Ø§Ø«Ø§Ø«Û Ú©ÛŒ زپ ÙØ§Ø¦Ù„" #: editor/import_dock.cpp -msgid "Clear Default for '%s'" +msgid "Set as Default for '%s'" msgstr "" #: editor/import_dock.cpp -msgid " Files" +msgid "Clear Default for '%s'" msgstr "" #: editor/import_dock.cpp @@ -5765,11 +5766,12 @@ msgid "Mesh is empty!" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Trimesh Body" -msgstr "" +#, fuzzy +msgid "Couldn't create a Trimesh collision shape." +msgstr "سب سکریپشن بنائیں" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Convex Body" +msgid "Create Static Trimesh Body" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -5781,12 +5783,30 @@ msgid "Create Trimesh Static Shape" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Failed creating shapes!" +msgid "Can't create a single convex collision shape for the scene root." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Couldn't create a single convex collision shape." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp #, fuzzy -msgid "Create Convex Shape(s)" +msgid "Create Single Convex Shape" +msgstr "سب سکریپشن بنائیں" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Can't create multiple convex collision shapes for the scene root." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Couldn't create any collision shapes." +msgstr "سب سکریپشن بنائیں" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Multiple Convex Shapes" msgstr "سب سکریپشن بنائیں" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -5838,19 +5858,57 @@ msgid "Create Trimesh Static Body" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a StaticBody and assigns a polygon-based collision shape to it " +"automatically.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Trimesh Collision Sibling" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp #, fuzzy -msgid "Create Convex Collision Sibling(s)" +msgid "Create Single Convex Collision Siblings" msgstr "سب سکریپشن بنائیں" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a single convex collision shape.\n" +"This is the fastest (but least accurate) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Multiple Convex Collision Siblings" +msgstr "سب سکریپشن بنائیں" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is a performance middle-ground between the two above options." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Outline Mesh..." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a static outline mesh. The outline mesh will have its normals " +"flipped automatically.\n" +"This can be used instead of the SpatialMaterial Grow property when using " +"that property isn't possible." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "View UV1" msgstr "" @@ -8294,7 +8352,7 @@ msgstr "" msgid "No VCS addons are available." msgstr "" -#: editor/plugins/version_control_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/version_control_editor_plugin.cpp msgid "Error" msgstr "" @@ -9399,11 +9457,16 @@ msgid "Export With Debug" msgstr "" #: editor/project_manager.cpp -msgid "The path does not exist." +msgid "The path specified doesn't exist." msgstr "" #: editor/project_manager.cpp -msgid "Invalid '.zip' project file, does not contain a 'project.godot' file." +msgid "Error opening package file (it's not in ZIP format)." +msgstr "" + +#: editor/project_manager.cpp +msgid "" +"Invalid \".zip\" project file; it doesn't contain a \"project.godot\" file." msgstr "" #: editor/project_manager.cpp @@ -9411,11 +9474,11 @@ msgid "Please choose an empty folder." msgstr "" #: editor/project_manager.cpp -msgid "Please choose a 'project.godot' or '.zip' file." +msgid "Please choose a \"project.godot\" or \".zip\" file." msgstr "" #: editor/project_manager.cpp -msgid "Directory already contains a Godot project." +msgid "This directory already contains a Godot project." msgstr "" #: editor/project_manager.cpp @@ -10071,6 +10134,10 @@ msgid "Suffix" msgstr "" #: editor/rename_dialog.cpp +msgid "Use Regular Expressions" +msgstr "" + +#: editor/rename_dialog.cpp msgid "Advanced Options" msgstr "" @@ -10105,7 +10172,7 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -msgid "Per Level counter" +msgid "Per-level Counter" msgstr "" #: editor/rename_dialog.cpp @@ -10135,10 +10202,6 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -msgid "Regular Expressions" -msgstr "" - -#: editor/rename_dialog.cpp msgid "Post-Process" msgstr "" @@ -10147,11 +10210,11 @@ msgid "Keep" msgstr "" #: editor/rename_dialog.cpp -msgid "CamelCase to under_scored" +msgid "PascalCase to snake_case" msgstr "" #: editor/rename_dialog.cpp -msgid "under_scored to CamelCase" +msgid "snake_case to PascalCase" msgstr "" #: editor/rename_dialog.cpp @@ -10170,6 +10233,14 @@ msgstr "" msgid "Reset" msgstr "" +#: editor/rename_dialog.cpp +msgid "Regular Expression Error" +msgstr "" + +#: editor/rename_dialog.cpp +msgid "At character %s" +msgstr "" + #: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp msgid "Reparent Node" msgstr "" @@ -10622,7 +10693,7 @@ msgid "Invalid inherited parent name or path." msgstr "" #: editor/script_create_dialog.cpp -msgid "Script is valid." +msgid "Script path/name is valid." msgstr "" #: editor/script_create_dialog.cpp @@ -10720,6 +10791,10 @@ msgid "Copy Error" msgstr "" #: editor/script_editor_debugger.cpp +msgid "Video RAM" +msgstr "" + +#: editor/script_editor_debugger.cpp #, fuzzy msgid "Skip Breakpoints" msgstr ".تمام کا انتخاب" @@ -10770,10 +10845,6 @@ msgid "Total:" msgstr "" #: editor/script_editor_debugger.cpp -msgid "Video Mem" -msgstr "" - -#: editor/script_editor_debugger.cpp msgid "Resource Path" msgstr "" diff --git a/editor/translations/vi.po b/editor/translations/vi.po index d6f5114a98..9c81e2b063 100644 --- a/editor/translations/vi.po +++ b/editor/translations/vi.po @@ -9,15 +9,15 @@ # Tung Le <tungkradle@gmail.com>, 2017. # 38569459 <xxx38569459@gmail.com>, 2018. # TyTYct Hihi <tytyct@gmail.com>, 2019. -# Steve Dang <itsnguu@outlook.com>, 2019. +# Steve Dang <itsnguu@outlook.com>, 2019, 2020. # Peter Anh <peteranh3105@gmail.com>, 2019. # DÅ©ng Äinh <dqdthanhthanh@gmail.com>, 2019. msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2019-10-04 03:15+0000\n" -"Last-Translator: DÅ©ng Äinh <dqdthanhthanh@gmail.com>\n" +"PO-Revision-Date: 2020-02-02 08:51+0000\n" +"Last-Translator: Steve Dang <itsnguu@outlook.com>\n" "Language-Team: Vietnamese <https://hosted.weblate.org/projects/godot-engine/" "godot/vi/>\n" "Language: vi\n" @@ -25,7 +25,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 3.9-dev\n" +"X-Generator: Weblate 3.11-dev\n" #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/visual_script/visual_script_builtin_funcs.cpp @@ -40,15 +40,15 @@ msgstr "" #: 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 "Số byte không đủ để giải mã, hoặc cấu trúc không chÃnh xác." +msgstr "Không đủ byte để giải mã, hoặc định dạng không hợp lệ." #: core/math/expression.cpp msgid "Invalid input %i (not passed) in expression" -msgstr "" +msgstr "Dữ liệu và o không hợp lệ %i (không được thông qua)" #: core/math/expression.cpp msgid "self can't be used because instance is null (not passed)" -msgstr "" +msgstr "self không thể sá» dụng vì instance là null (không thông qua)" #: core/math/expression.cpp msgid "Invalid operands to operator %s, %s and %s." @@ -56,11 +56,11 @@ msgstr "Toán hạng không hợp lệ cho toán tá» %s, %s và %s." #: core/math/expression.cpp msgid "Invalid index of type %s for base type %s" -msgstr "" +msgstr "Index không hợp lệ cá»§a loại %s cho loại cÆ¡ sở %s" #: core/math/expression.cpp msgid "Invalid named index '%s' for base type %s" -msgstr "" +msgstr "Tên index không hợp lệ '%s' cho loại cÆ¡ sở %s" #: core/math/expression.cpp msgid "Invalid arguments to construct '%s'" @@ -68,7 +68,7 @@ msgstr "Äối số không hợp lệ để dá»±ng '%s'" #: core/math/expression.cpp msgid "On call to '%s':" -msgstr "" +msgstr "Khi cuá»™c gá»i đến '%s':" #: core/ustring.cpp msgid "B" @@ -100,7 +100,7 @@ msgstr "" #: editor/animation_bezier_editor.cpp msgid "Free" -msgstr "Miá»…n phÃ" +msgstr "Tá»± do" #: editor/animation_bezier_editor.cpp msgid "Balanced" @@ -108,7 +108,7 @@ msgstr "Cân bằng" #: editor/animation_bezier_editor.cpp msgid "Mirror" -msgstr "" +msgstr "Phản chiếu" #: editor/animation_bezier_editor.cpp editor/editor_profiler.cpp msgid "Time:" @@ -128,7 +128,7 @@ msgstr "Nhân đôi các khoá đã chá»n" #: editor/animation_bezier_editor.cpp msgid "Delete Selected Key(s)" -msgstr "Xoá Key(s) được chá»n" +msgstr "Xoá các khoá được chá»n" #: editor/animation_bezier_editor.cpp msgid "Add Bezier Point" @@ -256,39 +256,36 @@ msgid "Anim Clips:" msgstr "" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Change Track Path" -msgstr "Äổi giá trị Array" +msgstr "Thay đổi đưá»ng dẫn Track" #: editor/animation_track_editor.cpp msgid "Toggle this track on/off." -msgstr "" +msgstr "Báºt tắt track nà y on/off." #: editor/animation_track_editor.cpp msgid "Update Mode (How this property is set)" -msgstr "" +msgstr "Cáºp nháºt chế độ (Cách thuá»™c tÃnh được thiết láºp)" #: editor/animation_track_editor.cpp msgid "Interpolation Mode" -msgstr "" +msgstr "Ná»™i suy" #: editor/animation_track_editor.cpp msgid "Loop Wrap Mode (Interpolate end with beginning on loop)" -msgstr "" +msgstr "Bá»c vòng lặp (Ná»™i suy kết thúc vá»›i việc bắt đầu vòng lặp)" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Remove this track." -msgstr "Bá» track Ä‘ang chá»n." +msgstr "Bá» track nà y." #: editor/animation_track_editor.cpp -#, fuzzy msgid "Time (s): " -msgstr "Bước (s):" +msgstr "Bước: " #: editor/animation_track_editor.cpp msgid "Toggle Track Enabled" -msgstr "" +msgstr "Báºt tắt kÃch hoạt Track" #: editor/animation_track_editor.cpp msgid "Continuous" @@ -304,7 +301,7 @@ msgstr "KÃch hoạt" #: editor/animation_track_editor.cpp msgid "Capture" -msgstr "" +msgstr "Chụp" #: editor/animation_track_editor.cpp msgid "Nearest" @@ -321,11 +318,11 @@ msgstr "Khối" #: editor/animation_track_editor.cpp msgid "Clamp Loop Interp" -msgstr "" +msgstr "Kẹp vòng ná»™i suy" #: editor/animation_track_editor.cpp msgid "Wrap Loop Interp" -msgstr "" +msgstr "Bá»c vòng lặp ná»™i suy" #: editor/animation_track_editor.cpp #: editor/plugins/canvas_item_editor_plugin.cpp @@ -415,6 +412,10 @@ msgid "" "-AudioStreamPlayer2D\n" "-AudioStreamPlayer3D" msgstr "" +"Các bản âm thanh chỉ có thể trỠđến các nút:\n" +"-AudioStreamPlayer\n" +"-AudioStreamPlayer2D\n" +"-AudioStreamPlayer3D" #: editor/animation_track_editor.cpp msgid "Animation tracks can only point to AnimationPlayer nodes." @@ -433,40 +434,36 @@ msgid "Invalid track for Bezier (no suitable sub-properties)" msgstr "" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Add Bezier Track" -msgstr "Thêm Track Animation" +msgstr "Thêm Bezier Track" #: editor/animation_track_editor.cpp msgid "Track path is invalid, so can't add a key." -msgstr "" +msgstr "ÄÆ°á»ng dẫn không hợp lệ, không thể thêm khoá." #: editor/animation_track_editor.cpp msgid "Track is not of type Spatial, can't insert key" -msgstr "" +msgstr "Track không phải loại Spatial, không thể thêm khoá" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Add Transform Track Key" -msgstr "Chèn Track & Key Anim" +msgstr "Thêm khoá Transform Track" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Add Track Key" -msgstr "Thêm Track Animation" +msgstr "Thêm khoá Track" #: editor/animation_track_editor.cpp msgid "Track path is invalid, so can't add a method key." -msgstr "" +msgstr "ÄÆ°á»ng dẫn Track không hợp lệ, không thể thêm khoá phương thức." #: editor/animation_track_editor.cpp -#, fuzzy msgid "Add Method Track Key" -msgstr "Chèn Track & Key Anim" +msgstr "Thêm khoá Method Track" #: editor/animation_track_editor.cpp msgid "Method not found in object: " -msgstr "" +msgstr "Không tìm thấy phương thức trong đối tượng: " #: editor/animation_track_editor.cpp msgid "Anim Move Keys" @@ -514,11 +511,11 @@ msgstr "Chá»n má»™t AnimationPlayer từ Scene Tree để chỉnh sá»a animati #: editor/animation_track_editor.cpp msgid "Only show tracks from nodes selected in tree." -msgstr "" +msgstr "Chỉ hiển thị các track từ các nút đã chá»n trong cây." #: editor/animation_track_editor.cpp msgid "Group tracks by node or display them as plain list." -msgstr "" +msgstr "Nhóm các track bởi nút hoặc hiển thị chúng dạng danh sách đơn giản." #: editor/animation_track_editor.cpp msgid "Snap:" @@ -694,8 +691,9 @@ msgid "Line Number:" msgstr "Dòng số:" #: editor/code_editor.cpp -msgid "Replaced %d occurrence(s)." -msgstr "Äã thay thế %d biến cố." +#, fuzzy +msgid "%d replaced." +msgstr "Thay thế ..." #: editor/code_editor.cpp editor/editor_help.cpp #, fuzzy @@ -3843,9 +3841,8 @@ msgid "Groups" msgstr "Nhóm (Groups)" #: editor/groups_editor.cpp -#, fuzzy msgid "Nodes Not in Group" -msgstr "Nút không trong Nhóm" +msgstr "Các nút không trong Nhóm" #: editor/groups_editor.cpp editor/scene_tree_dock.cpp #: editor/scene_tree_editor.cpp @@ -3947,6 +3944,11 @@ msgid "Saving..." msgstr "Äang lưu ..." #: editor/import_dock.cpp +#, fuzzy +msgid "%d Files" +msgstr " Tệp tin" + +#: editor/import_dock.cpp msgid "Set as Default for '%s'" msgstr "Gán Mặc định cho '%s'" @@ -3955,10 +3957,6 @@ msgid "Clear Default for '%s'" msgstr "Dá»n Mặc định cho '%s'" #: editor/import_dock.cpp -msgid " Files" -msgstr " Tệp tin" - -#: editor/import_dock.cpp msgid "Import As:" msgstr "Nháºp và o vá»›i:" @@ -4071,7 +4069,7 @@ msgstr "" #: editor/node_dock.cpp msgid "Select a single node to edit its signals and groups." -msgstr "" +msgstr "Chá»n nút duy nhất để chỉnh sá»a tÃnh hiệu và nhóm cá»§a nó." #: editor/plugin_config_dialog.cpp msgid "Edit a Plugin" @@ -4178,7 +4176,7 @@ msgstr "Äổi Thá»i gian Chuyển Animation" #: editor/plugins/animation_blend_space_2d_editor.cpp #: editor/plugins/animation_state_machine_editor.cpp msgid "This type of node can't be used. Only root nodes are allowed." -msgstr "" +msgstr "Loại nút nà y không thể sá» dụng. Chỉ các nút gốc được phép." #: editor/plugins/animation_blend_space_1d_editor.cpp #: editor/plugins/animation_blend_space_2d_editor.cpp @@ -4196,7 +4194,7 @@ msgstr "" #: editor/plugins/animation_blend_space_1d_editor.cpp msgid "Move BlendSpace1D Node Point" -msgstr "" +msgstr "Di chuyển Ä‘iểm nút BlendSpace1D" #: editor/plugins/animation_blend_space_1d_editor.cpp #: editor/plugins/animation_blend_space_2d_editor.cpp @@ -4269,7 +4267,7 @@ msgstr "Xoá Variable" #: editor/plugins/animation_blend_space_2d_editor.cpp msgid "BlendSpace2D does not belong to an AnimationTree node." -msgstr "" +msgstr "BlendSpace2D không thuá»™c nút AnimationTree." #: editor/plugins/animation_blend_space_2d_editor.cpp msgid "No triangles exist, so no blending can take place." @@ -4308,11 +4306,11 @@ msgstr "Chỉnh sá»a Lá»c" #: editor/plugins/animation_blend_tree_editor_plugin.cpp msgid "Output node can't be added to the blend tree." -msgstr "" +msgstr "Nút đầu ra không thể thêm và o cây Blend." #: editor/plugins/animation_blend_tree_editor_plugin.cpp msgid "Add Node to BlendTree" -msgstr "" +msgstr "Thêm nút và o cây Blend" #: editor/plugins/animation_blend_tree_editor_plugin.cpp #: editor/plugins/visual_shader_editor_plugin.cpp @@ -4507,7 +4505,7 @@ msgstr "Vị trà hoạt ảnh (giây)." #: editor/plugins/animation_player_editor_plugin.cpp msgid "Scale animation playback globally for the node." -msgstr "" +msgstr "Quy mô trình phát hoạt ảnh toà n cầu cho các nút." #: editor/plugins/animation_player_editor_plugin.cpp msgid "Animation Tools" @@ -4653,7 +4651,7 @@ msgstr "" #: editor/plugins/animation_state_machine_editor.cpp msgid "Start and end nodes are needed for a sub-transition." -msgstr "" +msgstr "Các nút bắt đầu và kết thúc là cần thiết cho má»™t sub-transition." #: editor/plugins/animation_state_machine_editor.cpp msgid "No playback resource set at path: %s." @@ -4708,9 +4706,8 @@ msgid "Transition: " msgstr "Chuyển tiếp: " #: editor/plugins/animation_state_machine_editor.cpp -#, fuzzy msgid "Play Mode:" -msgstr "Nháºp từ Node:" +msgstr "Chế độ chÆ¡i:" #: editor/plugins/animation_tree_editor_plugin.cpp #: editor/plugins/animation_tree_player_editor_plugin.cpp @@ -4815,31 +4812,31 @@ msgstr "Nút Chạy má»™t lần" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Mix Node" -msgstr "" +msgstr "Nút Mix" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Blend2 Node" -msgstr "" +msgstr "Nút Blend2" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Blend3 Node" -msgstr "" +msgstr "Nút Blend3" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Blend4 Node" -msgstr "" +msgstr "Nút Blend4" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "TimeScale Node" -msgstr "" +msgstr "Nút TimeScale" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "TimeSeek Node" -msgstr "" +msgstr "Nút TimeSeek" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Transition Node" -msgstr "" +msgstr "Nút Transition" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Import Animations..." @@ -4847,7 +4844,7 @@ msgstr "Nháºp và o các hoạt ảnh ..." #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Edit Node Filters" -msgstr "Chỉnh sá»a lá»c Node" +msgstr "Chỉnh bá»™ lá»c Node" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Filters..." @@ -5145,9 +5142,8 @@ msgid "Move Horizontal Guide" msgstr "" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Create Horizontal Guide" -msgstr "Tạo Root Node:" +msgstr "Tạo đưá»ng Guide ngang" #: editor/plugins/canvas_item_editor_plugin.cpp #, fuzzy @@ -5468,19 +5464,19 @@ msgstr "" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Snap to Node Anchor" -msgstr "" +msgstr "Snap đến neo cá»§a Nút" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Snap to Node Sides" -msgstr "" +msgstr "Snap sang hai bên nút" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Snap to Node Center" -msgstr "" +msgstr "Snap đến chÃnh giữa nút" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Snap to Other Nodes" -msgstr "" +msgstr "Snap đế các nút khác" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Snap to Guides" @@ -5516,7 +5512,7 @@ msgstr "" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Make Custom Bone(s) from Node(s)" -msgstr "" +msgstr "Tạo xương tuỳ chá»n từ các nút" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Clear Custom Bones" @@ -5637,7 +5633,7 @@ msgstr "Äang thêm %s..." #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Cannot instantiate multiple nodes without root." -msgstr "" +msgstr "Không thể khởi tạo nhiá»u nút mà không có nút gốc." #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp @@ -5658,6 +5654,8 @@ msgid "" "Drag & drop + Shift : Add node as sibling\n" "Drag & drop + Alt : Change node type" msgstr "" +"Kéo & thả + Shift: Thêm nút cùng cấp\n" +"Kéo & thả + Alt: Äổi loại nút" #: editor/plugins/collision_polygon_editor_plugin.cpp msgid "Create Polygon3D" @@ -5747,7 +5745,7 @@ msgstr "" #: editor/plugins/cpu_particles_editor_plugin.cpp #: editor/plugins/particles_editor_plugin.cpp msgid "Create Emission Points From Node" -msgstr "" +msgstr "Tạo Ä‘iểm phát xạ từ nút" #: editor/plugins/curve_editor_plugin.cpp msgid "Flat 0" @@ -5849,11 +5847,11 @@ msgid "Mesh is empty!" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Trimesh Body" +msgid "Couldn't create a Trimesh collision shape." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Convex Body" +msgid "Create Static Trimesh Body" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -5865,13 +5863,31 @@ msgid "Create Trimesh Static Shape" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Failed creating shapes!" +msgid "Can't create a single convex collision shape for the scene root." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Couldn't create a single convex collision shape." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Single Convex Shape" +msgstr "Tạo hình dạng lồi" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Can't create multiple convex collision shapes for the scene root." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp #, fuzzy -msgid "Create Convex Shape(s)" -msgstr "Tạo nodes má»›i." +msgid "Couldn't create any collision shapes." +msgstr "Không thể tạo folder." + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Multiple Convex Shapes" +msgstr "Tạo hình dạng lồi" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Navigation Mesh" @@ -5922,19 +5938,57 @@ msgid "Create Trimesh Static Body" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a StaticBody and assigns a polygon-based collision shape to it " +"automatically.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Trimesh Collision Sibling" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp #, fuzzy -msgid "Create Convex Collision Sibling(s)" +msgid "Create Single Convex Collision Siblings" msgstr "Tạo" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a single convex collision shape.\n" +"This is the fastest (but least accurate) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Multiple Convex Collision Siblings" +msgstr "Tạo" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is a performance middle-ground between the two above options." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Outline Mesh..." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a static outline mesh. The outline mesh will have its normals " +"flipped automatically.\n" +"This can be used instead of the SpatialMaterial Grow property when using " +"that property isn't possible." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "View UV1" msgstr "" @@ -5993,6 +6047,7 @@ msgstr "" #: editor/plugins/multimesh_editor_plugin.cpp msgid "No mesh source specified (and no MultiMesh set in node)." msgstr "" +"Không có nguồn lưới được chỉ định (và không có MultiMesh đặt trong nút)." #: editor/plugins/multimesh_editor_plugin.cpp msgid "No mesh source specified (and MultiMesh contains no Mesh)." @@ -6188,9 +6243,8 @@ msgid "Add Point to Curve" msgstr "" #: editor/plugins/path_2d_editor_plugin.cpp -#, fuzzy msgid "Split Curve" -msgstr "Sá»a Node Curve" +msgstr "Chia đưá»ng Curve" #: editor/plugins/path_2d_editor_plugin.cpp msgid "Move Point in Curve" @@ -6307,7 +6361,7 @@ msgstr "Di chuyển đến..." #: editor/plugins/polygon_2d_editor_plugin.cpp msgid "" "The skeleton property of the Polygon2D does not point to a Skeleton2D node" -msgstr "" +msgstr "Thuá»™c tÃnh xương cá»§a nút Polygon2D không trỠđến nút Skeleton2D" #: editor/plugins/polygon_2d_editor_plugin.cpp msgid "Sync Bones" @@ -6849,9 +6903,8 @@ msgid "Clear Recent Scripts" msgstr "Dá»n các cảnh gần đây" #: editor/plugins/script_text_editor.cpp -#, fuzzy msgid "Connections to method:" -msgstr "Kết nối đến Node:" +msgstr "Kết nối đến phương thức:" #: editor/plugins/script_text_editor.cpp editor/script_editor_debugger.cpp msgid "Source" @@ -6862,10 +6915,10 @@ msgid "Target" msgstr "" #: editor/plugins/script_text_editor.cpp -#, fuzzy msgid "" "Missing connected method '%s' for signal '%s' from node '%s' to node '%s'." -msgstr "Không có kết nối đến input '%s' cá»§a node '%s'." +msgstr "" +"Không có phương thức kết nối '%s' cá»§a tÃn hiệu '%s' từ nút '%s' đến nút '%s'." #: editor/plugins/script_text_editor.cpp #, fuzzy @@ -6888,7 +6941,7 @@ msgstr "" #: editor/plugins/script_text_editor.cpp #: modules/visual_script/visual_script_editor.cpp msgid "Can't drop nodes because script '%s' is not used in this scene." -msgstr "" +msgstr "Không thể bá» nút vì script '%s' không sá» dụng trong cảnh nà y." #: editor/plugins/script_text_editor.cpp msgid "Lookup Symbol" @@ -7069,7 +7122,7 @@ msgstr "" #: editor/plugins/skeleton_2d_editor_plugin.cpp msgid "This skeleton has no bones, create some children Bone2D nodes." -msgstr "" +msgstr "Bá»™ xương không có xương, tạo má»™t số nút Bone2D." #: editor/plugins/skeleton_2d_editor_plugin.cpp #, fuzzy @@ -7247,7 +7300,7 @@ msgstr "" #: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp msgid "This operation requires a single selected node." -msgstr "" +msgstr "Hoạt động yêu cầu chá»n má»™t nút duy nhất." #: editor/plugins/spatial_editor_plugin.cpp msgid "Lock View Rotation" @@ -7354,7 +7407,7 @@ msgstr "" #: editor/plugins/spatial_editor_plugin.cpp msgid "Snap Nodes To Floor" -msgstr "" +msgstr "Snap các nút đến Floor" #: editor/plugins/spatial_editor_plugin.cpp msgid "Couldn't find a solid floor to snap the selection to." @@ -8127,18 +8180,16 @@ msgid "Occlusion" msgstr "Tạo" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Navigation" -msgstr "Animation Node" +msgstr "" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Bitmask" msgstr "" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Priority" -msgstr "Nháºp từ Node:" +msgstr "Ưu tiên" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Z Index" @@ -8159,18 +8210,16 @@ msgid "Occlusion Mode" msgstr "Tạo" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Navigation Mode" -msgstr "Animation Node" +msgstr "Chế độ Navigation" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Bitmask Mode" msgstr "" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Priority Mode" -msgstr "Nháºp từ Node:" +msgstr "Chế độ Ưu tiên" #: editor/plugins/tile_set_editor_plugin.cpp #, fuzzy @@ -8195,9 +8244,8 @@ msgid "Erase bitmask." msgstr "" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Create a new rectangle." -msgstr "Tạo nodes má»›i." +msgstr "Tạo hình chữ nháºt má»›i." #: editor/plugins/tile_set_editor_plugin.cpp #, fuzzy @@ -8406,7 +8454,7 @@ msgstr "Xuất Tile Set" msgid "No VCS addons are available." msgstr "" -#: editor/plugins/version_control_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/version_control_editor_plugin.cpp msgid "Error" msgstr "" @@ -8440,9 +8488,8 @@ msgid "Staging area" msgstr "" #: editor/plugins/version_control_editor_plugin.cpp -#, fuzzy msgid "Detect new changes" -msgstr "Tạo nodes má»›i." +msgstr "Phát hiện thay đổi má»›i" #: editor/plugins/version_control_editor_plugin.cpp #, fuzzy @@ -8574,7 +8621,7 @@ msgstr "Phiên bản hiện tại:" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Resize VisualShader node" -msgstr "" +msgstr "Thay đổi kÃch thước nút VisualShader" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Set Uniform Name" @@ -8586,22 +8633,20 @@ msgstr "" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Add Node to Visual Shader" -msgstr "" +msgstr "Thêm nút và o Visual Shader" #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Duplicate Nodes" -msgstr "Nhân đôi Node(s)" +msgstr "Nhân bản các nút" #: editor/plugins/visual_shader_editor_plugin.cpp #: modules/visual_script/visual_script_editor.cpp msgid "Paste Nodes" -msgstr "" +msgstr "Dán các nút" #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Delete Nodes" -msgstr "Xóa Node(s)" +msgstr "Xoá các nút" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Visual Shader Input Type Changed" @@ -8620,14 +8665,12 @@ msgid "Light" msgstr "" #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Show resulted shader code." -msgstr "Tạo Root Node:" +msgstr "Hiện kết quả mã shader." #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Create Shader Node" -msgstr "Tạo Root Node:" +msgstr "Tạo nút Shader" #: editor/plugins/visual_shader_editor_plugin.cpp #, fuzzy @@ -9467,9 +9510,8 @@ msgid "Script" msgstr "Tạo Script" #: editor/project_export.cpp -#, fuzzy msgid "Script Export Mode:" -msgstr "Nháºp từ Node:" +msgstr "Chế độ xuất Script:" #: editor/project_export.cpp msgid "Text" @@ -9500,9 +9542,8 @@ msgid "Export Project" msgstr "Xuất dá»± án ra" #: editor/project_export.cpp -#, fuzzy msgid "Export mode?" -msgstr "Nháºp từ Node:" +msgstr "Chế độ xuất?" #: editor/project_export.cpp #, fuzzy @@ -9531,11 +9572,18 @@ msgid "Export With Debug" msgstr "" #: editor/project_manager.cpp -msgid "The path does not exist." -msgstr "" +#, fuzzy +msgid "The path specified doesn't exist." +msgstr "Tệp không tồn tại." #: editor/project_manager.cpp -msgid "Invalid '.zip' project file, does not contain a 'project.godot' file." +#, fuzzy +msgid "Error opening package file (it's not in ZIP format)." +msgstr "Lá»—i không thể mở gói, không phải dạng nén." + +#: editor/project_manager.cpp +msgid "" +"Invalid \".zip\" project file; it doesn't contain a \"project.godot\" file." msgstr "" #: editor/project_manager.cpp @@ -9543,11 +9591,11 @@ msgid "Please choose an empty folder." msgstr "" #: editor/project_manager.cpp -msgid "Please choose a 'project.godot' or '.zip' file." +msgid "Please choose a \"project.godot\" or \".zip\" file." msgstr "" #: editor/project_manager.cpp -msgid "Directory already contains a Godot project." +msgid "This directory already contains a Godot project." msgstr "" #: editor/project_manager.cpp @@ -10166,7 +10214,7 @@ msgstr "" #: editor/property_editor.cpp msgid "Select Node" -msgstr "" +msgstr "Chá»n nút" #: editor/property_editor.cpp msgid "Error loading file: Not a resource!" @@ -10174,7 +10222,7 @@ msgstr "" #: editor/property_editor.cpp msgid "Pick a Node" -msgstr "" +msgstr "Lấy má»™t nút" #: editor/property_editor.cpp msgid "Bit %d, val %d." @@ -10206,6 +10254,11 @@ msgid "Suffix" msgstr "" #: editor/rename_dialog.cpp +#, fuzzy +msgid "Use Regular Expressions" +msgstr "Phiên bản hiện tại:" + +#: editor/rename_dialog.cpp msgid "Advanced Options" msgstr "" @@ -10214,26 +10267,24 @@ msgid "Substitute" msgstr "" #: editor/rename_dialog.cpp -#, fuzzy msgid "Node name" -msgstr "Äổi tên" +msgstr "Tên nút" #: editor/rename_dialog.cpp msgid "Node's parent name, if available" -msgstr "" +msgstr "Tên cha mẹ cá»§a nút, nếu có sẵn" #: editor/rename_dialog.cpp msgid "Node type" -msgstr "" +msgstr "Loại nút" #: editor/rename_dialog.cpp msgid "Current scene name" msgstr "" #: editor/rename_dialog.cpp -#, fuzzy msgid "Root node name" -msgstr "Äổi tên" +msgstr "Tên nút gốc" #: editor/rename_dialog.cpp msgid "" @@ -10242,12 +10293,12 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -msgid "Per Level counter" +msgid "Per-level Counter" msgstr "" #: editor/rename_dialog.cpp msgid "If set the counter restarts for each group of child nodes" -msgstr "" +msgstr "Nếu đặt bá»™ đếm khởi động lại cho từng nhóm nút con" #: editor/rename_dialog.cpp msgid "Initial value for the counter" @@ -10260,7 +10311,7 @@ msgstr "Bước (s):" #: editor/rename_dialog.cpp msgid "Amount by which counter is incremented for each node" -msgstr "" +msgstr "Giá trị mà bá»™ đếm tăng lên cho má»—i nút" #: editor/rename_dialog.cpp msgid "Padding" @@ -10273,10 +10324,6 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -msgid "Regular Expressions" -msgstr "" - -#: editor/rename_dialog.cpp msgid "Post-Process" msgstr "" @@ -10285,11 +10332,11 @@ msgid "Keep" msgstr "" #: editor/rename_dialog.cpp -msgid "CamelCase to under_scored" +msgid "PascalCase to snake_case" msgstr "" #: editor/rename_dialog.cpp -msgid "under_scored to CamelCase" +msgid "snake_case to PascalCase" msgstr "" #: editor/rename_dialog.cpp @@ -10309,9 +10356,18 @@ msgstr "" msgid "Reset" msgstr "Äặt lại phóng" +#: editor/rename_dialog.cpp +msgid "Regular Expression Error" +msgstr "" + +#: editor/rename_dialog.cpp +#, fuzzy +msgid "At character %s" +msgstr "Ký tá»± hợp lệ:" + #: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp msgid "Reparent Node" -msgstr "" +msgstr "Äổi cha mẹ cá»§a nút" #: editor/reparent_dialog.cpp msgid "Reparent Location (Select new Parent):" @@ -10358,6 +10414,8 @@ msgid "" "Cannot instance the scene '%s' because the current scene exists within one " "of its nodes." msgstr "" +"Không thể là m cảnh '%s' vì trong cảnh hiện tại tồn tại trong má»™t các nút cá»§a " +"nó." #: editor/scene_tree_dock.cpp msgid "Instance Scene(s)" @@ -10381,23 +10439,25 @@ msgstr "" #: editor/scene_tree_dock.cpp msgid "Move Node In Parent" -msgstr "" +msgstr "Chuyển nút trong cha mẹ" #: editor/scene_tree_dock.cpp msgid "Move Nodes In Parent" -msgstr "" +msgstr "Di chuyển các nút trong cha mẹ" #: editor/scene_tree_dock.cpp msgid "Duplicate Node(s)" -msgstr "Nhân đôi Node(s)" +msgstr "Nhân đôi các nút" #: editor/scene_tree_dock.cpp msgid "Can't reparent nodes in inherited scenes, order of nodes can't change." msgstr "" +"Không thể đổi cha mẹ các nút trong cảnh kế thừa, thứ tá»± các nút không thể " +"thay đổi." #: editor/scene_tree_dock.cpp msgid "Node must belong to the edited scene to become root." -msgstr "" +msgstr "Nút phải thuá»™c cảnh đã chỉnh sá»a để trở thà nh gốc." #: editor/scene_tree_dock.cpp msgid "Instantiated scenes can't become root" @@ -10405,29 +10465,27 @@ msgstr "" #: editor/scene_tree_dock.cpp msgid "Make node as Root" -msgstr "" +msgstr "Gán nút là nút Gốc" #: editor/scene_tree_dock.cpp -#, fuzzy msgid "Delete %d nodes?" -msgstr "Xóa Node(s)" +msgstr "Xoá %d nút?" #: editor/scene_tree_dock.cpp msgid "Delete the root node \"%s\"?" -msgstr "" +msgstr "Xoá nút gốc \"%s\"?" #: editor/scene_tree_dock.cpp msgid "Delete node \"%s\" and its children?" -msgstr "" +msgstr "Xoá nút \"%s\" và các nút con cá»§a nó?" #: editor/scene_tree_dock.cpp -#, fuzzy msgid "Delete node \"%s\"?" -msgstr "Xóa Node(s)" +msgstr "Xoá nút \"%s\"?" #: editor/scene_tree_dock.cpp msgid "Can not perform with the root node." -msgstr "" +msgstr "Không thể thá»±c hiện vá»›i nút gốc." #: editor/scene_tree_dock.cpp msgid "This operation can't be done on instanced scenes." @@ -10442,12 +10500,15 @@ msgid "" "Disabling \"editable_instance\" will cause all properties of the node to be " "reverted to their default." msgstr "" +"Vô hiệu \"editable_instance\" sẽ khiến tất cả thuá»™c tÃnh nút vá» lại mặc định." #: editor/scene_tree_dock.cpp msgid "" "Enabling \"Load As Placeholder\" will disable \"Editable Children\" and " "cause all properties of the node to be reverted to their default." msgstr "" +"KÃch hoạt \"Load As Placeholder\" sẽ vô hiệu hoá \"Editable Children\" và " +"khiến tất cả thuá»™c tÃnh cá»§a nút vá» lại mặc định." #: editor/scene_tree_dock.cpp msgid "Make Local" @@ -10460,7 +10521,7 @@ msgstr "Tạo Scene Má»›i" #: editor/scene_tree_dock.cpp msgid "Create Root Node:" -msgstr "Tạo Root Node:" +msgstr "Tạo Nút Gốc:" #: editor/scene_tree_dock.cpp msgid "2D Scene" @@ -10475,17 +10536,16 @@ msgid "User Interface" msgstr "Giao diện ngưá»i dùng" #: editor/scene_tree_dock.cpp -#, fuzzy msgid "Other Node" -msgstr "Xóa Node(s)" +msgstr "Nút khác" #: editor/scene_tree_dock.cpp msgid "Can't operate on nodes from a foreign scene!" -msgstr "" +msgstr "Không thể hoạt động trên các nút từ ngoại cảnh!" #: editor/scene_tree_dock.cpp msgid "Can't operate on nodes the current scene inherits from!" -msgstr "" +msgstr "Không thể hoạt động các nút mà cảnh hiện tại kế thừa từ nó!" #: editor/scene_tree_dock.cpp msgid "Attach Script" @@ -10493,11 +10553,11 @@ msgstr "ÄÃnh kèm Script" #: editor/scene_tree_dock.cpp msgid "Remove Node(s)" -msgstr "Xóa Node(s)" +msgstr "Xóa các nút" #: editor/scene_tree_dock.cpp msgid "Change type of node(s)" -msgstr "" +msgstr "Äổi loại cá»§a các nút" #: editor/scene_tree_dock.cpp msgid "" @@ -10535,7 +10595,7 @@ msgstr "" #: editor/scene_tree_dock.cpp msgid "Add Child Node" -msgstr "" +msgstr "Thêm nút con" #: editor/scene_tree_dock.cpp #, fuzzy @@ -10547,9 +10607,8 @@ msgid "Change Type" msgstr "" #: editor/scene_tree_dock.cpp -#, fuzzy msgid "Reparent to New Node" -msgstr "Tạo các nút má»›i." +msgstr "Reparent đến nút má»›i" #: editor/scene_tree_dock.cpp msgid "Make Scene Root" @@ -10565,30 +10624,30 @@ msgstr "" #: editor/scene_tree_dock.cpp editor/script_editor_debugger.cpp msgid "Copy Node Path" -msgstr "" +msgstr "Sao chép đưá»ng dẫn nút" #: editor/scene_tree_dock.cpp msgid "Delete (No Confirm)" msgstr "" #: editor/scene_tree_dock.cpp -#, fuzzy msgid "Add/Create a New Node." -msgstr "Tạo các nút má»›i." +msgstr "Thêm/Tạo má»™t nút má»›i." #: editor/scene_tree_dock.cpp msgid "" "Instance a scene file as a Node. Creates an inherited scene if no root node " "exists." msgstr "" +"Tệp tin cảnh giống như má»™t nút. Tạo má»™t cảnh kế thừa nếu nó không có nút gốc." #: editor/scene_tree_dock.cpp msgid "Attach a new or existing script for the selected node." -msgstr "" +msgstr "ÄÃnh kèm má»™t tệp lệnh cho nút đã chá»n." #: editor/scene_tree_dock.cpp msgid "Clear a script for the selected node." -msgstr "" +msgstr "Xoá tệp lệnh khá»i nút đã chá»n." #: editor/scene_tree_dock.cpp msgid "Remote" @@ -10607,9 +10666,8 @@ msgid "Toggle Visible" msgstr "" #: editor/scene_tree_editor.cpp -#, fuzzy msgid "Unlock Node" -msgstr "Di chuyển Node(s)" +msgstr "Mở khoá nút" #: editor/scene_tree_editor.cpp #, fuzzy @@ -10623,25 +10681,31 @@ msgstr "Kết nối bị lá»—i" #: editor/scene_tree_editor.cpp msgid "Node configuration warning:" -msgstr "" +msgstr "Cảnh báo cấu hình nút:" #: editor/scene_tree_editor.cpp msgid "" "Node has %s connection(s) and %s group(s).\n" "Click to show signals dock." msgstr "" +"Nút có %s kết nối và %s nhóm.\n" +"Nhấp để hiện khung tÃn hiệu." #: editor/scene_tree_editor.cpp msgid "" "Node has %s connection(s).\n" "Click to show signals dock." msgstr "" +"Nút có %s kết nối.\n" +"Nhấp để hiện khung tÃn hiệu." #: editor/scene_tree_editor.cpp msgid "" "Node is in %s group(s).\n" "Click to show groups dock." msgstr "" +"Nút có trong %s nhóm.\n" +"Nhấp để hiện khung nhóm." #: editor/scene_tree_editor.cpp #, fuzzy @@ -10653,6 +10717,8 @@ msgid "" "Node is locked.\n" "Click to unlock it." msgstr "" +"Nút hiện khoá.\n" +"Nhấp để mở khoá nó." #: editor/scene_tree_editor.cpp msgid "" @@ -10672,23 +10738,23 @@ msgstr "" #: editor/scene_tree_editor.cpp msgid "Invalid node name, the following characters are not allowed:" -msgstr "" +msgstr "Tên nút không hợp lệ, các ký tá»± sau bị cấm:" #: editor/scene_tree_editor.cpp msgid "Rename Node" -msgstr "" +msgstr "Äổi tên nút" #: editor/scene_tree_editor.cpp msgid "Scene Tree (Nodes):" -msgstr "" +msgstr "Cây (nút):" #: editor/scene_tree_editor.cpp msgid "Node Configuration Warning!" -msgstr "" +msgstr "Cảnh báo cấu hình nút!" #: editor/scene_tree_editor.cpp msgid "Select a Node" -msgstr "" +msgstr "Chá»n má»™t Nút" #: editor/script_create_dialog.cpp msgid "Path is empty." @@ -10699,9 +10765,8 @@ msgid "Filename is empty." msgstr "" #: editor/script_create_dialog.cpp -#, fuzzy msgid "Path is not local." -msgstr "Path không chỉ đến Node!" +msgstr "Path không là cục bá»™." #: editor/script_create_dialog.cpp #, fuzzy @@ -10767,7 +10832,7 @@ msgstr "" #: editor/script_create_dialog.cpp #, fuzzy -msgid "Script is valid." +msgid "Script path/name is valid." msgstr "Animation tree khả dụng." #: editor/script_create_dialog.cpp @@ -10779,9 +10844,8 @@ msgid "Built-in script (into scene file)." msgstr "" #: editor/script_create_dialog.cpp -#, fuzzy msgid "Will create a new script file." -msgstr "Tạo nodes má»›i." +msgstr "Sẽ tạo má»™t tệp lệnh má»›i." #: editor/script_create_dialog.cpp msgid "Will load an existing script file." @@ -10809,7 +10873,7 @@ msgstr "Tạo Script" #: editor/script_create_dialog.cpp msgid "Attach Node Script" -msgstr "" +msgstr "ÄÃnh kèm lệnh cho nút" #: editor/script_editor_debugger.cpp msgid "Remote " @@ -10871,6 +10935,10 @@ msgid "Copy Error" msgstr "" #: editor/script_editor_debugger.cpp +msgid "Video RAM" +msgstr "" + +#: editor/script_editor_debugger.cpp #, fuzzy msgid "Skip Breakpoints" msgstr "Tạo các Ä‘iểm." @@ -10921,10 +10989,6 @@ msgid "Total:" msgstr "" #: editor/script_editor_debugger.cpp -msgid "Video Mem" -msgstr "" - -#: editor/script_editor_debugger.cpp msgid "Resource Path" msgstr "" @@ -11361,26 +11425,31 @@ msgid "" "A node yielded without working memory, please read the docs on how to yield " "properly!" msgstr "" +"Má»™t nút yielded không có bá»™ nhá»› là m việc, Ä‘á»c lại tà i liệu vể cách yield!" #: modules/visual_script/visual_script.cpp msgid "" "Node yielded, but did not return a function state in the first working " "memory." msgstr "" +"Nút đã yield, nhưng không trả vá» trạng thái chức năng trong bá»™ nhá»› là m việc " +"đầu tiên." #: modules/visual_script/visual_script.cpp msgid "" "Return value must be assigned to first element of node working memory! Fix " "your node please." msgstr "" +"Giá trị trả vá» phải được gán cho phần tỠđầu tiên cá»§a bá»™ nhá»› là m việc cá»§a " +"nút! Sá»a lại nút cá»§a bạn." #: modules/visual_script/visual_script.cpp msgid "Node returned an invalid sequence output: " -msgstr "" +msgstr "Nút trả vỠđầu ra là chuá»—i không hợp lệ: " #: modules/visual_script/visual_script.cpp msgid "Found sequence bit but not the node in the stack, report bug!" -msgstr "" +msgstr "Tìm ra chuá»—i bit nhưng không phải nút trong ngăn xếp, báo cáo lá»—i!" #: modules/visual_script/visual_script.cpp msgid "Stack overflow with stack depth: " @@ -11421,18 +11490,16 @@ msgid "Override an existing built-in function." msgstr "" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Create a new function." -msgstr "Tạo nodes má»›i." +msgstr "Tạo má»™t hà m má»›i." #: modules/visual_script/visual_script_editor.cpp msgid "Variables:" msgstr "" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Create a new variable." -msgstr "Tạo nodes má»›i." +msgstr "Tạo má»™t biến má»›i." #: modules/visual_script/visual_script_editor.cpp msgid "Signals:" @@ -11496,11 +11563,11 @@ msgstr "" #: modules/visual_script/visual_script_editor.cpp msgid "Remove VisualScript Nodes" -msgstr "" +msgstr "Gỡ bá» các nút VisualScript" #: modules/visual_script/visual_script_editor.cpp msgid "Duplicate VisualScript Nodes" -msgstr "" +msgstr "Nhân bản các nút VisualScript" #: modules/visual_script/visual_script_editor.cpp msgid "Hold %s to drop a Getter. Hold Shift to drop a generic signature." @@ -11512,11 +11579,11 @@ msgstr "" #: modules/visual_script/visual_script_editor.cpp msgid "Hold %s to drop a simple reference to the node." -msgstr "" +msgstr "Giữ %s và thả để tham chiếu đơn giản đế nút." #: modules/visual_script/visual_script_editor.cpp msgid "Hold Ctrl to drop a simple reference to the node." -msgstr "" +msgstr "Giữ Ctrl và thả để tham chiếu đơn giản đến nút." #: modules/visual_script/visual_script_editor.cpp msgid "Hold %s to drop a Variable Setter." @@ -11528,11 +11595,11 @@ msgstr "" #: modules/visual_script/visual_script_editor.cpp msgid "Add Preload Node" -msgstr "" +msgstr "Thêm nút Preload" #: modules/visual_script/visual_script_editor.cpp msgid "Add Node(s) From Tree" -msgstr "" +msgstr "Thêm các nút từ cây" #: modules/visual_script/visual_script_editor.cpp msgid "" @@ -11554,30 +11621,27 @@ msgstr "" #: modules/visual_script/visual_script_editor.cpp msgid "Move Node(s)" -msgstr "Di chuyển Node(s)" +msgstr "Di chuyển các nút" #: modules/visual_script/visual_script_editor.cpp msgid "Remove VisualScript Node" -msgstr "" +msgstr "Gỡ bá» nút VisualScript" #: modules/visual_script/visual_script_editor.cpp msgid "Connect Nodes" -msgstr "" +msgstr "Kết nối các nút" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Disconnect Nodes" -msgstr "Äứt kết nối" +msgstr "Ngắt kết nối các nút" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Connect Node Data" -msgstr "Kết nối đến Node:" +msgstr "Kết nối dữ liệu nút" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Connect Node Sequence" -msgstr "Kết nối đến Node:" +msgstr "Kết nối trình tá»± nút" #: modules/visual_script/visual_script_editor.cpp msgid "Script already has function '%s'" @@ -11593,7 +11657,7 @@ msgstr "" #: modules/visual_script/visual_script_editor.cpp msgid "Can't copy the function node." -msgstr "" +msgstr "Không thể sao chép nút chức năng." #: modules/visual_script/visual_script_editor.cpp msgid "Clipboard is empty!" @@ -11601,19 +11665,19 @@ msgstr "" #: modules/visual_script/visual_script_editor.cpp msgid "Paste VisualScript Nodes" -msgstr "" +msgstr "Dán các nút VisualScript" #: modules/visual_script/visual_script_editor.cpp msgid "Can't create function with a function node." -msgstr "" +msgstr "Không thể tạo hà m vá»›i má»™t nút chức năng." #: modules/visual_script/visual_script_editor.cpp msgid "Can't create function of nodes from nodes of multiple functions." -msgstr "" +msgstr "Không thể tạo hà m cá»§a các nút từ các nút cá»§a nhiá»u chức năng." #: modules/visual_script/visual_script_editor.cpp msgid "Select at least one node with sequence port." -msgstr "" +msgstr "Chá»n Ãt nhất má»™t nút cho cổng trình tá»±." #: modules/visual_script/visual_script_editor.cpp msgid "Try to only have one sequence input in selection." @@ -11658,9 +11722,8 @@ msgid "Change Base Type:" msgstr "Äổi %s Loại" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Add Nodes..." -msgstr "Thêm Nút ..." +msgstr "Thêm các nút..." #: modules/visual_script/visual_script_editor.cpp #, fuzzy @@ -11686,11 +11749,11 @@ msgstr "Tìm loại Node" #: modules/visual_script/visual_script_editor.cpp msgid "Copy Nodes" -msgstr "" +msgstr "Sao chép các nút" #: modules/visual_script/visual_script_editor.cpp msgid "Cut Nodes" -msgstr "" +msgstr "Cắt các nút" #: modules/visual_script/visual_script_editor.cpp #, fuzzy @@ -11724,7 +11787,7 @@ msgstr "" #: modules/visual_script/visual_script_func_nodes.cpp msgid "Base object is not a Node!" -msgstr "" +msgstr "Äối tượng cÆ¡ sở không phải má»™t nút!" #: modules/visual_script/visual_script_func_nodes.cpp msgid "Path does not lead Node!" @@ -12482,6 +12545,9 @@ msgstr "" msgid "Constants cannot be modified." msgstr "Không thể chỉnh sá»a hằng số." +#~ msgid "Replaced %d occurrence(s)." +#~ msgstr "Äã thay thế %d biến cố." + #, fuzzy #~ msgid "Brief Description" #~ msgstr "Mô tả ngắn gá»n:" diff --git a/editor/translations/zh_CN.po b/editor/translations/zh_CN.po index 67f2738f86..e984a05e3a 100644 --- a/editor/translations/zh_CN.po +++ b/editor/translations/zh_CN.po @@ -59,11 +59,12 @@ # king <wangding1992@126.com>, 2019. # silentbird <silentbird520@outlook.com>, 2019. # Haoyu Qiu <timothyqiu32@gmail.com>, 2019, 2020. +# Revan Ji <jiruifancr@gmail.com>, 2020. msgid "" msgstr "" "Project-Id-Version: Chinese (Simplified) (Godot Engine)\n" "POT-Creation-Date: 2018-01-20 12:15+0200\n" -"PO-Revision-Date: 2020-01-27 07:10+0000\n" +"PO-Revision-Date: 2020-02-16 15:21+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" @@ -354,7 +355,7 @@ msgstr "线性" #: editor/animation_track_editor.cpp msgid "Cubic" -msgstr "立方体" +msgstr "三次方" #: editor/animation_track_editor.cpp msgid "Clamp Loop Interp" @@ -732,8 +733,8 @@ msgid "Line Number:" msgstr "行å·:" #: editor/code_editor.cpp -msgid "Replaced %d occurrence(s)." -msgstr "替æ¢äº†%d项。" +msgid "%d replaced." +msgstr "已替æ¢%d处。" #: editor/code_editor.cpp editor/editor_help.cpp msgid "%d match." @@ -1801,7 +1802,7 @@ msgstr "在文件管ç†å™¨ä¸æ˜¾ç¤º" #: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp msgid "New Folder..." -msgstr "新建文件夹 ..." +msgstr "新建文件夹..." #: editor/editor_file_dialog.cpp #: editor/plugins/version_control_editor_plugin.cpp @@ -1814,7 +1815,7 @@ msgstr "所有å¯ç”¨ç±»åž‹" #: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp msgid "All Files (*)" -msgstr "所有文件(*)" +msgstr "所有文件(*)" #: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp msgid "Open a File" @@ -2334,8 +2335,8 @@ msgid "" "Please read the documentation relevant to debugging to better understand " "this workflow." msgstr "" -"è¿™æ˜¯ä¸€ä¸ªè¿œç¨‹å¯¹è±¡ï¼Œå› æ¤ä¸ä¼šä¿ç•™å¯¹å…¶çš„æ›´æ”¹ã€‚ 请阅读与调试相关的文档,以更好地了" -"è§£æ¤å·¥ä½œæµç¨‹ã€‚" +"è¿™æ˜¯è¿œç¨‹å¯¹è±¡ï¼Œå› æ¤ä¸ä¼šä¿ç•™å¯¹å…¶çš„æ›´æ”¹ã€‚\n" +"请阅读与调试相关的文档,以更好地了解æ¤å·¥ä½œæµç¨‹ã€‚" #: editor/editor_node.cpp msgid "There is no defined scene to run." @@ -3131,11 +3132,11 @@ msgstr "æ›´æ–°" #: editor/editor_plugin_settings.cpp editor/plugin_config_dialog.cpp #: editor/plugins/asset_library_editor_plugin.cpp msgid "Version:" -msgstr "版本:" +msgstr "版本:" #: editor/editor_plugin_settings.cpp editor/plugin_config_dialog.cpp msgid "Author:" -msgstr "作者:" +msgstr "作者:" #: editor/editor_plugin_settings.cpp msgid "Status:" @@ -3147,7 +3148,7 @@ msgstr "编辑:" #: editor/editor_profiler.cpp msgid "Measure:" -msgstr "测é‡:" +msgstr "测é‡ï¼š" #: editor/editor_profiler.cpp msgid "Frame Time (sec)" @@ -3207,7 +3208,7 @@ msgstr "[空]" #: editor/editor_properties.cpp editor/plugins/root_motion_editor_plugin.cpp msgid "Assign..." -msgstr "分é…..." +msgstr "指定..." #: editor/editor_properties.cpp msgid "Invalid RID" @@ -3217,7 +3218,7 @@ msgstr "æ— æ•ˆçš„RID" msgid "" "The selected resource (%s) does not match any type expected for this " "property (%s)." -msgstr "被选择的资æºï¼ˆ%s)并ä¸èƒ½åŒ¹é…æ¤å±žæ€§ï¼ˆ%s)应有的类型。" +msgstr "所选资æºï¼ˆ%s)与该属性(%s)所需的类型都ä¸åŒ¹é…。" #: editor/editor_properties.cpp msgid "" @@ -3346,11 +3347,11 @@ msgstr "æµè§ˆ" #: editor/editor_sub_scene.cpp msgid "Scene Path:" -msgstr "场景路径:" +msgstr "场景路径:" #: editor/editor_sub_scene.cpp msgid "Import From Node:" -msgstr "从节点ä¸å¯¼å…¥:" +msgstr "从节点ä¸å¯¼å…¥ï¼š" #: editor/export_template_manager.cpp msgid "Redownload" @@ -3387,7 +3388,7 @@ msgstr "检索镜åƒï¼Œè¯·ç‰å¾…..." #: editor/export_template_manager.cpp msgid "Remove template version '%s'?" -msgstr "移除版本为 '%s' 的模æ¿?" +msgstr "是å¦ç§»é™¤ç‰ˆæœ¬ä¸ºâ€œ%sâ€çš„æ¨¡æ¿ï¼Ÿ" #: editor/export_template_manager.cpp msgid "Can't open export templates zip." @@ -3403,7 +3404,7 @@ msgstr "模æ¿ä¸æ²¡æœ‰æ‰¾åˆ°version.txt文件。" #: editor/export_template_manager.cpp msgid "Error creating path for templates:" -msgstr "åˆ›å»ºæ¨¡æ¿æ–‡ä»¶è·¯å¾„出错:" +msgstr "åˆ›å»ºæ¨¡æ¿æ–‡ä»¶è·¯å¾„出错:" #: editor/export_template_manager.cpp msgid "Extracting Export Templates" @@ -3411,7 +3412,7 @@ msgstr "æ£åœ¨è§£åŽ‹å¯¼å‡ºæ¨¡æ¿" #: editor/export_template_manager.cpp msgid "Importing:" -msgstr "导入:" +msgstr "æ£åœ¨å¯¼å…¥ï¼š" #: editor/export_template_manager.cpp msgid "Error getting the list of mirrors." @@ -3430,7 +3431,7 @@ msgstr "没有找到这个版本的下载链接。直接下载åªé€‚用于æ£å¼ #: editor/export_template_manager.cpp #: editor/plugins/asset_library_editor_plugin.cpp msgid "Can't resolve." -msgstr "æ— æ³•è§£æž." +msgstr "æ— æ³•è§£æžã€‚" #: editor/export_template_manager.cpp #: editor/plugins/asset_library_editor_plugin.cpp @@ -3453,7 +3454,7 @@ msgstr "循环é‡å®šå‘。" #: editor/export_template_manager.cpp #: editor/plugins/asset_library_editor_plugin.cpp msgid "Failed:" -msgstr "失败:" +msgstr "失败:" #: editor/export_template_manager.cpp msgid "Download Complete." @@ -3461,21 +3462,23 @@ msgstr "下载完æˆã€‚" #: editor/export_template_manager.cpp msgid "Cannot remove temporary file:" -msgstr "æ— æ³•ç§»é™¤ä¸´æ—¶æ–‡ä»¶:" +msgstr "æ— æ³•ç§»é™¤ä¸´æ—¶æ–‡ä»¶ï¼š" #: editor/export_template_manager.cpp msgid "" "Templates installation failed.\n" "The problematic templates archives can be found at '%s'." -msgstr "模æ¿å®‰è£…å¤±è´¥ã€‚æœ‰é—®é¢˜çš„æ¨¡æ¿æ–‡æ¡£åœ¨ '%s' 。" +msgstr "" +"模æ¿å®‰è£…失败。\n" +"æœ‰é—®é¢˜çš„æ¨¡æ¿æ–‡æ¡£åœ¨â€œ%sâ€ã€‚" #: editor/export_template_manager.cpp msgid "Error requesting URL:" -msgstr "错误的请求链接:" +msgstr "请求URL时出错:" #: editor/export_template_manager.cpp msgid "Connecting to Mirror..." -msgstr "æ£åœ¨è¿žæŽ¥é•œåƒç½‘站。。" +msgstr "æ£åœ¨è¿žæŽ¥é•œåƒç½‘ç«™..." #: editor/export_template_manager.cpp msgid "Disconnected" @@ -3525,11 +3528,11 @@ msgstr "æ— åŽ‹ç¼©çš„Android Build资æº" #: editor/export_template_manager.cpp msgid "Current Version:" -msgstr "当å‰ç‰ˆæœ¬:" +msgstr "当å‰ç‰ˆæœ¬ï¼š" #: editor/export_template_manager.cpp msgid "Installed Versions:" -msgstr "已安装版本:" +msgstr "已安装版本:" #: editor/export_template_manager.cpp msgid "Install From File" @@ -3565,7 +3568,7 @@ msgstr "æ”¶è—" #: editor/filesystem_dock.cpp msgid "Status: Import of file failed. Please fix file and reimport manually." -msgstr "状æ€: å¯¼å…¥æ–‡ä»¶å¤±è´¥ã€‚è¯·æ‰‹åŠ¨ä¿®å¤æ–‡ä»¶åŽé‡æ–°å¯¼å…¥ã€‚" +msgstr "状æ€ï¼šå¯¼å…¥æ–‡ä»¶å¤±è´¥ã€‚è¯·æ‰‹åŠ¨ä¿®å¤æ–‡ä»¶åŽé‡æ–°å¯¼å…¥ã€‚" #: editor/filesystem_dock.cpp msgid "Cannot move/rename resources root." @@ -3577,15 +3580,15 @@ msgstr "æ— æ³•å°†æ–‡ä»¶å¤¹ç§»åŠ¨åˆ°å…¶è‡ªèº«ã€‚" #: editor/filesystem_dock.cpp msgid "Error moving:" -msgstr "移动出错:" +msgstr "移动出错:" #: editor/filesystem_dock.cpp msgid "Error duplicating:" -msgstr "å¤åˆ¶å‡ºé”™:" +msgstr "å¤åˆ¶å‡ºé”™ï¼š" #: editor/filesystem_dock.cpp msgid "Unable to update dependencies:" -msgstr "æ— æ³•æ›´æ–°ä¾èµ–:" +msgstr "æ— æ³•æ›´æ–°ä¾èµ–:" #: editor/filesystem_dock.cpp editor/scene_tree_editor.cpp msgid "No name provided." @@ -3605,19 +3608,19 @@ msgstr "åç§°åŒ…å«æ— 效å—符。" #: editor/filesystem_dock.cpp msgid "Renaming file:" -msgstr "é‡å‘½å文件:" +msgstr "é‡å‘½å文件:" #: editor/filesystem_dock.cpp msgid "Renaming folder:" -msgstr "é‡å‘½å文件夹:" +msgstr "é‡å‘½å文件夹:" #: editor/filesystem_dock.cpp msgid "Duplicating file:" -msgstr "æ‹·è´æ–‡ä»¶:" +msgstr "æ‹·è´æ–‡ä»¶ï¼š" #: editor/filesystem_dock.cpp msgid "Duplicating folder:" -msgstr "å¤åˆ¶æ–‡ä»¶å¤¹:" +msgstr "å¤åˆ¶æ–‡ä»¶å¤¹ï¼š" #: editor/filesystem_dock.cpp msgid "New Inherited Scene" @@ -3926,6 +3929,11 @@ msgid "Saving..." msgstr "ä¿å˜ä¸..." #: editor/import_dock.cpp +#, fuzzy +msgid "%d Files" +msgstr " 文件" + +#: editor/import_dock.cpp msgid "Set as Default for '%s'" msgstr "设置为“%sâ€çš„默认值" @@ -3934,10 +3942,6 @@ msgid "Clear Default for '%s'" msgstr "清除默认'%s'" #: editor/import_dock.cpp -msgid " Files" -msgstr " 文件" - -#: editor/import_dock.cpp msgid "Import As:" msgstr "导入为:" @@ -5247,22 +5251,22 @@ msgstr "" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp msgid "Lock Selected" -msgstr "é”定选定" +msgstr "é”定所选项" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp msgid "Unlock Selected" -msgstr "è§£é”æ‰€é€‰" +msgstr "è§£é”æ‰€é€‰é¡¹" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp msgid "Group Selected" -msgstr "分组选择" +msgstr "编组所选项" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp msgid "Ungroup Selected" -msgstr "å–æ¶ˆé€‰å®šåˆ†ç»„" +msgstr "解组所选项" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Paste Pose" @@ -5647,7 +5651,7 @@ msgstr "生æˆé¡¶ç‚¹è®¡æ•°:" #: editor/plugins/cpu_particles_2d_editor_plugin.cpp #: editor/plugins/particles_2d_editor_plugin.cpp msgid "Emission Mask" -msgstr "å‘å°„é®ç½©" +msgstr "Emission Mask(å‘射鮿Œ¡)" #: editor/plugins/cpu_particles_2d_editor_plugin.cpp #: editor/plugins/particles_2d_editor_plugin.cpp @@ -5672,7 +5676,7 @@ msgstr "从åƒç´ æ•获" #: editor/plugins/cpu_particles_2d_editor_plugin.cpp #: editor/plugins/particles_2d_editor_plugin.cpp msgid "Emission Colors" -msgstr "å‘光颜色" +msgstr "Emission Colors(å‘射颜色)" #: editor/plugins/cpu_particles_editor_plugin.cpp msgid "CPUParticles" @@ -5785,12 +5789,12 @@ msgid "Mesh is empty!" msgstr "ç½‘æ ¼ä¸ºç©ºï¼" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Trimesh Body" -msgstr "åˆ›å»ºé™æ€ä¸‰ç»´èº«ä½“" +msgid "Couldn't create a Trimesh collision shape." +msgstr "æ— æ³•åˆ›å»ºTrimesh碰撞形状。" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Convex Body" -msgstr "åˆ›å»ºé™æ€å‡¸ä½“(Convex Body)" +msgid "Create Static Trimesh Body" +msgstr "åˆ›å»ºé™æ€ä¸‰ç»´èº«ä½“" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "This doesn't work on scene root!" @@ -5801,12 +5805,28 @@ msgid "Create Trimesh Static Shape" msgstr "åˆ›å»ºä¸‰ç»´ç½‘æ ¼é™æ€å½¢çж" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Failed creating shapes!" -msgstr "创建形状失败ï¼" +msgid "Can't create a single convex collision shape for the scene root." +msgstr "æ— æ³•ä¸ºåœºæ™¯æ ¹èŠ‚ç‚¹åˆ›å»ºå•一凸碰撞形状。" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Couldn't create a single convex collision shape." +msgstr "æ— æ³•åˆ›å»ºå•一凸碰撞形状。" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Single Convex Shape" +msgstr "创建å•一凸形状" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Convex Shape(s)" -msgstr "创建凸形" +msgid "Can't create multiple convex collision shapes for the scene root." +msgstr "æ— æ³•ä¸ºåœºæ™¯æ ¹èŠ‚ç‚¹åˆ›å»ºå¤šä¸ªå‡¸ç¢°æ’žå½¢çŠ¶ã€‚" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Couldn't create any collision shapes." +msgstr "æ— æ³•åˆ›å»ºç¢°æ’žå½¢çŠ¶ã€‚" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Multiple Convex Shapes" +msgstr "创建多个凸形状" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Navigation Mesh" @@ -5857,18 +5877,65 @@ msgid "Create Trimesh Static Body" msgstr "åˆ›å»ºä¸‰è§’ç½‘æ ¼é™æ€å®žä½“" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a StaticBody and assigns a polygon-based collision shape to it " +"automatically.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" +"创建StaticBody并自动为其分é…基于多边形的碰撞形状。\n" +"这是最准确(但是最慢)的碰撞检测手段。" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Trimesh Collision Sibling" msgstr "åˆ›å»ºä¸‰è§’ç½‘æ ¼ç¢°æ’žåŒçº§" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Convex Collision Sibling(s)" -msgstr "创建凸型碰撞åŒçº§" +msgid "" +"Creates a polygon-based collision shape.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" +"创建基于多边形的碰撞形状。\n" +"这是最准确(但是最慢)的碰撞检测手段。" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Single Convex Collision Siblings" +msgstr "创建å•一凸碰撞åŒçº§" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a single convex collision shape.\n" +"This is the fastest (but least accurate) option for collision detection." +msgstr "" +"创建å•一凸碰撞形状。\n" +"这是最快(但是最ä¸ç²¾ç¡®ï¼‰çš„碰撞检测手段。" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Create Multiple Convex Collision Siblings" +msgstr "创建多个凸碰撞åŒçº§" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is a performance middle-ground between the two above options." +msgstr "" +"创建基于多边形的碰撞形状。\n" +"这是性能ä½äºŽä¸Šè¿°ä¸¤ç§ä¹‹é—´çš„碰撞检测手段。" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Outline Mesh..." msgstr "åˆ›å»ºè½®å»“ç½‘æ ¼..." #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a static outline mesh. The outline mesh will have its normals " +"flipped automatically.\n" +"This can be used instead of the SpatialMaterial Grow property when using " +"that property isn't possible." +msgstr "" +"åˆ›å»ºä¸€ä¸ªé™æ€è½®å»“ç½‘æ ¼ã€‚è½®å»“ç½‘æ ¼ä¼šè‡ªåŠ¨ç¿»è½¬æ³•çº¿ã€‚\n" +"å¯ä»¥ç”¨æ¥åœ¨å¿…è¦æ—¶ä»£æ›¿SpatialMaterialçš„Grow属性。" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "View UV1" msgstr "查看UV1" @@ -7839,7 +7906,7 @@ msgstr "å—体" #: editor/plugins/theme_editor_plugin.cpp msgid "Color" -msgstr "颜色" +msgstr "Color(颜色)" #: editor/plugins/theme_editor_plugin.cpp msgid "Theme File" @@ -8260,7 +8327,7 @@ msgstr "图å—集" msgid "No VCS addons are available." msgstr "没有å¯ç”¨çš„VCSæ’件。" -#: editor/plugins/version_control_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/version_control_editor_plugin.cpp msgid "Error" msgstr "错误" @@ -9383,24 +9450,29 @@ msgid "Export With Debug" msgstr "使用调试导出" #: editor/project_manager.cpp -msgid "The path does not exist." -msgstr "该路径ä¸å˜åœ¨ã€‚" +msgid "The path specified doesn't exist." +msgstr "指定的路径ä¸å˜åœ¨ã€‚" + +#: editor/project_manager.cpp +msgid "Error opening package file (it's not in ZIP format)." +msgstr "打开包文件时出错(éžZIPæ ¼å¼ï¼‰ã€‚" #: editor/project_manager.cpp -msgid "Invalid '.zip' project file, does not contain a 'project.godot' file." -msgstr "æ— æ•ˆçš„â€œ.zipâ€é¡¹ç›®æ–‡ä»¶ï¼Œæ²¡æœ‰åŒ…å«ä¸€ä¸ªâ€œproject.godotâ€æ–‡ä»¶ã€‚" +msgid "" +"Invalid \".zip\" project file; it doesn't contain a \"project.godot\" file." +msgstr "æ— æ•ˆçš„â€œ.zipâ€é¡¹ç›®æ–‡ä»¶ï¼›æ²¡æœ‰åŒ…å«â€œproject.godotâ€æ–‡ä»¶ã€‚" #: editor/project_manager.cpp msgid "Please choose an empty folder." msgstr "请选择空文件夹。" #: editor/project_manager.cpp -msgid "Please choose a 'project.godot' or '.zip' file." -msgstr "请选择一个“project.godotâ€æˆ–者“.zipâ€æ–‡ä»¶ã€‚" +msgid "Please choose a \"project.godot\" or \".zip\" file." +msgstr "请选择“project.godotâ€æˆ–“.zipâ€æ–‡ä»¶ã€‚" #: editor/project_manager.cpp -msgid "Directory already contains a Godot project." -msgstr "文件夹已ç»åŒ…å«äº†ä¸€ä¸ªGodot项目。" +msgid "This directory already contains a Godot project." +msgstr "该目录已ç»åŒ…å«Godot项目。" #: editor/project_manager.cpp msgid "New Game Project" @@ -10081,6 +10153,10 @@ msgid "Suffix" msgstr "åŽç¼€" #: editor/rename_dialog.cpp +msgid "Use Regular Expressions" +msgstr "使用æ£åˆ™è¡¨è¾¾å¼" + +#: editor/rename_dialog.cpp msgid "Advanced Options" msgstr "高级选项" @@ -10117,7 +10193,7 @@ msgstr "" "比较计数器的选项。" #: editor/rename_dialog.cpp -msgid "Per Level counter" +msgid "Per-level Counter" msgstr "å„级å•独计数" #: editor/rename_dialog.cpp @@ -10149,10 +10225,6 @@ msgstr "" "缺失的数å—将用0填充在头部。" #: editor/rename_dialog.cpp -msgid "Regular Expressions" -msgstr "æ£åˆ™è¡¨è¾¾å¼" - -#: editor/rename_dialog.cpp msgid "Post-Process" msgstr "åŽæœŸå¤„ç†" @@ -10161,11 +10233,11 @@ msgid "Keep" msgstr "ä¿æŒ" #: editor/rename_dialog.cpp -msgid "CamelCase to under_scored" +msgid "PascalCase to snake_case" msgstr "驼峰å¼è½¬ä¸ºä¸‹åˆ’线å¼" #: editor/rename_dialog.cpp -msgid "under_scored to CamelCase" +msgid "snake_case to PascalCase" msgstr "下划线å¼è½¬ä¸ºé©¼å³°å¼" #: editor/rename_dialog.cpp @@ -10184,6 +10256,14 @@ msgstr "转为大写" msgid "Reset" msgstr "é‡ç½®" +#: editor/rename_dialog.cpp +msgid "Regular Expression Error" +msgstr "æ£åˆ™è¡¨è¾¾å¼å‡ºé”™" + +#: editor/rename_dialog.cpp +msgid "At character %s" +msgstr "ä½äºŽå—符%s" + #: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp msgid "Reparent Node" msgstr "é‡è®¾çˆ¶èŠ‚ç‚¹" @@ -10636,8 +10716,8 @@ msgid "Invalid inherited parent name or path." msgstr "所继承父类的åç§°æˆ–è·¯å¾„æ— æ•ˆã€‚" #: editor/script_create_dialog.cpp -msgid "Script is valid." -msgstr "脚本有效。" +msgid "Script path/name is valid." +msgstr "脚本路径/å称有效。" #: editor/script_create_dialog.cpp msgid "Allowed: a-z, A-Z, 0-9, _ and ." @@ -10728,6 +10808,10 @@ msgid "Copy Error" msgstr "å¤åˆ¶é”™è¯¯ä¿¡æ¯" #: editor/script_editor_debugger.cpp +msgid "Video RAM" +msgstr "显å˜" + +#: editor/script_editor_debugger.cpp msgid "Skip Breakpoints" msgstr "跳过æ–点" @@ -10776,10 +10860,6 @@ msgid "Total:" msgstr "åˆè®¡:" #: editor/script_editor_debugger.cpp -msgid "Video Mem" -msgstr "显å˜" - -#: editor/script_editor_debugger.cpp msgid "Resource Path" msgstr "资æºè·¯å¾„" @@ -12371,6 +12451,15 @@ msgstr "å˜é‡åªèƒ½åœ¨é¡¶ç‚¹å‡½æ•°ä¸æŒ‡å®šã€‚" msgid "Constants cannot be modified." msgstr "ä¸å…许修改常é‡ã€‚" +#~ msgid "Replaced %d occurrence(s)." +#~ msgstr "替æ¢äº†%d项。" + +#~ msgid "Create Static Convex Body" +#~ msgstr "åˆ›å»ºé™æ€å‡¸ä½“(Convex Body)" + +#~ msgid "Failed creating shapes!" +#~ msgstr "创建形状失败ï¼" + #~ msgid "" #~ "There are currently no tutorials for this class, you can [color=$color]" #~ "[url=$url]contribute one[/url][/color] or [color=$color][url=" diff --git a/editor/translations/zh_HK.po b/editor/translations/zh_HK.po index e57c2c0303..23b5c90459 100644 --- a/editor/translations/zh_HK.po +++ b/editor/translations/zh_HK.po @@ -735,8 +735,8 @@ msgstr "行數:" #: editor/code_editor.cpp #, fuzzy -msgid "Replaced %d occurrence(s)." -msgstr "å–代了 %d 個。" +msgid "%d replaced." +msgstr "å–代" #: editor/code_editor.cpp editor/editor_help.cpp msgid "%d match." @@ -4149,6 +4149,11 @@ msgid "Saving..." msgstr "儲å˜ä¸..." #: editor/import_dock.cpp +#, fuzzy +msgid "%d Files" +msgstr "檔案" + +#: editor/import_dock.cpp msgid "Set as Default for '%s'" msgstr "" @@ -4158,11 +4163,6 @@ msgstr "" #: editor/import_dock.cpp #, fuzzy -msgid " Files" -msgstr "檔案" - -#: editor/import_dock.cpp -#, fuzzy msgid "Import As:" msgstr "å°Žå…¥" @@ -6121,11 +6121,12 @@ msgid "Mesh is empty!" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Trimesh Body" -msgstr "" +#, fuzzy +msgid "Couldn't create a Trimesh collision shape." +msgstr "無法新增資料夾" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Convex Body" +msgid "Create Static Trimesh Body" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -6137,12 +6138,30 @@ msgid "Create Trimesh Static Shape" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Failed creating shapes!" +msgid "Can't create a single convex collision shape for the scene root." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Couldn't create a single convex collision shape." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp #, fuzzy -msgid "Create Convex Shape(s)" +msgid "Create Single Convex Shape" +msgstr "新增" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Can't create multiple convex collision shapes for the scene root." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Couldn't create any collision shapes." +msgstr "無法新增資料夾" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Multiple Convex Shapes" msgstr "新增" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -6194,19 +6213,57 @@ msgid "Create Trimesh Static Body" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a StaticBody and assigns a polygon-based collision shape to it " +"automatically.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Trimesh Collision Sibling" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Single Convex Collision Siblings" +msgstr "縮放selection" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a single convex collision shape.\n" +"This is the fastest (but least accurate) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp #, fuzzy -msgid "Create Convex Collision Sibling(s)" +msgid "Create Multiple Convex Collision Siblings" msgstr "縮放selection" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is a performance middle-ground between the two above options." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Outline Mesh..." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a static outline mesh. The outline mesh will have its normals " +"flipped automatically.\n" +"This can be used instead of the SpatialMaterial Grow property when using " +"that property isn't possible." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp #, fuzzy msgid "View UV1" msgstr "檔案" @@ -8740,7 +8797,7 @@ msgstr "TileSet..." msgid "No VCS addons are available." msgstr "" -#: editor/plugins/version_control_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/version_control_editor_plugin.cpp msgid "Error" msgstr "" @@ -9875,11 +9932,16 @@ msgstr "" #: editor/project_manager.cpp #, fuzzy -msgid "The path does not exist." +msgid "The path specified doesn't exist." msgstr "檔案ä¸å˜åœ¨." #: editor/project_manager.cpp -msgid "Invalid '.zip' project file, does not contain a 'project.godot' file." +msgid "Error opening package file (it's not in ZIP format)." +msgstr "" + +#: editor/project_manager.cpp +msgid "" +"Invalid \".zip\" project file; it doesn't contain a \"project.godot\" file." msgstr "" #: editor/project_manager.cpp @@ -9887,11 +9949,11 @@ msgid "Please choose an empty folder." msgstr "" #: editor/project_manager.cpp -msgid "Please choose a 'project.godot' or '.zip' file." +msgid "Please choose a \"project.godot\" or \".zip\" file." msgstr "" #: editor/project_manager.cpp -msgid "Directory already contains a Godot project." +msgid "This directory already contains a Godot project." msgstr "" #: editor/project_manager.cpp @@ -10571,6 +10633,10 @@ msgid "Suffix" msgstr "" #: editor/rename_dialog.cpp +msgid "Use Regular Expressions" +msgstr "" + +#: editor/rename_dialog.cpp #, fuzzy msgid "Advanced Options" msgstr "é¸é …" @@ -10609,7 +10675,7 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -msgid "Per Level counter" +msgid "Per-level Counter" msgstr "" #: editor/rename_dialog.cpp @@ -10639,10 +10705,6 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -msgid "Regular Expressions" -msgstr "" - -#: editor/rename_dialog.cpp msgid "Post-Process" msgstr "" @@ -10651,11 +10713,11 @@ msgid "Keep" msgstr "ä¿ç•™" #: editor/rename_dialog.cpp -msgid "CamelCase to under_scored" +msgid "PascalCase to snake_case" msgstr "" #: editor/rename_dialog.cpp -msgid "under_scored to CamelCase" +msgid "snake_case to PascalCase" msgstr "" #: editor/rename_dialog.cpp @@ -10677,6 +10739,15 @@ msgstr "轉為..." msgid "Reset" msgstr "é‡è¨ç¸®æ”¾æ¯”例" +#: editor/rename_dialog.cpp +msgid "Regular Expression Error" +msgstr "" + +#: editor/rename_dialog.cpp +#, fuzzy +msgid "At character %s" +msgstr "有效å—符:" + #: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp msgid "Reparent Node" msgstr "" @@ -11151,7 +11222,7 @@ msgstr "" #: editor/script_create_dialog.cpp #, fuzzy -msgid "Script is valid." +msgid "Script path/name is valid." msgstr "腳本" #: editor/script_create_dialog.cpp @@ -11258,6 +11329,10 @@ msgid "Copy Error" msgstr "載入錯誤" #: editor/script_editor_debugger.cpp +msgid "Video RAM" +msgstr "" + +#: editor/script_editor_debugger.cpp #, fuzzy msgid "Skip Breakpoints" msgstr "刪除" @@ -11308,10 +11383,6 @@ msgid "Total:" msgstr "" #: editor/script_editor_debugger.cpp -msgid "Video Mem" -msgstr "" - -#: editor/script_editor_debugger.cpp msgid "Resource Path" msgstr "" @@ -12902,6 +12973,10 @@ msgid "Constants cannot be modified." msgstr "" #, fuzzy +#~ msgid "Replaced %d occurrence(s)." +#~ msgstr "å–代了 %d 個。" + +#, fuzzy #~ msgid "Brief Description" #~ msgstr "簡述:" diff --git a/editor/translations/zh_TW.po b/editor/translations/zh_TW.po index 6dfb9304f9..9678b2f8cb 100644 --- a/editor/translations/zh_TW.po +++ b/editor/translations/zh_TW.po @@ -23,7 +23,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2020-01-11 03:05+0000\n" +"PO-Revision-Date: 2020-01-30 03:56+0000\n" "Last-Translator: 鄿ƒŸä¸ <biglionlion06@gmail.com>\n" "Language-Team: Chinese (Traditional) <https://hosted.weblate.org/projects/" "godot-engine/godot/zh_Hant/>\n" @@ -32,7 +32,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 3.10.1\n" +"X-Generator: Weblate 3.11-dev\n" #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/visual_script/visual_script_builtin_funcs.cpp @@ -41,7 +41,7 @@ msgstr "Convert()å‡½æ•¸æ‰€æ”¶åˆ°çš„åƒæ•¸éŒ¯èª¤ï¼Œè«‹ç”¨ TYPE_* 常數。" #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp msgid "Expected a string of length 1 (a character)." -msgstr "應為一個長度是1(一個å—å…ƒ)çš„å—串" +msgstr "應為一個長度是1(一個å—å…ƒ)çš„å—串。" #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/mono/glue/gd_glue.cpp @@ -142,9 +142,8 @@ msgid "Add Bezier Point" msgstr "æ·»åŠ è²å¡žçˆ¾é»ž" #: editor/animation_bezier_editor.cpp -#, fuzzy msgid "Move Bezier Points" -msgstr "移動è²å¡žçˆ¾é»ž" +msgstr "移動Bezier點" #: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp msgid "Anim Duplicate Keys" @@ -333,11 +332,11 @@ msgstr "立方體" #: editor/animation_track_editor.cpp msgid "Clamp Loop Interp" -msgstr "" +msgstr "Clampå¼å…§æ’循環" #: editor/animation_track_editor.cpp msgid "Wrap Loop Interp" -msgstr "" +msgstr "Wrapå¼å…§æ’循環" #: editor/animation_track_editor.cpp #: editor/plugins/canvas_item_editor_plugin.cpp @@ -398,7 +397,7 @@ msgstr "æ’入動畫" #: editor/animation_track_editor.cpp msgid "AnimationPlayer can't animate itself, only other players." -msgstr "" +msgstr "AnimationPlayerä¸èƒ½è¢«è‡ªå·±æ‰€å•Ÿå‹•ï¼Œå¿…é ˆç”±å…¶ä»–player啟動。" #: editor/animation_track_editor.cpp msgid "Anim Create & Insert" @@ -424,7 +423,7 @@ msgstr "釿–°æŽ’列 Autoload" #: editor/animation_track_editor.cpp msgid "Transform tracks only apply to Spatial-based nodes." -msgstr "" +msgstr "Transform軌åªèƒ½æ·»åŠ åœ¨spatial為主的節點。" #: editor/animation_track_editor.cpp msgid "" @@ -452,7 +451,7 @@ msgstr "ç„¡æ³•æ·»åŠ æ²’æœ‰æ ¹ç›®éŒ„çš„æ–°æ›²ç›®" #: editor/animation_track_editor.cpp msgid "Invalid track for Bezier (no suitable sub-properties)" -msgstr "" +msgstr "æ¤è»Œä¸èƒ½ç”¨æ–¼Bezier(å屬性ä¸é©åˆ)" #: editor/animation_track_editor.cpp #, fuzzy @@ -637,9 +636,8 @@ msgid "Use Bezier Curves" msgstr "使用è²å¡žçˆ¾æ›²ç·š" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Anim. Optimizer" -msgstr "å‹•ç•«. 最佳化" +msgstr "動畫最佳化" #: editor/animation_track_editor.cpp msgid "Max. Linear Error:" @@ -734,8 +732,9 @@ msgid "Line Number:" msgstr "行號:" #: editor/code_editor.cpp -msgid "Replaced %d occurrence(s)." -msgstr "å–代了 %d 個。" +#, fuzzy +msgid "%d replaced." +msgstr "替æ›â€¦" #: editor/code_editor.cpp editor/editor_help.cpp #, fuzzy @@ -965,9 +964,8 @@ msgid "Go To Method" msgstr "å‰å¾€æ–¹æ³•" #: editor/create_dialog.cpp -#, fuzzy msgid "Change %s Type" -msgstr "變更 %s 尺寸" +msgstr "變更 %s 種類" #: editor/create_dialog.cpp editor/project_settings_editor.cpp msgid "Change" @@ -1158,7 +1156,6 @@ msgid "Change Dictionary Value" msgstr "改變å—å…¸ value" #: editor/editor_about.cpp -#, fuzzy msgid "Thanks from the Godot community!" msgstr "Godot 社群感è¬ä½ !" @@ -1195,7 +1192,6 @@ msgid "Gold Sponsors" msgstr "黃金贊助" #: editor/editor_about.cpp -#, fuzzy msgid "Mini Sponsors" msgstr "è¿·ä½ è´ŠåŠ©" @@ -1204,12 +1200,10 @@ msgid "Gold Donors" msgstr "黃金æè´ˆè€…" #: editor/editor_about.cpp -#, fuzzy msgid "Silver Donors" msgstr "白銀æè´ˆè€…" #: editor/editor_about.cpp -#, fuzzy msgid "Bronze Donors" msgstr "紅銅æè´ˆè€…" @@ -1292,7 +1286,6 @@ msgid "Install" msgstr "安è£" #: editor/editor_asset_installer.cpp -#, fuzzy msgid "Package Installer" msgstr "套件安è£" @@ -2034,7 +2027,7 @@ msgstr "æŽƒææº" msgid "" "There are multiple importers for different types pointing to file %s, import " "aborted" -msgstr "" +msgstr "å› ç‚ºæœ‰å¤šå€‹ä¸åŒç¨®é¡žimporteræŒ‡å‘æª”案 %s,導入失敗" #: editor/editor_file_system.cpp msgid "(Re)Importing Assets" @@ -2257,8 +2250,9 @@ msgid "Start" msgstr "é–‹å§‹" #: editor/editor_network_profiler.cpp +#, fuzzy msgid "%s/s" -msgstr "" +msgstr "%s/s" #: editor/editor_network_profiler.cpp #, fuzzy @@ -2267,7 +2261,7 @@ msgstr "下載" #: editor/editor_network_profiler.cpp msgid "Up" -msgstr "" +msgstr "上" #: editor/editor_network_profiler.cpp editor/editor_node.cpp #, fuzzy @@ -2276,23 +2270,23 @@ msgstr "節點" #: editor/editor_network_profiler.cpp msgid "Incoming RPC" -msgstr "" +msgstr "進來的Rpc" #: editor/editor_network_profiler.cpp msgid "Incoming RSET" -msgstr "" +msgstr "進來的Rset" #: editor/editor_network_profiler.cpp msgid "Outgoing RPC" -msgstr "" +msgstr "出去的 RPC" #: editor/editor_network_profiler.cpp msgid "Outgoing RSET" -msgstr "" +msgstr "出去的 RSET" #: editor/editor_node.cpp editor/project_manager.cpp msgid "New Window" -msgstr "" +msgstr "新視窗" #: editor/editor_node.cpp msgid "Imported resources can't be saved." @@ -2681,6 +2675,8 @@ msgid "" "You can change it later in \"Project Settings\" under the 'application' " "category." msgstr "" +"鏿“‡å ´æ™¯'%s'ä¸å˜åœ¨ï¼Œé¸æ“‡å¦ä¸€å€‹å ´æ™¯ï¼Ÿ\n" +"ä½ ä¹‹å¾Œå¯ä»¥åœ¨ã€Œæ‡‰ç”¨ç¨‹å¼ã€åˆ†é¡žä¸çš„「專案è¨å®šã€è®Šæ›´é€™è¨å®šã€‚" #: editor/editor_node.cpp msgid "" @@ -2688,6 +2684,8 @@ msgid "" "You can change it later in \"Project Settings\" under the 'application' " "category." msgstr "" +"鏿“‡çš„å ´æ™¯'%s'䏿˜¯ä¸€å€‹å ´æ™¯æª”案,è¦é¸æ“‡å¦ä¸€å€‹å ´æ™¯å—Žï¼Ÿ\n" +"ä½ ä¹‹å¾Œå¯ä»¥åœ¨ã€Œæ‡‰ç”¨ç¨‹å¼ã€åˆ†é¡žä¸çš„「專案è¨å®šã€è®Šæ›´é€™è¨å®šã€‚" #: editor/editor_node.cpp msgid "Save Layout" @@ -2726,7 +2724,7 @@ msgstr "關閉其他é¸é …å¡" #: editor/editor_node.cpp msgid "Close Tabs to the Right" -msgstr "" +msgstr "é—œé–‰å³æ–¹æ‰€æœ‰çš„分é " #: editor/editor_node.cpp #, fuzzy @@ -4126,6 +4124,11 @@ msgid "Saving..." msgstr "儲å˜ä¸â€¦â€¦" #: editor/import_dock.cpp +#, fuzzy +msgid "%d Files" +msgstr " 資料夾" + +#: editor/import_dock.cpp msgid "Set as Default for '%s'" msgstr "è¨å®šç‚ºâ€œ%sâ€çš„é è¨å€¼" @@ -4134,10 +4137,6 @@ msgid "Clear Default for '%s'" msgstr "清除“%sâ€çš„é è¨å€¼" #: editor/import_dock.cpp -msgid " Files" -msgstr " 資料夾" - -#: editor/import_dock.cpp msgid "Import As:" msgstr "導入為:" @@ -6104,12 +6103,13 @@ msgid "Mesh is empty!" msgstr "ç¶²æ ¼æ˜¯ç©ºçš„ï¼" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Trimesh Body" -msgstr "" +#, fuzzy +msgid "Couldn't create a Trimesh collision shape." +msgstr "無法新增資料夾." #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Create Static Convex Body" -msgstr "å‰µå»ºéœæ…‹å‡¸é«”" +msgid "Create Static Trimesh Body" +msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "This doesn't work on scene root!" @@ -6121,12 +6121,30 @@ msgid "Create Trimesh Static Shape" msgstr "å‰µå»ºå‡¸å½¢éœæ…‹é«”" #: editor/plugins/mesh_instance_editor_plugin.cpp -msgid "Failed creating shapes!" +msgid "Can't create a single convex collision shape for the scene root." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Couldn't create a single convex collision shape." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Single Convex Shape" +msgstr "創建凸é¢å½¢ç‹€" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "Can't create multiple convex collision shapes for the scene root." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp #, fuzzy -msgid "Create Convex Shape(s)" +msgid "Couldn't create any collision shapes." +msgstr "無法新增資料夾." + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Multiple Convex Shapes" msgstr "創建凸é¢å½¢ç‹€" #: editor/plugins/mesh_instance_editor_plugin.cpp @@ -6178,19 +6196,57 @@ msgid "Create Trimesh Static Body" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a StaticBody and assigns a polygon-based collision shape to it " +"automatically.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Trimesh Collision Sibling" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is the most accurate (but slowest) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +#, fuzzy +msgid "Create Single Convex Collision Siblings" +msgstr "創建碰撞多邊形" + +#: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a single convex collision shape.\n" +"This is the fastest (but least accurate) option for collision detection." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp #, fuzzy -msgid "Create Convex Collision Sibling(s)" +msgid "Create Multiple Convex Collision Siblings" msgstr "創建碰撞多邊形" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a polygon-based collision shape.\n" +"This is a performance middle-ground between the two above options." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Outline Mesh..." msgstr "å‰µå»ºè¼ªå»“ç¶²æ ¼â€¦" #: editor/plugins/mesh_instance_editor_plugin.cpp +msgid "" +"Creates a static outline mesh. The outline mesh will have its normals " +"flipped automatically.\n" +"This can be used instead of the SpatialMaterial Grow property when using " +"that property isn't possible." +msgstr "" + +#: editor/plugins/mesh_instance_editor_plugin.cpp #, fuzzy msgid "View UV1" msgstr "éŽæ¿¾æª”案..." @@ -8716,7 +8772,7 @@ msgstr "" msgid "No VCS addons are available." msgstr "" -#: editor/plugins/version_control_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/version_control_editor_plugin.cpp msgid "Error" msgstr "" @@ -9848,11 +9904,19 @@ msgid "Export With Debug" msgstr "導出為調試" #: editor/project_manager.cpp -msgid "The path does not exist." +#, fuzzy +msgid "The path specified doesn't exist." msgstr "路徑ä¸å˜åœ¨." #: editor/project_manager.cpp -msgid "Invalid '.zip' project file, does not contain a 'project.godot' file." +#, fuzzy +msgid "Error opening package file (it's not in ZIP format)." +msgstr "é–‹å•Ÿå¥—ä»¶æª”æ¡ˆå‡ºéŒ¯ï¼Œéž zip æ ¼å¼ã€‚" + +#: editor/project_manager.cpp +#, fuzzy +msgid "" +"Invalid \".zip\" project file; it doesn't contain a \"project.godot\" file." msgstr "“.zipâ€é …目檔案無效,ä¸åŒ…å«â€œproject.godotâ€æª”案。" #: editor/project_manager.cpp @@ -9860,11 +9924,13 @@ msgid "Please choose an empty folder." msgstr "è«‹é¸æ“‡ä¸€å€‹ç©ºè³‡æ–™å¤¾ã€‚" #: editor/project_manager.cpp -msgid "Please choose a 'project.godot' or '.zip' file." +#, fuzzy +msgid "Please choose a \"project.godot\" or \".zip\" file." msgstr "è«‹é¸æ“‡â€œproject.godotâ€æˆ–“.zipâ€æª”案。" #: editor/project_manager.cpp -msgid "Directory already contains a Godot project." +#, fuzzy +msgid "This directory already contains a Godot project." msgstr "目錄已包å«ä¸€å€‹godoté …ç›®ã€‚" #: editor/project_manager.cpp @@ -10548,6 +10614,11 @@ msgstr "" #: editor/rename_dialog.cpp #, fuzzy +msgid "Use Regular Expressions" +msgstr "è¨ç½®ç£è²¼å€åŸŸ" + +#: editor/rename_dialog.cpp +#, fuzzy msgid "Advanced Options" msgstr "å¸é™„é¸é …" @@ -10585,7 +10656,7 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -msgid "Per Level counter" +msgid "Per-level Counter" msgstr "" #: editor/rename_dialog.cpp @@ -10616,10 +10687,6 @@ msgid "" msgstr "" #: editor/rename_dialog.cpp -msgid "Regular Expressions" -msgstr "" - -#: editor/rename_dialog.cpp msgid "Post-Process" msgstr "" @@ -10628,11 +10695,11 @@ msgid "Keep" msgstr "" #: editor/rename_dialog.cpp -msgid "CamelCase to under_scored" +msgid "PascalCase to snake_case" msgstr "" #: editor/rename_dialog.cpp -msgid "under_scored to CamelCase" +msgid "snake_case to PascalCase" msgstr "" #: editor/rename_dialog.cpp @@ -10654,6 +10721,15 @@ msgstr "è½‰æ›æˆ..." msgid "Reset" msgstr "é‡è¨ç¸®æ”¾å¤§å°" +#: editor/rename_dialog.cpp +msgid "Regular Expression Error" +msgstr "" + +#: editor/rename_dialog.cpp +#, fuzzy +msgid "At character %s" +msgstr "åˆæ³•å—å…ƒ:" + #: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp msgid "Reparent Node" msgstr "" @@ -11125,7 +11201,7 @@ msgstr "" #: editor/script_create_dialog.cpp #, fuzzy -msgid "Script is valid." +msgid "Script path/name is valid." msgstr "動畫樹有效。" #: editor/script_create_dialog.cpp @@ -11235,6 +11311,11 @@ msgstr "連接..." #: editor/script_editor_debugger.cpp #, fuzzy +msgid "Video RAM" +msgstr "影片記憶體" + +#: editor/script_editor_debugger.cpp +#, fuzzy msgid "Skip Breakpoints" msgstr "刪除" @@ -11286,10 +11367,6 @@ msgid "Total:" msgstr "總計:" #: editor/script_editor_debugger.cpp -msgid "Video Mem" -msgstr "影片記憶體" - -#: editor/script_editor_debugger.cpp msgid "Resource Path" msgstr "資æºè·¯å¾‘" @@ -12904,6 +12981,12 @@ msgstr "" msgid "Constants cannot be modified." msgstr "" +#~ msgid "Replaced %d occurrence(s)." +#~ msgstr "å–代了 %d 個。" + +#~ msgid "Create Static Convex Body" +#~ msgstr "å‰µå»ºéœæ…‹å‡¸é«”" + #~ msgid "" #~ "There are currently no tutorials for this class, you can [color=$color]" #~ "[url=$url]contribute one[/url][/color] or [color=$color][url=" diff --git a/main/main.cpp b/main/main.cpp index 00ce8c6f7b..d8a9cc87a7 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -44,6 +44,7 @@ #include "core/project_settings.h" #include "core/register_core_types.h" #include "core/script_debugger_local.h" +#include "core/script_debugger_remote.h" #include "core/script_language.h" #include "core/translation.h" #include "core/version.h" @@ -58,7 +59,6 @@ #include "main/tests/test_main.h" #include "modules/register_module_types.h" #include "platform/register_platform_apis.h" -#include "scene/debugger/script_debugger_remote.h" #include "scene/main/scene_tree.h" #include "scene/main/viewport.h" #include "scene/register_scene_types.h" @@ -203,6 +203,7 @@ void finalize_physics() { void initialize_navigation_server() { ERR_FAIL_COND(navigation_server != NULL); + navigation_server = NavigationServerManager::new_default_server(); navigation_2d_server = memnew(Navigation2DServer); } @@ -210,6 +211,7 @@ void initialize_navigation_server() { void finalize_navigation_server() { memdelete(navigation_server); navigation_server = NULL; + memdelete(navigation_2d_server); navigation_2d_server = NULL; } @@ -1657,12 +1659,6 @@ bool Main::start() { if (!project_manager && !editor) { // game if (game_path != "" || script != "") { - if (script_debugger && script_debugger->is_remote()) { - ScriptDebuggerRemote *remote_debugger = static_cast<ScriptDebuggerRemote *>(script_debugger); - - remote_debugger->set_scene_tree(sml); - } - //autoload List<PropertyInfo> props; ProjectSettings::get_singleton()->get_property_list(&props); @@ -1719,7 +1715,7 @@ bool Main::start() { ERR_CONTINUE_MSG(obj == NULL, "Cannot instance script for autoload, expected 'Node' inheritance, got: " + String(ibt)); n = Object::cast_to<Node>(obj); - n->set_script(script_res.get_ref_ptr()); + n->set_script(script_res); } ERR_CONTINUE_MSG(!n, "Path in autoload not a node or script: " + path); @@ -1823,7 +1819,7 @@ bool Main::start() { GLOBAL_DEF("display/window/stretch/aspect", "ignore"); ProjectSettings::get_singleton()->set_custom_property_info("display/window/stretch/aspect", PropertyInfo(Variant::STRING, "display/window/stretch/aspect", PROPERTY_HINT_ENUM, "ignore,keep,keep_width,keep_height,expand")); GLOBAL_DEF("display/window/stretch/shrink", 1.0); - ProjectSettings::get_singleton()->set_custom_property_info("display/window/stretch/shrink", PropertyInfo(Variant::REAL, "display/window/stretch/shrink", PROPERTY_HINT_RANGE, "1.0,8.0,0.1")); + ProjectSettings::get_singleton()->set_custom_property_info("display/window/stretch/shrink", PropertyInfo(Variant::FLOAT, "display/window/stretch/shrink", PROPERTY_HINT_RANGE, "1.0,8.0,0.1")); 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("gui/common/snap_controls_to_pixels", true); @@ -2043,9 +2039,9 @@ bool Main::iteration() { break; } - message_queue->flush(); + NavigationServer::get_singleton_mut()->process(frame_slice * time_scale); - NavigationServer::get_singleton_mut()->step(frame_slice * time_scale); + message_queue->flush(); PhysicsServer::get_singleton()->step(frame_slice * time_scale); diff --git a/main/performance.cpp b/main/performance.cpp index d829c6dfdc..c7e3a41aa6 100644 --- a/main/performance.cpp +++ b/main/performance.cpp @@ -49,9 +49,7 @@ void Performance::_bind_methods() { BIND_ENUM_CONSTANT(TIME_PROCESS); BIND_ENUM_CONSTANT(TIME_PHYSICS_PROCESS); BIND_ENUM_CONSTANT(MEMORY_STATIC); - BIND_ENUM_CONSTANT(MEMORY_DYNAMIC); BIND_ENUM_CONSTANT(MEMORY_STATIC_MAX); - BIND_ENUM_CONSTANT(MEMORY_DYNAMIC_MAX); BIND_ENUM_CONSTANT(MEMORY_MESSAGE_BUFFER_MAX); BIND_ENUM_CONSTANT(OBJECT_COUNT); BIND_ENUM_CONSTANT(OBJECT_RESOURCE_COUNT); @@ -95,9 +93,7 @@ String Performance::get_monitor_name(Monitor p_monitor) const { "time/process", "time/physics_process", "memory/static", - "memory/dynamic", "memory/static_max", - "memory/dynamic_max", "memory/msg_buf_max", "object/objects", "object/resources", @@ -133,9 +129,7 @@ float Performance::get_monitor(Monitor p_monitor) const { case TIME_PROCESS: return _process_time; case TIME_PHYSICS_PROCESS: return _physics_process_time; case MEMORY_STATIC: return Memory::get_mem_usage(); - case MEMORY_DYNAMIC: return MemoryPool::total_memory; case MEMORY_STATIC_MAX: return Memory::get_mem_max_usage(); - case MEMORY_DYNAMIC_MAX: return MemoryPool::max_memory; case MEMORY_MESSAGE_BUFFER_MAX: return MessageQueue::get_singleton()->get_max_buffer_usage(); case OBJECT_COUNT: return ObjectDB::get_object_count(); case OBJECT_RESOURCE_COUNT: return ResourceCache::get_cached_resource_count(); @@ -177,8 +171,6 @@ Performance::MonitorType Performance::get_monitor_type(Monitor p_monitor) const MONITOR_TYPE_MEMORY, MONITOR_TYPE_MEMORY, MONITOR_TYPE_MEMORY, - MONITOR_TYPE_MEMORY, - MONITOR_TYPE_MEMORY, MONITOR_TYPE_QUANTITY, MONITOR_TYPE_QUANTITY, MONITOR_TYPE_QUANTITY, diff --git a/main/performance.h b/main/performance.h index 638ddbe993..c0f6044ea0 100644 --- a/main/performance.h +++ b/main/performance.h @@ -55,9 +55,7 @@ public: TIME_PROCESS, TIME_PHYSICS_PROCESS, MEMORY_STATIC, - MEMORY_DYNAMIC, MEMORY_STATIC_MAX, - MEMORY_DYNAMIC_MAX, MEMORY_MESSAGE_BUFFER_MAX, OBJECT_COUNT, OBJECT_RESOURCE_COUNT, diff --git a/main/tests/test_astar.cpp b/main/tests/test_astar.cpp index dee107f0af..e82d885af2 100644 --- a/main/tests/test_astar.cpp +++ b/main/tests/test_astar.cpp @@ -68,7 +68,7 @@ public: bool test_abc() { ABCX abcx; - PoolVector<int> path = abcx.get_id_path(ABCX::A, ABCX::C); + Vector<int> path = abcx.get_id_path(ABCX::A, ABCX::C); bool ok = path.size() == 3; int i = 0; ok = ok && path[i++] == ABCX::A; @@ -79,7 +79,7 @@ bool test_abc() { bool test_abcx() { ABCX abcx; - PoolVector<int> path = abcx.get_id_path(ABCX::X, ABCX::C); + Vector<int> path = abcx.get_id_path(ABCX::X, ABCX::C); bool ok = path.size() == 4; int i = 0; ok = ok && path[i++] == ABCX::X; @@ -304,7 +304,7 @@ bool test_solutions() { for (int u = 0; u < N; u++) for (int v = 0; v < N; v++) if (u != v) { - PoolVector<int> route = a.get_id_path(u, v); + Vector<int> route = a.get_id_path(u, v); if (!Math::is_inf(d[u][v])) { // Reachable if (route.size() == 0) { diff --git a/main/tests/test_gdscript.cpp b/main/tests/test_gdscript.cpp index a2891de8ff..0e7c45f603 100644 --- a/main/tests/test_gdscript.cpp +++ b/main/tests/test_gdscript.cpp @@ -128,7 +128,7 @@ static String _parser_expr(const GDScriptParser::Node *p_expr) { case GDScriptParser::OperatorNode::OP_PARENT_CALL: txt += "."; - FALLTHROUGH; + [[fallthrough]]; case GDScriptParser::OperatorNode::OP_CALL: { ERR_FAIL_COND_V(c_node->arguments.size() < 1, ""); diff --git a/main/tests/test_math.cpp b/main/tests/test_math.cpp index 2c4ba08c6d..d91503501d 100644 --- a/main/tests/test_math.cpp +++ b/main/tests/test_math.cpp @@ -451,34 +451,26 @@ MainLoop *test() { print_line("RGBE: " + Color(rd, gd, bd)); } - print_line("Dvectors: " + itos(MemoryPool::allocs_used)); - print_line("Mem used: " + itos(MemoryPool::total_memory)); - print_line("MAx mem used: " + itos(MemoryPool::max_memory)); - - PoolVector<int> ints; + Vector<int> ints; ints.resize(20); { - PoolVector<int>::Write w; - w = ints.write(); + int *w; + w = ints.ptrw(); for (int i = 0; i < ints.size(); i++) { w[i] = i; } } - PoolVector<int> posho = ints; + Vector<int> posho = ints; { - PoolVector<int>::Read r = posho.read(); + const int *r = posho.ptr(); for (int i = 0; i < posho.size(); i++) { print_line(itos(i) + " : " + itos(r[i])); } } - print_line("later Dvectors: " + itos(MemoryPool::allocs_used)); - print_line("later Mem used: " + itos(MemoryPool::total_memory)); - print_line("Mlater Ax mem used: " + itos(MemoryPool::max_memory)); - List<String> cmdlargs = OS::get_singleton()->get_cmdline_args(); if (cmdlargs.empty()) { diff --git a/main/tests/test_physics.cpp b/main/tests/test_physics.cpp index 3f4f91f8f4..43958a9493 100644 --- a/main/tests/test_physics.cpp +++ b/main/tests/test_physics.cpp @@ -143,7 +143,7 @@ protected: /* BOX SHAPE */ - PoolVector<Plane> box_planes = Geometry::build_box_planes(Vector3(0.5, 0.5, 0.5)); + Vector<Plane> box_planes = Geometry::build_box_planes(Vector3(0.5, 0.5, 0.5)); RID box_mesh = vs->mesh_create(); Geometry::MeshData box_data = Geometry::build_convex_mesh(box_planes); vs->mesh_add_surface_from_mesh_data(box_mesh, box_data); @@ -155,7 +155,7 @@ protected: /* CAPSULE SHAPE */ - PoolVector<Plane> capsule_planes = Geometry::build_capsule_planes(0.5, 0.7, 12, Vector3::AXIS_Z); + Vector<Plane> capsule_planes = Geometry::build_capsule_planes(0.5, 0.7, 12, Vector3::AXIS_Z); RID capsule_mesh = vs->mesh_create(); Geometry::MeshData capsule_data = Geometry::build_convex_mesh(capsule_planes); @@ -172,7 +172,7 @@ protected: /* CONVEX SHAPE */ - PoolVector<Plane> convex_planes = Geometry::build_cylinder_planes(0.5, 0.7, 5, Vector3::AXIS_Z); + Vector<Plane> convex_planes = Geometry::build_cylinder_planes(0.5, 0.7, 5, Vector3::AXIS_Z); RID convex_mesh = vs->mesh_create(); Geometry::MeshData convex_data = Geometry::build_convex_mesh(convex_planes); @@ -363,7 +363,7 @@ public: VisualServer *vs = VisualServer::get_singleton(); PhysicsServer *ps = PhysicsServer::get_singleton(); - PoolVector<Plane> capsule_planes = Geometry::build_capsule_planes(0.5, 1, 12, 5, Vector3::AXIS_Y); + Vector<Plane> capsule_planes = Geometry::build_capsule_planes(0.5, 1, 12, 5, Vector3::AXIS_Y); RID capsule_mesh = vs->mesh_create(); Geometry::MeshData capsule_data = Geometry::build_convex_mesh(capsule_planes); diff --git a/main/tests/test_physics_2d.cpp b/main/tests/test_physics_2d.cpp index 9c10fcbd56..160c25f43a 100644 --- a/main/tests/test_physics_2d.cpp +++ b/main/tests/test_physics_2d.cpp @@ -72,7 +72,7 @@ class TestPhysics2DMainLoop : public MainLoop { { - PoolVector<uint8_t> pixels; + Vector<uint8_t> pixels; pixels.resize(32 * 2 * 2); for (int i = 0; i < 2; i++) { @@ -97,7 +97,7 @@ class TestPhysics2DMainLoop : public MainLoop { { - PoolVector<uint8_t> pixels; + Vector<uint8_t> pixels; pixels.resize(32 * 32 * 2); for (int i = 0; i < 32; i++) { @@ -124,7 +124,7 @@ class TestPhysics2DMainLoop : public MainLoop { { - PoolVector<uint8_t> pixels; + Vector<uint8_t> pixels; pixels.resize(32 * 32 * 2); for (int i = 0; i < 32; i++) { @@ -151,7 +151,7 @@ class TestPhysics2DMainLoop : public MainLoop { { - PoolVector<uint8_t> pixels; + Vector<uint8_t> pixels; pixels.resize(32 * 64 * 2); for (int i = 0; i < 64; i++) { @@ -185,7 +185,7 @@ class TestPhysics2DMainLoop : public MainLoop { RID convex_polygon_shape = ps->convex_polygon_shape_create(); - PoolVector<Vector2> arr; + Vector<Vector2> arr; Point2 sb(32, 32); arr.push_back(Point2(20, 3) - sb); arr.push_back(Point2(58, 23) - sb); diff --git a/main/tests/test_render.cpp b/main/tests/test_render.cpp index 0e101fb566..62239a5cb5 100644 --- a/main/tests/test_render.cpp +++ b/main/tests/test_render.cpp @@ -81,7 +81,7 @@ public: Vector<Vector3> vts; /* - PoolVector<Plane> sp = Geometry::build_sphere_planes(2,5,5); + Vector<Plane> sp = Geometry::build_sphere_planes(2,5,5); Geometry::MeshData md2 = Geometry::build_convex_mesh(sp); vts=md2.vertices; */ diff --git a/main/tests/test_shader_lang.cpp b/main/tests/test_shader_lang.cpp index 1e0f3c6425..941a6771bf 100644 --- a/main/tests/test_shader_lang.cpp +++ b/main/tests/test_shader_lang.cpp @@ -207,6 +207,9 @@ static String dump_node_code(SL::Node *p_node, int p_level) { case SL::Node::TYPE_ARRAY_DECLARATION: { // FIXME: Implement } break; + case SL::Node::TYPE_ARRAY_CONSTRUCT: { + // FIXME: Implement + } break; case SL::Node::TYPE_CONSTANT: { SL::ConstantNode *cnode = (SL::ConstantNode *)p_node; return get_constant_text(cnode->datatype, cnode->values); diff --git a/methods.py b/methods.py index f6c9e939c6..3f03e6bbd2 100644 --- a/methods.py +++ b/methods.py @@ -549,15 +549,27 @@ def detect_darwin_sdk_path(platform, env): print("Failed to find SDK path while running xcrun --sdk {} --show-sdk-path.".format(sdk_name)) raise +def is_vanilla_clang(env): + if not using_clang(env): + return False + version = decode_utf8(subprocess.check_output([env['CXX'], '--version']).strip()) + return not version.startswith("Apple") + + def get_compiler_version(env): - # Not using this method on clang because it returns 4.2.1 # https://reviews.llvm.org/D56803 - if using_gcc(env): - version = decode_utf8(subprocess.check_output([env['CXX'], '-dumpversion']).strip()) - else: + """ + Returns an array of version numbers as ints: [major, minor, patch]. + The return array should have at least two values (major, minor). + """ + if not env.msvc: + # Not using -dumpversion as some GCC distros only return major, and + # Clang used to return hardcoded 4.2.1: # https://reviews.llvm.org/D56803 version = decode_utf8(subprocess.check_output([env['CXX'], '--version']).strip()) - match = re.search('[0-9][0-9.]*', version) + else: # TODO: Implement for MSVC + return None + match = re.search('[0-9]+\.[0-9.]+', version) if match is not None: - return match.group().split('.') + return list(map(int, match.group().split('.'))) else: return None diff --git a/misc/dist/osx_template.app/Contents/Info.plist b/misc/dist/osx_template.app/Contents/Info.plist index 696c825594..3b765e6bb8 100755 --- a/misc/dist/osx_template.app/Contents/Info.plist +++ b/misc/dist/osx_template.app/Contents/Info.plist @@ -31,13 +31,13 @@ <key>NSHumanReadableCopyright</key> <string>$copyright</string> <key>LSMinimumSystemVersion</key> - <string>10.9.0</string> + <string>10.12.0</string> <key>LSMinimumSystemVersionByArchitecture</key> <dict> <key>x86_64</key> - <string>10.9.0</string> + <string>10.12.0</string> </dict> <key>NSHighResolutionCapable</key> $highres </dict> -</plist>
\ No newline at end of file +</plist> diff --git a/misc/dist/osx_tools.app/Contents/Info.plist b/misc/dist/osx_tools.app/Contents/Info.plist index 46550ba6c7..c519a232c4 100755 --- a/misc/dist/osx_tools.app/Contents/Info.plist +++ b/misc/dist/osx_tools.app/Contents/Info.plist @@ -33,11 +33,11 @@ <key>NSHumanReadableCopyright</key> <string>© 2007-2020 Juan Linietsky, Ariel Manzur & Godot Engine contributors</string> <key>LSMinimumSystemVersion</key> - <string>10.9.0</string> + <string>10.12.0</string> <key>LSMinimumSystemVersionByArchitecture</key> <dict> <key>x86_64</key> - <string>10.9.0</string> + <string>10.12.0</string> </dict> <key>NSHighResolutionCapable</key> <true/> diff --git a/misc/dist/shell/godot.fish b/misc/dist/shell/godot.fish new file mode 100644 index 0000000000..3cffcfa3b8 --- /dev/null +++ b/misc/dist/shell/godot.fish @@ -0,0 +1,91 @@ +# Fish completion for the Godot editor +# To use it, install this file in `~/.config/fish/completions` then restart your shell. +# You can also `source` this file directly in your shell startup file. +# +# Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. +# Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +function godot_video_driver_args + # Use a function instead of a fixed string to customize the argument descriptions. + echo -e "Vulkan\tVulkan renderer" + echo -e "GLES2\tOpenGL ES 2.0 renderer" +end + +# Erase existing completions for Godot. +complete -c godot -e + +# General options: +complete -c godot -s h -l help -d "Display the full help message" +complete -c godot -l version -d "Display the version string" +complete -c godot -s v -l verbose -d "Use verbose stdout mode" +complete -c godot -l quiet -d "Quiet mode, silences stdout messages (errors are still displayed)" + +# Run options: +complete -c godot -s e -l editor -d "Start the editor instead of running the scene" +complete -c godot -s p -l project-manager -d "Start the project manager, even if a project is auto-detected" +complete -c godot -s q -l quit -d "Quit after the first iteration" +complete -c godot -s l -l language -d "Use a specific locale (<locale> being a two-letter code)" -x +complete -c godot -l path -d "Path to a project (<directory> must contain a 'project.godot' file)" -r +complete -c godot -s u -l upwards -d "Scan folders upwards for project.godot file" +complete -c godot -l main-pack -d "Path to a pack (.pck) file to load" -r +complete -c godot -l render-thread -d "Set the render thread mode" -x -a "unsafe safe separate" +complete -c godot -l remote-fs -d "Use a remote filesystem (<host/IP>[:<port>] address)" -x +complete -c godot -l remote-fs-password -d "Password for remote filesystem" -x +complete -c godot -l audio-driver -d "Set the audio driver" -x +complete -c godot -l video-driver -d "Set the video driver" -x -a "(godot_video_driver_args)" + +# Display options: +complete -c godot -s f -l fullscreen -d "Request fullscreen mode" +complete -c godot -s m -l maximized -d "Request a maximized window" +complete -c godot -s w -l windowed -d "Request windowed mode" +complete -c godot -s t -l always-on-top -d "Request an always-on-top window" +complete -c godot -l resolution -d "Request window resolution" -x +complete -c godot -l position -d "Request window position" -x +complete -c godot -l low-dpi -d "Force low-DPI mode (macOS and Windows only)" +complete -c godot -l no-window -d "Disable window creation (Windows only), useful together with --script" +complete -c godot -l enable-vsync-via-compositor -d "When Vsync is enabled, Vsync via the OS' window compositor (Windows only)" +complete -c godot -l disable-vsync-via-compositor -d "Disable Vsync via the OS' window compositor (Windows only)" + +# Debug options: +complete -c godot -s d -l debug -d "Debug (local stdout debugger)" +complete -c godot -s b -l breakpoints -d "Specify the breakpoint list as source::line comma-separated pairs, no spaces (use %20 instead)" -x +complete -c godot -l profiling -d "Enable profiling in the script debugger" +complete -c godot -l remote-debug -d "Enable remote debugging" +complete -c godot -l debug-collisions -d "Show collision shapes when running the scene" +complete -c godot -l debug-navigation -d "Show navigation polygons when running the scene" +complete -c godot -l frame-delay -d "Simulate high CPU load (delay each frame by the given number of milliseconds)" -x +complete -c godot -l time-scale -d "Force time scale (higher values are faster, 1.0 is normal speed)" -x +complete -c godot -l disable-render-loop -d "Disable render loop so rendering only occurs when called explicitly from script" +complete -c godot -l disable-crash-handler -d "Disable crash handler when supported by the platform code" +complete -c godot -l fixed-fps -d "Force a fixed number of frames per second (this setting disables real-time synchronization)" -x +complete -c godot -l print-fps -d "Print the frames per second to the stdout" + +# Standalone tools: +complete -c godot -s s -l script -d "Run a script" -r +complete -c godot -l check-only -d "Only parse for errors and quit (use with --script)" +complete -c godot -l export -d "Export the project using the given preset and matching release template" -x +complete -c godot -l export-debug -d "Same as --export, but using the debug template" -x +complete -c godot -l export-pack -d "Same as --export, but only export the game pack for the given preset" -x +complete -c godot -l doctool -d "Dump the engine API reference to the given path in XML format, merging if existing files are found" -r +complete -c godot -l no-docbase -d "Disallow dumping the base types (used with --doctool)" +complete -c godot -l build-solutions -d "Build the scripting solutions (e.g. for C# projects)" +complete -c godot -l gdnative-generate-json-api -d "Generate JSON dump of the Godot API for GDNative bindings" +complete -c godot -l test -d "Run a unit test" -x diff --git a/misc/travis/clang-format.sh b/misc/travis/clang-format.sh index 097b2a9378..a6585578e1 100755 --- a/misc/travis/clang-format.sh +++ b/misc/travis/clang-format.sh @@ -3,11 +3,17 @@ CLANG_FORMAT=clang-format-8 if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then - # Check the whole commit range against $TRAVIS_BRANCH, the base merge branch - # We could use $TRAVIS_COMMIT_RANGE but it doesn't play well with force pushes - RANGE="$(git rev-parse $TRAVIS_BRANCH) HEAD" + # Travis only clones the PR branch and uses its HEAD commit as detached HEAD, + # so it's problematic when we want an exact commit range for format checks. + # We fetch upstream to ensure that we have the proper references to resolve. + # Ideally we would use $TRAVIS_COMMIT_RANGE but it doesn't play well with PR + # updates, as it only includes changes since the previous state of the PR. + git remote add upstream https://github.com/godotengine/godot \ + --no-tags -f -t $TRAVIS_BRANCH + RANGE="upstream/$TRAVIS_BRANCH HEAD" else - # Test only the last commit + # Test only the last commit, since $TRAVIS_COMMIT_RANGE wouldn't support + # force pushes. RANGE=HEAD fi diff --git a/modules/arkit/arkit_interface.h b/modules/arkit/arkit_interface.h index cb18350409..4f8f726816 100644 --- a/modules/arkit/arkit_interface.h +++ b/modules/arkit/arkit_interface.h @@ -62,7 +62,7 @@ private: Ref<CameraFeed> feed; int image_width[2]; int image_height[2]; - PoolVector<uint8_t> img_data[2]; + Vector<uint8_t> img_data[2]; struct anchor_map { ARVRPositionalTracker *tracker; diff --git a/modules/arkit/arkit_interface.mm b/modules/arkit/arkit_interface.mm index 1896a34e46..39447e8dab 100644 --- a/modules/arkit/arkit_interface.mm +++ b/modules/arkit/arkit_interface.mm @@ -488,7 +488,7 @@ void ARKitInterface::process() { img_data[0].resize(new_width * new_height); } - PoolVector<uint8_t>::Write w = img_data[0].write(); + uint8_t *w = img_data[0].write(); if (new_width == bytes_per_row) { memcpy(w.ptr(), dataY, new_width * new_height); } else { @@ -519,7 +519,7 @@ void ARKitInterface::process() { img_data[1].resize(2 * new_width * new_height); } - PoolVector<uint8_t>::Write w = img_data[1].write(); + uint8_t *w = img_data[1].write(); if ((2 * new_width) == bytes_per_row) { memcpy(w.ptr(), dataCbCr, 2 * new_width * new_height); } else { diff --git a/modules/assimp/editor_scene_importer_assimp.cpp b/modules/assimp/editor_scene_importer_assimp.cpp index 2e653f4c5d..1881d0db33 100644 --- a/modules/assimp/editor_scene_importer_assimp.cpp +++ b/modules/assimp/editor_scene_importer_assimp.cpp @@ -1217,17 +1217,17 @@ EditorSceneImporterAssimp::_generate_mesh_from_surface_indices(ImportState &stat const size_t num_vertices = ai_mesh->mAnimMeshes[j]->mNumVertices; array_copy[Mesh::ARRAY_INDEX] = Variant(); if (ai_mesh->mAnimMeshes[j]->HasPositions()) { - PoolVector3Array vertices; + PackedVector3Array vertices; vertices.resize(num_vertices); for (size_t l = 0; l < num_vertices; l++) { const aiVector3D ai_pos = ai_mesh->mAnimMeshes[j]->mVertices[l]; Vector3 position = Vector3(ai_pos.x, ai_pos.y, ai_pos.z); - vertices.write()[l] = position; + vertices.ptrw()[l] = position; } - PoolVector3Array new_vertices = array_copy[VisualServer::ARRAY_VERTEX].duplicate(true); + PackedVector3Array new_vertices = array_copy[VisualServer::ARRAY_VERTEX].duplicate(true); ERR_CONTINUE(vertices.size() != new_vertices.size()); for (int32_t l = 0; l < new_vertices.size(); l++) { - PoolVector3Array::Write w = new_vertices.write(); + Vector3 *w = new_vertices.ptrw(); w[l] = vertices[l]; } array_copy[VisualServer::ARRAY_VERTEX] = new_vertices; @@ -1235,53 +1235,53 @@ EditorSceneImporterAssimp::_generate_mesh_from_surface_indices(ImportState &stat int32_t color_set = 0; if (ai_mesh->mAnimMeshes[j]->HasVertexColors(color_set)) { - PoolColorArray colors; + PackedColorArray colors; colors.resize(num_vertices); for (size_t l = 0; l < num_vertices; l++) { const aiColor4D ai_color = ai_mesh->mAnimMeshes[j]->mColors[color_set][l]; Color color = Color(ai_color.r, ai_color.g, ai_color.b, ai_color.a); - colors.write()[l] = color; + colors.ptrw()[l] = color; } - PoolColorArray new_colors = array_copy[VisualServer::ARRAY_COLOR].duplicate(true); + PackedColorArray new_colors = array_copy[VisualServer::ARRAY_COLOR].duplicate(true); ERR_CONTINUE(colors.size() != new_colors.size()); for (int32_t l = 0; l < colors.size(); l++) { - PoolColorArray::Write w = new_colors.write(); + Color *w = new_colors.ptrw(); w[l] = colors[l]; } array_copy[VisualServer::ARRAY_COLOR] = new_colors; } if (ai_mesh->mAnimMeshes[j]->HasNormals()) { - PoolVector3Array normals; + PackedVector3Array normals; normals.resize(num_vertices); for (size_t l = 0; l < num_vertices; l++) { const aiVector3D ai_normal = ai_mesh->mAnimMeshes[j]->mNormals[l]; Vector3 normal = Vector3(ai_normal.x, ai_normal.y, ai_normal.z); - normals.write()[l] = normal; + normals.ptrw()[l] = normal; } - PoolVector3Array new_normals = array_copy[VisualServer::ARRAY_NORMAL].duplicate(true); + PackedVector3Array new_normals = array_copy[VisualServer::ARRAY_NORMAL].duplicate(true); ERR_CONTINUE(normals.size() != new_normals.size()); for (int l = 0; l < normals.size(); l++) { - PoolVector3Array::Write w = new_normals.write(); + Vector3 *w = new_normals.ptrw(); w[l] = normals[l]; } array_copy[VisualServer::ARRAY_NORMAL] = new_normals; } if (ai_mesh->mAnimMeshes[j]->HasTangentsAndBitangents()) { - PoolColorArray tangents; + PackedColorArray tangents; tangents.resize(num_vertices); - PoolColorArray::Write w = tangents.write(); + Color *w = tangents.ptrw(); for (size_t l = 0; l < num_vertices; l++) { AssimpUtils::calc_tangent_from_mesh(ai_mesh, j, l, l, w); } - PoolRealArray new_tangents = array_copy[VisualServer::ARRAY_TANGENT].duplicate(true); + PackedFloat32Array new_tangents = array_copy[VisualServer::ARRAY_TANGENT].duplicate(true); ERR_CONTINUE(new_tangents.size() != tangents.size() * 4); for (int32_t l = 0; l < tangents.size(); l++) { - new_tangents.write()[l + 0] = tangents[l].r; - new_tangents.write()[l + 1] = tangents[l].g; - new_tangents.write()[l + 2] = tangents[l].b; - new_tangents.write()[l + 3] = tangents[l].a; + new_tangents.ptrw()[l + 0] = tangents[l].r; + new_tangents.ptrw()[l + 1] = tangents[l].g; + new_tangents.ptrw()[l + 2] = tangents[l].b; + new_tangents.ptrw()[l + 3] = tangents[l].a; } array_copy[VisualServer::ARRAY_TANGENT] = new_tangents; } diff --git a/modules/assimp/import_utils.h b/modules/assimp/import_utils.h index 0eb055956b..80b67b5453 100644 --- a/modules/assimp/import_utils.h +++ b/modules/assimp/import_utils.h @@ -98,7 +98,7 @@ public: /** * calculate tangents for mesh data from assimp data */ - static void calc_tangent_from_mesh(const aiMesh *ai_mesh, int i, int tri_index, int index, PoolColorArray::Write &w) { + static void calc_tangent_from_mesh(const aiMesh *ai_mesh, int i, int tri_index, int index, Color *w) { const aiVector3D normals = ai_mesh->mAnimMeshes[i]->mNormals[tri_index]; const Vector3 godot_normal = Vector3(normals.x, normals.y, normals.z); const aiVector3D tangent = ai_mesh->mAnimMeshes[i]->mTangents[tri_index]; @@ -320,10 +320,10 @@ public: static void set_texture_mapping_mode(aiTextureMapMode *map_mode, Ref<ImageTexture> texture) { ERR_FAIL_COND(texture.is_null()); ERR_FAIL_COND(map_mode == NULL); - aiTextureMapMode tex_mode = map_mode[0]; - // FIXME: Commented out during Vulkan port. /* + aiTextureMapMode tex_mode = map_mode[0]; + int32_t flags = Texture2D::FLAGS_DEFAULT; if (tex_mode == aiTextureMapMode_Wrap) { //Default @@ -375,17 +375,17 @@ public: } else { Ref<Image> img; img.instance(); - PoolByteArray arr; + PackedByteArray arr; uint32_t size = tex->mWidth * tex->mHeight; arr.resize(size); - memcpy(arr.write().ptr(), tex->pcData, size); + memcpy(arr.ptrw(), tex->pcData, size); ERR_FAIL_COND_V(arr.size() % 4 != 0, Ref<Image>()); //ARGB8888 to RGBA8888 for (int32_t i = 0; i < arr.size() / 4; i++) { - arr.write().ptr()[(4 * i) + 3] = arr[(4 * i) + 0]; - arr.write().ptr()[(4 * i) + 0] = arr[(4 * i) + 1]; - arr.write().ptr()[(4 * i) + 1] = arr[(4 * i) + 2]; - arr.write().ptr()[(4 * i) + 2] = arr[(4 * i) + 3]; + arr.ptrw()[(4 * i) + 3] = arr[(4 * i) + 0]; + arr.ptrw()[(4 * i) + 0] = arr[(4 * i) + 1]; + arr.ptrw()[(4 * i) + 1] = arr[(4 * i) + 2]; + arr.ptrw()[(4 * i) + 2] = arr[(4 * i) + 3]; } img->create(tex->mWidth, tex->mHeight, true, Image::FORMAT_RGBA8, arr); ERR_FAIL_COND_V(img.is_null(), Ref<Image>()); diff --git a/modules/basis_universal/SCsub b/modules/basis_universal/SCsub index 3e179762a5..d7342358d7 100644 --- a/modules/basis_universal/SCsub +++ b/modules/basis_universal/SCsub @@ -28,7 +28,11 @@ tool_sources = [ tool_sources = [thirdparty_dir + file for file in tool_sources] transcoder_sources = [thirdparty_dir + "transcoder/basisu_transcoder.cpp"] -env_basisu.Append(CPPPATH=[thirdparty_dir, thirdparty_dir + "transcoder"]) +# Treat Basis headers as system headers to avoid raising warnings. Not supported on MSVC. +if not env.msvc: + env_basisu.Append(CPPFLAGS=['-isystem', Dir(thirdparty_dir).path, '-isystem', Dir(thirdparty_dir + "transcoder").path]) +else: + env_basisu.Prepend(CPPPATH=[thirdparty_dir, thirdparty_dir + "transcoder"]) if env['target'] == "debug": env_basisu.Append(CPPFLAGS=["-DBASISU_DEVEL_MESSAGES=1", "-DBASISD_ENABLE_DEBUG_FLAGS=1"]) diff --git a/modules/basis_universal/register_types.cpp b/modules/basis_universal/register_types.cpp index 4071f3477a..062b5b59f8 100644 --- a/modules/basis_universal/register_types.cpp +++ b/modules/basis_universal/register_types.cpp @@ -52,11 +52,10 @@ enum BasisDecompressFormat { basist::etc1_global_selector_codebook *sel_codebook = nullptr; -static PoolVector<uint8_t> basis_universal_packer(const Ref<Image> &p_image, Image::UsedChannels p_channels) { - - PoolVector<uint8_t> budata; - #ifdef TOOLS_ENABLED +static Vector<uint8_t> basis_universal_packer(const Ref<Image> &p_image, Image::UsedChannels p_channels) { + + Vector<uint8_t> budata; { Ref<Image> image = p_image->duplicate(); @@ -74,10 +73,10 @@ static PoolVector<uint8_t> basis_universal_packer(const Ref<Image> &p_image, Ima basisu::image buimg(image->get_width(), image->get_height()); { - PoolVector<uint8_t> vec = image->get_data(); - PoolVector<uint8_t>::Read r = vec.read(); + Vector<uint8_t> vec = image->get_data(); + const uint8_t *r = vec.ptr(); - memcpy(buimg.get_ptr(), r.ptr(), vec.size()); + memcpy(buimg.get_ptr(), r, vec.size()); } //image->save_png("pepeche.png"); @@ -91,7 +90,7 @@ static PoolVector<uint8_t> basis_universal_packer(const Ref<Image> &p_image, Ima //params.m_quality_level = 0; //params.m_disable_hierarchical_endpoint_codebooks = true; //params.m_no_selector_rdo = true; - params.m_no_auto_global_sel_pal = true; + params.m_auto_global_sel_pal = false; basisu::job_pool jpool(OS::get_singleton()->get_processor_count()); params.m_pJob_pool = &jpool; @@ -117,14 +116,10 @@ static PoolVector<uint8_t> basis_universal_packer(const Ref<Image> &p_image, Ima #ifdef USE_RG_AS_RGBA image->convert_rg_to_ra_rgba8(); decompress_format = BASIS_DECOMPRESS_RG_AS_RA; - #else - params.m_seperate_rg_to_color_alpha = true; decompress_format = BASIS_DECOMPRESS_RG; - #endif - } break; case Image::USED_CHANNELS_RGB: { decompress_format = BASIS_DECOMPRESS_RGB; @@ -145,22 +140,22 @@ static PoolVector<uint8_t> basis_universal_packer(const Ref<Image> &p_image, Ima budata.resize(buvec.size() + 4); { - PoolVector<uint8_t>::Write w = budata.write(); - uint32_t *decf = (uint32_t *)w.ptr(); + uint8_t *w = budata.ptrw(); + uint32_t *decf = (uint32_t *)w; *decf = decompress_format; - memcpy(w.ptr() + 4, &buvec[0], buvec.size()); + memcpy(w + 4, &buvec[0], buvec.size()); } } -#endif return budata; } +#endif // TOOLS_ENABLED -static Ref<Image> basis_universal_unpacker(const PoolVector<uint8_t> &p_buffer) { +static Ref<Image> basis_universal_unpacker(const Vector<uint8_t> &p_buffer) { Ref<Image> image; - PoolVector<uint8_t>::Read r = p_buffer.read(); - const uint8_t *ptr = r.ptr(); + const uint8_t *r = p_buffer.ptr(); + const uint8_t *ptr = r; int size = p_buffer.size(); basist::transcoder_texture_format format; @@ -170,13 +165,13 @@ static Ref<Image> basis_universal_unpacker(const PoolVector<uint8_t> &p_buffer) case BASIS_DECOMPRESS_RG: { if (VS::get_singleton()->has_os_feature("rgtc")) { - format = basist::cTFBC5; // get this from renderer + format = basist::transcoder_texture_format::cTFBC5; // get this from renderer imgfmt = Image::FORMAT_RGTC_RG; } else if (VS::get_singleton()->has_os_feature("etc2")) { //unfortunately, basis universal does not support // ERR_FAIL_V(image); //unimplemented here - //format = basist::cTFETC1; // get this from renderer + //format = basist::transcoder_texture_format::cTFETC1; // get this from renderer //imgfmt = Image::FORMAT_RGTC_RG; } else { //decompress @@ -184,47 +179,47 @@ static Ref<Image> basis_universal_unpacker(const PoolVector<uint8_t> &p_buffer) } break; case BASIS_DECOMPRESS_RGB: { if (VS::get_singleton()->has_os_feature("bptc")) { - format = basist::cTFBC7_M6_OPAQUE_ONLY; // get this from renderer + format = basist::transcoder_texture_format::cTFBC7_M6_OPAQUE_ONLY; // get this from renderer imgfmt = Image::FORMAT_BPTC_RGBA; } else if (VS::get_singleton()->has_os_feature("s3tc")) { - format = basist::cTFBC1; // get this from renderer + format = basist::transcoder_texture_format::cTFBC1; // get this from renderer imgfmt = Image::FORMAT_DXT1; } else if (VS::get_singleton()->has_os_feature("etc")) { - format = basist::cTFETC1; // get this from renderer + format = basist::transcoder_texture_format::cTFETC1; // get this from renderer imgfmt = Image::FORMAT_ETC; } else { - format = basist::cTFBGR565; // get this from renderer + format = basist::transcoder_texture_format::cTFBGR565; // get this from renderer imgfmt = Image::FORMAT_RGB565; } } break; case BASIS_DECOMPRESS_RGBA: { if (VS::get_singleton()->has_os_feature("bptc")) { - format = basist::cTFBC7_M5; // get this from renderer + format = basist::transcoder_texture_format::cTFBC7_M5; // get this from renderer imgfmt = Image::FORMAT_BPTC_RGBA; } else if (VS::get_singleton()->has_os_feature("s3tc")) { - format = basist::cTFBC3; // get this from renderer + format = basist::transcoder_texture_format::cTFBC3; // get this from renderer imgfmt = Image::FORMAT_DXT5; } else if (VS::get_singleton()->has_os_feature("etc2")) { - format = basist::cTFETC2; // get this from renderer + format = basist::transcoder_texture_format::cTFETC2; // get this from renderer imgfmt = Image::FORMAT_ETC2_RGBA8; } else { //gles2 most likely - format = basist::cTFRGBA4444; // get this from renderer + format = basist::transcoder_texture_format::cTFRGBA4444; // get this from renderer imgfmt = Image::FORMAT_RGBA4444; } } break; case BASIS_DECOMPRESS_RG_AS_RA: { if (VS::get_singleton()->has_os_feature("s3tc")) { - format = basist::cTFBC3; // get this from renderer + format = basist::transcoder_texture_format::cTFBC3; // get this from renderer imgfmt = Image::FORMAT_DXT5_RA_AS_RG; } else if (VS::get_singleton()->has_os_feature("etc2")) { - format = basist::cTFETC2; // get this from renderer + format = basist::transcoder_texture_format::cTFETC2; // get this from renderer imgfmt = Image::FORMAT_ETC2_RGBA8; } else { //gles2 most likely, bad for normalmaps, nothing to do about this. - format = basist::cTFRGBA32; + format = basist::transcoder_texture_format::cTFRGBA32; imgfmt = Image::FORMAT_RGBA8; } } break; @@ -241,12 +236,12 @@ static Ref<Image> basis_universal_unpacker(const PoolVector<uint8_t> &p_buffer) tr.get_image_info(ptr, size, info, 0); int block_size = basist::basis_get_bytes_per_block(format); - PoolVector<uint8_t> gpudata; + Vector<uint8_t> gpudata; gpudata.resize(info.m_total_blocks * block_size); { - PoolVector<uint8_t>::Write w = gpudata.write(); - uint8_t *dst = w.ptr(); + uint8_t *w = gpudata.ptrw(); + uint8_t *dst = w; for (int i = 0; i < gpudata.size(); i++) dst[i] = 0x00; @@ -286,7 +281,7 @@ void unregister_basis_universal_types() { #ifdef TOOLS_ENABLED delete sel_codebook; -#endif Image::basis_universal_packer = NULL; +#endif Image::basis_universal_unpacker = NULL; } diff --git a/modules/basis_universal/texture_basisu.cpp b/modules/basis_universal/texture_basisu.cpp index 3b3805157b..12f3241c98 100644 --- a/modules/basis_universal/texture_basisu.cpp +++ b/modules/basis_universal/texture_basisu.cpp @@ -44,7 +44,7 @@ void TextureBasisU::_bind_methods() { ClassDB::bind_method(D_METHOD("get_basisu_data"), &TextureBasisU::get_data); ClassDB::bind_method(D_METHOD("import"), &TextureBasisU::import); - ADD_PROPERTY(PropertyInfo(Variant::POOL_BYTE_ARRAY, "basisu_data"), "set_basisu_data", "get_basisu_data"); + ADD_PROPERTY(PropertyInfo(Variant::PACKED_BYTE_ARRAY, "basisu_data"), "set_basisu_data", "get_basisu_data"); }; @@ -81,13 +81,13 @@ uint32_t TextureBasisU::get_flags() const { }; -void TextureBasisU::set_basisu_data(const PoolVector<uint8_t>& p_data) { +void TextureBasisU::set_basisu_data(const Vector<uint8_t>& p_data) { #ifdef TOOLS_ENABLED data = p_data; #endif - PoolVector<uint8_t>::Read r = p_data.read(); + const uint8_t* r = p_data.ptr(); const void* ptr = r.ptr(); int size = p_data.size(); @@ -114,11 +114,11 @@ void TextureBasisU::set_basisu_data(const PoolVector<uint8_t>& p_data) { tex_size = Size2(info.m_width, info.m_height); int block_size = basist::basis_get_bytes_per_block(format); - PoolVector<uint8_t> gpudata; + Vector<uint8_t> gpudata; gpudata.resize(info.m_total_blocks * block_size); { - PoolVector<uint8_t>::Write w = gpudata.write(); + uint8_t* w = gpudata.ptrw(); uint8_t* dst = w.ptr(); for (int i=0; i<gpudata.size(); i++) dst[i] = 0x00; @@ -152,7 +152,7 @@ Error TextureBasisU::import(const Ref<Image>& p_img) { #ifdef TOOLS_ENABLED - PoolVector<uint8_t> budata; + Vector<uint8_t> budata; { Image::Format format = p_img->get_format(); @@ -168,9 +168,9 @@ Error TextureBasisU::import(const Ref<Image>& p_img) { basisu::image buimg(p_img->get_width(), p_img->get_height()); int size = p_img->get_width() * p_img->get_height() * 4; - PoolVector<uint8_t> vec = copy->get_data(); + Vector<uint8_t> vec = copy->get_data(); { - PoolVector<uint8_t>::Read r = vec.read(); + const uint8_t* r = vec.ptr(); memcpy(buimg.get_ptr(), r.ptr(), size); }; @@ -198,7 +198,7 @@ Error TextureBasisU::import(const Ref<Image>& p_img) { budata.resize(buvec.size()); { - PoolVector<uint8_t>::Write w = budata.write(); + uint8_t* w = budata.ptrw(); memcpy(w.ptr(), &buvec[0], budata.size()); }; }; @@ -213,7 +213,7 @@ Error TextureBasisU::import(const Ref<Image>& p_img) { }; -PoolVector<uint8_t> TextureBasisU::get_basisu_data() const { +Vector<uint8_t> TextureBasisU::get_basisu_data() const { return data; }; diff --git a/modules/basis_universal/texture_basisu.h b/modules/basis_universal/texture_basisu.h index 8474a63258..8de151ede0 100644 --- a/modules/basis_universal/texture_basisu.h +++ b/modules/basis_universal/texture_basisu.h @@ -47,7 +47,7 @@ class TextureBasisU : public Texture { uint32_t flags; - PoolVector<uint8_t> data; + Vector<uint8_t> data; static void _bind_methods(); @@ -64,9 +64,9 @@ public: Error import(const Ref<Image> &p_img); - void set_basisu_data(const PoolVector<uint8_t>& p_data); + void set_basisu_data(const Vector<uint8_t>& p_data); - PoolVector<uint8_t> get_basisu_data() const; + Vector<uint8_t> get_basisu_data() const; String get_img_path() const; TextureBasisU(); diff --git a/modules/bmp/image_loader_bmp.cpp b/modules/bmp/image_loader_bmp.cpp index 5ce6d59daa..71e5076e78 100644 --- a/modules/bmp/image_loader_bmp.cpp +++ b/modules/bmp/image_loader_bmp.cpp @@ -65,7 +65,7 @@ Error ImageLoaderBMP::convert_to_image(Ref<Image> p_image, } // Image data (might be indexed) - PoolVector<uint8_t> data; + Vector<uint8_t> data; int data_len = 0; if (bits_per_pixel <= 8) { // indexed @@ -76,8 +76,8 @@ Error ImageLoaderBMP::convert_to_image(Ref<Image> p_image, ERR_FAIL_COND_V(data_len == 0, ERR_BUG); err = data.resize(data_len); - PoolVector<uint8_t>::Write data_w = data.write(); - uint8_t *write_buffer = data_w.ptr(); + uint8_t *data_w = data.ptrw(); + uint8_t *write_buffer = data_w; const uint32_t width_bytes = width * bits_per_pixel / 8; const uint32_t line_width = (width_bytes + 3) & ~3; @@ -158,11 +158,11 @@ Error ImageLoaderBMP::convert_to_image(Ref<Image> p_image, } else { // data is in indexed format, extend it // Palette data - PoolVector<uint8_t> palette_data; + Vector<uint8_t> palette_data; palette_data.resize(color_table_size * 4); - PoolVector<uint8_t>::Write palette_data_w = palette_data.write(); - uint8_t *pal = palette_data_w.ptr(); + uint8_t *palette_data_w = palette_data.ptrw(); + uint8_t *pal = palette_data_w; const uint8_t *cb = p_color_buffer; @@ -177,11 +177,11 @@ Error ImageLoaderBMP::convert_to_image(Ref<Image> p_image, cb += 4; } // Extend palette to image - PoolVector<uint8_t> extended_data; + Vector<uint8_t> extended_data; extended_data.resize(data.size() * 4); - PoolVector<uint8_t>::Write ex_w = extended_data.write(); - uint8_t *dest = ex_w.ptr(); + uint8_t *ex_w = extended_data.ptrw(); + uint8_t *dest = ex_w; const int num_pixels = width * height; @@ -260,27 +260,27 @@ Error ImageLoaderBMP::load_image(Ref<Image> p_image, FileAccess *f, ERR_FAIL_COND_V(color_table_size == 0, ERR_BUG); } - PoolVector<uint8_t> bmp_color_table; + Vector<uint8_t> bmp_color_table; // Color table is usually 4 bytes per color -> [B][G][R][0] bmp_color_table.resize(color_table_size * 4); - PoolVector<uint8_t>::Write bmp_color_table_w = bmp_color_table.write(); - f->get_buffer(bmp_color_table_w.ptr(), color_table_size * 4); + uint8_t *bmp_color_table_w = bmp_color_table.ptrw(); + f->get_buffer(bmp_color_table_w, color_table_size * 4); f->seek(bmp_header.bmp_file_header.bmp_file_offset); uint32_t bmp_buffer_size = (bmp_header.bmp_file_header.bmp_file_size - bmp_header.bmp_file_header.bmp_file_offset); - PoolVector<uint8_t> bmp_buffer; + Vector<uint8_t> bmp_buffer; err = bmp_buffer.resize(bmp_buffer_size); if (err == OK) { - PoolVector<uint8_t>::Write bmp_buffer_w = bmp_buffer.write(); - f->get_buffer(bmp_buffer_w.ptr(), bmp_buffer_size); + uint8_t *bmp_buffer_w = bmp_buffer.ptrw(); + f->get_buffer(bmp_buffer_w, bmp_buffer_size); - PoolVector<uint8_t>::Read bmp_buffer_r = bmp_buffer.read(); - PoolVector<uint8_t>::Read bmp_color_table_r = bmp_color_table.read(); - err = convert_to_image(p_image, bmp_buffer_r.ptr(), - bmp_color_table_r.ptr(), color_table_size, bmp_header); + const uint8_t *bmp_buffer_r = bmp_buffer.ptr(); + const uint8_t *bmp_color_table_r = bmp_color_table.ptr(); + err = convert_to_image(p_image, bmp_buffer_r, + bmp_color_table_r, color_table_size, bmp_header); } f->close(); } diff --git a/modules/bullet/area_bullet.cpp b/modules/bullet/area_bullet.cpp index 7806145390..e8a5c1475a 100644 --- a/modules/bullet/area_bullet.cpp +++ b/modules/bullet/area_bullet.cpp @@ -117,7 +117,7 @@ void AreaBullet::call_event(CollisionObjectBullet *p_otherObject, PhysicsServer: call_event_res[3] = 0; // other_body_shape ID call_event_res[4] = 0; // self_shape ID - Variant::CallError outResp; + Callable::CallError outResp; areaGodoObject->call(event.event_callback_method, (const Variant **)call_event_res_ptr, 5, outResp); } diff --git a/modules/bullet/rigid_body_bullet.cpp b/modules/bullet/rigid_body_bullet.cpp index e5804fbde8..d33c3a748c 100644 --- a/modules/bullet/rigid_body_bullet.cpp +++ b/modules/bullet/rigid_body_bullet.cpp @@ -370,7 +370,7 @@ void RigidBodyBullet::dispatch_callbacks() { } else { const Variant *vp[2] = { &variantBodyDirect, &force_integration_callback->udata }; - Variant::CallError responseCallError; + Callable::CallError responseCallError; int argc = (force_integration_callback->udata.get_type() == Variant::NIL) ? 1 : 2; obj->call(force_integration_callback->method, vp, argc, responseCallError); } diff --git a/modules/bullet/shape_bullet.cpp b/modules/bullet/shape_bullet.cpp index f46db09e4a..6780f89d9e 100644 --- a/modules/bullet/shape_bullet.cpp +++ b/modules/bullet/shape_bullet.cpp @@ -122,8 +122,8 @@ btBoxShape *ShapeBullet::create_shape_box(const btVector3 &boxHalfExtents) { return bulletnew(btBoxShape(boxHalfExtents)); } -btCapsuleShapeZ *ShapeBullet::create_shape_capsule(btScalar radius, btScalar height) { - return bulletnew(btCapsuleShapeZ(radius, height)); +btCapsuleShape *ShapeBullet::create_shape_capsule(btScalar radius, btScalar height) { + return bulletnew(btCapsuleShape(radius, height)); } btCylinderShape *ShapeBullet::create_shape_cylinder(btScalar radius, btScalar height) { @@ -142,11 +142,11 @@ btScaledBvhTriangleMeshShape *ShapeBullet::create_shape_concave(btBvhTriangleMes } } -btHeightfieldTerrainShape *ShapeBullet::create_shape_height_field(PoolVector<real_t> &p_heights, int p_width, int p_depth, real_t p_min_height, real_t p_max_height) { +btHeightfieldTerrainShape *ShapeBullet::create_shape_height_field(Vector<real_t> &p_heights, int p_width, int p_depth, real_t p_min_height, real_t p_max_height) { const btScalar ignoredHeightScale(1); const int YAxis = 1; // 0=X, 1=Y, 2=Z const bool flipQuadEdges = false; - const void *heightsPtr = p_heights.read().ptr(); + const void *heightsPtr = p_heights.ptr(); btHeightfieldTerrainShape *heightfield = bulletnew(btHeightfieldTerrainShape(p_width, p_depth, heightsPtr, ignoredHeightScale, p_min_height, p_max_height, YAxis, PHY_FLOAT, flipQuadEdges)); @@ -370,7 +370,7 @@ ConcavePolygonShapeBullet::~ConcavePolygonShapeBullet() { delete meshShape->getTriangleInfoMap(); bulletdelete(meshShape); } - faces = PoolVector<Vector3>(); + faces = Vector<Vector3>(); } void ConcavePolygonShapeBullet::set_data(const Variant &p_data) { @@ -385,7 +385,7 @@ PhysicsServer::ShapeType ConcavePolygonShapeBullet::get_type() const { return PhysicsServer::SHAPE_CONCAVE_POLYGON; } -void ConcavePolygonShapeBullet::setup(PoolVector<Vector3> p_faces) { +void ConcavePolygonShapeBullet::setup(Vector<Vector3> p_faces) { faces = p_faces; if (meshShape) { /// Clear previous created shape @@ -401,8 +401,8 @@ void ConcavePolygonShapeBullet::setup(PoolVector<Vector3> p_faces) { btTriangleMesh *shapeInterface = bulletnew(btTriangleMesh); src_face_count /= 3; - PoolVector<Vector3>::Read r = p_faces.read(); - const Vector3 *facesr = r.ptr(); + const Vector3 *r = p_faces.ptr(); + const Vector3 *facesr = r; btVector3 supVec_0; btVector3 supVec_1; @@ -471,10 +471,10 @@ void HeightMapShapeBullet::set_data(const Variant &p_data) { // TODO This code will need adjustments if real_t is set to `double`, // because that precision is unnecessary for a heightmap and Bullet doesn't support it... - PoolVector<real_t> l_heights; + Vector<real_t> l_heights; Variant l_heights_v = d["heights"]; - if (l_heights_v.get_type() == Variant::POOL_REAL_ARRAY) { + if (l_heights_v.get_type() == Variant::PACKED_FLOAT32_ARRAY) { // Ready-to-use heights can be passed l_heights = l_heights_v; @@ -491,13 +491,13 @@ void HeightMapShapeBullet::set_data(const Variant &p_data) { // We could convert here automatically but it's better to not be intrusive and let the caller do it if necessary. ERR_FAIL_COND(l_image->get_format() != Image::FORMAT_RF); - PoolByteArray im_data = l_image->get_data(); + PackedByteArray im_data = l_image->get_data(); l_heights.resize(l_image->get_width() * l_image->get_height()); - PoolRealArray::Write w = l_heights.write(); - PoolByteArray::Read r = im_data.read(); - float *rp = (float *)r.ptr(); + real_t *w = l_heights.ptrw(); + const uint8_t *r = im_data.ptr(); + float *rp = (float *)r; // At this point, `rp` could be used directly for Bullet, but I don't know how safe it would be. for (int i = 0; i < l_heights.size(); ++i) { @@ -505,7 +505,7 @@ void HeightMapShapeBullet::set_data(const Variant &p_data) { } } else { - ERR_FAIL_MSG("Expected PoolRealArray or float Image."); + ERR_FAIL_MSG("Expected PackedFloat32Array or float Image."); } ERR_FAIL_COND(l_width <= 0); @@ -515,7 +515,7 @@ void HeightMapShapeBullet::set_data(const Variant &p_data) { // Compute min and max heights if not specified. if (!d.has("min_height") && !d.has("max_height")) { - PoolVector<real_t>::Read r = l_heights.read(); + const real_t *r = l_heights.ptr(); int heights_size = l_heights.size(); for (int i = 0; i < heights_size; ++i) { @@ -540,7 +540,7 @@ PhysicsServer::ShapeType HeightMapShapeBullet::get_type() const { return PhysicsServer::SHAPE_HEIGHTMAP; } -void HeightMapShapeBullet::setup(PoolVector<real_t> &p_heights, int p_width, int p_depth, real_t p_min_height, real_t p_max_height) { +void HeightMapShapeBullet::setup(Vector<real_t> &p_heights, int p_width, int p_depth, real_t p_min_height, real_t p_max_height) { // TODO cell size must be tweaked using localScaling, which is a shared property for all Bullet shapes // If this array is resized outside of here, it should be preserved due to CoW diff --git a/modules/bullet/shape_bullet.h b/modules/bullet/shape_bullet.h index 8d3512cab4..c8b5ca102a 100644 --- a/modules/bullet/shape_bullet.h +++ b/modules/bullet/shape_bullet.h @@ -85,12 +85,12 @@ public: static class btStaticPlaneShape *create_shape_plane(const btVector3 &planeNormal, btScalar planeConstant); static class btSphereShape *create_shape_sphere(btScalar radius); static class btBoxShape *create_shape_box(const btVector3 &boxHalfExtents); - static class btCapsuleShapeZ *create_shape_capsule(btScalar radius, btScalar height); + static class btCapsuleShape *create_shape_capsule(btScalar radius, btScalar height); static class btCylinderShape *create_shape_cylinder(btScalar radius, btScalar height); /// IMPORTANT: Remember to delete the shape interface by calling: delete my_shape->getMeshInterface(); static class btConvexPointCloudShape *create_shape_convex(btAlignedObjectArray<btVector3> &p_vertices, const btVector3 &p_local_scaling = btVector3(1, 1, 1)); static class btScaledBvhTriangleMeshShape *create_shape_concave(btBvhTriangleMeshShape *p_mesh_shape, const btVector3 &p_local_scaling = btVector3(1, 1, 1)); - static class btHeightfieldTerrainShape *create_shape_height_field(PoolVector<real_t> &p_heights, int p_width, int p_depth, real_t p_min_height, real_t p_max_height); + static class btHeightfieldTerrainShape *create_shape_height_field(Vector<real_t> &p_heights, int p_width, int p_depth, real_t p_min_height, real_t p_max_height); static class btRayShape *create_shape_ray(real_t p_length, bool p_slips_on_slope); }; @@ -203,7 +203,7 @@ class ConcavePolygonShapeBullet : public ShapeBullet { class btBvhTriangleMeshShape *meshShape; public: - PoolVector<Vector3> faces; + Vector<Vector3> faces; ConcavePolygonShapeBullet(); virtual ~ConcavePolygonShapeBullet(); @@ -214,13 +214,13 @@ public: virtual btCollisionShape *create_bt_shape(const btVector3 &p_implicit_scale, real_t p_extra_edge = 0); private: - void setup(PoolVector<Vector3> p_faces); + void setup(Vector<Vector3> p_faces); }; class HeightMapShapeBullet : public ShapeBullet { public: - PoolVector<real_t> heights; + Vector<real_t> heights; int width; int depth; real_t min_height; @@ -234,7 +234,7 @@ public: virtual btCollisionShape *create_bt_shape(const btVector3 &p_implicit_scale, real_t p_extra_edge = 0); private: - void setup(PoolVector<real_t> &p_heights, int p_width, int p_depth, real_t p_min_height, real_t p_max_height); + void setup(Vector<real_t> &p_heights, int p_width, int p_depth, real_t p_min_height, real_t p_max_height); }; class RayShapeBullet : public ShapeBullet { diff --git a/modules/bullet/soft_body_bullet.cpp b/modules/bullet/soft_body_bullet.cpp index a7988279c0..f21206dd0d 100644 --- a/modules/bullet/soft_body_bullet.cpp +++ b/modules/bullet/soft_body_bullet.cpp @@ -184,7 +184,7 @@ void SoftBodyBullet::get_node_offset(int p_node_index, Vector3 &r_offset) const return; Array arrays = soft_mesh->surface_get_arrays(0); - PoolVector<Vector3> vertices(arrays[VS::ARRAY_VERTEX]); + Vector<Vector3> vertices(arrays[VS::ARRAY_VERTEX]); if (0 <= p_node_index && vertices.size() > p_node_index) { r_offset = vertices[p_node_index]; @@ -230,8 +230,8 @@ void SoftBodyBullet::reset_all_node_positions() { return; Array arrays = soft_mesh->surface_get_arrays(0); - PoolVector<Vector3> vs_vertices(arrays[VS::ARRAY_VERTEX]); - PoolVector<Vector3>::Read vs_vertices_read = vs_vertices.read(); + Vector<Vector3> vs_vertices(arrays[VS::ARRAY_VERTEX]); + const Vector3 *vs_vertices_read = vs_vertices.ptr(); for (int vertex_index = bt_soft_body->m_nodes.size() - 1; 0 <= vertex_index; --vertex_index) { @@ -320,7 +320,7 @@ void SoftBodyBullet::set_drag_coefficient(real_t p_val) { } } -void SoftBodyBullet::set_trimesh_body_shape(PoolVector<int> p_indices, PoolVector<Vector3> p_vertices) { +void SoftBodyBullet::set_trimesh_body_shape(Vector<int> p_indices, Vector<Vector3> p_vertices) { /// Assert the current soft body is destroyed destroy_soft_body(); @@ -339,7 +339,7 @@ void SoftBodyBullet::set_trimesh_body_shape(PoolVector<int> p_indices, PoolVecto const int vs_vertices_size(p_vertices.size()); - PoolVector<Vector3>::Read p_vertices_read = p_vertices.read(); + const Vector3 *p_vertices_read = p_vertices.ptr(); for (int vs_vertex_index = 0; vs_vertex_index < vs_vertices_size; ++vs_vertex_index) { @@ -366,7 +366,7 @@ void SoftBodyBullet::set_trimesh_body_shape(PoolVector<int> p_indices, PoolVecto { // Parse vertices to bullet bt_vertices.resize(indices_map_size * 3); - PoolVector<Vector3>::Read p_vertices_read = p_vertices.read(); + const Vector3 *p_vertices_read = p_vertices.ptr(); for (int i = 0; i < indices_map_size; ++i) { bt_vertices.write[3 * i + 0] = p_vertices_read[indices_table[i][0]].x; @@ -382,7 +382,7 @@ void SoftBodyBullet::set_trimesh_body_shape(PoolVector<int> p_indices, PoolVecto bt_triangles.resize(triangles_size * 3); - PoolVector<int>::Read p_indices_read = p_indices.read(); + const int *p_indices_read = p_indices.ptr(); for (int i = 0; i < triangles_size; ++i) { bt_triangles.write[3 * i + 0] = vs_indices_to_physics_table[p_indices_read[3 * i + 2]]; diff --git a/modules/bullet/soft_body_bullet.h b/modules/bullet/soft_body_bullet.h index b98116b073..2df8ce074f 100644 --- a/modules/bullet/soft_body_bullet.h +++ b/modules/bullet/soft_body_bullet.h @@ -152,7 +152,7 @@ public: _FORCE_INLINE_ real_t get_drag_coefficient() const { return drag_coefficient; } private: - void set_trimesh_body_shape(PoolVector<int> p_indices, PoolVector<Vector3> p_vertices); + void set_trimesh_body_shape(Vector<int> p_indices, Vector<Vector3> p_vertices); void setup_soft_body(); void pin_node(int p_node_index); diff --git a/modules/bullet/space_bullet.cpp b/modules/bullet/space_bullet.cpp index 0e4c4b4731..f6df97f11d 100644 --- a/modules/bullet/space_bullet.cpp +++ b/modules/bullet/space_bullet.cpp @@ -726,9 +726,6 @@ void SpaceBullet::check_ghost_overlaps() { other_body_shape = static_cast<btCollisionShape *>(otherObject->get_bt_shape(z)); - if (other_body_shape->isConcave()) - continue; - btTransform other_shape_transform(otherObject->get_bt_shape_transform(z)); other_shape_transform.getOrigin() *= other_body_scale; diff --git a/modules/camera/camera_ios.mm b/modules/camera/camera_ios.mm index 8059277503..f01135f251 100644 --- a/modules/camera/camera_ios.mm +++ b/modules/camera/camera_ios.mm @@ -44,7 +44,7 @@ Ref<CameraFeed> feed; size_t width[2]; size_t height[2]; - PoolVector<uint8_t> img_data[2]; + Vector<uint8_t> img_data[2]; AVCaptureDeviceInput *input; AVCaptureVideoDataOutput *output; @@ -175,7 +175,7 @@ img_data[0].resize(new_width * new_height); } - PoolVector<uint8_t>::Write w = img_data[0].write(); + uint8_t *w = img_data[0].ptrw(); memcpy(w.ptr(), dataY, new_width * new_height); img[0].instance(); @@ -196,7 +196,7 @@ img_data[1].resize(2 * new_width * new_height); } - PoolVector<uint8_t>::Write w = img_data[1].write(); + uint8_t *w = img_data[1].ptrw(); memcpy(w.ptr(), dataCbCr, 2 * new_width * new_height); ///TODO GLES2 doesn't support FORMAT_RG8, need to do some form of conversion diff --git a/modules/camera/camera_osx.mm b/modules/camera/camera_osx.mm index 658ddb728b..9a72174723 100644 --- a/modules/camera/camera_osx.mm +++ b/modules/camera/camera_osx.mm @@ -42,7 +42,7 @@ Ref<CameraFeed> feed; size_t width[2]; size_t height[2]; - PoolVector<uint8_t> img_data[2]; + Vector<uint8_t> img_data[2]; AVCaptureDeviceInput *input; AVCaptureVideoDataOutput *output; @@ -159,8 +159,8 @@ img_data[0].resize(new_width * new_height); } - PoolVector<uint8_t>::Write w = img_data[0].write(); - memcpy(w.ptr(), dataY, new_width * new_height); + uint8_t *w = img_data[0].ptrw(); + memcpy(w, dataY, new_width * new_height); img[0].instance(); img[0]->create(new_width, new_height, 0, Image::FORMAT_R8, img_data[0]); @@ -177,8 +177,8 @@ img_data[1].resize(2 * new_width * new_height); } - PoolVector<uint8_t>::Write w = img_data[1].write(); - memcpy(w.ptr(), dataCbCr, 2 * new_width * new_height); + uint8_t *w = img_data[1].ptrw(); + memcpy(w, dataCbCr, 2 * new_width * new_height); ///TODO GLES2 doesn't support FORMAT_RG8, need to do some form of conversion img[1].instance(); diff --git a/modules/csg/csg.cpp b/modules/csg/csg.cpp index cc3bbed27f..36055ce840 100644 --- a/modules/csg/csg.cpp +++ b/modules/csg/csg.cpp @@ -39,7 +39,7 @@ void CSGBrush::clear() { faces.clear(); } -void CSGBrush::build_from_faces(const PoolVector<Vector3> &p_vertices, const PoolVector<Vector2> &p_uvs, const PoolVector<bool> &p_smooth, const PoolVector<Ref<Material> > &p_materials, const PoolVector<bool> &p_invert_faces) { +void CSGBrush::build_from_faces(const Vector<Vector3> &p_vertices, const Vector<Vector2> &p_uvs, const Vector<bool> &p_smooth, const Vector<Ref<Material> > &p_materials, const Vector<bool> &p_invert_faces) { clear(); @@ -47,15 +47,15 @@ void CSGBrush::build_from_faces(const PoolVector<Vector3> &p_vertices, const Poo ERR_FAIL_COND((vc % 3) != 0); - PoolVector<Vector3>::Read rv = p_vertices.read(); + const Vector3 *rv = p_vertices.ptr(); int uvc = p_uvs.size(); - PoolVector<Vector2>::Read ruv = p_uvs.read(); + const Vector2 *ruv = p_uvs.ptr(); int sc = p_smooth.size(); - PoolVector<bool>::Read rs = p_smooth.read(); + const bool *rs = p_smooth.ptr(); int mc = p_materials.size(); - PoolVector<Ref<Material> >::Read rm = p_materials.read(); + const Ref<Material> *rm = p_materials.ptr(); int ic = p_invert_faces.size(); - PoolVector<bool>::Read ri = p_invert_faces.read(); + const bool *ri = p_invert_faces.ptr(); Map<Ref<Material>, int> material_map; diff --git a/modules/csg/csg.h b/modules/csg/csg.h index a11e55c72a..472a96d5df 100644 --- a/modules/csg/csg.h +++ b/modules/csg/csg.h @@ -38,7 +38,7 @@ #include "core/math/transform.h" #include "core/math/vector3.h" #include "core/oa_hash_map.h" -#include "core/pool_vector.h" + #include "scene/resources/material.h" struct CSGBrush { @@ -58,7 +58,7 @@ struct CSGBrush { void _regen_face_aabbs(); //create a brush from faces - void build_from_faces(const PoolVector<Vector3> &p_vertices, const PoolVector<Vector2> &p_uvs, const PoolVector<bool> &p_smooth, const PoolVector<Ref<Material> > &p_materials, const PoolVector<bool> &p_invert_faces); + void build_from_faces(const Vector<Vector3> &p_vertices, const Vector<Vector2> &p_uvs, const Vector<bool> &p_smooth, const Vector<Ref<Material> > &p_materials, const Vector<bool> &p_invert_faces); void copy_from(const CSGBrush &p_brush, const Transform &p_xform); void clear(); diff --git a/modules/csg/csg_gizmos.cpp b/modules/csg/csg_gizmos.cpp index 49387606f3..1b63bccb06 100644 --- a/modules/csg/csg_gizmos.cpp +++ b/modules/csg/csg_gizmos.cpp @@ -336,12 +336,12 @@ void CSGShapeSpatialGizmoPlugin::redraw(EditorSpatialGizmo *p_gizmo) { Ref<Material> handles_material = get_material("handles"); - PoolVector<Vector3> faces = cs->get_brush_faces(); + Vector<Vector3> faces = cs->get_brush_faces(); Vector<Vector3> lines; lines.resize(faces.size() * 2); { - PoolVector<Vector3>::Read r = faces.read(); + const Vector3 *r = faces.ptr(); for (int i = 0; i < lines.size(); i += 6) { int f = i / 6; diff --git a/modules/csg/csg_shape.cpp b/modules/csg/csg_shape.cpp index 33e4e9748c..d017afd792 100644 --- a/modules/csg/csg_shape.cpp +++ b/modules/csg/csg_shape.cpp @@ -334,16 +334,16 @@ void CSGShape::_update_shape() { surfaces.write[i].material = n->materials[i]; } - surfaces.write[i].verticesw = surfaces.write[i].vertices.write(); - surfaces.write[i].normalsw = surfaces.write[i].normals.write(); - surfaces.write[i].uvsw = surfaces.write[i].uvs.write(); + surfaces.write[i].verticesw = surfaces.write[i].vertices.ptrw(); + surfaces.write[i].normalsw = surfaces.write[i].normals.ptrw(); + surfaces.write[i].uvsw = surfaces.write[i].uvs.ptrw(); if (calculate_tangents) { - surfaces.write[i].tansw = surfaces.write[i].tans.write(); + surfaces.write[i].tansw = surfaces.write[i].tans.ptrw(); } } //fill arrays - PoolVector<Vector3> physics_faces; + Vector<Vector3> physics_faces; bool fill_physics_faces = false; if (root_collision_shape.is_valid()) { physics_faces.resize(n->faces.size() * 3); @@ -351,10 +351,10 @@ void CSGShape::_update_shape() { } { - PoolVector<Vector3>::Write physicsw; + Vector3 *physicsw; if (fill_physics_faces) { - physicsw = physics_faces.write(); + physicsw = physics_faces.ptrw(); } for (int i = 0; i < n->faces.size(); i++) { @@ -435,12 +435,6 @@ void CSGShape::_update_shape() { have_tangents = genTangSpaceDefault(&msc); } - // unset write access - surfaces.write[i].verticesw.release(); - surfaces.write[i].normalsw.release(); - surfaces.write[i].uvsw.release(); - surfaces.write[i].tansw.release(); - if (surfaces[i].last_added == 0) continue; @@ -470,18 +464,18 @@ AABB CSGShape::get_aabb() const { return node_aabb; } -PoolVector<Vector3> CSGShape::get_brush_faces() { - ERR_FAIL_COND_V(!is_inside_tree(), PoolVector<Vector3>()); +Vector<Vector3> CSGShape::get_brush_faces() { + ERR_FAIL_COND_V(!is_inside_tree(), Vector<Vector3>()); CSGBrush *b = _get_brush(); if (!b) { - return PoolVector<Vector3>(); + return Vector<Vector3>(); } - PoolVector<Vector3> faces; + Vector<Vector3> faces; int fc = b->faces.size(); faces.resize(fc * 3); { - PoolVector<Vector3>::Write w = faces.write(); + Vector3 *w = faces.ptrw(); for (int i = 0; i < fc; i++) { w[i * 3 + 0] = b->faces[i].vertices[0]; w[i * 3 + 1] = b->faces[i].vertices[1]; @@ -492,9 +486,9 @@ PoolVector<Vector3> CSGShape::get_brush_faces() { return faces; } -PoolVector<Face3> CSGShape::get_faces(uint32_t p_usage_flags) const { +Vector<Face3> CSGShape::get_faces(uint32_t p_usage_flags) const { - return PoolVector<Face3>(); + return Vector<Face3>(); } void CSGShape::_notification(int p_what) { @@ -627,7 +621,7 @@ void CSGShape::_bind_methods() { ClassDB::bind_method(D_METHOD("get_meshes"), &CSGShape::get_meshes); ADD_PROPERTY(PropertyInfo(Variant::INT, "operation", PROPERTY_HINT_ENUM, "Union,Intersection,Subtraction"), "set_operation", "get_operation"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "snap", PROPERTY_HINT_RANGE, "0.0001,1,0.001"), "set_snap", "get_snap"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "snap", PROPERTY_HINT_RANGE, "0.0001,1,0.001"), "set_snap", "get_snap"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "calculate_tangents"), "set_calculate_tangents", "is_calculating_tangents"); ADD_GROUP("Collision", "collision_"); @@ -671,15 +665,15 @@ CSGCombiner::CSGCombiner() { ///////////////////// -CSGBrush *CSGPrimitive::_create_brush_from_arrays(const PoolVector<Vector3> &p_vertices, const PoolVector<Vector2> &p_uv, const PoolVector<bool> &p_smooth, const PoolVector<Ref<Material> > &p_materials) { +CSGBrush *CSGPrimitive::_create_brush_from_arrays(const Vector<Vector3> &p_vertices, const Vector<Vector2> &p_uv, const Vector<bool> &p_smooth, const Vector<Ref<Material> > &p_materials) { CSGBrush *brush = memnew(CSGBrush); - PoolVector<bool> invert; + Vector<bool> invert; invert.resize(p_vertices.size() / 3); { int ic = invert.size(); - PoolVector<bool>::Write w = invert.write(); + bool *w = invert.ptrw(); for (int i = 0; i < ic; i++) { w[i] = invert_faces; } @@ -721,10 +715,10 @@ CSGBrush *CSGMesh::_build_brush() { if (!mesh.is_valid()) return NULL; - PoolVector<Vector3> vertices; - PoolVector<bool> smooth; - PoolVector<Ref<Material> > materials; - PoolVector<Vector2> uvs; + Vector<Vector3> vertices; + Vector<bool> smooth; + Vector<Ref<Material> > materials; + Vector<Vector2> uvs; Ref<Material> material = get_material(); for (int i = 0; i < mesh->get_surface_count(); i++) { @@ -740,25 +734,25 @@ CSGBrush *CSGMesh::_build_brush() { ERR_FAIL_COND_V(arrays.size() == 0, NULL); } - PoolVector<Vector3> avertices = arrays[Mesh::ARRAY_VERTEX]; + Vector<Vector3> avertices = arrays[Mesh::ARRAY_VERTEX]; if (avertices.size() == 0) continue; - PoolVector<Vector3>::Read vr = avertices.read(); + const Vector3 *vr = avertices.ptr(); - PoolVector<Vector3> anormals = arrays[Mesh::ARRAY_NORMAL]; - PoolVector<Vector3>::Read nr; + Vector<Vector3> anormals = arrays[Mesh::ARRAY_NORMAL]; + const Vector3 *nr; bool nr_used = false; if (anormals.size()) { - nr = anormals.read(); + nr = anormals.ptr(); nr_used = true; } - PoolVector<Vector2> auvs = arrays[Mesh::ARRAY_TEX_UV]; - PoolVector<Vector2>::Read uvr; + Vector<Vector2> auvs = arrays[Mesh::ARRAY_TEX_UV]; + const Vector2 *uvr; bool uvr_used = false; if (auvs.size()) { - uvr = auvs.read(); + uvr = auvs.ptr(); uvr_used = true; } @@ -769,7 +763,7 @@ CSGBrush *CSGMesh::_build_brush() { mat = mesh->surface_get_material(i); } - PoolVector<int> aindices = arrays[Mesh::ARRAY_INDEX]; + Vector<int> aindices = arrays[Mesh::ARRAY_INDEX]; if (aindices.size()) { int as = vertices.size(); int is = aindices.size(); @@ -779,12 +773,12 @@ CSGBrush *CSGMesh::_build_brush() { materials.resize((as + is) / 3); uvs.resize(as + is); - PoolVector<Vector3>::Write vw = vertices.write(); - PoolVector<bool>::Write sw = smooth.write(); - PoolVector<Vector2>::Write uvw = uvs.write(); - PoolVector<Ref<Material> >::Write mw = materials.write(); + Vector3 *vw = vertices.ptrw(); + bool *sw = smooth.ptrw(); + Vector2 *uvw = uvs.ptrw(); + Ref<Material> *mw = materials.ptrw(); - PoolVector<int>::Read ir = aindices.read(); + const int *ir = aindices.ptr(); for (int j = 0; j < is; j += 3) { @@ -825,10 +819,10 @@ CSGBrush *CSGMesh::_build_brush() { uvs.resize(as + is); materials.resize((as + is) / 3); - PoolVector<Vector3>::Write vw = vertices.write(); - PoolVector<bool>::Write sw = smooth.write(); - PoolVector<Vector2>::Write uvw = uvs.write(); - PoolVector<Ref<Material> >::Write mw = materials.write(); + Vector3 *vw = vertices.ptrw(); + bool *sw = smooth.ptrw(); + Vector2 *uvw = uvs.ptrw(); + Ref<Material> *mw = materials.ptrw(); for (int j = 0; j < is; j += 3) { @@ -904,12 +898,12 @@ void CSGMesh::set_mesh(const Ref<Mesh> &p_mesh) { if (mesh == p_mesh) return; if (mesh.is_valid()) { - mesh->disconnect("changed", this, "_mesh_changed"); + mesh->disconnect_compat("changed", this, "_mesh_changed"); } mesh = p_mesh; if (mesh.is_valid()) { - mesh->connect("changed", this, "_mesh_changed"); + mesh->connect_compat("changed", this, "_mesh_changed"); } _make_dirty(); @@ -932,11 +926,11 @@ CSGBrush *CSGSphere::_build_brush() { bool invert_val = is_inverting_faces(); Ref<Material> material = get_material(); - PoolVector<Vector3> faces; - PoolVector<Vector2> uvs; - PoolVector<bool> smooth; - PoolVector<Ref<Material> > materials; - PoolVector<bool> invert; + Vector<Vector3> faces; + Vector<Vector2> uvs; + Vector<bool> smooth; + Vector<Ref<Material> > materials; + Vector<bool> invert; faces.resize(face_count * 3); uvs.resize(face_count * 3); @@ -947,11 +941,11 @@ CSGBrush *CSGSphere::_build_brush() { { - PoolVector<Vector3>::Write facesw = faces.write(); - PoolVector<Vector2>::Write uvsw = uvs.write(); - PoolVector<bool>::Write smoothw = smooth.write(); - PoolVector<Ref<Material> >::Write materialsw = materials.write(); - PoolVector<bool>::Write invertw = invert.write(); + Vector3 *facesw = faces.ptrw(); + Vector2 *uvsw = uvs.ptrw(); + bool *smoothw = smooth.ptrw(); + Ref<Material> *materialsw = materials.ptrw(); + bool *invertw = invert.ptrw(); int face = 0; @@ -1055,7 +1049,7 @@ void CSGSphere::_bind_methods() { ClassDB::bind_method(D_METHOD("set_material", "material"), &CSGSphere::set_material); ClassDB::bind_method(D_METHOD("get_material"), &CSGSphere::get_material); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "radius", PROPERTY_HINT_RANGE, "0.001,100.0,0.001"), "set_radius", "get_radius"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "radius", PROPERTY_HINT_RANGE, "0.001,100.0,0.001"), "set_radius", "get_radius"); ADD_PROPERTY(PropertyInfo(Variant::INT, "radial_segments", PROPERTY_HINT_RANGE, "1,100,1"), "set_radial_segments", "get_radial_segments"); ADD_PROPERTY(PropertyInfo(Variant::INT, "rings", PROPERTY_HINT_RANGE, "1,100,1"), "set_rings", "get_rings"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "smooth_faces"), "set_smooth_faces", "get_smooth_faces"); @@ -1135,11 +1129,11 @@ CSGBrush *CSGBox::_build_brush() { bool invert_val = is_inverting_faces(); Ref<Material> material = get_material(); - PoolVector<Vector3> faces; - PoolVector<Vector2> uvs; - PoolVector<bool> smooth; - PoolVector<Ref<Material> > materials; - PoolVector<bool> invert; + Vector<Vector3> faces; + Vector<Vector2> uvs; + Vector<bool> smooth; + Vector<Ref<Material> > materials; + Vector<bool> invert; faces.resize(face_count * 3); uvs.resize(face_count * 3); @@ -1150,11 +1144,11 @@ CSGBrush *CSGBox::_build_brush() { { - PoolVector<Vector3>::Write facesw = faces.write(); - PoolVector<Vector2>::Write uvsw = uvs.write(); - PoolVector<bool>::Write smoothw = smooth.write(); - PoolVector<Ref<Material> >::Write materialsw = materials.write(); - PoolVector<bool>::Write invertw = invert.write(); + Vector3 *facesw = faces.ptrw(); + Vector2 *uvsw = uvs.ptrw(); + bool *smoothw = smooth.ptrw(); + Ref<Material> *materialsw = materials.ptrw(); + bool *invertw = invert.ptrw(); int face = 0; @@ -1242,9 +1236,9 @@ void CSGBox::_bind_methods() { ClassDB::bind_method(D_METHOD("set_material", "material"), &CSGBox::set_material); ClassDB::bind_method(D_METHOD("get_material"), &CSGBox::get_material); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "width", PROPERTY_HINT_EXP_RANGE, "0.001,1000.0,0.001,or_greater"), "set_width", "get_width"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "height", PROPERTY_HINT_EXP_RANGE, "0.001,1000.0,0.001,or_greater"), "set_height", "get_height"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "depth", PROPERTY_HINT_EXP_RANGE, "0.001,1000.0,0.001,or_greater"), "set_depth", "get_depth"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "width", PROPERTY_HINT_EXP_RANGE, "0.001,1000.0,0.001,or_greater"), "set_width", "get_width"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "height", PROPERTY_HINT_EXP_RANGE, "0.001,1000.0,0.001,or_greater"), "set_height", "get_height"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "depth", PROPERTY_HINT_EXP_RANGE, "0.001,1000.0,0.001,or_greater"), "set_depth", "get_depth"); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "material", PROPERTY_HINT_RESOURCE_TYPE, "StandardMaterial3D,ShaderMaterial"), "set_material", "get_material"); } @@ -1313,11 +1307,11 @@ CSGBrush *CSGCylinder::_build_brush() { bool invert_val = is_inverting_faces(); Ref<Material> material = get_material(); - PoolVector<Vector3> faces; - PoolVector<Vector2> uvs; - PoolVector<bool> smooth; - PoolVector<Ref<Material> > materials; - PoolVector<bool> invert; + Vector<Vector3> faces; + Vector<Vector2> uvs; + Vector<bool> smooth; + Vector<Ref<Material> > materials; + Vector<bool> invert; faces.resize(face_count * 3); uvs.resize(face_count * 3); @@ -1328,11 +1322,11 @@ CSGBrush *CSGCylinder::_build_brush() { { - PoolVector<Vector3>::Write facesw = faces.write(); - PoolVector<Vector2>::Write uvsw = uvs.write(); - PoolVector<bool>::Write smoothw = smooth.write(); - PoolVector<Ref<Material> >::Write materialsw = materials.write(); - PoolVector<bool>::Write invertw = invert.write(); + Vector3 *facesw = faces.ptrw(); + Vector2 *uvsw = uvs.ptrw(); + bool *smoothw = smooth.ptrw(); + Ref<Material> *materialsw = materials.ptrw(); + bool *invertw = invert.ptrw(); int face = 0; @@ -1457,8 +1451,8 @@ void CSGCylinder::_bind_methods() { ClassDB::bind_method(D_METHOD("set_smooth_faces", "smooth_faces"), &CSGCylinder::set_smooth_faces); ClassDB::bind_method(D_METHOD("get_smooth_faces"), &CSGCylinder::get_smooth_faces); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "radius", PROPERTY_HINT_EXP_RANGE, "0.001,1000.0,0.001,or_greater"), "set_radius", "get_radius"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "height", PROPERTY_HINT_EXP_RANGE, "0.001,1000.0,0.001,or_greater"), "set_height", "get_height"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "radius", PROPERTY_HINT_EXP_RANGE, "0.001,1000.0,0.001,or_greater"), "set_radius", "get_radius"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "height", PROPERTY_HINT_EXP_RANGE, "0.001,1000.0,0.001,or_greater"), "set_height", "get_height"); ADD_PROPERTY(PropertyInfo(Variant::INT, "sides", PROPERTY_HINT_RANGE, "3,64,1"), "set_sides", "get_sides"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "cone"), "set_cone", "is_cone"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "smooth_faces"), "set_smooth_faces", "get_smooth_faces"); @@ -1562,11 +1556,11 @@ CSGBrush *CSGTorus::_build_brush() { bool invert_val = is_inverting_faces(); Ref<Material> material = get_material(); - PoolVector<Vector3> faces; - PoolVector<Vector2> uvs; - PoolVector<bool> smooth; - PoolVector<Ref<Material> > materials; - PoolVector<bool> invert; + Vector<Vector3> faces; + Vector<Vector2> uvs; + Vector<bool> smooth; + Vector<Ref<Material> > materials; + Vector<bool> invert; faces.resize(face_count * 3); uvs.resize(face_count * 3); @@ -1577,11 +1571,11 @@ CSGBrush *CSGTorus::_build_brush() { { - PoolVector<Vector3>::Write facesw = faces.write(); - PoolVector<Vector2>::Write uvsw = uvs.write(); - PoolVector<bool>::Write smoothw = smooth.write(); - PoolVector<Ref<Material> >::Write materialsw = materials.write(); - PoolVector<bool>::Write invertw = invert.write(); + Vector3 *facesw = faces.ptrw(); + Vector2 *uvsw = uvs.ptrw(); + bool *smoothw = smooth.ptrw(); + Ref<Material> *materialsw = materials.ptrw(); + bool *invertw = invert.ptrw(); int face = 0; @@ -1684,8 +1678,8 @@ void CSGTorus::_bind_methods() { ClassDB::bind_method(D_METHOD("set_smooth_faces", "smooth_faces"), &CSGTorus::set_smooth_faces); ClassDB::bind_method(D_METHOD("get_smooth_faces"), &CSGTorus::get_smooth_faces); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "inner_radius", PROPERTY_HINT_EXP_RANGE, "0.001,1000.0,0.001,or_greater"), "set_inner_radius", "get_inner_radius"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "outer_radius", PROPERTY_HINT_EXP_RANGE, "0.001,1000.0,0.001,or_greater"), "set_outer_radius", "get_outer_radius"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "inner_radius", PROPERTY_HINT_EXP_RANGE, "0.001,1000.0,0.001,or_greater"), "set_inner_radius", "get_inner_radius"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "outer_radius", PROPERTY_HINT_EXP_RANGE, "0.001,1000.0,0.001,or_greater"), "set_outer_radius", "get_outer_radius"); ADD_PROPERTY(PropertyInfo(Variant::INT, "sides", PROPERTY_HINT_RANGE, "3,64,1"), "set_sides", "get_sides"); ADD_PROPERTY(PropertyInfo(Variant::INT, "ring_sides", PROPERTY_HINT_RANGE, "3,64,1"), "set_ring_sides", "get_ring_sides"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "smooth_faces"), "set_smooth_faces", "get_smooth_faces"); @@ -1818,15 +1812,15 @@ CSGBrush *CSGPolygon::_build_brush() { if (path != path_cache) { if (path_cache) { - path_cache->disconnect("tree_exited", this, "_path_exited"); - path_cache->disconnect("curve_changed", this, "_path_changed"); + path_cache->disconnect_compat("tree_exited", this, "_path_exited"); + path_cache->disconnect_compat("curve_changed", this, "_path_changed"); path_cache = NULL; } path_cache = path; - path_cache->connect("tree_exited", this, "_path_exited"); - path_cache->connect("curve_changed", this, "_path_changed"); + path_cache->connect_compat("tree_exited", this, "_path_exited"); + path_cache->connect_compat("curve_changed", this, "_path_changed"); path_cache = NULL; } curve = path->get_curve(); @@ -1856,11 +1850,11 @@ CSGBrush *CSGPolygon::_build_brush() { bool invert_val = is_inverting_faces(); Ref<Material> material = get_material(); - PoolVector<Vector3> faces; - PoolVector<Vector2> uvs; - PoolVector<bool> smooth; - PoolVector<Ref<Material> > materials; - PoolVector<bool> invert; + Vector<Vector3> faces; + Vector<Vector2> uvs; + Vector<bool> smooth; + Vector<Ref<Material> > materials; + Vector<bool> invert; faces.resize(face_count * 3); uvs.resize(face_count * 3); @@ -1872,11 +1866,11 @@ CSGBrush *CSGPolygon::_build_brush() { AABB aabb; //must be computed { - PoolVector<Vector3>::Write facesw = faces.write(); - PoolVector<Vector2>::Write uvsw = uvs.write(); - PoolVector<bool>::Write smoothw = smooth.write(); - PoolVector<Ref<Material> >::Write materialsw = materials.write(); - PoolVector<bool>::Write invertw = invert.write(); + Vector3 *facesw = faces.ptrw(); + Vector2 *uvsw = uvs.ptrw(); + bool *smoothw = smooth.ptrw(); + Ref<Material> *materialsw = materials.ptrw(); + bool *invertw = invert.ptrw(); int face = 0; @@ -2242,8 +2236,8 @@ CSGBrush *CSGPolygon::_build_brush() { void CSGPolygon::_notification(int p_what) { if (p_what == NOTIFICATION_EXIT_TREE) { if (path_cache) { - path_cache->disconnect("tree_exited", this, "_path_exited"); - path_cache->disconnect("curve_changed", this, "_path_changed"); + path_cache->disconnect_compat("tree_exited", this, "_path_exited"); + path_cache->disconnect_compat("curve_changed", this, "_path_changed"); path_cache = NULL; } } @@ -2318,13 +2312,13 @@ void CSGPolygon::_bind_methods() { ClassDB::bind_method(D_METHOD("_path_exited"), &CSGPolygon::_path_exited); ClassDB::bind_method(D_METHOD("_path_changed"), &CSGPolygon::_path_changed); - ADD_PROPERTY(PropertyInfo(Variant::POOL_VECTOR2_ARRAY, "polygon"), "set_polygon", "get_polygon"); + ADD_PROPERTY(PropertyInfo(Variant::PACKED_VECTOR2_ARRAY, "polygon"), "set_polygon", "get_polygon"); ADD_PROPERTY(PropertyInfo(Variant::INT, "mode", PROPERTY_HINT_ENUM, "Depth,Spin,Path"), "set_mode", "get_mode"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "depth", PROPERTY_HINT_EXP_RANGE, "0.001,1000.0,0.001,or_greater"), "set_depth", "get_depth"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "spin_degrees", PROPERTY_HINT_RANGE, "1,360,0.1"), "set_spin_degrees", "get_spin_degrees"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "depth", PROPERTY_HINT_EXP_RANGE, "0.001,1000.0,0.001,or_greater"), "set_depth", "get_depth"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "spin_degrees", PROPERTY_HINT_RANGE, "1,360,0.1"), "set_spin_degrees", "get_spin_degrees"); ADD_PROPERTY(PropertyInfo(Variant::INT, "spin_sides", PROPERTY_HINT_RANGE, "3,64,1"), "set_spin_sides", "get_spin_sides"); ADD_PROPERTY(PropertyInfo(Variant::NODE_PATH, "path_node", PROPERTY_HINT_NODE_PATH_VALID_TYPES, "Path"), "set_path_node", "get_path_node"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "path_interval", PROPERTY_HINT_EXP_RANGE, "0.001,1000.0,0.001,or_greater"), "set_path_interval", "get_path_interval"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "path_interval", PROPERTY_HINT_EXP_RANGE, "0.001,1000.0,0.001,or_greater"), "set_path_interval", "get_path_interval"); ADD_PROPERTY(PropertyInfo(Variant::INT, "path_rotation", PROPERTY_HINT_ENUM, "Polygon,Path,PathFollow"), "set_path_rotation", "get_path_rotation"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "path_local"), "set_path_local", "is_path_local"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "path_continuous_u"), "set_path_continuous_u", "is_path_continuous_u"); diff --git a/modules/csg/csg_shape.h b/modules/csg/csg_shape.h index 1098feea51..909437e39b 100644 --- a/modules/csg/csg_shape.h +++ b/modules/csg/csg_shape.h @@ -80,17 +80,17 @@ private: }; struct ShapeUpdateSurface { - PoolVector<Vector3> vertices; - PoolVector<Vector3> normals; - PoolVector<Vector2> uvs; - PoolVector<float> tans; + Vector<Vector3> vertices; + Vector<Vector3> normals; + Vector<Vector2> uvs; + Vector<float> tans; Ref<Material> material; int last_added; - PoolVector<Vector3>::Write verticesw; - PoolVector<Vector3>::Write normalsw; - PoolVector<Vector2>::Write uvsw; - PoolVector<float>::Write tansw; + Vector3 *verticesw; + Vector3 *normalsw; + Vector2 *uvsw; + float *tansw; }; //mikktspace callbacks @@ -122,10 +122,10 @@ public: void set_operation(Operation p_operation); Operation get_operation() const; - virtual PoolVector<Vector3> get_brush_faces(); + virtual Vector<Vector3> get_brush_faces(); virtual AABB get_aabb() const; - virtual PoolVector<Face3> get_faces(uint32_t p_usage_flags) const; + virtual Vector<Face3> get_faces(uint32_t p_usage_flags) const; void set_use_collision(bool p_enable); bool is_using_collision() const; @@ -172,7 +172,7 @@ private: bool invert_faces; protected: - CSGBrush *_create_brush_from_arrays(const PoolVector<Vector3> &p_vertices, const PoolVector<Vector2> &p_uv, const PoolVector<bool> &p_smooth, const PoolVector<Ref<Material> > &p_materials); + CSGBrush *_create_brush_from_arrays(const Vector<Vector3> &p_vertices, const Vector<Vector2> &p_uv, const Vector<bool> &p_smooth, const Vector<Ref<Material> > &p_materials); static void _bind_methods(); public: diff --git a/modules/csg/doc_classes/CSGPolygon.xml b/modules/csg/doc_classes/CSGPolygon.xml index 64ae46c69a..02b2e8b03f 100644 --- a/modules/csg/doc_classes/CSGPolygon.xml +++ b/modules/csg/doc_classes/CSGPolygon.xml @@ -38,7 +38,7 @@ <member name="path_rotation" type="int" setter="set_path_rotation" getter="get_path_rotation" enum="CSGPolygon.PathRotation"> The method by which each slice is rotated along the path when [member mode] is [constant MODE_PATH]. </member> - <member name="polygon" type="PoolVector2Array" setter="set_polygon" getter="get_polygon" default="PoolVector2Array( 0, 0, 0, 1, 1, 1, 1, 0 )"> + <member name="polygon" type="PackedVector2Array" setter="set_polygon" getter="get_polygon" default="PackedVector2Array( 0, 0, 0, 1, 1, 1, 1, 0 )"> Point array that defines the shape that we'll extrude. </member> <member name="smooth_faces" type="bool" setter="set_smooth_faces" getter="get_smooth_faces" default="false"> diff --git a/modules/cvtt/image_compress_cvtt.cpp b/modules/cvtt/image_compress_cvtt.cpp index 4d762b7a7b..9dbaa88202 100644 --- a/modules/cvtt/image_compress_cvtt.cpp +++ b/modules/cvtt/image_compress_cvtt.cpp @@ -179,7 +179,7 @@ void image_compress_cvtt(Image *p_image, float p_lossy_quality, Image::UsedChann p_image->convert(Image::FORMAT_RGBH); } - PoolVector<uint8_t>::Read rb = p_image->get_data().read(); + const uint8_t *rb = p_image->get_data().ptr(); const uint16_t *source_data = reinterpret_cast<const uint16_t *>(&rb[0]); int pixel_element_count = w * h * 3; @@ -195,15 +195,15 @@ void image_compress_cvtt(Image *p_image, float p_lossy_quality, Image::UsedChann p_image->convert(Image::FORMAT_RGBA8); //still uses RGBA to convert } - PoolVector<uint8_t>::Read rb = p_image->get_data().read(); + const uint8_t *rb = p_image->get_data().ptr(); - PoolVector<uint8_t> data; + Vector<uint8_t> data; int target_size = Image::get_image_data_size(w, h, target_format, p_image->has_mipmaps()); int mm_count = p_image->has_mipmaps() ? Image::get_image_required_mipmaps(w, h, target_format) : 0; data.resize(target_size); int shift = Image::get_format_pixel_rshift(target_format); - PoolVector<uint8_t>::Write wb = data.write(); + uint8_t *wb = data.ptrw(); int dst_ofs = 0; @@ -219,7 +219,7 @@ void image_compress_cvtt(Image *p_image, float p_lossy_quality, Image::UsedChann int num_job_threads = OS::get_singleton()->can_use_threads() ? (OS::get_singleton()->get_processor_count() - 1) : 0; #endif - PoolVector<CVTTCompressionRowTask> tasks; + Vector<CVTTCompressionRowTask> tasks; for (int i = 0; i <= mm_count; i++) { @@ -254,12 +254,12 @@ void image_compress_cvtt(Image *p_image, float p_lossy_quality, Image::UsedChann } if (num_job_threads > 0) { - PoolVector<Thread *> threads; + Vector<Thread *> threads; threads.resize(num_job_threads); - PoolVector<Thread *>::Write threads_wb = threads.write(); + Thread **threads_wb = threads.ptrw(); - PoolVector<CVTTCompressionRowTask>::Read tasks_rb = tasks.read(); + const CVTTCompressionRowTask *tasks_rb = tasks.ptr(); job_queue.job_tasks = &tasks_rb[0]; job_queue.current_task = 0; @@ -304,14 +304,14 @@ void image_decompress_cvtt(Image *p_image) { int w = p_image->get_width(); int h = p_image->get_height(); - PoolVector<uint8_t>::Read rb = p_image->get_data().read(); + const uint8_t *rb = p_image->get_data().ptr(); - PoolVector<uint8_t> data; + Vector<uint8_t> data; int target_size = Image::get_image_data_size(w, h, target_format, p_image->has_mipmaps()); int mm_count = p_image->get_mipmap_count(); data.resize(target_size); - PoolVector<uint8_t>::Write wb = data.write(); + uint8_t *wb = data.ptrw(); int bytes_per_pixel = is_hdr ? 6 : 4; @@ -388,8 +388,5 @@ void image_decompress_cvtt(Image *p_image) { h >>= 1; } - rb.release(); - wb.release(); - p_image->create(p_image->get_width(), p_image->get_height(), p_image->has_mipmaps(), target_format, data); } diff --git a/modules/dds/texture_loader_dds.cpp b/modules/dds/texture_loader_dds.cpp index 5494744c48..a04989449c 100644 --- a/modules/dds/texture_loader_dds.cpp +++ b/modules/dds/texture_loader_dds.cpp @@ -222,7 +222,7 @@ RES ResourceFormatDDS::load(const String &p_path, const String &p_original_path, if (!(flags & DDSD_MIPMAPCOUNT)) mipmaps = 1; - PoolVector<uint8_t> src_data; + Vector<uint8_t> src_data; const DDSFormatInfo &info = dds_format_info[dds_format]; uint32_t w = width; @@ -245,8 +245,8 @@ RES ResourceFormatDDS::load(const String &p_path, const String &p_original_path, } src_data.resize(size); - PoolVector<uint8_t>::Write wb = src_data.write(); - f->get_buffer(wb.ptr(), size); + uint8_t *wb = src_data.ptrw(); + f->get_buffer(wb, size); } else if (info.palette) { @@ -278,8 +278,8 @@ RES ResourceFormatDDS::load(const String &p_path, const String &p_original_path, } src_data.resize(size + 256 * colsize); - PoolVector<uint8_t>::Write wb = src_data.write(); - f->get_buffer(wb.ptr(), size); + uint8_t *wb = src_data.ptrw(); + f->get_buffer(wb, size); for (int i = 0; i < 256; i++) { @@ -309,8 +309,8 @@ RES ResourceFormatDDS::load(const String &p_path, const String &p_original_path, size = size * 2; src_data.resize(size); - PoolVector<uint8_t>::Write wb = src_data.write(); - f->get_buffer(wb.ptr(), size); + uint8_t *wb = src_data.ptrw(); + f->get_buffer(wb, size); switch (dds_format) { diff --git a/modules/enet/doc_classes/NetworkedMultiplayerENet.xml b/modules/enet/doc_classes/NetworkedMultiplayerENet.xml index 76b3710e96..456bf649d2 100644 --- a/modules/enet/doc_classes/NetworkedMultiplayerENet.xml +++ b/modules/enet/doc_classes/NetworkedMultiplayerENet.xml @@ -104,6 +104,24 @@ The IP used when creating a server. This is set to the wildcard [code]"*"[/code] by default, which binds to all available interfaces. The given IP needs to be in IPv4 or IPv6 address format, for example: [code]"192.168.1.1"[/code]. </description> </method> + <method name="set_dtls_certificate"> + <return type="void"> + </return> + <argument index="0" name="certificate" type="X509Certificate"> + </argument> + <description> + Configure the [X509Certificate] to use when [member use_dtls] is [code]true[/code]. For servers, you must also setup the [CryptoKey] via [method set_dtls_key]. + </description> + </method> + <method name="set_dtls_key"> + <return type="void"> + </return> + <argument index="0" name="key" type="CryptoKey"> + </argument> + <description> + Configure the [CryptoKey] to use when [member use_dtls] is [code]true[/code]. Remember to also call [method set_dtls_certificate] to setup your [X509Certificate]. + </description> + </method> </methods> <members> <member name="always_ordered" type="bool" setter="set_always_ordered" getter="is_always_ordered" default="false"> @@ -115,6 +133,9 @@ <member name="compression_mode" type="int" setter="set_compression_mode" getter="get_compression_mode" enum="NetworkedMultiplayerENet.CompressionMode" default="0"> The compression method used for network packets. These have different tradeoffs of compression speed versus bandwidth, you may need to test which one works best for your use case if you use compression at all. </member> + <member name="dtls_verify" type="bool" setter="set_dtls_verify_enabled" getter="is_dtls_verify_enabled" default="true"> + Enable or disable certiticate verification when [member use_dtls] [code]true[/code]. + </member> <member name="refuse_new_connections" type="bool" setter="set_refuse_new_connections" getter="is_refusing_new_connections" override="true" default="false" /> <member name="server_relay" type="bool" setter="set_server_relay_enabled" getter="is_server_relay_enabled" default="true"> Enable or disable the server feature that notifies clients of other peers' connection/disconnection, and relays messages between them. When this option 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. @@ -123,6 +144,10 @@ Set the default channel to be used to transfer data. By default, this value is [code]-1[/code] which means that ENet will only use 2 channels, one for reliable and one for unreliable packets. Channel [code]0[/code] is reserved, and cannot be used. Setting this member to any value between [code]0[/code] and [member channel_count] (excluded) will force ENet to use that channel for sending data. </member> <member name="transfer_mode" type="int" setter="set_transfer_mode" getter="get_transfer_mode" override="true" enum="NetworkedMultiplayerPeer.TransferMode" default="2" /> + <member name="use_dtls" type="bool" setter="set_dtls_enabled" getter="is_dtls_enabled" default="false"> + When enabled, the client or server created by this peer, will use [PacketPeerDTLS] instead of raw UDP sockets for communicating with the remote peer. This will make the communication encrypted with DTLS at the cost of higher resource usage and potentially larger packet size. + Note: When creating a DTLS server, make sure you setup the key/certificate pair via [method set_dtls_key] and [method set_dtls_certificate]. For DTLS clients, have a look at the [member dtls_verify] option, and configure the certificate accordingly via [method set_dtls_certificate]. + </member> </members> <constants> <constant name="COMPRESS_NONE" value="0" enum="CompressionMode"> diff --git a/modules/enet/networked_multiplayer_enet.cpp b/modules/enet/networked_multiplayer_enet.cpp index 21dd758391..406eb467f0 100644 --- a/modules/enet/networked_multiplayer_enet.cpp +++ b/modules/enet/networked_multiplayer_enet.cpp @@ -49,7 +49,7 @@ void NetworkedMultiplayerENet::set_target_peer(int p_peer) { int NetworkedMultiplayerENet::get_packet_peer() const { - ERR_FAIL_COND_V(!active, 1); + ERR_FAIL_COND_V_MSG(!active, 1, "The multiplayer instance isn't currently active."); ERR_FAIL_COND_V(incoming_packets.size() == 0, 1); return incoming_packets.front()->get().from; @@ -57,7 +57,7 @@ int NetworkedMultiplayerENet::get_packet_peer() const { int NetworkedMultiplayerENet::get_packet_channel() const { - ERR_FAIL_COND_V(!active, -1); + ERR_FAIL_COND_V_MSG(!active, -1, "The multiplayer instance isn't currently active."); ERR_FAIL_COND_V(incoming_packets.size() == 0, -1); return incoming_packets.front()->get().channel; @@ -65,7 +65,7 @@ int NetworkedMultiplayerENet::get_packet_channel() const { int NetworkedMultiplayerENet::get_last_packet_channel() const { - ERR_FAIL_COND_V(!active, -1); + ERR_FAIL_COND_V_MSG(!active, -1, "The multiplayer instance isn't currently active."); ERR_FAIL_COND_V(!current_packet.packet, -1); return current_packet.channel; @@ -73,11 +73,12 @@ int NetworkedMultiplayerENet::get_last_packet_channel() const { Error NetworkedMultiplayerENet::create_server(int p_port, int p_max_clients, int p_in_bandwidth, int p_out_bandwidth) { - ERR_FAIL_COND_V(active, ERR_ALREADY_IN_USE); - ERR_FAIL_COND_V(p_port < 0 || p_port > 65535, ERR_INVALID_PARAMETER); - ERR_FAIL_COND_V(p_max_clients < 1 || p_max_clients > 4095, ERR_INVALID_PARAMETER); - ERR_FAIL_COND_V(p_in_bandwidth < 0, ERR_INVALID_PARAMETER); - ERR_FAIL_COND_V(p_out_bandwidth < 0, ERR_INVALID_PARAMETER); + ERR_FAIL_COND_V_MSG(active, ERR_ALREADY_IN_USE, "The multiplayer instance is already active."); + ERR_FAIL_COND_V_MSG(p_port < 0 || p_port > 65535, ERR_INVALID_PARAMETER, "The port number must be set between 0 and 65535 (inclusive)."); + ERR_FAIL_COND_V_MSG(p_max_clients < 1 || p_max_clients > 4095, ERR_INVALID_PARAMETER, "The number of clients must be set between 1 and 4095 (inclusive)."); + ERR_FAIL_COND_V_MSG(p_in_bandwidth < 0, ERR_INVALID_PARAMETER, "The incoming bandwidth limit must be greater than or equal to 0 (0 disables the limit)."); + ERR_FAIL_COND_V_MSG(p_out_bandwidth < 0, ERR_INVALID_PARAMETER, "The outgoing bandwidth limit must be greater than or equal to 0 (0 disables the limit)."); + ERR_FAIL_COND_V(dtls_enabled && (dtls_key.is_null() || dtls_cert.is_null()), ERR_INVALID_PARAMETER); ENetAddress address; memset(&address, 0, sizeof(address)); @@ -104,7 +105,12 @@ Error NetworkedMultiplayerENet::create_server(int p_port, int p_max_clients, int p_in_bandwidth /* limit incoming bandwidth if > 0 */, p_out_bandwidth /* limit outgoing bandwidth if > 0 */); - ERR_FAIL_COND_V(!host, ERR_CANT_CREATE); + ERR_FAIL_COND_V_MSG(!host, ERR_CANT_CREATE, "Couldn't create an ENet multiplayer server."); +#ifdef GODOT_ENET + if (dtls_enabled) { + enet_host_dtls_server_setup(host, dtls_key.ptr(), dtls_cert.ptr()); + } +#endif _setup_compressor(); active = true; @@ -116,11 +122,11 @@ Error NetworkedMultiplayerENet::create_server(int p_port, int p_max_clients, int } Error NetworkedMultiplayerENet::create_client(const String &p_address, int p_port, int p_in_bandwidth, int p_out_bandwidth, int p_client_port) { - ERR_FAIL_COND_V(active, ERR_ALREADY_IN_USE); - ERR_FAIL_COND_V(p_port < 0 || p_port > 65535, ERR_INVALID_PARAMETER); - ERR_FAIL_COND_V(p_client_port < 0 || p_client_port > 65535, ERR_INVALID_PARAMETER); - ERR_FAIL_COND_V(p_in_bandwidth < 0, ERR_INVALID_PARAMETER); - ERR_FAIL_COND_V(p_out_bandwidth < 0, ERR_INVALID_PARAMETER); + ERR_FAIL_COND_V_MSG(active, ERR_ALREADY_IN_USE, "The multiplayer instance is already active."); + ERR_FAIL_COND_V_MSG(p_port < 0 || p_port > 65535, ERR_INVALID_PARAMETER, "The server port number must be set between 0 and 65535 (inclusive)."); + ERR_FAIL_COND_V_MSG(p_client_port < 0 || p_client_port > 65535, ERR_INVALID_PARAMETER, "The client port number must be set between 0 and 65535 (inclusive)."); + ERR_FAIL_COND_V_MSG(p_in_bandwidth < 0, ERR_INVALID_PARAMETER, "The incoming bandwidth limit must be greater than or equal to 0 (0 disables the limit)."); + ERR_FAIL_COND_V_MSG(p_out_bandwidth < 0, ERR_INVALID_PARAMETER, "The outgoing bandwidth limit must be greater than or equal to 0 (0 disables the limit)."); if (p_client_port != 0) { ENetAddress c_client; @@ -135,7 +141,7 @@ Error NetworkedMultiplayerENet::create_client(const String &p_address, int p_por if (bind_ip.is_wildcard()) { c_client.host = 0; } else { - ERR_FAIL_COND_V(!bind_ip.is_ipv4(), ERR_INVALID_PARAMETER); + ERR_FAIL_COND_V_MSG(!bind_ip.is_ipv4(), ERR_INVALID_PARAMETER, "Wildcard IP addresses are only permitted in IPv4, not IPv6."); c_client.host = *(uint32_t *)bind_ip.get_ipv4(); } #endif @@ -155,7 +161,12 @@ Error NetworkedMultiplayerENet::create_client(const String &p_address, int p_por p_out_bandwidth /* limit outgoing bandwidth if > 0 */); } - ERR_FAIL_COND_V(!host, ERR_CANT_CREATE); + ERR_FAIL_COND_V_MSG(!host, ERR_CANT_CREATE, "Couldn't create the ENet client host."); +#ifdef GODOT_ENET + if (dtls_enabled) { + enet_host_dtls_client_setup(host, dtls_cert.ptr(), dtls_verify, p_address.utf8().get_data()); + } +#endif _setup_compressor(); @@ -169,14 +180,14 @@ Error NetworkedMultiplayerENet::create_client(const String &p_address, int p_por ip = IP::get_singleton()->resolve_hostname(p_address, IP::TYPE_IPV4); #endif - ERR_FAIL_COND_V(!ip.is_valid(), ERR_CANT_RESOLVE); + ERR_FAIL_COND_V_MSG(!ip.is_valid(), ERR_CANT_RESOLVE, "Couldn't resolve the server IP address or domain name."); } ENetAddress address; #ifdef GODOT_ENET enet_address_set_ip(&address, ip.get_ipv6(), 16); #else - ERR_FAIL_COND_V(!ip.is_ipv4(), ERR_INVALID_PARAMETER); + ERR_FAIL_COND_V_MSG(!ip.is_ipv4(), ERR_INVALID_PARAMETER, "Connecting to an IPv6 server isn't supported when using vanilla ENet. Recompile Godot with the bundled ENet library."); address.host = *(uint32_t *)ip.get_ipv4(); #endif address.port = p_port; @@ -188,7 +199,7 @@ Error NetworkedMultiplayerENet::create_client(const String &p_address, int p_por if (peer == NULL) { enet_host_destroy(host); - ERR_FAIL_COND_V(!peer, ERR_CANT_CREATE); + ERR_FAIL_COND_V_MSG(!peer, ERR_CANT_CREATE, "Couldn't connect to the ENet multiplayer server."); } // Technically safe to ignore the peer or anything else. @@ -203,7 +214,7 @@ Error NetworkedMultiplayerENet::create_client(const String &p_address, int p_por void NetworkedMultiplayerENet::poll() { - ERR_FAIL_COND(!active); + ERR_FAIL_COND_MSG(!active, "The multiplayer instance isn't currently active."); _pop_current_packet(); @@ -435,14 +446,14 @@ void NetworkedMultiplayerENet::poll() { } bool NetworkedMultiplayerENet::is_server() const { - ERR_FAIL_COND_V(!active, false); + ERR_FAIL_COND_V_MSG(!active, false, "The multiplayer instance isn't currently active."); return server; } void NetworkedMultiplayerENet::close_connection(uint32_t wait_usec) { - ERR_FAIL_COND(!active); + ERR_FAIL_COND_MSG(!active, "The multiplayer instance isn't currently active."); _pop_current_packet(); @@ -474,9 +485,9 @@ void NetworkedMultiplayerENet::close_connection(uint32_t wait_usec) { void NetworkedMultiplayerENet::disconnect_peer(int p_peer, bool now) { - ERR_FAIL_COND(!active); - ERR_FAIL_COND(!is_server()); - ERR_FAIL_COND(!peer_map.has(p_peer)); + ERR_FAIL_COND_MSG(!active, "The multiplayer instance isn't currently active."); + ERR_FAIL_COND_MSG(!is_server(), "Can't disconnect a peer when not acting as a server."); + ERR_FAIL_COND_MSG(!peer_map.has(p_peer), vformat("Peer ID %d not found in the list of peers.", p_peer)); if (now) { int *id = (int *)peer_map[p_peer]->data; @@ -515,7 +526,7 @@ int NetworkedMultiplayerENet::get_available_packet_count() const { Error NetworkedMultiplayerENet::get_packet(const uint8_t **r_buffer, int &r_buffer_size) { - ERR_FAIL_COND_V(incoming_packets.size() == 0, ERR_UNAVAILABLE); + ERR_FAIL_COND_V_MSG(incoming_packets.size() == 0, ERR_UNAVAILABLE, "No incoming packets available."); _pop_current_packet(); @@ -530,8 +541,8 @@ Error NetworkedMultiplayerENet::get_packet(const uint8_t **r_buffer, int &r_buff Error NetworkedMultiplayerENet::put_packet(const uint8_t *p_buffer, int p_buffer_size) { - ERR_FAIL_COND_V(!active, ERR_UNCONFIGURED); - ERR_FAIL_COND_V(connection_status != CONNECTION_CONNECTED, ERR_UNCONFIGURED); + ERR_FAIL_COND_V_MSG(!active, ERR_UNCONFIGURED, "The multiplayer instance isn't currently active."); + ERR_FAIL_COND_V_MSG(connection_status != CONNECTION_CONNECTED, ERR_UNCONFIGURED, "The multiplayer instance isn't currently connected to any server or client."); int packet_flags = 0; int channel = SYSCH_RELIABLE; @@ -562,7 +573,7 @@ Error NetworkedMultiplayerENet::put_packet(const uint8_t *p_buffer, int p_buffer if (target_peer != 0) { E = peer_map.find(ABS(target_peer)); - ERR_FAIL_COND_V_MSG(!E, ERR_INVALID_PARAMETER, "Invalid target peer '" + itos(target_peer) + "'."); + ERR_FAIL_COND_V_MSG(!E, ERR_INVALID_PARAMETER, vformat("Invalid target peer: %d", target_peer)); } ENetPacket *packet = enet_packet_create(NULL, p_buffer_size + 8, packet_flags); @@ -650,7 +661,7 @@ uint32_t NetworkedMultiplayerENet::_gen_unique_id() const { int NetworkedMultiplayerENet::get_unique_id() const { - ERR_FAIL_COND_V(!active, 0); + ERR_FAIL_COND_V_MSG(!active, 0, "The multiplayer instance isn't currently active."); return unique_id; } @@ -706,7 +717,7 @@ size_t NetworkedMultiplayerENet::enet_compress(void *context, const ENetBuffer * mode = Compression::MODE_ZSTD; } break; default: { - ERR_FAIL_V(0); + ERR_FAIL_V_MSG(0, vformat("Invalid ENet compression mode: %d", enet->compression_mode)); } } @@ -781,9 +792,9 @@ void NetworkedMultiplayerENet::enet_compressor_destroy(void *context) { IP_Address NetworkedMultiplayerENet::get_peer_address(int p_peer_id) const { - ERR_FAIL_COND_V(!peer_map.has(p_peer_id), IP_Address()); - ERR_FAIL_COND_V(!is_server() && p_peer_id != 1, IP_Address()); - ERR_FAIL_COND_V(peer_map[p_peer_id] == NULL, IP_Address()); + ERR_FAIL_COND_V_MSG(!peer_map.has(p_peer_id), IP_Address(), vformat("Peer ID %d not found in the list of peers.", p_peer_id)); + ERR_FAIL_COND_V_MSG(!is_server() && p_peer_id != 1, IP_Address(), "Can't get the address of peers other than the server (ID -1) when acting as a client."); + ERR_FAIL_COND_V_MSG(peer_map[p_peer_id] == NULL, IP_Address(), vformat("Peer ID %d found in the list of peers, but is null.", p_peer_id)); IP_Address out; #ifdef GODOT_ENET @@ -797,9 +808,9 @@ IP_Address NetworkedMultiplayerENet::get_peer_address(int p_peer_id) const { int NetworkedMultiplayerENet::get_peer_port(int p_peer_id) const { - ERR_FAIL_COND_V(!peer_map.has(p_peer_id), 0); - ERR_FAIL_COND_V(!is_server() && p_peer_id != 1, 0); - ERR_FAIL_COND_V(peer_map[p_peer_id] == NULL, 0); + ERR_FAIL_COND_V_MSG(!peer_map.has(p_peer_id), 0, vformat("Peer ID %d not found in the list of peers.", p_peer_id)); + ERR_FAIL_COND_V_MSG(!is_server() && p_peer_id != 1, 0, "Can't get the address of peers other than the server (ID -1) when acting as a client."); + ERR_FAIL_COND_V_MSG(peer_map[p_peer_id] == NULL, 0, vformat("Peer ID %d found in the list of peers, but is null.", p_peer_id)); #ifdef GODOT_ENET return peer_map[p_peer_id]->address.port; #else @@ -809,8 +820,8 @@ int NetworkedMultiplayerENet::get_peer_port(int p_peer_id) const { void NetworkedMultiplayerENet::set_transfer_channel(int p_channel) { - ERR_FAIL_COND(p_channel < -1 || p_channel >= channel_count); - ERR_FAIL_COND_MSG(p_channel == SYSCH_CONFIG, "Channel " + itos(SYSCH_CONFIG) + " is reserved."); + ERR_FAIL_COND_MSG(p_channel < -1 || p_channel >= channel_count, vformat("The transfer channel must be set between 0 and %d, inclusive (got %d).", channel_count - 1, p_channel)); + ERR_FAIL_COND_MSG(p_channel == SYSCH_CONFIG, vformat("The channel %d is reserved.", SYSCH_CONFIG)); transfer_channel = p_channel; } @@ -820,8 +831,8 @@ int NetworkedMultiplayerENet::get_transfer_channel() const { void NetworkedMultiplayerENet::set_channel_count(int p_channel) { - ERR_FAIL_COND(active); - ERR_FAIL_COND(p_channel < SYSCH_MAX); + ERR_FAIL_COND_MSG(active, "The channel count can't be set while the multiplayer instance is active."); + ERR_FAIL_COND_MSG(p_channel < SYSCH_MAX, vformat("The channel count must be greater than or equal to %d to account for reserved channels (got %d).", SYSCH_MAX, p_channel)); channel_count = p_channel; } @@ -838,7 +849,7 @@ bool NetworkedMultiplayerENet::is_always_ordered() const { } void NetworkedMultiplayerENet::set_server_relay_enabled(bool p_enabled) { - ERR_FAIL_COND(active); + ERR_FAIL_COND_MSG(active, "Server relaying can't be toggled while the multiplayer instance is active."); server_relay = p_enabled; } @@ -856,6 +867,12 @@ void NetworkedMultiplayerENet::_bind_methods() { ClassDB::bind_method(D_METHOD("set_compression_mode", "mode"), &NetworkedMultiplayerENet::set_compression_mode); ClassDB::bind_method(D_METHOD("get_compression_mode"), &NetworkedMultiplayerENet::get_compression_mode); ClassDB::bind_method(D_METHOD("set_bind_ip", "ip"), &NetworkedMultiplayerENet::set_bind_ip); + ClassDB::bind_method(D_METHOD("set_dtls_enabled", "enabled"), &NetworkedMultiplayerENet::set_dtls_enabled); + ClassDB::bind_method(D_METHOD("is_dtls_enabled"), &NetworkedMultiplayerENet::is_dtls_enabled); + ClassDB::bind_method(D_METHOD("set_dtls_key", "key"), &NetworkedMultiplayerENet::set_dtls_key); + ClassDB::bind_method(D_METHOD("set_dtls_certificate", "certificate"), &NetworkedMultiplayerENet::set_dtls_certificate); + ClassDB::bind_method(D_METHOD("set_dtls_verify_enabled", "enabled"), &NetworkedMultiplayerENet::set_dtls_verify_enabled); + ClassDB::bind_method(D_METHOD("is_dtls_verify_enabled"), &NetworkedMultiplayerENet::is_dtls_verify_enabled); ClassDB::bind_method(D_METHOD("get_peer_address", "id"), &NetworkedMultiplayerENet::get_peer_address); ClassDB::bind_method(D_METHOD("get_peer_port", "id"), &NetworkedMultiplayerENet::get_peer_port); @@ -875,6 +892,8 @@ void NetworkedMultiplayerENet::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::INT, "channel_count"), "set_channel_count", "get_channel_count"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "always_ordered"), "set_always_ordered", "is_always_ordered"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "server_relay"), "set_server_relay_enabled", "is_server_relay_enabled"); + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "dtls_verify"), "set_dtls_verify_enabled", "is_dtls_verify_enabled"); + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "use_dtls"), "set_dtls_enabled", "is_dtls_enabled"); BIND_ENUM_CONSTANT(COMPRESS_NONE); BIND_ENUM_CONSTANT(COMPRESS_RANGE_CODER); @@ -904,6 +923,9 @@ NetworkedMultiplayerENet::NetworkedMultiplayerENet() { enet_compressor.destroy = enet_compressor_destroy; bind_ip = IP_Address("*"); + + dtls_enabled = false; + dtls_verify = true; } NetworkedMultiplayerENet::~NetworkedMultiplayerENet() { @@ -916,7 +938,35 @@ NetworkedMultiplayerENet::~NetworkedMultiplayerENet() { // Sets IP for ENet to bind when using create_server or create_client // if no IP is set, then ENet bind to ENET_HOST_ANY void NetworkedMultiplayerENet::set_bind_ip(const IP_Address &p_ip) { - ERR_FAIL_COND(!p_ip.is_valid() && !p_ip.is_wildcard()); + ERR_FAIL_COND_MSG(!p_ip.is_valid() && !p_ip.is_wildcard(), vformat("Invalid bind IP address: %s", String(p_ip))); bind_ip = p_ip; } + +void NetworkedMultiplayerENet::set_dtls_enabled(bool p_enabled) { + ERR_FAIL_COND(active); + dtls_enabled = p_enabled; +} + +bool NetworkedMultiplayerENet::is_dtls_enabled() const { + return dtls_enabled; +} + +void NetworkedMultiplayerENet::set_dtls_verify_enabled(bool p_enabled) { + ERR_FAIL_COND(active); + dtls_verify = p_enabled; +} + +bool NetworkedMultiplayerENet::is_dtls_verify_enabled() const { + return dtls_verify; +} + +void NetworkedMultiplayerENet::set_dtls_key(Ref<CryptoKey> p_key) { + ERR_FAIL_COND(active); + dtls_key = p_key; +} + +void NetworkedMultiplayerENet::set_dtls_certificate(Ref<X509Certificate> p_cert) { + ERR_FAIL_COND(active); + dtls_cert = p_cert; +} diff --git a/modules/enet/networked_multiplayer_enet.h b/modules/enet/networked_multiplayer_enet.h index 11487b99a5..ff436ce2c0 100644 --- a/modules/enet/networked_multiplayer_enet.h +++ b/modules/enet/networked_multiplayer_enet.h @@ -31,6 +31,7 @@ #ifndef NETWORKED_MULTIPLAYER_ENET_H #define NETWORKED_MULTIPLAYER_ENET_H +#include "core/crypto/crypto.h" #include "core/io/compression.h" #include "core/io/networked_multiplayer_peer.h" @@ -111,6 +112,11 @@ private: IP_Address bind_ip; + bool dtls_enabled; + Ref<CryptoKey> dtls_key; + Ref<X509Certificate> dtls_cert; + bool dtls_verify; + protected: static void _bind_methods(); @@ -166,6 +172,12 @@ public: ~NetworkedMultiplayerENet(); void set_bind_ip(const IP_Address &p_ip); + void set_dtls_enabled(bool p_enabled); + bool is_dtls_enabled() const; + void set_dtls_verify_enabled(bool p_enabled); + bool is_dtls_verify_enabled() const; + void set_dtls_key(Ref<CryptoKey> p_key); + void set_dtls_certificate(Ref<X509Certificate> p_cert); }; VARIANT_ENUM_CAST(NetworkedMultiplayerENet::CompressionMode); diff --git a/modules/etc/image_etc.cpp b/modules/etc/image_etc.cpp index 24ee8e458e..0dbd5ca905 100644 --- a/modules/etc/image_etc.cpp +++ b/modules/etc/image_etc.cpp @@ -143,16 +143,16 @@ static void _compress_etc(Image *p_img, float p_lossy_quality, bool force_etc1_f } } - PoolVector<uint8_t>::Read r = img->get_data().read(); - ERR_FAIL_COND(!r.ptr()); + const uint8_t *r = img->get_data().ptr(); + ERR_FAIL_COND(!r); unsigned int target_size = Image::get_image_data_size(imgw, imgh, etc_format, p_img->has_mipmaps()); int mmc = 1 + (p_img->has_mipmaps() ? Image::get_image_required_mipmaps(imgw, imgh, etc_format) : 0); - PoolVector<uint8_t> dst_data; + Vector<uint8_t> dst_data; dst_data.resize(target_size); - PoolVector<uint8_t>::Write w = dst_data.write(); + uint8_t *w = dst_data.ptrw(); // prepare parameters to be passed to etc2comp int num_cpus = OS::get_singleton()->get_processor_count(); diff --git a/modules/etc/texture_loader_pkm.cpp b/modules/etc/texture_loader_pkm.cpp index facdc2e473..e460c70cec 100644 --- a/modules/etc/texture_loader_pkm.cpp +++ b/modules/etc/texture_loader_pkm.cpp @@ -71,13 +71,12 @@ RES ResourceFormatPKM::load(const String &p_path, const String &p_original_path, h.origWidth = f->get_16(); h.origHeight = f->get_16(); - PoolVector<uint8_t> src_data; + Vector<uint8_t> src_data; uint32_t size = h.texWidth * h.texHeight / 2; src_data.resize(size); - PoolVector<uint8_t>::Write wb = src_data.write(); - f->get_buffer(wb.ptr(), size); - wb.release(); + uint8_t *wb = src_data.ptrw(); + f->get_buffer(wb, size); int mipmaps = h.format; int width = h.origWidth; diff --git a/modules/gdnative/arvr/arvr_interface_gdnative.cpp b/modules/gdnative/arvr/arvr_interface_gdnative.cpp index 7c791a3108..a033c2b7f9 100644 --- a/modules/gdnative/arvr/arvr_interface_gdnative.cpp +++ b/modules/gdnative/arvr/arvr_interface_gdnative.cpp @@ -277,7 +277,9 @@ godot_transform GDAPI godot_arvr_get_reference_frame() { void GDAPI godot_arvr_blit(godot_int p_eye, godot_rid *p_render_target, godot_rect2 *p_rect) { // blits out our texture as is, handy for preview display of one of the eyes that is already rendered with lens distortion on an external HMD ARVRInterface::Eyes eye = (ARVRInterface::Eyes)p_eye; +#if 0 RID *render_target = (RID *)p_render_target; +#endif Rect2 screen_rect = *(Rect2 *)p_rect; if (eye == ARVRInterface::EYE_LEFT) { @@ -297,9 +299,12 @@ void GDAPI godot_arvr_blit(godot_int p_eye, godot_rid *p_render_target, godot_re godot_int GDAPI godot_arvr_get_texid(godot_rid *p_render_target) { // In order to send off our textures to display on our hardware we need the opengl texture ID instead of the render target RID // This is a handy function to expose that. +#if 0 RID *render_target = (RID *)p_render_target; RID eye_texture = VSG::storage->render_target_get_texture(*render_target); +#endif + #ifndef _MSC_VER #warning need to obtain this ID again #endif diff --git a/modules/gdnative/arvr/arvr_interface_gdnative.h b/modules/gdnative/arvr/arvr_interface_gdnative.h index 1077bef994..e38eb435c6 100644 --- a/modules/gdnative/arvr/arvr_interface_gdnative.h +++ b/modules/gdnative/arvr/arvr_interface_gdnative.h @@ -75,8 +75,8 @@ public: virtual bool is_stereo(); virtual Transform get_transform_for_eye(ARVRInterface::Eyes p_eye, const Transform &p_cam_transform); - // we expose a PoolVector<float> version of this function to GDNative - PoolVector<float> _get_projection_for_eye(ARVRInterface::Eyes p_eye, real_t p_aspect, real_t p_z_near, real_t p_z_far); + // we expose a Vector<float> version of this function to GDNative + Vector<float> _get_projection_for_eye(ARVRInterface::Eyes p_eye, real_t p_aspect, real_t p_z_near, real_t p_z_far); // and a CameraMatrix version to ARVRServer virtual CameraMatrix get_projection_for_eye(ARVRInterface::Eyes p_eye, real_t p_aspect, real_t p_z_near, real_t p_z_far); diff --git a/modules/gdnative/doc_classes/GDNative.xml b/modules/gdnative/doc_classes/GDNative.xml index b4b63bf04a..44d9e32ed8 100644 --- a/modules/gdnative/doc_classes/GDNative.xml +++ b/modules/gdnative/doc_classes/GDNative.xml @@ -10,9 +10,9 @@ <method name="call_native"> <return type="Variant"> </return> - <argument index="0" name="calling_type" type="String"> + <argument index="0" name="calling_type" type="StringName"> </argument> - <argument index="1" name="procedure_name" type="String"> + <argument index="1" name="procedure_name" type="StringName"> </argument> <argument index="2" name="arguments" type="Array"> </argument> diff --git a/modules/gdnative/doc_classes/GDNativeLibrary.xml b/modules/gdnative/doc_classes/GDNativeLibrary.xml index 820f126dd1..601e132d42 100644 --- a/modules/gdnative/doc_classes/GDNativeLibrary.xml +++ b/modules/gdnative/doc_classes/GDNativeLibrary.xml @@ -12,7 +12,7 @@ </tutorials> <methods> <method name="get_current_dependencies" qualifiers="const"> - <return type="PoolStringArray"> + <return type="PackedStringArray"> </return> <description> Returns paths to all dependency libraries for the current platform and architecture. diff --git a/modules/gdnative/doc_classes/NativeScript.xml b/modules/gdnative/doc_classes/NativeScript.xml index b21d16a6fd..f2e9cac6dc 100644 --- a/modules/gdnative/doc_classes/NativeScript.xml +++ b/modules/gdnative/doc_classes/NativeScript.xml @@ -17,7 +17,7 @@ <method name="get_method_documentation" qualifiers="const"> <return type="String"> </return> - <argument index="0" name="method" type="String"> + <argument index="0" name="method" type="StringName"> </argument> <description> Returns the documentation string that was previously set with [code]godot_nativescript_set_method_documentation[/code]. @@ -26,7 +26,7 @@ <method name="get_property_documentation" qualifiers="const"> <return type="String"> </return> - <argument index="0" name="path" type="String"> + <argument index="0" name="path" type="StringName"> </argument> <description> Returns the documentation string that was previously set with [code]godot_nativescript_set_property_documentation[/code]. @@ -35,7 +35,7 @@ <method name="get_signal_documentation" qualifiers="const"> <return type="String"> </return> - <argument index="0" name="signal_name" type="String"> + <argument index="0" name="signal_name" type="StringName"> </argument> <description> Returns the documentation string that was previously set with [code]godot_nativescript_set_signal_documentation[/code]. diff --git a/modules/gdnative/gdnative/array.cpp b/modules/gdnative/gdnative/array.cpp index 4a0308edec..0c764ab8fd 100644 --- a/modules/gdnative/gdnative/array.cpp +++ b/modules/gdnative/gdnative/array.cpp @@ -34,7 +34,6 @@ #include "core/os/memory.h" #include "core/color.h" -#include "core/pool_vector.h" #include "core/variant.h" @@ -53,9 +52,9 @@ void GDAPI godot_array_new_copy(godot_array *r_dest, const godot_array *p_src) { memnew_placement(dest, Array(*src)); } -void GDAPI godot_array_new_pool_color_array(godot_array *r_dest, const godot_pool_color_array *p_pca) { +void GDAPI godot_array_new_packed_color_array(godot_array *r_dest, const godot_packed_color_array *p_pca) { Array *dest = (Array *)r_dest; - PoolVector<Color> *pca = (PoolVector<Color> *)p_pca; + Vector<Color> *pca = (Vector<Color> *)p_pca; memnew_placement(dest, Array); dest->resize(pca->size()); @@ -65,9 +64,9 @@ void GDAPI godot_array_new_pool_color_array(godot_array *r_dest, const godot_poo } } -void GDAPI godot_array_new_pool_vector3_array(godot_array *r_dest, const godot_pool_vector3_array *p_pv3a) { +void GDAPI godot_array_new_packed_vector3_array(godot_array *r_dest, const godot_packed_vector3_array *p_pv3a) { Array *dest = (Array *)r_dest; - PoolVector<Vector3> *pca = (PoolVector<Vector3> *)p_pv3a; + Vector<Vector3> *pca = (Vector<Vector3> *)p_pv3a; memnew_placement(dest, Array); dest->resize(pca->size()); @@ -77,9 +76,9 @@ void GDAPI godot_array_new_pool_vector3_array(godot_array *r_dest, const godot_p } } -void GDAPI godot_array_new_pool_vector2_array(godot_array *r_dest, const godot_pool_vector2_array *p_pv2a) { +void GDAPI godot_array_new_packed_vector2_array(godot_array *r_dest, const godot_packed_vector2_array *p_pv2a) { Array *dest = (Array *)r_dest; - PoolVector<Vector2> *pca = (PoolVector<Vector2> *)p_pv2a; + Vector<Vector2> *pca = (Vector<Vector2> *)p_pv2a; memnew_placement(dest, Array); dest->resize(pca->size()); @@ -89,9 +88,9 @@ void GDAPI godot_array_new_pool_vector2_array(godot_array *r_dest, const godot_p } } -void GDAPI godot_array_new_pool_string_array(godot_array *r_dest, const godot_pool_string_array *p_psa) { +void GDAPI godot_array_new_packed_string_array(godot_array *r_dest, const godot_packed_string_array *p_psa) { Array *dest = (Array *)r_dest; - PoolVector<String> *pca = (PoolVector<String> *)p_psa; + Vector<String> *pca = (Vector<String> *)p_psa; memnew_placement(dest, Array); dest->resize(pca->size()); @@ -101,9 +100,9 @@ void GDAPI godot_array_new_pool_string_array(godot_array *r_dest, const godot_po } } -void GDAPI godot_array_new_pool_real_array(godot_array *r_dest, const godot_pool_real_array *p_pra) { +void GDAPI godot_array_new_packed_real_array(godot_array *r_dest, const godot_packed_real_array *p_pra) { Array *dest = (Array *)r_dest; - PoolVector<godot_real> *pca = (PoolVector<godot_real> *)p_pra; + Vector<godot_real> *pca = (Vector<godot_real> *)p_pra; memnew_placement(dest, Array); dest->resize(pca->size()); @@ -113,9 +112,9 @@ void GDAPI godot_array_new_pool_real_array(godot_array *r_dest, const godot_pool } } -void GDAPI godot_array_new_pool_int_array(godot_array *r_dest, const godot_pool_int_array *p_pia) { +void GDAPI godot_array_new_packed_int_array(godot_array *r_dest, const godot_packed_int_array *p_pia) { Array *dest = (Array *)r_dest; - PoolVector<godot_int> *pca = (PoolVector<godot_int> *)p_pia; + Vector<godot_int> *pca = (Vector<godot_int> *)p_pia; memnew_placement(dest, Array); dest->resize(pca->size()); @@ -125,9 +124,9 @@ void GDAPI godot_array_new_pool_int_array(godot_array *r_dest, const godot_pool_ } } -void GDAPI godot_array_new_pool_byte_array(godot_array *r_dest, const godot_pool_byte_array *p_pba) { +void GDAPI godot_array_new_packed_byte_array(godot_array *r_dest, const godot_packed_byte_array *p_pba) { Array *dest = (Array *)r_dest; - PoolVector<uint8_t> *pca = (PoolVector<uint8_t> *)p_pba; + Vector<uint8_t> *pca = (Vector<uint8_t> *)p_pba; memnew_placement(dest, Array); dest->resize(pca->size()); diff --git a/modules/gdnative/gdnative/gdnative.cpp b/modules/gdnative/gdnative/gdnative.cpp index bb868d3b52..d996b006a5 100644 --- a/modules/gdnative/gdnative/gdnative.cpp +++ b/modules/gdnative/gdnative/gdnative.cpp @@ -79,7 +79,7 @@ godot_variant GDAPI godot_method_bind_call(godot_method_bind *p_method_bind, god Variant *ret_val = (Variant *)&ret; - Variant::CallError r_error; + Callable::CallError r_error; *ret_val = mb->call(o, args, p_arg_count, r_error); if (p_call_error) { @@ -166,10 +166,6 @@ void _gdnative_report_loading_error(const godot_object *p_library, const char *p _err_print_error("gdnative_init", library->get_current_library_path().utf8().ptr(), 0, message.utf8().ptr()); } -bool GDAPI godot_is_instance_valid(const godot_object *p_object) { - return ObjectDB::instance_validate((Object *)p_object); -} - godot_object GDAPI *godot_instance_from_id(godot_int p_instance_id) { return (godot_object *)ObjectDB::get_instance(ObjectID(p_instance_id)); } diff --git a/modules/gdnative/gdnative/pool_arrays.cpp b/modules/gdnative/gdnative/pool_arrays.cpp index bae1290d59..589b4d4dfe 100644 --- a/modules/gdnative/gdnative/pool_arrays.cpp +++ b/modules/gdnative/gdnative/pool_arrays.cpp @@ -31,7 +31,7 @@ #include "gdnative/pool_arrays.h" #include "core/array.h" -#include "core/pool_vector.h" + #include "core/variant.h" #include "core/color.h" @@ -46,21 +46,21 @@ extern "C" { // byte -void GDAPI godot_pool_byte_array_new(godot_pool_byte_array *r_dest) { - PoolVector<uint8_t> *dest = (PoolVector<uint8_t> *)r_dest; - memnew_placement(dest, PoolVector<uint8_t>); +void GDAPI godot_packed_byte_array_new(godot_packed_byte_array *r_dest) { + Vector<uint8_t> *dest = (Vector<uint8_t> *)r_dest; + memnew_placement(dest, Vector<uint8_t>); } -void GDAPI godot_pool_byte_array_new_copy(godot_pool_byte_array *r_dest, const godot_pool_byte_array *p_src) { - PoolVector<uint8_t> *dest = (PoolVector<uint8_t> *)r_dest; - const PoolVector<uint8_t> *src = (const PoolVector<uint8_t> *)p_src; - memnew_placement(dest, PoolVector<uint8_t>(*src)); +void GDAPI godot_packed_byte_array_new_copy(godot_packed_byte_array *r_dest, const godot_packed_byte_array *p_src) { + Vector<uint8_t> *dest = (Vector<uint8_t> *)r_dest; + const Vector<uint8_t> *src = (const Vector<uint8_t> *)p_src; + memnew_placement(dest, Vector<uint8_t>(*src)); } -void GDAPI godot_pool_byte_array_new_with_array(godot_pool_byte_array *r_dest, const godot_array *p_a) { - PoolVector<uint8_t> *dest = (PoolVector<uint8_t> *)r_dest; +void GDAPI godot_packed_byte_array_new_with_array(godot_packed_byte_array *r_dest, const godot_array *p_a) { + Vector<uint8_t> *dest = (Vector<uint8_t> *)r_dest; Array *a = (Array *)p_a; - memnew_placement(dest, PoolVector<uint8_t>); + memnew_placement(dest, Vector<uint8_t>); dest->resize(a->size()); for (int i = 0; i < a->size(); i++) { @@ -68,93 +68,83 @@ void GDAPI godot_pool_byte_array_new_with_array(godot_pool_byte_array *r_dest, c } } -void GDAPI godot_pool_byte_array_append(godot_pool_byte_array *p_self, const uint8_t p_data) { - PoolVector<uint8_t> *self = (PoolVector<uint8_t> *)p_self; - self->append(p_data); +void GDAPI godot_packed_byte_array_append(godot_packed_byte_array *p_self, const uint8_t p_data) { + Vector<uint8_t> *self = (Vector<uint8_t> *)p_self; + self->push_back(p_data); } -void GDAPI godot_pool_byte_array_append_array(godot_pool_byte_array *p_self, const godot_pool_byte_array *p_array) { - PoolVector<uint8_t> *self = (PoolVector<uint8_t> *)p_self; - PoolVector<uint8_t> *array = (PoolVector<uint8_t> *)p_array; +void GDAPI godot_packed_byte_array_append_array(godot_packed_byte_array *p_self, const godot_packed_byte_array *p_array) { + Vector<uint8_t> *self = (Vector<uint8_t> *)p_self; + Vector<uint8_t> *array = (Vector<uint8_t> *)p_array; self->append_array(*array); } -godot_error GDAPI godot_pool_byte_array_insert(godot_pool_byte_array *p_self, const godot_int p_idx, const uint8_t p_data) { - PoolVector<uint8_t> *self = (PoolVector<uint8_t> *)p_self; +godot_error GDAPI godot_packed_byte_array_insert(godot_packed_byte_array *p_self, const godot_int p_idx, const uint8_t p_data) { + Vector<uint8_t> *self = (Vector<uint8_t> *)p_self; return (godot_error)self->insert(p_idx, p_data); } -void GDAPI godot_pool_byte_array_invert(godot_pool_byte_array *p_self) { - PoolVector<uint8_t> *self = (PoolVector<uint8_t> *)p_self; +void GDAPI godot_packed_byte_array_invert(godot_packed_byte_array *p_self) { + Vector<uint8_t> *self = (Vector<uint8_t> *)p_self; self->invert(); } -void GDAPI godot_pool_byte_array_push_back(godot_pool_byte_array *p_self, const uint8_t p_data) { - PoolVector<uint8_t> *self = (PoolVector<uint8_t> *)p_self; +void GDAPI godot_packed_byte_array_push_back(godot_packed_byte_array *p_self, const uint8_t p_data) { + Vector<uint8_t> *self = (Vector<uint8_t> *)p_self; self->push_back(p_data); } -void GDAPI godot_pool_byte_array_remove(godot_pool_byte_array *p_self, const godot_int p_idx) { - PoolVector<uint8_t> *self = (PoolVector<uint8_t> *)p_self; +void GDAPI godot_packed_byte_array_remove(godot_packed_byte_array *p_self, const godot_int p_idx) { + Vector<uint8_t> *self = (Vector<uint8_t> *)p_self; self->remove(p_idx); } -void GDAPI godot_pool_byte_array_resize(godot_pool_byte_array *p_self, const godot_int p_size) { - PoolVector<uint8_t> *self = (PoolVector<uint8_t> *)p_self; +void GDAPI godot_packed_byte_array_resize(godot_packed_byte_array *p_self, const godot_int p_size) { + Vector<uint8_t> *self = (Vector<uint8_t> *)p_self; self->resize(p_size); } -godot_pool_byte_array_read_access GDAPI *godot_pool_byte_array_read(const godot_pool_byte_array *p_self) { - const PoolVector<uint8_t> *self = (const PoolVector<uint8_t> *)p_self; - return (godot_pool_byte_array_read_access *)memnew(PoolVector<uint8_t>::Read(self->read())); -} - -godot_pool_byte_array_write_access GDAPI *godot_pool_byte_array_write(godot_pool_byte_array *p_self) { - PoolVector<uint8_t> *self = (PoolVector<uint8_t> *)p_self; - return (godot_pool_byte_array_write_access *)memnew(PoolVector<uint8_t>::Write(self->write())); -} - -void GDAPI godot_pool_byte_array_set(godot_pool_byte_array *p_self, const godot_int p_idx, const uint8_t p_data) { - PoolVector<uint8_t> *self = (PoolVector<uint8_t> *)p_self; +void GDAPI godot_packed_byte_array_set(godot_packed_byte_array *p_self, const godot_int p_idx, const uint8_t p_data) { + Vector<uint8_t> *self = (Vector<uint8_t> *)p_self; self->set(p_idx, p_data); } -uint8_t GDAPI godot_pool_byte_array_get(const godot_pool_byte_array *p_self, const godot_int p_idx) { - const PoolVector<uint8_t> *self = (const PoolVector<uint8_t> *)p_self; +uint8_t GDAPI godot_packed_byte_array_get(const godot_packed_byte_array *p_self, const godot_int p_idx) { + const Vector<uint8_t> *self = (const Vector<uint8_t> *)p_self; return self->get(p_idx); } -godot_int GDAPI godot_pool_byte_array_size(const godot_pool_byte_array *p_self) { - const PoolVector<uint8_t> *self = (const PoolVector<uint8_t> *)p_self; +godot_int GDAPI godot_packed_byte_array_size(const godot_packed_byte_array *p_self) { + const Vector<uint8_t> *self = (const Vector<uint8_t> *)p_self; return self->size(); } -godot_bool GDAPI godot_pool_byte_array_empty(const godot_pool_byte_array *p_self) { - const PoolVector<uint8_t> *self = (const PoolVector<uint8_t> *)p_self; +godot_bool GDAPI godot_packed_byte_array_empty(const godot_packed_byte_array *p_self) { + const Vector<uint8_t> *self = (const Vector<uint8_t> *)p_self; return self->empty(); } -void GDAPI godot_pool_byte_array_destroy(godot_pool_byte_array *p_self) { - ((PoolVector<uint8_t> *)p_self)->~PoolVector(); +void GDAPI godot_packed_byte_array_destroy(godot_packed_byte_array *p_self) { + ((Vector<uint8_t> *)p_self)->~Vector(); } // int -void GDAPI godot_pool_int_array_new(godot_pool_int_array *r_dest) { - PoolVector<godot_int> *dest = (PoolVector<godot_int> *)r_dest; - memnew_placement(dest, PoolVector<godot_int>); +void GDAPI godot_packed_int_array_new(godot_packed_int_array *r_dest) { + Vector<godot_int> *dest = (Vector<godot_int> *)r_dest; + memnew_placement(dest, Vector<godot_int>); } -void GDAPI godot_pool_int_array_new_copy(godot_pool_int_array *r_dest, const godot_pool_int_array *p_src) { - PoolVector<godot_int> *dest = (PoolVector<godot_int> *)r_dest; - const PoolVector<godot_int> *src = (const PoolVector<godot_int> *)p_src; - memnew_placement(dest, PoolVector<godot_int>(*src)); +void GDAPI godot_packed_int_array_new_copy(godot_packed_int_array *r_dest, const godot_packed_int_array *p_src) { + Vector<godot_int> *dest = (Vector<godot_int> *)r_dest; + const Vector<godot_int> *src = (const Vector<godot_int> *)p_src; + memnew_placement(dest, Vector<godot_int>(*src)); } -void GDAPI godot_pool_int_array_new_with_array(godot_pool_int_array *r_dest, const godot_array *p_a) { - PoolVector<godot_int> *dest = (PoolVector<godot_int> *)r_dest; +void GDAPI godot_packed_int_array_new_with_array(godot_packed_int_array *r_dest, const godot_array *p_a) { + Vector<godot_int> *dest = (Vector<godot_int> *)r_dest; Array *a = (Array *)p_a; - memnew_placement(dest, PoolVector<godot_int>); + memnew_placement(dest, Vector<godot_int>); dest->resize(a->size()); for (int i = 0; i < a->size(); i++) { @@ -162,93 +152,83 @@ void GDAPI godot_pool_int_array_new_with_array(godot_pool_int_array *r_dest, con } } -void GDAPI godot_pool_int_array_append(godot_pool_int_array *p_self, const godot_int p_data) { - PoolVector<godot_int> *self = (PoolVector<godot_int> *)p_self; - self->append(p_data); +void GDAPI godot_packed_int_array_append(godot_packed_int_array *p_self, const godot_int p_data) { + Vector<godot_int> *self = (Vector<godot_int> *)p_self; + self->push_back(p_data); } -void GDAPI godot_pool_int_array_append_array(godot_pool_int_array *p_self, const godot_pool_int_array *p_array) { - PoolVector<godot_int> *self = (PoolVector<godot_int> *)p_self; - PoolVector<godot_int> *array = (PoolVector<godot_int> *)p_array; +void GDAPI godot_packed_int_array_append_array(godot_packed_int_array *p_self, const godot_packed_int_array *p_array) { + Vector<godot_int> *self = (Vector<godot_int> *)p_self; + Vector<godot_int> *array = (Vector<godot_int> *)p_array; self->append_array(*array); } -godot_error GDAPI godot_pool_int_array_insert(godot_pool_int_array *p_self, const godot_int p_idx, const godot_int p_data) { - PoolVector<godot_int> *self = (PoolVector<godot_int> *)p_self; +godot_error GDAPI godot_packed_int_array_insert(godot_packed_int_array *p_self, const godot_int p_idx, const godot_int p_data) { + Vector<godot_int> *self = (Vector<godot_int> *)p_self; return (godot_error)self->insert(p_idx, p_data); } -void GDAPI godot_pool_int_array_invert(godot_pool_int_array *p_self) { - PoolVector<godot_int> *self = (PoolVector<godot_int> *)p_self; +void GDAPI godot_packed_int_array_invert(godot_packed_int_array *p_self) { + Vector<godot_int> *self = (Vector<godot_int> *)p_self; self->invert(); } -void GDAPI godot_pool_int_array_push_back(godot_pool_int_array *p_self, const godot_int p_data) { - PoolVector<godot_int> *self = (PoolVector<godot_int> *)p_self; +void GDAPI godot_packed_int_array_push_back(godot_packed_int_array *p_self, const godot_int p_data) { + Vector<godot_int> *self = (Vector<godot_int> *)p_self; self->push_back(p_data); } -void GDAPI godot_pool_int_array_remove(godot_pool_int_array *p_self, const godot_int p_idx) { - PoolVector<godot_int> *self = (PoolVector<godot_int> *)p_self; +void GDAPI godot_packed_int_array_remove(godot_packed_int_array *p_self, const godot_int p_idx) { + Vector<godot_int> *self = (Vector<godot_int> *)p_self; self->remove(p_idx); } -void GDAPI godot_pool_int_array_resize(godot_pool_int_array *p_self, const godot_int p_size) { - PoolVector<godot_int> *self = (PoolVector<godot_int> *)p_self; +void GDAPI godot_packed_int_array_resize(godot_packed_int_array *p_self, const godot_int p_size) { + Vector<godot_int> *self = (Vector<godot_int> *)p_self; self->resize(p_size); } -godot_pool_int_array_read_access GDAPI *godot_pool_int_array_read(const godot_pool_int_array *p_self) { - const PoolVector<godot_int> *self = (const PoolVector<godot_int> *)p_self; - return (godot_pool_int_array_read_access *)memnew(PoolVector<godot_int>::Read(self->read())); -} - -godot_pool_int_array_write_access GDAPI *godot_pool_int_array_write(godot_pool_int_array *p_self) { - PoolVector<godot_int> *self = (PoolVector<godot_int> *)p_self; - return (godot_pool_int_array_write_access *)memnew(PoolVector<godot_int>::Write(self->write())); -} - -void GDAPI godot_pool_int_array_set(godot_pool_int_array *p_self, const godot_int p_idx, const godot_int p_data) { - PoolVector<godot_int> *self = (PoolVector<godot_int> *)p_self; +void GDAPI godot_packed_int_array_set(godot_packed_int_array *p_self, const godot_int p_idx, const godot_int p_data) { + Vector<godot_int> *self = (Vector<godot_int> *)p_self; self->set(p_idx, p_data); } -godot_int GDAPI godot_pool_int_array_get(const godot_pool_int_array *p_self, const godot_int p_idx) { - const PoolVector<godot_int> *self = (const PoolVector<godot_int> *)p_self; +godot_int GDAPI godot_packed_int_array_get(const godot_packed_int_array *p_self, const godot_int p_idx) { + const Vector<godot_int> *self = (const Vector<godot_int> *)p_self; return self->get(p_idx); } -godot_int GDAPI godot_pool_int_array_size(const godot_pool_int_array *p_self) { - const PoolVector<godot_int> *self = (const PoolVector<godot_int> *)p_self; +godot_int GDAPI godot_packed_int_array_size(const godot_packed_int_array *p_self) { + const Vector<godot_int> *self = (const Vector<godot_int> *)p_self; return self->size(); } -godot_bool GDAPI godot_pool_int_array_empty(const godot_pool_int_array *p_self) { - const PoolVector<godot_int> *self = (const PoolVector<godot_int> *)p_self; +godot_bool GDAPI godot_packed_int_array_empty(const godot_packed_int_array *p_self) { + const Vector<godot_int> *self = (const Vector<godot_int> *)p_self; return self->empty(); } -void GDAPI godot_pool_int_array_destroy(godot_pool_int_array *p_self) { - ((PoolVector<godot_int> *)p_self)->~PoolVector(); +void GDAPI godot_packed_int_array_destroy(godot_packed_int_array *p_self) { + ((Vector<godot_int> *)p_self)->~Vector(); } // real -void GDAPI godot_pool_real_array_new(godot_pool_real_array *r_dest) { - PoolVector<godot_real> *dest = (PoolVector<godot_real> *)r_dest; - memnew_placement(dest, PoolVector<godot_real>); +void GDAPI godot_packed_real_array_new(godot_packed_real_array *r_dest) { + Vector<godot_real> *dest = (Vector<godot_real> *)r_dest; + memnew_placement(dest, Vector<godot_real>); } -void GDAPI godot_pool_real_array_new_copy(godot_pool_real_array *r_dest, const godot_pool_real_array *p_src) { - PoolVector<godot_real> *dest = (PoolVector<godot_real> *)r_dest; - const PoolVector<godot_real> *src = (const PoolVector<godot_real> *)p_src; - memnew_placement(dest, PoolVector<godot_real>(*src)); +void GDAPI godot_packed_real_array_new_copy(godot_packed_real_array *r_dest, const godot_packed_real_array *p_src) { + Vector<godot_real> *dest = (Vector<godot_real> *)r_dest; + const Vector<godot_real> *src = (const Vector<godot_real> *)p_src; + memnew_placement(dest, Vector<godot_real>(*src)); } -void GDAPI godot_pool_real_array_new_with_array(godot_pool_real_array *r_dest, const godot_array *p_a) { - PoolVector<godot_real> *dest = (PoolVector<godot_real> *)r_dest; +void GDAPI godot_packed_real_array_new_with_array(godot_packed_real_array *r_dest, const godot_array *p_a) { + Vector<godot_real> *dest = (Vector<godot_real> *)r_dest; Array *a = (Array *)p_a; - memnew_placement(dest, PoolVector<godot_real>); + memnew_placement(dest, Vector<godot_real>); dest->resize(a->size()); for (int i = 0; i < a->size(); i++) { @@ -256,93 +236,83 @@ void GDAPI godot_pool_real_array_new_with_array(godot_pool_real_array *r_dest, c } } -void GDAPI godot_pool_real_array_append(godot_pool_real_array *p_self, const godot_real p_data) { - PoolVector<godot_real> *self = (PoolVector<godot_real> *)p_self; - self->append(p_data); +void GDAPI godot_packed_real_array_append(godot_packed_real_array *p_self, const godot_real p_data) { + Vector<godot_real> *self = (Vector<godot_real> *)p_self; + self->push_back(p_data); } -void GDAPI godot_pool_real_array_append_array(godot_pool_real_array *p_self, const godot_pool_real_array *p_array) { - PoolVector<godot_real> *self = (PoolVector<godot_real> *)p_self; - PoolVector<godot_real> *array = (PoolVector<godot_real> *)p_array; +void GDAPI godot_packed_real_array_append_array(godot_packed_real_array *p_self, const godot_packed_real_array *p_array) { + Vector<godot_real> *self = (Vector<godot_real> *)p_self; + Vector<godot_real> *array = (Vector<godot_real> *)p_array; self->append_array(*array); } -godot_error GDAPI godot_pool_real_array_insert(godot_pool_real_array *p_self, const godot_int p_idx, const godot_real p_data) { - PoolVector<godot_real> *self = (PoolVector<godot_real> *)p_self; +godot_error GDAPI godot_packed_real_array_insert(godot_packed_real_array *p_self, const godot_int p_idx, const godot_real p_data) { + Vector<godot_real> *self = (Vector<godot_real> *)p_self; return (godot_error)self->insert(p_idx, p_data); } -void GDAPI godot_pool_real_array_invert(godot_pool_real_array *p_self) { - PoolVector<godot_real> *self = (PoolVector<godot_real> *)p_self; +void GDAPI godot_packed_real_array_invert(godot_packed_real_array *p_self) { + Vector<godot_real> *self = (Vector<godot_real> *)p_self; self->invert(); } -void GDAPI godot_pool_real_array_push_back(godot_pool_real_array *p_self, const godot_real p_data) { - PoolVector<godot_real> *self = (PoolVector<godot_real> *)p_self; +void GDAPI godot_packed_real_array_push_back(godot_packed_real_array *p_self, const godot_real p_data) { + Vector<godot_real> *self = (Vector<godot_real> *)p_self; self->push_back(p_data); } -void GDAPI godot_pool_real_array_remove(godot_pool_real_array *p_self, const godot_int p_idx) { - PoolVector<godot_real> *self = (PoolVector<godot_real> *)p_self; +void GDAPI godot_packed_real_array_remove(godot_packed_real_array *p_self, const godot_int p_idx) { + Vector<godot_real> *self = (Vector<godot_real> *)p_self; self->remove(p_idx); } -void GDAPI godot_pool_real_array_resize(godot_pool_real_array *p_self, const godot_int p_size) { - PoolVector<godot_real> *self = (PoolVector<godot_real> *)p_self; +void GDAPI godot_packed_real_array_resize(godot_packed_real_array *p_self, const godot_int p_size) { + Vector<godot_real> *self = (Vector<godot_real> *)p_self; self->resize(p_size); } -godot_pool_real_array_read_access GDAPI *godot_pool_real_array_read(const godot_pool_real_array *p_self) { - const PoolVector<godot_real> *self = (const PoolVector<godot_real> *)p_self; - return (godot_pool_real_array_read_access *)memnew(PoolVector<godot_real>::Read(self->read())); -} - -godot_pool_int_array_write_access GDAPI *godot_pool_real_array_write(godot_pool_real_array *p_self) { - PoolVector<godot_real> *self = (PoolVector<godot_real> *)p_self; - return (godot_pool_real_array_write_access *)memnew(PoolVector<godot_real>::Write(self->write())); -} - -void GDAPI godot_pool_real_array_set(godot_pool_real_array *p_self, const godot_int p_idx, const godot_real p_data) { - PoolVector<godot_real> *self = (PoolVector<godot_real> *)p_self; +void GDAPI godot_packed_real_array_set(godot_packed_real_array *p_self, const godot_int p_idx, const godot_real p_data) { + Vector<godot_real> *self = (Vector<godot_real> *)p_self; self->set(p_idx, p_data); } -godot_real GDAPI godot_pool_real_array_get(const godot_pool_real_array *p_self, const godot_int p_idx) { - const PoolVector<godot_real> *self = (const PoolVector<godot_real> *)p_self; +godot_real GDAPI godot_packed_real_array_get(const godot_packed_real_array *p_self, const godot_int p_idx) { + const Vector<godot_real> *self = (const Vector<godot_real> *)p_self; return self->get(p_idx); } -godot_int GDAPI godot_pool_real_array_size(const godot_pool_real_array *p_self) { - const PoolVector<godot_real> *self = (const PoolVector<godot_real> *)p_self; +godot_int GDAPI godot_packed_real_array_size(const godot_packed_real_array *p_self) { + const Vector<godot_real> *self = (const Vector<godot_real> *)p_self; return self->size(); } -godot_bool GDAPI godot_pool_real_array_empty(const godot_pool_real_array *p_self) { - const PoolVector<godot_real> *self = (const PoolVector<godot_real> *)p_self; +godot_bool GDAPI godot_packed_real_array_empty(const godot_packed_real_array *p_self) { + const Vector<godot_real> *self = (const Vector<godot_real> *)p_self; return self->empty(); } -void GDAPI godot_pool_real_array_destroy(godot_pool_real_array *p_self) { - ((PoolVector<godot_real> *)p_self)->~PoolVector(); +void GDAPI godot_packed_real_array_destroy(godot_packed_real_array *p_self) { + ((Vector<godot_real> *)p_self)->~Vector(); } // string -void GDAPI godot_pool_string_array_new(godot_pool_string_array *r_dest) { - PoolVector<String> *dest = (PoolVector<String> *)r_dest; - memnew_placement(dest, PoolVector<String>); +void GDAPI godot_packed_string_array_new(godot_packed_string_array *r_dest) { + Vector<String> *dest = (Vector<String> *)r_dest; + memnew_placement(dest, Vector<String>); } -void GDAPI godot_pool_string_array_new_copy(godot_pool_string_array *r_dest, const godot_pool_string_array *p_src) { - PoolVector<String> *dest = (PoolVector<String> *)r_dest; - const PoolVector<String> *src = (const PoolVector<String> *)p_src; - memnew_placement(dest, PoolVector<String>(*src)); +void GDAPI godot_packed_string_array_new_copy(godot_packed_string_array *r_dest, const godot_packed_string_array *p_src) { + Vector<String> *dest = (Vector<String> *)r_dest; + const Vector<String> *src = (const Vector<String> *)p_src; + memnew_placement(dest, Vector<String>(*src)); } -void GDAPI godot_pool_string_array_new_with_array(godot_pool_string_array *r_dest, const godot_array *p_a) { - PoolVector<String> *dest = (PoolVector<String> *)r_dest; +void GDAPI godot_packed_string_array_new_with_array(godot_packed_string_array *r_dest, const godot_array *p_a) { + Vector<String> *dest = (Vector<String> *)r_dest; Array *a = (Array *)p_a; - memnew_placement(dest, PoolVector<String>); + memnew_placement(dest, Vector<String>); dest->resize(a->size()); for (int i = 0; i < a->size(); i++) { @@ -350,63 +320,53 @@ void GDAPI godot_pool_string_array_new_with_array(godot_pool_string_array *r_des } } -void GDAPI godot_pool_string_array_append(godot_pool_string_array *p_self, const godot_string *p_data) { - PoolVector<String> *self = (PoolVector<String> *)p_self; +void GDAPI godot_packed_string_array_append(godot_packed_string_array *p_self, const godot_string *p_data) { + Vector<String> *self = (Vector<String> *)p_self; String &s = *(String *)p_data; - self->append(s); + self->push_back(s); } -void GDAPI godot_pool_string_array_append_array(godot_pool_string_array *p_self, const godot_pool_string_array *p_array) { - PoolVector<String> *self = (PoolVector<String> *)p_self; - PoolVector<String> *array = (PoolVector<String> *)p_array; +void GDAPI godot_packed_string_array_append_array(godot_packed_string_array *p_self, const godot_packed_string_array *p_array) { + Vector<String> *self = (Vector<String> *)p_self; + Vector<String> *array = (Vector<String> *)p_array; self->append_array(*array); } -godot_error GDAPI godot_pool_string_array_insert(godot_pool_string_array *p_self, const godot_int p_idx, const godot_string *p_data) { - PoolVector<String> *self = (PoolVector<String> *)p_self; +godot_error GDAPI godot_packed_string_array_insert(godot_packed_string_array *p_self, const godot_int p_idx, const godot_string *p_data) { + Vector<String> *self = (Vector<String> *)p_self; String &s = *(String *)p_data; return (godot_error)self->insert(p_idx, s); } -void GDAPI godot_pool_string_array_invert(godot_pool_string_array *p_self) { - PoolVector<String> *self = (PoolVector<String> *)p_self; +void GDAPI godot_packed_string_array_invert(godot_packed_string_array *p_self) { + Vector<String> *self = (Vector<String> *)p_self; self->invert(); } -void GDAPI godot_pool_string_array_push_back(godot_pool_string_array *p_self, const godot_string *p_data) { - PoolVector<String> *self = (PoolVector<String> *)p_self; +void GDAPI godot_packed_string_array_push_back(godot_packed_string_array *p_self, const godot_string *p_data) { + Vector<String> *self = (Vector<String> *)p_self; String &s = *(String *)p_data; self->push_back(s); } -void GDAPI godot_pool_string_array_remove(godot_pool_string_array *p_self, const godot_int p_idx) { - PoolVector<String> *self = (PoolVector<String> *)p_self; +void GDAPI godot_packed_string_array_remove(godot_packed_string_array *p_self, const godot_int p_idx) { + Vector<String> *self = (Vector<String> *)p_self; self->remove(p_idx); } -void GDAPI godot_pool_string_array_resize(godot_pool_string_array *p_self, const godot_int p_size) { - PoolVector<String> *self = (PoolVector<String> *)p_self; +void GDAPI godot_packed_string_array_resize(godot_packed_string_array *p_self, const godot_int p_size) { + Vector<String> *self = (Vector<String> *)p_self; self->resize(p_size); } -godot_pool_string_array_read_access GDAPI *godot_pool_string_array_read(const godot_pool_string_array *p_self) { - const PoolVector<String> *self = (const PoolVector<String> *)p_self; - return (godot_pool_string_array_read_access *)memnew(PoolVector<String>::Read(self->read())); -} - -godot_pool_string_array_write_access GDAPI *godot_pool_string_array_write(godot_pool_string_array *p_self) { - PoolVector<String> *self = (PoolVector<String> *)p_self; - return (godot_pool_string_array_write_access *)memnew(PoolVector<String>::Write(self->write())); -} - -void GDAPI godot_pool_string_array_set(godot_pool_string_array *p_self, const godot_int p_idx, const godot_string *p_data) { - PoolVector<String> *self = (PoolVector<String> *)p_self; +void GDAPI godot_packed_string_array_set(godot_packed_string_array *p_self, const godot_int p_idx, const godot_string *p_data) { + Vector<String> *self = (Vector<String> *)p_self; String &s = *(String *)p_data; self->set(p_idx, s); } -godot_string GDAPI godot_pool_string_array_get(const godot_pool_string_array *p_self, const godot_int p_idx) { - const PoolVector<String> *self = (const PoolVector<String> *)p_self; +godot_string GDAPI godot_packed_string_array_get(const godot_packed_string_array *p_self, const godot_int p_idx) { + const Vector<String> *self = (const Vector<String> *)p_self; godot_string str; String *s = (String *)&str; memnew_placement(s, String); @@ -414,37 +374,37 @@ godot_string GDAPI godot_pool_string_array_get(const godot_pool_string_array *p_ return str; } -godot_int GDAPI godot_pool_string_array_size(const godot_pool_string_array *p_self) { - const PoolVector<String> *self = (const PoolVector<String> *)p_self; +godot_int GDAPI godot_packed_string_array_size(const godot_packed_string_array *p_self) { + const Vector<String> *self = (const Vector<String> *)p_self; return self->size(); } -godot_bool GDAPI godot_pool_string_array_empty(const godot_pool_string_array *p_self) { - const PoolVector<String> *self = (const PoolVector<String> *)p_self; +godot_bool GDAPI godot_packed_string_array_empty(const godot_packed_string_array *p_self) { + const Vector<String> *self = (const Vector<String> *)p_self; return self->empty(); } -void GDAPI godot_pool_string_array_destroy(godot_pool_string_array *p_self) { - ((PoolVector<String> *)p_self)->~PoolVector(); +void GDAPI godot_packed_string_array_destroy(godot_packed_string_array *p_self) { + ((Vector<String> *)p_self)->~Vector(); } // vector2 -void GDAPI godot_pool_vector2_array_new(godot_pool_vector2_array *r_dest) { - PoolVector<Vector2> *dest = (PoolVector<Vector2> *)r_dest; - memnew_placement(dest, PoolVector<Vector2>); +void GDAPI godot_packed_vector2_array_new(godot_packed_vector2_array *r_dest) { + Vector<Vector2> *dest = (Vector<Vector2> *)r_dest; + memnew_placement(dest, Vector<Vector2>); } -void GDAPI godot_pool_vector2_array_new_copy(godot_pool_vector2_array *r_dest, const godot_pool_vector2_array *p_src) { - PoolVector<Vector2> *dest = (PoolVector<Vector2> *)r_dest; - const PoolVector<Vector2> *src = (const PoolVector<Vector2> *)p_src; - memnew_placement(dest, PoolVector<Vector2>(*src)); +void GDAPI godot_packed_vector2_array_new_copy(godot_packed_vector2_array *r_dest, const godot_packed_vector2_array *p_src) { + Vector<Vector2> *dest = (Vector<Vector2> *)r_dest; + const Vector<Vector2> *src = (const Vector<Vector2> *)p_src; + memnew_placement(dest, Vector<Vector2>(*src)); } -void GDAPI godot_pool_vector2_array_new_with_array(godot_pool_vector2_array *r_dest, const godot_array *p_a) { - PoolVector<Vector2> *dest = (PoolVector<Vector2> *)r_dest; +void GDAPI godot_packed_vector2_array_new_with_array(godot_packed_vector2_array *r_dest, const godot_array *p_a) { + Vector<Vector2> *dest = (Vector<Vector2> *)r_dest; Array *a = (Array *)p_a; - memnew_placement(dest, PoolVector<Vector2>); + memnew_placement(dest, Vector<Vector2>); dest->resize(a->size()); for (int i = 0; i < a->size(); i++) { @@ -452,100 +412,90 @@ void GDAPI godot_pool_vector2_array_new_with_array(godot_pool_vector2_array *r_d } } -void GDAPI godot_pool_vector2_array_append(godot_pool_vector2_array *p_self, const godot_vector2 *p_data) { - PoolVector<Vector2> *self = (PoolVector<Vector2> *)p_self; +void GDAPI godot_packed_vector2_array_append(godot_packed_vector2_array *p_self, const godot_vector2 *p_data) { + Vector<Vector2> *self = (Vector<Vector2> *)p_self; Vector2 &s = *(Vector2 *)p_data; - self->append(s); + self->push_back(s); } -void GDAPI godot_pool_vector2_array_append_array(godot_pool_vector2_array *p_self, const godot_pool_vector2_array *p_array) { - PoolVector<Vector2> *self = (PoolVector<Vector2> *)p_self; - PoolVector<Vector2> *array = (PoolVector<Vector2> *)p_array; +void GDAPI godot_packed_vector2_array_append_array(godot_packed_vector2_array *p_self, const godot_packed_vector2_array *p_array) { + Vector<Vector2> *self = (Vector<Vector2> *)p_self; + Vector<Vector2> *array = (Vector<Vector2> *)p_array; self->append_array(*array); } -godot_error GDAPI godot_pool_vector2_array_insert(godot_pool_vector2_array *p_self, const godot_int p_idx, const godot_vector2 *p_data) { - PoolVector<Vector2> *self = (PoolVector<Vector2> *)p_self; +godot_error GDAPI godot_packed_vector2_array_insert(godot_packed_vector2_array *p_self, const godot_int p_idx, const godot_vector2 *p_data) { + Vector<Vector2> *self = (Vector<Vector2> *)p_self; Vector2 &s = *(Vector2 *)p_data; return (godot_error)self->insert(p_idx, s); } -void GDAPI godot_pool_vector2_array_invert(godot_pool_vector2_array *p_self) { - PoolVector<Vector2> *self = (PoolVector<Vector2> *)p_self; +void GDAPI godot_packed_vector2_array_invert(godot_packed_vector2_array *p_self) { + Vector<Vector2> *self = (Vector<Vector2> *)p_self; self->invert(); } -void GDAPI godot_pool_vector2_array_push_back(godot_pool_vector2_array *p_self, const godot_vector2 *p_data) { - PoolVector<Vector2> *self = (PoolVector<Vector2> *)p_self; +void GDAPI godot_packed_vector2_array_push_back(godot_packed_vector2_array *p_self, const godot_vector2 *p_data) { + Vector<Vector2> *self = (Vector<Vector2> *)p_self; Vector2 &s = *(Vector2 *)p_data; self->push_back(s); } -void GDAPI godot_pool_vector2_array_remove(godot_pool_vector2_array *p_self, const godot_int p_idx) { - PoolVector<Vector2> *self = (PoolVector<Vector2> *)p_self; +void GDAPI godot_packed_vector2_array_remove(godot_packed_vector2_array *p_self, const godot_int p_idx) { + Vector<Vector2> *self = (Vector<Vector2> *)p_self; self->remove(p_idx); } -void GDAPI godot_pool_vector2_array_resize(godot_pool_vector2_array *p_self, const godot_int p_size) { - PoolVector<Vector2> *self = (PoolVector<Vector2> *)p_self; +void GDAPI godot_packed_vector2_array_resize(godot_packed_vector2_array *p_self, const godot_int p_size) { + Vector<Vector2> *self = (Vector<Vector2> *)p_self; self->resize(p_size); } -godot_pool_vector2_array_read_access GDAPI *godot_pool_vector2_array_read(const godot_pool_vector2_array *p_self) { - const PoolVector<Vector2> *self = (const PoolVector<Vector2> *)p_self; - return (godot_pool_vector2_array_read_access *)memnew(PoolVector<Vector2>::Read(self->read())); -} - -godot_pool_vector2_array_write_access GDAPI *godot_pool_vector2_array_write(godot_pool_vector2_array *p_self) { - PoolVector<Vector2> *self = (PoolVector<Vector2> *)p_self; - return (godot_pool_vector2_array_write_access *)memnew(PoolVector<Vector2>::Write(self->write())); -} - -void GDAPI godot_pool_vector2_array_set(godot_pool_vector2_array *p_self, const godot_int p_idx, const godot_vector2 *p_data) { - PoolVector<Vector2> *self = (PoolVector<Vector2> *)p_self; +void GDAPI godot_packed_vector2_array_set(godot_packed_vector2_array *p_self, const godot_int p_idx, const godot_vector2 *p_data) { + Vector<Vector2> *self = (Vector<Vector2> *)p_self; Vector2 &s = *(Vector2 *)p_data; self->set(p_idx, s); } -godot_vector2 GDAPI godot_pool_vector2_array_get(const godot_pool_vector2_array *p_self, const godot_int p_idx) { - const PoolVector<Vector2> *self = (const PoolVector<Vector2> *)p_self; +godot_vector2 GDAPI godot_packed_vector2_array_get(const godot_packed_vector2_array *p_self, const godot_int p_idx) { + const Vector<Vector2> *self = (const Vector<Vector2> *)p_self; godot_vector2 v; Vector2 *s = (Vector2 *)&v; *s = self->get(p_idx); return v; } -godot_int GDAPI godot_pool_vector2_array_size(const godot_pool_vector2_array *p_self) { - const PoolVector<Vector2> *self = (const PoolVector<Vector2> *)p_self; +godot_int GDAPI godot_packed_vector2_array_size(const godot_packed_vector2_array *p_self) { + const Vector<Vector2> *self = (const Vector<Vector2> *)p_self; return self->size(); } -godot_bool GDAPI godot_pool_vector2_array_empty(const godot_pool_vector2_array *p_self) { - const PoolVector<Vector2> *self = (const PoolVector<Vector2> *)p_self; +godot_bool GDAPI godot_packed_vector2_array_empty(const godot_packed_vector2_array *p_self) { + const Vector<Vector2> *self = (const Vector<Vector2> *)p_self; return self->empty(); } -void GDAPI godot_pool_vector2_array_destroy(godot_pool_vector2_array *p_self) { - ((PoolVector<Vector2> *)p_self)->~PoolVector(); +void GDAPI godot_packed_vector2_array_destroy(godot_packed_vector2_array *p_self) { + ((Vector<Vector2> *)p_self)->~Vector(); } // vector3 -void GDAPI godot_pool_vector3_array_new(godot_pool_vector3_array *r_dest) { - PoolVector<Vector3> *dest = (PoolVector<Vector3> *)r_dest; - memnew_placement(dest, PoolVector<Vector3>); +void GDAPI godot_packed_vector3_array_new(godot_packed_vector3_array *r_dest) { + Vector<Vector3> *dest = (Vector<Vector3> *)r_dest; + memnew_placement(dest, Vector<Vector3>); } -void GDAPI godot_pool_vector3_array_new_copy(godot_pool_vector3_array *r_dest, const godot_pool_vector3_array *p_src) { - PoolVector<Vector3> *dest = (PoolVector<Vector3> *)r_dest; - const PoolVector<Vector3> *src = (const PoolVector<Vector3> *)p_src; - memnew_placement(dest, PoolVector<Vector3>(*src)); +void GDAPI godot_packed_vector3_array_new_copy(godot_packed_vector3_array *r_dest, const godot_packed_vector3_array *p_src) { + Vector<Vector3> *dest = (Vector<Vector3> *)r_dest; + const Vector<Vector3> *src = (const Vector<Vector3> *)p_src; + memnew_placement(dest, Vector<Vector3>(*src)); } -void GDAPI godot_pool_vector3_array_new_with_array(godot_pool_vector3_array *r_dest, const godot_array *p_a) { - PoolVector<Vector3> *dest = (PoolVector<Vector3> *)r_dest; +void GDAPI godot_packed_vector3_array_new_with_array(godot_packed_vector3_array *r_dest, const godot_array *p_a) { + Vector<Vector3> *dest = (Vector<Vector3> *)r_dest; Array *a = (Array *)p_a; - memnew_placement(dest, PoolVector<Vector3>); + memnew_placement(dest, Vector<Vector3>); dest->resize(a->size()); for (int i = 0; i < a->size(); i++) { @@ -553,100 +503,90 @@ void GDAPI godot_pool_vector3_array_new_with_array(godot_pool_vector3_array *r_d } } -void GDAPI godot_pool_vector3_array_append(godot_pool_vector3_array *p_self, const godot_vector3 *p_data) { - PoolVector<Vector3> *self = (PoolVector<Vector3> *)p_self; +void GDAPI godot_packed_vector3_array_append(godot_packed_vector3_array *p_self, const godot_vector3 *p_data) { + Vector<Vector3> *self = (Vector<Vector3> *)p_self; Vector3 &s = *(Vector3 *)p_data; - self->append(s); + self->push_back(s); } -void GDAPI godot_pool_vector3_array_append_array(godot_pool_vector3_array *p_self, const godot_pool_vector3_array *p_array) { - PoolVector<Vector3> *self = (PoolVector<Vector3> *)p_self; - PoolVector<Vector3> *array = (PoolVector<Vector3> *)p_array; +void GDAPI godot_packed_vector3_array_append_array(godot_packed_vector3_array *p_self, const godot_packed_vector3_array *p_array) { + Vector<Vector3> *self = (Vector<Vector3> *)p_self; + Vector<Vector3> *array = (Vector<Vector3> *)p_array; self->append_array(*array); } -godot_error GDAPI godot_pool_vector3_array_insert(godot_pool_vector3_array *p_self, const godot_int p_idx, const godot_vector3 *p_data) { - PoolVector<Vector3> *self = (PoolVector<Vector3> *)p_self; +godot_error GDAPI godot_packed_vector3_array_insert(godot_packed_vector3_array *p_self, const godot_int p_idx, const godot_vector3 *p_data) { + Vector<Vector3> *self = (Vector<Vector3> *)p_self; Vector3 &s = *(Vector3 *)p_data; return (godot_error)self->insert(p_idx, s); } -void GDAPI godot_pool_vector3_array_invert(godot_pool_vector3_array *p_self) { - PoolVector<Vector3> *self = (PoolVector<Vector3> *)p_self; +void GDAPI godot_packed_vector3_array_invert(godot_packed_vector3_array *p_self) { + Vector<Vector3> *self = (Vector<Vector3> *)p_self; self->invert(); } -void GDAPI godot_pool_vector3_array_push_back(godot_pool_vector3_array *p_self, const godot_vector3 *p_data) { - PoolVector<Vector3> *self = (PoolVector<Vector3> *)p_self; +void GDAPI godot_packed_vector3_array_push_back(godot_packed_vector3_array *p_self, const godot_vector3 *p_data) { + Vector<Vector3> *self = (Vector<Vector3> *)p_self; Vector3 &s = *(Vector3 *)p_data; self->push_back(s); } -void GDAPI godot_pool_vector3_array_remove(godot_pool_vector3_array *p_self, const godot_int p_idx) { - PoolVector<Vector3> *self = (PoolVector<Vector3> *)p_self; +void GDAPI godot_packed_vector3_array_remove(godot_packed_vector3_array *p_self, const godot_int p_idx) { + Vector<Vector3> *self = (Vector<Vector3> *)p_self; self->remove(p_idx); } -void GDAPI godot_pool_vector3_array_resize(godot_pool_vector3_array *p_self, const godot_int p_size) { - PoolVector<Vector3> *self = (PoolVector<Vector3> *)p_self; +void GDAPI godot_packed_vector3_array_resize(godot_packed_vector3_array *p_self, const godot_int p_size) { + Vector<Vector3> *self = (Vector<Vector3> *)p_self; self->resize(p_size); } -godot_pool_vector3_array_read_access GDAPI *godot_pool_vector3_array_read(const godot_pool_vector3_array *p_self) { - const PoolVector<Vector3> *self = (const PoolVector<Vector3> *)p_self; - return (godot_pool_vector3_array_read_access *)memnew(PoolVector<Vector3>::Read(self->read())); -} - -godot_pool_vector3_array_write_access GDAPI *godot_pool_vector3_array_write(godot_pool_vector3_array *p_self) { - PoolVector<Vector3> *self = (PoolVector<Vector3> *)p_self; - return (godot_pool_vector3_array_write_access *)memnew(PoolVector<Vector3>::Write(self->write())); -} - -void GDAPI godot_pool_vector3_array_set(godot_pool_vector3_array *p_self, const godot_int p_idx, const godot_vector3 *p_data) { - PoolVector<Vector3> *self = (PoolVector<Vector3> *)p_self; +void GDAPI godot_packed_vector3_array_set(godot_packed_vector3_array *p_self, const godot_int p_idx, const godot_vector3 *p_data) { + Vector<Vector3> *self = (Vector<Vector3> *)p_self; Vector3 &s = *(Vector3 *)p_data; self->set(p_idx, s); } -godot_vector3 GDAPI godot_pool_vector3_array_get(const godot_pool_vector3_array *p_self, const godot_int p_idx) { - const PoolVector<Vector3> *self = (const PoolVector<Vector3> *)p_self; +godot_vector3 GDAPI godot_packed_vector3_array_get(const godot_packed_vector3_array *p_self, const godot_int p_idx) { + const Vector<Vector3> *self = (const Vector<Vector3> *)p_self; godot_vector3 v; Vector3 *s = (Vector3 *)&v; *s = self->get(p_idx); return v; } -godot_int GDAPI godot_pool_vector3_array_size(const godot_pool_vector3_array *p_self) { - const PoolVector<Vector3> *self = (const PoolVector<Vector3> *)p_self; +godot_int GDAPI godot_packed_vector3_array_size(const godot_packed_vector3_array *p_self) { + const Vector<Vector3> *self = (const Vector<Vector3> *)p_self; return self->size(); } -godot_bool GDAPI godot_pool_vector3_array_empty(const godot_pool_vector3_array *p_self) { - const PoolVector<Vector3> *self = (const PoolVector<Vector3> *)p_self; +godot_bool GDAPI godot_packed_vector3_array_empty(const godot_packed_vector3_array *p_self) { + const Vector<Vector3> *self = (const Vector<Vector3> *)p_self; return self->empty(); } -void GDAPI godot_pool_vector3_array_destroy(godot_pool_vector3_array *p_self) { - ((PoolVector<Vector3> *)p_self)->~PoolVector(); +void GDAPI godot_packed_vector3_array_destroy(godot_packed_vector3_array *p_self) { + ((Vector<Vector3> *)p_self)->~Vector(); } // color -void GDAPI godot_pool_color_array_new(godot_pool_color_array *r_dest) { - PoolVector<Color> *dest = (PoolVector<Color> *)r_dest; - memnew_placement(dest, PoolVector<Color>); +void GDAPI godot_packed_color_array_new(godot_packed_color_array *r_dest) { + Vector<Color> *dest = (Vector<Color> *)r_dest; + memnew_placement(dest, Vector<Color>); } -void GDAPI godot_pool_color_array_new_copy(godot_pool_color_array *r_dest, const godot_pool_color_array *p_src) { - PoolVector<Color> *dest = (PoolVector<Color> *)r_dest; - const PoolVector<Color> *src = (const PoolVector<Color> *)p_src; - memnew_placement(dest, PoolVector<Color>(*src)); +void GDAPI godot_packed_color_array_new_copy(godot_packed_color_array *r_dest, const godot_packed_color_array *p_src) { + Vector<Color> *dest = (Vector<Color> *)r_dest; + const Vector<Color> *src = (const Vector<Color> *)p_src; + memnew_placement(dest, Vector<Color>(*src)); } -void GDAPI godot_pool_color_array_new_with_array(godot_pool_color_array *r_dest, const godot_array *p_a) { - PoolVector<Color> *dest = (PoolVector<Color> *)r_dest; +void GDAPI godot_packed_color_array_new_with_array(godot_packed_color_array *r_dest, const godot_array *p_a) { + Vector<Color> *dest = (Vector<Color> *)r_dest; Array *a = (Array *)p_a; - memnew_placement(dest, PoolVector<Color>); + memnew_placement(dest, Vector<Color>); dest->resize(a->size()); for (int i = 0; i < a->size(); i++) { @@ -654,327 +594,71 @@ void GDAPI godot_pool_color_array_new_with_array(godot_pool_color_array *r_dest, } } -void GDAPI godot_pool_color_array_append(godot_pool_color_array *p_self, const godot_color *p_data) { - PoolVector<Color> *self = (PoolVector<Color> *)p_self; +void GDAPI godot_packed_color_array_append(godot_packed_color_array *p_self, const godot_color *p_data) { + Vector<Color> *self = (Vector<Color> *)p_self; Color &s = *(Color *)p_data; - self->append(s); + self->push_back(s); } -void GDAPI godot_pool_color_array_append_array(godot_pool_color_array *p_self, const godot_pool_color_array *p_array) { - PoolVector<Color> *self = (PoolVector<Color> *)p_self; - PoolVector<Color> *array = (PoolVector<Color> *)p_array; +void GDAPI godot_packed_color_array_append_array(godot_packed_color_array *p_self, const godot_packed_color_array *p_array) { + Vector<Color> *self = (Vector<Color> *)p_self; + Vector<Color> *array = (Vector<Color> *)p_array; self->append_array(*array); } -godot_error GDAPI godot_pool_color_array_insert(godot_pool_color_array *p_self, const godot_int p_idx, const godot_color *p_data) { - PoolVector<Color> *self = (PoolVector<Color> *)p_self; +godot_error GDAPI godot_packed_color_array_insert(godot_packed_color_array *p_self, const godot_int p_idx, const godot_color *p_data) { + Vector<Color> *self = (Vector<Color> *)p_self; Color &s = *(Color *)p_data; return (godot_error)self->insert(p_idx, s); } -void GDAPI godot_pool_color_array_invert(godot_pool_color_array *p_self) { - PoolVector<Color> *self = (PoolVector<Color> *)p_self; +void GDAPI godot_packed_color_array_invert(godot_packed_color_array *p_self) { + Vector<Color> *self = (Vector<Color> *)p_self; self->invert(); } -void GDAPI godot_pool_color_array_push_back(godot_pool_color_array *p_self, const godot_color *p_data) { - PoolVector<Color> *self = (PoolVector<Color> *)p_self; +void GDAPI godot_packed_color_array_push_back(godot_packed_color_array *p_self, const godot_color *p_data) { + Vector<Color> *self = (Vector<Color> *)p_self; Color &s = *(Color *)p_data; self->push_back(s); } -void GDAPI godot_pool_color_array_remove(godot_pool_color_array *p_self, const godot_int p_idx) { - PoolVector<Color> *self = (PoolVector<Color> *)p_self; +void GDAPI godot_packed_color_array_remove(godot_packed_color_array *p_self, const godot_int p_idx) { + Vector<Color> *self = (Vector<Color> *)p_self; self->remove(p_idx); } -void GDAPI godot_pool_color_array_resize(godot_pool_color_array *p_self, const godot_int p_size) { - PoolVector<Color> *self = (PoolVector<Color> *)p_self; +void GDAPI godot_packed_color_array_resize(godot_packed_color_array *p_self, const godot_int p_size) { + Vector<Color> *self = (Vector<Color> *)p_self; self->resize(p_size); } -godot_pool_color_array_read_access GDAPI *godot_pool_color_array_read(const godot_pool_color_array *p_self) { - const PoolVector<Color> *self = (const PoolVector<Color> *)p_self; - return (godot_pool_color_array_read_access *)memnew(PoolVector<Color>::Read(self->read())); -} - -godot_pool_color_array_write_access GDAPI *godot_pool_color_array_write(godot_pool_color_array *p_self) { - PoolVector<Color> *self = (PoolVector<Color> *)p_self; - return (godot_pool_color_array_write_access *)memnew(PoolVector<Color>::Write(self->write())); -} - -void GDAPI godot_pool_color_array_set(godot_pool_color_array *p_self, const godot_int p_idx, const godot_color *p_data) { - PoolVector<Color> *self = (PoolVector<Color> *)p_self; +void GDAPI godot_packed_color_array_set(godot_packed_color_array *p_self, const godot_int p_idx, const godot_color *p_data) { + Vector<Color> *self = (Vector<Color> *)p_self; Color &s = *(Color *)p_data; self->set(p_idx, s); } -godot_color GDAPI godot_pool_color_array_get(const godot_pool_color_array *p_self, const godot_int p_idx) { - const PoolVector<Color> *self = (const PoolVector<Color> *)p_self; +godot_color GDAPI godot_packed_color_array_get(const godot_packed_color_array *p_self, const godot_int p_idx) { + const Vector<Color> *self = (const Vector<Color> *)p_self; godot_color v; Color *s = (Color *)&v; *s = self->get(p_idx); return v; } -godot_int GDAPI godot_pool_color_array_size(const godot_pool_color_array *p_self) { - const PoolVector<Color> *self = (const PoolVector<Color> *)p_self; +godot_int GDAPI godot_packed_color_array_size(const godot_packed_color_array *p_self) { + const Vector<Color> *self = (const Vector<Color> *)p_self; return self->size(); } -godot_bool GDAPI godot_pool_color_array_empty(const godot_pool_color_array *p_self) { - const PoolVector<Color> *self = (const PoolVector<Color> *)p_self; +godot_bool GDAPI godot_packed_color_array_empty(const godot_packed_color_array *p_self) { + const Vector<Color> *self = (const Vector<Color> *)p_self; return self->empty(); } -void GDAPI godot_pool_color_array_destroy(godot_pool_color_array *p_self) { - ((PoolVector<Color> *)p_self)->~PoolVector(); -} - -// -// read accessor functions -// - -godot_pool_byte_array_read_access GDAPI *godot_pool_byte_array_read_access_copy(const godot_pool_byte_array_read_access *p_other) { - PoolVector<uint8_t>::Read *other = (PoolVector<uint8_t>::Read *)p_other; - return (godot_pool_byte_array_read_access *)memnew(PoolVector<uint8_t>::Read(*other)); -} -const uint8_t GDAPI *godot_pool_byte_array_read_access_ptr(const godot_pool_byte_array_read_access *p_read) { - const PoolVector<uint8_t>::Read *read = (const PoolVector<uint8_t>::Read *)p_read; - return read->ptr(); -} -void GDAPI godot_pool_byte_array_read_access_operator_assign(godot_pool_byte_array_read_access *p_read, godot_pool_byte_array_read_access *p_other) { - PoolVector<uint8_t>::Read *read = (PoolVector<uint8_t>::Read *)p_read; - PoolVector<uint8_t>::Read *other = (PoolVector<uint8_t>::Read *)p_other; - read->operator=(*other); -} -void GDAPI godot_pool_byte_array_read_access_destroy(godot_pool_byte_array_read_access *p_read) { - memdelete((PoolVector<uint8_t>::Read *)p_read); -} - -godot_pool_int_array_read_access GDAPI *godot_pool_int_array_read_access_copy(const godot_pool_int_array_read_access *p_other) { - PoolVector<godot_int>::Read *other = (PoolVector<godot_int>::Read *)p_other; - return (godot_pool_int_array_read_access *)memnew(PoolVector<godot_int>::Read(*other)); -} -const godot_int GDAPI *godot_pool_int_array_read_access_ptr(const godot_pool_int_array_read_access *p_read) { - const PoolVector<godot_int>::Read *read = (const PoolVector<godot_int>::Read *)p_read; - return read->ptr(); -} -void GDAPI godot_pool_int_array_read_access_operator_assign(godot_pool_int_array_read_access *p_read, godot_pool_int_array_read_access *p_other) { - PoolVector<godot_int>::Read *read = (PoolVector<godot_int>::Read *)p_read; - PoolVector<godot_int>::Read *other = (PoolVector<godot_int>::Read *)p_other; - read->operator=(*other); -} -void GDAPI godot_pool_int_array_read_access_destroy(godot_pool_int_array_read_access *p_read) { - memdelete((PoolVector<godot_int>::Read *)p_read); -} - -godot_pool_real_array_read_access GDAPI *godot_pool_real_array_read_access_copy(const godot_pool_real_array_read_access *p_other) { - PoolVector<godot_real>::Read *other = (PoolVector<godot_real>::Read *)p_other; - return (godot_pool_real_array_read_access *)memnew(PoolVector<godot_real>::Read(*other)); -} -const godot_real GDAPI *godot_pool_real_array_read_access_ptr(const godot_pool_real_array_read_access *p_read) { - const PoolVector<godot_real>::Read *read = (const PoolVector<godot_real>::Read *)p_read; - return read->ptr(); -} -void GDAPI godot_pool_real_array_read_access_operator_assign(godot_pool_real_array_read_access *p_read, godot_pool_real_array_read_access *p_other) { - PoolVector<godot_real>::Read *read = (PoolVector<godot_real>::Read *)p_read; - PoolVector<godot_real>::Read *other = (PoolVector<godot_real>::Read *)p_other; - read->operator=(*other); -} -void GDAPI godot_pool_real_array_read_access_destroy(godot_pool_real_array_read_access *p_read) { - memdelete((PoolVector<godot_real>::Read *)p_read); -} - -godot_pool_string_array_read_access GDAPI *godot_pool_string_array_read_access_copy(const godot_pool_string_array_read_access *p_other) { - PoolVector<String>::Read *other = (PoolVector<String>::Read *)p_other; - return (godot_pool_string_array_read_access *)memnew(PoolVector<String>::Read(*other)); -} -const godot_string GDAPI *godot_pool_string_array_read_access_ptr(const godot_pool_string_array_read_access *p_read) { - const PoolVector<String>::Read *read = (const PoolVector<String>::Read *)p_read; - return (const godot_string *)read->ptr(); -} -void GDAPI godot_pool_string_array_read_access_operator_assign(godot_pool_string_array_read_access *p_read, godot_pool_string_array_read_access *p_other) { - PoolVector<String>::Read *read = (PoolVector<String>::Read *)p_read; - PoolVector<String>::Read *other = (PoolVector<String>::Read *)p_other; - read->operator=(*other); -} -void GDAPI godot_pool_string_array_read_access_destroy(godot_pool_string_array_read_access *p_read) { - memdelete((PoolVector<String>::Read *)p_read); -} - -godot_pool_vector2_array_read_access GDAPI *godot_pool_vector2_array_read_access_copy(const godot_pool_vector2_array_read_access *p_other) { - PoolVector<Vector2>::Read *other = (PoolVector<Vector2>::Read *)p_other; - return (godot_pool_vector2_array_read_access *)memnew(PoolVector<Vector2>::Read(*other)); -} -const godot_vector2 GDAPI *godot_pool_vector2_array_read_access_ptr(const godot_pool_vector2_array_read_access *p_read) { - const PoolVector<Vector2>::Read *read = (const PoolVector<Vector2>::Read *)p_read; - return (const godot_vector2 *)read->ptr(); -} -void GDAPI godot_pool_vector2_array_read_access_operator_assign(godot_pool_vector2_array_read_access *p_read, godot_pool_vector2_array_read_access *p_other) { - PoolVector<Vector2>::Read *read = (PoolVector<Vector2>::Read *)p_read; - PoolVector<Vector2>::Read *other = (PoolVector<Vector2>::Read *)p_other; - read->operator=(*other); -} -void GDAPI godot_pool_vector2_array_read_access_destroy(godot_pool_vector2_array_read_access *p_read) { - memdelete((PoolVector<Vector2>::Read *)p_read); -} - -godot_pool_vector3_array_read_access GDAPI *godot_pool_vector3_array_read_access_copy(const godot_pool_vector3_array_read_access *p_other) { - PoolVector<Vector3>::Read *other = (PoolVector<Vector3>::Read *)p_other; - return (godot_pool_vector3_array_read_access *)memnew(PoolVector<Vector3>::Read(*other)); -} -const godot_vector3 GDAPI *godot_pool_vector3_array_read_access_ptr(const godot_pool_vector3_array_read_access *p_read) { - const PoolVector<Vector3>::Read *read = (const PoolVector<Vector3>::Read *)p_read; - return (const godot_vector3 *)read->ptr(); -} -void GDAPI godot_pool_vector3_array_read_access_operator_assign(godot_pool_vector3_array_read_access *p_read, godot_pool_vector3_array_read_access *p_other) { - PoolVector<Vector3>::Read *read = (PoolVector<Vector3>::Read *)p_read; - PoolVector<Vector3>::Read *other = (PoolVector<Vector3>::Read *)p_other; - read->operator=(*other); -} -void GDAPI godot_pool_vector3_array_read_access_destroy(godot_pool_vector3_array_read_access *p_read) { - memdelete((PoolVector<Vector2>::Read *)p_read); -} - -godot_pool_color_array_read_access GDAPI *godot_pool_color_array_read_access_copy(const godot_pool_color_array_read_access *p_other) { - PoolVector<Color>::Read *other = (PoolVector<Color>::Read *)p_other; - return (godot_pool_color_array_read_access *)memnew(PoolVector<Color>::Read(*other)); -} -const godot_color GDAPI *godot_pool_color_array_read_access_ptr(const godot_pool_color_array_read_access *p_read) { - const PoolVector<Color>::Read *read = (const PoolVector<Color>::Read *)p_read; - return (const godot_color *)read->ptr(); -} -void GDAPI godot_pool_color_array_read_access_operator_assign(godot_pool_color_array_read_access *p_read, godot_pool_color_array_read_access *p_other) { - PoolVector<Color>::Read *read = (PoolVector<Color>::Read *)p_read; - PoolVector<Color>::Read *other = (PoolVector<Color>::Read *)p_other; - read->operator=(*other); -} -void GDAPI godot_pool_color_array_read_access_destroy(godot_pool_color_array_read_access *p_read) { - memdelete((PoolVector<Color>::Read *)p_read); -} - -// -// write accessor functions -// - -godot_pool_byte_array_write_access GDAPI *godot_pool_byte_array_write_access_copy(const godot_pool_byte_array_write_access *p_other) { - PoolVector<uint8_t>::Write *other = (PoolVector<uint8_t>::Write *)p_other; - return (godot_pool_byte_array_write_access *)memnew(PoolVector<uint8_t>::Write(*other)); -} -uint8_t GDAPI *godot_pool_byte_array_write_access_ptr(const godot_pool_byte_array_write_access *p_write) { - PoolVector<uint8_t>::Write *write = (PoolVector<uint8_t>::Write *)p_write; - return write->ptr(); -} -void GDAPI godot_pool_byte_array_write_access_operator_assign(godot_pool_byte_array_write_access *p_write, godot_pool_byte_array_write_access *p_other) { - PoolVector<uint8_t>::Write *write = (PoolVector<uint8_t>::Write *)p_write; - PoolVector<uint8_t>::Write *other = (PoolVector<uint8_t>::Write *)p_other; - write->operator=(*other); -} -void GDAPI godot_pool_byte_array_write_access_destroy(godot_pool_byte_array_write_access *p_write) { - memdelete((PoolVector<uint8_t>::Write *)p_write); -} - -godot_pool_int_array_write_access GDAPI *godot_pool_int_array_write_access_copy(const godot_pool_int_array_write_access *p_other) { - PoolVector<godot_int>::Write *other = (PoolVector<godot_int>::Write *)p_other; - return (godot_pool_int_array_write_access *)memnew(PoolVector<godot_int>::Write(*other)); -} -godot_int GDAPI *godot_pool_int_array_write_access_ptr(const godot_pool_int_array_write_access *p_write) { - PoolVector<godot_int>::Write *write = (PoolVector<godot_int>::Write *)p_write; - return write->ptr(); -} -void GDAPI godot_pool_int_array_write_access_operator_assign(godot_pool_int_array_write_access *p_write, godot_pool_int_array_write_access *p_other) { - PoolVector<godot_int>::Write *write = (PoolVector<godot_int>::Write *)p_write; - PoolVector<godot_int>::Write *other = (PoolVector<godot_int>::Write *)p_other; - write->operator=(*other); -} -void GDAPI godot_pool_int_array_write_access_destroy(godot_pool_int_array_write_access *p_write) { - memdelete((PoolVector<godot_int>::Write *)p_write); -} - -godot_pool_real_array_write_access GDAPI *godot_pool_real_array_write_access_copy(const godot_pool_real_array_write_access *p_other) { - PoolVector<godot_real>::Write *other = (PoolVector<godot_real>::Write *)p_other; - return (godot_pool_real_array_write_access *)memnew(PoolVector<godot_real>::Write(*other)); -} -godot_real GDAPI *godot_pool_real_array_write_access_ptr(const godot_pool_real_array_write_access *p_write) { - PoolVector<godot_real>::Write *write = (PoolVector<godot_real>::Write *)p_write; - return write->ptr(); -} -void GDAPI godot_pool_real_array_write_access_operator_assign(godot_pool_real_array_write_access *p_write, godot_pool_real_array_write_access *p_other) { - PoolVector<godot_real>::Write *write = (PoolVector<godot_real>::Write *)p_write; - PoolVector<godot_real>::Write *other = (PoolVector<godot_real>::Write *)p_other; - write->operator=(*other); -} -void GDAPI godot_pool_real_array_write_access_destroy(godot_pool_real_array_write_access *p_write) { - memdelete((PoolVector<godot_real>::Write *)p_write); -} - -godot_pool_string_array_write_access GDAPI *godot_pool_string_array_write_access_copy(const godot_pool_string_array_write_access *p_other) { - PoolVector<String>::Write *other = (PoolVector<String>::Write *)p_other; - return (godot_pool_string_array_write_access *)memnew(PoolVector<String>::Write(*other)); -} -godot_string GDAPI *godot_pool_string_array_write_access_ptr(const godot_pool_string_array_write_access *p_write) { - PoolVector<String>::Write *write = (PoolVector<String>::Write *)p_write; - return (godot_string *)write->ptr(); -} -void GDAPI godot_pool_string_array_write_access_operator_assign(godot_pool_string_array_write_access *p_write, godot_pool_string_array_write_access *p_other) { - PoolVector<String>::Write *write = (PoolVector<String>::Write *)p_write; - PoolVector<String>::Write *other = (PoolVector<String>::Write *)p_other; - write->operator=(*other); -} -void GDAPI godot_pool_string_array_write_access_destroy(godot_pool_string_array_write_access *p_write) { - memdelete((PoolVector<String>::Write *)p_write); -} - -godot_pool_vector2_array_write_access GDAPI *godot_pool_vector2_array_write_access_copy(const godot_pool_vector2_array_write_access *p_other) { - PoolVector<Vector2>::Write *other = (PoolVector<Vector2>::Write *)p_other; - return (godot_pool_vector2_array_write_access *)memnew(PoolVector<Vector2>::Write(*other)); -} -godot_vector2 GDAPI *godot_pool_vector2_array_write_access_ptr(const godot_pool_vector2_array_write_access *p_write) { - PoolVector<Vector2>::Write *write = (PoolVector<Vector2>::Write *)p_write; - return (godot_vector2 *)write->ptr(); -} -void GDAPI godot_pool_vector2_array_write_access_operator_assign(godot_pool_vector2_array_write_access *p_write, godot_pool_vector2_array_write_access *p_other) { - PoolVector<Vector2>::Write *write = (PoolVector<Vector2>::Write *)p_write; - PoolVector<Vector2>::Write *other = (PoolVector<Vector2>::Write *)p_other; - write->operator=(*other); -} -void GDAPI godot_pool_vector2_array_write_access_destroy(godot_pool_vector2_array_write_access *p_write) { - memdelete((PoolVector<Vector2>::Write *)p_write); -} - -godot_pool_vector3_array_write_access GDAPI *godot_pool_vector3_array_write_access_copy(const godot_pool_vector3_array_write_access *p_other) { - PoolVector<Vector3>::Write *other = (PoolVector<Vector3>::Write *)p_other; - return (godot_pool_vector3_array_write_access *)memnew(PoolVector<Vector3>::Write(*other)); -} -godot_vector3 GDAPI *godot_pool_vector3_array_write_access_ptr(const godot_pool_vector3_array_write_access *p_write) { - PoolVector<Vector3>::Write *write = (PoolVector<Vector3>::Write *)p_write; - return (godot_vector3 *)write->ptr(); -} -void GDAPI godot_pool_vector3_array_write_access_operator_assign(godot_pool_vector3_array_write_access *p_write, godot_pool_vector3_array_write_access *p_other) { - PoolVector<Vector3>::Write *write = (PoolVector<Vector3>::Write *)p_write; - PoolVector<Vector3>::Write *other = (PoolVector<Vector3>::Write *)p_other; - write->operator=(*other); -} -void GDAPI godot_pool_vector3_array_write_access_destroy(godot_pool_vector3_array_write_access *p_write) { - memdelete((PoolVector<Vector3>::Write *)p_write); -} - -godot_pool_color_array_write_access GDAPI *godot_pool_color_array_write_access_copy(const godot_pool_color_array_write_access *p_other) { - PoolVector<Color>::Write *other = (PoolVector<Color>::Write *)p_other; - return (godot_pool_color_array_write_access *)memnew(PoolVector<Color>::Write(*other)); -} -godot_color GDAPI *godot_pool_color_array_write_access_ptr(const godot_pool_color_array_write_access *p_write) { - PoolVector<Color>::Write *write = (PoolVector<Color>::Write *)p_write; - return (godot_color *)write->ptr(); -} -void GDAPI godot_pool_color_array_write_access_operator_assign(godot_pool_color_array_write_access *p_write, godot_pool_color_array_write_access *p_other) { - PoolVector<Color>::Write *write = (PoolVector<Color>::Write *)p_write; - PoolVector<Color>::Write *other = (PoolVector<Color>::Write *)p_other; - write->operator=(*other); -} -void GDAPI godot_pool_color_array_write_access_destroy(godot_pool_color_array_write_access *p_write) { - memdelete((PoolVector<Color>::Write *)p_write); +void GDAPI godot_packed_color_array_destroy(godot_packed_color_array *p_self) { + ((Vector<Color> *)p_self)->~Vector(); } #ifdef __cplusplus diff --git a/modules/gdnative/gdnative/string.cpp b/modules/gdnative/gdnative/string.cpp index 59901f6139..4cb55900b0 100644 --- a/modules/gdnative/gdnative/string.cpp +++ b/modules/gdnative/gdnative/string.cpp @@ -1030,14 +1030,14 @@ uint32_t GDAPI godot_string_hash_utf8_chars_with_len(const wchar_t *p_str, godot return String::hash(p_str, p_len); } -godot_pool_byte_array GDAPI godot_string_md5_buffer(const godot_string *p_self) { +godot_packed_byte_array GDAPI godot_string_md5_buffer(const godot_string *p_self) { const String *self = (const String *)p_self; Vector<uint8_t> tmp_result = self->md5_buffer(); - godot_pool_byte_array result; - memnew_placement(&result, PoolByteArray); - PoolByteArray *proxy = (PoolByteArray *)&result; - PoolByteArray::Write proxy_writer = proxy->write(); + godot_packed_byte_array result; + memnew_placement(&result, PackedByteArray); + PackedByteArray *proxy = (PackedByteArray *)&result; + uint8_t *proxy_writer = proxy->ptrw(); proxy->resize(tmp_result.size()); for (int i = 0; i < tmp_result.size(); i++) { @@ -1055,14 +1055,14 @@ godot_string GDAPI godot_string_md5_text(const godot_string *p_self) { return result; } -godot_pool_byte_array GDAPI godot_string_sha256_buffer(const godot_string *p_self) { +godot_packed_byte_array GDAPI godot_string_sha256_buffer(const godot_string *p_self) { const String *self = (const String *)p_self; Vector<uint8_t> tmp_result = self->sha256_buffer(); - godot_pool_byte_array result; - memnew_placement(&result, PoolByteArray); - PoolByteArray *proxy = (PoolByteArray *)&result; - PoolByteArray::Write proxy_writer = proxy->write(); + godot_packed_byte_array result; + memnew_placement(&result, PackedByteArray); + PackedByteArray *proxy = (PackedByteArray *)&result; + uint8_t *proxy_writer = proxy->ptrw(); proxy->resize(tmp_result.size()); for (int i = 0; i < tmp_result.size(); i++) { @@ -1343,15 +1343,15 @@ godot_string GDAPI godot_string_rstrip(const godot_string *p_self, const godot_s return result; } -godot_pool_string_array GDAPI godot_string_rsplit(const godot_string *p_self, const godot_string *p_divisor, +godot_packed_string_array GDAPI godot_string_rsplit(const godot_string *p_self, const godot_string *p_divisor, const godot_bool p_allow_empty, const godot_int p_maxsplit) { const String *self = (const String *)p_self; String *divisor = (String *)p_divisor; - godot_pool_string_array result; - memnew_placement(&result, PoolStringArray); - PoolStringArray *proxy = (PoolStringArray *)&result; - PoolStringArray::Write proxy_writer = proxy->write(); + godot_packed_string_array result; + memnew_placement(&result, PackedStringArray); + PackedStringArray *proxy = (PackedStringArray *)&result; + String *proxy_writer = proxy->ptrw(); Vector<String> tmp_result = self->rsplit(*divisor, p_allow_empty, p_maxsplit); proxy->resize(tmp_result.size()); diff --git a/modules/gdnative/gdnative/variant.cpp b/modules/gdnative/gdnative/variant.cpp index 11b6448e34..f0fc44ae8a 100644 --- a/modules/gdnative/gdnative/variant.cpp +++ b/modules/gdnative/gdnative/variant.cpp @@ -178,7 +178,7 @@ void GDAPI godot_variant_new_object(godot_variant *r_dest, const godot_object *p ref = REF(reference); } if (!ref.is_null()) { - memnew_placement_custom(dest, Variant, Variant(ref.get_ref_ptr())); + memnew_placement_custom(dest, Variant, Variant(ref)); } else { #if defined(DEBUG_METHODS_ENABLED) if (reference) { @@ -201,45 +201,45 @@ void GDAPI godot_variant_new_array(godot_variant *r_dest, const godot_array *p_a memnew_placement_custom(dest, Variant, Variant(*arr)); } -void GDAPI godot_variant_new_pool_byte_array(godot_variant *r_dest, const godot_pool_byte_array *p_pba) { +void GDAPI godot_variant_new_packed_byte_array(godot_variant *r_dest, const godot_packed_byte_array *p_pba) { Variant *dest = (Variant *)r_dest; - PoolByteArray *pba = (PoolByteArray *)p_pba; + PackedByteArray *pba = (PackedByteArray *)p_pba; memnew_placement_custom(dest, Variant, Variant(*pba)); } -void GDAPI godot_variant_new_pool_int_array(godot_variant *r_dest, const godot_pool_int_array *p_pia) { +void GDAPI godot_variant_new_packed_int_array(godot_variant *r_dest, const godot_packed_int_array *p_pia) { Variant *dest = (Variant *)r_dest; - PoolIntArray *pia = (PoolIntArray *)p_pia; + PackedInt32Array *pia = (PackedInt32Array *)p_pia; memnew_placement_custom(dest, Variant, Variant(*pia)); } -void GDAPI godot_variant_new_pool_real_array(godot_variant *r_dest, const godot_pool_real_array *p_pra) { +void GDAPI godot_variant_new_packed_real_array(godot_variant *r_dest, const godot_packed_real_array *p_pra) { Variant *dest = (Variant *)r_dest; - PoolRealArray *pra = (PoolRealArray *)p_pra; + PackedFloat32Array *pra = (PackedFloat32Array *)p_pra; memnew_placement_custom(dest, Variant, Variant(*pra)); } -void GDAPI godot_variant_new_pool_string_array(godot_variant *r_dest, const godot_pool_string_array *p_psa) { +void GDAPI godot_variant_new_packed_string_array(godot_variant *r_dest, const godot_packed_string_array *p_psa) { Variant *dest = (Variant *)r_dest; - PoolStringArray *psa = (PoolStringArray *)p_psa; + PackedStringArray *psa = (PackedStringArray *)p_psa; memnew_placement_custom(dest, Variant, Variant(*psa)); } -void GDAPI godot_variant_new_pool_vector2_array(godot_variant *r_dest, const godot_pool_vector2_array *p_pv2a) { +void GDAPI godot_variant_new_packed_vector2_array(godot_variant *r_dest, const godot_packed_vector2_array *p_pv2a) { Variant *dest = (Variant *)r_dest; - PoolVector2Array *pv2a = (PoolVector2Array *)p_pv2a; + PackedVector2Array *pv2a = (PackedVector2Array *)p_pv2a; memnew_placement_custom(dest, Variant, Variant(*pv2a)); } -void GDAPI godot_variant_new_pool_vector3_array(godot_variant *r_dest, const godot_pool_vector3_array *p_pv3a) { +void GDAPI godot_variant_new_packed_vector3_array(godot_variant *r_dest, const godot_packed_vector3_array *p_pv3a) { Variant *dest = (Variant *)r_dest; - PoolVector3Array *pv3a = (PoolVector3Array *)p_pv3a; + PackedVector3Array *pv3a = (PackedVector3Array *)p_pv3a; memnew_placement_custom(dest, Variant, Variant(*pv3a)); } -void GDAPI godot_variant_new_pool_color_array(godot_variant *r_dest, const godot_pool_color_array *p_pca) { +void GDAPI godot_variant_new_packed_color_array(godot_variant *r_dest, const godot_packed_color_array *p_pca) { Variant *dest = (Variant *)r_dest; - PoolColorArray *pca = (PoolColorArray *)p_pca; + PackedColorArray *pca = (PackedColorArray *)p_pca; memnew_placement_custom(dest, Variant, Variant(*pca)); } @@ -390,65 +390,65 @@ godot_array GDAPI godot_variant_as_array(const godot_variant *p_self) { return raw_dest; } -godot_pool_byte_array GDAPI godot_variant_as_pool_byte_array(const godot_variant *p_self) { - godot_pool_byte_array raw_dest; +godot_packed_byte_array GDAPI godot_variant_as_packed_byte_array(const godot_variant *p_self) { + godot_packed_byte_array raw_dest; const Variant *self = (const Variant *)p_self; - PoolByteArray *dest = (PoolByteArray *)&raw_dest; - memnew_placement(dest, PoolByteArray(self->operator PoolByteArray())); // operator = is overloaded by PoolByteArray + PackedByteArray *dest = (PackedByteArray *)&raw_dest; + memnew_placement(dest, PackedByteArray(self->operator PackedByteArray())); // operator = is overloaded by PackedByteArray *dest = *self; return raw_dest; } -godot_pool_int_array GDAPI godot_variant_as_pool_int_array(const godot_variant *p_self) { - godot_pool_int_array raw_dest; +godot_packed_int_array GDAPI godot_variant_as_packed_int_array(const godot_variant *p_self) { + godot_packed_int_array raw_dest; const Variant *self = (const Variant *)p_self; - PoolIntArray *dest = (PoolIntArray *)&raw_dest; - memnew_placement(dest, PoolIntArray(self->operator PoolIntArray())); // operator = is overloaded by PoolIntArray + PackedInt32Array *dest = (PackedInt32Array *)&raw_dest; + memnew_placement(dest, PackedInt32Array(self->operator PackedInt32Array())); // operator = is overloaded by PackedInt32Array *dest = *self; return raw_dest; } -godot_pool_real_array GDAPI godot_variant_as_pool_real_array(const godot_variant *p_self) { - godot_pool_real_array raw_dest; +godot_packed_real_array GDAPI godot_variant_as_packed_real_array(const godot_variant *p_self) { + godot_packed_real_array raw_dest; const Variant *self = (const Variant *)p_self; - PoolRealArray *dest = (PoolRealArray *)&raw_dest; - memnew_placement(dest, PoolRealArray(self->operator PoolRealArray())); // operator = is overloaded by PoolRealArray + PackedFloat32Array *dest = (PackedFloat32Array *)&raw_dest; + memnew_placement(dest, PackedFloat32Array(self->operator PackedFloat32Array())); // operator = is overloaded by PackedFloat32Array *dest = *self; return raw_dest; } -godot_pool_string_array GDAPI godot_variant_as_pool_string_array(const godot_variant *p_self) { - godot_pool_string_array raw_dest; +godot_packed_string_array GDAPI godot_variant_as_packed_string_array(const godot_variant *p_self) { + godot_packed_string_array raw_dest; const Variant *self = (const Variant *)p_self; - PoolStringArray *dest = (PoolStringArray *)&raw_dest; - memnew_placement(dest, PoolStringArray(self->operator PoolStringArray())); // operator = is overloaded by PoolStringArray + PackedStringArray *dest = (PackedStringArray *)&raw_dest; + memnew_placement(dest, PackedStringArray(self->operator PackedStringArray())); // operator = is overloaded by PackedStringArray *dest = *self; return raw_dest; } -godot_pool_vector2_array GDAPI godot_variant_as_pool_vector2_array(const godot_variant *p_self) { - godot_pool_vector2_array raw_dest; +godot_packed_vector2_array GDAPI godot_variant_as_packed_vector2_array(const godot_variant *p_self) { + godot_packed_vector2_array raw_dest; const Variant *self = (const Variant *)p_self; - PoolVector2Array *dest = (PoolVector2Array *)&raw_dest; - memnew_placement(dest, PoolVector2Array(self->operator PoolVector2Array())); // operator = is overloaded by PoolVector2Array + PackedVector2Array *dest = (PackedVector2Array *)&raw_dest; + memnew_placement(dest, PackedVector2Array(self->operator PackedVector2Array())); // operator = is overloaded by PackedVector2Array *dest = *self; return raw_dest; } -godot_pool_vector3_array GDAPI godot_variant_as_pool_vector3_array(const godot_variant *p_self) { - godot_pool_vector3_array raw_dest; +godot_packed_vector3_array GDAPI godot_variant_as_packed_vector3_array(const godot_variant *p_self) { + godot_packed_vector3_array raw_dest; const Variant *self = (const Variant *)p_self; - PoolVector3Array *dest = (PoolVector3Array *)&raw_dest; - memnew_placement(dest, PoolVector3Array(self->operator PoolVector3Array())); // operator = is overloaded by PoolVector3Array + PackedVector3Array *dest = (PackedVector3Array *)&raw_dest; + memnew_placement(dest, PackedVector3Array(self->operator PackedVector3Array())); // operator = is overloaded by PackedVector3Array *dest = *self; return raw_dest; } -godot_pool_color_array GDAPI godot_variant_as_pool_color_array(const godot_variant *p_self) { - godot_pool_color_array raw_dest; +godot_packed_color_array GDAPI godot_variant_as_packed_color_array(const godot_variant *p_self) { + godot_packed_color_array raw_dest; const Variant *self = (const Variant *)p_self; - PoolColorArray *dest = (PoolColorArray *)&raw_dest; - memnew_placement(dest, PoolColorArray(self->operator PoolColorArray())); // operator = is overloaded by PoolColorArray + PackedColorArray *dest = (PackedColorArray *)&raw_dest; + memnew_placement(dest, PackedColorArray(self->operator PackedColorArray())); // operator = is overloaded by PackedColorArray *dest = *self; return raw_dest; } @@ -459,7 +459,7 @@ godot_variant GDAPI godot_variant_call(godot_variant *p_self, const godot_string const Variant **args = (const Variant **)p_args; godot_variant raw_dest; Variant *dest = (Variant *)&raw_dest; - Variant::CallError error; + Callable::CallError error; memnew_placement_custom(dest, Variant, Variant(self->call(*method, args, p_argcount, error))); if (r_error) { r_error->error = (godot_variant_call_error_error)error.error; diff --git a/modules/gdnative/gdnative_api.json b/modules/gdnative/gdnative_api.json index 44e407218b..e1d6c0c867 100644 --- a/modules/gdnative/gdnative_api.json +++ b/modules/gdnative/gdnative_api.json @@ -93,52 +93,52 @@ ] }, { - "name": "godot_pool_byte_array_empty", + "name": "godot_packed_byte_array_empty", "return_type": "godot_bool", "arguments": [ - ["const godot_pool_byte_array *", "p_self"] + ["const godot_packed_byte_array *", "p_self"] ] }, { - "name": "godot_pool_int_array_empty", + "name": "godot_packed_int_array_empty", "return_type": "godot_bool", "arguments": [ - ["const godot_pool_int_array *", "p_self"] + ["const godot_packed_int_array *", "p_self"] ] }, { - "name": "godot_pool_real_array_empty", + "name": "godot_packed_real_array_empty", "return_type": "godot_bool", "arguments": [ - ["const godot_pool_real_array *", "p_self"] + ["const godot_packed_real_array *", "p_self"] ] }, { - "name": "godot_pool_string_array_empty", + "name": "godot_packed_string_array_empty", "return_type": "godot_bool", "arguments": [ - ["const godot_pool_string_array *", "p_self"] + ["const godot_packed_string_array *", "p_self"] ] }, { - "name": "godot_pool_vector2_array_empty", + "name": "godot_packed_vector2_array_empty", "return_type": "godot_bool", "arguments": [ - ["const godot_pool_vector2_array *", "p_self"] + ["const godot_packed_vector2_array *", "p_self"] ] }, { - "name": "godot_pool_vector3_array_empty", + "name": "godot_packed_vector3_array_empty", "return_type": "godot_bool", "arguments": [ - ["const godot_pool_vector3_array *", "p_self"] + ["const godot_packed_vector3_array *", "p_self"] ] }, { - "name": "godot_pool_color_array_empty", + "name": "godot_packed_color_array_empty", "return_type": "godot_bool", "arguments": [ - ["const godot_pool_color_array *", "p_self"] + ["const godot_packed_color_array *", "p_self"] ] }, { @@ -352,7 +352,7 @@ }, { "name": "godot_string_rsplit", - "return_type": "godot_pool_string_array", + "return_type": "godot_packed_string_array", "arguments": [ ["const godot_string *", "p_self"], ["const godot_string *", "p_divisor"], @@ -404,13 +404,6 @@ ] }, { - "name": "godot_is_instance_valid", - "return_type": "bool", - "arguments": [ - ["const godot_object *", "p_object"] - ] - }, - { "name": "godot_quat_new_with_basis", "return_type": "void", "arguments": [ @@ -1664,1277 +1657,773 @@ ] }, { - "name": "godot_pool_byte_array_new", + "name": "godot_packed_byte_array_new", "return_type": "void", "arguments": [ - ["godot_pool_byte_array *", "r_dest"] + ["godot_packed_byte_array *", "r_dest"] ] }, { - "name": "godot_pool_byte_array_new_copy", + "name": "godot_packed_byte_array_new_copy", "return_type": "void", "arguments": [ - ["godot_pool_byte_array *", "r_dest"], - ["const godot_pool_byte_array *", "p_src"] + ["godot_packed_byte_array *", "r_dest"], + ["const godot_packed_byte_array *", "p_src"] ] }, { - "name": "godot_pool_byte_array_new_with_array", + "name": "godot_packed_byte_array_new_with_array", "return_type": "void", "arguments": [ - ["godot_pool_byte_array *", "r_dest"], + ["godot_packed_byte_array *", "r_dest"], ["const godot_array *", "p_a"] ] }, { - "name": "godot_pool_byte_array_append", + "name": "godot_packed_byte_array_append", "return_type": "void", "arguments": [ - ["godot_pool_byte_array *", "p_self"], + ["godot_packed_byte_array *", "p_self"], ["const uint8_t", "p_data"] ] }, { - "name": "godot_pool_byte_array_append_array", + "name": "godot_packed_byte_array_append_array", "return_type": "void", "arguments": [ - ["godot_pool_byte_array *", "p_self"], - ["const godot_pool_byte_array *", "p_array"] + ["godot_packed_byte_array *", "p_self"], + ["const godot_packed_byte_array *", "p_array"] ] }, { - "name": "godot_pool_byte_array_insert", + "name": "godot_packed_byte_array_insert", "return_type": "godot_error", "arguments": [ - ["godot_pool_byte_array *", "p_self"], + ["godot_packed_byte_array *", "p_self"], ["const godot_int", "p_idx"], ["const uint8_t", "p_data"] ] }, { - "name": "godot_pool_byte_array_invert", + "name": "godot_packed_byte_array_invert", "return_type": "void", "arguments": [ - ["godot_pool_byte_array *", "p_self"] + ["godot_packed_byte_array *", "p_self"] ] }, { - "name": "godot_pool_byte_array_push_back", + "name": "godot_packed_byte_array_push_back", "return_type": "void", "arguments": [ - ["godot_pool_byte_array *", "p_self"], + ["godot_packed_byte_array *", "p_self"], ["const uint8_t", "p_data"] ] }, { - "name": "godot_pool_byte_array_remove", + "name": "godot_packed_byte_array_remove", "return_type": "void", "arguments": [ - ["godot_pool_byte_array *", "p_self"], + ["godot_packed_byte_array *", "p_self"], ["const godot_int", "p_idx"] ] }, { - "name": "godot_pool_byte_array_resize", + "name": "godot_packed_byte_array_resize", "return_type": "void", "arguments": [ - ["godot_pool_byte_array *", "p_self"], + ["godot_packed_byte_array *", "p_self"], ["const godot_int", "p_size"] ] }, { - "name": "godot_pool_byte_array_read", - "return_type": "godot_pool_byte_array_read_access *", - "arguments": [ - ["const godot_pool_byte_array *", "p_self"] - ] - }, - { - "name": "godot_pool_byte_array_write", - "return_type": "godot_pool_byte_array_write_access *", - "arguments": [ - ["godot_pool_byte_array *", "p_self"] - ] - }, - { - "name": "godot_pool_byte_array_set", + "name": "godot_packed_byte_array_set", "return_type": "void", "arguments": [ - ["godot_pool_byte_array *", "p_self"], + ["godot_packed_byte_array *", "p_self"], ["const godot_int", "p_idx"], ["const uint8_t", "p_data"] ] }, { - "name": "godot_pool_byte_array_get", + "name": "godot_packed_byte_array_get", "return_type": "uint8_t", "arguments": [ - ["const godot_pool_byte_array *", "p_self"], + ["const godot_packed_byte_array *", "p_self"], ["const godot_int", "p_idx"] ] }, { - "name": "godot_pool_byte_array_size", + "name": "godot_packed_byte_array_size", "return_type": "godot_int", "arguments": [ - ["const godot_pool_byte_array *", "p_self"] + ["const godot_packed_byte_array *", "p_self"] ] }, { - "name": "godot_pool_byte_array_destroy", + "name": "godot_packed_byte_array_destroy", "return_type": "void", "arguments": [ - ["godot_pool_byte_array *", "p_self"] + ["godot_packed_byte_array *", "p_self"] ] }, { - "name": "godot_pool_int_array_new", + "name": "godot_packed_int_array_new", "return_type": "void", "arguments": [ - ["godot_pool_int_array *", "r_dest"] + ["godot_packed_int_array *", "r_dest"] ] }, { - "name": "godot_pool_int_array_new_copy", + "name": "godot_packed_int_array_new_copy", "return_type": "void", "arguments": [ - ["godot_pool_int_array *", "r_dest"], - ["const godot_pool_int_array *", "p_src"] + ["godot_packed_int_array *", "r_dest"], + ["const godot_packed_int_array *", "p_src"] ] }, { - "name": "godot_pool_int_array_new_with_array", + "name": "godot_packed_int_array_new_with_array", "return_type": "void", "arguments": [ - ["godot_pool_int_array *", "r_dest"], + ["godot_packed_int_array *", "r_dest"], ["const godot_array *", "p_a"] ] }, { - "name": "godot_pool_int_array_append", + "name": "godot_packed_int_array_append", "return_type": "void", "arguments": [ - ["godot_pool_int_array *", "p_self"], + ["godot_packed_int_array *", "p_self"], ["const godot_int", "p_data"] ] }, { - "name": "godot_pool_int_array_append_array", + "name": "godot_packed_int_array_append_array", "return_type": "void", "arguments": [ - ["godot_pool_int_array *", "p_self"], - ["const godot_pool_int_array *", "p_array"] + ["godot_packed_int_array *", "p_self"], + ["const godot_packed_int_array *", "p_array"] ] }, { - "name": "godot_pool_int_array_insert", + "name": "godot_packed_int_array_insert", "return_type": "godot_error", "arguments": [ - ["godot_pool_int_array *", "p_self"], + ["godot_packed_int_array *", "p_self"], ["const godot_int", "p_idx"], ["const godot_int", "p_data"] ] }, { - "name": "godot_pool_int_array_invert", + "name": "godot_packed_int_array_invert", "return_type": "void", "arguments": [ - ["godot_pool_int_array *", "p_self"] + ["godot_packed_int_array *", "p_self"] ] }, { - "name": "godot_pool_int_array_push_back", + "name": "godot_packed_int_array_push_back", "return_type": "void", "arguments": [ - ["godot_pool_int_array *", "p_self"], + ["godot_packed_int_array *", "p_self"], ["const godot_int", "p_data"] ] }, { - "name": "godot_pool_int_array_remove", + "name": "godot_packed_int_array_remove", "return_type": "void", "arguments": [ - ["godot_pool_int_array *", "p_self"], + ["godot_packed_int_array *", "p_self"], ["const godot_int", "p_idx"] ] }, { - "name": "godot_pool_int_array_resize", + "name": "godot_packed_int_array_resize", "return_type": "void", "arguments": [ - ["godot_pool_int_array *", "p_self"], + ["godot_packed_int_array *", "p_self"], ["const godot_int", "p_size"] ] }, { - "name": "godot_pool_int_array_read", - "return_type": "godot_pool_int_array_read_access *", - "arguments": [ - ["const godot_pool_int_array *", "p_self"] - ] - }, - { - "name": "godot_pool_int_array_write", - "return_type": "godot_pool_int_array_write_access *", - "arguments": [ - ["godot_pool_int_array *", "p_self"] - ] - }, - { - "name": "godot_pool_int_array_set", + "name": "godot_packed_int_array_set", "return_type": "void", "arguments": [ - ["godot_pool_int_array *", "p_self"], + ["godot_packed_int_array *", "p_self"], ["const godot_int", "p_idx"], ["const godot_int", "p_data"] ] }, { - "name": "godot_pool_int_array_get", + "name": "godot_packed_int_array_get", "return_type": "godot_int", "arguments": [ - ["const godot_pool_int_array *", "p_self"], + ["const godot_packed_int_array *", "p_self"], ["const godot_int", "p_idx"] ] }, { - "name": "godot_pool_int_array_size", + "name": "godot_packed_int_array_size", "return_type": "godot_int", "arguments": [ - ["const godot_pool_int_array *", "p_self"] + ["const godot_packed_int_array *", "p_self"] ] }, { - "name": "godot_pool_int_array_destroy", + "name": "godot_packed_int_array_destroy", "return_type": "void", "arguments": [ - ["godot_pool_int_array *", "p_self"] + ["godot_packed_int_array *", "p_self"] ] }, { - "name": "godot_pool_real_array_new", + "name": "godot_packed_real_array_new", "return_type": "void", "arguments": [ - ["godot_pool_real_array *", "r_dest"] + ["godot_packed_real_array *", "r_dest"] ] }, { - "name": "godot_pool_real_array_new_copy", + "name": "godot_packed_real_array_new_copy", "return_type": "void", "arguments": [ - ["godot_pool_real_array *", "r_dest"], - ["const godot_pool_real_array *", "p_src"] + ["godot_packed_real_array *", "r_dest"], + ["const godot_packed_real_array *", "p_src"] ] }, { - "name": "godot_pool_real_array_new_with_array", + "name": "godot_packed_real_array_new_with_array", "return_type": "void", "arguments": [ - ["godot_pool_real_array *", "r_dest"], + ["godot_packed_real_array *", "r_dest"], ["const godot_array *", "p_a"] ] }, { - "name": "godot_pool_real_array_append", + "name": "godot_packed_real_array_append", "return_type": "void", "arguments": [ - ["godot_pool_real_array *", "p_self"], + ["godot_packed_real_array *", "p_self"], ["const godot_real", "p_data"] ] }, { - "name": "godot_pool_real_array_append_array", + "name": "godot_packed_real_array_append_array", "return_type": "void", "arguments": [ - ["godot_pool_real_array *", "p_self"], - ["const godot_pool_real_array *", "p_array"] + ["godot_packed_real_array *", "p_self"], + ["const godot_packed_real_array *", "p_array"] ] }, { - "name": "godot_pool_real_array_insert", + "name": "godot_packed_real_array_insert", "return_type": "godot_error", "arguments": [ - ["godot_pool_real_array *", "p_self"], + ["godot_packed_real_array *", "p_self"], ["const godot_int", "p_idx"], ["const godot_real", "p_data"] ] }, { - "name": "godot_pool_real_array_invert", + "name": "godot_packed_real_array_invert", "return_type": "void", "arguments": [ - ["godot_pool_real_array *", "p_self"] + ["godot_packed_real_array *", "p_self"] ] }, { - "name": "godot_pool_real_array_push_back", + "name": "godot_packed_real_array_push_back", "return_type": "void", "arguments": [ - ["godot_pool_real_array *", "p_self"], + ["godot_packed_real_array *", "p_self"], ["const godot_real", "p_data"] ] }, { - "name": "godot_pool_real_array_remove", + "name": "godot_packed_real_array_remove", "return_type": "void", "arguments": [ - ["godot_pool_real_array *", "p_self"], + ["godot_packed_real_array *", "p_self"], ["const godot_int", "p_idx"] ] }, { - "name": "godot_pool_real_array_resize", + "name": "godot_packed_real_array_resize", "return_type": "void", "arguments": [ - ["godot_pool_real_array *", "p_self"], + ["godot_packed_real_array *", "p_self"], ["const godot_int", "p_size"] ] }, { - "name": "godot_pool_real_array_read", - "return_type": "godot_pool_real_array_read_access *", - "arguments": [ - ["const godot_pool_real_array *", "p_self"] - ] - }, - { - "name": "godot_pool_real_array_write", - "return_type": "godot_pool_real_array_write_access *", - "arguments": [ - ["godot_pool_real_array *", "p_self"] - ] - }, - { - "name": "godot_pool_real_array_set", + "name": "godot_packed_real_array_set", "return_type": "void", "arguments": [ - ["godot_pool_real_array *", "p_self"], + ["godot_packed_real_array *", "p_self"], ["const godot_int", "p_idx"], ["const godot_real", "p_data"] ] }, { - "name": "godot_pool_real_array_get", + "name": "godot_packed_real_array_get", "return_type": "godot_real", "arguments": [ - ["const godot_pool_real_array *", "p_self"], + ["const godot_packed_real_array *", "p_self"], ["const godot_int", "p_idx"] ] }, { - "name": "godot_pool_real_array_size", + "name": "godot_packed_real_array_size", "return_type": "godot_int", "arguments": [ - ["const godot_pool_real_array *", "p_self"] + ["const godot_packed_real_array *", "p_self"] ] }, { - "name": "godot_pool_real_array_destroy", + "name": "godot_packed_real_array_destroy", "return_type": "void", "arguments": [ - ["godot_pool_real_array *", "p_self"] + ["godot_packed_real_array *", "p_self"] ] }, { - "name": "godot_pool_string_array_new", + "name": "godot_packed_string_array_new", "return_type": "void", "arguments": [ - ["godot_pool_string_array *", "r_dest"] + ["godot_packed_string_array *", "r_dest"] ] }, { - "name": "godot_pool_string_array_new_copy", + "name": "godot_packed_string_array_new_copy", "return_type": "void", "arguments": [ - ["godot_pool_string_array *", "r_dest"], - ["const godot_pool_string_array *", "p_src"] + ["godot_packed_string_array *", "r_dest"], + ["const godot_packed_string_array *", "p_src"] ] }, { - "name": "godot_pool_string_array_new_with_array", + "name": "godot_packed_string_array_new_with_array", "return_type": "void", "arguments": [ - ["godot_pool_string_array *", "r_dest"], + ["godot_packed_string_array *", "r_dest"], ["const godot_array *", "p_a"] ] }, { - "name": "godot_pool_string_array_append", + "name": "godot_packed_string_array_append", "return_type": "void", "arguments": [ - ["godot_pool_string_array *", "p_self"], + ["godot_packed_string_array *", "p_self"], ["const godot_string *", "p_data"] ] }, { - "name": "godot_pool_string_array_append_array", + "name": "godot_packed_string_array_append_array", "return_type": "void", "arguments": [ - ["godot_pool_string_array *", "p_self"], - ["const godot_pool_string_array *", "p_array"] + ["godot_packed_string_array *", "p_self"], + ["const godot_packed_string_array *", "p_array"] ] }, { - "name": "godot_pool_string_array_insert", + "name": "godot_packed_string_array_insert", "return_type": "godot_error", "arguments": [ - ["godot_pool_string_array *", "p_self"], + ["godot_packed_string_array *", "p_self"], ["const godot_int", "p_idx"], ["const godot_string *", "p_data"] ] }, { - "name": "godot_pool_string_array_invert", + "name": "godot_packed_string_array_invert", "return_type": "void", "arguments": [ - ["godot_pool_string_array *", "p_self"] + ["godot_packed_string_array *", "p_self"] ] }, { - "name": "godot_pool_string_array_push_back", + "name": "godot_packed_string_array_push_back", "return_type": "void", "arguments": [ - ["godot_pool_string_array *", "p_self"], + ["godot_packed_string_array *", "p_self"], ["const godot_string *", "p_data"] ] }, { - "name": "godot_pool_string_array_remove", + "name": "godot_packed_string_array_remove", "return_type": "void", "arguments": [ - ["godot_pool_string_array *", "p_self"], + ["godot_packed_string_array *", "p_self"], ["const godot_int", "p_idx"] ] }, { - "name": "godot_pool_string_array_resize", + "name": "godot_packed_string_array_resize", "return_type": "void", "arguments": [ - ["godot_pool_string_array *", "p_self"], + ["godot_packed_string_array *", "p_self"], ["const godot_int", "p_size"] ] }, { - "name": "godot_pool_string_array_read", - "return_type": "godot_pool_string_array_read_access *", - "arguments": [ - ["const godot_pool_string_array *", "p_self"] - ] - }, - { - "name": "godot_pool_string_array_write", - "return_type": "godot_pool_string_array_write_access *", - "arguments": [ - ["godot_pool_string_array *", "p_self"] - ] - }, - { - "name": "godot_pool_string_array_set", + "name": "godot_packed_string_array_set", "return_type": "void", "arguments": [ - ["godot_pool_string_array *", "p_self"], + ["godot_packed_string_array *", "p_self"], ["const godot_int", "p_idx"], ["const godot_string *", "p_data"] ] }, { - "name": "godot_pool_string_array_get", + "name": "godot_packed_string_array_get", "return_type": "godot_string", "arguments": [ - ["const godot_pool_string_array *", "p_self"], + ["const godot_packed_string_array *", "p_self"], ["const godot_int", "p_idx"] ] }, { - "name": "godot_pool_string_array_size", + "name": "godot_packed_string_array_size", "return_type": "godot_int", "arguments": [ - ["const godot_pool_string_array *", "p_self"] + ["const godot_packed_string_array *", "p_self"] ] }, { - "name": "godot_pool_string_array_destroy", + "name": "godot_packed_string_array_destroy", "return_type": "void", "arguments": [ - ["godot_pool_string_array *", "p_self"] + ["godot_packed_string_array *", "p_self"] ] }, { - "name": "godot_pool_vector2_array_new", + "name": "godot_packed_vector2_array_new", "return_type": "void", "arguments": [ - ["godot_pool_vector2_array *", "r_dest"] + ["godot_packed_vector2_array *", "r_dest"] ] }, { - "name": "godot_pool_vector2_array_new_copy", + "name": "godot_packed_vector2_array_new_copy", "return_type": "void", "arguments": [ - ["godot_pool_vector2_array *", "r_dest"], - ["const godot_pool_vector2_array *", "p_src"] + ["godot_packed_vector2_array *", "r_dest"], + ["const godot_packed_vector2_array *", "p_src"] ] }, { - "name": "godot_pool_vector2_array_new_with_array", + "name": "godot_packed_vector2_array_new_with_array", "return_type": "void", "arguments": [ - ["godot_pool_vector2_array *", "r_dest"], + ["godot_packed_vector2_array *", "r_dest"], ["const godot_array *", "p_a"] ] }, { - "name": "godot_pool_vector2_array_append", + "name": "godot_packed_vector2_array_append", "return_type": "void", "arguments": [ - ["godot_pool_vector2_array *", "p_self"], + ["godot_packed_vector2_array *", "p_self"], ["const godot_vector2 *", "p_data"] ] }, { - "name": "godot_pool_vector2_array_append_array", + "name": "godot_packed_vector2_array_append_array", "return_type": "void", "arguments": [ - ["godot_pool_vector2_array *", "p_self"], - ["const godot_pool_vector2_array *", "p_array"] + ["godot_packed_vector2_array *", "p_self"], + ["const godot_packed_vector2_array *", "p_array"] ] }, { - "name": "godot_pool_vector2_array_insert", + "name": "godot_packed_vector2_array_insert", "return_type": "godot_error", "arguments": [ - ["godot_pool_vector2_array *", "p_self"], + ["godot_packed_vector2_array *", "p_self"], ["const godot_int", "p_idx"], ["const godot_vector2 *", "p_data"] ] }, { - "name": "godot_pool_vector2_array_invert", + "name": "godot_packed_vector2_array_invert", "return_type": "void", "arguments": [ - ["godot_pool_vector2_array *", "p_self"] + ["godot_packed_vector2_array *", "p_self"] ] }, { - "name": "godot_pool_vector2_array_push_back", + "name": "godot_packed_vector2_array_push_back", "return_type": "void", "arguments": [ - ["godot_pool_vector2_array *", "p_self"], + ["godot_packed_vector2_array *", "p_self"], ["const godot_vector2 *", "p_data"] ] }, { - "name": "godot_pool_vector2_array_remove", + "name": "godot_packed_vector2_array_remove", "return_type": "void", "arguments": [ - ["godot_pool_vector2_array *", "p_self"], + ["godot_packed_vector2_array *", "p_self"], ["const godot_int", "p_idx"] ] }, { - "name": "godot_pool_vector2_array_resize", + "name": "godot_packed_vector2_array_resize", "return_type": "void", "arguments": [ - ["godot_pool_vector2_array *", "p_self"], + ["godot_packed_vector2_array *", "p_self"], ["const godot_int", "p_size"] ] }, { - "name": "godot_pool_vector2_array_read", - "return_type": "godot_pool_vector2_array_read_access *", - "arguments": [ - ["const godot_pool_vector2_array *", "p_self"] - ] - }, - { - "name": "godot_pool_vector2_array_write", - "return_type": "godot_pool_vector2_array_write_access *", - "arguments": [ - ["godot_pool_vector2_array *", "p_self"] - ] - }, - { - "name": "godot_pool_vector2_array_set", + "name": "godot_packed_vector2_array_set", "return_type": "void", "arguments": [ - ["godot_pool_vector2_array *", "p_self"], + ["godot_packed_vector2_array *", "p_self"], ["const godot_int", "p_idx"], ["const godot_vector2 *", "p_data"] ] }, { - "name": "godot_pool_vector2_array_get", + "name": "godot_packed_vector2_array_get", "return_type": "godot_vector2", "arguments": [ - ["const godot_pool_vector2_array *", "p_self"], + ["const godot_packed_vector2_array *", "p_self"], ["const godot_int", "p_idx"] ] }, { - "name": "godot_pool_vector2_array_size", + "name": "godot_packed_vector2_array_size", "return_type": "godot_int", "arguments": [ - ["const godot_pool_vector2_array *", "p_self"] + ["const godot_packed_vector2_array *", "p_self"] ] }, { - "name": "godot_pool_vector2_array_destroy", + "name": "godot_packed_vector2_array_destroy", "return_type": "void", "arguments": [ - ["godot_pool_vector2_array *", "p_self"] + ["godot_packed_vector2_array *", "p_self"] ] }, { - "name": "godot_pool_vector3_array_new", + "name": "godot_packed_vector3_array_new", "return_type": "void", "arguments": [ - ["godot_pool_vector3_array *", "r_dest"] + ["godot_packed_vector3_array *", "r_dest"] ] }, { - "name": "godot_pool_vector3_array_new_copy", + "name": "godot_packed_vector3_array_new_copy", "return_type": "void", "arguments": [ - ["godot_pool_vector3_array *", "r_dest"], - ["const godot_pool_vector3_array *", "p_src"] + ["godot_packed_vector3_array *", "r_dest"], + ["const godot_packed_vector3_array *", "p_src"] ] }, { - "name": "godot_pool_vector3_array_new_with_array", + "name": "godot_packed_vector3_array_new_with_array", "return_type": "void", "arguments": [ - ["godot_pool_vector3_array *", "r_dest"], + ["godot_packed_vector3_array *", "r_dest"], ["const godot_array *", "p_a"] ] }, { - "name": "godot_pool_vector3_array_append", + "name": "godot_packed_vector3_array_append", "return_type": "void", "arguments": [ - ["godot_pool_vector3_array *", "p_self"], + ["godot_packed_vector3_array *", "p_self"], ["const godot_vector3 *", "p_data"] ] }, { - "name": "godot_pool_vector3_array_append_array", + "name": "godot_packed_vector3_array_append_array", "return_type": "void", "arguments": [ - ["godot_pool_vector3_array *", "p_self"], - ["const godot_pool_vector3_array *", "p_array"] + ["godot_packed_vector3_array *", "p_self"], + ["const godot_packed_vector3_array *", "p_array"] ] }, { - "name": "godot_pool_vector3_array_insert", + "name": "godot_packed_vector3_array_insert", "return_type": "godot_error", "arguments": [ - ["godot_pool_vector3_array *", "p_self"], + ["godot_packed_vector3_array *", "p_self"], ["const godot_int", "p_idx"], ["const godot_vector3 *", "p_data"] ] }, { - "name": "godot_pool_vector3_array_invert", + "name": "godot_packed_vector3_array_invert", "return_type": "void", "arguments": [ - ["godot_pool_vector3_array *", "p_self"] + ["godot_packed_vector3_array *", "p_self"] ] }, { - "name": "godot_pool_vector3_array_push_back", + "name": "godot_packed_vector3_array_push_back", "return_type": "void", "arguments": [ - ["godot_pool_vector3_array *", "p_self"], + ["godot_packed_vector3_array *", "p_self"], ["const godot_vector3 *", "p_data"] ] }, { - "name": "godot_pool_vector3_array_remove", + "name": "godot_packed_vector3_array_remove", "return_type": "void", "arguments": [ - ["godot_pool_vector3_array *", "p_self"], + ["godot_packed_vector3_array *", "p_self"], ["const godot_int", "p_idx"] ] }, { - "name": "godot_pool_vector3_array_resize", + "name": "godot_packed_vector3_array_resize", "return_type": "void", "arguments": [ - ["godot_pool_vector3_array *", "p_self"], + ["godot_packed_vector3_array *", "p_self"], ["const godot_int", "p_size"] ] }, { - "name": "godot_pool_vector3_array_read", - "return_type": "godot_pool_vector3_array_read_access *", - "arguments": [ - ["const godot_pool_vector3_array *", "p_self"] - ] - }, - { - "name": "godot_pool_vector3_array_write", - "return_type": "godot_pool_vector3_array_write_access *", - "arguments": [ - ["godot_pool_vector3_array *", "p_self"] - ] - }, - { - "name": "godot_pool_vector3_array_set", + "name": "godot_packed_vector3_array_set", "return_type": "void", "arguments": [ - ["godot_pool_vector3_array *", "p_self"], + ["godot_packed_vector3_array *", "p_self"], ["const godot_int", "p_idx"], ["const godot_vector3 *", "p_data"] ] }, { - "name": "godot_pool_vector3_array_get", + "name": "godot_packed_vector3_array_get", "return_type": "godot_vector3", "arguments": [ - ["const godot_pool_vector3_array *", "p_self"], + ["const godot_packed_vector3_array *", "p_self"], ["const godot_int", "p_idx"] ] }, { - "name": "godot_pool_vector3_array_size", + "name": "godot_packed_vector3_array_size", "return_type": "godot_int", "arguments": [ - ["const godot_pool_vector3_array *", "p_self"] + ["const godot_packed_vector3_array *", "p_self"] ] }, { - "name": "godot_pool_vector3_array_destroy", + "name": "godot_packed_vector3_array_destroy", "return_type": "void", "arguments": [ - ["godot_pool_vector3_array *", "p_self"] + ["godot_packed_vector3_array *", "p_self"] ] }, { - "name": "godot_pool_color_array_new", + "name": "godot_packed_color_array_new", "return_type": "void", "arguments": [ - ["godot_pool_color_array *", "r_dest"] + ["godot_packed_color_array *", "r_dest"] ] }, { - "name": "godot_pool_color_array_new_copy", + "name": "godot_packed_color_array_new_copy", "return_type": "void", "arguments": [ - ["godot_pool_color_array *", "r_dest"], - ["const godot_pool_color_array *", "p_src"] + ["godot_packed_color_array *", "r_dest"], + ["const godot_packed_color_array *", "p_src"] ] }, { - "name": "godot_pool_color_array_new_with_array", + "name": "godot_packed_color_array_new_with_array", "return_type": "void", "arguments": [ - ["godot_pool_color_array *", "r_dest"], + ["godot_packed_color_array *", "r_dest"], ["const godot_array *", "p_a"] ] }, { - "name": "godot_pool_color_array_append", + "name": "godot_packed_color_array_append", "return_type": "void", "arguments": [ - ["godot_pool_color_array *", "p_self"], + ["godot_packed_color_array *", "p_self"], ["const godot_color *", "p_data"] ] }, { - "name": "godot_pool_color_array_append_array", + "name": "godot_packed_color_array_append_array", "return_type": "void", "arguments": [ - ["godot_pool_color_array *", "p_self"], - ["const godot_pool_color_array *", "p_array"] + ["godot_packed_color_array *", "p_self"], + ["const godot_packed_color_array *", "p_array"] ] }, { - "name": "godot_pool_color_array_insert", + "name": "godot_packed_color_array_insert", "return_type": "godot_error", "arguments": [ - ["godot_pool_color_array *", "p_self"], + ["godot_packed_color_array *", "p_self"], ["const godot_int", "p_idx"], ["const godot_color *", "p_data"] ] }, { - "name": "godot_pool_color_array_invert", + "name": "godot_packed_color_array_invert", "return_type": "void", "arguments": [ - ["godot_pool_color_array *", "p_self"] + ["godot_packed_color_array *", "p_self"] ] }, { - "name": "godot_pool_color_array_push_back", + "name": "godot_packed_color_array_push_back", "return_type": "void", "arguments": [ - ["godot_pool_color_array *", "p_self"], + ["godot_packed_color_array *", "p_self"], ["const godot_color *", "p_data"] ] }, { - "name": "godot_pool_color_array_remove", + "name": "godot_packed_color_array_remove", "return_type": "void", "arguments": [ - ["godot_pool_color_array *", "p_self"], + ["godot_packed_color_array *", "p_self"], ["const godot_int", "p_idx"] ] }, { - "name": "godot_pool_color_array_resize", + "name": "godot_packed_color_array_resize", "return_type": "void", "arguments": [ - ["godot_pool_color_array *", "p_self"], + ["godot_packed_color_array *", "p_self"], ["const godot_int", "p_size"] ] }, { - "name": "godot_pool_color_array_read", - "return_type": "godot_pool_color_array_read_access *", - "arguments": [ - ["const godot_pool_color_array *", "p_self"] - ] - }, - { - "name": "godot_pool_color_array_write", - "return_type": "godot_pool_color_array_write_access *", - "arguments": [ - ["godot_pool_color_array *", "p_self"] - ] - }, - { - "name": "godot_pool_color_array_set", + "name": "godot_packed_color_array_set", "return_type": "void", "arguments": [ - ["godot_pool_color_array *", "p_self"], + ["godot_packed_color_array *", "p_self"], ["const godot_int", "p_idx"], ["const godot_color *", "p_data"] ] }, { - "name": "godot_pool_color_array_get", + "name": "godot_packed_color_array_get", "return_type": "godot_color", "arguments": [ - ["const godot_pool_color_array *", "p_self"], + ["const godot_packed_color_array *", "p_self"], ["const godot_int", "p_idx"] ] }, { - "name": "godot_pool_color_array_size", + "name": "godot_packed_color_array_size", "return_type": "godot_int", "arguments": [ - ["const godot_pool_color_array *", "p_self"] - ] - }, - { - "name": "godot_pool_color_array_destroy", - "return_type": "void", - "arguments": [ - ["godot_pool_color_array *", "p_self"] - ] - }, - { - "name": "godot_pool_byte_array_read_access_copy", - "return_type": "godot_pool_byte_array_read_access *", - "arguments": [ - ["const godot_pool_byte_array_read_access *", "p_read"] - ] - }, - { - "name": "godot_pool_byte_array_read_access_ptr", - "return_type": "const uint8_t *", - "arguments": [ - ["const godot_pool_byte_array_read_access *", "p_read"] - ] - }, - { - "name": "godot_pool_byte_array_read_access_operator_assign", - "return_type": "void", - "arguments": [ - ["godot_pool_byte_array_read_access *", "p_read"], - ["godot_pool_byte_array_read_access *", "p_other"] - ] - }, - { - "name": "godot_pool_byte_array_read_access_destroy", - "return_type": "void", - "arguments": [ - ["godot_pool_byte_array_read_access *", "p_read"] - ] - }, - { - "name": "godot_pool_int_array_read_access_copy", - "return_type": "godot_pool_int_array_read_access *", - "arguments": [ - ["const godot_pool_int_array_read_access *", "p_read"] - ] - }, - { - "name": "godot_pool_int_array_read_access_ptr", - "return_type": "const godot_int *", - "arguments": [ - ["const godot_pool_int_array_read_access *", "p_read"] - ] - }, - { - "name": "godot_pool_int_array_read_access_operator_assign", - "return_type": "void", - "arguments": [ - ["godot_pool_int_array_read_access *", "p_read"], - ["godot_pool_int_array_read_access *", "p_other"] - ] - }, - { - "name": "godot_pool_int_array_read_access_destroy", - "return_type": "void", - "arguments": [ - ["godot_pool_int_array_read_access *", "p_read"] - ] - }, - { - "name": "godot_pool_real_array_read_access_copy", - "return_type": "godot_pool_real_array_read_access *", - "arguments": [ - ["const godot_pool_real_array_read_access *", "p_read"] - ] - }, - { - "name": "godot_pool_real_array_read_access_ptr", - "return_type": "const godot_real *", - "arguments": [ - ["const godot_pool_real_array_read_access *", "p_read"] - ] - }, - { - "name": "godot_pool_real_array_read_access_operator_assign", - "return_type": "void", - "arguments": [ - ["godot_pool_real_array_read_access *", "p_read"], - ["godot_pool_real_array_read_access *", "p_other"] - ] - }, - { - "name": "godot_pool_real_array_read_access_destroy", - "return_type": "void", - "arguments": [ - ["godot_pool_real_array_read_access *", "p_read"] - ] - }, - { - "name": "godot_pool_string_array_read_access_copy", - "return_type": "godot_pool_string_array_read_access *", - "arguments": [ - ["const godot_pool_string_array_read_access *", "p_read"] - ] - }, - { - "name": "godot_pool_string_array_read_access_ptr", - "return_type": "const godot_string *", - "arguments": [ - ["const godot_pool_string_array_read_access *", "p_read"] - ] - }, - { - "name": "godot_pool_string_array_read_access_operator_assign", - "return_type": "void", - "arguments": [ - ["godot_pool_string_array_read_access *", "p_read"], - ["godot_pool_string_array_read_access *", "p_other"] - ] - }, - { - "name": "godot_pool_string_array_read_access_destroy", - "return_type": "void", - "arguments": [ - ["godot_pool_string_array_read_access *", "p_read"] - ] - }, - { - "name": "godot_pool_vector2_array_read_access_copy", - "return_type": "godot_pool_vector2_array_read_access *", - "arguments": [ - ["const godot_pool_vector2_array_read_access *", "p_read"] - ] - }, - { - "name": "godot_pool_vector2_array_read_access_ptr", - "return_type": "const godot_vector2 *", - "arguments": [ - ["const godot_pool_vector2_array_read_access *", "p_read"] - ] - }, - { - "name": "godot_pool_vector2_array_read_access_operator_assign", - "return_type": "void", - "arguments": [ - ["godot_pool_vector2_array_read_access *", "p_read"], - ["godot_pool_vector2_array_read_access *", "p_other"] - ] - }, - { - "name": "godot_pool_vector2_array_read_access_destroy", - "return_type": "void", - "arguments": [ - ["godot_pool_vector2_array_read_access *", "p_read"] - ] - }, - { - "name": "godot_pool_vector3_array_read_access_copy", - "return_type": "godot_pool_vector3_array_read_access *", - "arguments": [ - ["const godot_pool_vector3_array_read_access *", "p_read"] - ] - }, - { - "name": "godot_pool_vector3_array_read_access_ptr", - "return_type": "const godot_vector3 *", - "arguments": [ - ["const godot_pool_vector3_array_read_access *", "p_read"] - ] - }, - { - "name": "godot_pool_vector3_array_read_access_operator_assign", - "return_type": "void", - "arguments": [ - ["godot_pool_vector3_array_read_access *", "p_read"], - ["godot_pool_vector3_array_read_access *", "p_other"] - ] - }, - { - "name": "godot_pool_vector3_array_read_access_destroy", - "return_type": "void", - "arguments": [ - ["godot_pool_vector3_array_read_access *", "p_read"] - ] - }, - { - "name": "godot_pool_color_array_read_access_copy", - "return_type": "godot_pool_color_array_read_access *", - "arguments": [ - ["const godot_pool_color_array_read_access *", "p_read"] - ] - }, - { - "name": "godot_pool_color_array_read_access_ptr", - "return_type": "const godot_color *", - "arguments": [ - ["const godot_pool_color_array_read_access *", "p_read"] - ] - }, - { - "name": "godot_pool_color_array_read_access_operator_assign", - "return_type": "void", - "arguments": [ - ["godot_pool_color_array_read_access *", "p_read"], - ["godot_pool_color_array_read_access *", "p_other"] - ] - }, - { - "name": "godot_pool_color_array_read_access_destroy", - "return_type": "void", - "arguments": [ - ["godot_pool_color_array_read_access *", "p_read"] - ] - }, - { - "name": "godot_pool_byte_array_write_access_copy", - "return_type": "godot_pool_byte_array_write_access *", - "arguments": [ - ["const godot_pool_byte_array_write_access *", "p_write"] - ] - }, - { - "name": "godot_pool_byte_array_write_access_ptr", - "return_type": "uint8_t *", - "arguments": [ - ["const godot_pool_byte_array_write_access *", "p_write"] - ] - }, - { - "name": "godot_pool_byte_array_write_access_operator_assign", - "return_type": "void", - "arguments": [ - ["godot_pool_byte_array_write_access *", "p_write"], - ["godot_pool_byte_array_write_access *", "p_other"] - ] - }, - { - "name": "godot_pool_byte_array_write_access_destroy", - "return_type": "void", - "arguments": [ - ["godot_pool_byte_array_write_access *", "p_write"] - ] - }, - { - "name": "godot_pool_int_array_write_access_copy", - "return_type": "godot_pool_int_array_write_access *", - "arguments": [ - ["const godot_pool_int_array_write_access *", "p_write"] - ] - }, - { - "name": "godot_pool_int_array_write_access_ptr", - "return_type": "godot_int *", - "arguments": [ - ["const godot_pool_int_array_write_access *", "p_write"] - ] - }, - { - "name": "godot_pool_int_array_write_access_operator_assign", - "return_type": "void", - "arguments": [ - ["godot_pool_int_array_write_access *", "p_write"], - ["godot_pool_int_array_write_access *", "p_other"] - ] - }, - { - "name": "godot_pool_int_array_write_access_destroy", - "return_type": "void", - "arguments": [ - ["godot_pool_int_array_write_access *", "p_write"] - ] - }, - { - "name": "godot_pool_real_array_write_access_copy", - "return_type": "godot_pool_real_array_write_access *", - "arguments": [ - ["const godot_pool_real_array_write_access *", "p_write"] - ] - }, - { - "name": "godot_pool_real_array_write_access_ptr", - "return_type": "godot_real *", - "arguments": [ - ["const godot_pool_real_array_write_access *", "p_write"] - ] - }, - { - "name": "godot_pool_real_array_write_access_operator_assign", - "return_type": "void", - "arguments": [ - ["godot_pool_real_array_write_access *", "p_write"], - ["godot_pool_real_array_write_access *", "p_other"] - ] - }, - { - "name": "godot_pool_real_array_write_access_destroy", - "return_type": "void", - "arguments": [ - ["godot_pool_real_array_write_access *", "p_write"] - ] - }, - { - "name": "godot_pool_string_array_write_access_copy", - "return_type": "godot_pool_string_array_write_access *", - "arguments": [ - ["const godot_pool_string_array_write_access *", "p_write"] - ] - }, - { - "name": "godot_pool_string_array_write_access_ptr", - "return_type": "godot_string *", - "arguments": [ - ["const godot_pool_string_array_write_access *", "p_write"] - ] - }, - { - "name": "godot_pool_string_array_write_access_operator_assign", - "return_type": "void", - "arguments": [ - ["godot_pool_string_array_write_access *", "p_write"], - ["godot_pool_string_array_write_access *", "p_other"] - ] - }, - { - "name": "godot_pool_string_array_write_access_destroy", - "return_type": "void", - "arguments": [ - ["godot_pool_string_array_write_access *", "p_write"] - ] - }, - { - "name": "godot_pool_vector2_array_write_access_copy", - "return_type": "godot_pool_vector2_array_write_access *", - "arguments": [ - ["const godot_pool_vector2_array_write_access *", "p_write"] - ] - }, - { - "name": "godot_pool_vector2_array_write_access_ptr", - "return_type": "godot_vector2 *", - "arguments": [ - ["const godot_pool_vector2_array_write_access *", "p_write"] - ] - }, - { - "name": "godot_pool_vector2_array_write_access_operator_assign", - "return_type": "void", - "arguments": [ - ["godot_pool_vector2_array_write_access *", "p_write"], - ["godot_pool_vector2_array_write_access *", "p_other"] - ] - }, - { - "name": "godot_pool_vector2_array_write_access_destroy", - "return_type": "void", - "arguments": [ - ["godot_pool_vector2_array_write_access *", "p_write"] - ] - }, - { - "name": "godot_pool_vector3_array_write_access_copy", - "return_type": "godot_pool_vector3_array_write_access *", - "arguments": [ - ["const godot_pool_vector3_array_write_access *", "p_write"] - ] - }, - { - "name": "godot_pool_vector3_array_write_access_ptr", - "return_type": "godot_vector3 *", - "arguments": [ - ["const godot_pool_vector3_array_write_access *", "p_write"] - ] - }, - { - "name": "godot_pool_vector3_array_write_access_operator_assign", - "return_type": "void", - "arguments": [ - ["godot_pool_vector3_array_write_access *", "p_write"], - ["godot_pool_vector3_array_write_access *", "p_other"] - ] - }, - { - "name": "godot_pool_vector3_array_write_access_destroy", - "return_type": "void", - "arguments": [ - ["godot_pool_vector3_array_write_access *", "p_write"] - ] - }, - { - "name": "godot_pool_color_array_write_access_copy", - "return_type": "godot_pool_color_array_write_access *", - "arguments": [ - ["const godot_pool_color_array_write_access *", "p_write"] - ] - }, - { - "name": "godot_pool_color_array_write_access_ptr", - "return_type": "godot_color *", - "arguments": [ - ["const godot_pool_color_array_write_access *", "p_write"] - ] - }, - { - "name": "godot_pool_color_array_write_access_operator_assign", - "return_type": "void", - "arguments": [ - ["godot_pool_color_array_write_access *", "p_write"], - ["godot_pool_color_array_write_access *", "p_other"] + ["const godot_packed_color_array *", "p_self"] ] }, { - "name": "godot_pool_color_array_write_access_destroy", + "name": "godot_packed_color_array_destroy", "return_type": "void", "arguments": [ - ["godot_pool_color_array_write_access *", "p_write"] + ["godot_packed_color_array *", "p_self"] ] }, { @@ -2953,59 +2442,59 @@ ] }, { - "name": "godot_array_new_pool_color_array", + "name": "godot_array_new_packed_color_array", "return_type": "void", "arguments": [ ["godot_array *", "r_dest"], - ["const godot_pool_color_array *", "p_pca"] + ["const godot_packed_color_array *", "p_pca"] ] }, { - "name": "godot_array_new_pool_vector3_array", + "name": "godot_array_new_packed_vector3_array", "return_type": "void", "arguments": [ ["godot_array *", "r_dest"], - ["const godot_pool_vector3_array *", "p_pv3a"] + ["const godot_packed_vector3_array *", "p_pv3a"] ] }, { - "name": "godot_array_new_pool_vector2_array", + "name": "godot_array_new_packed_vector2_array", "return_type": "void", "arguments": [ ["godot_array *", "r_dest"], - ["const godot_pool_vector2_array *", "p_pv2a"] + ["const godot_packed_vector2_array *", "p_pv2a"] ] }, { - "name": "godot_array_new_pool_string_array", + "name": "godot_array_new_packed_string_array", "return_type": "void", "arguments": [ ["godot_array *", "r_dest"], - ["const godot_pool_string_array *", "p_psa"] + ["const godot_packed_string_array *", "p_psa"] ] }, { - "name": "godot_array_new_pool_real_array", + "name": "godot_array_new_packed_real_array", "return_type": "void", "arguments": [ ["godot_array *", "r_dest"], - ["const godot_pool_real_array *", "p_pra"] + ["const godot_packed_real_array *", "p_pra"] ] }, { - "name": "godot_array_new_pool_int_array", + "name": "godot_array_new_packed_int_array", "return_type": "void", "arguments": [ ["godot_array *", "r_dest"], - ["const godot_pool_int_array *", "p_pia"] + ["const godot_packed_int_array *", "p_pia"] ] }, { - "name": "godot_array_new_pool_byte_array", + "name": "godot_array_new_packed_byte_array", "return_type": "void", "arguments": [ ["godot_array *", "r_dest"], - ["const godot_pool_byte_array *", "p_pba"] + ["const godot_packed_byte_array *", "p_pba"] ] }, { @@ -4562,59 +4051,59 @@ ] }, { - "name": "godot_variant_new_pool_byte_array", + "name": "godot_variant_new_packed_byte_array", "return_type": "void", "arguments": [ ["godot_variant *", "r_dest"], - ["const godot_pool_byte_array *", "p_pba"] + ["const godot_packed_byte_array *", "p_pba"] ] }, { - "name": "godot_variant_new_pool_int_array", + "name": "godot_variant_new_packed_int_array", "return_type": "void", "arguments": [ ["godot_variant *", "r_dest"], - ["const godot_pool_int_array *", "p_pia"] + ["const godot_packed_int_array *", "p_pia"] ] }, { - "name": "godot_variant_new_pool_real_array", + "name": "godot_variant_new_packed_real_array", "return_type": "void", "arguments": [ ["godot_variant *", "r_dest"], - ["const godot_pool_real_array *", "p_pra"] + ["const godot_packed_real_array *", "p_pra"] ] }, { - "name": "godot_variant_new_pool_string_array", + "name": "godot_variant_new_packed_string_array", "return_type": "void", "arguments": [ ["godot_variant *", "r_dest"], - ["const godot_pool_string_array *", "p_psa"] + ["const godot_packed_string_array *", "p_psa"] ] }, { - "name": "godot_variant_new_pool_vector2_array", + "name": "godot_variant_new_packed_vector2_array", "return_type": "void", "arguments": [ ["godot_variant *", "r_dest"], - ["const godot_pool_vector2_array *", "p_pv2a"] + ["const godot_packed_vector2_array *", "p_pv2a"] ] }, { - "name": "godot_variant_new_pool_vector3_array", + "name": "godot_variant_new_packed_vector3_array", "return_type": "void", "arguments": [ ["godot_variant *", "r_dest"], - ["const godot_pool_vector3_array *", "p_pv3a"] + ["const godot_packed_vector3_array *", "p_pv3a"] ] }, { - "name": "godot_variant_new_pool_color_array", + "name": "godot_variant_new_packed_color_array", "return_type": "void", "arguments": [ ["godot_variant *", "r_dest"], - ["const godot_pool_color_array *", "p_pca"] + ["const godot_packed_color_array *", "p_pca"] ] }, { @@ -4758,50 +4247,50 @@ ] }, { - "name": "godot_variant_as_pool_byte_array", - "return_type": "godot_pool_byte_array", + "name": "godot_variant_as_packed_byte_array", + "return_type": "godot_packed_byte_array", "arguments": [ ["const godot_variant *", "p_self"] ] }, { - "name": "godot_variant_as_pool_int_array", - "return_type": "godot_pool_int_array", + "name": "godot_variant_as_packed_int_array", + "return_type": "godot_packed_int_array", "arguments": [ ["const godot_variant *", "p_self"] ] }, { - "name": "godot_variant_as_pool_real_array", - "return_type": "godot_pool_real_array", + "name": "godot_variant_as_packed_real_array", + "return_type": "godot_packed_real_array", "arguments": [ ["const godot_variant *", "p_self"] ] }, { - "name": "godot_variant_as_pool_string_array", - "return_type": "godot_pool_string_array", + "name": "godot_variant_as_packed_string_array", + "return_type": "godot_packed_string_array", "arguments": [ ["const godot_variant *", "p_self"] ] }, { - "name": "godot_variant_as_pool_vector2_array", - "return_type": "godot_pool_vector2_array", + "name": "godot_variant_as_packed_vector2_array", + "return_type": "godot_packed_vector2_array", "arguments": [ ["const godot_variant *", "p_self"] ] }, { - "name": "godot_variant_as_pool_vector3_array", - "return_type": "godot_pool_vector3_array", + "name": "godot_variant_as_packed_vector3_array", + "return_type": "godot_packed_vector3_array", "arguments": [ ["const godot_variant *", "p_self"] ] }, { - "name": "godot_variant_as_pool_color_array", - "return_type": "godot_pool_color_array", + "name": "godot_variant_as_packed_color_array", + "return_type": "godot_packed_color_array", "arguments": [ ["const godot_variant *", "p_self"] ] @@ -5789,7 +5278,7 @@ }, { "name": "godot_string_md5_buffer", - "return_type": "godot_pool_byte_array", + "return_type": "godot_packed_byte_array", "arguments": [ ["const godot_string *", "p_self"] ] @@ -5803,7 +5292,7 @@ }, { "name": "godot_string_sha256_buffer", - "return_type": "godot_pool_byte_array", + "return_type": "godot_packed_byte_array", "arguments": [ ["const godot_string *", "p_self"] ] diff --git a/modules/gdnative/gdnative_library_editor_plugin.cpp b/modules/gdnative/gdnative_library_editor_plugin.cpp index 5ffab0f80e..b434bc8385 100644 --- a/modules/gdnative/gdnative_library_editor_plugin.cpp +++ b/modules/gdnative/gdnative_library_editor_plugin.cpp @@ -168,7 +168,7 @@ void GDNativeLibraryEditor::_on_library_selected(const String &file) { _set_target_value(file_dialog->get_meta("section"), file_dialog->get_meta("target"), file); } -void GDNativeLibraryEditor::_on_dependencies_selected(const PoolStringArray &files) { +void GDNativeLibraryEditor::_on_dependencies_selected(const PackedStringArray &files) { _set_target_value(file_dialog->get_meta("section"), file_dialog->get_meta("target"), files); } @@ -359,7 +359,7 @@ GDNativeLibraryEditor::GDNativeLibraryEditor() { filter_list->set_item_checked(idx, true); idx += 1; } - filter_list->connect("index_pressed", this, "_on_filter_selected"); + filter_list->connect_compat("index_pressed", this, "_on_filter_selected"); tree = memnew(Tree); container->add_child(tree); @@ -374,16 +374,16 @@ GDNativeLibraryEditor::GDNativeLibraryEditor() { tree->set_column_title(2, TTR("Dependencies")); tree->set_column_expand(3, false); tree->set_column_min_width(3, int(110 * EDSCALE)); - tree->connect("button_pressed", this, "_on_item_button"); - tree->connect("item_collapsed", this, "_on_item_collapsed"); - tree->connect("item_activated", this, "_on_item_activated"); + tree->connect_compat("button_pressed", this, "_on_item_button"); + tree->connect_compat("item_collapsed", this, "_on_item_collapsed"); + tree->connect_compat("item_activated", this, "_on_item_activated"); file_dialog = memnew(EditorFileDialog); file_dialog->set_access(EditorFileDialog::ACCESS_RESOURCES); file_dialog->set_resizable(true); add_child(file_dialog); - file_dialog->connect("file_selected", this, "_on_library_selected"); - file_dialog->connect("files_selected", this, "_on_dependencies_selected"); + file_dialog->connect_compat("file_selected", this, "_on_library_selected"); + file_dialog->connect_compat("files_selected", this, "_on_dependencies_selected"); new_architecture_dialog = memnew(ConfirmationDialog); add_child(new_architecture_dialog); @@ -392,7 +392,7 @@ GDNativeLibraryEditor::GDNativeLibraryEditor() { new_architecture_dialog->add_child(new_architecture_input); new_architecture_dialog->set_custom_minimum_size(Vector2(300, 80) * EDSCALE); new_architecture_input->set_anchors_and_margins_preset(PRESET_HCENTER_WIDE, PRESET_MODE_MINSIZE, 5 * EDSCALE); - new_architecture_dialog->get_ok()->connect("pressed", this, "_on_create_new_entry"); + new_architecture_dialog->get_ok()->connect_compat("pressed", this, "_on_create_new_entry"); } void GDNativeLibraryEditorPlugin::edit(Object *p_node) { diff --git a/modules/gdnative/gdnative_library_editor_plugin.h b/modules/gdnative/gdnative_library_editor_plugin.h index 7b59aaac38..b1274d08b3 100644 --- a/modules/gdnative/gdnative_library_editor_plugin.h +++ b/modules/gdnative/gdnative_library_editor_plugin.h @@ -77,7 +77,7 @@ protected: void _update_tree(); void _on_item_button(Object *item, int column, int id); void _on_library_selected(const String &file); - void _on_dependencies_selected(const PoolStringArray &files); + void _on_dependencies_selected(const PackedStringArray &files); void _on_filter_selected(int id); void _on_item_collapsed(Object *p_item); void _on_item_activated(); diff --git a/modules/gdnative/gdnative_library_singleton_editor.cpp b/modules/gdnative/gdnative_library_singleton_editor.cpp index 17a7d5492a..e5eb3c44d0 100644 --- a/modules/gdnative/gdnative_library_singleton_editor.cpp +++ b/modules/gdnative/gdnative_library_singleton_editor.cpp @@ -207,8 +207,8 @@ GDNativeLibrarySingletonEditor::GDNativeLibrarySingletonEditor() { libraries->set_hide_root(true); add_margin_child(TTR("Libraries: "), libraries, true); updating = false; - libraries->connect("item_edited", this, "_item_edited"); - EditorFileSystem::get_singleton()->connect("filesystem_changed", this, "_discover_singletons"); + libraries->connect_compat("item_edited", this, "_item_edited"); + EditorFileSystem::get_singleton()->connect_compat("filesystem_changed", this, "_discover_singletons"); } #endif // TOOLS_ENABLED diff --git a/modules/gdnative/include/gdnative/array.h b/modules/gdnative/include/gdnative/array.h index 36b5c77875..e3114e9348 100644 --- a/modules/gdnative/include/gdnative/array.h +++ b/modules/gdnative/include/gdnative/array.h @@ -62,13 +62,13 @@ extern "C" { void GDAPI godot_array_new(godot_array *r_dest); void GDAPI godot_array_new_copy(godot_array *r_dest, const godot_array *p_src); -void GDAPI godot_array_new_pool_color_array(godot_array *r_dest, const godot_pool_color_array *p_pca); -void GDAPI godot_array_new_pool_vector3_array(godot_array *r_dest, const godot_pool_vector3_array *p_pv3a); -void GDAPI godot_array_new_pool_vector2_array(godot_array *r_dest, const godot_pool_vector2_array *p_pv2a); -void GDAPI godot_array_new_pool_string_array(godot_array *r_dest, const godot_pool_string_array *p_psa); -void GDAPI godot_array_new_pool_real_array(godot_array *r_dest, const godot_pool_real_array *p_pra); -void GDAPI godot_array_new_pool_int_array(godot_array *r_dest, const godot_pool_int_array *p_pia); -void GDAPI godot_array_new_pool_byte_array(godot_array *r_dest, const godot_pool_byte_array *p_pba); +void GDAPI godot_array_new_packed_color_array(godot_array *r_dest, const godot_packed_color_array *p_pca); +void GDAPI godot_array_new_packed_vector3_array(godot_array *r_dest, const godot_packed_vector3_array *p_pv3a); +void GDAPI godot_array_new_packed_vector2_array(godot_array *r_dest, const godot_packed_vector2_array *p_pv2a); +void GDAPI godot_array_new_packed_string_array(godot_array *r_dest, const godot_packed_string_array *p_psa); +void GDAPI godot_array_new_packed_real_array(godot_array *r_dest, const godot_packed_real_array *p_pra); +void GDAPI godot_array_new_packed_int_array(godot_array *r_dest, const godot_packed_int_array *p_pia); +void GDAPI godot_array_new_packed_byte_array(godot_array *r_dest, const godot_packed_byte_array *p_pba); void GDAPI godot_array_set(godot_array *p_self, const godot_int p_idx, const godot_variant *p_value); diff --git a/modules/gdnative/include/gdnative/gdnative.h b/modules/gdnative/include/gdnative/gdnative.h index 6fd0bdc87f..6fdca30122 100644 --- a/modules/gdnative/include/gdnative/gdnative.h +++ b/modules/gdnative/include/gdnative/gdnative.h @@ -282,9 +282,7 @@ void GDAPI godot_print_error(const char *p_description, const char *p_function, void GDAPI godot_print_warning(const char *p_description, const char *p_function, const char *p_file, int p_line); void GDAPI godot_print(const godot_string *p_message); -// GDNATIVE CORE 1.0.1 - -bool GDAPI godot_is_instance_valid(const godot_object *p_object); +// GDNATIVE CORE 1.0.2? //tags used for safe dynamic casting void GDAPI *godot_get_class_tag(const godot_string_name *p_class); diff --git a/modules/gdnative/include/gdnative/pool_arrays.h b/modules/gdnative/include/gdnative/pool_arrays.h index 7d51b3cd5c..c610377f54 100644 --- a/modules/gdnative/include/gdnative/pool_arrays.h +++ b/modules/gdnative/include/gdnative/pool_arrays.h @@ -37,113 +37,81 @@ extern "C" { #include <stdint.h> -/////// Read Access +/////// PackedByteArray -#define GODOT_POOL_ARRAY_READ_ACCESS_SIZE 1 +#define GODOT_PACKED_BYTE_ARRAY_SIZE sizeof(void *) +#ifndef GODOT_CORE_API_GODOT_PACKED_BYTE_ARRAY_TYPE_DEFINED +#define GODOT_CORE_API_GODOT_PACKED_BYTE_ARRAY_TYPE_DEFINED typedef struct { - uint8_t _dont_touch_that[GODOT_POOL_ARRAY_READ_ACCESS_SIZE]; -} godot_pool_array_read_access; - -typedef godot_pool_array_read_access godot_pool_byte_array_read_access; -typedef godot_pool_array_read_access godot_pool_int_array_read_access; -typedef godot_pool_array_read_access godot_pool_real_array_read_access; -typedef godot_pool_array_read_access godot_pool_string_array_read_access; -typedef godot_pool_array_read_access godot_pool_vector2_array_read_access; -typedef godot_pool_array_read_access godot_pool_vector3_array_read_access; -typedef godot_pool_array_read_access godot_pool_color_array_read_access; - -/////// Write Access - -#define GODOT_POOL_ARRAY_WRITE_ACCESS_SIZE 1 - -typedef struct { - uint8_t _dont_touch_that[GODOT_POOL_ARRAY_WRITE_ACCESS_SIZE]; -} godot_pool_array_write_access; - -typedef godot_pool_array_write_access godot_pool_byte_array_write_access; -typedef godot_pool_array_write_access godot_pool_int_array_write_access; -typedef godot_pool_array_write_access godot_pool_real_array_write_access; -typedef godot_pool_array_write_access godot_pool_string_array_write_access; -typedef godot_pool_array_write_access godot_pool_vector2_array_write_access; -typedef godot_pool_array_write_access godot_pool_vector3_array_write_access; -typedef godot_pool_array_write_access godot_pool_color_array_write_access; - -/////// PoolByteArray - -#define GODOT_POOL_BYTE_ARRAY_SIZE sizeof(void *) - -#ifndef GODOT_CORE_API_GODOT_POOL_BYTE_ARRAY_TYPE_DEFINED -#define GODOT_CORE_API_GODOT_POOL_BYTE_ARRAY_TYPE_DEFINED -typedef struct { - uint8_t _dont_touch_that[GODOT_POOL_BYTE_ARRAY_SIZE]; -} godot_pool_byte_array; + uint8_t _dont_touch_that[GODOT_PACKED_BYTE_ARRAY_SIZE]; +} godot_packed_byte_array; #endif -/////// PoolIntArray +/////// PackedInt32Array -#define GODOT_POOL_INT_ARRAY_SIZE sizeof(void *) +#define GODOT_PACKED_INT_ARRAY_SIZE sizeof(void *) -#ifndef GODOT_CORE_API_GODOT_POOL_INT_ARRAY_TYPE_DEFINED -#define GODOT_CORE_API_GODOT_POOL_INT_ARRAY_TYPE_DEFINED +#ifndef GODOT_CORE_API_GODOT_PACKED_INT_ARRAY_TYPE_DEFINED +#define GODOT_CORE_API_GODOT_PACKED_INT_ARRAY_TYPE_DEFINED typedef struct { - uint8_t _dont_touch_that[GODOT_POOL_INT_ARRAY_SIZE]; -} godot_pool_int_array; + uint8_t _dont_touch_that[GODOT_PACKED_INT_ARRAY_SIZE]; +} godot_packed_int_array; #endif -/////// PoolRealArray +/////// PackedFloat32Array -#define GODOT_POOL_REAL_ARRAY_SIZE sizeof(void *) +#define GODOT_PACKED_REAL_ARRAY_SIZE sizeof(void *) -#ifndef GODOT_CORE_API_GODOT_POOL_REAL_ARRAY_TYPE_DEFINED -#define GODOT_CORE_API_GODOT_POOL_REAL_ARRAY_TYPE_DEFINED +#ifndef GODOT_CORE_API_GODOT_PACKED_REAL_ARRAY_TYPE_DEFINED +#define GODOT_CORE_API_GODOT_PACKED_REAL_ARRAY_TYPE_DEFINED typedef struct { - uint8_t _dont_touch_that[GODOT_POOL_REAL_ARRAY_SIZE]; -} godot_pool_real_array; + uint8_t _dont_touch_that[GODOT_PACKED_REAL_ARRAY_SIZE]; +} godot_packed_real_array; #endif -/////// PoolStringArray +/////// PackedStringArray -#define GODOT_POOL_STRING_ARRAY_SIZE sizeof(void *) +#define GODOT_PACKED_STRING_ARRAY_SIZE sizeof(void *) -#ifndef GODOT_CORE_API_GODOT_POOL_STRING_ARRAY_TYPE_DEFINED -#define GODOT_CORE_API_GODOT_POOL_STRING_ARRAY_TYPE_DEFINED +#ifndef GODOT_CORE_API_GODOT_PACKED_STRING_ARRAY_TYPE_DEFINED +#define GODOT_CORE_API_GODOT_PACKED_STRING_ARRAY_TYPE_DEFINED typedef struct { - uint8_t _dont_touch_that[GODOT_POOL_STRING_ARRAY_SIZE]; -} godot_pool_string_array; + uint8_t _dont_touch_that[GODOT_PACKED_STRING_ARRAY_SIZE]; +} godot_packed_string_array; #endif -/////// PoolVector2Array +/////// PackedVector2Array -#define GODOT_POOL_VECTOR2_ARRAY_SIZE sizeof(void *) +#define GODOT_PACKED_VECTOR2_ARRAY_SIZE sizeof(void *) -#ifndef GODOT_CORE_API_GODOT_POOL_VECTOR2_ARRAY_TYPE_DEFINED -#define GODOT_CORE_API_GODOT_POOL_VECTOR2_ARRAY_TYPE_DEFINED +#ifndef GODOT_CORE_API_GODOT_PACKED_VECTOR2_ARRAY_TYPE_DEFINED +#define GODOT_CORE_API_GODOT_PACKED_VECTOR2_ARRAY_TYPE_DEFINED typedef struct { - uint8_t _dont_touch_that[GODOT_POOL_VECTOR2_ARRAY_SIZE]; -} godot_pool_vector2_array; + uint8_t _dont_touch_that[GODOT_PACKED_VECTOR2_ARRAY_SIZE]; +} godot_packed_vector2_array; #endif -/////// PoolVector3Array +/////// PackedVector3Array -#define GODOT_POOL_VECTOR3_ARRAY_SIZE sizeof(void *) +#define GODOT_PACKED_VECTOR3_ARRAY_SIZE sizeof(void *) -#ifndef GODOT_CORE_API_GODOT_POOL_VECTOR3_ARRAY_TYPE_DEFINED -#define GODOT_CORE_API_GODOT_POOL_VECTOR3_ARRAY_TYPE_DEFINED +#ifndef GODOT_CORE_API_GODOT_PACKED_VECTOR3_ARRAY_TYPE_DEFINED +#define GODOT_CORE_API_GODOT_PACKED_VECTOR3_ARRAY_TYPE_DEFINED typedef struct { - uint8_t _dont_touch_that[GODOT_POOL_VECTOR3_ARRAY_SIZE]; -} godot_pool_vector3_array; + uint8_t _dont_touch_that[GODOT_PACKED_VECTOR3_ARRAY_SIZE]; +} godot_packed_vector3_array; #endif -/////// PoolColorArray +/////// PackedColorArray -#define GODOT_POOL_COLOR_ARRAY_SIZE sizeof(void *) +#define GODOT_PACKED_COLOR_ARRAY_SIZE sizeof(void *) -#ifndef GODOT_CORE_API_GODOT_POOL_COLOR_ARRAY_TYPE_DEFINED -#define GODOT_CORE_API_GODOT_POOL_COLOR_ARRAY_TYPE_DEFINED +#ifndef GODOT_CORE_API_GODOT_PACKED_COLOR_ARRAY_TYPE_DEFINED +#define GODOT_CORE_API_GODOT_PACKED_COLOR_ARRAY_TYPE_DEFINED typedef struct { - uint8_t _dont_touch_that[GODOT_POOL_COLOR_ARRAY_SIZE]; -} godot_pool_color_array; + uint8_t _dont_touch_that[GODOT_PACKED_COLOR_ARRAY_SIZE]; +} godot_packed_color_array; #endif // reduce extern "C" nesting for VS2013 @@ -164,312 +132,206 @@ extern "C" { // byte -void GDAPI godot_pool_byte_array_new(godot_pool_byte_array *r_dest); -void GDAPI godot_pool_byte_array_new_copy(godot_pool_byte_array *r_dest, const godot_pool_byte_array *p_src); -void GDAPI godot_pool_byte_array_new_with_array(godot_pool_byte_array *r_dest, const godot_array *p_a); +void GDAPI godot_packed_byte_array_new(godot_packed_byte_array *r_dest); +void GDAPI godot_packed_byte_array_new_copy(godot_packed_byte_array *r_dest, const godot_packed_byte_array *p_src); +void GDAPI godot_packed_byte_array_new_with_array(godot_packed_byte_array *r_dest, const godot_array *p_a); -void GDAPI godot_pool_byte_array_append(godot_pool_byte_array *p_self, const uint8_t p_data); +void GDAPI godot_packed_byte_array_append(godot_packed_byte_array *p_self, const uint8_t p_data); -void GDAPI godot_pool_byte_array_append_array(godot_pool_byte_array *p_self, const godot_pool_byte_array *p_array); +void GDAPI godot_packed_byte_array_append_array(godot_packed_byte_array *p_self, const godot_packed_byte_array *p_array); -godot_error GDAPI godot_pool_byte_array_insert(godot_pool_byte_array *p_self, const godot_int p_idx, const uint8_t p_data); +godot_error GDAPI godot_packed_byte_array_insert(godot_packed_byte_array *p_self, const godot_int p_idx, const uint8_t p_data); -void GDAPI godot_pool_byte_array_invert(godot_pool_byte_array *p_self); +void GDAPI godot_packed_byte_array_invert(godot_packed_byte_array *p_self); -void GDAPI godot_pool_byte_array_push_back(godot_pool_byte_array *p_self, const uint8_t p_data); +void GDAPI godot_packed_byte_array_push_back(godot_packed_byte_array *p_self, const uint8_t p_data); -void GDAPI godot_pool_byte_array_remove(godot_pool_byte_array *p_self, const godot_int p_idx); +void GDAPI godot_packed_byte_array_remove(godot_packed_byte_array *p_self, const godot_int p_idx); -void GDAPI godot_pool_byte_array_resize(godot_pool_byte_array *p_self, const godot_int p_size); +void GDAPI godot_packed_byte_array_resize(godot_packed_byte_array *p_self, const godot_int p_size); -godot_pool_byte_array_read_access GDAPI *godot_pool_byte_array_read(const godot_pool_byte_array *p_self); +void GDAPI godot_packed_byte_array_set(godot_packed_byte_array *p_self, const godot_int p_idx, const uint8_t p_data); +uint8_t GDAPI godot_packed_byte_array_get(const godot_packed_byte_array *p_self, const godot_int p_idx); -godot_pool_byte_array_write_access GDAPI *godot_pool_byte_array_write(godot_pool_byte_array *p_self); +godot_int GDAPI godot_packed_byte_array_size(const godot_packed_byte_array *p_self); -void GDAPI godot_pool_byte_array_set(godot_pool_byte_array *p_self, const godot_int p_idx, const uint8_t p_data); -uint8_t GDAPI godot_pool_byte_array_get(const godot_pool_byte_array *p_self, const godot_int p_idx); +godot_bool GDAPI godot_packed_byte_array_empty(const godot_packed_byte_array *p_self); -godot_int GDAPI godot_pool_byte_array_size(const godot_pool_byte_array *p_self); - -godot_bool GDAPI godot_pool_byte_array_empty(const godot_pool_byte_array *p_self); - -void GDAPI godot_pool_byte_array_destroy(godot_pool_byte_array *p_self); +void GDAPI godot_packed_byte_array_destroy(godot_packed_byte_array *p_self); // int -void GDAPI godot_pool_int_array_new(godot_pool_int_array *r_dest); -void GDAPI godot_pool_int_array_new_copy(godot_pool_int_array *r_dest, const godot_pool_int_array *p_src); -void GDAPI godot_pool_int_array_new_with_array(godot_pool_int_array *r_dest, const godot_array *p_a); - -void GDAPI godot_pool_int_array_append(godot_pool_int_array *p_self, const godot_int p_data); +void GDAPI godot_packed_int_array_new(godot_packed_int_array *r_dest); +void GDAPI godot_packed_int_array_new_copy(godot_packed_int_array *r_dest, const godot_packed_int_array *p_src); +void GDAPI godot_packed_int_array_new_with_array(godot_packed_int_array *r_dest, const godot_array *p_a); -void GDAPI godot_pool_int_array_append_array(godot_pool_int_array *p_self, const godot_pool_int_array *p_array); +void GDAPI godot_packed_int_array_append(godot_packed_int_array *p_self, const godot_int p_data); -godot_error GDAPI godot_pool_int_array_insert(godot_pool_int_array *p_self, const godot_int p_idx, const godot_int p_data); +void GDAPI godot_packed_int_array_append_array(godot_packed_int_array *p_self, const godot_packed_int_array *p_array); -void GDAPI godot_pool_int_array_invert(godot_pool_int_array *p_self); +godot_error GDAPI godot_packed_int_array_insert(godot_packed_int_array *p_self, const godot_int p_idx, const godot_int p_data); -void GDAPI godot_pool_int_array_push_back(godot_pool_int_array *p_self, const godot_int p_data); +void GDAPI godot_packed_int_array_invert(godot_packed_int_array *p_self); -void GDAPI godot_pool_int_array_remove(godot_pool_int_array *p_self, const godot_int p_idx); +void GDAPI godot_packed_int_array_push_back(godot_packed_int_array *p_self, const godot_int p_data); -void GDAPI godot_pool_int_array_resize(godot_pool_int_array *p_self, const godot_int p_size); +void GDAPI godot_packed_int_array_remove(godot_packed_int_array *p_self, const godot_int p_idx); -godot_pool_int_array_read_access GDAPI *godot_pool_int_array_read(const godot_pool_int_array *p_self); +void GDAPI godot_packed_int_array_resize(godot_packed_int_array *p_self, const godot_int p_size); -godot_pool_int_array_write_access GDAPI *godot_pool_int_array_write(godot_pool_int_array *p_self); +void GDAPI godot_packed_int_array_set(godot_packed_int_array *p_self, const godot_int p_idx, const godot_int p_data); +godot_int GDAPI godot_packed_int_array_get(const godot_packed_int_array *p_self, const godot_int p_idx); -void GDAPI godot_pool_int_array_set(godot_pool_int_array *p_self, const godot_int p_idx, const godot_int p_data); -godot_int GDAPI godot_pool_int_array_get(const godot_pool_int_array *p_self, const godot_int p_idx); +godot_int GDAPI godot_packed_int_array_size(const godot_packed_int_array *p_self); -godot_int GDAPI godot_pool_int_array_size(const godot_pool_int_array *p_self); +godot_bool GDAPI godot_packed_int_array_empty(const godot_packed_int_array *p_self); -godot_bool GDAPI godot_pool_int_array_empty(const godot_pool_int_array *p_self); - -void GDAPI godot_pool_int_array_destroy(godot_pool_int_array *p_self); +void GDAPI godot_packed_int_array_destroy(godot_packed_int_array *p_self); // real -void GDAPI godot_pool_real_array_new(godot_pool_real_array *r_dest); -void GDAPI godot_pool_real_array_new_copy(godot_pool_real_array *r_dest, const godot_pool_real_array *p_src); -void GDAPI godot_pool_real_array_new_with_array(godot_pool_real_array *r_dest, const godot_array *p_a); - -void GDAPI godot_pool_real_array_append(godot_pool_real_array *p_self, const godot_real p_data); +void GDAPI godot_packed_real_array_new(godot_packed_real_array *r_dest); +void GDAPI godot_packed_real_array_new_copy(godot_packed_real_array *r_dest, const godot_packed_real_array *p_src); +void GDAPI godot_packed_real_array_new_with_array(godot_packed_real_array *r_dest, const godot_array *p_a); -void GDAPI godot_pool_real_array_append_array(godot_pool_real_array *p_self, const godot_pool_real_array *p_array); +void GDAPI godot_packed_real_array_append(godot_packed_real_array *p_self, const godot_real p_data); -godot_error GDAPI godot_pool_real_array_insert(godot_pool_real_array *p_self, const godot_int p_idx, const godot_real p_data); +void GDAPI godot_packed_real_array_append_array(godot_packed_real_array *p_self, const godot_packed_real_array *p_array); -void GDAPI godot_pool_real_array_invert(godot_pool_real_array *p_self); +godot_error GDAPI godot_packed_real_array_insert(godot_packed_real_array *p_self, const godot_int p_idx, const godot_real p_data); -void GDAPI godot_pool_real_array_push_back(godot_pool_real_array *p_self, const godot_real p_data); +void GDAPI godot_packed_real_array_invert(godot_packed_real_array *p_self); -void GDAPI godot_pool_real_array_remove(godot_pool_real_array *p_self, const godot_int p_idx); +void GDAPI godot_packed_real_array_push_back(godot_packed_real_array *p_self, const godot_real p_data); -void GDAPI godot_pool_real_array_resize(godot_pool_real_array *p_self, const godot_int p_size); +void GDAPI godot_packed_real_array_remove(godot_packed_real_array *p_self, const godot_int p_idx); -godot_pool_real_array_read_access GDAPI *godot_pool_real_array_read(const godot_pool_real_array *p_self); +void GDAPI godot_packed_real_array_resize(godot_packed_real_array *p_self, const godot_int p_size); -godot_pool_real_array_write_access GDAPI *godot_pool_real_array_write(godot_pool_real_array *p_self); +void GDAPI godot_packed_real_array_set(godot_packed_real_array *p_self, const godot_int p_idx, const godot_real p_data); +godot_real GDAPI godot_packed_real_array_get(const godot_packed_real_array *p_self, const godot_int p_idx); -void GDAPI godot_pool_real_array_set(godot_pool_real_array *p_self, const godot_int p_idx, const godot_real p_data); -godot_real GDAPI godot_pool_real_array_get(const godot_pool_real_array *p_self, const godot_int p_idx); +godot_int GDAPI godot_packed_real_array_size(const godot_packed_real_array *p_self); -godot_int GDAPI godot_pool_real_array_size(const godot_pool_real_array *p_self); +godot_bool GDAPI godot_packed_real_array_empty(const godot_packed_real_array *p_self); -godot_bool GDAPI godot_pool_real_array_empty(const godot_pool_real_array *p_self); - -void GDAPI godot_pool_real_array_destroy(godot_pool_real_array *p_self); +void GDAPI godot_packed_real_array_destroy(godot_packed_real_array *p_self); // string -void GDAPI godot_pool_string_array_new(godot_pool_string_array *r_dest); -void GDAPI godot_pool_string_array_new_copy(godot_pool_string_array *r_dest, const godot_pool_string_array *p_src); -void GDAPI godot_pool_string_array_new_with_array(godot_pool_string_array *r_dest, const godot_array *p_a); - -void GDAPI godot_pool_string_array_append(godot_pool_string_array *p_self, const godot_string *p_data); - -void GDAPI godot_pool_string_array_append_array(godot_pool_string_array *p_self, const godot_pool_string_array *p_array); +void GDAPI godot_packed_string_array_new(godot_packed_string_array *r_dest); +void GDAPI godot_packed_string_array_new_copy(godot_packed_string_array *r_dest, const godot_packed_string_array *p_src); +void GDAPI godot_packed_string_array_new_with_array(godot_packed_string_array *r_dest, const godot_array *p_a); -godot_error GDAPI godot_pool_string_array_insert(godot_pool_string_array *p_self, const godot_int p_idx, const godot_string *p_data); +void GDAPI godot_packed_string_array_append(godot_packed_string_array *p_self, const godot_string *p_data); -void GDAPI godot_pool_string_array_invert(godot_pool_string_array *p_self); +void GDAPI godot_packed_string_array_append_array(godot_packed_string_array *p_self, const godot_packed_string_array *p_array); -void GDAPI godot_pool_string_array_push_back(godot_pool_string_array *p_self, const godot_string *p_data); +godot_error GDAPI godot_packed_string_array_insert(godot_packed_string_array *p_self, const godot_int p_idx, const godot_string *p_data); -void GDAPI godot_pool_string_array_remove(godot_pool_string_array *p_self, const godot_int p_idx); +void GDAPI godot_packed_string_array_invert(godot_packed_string_array *p_self); -void GDAPI godot_pool_string_array_resize(godot_pool_string_array *p_self, const godot_int p_size); +void GDAPI godot_packed_string_array_push_back(godot_packed_string_array *p_self, const godot_string *p_data); -godot_pool_string_array_read_access GDAPI *godot_pool_string_array_read(const godot_pool_string_array *p_self); +void GDAPI godot_packed_string_array_remove(godot_packed_string_array *p_self, const godot_int p_idx); -godot_pool_string_array_write_access GDAPI *godot_pool_string_array_write(godot_pool_string_array *p_self); +void GDAPI godot_packed_string_array_resize(godot_packed_string_array *p_self, const godot_int p_size); -void GDAPI godot_pool_string_array_set(godot_pool_string_array *p_self, const godot_int p_idx, const godot_string *p_data); -godot_string GDAPI godot_pool_string_array_get(const godot_pool_string_array *p_self, const godot_int p_idx); +void GDAPI godot_packed_string_array_set(godot_packed_string_array *p_self, const godot_int p_idx, const godot_string *p_data); +godot_string GDAPI godot_packed_string_array_get(const godot_packed_string_array *p_self, const godot_int p_idx); -godot_int GDAPI godot_pool_string_array_size(const godot_pool_string_array *p_self); +godot_int GDAPI godot_packed_string_array_size(const godot_packed_string_array *p_self); -godot_bool GDAPI godot_pool_string_array_empty(const godot_pool_string_array *p_self); +godot_bool GDAPI godot_packed_string_array_empty(const godot_packed_string_array *p_self); -void GDAPI godot_pool_string_array_destroy(godot_pool_string_array *p_self); +void GDAPI godot_packed_string_array_destroy(godot_packed_string_array *p_self); // vector2 -void GDAPI godot_pool_vector2_array_new(godot_pool_vector2_array *r_dest); -void GDAPI godot_pool_vector2_array_new_copy(godot_pool_vector2_array *r_dest, const godot_pool_vector2_array *p_src); -void GDAPI godot_pool_vector2_array_new_with_array(godot_pool_vector2_array *r_dest, const godot_array *p_a); - -void GDAPI godot_pool_vector2_array_append(godot_pool_vector2_array *p_self, const godot_vector2 *p_data); - -void GDAPI godot_pool_vector2_array_append_array(godot_pool_vector2_array *p_self, const godot_pool_vector2_array *p_array); +void GDAPI godot_packed_vector2_array_new(godot_packed_vector2_array *r_dest); +void GDAPI godot_packed_vector2_array_new_copy(godot_packed_vector2_array *r_dest, const godot_packed_vector2_array *p_src); +void GDAPI godot_packed_vector2_array_new_with_array(godot_packed_vector2_array *r_dest, const godot_array *p_a); -godot_error GDAPI godot_pool_vector2_array_insert(godot_pool_vector2_array *p_self, const godot_int p_idx, const godot_vector2 *p_data); +void GDAPI godot_packed_vector2_array_append(godot_packed_vector2_array *p_self, const godot_vector2 *p_data); -void GDAPI godot_pool_vector2_array_invert(godot_pool_vector2_array *p_self); +void GDAPI godot_packed_vector2_array_append_array(godot_packed_vector2_array *p_self, const godot_packed_vector2_array *p_array); -void GDAPI godot_pool_vector2_array_push_back(godot_pool_vector2_array *p_self, const godot_vector2 *p_data); +godot_error GDAPI godot_packed_vector2_array_insert(godot_packed_vector2_array *p_self, const godot_int p_idx, const godot_vector2 *p_data); -void GDAPI godot_pool_vector2_array_remove(godot_pool_vector2_array *p_self, const godot_int p_idx); +void GDAPI godot_packed_vector2_array_invert(godot_packed_vector2_array *p_self); -void GDAPI godot_pool_vector2_array_resize(godot_pool_vector2_array *p_self, const godot_int p_size); +void GDAPI godot_packed_vector2_array_push_back(godot_packed_vector2_array *p_self, const godot_vector2 *p_data); -godot_pool_vector2_array_read_access GDAPI *godot_pool_vector2_array_read(const godot_pool_vector2_array *p_self); +void GDAPI godot_packed_vector2_array_remove(godot_packed_vector2_array *p_self, const godot_int p_idx); -godot_pool_vector2_array_write_access GDAPI *godot_pool_vector2_array_write(godot_pool_vector2_array *p_self); +void GDAPI godot_packed_vector2_array_resize(godot_packed_vector2_array *p_self, const godot_int p_size); -void GDAPI godot_pool_vector2_array_set(godot_pool_vector2_array *p_self, const godot_int p_idx, const godot_vector2 *p_data); -godot_vector2 GDAPI godot_pool_vector2_array_get(const godot_pool_vector2_array *p_self, const godot_int p_idx); +void GDAPI godot_packed_vector2_array_set(godot_packed_vector2_array *p_self, const godot_int p_idx, const godot_vector2 *p_data); +godot_vector2 GDAPI godot_packed_vector2_array_get(const godot_packed_vector2_array *p_self, const godot_int p_idx); -godot_int GDAPI godot_pool_vector2_array_size(const godot_pool_vector2_array *p_self); +godot_int GDAPI godot_packed_vector2_array_size(const godot_packed_vector2_array *p_self); -godot_bool GDAPI godot_pool_vector2_array_empty(const godot_pool_vector2_array *p_self); +godot_bool GDAPI godot_packed_vector2_array_empty(const godot_packed_vector2_array *p_self); -void GDAPI godot_pool_vector2_array_destroy(godot_pool_vector2_array *p_self); +void GDAPI godot_packed_vector2_array_destroy(godot_packed_vector2_array *p_self); // vector3 -void GDAPI godot_pool_vector3_array_new(godot_pool_vector3_array *r_dest); -void GDAPI godot_pool_vector3_array_new_copy(godot_pool_vector3_array *r_dest, const godot_pool_vector3_array *p_src); -void GDAPI godot_pool_vector3_array_new_with_array(godot_pool_vector3_array *r_dest, const godot_array *p_a); +void GDAPI godot_packed_vector3_array_new(godot_packed_vector3_array *r_dest); +void GDAPI godot_packed_vector3_array_new_copy(godot_packed_vector3_array *r_dest, const godot_packed_vector3_array *p_src); +void GDAPI godot_packed_vector3_array_new_with_array(godot_packed_vector3_array *r_dest, const godot_array *p_a); -void GDAPI godot_pool_vector3_array_append(godot_pool_vector3_array *p_self, const godot_vector3 *p_data); +void GDAPI godot_packed_vector3_array_append(godot_packed_vector3_array *p_self, const godot_vector3 *p_data); -void GDAPI godot_pool_vector3_array_append_array(godot_pool_vector3_array *p_self, const godot_pool_vector3_array *p_array); +void GDAPI godot_packed_vector3_array_append_array(godot_packed_vector3_array *p_self, const godot_packed_vector3_array *p_array); -godot_error GDAPI godot_pool_vector3_array_insert(godot_pool_vector3_array *p_self, const godot_int p_idx, const godot_vector3 *p_data); +godot_error GDAPI godot_packed_vector3_array_insert(godot_packed_vector3_array *p_self, const godot_int p_idx, const godot_vector3 *p_data); -void GDAPI godot_pool_vector3_array_invert(godot_pool_vector3_array *p_self); +void GDAPI godot_packed_vector3_array_invert(godot_packed_vector3_array *p_self); -void GDAPI godot_pool_vector3_array_push_back(godot_pool_vector3_array *p_self, const godot_vector3 *p_data); +void GDAPI godot_packed_vector3_array_push_back(godot_packed_vector3_array *p_self, const godot_vector3 *p_data); -void GDAPI godot_pool_vector3_array_remove(godot_pool_vector3_array *p_self, const godot_int p_idx); +void GDAPI godot_packed_vector3_array_remove(godot_packed_vector3_array *p_self, const godot_int p_idx); -void GDAPI godot_pool_vector3_array_resize(godot_pool_vector3_array *p_self, const godot_int p_size); +void GDAPI godot_packed_vector3_array_resize(godot_packed_vector3_array *p_self, const godot_int p_size); -godot_pool_vector3_array_read_access GDAPI *godot_pool_vector3_array_read(const godot_pool_vector3_array *p_self); +void GDAPI godot_packed_vector3_array_set(godot_packed_vector3_array *p_self, const godot_int p_idx, const godot_vector3 *p_data); +godot_vector3 GDAPI godot_packed_vector3_array_get(const godot_packed_vector3_array *p_self, const godot_int p_idx); -godot_pool_vector3_array_write_access GDAPI *godot_pool_vector3_array_write(godot_pool_vector3_array *p_self); +godot_int GDAPI godot_packed_vector3_array_size(const godot_packed_vector3_array *p_self); -void GDAPI godot_pool_vector3_array_set(godot_pool_vector3_array *p_self, const godot_int p_idx, const godot_vector3 *p_data); -godot_vector3 GDAPI godot_pool_vector3_array_get(const godot_pool_vector3_array *p_self, const godot_int p_idx); +godot_bool GDAPI godot_packed_vector3_array_empty(const godot_packed_vector3_array *p_self); -godot_int GDAPI godot_pool_vector3_array_size(const godot_pool_vector3_array *p_self); - -godot_bool GDAPI godot_pool_vector3_array_empty(const godot_pool_vector3_array *p_self); - -void GDAPI godot_pool_vector3_array_destroy(godot_pool_vector3_array *p_self); +void GDAPI godot_packed_vector3_array_destroy(godot_packed_vector3_array *p_self); // color -void GDAPI godot_pool_color_array_new(godot_pool_color_array *r_dest); -void GDAPI godot_pool_color_array_new_copy(godot_pool_color_array *r_dest, const godot_pool_color_array *p_src); -void GDAPI godot_pool_color_array_new_with_array(godot_pool_color_array *r_dest, const godot_array *p_a); - -void GDAPI godot_pool_color_array_append(godot_pool_color_array *p_self, const godot_color *p_data); - -void GDAPI godot_pool_color_array_append_array(godot_pool_color_array *p_self, const godot_pool_color_array *p_array); - -godot_error GDAPI godot_pool_color_array_insert(godot_pool_color_array *p_self, const godot_int p_idx, const godot_color *p_data); - -void GDAPI godot_pool_color_array_invert(godot_pool_color_array *p_self); - -void GDAPI godot_pool_color_array_push_back(godot_pool_color_array *p_self, const godot_color *p_data); - -void GDAPI godot_pool_color_array_remove(godot_pool_color_array *p_self, const godot_int p_idx); - -void GDAPI godot_pool_color_array_resize(godot_pool_color_array *p_self, const godot_int p_size); - -godot_pool_color_array_read_access GDAPI *godot_pool_color_array_read(const godot_pool_color_array *p_self); - -godot_pool_color_array_write_access GDAPI *godot_pool_color_array_write(godot_pool_color_array *p_self); - -void GDAPI godot_pool_color_array_set(godot_pool_color_array *p_self, const godot_int p_idx, const godot_color *p_data); -godot_color GDAPI godot_pool_color_array_get(const godot_pool_color_array *p_self, const godot_int p_idx); - -godot_int GDAPI godot_pool_color_array_size(const godot_pool_color_array *p_self); - -godot_bool GDAPI godot_pool_color_array_empty(const godot_pool_color_array *p_self); - -void GDAPI godot_pool_color_array_destroy(godot_pool_color_array *p_self); - -// -// read accessor functions -// - -godot_pool_byte_array_read_access GDAPI *godot_pool_byte_array_read_access_copy(const godot_pool_byte_array_read_access *p_other); -const uint8_t GDAPI *godot_pool_byte_array_read_access_ptr(const godot_pool_byte_array_read_access *p_read); -void GDAPI godot_pool_byte_array_read_access_operator_assign(godot_pool_byte_array_read_access *p_read, godot_pool_byte_array_read_access *p_other); -void GDAPI godot_pool_byte_array_read_access_destroy(godot_pool_byte_array_read_access *p_read); - -godot_pool_int_array_read_access GDAPI *godot_pool_int_array_read_access_copy(const godot_pool_int_array_read_access *p_other); -const godot_int GDAPI *godot_pool_int_array_read_access_ptr(const godot_pool_int_array_read_access *p_read); -void GDAPI godot_pool_int_array_read_access_operator_assign(godot_pool_int_array_read_access *p_read, godot_pool_int_array_read_access *p_other); -void GDAPI godot_pool_int_array_read_access_destroy(godot_pool_int_array_read_access *p_read); - -godot_pool_real_array_read_access GDAPI *godot_pool_real_array_read_access_copy(const godot_pool_real_array_read_access *p_other); -const godot_real GDAPI *godot_pool_real_array_read_access_ptr(const godot_pool_real_array_read_access *p_read); -void GDAPI godot_pool_real_array_read_access_operator_assign(godot_pool_real_array_read_access *p_read, godot_pool_real_array_read_access *p_other); -void GDAPI godot_pool_real_array_read_access_destroy(godot_pool_real_array_read_access *p_read); - -godot_pool_string_array_read_access GDAPI *godot_pool_string_array_read_access_copy(const godot_pool_string_array_read_access *p_other); -const godot_string GDAPI *godot_pool_string_array_read_access_ptr(const godot_pool_string_array_read_access *p_read); -void GDAPI godot_pool_string_array_read_access_operator_assign(godot_pool_string_array_read_access *p_read, godot_pool_string_array_read_access *p_other); -void GDAPI godot_pool_string_array_read_access_destroy(godot_pool_string_array_read_access *p_read); +void GDAPI godot_packed_color_array_new(godot_packed_color_array *r_dest); +void GDAPI godot_packed_color_array_new_copy(godot_packed_color_array *r_dest, const godot_packed_color_array *p_src); +void GDAPI godot_packed_color_array_new_with_array(godot_packed_color_array *r_dest, const godot_array *p_a); -godot_pool_vector2_array_read_access GDAPI *godot_pool_vector2_array_read_access_copy(const godot_pool_vector2_array_read_access *p_other); -const godot_vector2 GDAPI *godot_pool_vector2_array_read_access_ptr(const godot_pool_vector2_array_read_access *p_read); -void GDAPI godot_pool_vector2_array_read_access_operator_assign(godot_pool_vector2_array_read_access *p_read, godot_pool_vector2_array_read_access *p_other); -void GDAPI godot_pool_vector2_array_read_access_destroy(godot_pool_vector2_array_read_access *p_read); +void GDAPI godot_packed_color_array_append(godot_packed_color_array *p_self, const godot_color *p_data); -godot_pool_vector3_array_read_access GDAPI *godot_pool_vector3_array_read_access_copy(const godot_pool_vector3_array_read_access *p_other); -const godot_vector3 GDAPI *godot_pool_vector3_array_read_access_ptr(const godot_pool_vector3_array_read_access *p_read); -void GDAPI godot_pool_vector3_array_read_access_operator_assign(godot_pool_vector3_array_read_access *p_read, godot_pool_vector3_array_read_access *p_other); -void GDAPI godot_pool_vector3_array_read_access_destroy(godot_pool_vector3_array_read_access *p_read); +void GDAPI godot_packed_color_array_append_array(godot_packed_color_array *p_self, const godot_packed_color_array *p_array); -godot_pool_color_array_read_access GDAPI *godot_pool_color_array_read_access_copy(const godot_pool_color_array_read_access *p_other); -const godot_color GDAPI *godot_pool_color_array_read_access_ptr(const godot_pool_color_array_read_access *p_read); -void GDAPI godot_pool_color_array_read_access_operator_assign(godot_pool_color_array_read_access *p_read, godot_pool_color_array_read_access *p_other); -void GDAPI godot_pool_color_array_read_access_destroy(godot_pool_color_array_read_access *p_read); +godot_error GDAPI godot_packed_color_array_insert(godot_packed_color_array *p_self, const godot_int p_idx, const godot_color *p_data); -// -// write accessor functions -// +void GDAPI godot_packed_color_array_invert(godot_packed_color_array *p_self); -godot_pool_byte_array_write_access GDAPI *godot_pool_byte_array_write_access_copy(const godot_pool_byte_array_write_access *p_other); -uint8_t GDAPI *godot_pool_byte_array_write_access_ptr(const godot_pool_byte_array_write_access *p_write); -void GDAPI godot_pool_byte_array_write_access_operator_assign(godot_pool_byte_array_write_access *p_write, godot_pool_byte_array_write_access *p_other); -void GDAPI godot_pool_byte_array_write_access_destroy(godot_pool_byte_array_write_access *p_write); +void GDAPI godot_packed_color_array_push_back(godot_packed_color_array *p_self, const godot_color *p_data); -godot_pool_int_array_write_access GDAPI *godot_pool_int_array_write_access_copy(const godot_pool_int_array_write_access *p_other); -godot_int GDAPI *godot_pool_int_array_write_access_ptr(const godot_pool_int_array_write_access *p_write); -void GDAPI godot_pool_int_array_write_access_operator_assign(godot_pool_int_array_write_access *p_write, godot_pool_int_array_write_access *p_other); -void GDAPI godot_pool_int_array_write_access_destroy(godot_pool_int_array_write_access *p_write); +void GDAPI godot_packed_color_array_remove(godot_packed_color_array *p_self, const godot_int p_idx); -godot_pool_real_array_write_access GDAPI *godot_pool_real_array_write_access_copy(const godot_pool_real_array_write_access *p_other); -godot_real GDAPI *godot_pool_real_array_write_access_ptr(const godot_pool_real_array_write_access *p_write); -void GDAPI godot_pool_real_array_write_access_operator_assign(godot_pool_real_array_write_access *p_write, godot_pool_real_array_write_access *p_other); -void GDAPI godot_pool_real_array_write_access_destroy(godot_pool_real_array_write_access *p_write); +void GDAPI godot_packed_color_array_resize(godot_packed_color_array *p_self, const godot_int p_size); -godot_pool_string_array_write_access GDAPI *godot_pool_string_array_write_access_copy(const godot_pool_string_array_write_access *p_other); -godot_string GDAPI *godot_pool_string_array_write_access_ptr(const godot_pool_string_array_write_access *p_write); -void GDAPI godot_pool_string_array_write_access_operator_assign(godot_pool_string_array_write_access *p_write, godot_pool_string_array_write_access *p_other); -void GDAPI godot_pool_string_array_write_access_destroy(godot_pool_string_array_write_access *p_write); +void GDAPI godot_packed_color_array_set(godot_packed_color_array *p_self, const godot_int p_idx, const godot_color *p_data); +godot_color GDAPI godot_packed_color_array_get(const godot_packed_color_array *p_self, const godot_int p_idx); -godot_pool_vector2_array_write_access GDAPI *godot_pool_vector2_array_write_access_copy(const godot_pool_vector2_array_write_access *p_other); -godot_vector2 GDAPI *godot_pool_vector2_array_write_access_ptr(const godot_pool_vector2_array_write_access *p_write); -void GDAPI godot_pool_vector2_array_write_access_operator_assign(godot_pool_vector2_array_write_access *p_write, godot_pool_vector2_array_write_access *p_other); -void GDAPI godot_pool_vector2_array_write_access_destroy(godot_pool_vector2_array_write_access *p_write); +godot_int GDAPI godot_packed_color_array_size(const godot_packed_color_array *p_self); -godot_pool_vector3_array_write_access GDAPI *godot_pool_vector3_array_write_access_copy(const godot_pool_vector3_array_write_access *p_other); -godot_vector3 GDAPI *godot_pool_vector3_array_write_access_ptr(const godot_pool_vector3_array_write_access *p_write); -void GDAPI godot_pool_vector3_array_write_access_operator_assign(godot_pool_vector3_array_write_access *p_write, godot_pool_vector3_array_write_access *p_other); -void GDAPI godot_pool_vector3_array_write_access_destroy(godot_pool_vector3_array_write_access *p_write); +godot_bool GDAPI godot_packed_color_array_empty(const godot_packed_color_array *p_self); -godot_pool_color_array_write_access GDAPI *godot_pool_color_array_write_access_copy(const godot_pool_color_array_write_access *p_other); -godot_color GDAPI *godot_pool_color_array_write_access_ptr(const godot_pool_color_array_write_access *p_write); -void GDAPI godot_pool_color_array_write_access_operator_assign(godot_pool_color_array_write_access *p_write, godot_pool_color_array_write_access *p_other); -void GDAPI godot_pool_color_array_write_access_destroy(godot_pool_color_array_write_access *p_write); +void GDAPI godot_packed_color_array_destroy(godot_packed_color_array *p_self); #ifdef __cplusplus } diff --git a/modules/gdnative/include/gdnative/string.h b/modules/gdnative/include/gdnative/string.h index b676d21fb2..608978db76 100644 --- a/modules/gdnative/include/gdnative/string.h +++ b/modules/gdnative/include/gdnative/string.h @@ -209,9 +209,9 @@ uint32_t GDAPI godot_string_hash_chars(const char *p_cstr); uint32_t GDAPI godot_string_hash_chars_with_len(const char *p_cstr, godot_int p_len); uint32_t GDAPI godot_string_hash_utf8_chars(const wchar_t *p_str); uint32_t GDAPI godot_string_hash_utf8_chars_with_len(const wchar_t *p_str, godot_int p_len); -godot_pool_byte_array GDAPI godot_string_md5_buffer(const godot_string *p_self); +godot_packed_byte_array GDAPI godot_string_md5_buffer(const godot_string *p_self); godot_string GDAPI godot_string_md5_text(const godot_string *p_self); -godot_pool_byte_array GDAPI godot_string_sha256_buffer(const godot_string *p_self); +godot_packed_byte_array GDAPI godot_string_sha256_buffer(const godot_string *p_self); godot_string GDAPI godot_string_sha256_text(const godot_string *p_self); godot_bool godot_string_empty(const godot_string *p_self); @@ -252,7 +252,7 @@ godot_string GDAPI godot_string_dedent(const godot_string *p_self); godot_string GDAPI godot_string_trim_prefix(const godot_string *p_self, const godot_string *p_prefix); godot_string GDAPI godot_string_trim_suffix(const godot_string *p_self, const godot_string *p_suffix); godot_string GDAPI godot_string_rstrip(const godot_string *p_self, const godot_string *p_chars); -godot_pool_string_array GDAPI godot_string_rsplit(const godot_string *p_self, const godot_string *p_divisor, const godot_bool p_allow_empty, const godot_int p_maxsplit); +godot_packed_string_array GDAPI godot_string_rsplit(const godot_string *p_self, const godot_string *p_divisor, const godot_bool p_allow_empty, const godot_int p_maxsplit); void GDAPI godot_string_destroy(godot_string *p_self); diff --git a/modules/gdnative/include/gdnative/variant.h b/modules/gdnative/include/gdnative/variant.h index c65f7a28d2..934e856fbf 100644 --- a/modules/gdnative/include/gdnative/variant.h +++ b/modules/gdnative/include/gdnative/variant.h @@ -56,33 +56,35 @@ typedef enum godot_variant_type { GODOT_VARIANT_TYPE_STRING, // math types - - GODOT_VARIANT_TYPE_VECTOR2, // 5 + GODOT_VARIANT_TYPE_VECTOR2, + GODOT_VARIANT_TYPE_VECTOR2I, GODOT_VARIANT_TYPE_RECT2, + GODOT_VARIANT_TYPE_RECT2I, GODOT_VARIANT_TYPE_VECTOR3, + GODOT_VARIANT_TYPE_VECTOR3I, GODOT_VARIANT_TYPE_TRANSFORM2D, GODOT_VARIANT_TYPE_PLANE, - GODOT_VARIANT_TYPE_QUAT, // 10 + GODOT_VARIANT_TYPE_QUAT, GODOT_VARIANT_TYPE_AABB, GODOT_VARIANT_TYPE_BASIS, GODOT_VARIANT_TYPE_TRANSFORM, // misc types GODOT_VARIANT_TYPE_COLOR, - GODOT_VARIANT_TYPE_NODE_PATH, // 15 + GODOT_VARIANT_TYPE_NODE_PATH, GODOT_VARIANT_TYPE_RID, GODOT_VARIANT_TYPE_OBJECT, GODOT_VARIANT_TYPE_DICTIONARY, - GODOT_VARIANT_TYPE_ARRAY, // 20 + GODOT_VARIANT_TYPE_ARRAY, // arrays - GODOT_VARIANT_TYPE_POOL_BYTE_ARRAY, - GODOT_VARIANT_TYPE_POOL_INT_ARRAY, - GODOT_VARIANT_TYPE_POOL_REAL_ARRAY, - GODOT_VARIANT_TYPE_POOL_STRING_ARRAY, - GODOT_VARIANT_TYPE_POOL_VECTOR2_ARRAY, // 25 - GODOT_VARIANT_TYPE_POOL_VECTOR3_ARRAY, - GODOT_VARIANT_TYPE_POOL_COLOR_ARRAY, + GODOT_VARIANT_TYPE_PACKED_BYTE_ARRAY, + GODOT_VARIANT_TYPE_PACKED_INT_ARRAY, + GODOT_VARIANT_TYPE_PACKED_REAL_ARRAY, + GODOT_VARIANT_TYPE_PACKED_STRING_ARRAY, + GODOT_VARIANT_TYPE_PACKED_VECTOR2_ARRAY, + GODOT_VARIANT_TYPE_PACKED_VECTOR3_ARRAY, + GODOT_VARIANT_TYPE_PACKED_COLOR_ARRAY, } godot_variant_type; typedef enum godot_variant_call_error_error { @@ -194,13 +196,13 @@ void GDAPI godot_variant_new_rid(godot_variant *r_dest, const godot_rid *p_rid); void GDAPI godot_variant_new_object(godot_variant *r_dest, const godot_object *p_obj); void GDAPI godot_variant_new_dictionary(godot_variant *r_dest, const godot_dictionary *p_dict); void GDAPI godot_variant_new_array(godot_variant *r_dest, const godot_array *p_arr); -void GDAPI godot_variant_new_pool_byte_array(godot_variant *r_dest, const godot_pool_byte_array *p_pba); -void GDAPI godot_variant_new_pool_int_array(godot_variant *r_dest, const godot_pool_int_array *p_pia); -void GDAPI godot_variant_new_pool_real_array(godot_variant *r_dest, const godot_pool_real_array *p_pra); -void GDAPI godot_variant_new_pool_string_array(godot_variant *r_dest, const godot_pool_string_array *p_psa); -void GDAPI godot_variant_new_pool_vector2_array(godot_variant *r_dest, const godot_pool_vector2_array *p_pv2a); -void GDAPI godot_variant_new_pool_vector3_array(godot_variant *r_dest, const godot_pool_vector3_array *p_pv3a); -void GDAPI godot_variant_new_pool_color_array(godot_variant *r_dest, const godot_pool_color_array *p_pca); +void GDAPI godot_variant_new_packed_byte_array(godot_variant *r_dest, const godot_packed_byte_array *p_pba); +void GDAPI godot_variant_new_packed_int_array(godot_variant *r_dest, const godot_packed_int_array *p_pia); +void GDAPI godot_variant_new_packed_real_array(godot_variant *r_dest, const godot_packed_real_array *p_pra); +void GDAPI godot_variant_new_packed_string_array(godot_variant *r_dest, const godot_packed_string_array *p_psa); +void GDAPI godot_variant_new_packed_vector2_array(godot_variant *r_dest, const godot_packed_vector2_array *p_pv2a); +void GDAPI godot_variant_new_packed_vector3_array(godot_variant *r_dest, const godot_packed_vector3_array *p_pv3a); +void GDAPI godot_variant_new_packed_color_array(godot_variant *r_dest, const godot_packed_color_array *p_pca); godot_bool GDAPI godot_variant_as_bool(const godot_variant *p_self); uint64_t GDAPI godot_variant_as_uint(const godot_variant *p_self); @@ -222,13 +224,13 @@ godot_rid GDAPI godot_variant_as_rid(const godot_variant *p_self); godot_object GDAPI *godot_variant_as_object(const godot_variant *p_self); godot_dictionary GDAPI godot_variant_as_dictionary(const godot_variant *p_self); godot_array GDAPI godot_variant_as_array(const godot_variant *p_self); -godot_pool_byte_array GDAPI godot_variant_as_pool_byte_array(const godot_variant *p_self); -godot_pool_int_array GDAPI godot_variant_as_pool_int_array(const godot_variant *p_self); -godot_pool_real_array GDAPI godot_variant_as_pool_real_array(const godot_variant *p_self); -godot_pool_string_array GDAPI godot_variant_as_pool_string_array(const godot_variant *p_self); -godot_pool_vector2_array GDAPI godot_variant_as_pool_vector2_array(const godot_variant *p_self); -godot_pool_vector3_array GDAPI godot_variant_as_pool_vector3_array(const godot_variant *p_self); -godot_pool_color_array GDAPI godot_variant_as_pool_color_array(const godot_variant *p_self); +godot_packed_byte_array GDAPI godot_variant_as_packed_byte_array(const godot_variant *p_self); +godot_packed_int_array GDAPI godot_variant_as_packed_int_array(const godot_variant *p_self); +godot_packed_real_array GDAPI godot_variant_as_packed_real_array(const godot_variant *p_self); +godot_packed_string_array GDAPI godot_variant_as_packed_string_array(const godot_variant *p_self); +godot_packed_vector2_array GDAPI godot_variant_as_packed_vector2_array(const godot_variant *p_self); +godot_packed_vector3_array GDAPI godot_variant_as_packed_vector3_array(const godot_variant *p_self); +godot_packed_color_array GDAPI godot_variant_as_packed_color_array(const godot_variant *p_self); godot_variant GDAPI godot_variant_call(godot_variant *p_self, const godot_string *p_method, const godot_variant **p_args, const godot_int p_argcount, godot_variant_call_error *r_error); diff --git a/modules/gdnative/include/pluginscript/godot_pluginscript.h b/modules/gdnative/include/pluginscript/godot_pluginscript.h index 210d3f7756..341e7f9e2b 100644 --- a/modules/gdnative/include/pluginscript/godot_pluginscript.h +++ b/modules/gdnative/include/pluginscript/godot_pluginscript.h @@ -129,9 +129,9 @@ typedef struct { godot_bool supports_builtin_mode; godot_string (*get_template_source_code)(godot_pluginscript_language_data *p_data, const godot_string *p_class_name, const godot_string *p_base_class_name); - godot_bool (*validate)(godot_pluginscript_language_data *p_data, const godot_string *p_script, int *r_line_error, int *r_col_error, godot_string *r_test_error, const godot_string *p_path, godot_pool_string_array *r_functions); + godot_bool (*validate)(godot_pluginscript_language_data *p_data, const godot_string *p_script, int *r_line_error, int *r_col_error, godot_string *r_test_error, const godot_string *p_path, godot_packed_string_array *r_functions); int (*find_function)(godot_pluginscript_language_data *p_data, const godot_string *p_function, const godot_string *p_code); // Can be NULL - godot_string (*make_function)(godot_pluginscript_language_data *p_data, const godot_string *p_class, const godot_string *p_name, const godot_pool_string_array *p_args); + godot_string (*make_function)(godot_pluginscript_language_data *p_data, const godot_string *p_class, const godot_string *p_name, const godot_packed_string_array *p_args); godot_error (*complete_code)(godot_pluginscript_language_data *p_data, const godot_string *p_code, const godot_string *p_path, godot_object *p_owner, godot_array *r_options, godot_bool *r_force, godot_string *r_call_hint); void (*auto_indent_code)(godot_pluginscript_language_data *p_data, godot_string *p_code, int p_from_line, int p_to_line); @@ -141,9 +141,9 @@ typedef struct { int (*debug_get_stack_level_line)(godot_pluginscript_language_data *p_data, int p_level); godot_string (*debug_get_stack_level_function)(godot_pluginscript_language_data *p_data, int p_level); godot_string (*debug_get_stack_level_source)(godot_pluginscript_language_data *p_data, int p_level); - void (*debug_get_stack_level_locals)(godot_pluginscript_language_data *p_data, int p_level, godot_pool_string_array *p_locals, godot_array *p_values, int p_max_subitems, int p_max_depth); - void (*debug_get_stack_level_members)(godot_pluginscript_language_data *p_data, int p_level, godot_pool_string_array *p_members, godot_array *p_values, int p_max_subitems, int p_max_depth); - void (*debug_get_globals)(godot_pluginscript_language_data *p_data, godot_pool_string_array *p_locals, godot_array *p_values, int p_max_subitems, int p_max_depth); + void (*debug_get_stack_level_locals)(godot_pluginscript_language_data *p_data, int p_level, godot_packed_string_array *p_locals, godot_array *p_values, int p_max_subitems, int p_max_depth); + void (*debug_get_stack_level_members)(godot_pluginscript_language_data *p_data, int p_level, godot_packed_string_array *p_members, godot_array *p_values, int p_max_subitems, int p_max_depth); + void (*debug_get_globals)(godot_pluginscript_language_data *p_data, godot_packed_string_array *p_locals, godot_array *p_values, int p_max_subitems, int p_max_depth); godot_string (*debug_parse_stack_level_expression)(godot_pluginscript_language_data *p_data, int p_level, const godot_string *p_expression, int p_max_subitems, int p_max_depth); // TODO: could this stuff be moved to the godot_pluginscript_language_desc ? diff --git a/modules/gdnative/include/videodecoder/godot_videodecoder.h b/modules/gdnative/include/videodecoder/godot_videodecoder.h index 714991ca72..3e91a2e9ac 100644 --- a/modules/gdnative/include/videodecoder/godot_videodecoder.h +++ b/modules/gdnative/include/videodecoder/godot_videodecoder.h @@ -54,7 +54,7 @@ typedef struct void (*seek)(void *, godot_real); void (*set_audio_track)(void *, godot_int); void (*update)(void *, godot_real); - godot_pool_byte_array *(*get_videoframe)(void *); + godot_packed_byte_array *(*get_videoframe)(void *); godot_int (*get_audioframe)(void *, float *, int); godot_int (*get_channels)(const void *); godot_int (*get_mix_rate)(const void *); diff --git a/modules/gdnative/nativescript/nativescript.cpp b/modules/gdnative/nativescript/nativescript.cpp index df85155ff5..8240ae2f83 100644 --- a/modules/gdnative/nativescript/nativescript.cpp +++ b/modules/gdnative/nativescript/nativescript.cpp @@ -725,21 +725,21 @@ String NativeScript::get_property_documentation(const StringName &p_path) const ERR_FAIL_V_MSG("", "Attempt to get property documentation for non-existent signal."); } -Variant NativeScript::_new(const Variant **p_args, int p_argcount, Variant::CallError &r_error) { +Variant NativeScript::_new(const Variant **p_args, int p_argcount, Callable::CallError &r_error) { if (lib_path.empty() || class_name.empty() || library.is_null()) { - r_error.error = Variant::CallError::CALL_ERROR_INSTANCE_IS_NULL; + r_error.error = Callable::CallError::CALL_ERROR_INSTANCE_IS_NULL; return Variant(); } NativeScriptDesc *script_data = get_script_desc(); if (!script_data) { - r_error.error = Variant::CallError::CALL_ERROR_INSTANCE_IS_NULL; + r_error.error = Callable::CallError::CALL_ERROR_INSTANCE_IS_NULL; return Variant(); } - r_error.error = Variant::CallError::CALL_OK; + r_error.error = Callable::CallError::CALL_OK; REF ref; Object *owner = NULL; @@ -751,7 +751,7 @@ Variant NativeScript::_new(const Variant **p_args, int p_argcount, Variant::Call } if (!owner) { - r_error.error = Variant::CallError::CALL_ERROR_INSTANCE_IS_NULL; + r_error.error = Callable::CallError::CALL_ERROR_INSTANCE_IS_NULL; return Variant(); } @@ -964,7 +964,7 @@ bool NativeScriptInstance::has_method(const StringName &p_method) const { return script->has_method(p_method); } -Variant NativeScriptInstance::call(const StringName &p_method, const Variant **p_args, int p_argcount, Variant::CallError &r_error) { +Variant NativeScriptInstance::call(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error) { NativeScriptDesc *script_data = GET_SCRIPT_DESC(); @@ -989,14 +989,14 @@ Variant NativeScriptInstance::call(const StringName &p_method, const Variant **p Variant res = *(Variant *)&result; godot_variant_destroy(&result); - r_error.error = Variant::CallError::CALL_OK; + r_error.error = Callable::CallError::CALL_OK; return res; } script_data = script_data->base_data; } - r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD; return Variant(); } @@ -1017,9 +1017,9 @@ void NativeScriptInstance::notification(int p_notification) { String NativeScriptInstance::to_string(bool *r_valid) { if (has_method(CoreStringNames::get_singleton()->_to_string)) { - Variant::CallError ce; + Callable::CallError ce; Variant ret = call(CoreStringNames::get_singleton()->_to_string, NULL, 0, ce); - if (ce.error == Variant::CallError::CALL_OK) { + if (ce.error == Callable::CallError::CALL_OK) { if (ret.get_type() != Variant::STRING) { if (r_valid) *r_valid = false; @@ -1036,21 +1036,21 @@ String NativeScriptInstance::to_string(bool *r_valid) { } void NativeScriptInstance::refcount_incremented() { - Variant::CallError err; + Callable::CallError err; call("_refcount_incremented", NULL, 0, err); - if (err.error != Variant::CallError::CALL_OK && err.error != Variant::CallError::CALL_ERROR_INVALID_METHOD) { + if (err.error != Callable::CallError::CALL_OK && err.error != Callable::CallError::CALL_ERROR_INVALID_METHOD) { ERR_PRINT("Failed to invoke _refcount_incremented - should not happen"); } } bool NativeScriptInstance::refcount_decremented() { - Variant::CallError err; + Callable::CallError err; Variant ret = call("_refcount_decremented", NULL, 0, err); - if (err.error != Variant::CallError::CALL_OK && err.error != Variant::CallError::CALL_ERROR_INVALID_METHOD) { + if (err.error != Callable::CallError::CALL_OK && err.error != Callable::CallError::CALL_ERROR_INVALID_METHOD) { ERR_PRINT("Failed to invoke _refcount_decremented - should not happen"); return true; // assume we can destroy the object } - if (err.error == Variant::CallError::CALL_ERROR_INVALID_METHOD) { + if (err.error == Callable::CallError::CALL_ERROR_INVALID_METHOD) { // the method does not exist, default is true return true; } @@ -1361,7 +1361,7 @@ bool NativeScriptLanguage::supports_builtin_mode() const { int NativeScriptLanguage::find_function(const String &p_function, const String &p_code) const { return -1; } -String NativeScriptLanguage::make_function(const String &p_class, const String &p_name, const PoolStringArray &p_args) const { +String NativeScriptLanguage::make_function(const String &p_class, const String &p_name, const PackedStringArray &p_args) const { return ""; } void NativeScriptLanguage::auto_indent_code(String &p_code, int p_from_line, int p_to_line) const { diff --git a/modules/gdnative/nativescript/nativescript.h b/modules/gdnative/nativescript/nativescript.h index 2ff08e32cd..609ffa2bd4 100644 --- a/modules/gdnative/nativescript/nativescript.h +++ b/modules/gdnative/nativescript/nativescript.h @@ -197,7 +197,7 @@ public: String get_signal_documentation(const StringName &p_signal_name) const; String get_property_documentation(const StringName &p_path) const; - Variant _new(const Variant **p_args, int p_argcount, Variant::CallError &r_error); + Variant _new(const Variant **p_args, int p_argcount, Callable::CallError &r_error); NativeScript(); ~NativeScript(); @@ -224,7 +224,7 @@ public: virtual Variant::Type get_property_type(const StringName &p_name, bool *r_is_valid) const; virtual void get_method_list(List<MethodInfo> *p_list) const; virtual bool has_method(const StringName &p_method) const; - virtual Variant call(const StringName &p_method, const Variant **p_args, int p_argcount, Variant::CallError &r_error); + virtual Variant call(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error); virtual void notification(int p_notification); String to_string(bool *r_valid); virtual Ref<Script> get_script() const; @@ -352,7 +352,7 @@ public: virtual bool has_named_classes() const; virtual bool supports_builtin_mode() const; virtual int find_function(const String &p_function, const String &p_code) const; - virtual String make_function(const String &p_class, const String &p_name, const PoolStringArray &p_args) const; + virtual String make_function(const String &p_class, const String &p_name, const PackedStringArray &p_args) const; virtual void auto_indent_code(String &p_code, int p_from_line, int p_to_line) const; virtual void add_global_constant(const StringName &p_variable, const Variant &p_value); virtual String debug_get_error() const; diff --git a/modules/gdnative/pluginscript/pluginscript_instance.cpp b/modules/gdnative/pluginscript/pluginscript_instance.cpp index 26a1d5f47a..22e8372130 100644 --- a/modules/gdnative/pluginscript/pluginscript_instance.cpp +++ b/modules/gdnative/pluginscript/pluginscript_instance.cpp @@ -79,7 +79,7 @@ bool PluginScriptInstance::has_method(const StringName &p_method) const { return _script->has_method(p_method); } -Variant PluginScriptInstance::call(const StringName &p_method, const Variant **p_args, int p_argcount, Variant::CallError &r_error) { +Variant PluginScriptInstance::call(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error) { // TODO: optimize when calling a Godot method from Godot to avoid param conversion ? godot_variant ret = _desc->call_method( _data, (godot_string_name *)&p_method, (const godot_variant **)p_args, diff --git a/modules/gdnative/pluginscript/pluginscript_instance.h b/modules/gdnative/pluginscript/pluginscript_instance.h index 154bebd72a..c91ad643a7 100644 --- a/modules/gdnative/pluginscript/pluginscript_instance.h +++ b/modules/gdnative/pluginscript/pluginscript_instance.h @@ -60,7 +60,7 @@ public: virtual void get_method_list(List<MethodInfo> *p_list) const; virtual bool has_method(const StringName &p_method) const; - virtual Variant call(const StringName &p_method, const Variant **p_args, int p_argcount, Variant::CallError &r_error); + virtual Variant call(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error); // Rely on default implementations provided by ScriptInstance for the moment. // Note that multilevel call could be removed in 3.0 release, so stay tuned diff --git a/modules/gdnative/pluginscript/pluginscript_language.cpp b/modules/gdnative/pluginscript/pluginscript_language.cpp index 421d6e0a89..4e39f4b0a8 100644 --- a/modules/gdnative/pluginscript/pluginscript_language.cpp +++ b/modules/gdnative/pluginscript/pluginscript_language.cpp @@ -109,7 +109,7 @@ Ref<Script> PluginScriptLanguage::get_template(const String &p_class_name, const } bool PluginScriptLanguage::validate(const String &p_script, int &r_line_error, int &r_col_error, String &r_test_error, const String &p_path, List<String> *r_functions, List<ScriptLanguage::Warning> *r_warnings, Set<int> *r_safe_lines) const { - PoolStringArray functions; + PackedStringArray functions; if (_desc.validate) { bool ret = _desc.validate( _data, @@ -118,7 +118,7 @@ bool PluginScriptLanguage::validate(const String &p_script, int &r_line_error, i &r_col_error, (godot_string *)&r_test_error, (godot_string *)&p_path, - (godot_pool_string_array *)&functions); + (godot_packed_string_array *)&functions); for (int i = 0; i < functions.size(); i++) { r_functions->push_back(functions[i]); } @@ -149,9 +149,9 @@ int PluginScriptLanguage::find_function(const String &p_function, const String & return -1; } -String PluginScriptLanguage::make_function(const String &p_class, const String &p_name, const PoolStringArray &p_args) const { +String PluginScriptLanguage::make_function(const String &p_class, const String &p_name, const PackedStringArray &p_args) const { if (_desc.make_function) { - godot_string tmp = _desc.make_function(_data, (godot_string *)&p_class, (godot_string *)&p_name, (godot_pool_string_array *)&p_args); + godot_string tmp = _desc.make_function(_data, (godot_string *)&p_class, (godot_string *)&p_name, (godot_packed_string_array *)&p_args); String ret = *(String *)&tmp; godot_string_destroy(&tmp); return ret; @@ -336,9 +336,9 @@ String PluginScriptLanguage::debug_get_stack_level_source(int p_level) const { void PluginScriptLanguage::debug_get_stack_level_locals(int p_level, List<String> *p_locals, List<Variant> *p_values, int p_max_subitems, int p_max_depth) { if (_desc.debug_get_stack_level_locals) { - PoolStringArray locals; + PackedStringArray locals; Array values; - _desc.debug_get_stack_level_locals(_data, p_level, (godot_pool_string_array *)&locals, (godot_array *)&values, p_max_subitems, p_max_depth); + _desc.debug_get_stack_level_locals(_data, p_level, (godot_packed_string_array *)&locals, (godot_array *)&values, p_max_subitems, p_max_depth); for (int i = 0; i < locals.size(); i++) { p_locals->push_back(locals[i]); } @@ -350,9 +350,9 @@ void PluginScriptLanguage::debug_get_stack_level_locals(int p_level, List<String void PluginScriptLanguage::debug_get_stack_level_members(int p_level, List<String> *p_members, List<Variant> *p_values, int p_max_subitems, int p_max_depth) { if (_desc.debug_get_stack_level_members) { - PoolStringArray members; + PackedStringArray members; Array values; - _desc.debug_get_stack_level_members(_data, p_level, (godot_pool_string_array *)&members, (godot_array *)&values, p_max_subitems, p_max_depth); + _desc.debug_get_stack_level_members(_data, p_level, (godot_packed_string_array *)&members, (godot_array *)&values, p_max_subitems, p_max_depth); for (int i = 0; i < members.size(); i++) { p_members->push_back(members[i]); } @@ -364,9 +364,9 @@ void PluginScriptLanguage::debug_get_stack_level_members(int p_level, List<Strin void PluginScriptLanguage::debug_get_globals(List<String> *p_locals, List<Variant> *p_values, int p_max_subitems, int p_max_depth) { if (_desc.debug_get_globals) { - PoolStringArray locals; + PackedStringArray locals; Array values; - _desc.debug_get_globals(_data, (godot_pool_string_array *)&locals, (godot_array *)&values, p_max_subitems, p_max_depth); + _desc.debug_get_globals(_data, (godot_packed_string_array *)&locals, (godot_array *)&values, p_max_subitems, p_max_depth); for (int i = 0; i < locals.size(); i++) { p_locals->push_back(locals[i]); } diff --git a/modules/gdnative/pluginscript/pluginscript_language.h b/modules/gdnative/pluginscript/pluginscript_language.h index 145ab5599c..037d7a4948 100644 --- a/modules/gdnative/pluginscript/pluginscript_language.h +++ b/modules/gdnative/pluginscript/pluginscript_language.h @@ -80,7 +80,7 @@ public: virtual bool supports_builtin_mode() const; virtual bool can_inherit_from_file() { return true; } virtual int find_function(const String &p_function, const String &p_code) const; - virtual String make_function(const String &p_class, const String &p_name, const PoolStringArray &p_args) const; + virtual String make_function(const String &p_class, const String &p_name, const PackedStringArray &p_args) const; virtual Error complete_code(const String &p_code, const String &p_path, Object *p_owner, List<ScriptCodeCompletionOption> *r_options, bool &r_force, String &r_call_hint); virtual void auto_indent_code(String &p_code, int p_from_line, int p_to_line) const; virtual void add_global_constant(const StringName &p_variable, const Variant &p_value); diff --git a/modules/gdnative/pluginscript/pluginscript_script.cpp b/modules/gdnative/pluginscript/pluginscript_script.cpp index c370062262..fe1f63f6da 100644 --- a/modules/gdnative/pluginscript/pluginscript_script.cpp +++ b/modules/gdnative/pluginscript/pluginscript_script.cpp @@ -55,9 +55,9 @@ void PluginScript::_bind_methods() { ClassDB::bind_vararg_method(METHOD_FLAGS_DEFAULT, "new", &PluginScript::_new, MethodInfo("new")); } -PluginScriptInstance *PluginScript::_create_instance(const Variant **p_args, int p_argcount, Object *p_owner, Variant::CallError &r_error) { +PluginScriptInstance *PluginScript::_create_instance(const Variant **p_args, int p_argcount, Object *p_owner, Callable::CallError &r_error) { - r_error.error = Variant::CallError::CALL_OK; + r_error.error = Callable::CallError::CALL_OK; // Create instance PluginScriptInstance *instance = memnew(PluginScriptInstance()); @@ -67,7 +67,7 @@ PluginScriptInstance *PluginScript::_create_instance(const Variant **p_args, int _instances.insert(instance->get_owner()); _language->unlock(); } else { - r_error.error = Variant::CallError::CALL_ERROR_INSTANCE_IS_NULL; + r_error.error = Callable::CallError::CALL_ERROR_INSTANCE_IS_NULL; memdelete(instance); ERR_FAIL_V(NULL); } @@ -83,12 +83,12 @@ PluginScriptInstance *PluginScript::_create_instance(const Variant **p_args, int return instance; } -Variant PluginScript::_new(const Variant **p_args, int p_argcount, Variant::CallError &r_error) { +Variant PluginScript::_new(const Variant **p_args, int p_argcount, Callable::CallError &r_error) { - r_error.error = Variant::CallError::CALL_OK; + r_error.error = Callable::CallError::CALL_OK; if (!_valid) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD; return Variant(); } @@ -102,7 +102,7 @@ Variant PluginScript::_new(const Variant **p_args, int p_argcount, Variant::Call } if (!owner) { - r_error.error = Variant::CallError::CALL_ERROR_INSTANCE_IS_NULL; + r_error.error = Callable::CallError::CALL_ERROR_INSTANCE_IS_NULL; return Variant(); } @@ -201,7 +201,7 @@ ScriptInstance *PluginScript::instance_create(Object *p_this) { } } - Variant::CallError unchecked_error; + Callable::CallError unchecked_error; return _create_instance(NULL, 0, p_this, unchecked_error); } @@ -428,22 +428,22 @@ ScriptLanguage *PluginScript::get_language() const { Error PluginScript::load_source_code(const String &p_path) { - PoolVector<uint8_t> sourcef; + Vector<uint8_t> sourcef; Error err; FileAccess *f = FileAccess::open(p_path, FileAccess::READ, &err); ERR_FAIL_COND_V_MSG(err, err, "Cannot open file '" + p_path + "'."); int len = f->get_len(); sourcef.resize(len + 1); - PoolVector<uint8_t>::Write w = sourcef.write(); - int r = f->get_buffer(w.ptr(), len); + uint8_t *w = sourcef.ptrw(); + int r = f->get_buffer(w, len); f->close(); memdelete(f); ERR_FAIL_COND_V(r != len, ERR_CANT_OPEN); w[len] = 0; String s; - if (s.parse_utf8((const char *)w.ptr())) { + if (s.parse_utf8((const char *)w)) { ERR_FAIL_V_MSG(ERR_INVALID_DATA, "Script '" + p_path + "' contains invalid unicode (UTF-8), so it was not loaded. Please ensure that scripts are saved in valid UTF-8 unicode."); } diff --git a/modules/gdnative/pluginscript/pluginscript_script.h b/modules/gdnative/pluginscript/pluginscript_script.h index f6bca8a9cb..5c93ae38f5 100644 --- a/modules/gdnative/pluginscript/pluginscript_script.h +++ b/modules/gdnative/pluginscript/pluginscript_script.h @@ -72,8 +72,8 @@ private: protected: static void _bind_methods(); - PluginScriptInstance *_create_instance(const Variant **p_args, int p_argcount, Object *p_owner, Variant::CallError &r_error); - Variant _new(const Variant **p_args, int p_argcount, Variant::CallError &r_error); + PluginScriptInstance *_create_instance(const Variant **p_args, int p_argcount, Object *p_owner, Callable::CallError &r_error); + Variant _new(const Variant **p_args, int p_argcount, Callable::CallError &r_error); #ifdef TOOLS_ENABLED Set<PlaceHolderScriptInstance *> placeholders; diff --git a/modules/gdnative/register_types.cpp b/modules/gdnative/register_types.cpp index 4142f60ba6..e5d688afd4 100644 --- a/modules/gdnative/register_types.cpp +++ b/modules/gdnative/register_types.cpp @@ -325,7 +325,7 @@ void unregister_gdnative_types() { print_line(String("dict:\t" ) + itos(sizeof(Dictionary))); print_line(String("node_path:\t") + itos(sizeof(NodePath))); print_line(String("plane:\t") + itos(sizeof(Plane))); - print_line(String("poolarray:\t") + itos(sizeof(PoolByteArray))); + print_line(String("poolarray:\t") + itos(sizeof(PackedByteArray))); print_line(String("quat:\t") + itos(sizeof(Quat))); print_line(String("rect2:\t") + itos(sizeof(Rect2))); print_line(String("aabb:\t") + itos(sizeof(AABB))); diff --git a/modules/gdnative/videodecoder/video_stream_gdnative.cpp b/modules/gdnative/videodecoder/video_stream_gdnative.cpp index 8dcafc1987..bd16563ff0 100644 --- a/modules/gdnative/videodecoder/video_stream_gdnative.cpp +++ b/modules/gdnative/videodecoder/video_stream_gdnative.cpp @@ -187,7 +187,7 @@ void VideoStreamPlaybackGDNative::update(float p_delta) { } void VideoStreamPlaybackGDNative::update_texture() { - PoolByteArray *pba = (PoolByteArray *)interface->get_videoframe(data_struct); + PackedByteArray *pba = (PackedByteArray *)interface->get_videoframe(data_struct); if (pba == NULL) { playing = false; diff --git a/modules/gdnavigation/gd_navigation_server.cpp b/modules/gdnavigation/gd_navigation_server.cpp index 2780e2a931..4129d1f65a 100644 --- a/modules/gdnavigation/gd_navigation_server.cpp +++ b/modules/gdnavigation/gd_navigation_server.cpp @@ -115,12 +115,16 @@ GdNavigationServer::GdNavigationServer() : NavigationServer(), + commands_mutex(Mutex::create()), + operations_mutex(Mutex::create()), active(true) { - commands_mutex = Mutex::create(); - operations_mutex = Mutex::create(); } -GdNavigationServer::~GdNavigationServer() {} +GdNavigationServer::~GdNavigationServer() { + flush_queries(); + memdelete(operations_mutex); + memdelete(commands_mutex); +} void GdNavigationServer::add_command(SetCommand *command) const { auto mut_this = const_cast<GdNavigationServer *>(this); @@ -167,7 +171,7 @@ COMMAND_2(map_set_up, RID, p_map, Vector3, p_up) { } Vector3 GdNavigationServer::map_get_up(RID p_map) const { - NavMap *map = map_owner.getornull(p_map); + const NavMap *map = map_owner.getornull(p_map); ERR_FAIL_COND_V(map == NULL, Vector3()); return map->get_up(); @@ -181,7 +185,7 @@ COMMAND_2(map_set_cell_size, RID, p_map, real_t, p_cell_size) { } real_t GdNavigationServer::map_get_cell_size(RID p_map) const { - NavMap *map = map_owner.getornull(p_map); + const NavMap *map = map_owner.getornull(p_map); ERR_FAIL_COND_V(map == NULL, 0); return map->get_cell_size(); @@ -195,19 +199,47 @@ COMMAND_2(map_set_edge_connection_margin, RID, p_map, real_t, p_connection_margi } real_t GdNavigationServer::map_get_edge_connection_margin(RID p_map) const { - NavMap *map = map_owner.getornull(p_map); + const NavMap *map = map_owner.getornull(p_map); ERR_FAIL_COND_V(map == NULL, 0); return map->get_edge_connection_margin(); } Vector<Vector3> GdNavigationServer::map_get_path(RID p_map, Vector3 p_origin, Vector3 p_destination, bool p_optimize) const { - NavMap *map = map_owner.getornull(p_map); + const NavMap *map = map_owner.getornull(p_map); ERR_FAIL_COND_V(map == NULL, Vector<Vector3>()); return map->get_path(p_origin, p_destination, p_optimize); } +Vector3 GdNavigationServer::map_get_closest_point_to_segment(RID p_map, const Vector3 &p_from, const Vector3 &p_to, const bool p_use_collision) const { + const NavMap *map = map_owner.getornull(p_map); + ERR_FAIL_COND_V(map == NULL, Vector3()); + + return map->get_closest_point_to_segment(p_from, p_to, p_use_collision); +} + +Vector3 GdNavigationServer::map_get_closest_point(RID p_map, const Vector3 &p_point) const { + const NavMap *map = map_owner.getornull(p_map); + ERR_FAIL_COND_V(map == NULL, Vector3()); + + return map->get_closest_point(p_point); +} + +Vector3 GdNavigationServer::map_get_closest_point_normal(RID p_map, const Vector3 &p_point) const { + const NavMap *map = map_owner.getornull(p_map); + ERR_FAIL_COND_V(map == NULL, Vector3()); + + return map->get_closest_point_normal(p_point); +} + +RID GdNavigationServer::map_get_closest_point_owner(RID p_map, const Vector3 &p_point) const { + const NavMap *map = map_owner.getornull(p_map); + ERR_FAIL_COND_V(map == NULL, RID()); + + return map->get_closest_point_owner(p_point); +} + RID GdNavigationServer::region_create() const { auto mut_this = const_cast<GdNavigationServer *>(this); mut_this->operations_mutex->lock(); @@ -443,12 +475,9 @@ void GdNavigationServer::set_active(bool p_active) const { mut_this->operations_mutex->unlock(); } -void GdNavigationServer::step(real_t p_delta_time) { - if (!active) { - return; - } - - // With c++ we can't be 100% sure this is called in single thread so use the mutex. +void GdNavigationServer::flush_queries() { + // In c++ we can't be sure that this is performed in the main thread + // even with mutable functions. commands_mutex->lock(); operations_mutex->lock(); for (size_t i(0); i < commands.size(); i++) { @@ -458,13 +487,24 @@ void GdNavigationServer::step(real_t p_delta_time) { commands.clear(); operations_mutex->unlock(); commands_mutex->unlock(); +} + +void GdNavigationServer::process(real_t p_delta_time) { + flush_queries(); + + if (!active) { + return; + } - // These are internal operations so don't need to be shielded. + // In c++ we can't be sure that this is performed in the main thread + // even with mutable functions. + operations_mutex->lock(); for (int i(0); i < active_maps.size(); i++) { active_maps[i]->sync(); active_maps[i]->step(p_delta_time); active_maps[i]->dispatch_callbacks(); } + operations_mutex->unlock(); } #undef COMMAND_1 diff --git a/modules/gdnavigation/gd_navigation_server.h b/modules/gdnavigation/gd_navigation_server.h index 564e9870a0..0400acf1a3 100644 --- a/modules/gdnavigation/gd_navigation_server.h +++ b/modules/gdnavigation/gd_navigation_server.h @@ -103,6 +103,11 @@ public: virtual Vector<Vector3> map_get_path(RID p_map, Vector3 p_origin, Vector3 p_destination, bool p_optimize) const; + virtual Vector3 map_get_closest_point_to_segment(RID p_map, const Vector3 &p_from, const Vector3 &p_to, const bool p_use_collision = false) const; + virtual Vector3 map_get_closest_point(RID p_map, const Vector3 &p_point) const; + virtual Vector3 map_get_closest_point_normal(RID p_map, const Vector3 &p_point) const; + virtual RID map_get_closest_point_owner(RID p_map, const Vector3 &p_point) const; + virtual RID region_create() const; COMMAND_2(region_set_map, RID, p_region, RID, p_map); COMMAND_2(region_set_transform, RID, p_region, Transform, p_transform); @@ -126,7 +131,9 @@ public: COMMAND_1(free, RID, p_object); virtual void set_active(bool p_active) const; - virtual void step(real_t p_delta_time); + + void flush_queries(); + virtual void process(real_t p_delta_time); }; #undef COMMAND_1 diff --git a/modules/gdnavigation/nav_map.cpp b/modules/gdnavigation/nav_map.cpp index d1765f4da9..c3880f89b6 100644 --- a/modules/gdnavigation/nav_map.cpp +++ b/modules/gdnavigation/nav_map.cpp @@ -401,14 +401,155 @@ Vector<Vector3> NavMap::get_path(Vector3 p_origin, Vector3 p_destination, bool p return Vector<Vector3>(); } +Vector3 NavMap::get_closest_point_to_segment(const Vector3 &p_from, const Vector3 &p_to, const bool p_use_collision) const { + + bool use_collision = p_use_collision; + Vector3 closest_point; + real_t closest_point_d = 1e20; + + // Find the initial poly and the end poly on this map. + for (size_t i(0); i < polygons.size(); i++) { + const gd::Polygon &p = polygons[i]; + + // For each point cast a face and check the distance to the segment + for (size_t point_id = 2; point_id < p.points.size(); point_id += 1) { + + const Face3 f(p.points[point_id - 2].pos, p.points[point_id - 1].pos, p.points[point_id].pos); + Vector3 inters; + if (f.intersects_segment(p_from, p_to, &inters)) { + const real_t d = closest_point_d = p_from.distance_to(inters); + if (use_collision == false) { + closest_point = inters; + use_collision = true; + closest_point_d = d; + } else if (closest_point_d > d) { + + closest_point = inters; + closest_point_d = d; + } + } + } + + if (use_collision == false) { + + for (size_t point_id = 0; point_id < p.points.size(); point_id += 1) { + + Vector3 a, b; + + Geometry::get_closest_points_between_segments( + p_from, + p_to, + p.points[point_id].pos, + p.points[(point_id + 1) % p.points.size()].pos, + a, + b); + + const real_t d = a.distance_to(b); + if (d < closest_point_d) { + + closest_point_d = d; + closest_point = b; + } + } + } + } + + return closest_point; +} + +Vector3 NavMap::get_closest_point(const Vector3 &p_point) const { + // TODO this is really not optimal, please redesign the API to directly return all this data + + Vector3 closest_point; + real_t closest_point_d = 1e20; + + // Find the initial poly and the end poly on this map. + for (size_t i(0); i < polygons.size(); i++) { + const gd::Polygon &p = polygons[i]; + + // For each point cast a face and check the distance to the point + for (size_t point_id = 2; point_id < p.points.size(); point_id += 1) { + + const Face3 f(p.points[point_id - 2].pos, p.points[point_id - 1].pos, p.points[point_id].pos); + const Vector3 inters = f.get_closest_point_to(p_point); + const real_t d = inters.distance_to(p_point); + if (d < closest_point_d) { + closest_point = inters; + closest_point_d = d; + } + } + } + + return closest_point; +} + +Vector3 NavMap::get_closest_point_normal(const Vector3 &p_point) const { + // TODO this is really not optimal, please redesign the API to directly return all this data + + Vector3 closest_point; + Vector3 closest_point_normal; + real_t closest_point_d = 1e20; + + // Find the initial poly and the end poly on this map. + for (size_t i(0); i < polygons.size(); i++) { + const gd::Polygon &p = polygons[i]; + + // For each point cast a face and check the distance to the point + for (size_t point_id = 2; point_id < p.points.size(); point_id += 1) { + + const Face3 f(p.points[point_id - 2].pos, p.points[point_id - 1].pos, p.points[point_id].pos); + const Vector3 inters = f.get_closest_point_to(p_point); + const real_t d = inters.distance_to(p_point); + if (d < closest_point_d) { + closest_point = inters; + closest_point_normal = f.get_plane().normal; + closest_point_d = d; + } + } + } + + return closest_point_normal; +} + +RID NavMap::get_closest_point_owner(const Vector3 &p_point) const { + // TODO this is really not optimal, please redesign the API to directly return all this data + + Vector3 closest_point; + RID closest_point_owner; + real_t closest_point_d = 1e20; + + // Find the initial poly and the end poly on this map. + for (size_t i(0); i < polygons.size(); i++) { + const gd::Polygon &p = polygons[i]; + + // For each point cast a face and check the distance to the point + for (size_t point_id = 2; point_id < p.points.size(); point_id += 1) { + + const Face3 f(p.points[point_id - 2].pos, p.points[point_id - 1].pos, p.points[point_id].pos); + const Vector3 inters = f.get_closest_point_to(p_point); + const real_t d = inters.distance_to(p_point); + if (d < closest_point_d) { + closest_point = inters; + closest_point_owner = p.owner->get_self(); + closest_point_d = d; + } + } + } + + return closest_point_owner; +} + void NavMap::add_region(NavRegion *p_region) { regions.push_back(p_region); regenerate_links = true; } void NavMap::remove_region(NavRegion *p_region) { - regions.push_back(p_region); - regenerate_links = true; + std::vector<NavRegion *>::iterator it = std::find(regions.begin(), regions.end(), p_region); + if (it != regions.end()) { + regions.erase(it); + regenerate_links = true; + } } bool NavMap::has_agent(RvoAgent *agent) const { diff --git a/modules/gdnavigation/nav_map.h b/modules/gdnavigation/nav_map.h index 128a82580c..4543f00926 100644 --- a/modules/gdnavigation/nav_map.h +++ b/modules/gdnavigation/nav_map.h @@ -104,6 +104,10 @@ public: gd::PointKey get_point_key(const Vector3 &p_pos) const; Vector<Vector3> get_path(Vector3 p_origin, Vector3 p_destination, bool p_optimize) const; + Vector3 get_closest_point_to_segment(const Vector3 &p_from, const Vector3 &p_to, const bool p_use_collision) const; + Vector3 get_closest_point(const Vector3 &p_point) const; + Vector3 get_closest_point_normal(const Vector3 &p_point) const; + RID get_closest_point_owner(const Vector3 &p_point) const; void add_region(NavRegion *p_region); void remove_region(NavRegion *p_region); diff --git a/modules/gdnavigation/nav_region.cpp b/modules/gdnavigation/nav_region.cpp index d2d9d8b517..0215821305 100644 --- a/modules/gdnavigation/nav_region.cpp +++ b/modules/gdnavigation/nav_region.cpp @@ -78,12 +78,12 @@ void NavRegion::update_polygons() { if (mesh.is_null()) return; - PoolVector<Vector3> vertices = mesh->get_vertices(); + Vector<Vector3> vertices = mesh->get_vertices(); int len = vertices.size(); if (len == 0) return; - PoolVector<Vector3>::Read vertices_r = vertices.read(); + const Vector3 *vertices_r = vertices.ptr(); polygons.resize(mesh->get_polygon_count()); diff --git a/modules/gdnavigation/navigation_mesh_editor_plugin.cpp b/modules/gdnavigation/navigation_mesh_editor_plugin.cpp index 13c74d5706..28fe0bfd06 100644 --- a/modules/gdnavigation/navigation_mesh_editor_plugin.cpp +++ b/modules/gdnavigation/navigation_mesh_editor_plugin.cpp @@ -107,13 +107,13 @@ NavigationMeshEditor::NavigationMeshEditor() { bake_hbox->add_child(button_bake); button_bake->set_toggle_mode(true); button_bake->set_text(TTR("Bake NavMesh")); - button_bake->connect("pressed", this, "_bake_pressed"); + button_bake->connect_compat("pressed", this, "_bake_pressed"); button_reset = memnew(ToolButton); bake_hbox->add_child(button_reset); // No button text, we only use a revert icon which is set when entering the tree. button_reset->set_tooltip(TTR("Clear the navigation mesh.")); - button_reset->connect("pressed", this, "_clear_pressed"); + button_reset->connect_compat("pressed", this, "_clear_pressed"); bake_info = memnew(Label); bake_hbox->add_child(bake_info); diff --git a/modules/gdnavigation/navigation_mesh_generator.cpp b/modules/gdnavigation/navigation_mesh_generator.cpp index 04b86fabc5..7f8761dac8 100644 --- a/modules/gdnavigation/navigation_mesh_generator.cpp +++ b/modules/gdnavigation/navigation_mesh_generator.cpp @@ -90,13 +90,13 @@ void NavigationMeshGenerator::_add_mesh(const Ref<Mesh> &p_mesh, const Transform Array a = p_mesh->surface_get_arrays(i); - PoolVector<Vector3> mesh_vertices = a[Mesh::ARRAY_VERTEX]; - PoolVector<Vector3>::Read vr = mesh_vertices.read(); + Vector<Vector3> mesh_vertices = a[Mesh::ARRAY_VERTEX]; + const Vector3 *vr = mesh_vertices.ptr(); if (p_mesh->surface_get_format(i) & Mesh::ARRAY_FORMAT_INDEX) { - PoolVector<int> mesh_indices = a[Mesh::ARRAY_INDEX]; - PoolVector<int>::Read ir = mesh_indices.read(); + Vector<int> mesh_indices = a[Mesh::ARRAY_INDEX]; + const int *ir = mesh_indices.ptr(); for (int j = 0; j < mesh_vertices.size(); j++) { _add_vertex(p_xform.xform(vr[j]), p_verticies); @@ -123,7 +123,7 @@ void NavigationMeshGenerator::_add_mesh(const Ref<Mesh> &p_mesh, const Transform } } -void NavigationMeshGenerator::_add_faces(const PoolVector3Array &p_faces, const Transform &p_xform, Vector<float> &p_verticies, Vector<int> &p_indices) { +void NavigationMeshGenerator::_add_faces(const PackedVector3Array &p_faces, const Transform &p_xform, Vector<float> &p_verticies, Vector<int> &p_indices) { int face_count = p_faces.size() / 3; int current_vertex_count = p_verticies.size() / 3; @@ -227,7 +227,7 @@ void NavigationMeshGenerator::_parse_geometry(Transform p_accumulated_transform, Error err = QuickHull::build(varr, md); if (err == OK) { - PoolVector3Array faces; + PackedVector3Array faces; for (int j = 0; j < md.faces.size(); ++j) { Geometry::MeshData::Face face = md.faces[j]; @@ -279,11 +279,11 @@ void NavigationMeshGenerator::_parse_geometry(Transform p_accumulated_transform, void NavigationMeshGenerator::_convert_detail_mesh_to_native_navigation_mesh(const rcPolyMeshDetail *p_detail_mesh, Ref<NavigationMesh> p_nav_mesh) { - PoolVector<Vector3> nav_vertices; + Vector<Vector3> nav_vertices; for (int i = 0; i < p_detail_mesh->nverts; i++) { const float *v = &p_detail_mesh->verts[i * 3]; - nav_vertices.append(Vector3(v[0], v[1], v[2])); + nav_vertices.push_back(Vector3(v[0], v[1], v[2])); } p_nav_mesh->set_vertices(nav_vertices); @@ -562,7 +562,7 @@ void NavigationMeshGenerator::bake(Ref<NavigationMesh> p_nav_mesh, Node *p_node) void NavigationMeshGenerator::clear(Ref<NavigationMesh> p_nav_mesh) { if (p_nav_mesh.is_valid()) { p_nav_mesh->clear_polygons(); - p_nav_mesh->set_vertices(PoolVector<Vector3>()); + p_nav_mesh->set_vertices(Vector<Vector3>()); } } diff --git a/modules/gdnavigation/navigation_mesh_generator.h b/modules/gdnavigation/navigation_mesh_generator.h index 107dee75e2..27a56e1d7a 100644 --- a/modules/gdnavigation/navigation_mesh_generator.h +++ b/modules/gdnavigation/navigation_mesh_generator.h @@ -51,7 +51,7 @@ protected: static void _add_vertex(const Vector3 &p_vec3, Vector<float> &p_verticies); static void _add_mesh(const Ref<Mesh> &p_mesh, const Transform &p_xform, Vector<float> &p_verticies, Vector<int> &p_indices); - static void _add_faces(const PoolVector3Array &p_faces, const Transform &p_xform, Vector<float> &p_verticies, Vector<int> &p_indices); + static void _add_faces(const PackedVector3Array &p_faces, const Transform &p_xform, Vector<float> &p_verticies, Vector<int> &p_indices); static void _parse_geometry(Transform p_accumulated_transform, Node *p_node, Vector<float> &p_verticies, Vector<int> &p_indices, int p_generate_from, uint32_t p_collision_mask, bool p_recurse_children); static void _convert_detail_mesh_to_native_navigation_mesh(const rcPolyMeshDetail *p_detail_mesh, Ref<NavigationMesh> p_nav_mesh); diff --git a/modules/gdnavigation/rvo_agent.cpp b/modules/gdnavigation/rvo_agent.cpp index 4d19bc15af..677e525bbf 100644 --- a/modules/gdnavigation/rvo_agent.cpp +++ b/modules/gdnavigation/rvo_agent.cpp @@ -74,7 +74,7 @@ void RvoAgent::dispatch_callback() { callback.id = ObjectID(); } - Variant::CallError responseCallError; + Callable::CallError responseCallError; callback.new_velocity = Vector3(agent.newVelocity_.x(), agent.newVelocity_.y(), agent.newVelocity_.z()); diff --git a/modules/gdscript/doc_classes/@GDScript.xml b/modules/gdscript/doc_classes/@GDScript.xml index 9fc8ad5573..cf76c09294 100644 --- a/modules/gdscript/doc_classes/@GDScript.xml +++ b/modules/gdscript/doc_classes/@GDScript.xml @@ -131,7 +131,7 @@ <method name="bytes2var"> <return type="Variant"> </return> - <argument index="0" name="bytes" type="PoolByteArray"> + <argument index="0" name="bytes" type="PackedByteArray"> </argument> <argument index="1" name="allow_objects" type="bool" default="false"> </argument> @@ -1245,7 +1245,7 @@ </description> </method> <method name="var2bytes"> - <return type="PoolByteArray"> + <return type="PackedByteArray"> </return> <argument index="0" name="var" type="Variant"> </argument> diff --git a/modules/gdscript/doc_classes/GDScript.xml b/modules/gdscript/doc_classes/GDScript.xml index 5d0e93e117..62ccb93901 100644 --- a/modules/gdscript/doc_classes/GDScript.xml +++ b/modules/gdscript/doc_classes/GDScript.xml @@ -12,7 +12,7 @@ </tutorials> <methods> <method name="get_as_byte_code" qualifiers="const"> - <return type="PoolByteArray"> + <return type="PackedByteArray"> </return> <description> Returns byte code for the script source code. diff --git a/modules/gdscript/gdscript.cpp b/modules/gdscript/gdscript.cpp index c71ec6ec76..a72bb7ba49 100644 --- a/modules/gdscript/gdscript.cpp +++ b/modules/gdscript/gdscript.cpp @@ -84,7 +84,7 @@ Object *GDScriptNativeClass::instance() { return ClassDB::instance(name); } -GDScriptInstance *GDScript::_create_instance(const Variant **p_args, int p_argcount, Object *p_owner, bool p_isref, Variant::CallError &r_error) { +GDScriptInstance *GDScript::_create_instance(const Variant **p_args, int p_argcount, Object *p_owner, bool p_isref, Callable::CallError &r_error) { /* STEP 1, CREATE */ @@ -93,6 +93,7 @@ GDScriptInstance *GDScript::_create_instance(const Variant **p_args, int p_argco instance->members.resize(member_indices.size()); instance->script = Ref<GDScript>(this); instance->owner = p_owner; + instance->owner_id = p_owner->get_instance_id(); #ifdef DEBUG_ENABLED //needed for hot reloading for (Map<StringName, MemberInfo>::Element *E = member_indices.front(); E; E = E->next()) { @@ -115,7 +116,7 @@ GDScriptInstance *GDScript::_create_instance(const Variant **p_args, int p_argco initializer->call(instance, p_args, p_argcount, r_error); - if (r_error.error != Variant::CallError::CALL_OK) { + if (r_error.error != Callable::CallError::CALL_OK) { instance->script = Ref<GDScript>(); instance->owner->set_script_instance(NULL); #ifndef NO_THREADS @@ -126,23 +127,23 @@ GDScriptInstance *GDScript::_create_instance(const Variant **p_args, int p_argco GDScriptLanguage::singleton->lock->unlock(); #endif - ERR_FAIL_COND_V(r_error.error != Variant::CallError::CALL_OK, NULL); //error constructing + ERR_FAIL_COND_V(r_error.error != Callable::CallError::CALL_OK, NULL); //error constructing } //@TODO make thread safe return instance; } -Variant GDScript::_new(const Variant **p_args, int p_argcount, Variant::CallError &r_error) { +Variant GDScript::_new(const Variant **p_args, int p_argcount, Callable::CallError &r_error) { /* STEP 1, CREATE */ if (!valid) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD; return Variant(); } - r_error.error = Variant::CallError::CALL_OK; + r_error.error = Callable::CallError::CALL_OK; REF ref; Object *owner = NULL; @@ -328,7 +329,7 @@ ScriptInstance *GDScript::instance_create(Object *p_this) { } } - Variant::CallError unchecked_error; + Callable::CallError unchecked_error; return _create_instance(NULL, 0, p_this, Object::cast_to<Reference>(p_this) != NULL, unchecked_error); } @@ -738,7 +739,7 @@ MultiplayerAPI::RPCMode GDScript::get_rset_mode(const StringName &p_variable) co return get_rset_mode_by_id(get_rset_property_id(p_variable)); } -Variant GDScript::call(const StringName &p_method, const Variant **p_args, int p_argcount, Variant::CallError &r_error) { +Variant GDScript::call(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error) { GDScript *top = this; while (top) { @@ -901,7 +902,7 @@ Error GDScript::load_byte_code(const String &p_path) { Error GDScript::load_source_code(const String &p_path) { - PoolVector<uint8_t> sourcef; + Vector<uint8_t> sourcef; Error err; FileAccess *f = FileAccess::open(p_path, FileAccess::READ, &err); if (err) { @@ -911,15 +912,15 @@ Error GDScript::load_source_code(const String &p_path) { int len = f->get_len(); sourcef.resize(len + 1); - PoolVector<uint8_t>::Write w = sourcef.write(); - int r = f->get_buffer(w.ptr(), len); + uint8_t *w = sourcef.ptrw(); + int r = f->get_buffer(w, len); f->close(); memdelete(f); ERR_FAIL_COND_V(r != len, ERR_CANT_OPEN); w[len] = 0; String s; - if (s.parse_utf8((const char *)w.ptr())) { + if (s.parse_utf8((const char *)w)) { ERR_FAIL_V_MSG(ERR_INVALID_DATA, "Script '" + p_path + "' contains invalid unicode (UTF-8), so it was not loaded. Please ensure that scripts are saved in valid UTF-8 unicode."); } @@ -994,7 +995,6 @@ void GDScript::get_script_signal_list(List<MethodInfo> *r_signals) const { GDScript::GDScript() : script_list(this) { - _static_ref = this; valid = false; subclass_count = 0; initializer = NULL; @@ -1081,18 +1081,18 @@ bool GDScriptInstance::set(const StringName &p_name, const Variant &p_value) { const GDScript::MemberInfo *member = &E->get(); if (member->setter) { const Variant *val = &p_value; - Variant::CallError err; + Callable::CallError err; call(member->setter, &val, 1, err); - if (err.error == Variant::CallError::CALL_OK) { + if (err.error == Callable::CallError::CALL_OK) { return true; //function exists, call was successful } } else { if (!member->data_type.is_type(p_value)) { // Try conversion - Variant::CallError ce; + Callable::CallError ce; const Variant *value = &p_value; Variant converted = Variant::construct(member->data_type.builtin_type, &value, 1, ce); - if (ce.error == Variant::CallError::CALL_OK) { + if (ce.error == Callable::CallError::CALL_OK) { members.write[member->index] = converted; return true; } else { @@ -1115,9 +1115,9 @@ bool GDScriptInstance::set(const StringName &p_name, const Variant &p_value) { Variant name = p_name; const Variant *args[2] = { &name, &p_value }; - Variant::CallError err; + Callable::CallError err; Variant ret = E->get()->call(this, (const Variant **)args, 2, err); - if (err.error == Variant::CallError::CALL_OK && ret.get_type() == Variant::BOOL && ret.operator bool()) + if (err.error == Callable::CallError::CALL_OK && ret.get_type() == Variant::BOOL && ret.operator bool()) return true; } sptr = sptr->_base; @@ -1135,9 +1135,9 @@ bool GDScriptInstance::get(const StringName &p_name, Variant &r_ret) const { const Map<StringName, GDScript::MemberInfo>::Element *E = script->member_indices.find(p_name); if (E) { if (E->get().getter) { - Variant::CallError err; + Callable::CallError err; r_ret = const_cast<GDScriptInstance *>(this)->call(E->get().getter, NULL, 0, err); - if (err.error == Variant::CallError::CALL_OK) { + if (err.error == Callable::CallError::CALL_OK) { return true; } } @@ -1166,9 +1166,9 @@ bool GDScriptInstance::get(const StringName &p_name, Variant &r_ret) const { Variant name = p_name; const Variant *args[1] = { &name }; - Variant::CallError err; + Callable::CallError err; Variant ret = const_cast<GDScriptFunction *>(E->get())->call(const_cast<GDScriptInstance *>(this), (const Variant **)args, 1, err); - if (err.error == Variant::CallError::CALL_OK && ret.get_type() != Variant::NIL) { + if (err.error == Callable::CallError::CALL_OK && ret.get_type() != Variant::NIL) { r_ret = ret; return true; } @@ -1209,9 +1209,9 @@ void GDScriptInstance::get_property_list(List<PropertyInfo> *p_properties) const const Map<StringName, GDScriptFunction *>::Element *E = sptr->member_functions.find(GDScriptLanguage::get_singleton()->strings._get_property_list); if (E) { - Variant::CallError err; + Callable::CallError err; Variant ret = const_cast<GDScriptFunction *>(E->get())->call(const_cast<GDScriptInstance *>(this), NULL, 0, err); - if (err.error == Variant::CallError::CALL_OK) { + if (err.error == Callable::CallError::CALL_OK) { ERR_FAIL_COND_MSG(ret.get_type() != Variant::ARRAY, "Wrong type for _get_property_list, must be an array of dictionaries."); @@ -1296,7 +1296,7 @@ bool GDScriptInstance::has_method(const StringName &p_method) const { return false; } -Variant GDScriptInstance::call(const StringName &p_method, const Variant **p_args, int p_argcount, Variant::CallError &r_error) { +Variant GDScriptInstance::call(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error) { GDScript *sptr = script.ptr(); while (sptr) { @@ -1306,14 +1306,14 @@ Variant GDScriptInstance::call(const StringName &p_method, const Variant **p_arg } sptr = sptr->_base; } - r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD; return Variant(); } void GDScriptInstance::call_multilevel(const StringName &p_method, const Variant **p_args, int p_argcount) { GDScript *sptr = script.ptr(); - Variant::CallError ce; + Callable::CallError ce; while (sptr) { Map<StringName, GDScriptFunction *>::Element *E = sptr->member_functions.find(p_method); @@ -1329,7 +1329,7 @@ void GDScriptInstance::_ml_call_reversed(GDScript *sptr, const StringName &p_met if (sptr->_base) _ml_call_reversed(sptr->_base, p_method, p_args, p_argcount); - Variant::CallError ce; + Callable::CallError ce; Map<StringName, GDScriptFunction *>::Element *E = sptr->member_functions.find(p_method); if (E) { @@ -1354,9 +1354,9 @@ void GDScriptInstance::notification(int p_notification) { while (sptr) { Map<StringName, GDScriptFunction *>::Element *E = sptr->member_functions.find(GDScriptLanguage::get_singleton()->strings._notification); if (E) { - Variant::CallError err; + Callable::CallError err; E->get()->call(this, args, 1, err); - if (err.error != Variant::CallError::CALL_OK) { + if (err.error != Callable::CallError::CALL_OK) { //print error about notification call } } @@ -1366,9 +1366,9 @@ void GDScriptInstance::notification(int p_notification) { String GDScriptInstance::to_string(bool *r_valid) { if (has_method(CoreStringNames::get_singleton()->_to_string)) { - Variant::CallError ce; + Callable::CallError ce; Variant ret = call(CoreStringNames::get_singleton()->_to_string, NULL, 0, ce); - if (ce.error == Variant::CallError::CALL_OK) { + if (ce.error == Callable::CallError::CALL_OK) { if (ret.get_type() != Variant::STRING) { if (r_valid) *r_valid = false; @@ -1792,7 +1792,7 @@ void GDScriptLanguage::reload_tool_script(const Ref<Script> &p_script, bool p_so obj->get_script_instance()->get_property_state(state); map[obj->get_instance_id()] = state; - obj->set_script(RefPtr()); + obj->set_script(Variant()); } } @@ -1808,7 +1808,7 @@ void GDScriptLanguage::reload_tool_script(const Ref<Script> &p_script, bool p_so map.insert(obj->get_instance_id(), List<Pair<StringName, Variant> >()); List<Pair<StringName, Variant> > &state = map[obj->get_instance_id()]; obj->get_script_instance()->get_property_state(state); - obj->set_script(RefPtr()); + obj->set_script(Variant()); } else { // no instance found. Let's remove it so we don't loop forever E->get()->placeholders.erase(E->get()->placeholders.front()->get()); @@ -1839,9 +1839,9 @@ void GDScriptLanguage::reload_tool_script(const Ref<Script> &p_script, bool p_so if (!p_soft_reload) { //clear it just in case (may be a pending reload state) - obj->set_script(RefPtr()); + obj->set_script(Variant()); } - obj->set_script(scr.get_ref_ptr()); + obj->set_script(scr); ScriptInstance *script_instance = obj->get_script_instance(); @@ -1985,7 +1985,7 @@ bool GDScriptLanguage::handles_global_class_type(const String &p_type) const { String GDScriptLanguage::get_global_class_name(const String &p_path, String *r_base_type, String *r_icon_path) const { - PoolVector<uint8_t> sourcef; + Vector<uint8_t> sourcef; Error err; FileAccessRef f = FileAccess::open(p_path, FileAccess::READ, &err); if (err) { diff --git a/modules/gdscript/gdscript.h b/modules/gdscript/gdscript.h index 4af574cd9d..6598a0023b 100644 --- a/modules/gdscript/gdscript.h +++ b/modules/gdscript/gdscript.h @@ -73,7 +73,6 @@ class GDScript : public Script { friend class GDScriptFunctions; friend class GDScriptLanguage; - Variant _static_ref; //used for static call Ref<GDScriptNativeClass> native; Ref<GDScript> base; GDScript *_base; //fast pointer access @@ -116,7 +115,7 @@ class GDScript : public Script { String fully_qualified_name; SelfList<GDScript> script_list; - GDScriptInstance *_create_instance(const Variant **p_args, int p_argcount, Object *p_owner, bool p_isref, Variant::CallError &r_error); + GDScriptInstance *_create_instance(const Variant **p_args, int p_argcount, Object *p_owner, bool p_isref, Callable::CallError &r_error); void _set_subclass_path(Ref<GDScript> &p_sc, const String &p_path); @@ -141,7 +140,7 @@ protected: bool _set(const StringName &p_name, const Variant &p_value); void _get_property_list(List<PropertyInfo> *p_properties) const; - Variant call(const StringName &p_method, const Variant **p_args, int p_argcount, Variant::CallError &r_error); + Variant call(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error); //void call_multilevel(const StringName& p_method,const Variant** p_args,int p_argcount); static void _bind_methods(); @@ -170,7 +169,7 @@ public: const Map<StringName, GDScriptFunction *> &debug_get_member_functions() const; //this is debug only StringName debug_get_member_by_index(int p_idx) const; - Variant _new(const Variant **p_args, int p_argcount, Variant::CallError &r_error); + Variant _new(const Variant **p_args, int p_argcount, Callable::CallError &r_error); virtual bool can_instance() const; virtual Ref<Script> get_base_script() const; @@ -241,6 +240,7 @@ class GDScriptInstance : public ScriptInstance { friend class GDScriptFunctions; friend class GDScriptCompiler; + ObjectID owner_id; Object *owner; Ref<GDScript> script; #ifdef DEBUG_ENABLED @@ -261,7 +261,7 @@ public: virtual void get_method_list(List<MethodInfo> *p_list) const; virtual bool has_method(const StringName &p_method) const; - virtual Variant call(const StringName &p_method, const Variant **p_args, int p_argcount, Variant::CallError &r_error); + virtual Variant call(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error); virtual void call_multilevel(const StringName &p_method, const Variant **p_args, int p_argcount); virtual void call_multilevel_reversed(const StringName &p_method, const Variant **p_args, int p_argcount); @@ -486,7 +486,7 @@ public: virtual bool supports_builtin_mode() const; virtual bool can_inherit_from_file() { return true; } virtual int find_function(const String &p_function, const String &p_code) const; - virtual String make_function(const String &p_class, const String &p_name, const PoolStringArray &p_args) const; + virtual String make_function(const String &p_class, const String &p_name, const PackedStringArray &p_args) const; virtual Error complete_code(const String &p_code, const String &p_path, Object *p_owner, List<ScriptCodeCompletionOption> *r_options, bool &r_forced, String &r_call_hint); #ifdef TOOLS_ENABLED virtual Error lookup_code(const String &p_code, const String &p_symbol, const String &p_path, Object *p_owner, LookupResult &r_result); diff --git a/modules/gdscript/gdscript_compiler.cpp b/modules/gdscript/gdscript_compiler.cpp index fba1b992ec..4bd425f999 100644 --- a/modules/gdscript/gdscript_compiler.cpp +++ b/modules/gdscript/gdscript_compiler.cpp @@ -2076,10 +2076,10 @@ Error GDScriptCompiler::_parse_class_blocks(GDScript *p_script, const GDScriptPa /* STEP 2, INITIALIZE AND CONSTRUCT */ - Variant::CallError ce; + Callable::CallError ce; p_script->initializer->call(instance, NULL, 0, ce); - if (ce.error != Variant::CallError::CALL_OK) { + if (ce.error != Callable::CallError::CALL_OK) { //well, tough luck, not goinna do anything here } } diff --git a/modules/gdscript/gdscript_editor.cpp b/modules/gdscript/gdscript_editor.cpp index c2c8ff5b99..1bc1aae0d2 100644 --- a/modules/gdscript/gdscript_editor.cpp +++ b/modules/gdscript/gdscript_editor.cpp @@ -457,7 +457,7 @@ void GDScriptLanguage::get_public_constants(List<Pair<String, Variant> > *p_cons p_constants->push_back(nan); } -String GDScriptLanguage::make_function(const String &p_class, const String &p_name, const PoolStringArray &p_args) const { +String GDScriptLanguage::make_function(const String &p_class, const String &p_name, const PackedStringArray &p_args) const { #ifdef TOOLS_ENABLED bool th = EditorSettings::get_singleton()->get_setting("text_editor/completion/add_type_hints"); @@ -905,10 +905,10 @@ static bool _guess_expression_type(GDScriptCompletionContext &p_context, const G argptr.push_back(&args[i]); } - Variant::CallError ce; + Callable::CallError ce; Variant ret = mb->call(baseptr, (const Variant **)argptr.ptr(), argptr.size(), ce); - if (ce.error == Variant::CallError::CALL_OK && ret.get_type() != Variant::NIL) { + if (ce.error == Callable::CallError::CALL_OK && ret.get_type() != Variant::NIL) { if (ret.get_type() != Variant::OBJECT || ret.operator Object *() != NULL) { r_type = _type_from_variant(ret); found = true; @@ -1060,7 +1060,7 @@ static bool _guess_expression_type(GDScriptCompletionContext &p_context, const G StringName id = index.value; found = _guess_identifier_type_from_base(c, base, id, r_type); } else if (!found && index.type.kind == GDScriptParser::DataType::BUILTIN) { - Variant::CallError err; + Callable::CallError err; Variant base_val = Variant::construct(base.type.builtin_type, NULL, 0, err); bool valid = false; Variant res = base_val.get(index.value, &valid); @@ -1114,7 +1114,7 @@ static bool _guess_expression_type(GDScriptCompletionContext &p_context, const G break; } - Variant::CallError ce; + Callable::CallError ce; bool v1_use_value = p1.value.get_type() != Variant::NIL && p1.value.get_type() != Variant::OBJECT; Variant v1 = (v1_use_value) ? p1.value : Variant::construct(p1.type.builtin_type, NULL, 0, ce); bool v2_use_value = p2.value.get_type() != Variant::NIL && p2.value.get_type() != Variant::OBJECT; @@ -1124,7 +1124,7 @@ static bool _guess_expression_type(GDScriptCompletionContext &p_context, const G v2 = 1; v2_use_value = false; } - if (vop == Variant::OP_DIVIDE && v2.get_type() == Variant::REAL) { + if (vop == Variant::OP_DIVIDE && v2.get_type() == Variant::FLOAT) { v2 = 1.0; v2_use_value = false; } @@ -1533,10 +1533,10 @@ static bool _guess_identifier_type_from_base(GDScriptCompletionContext &p_contex return false; } break; case GDScriptParser::DataType::BUILTIN: { - Variant::CallError err; + Callable::CallError err; Variant tmp = Variant::construct(base_type.builtin_type, NULL, 0, err); - if (err.error != Variant::CallError::CALL_OK) { + if (err.error != Callable::CallError::CALL_OK) { return false; } bool valid = false; @@ -1703,9 +1703,9 @@ static bool _guess_method_return_type_from_base(GDScriptCompletionContext &p_con return false; } break; case GDScriptParser::DataType::BUILTIN: { - Variant::CallError err; + Callable::CallError err; Variant tmp = Variant::construct(base_type.builtin_type, NULL, 0, err); - if (err.error != Variant::CallError::CALL_OK) { + if (err.error != Callable::CallError::CALL_OK) { return false; } @@ -2088,9 +2088,9 @@ static void _find_identifiers_in_base(const GDScriptCompletionContext &p_context return; } break; case GDScriptParser::DataType::BUILTIN: { - Variant::CallError err; + Callable::CallError err; Variant tmp = Variant::construct(base_type.builtin_type, NULL, 0, err); - if (err.error != Variant::CallError::CALL_OK) { + if (err.error != Callable::CallError::CALL_OK) { return; } @@ -2172,9 +2172,9 @@ static void _find_identifiers(const GDScriptCompletionContext &p_context, bool p } static const char *_type_names[Variant::VARIANT_MAX] = { - "null", "bool", "int", "float", "String", "Vector2", "Rect2", "Vector3", "Transform2D", "Plane", "Quat", "AABB", "Basis", "Transform", - "Color", "NodePath", "RID", "Object", "Dictionary", "Array", "PoolByteArray", "PoolIntArray", "PoolRealArray", "PoolStringArray", - "PoolVector2Array", "PoolVector3Array", "PoolColorArray" + "null", "bool", "int", "float", "String", "Vector2", "Vector2i", "Rect2", "Rect2i", "Vector3", "Vector3i", "Transform2D", "Plane", "Quat", "AABB", "Basis", "Transform", + "Color", "StringName", "NodePath", "RID", "Object", "Callable", "Signal", "Dictionary", "Array", "PackedByteArray", "PackedInt32Array", "PackedInt64Array", "PackedFloat32Array", "PackedFloat64Array", "PackedStringArray", + "PackedVector2Array", "PackedVector3Array", "PackedColorArray" }; for (int i = 0; i < Variant::VARIANT_MAX; i++) { @@ -2372,9 +2372,9 @@ static void _find_call_arguments(const GDScriptCompletionContext &p_context, con } break; case GDScriptParser::DataType::BUILTIN: { if (base.get_type() == Variant::NIL) { - Variant::CallError err; + Callable::CallError err; base = Variant::construct(base_type.builtin_type, NULL, 0, err); - if (err.error != Variant::CallError::CALL_OK) { + if (err.error != Callable::CallError::CALL_OK) { return; } } @@ -2565,7 +2565,7 @@ Error GDScriptLanguage::complete_code(const String &p_code, const String &p_path } break; case GDScriptParser::COMPLETION_FUNCTION: { is_function = true; - FALLTHROUGH; + [[fallthrough]]; } case GDScriptParser::COMPLETION_IDENTIFIER: { _find_identifiers(context, is_function, options); @@ -2608,7 +2608,7 @@ Error GDScriptLanguage::complete_code(const String &p_code, const String &p_path } break; case GDScriptParser::COMPLETION_METHOD: { is_function = true; - FALLTHROUGH; + [[fallthrough]]; } case GDScriptParser::COMPLETION_INDEX: { const GDScriptParser::Node *node = parser.get_completion_node(); @@ -3219,9 +3219,9 @@ static Error _lookup_symbol_from_base(const GDScriptParser::DataType &p_base, co v_ref.instance(); v = v_ref; } else { - Variant::CallError err; + Callable::CallError err; v = Variant::construct(base_type.builtin_type, NULL, 0, err); - if (err.error != Variant::CallError::CALL_OK) { + if (err.error != Callable::CallError::CALL_OK) { break; } } @@ -3330,7 +3330,7 @@ Error GDScriptLanguage::lookup_code(const String &p_code, const String &p_symbol case GDScriptParser::COMPLETION_PARENT_FUNCTION: case GDScriptParser::COMPLETION_FUNCTION: { is_function = true; - FALLTHROUGH; + [[fallthrough]]; } case GDScriptParser::COMPLETION_IDENTIFIER: { @@ -3462,7 +3462,7 @@ Error GDScriptLanguage::lookup_code(const String &p_code, const String &p_symbol } break; case GDScriptParser::COMPLETION_METHOD: { is_function = true; - FALLTHROUGH; + [[fallthrough]]; } case GDScriptParser::COMPLETION_INDEX: { const GDScriptParser::Node *node = parser.get_completion_node(); diff --git a/modules/gdscript/gdscript_function.cpp b/modules/gdscript/gdscript_function.cpp index 7392bbc10a..27857ea91f 100644 --- a/modules/gdscript/gdscript_function.cpp +++ b/modules/gdscript/gdscript_function.cpp @@ -34,7 +34,7 @@ #include "gdscript.h" #include "gdscript_functions.h" -Variant *GDScriptFunction::_get_variant(int p_address, GDScriptInstance *p_instance, GDScript *p_script, Variant &self, Variant *p_stack, String &r_error) const { +Variant *GDScriptFunction::_get_variant(int p_address, GDScriptInstance *p_instance, GDScript *p_script, Variant &self, Variant &static_ref, Variant *p_stack, String &r_error) const { int address = p_address & ADDR_MASK; @@ -52,7 +52,7 @@ Variant *GDScriptFunction::_get_variant(int p_address, GDScriptInstance *p_insta } break; case ADDR_TYPE_CLASS: { - return &p_script->_static_ref; + return &static_ref; } break; case ADDR_TYPE_MEMBER: { #ifdef DEBUG_ENABLED @@ -137,18 +137,19 @@ static String _get_var_type(const Variant *p_var) { String basestr; if (p_var->get_type() == Variant::OBJECT) { - Object *bobj = *p_var; + bool was_freed; + Object *bobj = p_var->get_validated_object_with_check(was_freed); if (!bobj) { - basestr = "null instance"; - } else { - if (ObjectDB::instance_validate(bobj)) { - if (bobj->get_script_instance()) - basestr = bobj->get_class() + " (" + bobj->get_script_instance()->get_script()->get_path().get_file() + ")"; - else - basestr = bobj->get_class(); + if (was_freed) { + basestr = "null instance"; } else { - basestr = "previously freed instance"; + basestr = "previously freed"; } + } else { + if (bobj->get_script_instance()) + basestr = bobj->get_class() + " (" + bobj->get_script_instance()->get_script()->get_path().get_file() + ")"; + else + basestr = bobj->get_class(); } } else { @@ -159,11 +160,11 @@ static String _get_var_type(const Variant *p_var) { } #endif // DEBUG_ENABLED -String GDScriptFunction::_get_call_error(const Variant::CallError &p_err, const String &p_where, const Variant **argptrs) const { +String GDScriptFunction::_get_call_error(const Callable::CallError &p_err, const String &p_where, const Variant **argptrs) const { String err_text; - if (p_err.error == Variant::CallError::CALL_ERROR_INVALID_ARGUMENT) { + if (p_err.error == Callable::CallError::CALL_ERROR_INVALID_ARGUMENT) { int errorarg = p_err.argument; // Handle the Object to Object case separately as we don't have further class details. #ifdef DEBUG_ENABLED @@ -172,15 +173,15 @@ String GDScriptFunction::_get_call_error(const Variant::CallError &p_err, const } else #endif // DEBUG_ENABLED { - err_text = "Invalid type in " + p_where + ". Cannot convert argument " + itos(errorarg + 1) + " from " + Variant::get_type_name(argptrs[errorarg]->get_type()) + " to " + Variant::get_type_name(p_err.expected) + "."; + err_text = "Invalid type in " + p_where + ". Cannot convert argument " + itos(errorarg + 1) + " from " + Variant::get_type_name(argptrs[errorarg]->get_type()) + " to " + Variant::get_type_name(Variant::Type(p_err.expected)) + "."; } - } else if (p_err.error == Variant::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS) { + } else if (p_err.error == Callable::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS) { err_text = "Invalid call to " + p_where + ". Expected " + itos(p_err.argument) + " arguments."; - } else if (p_err.error == Variant::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS) { + } else if (p_err.error == Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS) { err_text = "Invalid call to " + p_where + ". Expected " + itos(p_err.argument) + " arguments."; - } else if (p_err.error == Variant::CallError::CALL_ERROR_INVALID_METHOD) { + } else if (p_err.error == Callable::CallError::CALL_ERROR_INVALID_METHOD) { err_text = "Invalid call. Nonexistent " + p_where + "."; - } else if (p_err.error == Variant::CallError::CALL_ERROR_INSTANCE_IS_NULL) { + } else if (p_err.error == Callable::CallError::CALL_ERROR_INSTANCE_IS_NULL) { err_text = "Attempt to call " + p_where + " on a null instance."; } else { err_text = "Bug, call error: #" + itos(p_err.error); @@ -257,7 +258,7 @@ String GDScriptFunction::_get_call_error(const Variant::CallError &p_err, const #define OPCODE_OUT break #endif -Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_args, int p_argcount, Variant::CallError &r_err, CallState *p_state) { +Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_args, int p_argcount, Callable::CallError &r_err, CallState *p_state) { OPCODES_TABLE; @@ -266,9 +267,10 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a return Variant(); } - r_err.error = Variant::CallError::CALL_OK; + r_err.error = Callable::CallError::CALL_OK; Variant self; + Variant static_ref; Variant retvalue; Variant *stack = NULL; Variant **call_args; @@ -304,13 +306,13 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a if (p_argcount > _argument_count) { - r_err.error = Variant::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS; + r_err.error = Callable::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS; r_err.argument = _argument_count; return Variant(); } else if (p_argcount < _argument_count - _default_arg_count) { - r_err.error = Variant::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS; + r_err.error = Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS; r_err.argument = _argument_count - _default_arg_count; return Variant(); } else { @@ -339,7 +341,7 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a memnew_placement(&stack[i], Variant); continue; } else { - r_err.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; + r_err.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; r_err.argument = i; r_err.expected = argument_types[i].kind == GDScriptDataType::BUILTIN ? argument_types[i].builtin_type : Variant::OBJECT; return Variant(); @@ -403,10 +405,10 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a #define CHECK_SPACE(m_space) \ GD_ERR_BREAK((ip + m_space) > _code_size) -#define GET_VARIANT_PTR(m_v, m_code_ofs) \ - Variant *m_v; \ - m_v = _get_variant(_code_ptr[ip + m_code_ofs], p_instance, script, self, stack, err_text); \ - if (unlikely(!m_v)) \ +#define GET_VARIANT_PTR(m_v, m_code_ofs) \ + Variant *m_v; \ + m_v = _get_variant(_code_ptr[ip + m_code_ofs], p_instance, script, self, static_ref, stack, err_text); \ + if (unlikely(!m_v)) \ OPCODE_BREAK; #else @@ -414,7 +416,7 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a #define CHECK_SPACE(m_space) #define GET_VARIANT_PTR(m_v, m_code_ofs) \ Variant *m_v; \ - m_v = _get_variant(_code_ptr[ip + m_code_ofs], p_instance, script, self, stack, err_text); + m_v = _get_variant(_code_ptr[ip + m_code_ofs], p_instance, script, self, static_ref, stack, err_text); #endif @@ -497,14 +499,26 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a bool extends_ok = false; if (a->get_type() == Variant::OBJECT && a->operator Object *() != NULL) { - Object *obj_A = *a; - Object *obj_B = *b; #ifdef DEBUG_ENABLED - if (!ObjectDB::instance_validate(obj_A)) { - err_text = "Left operand of 'is' was already freed."; + bool was_freed; + Object *obj_A = a->get_validated_object_with_check(was_freed); + + if (was_freed) { + err_text = "Left operand of 'is' is a previously freed instance."; OPCODE_BREAK; } + + Object *obj_B = b->get_validated_object_with_check(was_freed); + + if (was_freed) { + err_text = "Right operand of 'is' is a previously freed instance."; + OPCODE_BREAK; + } +#else + + Object *obj_A = *a; + Object *obj_B = *b; #endif // DEBUG_ENABLED GDScript *scr_B = Object::cast_to<GDScript>(obj_B); @@ -778,7 +792,7 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a #ifdef DEBUG_ENABLED if (Variant::can_convert_strict(src->get_type(), var_type)) { #endif // DEBUG_ENABLED - Variant::CallError ce; + Callable::CallError ce; *dst = Variant::construct(var_type, const_cast<const Variant **>(&src), 1, ce); } else { #ifdef DEBUG_ENABLED @@ -884,11 +898,11 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a GD_ERR_BREAK(to_type < 0 || to_type >= Variant::VARIANT_MAX); - Variant::CallError err; + Callable::CallError err; *dst = Variant::construct(to_type, (const Variant **)&src, 1, err); #ifdef DEBUG_ENABLED - if (err.error != Variant::CallError::CALL_OK) { + if (err.error != Callable::CallError::CALL_OK) { err_text = "Invalid cast: could not convert value to '" + Variant::get_type_name(to_type) + "'."; OPCODE_BREAK; } @@ -987,11 +1001,11 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a } GET_VARIANT_PTR(dst, 3 + argc); - Variant::CallError err; + Callable::CallError err; *dst = Variant::construct(t, (const Variant **)argptrs, argc, err); #ifdef DEBUG_ENABLED - if (err.error != Variant::CallError::CALL_OK) { + if (err.error != Callable::CallError::CALL_OK) { err_text = _get_call_error(err, "'" + Variant::get_type_name(t) + "' constructor", (const Variant **)argptrs); OPCODE_BREAK; @@ -1078,7 +1092,7 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a } #endif - Variant::CallError err; + Callable::CallError err; if (call_ret) { GET_VARIANT_PTR(ret, argc); @@ -1092,7 +1106,7 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a function_call_time += OS::get_singleton()->get_ticks_usec() - call_time; } - if (err.error != Variant::CallError::CALL_OK) { + if (err.error != Callable::CallError::CALL_OK) { String methodstr = *methodname; String basestr = _get_var_type(base); @@ -1100,13 +1114,13 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a if (methodstr == "call") { if (argc >= 1) { methodstr = String(*argptrs[0]) + " (via call)"; - if (err.error == Variant::CallError::CALL_ERROR_INVALID_ARGUMENT) { + if (err.error == Callable::CallError::CALL_ERROR_INVALID_ARGUMENT) { err.argument += 1; } } } else if (methodstr == "free") { - if (err.error == Variant::CallError::CALL_ERROR_INVALID_METHOD) { + if (err.error == Callable::CallError::CALL_ERROR_INVALID_METHOD) { if (base->is_ref()) { err_text = "Attempted to free a reference."; @@ -1147,12 +1161,12 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a GET_VARIANT_PTR(dst, argc); - Variant::CallError err; + Callable::CallError err; GDScriptFunctions::call(func, (const Variant **)argptrs, argc, *dst, err); #ifdef DEBUG_ENABLED - if (err.error != Variant::CallError::CALL_OK) { + if (err.error != Callable::CallError::CALL_OK) { String methodstr = GDScriptFunctions::get_func_name(func); if (dst->get_type() == Variant::STRING) { @@ -1210,7 +1224,7 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a break; } - Variant::CallError err; + Callable::CallError err; if (E) { @@ -1221,23 +1235,23 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a MethodBind *mb = ClassDB::get_method(gds->native->get_name(), *methodname); if (!mb) { - err.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; + err.error = Callable::CallError::CALL_ERROR_INVALID_METHOD; } else { *dst = mb->call(p_instance->owner, (const Variant **)argptrs, argc, err); } } else { - err.error = Variant::CallError::CALL_OK; + err.error = Callable::CallError::CALL_OK; } } else { if (*methodname != GDScriptLanguage::get_singleton()->strings._init) { - err.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; + err.error = Callable::CallError::CALL_ERROR_INVALID_METHOD; } else { - err.error = Variant::CallError::CALL_OK; + err.error = Callable::CallError::CALL_OK; } } - if (err.error != Variant::CallError::CALL_OK) { + if (err.error != Callable::CallError::CALL_OK) { String methodstr = *methodname; err_text = _get_call_error(err, "function '" + methodstr + "'", (const Variant **)argptrs); @@ -1298,33 +1312,36 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a } #endif - Object *obj = argobj->operator Object *(); +#ifdef DEBUG_ENABLED + bool was_freed; + Object *obj = argobj->get_validated_object_with_check(was_freed); String signal = argname->operator String(); -#ifdef DEBUG_ENABLED + if (was_freed) { + err_text = "First argument of yield() is a previously freed instance."; + OPCODE_BREAK; + } + if (!obj) { err_text = "First argument of yield() is null."; OPCODE_BREAK; } - if (ScriptDebugger::get_singleton()) { - if (!ObjectDB::instance_validate(obj)) { - err_text = "First argument of yield() is a previously freed instance."; - OPCODE_BREAK; - } - } if (signal.length() == 0) { err_text = "Second argument of yield() is an empty string (for signal name)."; OPCODE_BREAK; } - Error err = obj->connect(signal, gdfs.ptr(), "_signal_callback", varray(gdfs), Object::CONNECT_ONESHOT); + Error err = obj->connect_compat(signal, gdfs.ptr(), "_signal_callback", varray(gdfs), Object::CONNECT_ONESHOT); if (err != OK) { err_text = "Error connecting to signal: " + signal + " during yield()."; OPCODE_BREAK; } #else - obj->connect(signal, gdfs.ptr(), "_signal_callback", varray(gdfs), Object::CONNECT_ONESHOT); + Object *obj = argobj->operator Object *(); + String signal = argname->operator String(); + + obj->connect_compat(signal, gdfs.ptr(), "_signal_callback", varray(gdfs), Object::CONNECT_ONESHOT); #endif } @@ -1565,14 +1582,14 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a //error // function, file, line, error, explanation String err_file; - if (p_instance && ObjectDB::instance_validate(p_instance->owner) && p_instance->script->is_valid() && p_instance->script->path != "") + if (p_instance && ObjectDB::get_instance(p_instance->owner_id) != nullptr && p_instance->script->is_valid() && p_instance->script->path != "") err_file = p_instance->script->path; else if (script) err_file = script->path; if (err_file == "") err_file = "<built-in>"; String err_func = name; - if (p_instance && ObjectDB::instance_validate(p_instance->owner) && p_instance->script->is_valid() && p_instance->script->name != "") + if (p_instance && ObjectDB::get_instance(p_instance->owner_id) != nullptr && p_instance->script->is_valid() && p_instance->script->name != "") err_func = p_instance->script->name + "." + err_func; int err_line = line; if (err_text == "") { @@ -1789,13 +1806,13 @@ GDScriptFunction::~GDScriptFunction() { ///////////////////// -Variant GDScriptFunctionState::_signal_callback(const Variant **p_args, int p_argcount, Variant::CallError &r_error) { +Variant GDScriptFunctionState::_signal_callback(const Variant **p_args, int p_argcount, Callable::CallError &r_error) { Variant arg; - r_error.error = Variant::CallError::CALL_OK; + r_error.error = Callable::CallError::CALL_OK; if (p_argcount == 0) { - r_error.error = Variant::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS; + r_error.error = Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS; r_error.argument = 1; return Variant(); } else if (p_argcount == 1) { @@ -1813,7 +1830,7 @@ Variant GDScriptFunctionState::_signal_callback(const Variant **p_args, int p_ar Ref<GDScriptFunctionState> self = *p_args[p_argcount - 1]; if (self.is_null()) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.argument = p_argcount - 1; r_error.expected = Variant::OBJECT; return Variant(); @@ -1848,7 +1865,7 @@ Variant GDScriptFunctionState::resume(const Variant &p_arg) { } state.result = p_arg; - Variant::CallError err; + Callable::CallError err; Variant ret = function->call(NULL, NULL, 0, err, &state); bool completed = true; diff --git a/modules/gdscript/gdscript_function.h b/modules/gdscript/gdscript_function.h index ad95ebc543..34019e563d 100644 --- a/modules/gdscript/gdscript_function.h +++ b/modules/gdscript/gdscript_function.h @@ -77,8 +77,8 @@ struct GDScriptDataType { return false; } - Object *obj = p_variant.operator Object *(); - if (!obj || !ObjectDB::instance_validate(obj)) { + Object *obj = p_variant.get_validated_object(); + if (!obj) { return false; } @@ -100,8 +100,8 @@ struct GDScriptDataType { return false; } - Object *obj = p_variant.operator Object *(); - if (!obj || !ObjectDB::instance_validate(obj)) { + Object *obj = p_variant.get_validated_object(); + if (!obj) { return false; } @@ -265,8 +265,8 @@ private: List<StackDebug> stack_debug; - _FORCE_INLINE_ Variant *_get_variant(int p_address, GDScriptInstance *p_instance, GDScript *p_script, Variant &self, Variant *p_stack, String &r_error) const; - _FORCE_INLINE_ String _get_call_error(const Variant::CallError &p_err, const String &p_where, const Variant **argptrs) const; + _FORCE_INLINE_ Variant *_get_variant(int p_address, GDScriptInstance *p_instance, GDScript *p_script, Variant &self, Variant &static_ref, Variant *p_stack, String &r_error) const; + _FORCE_INLINE_ String _get_call_error(const Callable::CallError &p_err, const String &p_where, const Variant **argptrs) const; friend class GDScriptLanguage; @@ -339,7 +339,7 @@ public: return default_arguments[p_idx]; } - Variant call(GDScriptInstance *p_instance, const Variant **p_args, int p_argcount, Variant::CallError &r_err, CallState *p_state = NULL); + Variant call(GDScriptInstance *p_instance, const Variant **p_args, int p_argcount, Callable::CallError &r_err, CallState *p_state = NULL); _FORCE_INLINE_ MultiplayerAPI::RPCMode get_rpc_mode() const { return rpc_mode; } GDScriptFunction(); @@ -352,7 +352,7 @@ class GDScriptFunctionState : public Reference { friend class GDScriptFunction; GDScriptFunction *function; GDScriptFunction::CallState state; - Variant _signal_callback(const Variant **p_args, int p_argcount, Variant::CallError &r_error); + Variant _signal_callback(const Variant **p_args, int p_argcount, Callable::CallError &r_error); Ref<GDScriptFunctionState> first_state; protected: diff --git a/modules/gdscript/gdscript_functions.cpp b/modules/gdscript/gdscript_functions.cpp index 1a5087eb4d..aaa308f40f 100644 --- a/modules/gdscript/gdscript_functions.cpp +++ b/modules/gdscript/gdscript_functions.cpp @@ -139,32 +139,32 @@ const char *GDScriptFunctions::get_func_name(Function p_func) { return _names[p_func]; } -void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_count, Variant &r_ret, Variant::CallError &r_error) { +void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_count, Variant &r_ret, Callable::CallError &r_error) { - r_error.error = Variant::CallError::CALL_OK; + r_error.error = Callable::CallError::CALL_OK; #ifdef DEBUG_ENABLED -#define VALIDATE_ARG_COUNT(m_count) \ - if (p_arg_count < m_count) { \ - r_error.error = Variant::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS; \ - r_error.argument = m_count; \ - r_ret = Variant(); \ - return; \ - } \ - if (p_arg_count > m_count) { \ - r_error.error = Variant::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS; \ - r_error.argument = m_count; \ - r_ret = Variant(); \ - return; \ +#define VALIDATE_ARG_COUNT(m_count) \ + if (p_arg_count < m_count) { \ + r_error.error = Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS; \ + r_error.argument = m_count; \ + r_ret = Variant(); \ + return; \ + } \ + if (p_arg_count > m_count) { \ + r_error.error = Callable::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS; \ + r_error.argument = m_count; \ + r_ret = Variant(); \ + return; \ } -#define VALIDATE_ARG_NUM(m_arg) \ - if (!p_args[m_arg]->is_num()) { \ - r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; \ - r_error.argument = m_arg; \ - r_error.expected = Variant::REAL; \ - r_ret = Variant(); \ - return; \ +#define VALIDATE_ARG_NUM(m_arg) \ + if (!p_args[m_arg]->is_num()) { \ + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; \ + r_error.argument = m_arg; \ + r_error.expected = Variant::FLOAT; \ + r_ret = Variant(); \ + return; \ } #else @@ -272,15 +272,15 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_ int64_t i = *p_args[0]; r_ret = ABS(i); - } else if (p_args[0]->get_type() == Variant::REAL) { + } else if (p_args[0]->get_type() == Variant::FLOAT) { double r = *p_args[0]; r_ret = Math::abs(r); } else { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.argument = 0; - r_error.expected = Variant::REAL; + r_error.expected = Variant::FLOAT; r_ret = Variant(); } } break; @@ -290,15 +290,15 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_ int64_t i = *p_args[0]; r_ret = i < 0 ? -1 : (i > 0 ? +1 : 0); - } else if (p_args[0]->get_type() == Variant::REAL) { + } else if (p_args[0]->get_type() == Variant::FLOAT) { real_t r = *p_args[0]; r_ret = r < 0.0 ? -1.0 : (r > 0.0 ? +1.0 : 0.0); } else { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.argument = 0; - r_error.expected = Variant::REAL; + r_error.expected = Variant::FLOAT; r_ret = Variant(); } } break; @@ -360,12 +360,12 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_ VALIDATE_ARG_COUNT(3); VALIDATE_ARG_NUM(2); const double t = (double)*p_args[2]; - switch (p_args[0]->get_type() == p_args[1]->get_type() ? p_args[0]->get_type() : Variant::REAL) { + switch (p_args[0]->get_type() == p_args[1]->get_type() ? p_args[0]->get_type() : Variant::FLOAT) { case Variant::VECTOR2: { r_ret = ((Vector2)*p_args[0]).linear_interpolate((Vector2)*p_args[1], t); } break; case Variant::VECTOR3: { - r_ret = ((Vector3)*p_args[0]).linear_interpolate((Vector3)*p_args[1], t); + r_ret = (p_args[0]->operator Vector3()).linear_interpolate(p_args[1]->operator Vector3(), t); } break; case Variant::COLOR: { r_ret = ((Color)*p_args[0]).linear_interpolate((Color)*p_args[1], t); @@ -585,7 +585,7 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_ Ref<WeakRef> wref = memnew(WeakRef); r_ret = wref; } else { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.argument = 0; r_error.expected = Variant::OBJECT; r_ret = Variant(); @@ -596,7 +596,7 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_ VALIDATE_ARG_COUNT(2); if (p_args[0]->get_type() != Variant::OBJECT) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.argument = 0; r_error.expected = Variant::OBJECT; r_ret = Variant(); @@ -604,7 +604,7 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_ } if (p_args[1]->get_type() != Variant::STRING && p_args[1]->get_type() != Variant::NODE_PATH) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.argument = 1; r_error.expected = Variant::STRING; r_ret = Variant(); @@ -626,7 +626,7 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_ if (type < 0 || type >= Variant::VARIANT_MAX) { r_ret = RTR("Invalid type argument to convert(), use TYPE_* constants."); - r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.argument = 0; r_error.expected = Variant::INT; return; @@ -660,7 +660,7 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_ if (p_args[0]->get_type() != Variant::STRING) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.argument = 0; r_error.expected = Variant::STRING; r_ret = Variant(); @@ -671,7 +671,7 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_ if (str.length() != 1) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.argument = 0; r_error.expected = Variant::STRING; r_ret = RTR("Expected a string of length 1 (a character)."); @@ -683,7 +683,7 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_ } break; case TEXT_STR: { if (p_arg_count < 1) { - r_error.error = Variant::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS; + r_error.error = Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS; r_error.argument = 1; r_ret = Variant(); @@ -785,7 +785,7 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_ case PUSH_ERROR: { VALIDATE_ARG_COUNT(1); if (p_args[0]->get_type() != Variant::STRING) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.argument = 0; r_error.expected = Variant::STRING; r_ret = Variant(); @@ -799,7 +799,7 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_ case PUSH_WARNING: { VALIDATE_ARG_COUNT(1); if (p_args[0]->get_type() != Variant::STRING) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.argument = 0; r_error.expected = Variant::STRING; r_ret = Variant(); @@ -819,7 +819,7 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_ case STR_TO_VAR: { VALIDATE_ARG_COUNT(1); if (p_args[0]->get_type() != Variant::STRING) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.argument = 0; r_error.expected = Variant::STRING; r_ret = Variant(); @@ -837,17 +837,17 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_ case VAR_TO_BYTES: { bool full_objects = false; if (p_arg_count < 1) { - r_error.error = Variant::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS; + r_error.error = Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS; r_error.argument = 1; r_ret = Variant(); return; } else if (p_arg_count > 2) { - r_error.error = Variant::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS; + r_error.error = Callable::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS; r_error.argument = 2; r_ret = Variant(); } else if (p_arg_count == 2) { if (p_args[1]->get_type() != Variant::BOOL) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.argument = 1; r_error.expected = Variant::BOOL; r_ret = Variant(); @@ -856,11 +856,11 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_ full_objects = *p_args[1]; } - PoolByteArray barr; + PackedByteArray barr; int len; Error err = encode_variant(*p_args[0], NULL, len, full_objects); if (err) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.argument = 0; r_error.expected = Variant::NIL; r_ret = "Unexpected error encoding variable to bytes, likely unserializable type found (Object or RID)."; @@ -869,25 +869,25 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_ barr.resize(len); { - PoolByteArray::Write w = barr.write(); - encode_variant(*p_args[0], w.ptr(), len, full_objects); + uint8_t *w = barr.ptrw(); + encode_variant(*p_args[0], w, len, full_objects); } r_ret = barr; } break; case BYTES_TO_VAR: { bool allow_objects = false; if (p_arg_count < 1) { - r_error.error = Variant::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS; + r_error.error = Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS; r_error.argument = 1; r_ret = Variant(); return; } else if (p_arg_count > 2) { - r_error.error = Variant::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS; + r_error.error = Callable::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS; r_error.argument = 2; r_ret = Variant(); } else if (p_arg_count == 2) { if (p_args[1]->get_type() != Variant::BOOL) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.argument = 1; r_error.expected = Variant::BOOL; r_ret = Variant(); @@ -896,24 +896,24 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_ allow_objects = *p_args[1]; } - if (p_args[0]->get_type() != Variant::POOL_BYTE_ARRAY) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; + if (p_args[0]->get_type() != Variant::PACKED_BYTE_ARRAY) { + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.argument = 1; - r_error.expected = Variant::POOL_BYTE_ARRAY; + r_error.expected = Variant::PACKED_BYTE_ARRAY; r_ret = Variant(); return; } - PoolByteArray varr = *p_args[0]; + PackedByteArray varr = *p_args[0]; Variant ret; { - PoolByteArray::Read r = varr.read(); - Error err = decode_variant(ret, r.ptr(), varr.size(), NULL, allow_objects); + const uint8_t *r = varr.ptr(); + Error err = decode_variant(ret, r, varr.size(), NULL, allow_objects); if (err != OK) { r_ret = RTR("Not enough bytes for decoding bytes, or invalid format."); - r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.argument = 0; - r_error.expected = Variant::POOL_BYTE_ARRAY; + r_error.expected = Variant::PACKED_BYTE_ARRAY; return; } } @@ -927,7 +927,7 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_ case 0: { - r_error.error = Variant::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS; + r_error.error = Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS; r_error.argument = 1; r_ret = Variant(); @@ -943,7 +943,7 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_ } Error err = arr.resize(count); if (err != OK) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD; r_ret = Variant(); return; } @@ -969,7 +969,7 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_ } Error err = arr.resize(to - from); if (err != OK) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD; r_ret = Variant(); return; } @@ -989,7 +989,7 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_ if (incr == 0) { r_ret = RTR("Step argument is zero!"); - r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD; return; } @@ -1016,7 +1016,7 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_ Error err = arr.resize(count); if (err != OK) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD; r_ret = Variant(); return; } @@ -1038,7 +1038,7 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_ } break; default: { - r_error.error = Variant::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS; + r_error.error = Callable::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS; r_error.argument = 3; r_ret = Variant(); @@ -1049,7 +1049,7 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_ case RESOURCE_LOAD: { VALIDATE_ARG_COUNT(1); if (p_args[0]->get_type() != Variant::STRING) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.argument = 0; r_error.expected = Variant::STRING; r_ret = Variant(); @@ -1065,7 +1065,7 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_ if (p_args[0]->get_type() == Variant::NIL) { r_ret = Variant(); } else if (p_args[0]->get_type() != Variant::OBJECT) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.argument = 0; r_ret = Variant(); } else { @@ -1076,7 +1076,7 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_ } else if (!obj->get_script_instance() || obj->get_script_instance()->get_language() != GDScriptLanguage::get_singleton()) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.argument = 0; r_error.expected = Variant::DICTIONARY; r_ret = RTR("Not a script with an instance"); @@ -1087,7 +1087,7 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_ Ref<GDScript> base = ins->get_script(); if (base.is_null()) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.argument = 0; r_error.expected = Variant::DICTIONARY; r_ret = RTR("Not based on a script"); @@ -1105,7 +1105,7 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_ sname.invert(); if (!p->path.is_resource_file()) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.argument = 0; r_error.expected = Variant::DICTIONARY; r_ret = Variant(); @@ -1137,7 +1137,7 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_ if (p_args[0]->get_type() != Variant::DICTIONARY) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.argument = 0; r_error.expected = Variant::DICTIONARY; r_ret = Variant(); @@ -1149,7 +1149,7 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_ if (!d.has("@path")) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.argument = 0; r_error.expected = Variant::OBJECT; r_ret = RTR("Invalid instance dictionary format (missing @path)"); @@ -1160,7 +1160,7 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_ Ref<Script> scr = ResourceLoader::load(d["@path"]); if (!scr.is_valid()) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.argument = 0; r_error.expected = Variant::OBJECT; r_ret = RTR("Invalid instance dictionary format (can't load script at @path)"); @@ -1171,7 +1171,7 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_ if (!gdscr.is_valid()) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.argument = 0; r_error.expected = Variant::OBJECT; r_ret = Variant(); @@ -1189,7 +1189,7 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_ gdscr = gdscr->subclasses[sub.get_name(i)]; if (!gdscr.is_valid()) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.argument = 0; r_error.expected = Variant::OBJECT; r_ret = Variant(); @@ -1215,7 +1215,7 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_ VALIDATE_ARG_COUNT(1); if (p_args[0]->get_type() != Variant::STRING) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.argument = 0; r_error.expected = Variant::STRING; r_ret = Variant(); @@ -1239,7 +1239,7 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_ VALIDATE_ARG_COUNT(1); if (p_args[0]->get_type() != Variant::STRING) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.argument = 0; r_error.expected = Variant::STRING; r_ret = Variant(); @@ -1271,14 +1271,14 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_ case COLOR8: { if (p_arg_count < 3) { - r_error.error = Variant::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS; + r_error.error = Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS; r_error.argument = 3; r_ret = Variant(); return; } if (p_arg_count > 4) { - r_error.error = Variant::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS; + r_error.error = Callable::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS; r_error.argument = 4; r_ret = Variant(); @@ -1302,21 +1302,21 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_ case COLORN: { if (p_arg_count < 1) { - r_error.error = Variant::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS; + r_error.error = Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS; r_error.argument = 1; r_ret = Variant(); return; } if (p_arg_count > 2) { - r_error.error = Variant::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS; + r_error.error = Callable::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS; r_error.argument = 2; r_ret = Variant(); return; } if (p_args[0]->get_type() != Variant::STRING) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.argument = 0; r_ret = Variant(); } else { @@ -1359,8 +1359,8 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_ case INSTANCE_FROM_ID: { VALIDATE_ARG_COUNT(1); - if (p_args[0]->get_type() != Variant::INT && p_args[0]->get_type() != Variant::REAL) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; + if (p_args[0]->get_type() != Variant::INT && p_args[0]->get_type() != Variant::FLOAT) { + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.argument = 0; r_error.expected = Variant::INT; r_ret = Variant(); @@ -1390,43 +1390,53 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_ Array d = *p_args[0]; r_ret = d.size(); } break; - case Variant::POOL_BYTE_ARRAY: { + case Variant::PACKED_BYTE_ARRAY: { - PoolVector<uint8_t> d = *p_args[0]; + Vector<uint8_t> d = *p_args[0]; r_ret = d.size(); } break; - case Variant::POOL_INT_ARRAY: { + case Variant::PACKED_INT32_ARRAY: { - PoolVector<int> d = *p_args[0]; + Vector<int32_t> d = *p_args[0]; r_ret = d.size(); } break; - case Variant::POOL_REAL_ARRAY: { + case Variant::PACKED_INT64_ARRAY: { - PoolVector<real_t> d = *p_args[0]; + Vector<int64_t> d = *p_args[0]; r_ret = d.size(); } break; - case Variant::POOL_STRING_ARRAY: { + case Variant::PACKED_FLOAT32_ARRAY: { - PoolVector<String> d = *p_args[0]; + Vector<float> d = *p_args[0]; r_ret = d.size(); } break; - case Variant::POOL_VECTOR2_ARRAY: { + case Variant::PACKED_FLOAT64_ARRAY: { - PoolVector<Vector2> d = *p_args[0]; + Vector<double> d = *p_args[0]; r_ret = d.size(); } break; - case Variant::POOL_VECTOR3_ARRAY: { + case Variant::PACKED_STRING_ARRAY: { - PoolVector<Vector3> d = *p_args[0]; + Vector<String> d = *p_args[0]; r_ret = d.size(); } break; - case Variant::POOL_COLOR_ARRAY: { + case Variant::PACKED_VECTOR2_ARRAY: { - PoolVector<Color> d = *p_args[0]; + Vector<Vector2> d = *p_args[0]; + r_ret = d.size(); + } break; + case Variant::PACKED_VECTOR3_ARRAY: { + + Vector<Vector3> d = *p_args[0]; + r_ret = d.size(); + } break; + case Variant::PACKED_COLOR_ARRAY: { + + Vector<Color> d = *p_args[0]; r_ret = d.size(); } break; default: { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.argument = 0; r_error.expected = Variant::OBJECT; r_ret = Variant(); @@ -1441,8 +1451,8 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_ if (p_args[0]->get_type() != Variant::OBJECT) { r_ret = false; } else { - Object *obj = *p_args[0]; - r_ret = ObjectDB::instance_validate(obj); + Object *obj = p_args[0]->get_validated_object(); + r_ret = obj != nullptr; } } break; @@ -1530,69 +1540,69 @@ MethodInfo GDScriptFunctions::get_info(Function p_func) { switch (p_func) { case MATH_SIN: { - MethodInfo mi("sin", PropertyInfo(Variant::REAL, "s")); - mi.return_val.type = Variant::REAL; + MethodInfo mi("sin", PropertyInfo(Variant::FLOAT, "s")); + mi.return_val.type = Variant::FLOAT; return mi; } break; case MATH_COS: { - MethodInfo mi("cos", PropertyInfo(Variant::REAL, "s")); - mi.return_val.type = Variant::REAL; + MethodInfo mi("cos", PropertyInfo(Variant::FLOAT, "s")); + mi.return_val.type = Variant::FLOAT; return mi; } break; case MATH_TAN: { - MethodInfo mi("tan", PropertyInfo(Variant::REAL, "s")); - mi.return_val.type = Variant::REAL; + MethodInfo mi("tan", PropertyInfo(Variant::FLOAT, "s")); + mi.return_val.type = Variant::FLOAT; return mi; } break; case MATH_SINH: { - MethodInfo mi("sinh", PropertyInfo(Variant::REAL, "s")); - mi.return_val.type = Variant::REAL; + MethodInfo mi("sinh", PropertyInfo(Variant::FLOAT, "s")); + mi.return_val.type = Variant::FLOAT; return mi; } break; case MATH_COSH: { - MethodInfo mi("cosh", PropertyInfo(Variant::REAL, "s")); - mi.return_val.type = Variant::REAL; + MethodInfo mi("cosh", PropertyInfo(Variant::FLOAT, "s")); + mi.return_val.type = Variant::FLOAT; return mi; } break; case MATH_TANH: { - MethodInfo mi("tanh", PropertyInfo(Variant::REAL, "s")); - mi.return_val.type = Variant::REAL; + MethodInfo mi("tanh", PropertyInfo(Variant::FLOAT, "s")); + mi.return_val.type = Variant::FLOAT; return mi; } break; case MATH_ASIN: { - MethodInfo mi("asin", PropertyInfo(Variant::REAL, "s")); - mi.return_val.type = Variant::REAL; + MethodInfo mi("asin", PropertyInfo(Variant::FLOAT, "s")); + mi.return_val.type = Variant::FLOAT; return mi; } break; case MATH_ACOS: { - MethodInfo mi("acos", PropertyInfo(Variant::REAL, "s")); - mi.return_val.type = Variant::REAL; + MethodInfo mi("acos", PropertyInfo(Variant::FLOAT, "s")); + mi.return_val.type = Variant::FLOAT; return mi; } break; case MATH_ATAN: { - MethodInfo mi("atan", PropertyInfo(Variant::REAL, "s")); - mi.return_val.type = Variant::REAL; + MethodInfo mi("atan", PropertyInfo(Variant::FLOAT, "s")); + mi.return_val.type = Variant::FLOAT; return mi; } break; case MATH_ATAN2: { - MethodInfo mi("atan2", PropertyInfo(Variant::REAL, "y"), PropertyInfo(Variant::REAL, "x")); - mi.return_val.type = Variant::REAL; + MethodInfo mi("atan2", PropertyInfo(Variant::FLOAT, "y"), PropertyInfo(Variant::FLOAT, "x")); + mi.return_val.type = Variant::FLOAT; return mi; } break; case MATH_SQRT: { - MethodInfo mi("sqrt", PropertyInfo(Variant::REAL, "s")); - mi.return_val.type = Variant::REAL; + MethodInfo mi("sqrt", PropertyInfo(Variant::FLOAT, "s")); + mi.return_val.type = Variant::FLOAT; return mi; } break; case MATH_FMOD: { - MethodInfo mi("fmod", PropertyInfo(Variant::REAL, "a"), PropertyInfo(Variant::REAL, "b")); - mi.return_val.type = Variant::REAL; + MethodInfo mi("fmod", PropertyInfo(Variant::FLOAT, "a"), PropertyInfo(Variant::FLOAT, "b")); + mi.return_val.type = Variant::FLOAT; return mi; } break; case MATH_FPOSMOD: { - MethodInfo mi("fposmod", PropertyInfo(Variant::REAL, "a"), PropertyInfo(Variant::REAL, "b")); - mi.return_val.type = Variant::REAL; + MethodInfo mi("fposmod", PropertyInfo(Variant::FLOAT, "a"), PropertyInfo(Variant::FLOAT, "b")); + mi.return_val.type = Variant::FLOAT; return mi; } break; case MATH_POSMOD: { @@ -1601,114 +1611,114 @@ MethodInfo GDScriptFunctions::get_info(Function p_func) { return mi; } break; case MATH_FLOOR: { - MethodInfo mi("floor", PropertyInfo(Variant::REAL, "s")); - mi.return_val.type = Variant::REAL; + MethodInfo mi("floor", PropertyInfo(Variant::FLOAT, "s")); + mi.return_val.type = Variant::FLOAT; return mi; } break; case MATH_CEIL: { - MethodInfo mi("ceil", PropertyInfo(Variant::REAL, "s")); - mi.return_val.type = Variant::REAL; + MethodInfo mi("ceil", PropertyInfo(Variant::FLOAT, "s")); + mi.return_val.type = Variant::FLOAT; return mi; } break; case MATH_ROUND: { - MethodInfo mi("round", PropertyInfo(Variant::REAL, "s")); - mi.return_val.type = Variant::REAL; + MethodInfo mi("round", PropertyInfo(Variant::FLOAT, "s")); + mi.return_val.type = Variant::FLOAT; return mi; } break; case MATH_ABS: { - MethodInfo mi("abs", PropertyInfo(Variant::REAL, "s")); - mi.return_val.type = Variant::REAL; + MethodInfo mi("abs", PropertyInfo(Variant::FLOAT, "s")); + mi.return_val.type = Variant::FLOAT; return mi; } break; case MATH_SIGN: { - MethodInfo mi("sign", PropertyInfo(Variant::REAL, "s")); - mi.return_val.type = Variant::REAL; + MethodInfo mi("sign", PropertyInfo(Variant::FLOAT, "s")); + mi.return_val.type = Variant::FLOAT; return mi; } break; case MATH_POW: { - MethodInfo mi("pow", PropertyInfo(Variant::REAL, "base"), PropertyInfo(Variant::REAL, "exp")); - mi.return_val.type = Variant::REAL; + MethodInfo mi("pow", PropertyInfo(Variant::FLOAT, "base"), PropertyInfo(Variant::FLOAT, "exp")); + mi.return_val.type = Variant::FLOAT; return mi; } break; case MATH_LOG: { - MethodInfo mi("log", PropertyInfo(Variant::REAL, "s")); - mi.return_val.type = Variant::REAL; + MethodInfo mi("log", PropertyInfo(Variant::FLOAT, "s")); + mi.return_val.type = Variant::FLOAT; return mi; } break; case MATH_EXP: { - MethodInfo mi("exp", PropertyInfo(Variant::REAL, "s")); - mi.return_val.type = Variant::REAL; + MethodInfo mi("exp", PropertyInfo(Variant::FLOAT, "s")); + mi.return_val.type = Variant::FLOAT; return mi; } break; case MATH_ISNAN: { - MethodInfo mi("is_nan", PropertyInfo(Variant::REAL, "s")); + MethodInfo mi("is_nan", PropertyInfo(Variant::FLOAT, "s")); mi.return_val.type = Variant::BOOL; return mi; } break; case MATH_ISINF: { - MethodInfo mi("is_inf", PropertyInfo(Variant::REAL, "s")); + MethodInfo mi("is_inf", PropertyInfo(Variant::FLOAT, "s")); mi.return_val.type = Variant::BOOL; return mi; } break; case MATH_ISEQUALAPPROX: { - MethodInfo mi("is_equal_approx", PropertyInfo(Variant::REAL, "a"), PropertyInfo(Variant::REAL, "b")); + MethodInfo mi("is_equal_approx", PropertyInfo(Variant::FLOAT, "a"), PropertyInfo(Variant::FLOAT, "b")); mi.return_val.type = Variant::BOOL; return mi; } break; case MATH_ISZEROAPPROX: { - MethodInfo mi("is_zero_approx", PropertyInfo(Variant::REAL, "s")); + MethodInfo mi("is_zero_approx", PropertyInfo(Variant::FLOAT, "s")); mi.return_val.type = Variant::BOOL; return mi; } break; case MATH_EASE: { - MethodInfo mi("ease", PropertyInfo(Variant::REAL, "s"), PropertyInfo(Variant::REAL, "curve")); - mi.return_val.type = Variant::REAL; + MethodInfo mi("ease", PropertyInfo(Variant::FLOAT, "s"), PropertyInfo(Variant::FLOAT, "curve")); + mi.return_val.type = Variant::FLOAT; return mi; } break; case MATH_STEP_DECIMALS: { - MethodInfo mi("step_decimals", PropertyInfo(Variant::REAL, "step")); + MethodInfo mi("step_decimals", PropertyInfo(Variant::FLOAT, "step")); mi.return_val.type = Variant::INT; return mi; } break; case MATH_STEPIFY: { - MethodInfo mi("stepify", PropertyInfo(Variant::REAL, "s"), PropertyInfo(Variant::REAL, "step")); - mi.return_val.type = Variant::REAL; + MethodInfo mi("stepify", PropertyInfo(Variant::FLOAT, "s"), PropertyInfo(Variant::FLOAT, "step")); + mi.return_val.type = Variant::FLOAT; return mi; } break; case MATH_LERP: { - MethodInfo mi("lerp", PropertyInfo(Variant::NIL, "from"), PropertyInfo(Variant::NIL, "to"), PropertyInfo(Variant::REAL, "weight")); + MethodInfo mi("lerp", PropertyInfo(Variant::NIL, "from"), PropertyInfo(Variant::NIL, "to"), PropertyInfo(Variant::FLOAT, "weight")); mi.return_val.type = Variant::NIL; mi.return_val.usage |= PROPERTY_USAGE_NIL_IS_VARIANT; return mi; } break; case MATH_LERP_ANGLE: { - MethodInfo mi("lerp_angle", PropertyInfo(Variant::REAL, "from"), PropertyInfo(Variant::REAL, "to"), PropertyInfo(Variant::REAL, "weight")); - mi.return_val.type = Variant::REAL; + MethodInfo mi("lerp_angle", PropertyInfo(Variant::FLOAT, "from"), PropertyInfo(Variant::FLOAT, "to"), PropertyInfo(Variant::FLOAT, "weight")); + mi.return_val.type = Variant::FLOAT; return mi; } break; case MATH_INVERSE_LERP: { - MethodInfo mi("inverse_lerp", PropertyInfo(Variant::REAL, "from"), PropertyInfo(Variant::REAL, "to"), PropertyInfo(Variant::REAL, "weight")); - mi.return_val.type = Variant::REAL; + MethodInfo mi("inverse_lerp", PropertyInfo(Variant::FLOAT, "from"), PropertyInfo(Variant::FLOAT, "to"), PropertyInfo(Variant::FLOAT, "weight")); + mi.return_val.type = Variant::FLOAT; return mi; } break; case MATH_RANGE_LERP: { - MethodInfo mi("range_lerp", PropertyInfo(Variant::REAL, "value"), PropertyInfo(Variant::REAL, "istart"), PropertyInfo(Variant::REAL, "istop"), PropertyInfo(Variant::REAL, "ostart"), PropertyInfo(Variant::REAL, "ostop")); - mi.return_val.type = Variant::REAL; + MethodInfo mi("range_lerp", PropertyInfo(Variant::FLOAT, "value"), PropertyInfo(Variant::FLOAT, "istart"), PropertyInfo(Variant::FLOAT, "istop"), PropertyInfo(Variant::FLOAT, "ostart"), PropertyInfo(Variant::FLOAT, "ostop")); + mi.return_val.type = Variant::FLOAT; return mi; } break; case MATH_SMOOTHSTEP: { - MethodInfo mi("smoothstep", PropertyInfo(Variant::REAL, "from"), PropertyInfo(Variant::REAL, "to"), PropertyInfo(Variant::REAL, "weight")); - mi.return_val.type = Variant::REAL; + MethodInfo mi("smoothstep", PropertyInfo(Variant::FLOAT, "from"), PropertyInfo(Variant::FLOAT, "to"), PropertyInfo(Variant::FLOAT, "weight")); + mi.return_val.type = Variant::FLOAT; return mi; } break; case MATH_MOVE_TOWARD: { - MethodInfo mi("move_toward", PropertyInfo(Variant::REAL, "from"), PropertyInfo(Variant::REAL, "to"), PropertyInfo(Variant::REAL, "delta")); - mi.return_val.type = Variant::REAL; + MethodInfo mi("move_toward", PropertyInfo(Variant::FLOAT, "from"), PropertyInfo(Variant::FLOAT, "to"), PropertyInfo(Variant::FLOAT, "delta")); + mi.return_val.type = Variant::FLOAT; return mi; } break; case MATH_DECTIME: { - MethodInfo mi("dectime", PropertyInfo(Variant::REAL, "value"), PropertyInfo(Variant::REAL, "amount"), PropertyInfo(Variant::REAL, "step")); - mi.return_val.type = Variant::REAL; + MethodInfo mi("dectime", PropertyInfo(Variant::FLOAT, "value"), PropertyInfo(Variant::FLOAT, "amount"), PropertyInfo(Variant::FLOAT, "step")); + mi.return_val.type = Variant::FLOAT; return mi; } break; case MATH_RANDOMIZE: { @@ -1723,12 +1733,12 @@ MethodInfo GDScriptFunctions::get_info(Function p_func) { } break; case MATH_RANDF: { MethodInfo mi("randf"); - mi.return_val.type = Variant::REAL; + mi.return_val.type = Variant::FLOAT; return mi; } break; case MATH_RANDOM: { - MethodInfo mi("rand_range", PropertyInfo(Variant::REAL, "from"), PropertyInfo(Variant::REAL, "to")); - mi.return_val.type = Variant::REAL; + MethodInfo mi("rand_range", PropertyInfo(Variant::FLOAT, "from"), PropertyInfo(Variant::FLOAT, "to")); + mi.return_val.type = Variant::FLOAT; return mi; } break; case MATH_SEED: { @@ -1742,32 +1752,32 @@ MethodInfo GDScriptFunctions::get_info(Function p_func) { return mi; } break; case MATH_DEG2RAD: { - MethodInfo mi("deg2rad", PropertyInfo(Variant::REAL, "deg")); - mi.return_val.type = Variant::REAL; + MethodInfo mi("deg2rad", PropertyInfo(Variant::FLOAT, "deg")); + mi.return_val.type = Variant::FLOAT; return mi; } break; case MATH_RAD2DEG: { - MethodInfo mi("rad2deg", PropertyInfo(Variant::REAL, "rad")); - mi.return_val.type = Variant::REAL; + MethodInfo mi("rad2deg", PropertyInfo(Variant::FLOAT, "rad")); + mi.return_val.type = Variant::FLOAT; return mi; } break; case MATH_LINEAR2DB: { - MethodInfo mi("linear2db", PropertyInfo(Variant::REAL, "nrg")); - mi.return_val.type = Variant::REAL; + MethodInfo mi("linear2db", PropertyInfo(Variant::FLOAT, "nrg")); + mi.return_val.type = Variant::FLOAT; return mi; } break; case MATH_DB2LINEAR: { - MethodInfo mi("db2linear", PropertyInfo(Variant::REAL, "db")); - mi.return_val.type = Variant::REAL; + MethodInfo mi("db2linear", PropertyInfo(Variant::FLOAT, "db")); + mi.return_val.type = Variant::FLOAT; return mi; } break; case MATH_POLAR2CARTESIAN: { - MethodInfo mi("polar2cartesian", PropertyInfo(Variant::REAL, "r"), PropertyInfo(Variant::REAL, "th")); + MethodInfo mi("polar2cartesian", PropertyInfo(Variant::FLOAT, "r"), PropertyInfo(Variant::FLOAT, "th")); mi.return_val.type = Variant::VECTOR2; return mi; } break; case MATH_CARTESIAN2POLAR: { - MethodInfo mi("cartesian2polar", PropertyInfo(Variant::REAL, "x"), PropertyInfo(Variant::REAL, "y")); + MethodInfo mi("cartesian2polar", PropertyInfo(Variant::FLOAT, "x"), PropertyInfo(Variant::FLOAT, "y")); mi.return_val.type = Variant::VECTOR2; return mi; } break; @@ -1777,24 +1787,24 @@ MethodInfo GDScriptFunctions::get_info(Function p_func) { return mi; } break; case MATH_WRAPF: { - MethodInfo mi("wrapf", PropertyInfo(Variant::REAL, "value"), PropertyInfo(Variant::REAL, "min"), PropertyInfo(Variant::REAL, "max")); - mi.return_val.type = Variant::REAL; + MethodInfo mi("wrapf", PropertyInfo(Variant::FLOAT, "value"), PropertyInfo(Variant::FLOAT, "min"), PropertyInfo(Variant::FLOAT, "max")); + mi.return_val.type = Variant::FLOAT; return mi; } break; case LOGIC_MAX: { - MethodInfo mi("max", PropertyInfo(Variant::REAL, "a"), PropertyInfo(Variant::REAL, "b")); - mi.return_val.type = Variant::REAL; + MethodInfo mi("max", PropertyInfo(Variant::FLOAT, "a"), PropertyInfo(Variant::FLOAT, "b")); + mi.return_val.type = Variant::FLOAT; return mi; } break; case LOGIC_MIN: { - MethodInfo mi("min", PropertyInfo(Variant::REAL, "a"), PropertyInfo(Variant::REAL, "b")); - mi.return_val.type = Variant::REAL; + MethodInfo mi("min", PropertyInfo(Variant::FLOAT, "a"), PropertyInfo(Variant::FLOAT, "b")); + mi.return_val.type = Variant::FLOAT; return mi; } break; case LOGIC_CLAMP: { - MethodInfo mi("clamp", PropertyInfo(Variant::REAL, "value"), PropertyInfo(Variant::REAL, "min"), PropertyInfo(Variant::REAL, "max")); - mi.return_val.type = Variant::REAL; + MethodInfo mi("clamp", PropertyInfo(Variant::FLOAT, "value"), PropertyInfo(Variant::FLOAT, "min"), PropertyInfo(Variant::FLOAT, "max")); + mi.return_val.type = Variant::FLOAT; return mi; } break; case LOGIC_NEAREST_PO2: { @@ -1941,12 +1951,12 @@ MethodInfo GDScriptFunctions::get_info(Function p_func) { MethodInfo mi("var2bytes", PropertyInfo(Variant::NIL, "var", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_NIL_IS_VARIANT), PropertyInfo(Variant::BOOL, "full_objects")); mi.default_arguments.push_back(false); - mi.return_val.type = Variant::POOL_BYTE_ARRAY; + mi.return_val.type = Variant::PACKED_BYTE_ARRAY; return mi; } break; case BYTES_TO_VAR: { - MethodInfo mi(Variant::NIL, "bytes2var", PropertyInfo(Variant::POOL_BYTE_ARRAY, "bytes"), PropertyInfo(Variant::BOOL, "allow_objects")); + MethodInfo mi(Variant::NIL, "bytes2var", PropertyInfo(Variant::PACKED_BYTE_ARRAY, "bytes"), PropertyInfo(Variant::BOOL, "allow_objects")); mi.default_arguments.push_back(false); mi.return_val.type = Variant::NIL; mi.return_val.usage |= PROPERTY_USAGE_NIL_IS_VARIANT; @@ -2012,7 +2022,7 @@ MethodInfo GDScriptFunctions::get_info(Function p_func) { } break; case COLORN: { - MethodInfo mi("ColorN", PropertyInfo(Variant::STRING, "name"), PropertyInfo(Variant::REAL, "alpha")); + MethodInfo mi("ColorN", PropertyInfo(Variant::STRING, "name"), PropertyInfo(Variant::FLOAT, "alpha")); mi.default_arguments.push_back(1.0f); mi.return_val.type = Variant::COLOR; return mi; diff --git a/modules/gdscript/gdscript_functions.h b/modules/gdscript/gdscript_functions.h index 8b97194ed6..2c6dc02913 100644 --- a/modules/gdscript/gdscript_functions.h +++ b/modules/gdscript/gdscript_functions.h @@ -129,7 +129,7 @@ public: }; static const char *get_func_name(Function p_func); - static void call(Function p_func, const Variant **p_args, int p_arg_count, Variant &r_ret, Variant::CallError &r_error); + static void call(Function p_func, const Variant **p_args, int p_arg_count, Variant &r_ret, Callable::CallError &r_error); static bool is_deterministic(Function p_func); static MethodInfo get_info(Function p_func); }; diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp index fae6fbbb0c..0382944efd 100644 --- a/modules/gdscript/gdscript_parser.cpp +++ b/modules/gdscript/gdscript_parser.cpp @@ -793,7 +793,7 @@ GDScriptParser::Node *GDScriptParser::_parse_expression(Node *p_parent, bool p_s } _add_warning(GDScriptWarning::UNASSIGNED_VARIABLE_OP_ASSIGN, -1, identifier.operator String()); } - FALLTHROUGH; + [[fallthrough]]; } case GDScriptTokenizer::TK_OP_ASSIGN: { lv->assignments += 1; @@ -1739,7 +1739,7 @@ GDScriptParser::Node *GDScriptParser::_reduce_expression(Node *p_node, bool p_to vptr = (const Variant **)&ptrs[0]; } - Variant::CallError ce; + Callable::CallError ce; Variant v; if (op->arguments[0]->type == Node::TYPE_TYPE) { @@ -1751,7 +1751,7 @@ GDScriptParser::Node *GDScriptParser::_reduce_expression(Node *p_node, bool p_to GDScriptFunctions::call(func, vptr, ptrs.size(), v, ce); } - if (ce.error != Variant::CallError::CALL_OK) { + if (ce.error != Callable::CallError::CALL_OK) { String errwhere; if (op->arguments[0]->type == Node::TYPE_TYPE) { @@ -1765,16 +1765,16 @@ GDScriptParser::Node *GDScriptParser::_reduce_expression(Node *p_node, bool p_to switch (ce.error) { - case Variant::CallError::CALL_ERROR_INVALID_ARGUMENT: { + case Callable::CallError::CALL_ERROR_INVALID_ARGUMENT: { _set_error("Invalid argument (#" + itos(ce.argument + 1) + ") for " + errwhere + "."); } break; - case Variant::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS: { + case Callable::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS: { _set_error("Too many arguments for " + errwhere + "."); } break; - case Variant::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS: { + case Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS: { _set_error("Too few arguments for " + errwhere + "."); } break; @@ -2766,13 +2766,12 @@ void GDScriptParser::_parse_block(BlockNode *p_block, bool p_static) { } #endif // DEBUG_ENABLED switch (token) { - case GDScriptTokenizer::TK_EOF: + case GDScriptTokenizer::TK_EOF: { p_block->end_line = tokenizer->get_token_line(); + return; // End of file! + } break; case GDScriptTokenizer::TK_ERROR: { - return; //go back - - //end of file! - + return; } break; case GDScriptTokenizer::TK_NEWLINE: { @@ -3109,7 +3108,7 @@ void GDScriptParser::_parse_block(BlockNode *p_block, bool p_static) { args.push_back(op->arguments[i]); if (constant && op->arguments[i]->type == Node::TYPE_CONSTANT) { ConstantNode *c = static_cast<ConstantNode *>(op->arguments[i]); - if (c->value.get_type() == Variant::REAL || c->value.get_type() == Variant::INT) { + if (c->value.get_type() == Variant::FLOAT || c->value.get_type() == Variant::INT) { constants.push_back(c->value); constant = true; } @@ -3525,11 +3524,12 @@ void GDScriptParser::_parse_class(ClassNode *p_class) { case GDScriptTokenizer::TK_CURSOR: { tokenizer->advance(); } break; - case GDScriptTokenizer::TK_EOF: + case GDScriptTokenizer::TK_EOF: { p_class->end_line = tokenizer->get_token_line(); + return; // End of file! + } break; case GDScriptTokenizer::TK_ERROR: { - return; //go back - //end of file! + return; // Go back. } break; case GDScriptTokenizer::TK_NEWLINE: { if (!_parse_newline()) { @@ -3719,7 +3719,7 @@ void GDScriptParser::_parse_class(ClassNode *p_class) { return; } - FALLTHROUGH; + [[fallthrough]]; } case GDScriptTokenizer::TK_PR_FUNCTION: { @@ -4220,9 +4220,9 @@ void GDScriptParser::_parse_class(ClassNode *p_class) { break; } - FALLTHROUGH; + [[fallthrough]]; } - case Variant::REAL: { + case Variant::FLOAT: { if (tokenizer->get_token() == GDScriptTokenizer::TK_IDENTIFIER && tokenizer->get_token_identifier() == "EASE") { current_export.hint = PROPERTY_HINT_EXP_EASING; @@ -4809,7 +4809,7 @@ void GDScriptParser::_parse_class(ClassNode *p_class) { } #ifdef TOOLS_ENABLED - Variant::CallError ce; + Callable::CallError ce; member.default_value = Variant::construct(member._export.type, NULL, 0, ce); #endif @@ -4878,7 +4878,7 @@ void GDScriptParser::_parse_class(ClassNode *p_class) { if (cn->value.get_type() != Variant::NIL) { if (member._export.type != Variant::NIL && cn->value.get_type() != member._export.type) { if (Variant::can_convert(cn->value.get_type(), member._export.type)) { - Variant::CallError err; + Callable::CallError err; const Variant *args = &cn->value; cn->value = Variant::construct(member._export.type, &args, 1, err); } else { @@ -5489,7 +5489,7 @@ String GDScriptParser::DataType::to_string() const { if (!gds_class.empty()) { return gds_class; } - FALLTHROUGH; + [[fallthrough]]; } case SCRIPT: { if (is_meta_type) { @@ -5933,9 +5933,9 @@ GDScriptParser::DataType GDScriptParser::_get_operation_type(const Variant::Oper a_ref.instance(); a = a_ref; } else { - Variant::CallError err; + Callable::CallError err; a = Variant::construct(a_type, NULL, 0, err); - if (err.error != Variant::CallError::CALL_OK) { + if (err.error != Callable::CallError::CALL_OK) { r_valid = false; return DataType(); } @@ -5946,19 +5946,19 @@ GDScriptParser::DataType GDScriptParser::_get_operation_type(const Variant::Oper b_ref.instance(); b = b_ref; } else { - Variant::CallError err; + Callable::CallError err; b = Variant::construct(b_type, NULL, 0, err); - if (err.error != Variant::CallError::CALL_OK) { + if (err.error != Callable::CallError::CALL_OK) { r_valid = false; return DataType(); } } // Avoid division by zero - if (a_type == Variant::INT || a_type == Variant::REAL) { + if (a_type == Variant::INT || a_type == Variant::FLOAT) { Variant::evaluate(Variant::OP_ADD, a, 1, a, r_valid); } - if (b_type == Variant::INT || b_type == Variant::REAL) { + if (b_type == Variant::INT || b_type == Variant::FLOAT) { Variant::evaluate(Variant::OP_ADD, b, 1, b, r_valid); } if (a_type == Variant::STRING && b_type != Variant::ARRAY) { @@ -6218,7 +6218,7 @@ GDScriptParser::Node *GDScriptParser::_get_default_value_for_type(const DataType result = alloc_node<DictionaryNode>(); } else { ConstantNode *c = alloc_node<ConstantNode>(); - Variant::CallError err; + Callable::CallError err; c->value = Variant::construct(p_type.builtin_type, NULL, 0, err); result = c; } @@ -6531,7 +6531,7 @@ GDScriptParser::DataType GDScriptParser::_reduce_node_type(Node *p_node) { result.has_type = false; } break; default: { - Variant::CallError err; + Callable::CallError err; Variant temp = Variant::construct(base_type.builtin_type, NULL, 0, err); bool valid = false; @@ -6596,16 +6596,18 @@ GDScriptParser::DataType GDScriptParser::_reduce_node_type(Node *p_node) { if (!error) { switch (base_type.builtin_type) { // Expect int or real as index - case Variant::POOL_BYTE_ARRAY: - case Variant::POOL_COLOR_ARRAY: - case Variant::POOL_INT_ARRAY: - case Variant::POOL_REAL_ARRAY: - case Variant::POOL_STRING_ARRAY: - case Variant::POOL_VECTOR2_ARRAY: - case Variant::POOL_VECTOR3_ARRAY: + case Variant::PACKED_BYTE_ARRAY: + case Variant::PACKED_COLOR_ARRAY: + case Variant::PACKED_INT32_ARRAY: + case Variant::PACKED_INT64_ARRAY: + case Variant::PACKED_FLOAT32_ARRAY: + case Variant::PACKED_FLOAT64_ARRAY: + case Variant::PACKED_STRING_ARRAY: + case Variant::PACKED_VECTOR2_ARRAY: + case Variant::PACKED_VECTOR3_ARRAY: case Variant::ARRAY: case Variant::STRING: { - error = index_type.builtin_type != Variant::INT && index_type.builtin_type != Variant::REAL; + error = index_type.builtin_type != Variant::INT && index_type.builtin_type != Variant::FLOAT; } break; // Expect String only case Variant::RECT2: @@ -6621,7 +6623,7 @@ GDScriptParser::DataType GDScriptParser::_reduce_node_type(Node *p_node) { case Variant::TRANSFORM2D: case Variant::BASIS: case Variant::TRANSFORM: { - error = index_type.builtin_type != Variant::INT && index_type.builtin_type != Variant::REAL && + error = index_type.builtin_type != Variant::INT && index_type.builtin_type != Variant::FLOAT && index_type.builtin_type != Variant::STRING; } break; // Expect String or int @@ -6646,17 +6648,19 @@ GDScriptParser::DataType GDScriptParser::_reduce_node_type(Node *p_node) { case Variant::STRING: case Variant::ARRAY: case Variant::DICTIONARY: - case Variant::POOL_BYTE_ARRAY: - case Variant::POOL_COLOR_ARRAY: - case Variant::POOL_INT_ARRAY: - case Variant::POOL_REAL_ARRAY: - case Variant::POOL_STRING_ARRAY: - case Variant::POOL_VECTOR2_ARRAY: - case Variant::POOL_VECTOR3_ARRAY: { + case Variant::PACKED_BYTE_ARRAY: + case Variant::PACKED_COLOR_ARRAY: + case Variant::PACKED_INT32_ARRAY: + case Variant::PACKED_INT64_ARRAY: + case Variant::PACKED_FLOAT32_ARRAY: + case Variant::PACKED_FLOAT64_ARRAY: + case Variant::PACKED_STRING_ARRAY: + case Variant::PACKED_VECTOR2_ARRAY: + case Variant::PACKED_VECTOR3_ARRAY: { break; } default: { - Variant::CallError err; + Callable::CallError err; Variant temp = Variant::construct(base_type.builtin_type, NULL, 0, err); bool valid = false; @@ -6691,41 +6695,43 @@ GDScriptParser::DataType GDScriptParser::_reduce_node_type(Node *p_node) { case Variant::NIL: case Variant::BOOL: case Variant::INT: - case Variant::REAL: + case Variant::FLOAT: case Variant::NODE_PATH: case Variant::_RID: { _set_error("Can't index on a value of type \"" + base_type.to_string() + "\".", op->line); return DataType(); } break; // Return int - case Variant::POOL_BYTE_ARRAY: - case Variant::POOL_INT_ARRAY: { + case Variant::PACKED_BYTE_ARRAY: + case Variant::PACKED_INT32_ARRAY: + case Variant::PACKED_INT64_ARRAY: { result.builtin_type = Variant::INT; } break; // Return real - case Variant::POOL_REAL_ARRAY: + case Variant::PACKED_FLOAT32_ARRAY: + case Variant::PACKED_FLOAT64_ARRAY: case Variant::VECTOR2: case Variant::VECTOR3: case Variant::QUAT: { - result.builtin_type = Variant::REAL; + result.builtin_type = Variant::FLOAT; } break; // Return color - case Variant::POOL_COLOR_ARRAY: { + case Variant::PACKED_COLOR_ARRAY: { result.builtin_type = Variant::COLOR; } break; // Return string - case Variant::POOL_STRING_ARRAY: + case Variant::PACKED_STRING_ARRAY: case Variant::STRING: { result.builtin_type = Variant::STRING; } break; // Return Vector2 - case Variant::POOL_VECTOR2_ARRAY: + case Variant::PACKED_VECTOR2_ARRAY: case Variant::TRANSFORM2D: case Variant::RECT2: { result.builtin_type = Variant::VECTOR2; } break; // Return Vector3 - case Variant::POOL_VECTOR3_ARRAY: + case Variant::PACKED_VECTOR3_ARRAY: case Variant::AABB: case Variant::BASIS: { result.builtin_type = Variant::VECTOR3; @@ -7002,7 +7008,7 @@ GDScriptParser::DataType GDScriptParser::_reduce_function_call_type(const Operat break; } else { #ifdef DEBUG_ENABLED - if (arg_type.kind == DataType::BUILTIN && arg_type.builtin_type == Variant::INT && par_types[i].kind == DataType::BUILTIN && par_types[i].builtin_type == Variant::REAL) { + if (arg_type.kind == DataType::BUILTIN && arg_type.builtin_type == Variant::INT && par_types[i].kind == DataType::BUILTIN && par_types[i].builtin_type == Variant::FLOAT) { _add_warning(GDScriptWarning::NARROWING_CONVERSION, p_call->line, Variant::get_type_name(tn->vtype)); } if (par_types[i].may_yield && p_call->arguments[i + 1]->type == Node::TYPE_OPERATOR) { @@ -7095,7 +7101,7 @@ GDScriptParser::DataType GDScriptParser::_reduce_function_call_type(const Operat } if (base_type.kind == DataType::BUILTIN) { - Variant::CallError err; + Callable::CallError err; Variant tmp = Variant::construct(base_type.builtin_type, NULL, 0, err); if (check_types) { @@ -7245,7 +7251,7 @@ GDScriptParser::DataType GDScriptParser::_reduce_function_call_type(const Operat _mark_line_as_unsafe(p_call->line); } } else { - if (arg_type.kind == DataType::BUILTIN && arg_type.builtin_type == Variant::INT && par_type.kind == DataType::BUILTIN && par_type.builtin_type == Variant::REAL) { + if (arg_type.kind == DataType::BUILTIN && arg_type.builtin_type == Variant::INT && par_type.kind == DataType::BUILTIN && par_type.builtin_type == Variant::FLOAT) { _add_warning(GDScriptWarning::NARROWING_CONVERSION, p_call->line, callee_name); } } @@ -8103,7 +8109,7 @@ void GDScriptParser::_check_block_types(BlockNode *p_block) { lv->assign = convert_call; lv->assign_op->arguments.write[1] = convert_call; #ifdef DEBUG_ENABLED - if (lv->datatype.builtin_type == Variant::INT && assign_type.builtin_type == Variant::REAL) { + if (lv->datatype.builtin_type == Variant::INT && assign_type.builtin_type == Variant::FLOAT) { _add_warning(GDScriptWarning::NARROWING_CONVERSION, lv->line); } #endif // DEBUG_ENABLED @@ -8240,7 +8246,7 @@ void GDScriptParser::_check_block_types(BlockNode *p_block) { type_match = true; // Since we are converting, the type is matching } #ifdef DEBUG_ENABLED - if (lh_type.builtin_type == Variant::INT && rh_type.builtin_type == Variant::REAL) { + if (lh_type.builtin_type == Variant::INT && rh_type.builtin_type == Variant::FLOAT) { _add_warning(GDScriptWarning::NARROWING_CONVERSION, op->line); } #endif // DEBUG_ENABLED @@ -8345,7 +8351,7 @@ void GDScriptParser::_check_block_types(BlockNode *p_block) { if (cn->value.get_type() == Variant::STRING) { break; } - FALLTHROUGH; + [[fallthrough]]; } default: { _mark_line_as_safe(statement->line); diff --git a/modules/gdscript/gdscript_tokenizer.cpp b/modules/gdscript/gdscript_tokenizer.cpp index a0e0811c1f..9064998d32 100644 --- a/modules/gdscript/gdscript_tokenizer.cpp +++ b/modules/gdscript/gdscript_tokenizer.cpp @@ -146,12 +146,15 @@ static const _bit _type_list[] = { //types { Variant::BOOL, "bool" }, { Variant::INT, "int" }, - { Variant::REAL, "float" }, + { Variant::FLOAT, "float" }, { Variant::STRING, "String" }, { Variant::VECTOR2, "Vector2" }, + { Variant::VECTOR2I, "Vector2i" }, { Variant::RECT2, "Rect2" }, + { Variant::RECT2I, "Rect2i" }, { Variant::TRANSFORM2D, "Transform2D" }, { Variant::VECTOR3, "Vector3" }, + { Variant::VECTOR3I, "Vector3i" }, { Variant::AABB, "AABB" }, { Variant::PLANE, "Plane" }, { Variant::QUAT, "Quat" }, @@ -160,16 +163,21 @@ static const _bit _type_list[] = { { Variant::COLOR, "Color" }, { Variant::_RID, "RID" }, { Variant::OBJECT, "Object" }, + { Variant::STRING_NAME, "StringName" }, { Variant::NODE_PATH, "NodePath" }, { Variant::DICTIONARY, "Dictionary" }, + { Variant::CALLABLE, "Callable" }, + { Variant::SIGNAL, "Signal" }, { Variant::ARRAY, "Array" }, - { Variant::POOL_BYTE_ARRAY, "PoolByteArray" }, - { Variant::POOL_INT_ARRAY, "PoolIntArray" }, - { Variant::POOL_REAL_ARRAY, "PoolRealArray" }, - { Variant::POOL_STRING_ARRAY, "PoolStringArray" }, - { Variant::POOL_VECTOR2_ARRAY, "PoolVector2Array" }, - { Variant::POOL_VECTOR3_ARRAY, "PoolVector3Array" }, - { Variant::POOL_COLOR_ARRAY, "PoolColorArray" }, + { Variant::PACKED_BYTE_ARRAY, "PackedByteArray" }, + { Variant::PACKED_INT32_ARRAY, "PackedInt32Array" }, + { Variant::PACKED_INT64_ARRAY, "PackedInt64Array" }, + { Variant::PACKED_FLOAT32_ARRAY, "PackedFloat32Array" }, + { Variant::PACKED_FLOAT64_ARRAY, "PackedFloat64Array" }, + { Variant::PACKED_STRING_ARRAY, "PackedStringArray" }, + { Variant::PACKED_VECTOR2_ARRAY, "PackedVector2Array" }, + { Variant::PACKED_VECTOR3_ARRAY, "PackedVector3Array" }, + { Variant::PACKED_COLOR_ARRAY, "PackedColorArray" }, { Variant::VARIANT_MAX, NULL }, }; @@ -337,7 +345,7 @@ StringName GDScriptTokenizer::get_token_literal(int p_offset) const { default: { } } - } + } break; case TK_OP_AND: case TK_OP_OR: break; // Don't get into default, since they can be non-literal @@ -475,7 +483,7 @@ void GDScriptTokenizerText::_advance() { } while (true) { - bool is_node_path = false; + bool is_string_name = false; StringMode string_mode = STRING_DOUBLE_QUOTE; switch (GETCHAR(0)) { @@ -533,7 +541,7 @@ void GDScriptTokenizerText::_advance() { ignore_warnings = true; } #endif // DEBUG_ENABLED - FALLTHROUGH; + [[fallthrough]]; } case '\n': { line++; @@ -749,8 +757,8 @@ void GDScriptTokenizerText::_advance() { return; } INCPOS(1); - is_node_path = true; - FALLTHROUGH; + is_string_name = true; + [[fallthrough]]; case '\'': case '"': { @@ -860,8 +868,8 @@ void GDScriptTokenizerText::_advance() { } INCPOS(i); - if (is_node_path) { - _make_constant(NodePath(str)); + if (is_string_name) { + _make_constant(StringName(str)); } else { _make_constant(str); } diff --git a/modules/gdscript/language_server/gdscript_language_protocol.cpp b/modules/gdscript/language_server/gdscript_language_protocol.cpp index 7133c6b4be..2243a7b81d 100644 --- a/modules/gdscript/language_server/gdscript_language_protocol.cpp +++ b/modules/gdscript/language_server/gdscript_language_protocol.cpp @@ -32,32 +32,107 @@ #include "core/io/json.h" #include "core/os/copymem.h" #include "core/project_settings.h" +#include "editor/editor_log.h" #include "editor/editor_node.h" GDScriptLanguageProtocol *GDScriptLanguageProtocol::singleton = NULL; -void GDScriptLanguageProtocol::on_data_received(int p_id) { - lastest_client_id = p_id; - Ref<WebSocketPeer> peer = server->get_peer(p_id); - PoolByteArray data; - if (OK == peer->get_packet_buffer(data)) { - String message; - message.parse_utf8((const char *)data.read().ptr(), data.size()); - if (message.begins_with("Content-Length:")) return; - String output = process_message(message); +Error GDScriptLanguageProtocol::LSPeer::handle_data() { + int read = 0; + // Read headers + if (!has_header) { + while (true) { + if (req_pos >= LSP_MAX_BUFFER_SIZE) { + req_pos = 0; + ERR_FAIL_COND_V_MSG(true, ERR_OUT_OF_MEMORY, "Response header too big"); + } + Error err = connection->get_partial_data(&req_buf[req_pos], 1, read); + if (err != OK) + return FAILED; + else if (read != 1) // Busy, wait until next poll + return ERR_BUSY; + char *r = (char *)req_buf; + int l = req_pos; + + // End of headers + if (l > 3 && r[l] == '\n' && r[l - 1] == '\r' && r[l - 2] == '\n' && r[l - 3] == '\r') { + r[l - 3] = '\0'; // Null terminate to read string + String header; + header.parse_utf8(r); + content_length = header.substr(16).to_int(); + has_header = true; + req_pos = 0; + break; + } + req_pos++; + } + } + if (has_header) { + while (req_pos < content_length) { + if (req_pos >= LSP_MAX_BUFFER_SIZE) { + req_pos = 0; + has_header = false; + ERR_FAIL_COND_V_MSG(req_pos >= LSP_MAX_BUFFER_SIZE, ERR_OUT_OF_MEMORY, "Response content too big"); + } + Error err = connection->get_partial_data(&req_buf[req_pos], 1, read); + if (err != OK) + return FAILED; + else if (read != 1) + return ERR_BUSY; + req_pos++; + } + + // Parse data + String msg; + msg.parse_utf8((const char *)req_buf, req_pos); + + // Reset to read again + req_pos = 0; + has_header = false; + + // Response + String output = GDScriptLanguageProtocol::get_singleton()->process_message(msg); if (!output.empty()) { - CharString charstr = output.utf8(); - peer->put_packet((const uint8_t *)charstr.ptr(), charstr.length()); + res_queue.push_back(output.utf8()); } } + return OK; } -void GDScriptLanguageProtocol::on_client_connected(int p_id, const String &p_protocal) { - clients.set(p_id, server->get_peer(p_id)); +Error GDScriptLanguageProtocol::LSPeer::send_data() { + int sent = 0; + if (!res_queue.empty()) { + CharString c_res = res_queue[0]; + if (res_sent < c_res.size()) { + Error err = connection->put_partial_data((const uint8_t *)c_res.get_data() + res_sent, c_res.size() - res_sent - 1, sent); + if (err != OK) { + return err; + } + res_sent += sent; + } + // Response sent + if (res_sent >= c_res.size() - 1) { + res_sent = 0; + res_queue.remove(0); + } + } + return OK; +} + +Error GDScriptLanguageProtocol::on_client_connected() { + Ref<StreamPeerTCP> tcp_peer = server->take_connection(); + ERR_FAIL_COND_V_MSG(clients.size() >= LSP_MAX_CLIENTS, FAILED, "Max client limits reached"); + Ref<LSPeer> peer = memnew(LSPeer); + peer->connection = tcp_peer; + clients.set(next_client_id, peer); + next_client_id++; + EditorNode::get_log()->add_message("Connection Taken", EditorLog::MSG_TYPE_EDITOR); + return OK; } -void GDScriptLanguageProtocol::on_client_disconnected(int p_id, bool p_was_clean_close) { - clients.erase(p_id); +void GDScriptLanguageProtocol::on_client_disconnected(const int &p_client_id) { + clients.erase(p_client_id); + EditorNode::get_log()->add_message("Disconnected", EditorLog::MSG_TYPE_EDITOR); } String GDScriptLanguageProtocol::process_message(const String &p_text) { @@ -83,11 +158,9 @@ String GDScriptLanguageProtocol::format_output(const String &p_text) { void GDScriptLanguageProtocol::_bind_methods() { ClassDB::bind_method(D_METHOD("initialize", "params"), &GDScriptLanguageProtocol::initialize); ClassDB::bind_method(D_METHOD("initialized", "params"), &GDScriptLanguageProtocol::initialized); - ClassDB::bind_method(D_METHOD("on_data_received"), &GDScriptLanguageProtocol::on_data_received); ClassDB::bind_method(D_METHOD("on_client_connected"), &GDScriptLanguageProtocol::on_client_connected); ClassDB::bind_method(D_METHOD("on_client_disconnected"), &GDScriptLanguageProtocol::on_client_disconnected); - ClassDB::bind_method(D_METHOD("notify_all_clients", "p_method", "p_params"), &GDScriptLanguageProtocol::notify_all_clients, DEFVAL(Variant())); - ClassDB::bind_method(D_METHOD("notify_client", "p_method", "p_params", "p_client"), &GDScriptLanguageProtocol::notify_client, DEFVAL(Variant()), DEFVAL(-1)); + ClassDB::bind_method(D_METHOD("notify_client", "p_method", "p_params"), &GDScriptLanguageProtocol::notify_client, DEFVAL(Variant()), DEFVAL(-1)); ClassDB::bind_method(D_METHOD("is_smart_resolve_enabled"), &GDScriptLanguageProtocol::is_smart_resolve_enabled); ClassDB::bind_method(D_METHOD("get_text_document"), &GDScriptLanguageProtocol::get_text_document); ClassDB::bind_method(D_METHOD("get_workspace"), &GDScriptLanguageProtocol::get_workspace); @@ -116,11 +189,12 @@ Dictionary GDScriptLanguageProtocol::initialize(const Dictionary &p_params) { Dictionary params; params["path"] = workspace->root; Dictionary request = make_notification("gdscrip_client/changeWorkspace", params); - if (Ref<WebSocketPeer> *peer = clients.getptr(lastest_client_id)) { + + Ref<LSPeer> peer = clients.get(latest_client_id); + if (peer != NULL) { String msg = JSON::print(request); msg = format_output(msg); - CharString charstr = msg.utf8(); - (*peer)->put_packet((const uint8_t *)charstr.ptr(), charstr.length()); + (*peer)->res_queue.push_back(msg.utf8()); } } @@ -153,61 +227,59 @@ void GDScriptLanguageProtocol::initialized(const Variant &p_params) { } void GDScriptLanguageProtocol::poll() { - server->poll(); + if (server->is_connection_available()) { + on_client_connected(); + } + const int *id = NULL; + while ((id = clients.next(id))) { + Ref<LSPeer> peer = clients.get(*id); + StreamPeerTCP::Status status = peer->connection->get_status(); + if (status == StreamPeerTCP::STATUS_NONE || status == StreamPeerTCP::STATUS_ERROR) { + on_client_disconnected(*id); + id = NULL; + } else { + if (peer->connection->get_available_bytes() > 0) { + latest_client_id = *id; + Error err = peer->handle_data(); + if (err != OK && err != ERR_BUSY) { + on_client_disconnected(*id); + id = NULL; + } + } + Error err = peer->send_data(); + if (err != OK && err != ERR_BUSY) { + on_client_disconnected(*id); + id = NULL; + } + } + } } Error GDScriptLanguageProtocol::start(int p_port, const IP_Address &p_bind_ip) { - if (server == NULL) { - server = dynamic_cast<WebSocketServer *>(ClassDB::instance("WebSocketServer")); - ERR_FAIL_COND_V(!server, FAILED); - server->set_buffers(8192, 1024, 8192, 1024); // 8mb should be way more than enough - server->connect("data_received", this, "on_data_received"); - server->connect("client_connected", this, "on_client_connected"); - server->connect("client_disconnected", this, "on_client_disconnected"); - } - server->set_bind_ip(p_bind_ip); - return server->listen(p_port); + return server->listen(p_port, p_bind_ip); } void GDScriptLanguageProtocol::stop() { - const int *ptr = clients.next(NULL); - while (ptr) { - clients.get(*ptr)->close(); - ptr = clients.next(ptr); + const int *id = NULL; + while ((id = clients.next(id))) { + Ref<LSPeer> peer = clients.get(*id); + peer->connection->disconnect_from_host(); } - server->stop(); - clients.clear(); -} - -void GDScriptLanguageProtocol::notify_all_clients(const String &p_method, const Variant &p_params) { - Dictionary message = make_notification(p_method, p_params); - String msg = JSON::print(message); - msg = format_output(msg); - CharString charstr = msg.utf8(); - const int *p_id = clients.next(NULL); - while (p_id != NULL) { - Ref<WebSocketPeer> peer = clients.get(*p_id); - (*peer)->put_packet((const uint8_t *)charstr.ptr(), charstr.length()); - p_id = clients.next(p_id); - } + server->stop(); } -void GDScriptLanguageProtocol::notify_client(const String &p_method, const Variant &p_params, int p_client) { - - if (p_client == -1) { - p_client = lastest_client_id; +void GDScriptLanguageProtocol::notify_client(const String &p_method, const Variant &p_params, int p_client_id) { + if (p_client_id == -1) { + p_client_id = latest_client_id; } - - Ref<WebSocketPeer> *peer = clients.getptr(p_client); + Ref<LSPeer> peer = clients.get(p_client_id); ERR_FAIL_COND(peer == NULL); Dictionary message = make_notification(p_method, p_params); String msg = JSON::print(message); msg = format_output(msg); - CharString charstr = msg.utf8(); - - (*peer)->put_packet((const uint8_t *)charstr.ptr(), charstr.length()); + peer->res_queue.push_back(msg.utf8()); } bool GDScriptLanguageProtocol::is_smart_resolve_enabled() const { @@ -219,7 +291,7 @@ bool GDScriptLanguageProtocol::is_goto_native_symbols_enabled() const { } GDScriptLanguageProtocol::GDScriptLanguageProtocol() { - server = NULL; + server.instance(); singleton = this; _initialized = false; workspace.instance(); @@ -228,9 +300,6 @@ GDScriptLanguageProtocol::GDScriptLanguageProtocol() { set_scope("completionItem", text_document.ptr()); set_scope("workspace", workspace.ptr()); workspace->root = ProjectSettings::get_singleton()->get_resource_path(); -} - -GDScriptLanguageProtocol::~GDScriptLanguageProtocol() { - memdelete(server); - server = NULL; + latest_client_id = 0; + next_client_id = 0; } diff --git a/modules/gdscript/language_server/gdscript_language_protocol.h b/modules/gdscript/language_server/gdscript_language_protocol.h index 52c680ab19..3f0ae36af2 100644 --- a/modules/gdscript/language_server/gdscript_language_protocol.h +++ b/modules/gdscript/language_server/gdscript_language_protocol.h @@ -31,16 +31,36 @@ #ifndef GDSCRIPT_PROTOCAL_SERVER_H #define GDSCRIPT_PROTOCAL_SERVER_H +#include "core/io/stream_peer.h" +#include "core/io/stream_peer_tcp.h" +#include "core/io/tcp_server.h" #include "gdscript_text_document.h" #include "gdscript_workspace.h" #include "lsp.hpp" #include "modules/jsonrpc/jsonrpc.h" -#include "modules/websocket/websocket_peer.h" -#include "modules/websocket/websocket_server.h" + +#define LSP_MAX_BUFFER_SIZE 4194304 +#define LSP_MAX_CLIENTS 8 class GDScriptLanguageProtocol : public JSONRPC { GDCLASS(GDScriptLanguageProtocol, JSONRPC) +private: + struct LSPeer : Reference { + Ref<StreamPeerTCP> connection; + + uint8_t req_buf[LSP_MAX_BUFFER_SIZE]; + int req_pos = 0; + bool has_header = false; + bool has_content = false; + int content_length = 0; + Vector<CharString> res_queue; + int res_sent = 0; + + Error handle_data(); + Error send_data(); + }; + enum LSPErrorCode { RequestCancelled = -32800, ContentModified = -32801, @@ -48,16 +68,16 @@ class GDScriptLanguageProtocol : public JSONRPC { static GDScriptLanguageProtocol *singleton; - HashMap<int, Ref<WebSocketPeer> > clients; - WebSocketServer *server; - int lastest_client_id; + HashMap<int, Ref<LSPeer> > clients; + Ref<TCP_Server> server; + int latest_client_id; + int next_client_id; Ref<GDScriptTextDocument> text_document; Ref<GDScriptWorkspace> workspace; - void on_data_received(int p_id); - void on_client_connected(int p_id, const String &p_protocal); - void on_client_disconnected(int p_id, bool p_was_clean_close); + Error on_client_connected(); + void on_client_disconnected(const int &p_client_id); String process_message(const String &p_text); String format_output(const String &p_text); @@ -80,14 +100,12 @@ public: Error start(int p_port, const IP_Address &p_bind_ip); void stop(); - void notify_all_clients(const String &p_method, const Variant &p_params = Variant()); - void notify_client(const String &p_method, const Variant &p_params = Variant(), int p_client = -1); + void notify_client(const String &p_method, const Variant &p_params = Variant(), int p_client_id = -1); bool is_smart_resolve_enabled() const; bool is_goto_native_symbols_enabled() const; GDScriptLanguageProtocol(); - ~GDScriptLanguageProtocol(); }; #endif diff --git a/modules/gdscript/language_server/gdscript_workspace.cpp b/modules/gdscript/language_server/gdscript_workspace.cpp index 1c0590cff1..ea54784f96 100644 --- a/modules/gdscript/language_server/gdscript_workspace.cpp +++ b/modules/gdscript/language_server/gdscript_workspace.cpp @@ -33,8 +33,11 @@ #include "../gdscript_parser.h" #include "core/project_settings.h" #include "core/script_language.h" +#include "editor/editor_file_system.h" #include "editor/editor_help.h" +#include "editor/editor_node.h" #include "gdscript_language_protocol.h" +#include "scene/resources/packed_scene.h" void GDScriptWorkspace::_bind_methods() { ClassDB::bind_method(D_METHOD("symbol"), &GDScriptWorkspace::symbol); @@ -373,6 +376,46 @@ void GDScriptWorkspace::publish_diagnostics(const String &p_path) { GDScriptLanguageProtocol::get_singleton()->notify_client("textDocument/publishDiagnostics", params); } +void GDScriptWorkspace::_get_owners(EditorFileSystemDirectory *efsd, String p_path, List<String> &owners) { + if (!efsd) + return; + + for (int i = 0; i < efsd->get_subdir_count(); i++) { + _get_owners(efsd->get_subdir(i), p_path, owners); + } + + for (int i = 0; i < efsd->get_file_count(); i++) { + + Vector<String> deps = efsd->get_file_deps(i); + bool found = false; + for (int j = 0; j < deps.size(); j++) { + if (deps[j] == p_path) { + found = true; + break; + } + } + if (!found) + continue; + + owners.push_back(efsd->get_file_path(i)); + } +} + +Node *GDScriptWorkspace::_get_owner_node(String p_path) { + Node *owner_node = NULL; + List<String> owners; + + _get_owners(EditorFileSystem::get_singleton()->get_filesystem(), p_path, owners); + + if (owners.size() > 0) { + NodePath owner_path = owners[0]; + Ref<PackedScene> owner_res = ResourceLoader::load(owner_path); + owner_node = owner_res->instance(PackedScene::GEN_EDIT_STATE_DISABLED); + } + + return owner_node; +} + void GDScriptWorkspace::completion(const lsp::CompletionParams &p_params, List<ScriptCodeCompletionOption> *r_options) { String path = get_file_path(p_params.textDocument.uri); @@ -380,8 +423,12 @@ void GDScriptWorkspace::completion(const lsp::CompletionParams &p_params, List<S bool forced = false; if (const ExtendGDScriptParser *parser = get_parse_result(path)) { + Node *owner_node = _get_owner_node(path); String code = parser->get_text_for_completion(p_params.position); - GDScriptLanguage::get_singleton()->complete_code(code, path, NULL, r_options, forced, call_hint); + GDScriptLanguage::get_singleton()->complete_code(code, path, owner_node, r_options, forced, call_hint); + if (owner_node) { + memdelete(owner_node); + } } } diff --git a/modules/gdscript/language_server/gdscript_workspace.h b/modules/gdscript/language_server/gdscript_workspace.h index 146a5cb7c9..8b46d345d9 100644 --- a/modules/gdscript/language_server/gdscript_workspace.h +++ b/modules/gdscript/language_server/gdscript_workspace.h @@ -33,12 +33,17 @@ #include "../gdscript_parser.h" #include "core/variant.h" +#include "editor/editor_file_system.h" #include "gdscript_extend_parser.h" #include "lsp.hpp" class GDScriptWorkspace : public Reference { GDCLASS(GDScriptWorkspace, Reference); +private: + void _get_owners(EditorFileSystemDirectory *efsd, String p_path, List<String> &owners); + Node *_get_owner_node(String p_path); + protected: static void _bind_methods(); void remove_cache_parser(const String &p_path); diff --git a/modules/glslang/SCsub b/modules/glslang/SCsub index 8c9445436e..ae102238f2 100644 --- a/modules/glslang/SCsub +++ b/modules/glslang/SCsub @@ -58,7 +58,11 @@ if env['builtin_glslang']: thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources] - env_glslang.Prepend(CPPPATH=[thirdparty_dir]) + # Treat glslang headers as system headers to avoid raising warnings. Not supported on MSVC. + if not env.msvc: + env_glslang.Append(CPPFLAGS=['-isystem', Dir(thirdparty_dir).path]) + else: + env_glslang.Prepend(CPPPATH=[thirdparty_dir]) env_thirdparty = env_glslang.Clone() env_thirdparty.disable_warnings() diff --git a/modules/glslang/register_types.cpp b/modules/glslang/register_types.cpp index 1e4481a6a0..d2b4a18fc7 100644 --- a/modules/glslang/register_types.cpp +++ b/modules/glslang/register_types.cpp @@ -142,9 +142,9 @@ static const TBuiltInResource default_builtin_resource = { } }; -static PoolVector<uint8_t> _compile_shader_glsl(RenderingDevice::ShaderStage p_stage, const String &p_source_code, RenderingDevice::ShaderLanguage p_language, String *r_error) { +static Vector<uint8_t> _compile_shader_glsl(RenderingDevice::ShaderStage p_stage, const String &p_source_code, RenderingDevice::ShaderLanguage p_language, String *r_error) { - PoolVector<uint8_t> ret; + Vector<uint8_t> ret; ERR_FAIL_COND_V(p_language == RenderingDevice::SHADER_LANGUAGE_HLSL, ret); @@ -224,8 +224,8 @@ static PoolVector<uint8_t> _compile_shader_glsl(RenderingDevice::ShaderStage p_s ret.resize(SpirV.size() * sizeof(uint32_t)); { - PoolVector<uint8_t>::Write w = ret.write(); - copymem(w.ptr(), &SpirV[0], SpirV.size() * sizeof(uint32_t)); + uint8_t *w = ret.ptrw(); + copymem(w, &SpirV[0], SpirV.size() * sizeof(uint32_t)); } return ret; diff --git a/modules/gridmap/grid_map.cpp b/modules/gridmap/grid_map.cpp index 7fe58f8ce7..84075f76fd 100644 --- a/modules/gridmap/grid_map.cpp +++ b/modules/gridmap/grid_map.cpp @@ -49,9 +49,9 @@ bool GridMap::_set(const StringName &p_name, const Variant &p_value) { if (d.has("cells")) { - PoolVector<int> cells = d["cells"]; + Vector<int> cells = d["cells"]; int amount = cells.size(); - PoolVector<int>::Read r = cells.read(); + const int *r = cells.ptr(); ERR_FAIL_COND_V(amount % 3, false); // not even cell_map.clear(); for (int i = 0; i < amount / 3; i++) { @@ -103,10 +103,10 @@ bool GridMap::_get(const StringName &p_name, Variant &r_ret) const { Dictionary d; - PoolVector<int> cells; + Vector<int> cells; cells.resize(cell_map.size() * 3); { - PoolVector<int>::Write w = cells.write(); + int *w = cells.ptrw(); int i = 0; for (Map<IndexKey, Cell>::Element *E = cell_map.front(); E; E = E->next(), i++) { @@ -439,7 +439,7 @@ bool GridMap::_octant_update(const OctantKey &p_key) { return true; } - PoolVector<Vector3> col_debug; + Vector<Vector3> col_debug; /* * foreach item in this octant, @@ -874,7 +874,7 @@ void GridMap::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::BOOL, "cell_center_x"), "set_center_x", "get_center_x"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "cell_center_y"), "set_center_y", "get_center_y"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "cell_center_z"), "set_center_z", "get_center_z"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "cell_scale"), "set_cell_scale", "get_cell_scale"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "cell_scale"), "set_cell_scale", "get_cell_scale"); ADD_GROUP("Collision", "collision_"); ADD_PROPERTY(PropertyInfo(Variant::INT, "collision_layer", PROPERTY_HINT_LAYERS_3D_PHYSICS), "set_collision_layer", "get_collision_layer"); ADD_PROPERTY(PropertyInfo(Variant::INT, "collision_mask", PROPERTY_HINT_LAYERS_3D_PHYSICS), "set_collision_mask", "get_collision_mask"); diff --git a/modules/gridmap/grid_map_editor_plugin.cpp b/modules/gridmap/grid_map_editor_plugin.cpp index 2144ff264f..761771a02c 100644 --- a/modules/gridmap/grid_map_editor_plugin.cpp +++ b/modules/gridmap/grid_map_editor_plugin.cpp @@ -954,7 +954,7 @@ void GridMapEditor::update_palette() { void GridMapEditor::edit(GridMap *p_gridmap) { if (!p_gridmap && node) - node->disconnect("cell_size_changed", this, "_draw_grids"); + node->disconnect_compat("cell_size_changed", this, "_draw_grids"); node = p_gridmap; @@ -988,7 +988,7 @@ void GridMapEditor::edit(GridMap *p_gridmap) { update_grid(); _update_clip(); - node->connect("cell_size_changed", this, "_draw_grids"); + node->connect_compat("cell_size_changed", this, "_draw_grids"); } void GridMapEditor::_update_clip() { @@ -1077,8 +1077,8 @@ void GridMapEditor::_notification(int p_what) { switch (p_what) { case NOTIFICATION_ENTER_TREE: { - get_tree()->connect("node_removed", this, "_node_removed"); - mesh_library_palette->connect("item_selected", this, "_item_selected_cbk"); + get_tree()->connect_compat("node_removed", this, "_node_removed"); + mesh_library_palette->connect_compat("item_selected", this, "_item_selected_cbk"); for (int i = 0; i < 3; i++) { grid[i] = VS::get_singleton()->mesh_create(); @@ -1094,7 +1094,7 @@ void GridMapEditor::_notification(int p_what) { } break; case NOTIFICATION_EXIT_TREE: { - get_tree()->disconnect("node_removed", this, "_node_removed"); + get_tree()->disconnect_compat("node_removed", this, "_node_removed"); _clear_clipboard_data(); for (int i = 0; i < 3; i++) { @@ -1241,9 +1241,9 @@ GridMapEditor::GridMapEditor(EditorNode *p_editor) { floor->get_line_edit()->add_constant_override("minimum_spaces", 16); spatial_editor_hb->add_child(floor); - floor->connect("value_changed", this, "_floor_changed"); - floor->connect("mouse_exited", this, "_floor_mouse_exited"); - floor->get_line_edit()->connect("mouse_exited", this, "_floor_mouse_exited"); + floor->connect_compat("value_changed", this, "_floor_changed"); + floor->connect_compat("mouse_exited", this, "_floor_mouse_exited"); + floor->get_line_edit()->connect_compat("mouse_exited", this, "_floor_mouse_exited"); spatial_editor_hb->add_child(memnew(VSeparator)); @@ -1300,7 +1300,7 @@ GridMapEditor::GridMapEditor(EditorNode *p_editor) { settings_vbc->add_margin_child(TTR("Pick Distance:"), settings_pick_distance); clip_mode = CLIP_DISABLED; - options->get_popup()->connect("id_pressed", this, "_menu_option"); + options->get_popup()->connect_compat("id_pressed", this, "_menu_option"); HBoxContainer *hb = memnew(HBoxContainer); add_child(hb); @@ -1310,22 +1310,22 @@ GridMapEditor::GridMapEditor(EditorNode *p_editor) { search_box->set_h_size_flags(SIZE_EXPAND_FILL); search_box->set_placeholder(TTR("Filter meshes")); hb->add_child(search_box); - search_box->connect("text_changed", this, "_text_changed"); - search_box->connect("gui_input", this, "_sbox_input"); + search_box->connect_compat("text_changed", this, "_text_changed"); + search_box->connect_compat("gui_input", this, "_sbox_input"); mode_thumbnail = memnew(ToolButton); mode_thumbnail->set_toggle_mode(true); mode_thumbnail->set_pressed(true); mode_thumbnail->set_icon(p_editor->get_gui_base()->get_icon("FileThumbnail", "EditorIcons")); hb->add_child(mode_thumbnail); - mode_thumbnail->connect("pressed", this, "_set_display_mode", varray(DISPLAY_THUMBNAIL)); + mode_thumbnail->connect_compat("pressed", this, "_set_display_mode", varray(DISPLAY_THUMBNAIL)); mode_list = memnew(ToolButton); mode_list->set_toggle_mode(true); mode_list->set_pressed(false); mode_list->set_icon(p_editor->get_gui_base()->get_icon("FileList", "EditorIcons")); hb->add_child(mode_list); - mode_list->connect("pressed", this, "_set_display_mode", varray(DISPLAY_LIST)); + mode_list->connect_compat("pressed", this, "_set_display_mode", varray(DISPLAY_LIST)); size_slider = memnew(HSlider); size_slider->set_h_size_flags(SIZE_EXPAND_FILL); @@ -1333,7 +1333,7 @@ GridMapEditor::GridMapEditor(EditorNode *p_editor) { size_slider->set_max(4.0f); size_slider->set_step(0.1f); size_slider->set_value(1.0f); - size_slider->connect("value_changed", this, "_icon_size_changed"); + size_slider->connect_compat("value_changed", this, "_icon_size_changed"); add_child(size_slider); EDITOR_DEF("editors/grid_map/preview_size", 64); @@ -1343,7 +1343,7 @@ GridMapEditor::GridMapEditor(EditorNode *p_editor) { mesh_library_palette = memnew(ItemList); add_child(mesh_library_palette); mesh_library_palette->set_v_size_flags(SIZE_EXPAND_FILL); - mesh_library_palette->connect("gui_input", this, "_mesh_library_palette_input"); + mesh_library_palette->connect_compat("gui_input", this, "_mesh_library_palette_input"); info_message = memnew(Label); info_message->set_text(TTR("Give a MeshLibrary resource to this GridMap to use its meshes.")); @@ -1370,9 +1370,9 @@ GridMapEditor::GridMapEditor(EditorNode *p_editor) { { // Selection mesh create. - PoolVector<Vector3> lines; - PoolVector<Vector3> triangles; - PoolVector<Vector3> square[3]; + Vector<Vector3> lines; + Vector<Vector3> triangles; + Vector<Vector3> square[3]; for (int i = 0; i < 6; i++) { diff --git a/modules/hdr/image_loader_hdr.cpp b/modules/hdr/image_loader_hdr.cpp index 3fa7266f1a..c03ae4ab1f 100644 --- a/modules/hdr/image_loader_hdr.cpp +++ b/modules/hdr/image_loader_hdr.cpp @@ -63,15 +63,15 @@ Error ImageLoaderHDR::load_image(Ref<Image> p_image, FileAccess *f, bool p_force int width = f->get_line().to_int(); - PoolVector<uint8_t> imgdata; + Vector<uint8_t> imgdata; imgdata.resize(height * width * sizeof(uint32_t)); { - PoolVector<uint8_t>::Write w = imgdata.write(); + uint8_t *w = imgdata.ptrw(); - uint8_t *ptr = (uint8_t *)w.ptr(); + uint8_t *ptr = (uint8_t *)w; if (width < 8 || width >= 32768) { // Read flat data diff --git a/modules/jpg/image_loader_jpegd.cpp b/modules/jpg/image_loader_jpegd.cpp index a1f0f0ef6a..9e87d11ac1 100644 --- a/modules/jpg/image_loader_jpegd.cpp +++ b/modules/jpg/image_loader_jpegd.cpp @@ -57,13 +57,13 @@ Error jpeg_load_image_from_buffer(Image *p_image, const uint8_t *p_buffer, int p const int dst_bpl = image_width * comps; - PoolVector<uint8_t> data; + Vector<uint8_t> data; data.resize(dst_bpl * image_height); - PoolVector<uint8_t>::Write dw = data.write(); + uint8_t *dw = data.ptrw(); - jpgd::uint8 *pImage_data = (jpgd::uint8 *)dw.ptr(); + jpgd::uint8 *pImage_data = (jpgd::uint8 *)dw; for (int y = 0; y < image_height; y++) { const jpgd::uint8 *pScan_line; @@ -96,7 +96,6 @@ Error jpeg_load_image_from_buffer(Image *p_image, const uint8_t *p_buffer, int p else fmt = Image::FORMAT_RGB8; - dw.release(); p_image->create(image_width, image_height, 0, fmt, data); return OK; @@ -104,18 +103,18 @@ Error jpeg_load_image_from_buffer(Image *p_image, const uint8_t *p_buffer, int p Error ImageLoaderJPG::load_image(Ref<Image> p_image, FileAccess *f, bool p_force_linear, float p_scale) { - PoolVector<uint8_t> src_image; + Vector<uint8_t> src_image; int src_image_len = f->get_len(); ERR_FAIL_COND_V(src_image_len == 0, ERR_FILE_CORRUPT); src_image.resize(src_image_len); - PoolVector<uint8_t>::Write w = src_image.write(); + uint8_t *w = src_image.ptrw(); f->get_buffer(&w[0], src_image_len); f->close(); - Error err = jpeg_load_image_from_buffer(p_image.ptr(), w.ptr(), src_image_len); + Error err = jpeg_load_image_from_buffer(p_image.ptr(), w, src_image_len); return err; } diff --git a/modules/mbedtls/crypto_mbedtls.cpp b/modules/mbedtls/crypto_mbedtls.cpp index 2bd80064e3..ee3c78aeb3 100644 --- a/modules/mbedtls/crypto_mbedtls.cpp +++ b/modules/mbedtls/crypto_mbedtls.cpp @@ -53,22 +53,22 @@ CryptoKey *CryptoKeyMbedTLS::create() { Error CryptoKeyMbedTLS::load(String p_path) { ERR_FAIL_COND_V_MSG(locks, ERR_ALREADY_IN_USE, "Key is in use"); - PoolByteArray out; + PackedByteArray out; FileAccess *f = FileAccess::open(p_path, FileAccess::READ); ERR_FAIL_COND_V_MSG(!f, ERR_INVALID_PARAMETER, "Cannot open CryptoKeyMbedTLS file '" + p_path + "'."); int flen = f->get_len(); out.resize(flen + 1); { - PoolByteArray::Write w = out.write(); - f->get_buffer(w.ptr(), flen); + uint8_t *w = out.ptrw(); + f->get_buffer(w, flen); w[flen] = 0; //end f string } memdelete(f); - int ret = mbedtls_pk_parse_key(&pkey, out.read().ptr(), out.size(), NULL, 0); + int ret = mbedtls_pk_parse_key(&pkey, out.ptr(), out.size(), NULL, 0); // We MUST zeroize the memory for safety! - mbedtls_platform_zeroize(out.write().ptr(), out.size()); + mbedtls_platform_zeroize(out.ptrw(), out.size()); ERR_FAIL_COND_V_MSG(ret, FAILED, "Error parsing private key '" + itos(ret) + "'."); return OK; @@ -102,20 +102,20 @@ X509Certificate *X509CertificateMbedTLS::create() { Error X509CertificateMbedTLS::load(String p_path) { ERR_FAIL_COND_V_MSG(locks, ERR_ALREADY_IN_USE, "Certificate is in use"); - PoolByteArray out; + PackedByteArray out; FileAccess *f = FileAccess::open(p_path, FileAccess::READ); ERR_FAIL_COND_V_MSG(!f, ERR_INVALID_PARAMETER, "Cannot open X509CertificateMbedTLS file '" + p_path + "'."); int flen = f->get_len(); out.resize(flen + 1); { - PoolByteArray::Write w = out.write(); - f->get_buffer(w.ptr(), flen); + uint8_t *w = out.ptrw(); + f->get_buffer(w, flen); w[flen] = 0; //end f string } memdelete(f); - int ret = mbedtls_x509_crt_parse(&cert, out.read().ptr(), out.size()); + int ret = mbedtls_x509_crt_parse(&cert, out.ptr(), out.size()); ERR_FAIL_COND_V_MSG(ret, FAILED, "Error parsing some certificates: " + itos(ret)); return OK; @@ -210,15 +210,15 @@ void CryptoMbedTLS::load_default_certificates(String p_path) { #ifdef BUILTIN_CERTS_ENABLED else { // Use builtin certs only if user did not override it in project settings. - PoolByteArray out; + PackedByteArray out; out.resize(_certs_uncompressed_size + 1); - PoolByteArray::Write w = out.write(); - Compression::decompress(w.ptr(), _certs_uncompressed_size, _certs_compressed, _certs_compressed_size, Compression::MODE_DEFLATE); + uint8_t *w = out.ptrw(); + Compression::decompress(w, _certs_uncompressed_size, _certs_compressed, _certs_compressed_size, Compression::MODE_DEFLATE); w[_certs_uncompressed_size] = 0; // Make sure it ends with string terminator #ifdef DEBUG_ENABLED print_verbose("Loaded builtin certs"); #endif - default_certs->load_from_memory(out.read().ptr(), out.size()); + default_certs->load_from_memory(out.ptr(), out.size()); } #endif } @@ -276,9 +276,9 @@ Ref<X509Certificate> CryptoMbedTLS::generate_self_signed_certificate(Ref<CryptoK return out; } -PoolByteArray CryptoMbedTLS::generate_random_bytes(int p_bytes) { - PoolByteArray out; +PackedByteArray CryptoMbedTLS::generate_random_bytes(int p_bytes) { + PackedByteArray out; out.resize(p_bytes); - mbedtls_ctr_drbg_random(&ctr_drbg, out.write().ptr(), p_bytes); + mbedtls_ctr_drbg_random(&ctr_drbg, out.ptrw(), p_bytes); return out; } diff --git a/modules/mbedtls/crypto_mbedtls.h b/modules/mbedtls/crypto_mbedtls.h index edb5841761..6c1c0e255d 100644 --- a/modules/mbedtls/crypto_mbedtls.h +++ b/modules/mbedtls/crypto_mbedtls.h @@ -113,7 +113,7 @@ public: static X509CertificateMbedTLS *get_default_certificates(); static void load_default_certificates(String p_path); - virtual PoolByteArray generate_random_bytes(int p_bytes); + virtual PackedByteArray generate_random_bytes(int p_bytes); virtual Ref<CryptoKey> generate_rsa(int p_bytes); virtual Ref<X509Certificate> generate_self_signed_certificate(Ref<CryptoKey> p_key, String p_issuer_name, String p_not_before, String p_not_after); diff --git a/core/pool_vector.cpp b/modules/mbedtls/dtls_server_mbedtls.cpp index d8d53f07e9..215b511758 100644 --- a/core/pool_vector.cpp +++ b/modules/mbedtls/dtls_server_mbedtls.cpp @@ -1,5 +1,5 @@ /*************************************************************************/ -/* pool_vector.cpp */ +/* dtls_server_mbedtls.cpp */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ @@ -28,43 +28,51 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -#include "pool_vector.h" +#include "dtls_server_mbedtls.h" +#include "packet_peer_mbed_dtls.h" -Mutex *pool_vector_lock = NULL; - -PoolAllocator *MemoryPool::memory_pool = NULL; -uint8_t *MemoryPool::pool_memory = NULL; -size_t *MemoryPool::pool_size = NULL; - -MemoryPool::Alloc *MemoryPool::allocs = NULL; -MemoryPool::Alloc *MemoryPool::free_list = NULL; -uint32_t MemoryPool::alloc_count = 0; -uint32_t MemoryPool::allocs_used = 0; -Mutex *MemoryPool::alloc_mutex = NULL; +Error DTLSServerMbedTLS::setup(Ref<CryptoKey> p_key, Ref<X509Certificate> p_cert, Ref<X509Certificate> p_ca_chain) { + ERR_FAIL_COND_V(_cookies->setup() != OK, ERR_ALREADY_IN_USE); + _key = p_key; + _cert = p_cert; + _ca_chain = p_ca_chain; + return OK; +} -size_t MemoryPool::total_memory = 0; -size_t MemoryPool::max_memory = 0; +void DTLSServerMbedTLS::stop() { + _cookies->clear(); +} -void MemoryPool::setup(uint32_t p_max_allocs) { +Ref<PacketPeerDTLS> DTLSServerMbedTLS::take_connection(Ref<PacketPeerUDP> p_udp_peer) { + Ref<PacketPeerMbedDTLS> out; + out.instance(); - allocs = memnew_arr(Alloc, p_max_allocs); - alloc_count = p_max_allocs; - allocs_used = 0; + ERR_FAIL_COND_V(!out.is_valid(), out); + ERR_FAIL_COND_V(!p_udp_peer.is_valid(), out); + out->accept_peer(p_udp_peer, _key, _cert, _ca_chain, _cookies); + return out; +} - for (uint32_t i = 0; i < alloc_count - 1; i++) { +DTLSServer *DTLSServerMbedTLS::_create_func() { - allocs[i].free_list = &allocs[i + 1]; - } + return memnew(DTLSServerMbedTLS); +} - free_list = &allocs[0]; +void DTLSServerMbedTLS::initialize() { - alloc_mutex = Mutex::create(); + _create = _create_func; + available = true; } -void MemoryPool::cleanup() { +void DTLSServerMbedTLS::finalize() { + _create = NULL; + available = false; +} - memdelete_arr(allocs); - memdelete(alloc_mutex); +DTLSServerMbedTLS::DTLSServerMbedTLS() { + _cookies.instance(); +} - ERR_FAIL_COND_MSG(allocs_used > 0, "There are still MemoryPool allocs in use at exit!"); +DTLSServerMbedTLS::~DTLSServerMbedTLS() { + stop(); } diff --git a/modules/mbedtls/dtls_server_mbedtls.h b/modules/mbedtls/dtls_server_mbedtls.h new file mode 100644 index 0000000000..d61ab3179e --- /dev/null +++ b/modules/mbedtls/dtls_server_mbedtls.h @@ -0,0 +1,58 @@ +/*************************************************************************/ +/* dtls_server_mbedtls.h */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* https://godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 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 MBED_DTLS_SERVER_H +#define MBED_DTLS_SERVER_H + +#include "core/io/dtls_server.h" +#include "ssl_context_mbedtls.h" + +class DTLSServerMbedTLS : public DTLSServer { + +private: + static DTLSServer *_create_func(); + Ref<CryptoKey> _key; + Ref<X509Certificate> _cert; + Ref<X509Certificate> _ca_chain; + Ref<CookieContextMbedTLS> _cookies; + +public: + static void initialize(); + static void finalize(); + + virtual Error setup(Ref<CryptoKey> p_key, Ref<X509Certificate> p_cert, Ref<X509Certificate> p_ca_chain = Ref<X509Certificate>()); + virtual void stop(); + virtual Ref<PacketPeerDTLS> take_connection(Ref<PacketPeerUDP> p_peer); + + DTLSServerMbedTLS(); + ~DTLSServerMbedTLS(); +}; + +#endif // MBED_DTLS_SERVER_H diff --git a/modules/mbedtls/packet_peer_mbed_dtls.cpp b/modules/mbedtls/packet_peer_mbed_dtls.cpp new file mode 100755 index 0000000000..bdf36ad1b1 --- /dev/null +++ b/modules/mbedtls/packet_peer_mbed_dtls.cpp @@ -0,0 +1,297 @@ +/*************************************************************************/ +/* packet_peer_mbed_dtls.cpp */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* https://godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 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 "packet_peer_mbed_dtls.h" +#include "mbedtls/platform_util.h" + +#include "core/io/stream_peer_ssl.h" +#include "core/os/file_access.h" + +int PacketPeerMbedDTLS::bio_send(void *ctx, const unsigned char *buf, size_t len) { + + if (buf == NULL || len <= 0) return 0; + + PacketPeerMbedDTLS *sp = (PacketPeerMbedDTLS *)ctx; + + ERR_FAIL_COND_V(sp == NULL, 0); + + Error err = sp->base->put_packet((const uint8_t *)buf, len); + if (err == ERR_BUSY) { + return MBEDTLS_ERR_SSL_WANT_WRITE; + } else if (err != OK) { + ERR_FAIL_V(MBEDTLS_ERR_SSL_INTERNAL_ERROR); + } + return len; +} + +int PacketPeerMbedDTLS::bio_recv(void *ctx, unsigned char *buf, size_t len) { + + if (buf == NULL || len <= 0) return 0; + + PacketPeerMbedDTLS *sp = (PacketPeerMbedDTLS *)ctx; + + ERR_FAIL_COND_V(sp == NULL, 0); + + int pc = sp->base->get_available_packet_count(); + if (pc == 0) { + return MBEDTLS_ERR_SSL_WANT_READ; + } else if (pc < 0) { + ERR_FAIL_V(MBEDTLS_ERR_SSL_INTERNAL_ERROR); + } + + const uint8_t *buffer; + int buffer_size = 0; + Error err = sp->base->get_packet(&buffer, buffer_size); + if (err != OK) { + return MBEDTLS_ERR_SSL_INTERNAL_ERROR; + } + copymem(buf, buffer, buffer_size); + return buffer_size; +} + +void PacketPeerMbedDTLS::_cleanup() { + + ssl_ctx->clear(); + base = Ref<PacketPeer>(); + status = STATUS_DISCONNECTED; +} + +int PacketPeerMbedDTLS::_set_cookie() { + // Setup DTLS session cookie for this client + uint8_t client_id[18]; + IP_Address addr = base->get_packet_address(); + uint16_t port = base->get_packet_port(); + copymem(client_id, addr.get_ipv6(), 16); + copymem(&client_id[16], (uint8_t *)&port, 2); + return mbedtls_ssl_set_client_transport_id(ssl_ctx->get_context(), client_id, 18); +} + +Error PacketPeerMbedDTLS::_do_handshake() { + int ret = 0; + while ((ret = mbedtls_ssl_handshake(ssl_ctx->get_context())) != 0) { + if (ret != MBEDTLS_ERR_SSL_WANT_READ && ret != MBEDTLS_ERR_SSL_WANT_WRITE) { + if (ret != MBEDTLS_ERR_SSL_HELLO_VERIFY_REQUIRED) { + ERR_PRINT("TLS handshake error: " + itos(ret)); + SSLContextMbedTLS::print_mbedtls_error(ret); + } + _cleanup(); + status = STATUS_ERROR; + return FAILED; + } + // Will retry via poll later + return OK; + } + + status = STATUS_CONNECTED; + return OK; +} + +Error PacketPeerMbedDTLS::connect_to_peer(Ref<PacketPeerUDP> p_base, bool p_validate_certs, const String &p_for_hostname, Ref<X509Certificate> p_ca_certs) { + + ERR_FAIL_COND_V(!p_base.is_valid() || !p_base->is_connected_to_host(), ERR_INVALID_PARAMETER); + + base = p_base; + int ret = 0; + int authmode = p_validate_certs ? MBEDTLS_SSL_VERIFY_REQUIRED : MBEDTLS_SSL_VERIFY_NONE; + + Error err = ssl_ctx->init_client(MBEDTLS_SSL_TRANSPORT_DATAGRAM, authmode, p_ca_certs); + ERR_FAIL_COND_V(err != OK, err); + + mbedtls_ssl_set_hostname(ssl_ctx->get_context(), p_for_hostname.utf8().get_data()); + mbedtls_ssl_set_bio(ssl_ctx->get_context(), this, bio_send, bio_recv, NULL); + mbedtls_ssl_set_timer_cb(ssl_ctx->get_context(), &timer, mbedtls_timing_set_delay, mbedtls_timing_get_delay); + + status = STATUS_HANDSHAKING; + + if ((ret = _do_handshake()) != OK) { + status = STATUS_ERROR_HOSTNAME_MISMATCH; + return FAILED; + } + + return OK; +} + +Error PacketPeerMbedDTLS::accept_peer(Ref<PacketPeerUDP> p_base, Ref<CryptoKey> p_key, Ref<X509Certificate> p_cert, Ref<X509Certificate> p_ca_chain, Ref<CookieContextMbedTLS> p_cookies) { + + Error err = ssl_ctx->init_server(MBEDTLS_SSL_TRANSPORT_DATAGRAM, MBEDTLS_SSL_VERIFY_NONE, p_key, p_cert, p_cookies); + ERR_FAIL_COND_V(err != OK, err); + + base = p_base; + base->set_blocking_mode(false); + + mbedtls_ssl_session_reset(ssl_ctx->get_context()); + + int ret = _set_cookie(); + if (ret != 0) { + _cleanup(); + ERR_FAIL_V_MSG(FAILED, "Error setting DTLS client cookie"); + } + + mbedtls_ssl_set_bio(ssl_ctx->get_context(), this, bio_send, bio_recv, NULL); + mbedtls_ssl_set_timer_cb(ssl_ctx->get_context(), &timer, mbedtls_timing_set_delay, mbedtls_timing_get_delay); + + status = STATUS_HANDSHAKING; + + if ((ret = _do_handshake()) != OK) { + status = STATUS_ERROR; + return FAILED; + } + + return OK; +} + +Error PacketPeerMbedDTLS::put_packet(const uint8_t *p_buffer, int p_bytes) { + + ERR_FAIL_COND_V(status != STATUS_CONNECTED, ERR_UNCONFIGURED); + + if (p_bytes == 0) + return OK; + + int ret = mbedtls_ssl_write(ssl_ctx->get_context(), p_buffer, p_bytes); + if (ret == MBEDTLS_ERR_SSL_WANT_READ || ret == MBEDTLS_ERR_SSL_WANT_WRITE) { + ret = 0; // non blocking io + } else if (ret <= 0) { + SSLContextMbedTLS::print_mbedtls_error(ret); + _cleanup(); + return ERR_CONNECTION_ERROR; + } + + return OK; +} + +Error PacketPeerMbedDTLS::get_packet(const uint8_t **r_buffer, int &r_bytes) { + + ERR_FAIL_COND_V(status != STATUS_CONNECTED, ERR_UNCONFIGURED); + + r_bytes = 0; + + int ret = mbedtls_ssl_read(ssl_ctx->get_context(), packet_buffer, PACKET_BUFFER_SIZE); + if (ret == MBEDTLS_ERR_SSL_WANT_READ || ret == MBEDTLS_ERR_SSL_WANT_WRITE) { + ret = 0; // non blocking io + } else if (ret <= 0) { + if (ret == MBEDTLS_ERR_SSL_PEER_CLOSE_NOTIFY) { + // Also send close notify back + disconnect_from_peer(); + } else { + _cleanup(); + status = STATUS_ERROR; + SSLContextMbedTLS::print_mbedtls_error(ret); + } + return ERR_CONNECTION_ERROR; + } + *r_buffer = packet_buffer; + r_bytes = ret; + + return OK; +} + +void PacketPeerMbedDTLS::poll() { + + if (status == STATUS_HANDSHAKING) { + _do_handshake(); + return; + } else if (status != STATUS_CONNECTED) { + return; + } + + ERR_FAIL_COND(!base.is_valid()); + + int ret = mbedtls_ssl_read(ssl_ctx->get_context(), NULL, 0); + + if (ret < 0 && ret != MBEDTLS_ERR_SSL_WANT_READ && ret != MBEDTLS_ERR_SSL_WANT_WRITE) { + if (ret == MBEDTLS_ERR_SSL_PEER_CLOSE_NOTIFY) { + // Also send close notify back + disconnect_from_peer(); + } else { + _cleanup(); + status = STATUS_ERROR; + SSLContextMbedTLS::print_mbedtls_error(ret); + } + } +} + +int PacketPeerMbedDTLS::get_available_packet_count() const { + + ERR_FAIL_COND_V(status != STATUS_CONNECTED, 0); + + return mbedtls_ssl_get_bytes_avail(&(ssl_ctx->ssl)) > 0 ? 1 : 0; +} + +int PacketPeerMbedDTLS::get_max_packet_size() const { + + return 488; // 512 (UDP in Godot) - 24 (DTLS header) +} + +PacketPeerMbedDTLS::PacketPeerMbedDTLS() { + + ssl_ctx.instance(); + status = STATUS_DISCONNECTED; +} + +PacketPeerMbedDTLS::~PacketPeerMbedDTLS() { + disconnect_from_peer(); +} + +void PacketPeerMbedDTLS::disconnect_from_peer() { + + if (status != STATUS_CONNECTED && status != STATUS_HANDSHAKING) + return; + + if (status == STATUS_CONNECTED) { + int ret = 0; + // Send SSL close notification, blocking, but ignore other errors. + do + ret = mbedtls_ssl_close_notify(ssl_ctx->get_context()); + while (ret == MBEDTLS_ERR_SSL_WANT_WRITE); + } + + _cleanup(); +} + +PacketPeerMbedDTLS::Status PacketPeerMbedDTLS::get_status() const { + + return status; +} + +PacketPeerDTLS *PacketPeerMbedDTLS::_create_func() { + + return memnew(PacketPeerMbedDTLS); +} + +void PacketPeerMbedDTLS::initialize_dtls() { + + _create = _create_func; + available = true; +} + +void PacketPeerMbedDTLS::finalize_dtls() { + _create = NULL; + available = false; +} diff --git a/modules/mbedtls/packet_peer_mbed_dtls.h b/modules/mbedtls/packet_peer_mbed_dtls.h new file mode 100755 index 0000000000..26c4543785 --- /dev/null +++ b/modules/mbedtls/packet_peer_mbed_dtls.h @@ -0,0 +1,88 @@ +/*************************************************************************/ +/* packet_peer_mbed_dtls.h */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* https://godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 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 PACKET_PEER_MBED_DTLS_H +#define PACKET_PEER_MBED_DTLS_H + +#include "core/io/packet_peer_dtls.h" +#include "ssl_context_mbedtls.h" + +#include <mbedtls/timing.h> + +class PacketPeerMbedDTLS : public PacketPeerDTLS { +private: + enum { + PACKET_BUFFER_SIZE = 65536 + }; + + uint8_t packet_buffer[PACKET_BUFFER_SIZE]; + + Status status; + String hostname; + + Ref<PacketPeerUDP> base; + + static PacketPeerDTLS *_create_func(); + + static int bio_recv(void *ctx, unsigned char *buf, size_t len); + static int bio_send(void *ctx, const unsigned char *buf, size_t len); + void _cleanup(); + +protected: + Ref<SSLContextMbedTLS> ssl_ctx; + mbedtls_timing_delay_context timer; + + static void _bind_methods(); + + Error _do_handshake(); + int _set_cookie(); + +public: + virtual void poll(); + virtual Error accept_peer(Ref<PacketPeerUDP> p_base, Ref<CryptoKey> p_key, Ref<X509Certificate> p_cert = Ref<X509Certificate>(), Ref<X509Certificate> p_ca_chain = Ref<X509Certificate>(), Ref<CookieContextMbedTLS> p_cookies = Ref<CookieContextMbedTLS>()); + virtual Error connect_to_peer(Ref<PacketPeerUDP> p_base, bool p_validate_certs = false, const String &p_for_hostname = String(), Ref<X509Certificate> p_ca_certs = Ref<X509Certificate>()); + virtual Status get_status() const; + + virtual void disconnect_from_peer(); + + virtual Error get_packet(const uint8_t **r_buffer, int &r_buffer_size); + virtual Error put_packet(const uint8_t *p_buffer, int p_buffer_size); + + virtual int get_available_packet_count() const; + virtual int get_max_packet_size() const; + + static void initialize_dtls(); + static void finalize_dtls(); + + PacketPeerMbedDTLS(); + ~PacketPeerMbedDTLS(); +}; + +#endif // PACKET_PEER_MBED_DTLS_H diff --git a/modules/mbedtls/register_types.cpp b/modules/mbedtls/register_types.cpp index 8f9e2c370b..d39af7fe87 100755 --- a/modules/mbedtls/register_types.cpp +++ b/modules/mbedtls/register_types.cpp @@ -31,16 +31,22 @@ #include "register_types.h" #include "crypto_mbedtls.h" +#include "dtls_server_mbedtls.h" +#include "packet_peer_mbed_dtls.h" #include "stream_peer_mbedtls.h" void register_mbedtls_types() { CryptoMbedTLS::initialize_crypto(); StreamPeerMbedTLS::initialize_ssl(); + PacketPeerMbedDTLS::initialize_dtls(); + DTLSServerMbedTLS::initialize(); } void unregister_mbedtls_types() { + DTLSServerMbedTLS::finalize(); + PacketPeerMbedDTLS::finalize_dtls(); StreamPeerMbedTLS::finalize_ssl(); CryptoMbedTLS::finalize_crypto(); } diff --git a/modules/mbedtls/ssl_context_mbedtls.cpp b/modules/mbedtls/ssl_context_mbedtls.cpp index 82584e3494..52630bd98c 100644 --- a/modules/mbedtls/ssl_context_mbedtls.cpp +++ b/modules/mbedtls/ssl_context_mbedtls.cpp @@ -38,6 +38,53 @@ static void my_debug(void *ctx, int level, fflush(stdout); } +void SSLContextMbedTLS::print_mbedtls_error(int p_ret) { + printf("mbedtls error: returned -0x%x\n\n", -p_ret); + fflush(stdout); +} + +/// CookieContextMbedTLS + +Error CookieContextMbedTLS::setup() { + ERR_FAIL_COND_V_MSG(inited, ERR_ALREADY_IN_USE, "This cookie context is already in use"); + + mbedtls_ctr_drbg_init(&ctr_drbg); + mbedtls_entropy_init(&entropy); + mbedtls_ssl_cookie_init(&cookie_ctx); + inited = true; + + int ret = mbedtls_ctr_drbg_seed(&ctr_drbg, mbedtls_entropy_func, &entropy, NULL, 0); + if (ret != 0) { + clear(); // Never leave unusable resources around. + ERR_FAIL_V_MSG(FAILED, "mbedtls_ctr_drbg_seed returned an error " + itos(ret)); + } + + ret = mbedtls_ssl_cookie_setup(&cookie_ctx, mbedtls_ctr_drbg_random, &ctr_drbg); + if (ret != 0) { + clear(); + ERR_FAIL_V_MSG(FAILED, "mbedtls_ssl_cookie_setup returned an error " + itos(ret)); + } + return OK; +} + +void CookieContextMbedTLS::clear() { + if (!inited) + return; + mbedtls_ctr_drbg_free(&ctr_drbg); + mbedtls_entropy_free(&entropy); + mbedtls_ssl_cookie_free(&cookie_ctx); +} + +CookieContextMbedTLS::CookieContextMbedTLS() { + inited = false; +} + +CookieContextMbedTLS::~CookieContextMbedTLS() { + clear(); +} + +/// SSLContextMbedTLS + Error SSLContextMbedTLS::_setup(int p_endpoint, int p_transport, int p_authmode) { ERR_FAIL_COND_V_MSG(inited, ERR_ALREADY_IN_USE, "This SSL context is already active"); @@ -50,7 +97,7 @@ Error SSLContextMbedTLS::_setup(int p_endpoint, int p_transport, int p_authmode) int ret = mbedtls_ctr_drbg_seed(&ctr_drbg, mbedtls_entropy_func, &entropy, NULL, 0); if (ret != 0) { clear(); // Never leave unusable resources around. - ERR_FAIL_V_MSG(FAILED, "mbedtls_ctr_drbg_seed returned an error" + itos(ret)); + ERR_FAIL_V_MSG(FAILED, "mbedtls_ctr_drbg_seed returned an error " + itos(ret)); } ret = mbedtls_ssl_config_defaults(&conf, p_endpoint, p_transport, MBEDTLS_SSL_PRESET_DEFAULT); @@ -64,7 +111,7 @@ Error SSLContextMbedTLS::_setup(int p_endpoint, int p_transport, int p_authmode) return OK; } -Error SSLContextMbedTLS::init_server(int p_transport, int p_authmode, Ref<CryptoKeyMbedTLS> p_pkey, Ref<X509CertificateMbedTLS> p_cert) { +Error SSLContextMbedTLS::init_server(int p_transport, int p_authmode, Ref<CryptoKeyMbedTLS> p_pkey, Ref<X509CertificateMbedTLS> p_cert, Ref<CookieContextMbedTLS> p_cookies) { ERR_FAIL_COND_V(!p_pkey.is_valid(), ERR_INVALID_PARAMETER); ERR_FAIL_COND_V(!p_cert.is_valid(), ERR_INVALID_PARAMETER); @@ -89,6 +136,15 @@ Error SSLContextMbedTLS::init_server(int p_transport, int p_authmode, Ref<Crypto if (certs->cert.next) { mbedtls_ssl_conf_ca_chain(&conf, certs->cert.next, NULL); } + // DTLS Cookies + if (p_transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM) { + if (p_cookies.is_null() || !p_cookies->inited) { + clear(); + ERR_FAIL_V(ERR_BUG); + } + cookies = p_cookies; + mbedtls_ssl_conf_dtls_cookies(&conf, mbedtls_ssl_cookie_write, mbedtls_ssl_cookie_check, &(cookies->cookie_ctx)); + } mbedtls_ssl_setup(&ssl, &conf); return OK; } @@ -134,6 +190,7 @@ void SSLContextMbedTLS::clear() { if (pkey.is_valid()) pkey->unlock(); pkey = Ref<CryptoKeyMbedTLS>(); + cookies = Ref<CookieContextMbedTLS>(); inited = false; } diff --git a/modules/mbedtls/ssl_context_mbedtls.h b/modules/mbedtls/ssl_context_mbedtls.h index 9145e0fd72..d3e1f87a8e 100644 --- a/modules/mbedtls/ssl_context_mbedtls.h +++ b/modules/mbedtls/ssl_context_mbedtls.h @@ -34,7 +34,7 @@ #include "crypto_mbedtls.h" #include "core/os/file_access.h" -#include "core/pool_vector.h" + #include "core/reference.h" #include <mbedtls/config.h> @@ -42,25 +42,49 @@ #include <mbedtls/debug.h> #include <mbedtls/entropy.h> #include <mbedtls/ssl.h> +#include <mbedtls/ssl_cookie.h> + +class SSLContextMbedTLS; + +class CookieContextMbedTLS : public Reference { + + friend class SSLContextMbedTLS; + +protected: + bool inited; + mbedtls_entropy_context entropy; + mbedtls_ctr_drbg_context ctr_drbg; + mbedtls_ssl_cookie_ctx cookie_ctx; + +public: + Error setup(); + void clear(); + + CookieContextMbedTLS(); + ~CookieContextMbedTLS(); +}; class SSLContextMbedTLS : public Reference { protected: bool inited; - static PoolByteArray _read_file(String p_path); + static PackedByteArray _read_file(String p_path); public: + static void print_mbedtls_error(int p_ret); + Ref<X509CertificateMbedTLS> certs; mbedtls_entropy_context entropy; mbedtls_ctr_drbg_context ctr_drbg; mbedtls_ssl_context ssl; mbedtls_ssl_config conf; + Ref<CookieContextMbedTLS> cookies; Ref<CryptoKeyMbedTLS> pkey; Error _setup(int p_endpoint, int p_transport, int p_authmode); - Error init_server(int p_transport, int p_authmode, Ref<CryptoKeyMbedTLS> p_pkey, Ref<X509CertificateMbedTLS> p_cert); + Error init_server(int p_transport, int p_authmode, Ref<CryptoKeyMbedTLS> p_pkey, Ref<X509CertificateMbedTLS> p_cert, Ref<CookieContextMbedTLS> p_cookies = Ref<CookieContextMbedTLS>()); Error init_client(int p_transport, int p_authmode, Ref<X509CertificateMbedTLS> p_valid_cas); void clear(); diff --git a/modules/mbedtls/stream_peer_mbedtls.cpp b/modules/mbedtls/stream_peer_mbedtls.cpp index f06327e0d5..03c5922267 100755 --- a/modules/mbedtls/stream_peer_mbedtls.cpp +++ b/modules/mbedtls/stream_peer_mbedtls.cpp @@ -33,11 +33,6 @@ #include "core/io/stream_peer_tcp.h" #include "core/os/file_access.h" -void _print_error(int ret) { - printf("mbedtls error: returned -0x%x\n\n", -ret); - fflush(stdout); -} - int StreamPeerMbedTLS::bio_send(void *ctx, const unsigned char *buf, size_t len) { if (buf == NULL || len <= 0) return 0; @@ -89,7 +84,7 @@ Error StreamPeerMbedTLS::_do_handshake() { if (ret != MBEDTLS_ERR_SSL_WANT_READ && ret != MBEDTLS_ERR_SSL_WANT_WRITE) { // An error occurred. ERR_PRINT("TLS handshake error: " + itos(ret)); - _print_error(ret); + SSLContextMbedTLS::print_mbedtls_error(ret); disconnect_from_stream(); status = STATUS_ERROR; return FAILED; @@ -188,7 +183,7 @@ Error StreamPeerMbedTLS::put_partial_data(const uint8_t *p_data, int p_bytes, in disconnect_from_stream(); return ERR_FILE_EOF; } else if (ret <= 0) { - _print_error(ret); + SSLContextMbedTLS::print_mbedtls_error(ret); disconnect_from_stream(); return ERR_CONNECTION_ERROR; } @@ -233,7 +228,7 @@ Error StreamPeerMbedTLS::get_partial_data(uint8_t *p_buffer, int p_bytes, int &r disconnect_from_stream(); return ERR_FILE_EOF; } else if (ret <= 0) { - _print_error(ret); + SSLContextMbedTLS::print_mbedtls_error(ret); disconnect_from_stream(); return ERR_CONNECTION_ERROR; } @@ -264,7 +259,7 @@ void StreamPeerMbedTLS::poll() { disconnect_from_stream(); return; } else if (ret < 0) { - _print_error(ret); + SSLContextMbedTLS::print_mbedtls_error(ret); disconnect_from_stream(); return; } diff --git a/modules/mobile_vr/mobile_vr_interface.cpp b/modules/mobile_vr/mobile_vr_interface.cpp index afa8766bce..2f1d95cd42 100644 --- a/modules/mobile_vr/mobile_vr_interface.cpp +++ b/modules/mobile_vr/mobile_vr_interface.cpp @@ -221,13 +221,13 @@ void MobileVRInterface::_bind_methods() { ClassDB::bind_method(D_METHOD("set_k2", "k"), &MobileVRInterface::set_k2); ClassDB::bind_method(D_METHOD("get_k2"), &MobileVRInterface::get_k2); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "eye_height", PROPERTY_HINT_RANGE, "0.0,3.0,0.1"), "set_eye_height", "get_eye_height"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "iod", PROPERTY_HINT_RANGE, "4.0,10.0,0.1"), "set_iod", "get_iod"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "display_width", PROPERTY_HINT_RANGE, "5.0,25.0,0.1"), "set_display_width", "get_display_width"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "display_to_lens", PROPERTY_HINT_RANGE, "5.0,25.0,0.1"), "set_display_to_lens", "get_display_to_lens"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "oversample", PROPERTY_HINT_RANGE, "1.0,2.0,0.1"), "set_oversample", "get_oversample"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "k1", PROPERTY_HINT_RANGE, "0.1,10.0,0.0001"), "set_k1", "get_k1"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "k2", PROPERTY_HINT_RANGE, "0.1,10.0,0.0001"), "set_k2", "get_k2"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "eye_height", PROPERTY_HINT_RANGE, "0.0,3.0,0.1"), "set_eye_height", "get_eye_height"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "iod", PROPERTY_HINT_RANGE, "4.0,10.0,0.1"), "set_iod", "get_iod"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "display_width", PROPERTY_HINT_RANGE, "5.0,25.0,0.1"), "set_display_width", "get_display_width"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "display_to_lens", PROPERTY_HINT_RANGE, "5.0,25.0,0.1"), "set_display_to_lens", "get_display_to_lens"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "oversample", PROPERTY_HINT_RANGE, "1.0,2.0,0.1"), "set_oversample", "get_oversample"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "k1", PROPERTY_HINT_RANGE, "0.1,10.0,0.0001"), "set_k1", "get_k1"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "k2", PROPERTY_HINT_RANGE, "0.1,10.0,0.0001"), "set_k2", "get_k2"); } void MobileVRInterface::set_eye_height(const real_t p_eye_height) { diff --git a/modules/mono/build_scripts/make_android_mono_config.py b/modules/mono/build_scripts/make_android_mono_config.py index 8cad204d7b..0afd939c57 100644 --- a/modules/mono/build_scripts/make_android_mono_config.py +++ b/modules/mono/build_scripts/make_android_mono_config.py @@ -24,7 +24,7 @@ def generate_compressed_config(config_src, output_dir): #ifdef ANDROID_ENABLED #include "core/io/compression.h" -#include "core/pool_vector.h" + namespace { @@ -36,9 +36,9 @@ static const unsigned char config_compressed_data[] = { %s }; } // namespace String get_godot_android_mono_config() { - PoolVector<uint8_t> data; + Vector<uint8_t> data; data.resize(config_uncompressed_size); - PoolVector<uint8_t>::Write w = data.write(); + uint8_t* w = data.ptrw(); Compression::decompress(w.ptr(), config_uncompressed_size, config_compressed_data, config_compressed_size, Compression::MODE_DEFLATE); String s; diff --git a/modules/mono/csharp_script.cpp b/modules/mono/csharp_script.cpp index 43cdd19411..5c1c098e3e 100644 --- a/modules/mono/csharp_script.cpp +++ b/modules/mono/csharp_script.cpp @@ -411,7 +411,7 @@ static String variant_type_to_managed_name(const String &p_var_type_name) { if (p_var_type_name == Variant::get_type_name(Variant::OBJECT)) return "Godot.Object"; - if (p_var_type_name == Variant::get_type_name(Variant::REAL)) { + if (p_var_type_name == Variant::get_type_name(Variant::FLOAT)) { #ifdef REAL_T_IS_DOUBLE return "double"; #else @@ -428,24 +428,24 @@ static String variant_type_to_managed_name(const String &p_var_type_name) { if (p_var_type_name == Variant::get_type_name(Variant::ARRAY)) return "Collections.Array"; - if (p_var_type_name == Variant::get_type_name(Variant::POOL_BYTE_ARRAY)) + if (p_var_type_name == Variant::get_type_name(Variant::PACKED_BYTE_ARRAY)) return "byte[]"; - if (p_var_type_name == Variant::get_type_name(Variant::POOL_INT_ARRAY)) + if (p_var_type_name == Variant::get_type_name(Variant::PACKED_INT32_ARRAY)) return "int[]"; - if (p_var_type_name == Variant::get_type_name(Variant::POOL_REAL_ARRAY)) { + if (p_var_type_name == Variant::get_type_name(Variant::PACKED_FLOAT32_ARRAY)) { #ifdef REAL_T_IS_DOUBLE return "double[]"; #else return "float[]"; #endif } - if (p_var_type_name == Variant::get_type_name(Variant::POOL_STRING_ARRAY)) + if (p_var_type_name == Variant::get_type_name(Variant::PACKED_STRING_ARRAY)) return "string[]"; - if (p_var_type_name == Variant::get_type_name(Variant::POOL_VECTOR2_ARRAY)) + if (p_var_type_name == Variant::get_type_name(Variant::PACKED_VECTOR2_ARRAY)) return "Vector2[]"; - if (p_var_type_name == Variant::get_type_name(Variant::POOL_VECTOR3_ARRAY)) + if (p_var_type_name == Variant::get_type_name(Variant::PACKED_VECTOR3_ARRAY)) return "Vector3[]"; - if (p_var_type_name == Variant::get_type_name(Variant::POOL_COLOR_ARRAY)) + if (p_var_type_name == Variant::get_type_name(Variant::PACKED_COLOR_ARRAY)) return "Color[]"; Variant::Type var_types[] = { @@ -473,7 +473,7 @@ static String variant_type_to_managed_name(const String &p_var_type_name) { return "object"; } -String CSharpLanguage::make_function(const String &, const String &p_name, const PoolStringArray &p_args) const { +String CSharpLanguage::make_function(const String &, const String &p_name, const PackedStringArray &p_args) const { // FIXME // - Due to Godot's API limitation this just appends the function to the end of the file // - Use fully qualified name if there is ambiguity @@ -491,7 +491,7 @@ String CSharpLanguage::make_function(const String &, const String &p_name, const return s; } #else -String CSharpLanguage::make_function(const String &, const String &, const PoolStringArray &) const { +String CSharpLanguage::make_function(const String &, const String &, const PackedStringArray &) const { return String(); } #endif @@ -854,7 +854,7 @@ void CSharpLanguage::reload_assemblies(bool p_soft_reload) { while (script->instances.front()) { Object *obj = script->instances.front()->get(); - obj->set_script(RefPtr()); // Remove script and existing script instances (placeholder are not removed before domain reload) + obj->set_script(REF()); // Remove script and existing script instances (placeholder are not removed before domain reload) } script->_clear(); @@ -877,7 +877,7 @@ void CSharpLanguage::reload_assemblies(bool p_soft_reload) { // Use a placeholder for now to avoid losing the state when saving a scene - obj->set_script(scr.get_ref_ptr()); + obj->set_script(scr); PlaceHolderScriptInstance *placeholder = scr->placeholder_instance_create(obj); obj->set_script_instance(placeholder); @@ -1003,7 +1003,7 @@ void CSharpLanguage::reload_assemblies(bool p_soft_reload) { CRASH_COND(si != NULL); #endif // Re-create script instance - obj->set_script(script.get_ref_ptr()); // will create the script instance as well + obj->set_script(script); // will create the script instance as well } } @@ -1720,7 +1720,7 @@ bool CSharpInstance::has_method(const StringName &p_method) const { return false; } -Variant CSharpInstance::call(const StringName &p_method, const Variant **p_args, int p_argcount, Variant::CallError &r_error) { +Variant CSharpInstance::call(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error) { ERR_FAIL_COND_V(!script.is_valid(), Variant()); @@ -1729,7 +1729,7 @@ Variant CSharpInstance::call(const StringName &p_method, const Variant **p_args, MonoObject *mono_object = get_mono_object(); if (!mono_object) { - r_error.error = Variant::CallError::CALL_ERROR_INSTANCE_IS_NULL; + r_error.error = Callable::CallError::CALL_ERROR_INSTANCE_IS_NULL; ERR_FAIL_V(Variant()); } @@ -1741,7 +1741,7 @@ Variant CSharpInstance::call(const StringName &p_method, const Variant **p_args, if (method) { MonoObject *return_value = method->invoke(mono_object, p_args); - r_error.error = Variant::CallError::CALL_OK; + r_error.error = Callable::CallError::CALL_OK; if (return_value) { return GDMonoMarshal::mono_object_to_variant(return_value); @@ -1753,7 +1753,7 @@ Variant CSharpInstance::call(const StringName &p_method, const Variant **p_args, top = top->get_parent_class(); } - r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD; return Variant(); } @@ -2704,11 +2704,11 @@ void CSharpScript::_clear() { script_class = NULL; } -Variant CSharpScript::call(const StringName &p_method, const Variant **p_args, int p_argcount, Variant::CallError &r_error) { +Variant CSharpScript::call(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error) { if (unlikely(GDMono::get_singleton() == NULL)) { // Probably not the best error but eh. - r_error.error = Variant::CallError::CALL_ERROR_INSTANCE_IS_NULL; + r_error.error = Callable::CallError::CALL_ERROR_INSTANCE_IS_NULL; return Variant(); } @@ -2904,7 +2904,7 @@ StringName CSharpScript::get_instance_base_type() const { return StringName(); } -CSharpInstance *CSharpScript::_create_instance(const Variant **p_args, int p_argcount, Object *p_owner, bool p_isref, Variant::CallError &r_error) { +CSharpInstance *CSharpScript::_create_instance(const Variant **p_args, int p_argcount, Object *p_owner, bool p_isref, Callable::CallError &r_error) { GD_MONO_ASSERT_THREAD_ATTACHED; @@ -2968,7 +2968,7 @@ CSharpInstance *CSharpScript::_create_instance(const Variant **p_args, int p_arg CRASH_COND(die == true); p_owner->set_script_instance(NULL); - r_error.error = Variant::CallError::CALL_ERROR_INSTANCE_IS_NULL; + r_error.error = Callable::CallError::CALL_ERROR_INSTANCE_IS_NULL; ERR_FAIL_V_MSG(NULL, "Failed to allocate memory for the object."); } @@ -2994,14 +2994,14 @@ CSharpInstance *CSharpScript::_create_instance(const Variant **p_args, int p_arg return instance; } -Variant CSharpScript::_new(const Variant **p_args, int p_argcount, Variant::CallError &r_error) { +Variant CSharpScript::_new(const Variant **p_args, int p_argcount, Callable::CallError &r_error) { if (!valid) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD; return Variant(); } - r_error.error = Variant::CallError::CALL_OK; + r_error.error = Callable::CallError::CALL_OK; ERR_FAIL_NULL_V(native, Variant()); @@ -3049,7 +3049,7 @@ ScriptInstance *CSharpScript::instance_create(Object *p_this) { GD_MONO_SCOPE_THREAD_ATTACH; - Variant::CallError unchecked_error; + Callable::CallError unchecked_error; return _create_instance(NULL, 0, p_this, Object::cast_to<Reference>(p_this) != NULL, unchecked_error); } diff --git a/modules/mono/csharp_script.h b/modules/mono/csharp_script.h index 32a5b30c18..627218eaf5 100644 --- a/modules/mono/csharp_script.h +++ b/modules/mono/csharp_script.h @@ -141,8 +141,8 @@ class CSharpScript : public Script { static int _try_get_member_export_hint(IMonoClassMember *p_member, ManagedType p_type, Variant::Type p_variant_type, bool p_allow_generics, PropertyHint &r_hint, String &r_hint_string); #endif - CSharpInstance *_create_instance(const Variant **p_args, int p_argcount, Object *p_owner, bool p_isref, Variant::CallError &r_error); - Variant _new(const Variant **p_args, int p_argcount, Variant::CallError &r_error); + CSharpInstance *_create_instance(const Variant **p_args, int p_argcount, Object *p_owner, bool p_isref, Callable::CallError &r_error); + Variant _new(const Variant **p_args, int p_argcount, Callable::CallError &r_error); // Do not use unless you know what you are doing friend void GDMonoInternals::tie_managed_to_unmanaged(MonoObject *, Object *); @@ -154,7 +154,7 @@ class CSharpScript : public Script { protected: static void _bind_methods(); - Variant call(const StringName &p_method, const Variant **p_args, int p_argcount, Variant::CallError &r_error); + Variant call(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error); virtual void _resource_path_changed(); bool _get(const StringName &p_name, Variant &r_ret) const; bool _set(const StringName &p_name, const Variant &p_value); @@ -265,7 +265,7 @@ public: /* TODO */ virtual void get_method_list(List<MethodInfo> *p_list) const {} virtual bool has_method(const StringName &p_method) const; - virtual Variant call(const StringName &p_method, const Variant **p_args, int p_argcount, Variant::CallError &r_error); + virtual Variant call(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error); virtual void call_multilevel(const StringName &p_method, const Variant **p_args, int p_argcount); virtual void call_multilevel_reversed(const StringName &p_method, const Variant **p_args, int p_argcount); @@ -432,7 +432,7 @@ public: virtual bool has_named_classes() const; virtual bool supports_builtin_mode() const; /* TODO? */ virtual int find_function(const String &p_function, const String &p_code) const { return -1; } - virtual String make_function(const String &p_class, const String &p_name, const PoolStringArray &p_args) const; + virtual String make_function(const String &p_class, const String &p_name, const PackedStringArray &p_args) const; virtual String _get_indentation() const; /* TODO? */ virtual void auto_indent_code(String &p_code, int p_from_line, int p_to_line) const {} /* TODO */ virtual void add_global_constant(const StringName &p_variable, const Variant &p_value) {} diff --git a/modules/mono/doc_classes/@C#.xml b/modules/mono/doc_classes/@C#.xml index 826c106d7e..83a7fbf02c 100644 --- a/modules/mono/doc_classes/@C#.xml +++ b/modules/mono/doc_classes/@C#.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="@C#" category="Core" version="3.2"> +<class name="@C#" version="4.0"> <brief_description> </brief_description> <description> diff --git a/modules/mono/doc_classes/CSharpScript.xml b/modules/mono/doc_classes/CSharpScript.xml index de2e246ea9..1eb3404f9e 100644 --- a/modules/mono/doc_classes/CSharpScript.xml +++ b/modules/mono/doc_classes/CSharpScript.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="CSharpScript" inherits="Script" category="Core" version="3.2"> +<class name="CSharpScript" inherits="Script" version="4.0"> <brief_description> </brief_description> <description> @@ -8,7 +8,7 @@ </tutorials> <methods> <method name="new" qualifiers="vararg"> - <return type="Object"> + <return type="Variant"> </return> <description> </description> diff --git a/modules/mono/doc_classes/GodotSharp.xml b/modules/mono/doc_classes/GodotSharp.xml index 18556a84ba..19a08d2036 100644 --- a/modules/mono/doc_classes/GodotSharp.xml +++ b/modules/mono/doc_classes/GodotSharp.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="GodotSharp" inherits="Object" category="Core" version="3.2"> +<class name="GodotSharp" inherits="Object" version="4.0"> <brief_description> </brief_description> <description> diff --git a/modules/mono/editor/GodotTools/GodotTools/BottomPanel.cs b/modules/mono/editor/GodotTools/GodotTools/BottomPanel.cs index 4c76d2abf1..bd7eb59913 100644 --- a/modules/mono/editor/GodotTools/GodotTools/BottomPanel.cs +++ b/modules/mono/editor/GodotTools/GodotTools/BottomPanel.cs @@ -172,7 +172,7 @@ namespace GodotTools return; // Notify running game for hot-reload - Internal.ScriptEditorDebuggerReloadScripts(); + Internal.EditorDebuggerNodeReloadScripts(); // Hot-reload in the editor GodotSharpEditor.Instance.GetNode<HotReloadAssemblyWatcher>("HotReloadAssemblyWatcher").RestartTimer(); diff --git a/modules/mono/editor/GodotTools/GodotTools/Build/MsBuildFinder.cs b/modules/mono/editor/GodotTools/GodotTools/Build/MsBuildFinder.cs index c3db52aa9e..af8d070cbd 100644 --- a/modules/mono/editor/GodotTools/GodotTools/Build/MsBuildFinder.cs +++ b/modules/mono/editor/GodotTools/GodotTools/Build/MsBuildFinder.cs @@ -2,6 +2,7 @@ using System; using System.Collections.Generic; using System.IO; using Godot; +using GodotTools.Ides.Rider; using GodotTools.Internals; using Directory = System.IO.Directory; using Environment = System.Environment; @@ -54,6 +55,12 @@ namespace GodotTools.Build return msbuildPath; } + case BuildManager.BuildTool.JetBrainsMsBuild: + var editorPath = (string)editorSettings.GetSetting(RiderPathManager.EditorPathSettingName); + if (!File.Exists(editorPath)) + throw new FileNotFoundException($"Cannot find Rider executable. Tried with path: {editorPath}"); + var riderDir = new FileInfo(editorPath).Directory.Parent; + return Path.Combine(riderDir.FullName, @"tools\MSBuild\Current\Bin\MSBuild.exe"); default: throw new IndexOutOfRangeException("Invalid build tool in editor settings"); } diff --git a/modules/mono/editor/GodotTools/GodotTools/BuildManager.cs b/modules/mono/editor/GodotTools/GodotTools/BuildManager.cs index fa6bf4dafd..69a8c9cf4a 100644 --- a/modules/mono/editor/GodotTools/GodotTools/BuildManager.cs +++ b/modules/mono/editor/GodotTools/GodotTools/BuildManager.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.IO; using System.Threading.Tasks; using GodotTools.Build; +using GodotTools.Ides.Rider; using GodotTools.Internals; using GodotTools.Utils; using static GodotTools.Internals.Globals; @@ -16,6 +17,7 @@ namespace GodotTools public const string PropNameMsbuildMono = "MSBuild (Mono)"; public const string PropNameMsbuildVs = "MSBuild (VS Build Tools)"; + public const string PropNameMsbuildJetBrains = "MSBuild (JetBrains Rider)"; public const string MsBuildIssuesFileName = "msbuild_issues.csv"; public const string MsBuildLogFileName = "msbuild_log.txt"; @@ -23,7 +25,8 @@ namespace GodotTools public enum BuildTool { MsBuildMono, - MsBuildVs + MsBuildVs, + JetBrainsMsBuild } private static void RemoveOldIssuesFile(BuildInfo buildInfo) @@ -181,7 +184,7 @@ namespace GodotTools var buildInfo = new BuildInfo(GodotSharpDirs.ProjectSlnPath, config); // Add Godot defines - string constants = buildTool == BuildTool.MsBuildVs ? "GodotDefineConstants=\"" : "GodotDefineConstants=\\\""; + string constants = buildTool != BuildTool.MsBuildMono ? "GodotDefineConstants=\"" : "GodotDefineConstants=\\\""; foreach (var godotDefine in godotDefines) constants += $"GODOT_{godotDefine.ToUpper().Replace("-", "_").Replace(" ", "_").Replace(";", "_")};"; @@ -189,7 +192,7 @@ namespace GodotTools if (Internal.GodotIsRealTDouble()) constants += "GODOT_REAL_T_IS_DOUBLE;"; - constants += buildTool == BuildTool.MsBuildVs ? "\"" : "\\\""; + constants += buildTool != BuildTool.MsBuildMono ? "\"" : "\\\""; buildInfo.CustomProperties.Add(constants); @@ -245,18 +248,22 @@ namespace GodotTools public static void Initialize() { // Build tool settings - - EditorDef("mono/builds/build_tool", OS.IsWindows ? BuildTool.MsBuildVs : BuildTool.MsBuildMono); - var editorSettings = GodotSharpEditor.Instance.GetEditorInterface().GetEditorSettings(); - + var msbuild = BuildTool.MsBuildMono; + if (OS.IsWindows) + msbuild = RiderPathManager.IsRider((string) editorSettings.GetSetting(RiderPathManager.EditorPathSettingName)) + ? BuildTool.JetBrainsMsBuild + : BuildTool.MsBuildVs; + + EditorDef("mono/builds/build_tool", msbuild); + editorSettings.AddPropertyInfo(new Godot.Collections.Dictionary { ["type"] = Godot.Variant.Type.Int, ["name"] = "mono/builds/build_tool", ["hint"] = Godot.PropertyHint.Enum, ["hint_string"] = OS.IsWindows ? - $"{PropNameMsbuildMono},{PropNameMsbuildVs}" : + $"{PropNameMsbuildMono},{PropNameMsbuildVs},{PropNameMsbuildJetBrains}" : $"{PropNameMsbuildMono}" }); diff --git a/modules/mono/editor/GodotTools/GodotTools/BuildTab.cs b/modules/mono/editor/GodotTools/GodotTools/BuildTab.cs index 727581daab..f75fe239e3 100644 --- a/modules/mono/editor/GodotTools/GodotTools/BuildTab.cs +++ b/modules/mono/editor/GodotTools/GodotTools/BuildTab.cs @@ -41,7 +41,7 @@ namespace GodotTools public bool ErrorsVisible { get; set; } = true; public bool WarningsVisible { get; set; } = true; - public Texture IconTexture + public Texture2D IconTexture { get { diff --git a/modules/mono/editor/GodotTools/GodotTools/Ides/Rider/RiderPathLocator.cs b/modules/mono/editor/GodotTools/GodotTools/Ides/Rider/RiderPathLocator.cs index 9038333d38..5965e0fbcf 100644 --- a/modules/mono/editor/GodotTools/GodotTools/Ides/Rider/RiderPathLocator.cs +++ b/modules/mono/editor/GodotTools/GodotTools/Ides/Rider/RiderPathLocator.cs @@ -11,6 +11,10 @@ using Environment = System.Environment; using File = System.IO.File; using Path = System.IO.Path; using OS = GodotTools.Utils.OS; +// ReSharper disable UnassignedField.Local +// ReSharper disable InconsistentNaming +// ReSharper disable UnassignedField.Global +// ReSharper disable MemberHidesStaticFromOuterClass namespace GodotTools.Ides.Rider { @@ -131,28 +135,45 @@ namespace GodotTools.Ides.Rider if (OS.IsWindows) { var localAppData = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData); - return Path.Combine(localAppData, @"JetBrains\Toolbox\apps\Rider"); + return GetToolboxRiderRootPath(localAppData); } if (OS.IsOSX) { var home = Environment.GetEnvironmentVariable("HOME"); - if (!string.IsNullOrEmpty(home)) - { - return Path.Combine(home, @"Library/Application Support/JetBrains/Toolbox/apps/Rider"); - } + if (string.IsNullOrEmpty(home)) + return string.Empty; + var localAppData = Path.Combine(home, @"Library/Application Support"); + return GetToolboxRiderRootPath(localAppData); } if (OS.IsUnixLike()) { var home = Environment.GetEnvironmentVariable("HOME"); - if (!string.IsNullOrEmpty(home)) - { - return Path.Combine(home, @".local/share/JetBrains/Toolbox/apps/Rider"); - } + if (string.IsNullOrEmpty(home)) + return string.Empty; + var localAppData = Path.Combine(home, @".local/share"); + return GetToolboxRiderRootPath(localAppData); + } + + return string.Empty; + } + + + private static string GetToolboxRiderRootPath(string localAppData) + { + var toolboxPath = Path.Combine(localAppData, @"JetBrains\Toolbox"); + var settingsJson = Path.Combine(toolboxPath, ".settings.json"); + + if (File.Exists(settingsJson)) + { + var path = SettingsJson.GetInstallLocationFromJson(File.ReadAllText(settingsJson)); + if (!string.IsNullOrEmpty(path)) + toolboxPath = path; } - throw new Exception("Unexpected OS."); + var toolboxRiderRootPath = Path.Combine(toolboxPath, @"apps\Rider"); + return toolboxRiderRootPath; } internal static ProductInfo GetBuildVersion(string path) @@ -226,8 +247,8 @@ namespace GodotTools.Ides.Rider { try { - // use history.json - last entry stands for the active build https://jetbrains.slack.com/archives/C07KNP99D/p1547807024066500?thread_ts=1547731708.057700&cid=C07KNP99D - var historyFile = Path.Combine(channelDir, ".history.json"); + // use history.json - last entry stands for the active build https://jetbrains.slack.com/archives/C07KNP99D/p1547807024066500?thread_ts=1547731708.057700&cid=C07KNP99D + var historyFile = Path.Combine(channelDir, ".history.json"); if (File.Exists(historyFile)) { var json = File.ReadAllText(historyFile); @@ -255,14 +276,14 @@ namespace GodotTools.Ides.Rider } } - // changes in toolbox json files format may brake the logic above, so return all found Rider installations - return Directory.GetDirectories(channelDir) - .SelectMany(buildDir => GetExecutablePaths(dirName, searchPattern, isMac, buildDir)); + // changes in toolbox json files format may brake the logic above, so return all found Rider installations + return Directory.GetDirectories(channelDir) + .SelectMany(buildDir => GetExecutablePaths(dirName, searchPattern, isMac, buildDir)); } catch (Exception e) { - // do not write to Debug.Log, just log it. - Logger.Warn($"Failed to get RiderPath from {channelDir}", e); + // do not write to Debug.Log, just log it. + Logger.Warn($"Failed to get RiderPath from {channelDir}", e); } return new string[0]; @@ -289,6 +310,27 @@ namespace GodotTools.Ides.Rider #pragma warning disable 0649 [Serializable] + class SettingsJson + { + public string install_location; + + [CanBeNull] + public static string GetInstallLocationFromJson(string json) + { + try + { + return JsonConvert.DeserializeObject<SettingsJson>(json).install_location; + } + catch (Exception) + { + Logger.Warn($"Failed to get install_location from json {json}"); + } + + return null; + } + } + + [Serializable] class ToolboxHistory { public List<ItemNode> history; @@ -372,7 +414,6 @@ namespace GodotTools.Ides.Rider [Serializable] class ActiveApplication { - // ReSharper disable once InconsistentNaming public List<string> builds; } @@ -380,6 +421,7 @@ namespace GodotTools.Ides.Rider public struct RiderInfo { + // ReSharper disable once NotAccessedField.Global public bool IsToolbox; public string Presentation; public Version BuildNumber; diff --git a/modules/mono/editor/GodotTools/GodotTools/Ides/Rider/RiderPathManager.cs b/modules/mono/editor/GodotTools/GodotTools/Ides/Rider/RiderPathManager.cs index 558a242bf9..ee5677a6a8 100644 --- a/modules/mono/editor/GodotTools/GodotTools/Ides/Rider/RiderPathManager.cs +++ b/modules/mono/editor/GodotTools/GodotTools/Ides/Rider/RiderPathManager.cs @@ -9,13 +9,13 @@ namespace GodotTools.Ides.Rider { public static class RiderPathManager { - private static readonly string editorPathSettingName = "mono/editor/editor_path_optional"; + public static readonly string EditorPathSettingName = "mono/editor/editor_path_optional"; private static string GetRiderPathFromSettings() { var editorSettings = GodotSharpEditor.Instance.GetEditorInterface().GetEditorSettings(); - if (editorSettings.HasSetting(editorPathSettingName)) - return (string)editorSettings.GetSetting(editorPathSettingName); + if (editorSettings.HasSetting(EditorPathSettingName)) + return (string)editorSettings.GetSetting(EditorPathSettingName); return null; } @@ -25,22 +25,22 @@ namespace GodotTools.Ides.Rider var editor = (ExternalEditorId)editorSettings.GetSetting("mono/editor/external_editor"); if (editor == ExternalEditorId.Rider) { - if (!editorSettings.HasSetting(editorPathSettingName)) + if (!editorSettings.HasSetting(EditorPathSettingName)) { - Globals.EditorDef(editorPathSettingName, "Optional"); + Globals.EditorDef(EditorPathSettingName, "Optional"); editorSettings.AddPropertyInfo(new Godot.Collections.Dictionary { ["type"] = Variant.Type.String, - ["name"] = editorPathSettingName, + ["name"] = EditorPathSettingName, ["hint"] = PropertyHint.File, ["hint_string"] = "" }); } - var riderPath = (string)editorSettings.GetSetting(editorPathSettingName); + var riderPath = (string)editorSettings.GetSetting(EditorPathSettingName); if (IsRiderAndExists(riderPath)) { - Globals.EditorDef(editorPathSettingName, riderPath); + Globals.EditorDef(EditorPathSettingName, riderPath); return; } @@ -50,17 +50,15 @@ namespace GodotTools.Ides.Rider return; var newPath = paths.Last().Path; - Globals.EditorDef(editorPathSettingName, newPath); - editorSettings.SetSetting(editorPathSettingName, newPath); + Globals.EditorDef(EditorPathSettingName, newPath); + editorSettings.SetSetting(EditorPathSettingName, newPath); } } - private static bool IsRider(string path) + public static bool IsRider(string path) { if (string.IsNullOrEmpty(path)) - { return false; - } var fileInfo = new FileInfo(path); var filename = fileInfo.Name.ToLowerInvariant(); @@ -81,8 +79,8 @@ namespace GodotTools.Ides.Rider return null; var newPath = paths.Last().Path; - editorSettings.SetSetting(editorPathSettingName, newPath); - Globals.EditorDef(editorPathSettingName, newPath); + editorSettings.SetSetting(EditorPathSettingName, newPath); + Globals.EditorDef(EditorPathSettingName, newPath); return newPath; } diff --git a/modules/mono/editor/GodotTools/GodotTools/Internals/Internal.cs b/modules/mono/editor/GodotTools/GodotTools/Internals/Internal.cs index de361ba844..2e121ba879 100644 --- a/modules/mono/editor/GodotTools/GodotTools/Internals/Internal.cs +++ b/modules/mono/editor/GodotTools/GodotTools/Internals/Internal.cs @@ -34,7 +34,7 @@ namespace GodotTools.Internals public static void ReloadAssemblies(bool softReload) => internal_ReloadAssemblies(softReload); - public static void ScriptEditorDebuggerReloadScripts() => internal_ScriptEditorDebuggerReloadScripts(); + public static void EditorDebuggerNodeReloadScripts() => internal_EditorDebuggerNodeReloadScripts(); public static bool ScriptEditorEdit(Resource resource, int line, int col, bool grabFocus = true) => internal_ScriptEditorEdit(resource, line, col, grabFocus); @@ -88,7 +88,7 @@ namespace GodotTools.Internals private static extern void internal_ReloadAssemblies(bool softReload); [MethodImpl(MethodImplOptions.InternalCall)] - private static extern void internal_ScriptEditorDebuggerReloadScripts(); + private static extern void internal_EditorDebuggerNodeReloadScripts(); [MethodImpl(MethodImplOptions.InternalCall)] private static extern bool internal_ScriptEditorEdit(Resource resource, int line, int col, bool grabFocus); diff --git a/modules/mono/editor/bindings_generator.cpp b/modules/mono/editor/bindings_generator.cpp index 34f01ce3c6..908c72c591 100644 --- a/modules/mono/editor/bindings_generator.cpp +++ b/modules/mono/editor/bindings_generator.cpp @@ -503,23 +503,23 @@ String BindingsGenerator::bbcode_to_xml(const String &p_bbcode, const TypeInterf xml_output.append("<c>"); xml_output.append(tag); xml_output.append("</c>"); - } else if (tag == "PoolByteArray") { + } else if (tag == "PackedByteArray") { xml_output.append("<see cref=\"byte\"/>"); - } else if (tag == "PoolIntArray") { + } else if (tag == "PackedInt32Array") { xml_output.append("<see cref=\"int\"/>"); - } else if (tag == "PoolRealArray") { + } else if (tag == "PackedFloat32Array") { #ifdef REAL_T_IS_DOUBLE xml_output.append("<see cref=\"double\"/>"); #else xml_output.append("<see cref=\"float\"/>"); #endif - } else if (tag == "PoolStringArray") { + } else if (tag == "PackedStringArray") { xml_output.append("<see cref=\"string\"/>"); - } else if (tag == "PoolVector2Array") { + } else if (tag == "PackedVector2Array") { xml_output.append("<see cref=\"" BINDINGS_NAMESPACE ".Vector2\"/>"); - } else if (tag == "PoolVector3Array") { + } else if (tag == "PackedVector3Array") { xml_output.append("<see cref=\"" BINDINGS_NAMESPACE ".Vector3\"/>"); - } else if (tag == "PoolColorArray") { + } else if (tag == "PackedColorArray") { xml_output.append("<see cref=\"" BINDINGS_NAMESPACE ".Color\"/>"); } else { const TypeInterface *target_itype = _get_type_or_null(TypeReference(tag)); @@ -2054,7 +2054,7 @@ Error BindingsGenerator::_generate_glue_method(const BindingsGenerator::TypeInte } if (p_imethod.is_vararg) { - p_output.append("\tVariant::CallError vcall_error;\n\t"); + p_output.append("\tCallable::CallError vcall_error;\n\t"); if (!ret_void) { // See the comment on the C_LOCAL_VARARG_RET declaration @@ -2383,7 +2383,7 @@ bool BindingsGenerator::_populate_object_type_interfaces() { } else { if (return_info.type == Variant::INT) { imethod.return_type.cname = _get_int_type_name_from_meta(m ? m->get_argument_meta(-1) : GodotTypeInfo::METADATA_NONE); - } else if (return_info.type == Variant::REAL) { + } else if (return_info.type == Variant::FLOAT) { imethod.return_type.cname = _get_float_type_name_from_meta(m ? m->get_argument_meta(-1) : GodotTypeInfo::METADATA_NONE); } else { imethod.return_type.cname = Variant::get_type_name(return_info.type); @@ -2410,7 +2410,7 @@ bool BindingsGenerator::_populate_object_type_interfaces() { } else { if (arginfo.type == Variant::INT) { iarg.type.cname = _get_int_type_name_from_meta(m ? m->get_argument_meta(i) : GodotTypeInfo::METADATA_NONE); - } else if (arginfo.type == Variant::REAL) { + } else if (arginfo.type == Variant::FLOAT) { iarg.type.cname = _get_float_type_name_from_meta(m ? m->get_argument_meta(i) : GodotTypeInfo::METADATA_NONE); } else { iarg.type.cname = Variant::get_type_name(arginfo.type); @@ -2581,7 +2581,7 @@ bool BindingsGenerator::_arg_default_value_from_variant(const Variant &p_val, Ar r_iarg.default_argument = "(%s)" + r_iarg.default_argument; } break; - case Variant::REAL: + case Variant::FLOAT: #ifndef REAL_T_IS_DOUBLE r_iarg.default_argument += "f"; #endif @@ -2628,13 +2628,15 @@ bool BindingsGenerator::_arg_default_value_from_variant(const Variant &p_val, Ar r_iarg.default_argument = "null"; break; case Variant::ARRAY: - case Variant::POOL_BYTE_ARRAY: - case Variant::POOL_INT_ARRAY: - case Variant::POOL_REAL_ARRAY: - case Variant::POOL_STRING_ARRAY: - case Variant::POOL_VECTOR2_ARRAY: - case Variant::POOL_VECTOR3_ARRAY: - case Variant::POOL_COLOR_ARRAY: + case Variant::PACKED_BYTE_ARRAY: + case Variant::PACKED_INT32_ARRAY: + case Variant::PACKED_FLOAT32_ARRAY: + case Variant::PACKED_INT64_ARRAY: + case Variant::PACKED_FLOAT64_ARRAY: + case Variant::PACKED_STRING_ARRAY: + case Variant::PACKED_VECTOR2_ARRAY: + case Variant::PACKED_VECTOR3_ARRAY: + case Variant::PACKED_COLOR_ARRAY: r_iarg.default_argument = "new %s {}"; r_iarg.def_param_mode = ArgumentInterface::NULLABLE_REF; break; @@ -2914,20 +2916,20 @@ void BindingsGenerator::_populate_builtin_type_interfaces() { #define INSERT_ARRAY(m_type, m_proxy_t) INSERT_ARRAY_FULL(m_type, m_type, m_proxy_t) - INSERT_ARRAY(PoolIntArray, int); - INSERT_ARRAY_FULL(PoolByteArray, PoolByteArray, byte); + INSERT_ARRAY(PackedInt32Array, int); + INSERT_ARRAY_FULL(PackedByteArray, PackedByteArray, byte); #ifdef REAL_T_IS_DOUBLE - INSERT_ARRAY(PoolRealArray, double); + INSERT_ARRAY(PackedFloat32Array, double); #else - INSERT_ARRAY(PoolRealArray, float); + INSERT_ARRAY(PackedFloat32Array, float); #endif - INSERT_ARRAY(PoolStringArray, string); + INSERT_ARRAY(PackedStringArray, string); - INSERT_ARRAY(PoolColorArray, Color); - INSERT_ARRAY(PoolVector2Array, Vector2); - INSERT_ARRAY(PoolVector3Array, Vector3); + INSERT_ARRAY(PackedColorArray, Color); + INSERT_ARRAY(PackedVector2Array, Vector2); + INSERT_ARRAY(PackedVector3Array, Vector3); #undef INSERT_ARRAY diff --git a/modules/mono/editor/editor_internal_calls.cpp b/modules/mono/editor/editor_internal_calls.cpp index c8d20e80be..31996a03d0 100644 --- a/modules/mono/editor/editor_internal_calls.cpp +++ b/modules/mono/editor/editor_internal_calls.cpp @@ -36,10 +36,10 @@ #include "core/os/os.h" #include "core/version.h" +#include "editor/debugger/editor_debugger_node.h" #include "editor/editor_node.h" #include "editor/editor_scale.h" #include "editor/plugins/script_editor_plugin.h" -#include "editor/script_editor_debugger.h" #include "main/main.h" #include "../csharp_script.h" @@ -305,8 +305,8 @@ void godot_icall_Internal_ReloadAssemblies(MonoBoolean p_soft_reload) { #endif } -void godot_icall_Internal_ScriptEditorDebuggerReloadScripts() { - ScriptEditor::get_singleton()->get_debugger()->reload_scripts(); +void godot_icall_Internal_EditorDebuggerNodeReloadScripts() { + EditorDebuggerNode::get_singleton()->reload_scripts(); } MonoBoolean godot_icall_Internal_ScriptEditorEdit(MonoObject *p_resource, int32_t p_line, int32_t p_col, MonoBoolean p_grab_focus) { @@ -348,9 +348,9 @@ void godot_icall_Internal_EditorRunStop() { } void godot_icall_Internal_ScriptEditorDebugger_ReloadScripts() { - ScriptEditorDebugger *sed = ScriptEditor::get_singleton()->get_debugger(); - if (sed) { - sed->reload_scripts(); + EditorDebuggerNode *ed = EditorDebuggerNode::get_singleton(); + if (ed) { + ed->reload_scripts(); } } @@ -446,7 +446,7 @@ void register_editor_internal_calls() { mono_add_internal_call("GodotTools.Internals.Internal::internal_GetEditorApiHash", (void *)godot_icall_Internal_GetEditorApiHash); mono_add_internal_call("GodotTools.Internals.Internal::internal_IsAssembliesReloadingNeeded", (void *)godot_icall_Internal_IsAssembliesReloadingNeeded); mono_add_internal_call("GodotTools.Internals.Internal::internal_ReloadAssemblies", (void *)godot_icall_Internal_ReloadAssemblies); - mono_add_internal_call("GodotTools.Internals.Internal::internal_ScriptEditorDebuggerReloadScripts", (void *)godot_icall_Internal_ScriptEditorDebuggerReloadScripts); + mono_add_internal_call("GodotTools.Internals.Internal::internal_EditorDebuggerNodeReloadScripts", (void *)godot_icall_Internal_EditorDebuggerNodeReloadScripts); mono_add_internal_call("GodotTools.Internals.Internal::internal_ScriptEditorEdit", (void *)godot_icall_Internal_ScriptEditorEdit); mono_add_internal_call("GodotTools.Internals.Internal::internal_EditorNodeShowScriptScreen", (void *)godot_icall_Internal_EditorNodeShowScriptScreen); mono_add_internal_call("GodotTools.Internals.Internal::internal_GetScriptsMetadataOrNothing", (void *)godot_icall_Internal_GetScriptsMetadataOrNothing); diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/StringExtensions.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/StringExtensions.cs index b85a00d869..099eacd7dd 100644 --- a/modules/mono/glue/GodotSharp/GodotSharp/Core/StringExtensions.cs +++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/StringExtensions.cs @@ -981,7 +981,7 @@ namespace Godot } // <summary> - // Convert the String (which is a character array) to PoolByteArray (which is an array of bytes). The conversion is speeded up in comparison to to_utf8() with the assumption that all the characters the String contains are only ASCII characters. + // Convert the String (which is a character array) to PackedByteArray (which is an array of bytes). The conversion is speeded up in comparison to to_utf8() with the assumption that all the characters the String contains are only ASCII characters. // </summary> public static byte[] ToAscii(this string instance) { @@ -1021,7 +1021,7 @@ namespace Godot } // <summary> - // Convert the String (which is an array of characters) to PoolByteArray (which is an array of bytes). The conversion is a bit slower than to_ascii(), but supports all UTF-8 characters. Therefore, you should prefer this function over to_ascii(). + // Convert the String (which is an array of characters) to PackedByteArray (which is an array of bytes). The conversion is a bit slower than to_ascii(), but supports all UTF-8 characters. Therefore, you should prefer this function over to_ascii(). // </summary> public static byte[] ToUTF8(this string instance) { diff --git a/modules/mono/glue/base_object_glue.cpp b/modules/mono/glue/base_object_glue.cpp index 02246b2f2f..8c77220b85 100644 --- a/modules/mono/glue/base_object_glue.cpp +++ b/modules/mono/glue/base_object_glue.cpp @@ -189,12 +189,12 @@ MonoBoolean godot_icall_DynamicGodotObject_InvokeMember(Object *p_ptr, MonoStrin args.set(i, &arg_store.get(i)); } - Variant::CallError error; + Callable::CallError error; Variant result = p_ptr->call(StringName(name), args.ptr(), argc, error); *r_result = GDMonoMarshal::variant_to_mono_object(result); - return error.error == Variant::CallError::CALL_OK; + return error.error == Callable::CallError::CALL_OK; } MonoBoolean godot_icall_DynamicGodotObject_GetMember(Object *p_ptr, MonoString *p_name, MonoObject **r_result) { @@ -224,14 +224,9 @@ MonoString *godot_icall_Object_ToString(Object *p_ptr) { #ifdef DEBUG_ENABLED // Cannot happen in C#; would get an ObjectDisposedException instead. CRASH_COND(p_ptr == NULL); - - if (ScriptDebugger::get_singleton() && !Object::cast_to<Reference>(p_ptr)) { // Only if debugging! - // Cannot happen either in C#; the handle is nullified when the object is destroyed - CRASH_COND(!ObjectDB::instance_validate(p_ptr)); - } #endif - String result = "[" + p_ptr->get_class() + ":" + itos(p_ptr->get_instance_id()) + "]"; + String result = p_ptr->to_string(); return GDMonoMarshal::mono_string_from_godot(result); } diff --git a/modules/mono/glue/gd_glue.cpp b/modules/mono/glue/gd_glue.cpp index 17483c4457..cdacd90538 100644 --- a/modules/mono/glue/gd_glue.cpp +++ b/modules/mono/glue/gd_glue.cpp @@ -44,9 +44,8 @@ MonoObject *godot_icall_GD_bytes2var(MonoArray *p_bytes, MonoBoolean p_allow_objects) { Variant ret; - PoolByteArray varr = GDMonoMarshal::mono_array_to_PoolByteArray(p_bytes); - PoolByteArray::Read r = varr.read(); - Error err = decode_variant(ret, r.ptr(), varr.size(), NULL, p_allow_objects); + PackedByteArray varr = GDMonoMarshal::mono_array_to_PackedByteArray(p_bytes); + Error err = decode_variant(ret, varr.ptr(), varr.size(), NULL, p_allow_objects); if (err != OK) { ret = RTR("Not enough bytes for decoding bytes, or invalid format."); } @@ -56,9 +55,9 @@ MonoObject *godot_icall_GD_bytes2var(MonoArray *p_bytes, MonoBoolean p_allow_obj MonoObject *godot_icall_GD_convert(MonoObject *p_what, int32_t p_type) { Variant what = GDMonoMarshal::mono_object_to_variant(p_what); const Variant *args[1] = { &what }; - Variant::CallError ce; + Callable::CallError ce; Variant ret = Variant::construct(Variant::Type(p_type), args, 1, ce); - ERR_FAIL_COND_V(ce.error != Variant::CallError::CALL_OK, NULL); + ERR_FAIL_COND_V(ce.error != Callable::CallError::CALL_OK, NULL); return GDMonoMarshal::variant_to_mono_object(ret); } @@ -67,7 +66,7 @@ int godot_icall_GD_hash(MonoObject *p_var) { } MonoObject *godot_icall_GD_instance_from_id(uint64_t p_instance_id) { - return GDMonoUtils::unmanaged_get_managed(ObjectDB::get_instance(p_instance_id)); + return GDMonoUtils::unmanaged_get_managed(ObjectDB::get_instance(ObjectID(p_instance_id))); } void godot_icall_GD_print(MonoArray *p_what) { @@ -257,18 +256,15 @@ void godot_icall_GD_pushwarning(MonoString *p_str) { MonoArray *godot_icall_GD_var2bytes(MonoObject *p_var, MonoBoolean p_full_objects) { Variant var = GDMonoMarshal::mono_object_to_variant(p_var); - PoolByteArray barr; + PackedByteArray barr; int len; Error err = encode_variant(var, NULL, len, p_full_objects); ERR_FAIL_COND_V_MSG(err != OK, NULL, "Unexpected error encoding variable to bytes, likely unserializable type found (Object or RID)."); barr.resize(len); - { - PoolByteArray::Write w = barr.write(); - encode_variant(var, w.ptr(), len, p_full_objects); - } + encode_variant(var, barr.ptrw(), len, p_full_objects); - return GDMonoMarshal::PoolByteArray_to_mono_array(barr); + return GDMonoMarshal::PackedByteArray_to_mono_array(barr); } MonoString *godot_icall_GD_var2str(MonoObject *p_var) { diff --git a/modules/mono/mono_gd/gd_mono_field.cpp b/modules/mono/mono_gd/gd_mono_field.cpp index 178647b968..03b56c9949 100644 --- a/modules/mono/mono_gd/gd_mono_field.cpp +++ b/modules/mono/mono_gd/gd_mono_field.cpp @@ -247,37 +247,37 @@ void GDMonoField::set_value_from_variant(MonoObject *p_object, const Variant &p_ } if (array_type->eklass == CACHED_CLASS_RAW(uint8_t)) { - SET_FROM_ARRAY(PoolByteArray); + SET_FROM_ARRAY(PackedByteArray); break; } if (array_type->eklass == CACHED_CLASS_RAW(int32_t)) { - SET_FROM_ARRAY(PoolIntArray); + SET_FROM_ARRAY(PackedInt32Array); break; } if (array_type->eklass == REAL_T_MONOCLASS) { - SET_FROM_ARRAY(PoolRealArray); + SET_FROM_ARRAY(PackedFloat32Array); break; } if (array_type->eklass == CACHED_CLASS_RAW(String)) { - SET_FROM_ARRAY(PoolStringArray); + SET_FROM_ARRAY(PackedStringArray); break; } if (array_type->eklass == CACHED_CLASS_RAW(Vector2)) { - SET_FROM_ARRAY(PoolVector2Array); + SET_FROM_ARRAY(PackedVector2Array); break; } if (array_type->eklass == CACHED_CLASS_RAW(Vector3)) { - SET_FROM_ARRAY(PoolVector3Array); + SET_FROM_ARRAY(PackedVector3Array); break; } if (array_type->eklass == CACHED_CLASS_RAW(Color)) { - SET_FROM_ARRAY(PoolColorArray); + SET_FROM_ARRAY(PackedColorArray); break; } @@ -370,7 +370,7 @@ void GDMonoField::set_value_from_variant(MonoObject *p_object, const Variant &p_ int32_t val = p_value.operator signed int(); mono_field_set_value(p_object, mono_field, &val); } break; - case Variant::REAL: { + case Variant::FLOAT: { #ifdef REAL_T_IS_DOUBLE double val = p_value.operator double(); mono_field_set_value(p_object, mono_field, &val); @@ -434,26 +434,26 @@ void GDMonoField::set_value_from_variant(MonoObject *p_object, const Variant &p_ MonoObject *managed = GDMonoUtils::create_managed_from(p_value.operator Array(), CACHED_CLASS(Array)); mono_field_set_value(p_object, mono_field, managed); } break; - case Variant::POOL_BYTE_ARRAY: { - SET_FROM_ARRAY(PoolByteArray); + case Variant::PACKED_BYTE_ARRAY: { + SET_FROM_ARRAY(PackedByteArray); } break; - case Variant::POOL_INT_ARRAY: { - SET_FROM_ARRAY(PoolIntArray); + case Variant::PACKED_INT32_ARRAY: { + SET_FROM_ARRAY(PackedInt32Array); } break; - case Variant::POOL_REAL_ARRAY: { - SET_FROM_ARRAY(PoolRealArray); + case Variant::PACKED_FLOAT32_ARRAY: { + SET_FROM_ARRAY(PackedFloat32Array); } break; - case Variant::POOL_STRING_ARRAY: { - SET_FROM_ARRAY(PoolStringArray); + case Variant::PACKED_STRING_ARRAY: { + SET_FROM_ARRAY(PackedStringArray); } break; - case Variant::POOL_VECTOR2_ARRAY: { - SET_FROM_ARRAY(PoolVector2Array); + case Variant::PACKED_VECTOR2_ARRAY: { + SET_FROM_ARRAY(PackedVector2Array); } break; - case Variant::POOL_VECTOR3_ARRAY: { - SET_FROM_ARRAY(PoolVector3Array); + case Variant::PACKED_VECTOR3_ARRAY: { + SET_FROM_ARRAY(PackedVector3Array); } break; - case Variant::POOL_COLOR_ARRAY: { - SET_FROM_ARRAY(PoolColorArray); + case Variant::PACKED_COLOR_ARRAY: { + SET_FROM_ARRAY(PackedColorArray); } break; default: break; } diff --git a/modules/mono/mono_gd/gd_mono_internals.cpp b/modules/mono/mono_gd/gd_mono_internals.cpp index 75aa77c7b0..74ffa90cb3 100644 --- a/modules/mono/mono_gd/gd_mono_internals.cpp +++ b/modules/mono/mono_gd/gd_mono_internals.cpp @@ -107,7 +107,7 @@ void tie_managed_to_unmanaged(MonoObject *managed, Object *unmanaged) { ScriptInstance *si = CSharpInstance::create_for_managed_type(unmanaged, script.ptr(), gchandle); - unmanaged->set_script_and_instance(script.get_ref_ptr(), si); + unmanaged->set_script_and_instance(script, si); } void unhandled_exception(MonoException *p_exc) { diff --git a/modules/mono/mono_gd/gd_mono_marshal.cpp b/modules/mono/mono_gd/gd_mono_marshal.cpp index 19d627218e..695be64d6e 100644 --- a/modules/mono/mono_gd/gd_mono_marshal.cpp +++ b/modules/mono/mono_gd/gd_mono_marshal.cpp @@ -60,9 +60,9 @@ Variant::Type managed_to_variant_type(const ManagedType &p_type) { return Variant::INT; case MONO_TYPE_R4: - return Variant::REAL; + return Variant::FLOAT; case MONO_TYPE_R8: - return Variant::REAL; + return Variant::FLOAT; case MONO_TYPE_STRING: { return Variant::STRING; @@ -113,25 +113,25 @@ Variant::Type managed_to_variant_type(const ManagedType &p_type) { return Variant::ARRAY; if (array_type->eklass == CACHED_CLASS_RAW(uint8_t)) - return Variant::POOL_BYTE_ARRAY; + return Variant::PACKED_BYTE_ARRAY; if (array_type->eklass == CACHED_CLASS_RAW(int32_t)) - return Variant::POOL_INT_ARRAY; + return Variant::PACKED_INT32_ARRAY; if (array_type->eklass == REAL_T_MONOCLASS) - return Variant::POOL_REAL_ARRAY; + return Variant::PACKED_FLOAT32_ARRAY; if (array_type->eklass == CACHED_CLASS_RAW(String)) - return Variant::POOL_STRING_ARRAY; + return Variant::PACKED_STRING_ARRAY; if (array_type->eklass == CACHED_CLASS_RAW(Vector2)) - return Variant::POOL_VECTOR2_ARRAY; + return Variant::PACKED_VECTOR2_ARRAY; if (array_type->eklass == CACHED_CLASS_RAW(Vector3)) - return Variant::POOL_VECTOR3_ARRAY; + return Variant::PACKED_VECTOR3_ARRAY; if (array_type->eklass == CACHED_CLASS_RAW(Color)) - return Variant::POOL_COLOR_ARRAY; + return Variant::PACKED_COLOR_ARRAY; } break; case MONO_TYPE_CLASS: { @@ -491,25 +491,25 @@ MonoObject *variant_to_mono_object(const Variant *p_var, const ManagedType &p_ty return (MonoObject *)Array_to_mono_array(p_var->operator Array()); if (array_type->eklass == CACHED_CLASS_RAW(uint8_t)) - return (MonoObject *)PoolByteArray_to_mono_array(p_var->operator PoolByteArray()); + return (MonoObject *)PackedByteArray_to_mono_array(p_var->operator PackedByteArray()); if (array_type->eklass == CACHED_CLASS_RAW(int32_t)) - return (MonoObject *)PoolIntArray_to_mono_array(p_var->operator PoolIntArray()); + return (MonoObject *)PackedInt32Array_to_mono_array(p_var->operator PackedInt32Array()); if (array_type->eklass == REAL_T_MONOCLASS) - return (MonoObject *)PoolRealArray_to_mono_array(p_var->operator PoolRealArray()); + return (MonoObject *)PackedFloat32Array_to_mono_array(p_var->operator PackedFloat32Array()); if (array_type->eklass == CACHED_CLASS_RAW(String)) - return (MonoObject *)PoolStringArray_to_mono_array(p_var->operator PoolStringArray()); + return (MonoObject *)PackedStringArray_to_mono_array(p_var->operator PackedStringArray()); if (array_type->eklass == CACHED_CLASS_RAW(Vector2)) - return (MonoObject *)PoolVector2Array_to_mono_array(p_var->operator PoolVector2Array()); + return (MonoObject *)PackedVector2Array_to_mono_array(p_var->operator PackedVector2Array()); if (array_type->eklass == CACHED_CLASS_RAW(Vector3)) - return (MonoObject *)PoolVector3Array_to_mono_array(p_var->operator PoolVector3Array()); + return (MonoObject *)PackedVector3Array_to_mono_array(p_var->operator PackedVector3Array()); if (array_type->eklass == CACHED_CLASS_RAW(Color)) - return (MonoObject *)PoolColorArray_to_mono_array(p_var->operator PoolColorArray()); + return (MonoObject *)PackedColorArray_to_mono_array(p_var->operator PackedColorArray()); ERR_FAIL_V_MSG(NULL, "Attempted to convert Variant to a managed array of unmarshallable element type."); } break; @@ -577,7 +577,7 @@ MonoObject *variant_to_mono_object(const Variant *p_var, const ManagedType &p_ty int32_t val = p_var->operator signed int(); return BOX_INT32(val); } - case Variant::REAL: { + case Variant::FLOAT: { #ifdef REAL_T_IS_DOUBLE double val = p_var->operator double(); return BOX_DOUBLE(val); @@ -638,20 +638,20 @@ MonoObject *variant_to_mono_object(const Variant *p_var, const ManagedType &p_ty return GDMonoUtils::create_managed_from(p_var->operator Dictionary(), CACHED_CLASS(Dictionary)); case Variant::ARRAY: return GDMonoUtils::create_managed_from(p_var->operator Array(), CACHED_CLASS(Array)); - case Variant::POOL_BYTE_ARRAY: - return (MonoObject *)PoolByteArray_to_mono_array(p_var->operator PoolByteArray()); - case Variant::POOL_INT_ARRAY: - return (MonoObject *)PoolIntArray_to_mono_array(p_var->operator PoolIntArray()); - case Variant::POOL_REAL_ARRAY: - return (MonoObject *)PoolRealArray_to_mono_array(p_var->operator PoolRealArray()); - case Variant::POOL_STRING_ARRAY: - return (MonoObject *)PoolStringArray_to_mono_array(p_var->operator PoolStringArray()); - case Variant::POOL_VECTOR2_ARRAY: - return (MonoObject *)PoolVector2Array_to_mono_array(p_var->operator PoolVector2Array()); - case Variant::POOL_VECTOR3_ARRAY: - return (MonoObject *)PoolVector3Array_to_mono_array(p_var->operator PoolVector3Array()); - case Variant::POOL_COLOR_ARRAY: - return (MonoObject *)PoolColorArray_to_mono_array(p_var->operator PoolColorArray()); + case Variant::PACKED_BYTE_ARRAY: + return (MonoObject *)PackedByteArray_to_mono_array(p_var->operator PackedByteArray()); + case Variant::PACKED_INT32_ARRAY: + return (MonoObject *)PackedInt32Array_to_mono_array(p_var->operator PackedInt32Array()); + case Variant::PACKED_FLOAT32_ARRAY: + return (MonoObject *)PackedFloat32Array_to_mono_array(p_var->operator PackedFloat32Array()); + case Variant::PACKED_STRING_ARRAY: + return (MonoObject *)PackedStringArray_to_mono_array(p_var->operator PackedStringArray()); + case Variant::PACKED_VECTOR2_ARRAY: + return (MonoObject *)PackedVector2Array_to_mono_array(p_var->operator PackedVector2Array()); + case Variant::PACKED_VECTOR3_ARRAY: + return (MonoObject *)PackedVector3Array_to_mono_array(p_var->operator PackedVector3Array()); + case Variant::PACKED_COLOR_ARRAY: + return (MonoObject *)PackedColorArray_to_mono_array(p_var->operator PackedColorArray()); default: return NULL; } @@ -785,25 +785,25 @@ Variant mono_object_to_variant_impl(MonoObject *p_obj, const ManagedType &p_type return mono_array_to_Array((MonoArray *)p_obj); if (array_type->eklass == CACHED_CLASS_RAW(uint8_t)) - return mono_array_to_PoolByteArray((MonoArray *)p_obj); + return mono_array_to_PackedByteArray((MonoArray *)p_obj); if (array_type->eklass == CACHED_CLASS_RAW(int32_t)) - return mono_array_to_PoolIntArray((MonoArray *)p_obj); + return mono_array_to_PackedInt32Array((MonoArray *)p_obj); if (array_type->eklass == REAL_T_MONOCLASS) - return mono_array_to_PoolRealArray((MonoArray *)p_obj); + return mono_array_to_PackedFloat32Array((MonoArray *)p_obj); if (array_type->eklass == CACHED_CLASS_RAW(String)) - return mono_array_to_PoolStringArray((MonoArray *)p_obj); + return mono_array_to_PackedStringArray((MonoArray *)p_obj); if (array_type->eklass == CACHED_CLASS_RAW(Vector2)) - return mono_array_to_PoolVector2Array((MonoArray *)p_obj); + return mono_array_to_PackedVector2Array((MonoArray *)p_obj); if (array_type->eklass == CACHED_CLASS_RAW(Vector3)) - return mono_array_to_PoolVector3Array((MonoArray *)p_obj); + return mono_array_to_PackedVector3Array((MonoArray *)p_obj); if (array_type->eklass == CACHED_CLASS_RAW(Color)) - return mono_array_to_PoolColorArray((MonoArray *)p_obj); + return mono_array_to_PackedColorArray((MonoArray *)p_obj); if (p_fail_with_err) { ERR_FAIL_V_MSG(Variant(), "Attempted to convert a managed array of unmarshallable element type to Variant."); @@ -987,8 +987,8 @@ Array mono_array_to_Array(MonoArray *p_array) { // TODO: Use memcpy where possible -MonoArray *PoolIntArray_to_mono_array(const PoolIntArray &p_array) { - PoolIntArray::Read r = p_array.read(); +MonoArray *PackedInt32Array_to_mono_array(const PackedInt32Array &p_array) { + const int *r = p_array.ptr(); MonoArray *ret = mono_array_new(mono_domain_get(), CACHED_CLASS_RAW(int32_t), p_array.size()); @@ -999,13 +999,13 @@ MonoArray *PoolIntArray_to_mono_array(const PoolIntArray &p_array) { return ret; } -PoolIntArray mono_array_to_PoolIntArray(MonoArray *p_array) { - PoolIntArray ret; +PackedInt32Array mono_array_to_PackedInt32Array(MonoArray *p_array) { + PackedInt32Array ret; if (!p_array) return ret; int length = mono_array_length(p_array); ret.resize(length); - PoolIntArray::Write w = ret.write(); + int *w = ret.ptrw(); for (int i = 0; i < length; i++) { w[i] = mono_array_get(p_array, int32_t, i); @@ -1014,8 +1014,8 @@ PoolIntArray mono_array_to_PoolIntArray(MonoArray *p_array) { return ret; } -MonoArray *PoolByteArray_to_mono_array(const PoolByteArray &p_array) { - PoolByteArray::Read r = p_array.read(); +MonoArray *PackedByteArray_to_mono_array(const PackedByteArray &p_array) { + const uint8_t *r = p_array.ptr(); MonoArray *ret = mono_array_new(mono_domain_get(), CACHED_CLASS_RAW(uint8_t), p_array.size()); @@ -1026,13 +1026,13 @@ MonoArray *PoolByteArray_to_mono_array(const PoolByteArray &p_array) { return ret; } -PoolByteArray mono_array_to_PoolByteArray(MonoArray *p_array) { - PoolByteArray ret; +PackedByteArray mono_array_to_PackedByteArray(MonoArray *p_array) { + PackedByteArray ret; if (!p_array) return ret; int length = mono_array_length(p_array); ret.resize(length); - PoolByteArray::Write w = ret.write(); + uint8_t *w = ret.ptrw(); for (int i = 0; i < length; i++) { w[i] = mono_array_get(p_array, uint8_t, i); @@ -1041,8 +1041,8 @@ PoolByteArray mono_array_to_PoolByteArray(MonoArray *p_array) { return ret; } -MonoArray *PoolRealArray_to_mono_array(const PoolRealArray &p_array) { - PoolRealArray::Read r = p_array.read(); +MonoArray *PackedFloat32Array_to_mono_array(const PackedFloat32Array &p_array) { + const real_t *r = p_array.ptr(); MonoArray *ret = mono_array_new(mono_domain_get(), REAL_T_MONOCLASS, p_array.size()); @@ -1053,13 +1053,13 @@ MonoArray *PoolRealArray_to_mono_array(const PoolRealArray &p_array) { return ret; } -PoolRealArray mono_array_to_PoolRealArray(MonoArray *p_array) { - PoolRealArray ret; +PackedFloat32Array mono_array_to_PackedFloat32Array(MonoArray *p_array) { + PackedFloat32Array ret; if (!p_array) return ret; int length = mono_array_length(p_array); ret.resize(length); - PoolRealArray::Write w = ret.write(); + real_t *w = ret.ptrw(); for (int i = 0; i < length; i++) { w[i] = mono_array_get(p_array, real_t, i); @@ -1068,8 +1068,8 @@ PoolRealArray mono_array_to_PoolRealArray(MonoArray *p_array) { return ret; } -MonoArray *PoolStringArray_to_mono_array(const PoolStringArray &p_array) { - PoolStringArray::Read r = p_array.read(); +MonoArray *PackedStringArray_to_mono_array(const PackedStringArray &p_array) { + const String *r = p_array.ptr(); MonoArray *ret = mono_array_new(mono_domain_get(), CACHED_CLASS_RAW(String), p_array.size()); @@ -1081,13 +1081,13 @@ MonoArray *PoolStringArray_to_mono_array(const PoolStringArray &p_array) { return ret; } -PoolStringArray mono_array_to_PoolStringArray(MonoArray *p_array) { - PoolStringArray ret; +PackedStringArray mono_array_to_PackedStringArray(MonoArray *p_array) { + PackedStringArray ret; if (!p_array) return ret; int length = mono_array_length(p_array); ret.resize(length); - PoolStringArray::Write w = ret.write(); + String *w = ret.ptrw(); for (int i = 0; i < length; i++) { MonoString *elem = mono_array_get(p_array, MonoString *, i); @@ -1097,8 +1097,8 @@ PoolStringArray mono_array_to_PoolStringArray(MonoArray *p_array) { return ret; } -MonoArray *PoolColorArray_to_mono_array(const PoolColorArray &p_array) { - PoolColorArray::Read r = p_array.read(); +MonoArray *PackedColorArray_to_mono_array(const PackedColorArray &p_array) { + const Color *r = p_array.ptr(); MonoArray *ret = mono_array_new(mono_domain_get(), CACHED_CLASS_RAW(Color), p_array.size()); @@ -1110,13 +1110,13 @@ MonoArray *PoolColorArray_to_mono_array(const PoolColorArray &p_array) { return ret; } -PoolColorArray mono_array_to_PoolColorArray(MonoArray *p_array) { - PoolColorArray ret; +PackedColorArray mono_array_to_PackedColorArray(MonoArray *p_array) { + PackedColorArray ret; if (!p_array) return ret; int length = mono_array_length(p_array); ret.resize(length); - PoolColorArray::Write w = ret.write(); + Color *w = ret.ptrw(); for (int i = 0; i < length; i++) { w[i] = MARSHALLED_IN(Color, (M_Color *)mono_array_addr_with_size(p_array, sizeof(M_Color), i)); @@ -1125,8 +1125,8 @@ PoolColorArray mono_array_to_PoolColorArray(MonoArray *p_array) { return ret; } -MonoArray *PoolVector2Array_to_mono_array(const PoolVector2Array &p_array) { - PoolVector2Array::Read r = p_array.read(); +MonoArray *PackedVector2Array_to_mono_array(const PackedVector2Array &p_array) { + const Vector2 *r = p_array.ptr(); MonoArray *ret = mono_array_new(mono_domain_get(), CACHED_CLASS_RAW(Vector2), p_array.size()); @@ -1138,13 +1138,13 @@ MonoArray *PoolVector2Array_to_mono_array(const PoolVector2Array &p_array) { return ret; } -PoolVector2Array mono_array_to_PoolVector2Array(MonoArray *p_array) { - PoolVector2Array ret; +PackedVector2Array mono_array_to_PackedVector2Array(MonoArray *p_array) { + PackedVector2Array ret; if (!p_array) return ret; int length = mono_array_length(p_array); ret.resize(length); - PoolVector2Array::Write w = ret.write(); + Vector2 *w = ret.ptrw(); for (int i = 0; i < length; i++) { w[i] = MARSHALLED_IN(Vector2, (M_Vector2 *)mono_array_addr_with_size(p_array, sizeof(M_Vector2), i)); @@ -1153,8 +1153,8 @@ PoolVector2Array mono_array_to_PoolVector2Array(MonoArray *p_array) { return ret; } -MonoArray *PoolVector3Array_to_mono_array(const PoolVector3Array &p_array) { - PoolVector3Array::Read r = p_array.read(); +MonoArray *PackedVector3Array_to_mono_array(const PackedVector3Array &p_array) { + const Vector3 *r = p_array.ptr(); MonoArray *ret = mono_array_new(mono_domain_get(), CACHED_CLASS_RAW(Vector3), p_array.size()); @@ -1166,13 +1166,13 @@ MonoArray *PoolVector3Array_to_mono_array(const PoolVector3Array &p_array) { return ret; } -PoolVector3Array mono_array_to_PoolVector3Array(MonoArray *p_array) { - PoolVector3Array ret; +PackedVector3Array mono_array_to_PackedVector3Array(MonoArray *p_array) { + PackedVector3Array ret; if (!p_array) return ret; int length = mono_array_length(p_array); ret.resize(length); - PoolVector3Array::Write w = ret.write(); + Vector3 *w = ret.ptrw(); for (int i = 0; i < length; i++) { w[i] = MARSHALLED_IN(Vector3, (M_Vector3 *)mono_array_addr_with_size(p_array, sizeof(M_Vector3), i)); diff --git a/modules/mono/mono_gd/gd_mono_marshal.h b/modules/mono/mono_gd/gd_mono_marshal.h index e662e7814e..5db59522ce 100644 --- a/modules/mono/mono_gd/gd_mono_marshal.h +++ b/modules/mono/mono_gd/gd_mono_marshal.h @@ -127,40 +127,40 @@ String mono_object_to_variant_string(MonoObject *p_obj, MonoException **r_exc); MonoArray *Array_to_mono_array(const Array &p_array); Array mono_array_to_Array(MonoArray *p_array); -// PoolIntArray +// PackedInt32Array -MonoArray *PoolIntArray_to_mono_array(const PoolIntArray &p_array); -PoolIntArray mono_array_to_PoolIntArray(MonoArray *p_array); +MonoArray *PackedInt32Array_to_mono_array(const PackedInt32Array &p_array); +PackedInt32Array mono_array_to_PackedInt32Array(MonoArray *p_array); -// PoolByteArray +// PackedByteArray -MonoArray *PoolByteArray_to_mono_array(const PoolByteArray &p_array); -PoolByteArray mono_array_to_PoolByteArray(MonoArray *p_array); +MonoArray *PackedByteArray_to_mono_array(const PackedByteArray &p_array); +PackedByteArray mono_array_to_PackedByteArray(MonoArray *p_array); -// PoolRealArray +// PackedFloat32Array -MonoArray *PoolRealArray_to_mono_array(const PoolRealArray &p_array); -PoolRealArray mono_array_to_PoolRealArray(MonoArray *p_array); +MonoArray *PackedFloat32Array_to_mono_array(const PackedFloat32Array &p_array); +PackedFloat32Array mono_array_to_PackedFloat32Array(MonoArray *p_array); -// PoolStringArray +// PackedStringArray -MonoArray *PoolStringArray_to_mono_array(const PoolStringArray &p_array); -PoolStringArray mono_array_to_PoolStringArray(MonoArray *p_array); +MonoArray *PackedStringArray_to_mono_array(const PackedStringArray &p_array); +PackedStringArray mono_array_to_PackedStringArray(MonoArray *p_array); -// PoolColorArray +// PackedColorArray -MonoArray *PoolColorArray_to_mono_array(const PoolColorArray &p_array); -PoolColorArray mono_array_to_PoolColorArray(MonoArray *p_array); +MonoArray *PackedColorArray_to_mono_array(const PackedColorArray &p_array); +PackedColorArray mono_array_to_PackedColorArray(MonoArray *p_array); -// PoolVector2Array +// PackedVector2Array -MonoArray *PoolVector2Array_to_mono_array(const PoolVector2Array &p_array); -PoolVector2Array mono_array_to_PoolVector2Array(MonoArray *p_array); +MonoArray *PackedVector2Array_to_mono_array(const PackedVector2Array &p_array); +PackedVector2Array mono_array_to_PackedVector2Array(MonoArray *p_array); -// PoolVector3Array +// PackedVector3Array -MonoArray *PoolVector3Array_to_mono_array(const PoolVector3Array &p_array); -PoolVector3Array mono_array_to_PoolVector3Array(MonoArray *p_array); +MonoArray *PackedVector3Array_to_mono_array(const PackedVector3Array &p_array); +PackedVector3Array mono_array_to_PackedVector3Array(MonoArray *p_array); // Structures diff --git a/modules/mono/mono_gd/gd_mono_utils.cpp b/modules/mono/mono_gd/gd_mono_utils.cpp index 05077a00c4..ae6625a6c6 100644 --- a/modules/mono/mono_gd/gd_mono_utils.cpp +++ b/modules/mono/mono_gd/gd_mono_utils.cpp @@ -38,7 +38,7 @@ #include "core/reference.h" #ifdef TOOLS_ENABLED -#include "editor/script_editor_debugger.h" +#include "editor/debugger/script_editor_debugger.h" #endif #include "../csharp_script.h" diff --git a/modules/mono/signal_awaiter_utils.cpp b/modules/mono/signal_awaiter_utils.cpp index b85d5f2fd9..718bc2bb93 100644 --- a/modules/mono/signal_awaiter_utils.cpp +++ b/modules/mono/signal_awaiter_utils.cpp @@ -51,7 +51,7 @@ Error connect_signal_awaiter(Object *p_source, const String &p_signal, Object *p Vector<Variant> binds; binds.push_back(sa_con); - Error err = p_source->connect(p_signal, sa_con.ptr(), + Error err = p_source->connect_compat(p_signal, sa_con.ptr(), CSharpLanguage::get_singleton()->get_string_names()._signal_callback, binds, Object::CONNECT_ONESHOT); @@ -65,7 +65,7 @@ Error connect_signal_awaiter(Object *p_source, const String &p_signal, Object *p } } // namespace SignalAwaiterUtils -Variant SignalAwaiterHandle::_signal_callback(const Variant **p_args, int p_argcount, Variant::CallError &r_error) { +Variant SignalAwaiterHandle::_signal_callback(const Variant **p_args, int p_argcount, Callable::CallError &r_error) { #ifdef DEBUG_ENABLED ERR_FAIL_COND_V_MSG(conn_target_id.is_valid() && !ObjectDB::get_instance(conn_target_id), Variant(), @@ -73,7 +73,7 @@ Variant SignalAwaiterHandle::_signal_callback(const Variant **p_args, int p_argc #endif if (p_argcount < 1) { - r_error.error = Variant::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS; + r_error.error = Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS; r_error.argument = 1; return Variant(); } @@ -81,7 +81,7 @@ Variant SignalAwaiterHandle::_signal_callback(const Variant **p_args, int p_argc Ref<SignalAwaiterHandle> self = *p_args[p_argcount - 1]; if (self.is_null()) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.argument = p_argcount - 1; r_error.expected = Variant::OBJECT; return Variant(); diff --git a/modules/mono/signal_awaiter_utils.h b/modules/mono/signal_awaiter_utils.h index a9956ad5ba..012f6e5bb3 100644 --- a/modules/mono/signal_awaiter_utils.h +++ b/modules/mono/signal_awaiter_utils.h @@ -49,7 +49,7 @@ class SignalAwaiterHandle : public MonoGCHandle { ObjectID conn_target_id; #endif - Variant _signal_callback(const Variant **p_args, int p_argcount, Variant::CallError &r_error); + Variant _signal_callback(const Variant **p_args, int p_argcount, Callable::CallError &r_error); protected: static void _bind_methods(); diff --git a/modules/mono/utils/string_utils.cpp b/modules/mono/utils/string_utils.cpp index 911ac5c4a3..49c4fb3f73 100644 --- a/modules/mono/utils/string_utils.cpp +++ b/modules/mono/utils/string_utils.cpp @@ -162,22 +162,22 @@ String escape_csharp_keyword(const String &p_name) { #endif Error read_all_file_utf8(const String &p_path, String &r_content) { - PoolVector<uint8_t> sourcef; + Vector<uint8_t> sourcef; Error err; FileAccess *f = FileAccess::open(p_path, FileAccess::READ, &err); ERR_FAIL_COND_V_MSG(err != OK, err, "Cannot open file '" + p_path + "'."); int len = f->get_len(); sourcef.resize(len + 1); - PoolVector<uint8_t>::Write w = sourcef.write(); - int r = f->get_buffer(w.ptr(), len); + uint8_t *w = sourcef.ptrw(); + int r = f->get_buffer(w, len); f->close(); memdelete(f); ERR_FAIL_COND_V(r != len, ERR_CANT_OPEN); w[len] = 0; String source; - if (source.parse_utf8((const char *)w.ptr())) { + if (source.parse_utf8((const char *)w)) { ERR_FAIL_V(ERR_INVALID_DATA); } diff --git a/modules/opensimplex/noise_texture.cpp b/modules/opensimplex/noise_texture.cpp index 19aa281a72..d60099e676 100644 --- a/modules/opensimplex/noise_texture.cpp +++ b/modules/opensimplex/noise_texture.cpp @@ -84,7 +84,7 @@ void NoiseTexture::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::INT, "height", PROPERTY_HINT_RANGE, "1,2048,1,or_greater"), "set_height", "get_height"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "seamless"), "set_seamless", "get_seamless"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "as_normalmap"), "set_as_normalmap", "is_normalmap"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "bump_strength", PROPERTY_HINT_RANGE, "0,32,0.1,or_greater"), "set_bump_strength", "get_bump_strength"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "bump_strength", PROPERTY_HINT_RANGE, "0,32,0.1,or_greater"), "set_bump_strength", "get_bump_strength"); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "noise", PROPERTY_HINT_RESOURCE_TYPE, "OpenSimplexNoise"), "set_noise", "get_noise"); } @@ -184,11 +184,11 @@ void NoiseTexture::set_noise(Ref<OpenSimplexNoise> p_noise) { if (p_noise == noise) return; if (noise.is_valid()) { - noise->disconnect(CoreStringNames::get_singleton()->changed, this, "_queue_update"); + noise->disconnect_compat(CoreStringNames::get_singleton()->changed, this, "_queue_update"); } noise = p_noise; if (noise.is_valid()) { - noise->connect(CoreStringNames::get_singleton()->changed, this, "_queue_update"); + noise->connect_compat(CoreStringNames::get_singleton()->changed, this, "_queue_update"); } _queue_update(); } diff --git a/modules/opensimplex/open_simplex_noise.cpp b/modules/opensimplex/open_simplex_noise.cpp index bd187e6b5b..238faa4130 100644 --- a/modules/opensimplex/open_simplex_noise.cpp +++ b/modules/opensimplex/open_simplex_noise.cpp @@ -98,10 +98,10 @@ void OpenSimplexNoise::set_lacunarity(float p_lacunarity) { Ref<Image> OpenSimplexNoise::get_image(int p_width, int p_height) { - PoolVector<uint8_t> data; + Vector<uint8_t> data; data.resize(p_width * p_height * 4); - PoolVector<uint8_t>::Write wd8 = data.write(); + uint8_t *wd8 = data.ptrw(); for (int i = 0; i < p_height; i++) { for (int j = 0; j < p_width; j++) { @@ -121,10 +121,10 @@ Ref<Image> OpenSimplexNoise::get_image(int p_width, int p_height) { Ref<Image> OpenSimplexNoise::get_seamless_image(int p_size) { - PoolVector<uint8_t> data; + Vector<uint8_t> data; data.resize(p_size * p_size * 4); - PoolVector<uint8_t>::Write wd8 = data.write(); + uint8_t *wd8 = data.ptrw(); for (int i = 0; i < p_size; i++) { for (int j = 0; j < p_size; j++) { @@ -186,9 +186,9 @@ void OpenSimplexNoise::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::INT, "seed"), "set_seed", "get_seed"); ADD_PROPERTY(PropertyInfo(Variant::INT, "octaves", PROPERTY_HINT_RANGE, vformat("1,%d,1", MAX_OCTAVES)), "set_octaves", "get_octaves"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "period", PROPERTY_HINT_RANGE, "0.1,256.0,0.1"), "set_period", "get_period"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "persistence", PROPERTY_HINT_RANGE, "0.0,1.0,0.001"), "set_persistence", "get_persistence"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "lacunarity", PROPERTY_HINT_RANGE, "0.1,4.0,0.01"), "set_lacunarity", "get_lacunarity"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "period", PROPERTY_HINT_RANGE, "0.1,256.0,0.1"), "set_period", "get_period"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "persistence", PROPERTY_HINT_RANGE, "0.0,1.0,0.001"), "set_persistence", "get_persistence"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "lacunarity", PROPERTY_HINT_RANGE, "0.1,4.0,0.01"), "set_lacunarity", "get_lacunarity"); } float OpenSimplexNoise::get_noise_1d(float x) { diff --git a/modules/pvr/texture_loader_pvr.cpp b/modules/pvr/texture_loader_pvr.cpp index 36f2fe1ba1..dab4f64393 100644 --- a/modules/pvr/texture_loader_pvr.cpp +++ b/modules/pvr/texture_loader_pvr.cpp @@ -96,12 +96,12 @@ RES ResourceFormatPVR::load(const String &p_path, const String &p_original_path, print_line("surfcount: "+itos(surfcount)); */ - PoolVector<uint8_t> data; + Vector<uint8_t> data; data.resize(surfsize); ERR_FAIL_COND_V(data.size() == 0, RES()); - PoolVector<uint8_t>::Write w = data.write(); + uint8_t *w = data.ptrw(); f->get_buffer(&w[0], surfsize); err = f->get_error(); ERR_FAIL_COND_V(err != OK, RES()); @@ -152,8 +152,6 @@ RES ResourceFormatPVR::load(const String &p_path, const String &p_original_path, ERR_FAIL_V_MSG(RES(), "Unsupported format in PVR texture: " + itos(flags & 0xFF) + "."); } - w.release(); - Ref<Image> image = memnew(Image(width, height, mipmaps, format, data)); ERR_FAIL_COND_V(image->empty(), RES()); @@ -200,10 +198,10 @@ static void _compress_pvrtc4(Image *p_img) { new_img.instance(); new_img->create(img->get_width(), img->get_height(), img->has_mipmaps(), use_alpha ? Image::FORMAT_PVRTC4A : Image::FORMAT_PVRTC4); - PoolVector<uint8_t> data = new_img->get_data(); + Vector<uint8_t> data = new_img->get_data(); { - PoolVector<uint8_t>::Write wr = data.write(); - PoolVector<uint8_t>::Read r = img->get_data().read(); + uint8_t *wr = data.ptrw(); + const uint8_t *r = img->get_data().ptr(); for (int i = 0; i <= new_img->get_mipmap_count(); i++) { @@ -640,17 +638,14 @@ static void _pvrtc_decompress(Image *p_img) { bool _2bit = (p_img->get_format() == Image::FORMAT_PVRTC2 || p_img->get_format() == Image::FORMAT_PVRTC2A); - PoolVector<uint8_t> data = p_img->get_data(); - PoolVector<uint8_t>::Read r = data.read(); + Vector<uint8_t> data = p_img->get_data(); + const uint8_t *r = data.ptr(); - PoolVector<uint8_t> newdata; + Vector<uint8_t> newdata; newdata.resize(p_img->get_width() * p_img->get_height() * 4); - PoolVector<uint8_t>::Write w = newdata.write(); - - decompress_pvrtc((PVRTCBlock *)r.ptr(), _2bit, p_img->get_width(), p_img->get_height(), 0, (unsigned char *)w.ptr()); + uint8_t *w = newdata.ptrw(); - w.release(); - r.release(); + decompress_pvrtc((PVRTCBlock *)r, _2bit, p_img->get_width(), p_img->get_height(), 0, (unsigned char *)w); bool make_mipmaps = p_img->has_mipmaps(); p_img->create(p_img->get_width(), p_img->get_height(), false, Image::FORMAT_RGBA8, newdata); diff --git a/modules/squish/image_compress_squish.cpp b/modules/squish/image_compress_squish.cpp index 2f680fd3d0..bb77f68590 100644 --- a/modules/squish/image_compress_squish.cpp +++ b/modules/squish/image_compress_squish.cpp @@ -37,13 +37,13 @@ void image_decompress_squish(Image *p_image) { int h = p_image->get_height(); Image::Format target_format = Image::FORMAT_RGBA8; - PoolVector<uint8_t> data; + Vector<uint8_t> data; int target_size = Image::get_image_data_size(w, h, target_format, p_image->has_mipmaps()); int mm_count = p_image->get_mipmap_count(); data.resize(target_size); - PoolVector<uint8_t>::Read rb = p_image->get_data().read(); - PoolVector<uint8_t>::Write wb = data.write(); + const uint8_t *rb = p_image->get_data().ptr(); + uint8_t *wb = data.ptrw(); int squish_flags = Image::FORMAT_MAX; if (p_image->get_format() == Image::FORMAT_DXT1) { @@ -137,14 +137,14 @@ void image_compress_squish(Image *p_image, float p_lossy_quality, Image::UsedCha } } - PoolVector<uint8_t> data; + Vector<uint8_t> data; int target_size = Image::get_image_data_size(w, h, target_format, p_image->has_mipmaps()); int mm_count = p_image->has_mipmaps() ? Image::get_image_required_mipmaps(w, h, target_format) : 0; data.resize(target_size); int shift = Image::get_format_pixel_rshift(target_format); - PoolVector<uint8_t>::Read rb = p_image->get_data().read(); - PoolVector<uint8_t>::Write wb = data.write(); + const uint8_t *rb = p_image->get_data().ptr(); + uint8_t *wb = data.ptrw(); int dst_ofs = 0; @@ -160,9 +160,6 @@ void image_compress_squish(Image *p_image, float p_lossy_quality, Image::UsedCha h = MAX(h / 2, 1); } - rb.release(); - wb.release(); - p_image->create(p_image->get_width(), p_image->get_height(), p_image->has_mipmaps(), target_format, data); } } diff --git a/modules/stb_vorbis/audio_stream_ogg_vorbis.cpp b/modules/stb_vorbis/audio_stream_ogg_vorbis.cpp index f2d0f5c9a6..054ed088df 100644 --- a/modules/stb_vorbis/audio_stream_ogg_vorbis.cpp +++ b/modules/stb_vorbis/audio_stream_ogg_vorbis.cpp @@ -163,32 +163,32 @@ void AudioStreamOGGVorbis::clear_data() { } } -void AudioStreamOGGVorbis::set_data(const PoolVector<uint8_t> &p_data) { +void AudioStreamOGGVorbis::set_data(const Vector<uint8_t> &p_data) { int src_data_len = p_data.size(); #define MAX_TEST_MEM (1 << 20) uint32_t alloc_try = 1024; - PoolVector<char> alloc_mem; - PoolVector<char>::Write w; + Vector<char> alloc_mem; + char *w; stb_vorbis *ogg_stream = NULL; stb_vorbis_alloc ogg_alloc; while (alloc_try < MAX_TEST_MEM) { alloc_mem.resize(alloc_try); - w = alloc_mem.write(); + w = alloc_mem.ptrw(); - ogg_alloc.alloc_buffer = w.ptr(); + ogg_alloc.alloc_buffer = w; ogg_alloc.alloc_buffer_length_in_bytes = alloc_try; - PoolVector<uint8_t>::Read src_datar = p_data.read(); + const uint8_t *src_datar = p_data.ptr(); int error; - ogg_stream = stb_vorbis_open_memory((const unsigned char *)src_datar.ptr(), src_data_len, &error, &ogg_alloc); + ogg_stream = stb_vorbis_open_memory((const unsigned char *)src_datar, src_data_len, &error, &ogg_alloc); if (!ogg_stream && error == VORBIS_outofmem) { - w.release(); + alloc_try *= 2; } else { @@ -209,7 +209,7 @@ void AudioStreamOGGVorbis::set_data(const PoolVector<uint8_t> &p_data) { // free any existing data clear_data(); - data = AudioServer::get_singleton()->audio_data_alloc(src_data_len, src_datar.ptr()); + data = AudioServer::get_singleton()->audio_data_alloc(src_data_len, src_datar); data_len = src_data_len; break; @@ -217,15 +217,15 @@ void AudioStreamOGGVorbis::set_data(const PoolVector<uint8_t> &p_data) { } } -PoolVector<uint8_t> AudioStreamOGGVorbis::get_data() const { +Vector<uint8_t> AudioStreamOGGVorbis::get_data() const { - PoolVector<uint8_t> vdata; + Vector<uint8_t> vdata; if (data_len && data) { vdata.resize(data_len); { - PoolVector<uint8_t>::Write w = vdata.write(); - copymem(w.ptr(), data, data_len); + uint8_t *w = vdata.ptrw(); + copymem(w, data, data_len); } } @@ -265,9 +265,9 @@ void AudioStreamOGGVorbis::_bind_methods() { 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); - ADD_PROPERTY(PropertyInfo(Variant::POOL_BYTE_ARRAY, "data", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_data", "get_data"); + ADD_PROPERTY(PropertyInfo(Variant::PACKED_BYTE_ARRAY, "data", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_data", "get_data"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "loop"), "set_loop", "has_loop"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "loop_offset"), "set_loop_offset", "get_loop_offset"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "loop_offset"), "set_loop_offset", "get_loop_offset"); } AudioStreamOGGVorbis::AudioStreamOGGVorbis() { diff --git a/modules/stb_vorbis/audio_stream_ogg_vorbis.h b/modules/stb_vorbis/audio_stream_ogg_vorbis.h index e909759acb..f296e8c19f 100644 --- a/modules/stb_vorbis/audio_stream_ogg_vorbis.h +++ b/modules/stb_vorbis/audio_stream_ogg_vorbis.h @@ -102,8 +102,8 @@ public: virtual Ref<AudioStreamPlayback> instance_playback(); virtual String get_stream_name() const; - void set_data(const PoolVector<uint8_t> &p_data); - PoolVector<uint8_t> get_data() const; + void set_data(const Vector<uint8_t> &p_data); + Vector<uint8_t> get_data() const; virtual float get_length() const; //if supported, otherwise return 0 diff --git a/modules/stb_vorbis/doc_classes/AudioStreamOGGVorbis.xml b/modules/stb_vorbis/doc_classes/AudioStreamOGGVorbis.xml index 38d3bd5468..8a1bb62e24 100644 --- a/modules/stb_vorbis/doc_classes/AudioStreamOGGVorbis.xml +++ b/modules/stb_vorbis/doc_classes/AudioStreamOGGVorbis.xml @@ -11,7 +11,7 @@ <methods> </methods> <members> - <member name="data" type="PoolByteArray" setter="set_data" getter="get_data" default="PoolByteArray( )"> + <member name="data" type="PackedByteArray" setter="set_data" getter="get_data" default="PackedByteArray( )"> Contains the audio data in bytes. </member> <member name="loop" type="bool" setter="set_loop" getter="has_loop" default="false"> diff --git a/modules/stb_vorbis/resource_importer_ogg_vorbis.cpp b/modules/stb_vorbis/resource_importer_ogg_vorbis.cpp index 06399f4005..13d96541e3 100644 --- a/modules/stb_vorbis/resource_importer_ogg_vorbis.cpp +++ b/modules/stb_vorbis/resource_importer_ogg_vorbis.cpp @@ -73,7 +73,7 @@ String ResourceImporterOGGVorbis::get_preset_name(int p_idx) const { void ResourceImporterOGGVorbis::get_import_options(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::REAL, "loop_offset"), 0)); + r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "loop_offset"), 0)); } Error ResourceImporterOGGVorbis::import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) { @@ -87,11 +87,11 @@ Error ResourceImporterOGGVorbis::import(const String &p_source_file, const Strin size_t len = f->get_len(); - PoolVector<uint8_t> data; + Vector<uint8_t> data; data.resize(len); - PoolVector<uint8_t>::Write w = data.write(); + uint8_t *w = data.ptrw(); - f->get_buffer(w.ptr(), len); + f->get_buffer(w, len); memdelete(f); diff --git a/modules/svg/image_loader_svg.cpp b/modules/svg/image_loader_svg.cpp index 7f91908a33..e9d30d015a 100644 --- a/modules/svg/image_loader_svg.cpp +++ b/modules/svg/image_loader_svg.cpp @@ -94,10 +94,10 @@ void ImageLoaderSVG::set_convert_colors(Dictionary *p_replace_color) { } } -Error ImageLoaderSVG::_create_image(Ref<Image> p_image, const PoolVector<uint8_t> *p_data, float p_scale, bool upsample, bool convert_colors) { +Error ImageLoaderSVG::_create_image(Ref<Image> p_image, const Vector<uint8_t> *p_data, float p_scale, bool upsample, bool convert_colors) { NSVGimage *svg_image; - PoolVector<uint8_t>::Read src_r = p_data->read(); - svg_image = nsvgParse((char *)src_r.ptr(), "px", 96); + const uint8_t *src_r = p_data->ptr(); + svg_image = nsvgParse((char *)src_r, "px", 96); if (svg_image == NULL) { ERR_PRINT("SVG Corrupted"); return ERR_FILE_CORRUPT; @@ -115,14 +115,13 @@ Error ImageLoaderSVG::_create_image(Ref<Image> p_image, const PoolVector<uint8_t const int h = (int)(svg_image->height * p_scale * upscale); ERR_FAIL_COND_V_MSG(h > Image::MAX_HEIGHT, ERR_PARAMETER_RANGE_ERROR, vformat("Can't create image from SVG with scale %s, the resulting image size exceeds max height.", rtos(p_scale))); - PoolVector<uint8_t> dst_image; + Vector<uint8_t> dst_image; dst_image.resize(w * h * 4); - PoolVector<uint8_t>::Write dw = dst_image.write(); + uint8_t *dw = dst_image.ptrw(); - rasterizer.rasterize(svg_image, 0, 0, p_scale * upscale, (unsigned char *)dw.ptr(), w, h, w * 4); + rasterizer.rasterize(svg_image, 0, 0, p_scale * upscale, (unsigned char *)dw, w, h, w * 4); - dw.release(); p_image->create(w, h, false, Image::FORMAT_RGBA8, dst_image); if (upsample) { p_image->shrink_x2(); @@ -136,10 +135,10 @@ Error ImageLoaderSVG::_create_image(Ref<Image> p_image, const PoolVector<uint8_t Error ImageLoaderSVG::create_image_from_string(Ref<Image> p_image, const char *p_svg_str, float p_scale, bool upsample, bool convert_colors) { size_t str_len = strlen(p_svg_str); - PoolVector<uint8_t> src_data; + Vector<uint8_t> src_data; src_data.resize(str_len + 1); - PoolVector<uint8_t>::Write src_w = src_data.write(); - memcpy(src_w.ptr(), p_svg_str, str_len + 1); + uint8_t *src_w = src_data.ptrw(); + memcpy(src_w, p_svg_str, str_len + 1); return _create_image(p_image, &src_data, p_scale, upsample, convert_colors); } @@ -147,11 +146,11 @@ Error ImageLoaderSVG::create_image_from_string(Ref<Image> p_image, const char *p Error ImageLoaderSVG::load_image(Ref<Image> p_image, FileAccess *f, bool p_force_linear, float p_scale) { uint32_t size = f->get_len(); - PoolVector<uint8_t> src_image; + Vector<uint8_t> src_image; src_image.resize(size + 1); - PoolVector<uint8_t>::Write src_w = src_image.write(); - f->get_buffer(src_w.ptr(), size); - src_w.ptr()[size] = '\0'; + uint8_t *src_w = src_image.ptrw(); + f->get_buffer(src_w, size); + src_w[size] = '\0'; return _create_image(p_image, &src_image, p_scale, 1.0); } diff --git a/modules/svg/image_loader_svg.h b/modules/svg/image_loader_svg.h index 24cee82480..def2885199 100644 --- a/modules/svg/image_loader_svg.h +++ b/modules/svg/image_loader_svg.h @@ -60,7 +60,7 @@ class ImageLoaderSVG : public ImageFormatLoader { } replace_colors; static SVGRasterizer rasterizer; static void _convert_colors(NSVGimage *p_svg_image); - static Error _create_image(Ref<Image> p_image, const PoolVector<uint8_t> *p_data, float p_scale, bool upsample, bool convert_colors = false); + static Error _create_image(Ref<Image> p_image, const Vector<uint8_t> *p_data, float p_scale, bool upsample, bool convert_colors = false); public: static void set_convert_colors(Dictionary *p_replace_color = NULL); diff --git a/modules/tga/image_loader_tga.cpp b/modules/tga/image_loader_tga.cpp index 480016eb97..0e904fdd76 100644 --- a/modules/tga/image_loader_tga.cpp +++ b/modules/tga/image_loader_tga.cpp @@ -36,12 +36,12 @@ Error ImageLoaderTGA::decode_tga_rle(const uint8_t *p_compressed_buffer, size_t p_pixel_size, uint8_t *p_uncompressed_buffer, size_t p_output_size) { Error error; - PoolVector<uint8_t> pixels; + Vector<uint8_t> pixels; error = pixels.resize(p_pixel_size); if (error != OK) return error; - PoolVector<uint8_t>::Write pixels_w = pixels.write(); + uint8_t *pixels_w = pixels.ptrw(); size_t compressed_pos = 0; size_t output_pos = 0; @@ -55,12 +55,12 @@ Error ImageLoaderTGA::decode_tga_rle(const uint8_t *p_compressed_buffer, size_t if (c & 0x80) { for (size_t i = 0; i < p_pixel_size; i++) { - pixels_w.ptr()[i] = p_compressed_buffer[compressed_pos]; + pixels_w[i] = p_compressed_buffer[compressed_pos]; compressed_pos += 1; } for (size_t i = 0; i < count; i++) { for (size_t j = 0; j < p_pixel_size; j++) { - p_uncompressed_buffer[output_pos + j] = pixels_w.ptr()[j]; + p_uncompressed_buffer[output_pos + j] = pixels_w[j]; } output_pos += p_pixel_size; } @@ -116,9 +116,9 @@ Error ImageLoaderTGA::convert_to_image(Ref<Image> p_image, const uint8_t *p_buff x_end = -1; } - PoolVector<uint8_t> image_data; + Vector<uint8_t> image_data; image_data.resize(width * height * sizeof(uint32_t)); - PoolVector<uint8_t>::Write image_data_w = image_data.write(); + uint8_t *image_data_w = image_data.ptrw(); size_t i = 0; uint32_t x = x_start; @@ -199,8 +199,6 @@ Error ImageLoaderTGA::convert_to_image(Ref<Image> p_image, const uint8_t *p_buff } } - image_data_w.release(); - p_image->create(width, height, 0, Image::FORMAT_RGBA8, image_data); return OK; @@ -208,7 +206,7 @@ Error ImageLoaderTGA::convert_to_image(Ref<Image> p_image, const uint8_t *p_buff Error ImageLoaderTGA::load_image(Ref<Image> p_image, FileAccess *f, bool p_force_linear, float p_scale) { - PoolVector<uint8_t> src_image; + Vector<uint8_t> src_image; int src_image_len = f->get_len(); ERR_FAIL_COND_V(src_image_len == 0, ERR_FILE_CORRUPT); ERR_FAIL_COND_V(src_image_len < (int)sizeof(tga_header_s), ERR_FILE_CORRUPT); @@ -259,49 +257,49 @@ Error ImageLoaderTGA::load_image(Ref<Image> p_image, FileAccess *f, bool p_force if (err == OK) { f->seek(f->get_position() + tga_header.id_length); - PoolVector<uint8_t> palette; + Vector<uint8_t> palette; if (has_color_map) { size_t color_map_size = tga_header.color_map_length * (tga_header.color_map_depth >> 3); err = palette.resize(color_map_size); if (err == OK) { - PoolVector<uint8_t>::Write palette_w = palette.write(); + uint8_t *palette_w = palette.ptrw(); f->get_buffer(&palette_w[0], color_map_size); } else { return OK; } } - PoolVector<uint8_t>::Write src_image_w = src_image.write(); + uint8_t *src_image_w = src_image.ptrw(); f->get_buffer(&src_image_w[0], src_image_len - f->get_position()); - PoolVector<uint8_t>::Read src_image_r = src_image.read(); + const uint8_t *src_image_r = src_image.ptr(); const size_t pixel_size = tga_header.pixel_depth >> 3; const size_t buffer_size = (tga_header.image_width * tga_header.image_height) * pixel_size; - PoolVector<uint8_t> uncompressed_buffer; + Vector<uint8_t> uncompressed_buffer; uncompressed_buffer.resize(buffer_size); - PoolVector<uint8_t>::Write uncompressed_buffer_w = uncompressed_buffer.write(); - PoolVector<uint8_t>::Read uncompressed_buffer_r; + uint8_t *uncompressed_buffer_w = uncompressed_buffer.ptrw(); + const uint8_t *uncompressed_buffer_r; const uint8_t *buffer = NULL; if (is_encoded) { - err = decode_tga_rle(src_image_r.ptr(), pixel_size, uncompressed_buffer_w.ptr(), buffer_size); + err = decode_tga_rle(src_image_r, pixel_size, uncompressed_buffer_w, buffer_size); if (err == OK) { - uncompressed_buffer_r = uncompressed_buffer.read(); - buffer = uncompressed_buffer_r.ptr(); + uncompressed_buffer_r = uncompressed_buffer.ptr(); + buffer = uncompressed_buffer_r; } } else { - buffer = src_image_r.ptr(); + buffer = src_image_r; }; if (err == OK) { - PoolVector<uint8_t>::Read palette_r = palette.read(); - err = convert_to_image(p_image, buffer, tga_header, palette_r.ptr(), is_monochrome); + const uint8_t *palette_r = palette.ptr(); + err = convert_to_image(p_image, buffer, tga_header, palette_r, is_monochrome); } } diff --git a/modules/theora/video_stream_theora.cpp b/modules/theora/video_stream_theora.cpp index de229745f5..a44ed0304d 100644 --- a/modules/theora/video_stream_theora.cpp +++ b/modules/theora/video_stream_theora.cpp @@ -87,8 +87,8 @@ void VideoStreamPlaybackTheora::video_write(void) { int pitch = 4; frame_data.resize(size.x * size.y * pitch); { - PoolVector<uint8_t>::Write w = frame_data.write(); - char *dst = (char *)w.ptr(); + uint8_t *w = frame_data.ptrw(); + char *dst = (char *)w; //uv_offset=(ti.pic_x/2)+(yuv[1].stride)*(ti.pic_y/2); diff --git a/modules/theora/video_stream_theora.h b/modules/theora/video_stream_theora.h index c0a0faec4b..258b3a1cce 100644 --- a/modules/theora/video_stream_theora.h +++ b/modules/theora/video_stream_theora.h @@ -54,7 +54,7 @@ class VideoStreamPlaybackTheora : public VideoStreamPlayback { //Image frames[MAX_FRAMES]; Image::Format format; - PoolVector<uint8_t> frame_data; + Vector<uint8_t> frame_data; int frames_pending; FileAccess *file; String file_name; diff --git a/modules/tinyexr/image_loader_tinyexr.cpp b/modules/tinyexr/image_loader_tinyexr.cpp index 79cb135abb..41938f5b42 100644 --- a/modules/tinyexr/image_loader_tinyexr.cpp +++ b/modules/tinyexr/image_loader_tinyexr.cpp @@ -37,12 +37,12 @@ Error ImageLoaderTinyEXR::load_image(Ref<Image> p_image, FileAccess *f, bool p_force_linear, float p_scale) { - PoolVector<uint8_t> src_image; + Vector<uint8_t> src_image; int src_image_len = f->get_len(); ERR_FAIL_COND_V(src_image_len == 0, ERR_FILE_CORRUPT); src_image.resize(src_image_len); - PoolVector<uint8_t>::Write w = src_image.write(); + uint8_t *w = src_image.ptrw(); f->get_buffer(&w[0], src_image_len); @@ -60,13 +60,13 @@ Error ImageLoaderTinyEXR::load_image(Ref<Image> p_image, FileAccess *f, bool p_f InitEXRHeader(&exr_header); - int ret = ParseEXRVersionFromMemory(&exr_version, w.ptr(), src_image_len); + int ret = ParseEXRVersionFromMemory(&exr_version, w, src_image_len); if (ret != TINYEXR_SUCCESS) { return ERR_FILE_CORRUPT; } - ret = ParseEXRHeaderFromMemory(&exr_header, &exr_version, w.ptr(), src_image_len, &err); + ret = ParseEXRHeaderFromMemory(&exr_header, &exr_version, w, src_image_len, &err); if (ret != TINYEXR_SUCCESS) { if (err) { ERR_PRINT(String(err)); @@ -82,7 +82,7 @@ Error ImageLoaderTinyEXR::load_image(Ref<Image> p_image, FileAccess *f, bool p_f } InitEXRImage(&exr_image); - ret = LoadEXRImageFromMemory(&exr_image, &exr_header, w.ptr(), src_image_len, &err); + ret = LoadEXRImageFromMemory(&exr_image, &exr_header, w, src_image_len, &err); if (ret != TINYEXR_SUCCESS) { if (err) { ERR_PRINT(String(err)); @@ -136,7 +136,7 @@ Error ImageLoaderTinyEXR::load_image(Ref<Image> p_image, FileAccess *f, bool p_f // EXR image data loaded, now parse it into Godot-friendly image data - PoolVector<uint8_t> imgdata; + Vector<uint8_t> imgdata; Image::Format format; int output_channels = 0; @@ -180,8 +180,8 @@ Error ImageLoaderTinyEXR::load_image(Ref<Image> p_image, FileAccess *f, bool p_f } { - PoolVector<uint8_t>::Write wd = imgdata.write(); - uint16_t *iw = (uint16_t *)wd.ptr(); + uint8_t *wd = imgdata.ptrw(); + uint16_t *iw = (uint16_t *)wd; // Assume `out_rgba` have enough memory allocated. for (int tile_index = 0; tile_index < num_tiles; tile_index++) { @@ -235,8 +235,6 @@ Error ImageLoaderTinyEXR::load_image(Ref<Image> p_image, FileAccess *f, bool p_f p_image->create(exr_image.width, exr_image.height, false, format, imgdata); - w.release(); - FreeEXRHeader(&exr_header); FreeEXRImage(&exr_image); diff --git a/modules/tinyexr/image_saver_tinyexr.cpp b/modules/tinyexr/image_saver_tinyexr.cpp index a0c01f7e65..05080289bd 100644 --- a/modules/tinyexr/image_saver_tinyexr.cpp +++ b/modules/tinyexr/image_saver_tinyexr.cpp @@ -159,7 +159,7 @@ Error save_exr(const String &p_path, const Ref<Image> &p_img, bool p_grayscale) // Godot does not support more than 4 channels, // so we can preallocate header infos on the stack and use only the subset we need - PoolByteArray channels[max_channels]; + PackedByteArray channels[max_channels]; unsigned char *channels_ptrs[max_channels]; EXRChannelInfo channel_infos[max_channels]; int pixel_types[max_channels]; @@ -188,25 +188,25 @@ Error save_exr(const String &p_path, const Ref<Image> &p_img, bool p_grayscale) const int *channel_mapping = channel_mappings[channel_count - 1]; { - PoolByteArray src_data = p_img->get_data(); - PoolByteArray::Read src_r = src_data.read(); + PackedByteArray src_data = p_img->get_data(); + const uint8_t *src_r = src_data.ptr(); for (int channel_index = 0; channel_index < channel_count; ++channel_index) { // De-interleave channels - PoolByteArray &dst = channels[channel_index]; + PackedByteArray &dst = channels[channel_index]; dst.resize(pixel_count * target_pixel_type_size); - PoolByteArray::Write dst_w = dst.write(); + uint8_t *dst_w = dst.ptrw(); if (src_pixel_type == SRC_FLOAT && target_pixel_type == TINYEXR_PIXELTYPE_FLOAT) { // Note: we don't save mipmaps CRASH_COND(src_data.size() < pixel_count * channel_count * target_pixel_type_size); - const float *src_rp = (float *)src_r.ptr(); - float *dst_wp = (float *)dst_w.ptr(); + const float *src_rp = (float *)src_r; + float *dst_wp = (float *)dst_w; for (int i = 0; i < pixel_count; ++i) { dst_wp[i] = src_rp[channel_index + i * channel_count]; @@ -216,8 +216,8 @@ Error save_exr(const String &p_path, const Ref<Image> &p_img, bool p_grayscale) CRASH_COND(src_data.size() < pixel_count * channel_count * target_pixel_type_size); - const uint16_t *src_rp = (uint16_t *)src_r.ptr(); - uint16_t *dst_wp = (uint16_t *)dst_w.ptr(); + const uint16_t *src_rp = (uint16_t *)src_r; + uint16_t *dst_wp = (uint16_t *)dst_w; for (int i = 0; i < pixel_count; ++i) { dst_wp[i] = src_rp[channel_index + i * channel_count]; @@ -227,8 +227,8 @@ Error save_exr(const String &p_path, const Ref<Image> &p_img, bool p_grayscale) CRASH_COND(src_data.size() < pixel_count * channel_count); - const uint8_t *src_rp = (uint8_t *)src_r.ptr(); - uint16_t *dst_wp = (uint16_t *)dst_w.ptr(); + const uint8_t *src_rp = (uint8_t *)src_r; + uint16_t *dst_wp = (uint16_t *)dst_w; for (int i = 0; i < pixel_count; ++i) { dst_wp[i] = Math::make_half_float(src_rp[channel_index + i * channel_count] / 255.f); @@ -240,7 +240,7 @@ Error save_exr(const String &p_path, const Ref<Image> &p_img, bool p_grayscale) int remapped_index = channel_mapping[channel_index]; - channels_ptrs[remapped_index] = dst_w.ptr(); + channels_ptrs[remapped_index] = dst_w; // No conversion pixel_types[remapped_index] = target_pixel_type; diff --git a/modules/visual_script/doc_classes/VisualScript.xml b/modules/visual_script/doc_classes/VisualScript.xml index 9cd79aa781..db1ef2adc6 100644 --- a/modules/visual_script/doc_classes/VisualScript.xml +++ b/modules/visual_script/doc_classes/VisualScript.xml @@ -15,7 +15,7 @@ <method name="add_custom_signal"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <description> Add a custom signal with the specified name to the VisualScript. @@ -24,7 +24,7 @@ <method name="add_function"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <description> Add a function with the specified name to the VisualScript. @@ -33,7 +33,7 @@ <method name="add_node"> <return type="void"> </return> - <argument index="0" name="func" type="String"> + <argument index="0" name="func" type="StringName"> </argument> <argument index="1" name="id" type="int"> </argument> @@ -48,7 +48,7 @@ <method name="add_variable"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <argument index="1" name="default_value" type="Variant" default="null"> </argument> @@ -61,7 +61,7 @@ <method name="custom_signal_add_argument"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <argument index="1" name="type" type="int" enum="Variant.Type"> </argument> @@ -76,7 +76,7 @@ <method name="custom_signal_get_argument_count" qualifiers="const"> <return type="int"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <description> Get the count of a custom signal's arguments. @@ -85,7 +85,7 @@ <method name="custom_signal_get_argument_name" qualifiers="const"> <return type="String"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <argument index="1" name="argidx" type="int"> </argument> @@ -96,7 +96,7 @@ <method name="custom_signal_get_argument_type" qualifiers="const"> <return type="int" enum="Variant.Type"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <argument index="1" name="argidx" type="int"> </argument> @@ -107,7 +107,7 @@ <method name="custom_signal_remove_argument"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <argument index="1" name="argidx" type="int"> </argument> @@ -118,7 +118,7 @@ <method name="custom_signal_set_argument_name"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <argument index="1" name="argidx" type="int"> </argument> @@ -131,7 +131,7 @@ <method name="custom_signal_set_argument_type"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <argument index="1" name="argidx" type="int"> </argument> @@ -144,7 +144,7 @@ <method name="custom_signal_swap_argument"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <argument index="1" name="argidx" type="int"> </argument> @@ -157,7 +157,7 @@ <method name="data_connect"> <return type="void"> </return> - <argument index="0" name="func" type="String"> + <argument index="0" name="func" type="StringName"> </argument> <argument index="1" name="from_node" type="int"> </argument> @@ -174,7 +174,7 @@ <method name="data_disconnect"> <return type="void"> </return> - <argument index="0" name="func" type="String"> + <argument index="0" name="func" type="StringName"> </argument> <argument index="1" name="from_node" type="int"> </argument> @@ -191,7 +191,7 @@ <method name="get_function_node_id" qualifiers="const"> <return type="int"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <description> Returns the id of a function's entry point node. @@ -200,7 +200,7 @@ <method name="get_function_scroll" qualifiers="const"> <return type="Vector2"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <description> Returns the position of the center of the screen for a given function. @@ -209,7 +209,7 @@ <method name="get_node" qualifiers="const"> <return type="VisualScriptNode"> </return> - <argument index="0" name="func" type="String"> + <argument index="0" name="func" type="StringName"> </argument> <argument index="1" name="id" type="int"> </argument> @@ -220,7 +220,7 @@ <method name="get_node_position" qualifiers="const"> <return type="Vector2"> </return> - <argument index="0" name="func" type="String"> + <argument index="0" name="func" type="StringName"> </argument> <argument index="1" name="id" type="int"> </argument> @@ -231,7 +231,7 @@ <method name="get_variable_default_value" qualifiers="const"> <return type="Variant"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <description> Returns the default (initial) value of a variable. @@ -240,7 +240,7 @@ <method name="get_variable_export" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <description> Returns whether a variable is exported. @@ -249,7 +249,7 @@ <method name="get_variable_info" qualifiers="const"> <return type="Dictionary"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <description> Returns the information for a given variable as a dictionary. The information includes its name, type, hint and usage. @@ -258,7 +258,7 @@ <method name="has_custom_signal" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <description> Returns whether a signal exists with the specified name. @@ -267,7 +267,7 @@ <method name="has_data_connection" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="func" type="String"> + <argument index="0" name="func" type="StringName"> </argument> <argument index="1" name="from_node" type="int"> </argument> @@ -284,7 +284,7 @@ <method name="has_function" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <description> Returns whether a function exists with the specified name. @@ -293,7 +293,7 @@ <method name="has_node" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="func" type="String"> + <argument index="0" name="func" type="StringName"> </argument> <argument index="1" name="id" type="int"> </argument> @@ -304,7 +304,7 @@ <method name="has_sequence_connection" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="func" type="String"> + <argument index="0" name="func" type="StringName"> </argument> <argument index="1" name="from_node" type="int"> </argument> @@ -319,7 +319,7 @@ <method name="has_variable" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <description> Returns whether a variable exists with the specified name. @@ -328,7 +328,7 @@ <method name="remove_custom_signal"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <description> Remove a custom signal with the given name. @@ -337,7 +337,7 @@ <method name="remove_function"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <description> Remove a specific function and its nodes from the script. @@ -346,7 +346,7 @@ <method name="remove_node"> <return type="void"> </return> - <argument index="0" name="func" type="String"> + <argument index="0" name="func" type="StringName"> </argument> <argument index="1" name="id" type="int"> </argument> @@ -357,7 +357,7 @@ <method name="remove_variable"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <description> Remove a variable with the given name. @@ -366,9 +366,9 @@ <method name="rename_custom_signal"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="new_name" type="String"> + <argument index="1" name="new_name" type="StringName"> </argument> <description> Change the name of a custom signal. @@ -377,9 +377,9 @@ <method name="rename_function"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="new_name" type="String"> + <argument index="1" name="new_name" type="StringName"> </argument> <description> Change the name of a function. @@ -388,9 +388,9 @@ <method name="rename_variable"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="new_name" type="String"> + <argument index="1" name="new_name" type="StringName"> </argument> <description> Change the name of a variable. @@ -399,7 +399,7 @@ <method name="sequence_connect"> <return type="void"> </return> - <argument index="0" name="func" type="String"> + <argument index="0" name="func" type="StringName"> </argument> <argument index="1" name="from_node" type="int"> </argument> @@ -415,7 +415,7 @@ <method name="sequence_disconnect"> <return type="void"> </return> - <argument index="0" name="func" type="String"> + <argument index="0" name="func" type="StringName"> </argument> <argument index="1" name="from_node" type="int"> </argument> @@ -430,7 +430,7 @@ <method name="set_function_scroll"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <argument index="1" name="ofs" type="Vector2"> </argument> @@ -441,7 +441,7 @@ <method name="set_instance_base_type"> <return type="void"> </return> - <argument index="0" name="type" type="String"> + <argument index="0" name="type" type="StringName"> </argument> <description> Set the base type of the script. @@ -450,7 +450,7 @@ <method name="set_node_position"> <return type="void"> </return> - <argument index="0" name="func" type="String"> + <argument index="0" name="func" type="StringName"> </argument> <argument index="1" name="id" type="int"> </argument> @@ -463,7 +463,7 @@ <method name="set_variable_default_value"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <argument index="1" name="value" type="Variant"> </argument> @@ -474,7 +474,7 @@ <method name="set_variable_export"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <argument index="1" name="enable" type="bool"> </argument> @@ -485,7 +485,7 @@ <method name="set_variable_info"> <return type="void"> </return> - <argument index="0" name="name" type="String"> + <argument index="0" name="name" type="StringName"> </argument> <argument index="1" name="value" type="Dictionary"> </argument> diff --git a/modules/visual_script/doc_classes/VisualScriptBasicTypeConstant.xml b/modules/visual_script/doc_classes/VisualScriptBasicTypeConstant.xml index c8e391c4a1..4d07f878a2 100644 --- a/modules/visual_script/doc_classes/VisualScriptBasicTypeConstant.xml +++ b/modules/visual_script/doc_classes/VisualScriptBasicTypeConstant.xml @@ -14,7 +14,7 @@ <member name="basic_type" type="int" setter="set_basic_type" getter="get_basic_type" enum="Variant.Type" default="0"> The type to get the constant from. </member> - <member name="constant" type="String" setter="set_basic_type_constant" getter="get_basic_type_constant"> + <member name="constant" type="StringName" setter="set_basic_type_constant" getter="get_basic_type_constant"> The name of the constant to return. </member> </members> diff --git a/modules/visual_script/doc_classes/VisualScriptBuiltinFunc.xml b/modules/visual_script/doc_classes/VisualScriptBuiltinFunc.xml index 9f4846ee1f..ef4183e6f6 100644 --- a/modules/visual_script/doc_classes/VisualScriptBuiltinFunc.xml +++ b/modules/visual_script/doc_classes/VisualScriptBuiltinFunc.xml @@ -197,10 +197,10 @@ Deserialize a [Variant] from a string serialized using [constant VAR_TO_STR]. </constant> <constant name="VAR_TO_BYTES" value="61" enum="BuiltinFunc"> - Serialize a [Variant] to a [PoolByteArray]. + Serialize a [Variant] to a [PackedByteArray]. </constant> <constant name="BYTES_TO_VAR" value="62" enum="BuiltinFunc"> - Deserialize a [Variant] from a [PoolByteArray] serialized using [constant VAR_TO_BYTES]. + Deserialize a [Variant] from a [PackedByteArray] serialized using [constant VAR_TO_BYTES]. </constant> <constant name="COLORN" value="63" enum="BuiltinFunc"> Return the [Color] with the given name and alpha ranging from 0 to 1. diff --git a/modules/visual_script/doc_classes/VisualScriptClassConstant.xml b/modules/visual_script/doc_classes/VisualScriptClassConstant.xml index cf35808823..de5d731cc0 100644 --- a/modules/visual_script/doc_classes/VisualScriptClassConstant.xml +++ b/modules/visual_script/doc_classes/VisualScriptClassConstant.xml @@ -15,10 +15,10 @@ <methods> </methods> <members> - <member name="base_type" type="String" setter="set_base_type" getter="get_base_type" default=""Object""> + <member name="base_type" type="StringName" setter="set_base_type" getter="get_base_type" default="@"Object""> The constant's parent class. </member> - <member name="constant" type="String" setter="set_class_constant" getter="get_class_constant" default=""""> + <member name="constant" type="StringName" setter="set_class_constant" getter="get_class_constant" default="@"""> The constant to return. See the given class for its available constants. </member> </members> diff --git a/modules/visual_script/doc_classes/VisualScriptEmitSignal.xml b/modules/visual_script/doc_classes/VisualScriptEmitSignal.xml index 60a19ac7a7..5c9c8d3eca 100644 --- a/modules/visual_script/doc_classes/VisualScriptEmitSignal.xml +++ b/modules/visual_script/doc_classes/VisualScriptEmitSignal.xml @@ -15,7 +15,7 @@ <methods> </methods> <members> - <member name="signal" type="String" setter="set_signal" getter="get_signal" default=""""> + <member name="signal" type="StringName" setter="set_signal" getter="get_signal" default="@"""> The signal to emit. </member> </members> diff --git a/modules/visual_script/doc_classes/VisualScriptFunctionCall.xml b/modules/visual_script/doc_classes/VisualScriptFunctionCall.xml index 16c3af7ab2..2d0fac1fa0 100644 --- a/modules/visual_script/doc_classes/VisualScriptFunctionCall.xml +++ b/modules/visual_script/doc_classes/VisualScriptFunctionCall.xml @@ -11,19 +11,19 @@ <members> <member name="base_script" type="String" setter="set_base_script" getter="get_base_script"> </member> - <member name="base_type" type="String" setter="set_base_type" getter="get_base_type" default=""Object""> + <member name="base_type" type="StringName" setter="set_base_type" getter="get_base_type" default="@"Object""> </member> <member name="basic_type" type="int" setter="set_basic_type" getter="get_basic_type" enum="Variant.Type"> </member> <member name="call_mode" type="int" setter="set_call_mode" getter="get_call_mode" enum="VisualScriptFunctionCall.CallMode" default="0"> </member> - <member name="function" type="String" setter="set_function" getter="get_function" default=""""> + <member name="function" type="StringName" setter="set_function" getter="get_function" default="@"""> </member> <member name="node_path" type="NodePath" setter="set_base_path" getter="get_base_path"> </member> <member name="rpc_call_mode" type="int" setter="set_rpc_call_mode" getter="get_rpc_call_mode" enum="VisualScriptFunctionCall.RPCCallMode" default="0"> </member> - <member name="singleton" type="String" setter="set_singleton" getter="get_singleton"> + <member name="singleton" type="StringName" setter="set_singleton" getter="get_singleton"> </member> <member name="use_default_args" type="int" setter="set_use_default_args" getter="get_use_default_args"> </member> diff --git a/modules/visual_script/doc_classes/VisualScriptInputAction.xml b/modules/visual_script/doc_classes/VisualScriptInputAction.xml index 0b6325bf0a..6c296fdb4b 100644 --- a/modules/visual_script/doc_classes/VisualScriptInputAction.xml +++ b/modules/visual_script/doc_classes/VisualScriptInputAction.xml @@ -9,7 +9,7 @@ <methods> </methods> <members> - <member name="action" type="String" setter="set_action_name" getter="get_action_name" default=""""> + <member name="action" type="StringName" setter="set_action_name" getter="get_action_name" default="@"""> </member> <member name="mode" type="int" setter="set_action_mode" getter="get_action_mode" enum="VisualScriptInputAction.Mode" default="0"> </member> diff --git a/modules/visual_script/doc_classes/VisualScriptLocalVar.xml b/modules/visual_script/doc_classes/VisualScriptLocalVar.xml index 6c31ae1a30..c3741eea89 100644 --- a/modules/visual_script/doc_classes/VisualScriptLocalVar.xml +++ b/modules/visual_script/doc_classes/VisualScriptLocalVar.xml @@ -18,7 +18,7 @@ <member name="type" type="int" setter="set_var_type" getter="get_var_type" enum="Variant.Type" default="0"> The local variable's type. </member> - <member name="var_name" type="String" setter="set_var_name" getter="get_var_name" default=""new_local""> + <member name="var_name" type="StringName" setter="set_var_name" getter="get_var_name" default="@"new_local""> The local variable's name. </member> </members> diff --git a/modules/visual_script/doc_classes/VisualScriptLocalVarSet.xml b/modules/visual_script/doc_classes/VisualScriptLocalVarSet.xml index 0a9a509958..619bbb90ca 100644 --- a/modules/visual_script/doc_classes/VisualScriptLocalVarSet.xml +++ b/modules/visual_script/doc_classes/VisualScriptLocalVarSet.xml @@ -20,7 +20,7 @@ <member name="type" type="int" setter="set_var_type" getter="get_var_type" enum="Variant.Type" default="0"> The local variable's type. </member> - <member name="var_name" type="String" setter="set_var_name" getter="get_var_name" default=""new_local""> + <member name="var_name" type="StringName" setter="set_var_name" getter="get_var_name" default="@"new_local""> The local variable's name. </member> </members> diff --git a/modules/visual_script/doc_classes/VisualScriptPropertyGet.xml b/modules/visual_script/doc_classes/VisualScriptPropertyGet.xml index cf436116b8..f13d449064 100644 --- a/modules/visual_script/doc_classes/VisualScriptPropertyGet.xml +++ b/modules/visual_script/doc_classes/VisualScriptPropertyGet.xml @@ -11,15 +11,15 @@ <members> <member name="base_script" type="String" setter="set_base_script" getter="get_base_script"> </member> - <member name="base_type" type="String" setter="set_base_type" getter="get_base_type" default=""Object""> + <member name="base_type" type="StringName" setter="set_base_type" getter="get_base_type" default="@"Object""> </member> <member name="basic_type" type="int" setter="set_basic_type" getter="get_basic_type" enum="Variant.Type"> </member> - <member name="index" type="String" setter="set_index" getter="get_index"> + <member name="index" type="StringName" setter="set_index" getter="get_index"> </member> <member name="node_path" type="NodePath" setter="set_base_path" getter="get_base_path"> </member> - <member name="property" type="String" setter="set_property" getter="get_property" default=""""> + <member name="property" type="StringName" setter="set_property" getter="get_property" default="@"""> </member> <member name="set_mode" type="int" setter="set_call_mode" getter="get_call_mode" enum="VisualScriptPropertyGet.CallMode" default="0"> </member> diff --git a/modules/visual_script/doc_classes/VisualScriptPropertySet.xml b/modules/visual_script/doc_classes/VisualScriptPropertySet.xml index 357b4b9f5c..629576e261 100644 --- a/modules/visual_script/doc_classes/VisualScriptPropertySet.xml +++ b/modules/visual_script/doc_classes/VisualScriptPropertySet.xml @@ -13,15 +13,15 @@ </member> <member name="base_script" type="String" setter="set_base_script" getter="get_base_script"> </member> - <member name="base_type" type="String" setter="set_base_type" getter="get_base_type" default=""Object""> + <member name="base_type" type="StringName" setter="set_base_type" getter="get_base_type" default="@"Object""> </member> <member name="basic_type" type="int" setter="set_basic_type" getter="get_basic_type" enum="Variant.Type"> </member> - <member name="index" type="String" setter="set_index" getter="get_index"> + <member name="index" type="StringName" setter="set_index" getter="get_index"> </member> <member name="node_path" type="NodePath" setter="set_base_path" getter="get_base_path"> </member> - <member name="property" type="String" setter="set_property" getter="get_property" default=""""> + <member name="property" type="StringName" setter="set_property" getter="get_property" default="@"""> </member> <member name="set_mode" type="int" setter="set_call_mode" getter="get_call_mode" enum="VisualScriptPropertySet.CallMode" default="0"> </member> diff --git a/modules/visual_script/doc_classes/VisualScriptTypeCast.xml b/modules/visual_script/doc_classes/VisualScriptTypeCast.xml index 43fe9d16ea..80a8d31041 100644 --- a/modules/visual_script/doc_classes/VisualScriptTypeCast.xml +++ b/modules/visual_script/doc_classes/VisualScriptTypeCast.xml @@ -11,7 +11,7 @@ <members> <member name="base_script" type="String" setter="set_base_script" getter="get_base_script" default=""""> </member> - <member name="base_type" type="String" setter="set_base_type" getter="get_base_type" default=""Object""> + <member name="base_type" type="StringName" setter="set_base_type" getter="get_base_type" default="@"Object""> </member> </members> <constants> diff --git a/modules/visual_script/doc_classes/VisualScriptVariableGet.xml b/modules/visual_script/doc_classes/VisualScriptVariableGet.xml index 0746ab293e..d182e14e4d 100644 --- a/modules/visual_script/doc_classes/VisualScriptVariableGet.xml +++ b/modules/visual_script/doc_classes/VisualScriptVariableGet.xml @@ -15,7 +15,7 @@ <methods> </methods> <members> - <member name="var_name" type="String" setter="set_variable" getter="get_variable" default=""""> + <member name="var_name" type="StringName" setter="set_variable" getter="get_variable" default="@"""> The variable's name. </member> </members> diff --git a/modules/visual_script/doc_classes/VisualScriptVariableSet.xml b/modules/visual_script/doc_classes/VisualScriptVariableSet.xml index e7d83e60ab..3bd392dd85 100644 --- a/modules/visual_script/doc_classes/VisualScriptVariableSet.xml +++ b/modules/visual_script/doc_classes/VisualScriptVariableSet.xml @@ -16,7 +16,7 @@ <methods> </methods> <members> - <member name="var_name" type="String" setter="set_variable" getter="get_variable" default=""""> + <member name="var_name" type="StringName" setter="set_variable" getter="get_variable" default="@"""> The variable's name. </member> </members> diff --git a/modules/visual_script/doc_classes/VisualScriptYieldSignal.xml b/modules/visual_script/doc_classes/VisualScriptYieldSignal.xml index 8f6941ce1e..483cdfeaf8 100644 --- a/modules/visual_script/doc_classes/VisualScriptYieldSignal.xml +++ b/modules/visual_script/doc_classes/VisualScriptYieldSignal.xml @@ -9,13 +9,13 @@ <methods> </methods> <members> - <member name="base_type" type="String" setter="set_base_type" getter="get_base_type" default=""Object""> + <member name="base_type" type="StringName" setter="set_base_type" getter="get_base_type" default="@"Object""> </member> <member name="call_mode" type="int" setter="set_call_mode" getter="get_call_mode" enum="VisualScriptYieldSignal.CallMode" default="0"> </member> <member name="node_path" type="NodePath" setter="set_base_path" getter="get_base_path"> </member> - <member name="signal" type="String" setter="set_signal" getter="get_signal" default=""""> + <member name="signal" type="StringName" setter="set_signal" getter="get_signal" default="@"""> </member> </members> <constants> diff --git a/modules/visual_script/visual_script.cpp b/modules/visual_script/visual_script.cpp index e712190344..70f650cfd3 100644 --- a/modules/visual_script/visual_script.cpp +++ b/modules/visual_script/visual_script.cpp @@ -88,11 +88,11 @@ void VisualScriptNode::validate_input_default_values() { continue; } else { //not the same, reconvert - Variant::CallError ce; + Callable::CallError ce; Variant existing = default_input_values[i]; const Variant *existingp = &existing; default_input_values[i] = Variant::construct(expected, &existingp, 1, ce, false); - if (ce.error != Variant::CallError::CALL_OK) { + if (ce.error != Callable::CallError::CALL_OK) { //could not convert? force.. default_input_values[i] = Variant::construct(expected, NULL, 0, ce, false); } @@ -198,7 +198,7 @@ void VisualScript::remove_function(const StringName &p_name) { for (Map<int, Function::NodeData>::Element *E = functions[p_name].nodes.front(); E; E = E->next()) { - E->get().node->disconnect("ports_changed", this, "_node_ports_changed"); + E->get().node->disconnect_compat("ports_changed", this, "_node_ports_changed"); E->get().node->scripts_used.erase(this); } @@ -340,7 +340,7 @@ void VisualScript::add_node(const StringName &p_func, int p_id, const Ref<Visual nd.pos = p_pos; Ref<VisualScriptNode> vsn = p_node; - vsn->connect("ports_changed", this, "_node_ports_changed", varray(p_id)); + vsn->connect_compat("ports_changed", this, "_node_ports_changed", varray(p_id)); vsn->scripts_used.insert(this); vsn->validate_input_default_values(); // Validate when fully loaded @@ -389,7 +389,7 @@ void VisualScript::remove_node(const StringName &p_func, int p_id) { func.function_id = -1; //revert to invalid } - func.nodes[p_id].node->disconnect("ports_changed", this, "_node_ports_changed"); + func.nodes[p_id].node->disconnect_compat("ports_changed", this, "_node_ports_changed"); func.nodes[p_id].node->scripts_used.erase(this); func.nodes.erase(p_id); @@ -1560,7 +1560,7 @@ bool VisualScriptInstance::has_method(const StringName &p_method) const { //#define VSDEBUG(m_text) print_line(m_text) #define VSDEBUG(m_text) -void VisualScriptInstance::_dependency_step(VisualScriptNodeInstance *node, int p_pass, int *pass_stack, const Variant **input_args, Variant **output_args, Variant *variant_stack, Variant::CallError &r_error, String &error_str, VisualScriptNodeInstance **r_error_node) { +void VisualScriptInstance::_dependency_step(VisualScriptNodeInstance *node, int p_pass, int *pass_stack, const Variant **input_args, Variant **output_args, Variant *variant_stack, Callable::CallError &r_error, String &error_str, VisualScriptNodeInstance **r_error_node) { ERR_FAIL_COND(node->pass_idx == -1); @@ -1577,7 +1577,7 @@ void VisualScriptInstance::_dependency_step(VisualScriptNodeInstance *node, int for (int i = 0; i < dc; i++) { _dependency_step(deps[i], p_pass, pass_stack, input_args, output_args, variant_stack, r_error, error_str, r_error_node); - if (r_error.error != Variant::CallError::CALL_OK) + if (r_error.error != Callable::CallError::CALL_OK) return; } } @@ -1602,12 +1602,12 @@ void VisualScriptInstance::_dependency_step(VisualScriptNodeInstance *node, int node->step(input_args, output_args, VisualScriptNodeInstance::START_MODE_BEGIN_SEQUENCE, working_mem, r_error, error_str); //ignore return - if (r_error.error != Variant::CallError::CALL_OK) { + if (r_error.error != Callable::CallError::CALL_OK) { *r_error_node = node; } } -Variant VisualScriptInstance::_call_internal(const StringName &p_method, void *p_stack, int p_stack_size, VisualScriptNodeInstance *p_node, int p_flow_stack_pos, int p_pass, bool p_resuming_yield, Variant::CallError &r_error) { +Variant VisualScriptInstance::_call_internal(const StringName &p_method, void *p_stack, int p_stack_size, VisualScriptNodeInstance *p_node, int p_flow_stack_pos, int p_pass, bool p_resuming_yield, Callable::CallError &r_error) { Map<StringName, Function>::Element *F = functions.find(p_method); ERR_FAIL_COND_V(!F, Variant()); @@ -1669,7 +1669,7 @@ Variant VisualScriptInstance::_call_internal(const StringName &p_method, void *p for (int i = 0; i < dc; i++) { _dependency_step(deps[i], p_pass, pass_stack, input_args, output_args, variant_stack, r_error, error_str, &node); - if (r_error.error != Variant::CallError::CALL_OK) { + if (r_error.error != Callable::CallError::CALL_OK) { error = true; current_node_id = node->id; break; @@ -1729,7 +1729,7 @@ Variant VisualScriptInstance::_call_internal(const StringName &p_method, void *p int ret = node->step(input_args, output_args, start_mode, working_mem, r_error, error_str); - if (r_error.error != Variant::CallError::CALL_OK) { + if (r_error.error != Callable::CallError::CALL_OK) { //use error from step error = true; break; @@ -1738,7 +1738,7 @@ Variant VisualScriptInstance::_call_internal(const StringName &p_method, void *p if (ret & VisualScriptNodeInstance::STEP_YIELD_BIT) { //yielded! if (node->get_working_memory_size() == 0) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD; error_str = RTR("A node yielded without working memory, please read the docs on how to yield properly!"); error = true; break; @@ -1747,7 +1747,7 @@ Variant VisualScriptInstance::_call_internal(const StringName &p_method, void *p Ref<VisualScriptFunctionState> state = *working_mem; if (!state.is_valid()) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD; error_str = RTR("Node yielded, but did not return a function state in the first working memory."); error = true; break; @@ -1766,7 +1766,7 @@ Variant VisualScriptInstance::_call_internal(const StringName &p_method, void *p state->pass = p_pass; copymem(state->stack.ptrw(), p_stack, p_stack_size); //step 2, run away, return directly - r_error.error = Variant::CallError::CALL_OK; + r_error.error = Callable::CallError::CALL_OK; #ifdef DEBUG_ENABLED //will re-enter later, so exiting @@ -1809,7 +1809,7 @@ Variant VisualScriptInstance::_call_internal(const StringName &p_method, void *p if (ret & VisualScriptNodeInstance::STEP_EXIT_FUNCTION_BIT) { if (node->get_working_memory_size() == 0) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD; error_str = RTR("Return value must be assigned to first element of node working memory! Fix your node please."); error = true; } else { @@ -1826,7 +1826,7 @@ Variant VisualScriptInstance::_call_internal(const StringName &p_method, void *p if ((ret == output || ret & VisualScriptNodeInstance::STEP_FLAG_PUSH_STACK_BIT) && node->sequence_output_count) { //if no exit bit was set, and has sequence outputs, guess next node if (output >= node->sequence_output_count) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD; error_str = RTR("Node returned an invalid sequence output: ") + itos(output); error = true; break; @@ -1888,7 +1888,7 @@ Variant VisualScriptInstance::_call_internal(const StringName &p_method, void *p } if (!found) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD; error_str = RTR("Found sequence bit but not the node in the stack, report bug!"); error = true; break; @@ -1900,7 +1900,7 @@ Variant VisualScriptInstance::_call_internal(const StringName &p_method, void *p } else { // check for stack overflow if (flow_stack_pos + 1 >= flow_max) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD; error_str = RTR("Stack overflow with stack depth: ") + itos(output); error = true; break; @@ -1952,22 +1952,22 @@ Variant VisualScriptInstance::_call_internal(const StringName &p_method, void *p String err_func = p_method; int err_line = current_node_id; //not a line but it works as one - if (node && (r_error.error != Variant::CallError::CALL_ERROR_INVALID_METHOD || error_str == String())) { + if (node && (r_error.error != Callable::CallError::CALL_ERROR_INVALID_METHOD || error_str == String())) { if (error_str != String()) { error_str += " "; } - if (r_error.error == Variant::CallError::CALL_ERROR_INVALID_ARGUMENT) { + if (r_error.error == Callable::CallError::CALL_ERROR_INVALID_ARGUMENT) { int errorarg = r_error.argument; - error_str += "Cannot convert argument " + itos(errorarg + 1) + " to " + Variant::get_type_name(r_error.expected) + "."; - } else if (r_error.error == Variant::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS) { + error_str += "Cannot convert argument " + itos(errorarg + 1) + " to " + Variant::get_type_name(Variant::Type(r_error.expected)) + "."; + } else if (r_error.error == Callable::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS) { error_str += "Expected " + itos(r_error.argument) + " arguments."; - } else if (r_error.error == Variant::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS) { + } else if (r_error.error == Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS) { error_str += "Expected " + itos(r_error.argument) + " arguments."; - } else if (r_error.error == Variant::CallError::CALL_ERROR_INVALID_METHOD) { + } else if (r_error.error == Callable::CallError::CALL_ERROR_INVALID_METHOD) { error_str += "Invalid Call."; - } else if (r_error.error == Variant::CallError::CALL_ERROR_INSTANCE_IS_NULL) { + } else if (r_error.error == Callable::CallError::CALL_ERROR_INSTANCE_IS_NULL) { error_str += "Base Instance is null"; } } @@ -2000,13 +2000,13 @@ Variant VisualScriptInstance::_call_internal(const StringName &p_method, void *p return return_value; } -Variant VisualScriptInstance::call(const StringName &p_method, const Variant **p_args, int p_argcount, Variant::CallError &r_error) { +Variant VisualScriptInstance::call(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error) { - r_error.error = Variant::CallError::CALL_OK; //ok by default + r_error.error = Callable::CallError::CALL_OK; //ok by default Map<StringName, Function>::Element *F = functions.find(p_method); if (!F) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD; return Variant(); } @@ -2048,7 +2048,7 @@ Variant VisualScriptInstance::call(const StringName &p_method, const Variant **p Map<int, VisualScriptNodeInstance *>::Element *E = instances.find(f->node); if (!E) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD; ERR_FAIL_V_MSG(Variant(), "No VisualScriptFunction node in function."); } @@ -2062,14 +2062,14 @@ Variant VisualScriptInstance::call(const StringName &p_method, const Variant **p VSDEBUG("ARGUMENTS: " + itos(f->argument_count) = " RECEIVED: " + itos(p_argcount)); if (p_argcount < f->argument_count) { - r_error.error = Variant::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS; + r_error.error = Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS; r_error.argument = node->get_input_port_count(); return Variant(); } if (p_argcount > f->argument_count) { - r_error.error = Variant::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS; + r_error.error = Callable::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS; r_error.argument = node->get_input_port_count(); return Variant(); @@ -2094,15 +2094,15 @@ void VisualScriptInstance::notification(int p_notification) { Variant what = p_notification; const Variant *whatp = &what; - Variant::CallError ce; + Callable::CallError ce; call(VisualScriptLanguage::singleton->notification, &whatp, 1, ce); //do as call } String VisualScriptInstance::to_string(bool *r_valid) { if (has_method(CoreStringNames::get_singleton()->_to_string)) { - Variant::CallError ce; + Callable::CallError ce; Variant ret = call(CoreStringNames::get_singleton()->_to_string, NULL, 0, ce); - if (ce.error == Variant::CallError::CALL_OK) { + if (ce.error == Callable::CallError::CALL_OK) { if (ret.get_type() != Variant::STRING) { if (r_valid) *r_valid = false; @@ -2408,7 +2408,7 @@ VisualScriptInstance::~VisualScriptInstance() { ///////////////////// -Variant VisualScriptFunctionState::_signal_callback(const Variant **p_args, int p_argcount, Variant::CallError &r_error) { +Variant VisualScriptFunctionState::_signal_callback(const Variant **p_args, int p_argcount, Callable::CallError &r_error) { ERR_FAIL_COND_V(function == StringName(), Variant()); @@ -2419,12 +2419,12 @@ Variant VisualScriptFunctionState::_signal_callback(const Variant **p_args, int #endif - r_error.error = Variant::CallError::CALL_OK; + r_error.error = Callable::CallError::CALL_OK; Array args; if (p_argcount == 0) { - r_error.error = Variant::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS; + r_error.error = Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS; r_error.argument = 1; return Variant(); } else if (p_argcount == 1) { @@ -2439,13 +2439,13 @@ Variant VisualScriptFunctionState::_signal_callback(const Variant **p_args, int Ref<VisualScriptFunctionState> self = *p_args[p_argcount - 1]; //hi, I'm myself, needed this to remain alive. if (self.is_null()) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.argument = p_argcount - 1; r_error.expected = Variant::OBJECT; return Variant(); } - r_error.error = Variant::CallError::CALL_OK; + r_error.error = Callable::CallError::CALL_OK; Variant *working_mem = ((Variant *)stack.ptr()) + working_mem_index; @@ -2463,7 +2463,7 @@ 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, this, "_signal_callback", binds, CONNECT_ONESHOT); + p_obj->connect_compat(p_signal, this, "_signal_callback", binds, CONNECT_ONESHOT); } bool VisualScriptFunctionState::is_valid() const { @@ -2481,8 +2481,8 @@ Variant VisualScriptFunctionState::resume(Array p_args) { #endif - Variant::CallError r_error; - r_error.error = Variant::CallError::CALL_OK; + Callable::CallError r_error; + r_error.error = Callable::CallError::CALL_OK; Variant *working_mem = ((Variant *)stack.ptr()) + working_mem_index; @@ -2584,7 +2584,7 @@ int VisualScriptLanguage::find_function(const String &p_function, const String & return -1; } -String VisualScriptLanguage::make_function(const String &p_class, const String &p_name, const PoolStringArray &p_args) const { +String VisualScriptLanguage::make_function(const String &p_class, const String &p_name, const PackedStringArray &p_args) const { return String(); } diff --git a/modules/visual_script/visual_script.h b/modules/visual_script/visual_script.h index d3569bb040..08b84bce1d 100644 --- a/modules/visual_script/visual_script.h +++ b/modules/visual_script/visual_script.h @@ -155,7 +155,7 @@ public: virtual int get_working_memory_size() const { return 0; } - virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) = 0; //do a step, return which sequence port to go out + virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) = 0; //do a step, return which sequence port to go out Ref<VisualScriptNode> get_base_node() { return Ref<VisualScriptNode>(base); } @@ -408,8 +408,8 @@ class VisualScriptInstance : public ScriptInstance { StringName source; - void _dependency_step(VisualScriptNodeInstance *node, int p_pass, int *pass_stack, const Variant **input_args, Variant **output_args, Variant *variant_stack, Variant::CallError &r_error, String &error_str, VisualScriptNodeInstance **r_error_node); - Variant _call_internal(const StringName &p_method, void *p_stack, int p_stack_size, VisualScriptNodeInstance *p_node, int p_flow_stack_pos, int p_pass, bool p_resuming_yield, Variant::CallError &r_error); + void _dependency_step(VisualScriptNodeInstance *node, int p_pass, int *pass_stack, const Variant **input_args, Variant **output_args, Variant *variant_stack, Callable::CallError &r_error, String &error_str, VisualScriptNodeInstance **r_error_node); + Variant _call_internal(const StringName &p_method, void *p_stack, int p_stack_size, VisualScriptNodeInstance *p_node, int p_flow_stack_pos, int p_pass, bool p_resuming_yield, Callable::CallError &r_error); //Map<StringName,Function> functions; friend class VisualScriptFunctionState; //for yield @@ -422,7 +422,7 @@ public: virtual void get_method_list(List<MethodInfo> *p_list) const; virtual bool has_method(const StringName &p_method) const; - virtual Variant call(const StringName &p_method, const Variant **p_args, int p_argcount, Variant::CallError &r_error); + virtual Variant call(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error); virtual void notification(int p_notification); String to_string(bool *r_valid); @@ -487,7 +487,7 @@ class VisualScriptFunctionState : public Reference { int flow_stack_pos; int pass; - Variant _signal_callback(const Variant **p_args, int p_argcount, Variant::CallError &r_error); + Variant _signal_callback(const Variant **p_args, int p_argcount, Callable::CallError &r_error); protected: static void _bind_methods(); @@ -599,7 +599,7 @@ public: virtual bool has_named_classes() const; virtual bool supports_builtin_mode() const; virtual int find_function(const String &p_function, const String &p_code) const; - virtual String make_function(const String &p_class, const String &p_name, const PoolStringArray &p_args) const; + virtual String make_function(const String &p_class, const String &p_name, const PackedStringArray &p_args) const; virtual void auto_indent_code(String &p_code, int p_from_line, int p_to_line) const; virtual void add_global_constant(const StringName &p_variable, const Variant &p_value); diff --git a/modules/visual_script/visual_script_builtin_funcs.cpp b/modules/visual_script/visual_script_builtin_funcs.cpp index 832c4c2cc4..07f152efd4 100644 --- a/modules/visual_script/visual_script_builtin_funcs.cpp +++ b/modules/visual_script/visual_script_builtin_funcs.cpp @@ -277,22 +277,22 @@ PropertyInfo VisualScriptBuiltinFunc::get_input_value_port_info(int p_idx) const case MATH_EXP: case MATH_ISNAN: case MATH_ISINF: { - return PropertyInfo(Variant::REAL, "s"); + return PropertyInfo(Variant::FLOAT, "s"); } break; case MATH_ATAN2: { if (p_idx == 0) - return PropertyInfo(Variant::REAL, "y"); + return PropertyInfo(Variant::FLOAT, "y"); else - return PropertyInfo(Variant::REAL, "x"); + return PropertyInfo(Variant::FLOAT, "x"); } break; case MATH_FMOD: case MATH_FPOSMOD: case LOGIC_MAX: case LOGIC_MIN: { if (p_idx == 0) - return PropertyInfo(Variant::REAL, "a"); + return PropertyInfo(Variant::FLOAT, "a"); else - return PropertyInfo(Variant::REAL, "b"); + return PropertyInfo(Variant::FLOAT, "b"); } break; case MATH_POSMOD: { if (p_idx == 0) @@ -302,63 +302,63 @@ PropertyInfo VisualScriptBuiltinFunc::get_input_value_port_info(int p_idx) const } break; case MATH_POW: { if (p_idx == 0) - return PropertyInfo(Variant::REAL, "base"); + return PropertyInfo(Variant::FLOAT, "base"); else - return PropertyInfo(Variant::REAL, "exp"); + return PropertyInfo(Variant::FLOAT, "exp"); } break; case MATH_EASE: { if (p_idx == 0) - return PropertyInfo(Variant::REAL, "s"); + return PropertyInfo(Variant::FLOAT, "s"); else - return PropertyInfo(Variant::REAL, "curve"); + return PropertyInfo(Variant::FLOAT, "curve"); } break; case MATH_STEP_DECIMALS: { - return PropertyInfo(Variant::REAL, "step"); + return PropertyInfo(Variant::FLOAT, "step"); } break; case MATH_STEPIFY: { if (p_idx == 0) - return PropertyInfo(Variant::REAL, "s"); + return PropertyInfo(Variant::FLOAT, "s"); else - return PropertyInfo(Variant::REAL, "steps"); + return PropertyInfo(Variant::FLOAT, "steps"); } break; case MATH_LERP: case MATH_LERP_ANGLE: case MATH_INVERSE_LERP: case MATH_SMOOTHSTEP: { if (p_idx == 0) - return PropertyInfo(Variant::REAL, "from"); + return PropertyInfo(Variant::FLOAT, "from"); else if (p_idx == 1) - return PropertyInfo(Variant::REAL, "to"); + return PropertyInfo(Variant::FLOAT, "to"); else - return PropertyInfo(Variant::REAL, "weight"); + return PropertyInfo(Variant::FLOAT, "weight"); } break; case MATH_RANGE_LERP: { if (p_idx == 0) - return PropertyInfo(Variant::REAL, "value"); + return PropertyInfo(Variant::FLOAT, "value"); else if (p_idx == 1) - return PropertyInfo(Variant::REAL, "istart"); + return PropertyInfo(Variant::FLOAT, "istart"); else if (p_idx == 2) - return PropertyInfo(Variant::REAL, "istop"); + return PropertyInfo(Variant::FLOAT, "istop"); else if (p_idx == 3) - return PropertyInfo(Variant::REAL, "ostart"); + return PropertyInfo(Variant::FLOAT, "ostart"); else - return PropertyInfo(Variant::REAL, "ostop"); + return PropertyInfo(Variant::FLOAT, "ostop"); } break; case MATH_MOVE_TOWARD: { if (p_idx == 0) - return PropertyInfo(Variant::REAL, "from"); + return PropertyInfo(Variant::FLOAT, "from"); else if (p_idx == 1) - return PropertyInfo(Variant::REAL, "to"); + return PropertyInfo(Variant::FLOAT, "to"); else - return PropertyInfo(Variant::REAL, "delta"); + return PropertyInfo(Variant::FLOAT, "delta"); } break; case MATH_DECTIME: { if (p_idx == 0) - return PropertyInfo(Variant::REAL, "value"); + return PropertyInfo(Variant::FLOAT, "value"); else if (p_idx == 1) - return PropertyInfo(Variant::REAL, "amount"); + return PropertyInfo(Variant::FLOAT, "amount"); else - return PropertyInfo(Variant::REAL, "step"); + return PropertyInfo(Variant::FLOAT, "step"); } break; case MATH_RANDOMIZE: case MATH_RAND: @@ -367,37 +367,37 @@ PropertyInfo VisualScriptBuiltinFunc::get_input_value_port_info(int p_idx) const } break; case MATH_RANDOM: { if (p_idx == 0) - return PropertyInfo(Variant::REAL, "from"); + return PropertyInfo(Variant::FLOAT, "from"); else - return PropertyInfo(Variant::REAL, "to"); + return PropertyInfo(Variant::FLOAT, "to"); } break; case MATH_SEED: case MATH_RANDSEED: { return PropertyInfo(Variant::INT, "seed"); } break; case MATH_DEG2RAD: { - return PropertyInfo(Variant::REAL, "deg"); + return PropertyInfo(Variant::FLOAT, "deg"); } break; case MATH_RAD2DEG: { - return PropertyInfo(Variant::REAL, "rad"); + return PropertyInfo(Variant::FLOAT, "rad"); } break; case MATH_LINEAR2DB: { - return PropertyInfo(Variant::REAL, "nrg"); + return PropertyInfo(Variant::FLOAT, "nrg"); } break; case MATH_DB2LINEAR: { - return PropertyInfo(Variant::REAL, "db"); + return PropertyInfo(Variant::FLOAT, "db"); } break; case MATH_POLAR2CARTESIAN: { if (p_idx == 0) - return PropertyInfo(Variant::REAL, "r"); + return PropertyInfo(Variant::FLOAT, "r"); else - return PropertyInfo(Variant::REAL, "th"); + return PropertyInfo(Variant::FLOAT, "th"); } break; case MATH_CARTESIAN2POLAR: { if (p_idx == 0) - return PropertyInfo(Variant::REAL, "x"); + return PropertyInfo(Variant::FLOAT, "x"); else - return PropertyInfo(Variant::REAL, "y"); + return PropertyInfo(Variant::FLOAT, "y"); } break; case MATH_WRAP: { if (p_idx == 0) @@ -410,11 +410,11 @@ PropertyInfo VisualScriptBuiltinFunc::get_input_value_port_info(int p_idx) const case MATH_WRAPF: case LOGIC_CLAMP: { if (p_idx == 0) - return PropertyInfo(Variant::REAL, "value"); + return PropertyInfo(Variant::FLOAT, "value"); else if (p_idx == 1) - return PropertyInfo(Variant::REAL, "min"); + return PropertyInfo(Variant::FLOAT, "min"); else - return PropertyInfo(Variant::REAL, "max"); + return PropertyInfo(Variant::FLOAT, "max"); } break; case LOGIC_NEAREST_PO2: { return PropertyInfo(Variant::INT, "value"); @@ -467,7 +467,7 @@ PropertyInfo VisualScriptBuiltinFunc::get_input_value_port_info(int p_idx) const case BYTES_TO_VAR: { if (p_idx == 0) - return PropertyInfo(Variant::POOL_BYTE_ARRAY, "bytes"); + return PropertyInfo(Variant::PACKED_BYTE_ARRAY, "bytes"); else return PropertyInfo(Variant::BOOL, "allow_objects"); } break; @@ -475,7 +475,7 @@ PropertyInfo VisualScriptBuiltinFunc::get_input_value_port_info(int p_idx) const if (p_idx == 0) return PropertyInfo(Variant::STRING, "name"); else - return PropertyInfo(Variant::REAL, "alpha"); + return PropertyInfo(Variant::FLOAT, "alpha"); } break; case FUNC_MAX: { } @@ -504,7 +504,7 @@ PropertyInfo VisualScriptBuiltinFunc::get_output_value_port_info(int p_idx) cons case MATH_FPOSMOD: case MATH_FLOOR: case MATH_CEIL: { - t = Variant::REAL; + t = Variant::FLOAT; } break; case MATH_POSMOD: case MATH_ROUND: { @@ -519,14 +519,14 @@ PropertyInfo VisualScriptBuiltinFunc::get_output_value_port_info(int p_idx) cons case MATH_POW: case MATH_LOG: case MATH_EXP: { - t = Variant::REAL; + t = Variant::FLOAT; } break; case MATH_ISNAN: case MATH_ISINF: { t = Variant::BOOL; } break; case MATH_EASE: { - t = Variant::REAL; + t = Variant::FLOAT; } break; case MATH_STEP_DECIMALS: { t = Variant::INT; @@ -539,7 +539,7 @@ PropertyInfo VisualScriptBuiltinFunc::get_output_value_port_info(int p_idx) cons case MATH_SMOOTHSTEP: case MATH_MOVE_TOWARD: case MATH_DECTIME: { - t = Variant::REAL; + t = Variant::FLOAT; } break; case MATH_RANDOMIZE: { @@ -551,7 +551,7 @@ PropertyInfo VisualScriptBuiltinFunc::get_output_value_port_info(int p_idx) cons } break; case MATH_RANDF: case MATH_RANDOM: { - t = Variant::REAL; + t = Variant::FLOAT; } break; case MATH_SEED: { @@ -568,7 +568,7 @@ PropertyInfo VisualScriptBuiltinFunc::get_output_value_port_info(int p_idx) cons case MATH_LINEAR2DB: case MATH_WRAPF: case MATH_DB2LINEAR: { - t = Variant::REAL; + t = Variant::FLOAT; } break; case MATH_POLAR2CARTESIAN: case MATH_CARTESIAN2POLAR: { @@ -632,7 +632,7 @@ PropertyInfo VisualScriptBuiltinFunc::get_output_value_port_info(int p_idx) cons } break; case VAR_TO_BYTES: { if (p_idx == 0) - t = Variant::POOL_BYTE_ARRAY; + t = Variant::PACKED_BYTE_ARRAY; else t = Variant::BOOL; @@ -675,15 +675,15 @@ VisualScriptBuiltinFunc::BuiltinFunc VisualScriptBuiltinFunc::get_func() { return func; } -#define VALIDATE_ARG_NUM(m_arg) \ - if (!p_inputs[m_arg]->is_num()) { \ - r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; \ - r_error.argument = m_arg; \ - r_error.expected = Variant::REAL; \ - return; \ +#define VALIDATE_ARG_NUM(m_arg) \ + if (!p_inputs[m_arg]->is_num()) { \ + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; \ + r_error.argument = m_arg; \ + r_error.expected = Variant::FLOAT; \ + return; \ } -void VisualScriptBuiltinFunc::exec_func(BuiltinFunc p_func, const Variant **p_inputs, Variant *r_return, Variant::CallError &r_error, String &r_error_str) { +void VisualScriptBuiltinFunc::exec_func(BuiltinFunc p_func, const Variant **p_inputs, Variant *r_return, Callable::CallError &r_error, String &r_error_str) { switch (p_func) { case VisualScriptBuiltinFunc::MATH_SIN: { @@ -781,15 +781,15 @@ void VisualScriptBuiltinFunc::exec_func(BuiltinFunc p_func, const Variant **p_in int64_t i = *p_inputs[0]; *r_return = ABS(i); - } else if (p_inputs[0]->get_type() == Variant::REAL) { + } else if (p_inputs[0]->get_type() == Variant::FLOAT) { real_t r = *p_inputs[0]; *r_return = Math::abs(r); } else { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.argument = 0; - r_error.expected = Variant::REAL; + r_error.expected = Variant::FLOAT; } } break; case VisualScriptBuiltinFunc::MATH_SIGN: { @@ -798,15 +798,15 @@ void VisualScriptBuiltinFunc::exec_func(BuiltinFunc p_func, const Variant **p_in int64_t i = *p_inputs[0]; *r_return = i < 0 ? -1 : (i > 0 ? +1 : 0); - } else if (p_inputs[0]->get_type() == Variant::REAL) { + } else if (p_inputs[0]->get_type() == Variant::FLOAT) { real_t r = *p_inputs[0]; *r_return = r < 0.0 ? -1.0 : (r > 0.0 ? +1.0 : 0.0); } else { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.argument = 0; - r_error.expected = Variant::REAL; + r_error.expected = Variant::FLOAT; } } break; case VisualScriptBuiltinFunc::MATH_POW: { @@ -1047,7 +1047,7 @@ void VisualScriptBuiltinFunc::exec_func(BuiltinFunc p_func, const Variant **p_in if (p_inputs[0]->get_type() != Variant::OBJECT) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.argument = 0; r_error.expected = Variant::OBJECT; @@ -1081,7 +1081,7 @@ void VisualScriptBuiltinFunc::exec_func(BuiltinFunc p_func, const Variant **p_in if (p_inputs[0]->get_type() != Variant::OBJECT) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.argument = 0; r_error.expected = Variant::OBJECT; @@ -1089,7 +1089,7 @@ void VisualScriptBuiltinFunc::exec_func(BuiltinFunc p_func, const Variant **p_in } if (p_inputs[1]->get_type() != Variant::STRING && p_inputs[1]->get_type() != Variant::NODE_PATH) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.argument = 1; r_error.expected = Variant::STRING; @@ -1111,7 +1111,7 @@ void VisualScriptBuiltinFunc::exec_func(BuiltinFunc p_func, const Variant **p_in if (type < 0 || type >= Variant::VARIANT_MAX) { r_error_str = RTR("Invalid type argument to convert(), use TYPE_* constants."); - r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.argument = 0; r_error.expected = Variant::INT; return; @@ -1141,7 +1141,7 @@ void VisualScriptBuiltinFunc::exec_func(BuiltinFunc p_func, const Variant **p_in case VisualScriptBuiltinFunc::TEXT_ORD: { if (p_inputs[0]->get_type() != Variant::STRING) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.argument = 0; r_error.expected = Variant::STRING; @@ -1151,7 +1151,7 @@ void VisualScriptBuiltinFunc::exec_func(BuiltinFunc p_func, const Variant **p_in String str = p_inputs[0]->operator String(); if (str.length() != 1) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.argument = 0; r_error.expected = Variant::STRING; *r_return = "Expected a string of length 1 (a character)."; @@ -1197,7 +1197,7 @@ void VisualScriptBuiltinFunc::exec_func(BuiltinFunc p_func, const Variant **p_in case VisualScriptBuiltinFunc::STR_TO_VAR: { if (p_inputs[0]->get_type() != Variant::STRING) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.argument = 0; r_error.expected = Variant::STRING; @@ -1212,7 +1212,7 @@ void VisualScriptBuiltinFunc::exec_func(BuiltinFunc p_func, const Variant **p_in Error err = VariantParser::parse(&ss, *r_return, errs, line); if (err != OK) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.argument = 0; r_error.expected = Variant::STRING; *r_return = "Parse error at line " + itos(line) + ": " + errs; @@ -1223,17 +1223,17 @@ void VisualScriptBuiltinFunc::exec_func(BuiltinFunc p_func, const Variant **p_in case VisualScriptBuiltinFunc::VAR_TO_BYTES: { if (p_inputs[1]->get_type() != Variant::BOOL) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.argument = 1; r_error.expected = Variant::BOOL; return; } - PoolByteArray barr; + PackedByteArray barr; int len; bool full_objects = *p_inputs[1]; Error err = encode_variant(*p_inputs[0], NULL, len, full_objects); if (err) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.argument = 0; r_error.expected = Variant::NIL; r_error_str = "Unexpected error encoding variable to bytes, likely unserializable type found (Object or RID)."; @@ -1242,37 +1242,37 @@ void VisualScriptBuiltinFunc::exec_func(BuiltinFunc p_func, const Variant **p_in barr.resize(len); { - PoolByteArray::Write w = barr.write(); - encode_variant(*p_inputs[0], w.ptr(), len, full_objects); + uint8_t *w = barr.ptrw(); + encode_variant(*p_inputs[0], w, len, full_objects); } *r_return = barr; } break; case VisualScriptBuiltinFunc::BYTES_TO_VAR: { - if (p_inputs[0]->get_type() != Variant::POOL_BYTE_ARRAY) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; + if (p_inputs[0]->get_type() != Variant::PACKED_BYTE_ARRAY) { + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.argument = 0; - r_error.expected = Variant::POOL_BYTE_ARRAY; + r_error.expected = Variant::PACKED_BYTE_ARRAY; return; } if (p_inputs[1]->get_type() != Variant::BOOL) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.argument = 1; r_error.expected = Variant::BOOL; return; } - PoolByteArray varr = *p_inputs[0]; + PackedByteArray varr = *p_inputs[0]; bool allow_objects = *p_inputs[1]; Variant ret; { - PoolByteArray::Read r = varr.read(); - Error err = decode_variant(ret, r.ptr(), varr.size(), NULL, allow_objects); + const uint8_t *r = varr.ptr(); + Error err = decode_variant(ret, r, varr.size(), NULL, allow_objects); if (err != OK) { r_error_str = RTR("Not enough bytes for decoding bytes, or invalid format."); - r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.argument = 0; - r_error.expected = Variant::POOL_BYTE_ARRAY; + r_error.expected = Variant::PACKED_BYTE_ARRAY; return; } } @@ -1306,7 +1306,7 @@ public: //virtual bool is_output_port_unsequenced(int p_idx) const { return false; } //virtual bool get_output_port_unsequenced(int p_idx,Variant* r_value,Variant* p_working_mem,String &r_error) const { return true; } - virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) { + virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) { VisualScriptBuiltinFunc::exec_func(func, p_inputs, p_outputs[0], r_error, r_error_str); return 0; diff --git a/modules/visual_script/visual_script_builtin_funcs.h b/modules/visual_script/visual_script_builtin_funcs.h index d0787b3dd3..d950f858d4 100644 --- a/modules/visual_script/visual_script_builtin_funcs.h +++ b/modules/visual_script/visual_script_builtin_funcs.h @@ -112,7 +112,7 @@ public: static int get_func_argument_count(BuiltinFunc p_func); static String get_func_name(BuiltinFunc p_func); - static void exec_func(BuiltinFunc p_func, const Variant **p_inputs, Variant *r_return, Variant::CallError &r_error, String &r_error_str); + static void exec_func(BuiltinFunc p_func, const Variant **p_inputs, Variant *r_return, Callable::CallError &r_error, String &r_error_str); static BuiltinFunc find_function(const String &p_string); private: diff --git a/modules/visual_script/visual_script_editor.cpp b/modules/visual_script/visual_script_editor.cpp index 18851e6ab6..0bbef066a4 100644 --- a/modules/visual_script/visual_script_editor.cpp +++ b/modules/visual_script/visual_script_editor.cpp @@ -346,7 +346,7 @@ static Color _color_from_type(Variant::Type p_type, bool dark_theme = true) { case Variant::BOOL: color = Color(0.55, 0.65, 0.94); break; case Variant::INT: color = Color(0.49, 0.78, 0.94); break; - case Variant::REAL: color = Color(0.38, 0.85, 0.96); break; + case Variant::FLOAT: color = Color(0.38, 0.85, 0.96); break; case Variant::STRING: color = Color(0.42, 0.65, 0.93); break; case Variant::VECTOR2: color = Color(0.74, 0.57, 0.95); break; @@ -366,13 +366,15 @@ static Color _color_from_type(Variant::Type p_type, bool dark_theme = true) { case Variant::DICTIONARY: color = Color(0.47, 0.93, 0.69); break; case Variant::ARRAY: color = Color(0.88, 0.88, 0.88); break; - case Variant::POOL_BYTE_ARRAY: color = Color(0.67, 0.96, 0.78); break; - case Variant::POOL_INT_ARRAY: color = Color(0.69, 0.86, 0.96); break; - case Variant::POOL_REAL_ARRAY: color = Color(0.59, 0.91, 0.97); break; - case Variant::POOL_STRING_ARRAY: color = Color(0.62, 0.77, 0.95); break; - case Variant::POOL_VECTOR2_ARRAY: color = Color(0.82, 0.7, 0.96); break; - case Variant::POOL_VECTOR3_ARRAY: color = Color(0.87, 0.61, 0.95); break; - case Variant::POOL_COLOR_ARRAY: color = Color(0.91, 1.0, 0.59); break; + case Variant::PACKED_BYTE_ARRAY: color = Color(0.67, 0.96, 0.78); break; + case Variant::PACKED_INT32_ARRAY: color = Color(0.69, 0.86, 0.96); break; + case Variant::PACKED_FLOAT32_ARRAY: color = Color(0.59, 0.91, 0.97); break; + case Variant::PACKED_INT64_ARRAY: color = Color(0.69, 0.86, 0.96); break; + case Variant::PACKED_FLOAT64_ARRAY: color = Color(0.59, 0.91, 0.97); break; + case Variant::PACKED_STRING_ARRAY: color = Color(0.62, 0.77, 0.95); break; + case Variant::PACKED_VECTOR2_ARRAY: color = Color(0.82, 0.7, 0.96); break; + case Variant::PACKED_VECTOR3_ARRAY: color = Color(0.87, 0.61, 0.95); break; + case Variant::PACKED_COLOR_ARRAY: color = Color(0.91, 1.0, 0.59); break; default: color.set_hsv(p_type / float(Variant::VARIANT_MAX), 0.7, 0.7); @@ -383,7 +385,7 @@ static Color _color_from_type(Variant::Type p_type, bool dark_theme = true) { case Variant::BOOL: color = Color(0.43, 0.56, 0.92); break; case Variant::INT: color = Color(0.31, 0.7, 0.91); break; - case Variant::REAL: color = Color(0.15, 0.8, 0.94); break; + case Variant::FLOAT: color = Color(0.15, 0.8, 0.94); break; case Variant::STRING: color = Color(0.27, 0.56, 0.91); break; case Variant::VECTOR2: color = Color(0.68, 0.46, 0.93); break; @@ -403,13 +405,15 @@ static Color _color_from_type(Variant::Type p_type, bool dark_theme = true) { case Variant::DICTIONARY: color = Color(0.34, 0.91, 0.62); break; case Variant::ARRAY: color = Color(0.45, 0.45, 0.45); break; - case Variant::POOL_BYTE_ARRAY: color = Color(0.38, 0.92, 0.6); break; - case Variant::POOL_INT_ARRAY: color = Color(0.38, 0.73, 0.92); break; - case Variant::POOL_REAL_ARRAY: color = Color(0.25, 0.83, 0.95); break; - case Variant::POOL_STRING_ARRAY: color = Color(0.38, 0.62, 0.92); break; - case Variant::POOL_VECTOR2_ARRAY: color = Color(0.62, 0.36, 0.92); break; - case Variant::POOL_VECTOR3_ARRAY: color = Color(0.79, 0.35, 0.92); break; - case Variant::POOL_COLOR_ARRAY: color = Color(0.57, 0.73, 0.0); break; + case Variant::PACKED_BYTE_ARRAY: color = Color(0.38, 0.92, 0.6); break; + case Variant::PACKED_INT32_ARRAY: color = Color(0.38, 0.73, 0.92); break; + case Variant::PACKED_FLOAT32_ARRAY: color = Color(0.25, 0.83, 0.95); break; + case Variant::PACKED_INT64_ARRAY: color = Color(0.38, 0.73, 0.92); break; + case Variant::PACKED_FLOAT64_ARRAY: color = Color(0.25, 0.83, 0.95); break; + case Variant::PACKED_STRING_ARRAY: color = Color(0.38, 0.62, 0.92); break; + case Variant::PACKED_VECTOR2_ARRAY: color = Color(0.62, 0.36, 0.92); break; + case Variant::PACKED_VECTOR3_ARRAY: color = Color(0.79, 0.35, 0.92); break; + case Variant::PACKED_COLOR_ARRAY: color = Color(0.57, 0.73, 0.0); break; default: color.set_hsv(p_type / float(Variant::VARIANT_MAX), 0.3, 0.3); @@ -520,13 +524,13 @@ void VisualScriptEditor::_update_graph(int p_only_id) { Control::get_icon("MiniObject", "EditorIcons"), Control::get_icon("Dictionary", "EditorIcons"), Control::get_icon("Array", "EditorIcons"), - Control::get_icon("PoolByteArray", "EditorIcons"), - Control::get_icon("PoolIntArray", "EditorIcons"), - Control::get_icon("PoolRealArray", "EditorIcons"), - Control::get_icon("PoolStringArray", "EditorIcons"), - Control::get_icon("PoolVector2Array", "EditorIcons"), - Control::get_icon("PoolVector3Array", "EditorIcons"), - Control::get_icon("PoolColorArray", "EditorIcons") + Control::get_icon("PackedByteArray", "EditorIcons"), + Control::get_icon("PackedInt32Array", "EditorIcons"), + Control::get_icon("PackedFloat32Array", "EditorIcons"), + Control::get_icon("PackedStringArray", "EditorIcons"), + Control::get_icon("PackedVector2Array", "EditorIcons"), + Control::get_icon("PackedVector3Array", "EditorIcons"), + Control::get_icon("PackedColorArray", "EditorIcons") }; Ref<Texture2D> seq_port = Control::get_icon("VisualShaderPort", "EditorIcons"); @@ -556,8 +560,8 @@ void VisualScriptEditor::_update_graph(int p_only_id) { gnode->set_meta("__vnode", node); gnode->set_name(itos(E->get())); - gnode->connect("dragged", this, "_node_moved", varray(E->get())); - gnode->connect("close_request", this, "_remove_node", varray(E->get()), CONNECT_DEFERRED); + gnode->connect_compat("dragged", this, "_node_moved", varray(E->get())); + gnode->connect_compat("close_request", this, "_remove_node", varray(E->get()), CONNECT_DEFERRED); if (E->get() != script->get_function_node_id(F->get())) { //function can't be erased @@ -575,7 +579,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", this, "_add_input_port", varray(E->get()), CONNECT_DEFERRED); + btn->connect_compat("pressed", this, "_add_input_port", varray(E->get()), CONNECT_DEFERRED); } if (nd_list->is_output_port_editable()) { if (nd_list->is_input_port_editable()) @@ -584,7 +588,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", this, "_add_output_port", varray(E->get()), CONNECT_DEFERRED); + btn->connect_compat("pressed", this, "_add_output_port", varray(E->get()), CONNECT_DEFERRED); } gnode->add_child(hbnc); } else if (Object::cast_to<VisualScriptExpression>(node.ptr())) { @@ -594,7 +598,7 @@ void VisualScriptEditor::_update_graph(int p_only_id) { line_edit->set_expand_to_text_length(true); line_edit->add_font_override("font", get_font("source", "EditorFonts")); gnode->add_child(line_edit); - line_edit->connect("text_changed", this, "_expression_text_changed", varray(E->get())); + line_edit->connect_compat("text_changed", this, "_expression_text_changed", varray(E->get())); } else { String text = node->get_text(); if (!text.empty()) { @@ -610,7 +614,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", this, "_comment_node_resized", varray(E->get())); + gnode->connect_compat("resize_request", this, "_comment_node_resized", varray(E->get())); } if (node_styles.has(node->get_category())) { @@ -619,16 +623,24 @@ void VisualScriptEditor::_update_graph(int p_only_id) { sbf = EditorNode::get_singleton()->get_theme_base()->get_theme()->get_stylebox("comment", "GraphNode"); Color c = sbf->get_border_color(); + Color ic = c; c.a = 1; if (EditorSettings::get_singleton()->get("interface/theme/use_graph_node_headers")) { - Color mono_color = ((c.r + c.g + c.b) / 3) < 0.7 ? Color(1.0, 1.0, 1.0) : Color(0.0, 0.0, 0.0); + Color mono_color; + if (((c.r + c.g + c.b) / 3) < 0.7) { + mono_color = Color(1.0, 1.0, 1.0); + ic = Color(0.0, 0.0, 0.0, 0.7); + } else { + mono_color = Color(0.0, 0.0, 0.0); + ic = Color(1.0, 1.0, 1.0, 0.7); + } mono_color.a = 0.85; c = mono_color; } gnode->add_color_override("title_color", c); c.a = 0.7; gnode->add_color_override("close_color", c); - gnode->add_color_override("resizer_color", c); + gnode->add_color_override("resizer_color", ic); gnode->add_style_override("frame", sbf); } @@ -720,8 +732,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(true); - name_box->connect("resized", this, "_update_node_size", varray(E->get())); - name_box->connect("focus_exited", this, "_port_name_focus_out", varray(name_box, E->get(), i, true)); + name_box->connect_compat("resized", this, "_update_node_size", varray(E->get())); + name_box->connect_compat("focus_exited", this, "_port_name_focus_out", varray(name_box, E->get(), i, true)); } else { hbc->add_child(memnew(Label(left_name))); } @@ -734,13 +746,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", this, "_change_port_type", varray(E->get(), i, true), CONNECT_DEFERRED); + opbtn->connect_compat("item_selected", this, "_change_port_type", varray(E->get(), i, true), CONNECT_DEFERRED); } Button *rmbtn = memnew(Button); rmbtn->set_icon(EditorNode::get_singleton()->get_gui_base()->get_icon("Remove", "EditorIcons")); hbc->add_child(rmbtn); - rmbtn->connect("pressed", this, "_remove_input_port", varray(E->get(), i), CONNECT_DEFERRED); + rmbtn->connect_compat("pressed", this, "_remove_input_port", varray(E->get(), i), CONNECT_DEFERRED); } else { hbc->add_child(memnew(Label(left_name))); } @@ -753,14 +765,14 @@ void VisualScriptEditor::_update_graph(int p_only_id) { if (value.get_type() != left_type) { //different type? for now convert //not the same, reconvert - Variant::CallError ce; + Callable::CallError ce; const Variant *existingp = &value; value = Variant::construct(left_type, &existingp, 1, ce, false); } if (left_type == Variant::COLOR) { button->set_custom_minimum_size(Size2(30, 0) * EDSCALE); - button->connect("draw", this, "_draw_color_over_button", varray(button, value)); + button->connect_compat("draw", this, "_draw_color_over_button", varray(button, value)); } else if (left_type == Variant::OBJECT && Ref<Resource>(value).is_valid()) { Ref<Resource> res = value; @@ -776,7 +788,7 @@ void VisualScriptEditor::_update_graph(int p_only_id) { button->set_text(value); } - button->connect("pressed", this, "_default_value_edited", varray(button, E->get(), i)); + button->connect_compat("pressed", this, "_default_value_edited", varray(button, E->get(), i)); hbc2->add_child(button); } } else { @@ -802,7 +814,7 @@ void VisualScriptEditor::_update_graph(int p_only_id) { Button *rmbtn = memnew(Button); rmbtn->set_icon(EditorNode::get_singleton()->get_gui_base()->get_icon("Remove", "EditorIcons")); hbc->add_child(rmbtn); - rmbtn->connect("pressed", this, "_remove_output_port", varray(E->get(), i), CONNECT_DEFERRED); + rmbtn->connect_compat("pressed", this, "_remove_output_port", varray(E->get(), i), CONNECT_DEFERRED); if (nd_list->is_output_port_type_editable()) { OptionButton *opbtn = memnew(OptionButton); @@ -812,7 +824,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", this, "_change_port_type", varray(E->get(), i, false), CONNECT_DEFERRED); + opbtn->connect_compat("item_selected", this, "_change_port_type", varray(E->get(), i, false), CONNECT_DEFERRED); } if (nd_list->is_output_port_name_editable()) { @@ -821,8 +833,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(true); - name_box->connect("resized", this, "_update_node_size", varray(E->get())); - name_box->connect("focus_exited", this, "_port_name_focus_out", varray(name_box, E->get(), i, false)); + name_box->connect_compat("resized", this, "_update_node_size", varray(E->get())); + name_box->connect_compat("focus_exited", this, "_port_name_focus_out", varray(name_box, E->get(), i, false)); } else { hbc->add_child(memnew(Label(right_name))); } @@ -976,13 +988,13 @@ void VisualScriptEditor::_update_members() { Control::get_icon("MiniObject", "EditorIcons"), Control::get_icon("Dictionary", "EditorIcons"), Control::get_icon("Array", "EditorIcons"), - Control::get_icon("PoolByteArray", "EditorIcons"), - Control::get_icon("PoolIntArray", "EditorIcons"), - Control::get_icon("PoolRealArray", "EditorIcons"), - Control::get_icon("PoolStringArray", "EditorIcons"), - Control::get_icon("PoolVector2Array", "EditorIcons"), - Control::get_icon("PoolVector3Array", "EditorIcons"), - Control::get_icon("PoolColorArray", "EditorIcons") + Control::get_icon("PackedByteArray", "EditorIcons"), + Control::get_icon("PackedInt32Array", "EditorIcons"), + Control::get_icon("PackedFloat32Array", "EditorIcons"), + Control::get_icon("PackedStringArray", "EditorIcons"), + Control::get_icon("PackedVector2Array", "EditorIcons"), + Control::get_icon("PackedVector3Array", "EditorIcons"), + Control::get_icon("PackedColorArray", "EditorIcons") }; List<StringName> var_names; @@ -1225,7 +1237,7 @@ void VisualScriptEditor::_add_func_input() { LineEdit *name_box = memnew(LineEdit); name_box->set_h_size_flags(SIZE_EXPAND_FILL); name_box->set_text("input"); - name_box->connect("focus_entered", this, "_deselect_input_names"); + name_box->connect_compat("focus_entered", this, "_deselect_input_names"); hbox->add_child(name_box); Label *type_label = memnew(Label); @@ -1252,7 +1264,7 @@ void VisualScriptEditor::_add_func_input() { func_input_vbox->add_child(hbox); hbox->set_meta("id", hbox->get_position_in_parent()); - delete_button->connect("pressed", this, "_remove_func_input", varray(hbox)); + delete_button->connect_compat("pressed", this, "_remove_func_input", varray(hbox)); name_box->select_all(); name_box->grab_focus(); @@ -2408,7 +2420,7 @@ void VisualScriptEditor::set_edited_resource(const RES &p_res) { variable_editor->script = script; variable_editor->undo_redo = undo_redo; - script->connect("node_ports_changed", this, "_node_ports_changed"); + script->connect_compat("node_ports_changed", this, "_node_ports_changed"); default_func = script->get_default_func(); @@ -2585,7 +2597,7 @@ void VisualScriptEditor::get_breakpoints(List<int> *p_breakpoints) { } } -void VisualScriptEditor::add_callback(const String &p_function, PoolStringArray p_args) { +void VisualScriptEditor::add_callback(const String &p_function, PackedStringArray p_args) { if (script->has_function(p_function)) { _update_members(); @@ -2910,8 +2922,8 @@ void VisualScriptEditor::_graph_connected(const String &p_from, int p_from_slot, if (to_type != Variant::NIL && from_type != Variant::NIL && to_type != from_type) { // add a constructor node between the ports bool exceptions = false; // true if there are any exceptions - exceptions = exceptions || (to_type == Variant::INT && from_type == Variant::REAL); - exceptions = exceptions || (to_type == Variant::REAL && from_type == Variant::INT); + exceptions = exceptions || (to_type == Variant::INT && from_type == Variant::FLOAT); + exceptions = exceptions || (to_type == Variant::FLOAT && from_type == Variant::INT); if (Variant::can_convert(from_type, to_type) && !exceptions) { MethodInfo mi; mi.name = Variant::get_type_name(to_type); @@ -3851,7 +3863,7 @@ void VisualScriptEditor::_default_value_edited(Node *p_button, int p_id, int p_i Variant existing = vsn->get_default_input_value(p_input_port); if (pinfo.type != Variant::NIL && existing.get_type() != pinfo.type) { - Variant::CallError ce; + Callable::CallError ce; const Variant *existingp = &existing; existing = Variant::construct(pinfo.type, &existingp, 1, ce, false); } @@ -3904,9 +3916,9 @@ void VisualScriptEditor::_notification(int p_what) { switch (p_what) { case NOTIFICATION_READY: { - variable_editor->connect("changed", this, "_update_members"); - signal_editor->connect("changed", this, "_update_members"); - FALLTHROUGH; + variable_editor->connect_compat("changed", this, "_update_members"); + signal_editor->connect_compat("changed", this, "_update_members"); + [[fallthrough]]; } case NOTIFICATION_THEME_CHANGED: { if (p_what != NOTIFICATION_READY && !is_visible_in_tree()) { @@ -4697,7 +4709,7 @@ VisualScriptEditor::VisualScriptEditor() { edit_menu->get_popup()->add_separator(); edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("visual_script_editor/create_function"), EDIT_CREATE_FUNCTION); edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("visual_script_editor/refresh_nodes"), REFRESH_GRAPH); - edit_menu->get_popup()->connect("id_pressed", this, "_menu_option"); + edit_menu->get_popup()->connect_compat("id_pressed", this, "_menu_option"); members_section = memnew(VBoxContainer); // Add but wait until done setting up this. @@ -4707,7 +4719,7 @@ VisualScriptEditor::VisualScriptEditor() { CheckButton *tool_script_check = memnew(CheckButton); tool_script_check->set_text(TTR("Make Tool:")); members_section->add_child(tool_script_check); - tool_script_check->connect("pressed", this, "_toggle_tool_script"); + tool_script_check->connect_compat("pressed", this, "_toggle_tool_script"); /// Members /// @@ -4715,11 +4727,11 @@ VisualScriptEditor::VisualScriptEditor() { members_section->add_margin_child(TTR("Members:"), members, true); members->set_custom_minimum_size(Size2(0, 50 * EDSCALE)); members->set_hide_root(true); - members->connect("button_pressed", this, "_member_button"); - members->connect("item_edited", this, "_member_edited"); - members->connect("cell_selected", this, "_member_selected", varray(), CONNECT_DEFERRED); - members->connect("gui_input", this, "_members_gui_input"); - members->connect("item_rmb_selected", this, "_member_rmb_selected"); + members->connect_compat("button_pressed", this, "_member_button"); + members->connect_compat("item_edited", this, "_member_edited"); + members->connect_compat("cell_selected", this, "_member_selected", varray(), CONNECT_DEFERRED); + members->connect_compat("gui_input", this, "_members_gui_input"); + members->connect_compat("item_rmb_selected", this, "_member_rmb_selected"); members->set_allow_rmb_select(true); members->set_allow_reselect(true); members->set_hide_folding(true); @@ -4727,13 +4739,13 @@ VisualScriptEditor::VisualScriptEditor() { member_popup = memnew(PopupMenu); add_child(member_popup); - member_popup->connect("id_pressed", this, "_member_option"); + member_popup->connect_compat("id_pressed", this, "_member_option"); function_name_edit = memnew(PopupDialog); function_name_box = memnew(LineEdit); function_name_edit->add_child(function_name_box); function_name_edit->set_h_size_flags(SIZE_EXPAND); - function_name_box->connect("gui_input", this, "_fn_name_box_input"); + function_name_box->connect_compat("gui_input", this, "_fn_name_box_input"); function_name_box->set_expand_to_text_length(true); add_child(function_name_edit); @@ -4743,15 +4755,15 @@ VisualScriptEditor::VisualScriptEditor() { add_child(graph); graph->set_v_size_flags(Control::SIZE_EXPAND_FILL); graph->set_anchors_and_margins_preset(Control::PRESET_WIDE); - graph->connect("node_selected", this, "_node_selected"); - graph->connect("_begin_node_move", this, "_begin_node_move"); - graph->connect("_end_node_move", this, "_end_node_move"); - graph->connect("delete_nodes_request", this, "_on_nodes_delete"); - graph->connect("duplicate_nodes_request", this, "_on_nodes_duplicate"); - graph->connect("gui_input", this, "_graph_gui_input"); + graph->connect_compat("node_selected", this, "_node_selected"); + graph->connect_compat("_begin_node_move", this, "_begin_node_move"); + graph->connect_compat("_end_node_move", this, "_end_node_move"); + graph->connect_compat("delete_nodes_request", this, "_on_nodes_delete"); + graph->connect_compat("duplicate_nodes_request", this, "_on_nodes_duplicate"); + graph->connect_compat("gui_input", this, "_graph_gui_input"); graph->set_drag_forwarding(this); graph->hide(); - graph->connect("scroll_offset_changed", this, "_graph_ofs_changed"); + graph->connect_compat("scroll_offset_changed", this, "_graph_ofs_changed"); /// Add Buttons to Top Bar/Zoom bar. HBoxContainer *graph_hbc = graph->get_zoom_hbox(); @@ -4761,18 +4773,18 @@ VisualScriptEditor::VisualScriptEditor() { graph_hbc->add_child(base_lbl); base_type_select = memnew(Button); - base_type_select->connect("pressed", this, "_change_base_type"); + base_type_select->connect_compat("pressed", this, "_change_base_type"); graph_hbc->add_child(base_type_select); Button *add_nds = memnew(Button); add_nds->set_text(TTR("Add Nodes...")); graph_hbc->add_child(add_nds); - add_nds->connect("pressed", this, "_add_node_dialog"); + add_nds->connect_compat("pressed", this, "_add_node_dialog"); Button *fn_btn = memnew(Button); fn_btn->set_text(TTR("Add Function...")); graph_hbc->add_child(fn_btn); - fn_btn->connect("pressed", this, "_create_function_dialog"); + fn_btn->connect_compat("pressed", this, "_create_function_dialog"); // Add Function Dialog. VBoxContainer *function_vb = memnew(VBoxContainer); @@ -4790,7 +4802,7 @@ VisualScriptEditor::VisualScriptEditor() { func_name_box->set_h_size_flags(SIZE_EXPAND_FILL); func_name_box->set_placeholder(TTR("function_name")); func_name_box->set_text(""); - func_name_box->connect("focus_entered", this, "_deselect_input_names"); + func_name_box->connect_compat("focus_entered", this, "_deselect_input_names"); func_name_hbox->add_child(func_name_box); // Add minor setting for function if needed, here! @@ -4800,7 +4812,7 @@ VisualScriptEditor::VisualScriptEditor() { Button *add_input_button = memnew(Button); add_input_button->set_h_size_flags(SIZE_EXPAND_FILL); add_input_button->set_text(TTR("Add Input")); - add_input_button->connect("pressed", this, "_add_func_input"); + add_input_button->connect_compat("pressed", this, "_add_func_input"); function_vb->add_child(add_input_button); func_input_scroll = memnew(ScrollContainer); @@ -4816,7 +4828,7 @@ VisualScriptEditor::VisualScriptEditor() { function_create_dialog->set_title(TTR("Create Function")); function_create_dialog->add_child(function_vb); function_create_dialog->get_ok()->set_text(TTR("Create")); - function_create_dialog->get_ok()->connect("pressed", this, "_create_function"); + function_create_dialog->get_ok()->connect_compat("pressed", this, "_create_function"); add_child(function_create_dialog); select_func_text = memnew(Label); @@ -4836,7 +4848,7 @@ VisualScriptEditor::VisualScriptEditor() { hint_text_timer = memnew(Timer); hint_text_timer->set_wait_time(4); - hint_text_timer->connect("timeout", this, "_hide_timer"); + hint_text_timer->connect_compat("timeout", this, "_hide_timer"); add_child(hint_text_timer); // Allowed casts (connections). @@ -4854,9 +4866,9 @@ VisualScriptEditor::VisualScriptEditor() { graph->add_valid_left_disconnect_type(TYPE_SEQUENCE); - graph->connect("connection_request", this, "_graph_connected"); - graph->connect("disconnection_request", this, "_graph_disconnected"); - graph->connect("connection_to_empty", this, "_graph_connect_to_empty"); + graph->connect_compat("connection_request", this, "_graph_connected"); + graph->connect_compat("disconnection_request", this, "_graph_disconnected"); + graph->connect_compat("connection_to_empty", this, "_graph_connect_to_empty"); edit_signal_dialog = memnew(AcceptDialog); edit_signal_dialog->get_ok()->set_text(TTR("Close")); @@ -4880,7 +4892,7 @@ VisualScriptEditor::VisualScriptEditor() { select_base_type = memnew(CreateDialog); select_base_type->set_base_type("Object"); // Anything goes. - select_base_type->connect("create", this, "_change_base_type_callback"); + select_base_type->connect_compat("create", this, "_change_base_type_callback"); add_child(select_base_type); undo_redo = EditorNode::get_singleton()->get_undo_redo(); @@ -4892,22 +4904,22 @@ VisualScriptEditor::VisualScriptEditor() { default_value_edit = memnew(CustomPropertyEditor); add_child(default_value_edit); - default_value_edit->connect("variant_changed", this, "_default_value_changed"); + default_value_edit->connect_compat("variant_changed", this, "_default_value_changed"); method_select = memnew(VisualScriptPropertySelector); add_child(method_select); - method_select->connect("selected", this, "_selected_method"); + method_select->connect_compat("selected", this, "_selected_method"); error_line = -1; new_connect_node_select = memnew(VisualScriptPropertySelector); add_child(new_connect_node_select); new_connect_node_select->set_resizable(true); - new_connect_node_select->connect("selected", this, "_selected_connect_node"); - new_connect_node_select->get_cancel()->connect("pressed", this, "_cancel_connect_node"); + new_connect_node_select->connect_compat("selected", this, "_selected_connect_node"); + new_connect_node_select->get_cancel()->connect_compat("pressed", this, "_cancel_connect_node"); new_virtual_method_select = memnew(VisualScriptPropertySelector); add_child(new_virtual_method_select); - new_virtual_method_select->connect("selected", this, "_selected_new_virtual_method"); + new_virtual_method_select->connect_compat("selected", this, "_selected_new_virtual_method"); } VisualScriptEditor::~VisualScriptEditor() { @@ -4963,7 +4975,7 @@ Ref<VisualScriptNode> _VisualScriptEditor::create_node_custom(const String &p_na } _VisualScriptEditor *_VisualScriptEditor::singleton = NULL; -Map<String, RefPtr> _VisualScriptEditor::custom_nodes; +Map<String, REF> _VisualScriptEditor::custom_nodes; _VisualScriptEditor::_VisualScriptEditor() { singleton = this; @@ -4975,7 +4987,7 @@ _VisualScriptEditor::~_VisualScriptEditor() { void _VisualScriptEditor::add_custom_node(const String &p_name, const String &p_category, const Ref<Script> &p_script) { String node_name = "custom/" + p_category + "/" + p_name; - custom_nodes.insert(node_name, p_script.get_ref_ptr()); + custom_nodes.insert(node_name, p_script); VisualScriptLanguage::singleton->add_register_func(node_name, &_VisualScriptEditor::create_node_custom); emit_signal("custom_nodes_updated"); } diff --git a/modules/visual_script/visual_script_editor.h b/modules/visual_script/visual_script_editor.h index 40e9e1cc98..9a2a42b160 100644 --- a/modules/visual_script/visual_script_editor.h +++ b/modules/visual_script/visual_script_editor.h @@ -313,7 +313,7 @@ public: virtual void tag_saved_version(); virtual void reload(bool p_soft); virtual void get_breakpoints(List<int> *p_breakpoints); - virtual void add_callback(const String &p_function, PoolStringArray p_args); + virtual void add_callback(const String &p_function, PackedStringArray p_args); virtual void update_settings(); virtual bool show_members_overview(); virtual void set_debugger_active(bool p_active); @@ -341,7 +341,7 @@ protected: static void _bind_methods(); static _VisualScriptEditor *singleton; - static Map<String, RefPtr> custom_nodes; + static Map<String, REF> custom_nodes; static Ref<VisualScriptNode> create_node_custom(const String &p_name); public: diff --git a/modules/visual_script/visual_script_expression.cpp b/modules/visual_script/visual_script_expression.cpp index 63880df21d..23d1c8ccc0 100644 --- a/modules/visual_script/visual_script_expression.cpp +++ b/modules/visual_script/visual_script_expression.cpp @@ -1229,7 +1229,7 @@ public: //virtual int get_working_memory_size() const { return 0; } //execute by parsing the tree directly - virtual bool _execute(const Variant **p_inputs, VisualScriptExpression::ENode *p_node, Variant &r_ret, String &r_error_str, Variant::CallError &ce) { + virtual bool _execute(const Variant **p_inputs, VisualScriptExpression::ENode *p_node, Variant &r_ret, String &r_error_str, Callable::CallError &ce) { switch (p_node->type) { case VisualScriptExpression::ENode::TYPE_INPUT: { @@ -1371,7 +1371,7 @@ public: r_ret = Variant::construct(constructor->data_type, (const Variant **)argp.ptr(), argp.size(), ce); - if (ce.error != Variant::CallError::CALL_OK) { + if (ce.error != Callable::CallError::CALL_OK) { r_error_str = "Invalid arguments to construct '" + Variant::get_type_name(constructor->data_type) + "'."; return true; } @@ -1398,7 +1398,7 @@ public: VisualScriptBuiltinFunc::exec_func(bifunc->func, (const Variant **)argp.ptr(), &r_ret, ce, r_error_str); - if (ce.error != Variant::CallError::CALL_OK) { + if (ce.error != Callable::CallError::CALL_OK) { r_error_str = "Builtin Call Failed. " + r_error_str; return true; } @@ -1430,7 +1430,7 @@ public: r_ret = base.call(call->method, (const Variant **)argp.ptr(), argp.size(), ce); - if (ce.error != Variant::CallError::CALL_OK) { + if (ce.error != Callable::CallError::CALL_OK) { r_error_str = "On call to '" + String(call->method) + "':"; return true; } @@ -1440,24 +1440,24 @@ public: return false; } - virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) { + virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) { if (!expression->root || expression->error_set) { r_error_str = expression->error_str; - r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD; return 0; } bool error = _execute(p_inputs, expression->root, *p_outputs[0], r_error_str, r_error); - if (error && r_error.error == Variant::CallError::CALL_OK) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; + if (error && r_error.error == Callable::CallError::CALL_OK) { + r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD; } #ifdef DEBUG_ENABLED if (!error && expression->output_type != Variant::NIL && !Variant::can_convert_strict(p_outputs[0]->get_type(), expression->output_type)) { r_error_str += "Can't convert expression result from " + Variant::get_type_name(p_outputs[0]->get_type()) + " to " + Variant::get_type_name(expression->output_type) + "."; - r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD; } #endif diff --git a/modules/visual_script/visual_script_flow_control.cpp b/modules/visual_script/visual_script_flow_control.cpp index 213dc897af..475893e86d 100644 --- a/modules/visual_script/visual_script_flow_control.cpp +++ b/modules/visual_script/visual_script_flow_control.cpp @@ -135,7 +135,7 @@ public: //virtual bool is_output_port_unsequenced(int p_idx) const { return false; } //virtual bool get_output_port_unsequenced(int p_idx,Variant* r_value,Variant* p_working_mem,String &r_error) const { return true; } - virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) { + virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) { if (with_value) { *p_working_mem = *p_inputs[0]; @@ -237,7 +237,7 @@ public: //virtual bool is_output_port_unsequenced(int p_idx) const { return false; } //virtual bool get_output_port_unsequenced(int p_idx,Variant* r_value,Variant* p_working_mem,String &r_error) const { return true; } - virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) { + virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) { if (p_start_mode == START_MODE_CONTINUE_SEQUENCE) return 2; @@ -323,7 +323,7 @@ public: //virtual bool is_output_port_unsequenced(int p_idx) const { return false; } //virtual bool get_output_port_unsequenced(int p_idx,Variant* r_value,Variant* p_working_mem,String &r_error) const { return true; } - virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) { + virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) { bool keep_going = p_inputs[0]->operator bool(); @@ -410,7 +410,7 @@ public: //virtual bool is_output_port_unsequenced(int p_idx) const { return false; } //virtual bool get_output_port_unsequenced(int p_idx,Variant* r_value,Variant* p_working_mem,String &r_error) const { return true; } - virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) { + virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) { if (p_start_mode == START_MODE_BEGIN_SEQUENCE) { p_working_mem[0] = *p_inputs[0]; @@ -418,7 +418,7 @@ public: bool can_iter = p_inputs[0]->iter_init(p_working_mem[1], valid); if (!valid) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD; r_error_str = RTR("Input type not iterable: ") + Variant::get_type_name(p_inputs[0]->get_type()); return 0; } @@ -429,7 +429,7 @@ public: *p_outputs[0] = p_working_mem[0].iter_get(p_working_mem[1], valid); if (!valid) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD; r_error_str = RTR("Iterator became invalid"); return 0; } @@ -440,7 +440,7 @@ public: bool can_iter = p_working_mem[0].iter_next(p_working_mem[1], valid); if (!valid) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD; r_error_str = RTR("Iterator became invalid: ") + Variant::get_type_name(p_inputs[0]->get_type()); return 0; } @@ -451,7 +451,7 @@ public: *p_outputs[0] = p_working_mem[0].iter_get(p_working_mem[1], valid); if (!valid) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD; r_error_str = RTR("Iterator became invalid"); return 0; } @@ -549,7 +549,7 @@ public: //virtual bool is_output_port_unsequenced(int p_idx) const { return false; } //virtual bool get_output_port_unsequenced(int p_idx,Variant* r_value,Variant* p_working_mem,String &r_error) const { return true; } - virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) { + virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) { if (p_start_mode == START_MODE_BEGIN_SEQUENCE) { @@ -645,7 +645,7 @@ public: //virtual bool is_output_port_unsequenced(int p_idx) const { return false; } //virtual bool get_output_port_unsequenced(int p_idx,Variant* r_value,Variant* p_working_mem,String &r_error) const { return false; } - virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) { + virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) { if (p_start_mode == START_MODE_CONTINUE_SEQUENCE) { return case_count; //exit @@ -836,14 +836,14 @@ public: //virtual bool is_output_port_unsequenced(int p_idx) const { return false; } //virtual bool get_output_port_unsequenced(int p_idx,Variant* r_value,Variant* p_working_mem,String &r_error) const { return false; } - virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) { + virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) { Object *obj = *p_inputs[0]; *p_outputs[0] = Variant(); if (!obj) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD; r_error_str = "Instance is null"; return 0; } @@ -861,7 +861,7 @@ public: } Ref<Script> cast_script = Ref<Resource>(ResourceCache::get(script)); if (!cast_script.is_valid()) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD; r_error_str = "Script path is not a script: " + script; return 1; } diff --git a/modules/visual_script/visual_script_func_nodes.cpp b/modules/visual_script/visual_script_func_nodes.cpp index 63c36ae431..011432ef39 100644 --- a/modules/visual_script/visual_script_func_nodes.cpp +++ b/modules/visual_script/visual_script_func_nodes.cpp @@ -788,7 +788,7 @@ public: return true; } - virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) { + virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) { switch (call_mode) { @@ -808,14 +808,14 @@ public: Node *node = Object::cast_to<Node>(instance->get_owner_ptr()); if (!node) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD; r_error_str = "Base object is not a Node!"; return 0; } Node *another = node->get_node(node_path); if (!another) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD; r_error_str = "Path does not lead Node!"; return 0; } @@ -846,7 +846,7 @@ public: } else if (returns == 1) { v.call(function, p_inputs + 1, input_args, r_error); } else { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD; r_error_str = "Invalid returns count for call_mode == CALL_MODE_INSTANCE"; return 0; } @@ -866,7 +866,7 @@ public: Object *object = Engine::get_singleton()->get_singleton_object(singleton); if (!object) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD; r_error_str = "Invalid singleton name: '" + String(singleton) + "'"; return 0; } @@ -884,7 +884,7 @@ public: if (!validate) { //ignore call errors if validation is disabled - r_error.error = Variant::CallError::CALL_OK; + r_error.error = Callable::CallError::CALL_OK; r_error_str = String(); } @@ -1020,7 +1020,7 @@ void VisualScriptPropertySet::_adjust_input_index(PropertyInfo &pinfo) const { if (index != StringName()) { Variant v; - Variant::CallError ce; + Callable::CallError ce; v = Variant::construct(pinfo.type, NULL, 0, ce); Variant i = v.get(index); pinfo.type = i.get_type(); @@ -1167,7 +1167,7 @@ void VisualScriptPropertySet::_update_cache() { //not super efficient.. Variant v; - Variant::CallError ce; + Callable::CallError ce; v = Variant::construct(basic_type, NULL, 0, ce); List<PropertyInfo> pinfo; @@ -1409,7 +1409,7 @@ void VisualScriptPropertySet::_validate_property(PropertyInfo &property) const { if (property.name == "index") { - Variant::CallError ce; + Callable::CallError ce; Variant v = Variant::construct(type_cache.type, NULL, 0, ce); List<PropertyInfo> plist; v.get_property_list(&plist); @@ -1578,7 +1578,7 @@ public: } } - virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) { + virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) { switch (call_mode) { @@ -1597,7 +1597,7 @@ public: } if (!valid) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD; r_error_str = "Invalid set value '" + String(*p_inputs[0]) + "' on property '" + String(property) + "' of type " + object->get_class(); } } break; @@ -1605,14 +1605,14 @@ public: Node *node = Object::cast_to<Node>(instance->get_owner_ptr()); if (!node) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD; r_error_str = "Base object is not a Node!"; return 0; } Node *another = node->get_node(node_path); if (!another) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD; r_error_str = "Path does not lead Node!"; return 0; } @@ -1629,7 +1629,7 @@ public: } if (!valid) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD; r_error_str = "Invalid set value '" + String(*p_inputs[0]) + "' on property '" + String(property) + "' of type " + another->get_class(); } @@ -1651,7 +1651,7 @@ public: } if (!valid) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD; r_error_str = "Invalid set value '" + String(*p_inputs[1]) + "' (" + Variant::get_type_name(p_inputs[1]->get_type()) + ") on property '" + String(property) + "' of type " + Variant::get_type_name(v.get_type()); } @@ -1875,7 +1875,7 @@ void VisualScriptPropertyGet::_update_cache() { //not super efficient.. Variant v; - Variant::CallError ce; + Callable::CallError ce; v = Variant::construct(basic_type, NULL, 0, ce); List<PropertyInfo> pinfo; @@ -2124,7 +2124,7 @@ void VisualScriptPropertyGet::_validate_property(PropertyInfo &property) const { if (property.name == "index") { - Variant::CallError ce; + Callable::CallError ce; Variant v = Variant::construct(type_cache, NULL, 0, ce); List<PropertyInfo> plist; v.get_property_list(&plist); @@ -2211,7 +2211,7 @@ public: VisualScriptPropertyGet *node; VisualScriptInstance *instance; - virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) { + virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) { switch (call_mode) { @@ -2228,7 +2228,7 @@ public: } if (!valid) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD; r_error_str = RTR("Invalid index property name."); return 0; } @@ -2237,14 +2237,14 @@ public: Node *node = Object::cast_to<Node>(instance->get_owner_ptr()); if (!node) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD; r_error_str = RTR("Base object is not a Node!"); return 0; } Node *another = node->get_node(node_path); if (!another) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD; r_error_str = RTR("Path does not lead Node!"); return 0; } @@ -2258,7 +2258,7 @@ public: } if (!valid) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD; r_error_str = vformat(RTR("Invalid index property name '%s' in node %s."), String(property), another->get_name()); return 0; } @@ -2275,7 +2275,7 @@ public: } if (!valid) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD; r_error_str = RTR("Invalid index property name."); } }; @@ -2434,7 +2434,7 @@ public: //virtual bool is_output_port_unsequenced(int p_idx) const { return false; } //virtual bool get_output_port_unsequenced(int p_idx,Variant* r_value,Variant* p_working_mem,String &r_error) const { return true; } - virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) { + virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) { Object *obj = instance->get_owner_ptr(); @@ -2500,7 +2500,7 @@ void register_visual_script_func_nodes() { Variant::Type t = Variant::Type(i); String type_name = Variant::get_type_name(t); - Variant::CallError ce; + Callable::CallError ce; Variant vt = Variant::construct(t, NULL, 0, ce); List<MethodInfo> ml; vt.get_method_list(&ml); diff --git a/modules/visual_script/visual_script_nodes.cpp b/modules/visual_script/visual_script_nodes.cpp index dc49ed72d0..4a9a6bdb1d 100644 --- a/modules/visual_script/visual_script_nodes.cpp +++ b/modules/visual_script/visual_script_nodes.cpp @@ -285,7 +285,7 @@ public: //virtual int get_working_memory_size() const { return 0; } - virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) { + virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) { int ac = node->get_argument_count(); @@ -294,7 +294,7 @@ public: Variant::Type expected = node->get_argument_type(i); if (expected != Variant::NIL) { if (!Variant::can_convert_strict(p_inputs[i]->get_type(), expected)) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.expected = expected; r_error.argument = i; return 0; @@ -762,7 +762,7 @@ public: int input_count = 0; virtual int get_working_memory_size() const { return 0; } - virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) { + virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) { if (input_count > 0) { Array arr; @@ -1031,7 +1031,7 @@ public: //virtual int get_working_memory_size() const { return 0; } - virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) { + virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) { bool valid; if (unary) { @@ -1043,7 +1043,7 @@ public: if (!valid) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD; if (p_outputs[0]->get_type() == Variant::STRING) { r_error_str = *p_outputs[0]; } else { @@ -1165,7 +1165,7 @@ class VisualScriptNodeInstanceSelect : public VisualScriptNodeInstance { public: //virtual int get_working_memory_size() const { return 0; } - virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) { + virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) { bool cond = *p_inputs[0]; if (cond) @@ -1285,10 +1285,10 @@ public: VisualScriptInstance *instance; StringName variable; - virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) { + virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) { if (!instance->get_variable(variable, p_outputs[0])) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD; r_error_str = RTR("VariableGet not found in script: ") + "'" + String(variable) + "'"; return 0; } @@ -1407,11 +1407,11 @@ public: //virtual int get_working_memory_size() const { return 0; } - virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) { + virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) { if (!instance->set_variable(variable, *p_inputs[0])) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD; r_error_str = RTR("VariableSet not found in script: ") + "'" + String(variable) + "'"; } @@ -1482,7 +1482,7 @@ void VisualScriptConstant::set_constant_type(Variant::Type p_type) { return; type = p_type; - Variant::CallError ce; + Callable::CallError ce; value = Variant::construct(type, NULL, 0, ce); ports_changed_notify(); _change_notify(); @@ -1537,7 +1537,7 @@ public: Variant constant; //virtual int get_working_memory_size() const { return 0; } - virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) { + virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) { *p_outputs[0] = constant; return 0; @@ -1642,7 +1642,7 @@ public: Ref<Resource> preload; //virtual int get_working_memory_size() const { return 0; } - virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) { + virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) { *p_outputs[0] = preload; return 0; @@ -1710,13 +1710,13 @@ class VisualScriptNodeInstanceIndexGet : public VisualScriptNodeInstance { public: //virtual int get_working_memory_size() const { return 0; } - virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) { + virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) { bool valid; *p_outputs[0] = p_inputs[0]->get(*p_inputs[1], &valid); if (!valid) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD; r_error_str = "Invalid get: " + p_inputs[0]->get_construct_string(); } return 0; @@ -1785,14 +1785,14 @@ class VisualScriptNodeInstanceIndexSet : public VisualScriptNodeInstance { public: //virtual int get_working_memory_size() const { return 0; } - virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) { + virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) { bool valid; *p_outputs[0] = *p_inputs[0]; p_outputs[0]->set(*p_inputs[1], *p_inputs[2], &valid); if (!valid) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD; r_error_str = "Invalid set: " + p_inputs[1]->get_construct_string(); } return 0; @@ -1866,7 +1866,7 @@ public: int index; //virtual int get_working_memory_size() const { return 0; } - virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) { + virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) { *p_outputs[0] = GlobalConstants::get_global_constant_value(index); return 0; @@ -1991,11 +1991,11 @@ public: bool valid; //virtual int get_working_memory_size() const { return 0; } - virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) { + virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) { if (!valid) { r_error_str = "Invalid constant name, pick a valid class constant."; - r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD; } *p_outputs[0] = value; @@ -2140,11 +2140,11 @@ public: bool valid; //virtual int get_working_memory_size() const { return 0; } - virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) { + virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) { if (!valid) { r_error_str = "Invalid constant name, pick a valid basic type constant."; - r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD; } *p_outputs[0] = value; @@ -2259,7 +2259,7 @@ PropertyInfo VisualScriptMathConstant::get_input_value_port_info(int p_idx) cons PropertyInfo VisualScriptMathConstant::get_output_value_port_info(int p_idx) const { - return PropertyInfo(Variant::REAL, const_name[constant]); + return PropertyInfo(Variant::FLOAT, const_name[constant]); } String VisualScriptMathConstant::get_caption() const { @@ -2283,7 +2283,7 @@ public: float value; //virtual int get_working_memory_size() const { return 0; } - virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) { + virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) { *p_outputs[0] = value; return 0; @@ -2389,7 +2389,7 @@ public: //virtual int get_working_memory_size() const { return 0; } - virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) { + virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) { *p_outputs[0] = singleton; return 0; @@ -2512,18 +2512,18 @@ public: //virtual int get_working_memory_size() const { return 0; } - virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) { + virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) { Node *node = Object::cast_to<Node>(instance->get_owner_ptr()); if (!node) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD; r_error_str = "Base object is not a Node!"; return 0; } Node *another = node->get_node(path); if (!another) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD; r_error_str = "Path does not lead Node!"; return 0; } @@ -2696,18 +2696,18 @@ public: //virtual int get_working_memory_size() const { return 0; } - virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) { + virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) { Node *node = Object::cast_to<Node>(instance->get_owner_ptr()); if (!node) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD; r_error_str = "Base object is not a Node!"; return 0; } SceneTree *tree = node->get_tree(); if (!tree) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD; r_error_str = "Attempt to get SceneTree while node is not in the active tree."; return 0; } @@ -2803,7 +2803,7 @@ public: //virtual int get_working_memory_size() const { return 0; } - virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) { + virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) { *p_outputs[0] = path; return 0; @@ -2885,7 +2885,7 @@ public: //virtual int get_working_memory_size() const { return 0; } - virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) { + virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) { *p_outputs[0] = instance->get_owner_ptr(); return 0; @@ -3022,13 +3022,13 @@ public: int work_mem_size; virtual int get_working_memory_size() const { return work_mem_size; } - virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) { + virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) { if (node->get_script_instance()) { #ifdef DEBUG_ENABLED if (!node->get_script_instance()->has_method(VisualScriptLanguage::singleton->_step)) { r_error_str = RTR("Custom node has no _step() method, can't process graph."); - r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD; return 0; } #endif @@ -3055,13 +3055,13 @@ public: Variant ret = node->get_script_instance()->call(VisualScriptLanguage::singleton->_step, in_values, out_values, p_start_mode, work_mem); if (ret.get_type() == Variant::STRING) { r_error_str = ret; - r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD; return 0; } else if (ret.is_num()) { ret_out = ret; } else { r_error_str = RTR("Invalid return value from _step(), must be integer (seq out), or string (error)."); - r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD; return 0; } @@ -3144,7 +3144,7 @@ void VisualScriptCustomNode::_bind_methods() { } VisualScriptCustomNode::VisualScriptCustomNode() { - connect("script_changed", this, "_script_changed"); + connect_compat("script_changed", this, "_script_changed"); } ////////////////////////////////////////// @@ -3237,11 +3237,11 @@ public: //virtual int get_working_memory_size() const { return 0; } - virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) { + virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) { if (!valid) { r_error_str = "Node requires a script with a _subcall(<args>) method to work."; - r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD; return 0; } *p_outputs[0] = subcall->call(VisualScriptLanguage::singleton->_subcall, p_inputs, input_args, r_error); @@ -3368,7 +3368,7 @@ public: //virtual int get_working_memory_size() const { return 0; } - virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) { + virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) { return 0; } @@ -3483,11 +3483,11 @@ public: //virtual int get_working_memory_size() const { return 0; } - virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) { + virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) { - Variant::CallError ce; + Callable::CallError ce; *p_outputs[0] = Variant::construct(type, p_inputs, argcount, ce); - if (ce.error != Variant::CallError::CALL_OK) { + if (ce.error != Callable::CallError::CALL_OK) { r_error_str = "Invalid arguments for constructor"; } @@ -3612,7 +3612,7 @@ public: StringName name; virtual int get_working_memory_size() const { return 1; } - virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) { + virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) { *p_outputs[0] = *p_working_mem; return 0; @@ -3733,7 +3733,7 @@ public: StringName name; virtual int get_working_memory_size() const { return 1; } - virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) { + virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) { *p_working_mem = *p_inputs[0]; *p_outputs[0] = *p_working_mem; @@ -3868,7 +3868,7 @@ public: StringName action; VisualScriptInputAction::Mode mode; - virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) { + virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) { switch (mode) { case VisualScriptInputAction::MODE_PRESSED: { @@ -4007,7 +4007,7 @@ void VisualScriptDeconstruct::_update_elements() { elements.clear(); Variant v; - Variant::CallError ce; + Callable::CallError ce; v = Variant::construct(type, NULL, 0, ce); List<PropertyInfo> pinfo; @@ -4065,7 +4065,7 @@ public: //virtual int get_working_memory_size() const { return 0; } - virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) { + virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) { Variant in = *p_inputs[0]; @@ -4074,7 +4074,7 @@ public: *p_outputs[i] = in.get(outputs[i], &valid); if (!valid) { r_error_str = "Can't obtain element '" + String(outputs[i]) + "' from " + Variant::get_type_name(in.get_type()); - r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD; return 0; } } diff --git a/modules/visual_script/visual_script_property_selector.cpp b/modules/visual_script/visual_script_property_selector.cpp index e8c02a41c4..20bad364dc 100644 --- a/modules/visual_script/visual_script_property_selector.cpp +++ b/modules/visual_script/visual_script_property_selector.cpp @@ -119,13 +119,15 @@ void VisualScriptPropertySelector::_update_search() { Control::get_icon("Object", "EditorIcons"), Control::get_icon("Dictionary", "EditorIcons"), Control::get_icon("Array", "EditorIcons"), - Control::get_icon("PoolByteArray", "EditorIcons"), - Control::get_icon("PoolIntArray", "EditorIcons"), - Control::get_icon("PoolRealArray", "EditorIcons"), - Control::get_icon("PoolStringArray", "EditorIcons"), - Control::get_icon("PoolVector2Array", "EditorIcons"), - Control::get_icon("PoolVector3Array", "EditorIcons"), - Control::get_icon("PoolColorArray", "EditorIcons") + Control::get_icon("PackedByteArray", "EditorIcons"), + Control::get_icon("PackedInt32Array", "EditorIcons"), + Control::get_icon("PackedFloat32Array", "EditorIcons"), + Control::get_icon("PackedInt64Array", "EditorIcons"), + Control::get_icon("PackedFloat64Array", "EditorIcons"), + Control::get_icon("PackedStringArray", "EditorIcons"), + Control::get_icon("PackedVector2Array", "EditorIcons"), + Control::get_icon("PackedVector3Array", "EditorIcons"), + Control::get_icon("PackedColorArray", "EditorIcons") }; { String b = String(E->get()); @@ -193,7 +195,7 @@ void VisualScriptPropertySelector::_update_search() { { if (type != Variant::NIL) { Variant v; - Variant::CallError ce; + Callable::CallError ce; v = Variant::construct(type, NULL, 0, ce); v.get_method_list(&methods); } else { @@ -279,7 +281,7 @@ void VisualScriptPropertySelector::_update_search() { if (type == Variant::BOOL) { get_visual_node_names("operators/logic/", Set<String>(), found, root, search_box); } - if (type == Variant::BOOL || type == Variant::INT || type == Variant::REAL || type == Variant::VECTOR2 || type == Variant::VECTOR3) { + if (type == Variant::BOOL || type == Variant::INT || type == Variant::FLOAT || type == Variant::VECTOR2 || type == Variant::VECTOR3) { get_visual_node_names("operators/math/", Set<String>(), found, root, search_box); } } @@ -355,7 +357,7 @@ void VisualScriptPropertySelector::get_visual_node_names(const String &root_filt continue; } - bool in_modifier = false | p_modifiers.empty(); + bool in_modifier = p_modifiers.empty(); for (Set<String>::Element *F = p_modifiers.front(); F && in_modifier; F = F->next()) { if (E->get().findn(F->get()) != -1) in_modifier = true; @@ -520,7 +522,7 @@ void VisualScriptPropertySelector::_notification(int p_what) { if (p_what == NOTIFICATION_ENTER_TREE) { - connect("confirmed", this, "_confirmed"); + connect_compat("confirmed", this, "_confirmed"); } } @@ -703,23 +705,23 @@ VisualScriptPropertySelector::VisualScriptPropertySelector() { //set_child_rect(vbc); search_box = memnew(LineEdit); vbc->add_margin_child(TTR("Search:"), search_box); - search_box->connect("text_changed", this, "_text_changed"); - search_box->connect("gui_input", this, "_sbox_input"); + search_box->connect_compat("text_changed", this, "_text_changed"); + search_box->connect_compat("gui_input", this, "_sbox_input"); search_options = memnew(Tree); vbc->add_margin_child(TTR("Matches:"), search_options, true); get_ok()->set_text(TTR("Open")); get_ok()->set_disabled(true); register_text_enter(search_box); set_hide_on_ok(false); - search_options->connect("item_activated", this, "_confirmed"); - search_options->connect("cell_selected", this, "_item_selected"); + search_options->connect_compat("item_activated", this, "_confirmed"); + search_options->connect_compat("cell_selected", this, "_item_selected"); search_options->set_hide_root(true); search_options->set_hide_folding(true); virtuals_only = false; seq_connect = false; help_bit = memnew(EditorHelpBit); vbc->add_margin_child(TTR("Description:"), help_bit); - help_bit->connect("request_hide", this, "_closed"); + help_bit->connect_compat("request_hide", this, "_closed"); search_options->set_columns(3); search_options->set_column_expand(1, false); search_options->set_column_expand(2, false); diff --git a/modules/visual_script/visual_script_yield_nodes.cpp b/modules/visual_script/visual_script_yield_nodes.cpp index 877d5836d2..858074742e 100644 --- a/modules/visual_script/visual_script_yield_nodes.cpp +++ b/modules/visual_script/visual_script_yield_nodes.cpp @@ -99,7 +99,7 @@ public: //virtual bool is_output_port_unsequenced(int p_idx) const { return false; } //virtual bool get_output_port_unsequenced(int p_idx,Variant* r_value,Variant* p_working_mem,String &r_error) const { return false; } - virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) { + virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) { if (p_start_mode == START_MODE_RESUME_YIELD) { return 0; //resuming yield @@ -109,7 +109,7 @@ public: SceneTree *tree = Object::cast_to<SceneTree>(OS::get_singleton()->get_main_loop()); if (!tree) { r_error_str = "Main Loop is not SceneTree"; - r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD; return 0; } @@ -188,7 +188,7 @@ void VisualScriptYield::_bind_methods() { ClassDB::bind_method(D_METHOD("get_wait_time"), &VisualScriptYield::get_wait_time); ADD_PROPERTY(PropertyInfo(Variant::INT, "mode", PROPERTY_HINT_ENUM, "Frame,Physics Frame,Time", PROPERTY_USAGE_NOEDITOR), "set_yield_mode", "get_yield_mode"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "wait_time"), "set_wait_time", "get_wait_time"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "wait_time"), "set_wait_time", "get_wait_time"); BIND_ENUM_CONSTANT(YIELD_FRAME); BIND_ENUM_CONSTANT(YIELD_PHYSICS_FRAME); @@ -509,7 +509,7 @@ public: //virtual bool is_output_port_unsequenced(int p_idx) const { return false; } //virtual bool get_output_port_unsequenced(int p_idx,Variant* r_value,Variant* p_working_mem,String &r_error) const { return true; } - virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) { + virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) { if (p_start_mode == START_MODE_RESUME_YIELD) { return 0; //resuming yield @@ -529,14 +529,14 @@ public: Node *node = Object::cast_to<Node>(instance->get_owner_ptr()); if (!node) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD; r_error_str = "Base object is not a Node!"; return 0; } Node *another = node->get_node(node_path); if (!another) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD; r_error_str = "Path does not lead Node!"; return 0; } @@ -548,7 +548,7 @@ public: object = *p_inputs[0]; if (!object) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD; r_error_str = "Supplied instance input is null."; return 0; } diff --git a/modules/webm/video_stream_webm.cpp b/modules/webm/video_stream_webm.cpp index 54d34a48c5..5768392fe5 100644 --- a/modules/webm/video_stream_webm.cpp +++ b/modules/webm/video_stream_webm.cpp @@ -315,12 +315,12 @@ void VideoStreamPlaybackWebm::update(float p_delta) { if (err == VPXDecoder::NO_ERROR && image.w == webm->getWidth() && image.h == webm->getHeight()) { - PoolVector<uint8_t>::Write w = frame_data.write(); + uint8_t *w = frame_data.ptrw(); bool converted = false; if (image.chromaShiftW == 0 && image.chromaShiftH == 0 && image.cs == VPX_CS_SRGB) { - uint8_t *wp = w.ptr(); + uint8_t *wp = w; unsigned char *rRow = image.planes[2]; unsigned char *gRow = image.planes[0]; unsigned char *bRow = image.planes[1]; @@ -338,17 +338,17 @@ void VideoStreamPlaybackWebm::update(float p_delta) { converted = true; } else if (image.chromaShiftW == 1 && image.chromaShiftH == 1) { - yuv420_2_rgb8888(w.ptr(), image.planes[0], image.planes[1], image.planes[2], image.w, image.h, image.linesize[0], image.linesize[1], image.w << 2); + yuv420_2_rgb8888(w, image.planes[0], image.planes[1], image.planes[2], image.w, image.h, image.linesize[0], image.linesize[1], image.w << 2); //libyuv::I420ToARGB(image.planes[0], image.linesize[0], image.planes[2], image.linesize[2], image.planes[1], image.linesize[1], w.ptr(), image.w << 2, image.w, image.h); converted = true; } else if (image.chromaShiftW == 1 && image.chromaShiftH == 0) { - yuv422_2_rgb8888(w.ptr(), image.planes[0], image.planes[1], image.planes[2], image.w, image.h, image.linesize[0], image.linesize[1], image.w << 2); + yuv422_2_rgb8888(w, image.planes[0], image.planes[1], image.planes[2], image.w, image.h, image.linesize[0], image.linesize[1], image.w << 2); //libyuv::I422ToARGB(image.planes[0], image.linesize[0], image.planes[2], image.linesize[2], image.planes[1], image.linesize[1], w.ptr(), image.w << 2, image.w, image.h); converted = true; } else if (image.chromaShiftW == 0 && image.chromaShiftH == 0) { - yuv444_2_rgb8888(w.ptr(), image.planes[0], image.planes[1], image.planes[2], image.w, image.h, image.linesize[0], image.linesize[1], image.w << 2); + yuv444_2_rgb8888(w, image.planes[0], image.planes[1], image.planes[2], image.w, image.h, image.linesize[0], image.linesize[1], image.w << 2); //libyuv::I444ToARGB(image.planes[0], image.linesize[0], image.planes[2], image.linesize[2], image.planes[1], image.linesize[1], w.ptr(), image.w << 2, image.w, image.h); converted = true; } else if (image.chromaShiftW == 2 && image.chromaShiftH == 0) { diff --git a/modules/webm/video_stream_webm.h b/modules/webm/video_stream_webm.h index f2a68dd701..a3d3c173f4 100644 --- a/modules/webm/video_stream_webm.h +++ b/modules/webm/video_stream_webm.h @@ -61,7 +61,7 @@ class VideoStreamPlaybackWebm : public VideoStreamPlayback { double delay_compensation; double time, video_frame_delay, video_pos; - PoolVector<uint8_t> frame_data; + Vector<uint8_t> frame_data; Ref<ImageTexture> texture; float *pcm; diff --git a/modules/webp/image_loader_webp.cpp b/modules/webp/image_loader_webp.cpp index 7f4afa9a08..09a8985472 100644 --- a/modules/webp/image_loader_webp.cpp +++ b/modules/webp/image_loader_webp.cpp @@ -38,9 +38,9 @@ #include <webp/decode.h> #include <webp/encode.h> -static PoolVector<uint8_t> _webp_lossy_pack(const Ref<Image> &p_image, float p_quality) { +static Vector<uint8_t> _webp_lossy_pack(const Ref<Image> &p_image, float p_quality) { - ERR_FAIL_COND_V(p_image.is_null() || p_image->empty(), PoolVector<uint8_t>()); + ERR_FAIL_COND_V(p_image.is_null() || p_image->empty(), Vector<uint8_t>()); Ref<Image> img = p_image->duplicate(); if (img->detect_alpha()) @@ -49,37 +49,37 @@ static PoolVector<uint8_t> _webp_lossy_pack(const Ref<Image> &p_image, float p_q img->convert(Image::FORMAT_RGB8); Size2 s(img->get_width(), img->get_height()); - PoolVector<uint8_t> data = img->get_data(); - PoolVector<uint8_t>::Read r = data.read(); + Vector<uint8_t> data = img->get_data(); + const uint8_t *r = data.ptr(); uint8_t *dst_buff = NULL; size_t dst_size = 0; if (img->get_format() == Image::FORMAT_RGB8) { - dst_size = WebPEncodeRGB(r.ptr(), s.width, s.height, 3 * s.width, CLAMP(p_quality * 100.0, 0, 100.0), &dst_buff); + dst_size = WebPEncodeRGB(r, s.width, s.height, 3 * s.width, CLAMP(p_quality * 100.0, 0, 100.0), &dst_buff); } else { - dst_size = WebPEncodeRGBA(r.ptr(), s.width, s.height, 4 * s.width, CLAMP(p_quality * 100.0, 0, 100.0), &dst_buff); + dst_size = WebPEncodeRGBA(r, s.width, s.height, 4 * s.width, CLAMP(p_quality * 100.0, 0, 100.0), &dst_buff); } - ERR_FAIL_COND_V(dst_size == 0, PoolVector<uint8_t>()); - PoolVector<uint8_t> dst; + ERR_FAIL_COND_V(dst_size == 0, Vector<uint8_t>()); + Vector<uint8_t> dst; dst.resize(4 + dst_size); - PoolVector<uint8_t>::Write w = dst.write(); + uint8_t *w = dst.ptrw(); w[0] = 'W'; w[1] = 'E'; w[2] = 'B'; w[3] = 'P'; copymem(&w[4], dst_buff, dst_size); free(dst_buff); - w.release(); + return dst; } -static Ref<Image> _webp_lossy_unpack(const PoolVector<uint8_t> &p_buffer) { +static Ref<Image> _webp_lossy_unpack(const Vector<uint8_t> &p_buffer) { int size = p_buffer.size() - 4; ERR_FAIL_COND_V(size <= 0, Ref<Image>()); - PoolVector<uint8_t>::Read r = p_buffer.read(); + const uint8_t *r = p_buffer.ptr(); ERR_FAIL_COND_V(r[0] != 'W' || r[1] != 'E' || r[2] != 'B' || r[3] != 'P', Ref<Image>()); WebPBitstreamFeatures features; @@ -93,23 +93,21 @@ static Ref<Image> _webp_lossy_unpack(const PoolVector<uint8_t> &p_buffer) { print_line("alpha: "+itos(features.has_alpha)); */ - PoolVector<uint8_t> dst_image; + Vector<uint8_t> dst_image; int datasize = features.width * features.height * (features.has_alpha ? 4 : 3); dst_image.resize(datasize); - PoolVector<uint8_t>::Write dst_w = dst_image.write(); + uint8_t *dst_w = dst_image.ptrw(); bool errdec = false; if (features.has_alpha) { - errdec = WebPDecodeRGBAInto(&r[4], size, dst_w.ptr(), datasize, 4 * features.width) == NULL; + errdec = WebPDecodeRGBAInto(&r[4], size, dst_w, datasize, 4 * features.width) == NULL; } else { - errdec = WebPDecodeRGBInto(&r[4], size, dst_w.ptr(), datasize, 3 * features.width) == NULL; + errdec = WebPDecodeRGBInto(&r[4], size, dst_w, datasize, 3 * features.width) == NULL; } ERR_FAIL_COND_V_MSG(errdec, Ref<Image>(), "Failed decoding WebP image."); - dst_w.release(); - Ref<Image> img = memnew(Image(features.width, features.height, 0, features.has_alpha ? Image::FORMAT_RGBA8 : Image::FORMAT_RGB8, dst_image)); return img; } @@ -123,18 +121,17 @@ Error webp_load_image_from_buffer(Image *p_image, const uint8_t *p_buffer, int p ERR_FAIL_V(ERR_FILE_CORRUPT); } - PoolVector<uint8_t> dst_image; + Vector<uint8_t> dst_image; int datasize = features.width * features.height * (features.has_alpha ? 4 : 3); dst_image.resize(datasize); - PoolVector<uint8_t>::Write dst_w = dst_image.write(); + uint8_t *dst_w = dst_image.ptrw(); bool errdec = false; if (features.has_alpha) { - errdec = WebPDecodeRGBAInto(p_buffer, p_buffer_len, dst_w.ptr(), datasize, 4 * features.width) == NULL; + errdec = WebPDecodeRGBAInto(p_buffer, p_buffer_len, dst_w, datasize, 4 * features.width) == NULL; } else { - errdec = WebPDecodeRGBInto(p_buffer, p_buffer_len, dst_w.ptr(), datasize, 3 * features.width) == NULL; + errdec = WebPDecodeRGBInto(p_buffer, p_buffer_len, dst_w, datasize, 3 * features.width) == NULL; } - dst_w.release(); ERR_FAIL_COND_V_MSG(errdec, ERR_FILE_CORRUPT, "Failed decoding WebP image."); @@ -154,18 +151,18 @@ static Ref<Image> _webp_mem_loader_func(const uint8_t *p_png, int p_size) { Error ImageLoaderWEBP::load_image(Ref<Image> p_image, FileAccess *f, bool p_force_linear, float p_scale) { - PoolVector<uint8_t> src_image; + Vector<uint8_t> src_image; int src_image_len = f->get_len(); ERR_FAIL_COND_V(src_image_len == 0, ERR_FILE_CORRUPT); src_image.resize(src_image_len); - PoolVector<uint8_t>::Write w = src_image.write(); + uint8_t *w = src_image.ptrw(); f->get_buffer(&w[0], src_image_len); f->close(); - Error err = webp_load_image_from_buffer(p_image.ptr(), w.ptr(), src_image_len); + Error err = webp_load_image_from_buffer(p_image.ptr(), w, src_image_len); return err; } diff --git a/modules/websocket/doc_classes/WebSocketClient.xml b/modules/websocket/doc_classes/WebSocketClient.xml index 2549321db3..45db49c913 100644 --- a/modules/websocket/doc_classes/WebSocketClient.xml +++ b/modules/websocket/doc_classes/WebSocketClient.xml @@ -17,11 +17,11 @@ </return> <argument index="0" name="url" type="String"> </argument> - <argument index="1" name="protocols" type="PoolStringArray" default="PoolStringArray( )"> + <argument index="1" name="protocols" type="PackedStringArray" default="PackedStringArray( )"> </argument> <argument index="2" name="gd_mp_api" type="bool" default="false"> </argument> - <argument index="3" name="custom_headers" type="PoolStringArray" default="PoolStringArray( )"> + <argument index="3" name="custom_headers" type="PackedStringArray" default="PackedStringArray( )"> </argument> <description> Connects to the given URL requesting one of the given [code]protocols[/code] as sub-protocol. If the list empty (default), no sub-protocol will be requested. diff --git a/modules/websocket/doc_classes/WebSocketServer.xml b/modules/websocket/doc_classes/WebSocketServer.xml index f66e1bf54b..f7805209e2 100644 --- a/modules/websocket/doc_classes/WebSocketServer.xml +++ b/modules/websocket/doc_classes/WebSocketServer.xml @@ -63,7 +63,7 @@ </return> <argument index="0" name="port" type="int"> </argument> - <argument index="1" name="protocols" type="PoolStringArray" default="PoolStringArray( )"> + <argument index="1" name="protocols" type="PackedStringArray" default="PackedStringArray( )"> </argument> <argument index="2" name="gd_mp_api" type="bool" default="false"> </argument> diff --git a/modules/websocket/emws_client.cpp b/modules/websocket/emws_client.cpp index 7e68936fc3..e5680ce2e9 100644 --- a/modules/websocket/emws_client.cpp +++ b/modules/websocket/emws_client.cpp @@ -91,10 +91,14 @@ Error EMWSClient::connect_to_host(String p_host, String p_path, uint16_t p_port, int peer_sock = EM_ASM_INT({ var proto_str = UTF8ToString($2); var socket = null; - if (proto_str) { - socket = new WebSocket(UTF8ToString($1), proto_str.split(",")); - } else { - socket = new WebSocket(UTF8ToString($1)); + try { + if (proto_str) { + socket = new WebSocket(UTF8ToString($1), proto_str.split(",")); + } else { + socket = new WebSocket(UTF8ToString($1)); + } + } catch (e) { + return -1; } var c_ptr = Module.IDHandler.get($0); socket.binaryType = "arraybuffer"; @@ -174,6 +178,8 @@ Error EMWSClient::connect_to_host(String p_host, String p_path, uint16_t p_port, return Module.IDHandler.add(socket); }, _js_id, str.utf8().get_data(), proto_string.utf8().get_data()); /* clang-format on */ + if (peer_sock == -1) + return FAILED; static_cast<Ref<EMWSPeer> >(_peer)->set_sock(peer_sock, _in_buf_size, _in_pkt_size); @@ -190,11 +196,11 @@ Ref<WebSocketPeer> EMWSClient::get_peer(int p_peer_id) const { NetworkedMultiplayerPeer::ConnectionStatus EMWSClient::get_connection_status() const { - if (_peer->is_connected_to_host()) + if (_peer->is_connected_to_host()) { + if (_is_connecting) + return CONNECTION_CONNECTING; return CONNECTION_CONNECTED; - - if (_is_connecting) - return CONNECTION_CONNECTING; + } return CONNECTION_DISCONNECTED; }; diff --git a/modules/websocket/emws_peer.cpp b/modules/websocket/emws_peer.cpp index effed8e4d9..f396a1c812 100644 --- a/modules/websocket/emws_peer.cpp +++ b/modules/websocket/emws_peer.cpp @@ -68,12 +68,17 @@ Error EMWSPeer::put_packet(const uint8_t *p_buffer, int p_buffer_size) { bytes_array[i] = getValue($1+i, 'i8'); } - if ($3) { - sock.send(bytes_array.buffer); - } else { - var string = new TextDecoder("utf-8").decode(bytes_array); - sock.send(string); + try { + if ($3) { + sock.send(bytes_array.buffer); + } else { + var string = new TextDecoder("utf-8").decode(bytes_array); + sock.send(string); + } + } catch (e) { + return 1; } + return 0; }, peer_sock, p_buffer, p_buffer_size, is_bin); /* clang-format on */ @@ -85,7 +90,7 @@ Error EMWSPeer::get_packet(const uint8_t **r_buffer, int &r_buffer_size) { if (_in_buffer.packets_left() == 0) return ERR_UNAVAILABLE; - PoolVector<uint8_t>::Write rw = _packet_buffer.write(); + uint8_t *rw = _packet_buffer.ptrw(); int read = 0; Error err = _in_buffer.read_packet(rw.ptr(), _packet_buffer.size(), &_is_string, read); ERR_FAIL_COND_V(err != OK, err); diff --git a/modules/websocket/emws_peer.h b/modules/websocket/emws_peer.h index 43b42f9be6..6308ebe490 100644 --- a/modules/websocket/emws_peer.h +++ b/modules/websocket/emws_peer.h @@ -48,7 +48,7 @@ private: int peer_sock; WriteMode write_mode; - PoolVector<uint8_t> _packet_buffer; + Vector<uint8_t> _packet_buffer; PacketBuffer<uint8_t> _in_buffer; uint8_t _is_string; diff --git a/modules/websocket/emws_server.cpp b/modules/websocket/emws_server.cpp index 23faa05365..8ceefa42b6 100644 --- a/modules/websocket/emws_server.cpp +++ b/modules/websocket/emws_server.cpp @@ -53,8 +53,8 @@ Ref<WebSocketPeer> EMWSServer::get_peer(int p_id) const { return NULL; } -PoolVector<String> EMWSServer::get_protocols() const { - PoolVector<String> out; +Vector<String> EMWSServer::get_protocols() const { + Vector<String> out; return out; } diff --git a/modules/websocket/emws_server.h b/modules/websocket/emws_server.h index 869e59fe03..f273fd078f 100644 --- a/modules/websocket/emws_server.h +++ b/modules/websocket/emws_server.h @@ -53,7 +53,7 @@ public: void disconnect_peer(int p_peer_id, int p_code = 1000, String p_reason = ""); int get_max_packet_size() const; virtual void poll(); - virtual PoolVector<String> get_protocols() const; + virtual Vector<String> get_protocols() const; EMWSServer(); ~EMWSServer(); diff --git a/modules/websocket/websocket_multiplayer_peer.cpp b/modules/websocket/websocket_multiplayer_peer.cpp index 27ea50b524..5c01d44ede 100644 --- a/modules/websocket/websocket_multiplayer_peer.cpp +++ b/modules/websocket/websocket_multiplayer_peer.cpp @@ -127,12 +127,12 @@ Error WebSocketMultiplayerPeer::put_packet(const uint8_t *p_buffer, int p_buffer ERR_FAIL_COND_V_MSG(!_is_multiplayer, ERR_UNCONFIGURED, "Please use get_peer(ID).put_packet/var to communicate with peers when not using the MultiplayerAPI."); - PoolVector<uint8_t> buffer = _make_pkt(SYS_NONE, get_unique_id(), _target_peer, p_buffer, p_buffer_size); + Vector<uint8_t> buffer = _make_pkt(SYS_NONE, get_unique_id(), _target_peer, p_buffer, p_buffer_size); if (is_server()) { - return _server_relay(1, _target_peer, &(buffer.read()[0]), buffer.size()); + return _server_relay(1, _target_peer, &(buffer.ptr()[0]), buffer.size()); } else { - return get_peer(1)->put_packet(&(buffer.read()[0]), buffer.size()); + return get_peer(1)->put_packet(&(buffer.ptr()[0]), buffer.size()); } } @@ -183,16 +183,16 @@ void WebSocketMultiplayerPeer::_send_sys(Ref<WebSocketPeer> p_peer, uint8_t p_ty ERR_FAIL_COND(!p_peer.is_valid()); ERR_FAIL_COND(!p_peer->is_connected_to_host()); - PoolVector<uint8_t> message = _make_pkt(p_type, 1, 0, (uint8_t *)&p_peer_id, 4); - p_peer->put_packet(&(message.read()[0]), message.size()); + Vector<uint8_t> message = _make_pkt(p_type, 1, 0, (uint8_t *)&p_peer_id, 4); + p_peer->put_packet(&(message.ptr()[0]), message.size()); } -PoolVector<uint8_t> WebSocketMultiplayerPeer::_make_pkt(uint8_t p_type, int32_t p_from, int32_t p_to, const uint8_t *p_data, uint32_t p_data_size) { +Vector<uint8_t> WebSocketMultiplayerPeer::_make_pkt(uint8_t p_type, int32_t p_from, int32_t p_to, const uint8_t *p_data, uint32_t p_data_size) { - PoolVector<uint8_t> out; + Vector<uint8_t> out; out.resize(PROTO_SIZE + p_data_size); - PoolVector<uint8_t>::Write w = out.write(); + uint8_t *w = out.ptrw(); copymem(&w[0], &p_type, 1); copymem(&w[1], &p_from, 4); copymem(&w[5], &p_to, 4); diff --git a/modules/websocket/websocket_multiplayer_peer.h b/modules/websocket/websocket_multiplayer_peer.h index 27cb6e4eb7..579972ada2 100644 --- a/modules/websocket/websocket_multiplayer_peer.h +++ b/modules/websocket/websocket_multiplayer_peer.h @@ -41,7 +41,7 @@ class WebSocketMultiplayerPeer : public NetworkedMultiplayerPeer { GDCLASS(WebSocketMultiplayerPeer, NetworkedMultiplayerPeer); private: - PoolVector<uint8_t> _make_pkt(uint8_t p_type, int32_t p_from, int32_t p_to, const uint8_t *p_data, uint32_t p_data_size); + Vector<uint8_t> _make_pkt(uint8_t p_type, int32_t p_from, int32_t p_to, const uint8_t *p_data, uint32_t p_data_size); void _store_pkt(int32_t p_source, int32_t p_dest, const uint8_t *p_data, uint32_t p_data_size); Error _server_relay(int32_t p_from, int32_t p_to, const uint8_t *p_buffer, uint32_t p_buffer_size); diff --git a/modules/websocket/wsl_peer.cpp b/modules/websocket/wsl_peer.cpp index 08079145e4..ff32e83dc1 100644 --- a/modules/websocket/wsl_peer.cpp +++ b/modules/websocket/wsl_peer.cpp @@ -43,10 +43,10 @@ String WSLPeer::generate_key() { // Random key RandomNumberGenerator rng; rng.set_seed(OS::get_singleton()->get_unix_time()); - PoolVector<uint8_t> bkey; + Vector<uint8_t> bkey; int len = 16; // 16 bytes, as per RFC bkey.resize(len); - PoolVector<uint8_t>::Write w = bkey.write(); + uint8_t *w = bkey.ptrw(); for (int i = 0; i < len; i++) { w[i] = (uint8_t)rng.randi_range(0, 255); } @@ -260,10 +260,10 @@ Error WSLPeer::get_packet(const uint8_t **r_buffer, int &r_buffer_size) { return ERR_UNAVAILABLE; int read = 0; - PoolVector<uint8_t>::Write rw = _packet_buffer.write(); - _in_buffer.read_packet(rw.ptr(), _packet_buffer.size(), &_is_string, read); + uint8_t *rw = _packet_buffer.ptrw(); + _in_buffer.read_packet(rw, _packet_buffer.size(), &_is_string, read); - *r_buffer = rw.ptr(); + *r_buffer = rw; r_buffer_size = read; return OK; diff --git a/modules/websocket/wsl_peer.h b/modules/websocket/wsl_peer.h index f1c45ee859..00549cd9bc 100644 --- a/modules/websocket/wsl_peer.h +++ b/modules/websocket/wsl_peer.h @@ -86,7 +86,7 @@ private: // Our packet info is just a boolean (is_string), using uint8_t for it. PacketBuffer<uint8_t> _in_buffer; - PoolVector<uint8_t> _packet_buffer; + Vector<uint8_t> _packet_buffer; WriteMode write_mode; diff --git a/platform/android/SCsub b/platform/android/SCsub index 3ff5b8278a..fd2a774c71 100644 --- a/platform/android/SCsub +++ b/platform/android/SCsub @@ -18,7 +18,6 @@ android_files = [ 'java_class_wrapper.cpp', 'java_godot_wrapper.cpp', 'java_godot_io_wrapper.cpp', - #'power_android.cpp' ] env_android = env.Clone() diff --git a/platform/android/api/api.cpp b/platform/android/api/api.cpp index 2146c5409b..7efb545524 100644 --- a/platform/android/api/api.cpp +++ b/platform/android/api/api.cpp @@ -62,14 +62,14 @@ void JavaClassWrapper::_bind_methods() { #if !defined(ANDROID_ENABLED) -Variant JavaClass::call(const StringName &, const Variant **, int, Variant::CallError &) { +Variant JavaClass::call(const StringName &, const Variant **, int, Callable::CallError &) { return Variant(); } JavaClass::JavaClass() { } -Variant JavaObject::call(const StringName &, const Variant **, int, Variant::CallError &) { +Variant JavaObject::call(const StringName &, const Variant **, int, Callable::CallError &) { return Variant(); } diff --git a/platform/android/api/java_class_wrapper.h b/platform/android/api/java_class_wrapper.h index 6c06d57ac1..48b581958b 100644 --- a/platform/android/api/java_class_wrapper.h +++ b/platform/android/api/java_class_wrapper.h @@ -113,12 +113,12 @@ class JavaClass : public Reference { break; case ARG_TYPE_FLOAT | ARG_NUMBER_CLASS_BIT: case ARG_TYPE_FLOAT: - r_type = Variant::REAL; + r_type = Variant::FLOAT; likelihood = 1.0; break; case ARG_TYPE_DOUBLE | ARG_NUMBER_CLASS_BIT: case ARG_TYPE_DOUBLE: - r_type = Variant::REAL; + r_type = Variant::FLOAT; likelihood = 0.5; break; case ARG_TYPE_STRING: r_type = Variant::STRING; break; @@ -126,41 +126,41 @@ class JavaClass : public Reference { case ARG_ARRAY_BIT | ARG_TYPE_VOID: r_type = Variant::NIL; break; case ARG_ARRAY_BIT | ARG_TYPE_BOOLEAN: r_type = Variant::ARRAY; break; case ARG_ARRAY_BIT | ARG_TYPE_BYTE: - r_type = Variant::POOL_BYTE_ARRAY; + r_type = Variant::PACKED_BYTE_ARRAY; likelihood = 1.0; break; case ARG_ARRAY_BIT | ARG_TYPE_CHAR: - r_type = Variant::POOL_BYTE_ARRAY; + r_type = Variant::PACKED_BYTE_ARRAY; likelihood = 0.5; break; case ARG_ARRAY_BIT | ARG_TYPE_SHORT: - r_type = Variant::POOL_INT_ARRAY; + r_type = Variant::PACKED_INT32_ARRAY; likelihood = 0.3; break; case ARG_ARRAY_BIT | ARG_TYPE_INT: - r_type = Variant::POOL_INT_ARRAY; + r_type = Variant::PACKED_INT32_ARRAY; likelihood = 1.0; break; case ARG_ARRAY_BIT | ARG_TYPE_LONG: - r_type = Variant::POOL_INT_ARRAY; + r_type = Variant::PACKED_INT32_ARRAY; likelihood = 0.5; break; case ARG_ARRAY_BIT | ARG_TYPE_FLOAT: - r_type = Variant::POOL_REAL_ARRAY; + r_type = Variant::PACKED_FLOAT32_ARRAY; likelihood = 1.0; break; case ARG_ARRAY_BIT | ARG_TYPE_DOUBLE: - r_type = Variant::POOL_REAL_ARRAY; + r_type = Variant::PACKED_FLOAT32_ARRAY; likelihood = 0.5; break; - case ARG_ARRAY_BIT | ARG_TYPE_STRING: r_type = Variant::POOL_STRING_ARRAY; break; + case ARG_ARRAY_BIT | ARG_TYPE_STRING: r_type = Variant::PACKED_STRING_ARRAY; break; case ARG_ARRAY_BIT | ARG_TYPE_CLASS: r_type = Variant::ARRAY; break; } } _FORCE_INLINE_ static bool _convert_object_to_variant(JNIEnv *env, jobject obj, Variant &var, uint32_t p_sig); - bool _call_method(JavaObject *p_instance, const StringName &p_method, const Variant **p_args, int p_argcount, Variant::CallError &r_error, Variant &ret); + bool _call_method(JavaObject *p_instance, const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error, Variant &ret); friend class JavaClassWrapper; Map<StringName, List<MethodInfo> > methods; @@ -168,7 +168,7 @@ class JavaClass : public Reference { #endif public: - virtual Variant call(const StringName &p_method, const Variant **p_args, int p_argcount, Variant::CallError &r_error); + virtual Variant call(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error); JavaClass(); }; @@ -185,7 +185,7 @@ class JavaObject : public Reference { #endif public: - virtual Variant call(const StringName &p_method, const Variant **p_args, int p_argcount, Variant::CallError &r_error); + virtual Variant call(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error); #ifdef ANDROID_ENABLED JavaObject(const Ref<JavaClass> &p_base, jobject *p_instance); diff --git a/platform/android/export/export.cpp b/platform/android/export/export.cpp index 642b045f5b..50bf671a84 100644 --- a/platform/android/export/export.cpp +++ b/platform/android/export/export.cpp @@ -337,7 +337,7 @@ class EditorExportPlatformAndroid : public EditorExportPlatform { Vector<String> props = dp.split("\n"); String vendor; String device; - d.description + "Device ID: " + d.id + "\n"; + d.description = "Device ID: " + d.id + "\n"; d.api_level = 0; for (int j = 0; j < props.size(); j++) { @@ -385,7 +385,7 @@ class EditorExportPlatformAndroid : public EditorExportPlatform { ea->device_lock->unlock(); } - uint64_t sleep = OS::get_singleton()->get_power_state() == OS::POWERSTATE_ON_BATTERY ? 1000 : 100; + uint64_t sleep = 200; uint64_t wait = 3000000; uint64_t time = OS::get_singleton()->get_ticks_usec(); while (OS::get_singleton()->get_ticks_usec() - time < wait) { @@ -701,7 +701,7 @@ class EditorExportPlatformAndroid : public EditorExportPlatform { aperms++; } - PoolStringArray user_perms = p_preset->get("permissions/custom_permissions"); + PackedStringArray user_perms = p_preset->get("permissions/custom_permissions"); for (int i = 0; i < user_perms.size(); i++) { String user_perm = user_perms[i].strip_edges(); @@ -1310,11 +1310,11 @@ class EditorExportPlatformAndroid : public EditorExportPlatform { working_image->resize(p_icon.dimensions, p_icon.dimensions, Image::Interpolation::INTERPOLATE_LANCZOS); } - PoolVector<uint8_t> png_buffer; + Vector<uint8_t> png_buffer; Error err = PNGDriverCommon::image_to_png(working_image, png_buffer); if (err == OK) { p_data.resize(png_buffer.size()); - memcpy(p_data.ptrw(), png_buffer.read().ptr(), p_data.size()); + memcpy(p_data.ptrw(), png_buffer.ptr(), p_data.size()); } else { String err_str = String("Failed to convert resized icon (") + p_processing_file_name + ") to png."; WARN_PRINT(err_str.utf8().get_data()); @@ -1398,7 +1398,7 @@ public: r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "architectures/" + abi), is_default)); } - r_options->push_back(ExportOption(PropertyInfo(Variant::POOL_STRING_ARRAY, "permissions/custom_permissions"), PoolStringArray())); + r_options->push_back(ExportOption(PropertyInfo(Variant::PACKED_STRING_ARRAY, "permissions/custom_permissions"), PackedStringArray())); const char **perms = android_perms; while (*perms) { diff --git a/platform/android/java_class_wrapper.cpp b/platform/android/java_class_wrapper.cpp index fe2fd89710..9e9b17fb99 100644 --- a/platform/android/java_class_wrapper.cpp +++ b/platform/android/java_class_wrapper.cpp @@ -32,7 +32,7 @@ #include "string_android.h" #include "thread_jandroid.h" -bool JavaClass::_call_method(JavaObject *p_instance, const StringName &p_method, const Variant **p_args, int p_argcount, Variant::CallError &r_error, Variant &ret) { +bool JavaClass::_call_method(JavaObject *p_instance, const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error, Variant &ret) { Map<StringName, List<MethodInfo> >::Element *M = methods.find(p_method); if (!M) @@ -44,20 +44,20 @@ bool JavaClass::_call_method(JavaObject *p_instance, const StringName &p_method, for (List<MethodInfo>::Element *E = M->get().front(); E; E = E->next()) { if (!p_instance && !E->get()._static) { - r_error.error = Variant::CallError::CALL_ERROR_INSTANCE_IS_NULL; + r_error.error = Callable::CallError::CALL_ERROR_INSTANCE_IS_NULL; continue; } int pc = E->get().param_types.size(); if (pc > p_argcount) { - r_error.error = Variant::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS; + r_error.error = Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS; r_error.argument = pc; continue; } if (pc < p_argcount) { - r_error.error = Variant::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS; + r_error.error = Callable::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS; r_error.argument = pc; continue; } @@ -97,7 +97,7 @@ bool JavaClass::_call_method(JavaObject *p_instance, const StringName &p_method, case ARG_TYPE_DOUBLE: { if (!p_args[i]->is_num()) - arg_expected = Variant::REAL; + arg_expected = Variant::FLOAT; } break; case ARG_TYPE_STRING: { @@ -141,7 +141,7 @@ bool JavaClass::_call_method(JavaObject *p_instance, const StringName &p_method, } if (arg_expected != Variant::NIL) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.argument = i; r_error.expected = arg_expected; valid = false; @@ -158,7 +158,7 @@ bool JavaClass::_call_method(JavaObject *p_instance, const StringName &p_method, if (!method) return true; //no version convinces - r_error.error = Variant::CallError::CALL_OK; + r_error.error = Callable::CallError::CALL_OK; jvalue *argv = NULL; @@ -405,7 +405,7 @@ bool JavaClass::_call_method(JavaObject *p_instance, const StringName &p_method, } } - r_error.error = Variant::CallError::CALL_OK; + r_error.error = Callable::CallError::CALL_OK; bool success = true; switch (method->return_type) { @@ -501,7 +501,7 @@ bool JavaClass::_call_method(JavaObject *p_instance, const StringName &p_method, if (!_convert_object_to_variant(env, obj, ret, method->return_type)) { ret = Variant(); - r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD; success = false; } env->DeleteLocalRef(obj); @@ -517,7 +517,7 @@ bool JavaClass::_call_method(JavaObject *p_instance, const StringName &p_method, return success; } -Variant JavaClass::call(const StringName &p_method, const Variant **p_args, int p_argcount, Variant::CallError &r_error) { +Variant JavaClass::call(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error) { Variant ret; bool found = _call_method(NULL, p_method, p_args, p_argcount, r_error, ret); @@ -533,7 +533,7 @@ JavaClass::JavaClass() { ///////////////////// -Variant JavaObject::call(const StringName &p_method, const Variant **p_args, int p_argcount, Variant::CallError &r_error) { +Variant JavaObject::call(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error) { return Variant(); } diff --git a/platform/android/java_godot_lib_jni.cpp b/platform/android/java_godot_lib_jni.cpp index dedb2ee114..900a452024 100644 --- a/platform/android/java_godot_lib_jni.cpp +++ b/platform/android/java_godot_lib_jni.cpp @@ -99,7 +99,7 @@ jvalret _variant_to_jvalue(JNIEnv *env, Variant::Type p_type, const Variant *p_a v.val.i = *p_arg; }; } break; - case Variant::REAL: { + case Variant::FLOAT: { if (force_jobject) { @@ -123,9 +123,9 @@ jvalret _variant_to_jvalue(JNIEnv *env, Variant::Type p_type, const Variant *p_a v.val.l = jStr; v.obj = jStr; } break; - case Variant::POOL_STRING_ARRAY: { + case Variant::PACKED_STRING_ARRAY: { - PoolVector<String> sarray = *p_arg; + Vector<String> sarray = *p_arg; jobjectArray arr = env->NewObjectArray(sarray.size(), env->FindClass("java/lang/String"), env->NewStringUTF("")); for (int j = 0; j < sarray.size(); j++) { @@ -182,35 +182,39 @@ jvalret _variant_to_jvalue(JNIEnv *env, Variant::Type p_type, const Variant *p_a v.obj = jdict; } break; - case Variant::POOL_INT_ARRAY: { + case Variant::PACKED_INT32_ARRAY: { - PoolVector<int> array = *p_arg; + Vector<int> array = *p_arg; jintArray arr = env->NewIntArray(array.size()); - PoolVector<int>::Read r = array.read(); + const int *r = array.ptr(); env->SetIntArrayRegion(arr, 0, array.size(), r.ptr()); v.val.l = arr; v.obj = arr; } break; - case Variant::POOL_BYTE_ARRAY: { - PoolVector<uint8_t> array = *p_arg; + case Variant::PACKED_BYTE_ARRAY: { + Vector<uint8_t> array = *p_arg; jbyteArray arr = env->NewByteArray(array.size()); - PoolVector<uint8_t>::Read r = array.read(); + const uint8_t *r = array.ptr(); env->SetByteArrayRegion(arr, 0, array.size(), reinterpret_cast<const signed char *>(r.ptr())); v.val.l = arr; v.obj = arr; } break; - case Variant::POOL_REAL_ARRAY: { + case Variant::PACKED_FLOAT32_ARRAY: { - PoolVector<float> array = *p_arg; + Vector<float> array = *p_arg; jfloatArray arr = env->NewFloatArray(array.size()); - PoolVector<float>::Read r = array.read(); + const float *r = array.ptr(); env->SetFloatArrayRegion(arr, 0, array.size(), r.ptr()); v.val.l = arr; v.obj = arr; } break; +#ifndef _MSC_VER +#warning This is missing 64 bits arrays, I have no idea how to do it in JNI +#endif + default: { v.val.i = 0; @@ -255,7 +259,7 @@ Variant _jobject_to_variant(JNIEnv *env, jobject obj) { jobjectArray arr = (jobjectArray)obj; int stringCount = env->GetArrayLength(arr); - PoolVector<String> sarr; + Vector<String> sarr; for (int i = 0; i < stringCount; i++) { jstring string = (jstring)env->GetObjectArrayElement(arr, i); @@ -285,10 +289,10 @@ Variant _jobject_to_variant(JNIEnv *env, jobject obj) { jintArray arr = (jintArray)obj; int fCount = env->GetArrayLength(arr); - PoolVector<int> sarr; + Vector<int> sarr; sarr.resize(fCount); - PoolVector<int>::Write w = sarr.write(); + int *w = sarr.ptrw(); env->GetIntArrayRegion(arr, 0, fCount, w.ptr()); w.release(); return sarr; @@ -298,10 +302,10 @@ Variant _jobject_to_variant(JNIEnv *env, jobject obj) { jbyteArray arr = (jbyteArray)obj; int fCount = env->GetArrayLength(arr); - PoolVector<uint8_t> sarr; + Vector<uint8_t> sarr; sarr.resize(fCount); - PoolVector<uint8_t>::Write w = sarr.write(); + uint8_t *w = sarr.ptrw(); env->GetByteArrayRegion(arr, 0, fCount, reinterpret_cast<signed char *>(w.ptr())); w.release(); return sarr; @@ -319,10 +323,10 @@ Variant _jobject_to_variant(JNIEnv *env, jobject obj) { jdoubleArray arr = (jdoubleArray)obj; int fCount = env->GetArrayLength(arr); - PoolRealArray sarr; + PackedFloat32Array sarr; sarr.resize(fCount); - PoolRealArray::Write w = sarr.write(); + real_t *w = sarr.ptrw(); for (int i = 0; i < fCount; i++) { @@ -337,10 +341,10 @@ Variant _jobject_to_variant(JNIEnv *env, jobject obj) { jfloatArray arr = (jfloatArray)obj; int fCount = env->GetArrayLength(arr); - PoolRealArray sarr; + PackedFloat32Array sarr; sarr.resize(fCount); - PoolRealArray::Write w = sarr.write(); + real_t *w = sarr.ptrw(); for (int i = 0; i < fCount; i++) { @@ -374,7 +378,7 @@ Variant _jobject_to_variant(JNIEnv *env, jobject obj) { jmethodID get_keys = env->GetMethodID(oclass, "get_keys", "()[Ljava/lang/String;"); jobjectArray arr = (jobjectArray)env->CallObjectMethod(obj, get_keys); - PoolStringArray keys = _jobject_to_variant(env, arr); + PackedStringArray keys = _jobject_to_variant(env, arr); env->DeleteLocalRef(arr); jmethodID get_values = env->GetMethodID(oclass, "get_values", "()[Ljava/lang/Object;"); @@ -411,30 +415,30 @@ class JNISingleton : public Object { Map<StringName, MethodData> method_map; public: - virtual Variant call(const StringName &p_method, const Variant **p_args, int p_argcount, Variant::CallError &r_error) { + virtual Variant call(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error) { ERR_FAIL_COND_V(!instance, Variant()); - r_error.error = Variant::CallError::CALL_OK; + r_error.error = Callable::CallError::CALL_OK; Map<StringName, MethodData>::Element *E = method_map.find(p_method); if (!E) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD; return Variant(); } int ac = E->get().argtypes.size(); if (ac < p_argcount) { - r_error.error = Variant::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS; + r_error.error = Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS; r_error.argument = ac; return Variant(); } if (ac > p_argcount) { - r_error.error = Variant::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS; + r_error.error = Callable::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS; r_error.argument = ac; return Variant(); } @@ -443,7 +447,7 @@ public: if (!Variant::can_convert(p_args[i]->get_type(), E->get().argtypes[i])) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.argument = i; r_error.expected = E->get().argtypes[i]; } @@ -487,7 +491,7 @@ public: ret = env->CallIntMethodA(instance, E->get().method, v); } break; - case Variant::REAL: { + case Variant::FLOAT: { ret = env->CallFloatMethodA(instance, E->get().method, v); } break; @@ -497,7 +501,7 @@ public: ret = jstring_to_string((jstring)o, env); env->DeleteLocalRef(o); } break; - case Variant::POOL_STRING_ARRAY: { + case Variant::PACKED_STRING_ARRAY: { jobjectArray arr = (jobjectArray)env->CallObjectMethodA(instance, E->get().method, v); @@ -505,35 +509,38 @@ public: env->DeleteLocalRef(arr); } break; - case Variant::POOL_INT_ARRAY: { + case Variant::PACKED_INT32_ARRAY: { jintArray arr = (jintArray)env->CallObjectMethodA(instance, E->get().method, v); int fCount = env->GetArrayLength(arr); - PoolVector<int> sarr; + Vector<int> sarr; sarr.resize(fCount); - PoolVector<int>::Write w = sarr.write(); + int *w = sarr.ptrw(); env->GetIntArrayRegion(arr, 0, fCount, w.ptr()); w.release(); ret = sarr; env->DeleteLocalRef(arr); } break; - case Variant::POOL_REAL_ARRAY: { + case Variant::PACKED_FLOAT32_ARRAY: { jfloatArray arr = (jfloatArray)env->CallObjectMethodA(instance, E->get().method, v); int fCount = env->GetArrayLength(arr); - PoolVector<float> sarr; + Vector<float> sarr; sarr.resize(fCount); - PoolVector<float>::Write w = sarr.write(); + float *w = sarr.ptrw(); env->GetFloatArrayRegion(arr, 0, fCount, w.ptr()); w.release(); ret = sarr; env->DeleteLocalRef(arr); } break; +#ifndef _MSC_VER +#warning This is missing 64 bits arrays, I have no idea how to do it in JNI +#endif case Variant::DICTIONARY: { jobject obj = env->CallObjectMethodA(instance, E->get().method, v); @@ -1246,13 +1253,13 @@ static Variant::Type get_jni_type(const String &p_type) { { "void", Variant::NIL }, { "boolean", Variant::BOOL }, { "int", Variant::INT }, - { "float", Variant::REAL }, - { "double", Variant::REAL }, + { "float", Variant::FLOAT }, + { "double", Variant::FLOAT }, { "java.lang.String", Variant::STRING }, - { "[I", Variant::POOL_INT_ARRAY }, - { "[B", Variant::POOL_BYTE_ARRAY }, - { "[F", Variant::POOL_REAL_ARRAY }, - { "[Ljava.lang.String;", Variant::POOL_STRING_ARRAY }, + { "[I", Variant::PACKED_INT32_ARRAY }, + { "[B", Variant::PACKED_BYTE_ARRAY }, + { "[F", Variant::PACKED_FLOAT32_ARRAY }, + { "[Ljava.lang.String;", Variant::PACKED_STRING_ARRAY }, { "org.godotengine.godot.Dictionary", Variant::DICTIONARY }, { NULL, Variant::NIL } }; @@ -1370,7 +1377,7 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_callobject(JNIEnv *en env->DeleteLocalRef(obj); }; - Variant::CallError err; + Callable::CallError err; obj->call(str_method, (const Variant **)vptr, count, err); // something diff --git a/platform/android/os_android.cpp b/platform/android/os_android.cpp index e86e373630..15e3ac48c7 100644 --- a/platform/android/os_android.cpp +++ b/platform/android/os_android.cpp @@ -152,8 +152,6 @@ Error OS_Android::initialize(const VideoMode &p_desired, int p_video_driver, int input = memnew(InputDefault); input->set_fallback_mapping(godot_java->get_input_fallback_mapping()); - //power_manager = memnew(PowerAndroid); - return OK; } diff --git a/platform/android/os_android.h b/platform/android/os_android.h index c2f9a0992f..ec6ffe5438 100644 --- a/platform/android/os_android.h +++ b/platform/android/os_android.h @@ -37,7 +37,6 @@ #include "core/os/main_loop.h" #include "drivers/unix/os_unix.h" #include "main/input_default.h" -//#include "power_android.h" #include "servers/audio_server.h" #include "servers/visual/rasterizer.h" @@ -93,8 +92,6 @@ private: GodotJavaWrapper *godot_java; GodotIOJavaWrapper *godot_io_java; - //PowerAndroid *power_manager_func; - int video_driver_index; public: diff --git a/platform/android/power_android.cpp b/platform/android/power_android.cpp deleted file mode 100644 index b0a90312e5..0000000000 --- a/platform/android/power_android.cpp +++ /dev/null @@ -1,255 +0,0 @@ -/*************************************************************************/ -/* power_android.cpp */ -/*************************************************************************/ -/* This file is part of: */ -/* GODOT ENGINE */ -/* https://godotengine.org */ -/*************************************************************************/ -/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */ -/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */ -/* */ -/* Permission is hereby granted, free of charge, to any person obtaining */ -/* a copy of this software and associated documentation files (the */ -/* "Software"), to deal in the Software without restriction, including */ -/* without limitation the rights to use, copy, modify, merge, publish, */ -/* distribute, sublicense, and/or sell copies of the Software, and to */ -/* permit persons to whom the Software is furnished to do so, subject to */ -/* the following conditions: */ -/* */ -/* The above copyright notice and this permission notice shall be */ -/* included in all copies or substantial portions of the Software. */ -/* */ -/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ -/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ -/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ -/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ -/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ -/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ -/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -/*************************************************************************/ - -/* -Adapted from corresponding SDL 2.0 code. -*/ - -/* - Simple DirectMedia Layer - Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org> - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. -*/ - -#include "power_android.h" - -#include "core/error_macros.h" - -static void LocalReferenceHolder_Cleanup(struct LocalReferenceHolder *refholder) { - if (refholder->m_env) { - JNIEnv *env = refholder->m_env; - (*env)->PopLocalFrame(env, NULL); - --s_active; - } -} - -static struct LocalReferenceHolder LocalReferenceHolder_Setup(const char *func) { - struct LocalReferenceHolder refholder; - refholder.m_env = NULL; - refholder.m_func = func; - return refholder; -} - -static bool LocalReferenceHolder_Init(struct LocalReferenceHolder *refholder, JNIEnv *env) { - const int capacity = 16; - if ((*env)->PushLocalFrame(env, capacity) < 0) { - return false; - } - ++s_active; - refholder->m_env = env; - return true; -} - -static SDL_bool LocalReferenceHolder_IsActive(void) { - return s_active > 0; -} - -ANativeWindow *Android_JNI_GetNativeWindow(void) { - ANativeWindow *anw; - jobject s; - JNIEnv *env = Android_JNI_GetEnv(); - - s = (*env)->CallStaticObjectMethod(env, mActivityClass, midGetNativeSurface); - anw = ANativeWindow_fromSurface(env, s); - (*env)->DeleteLocalRef(env, s); - - return anw; -} - -/* - * CODE CHUNK IMPORTED FROM SDL 2.0 - * returns 0 on success or -1 on error (others undefined then) - * returns truthy or falsy value in plugged, charged and battery - * returns the value in seconds and percent or -1 if not available - */ -int Android_JNI_GetPowerInfo(int *plugged, int *charged, int *battery, int *seconds, int *percent) { - env = Android_JNI_GetEnv(); - refs = LocalReferenceHolder_Setup(__FUNCTION__); - - if (!LocalReferenceHolder_Init(&refs, env)) { - LocalReferenceHolder_Cleanup(&refs); - return -1; - } - mid = (*env)->GetStaticMethodID(env, mActivityClass, "getContext", "()Landroid/content/Context;"); - context = (*env)->CallStaticObjectMethod(env, mActivityClass, mid); - action = (*env)->NewStringUTF(env, "android.intent.action.BATTERY_CHANGED"); - cls = (*env)->FindClass(env, "android/content/IntentFilter"); - mid = (*env)->GetMethodID(env, cls, "<init>", "(Ljava/lang/String;)V"); - filter = (*env)->NewObject(env, cls, mid, action); - (*env)->DeleteLocalRef(env, action); - mid = (*env)->GetMethodID(env, mActivityClass, "registerReceiver", "(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;"); - intent = (*env)->CallObjectMethod(env, context, mid, NULL, filter); - (*env)->DeleteLocalRef(env, filter); - cls = (*env)->GetObjectClass(env, intent); - imid = (*env)->GetMethodID(env, cls, "getIntExtra", "(Ljava/lang/String;I)I"); -// Watch out for C89 scoping rules because of the macro -#define GET_INT_EXTRA(var, key) \ - int var; \ - iname = (*env)->NewStringUTF(env, key); \ - var = (*env)->CallIntMethod(env, intent, imid, iname, -1); \ - (*env)->DeleteLocalRef(env, iname); - bmid = (*env)->GetMethodID(env, cls, "getBooleanExtra", "(Ljava/lang/String;Z)Z"); -// Watch out for C89 scoping rules because of the macro -#define GET_BOOL_EXTRA(var, key) \ - int var; \ - bname = (*env)->NewStringUTF(env, key); \ - var = (*env)->CallBooleanMethod(env, intent, bmid, bname, JNI_FALSE); \ - (*env)->DeleteLocalRef(env, bname); - if (plugged) { - // Watch out for C89 scoping rules because of the macro - GET_INT_EXTRA(plug, "plugged") // == BatteryManager.EXTRA_PLUGGED (API 5) - if (plug == -1) { - LocalReferenceHolder_Cleanup(&refs); - return -1; - } - // 1 == BatteryManager.BATTERY_PLUGGED_AC - // 2 == BatteryManager.BATTERY_PLUGGED_USB - *plugged = (0 < plug) ? 1 : 0; - } - if (charged) { - // Watch out for C89 scoping rules because of the macro - GET_INT_EXTRA(status, "status") // == BatteryManager.EXTRA_STATUS (API 5) - if (status == -1) { - LocalReferenceHolder_Cleanup(&refs); - return -1; - } - // 5 == BatteryManager.BATTERY_STATUS_FULL - *charged = (status == 5) ? 1 : 0; - } - if (battery) { - GET_BOOL_EXTRA(present, "present") // == BatteryManager.EXTRA_PRESENT (API 5) - *battery = present ? 1 : 0; - } - if (seconds) { - *seconds = -1; // not possible - } - if (percent) { - int level; - int scale; - // Watch out for C89 scoping rules because of the macro - { - GET_INT_EXTRA(level_temp, "level") // == BatteryManager.EXTRA_LEVEL (API 5) - level = level_temp; - } - // Watch out for C89 scoping rules because of the macro - { - GET_INT_EXTRA(scale_temp, "scale") // == BatteryManager.EXTRA_SCALE (API 5) - scale = scale_temp; - } - if ((level == -1) || (scale == -1)) { - LocalReferenceHolder_Cleanup(&refs); - return -1; - } - *percent = level * 100 / scale; - } - (*env)->DeleteLocalRef(env, intent); - LocalReferenceHolder_Cleanup(&refs); - - return 0; -} - -bool PowerAndroid::GetPowerInfo_Android() { - int battery; - int plugged; - int charged; - - if (Android_JNI_GetPowerInfo(&plugged, &charged, &battery, &this->nsecs_left, &this->percent_left) != -1) { - if (plugged) { - if (charged) { - this->power_state = OS::POWERSTATE_CHARGED; - } else if (battery) { - this->power_state = OS::POWERSTATE_CHARGING; - } else { - this->power_state = OS::POWERSTATE_NO_BATTERY; - this->nsecs_left = -1; - this->percent_left = -1; - } - } else { - this->power_state = OS::POWERSTATE_ON_BATTERY; - } - } else { - this->power_state = OS::POWERSTATE_UNKNOWN; - this->nsecs_left = -1; - this->percent_left = -1; - } - - return true; -} - -OS::PowerState PowerAndroid::get_power_state() { - if (GetPowerInfo_Android()) { - return power_state; - } else { - WARN_PRINT("Power management is not implemented on this platform, defaulting to POWERSTATE_UNKNOWN"); - return OS::POWERSTATE_UNKNOWN; - } -} - -int PowerAndroid::get_power_seconds_left() { - if (GetPowerInfo_Android()) { - return nsecs_left; - } else { - WARN_PRINT("Power management is not implemented on this platform, defaulting to -1"); - return -1; - } -} - -int PowerAndroid::get_power_percent_left() { - if (GetPowerInfo_Android()) { - return percent_left; - } else { - WARN_PRINT("Power management is not implemented on this platform, defaulting to -1"); - return -1; - } -} - -PowerAndroid::PowerAndroid() : - nsecs_left(-1), - percent_left(-1), - power_state(OS::POWERSTATE_UNKNOWN) { -} - -PowerAndroid::~PowerAndroid() { -} diff --git a/platform/haiku/os_haiku.cpp b/platform/haiku/os_haiku.cpp index 2e4bb2ff26..a082ba53f9 100644 --- a/platform/haiku/os_haiku.cpp +++ b/platform/haiku/os_haiku.cpp @@ -360,18 +360,3 @@ String OS_Haiku::get_cache_path() const { return get_config_path(); } } - -OS::PowerState OS_Haiku::get_power_state() { - WARN_PRINT("Power management is not implemented on this platform, defaulting to POWERSTATE_UNKNOWN"); - return OS::POWERSTATE_UNKNOWN; -} - -int OS_Haiku::get_power_seconds_left() { - WARN_PRINT("Power management is not implemented on this platform, defaulting to -1"); - return -1; -} - -int OS_Haiku::get_power_percent_left() { - WARN_PRINT("Power management is not implemented on this platform, defaulting to -1"); - return -1; -} diff --git a/platform/haiku/os_haiku.h b/platform/haiku/os_haiku.h index c99147198d..fc8cb77a91 100644 --- a/platform/haiku/os_haiku.h +++ b/platform/haiku/os_haiku.h @@ -113,10 +113,6 @@ public: virtual void get_fullscreen_mode_list(List<VideoMode> *p_list, int p_screen = 0) const; virtual String get_executable_path() const; - virtual OS::PowerState get_power_state(); - virtual int get_power_seconds_left(); - virtual int get_power_percent_left(); - virtual bool _check_internal_feature_support(const String &p_feature); virtual String get_config_path() const; diff --git a/platform/iphone/SCsub b/platform/iphone/SCsub index fa1b124561..1f82f51888 100644 --- a/platform/iphone/SCsub +++ b/platform/iphone/SCsub @@ -14,6 +14,7 @@ iphone_lib = [ 'in_app_store.mm', 'icloud.mm', 'ios.mm', + 'vulkan_context_iphone.mm', ] env_ios = env.Clone() diff --git a/platform/iphone/app_delegate.h b/platform/iphone/app_delegate.h index b4454aab11..6b3b7ad5bc 100644 --- a/platform/iphone/app_delegate.h +++ b/platform/iphone/app_delegate.h @@ -28,13 +28,20 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ +#if defined(OPENGL_ENABLED) #import "gl_view.h" +#endif #import "view_controller.h" #import <UIKit/UIKit.h> #import <CoreMotion/CoreMotion.h> +#if defined(OPENGL_ENABLED) @interface AppDelegate : NSObject <UIApplicationDelegate, GLViewDelegate> { +#endif +#if defined(VULKAN_ENABLED) +@interface AppDelegate : NSObject <UIApplicationDelegate> { +#endif //@property (strong, nonatomic) UIWindow *window; ViewController *view_controller; bool is_focus_out; diff --git a/platform/iphone/app_delegate.mm b/platform/iphone/app_delegate.mm index 4de321fa04..acc3e5d4e0 100644 --- a/platform/iphone/app_delegate.mm +++ b/platform/iphone/app_delegate.mm @@ -32,7 +32,9 @@ #include "core/project_settings.h" #include "drivers/coreaudio/audio_driver_coreaudio.h" +#if defined(OPENGL_ENABLED) #import "gl_view.h" +#endif #include "main/main.h" #include "os_iphone.h" @@ -412,10 +414,12 @@ static void on_focus_in(ViewController *view_controller, bool *is_focus_out) { OS::VideoMode _get_video_mode() { int backingWidth; int backingHeight; +#if defined(OPENGL_ENABLED) glGetRenderbufferParameterivOES(GL_RENDERBUFFER_OES, GL_RENDERBUFFER_WIDTH_OES, &backingWidth); glGetRenderbufferParameterivOES(GL_RENDERBUFFER_OES, GL_RENDERBUFFER_HEIGHT_OES, &backingHeight); +#endif OS::VideoMode vm; vm.fullscreen = true; @@ -426,7 +430,7 @@ OS::VideoMode _get_video_mode() { }; static int frame_count = 0; -- (void)drawView:(GLView *)view; +- (void)drawView:(UIView *)view; { switch (frame_count) { @@ -634,6 +638,7 @@ static int frame_count = 0; return FALSE; }; +#if defined(OPENGL_ENABLED) // WARNING: We must *always* create the GLView after we have constructed the // OS with iphone_main. This allows the GLView to access project settings so // it can properly initialize the OpenGL context @@ -642,7 +647,7 @@ static int frame_count = 0; view_controller = [[ViewController alloc] init]; view_controller.view = glView; - window.rootViewController = view_controller; + _set_keep_screen_on(bool(GLOBAL_DEF("display/window/energy_saving/keep_screen_on", true)) ? YES : NO); glView.useCADisplayLink = @@ -650,6 +655,13 @@ static int frame_count = 0; printf("cadisaplylink: %d", glView.useCADisplayLink); glView.animationInterval = 1.0 / kRenderingFrequency; [glView startAnimation]; +#endif + +#if defined(VULKAN_ENABLED) + view_controller = [[ViewController alloc] init]; +#endif + + window.rootViewController = view_controller; // Show the window [window makeKeyAndVisible]; diff --git a/platform/iphone/detect.py b/platform/iphone/detect.py index f646b8b1d5..e01950c1db 100644 --- a/platform/iphone/detect.py +++ b/platform/iphone/detect.py @@ -23,6 +23,7 @@ def get_opts(): return [ ('IPHONEPATH', 'Path to iPhone toolchain', '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain'), ('IPHONESDK', 'Path to the iPhone SDK', ''), + BoolVariable('use_static_mvk', 'Link MoltenVK statically as Level-0 driver (better portability) or use Vulkan ICD loader (enables validation layers)', False), BoolVariable('game_center', 'Support for game center', True), BoolVariable('store_kit', 'Support for in-app store', True), BoolVariable('icloud', 'Support for iCloud', True), @@ -149,7 +150,7 @@ def configure(env): '-framework', 'Foundation', '-framework', 'GameController', '-framework', 'MediaPlayer', - '-framework', 'OpenGLES', + '-framework', 'Metal', '-framework', 'QuartzCore', '-framework', 'Security', '-framework', 'SystemConfiguration', @@ -170,11 +171,18 @@ def configure(env): env.Append(CPPDEFINES=['ICLOUD_ENABLED']) env.Prepend(CPPPATH=['$IPHONESDK/usr/include', - '$IPHONESDK/System/Library/Frameworks/OpenGLES.framework/Headers', '$IPHONESDK/System/Library/Frameworks/AudioUnit.framework/Headers', ]) env['ENV']['CODESIGN_ALLOCATE'] = '/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate' env.Prepend(CPPPATH=['#platform/iphone']) - env.Append(CPPDEFINES=['IPHONE_ENABLED', 'UNIX_ENABLED', 'GLES_ENABLED', 'COREAUDIO_ENABLED']) + env.Append(CPPDEFINES=['IPHONE_ENABLED', 'UNIX_ENABLED', 'COREAUDIO_ENABLED']) + + env.Append(CPPDEFINES=['VULKAN_ENABLED']) + env.Append(LINKFLAGS=['-framework', 'IOSurface']) + if (env['use_static_mvk']): + env.Append(LINKFLAGS=['-framework', 'MoltenVK']) + env['builtin_vulkan'] = False + elif not env['builtin_vulkan']: + env.Append(LIBS=['vulkan']) diff --git a/platform/iphone/export/export.cpp b/platform/iphone/export/export.cpp index 0767ce7638..7cef2351e3 100644 --- a/platform/iphone/export/export.cpp +++ b/platform/iphone/export/export.cpp @@ -447,9 +447,6 @@ void EditorExportPlatformIOS::_blend_and_rotate(Ref<Image> &p_dst, Ref<Image> &p ERR_FAIL_COND(p_dst.is_null()); ERR_FAIL_COND(p_src.is_null()); - p_dst->lock(); - p_src->lock(); - int sw = p_rot ? p_src->get_height() : p_src->get_width(); int sh = p_rot ? p_src->get_width() : p_src->get_height(); @@ -473,9 +470,6 @@ void EditorExportPlatformIOS::_blend_and_rotate(Ref<Image> &p_dst, Ref<Image> &p p_dst->set_pixel(x_pos + x, y_pos + y, dc); } } - - p_dst->unlock(); - p_src->unlock(); } struct IconInfo { diff --git a/platform/iphone/game_center.mm b/platform/iphone/game_center.mm index 696f61f954..99d539d4ff 100644 --- a/platform/iphone/game_center.mm +++ b/platform/iphone/game_center.mm @@ -198,11 +198,11 @@ void GameCenter::request_achievement_descriptions() { ret["type"] = "achievement_descriptions"; if (error == nil) { ret["result"] = "ok"; - PoolStringArray names; - PoolStringArray titles; - PoolStringArray unachieved_descriptions; - PoolStringArray achieved_descriptions; - PoolIntArray maximum_points; + PackedStringArray names; + PackedStringArray titles; + PackedStringArray unachieved_descriptions; + PackedStringArray achieved_descriptions; + PackedInt32Array maximum_points; Array hidden; Array replayable; @@ -253,8 +253,8 @@ void GameCenter::request_achievements() { ret["type"] = "achievements"; if (error == nil) { ret["result"] = "ok"; - PoolStringArray names; - PoolRealArray percentages; + PackedStringArray names; + PackedFloat32Array percentages; for (int i = 0; i < [achievements count]; i++) { diff --git a/platform/iphone/icloud.mm b/platform/iphone/icloud.mm index f846043dde..251f78f2da 100644 --- a/platform/iphone/icloud.mm +++ b/platform/iphone/icloud.mm @@ -80,13 +80,13 @@ Variant nsobject_to_variant(NSObject *object) { const char *str = [(NSString *)object UTF8String]; return String::utf8(str != NULL ? str : ""); } else if ([object isKindOfClass:[NSData class]]) { - PoolByteArray ret; + PackedByteArray ret; NSData *data = (NSData *)object; if ([data length] > 0) { ret.resize([data length]); { - PoolByteArray::Write w = ret.write(); - copymem(w.ptr(), [data bytes], [data length]); + // PackedByteArray::Write w = ret.write(); + copymem((void *)ret.ptr(), [data bytes], [data length]); } } return ret; @@ -184,10 +184,10 @@ NSObject *variant_to_nsobject(Variant v) { [result addObject:value]; } return result; - } else if (v.get_type() == Variant::POOL_BYTE_ARRAY) { - PoolByteArray arr = v; - PoolByteArray::Read r = arr.read(); - NSData *result = [NSData dataWithBytes:r.ptr() length:arr.size()]; + } else if (v.get_type() == Variant::PACKED_BYTE_ARRAY) { + PackedByteArray arr = v; + // PackedByteArray::Read r = arr.read(); + NSData *result = [NSData dataWithBytes:arr.ptr() length:arr.size()]; return result; } WARN_PRINT(String("Could not add unsupported type to iCloud: '" + Variant::get_type_name(v.get_type()) + "'").utf8().get_data()); @@ -315,7 +315,7 @@ ICloud::ICloud() { Dictionary ret; ret["type"] = "key_value_changed"; - //PoolStringArray result_keys; + //PackedStringArray result_keys; //Array result_values; Dictionary keyValues; String reason = ""; diff --git a/platform/iphone/in_app_store.mm b/platform/iphone/in_app_store.mm index 855ab195b0..a8a887824f 100644 --- a/platform/iphone/in_app_store.mm +++ b/platform/iphone/in_app_store.mm @@ -85,12 +85,12 @@ void InAppStore::_bind_methods() { Dictionary ret; ret["type"] = "product_info"; ret["result"] = "ok"; - PoolStringArray titles; - PoolStringArray descriptions; - PoolRealArray prices; - PoolStringArray ids; - PoolStringArray localized_prices; - PoolStringArray currency_codes; + PackedStringArray titles; + PackedStringArray descriptions; + PackedFloat32Array prices; + PackedStringArray ids; + PackedStringArray localized_prices; + PackedStringArray currency_codes; for (NSUInteger i = 0; i < [products count]; i++) { @@ -113,7 +113,7 @@ void InAppStore::_bind_methods() { ret["localized_prices"] = localized_prices; ret["currency_codes"] = currency_codes; - PoolStringArray invalid_ids; + PackedStringArray invalid_ids; for (NSString *ipid in response.invalidProductIdentifiers) { @@ -133,7 +133,7 @@ Error InAppStore::request_product_info(Variant p_params) { Dictionary params = p_params; ERR_FAIL_COND_V(!params.has("product_ids"), ERR_INVALID_PARAMETER); - PoolStringArray pids = params["product_ids"]; + PackedStringArray pids = params["product_ids"]; printf("************ request product info! %i\n", pids.size()); NSMutableArray *array = [[[NSMutableArray alloc] initWithCapacity:pids.size()] autorelease]; diff --git a/platform/iphone/os_iphone.cpp b/platform/iphone/os_iphone.cpp index 634062f46b..db203ff2b3 100644 --- a/platform/iphone/os_iphone.cpp +++ b/platform/iphone/os_iphone.cpp @@ -32,7 +32,16 @@ #include "os_iphone.h" +#if defined(OPENGL_ENABLED) #include "drivers/gles2/rasterizer_gles2.h" +#endif + +#if defined(VULKAN_ENABLED) +#include "servers/visual/rasterizer_rd/rasterizer_rd.h" +// #import <QuartzCore/CAMetalLayer.h> +#include <vulkan/vulkan_metal.h> +#endif + #include "servers/visual/visual_server_raster.h" #include "servers/visual/visual_server_wrap_mt.h" @@ -101,7 +110,9 @@ int OSIPhone::get_current_video_driver() const { } Error OSIPhone::initialize(const VideoMode &p_desired, int p_video_driver, int p_audio_driver) { + video_driver_index = p_video_driver; +#if defined(OPENGL_ENABLED) bool gl_initialization_error = false; // FIXME: Add Vulkan support via MoltenVK. Add fallback code back? @@ -118,19 +129,25 @@ Error OSIPhone::initialize(const VideoMode &p_desired, int p_video_driver, int p "Unable to initialize video driver"); return ERR_UNAVAILABLE; } +#endif - video_driver_index = p_video_driver; +#if defined(VULKAN_ENABLED) + RasterizerRD::make_current(); +#endif + + visual_server = memnew(VisualServerRaster); // FIXME: Reimplement threaded rendering if (get_render_thread_mode() != RENDER_THREAD_UNSAFE) { visual_server = memnew(VisualServerWrapMT(visual_server, false)); } - visual_server->init(); //visual_server->cursor_set_visible(false, 0); +#if defined(OPENGL_ENABLED) // reset this to what it should be, it will have been set to 0 after visual_server->init() is called RasterizerStorageGLES2::system_fbo = gl_view_base_fb; +#endif AudioDriverManager::initialize(p_audio_driver); @@ -437,9 +454,10 @@ bool OSIPhone::can_draw() const { }; int OSIPhone::set_base_framebuffer(int p_fb) { - +#if defined(OPENGL_ENABLED) // gl_view_base_fb has not been updated yet RasterizerStorageGLES2::system_fbo = p_fb; +#endif return 0; }; diff --git a/platform/iphone/os_iphone.h b/platform/iphone/os_iphone.h index d2d96181f5..f42679e754 100644 --- a/platform/iphone/os_iphone.h +++ b/platform/iphone/os_iphone.h @@ -46,6 +46,11 @@ #include "servers/visual/rasterizer.h" #include "servers/visual_server.h" +#if defined(VULKAN_ENABLED) +#include "drivers/vulkan/rendering_device_vulkan.h" +#include "platform/iphone/vulkan_context_iphone.h" +#endif + class OSIPhone : public OS_Unix { private: @@ -74,6 +79,10 @@ private: MainLoop *main_loop; +#if defined(VULKAN_ENABLED) + VulkanContextIPhone *context_vulkan; + RenderingDeviceVulkan *rendering_device_vulkan; +#endif VideoMode video_mode; virtual int get_video_driver_count() const; diff --git a/platform/iphone/power_iphone.h b/platform/iphone/vulkan_context_iphone.h index 47a4508509..200057e14d 100644 --- a/platform/iphone/power_iphone.h +++ b/platform/iphone/vulkan_context_iphone.h @@ -1,5 +1,5 @@ /*************************************************************************/ -/* power_iphone.h */ +/* vulkan_context_osx.h */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ @@ -28,26 +28,21 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -#ifndef POWER_IPHONE_H -#define POWER_IPHONE_H +#ifndef VULKAN_CONTEXT_IPHONE_H +#define VULKAN_CONTEXT_IPHONE_H -#include <os/os.h> +#include "drivers/vulkan/vulkan_context.h" +// #import <UIKit/UIKit.h> -class PowerIphone { -private: - int nsecs_left; - int percent_left; - OS::PowerState power_state; +class VulkanContextIPhone : public VulkanContext { - bool UpdatePowerInfo(); + virtual const char *_get_platform_surface_extension() const; public: - PowerIphone(); - virtual ~PowerIphone(); + int window_create(void *p_window, int p_width, int p_height); - OS::PowerState get_power_state(); - int get_power_seconds_left(); - int get_power_percent_left(); + VulkanContextIPhone(); + ~VulkanContextIPhone(); }; -#endif // POWER_IPHONE_H +#endif // VULKAN_CONTEXT_IPHONE_H diff --git a/platform/iphone/power_iphone.cpp b/platform/iphone/vulkan_context_iphone.mm index 36bac8da38..f49b85c097 100644 --- a/platform/iphone/power_iphone.cpp +++ b/platform/iphone/vulkan_context_iphone.mm @@ -1,5 +1,5 @@ /*************************************************************************/ -/* power_iphone.cpp */ +/* vulkan_context_osx.mm */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ @@ -28,43 +28,29 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -#include "power_iphone.h" +#include "vulkan_context_iphone.h" +#include <vulkan/vulkan_ios.h> -bool PowerIphone::UpdatePowerInfo() { - return false; +const char *VulkanContextIPhone::_get_platform_surface_extension() const { + return VK_MVK_IOS_SURFACE_EXTENSION_NAME; } -OS::PowerState PowerIphone::get_power_state() { - if (UpdatePowerInfo()) { - return power_state; - } else { - return OS::POWERSTATE_UNKNOWN; - } -} +int VulkanContextIPhone::window_create(void *p_window, int p_width, int p_height) { -int PowerIphone::get_power_seconds_left() { - if (UpdatePowerInfo()) { - return nsecs_left; - } else { - return -1; - } -} + VkIOSSurfaceCreateInfoMVK createInfo; + createInfo.sType = VK_STRUCTURE_TYPE_MACOS_SURFACE_CREATE_INFO_MVK; + createInfo.pNext = NULL; + createInfo.flags = 0; + createInfo.pView = p_window; -int PowerIphone::get_power_percent_left() { - if (UpdatePowerInfo()) { - return percent_left; - } else { - return -1; - } + VkSurfaceKHR surface; + VkResult err = vkCreateIOSSurfaceMVK(_get_instance(), &createInfo, NULL, &surface); + ERR_FAIL_COND_V(err, -1); + return _window_create(surface, p_width, p_height); } -PowerIphone::PowerIphone() : - nsecs_left(-1), - percent_left(-1), - power_state(OS::POWERSTATE_UNKNOWN) { - // TODO Auto-generated constructor stub +VulkanContextIPhone::VulkanContextIPhone() { } -PowerIphone::~PowerIphone() { - // TODO Auto-generated destructor stub +VulkanContextIPhone::~VulkanContextIPhone() { } diff --git a/platform/javascript/http_client_javascript.cpp b/platform/javascript/http_client_javascript.cpp index 2c2511a3a5..d7796cc4f4 100644 --- a/platform/javascript/http_client_javascript.cpp +++ b/platform/javascript/http_client_javascript.cpp @@ -103,12 +103,12 @@ Error HTTPClient::prepare_request(Method p_method, const String &p_url, const Ve return OK; } -Error HTTPClient::request_raw(Method p_method, const String &p_url, const Vector<String> &p_headers, const PoolVector<uint8_t> &p_body) { +Error HTTPClient::request_raw(Method p_method, const String &p_url, const Vector<String> &p_headers, const Vector<uint8_t> &p_body) { Error err = prepare_request(p_method, p_url, p_headers); if (err != OK) return err; - PoolByteArray::Read read = p_body.read(); + const uint8_t *read = p_body.ptr(); godot_xhr_send_data(xhr_id, read.ptr(), p_body.size()); return OK; } @@ -173,18 +173,18 @@ int HTTPClient::get_response_body_length() const { return polled_response.size(); } -PoolByteArray HTTPClient::read_response_body_chunk() { +PackedByteArray HTTPClient::read_response_body_chunk() { - ERR_FAIL_COND_V(status != STATUS_BODY, PoolByteArray()); + ERR_FAIL_COND_V(status != STATUS_BODY, PackedByteArray()); int to_read = MIN(read_limit, polled_response.size() - response_read_offset); - PoolByteArray chunk; + PackedByteArray chunk; chunk.resize(to_read); - PoolByteArray::Write write = chunk.write(); - PoolByteArray::Read read = polled_response.read(); + uint8_t *write = chunk.ptrw(); + const uint8_t *read = polled_response.ptr(); memcpy(write.ptr(), read.ptr() + response_read_offset, to_read); - write = PoolByteArray::Write(); - read = PoolByteArray::Read(); + write = uint8_t * (); + read = const uint8_t * (); response_read_offset += to_read; if (response_read_offset == polled_response.size()) { @@ -263,23 +263,23 @@ Error HTTPClient::poll() { status = STATUS_BODY; - PoolByteArray bytes; + PackedByteArray bytes; int len = godot_xhr_get_response_headers_length(xhr_id); bytes.resize(len + 1); - PoolByteArray::Write write = bytes.write(); + uint8_t *write = bytes.ptrw(); godot_xhr_get_response_headers(xhr_id, reinterpret_cast<char *>(write.ptr()), len); write[len] = 0; - write = PoolByteArray::Write(); + write = uint8_t * (); - PoolByteArray::Read read = bytes.read(); + const uint8_t *read = bytes.ptr(); polled_response_header = String::utf8(reinterpret_cast<const char *>(read.ptr())); - read = PoolByteArray::Read(); + read = const uint8_t * (); polled_response.resize(godot_xhr_get_response_length(xhr_id)); - write = polled_response.write(); + write = polled_response.ptrw(); godot_xhr_get_response(xhr_id, write.ptr(), polled_response.size()); - write = PoolByteArray::Write(); + write = uint8_t * (); break; } diff --git a/platform/javascript/javascript_eval.cpp b/platform/javascript/javascript_eval.cpp index d907222d24..44cce28d57 100644 --- a/platform/javascript/javascript_eval.cpp +++ b/platform/javascript/javascript_eval.cpp @@ -33,7 +33,7 @@ #include "api/javascript_eval.h" #include "emscripten.h" -extern "C" EMSCRIPTEN_KEEPALIVE uint8_t *resize_poolbytearray_and_open_write(PoolByteArray *p_arr, PoolByteArray::Write *r_write, int p_len) { +extern "C" EMSCRIPTEN_KEEPALIVE uint8_t *resize_PackedByteArray_and_open_write(PackedByteArray *p_arr, uint8_t **r_write, int p_len) { p_arr->resize(p_len); *r_write = p_arr->write(); @@ -48,8 +48,8 @@ Variant JavaScript::eval(const String &p_code, bool p_use_global_exec_context) { char *s; } js_data; - PoolByteArray arr; - PoolByteArray::Write arr_write; + PackedByteArray arr; + uint8_t *arr_write; /* clang-format off */ Variant::Type return_type = static_cast<Variant::Type>(EM_ASM_INT({ @@ -81,7 +81,7 @@ Variant JavaScript::eval(const String &p_code, bool p_use_global_exec_context) { case 'number': setValue(PTR, eval_ret, 'double'); - return 3; // REAL + return 3; // FLOAT case 'string': var array_len = lengthBytesUTF8(eval_ret)+1; @@ -114,9 +114,9 @@ Variant JavaScript::eval(const String &p_code, bool p_use_global_exec_context) { eval_ret = new Uint8Array(eval_ret); } if (eval_ret instanceof Uint8Array) { - var bytes_ptr = ccall('resize_poolbytearray_and_open_write', 'number', ['number', 'number' ,'number'], [BYTEARRAY_PTR, BYTEARRAY_WRITE_PTR, eval_ret.length]); + var bytes_ptr = ccall('resize_PackedByteArray_and_open_write', 'number', ['number', 'number' ,'number'], [BYTEARRAY_PTR, BYTEARRAY_WRITE_PTR, eval_ret.length]); HEAPU8.set(eval_ret, bytes_ptr); - return 20; // POOL_BYTE_ARRAY + return 20; // PACKED_BYTE_ARRAY } break; } @@ -128,7 +128,7 @@ Variant JavaScript::eval(const String &p_code, bool p_use_global_exec_context) { switch (return_type) { case Variant::BOOL: return js_data.b; - case Variant::REAL: + case Variant::FLOAT: return js_data.d; case Variant::STRING: { String str = String::utf8(js_data.s); @@ -137,8 +137,8 @@ Variant JavaScript::eval(const String &p_code, bool p_use_global_exec_context) { /* clang-format on */ return str; } - case Variant::POOL_BYTE_ARRAY: - arr_write = PoolByteArray::Write(); + case Variant::PACKED_BYTE_ARRAY: + arr_write = uint8_t * (); return arr; default: return Variant(); diff --git a/platform/javascript/os_javascript.cpp b/platform/javascript/os_javascript.cpp index d22e53e7ea..5acdc5f602 100644 --- a/platform/javascript/os_javascript.cpp +++ b/platform/javascript/os_javascript.cpp @@ -536,17 +536,17 @@ void OS_JavaScript::set_custom_mouse_cursor(const RES &p_cursor, CursorShape p_s png_meta.height = texture_size.height; png_meta.format = PNG_FORMAT_RGBA; - PoolByteArray png; + PackedByteArray png; size_t len; - PoolByteArray::Read r = image->get_data().read(); + const uint8_t *r = image->get_data().ptr(); ERR_FAIL_COND(!png_image_write_get_memory_size(png_meta, len, 0, r.ptr(), 0, NULL)); png.resize(len); - PoolByteArray::Write w = png.write(); + uint8_t *w = png.ptrw(); ERR_FAIL_COND(!png_image_write_to_memory(&png_meta, w.ptr(), &len, 0, r.ptr(), 0, NULL)); - w = PoolByteArray::Write(); + w = uint8_t * (); - r = png.read(); + r = png.ptr(); char *object_url; /* clang-format off */ @@ -563,7 +563,7 @@ void OS_JavaScript::set_custom_mouse_cursor(const RES &p_cursor, CursorShape p_s stringToUTF8(url, string_on_wasm_heap, length_bytes); }, r.ptr(), len, &object_url); /* clang-format on */ - r = PoolByteArray::Read(); + r = const uint8_t * (); String url = String::utf8(object_url) + "?" + itos(p_hotspot.x) + " " + itos(p_hotspot.y); @@ -1178,17 +1178,17 @@ void OS_JavaScript::set_icon(const Ref<Image> &p_icon) { png_meta.height = icon->get_height(); png_meta.format = PNG_FORMAT_RGBA; - PoolByteArray png; + PackedByteArray png; size_t len; - PoolByteArray::Read r = icon->get_data().read(); + const uint8_t *r = icon->get_data().ptr(); ERR_FAIL_COND(!png_image_write_get_memory_size(png_meta, len, 0, r.ptr(), 0, NULL)); png.resize(len); - PoolByteArray::Write w = png.write(); + uint8_t *w = png.ptrw(); ERR_FAIL_COND(!png_image_write_to_memory(&png_meta, w.ptr(), &len, 0, r.ptr(), 0, NULL)); - w = PoolByteArray::Write(); + w = uint8_t * (); - r = png.read(); + r = png.ptr(); /* clang-format off */ EM_ASM_ARGS({ var PNG_PTR = $0; @@ -1244,24 +1244,6 @@ String OS_JavaScript::get_resource_dir() const { return "/"; } -OS::PowerState OS_JavaScript::get_power_state() { - - WARN_PRINT("Power management is not supported for the HTML5 platform, defaulting to POWERSTATE_UNKNOWN"); - return OS::POWERSTATE_UNKNOWN; -} - -int OS_JavaScript::get_power_seconds_left() { - - WARN_PRINT("Power management is not supported for the HTML5 platform, defaulting to -1"); - return -1; -} - -int OS_JavaScript::get_power_percent_left() { - - WARN_PRINT("Power management is not supported for the HTML5 platform, defaulting to -1"); - return -1; -} - void OS_JavaScript::file_access_close_callback(const String &p_file, int p_flags) { OS_JavaScript *os = get_singleton(); diff --git a/platform/javascript/os_javascript.h b/platform/javascript/os_javascript.h index 65a18830ed..5319ea121c 100644 --- a/platform/javascript/os_javascript.h +++ b/platform/javascript/os_javascript.h @@ -160,10 +160,6 @@ public: virtual String get_resource_dir() const; virtual String get_user_data_dir() const; - virtual OS::PowerState get_power_state(); - virtual int get_power_seconds_left(); - virtual int get_power_percent_left(); - void set_idb_available(bool p_idb_available); virtual bool is_userfs_persistent() const; diff --git a/platform/osx/SCsub b/platform/osx/SCsub index 09f213cb0e..d764ac4b50 100644 --- a/platform/osx/SCsub +++ b/platform/osx/SCsub @@ -12,7 +12,6 @@ files = [ 'semaphore_osx.cpp', 'dir_access_osx.mm', 'joypad_osx.cpp', - 'power_osx.cpp', 'vulkan_context_osx.mm', 'context_gl_osx.mm' ] diff --git a/platform/osx/detect.py b/platform/osx/detect.py index 0b164a2c56..12ca5c10dc 100644 --- a/platform/osx/detect.py +++ b/platform/osx/detect.py @@ -164,5 +164,5 @@ def configure(env): #env.Append(CPPDEFINES=['GLES_ENABLED', 'OPENGL_ENABLED']) - env.Append(CCFLAGS=['-mmacosx-version-min=10.11']) - env.Append(LINKFLAGS=['-mmacosx-version-min=10.11']) + env.Append(CCFLAGS=['-mmacosx-version-min=10.12']) + env.Append(LINKFLAGS=['-mmacosx-version-min=10.12']) diff --git a/platform/osx/export/export.cpp b/platform/osx/export/export.cpp index 312987b8cb..dbe52da912 100644 --- a/platform/osx/export/export.cpp +++ b/platform/osx/export/export.cpp @@ -139,7 +139,7 @@ void EditorExportPlatformOSX::get_export_options(List<ExportOption> *r_options) r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "codesign/timestamp"), true)); r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "codesign/hardened_runtime"), true)); r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "codesign/entitlements", PROPERTY_HINT_GLOBAL_FILE, "*.plist"), "")); - r_options->push_back(ExportOption(PropertyInfo(Variant::POOL_STRING_ARRAY, "codesign/custom_options"), PoolStringArray())); + r_options->push_back(ExportOption(PropertyInfo(Variant::PACKED_STRING_ARRAY, "codesign/custom_options"), PackedStringArray())); #endif r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "texture_format/s3tc"), true)); @@ -147,7 +147,7 @@ void EditorExportPlatformOSX::get_export_options(List<ExportOption> *r_options) r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "texture_format/etc2"), false)); } -void _rgba8_to_packbits_encode(int p_ch, int p_size, PoolVector<uint8_t> &p_source, Vector<uint8_t> &p_dest) { +void _rgba8_to_packbits_encode(int p_ch, int p_size, Vector<uint8_t> &p_source, Vector<uint8_t> &p_dest) { int src_len = p_size * p_size; @@ -160,11 +160,11 @@ void _rgba8_to_packbits_encode(int p_ch, int p_size, PoolVector<uint8_t> &p_sour int i = 0; while (i < src_len) { - uint8_t cur = p_source.read()[i * 4 + p_ch]; + uint8_t cur = p_source.ptr()[i * 4 + p_ch]; if (i < src_len - 2) { - if ((p_source.read()[(i + 1) * 4 + p_ch] == cur) && (p_source.read()[(i + 2) * 4 + p_ch] == cur)) { + if ((p_source.ptr()[(i + 1) * 4 + p_ch] == cur) && (p_source.ptr()[(i + 2) * 4 + p_ch] == cur)) { if (buf_size > 0) { result.write[res_size++] = (uint8_t)(buf_size - 1); copymem(&result.write[res_size], &buf, buf_size); @@ -176,7 +176,7 @@ void _rgba8_to_packbits_encode(int p_ch, int p_size, PoolVector<uint8_t> &p_sour bool hit_lim = true; for (int j = 3; j <= lim; j++) { - if (p_source.read()[(i + j) * 4 + p_ch] != cur) { + if (p_source.ptr()[(i + j) * 4 + p_ch] != cur) { hit_lim = false; i = i + j - 1; result.write[res_size++] = (uint8_t)(j - 3 + 0x80); @@ -278,7 +278,7 @@ void EditorExportPlatformOSX::_make_icon(const Ref<Image> &p_icon, Vector<uint8_ DirAccess::remove_file_or_error(path); } else { - PoolVector<uint8_t> src_data = copy->get_data(); + Vector<uint8_t> src_data = copy->get_data(); //encode 24bit RGB RLE icon { @@ -302,7 +302,7 @@ void EditorExportPlatformOSX::_make_icon(const Ref<Image> &p_icon, Vector<uint8_ data.resize(data.size() + len + 8); for (int j = 0; j < len; j++) { - data.write[ofs + 8 + j] = src_data.read()[j * 4 + 3]; + data.write[ofs + 8 + j] = src_data.ptr()[j * 4 + 3]; } len += 8; len = BSWAP32(len); @@ -386,7 +386,7 @@ Error EditorExportPlatformOSX::_code_sign(const Ref<EditorExportPreset> &p_prese args.push_back(p_preset->get("codesign/entitlements")); } - PoolStringArray user_args = p_preset->get("codesign/custom_options"); + PackedStringArray user_args = p_preset->get("codesign/custom_options"); for (int i = 0; i < user_args.size(); i++) { String user_arg = user_args[i].strip_edges(); if (!user_arg.empty()) { diff --git a/platform/osx/os_osx.h b/platform/osx/os_osx.h index bfd13be43a..75a56bd82c 100644 --- a/platform/osx/os_osx.h +++ b/platform/osx/os_osx.h @@ -40,7 +40,6 @@ #include "drivers/unix/os_unix.h" #include "joypad_osx.h" #include "main/input_default.h" -#include "power_osx.h" #include "servers/audio_server.h" #include "servers/visual/rasterizer.h" #include "servers/visual/visual_server_wrap_mt.h" @@ -147,8 +146,6 @@ public: Size2 min_size; Size2 max_size; - PowerOSX *power_manager; - CrashHandler crash_handler; float _mouse_scale(float p_scale) { @@ -304,10 +301,6 @@ public: virtual String get_unique_id() const; - virtual OS::PowerState get_power_state(); - virtual int get_power_seconds_left(); - virtual int get_power_percent_left(); - virtual bool _check_internal_feature_support(const String &p_feature); virtual void _set_use_vsync(bool p_enable); diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm index 87ab8b3420..f2e5f9369c 100644 --- a/platform/osx/os_osx.mm +++ b/platform/osx/os_osx.mm @@ -747,7 +747,7 @@ static void _mouseDownEvent(NSEvent *event, int index, int mask, bool pressed) { const Vector2 pos = get_mouse_pos([event locationInWindow], backingScaleFactor); mm->set_position(pos); mm->set_pressure([event pressure]); - if ([event subtype] == NSTabletPointEventSubtype) { + if ([event subtype] == NSEventSubtypeTabletPoint) { const NSPoint p = [event tilt]; mm->set_tilt(Vector2(p.x, p.y)); } @@ -1628,8 +1628,6 @@ Error OS_OSX::initialize(const VideoMode &p_desired, int p_video_driver, int p_a input = memnew(InputDefault); joypad_osx = memnew(JoypadOSX); - power_manager = memnew(PowerOSX); - _ensure_user_data_dir(); restore_rect = Rect2(get_window_position(), get_window_size()); @@ -1759,7 +1757,7 @@ void OS_OSX::alert(const String &p_alert, const String &p_title) { [window addButtonWithTitle:@"OK"]; [window setMessageText:ns_title]; [window setInformativeText:ns_alert]; - [window setAlertStyle:NSWarningAlertStyle]; + [window setAlertStyle:NSAlertStyleWarning]; // Display it, then release [window runModal]; @@ -1894,10 +1892,6 @@ void OS_OSX::set_custom_mouse_cursor(const RES &p_cursor, CursorShape p_shape, c uint8_t *pixels = [imgrep bitmapData]; int len = int(texture_size.width * texture_size.height); - PoolVector<uint8_t> data = image->get_data(); - PoolVector<uint8_t>::Read r = data.read(); - - image->lock(); for (int i = 0; i < len; i++) { int row_index = floor(i / texture_size.width) + atlas_rect.position.y; @@ -1917,8 +1911,6 @@ void OS_OSX::set_custom_mouse_cursor(const RES &p_cursor, CursorShape p_shape, c pixels[i * 4 + 3] = alpha; } - image->unlock(); - NSImage *nsimage = [[NSImage alloc] initWithSize:NSMakeSize(texture_size.width, texture_size.height)]; [nsimage addRepresentation:imgrep]; @@ -2053,8 +2045,7 @@ void OS_OSX::set_icon(const Ref<Image> &p_icon) { uint8_t *pixels = [imgrep bitmapData]; int len = img->get_width() * img->get_height(); - PoolVector<uint8_t> data = img->get_data(); - PoolVector<uint8_t>::Read r = data.read(); + const uint8_t *r = img->get_data().ptr(); /* Premultiply the alpha channel */ for (int i = 0; i < len; i++) { @@ -2973,18 +2964,6 @@ String OS_OSX::get_joy_guid(int p_device) const { return input->get_joy_guid_remapped(p_device); } -OS::PowerState OS_OSX::get_power_state() { - return power_manager->get_power_state(); -} - -int OS_OSX::get_power_seconds_left() { - return power_manager->get_power_seconds_left(); -} - -int OS_OSX::get_power_percent_left() { - return power_manager->get_power_percent_left(); -} - Error OS_OSX::move_to_trash(const String &p_path) { NSFileManager *fm = [NSFileManager defaultManager]; NSURL *url = [NSURL fileURLWithPath:@(p_path.utf8().get_data())]; diff --git a/platform/osx/power_osx.cpp b/platform/osx/power_osx.cpp deleted file mode 100644 index 6d7667c5e8..0000000000 --- a/platform/osx/power_osx.cpp +++ /dev/null @@ -1,252 +0,0 @@ -/*************************************************************************/ -/* power_osx.cpp */ -/*************************************************************************/ -/* This file is part of: */ -/* GODOT ENGINE */ -/* https://godotengine.org */ -/*************************************************************************/ -/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */ -/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */ -/* */ -/* Permission is hereby granted, free of charge, to any person obtaining */ -/* a copy of this software and associated documentation files (the */ -/* "Software"), to deal in the Software without restriction, including */ -/* without limitation the rights to use, copy, modify, merge, publish, */ -/* distribute, sublicense, and/or sell copies of the Software, and to */ -/* permit persons to whom the Software is furnished to do so, subject to */ -/* the following conditions: */ -/* */ -/* The above copyright notice and this permission notice shall be */ -/* included in all copies or substantial portions of the Software. */ -/* */ -/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ -/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ -/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ -/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ -/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ -/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ -/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -/*************************************************************************/ - -/* -Adapted from corresponding SDL 2.0 code. -*/ - -/* - Simple DirectMedia Layer - Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org> - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. -*/ - -#include "power_osx.h" - -#include <CoreFoundation/CoreFoundation.h> -#include <IOKit/ps/IOPSKeys.h> -#include <IOKit/ps/IOPowerSources.h> - -// CODE CHUNK IMPORTED FROM SDL 2.0 - -/* CoreFoundation is so verbose... */ -#define STRMATCH(a, b) (CFStringCompare(a, b, 0) == kCFCompareEqualTo) -#define GETVAL(k, v) \ - CFDictionaryGetValueIfPresent(dict, CFSTR(k), (const void **)v) - -/* Note that AC power sources also include a laptop battery it is charging. */ -void PowerOSX::checkps(CFDictionaryRef dict, bool *have_ac, bool *have_battery, bool *charging) { - CFStringRef strval; /* don't CFRelease() this. */ - CFBooleanRef bval; - CFNumberRef numval; - bool charge = false; - bool choose = false; - bool is_ac = false; - int secs = -1; - int maxpct = -1; - int pct = -1; - - if ((GETVAL(kIOPSIsPresentKey, &bval)) && (bval == kCFBooleanFalse)) { - return; /* nothing to see here. */ - } - - if (!GETVAL(kIOPSPowerSourceStateKey, &strval)) { - return; - } - - if (STRMATCH(strval, CFSTR(kIOPSACPowerValue))) { - is_ac = *have_ac = true; - } else if (!STRMATCH(strval, CFSTR(kIOPSBatteryPowerValue))) { - return; /* not a battery? */ - } - - if ((GETVAL(kIOPSIsChargingKey, &bval)) && (bval == kCFBooleanTrue)) { - charge = true; - } - - if (GETVAL(kIOPSMaxCapacityKey, &numval)) { - SInt32 val = -1; - CFNumberGetValue(numval, kCFNumberSInt32Type, &val); - if (val > 0) { - *have_battery = true; - maxpct = (int)val; - } - } - - if (GETVAL(kIOPSMaxCapacityKey, &numval)) { - SInt32 val = -1; - CFNumberGetValue(numval, kCFNumberSInt32Type, &val); - if (val > 0) { - *have_battery = true; - maxpct = (int)val; - } - } - - if (GETVAL(kIOPSTimeToEmptyKey, &numval)) { - SInt32 val = -1; - CFNumberGetValue(numval, kCFNumberSInt32Type, &val); - - /* Mac OS X reports 0 minutes until empty if you're plugged in. :( */ - if ((val == 0) && (is_ac)) { - val = -1; /* !!! FIXME: calc from timeToFull and capacity? */ - } - - secs = (int)val; - if (secs > 0) { - secs *= 60; /* value is in minutes, so convert to seconds. */ - } - } - - if (GETVAL(kIOPSCurrentCapacityKey, &numval)) { - SInt32 val = -1; - CFNumberGetValue(numval, kCFNumberSInt32Type, &val); - pct = (int)val; - } - - if ((pct > 0) && (maxpct > 0)) { - pct = (int)((((double)pct) / ((double)maxpct)) * 100.0); - } - - if (pct > 100) { - pct = 100; - } - - /* - * We pick the battery that claims to have the most minutes left. - * (failing a report of minutes, we'll take the highest percent.) - */ - if ((secs < 0) && (nsecs_left < 0)) { - if ((pct < 0) && (percent_left < 0)) { - choose = true; /* at least we know there's a battery. */ - } - if (pct > percent_left) { - choose = true; - } - } else if (secs > nsecs_left) { - choose = true; - } - - if (choose) { - nsecs_left = secs; - percent_left = pct; - *charging = charge; - } -} - -#undef GETVAL -#undef STRMATCH - -// CODE CHUNK IMPORTED FROM SDL 2.0 -bool PowerOSX::GetPowerInfo_MacOSX() { - CFTypeRef blob = IOPSCopyPowerSourcesInfo(); - - nsecs_left = -1; - percent_left = -1; - power_state = OS::POWERSTATE_UNKNOWN; - - if (blob != NULL) { - CFArrayRef list = IOPSCopyPowerSourcesList(blob); - if (list != NULL) { - /* don't CFRelease() the list items, or dictionaries! */ - bool have_ac = false; - bool have_battery = false; - bool charging = false; - const CFIndex total = CFArrayGetCount(list); - CFIndex i; - for (i = 0; i < total; i++) { - CFTypeRef ps = (CFTypeRef)CFArrayGetValueAtIndex(list, i); - CFDictionaryRef dict = IOPSGetPowerSourceDescription(blob, ps); - if (dict != NULL) { - checkps(dict, &have_ac, &have_battery, &charging); - } - } - - if (!have_battery) { - power_state = OS::POWERSTATE_NO_BATTERY; - } else if (charging) { - power_state = OS::POWERSTATE_CHARGING; - } else if (have_ac) { - power_state = OS::POWERSTATE_CHARGED; - } else { - power_state = OS::POWERSTATE_ON_BATTERY; - } - - CFRelease(list); - } - CFRelease(blob); - } - - return true; /* always the definitive answer on Mac OS X. */ -} - -bool PowerOSX::UpdatePowerInfo() { - if (GetPowerInfo_MacOSX()) { - return true; - } - return false; -} - -OS::PowerState PowerOSX::get_power_state() { - if (UpdatePowerInfo()) { - return power_state; - } else { - return OS::POWERSTATE_UNKNOWN; - } -} - -int PowerOSX::get_power_seconds_left() { - if (UpdatePowerInfo()) { - return nsecs_left; - } else { - return -1; - } -} - -int PowerOSX::get_power_percent_left() { - if (UpdatePowerInfo()) { - return percent_left; - } else { - return -1; - } -} - -PowerOSX::PowerOSX() : - nsecs_left(-1), - percent_left(-1), - power_state(OS::POWERSTATE_UNKNOWN) { -} - -PowerOSX::~PowerOSX() { -} diff --git a/platform/server/SCsub b/platform/server/SCsub index f977275595..e8538f03a6 100644 --- a/platform/server/SCsub +++ b/platform/server/SCsub @@ -10,10 +10,8 @@ common_server = [\ if sys.platform == "darwin": common_server.append("#platform/osx/crash_handler_osx.mm") - common_server.append("#platform/osx/power_osx.cpp") common_server.append("#platform/osx/semaphore_osx.cpp") else: common_server.append("#platform/x11/crash_handler_x11.cpp") - common_server.append("#platform/x11/power_x11.cpp") prog = env.add_program('#bin/godot_server', ['godot_server.cpp'] + common_server) diff --git a/platform/server/detect.py b/platform/server/detect.py index d82df77957..ef94dc436c 100644 --- a/platform/server/detect.py +++ b/platform/server/detect.py @@ -32,6 +32,7 @@ def get_opts(): return [ BoolVariable('use_llvm', 'Use the LLVM compiler', False), BoolVariable('use_static_cpp', 'Link libgcc and libstdc++ statically for better portability', False), + BoolVariable('use_coverage', 'Test Godot coverage', False), BoolVariable('use_ubsan', 'Use LLVM/GCC compiler undefined behavior sanitizer (UBSAN)', False), BoolVariable('use_asan', 'Use LLVM/GCC compiler address sanitizer (ASAN))', False), BoolVariable('use_lsan', 'Use LLVM/GCC compiler leak sanitizer (LSAN))', False), @@ -99,6 +100,9 @@ def configure(env): env.Append(CPPDEFINES=['TYPED_METHOD_BIND']) env.extra_suffix = ".llvm" + env.extra_suffix + if env['use_coverage']: + env.Append(CCFLAGS=['-ftest-coverage', '-fprofile-arcs']) + env.Append(LINKFLAGS=['-ftest-coverage', '-fprofile-arcs']) if env['use_ubsan'] or env['use_asan'] or env['use_lsan'] or env['use_tsan']: env.extra_suffix += "s" diff --git a/platform/server/os_server.cpp b/platform/server/os_server.cpp index 498fd01b5e..8a66332ff1 100644 --- a/platform/server/os_server.cpp +++ b/platform/server/os_server.cpp @@ -31,7 +31,6 @@ #include "os_server.h" #include "core/print_string.h" -#include "drivers/dummy/audio_driver_dummy.h" #include "drivers/dummy/rasterizer_dummy.h" #include "drivers/dummy/texture_loader_dummy.h" #include "servers/visual/visual_server_raster.h" @@ -92,12 +91,6 @@ Error OS_Server::initialize(const VideoMode &p_desired, int p_video_driver, int input = memnew(InputDefault); -#ifdef __APPLE__ - power_manager = memnew(PowerOSX); -#else - power_manager = memnew(PowerX11); -#endif - _ensure_user_data_dir(); resource_loader_dummy.instance(); @@ -117,8 +110,6 @@ void OS_Server::finalize() { memdelete(input); - memdelete(power_manager); - ResourceLoader::remove_resource_format_loader(resource_loader_dummy); resource_loader_dummy.unref(); @@ -198,18 +189,6 @@ String OS_Server::get_name() const { void OS_Server::move_window_to_foreground() { } -OS::PowerState OS_Server::get_power_state() { - return power_manager->get_power_state(); -} - -int OS_Server::get_power_seconds_left() { - return power_manager->get_power_seconds_left(); -} - -int OS_Server::get_power_percent_left() { - return power_manager->get_power_percent_left(); -} - bool OS_Server::_check_internal_feature_support(const String &p_feature) { return p_feature == "pc"; } diff --git a/platform/server/os_server.h b/platform/server/os_server.h index 46ca9cb6d1..7584293722 100644 --- a/platform/server/os_server.h +++ b/platform/server/os_server.h @@ -36,11 +36,9 @@ #include "main/input_default.h" #ifdef __APPLE__ #include "platform/osx/crash_handler_osx.h" -#include "platform/osx/power_osx.h" #include "platform/osx/semaphore_osx.h" #else #include "platform/x11/crash_handler_x11.h" -#include "platform/x11/power_x11.h" #endif #include "servers/audio_server.h" #include "servers/visual/rasterizer.h" @@ -63,12 +61,6 @@ class OS_Server : public OS_Unix { InputDefault *input; -#ifdef __APPLE__ - PowerOSX *power_manager; -#else - PowerX11 *power_manager; -#endif - CrashHandler crash_handler; int video_driver_index; @@ -112,9 +104,6 @@ public: void run(); - virtual OS::PowerState get_power_state(); - virtual int get_power_seconds_left(); - virtual int get_power_percent_left(); virtual bool _check_internal_feature_support(const String &p_feature); virtual String get_config_path() const; diff --git a/platform/uwp/SCsub b/platform/uwp/SCsub index c14290f0c4..620d8c3c3a 100644 --- a/platform/uwp/SCsub +++ b/platform/uwp/SCsub @@ -7,7 +7,6 @@ files = [ '#platform/windows/key_mapping_windows.cpp', '#platform/windows/windows_terminal_logger.cpp', 'joypad_uwp.cpp', - 'power_uwp.cpp', 'context_egl_uwp.cpp', 'app.cpp', 'os_uwp.cpp', diff --git a/platform/uwp/os_uwp.cpp b/platform/uwp/os_uwp.cpp index 9748c1ef9f..3cd7a02a94 100644 --- a/platform/uwp/os_uwp.cpp +++ b/platform/uwp/os_uwp.cpp @@ -271,8 +271,6 @@ Error OS_UWP::initialize(const VideoMode &p_desired, int p_video_driver, int p_a AudioDriverManager::initialize(p_audio_driver); - power_manager = memnew(PowerUWP); - managed_object->update_clipboard(); Clipboard::ContentChanged += ref new EventHandler<Platform::Object ^>(managed_object, &ManagedType::on_clipboard_changed); @@ -854,18 +852,6 @@ bool OS_UWP::_check_internal_feature_support(const String &p_feature) { return p_feature == "pc"; } -OS::PowerState OS_UWP::get_power_state() { - return power_manager->get_power_state(); -} - -int OS_UWP::get_power_seconds_left() { - return power_manager->get_power_seconds_left(); -} - -int OS_UWP::get_power_percent_left() { - return power_manager->get_power_percent_left(); -} - OS_UWP::OS_UWP() { key_event_pos = 0; diff --git a/platform/uwp/os_uwp.h b/platform/uwp/os_uwp.h index fb43ab382e..32b899c0da 100644 --- a/platform/uwp/os_uwp.h +++ b/platform/uwp/os_uwp.h @@ -39,7 +39,6 @@ #include "drivers/xaudio2/audio_driver_xaudio2.h" #include "joypad_uwp.h" #include "main/input_default.h" -#include "power_uwp.h" #include "servers/audio_server.h" #include "servers/visual/rasterizer.h" #include "servers/visual_server.h" @@ -102,8 +101,6 @@ private: AudioDriverXAudio2 audio_driver; - PowerUWP *power_manager; - MouseMode mouse_mode; bool alt_mem; bool gr_mem; @@ -254,10 +251,6 @@ public: void input_event(const Ref<InputEvent> &p_event); - virtual OS::PowerState get_power_state(); - virtual int get_power_seconds_left(); - virtual int get_power_percent_left(); - void queue_key_event(KeyEvent &p_event); OS_UWP(); diff --git a/platform/windows/SCsub b/platform/windows/SCsub index 6f01460025..8e94c7b35d 100644 --- a/platform/windows/SCsub +++ b/platform/windows/SCsub @@ -12,7 +12,6 @@ common_win = [ "os_windows.cpp", "key_mapping_windows.cpp", "joypad_windows.cpp", - "power_windows.cpp", "windows_terminal_logger.cpp", "vulkan_context_win.cpp", "context_gl_windows.cpp" diff --git a/platform/windows/export/export.cpp b/platform/windows/export/export.cpp index 31501c2cd3..78a3fc8f79 100644 --- a/platform/windows/export/export.cpp +++ b/platform/windows/export/export.cpp @@ -85,7 +85,7 @@ void EditorExportPlatformWindows::get_export_options(List<ExportOption> *r_optio r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "codesign/timestamp_server_url"), "")); r_options->push_back(ExportOption(PropertyInfo(Variant::INT, "codesign/digest_algorithm", PROPERTY_HINT_ENUM, "SHA1,SHA256"), 1)); r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "codesign/description"), "")); - r_options->push_back(ExportOption(PropertyInfo(Variant::POOL_STRING_ARRAY, "codesign/custom_options"), PoolStringArray())); + r_options->push_back(ExportOption(PropertyInfo(Variant::PACKED_STRING_ARRAY, "codesign/custom_options"), PackedStringArray())); r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "application/icon", PROPERTY_HINT_FILE, "*.ico"), "")); r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "application/file_version", PROPERTY_HINT_PLACEHOLDER_TEXT, "1.0.0"), "")); @@ -297,7 +297,7 @@ Error EditorExportPlatformWindows::_code_sign(const Ref<EditorExportPreset> &p_p } //user options - PoolStringArray user_args = p_preset->get("codesign/custom_options"); + PackedStringArray user_args = p_preset->get("codesign/custom_options"); for (int i = 0; i < user_args.size(); i++) { String user_arg = user_args[i].strip_edges(); if (!user_arg.empty()) { diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index 133dc9004d..716a637993 100755..100644 --- a/platform/windows/os_windows.cpp +++ b/platform/windows/os_windows.cpp @@ -34,6 +34,7 @@ #include "os_windows.h" #include "core/io/marshalls.h" +#include "core/script_language.h" #include "core/version_generated.gen.h" #if defined(OPENGL_ENABLED) @@ -708,7 +709,7 @@ LRESULT OS_Windows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) break; } } - FALLTHROUGH; + [[fallthrough]]; case WM_MBUTTONDOWN: case WM_MBUTTONUP: case WM_RBUTTONDOWN: @@ -983,7 +984,7 @@ LRESULT OS_Windows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) if (wParam==VK_WIN) TODO wtf is this? meta_mem=uMsg==WM_KEYDOWN; */ - FALLTHROUGH; + [[fallthrough]]; } case WM_CHAR: { @@ -1492,8 +1493,6 @@ Error OS_Windows::initialize(const VideoMode &p_desired, int p_video_driver, int input = memnew(InputDefault); joypad = memnew(JoypadWindows(input, &hWnd)); - power_manager = memnew(PowerWindows); - AudioDriverManager::initialize(p_audio_driver); TRACKMOUSEEVENT tme; @@ -2569,7 +2568,6 @@ void OS_Windows::set_custom_mouse_cursor(const RES &p_cursor, CursorShape p_shap // Create the BITMAP with alpha channel COLORREF *buffer = (COLORREF *)memalloc(sizeof(COLORREF) * image_size); - image->lock(); for (UINT index = 0; index < image_size; index++) { int row_index = floor(index / texture_size.width) + atlas_rect.position.y; int column_index = (index % int(texture_size.width)) + atlas_rect.position.x; @@ -2581,7 +2579,6 @@ void OS_Windows::set_custom_mouse_cursor(const RES &p_cursor, CursorShape p_shap *(buffer + index) = image->get_pixel(column_index, row_index).to_argb32(); } - image->unlock(); // Using 4 channels, so 4 * 8 bits HBITMAP bitmap = CreateBitmap(texture_size.width, texture_size.height, 1, 4 * 8, buffer); @@ -2936,7 +2933,7 @@ void OS_Windows::set_icon(const Ref<Image> &p_icon) { encode_uint32(0, &icon_bmp[36]); uint8_t *wr = &icon_bmp[40]; - PoolVector<uint8_t>::Read r = icon->get_data().read(); + const uint8_t *r = icon->get_data().ptr(); for (int i = 0; i < h; i++) { @@ -3334,18 +3331,6 @@ void OS_Windows::_set_use_vsync(bool p_enable) { #endif } -OS::PowerState OS_Windows::get_power_state() { - return power_manager->get_power_state(); -} - -int OS_Windows::get_power_seconds_left() { - return power_manager->get_power_seconds_left(); -} - -int OS_Windows::get_power_percent_left() { - return power_manager->get_power_percent_left(); -} - bool OS_Windows::_check_internal_feature_support(const String &p_feature) { return p_feature == "pc"; diff --git a/platform/windows/os_windows.h b/platform/windows/os_windows.h index 89b67f8d91..6c3769c98c 100644 --- a/platform/windows/os_windows.h +++ b/platform/windows/os_windows.h @@ -40,7 +40,6 @@ #include "drivers/winmidi/midi_driver_winmidi.h" #include "key_mapping_windows.h" #include "main/input_default.h" -#include "power_windows.h" #include "servers/audio_server.h" #include "servers/visual/rasterizer.h" #include "servers/visual_server.h" @@ -239,8 +238,6 @@ class OS_Windows : public OS { JoypadWindows *joypad; Map<int, Vector2> touch_state; - PowerWindows *power_manager; - int video_driver_index; #ifdef WASAPI_ENABLED AudioDriverWASAPI driver_wasapi; @@ -433,10 +430,6 @@ public: virtual void _set_use_vsync(bool p_enable); //virtual bool is_vsync_enabled() const; - virtual OS::PowerState get_power_state(); - virtual int get_power_seconds_left(); - virtual int get_power_percent_left(); - virtual bool _check_internal_feature_support(const String &p_feature); void disable_crash_handler(); diff --git a/platform/windows/power_windows.cpp b/platform/windows/power_windows.cpp deleted file mode 100644 index aea06da413..0000000000 --- a/platform/windows/power_windows.cpp +++ /dev/null @@ -1,131 +0,0 @@ -/*************************************************************************/ -/* power_windows.cpp */ -/*************************************************************************/ -/* This file is part of: */ -/* GODOT ENGINE */ -/* https://godotengine.org */ -/*************************************************************************/ -/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */ -/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */ -/* */ -/* Permission is hereby granted, free of charge, to any person obtaining */ -/* a copy of this software and associated documentation files (the */ -/* "Software"), to deal in the Software without restriction, including */ -/* without limitation the rights to use, copy, modify, merge, publish, */ -/* distribute, sublicense, and/or sell copies of the Software, and to */ -/* permit persons to whom the Software is furnished to do so, subject to */ -/* the following conditions: */ -/* */ -/* The above copyright notice and this permission notice shall be */ -/* included in all copies or substantial portions of the Software. */ -/* */ -/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ -/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ -/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ -/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ -/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ -/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ -/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -/*************************************************************************/ - -/* -Adapted from corresponding SDL 2.0 code. -*/ - -/* - Simple DirectMedia Layer - Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org> - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. -*/ - -#include "power_windows.h" - -// CODE CHUNK IMPORTED FROM SDL 2.0 - -bool PowerWindows::GetPowerInfo_Windows() { - SYSTEM_POWER_STATUS status; - bool need_details = FALSE; - - /* This API should exist back to Win95. */ - if (!GetSystemPowerStatus(&status)) { - /* !!! FIXME: push GetLastError() into GetError() */ - power_state = OS::POWERSTATE_UNKNOWN; - } else if (status.BatteryFlag == 0xFF) { /* unknown state */ - power_state = OS::POWERSTATE_UNKNOWN; - } else if (status.BatteryFlag & (1 << 7)) { /* no battery */ - power_state = OS::POWERSTATE_NO_BATTERY; - } else if (status.BatteryFlag & (1 << 3)) { /* charging */ - power_state = OS::POWERSTATE_CHARGING; - need_details = TRUE; - } else if (status.ACLineStatus == 1) { - power_state = OS::POWERSTATE_CHARGED; /* on AC, not charging. */ - need_details = TRUE; - } else { - power_state = OS::POWERSTATE_ON_BATTERY; /* not on AC. */ - need_details = TRUE; - } - - percent_left = -1; - nsecs_left = -1; - if (need_details) { - const int pct = (int)status.BatteryLifePercent; - const int secs = (int)status.BatteryLifeTime; - - if (pct != 255) { /* 255 == unknown */ - percent_left = (pct > 100) ? 100 : pct; /* clamp between 0%, 100% */ - } - if (secs != (int)0xFFFFFFFF) { /* ((DWORD)-1) == unknown */ - nsecs_left = secs; - } - } - - return TRUE; /* always the definitive answer on Windows. */ -} - -OS::PowerState PowerWindows::get_power_state() { - if (GetPowerInfo_Windows()) { - return power_state; - } else { - return OS::POWERSTATE_UNKNOWN; - } -} - -int PowerWindows::get_power_seconds_left() { - if (GetPowerInfo_Windows()) { - return nsecs_left; - } else { - return -1; - } -} - -int PowerWindows::get_power_percent_left() { - if (GetPowerInfo_Windows()) { - return percent_left; - } else { - return -1; - } -} - -PowerWindows::PowerWindows() : - nsecs_left(-1), - percent_left(-1), - power_state(OS::POWERSTATE_UNKNOWN) { -} - -PowerWindows::~PowerWindows() { -} diff --git a/platform/x11/SCsub b/platform/x11/SCsub index 9027c244be..2268e4cc3d 100644 --- a/platform/x11/SCsub +++ b/platform/x11/SCsub @@ -12,7 +12,6 @@ common_x11 = [ "os_x11.cpp", "key_mapping_x11.cpp", "joypad_linux.cpp", - "power_x11.cpp", "detect_prime.cpp" ] diff --git a/platform/x11/detect.py b/platform/x11/detect.py index 9d5affcb3c..cd22ee9ff6 100644 --- a/platform/x11/detect.py +++ b/platform/x11/detect.py @@ -61,6 +61,7 @@ def get_opts(): BoolVariable('use_lld', 'Use the LLD linker', False), BoolVariable('use_thinlto', 'Use ThinLTO', False), BoolVariable('use_static_cpp', 'Link libgcc and libstdc++ statically for better portability', False), + BoolVariable('use_coverage', 'Test Godot coverage', False), BoolVariable('use_ubsan', 'Use LLVM/GCC compiler undefined behavior sanitizer (UBSAN)', False), BoolVariable('use_asan', 'Use LLVM/GCC compiler address sanitizer (ASAN))', False), BoolVariable('use_lsan', 'Use LLVM/GCC compiler leak sanitizer (LSAN))', False), @@ -141,6 +142,10 @@ def configure(env): print("Using LLD with GCC is not supported yet, try compiling with 'use_llvm=yes'.") sys.exit(255) + if env['use_coverage']: + env.Append(CCFLAGS=['-ftest-coverage', '-fprofile-arcs']) + env.Append(LINKFLAGS=['-ftest-coverage', '-fprofile-arcs']) + if env['use_ubsan'] or env['use_asan'] or env['use_lsan'] or env['use_tsan']: env.extra_suffix += "s" @@ -179,18 +184,10 @@ def configure(env): env.Append(CCFLAGS=['-pipe']) env.Append(LINKFLAGS=['-pipe']) - # Check for gcc version >= 6 before adding -no-pie - if using_gcc(env): - version = get_compiler_version(env) - if version != None and version[0] >= '6': - env.Append(CCFLAGS=['-fpie']) - env.Append(LINKFLAGS=['-no-pie']) - # Do the same for clang should be fine with Clang 4 and higher - if using_clang(env): - version = get_compiler_version(env) - if version != None and version[0] >= '4': - env.Append(CCFLAGS=['-fpie']) - env.Append(LINKFLAGS=['-no-pie']) + # -fpie and -no-pie is supported on GCC 6+ and Clang 4+, both below our + # minimal requirements. + env.Append(CCFLAGS=['-fpie']) + env.Append(LINKFLAGS=['-no-pie']) ## Dependencies diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp index 1fd91ec3c1..36e9681f5f 100644 --- a/platform/x11/os_x11.cpp +++ b/platform/x11/os_x11.cpp @@ -659,8 +659,6 @@ Error OS_X11::initialize(const VideoMode &p_desired, int p_video_driver, int p_a #endif _ensure_user_data_dir(); - power_manager = memnew(PowerX11); - if (p_desired.layered) { set_window_per_pixel_transparency_enabled(true); } @@ -870,8 +868,6 @@ void OS_X11::finalize() { visual_server->finish(); memdelete(visual_server); - memdelete(power_manager); - #if defined(OPENGL_ENABLED) if (video_driver_index == VIDEO_DRIVER_GLES2) { @@ -3080,8 +3076,6 @@ void OS_X11::set_custom_mouse_cursor(const RES &p_cursor, CursorShape p_shape, c // allocate memory to contain the whole file cursor_image->pixels = (XcursorPixel *)memalloc(size); - image->lock(); - for (XcursorPixel index = 0; index < image_size; index++) { int row_index = floor(index / texture_size.width) + atlas_rect.position.y; int column_index = (index % int(texture_size.width)) + atlas_rect.position.x; @@ -3094,8 +3088,6 @@ void OS_X11::set_custom_mouse_cursor(const RES &p_cursor, CursorShape p_shape, c *(cursor_image->pixels + index) = image->get_pixel(column_index, row_index).to_argb32(); } - image->unlock(); - ERR_FAIL_COND(cursor_image->pixels == NULL); // Save it for a further usage @@ -3273,10 +3265,10 @@ void OS_X11::set_icon(const Ref<Image> &p_icon) { pd.write[0] = w; pd.write[1] = h; - PoolVector<uint8_t>::Read r = img->get_data().read(); + const uint8_t *r = img->get_data().ptr(); long *wr = &pd.write[2]; - uint8_t const *pr = r.ptr(); + uint8_t const *pr = r; for (int i = 0; i < w * h; i++) { long v = 0; @@ -3389,18 +3381,6 @@ void OS_X11::set_context(int p_context) { } } -OS::PowerState OS_X11::get_power_state() { - return power_manager->get_power_state(); -} - -int OS_X11::get_power_seconds_left() { - return power_manager->get_power_seconds_left(); -} - -int OS_X11::get_power_percent_left() { - return power_manager->get_power_percent_left(); -} - void OS_X11::disable_crash_handler() { crash_handler.disable(); } diff --git a/platform/x11/os_x11.h b/platform/x11/os_x11.h index fd8a981763..55d24d64a3 100644 --- a/platform/x11/os_x11.h +++ b/platform/x11/os_x11.h @@ -39,7 +39,6 @@ #include "drivers/unix/os_unix.h" #include "joypad_linux.h" #include "main/input_default.h" -#include "power_x11.h" #include "servers/audio_server.h" #include "servers/visual/rasterizer.h" #include "servers/visual_server.h" @@ -200,8 +199,6 @@ class OS_X11 : public OS_Unix { AudioDriverPulseAudio driver_pulseaudio; #endif - PowerX11 *power_manager; - bool layered_window; CrashHandler crash_handler; @@ -323,10 +320,6 @@ public: virtual void _set_use_vsync(bool p_enable); //virtual bool is_vsync_enabled() const; - virtual OS::PowerState get_power_state(); - virtual int get_power_seconds_left(); - virtual int get_power_percent_left(); - virtual bool _check_internal_feature_support(const String &p_feature); virtual void force_process_input(); diff --git a/platform/x11/power_x11.cpp b/platform/x11/power_x11.cpp deleted file mode 100644 index 5ac5e8e87b..0000000000 --- a/platform/x11/power_x11.cpp +++ /dev/null @@ -1,577 +0,0 @@ -/*************************************************************************/ -/* power_x11.cpp */ -/*************************************************************************/ -/* This file is part of: */ -/* GODOT ENGINE */ -/* https://godotengine.org */ -/*************************************************************************/ -/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */ -/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */ -/* */ -/* Permission is hereby granted, free of charge, to any person obtaining */ -/* a copy of this software and associated documentation files (the */ -/* "Software"), to deal in the Software without restriction, including */ -/* without limitation the rights to use, copy, modify, merge, publish, */ -/* distribute, sublicense, and/or sell copies of the Software, and to */ -/* permit persons to whom the Software is furnished to do so, subject to */ -/* the following conditions: */ -/* */ -/* The above copyright notice and this permission notice shall be */ -/* included in all copies or substantial portions of the Software. */ -/* */ -/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ -/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ -/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ -/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ -/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ -/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ -/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -/*************************************************************************/ - -/* -Adapted from corresponding SDL 2.0 code. -*/ - -/* - Simple DirectMedia Layer - Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org> - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. -*/ - -#include "power_x11.h" - -#include <stdio.h> -#include <unistd.h> - -#include "core/error_macros.h" -#include <dirent.h> -#include <fcntl.h> -#include <sys/stat.h> -#include <sys/types.h> - -// CODE CHUNK IMPORTED FROM SDL 2.0 - -static const char *proc_apm_path = "/proc/apm"; -static const char *proc_acpi_battery_path = "/proc/acpi/battery"; -static const char *proc_acpi_ac_adapter_path = "/proc/acpi/ac_adapter"; -static const char *sys_class_power_supply_path = "/sys/class/power_supply"; - -FileAccessRef PowerX11::open_power_file(const char *base, const char *node, const char *key) { - String path = String(base) + String("/") + String(node) + String("/") + String(key); - FileAccessRef f = FileAccess::open(path, FileAccess::READ); - return f; -} - -bool PowerX11::read_power_file(const char *base, const char *node, const char *key, char *buf, size_t buflen) { - ssize_t br = 0; - FileAccessRef fd = open_power_file(base, node, key); - if (!fd) { - return false; - } - br = fd->get_buffer(reinterpret_cast<uint8_t *>(buf), buflen - 1); - fd->close(); - if (br < 0) { - return false; - } - buf[br] = '\0'; // null-terminate the string - return true; -} - -bool PowerX11::make_proc_acpi_key_val(char **_ptr, char **_key, char **_val) { - char *ptr = *_ptr; - - while (*ptr == ' ') { - ptr++; /* skip whitespace. */ - } - - if (*ptr == '\0') { - return false; /* EOF. */ - } - - *_key = ptr; - - while ((*ptr != ':') && (*ptr != '\0')) { - ptr++; - } - - if (*ptr == '\0') { - return false; /* (unexpected) EOF. */ - } - - *(ptr++) = '\0'; /* terminate the key. */ - - while (*ptr == ' ') { - ptr++; /* skip whitespace. */ - } - - if (*ptr == '\0') { - return false; /* (unexpected) EOF. */ - } - - *_val = ptr; - - while ((*ptr != '\n') && (*ptr != '\0')) { - ptr++; - } - - if (*ptr != '\0') { - *(ptr++) = '\0'; /* terminate the value. */ - } - - *_ptr = ptr; /* store for next time. */ - return true; -} - -void PowerX11::check_proc_acpi_battery(const char *node, bool *have_battery, bool *charging) { - const char *base = proc_acpi_battery_path; - char info[1024]; - char state[1024]; - char *ptr = NULL; - char *key = NULL; - char *val = NULL; - bool charge = false; - bool choose = false; - int maximum = -1; - int remaining = -1; - int secs = -1; - int pct = -1; - - if (!read_power_file(base, node, "state", state, sizeof(state))) { - return; - } else { - if (!read_power_file(base, node, "info", info, sizeof(info))) - return; - } - - ptr = &state[0]; - while (make_proc_acpi_key_val(&ptr, &key, &val)) { - if (String(key) == "present") { - if (String(val) == "yes") { - *have_battery = true; - } - } else if (String(key) == "charging state") { - /* !!! FIXME: what exactly _does_ charging/discharging mean? */ - if (String(val) == "charging/discharging") { - charge = true; - } else if (String(val) == "charging") { - charge = true; - } - } else if (String(key) == "remaining capacity") { - String sval = val; - const int cvt = sval.to_int(); - remaining = cvt; - } - } - - ptr = &info[0]; - while (make_proc_acpi_key_val(&ptr, &key, &val)) { - if (String(key) == "design capacity") { - String sval = val; - const int cvt = sval.to_int(); - maximum = cvt; - } - } - - if ((maximum >= 0) && (remaining >= 0)) { - pct = (int)((((float)remaining) / ((float)maximum)) * 100.0f); - if (pct < 0) { - pct = 0; - } else if (pct > 100) { - pct = 100; - } - } - - /* !!! FIXME: calculate (secs). */ - - /* - * We pick the battery that claims to have the most minutes left. - * (failing a report of minutes, we'll take the highest percent.) - */ - // -- GODOT start -- - //if ((secs < 0) && (this->nsecs_left < 0)) { - if (this->nsecs_left < 0) { - // -- GODOT end -- - if ((pct < 0) && (this->percent_left < 0)) { - choose = true; /* at least we know there's a battery. */ - } - if (pct > this->percent_left) { - choose = true; - } - } else if (secs > this->nsecs_left) { - choose = true; - } - - if (choose) { - this->nsecs_left = secs; - this->percent_left = pct; - *charging = charge; - } -} - -void PowerX11::check_proc_acpi_ac_adapter(const char *node, bool *have_ac) { - const char *base = proc_acpi_ac_adapter_path; - char state[256]; - char *ptr = NULL; - char *key = NULL; - char *val = NULL; - - if (!read_power_file(base, node, "state", state, sizeof(state))) { - return; - } - - ptr = &state[0]; - while (make_proc_acpi_key_val(&ptr, &key, &val)) { - String skey = key; - if (skey == "state") { - String sval = val; - if (sval == "on-line") { - *have_ac = true; - } - } - } -} - -bool PowerX11::GetPowerInfo_Linux_proc_acpi() { - String node; - DirAccess *dirp = DirAccess::create(DirAccess::ACCESS_FILESYSTEM); - bool have_battery = false; - bool have_ac = false; - bool charging = false; - - this->nsecs_left = -1; - this->percent_left = -1; - this->power_state = OS::POWERSTATE_UNKNOWN; - - dirp->change_dir(proc_acpi_battery_path); - Error err = dirp->list_dir_begin(); - - if (err != OK) { - return false; /* can't use this interface. */ - } else { - node = dirp->get_next(); - while (node != "") { - check_proc_acpi_battery(node.utf8().get_data(), &have_battery, &charging /*, seconds, percent*/); - node = dirp->get_next(); - } - } - dirp->change_dir(proc_acpi_ac_adapter_path); - err = dirp->list_dir_begin(); - if (err != OK) { - return false; /* can't use this interface. */ - } else { - node = dirp->get_next(); - while (node != "") { - check_proc_acpi_ac_adapter(node.utf8().get_data(), &have_ac); - node = dirp->get_next(); - } - } - - if (!have_battery) { - this->power_state = OS::POWERSTATE_NO_BATTERY; - } else if (charging) { - this->power_state = OS::POWERSTATE_CHARGING; - } else if (have_ac) { - this->power_state = OS::POWERSTATE_CHARGED; - } else { - this->power_state = OS::POWERSTATE_ON_BATTERY; - } - - memdelete(dirp); - return true; /* definitive answer. */ -} - -bool PowerX11::next_string(char **_ptr, char **_str) { - char *ptr = *_ptr; - char *str = *_str; - - while (*ptr == ' ') { /* skip any spaces... */ - ptr++; - } - - if (*ptr == '\0') { - return false; - } - - str = ptr; - while ((*ptr != ' ') && (*ptr != '\n') && (*ptr != '\0')) - ptr++; - - if (*ptr != '\0') - *(ptr++) = '\0'; - - *_str = str; - *_ptr = ptr; - return true; -} - -bool PowerX11::int_string(char *str, int *val) { - String sval = str; - *val = sval.to_int(); - return (*str != '\0'); -} - -/* http://lxr.linux.no/linux+v2.6.29/drivers/char/apm-emulation.c */ -bool PowerX11::GetPowerInfo_Linux_proc_apm() { - bool need_details = false; - int ac_status = 0; - int battery_status = 0; - int battery_flag = 0; - int battery_percent = 0; - int battery_time = 0; - FileAccessRef fd = FileAccess::open(proc_apm_path, FileAccess::READ); - char buf[128]; - char *ptr = &buf[0]; - char *str = NULL; - ssize_t br; - - if (!fd) { - return false; /* can't use this interface. */ - } - - br = fd->get_buffer(reinterpret_cast<uint8_t *>(buf), sizeof(buf) - 1); - fd->close(); - - if (br < 0) { - return false; - } - - buf[br] = '\0'; /* null-terminate the string. */ - if (!next_string(&ptr, &str)) { /* driver version */ - return false; - } - if (!next_string(&ptr, &str)) { /* BIOS version */ - return false; - } - if (!next_string(&ptr, &str)) { /* APM flags */ - return false; - } - - if (!next_string(&ptr, &str)) { /* AC line status */ - return false; - } else if (!int_string(str, &ac_status)) { - return false; - } - - if (!next_string(&ptr, &str)) { /* battery status */ - return false; - } else if (!int_string(str, &battery_status)) { - return false; - } - if (!next_string(&ptr, &str)) { /* battery flag */ - return false; - } else if (!int_string(str, &battery_flag)) { - return false; - } - if (!next_string(&ptr, &str)) { /* remaining battery life percent */ - return false; - } - String sstr = str; - if (sstr[sstr.length() - 1] == '%') { - sstr[sstr.length() - 1] = '\0'; - } - if (!int_string(str, &battery_percent)) { - return false; - } - - if (!next_string(&ptr, &str)) { /* remaining battery life time */ - return false; - } else if (!int_string(str, &battery_time)) { - return false; - } - - if (!next_string(&ptr, &str)) { /* remaining battery life time units */ - return false; - } else if (String(str) == "min") { - battery_time *= 60; - } - - if (battery_flag == 0xFF) { /* unknown state */ - this->power_state = OS::POWERSTATE_UNKNOWN; - } else if (battery_flag & (1 << 7)) { /* no battery */ - this->power_state = OS::POWERSTATE_NO_BATTERY; - } else if (battery_flag & (1 << 3)) { /* charging */ - this->power_state = OS::POWERSTATE_CHARGING; - need_details = true; - } else if (ac_status == 1) { - this->power_state = OS::POWERSTATE_CHARGED; /* on AC, not charging. */ - need_details = true; - } else { - this->power_state = OS::POWERSTATE_ON_BATTERY; - need_details = true; - } - - this->percent_left = -1; - this->nsecs_left = -1; - if (need_details) { - const int pct = battery_percent; - const int secs = battery_time; - - if (pct >= 0) { /* -1 == unknown */ - this->percent_left = (pct > 100) ? 100 : pct; /* clamp between 0%, 100% */ - } - if (secs >= 0) { /* -1 == unknown */ - this->nsecs_left = secs; - } - } - - return true; -} - -/* !!! FIXME: implement d-bus queries to org.freedesktop.UPower. */ - -bool PowerX11::GetPowerInfo_Linux_sys_class_power_supply(/*PowerState *state, int *seconds, int *percent*/) { - const char *base = sys_class_power_supply_path; - String name; - - DirAccess *dirp = DirAccess::create(DirAccess::ACCESS_FILESYSTEM); - dirp->change_dir(base); - Error err = dirp->list_dir_begin(); - - if (err != OK) { - return false; - } - - this->power_state = OS::POWERSTATE_NO_BATTERY; /* assume we're just plugged in. */ - this->nsecs_left = -1; - this->percent_left = -1; - - name = dirp->get_next(); - - while (name != "") { - bool choose = false; - char str[64]; - OS::PowerState st; - int secs; - int pct; - - if ((name == ".") || (name == "..")) { - name = dirp->get_next(); - continue; //skip these, of course. - } else { - if (!read_power_file(base, name.utf8().get_data(), "type", str, sizeof(str))) { - name = dirp->get_next(); - continue; // Don't know _what_ we're looking at. Give up on it. - } else { - if (String(str) != "Battery\n") { - name = dirp->get_next(); - continue; // we don't care about UPS and such. - } - } - } - - /* some drivers don't offer this, so if it's not explicitly reported assume it's present. */ - if (read_power_file(base, name.utf8().get_data(), "present", str, sizeof(str)) && (String(str) == "0\n")) { - st = OS::POWERSTATE_NO_BATTERY; - } else if (!read_power_file(base, name.utf8().get_data(), "status", str, sizeof(str))) { - st = OS::POWERSTATE_UNKNOWN; /* uh oh */ - } else if (String(str) == "Charging\n") { - st = OS::POWERSTATE_CHARGING; - } else if (String(str) == "Discharging\n") { - st = OS::POWERSTATE_ON_BATTERY; - } else if ((String(str) == "Full\n") || (String(str) == "Not charging\n")) { - st = OS::POWERSTATE_CHARGED; - } else { - st = OS::POWERSTATE_UNKNOWN; /* uh oh */ - } - - if (!read_power_file(base, name.utf8().get_data(), "capacity", str, sizeof(str))) { - pct = -1; - } else { - pct = String(str).to_int(); - pct = (pct > 100) ? 100 : pct; /* clamp between 0%, 100% */ - } - - if (!read_power_file(base, name.utf8().get_data(), "time_to_empty_now", str, sizeof(str))) { - secs = -1; - } else { - secs = String(str).to_int(); - secs = (secs <= 0) ? -1 : secs; /* 0 == unknown */ - } - - /* - * We pick the battery that claims to have the most minutes left. - * (failing a report of minutes, we'll take the highest percent.) - */ - if ((secs < 0) && (this->nsecs_left < 0)) { - if ((pct < 0) && (this->percent_left < 0)) { - choose = true; /* at least we know there's a battery. */ - } else if (pct > this->percent_left) { - choose = true; - } - } else if (secs > this->nsecs_left) { - choose = true; - } - - if (choose) { - this->nsecs_left = secs; - this->percent_left = pct; - this->power_state = st; - } - - name = dirp->get_next(); - } - - memdelete(dirp); - return true; /* don't look any further*/ -} - -bool PowerX11::UpdatePowerInfo() { - if (GetPowerInfo_Linux_sys_class_power_supply()) { // try method 1 - return true; - } - if (GetPowerInfo_Linux_proc_acpi()) { // try further - return true; - } - if (GetPowerInfo_Linux_proc_apm()) { // try even further - return true; - } - return false; -} - -PowerX11::PowerX11() : - nsecs_left(-1), - percent_left(-1), - power_state(OS::POWERSTATE_UNKNOWN) { -} - -PowerX11::~PowerX11() { -} - -OS::PowerState PowerX11::get_power_state() { - if (UpdatePowerInfo()) { - return power_state; - } else { - return OS::POWERSTATE_UNKNOWN; - } -} - -int PowerX11::get_power_seconds_left() { - if (UpdatePowerInfo()) { - return nsecs_left; - } else { - return -1; - } -} - -int PowerX11::get_power_percent_left() { - if (UpdatePowerInfo()) { - return percent_left; - } else { - return -1; - } -} diff --git a/scene/2d/animated_sprite.cpp b/scene/2d/animated_sprite.cpp index b98820d5ac..d4d008d488 100644 --- a/scene/2d/animated_sprite.cpp +++ b/scene/2d/animated_sprite.cpp @@ -475,10 +475,10 @@ void AnimatedSprite::_notification(int p_what) { void AnimatedSprite::set_sprite_frames(const Ref<SpriteFrames> &p_frames) { if (frames.is_valid()) - frames->disconnect("changed", this, "_res_changed"); + frames->disconnect_compat("changed", this, "_res_changed"); frames = p_frames; if (frames.is_valid()) - frames->connect("changed", this, "_res_changed"); + frames->connect_compat("changed", this, "_res_changed"); if (!frames.is_valid()) { frame = 0; @@ -742,13 +742,13 @@ void AnimatedSprite::_bind_methods() { ADD_GROUP("Animation", ""); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "frames", PROPERTY_HINT_RESOURCE_TYPE, "SpriteFrames"), "set_sprite_frames", "get_sprite_frames"); - ADD_PROPERTY(PropertyInfo(Variant::STRING, "animation"), "set_animation", "get_animation"); + ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "animation"), "set_animation", "get_animation"); ADD_PROPERTY(PropertyInfo(Variant::INT, "frame"), "set_frame", "get_frame"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "speed_scale"), "set_speed_scale", "get_speed_scale"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "speed_scale"), "set_speed_scale", "get_speed_scale"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "playing"), "_set_playing", "_is_playing"); ADD_GROUP("Lighting", ""); ADD_PROPERTY(PropertyInfo(Variant::COLOR, "specular_color", PROPERTY_HINT_COLOR_NO_ALPHA), "set_specular_color", "get_specular_color"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "shininess", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_shininess", "get_shininess"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "shininess", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_shininess", "get_shininess"); ADD_GROUP("Offset", ""); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "centered"), "set_centered", "is_centered"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "offset"), "set_offset", "get_offset"); diff --git a/scene/2d/area_2d.cpp b/scene/2d/area_2d.cpp index b661db2e52..eef8c58f78 100644 --- a/scene/2d/area_2d.cpp +++ b/scene/2d/area_2d.cpp @@ -171,8 +171,8 @@ void Area2D::_body_inout(int p_status, const RID &p_body, ObjectID p_instance, i E->get().rc = 0; E->get().in_tree = node && node->is_inside_tree(); if (node) { - node->connect(SceneStringNames::get_singleton()->tree_entered, this, SceneStringNames::get_singleton()->_body_enter_tree, make_binds(objid)); - node->connect(SceneStringNames::get_singleton()->tree_exiting, this, SceneStringNames::get_singleton()->_body_exit_tree, make_binds(objid)); + node->connect_compat(SceneStringNames::get_singleton()->tree_entered, this, SceneStringNames::get_singleton()->_body_enter_tree, make_binds(objid)); + node->connect_compat(SceneStringNames::get_singleton()->tree_exiting, this, SceneStringNames::get_singleton()->_body_exit_tree, make_binds(objid)); if (E->get().in_tree) { emit_signal(SceneStringNames::get_singleton()->body_entered, node); } @@ -198,8 +198,8 @@ void Area2D::_body_inout(int p_status, const RID &p_body, ObjectID p_instance, i if (E->get().rc == 0) { if (node) { - node->disconnect(SceneStringNames::get_singleton()->tree_entered, this, SceneStringNames::get_singleton()->_body_enter_tree); - node->disconnect(SceneStringNames::get_singleton()->tree_exiting, this, SceneStringNames::get_singleton()->_body_exit_tree); + node->disconnect_compat(SceneStringNames::get_singleton()->tree_entered, this, SceneStringNames::get_singleton()->_body_enter_tree); + node->disconnect_compat(SceneStringNames::get_singleton()->tree_exiting, this, SceneStringNames::get_singleton()->_body_exit_tree); if (E->get().in_tree) emit_signal(SceneStringNames::get_singleton()->body_exited, obj); } @@ -273,8 +273,8 @@ void Area2D::_area_inout(int p_status, const RID &p_area, ObjectID p_instance, i E->get().rc = 0; E->get().in_tree = node && node->is_inside_tree(); if (node) { - node->connect(SceneStringNames::get_singleton()->tree_entered, this, SceneStringNames::get_singleton()->_area_enter_tree, make_binds(objid)); - node->connect(SceneStringNames::get_singleton()->tree_exiting, this, SceneStringNames::get_singleton()->_area_exit_tree, make_binds(objid)); + node->connect_compat(SceneStringNames::get_singleton()->tree_entered, this, SceneStringNames::get_singleton()->_area_enter_tree, make_binds(objid)); + node->connect_compat(SceneStringNames::get_singleton()->tree_exiting, this, SceneStringNames::get_singleton()->_area_exit_tree, make_binds(objid)); if (E->get().in_tree) { emit_signal(SceneStringNames::get_singleton()->area_entered, node); } @@ -300,8 +300,8 @@ void Area2D::_area_inout(int p_status, const RID &p_area, ObjectID p_instance, i if (E->get().rc == 0) { if (node) { - node->disconnect(SceneStringNames::get_singleton()->tree_entered, this, SceneStringNames::get_singleton()->_area_enter_tree); - node->disconnect(SceneStringNames::get_singleton()->tree_exiting, this, SceneStringNames::get_singleton()->_area_exit_tree); + node->disconnect_compat(SceneStringNames::get_singleton()->tree_entered, this, SceneStringNames::get_singleton()->_area_enter_tree); + node->disconnect_compat(SceneStringNames::get_singleton()->tree_exiting, this, SceneStringNames::get_singleton()->_area_exit_tree); if (E->get().in_tree) emit_signal(SceneStringNames::get_singleton()->area_exited, obj); } @@ -337,8 +337,8 @@ void Area2D::_clear_monitoring() { continue; //ERR_CONTINUE(!node); - node->disconnect(SceneStringNames::get_singleton()->tree_entered, this, SceneStringNames::get_singleton()->_body_enter_tree); - node->disconnect(SceneStringNames::get_singleton()->tree_exiting, this, SceneStringNames::get_singleton()->_body_exit_tree); + node->disconnect_compat(SceneStringNames::get_singleton()->tree_entered, this, SceneStringNames::get_singleton()->_body_enter_tree); + node->disconnect_compat(SceneStringNames::get_singleton()->tree_exiting, this, SceneStringNames::get_singleton()->_body_exit_tree); if (!E->get().in_tree) continue; @@ -367,8 +367,8 @@ void Area2D::_clear_monitoring() { continue; //ERR_CONTINUE(!node); - node->disconnect(SceneStringNames::get_singleton()->tree_entered, this, SceneStringNames::get_singleton()->_area_enter_tree); - node->disconnect(SceneStringNames::get_singleton()->tree_exiting, this, SceneStringNames::get_singleton()->_area_exit_tree); + node->disconnect_compat(SceneStringNames::get_singleton()->tree_entered, this, SceneStringNames::get_singleton()->_area_enter_tree); + node->disconnect_compat(SceneStringNames::get_singleton()->tree_exiting, this, SceneStringNames::get_singleton()->_area_exit_tree); if (!E->get().in_tree) continue; @@ -660,11 +660,11 @@ void Area2D::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::INT, "space_override", PROPERTY_HINT_ENUM, "Disabled,Combine,Combine-Replace,Replace,Replace-Combine"), "set_space_override_mode", "get_space_override_mode"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "gravity_point"), "set_gravity_is_point", "is_gravity_a_point"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "gravity_distance_scale", PROPERTY_HINT_EXP_RANGE, "0,1024,0.001,or_greater"), "set_gravity_distance_scale", "get_gravity_distance_scale"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "gravity_distance_scale", PROPERTY_HINT_EXP_RANGE, "0,1024,0.001,or_greater"), "set_gravity_distance_scale", "get_gravity_distance_scale"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "gravity_vec"), "set_gravity_vector", "get_gravity_vector"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "gravity", PROPERTY_HINT_RANGE, "-1024,1024,0.001"), "set_gravity", "get_gravity"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "linear_damp", PROPERTY_HINT_RANGE, "0,100,0.001,or_greater"), "set_linear_damp", "get_linear_damp"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "angular_damp", PROPERTY_HINT_RANGE, "0,100,0.001,or_greater"), "set_angular_damp", "get_angular_damp"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "gravity", PROPERTY_HINT_RANGE, "-1024,1024,0.001"), "set_gravity", "get_gravity"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "linear_damp", PROPERTY_HINT_RANGE, "0,100,0.001,or_greater"), "set_linear_damp", "get_linear_damp"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "angular_damp", PROPERTY_HINT_RANGE, "0,100,0.001,or_greater"), "set_angular_damp", "get_angular_damp"); ADD_PROPERTY(PropertyInfo(Variant::INT, "priority", PROPERTY_HINT_RANGE, "0,128,1"), "set_priority", "get_priority"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "monitoring"), "set_monitoring", "is_monitoring"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "monitorable"), "set_monitorable", "is_monitorable"); @@ -674,7 +674,7 @@ void Area2D::_bind_methods() { ADD_GROUP("Audio Bus", "audio_bus_"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "audio_bus_override"), "set_audio_bus_override", "is_overriding_audio_bus"); - ADD_PROPERTY(PropertyInfo(Variant::STRING, "audio_bus_name", PROPERTY_HINT_ENUM, ""), "set_audio_bus_name", "get_audio_bus_name"); + ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "audio_bus_name", PROPERTY_HINT_ENUM, ""), "set_audio_bus_name", "get_audio_bus_name"); BIND_ENUM_CONSTANT(SPACE_OVERRIDE_DISABLED); BIND_ENUM_CONSTANT(SPACE_OVERRIDE_COMBINE); diff --git a/scene/2d/audio_stream_player_2d.cpp b/scene/2d/audio_stream_player_2d.cpp index 4f0f681a01..901fd1e126 100644 --- a/scene/2d/audio_stream_player_2d.cpp +++ b/scene/2d/audio_stream_player_2d.cpp @@ -515,14 +515,14 @@ void AudioStreamPlayer2D::_bind_methods() { ClassDB::bind_method(D_METHOD("_bus_layout_changed"), &AudioStreamPlayer2D::_bus_layout_changed); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "stream", PROPERTY_HINT_RESOURCE_TYPE, "AudioStream"), "set_stream", "get_stream"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "volume_db", PROPERTY_HINT_RANGE, "-80,24"), "set_volume_db", "get_volume_db"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "pitch_scale", PROPERTY_HINT_RANGE, "0.01,32,0.01"), "set_pitch_scale", "get_pitch_scale"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "volume_db", PROPERTY_HINT_RANGE, "-80,24"), "set_volume_db", "get_volume_db"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "pitch_scale", PROPERTY_HINT_RANGE, "0.01,4,0.01,or_greater"), "set_pitch_scale", "get_pitch_scale"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "playing", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR), "_set_playing", "is_playing"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "autoplay"), "set_autoplay", "is_autoplay_enabled"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "stream_paused", PROPERTY_HINT_NONE, ""), "set_stream_paused", "get_stream_paused"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "max_distance", PROPERTY_HINT_EXP_RANGE, "1,4096,1,or_greater"), "set_max_distance", "get_max_distance"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "attenuation", PROPERTY_HINT_EXP_EASING, "attenuation"), "set_attenuation", "get_attenuation"); - ADD_PROPERTY(PropertyInfo(Variant::STRING, "bus", PROPERTY_HINT_ENUM, ""), "set_bus", "get_bus"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "max_distance", PROPERTY_HINT_EXP_RANGE, "1,4096,1,or_greater"), "set_max_distance", "get_max_distance"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "attenuation", PROPERTY_HINT_EXP_EASING, "attenuation"), "set_attenuation", "get_attenuation"); + ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "bus", PROPERTY_HINT_ENUM, ""), "set_bus", "get_bus"); ADD_PROPERTY(PropertyInfo(Variant::INT, "area_mask", PROPERTY_HINT_LAYERS_2D_PHYSICS), "set_area_mask", "get_area_mask"); ADD_SIGNAL(MethodInfo("finished")); @@ -545,7 +545,7 @@ AudioStreamPlayer2D::AudioStreamPlayer2D() { stream_paused = false; stream_paused_fade_in = false; stream_paused_fade_out = false; - AudioServer::get_singleton()->connect("bus_layout_changed", this, "_bus_layout_changed"); + AudioServer::get_singleton()->connect_compat("bus_layout_changed", this, "_bus_layout_changed"); } AudioStreamPlayer2D::~AudioStreamPlayer2D() { diff --git a/scene/2d/camera_2d.cpp b/scene/2d/camera_2d.cpp index 7ec770597e..1419fb561e 100644 --- a/scene/2d/camera_2d.cpp +++ b/scene/2d/camera_2d.cpp @@ -753,17 +753,17 @@ void Camera2D::_bind_methods() { ADD_GROUP("Smoothing", "smoothing_"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "smoothing_enabled"), "set_enable_follow_smoothing", "is_follow_smoothing_enabled"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "smoothing_speed"), "set_follow_smoothing", "get_follow_smoothing"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "smoothing_speed"), "set_follow_smoothing", "get_follow_smoothing"); ADD_GROUP("Offset", "offset_"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "offset_h", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_h_offset", "get_h_offset"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "offset_v", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_v_offset", "get_v_offset"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "offset_h", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_h_offset", "get_h_offset"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "offset_v", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_v_offset", "get_v_offset"); ADD_GROUP("Drag Margin", "drag_margin_"); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "drag_margin_left", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_drag_margin", "get_drag_margin", MARGIN_LEFT); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "drag_margin_top", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_drag_margin", "get_drag_margin", MARGIN_TOP); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "drag_margin_right", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_drag_margin", "get_drag_margin", MARGIN_RIGHT); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "drag_margin_bottom", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_drag_margin", "get_drag_margin", MARGIN_BOTTOM); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "drag_margin_left", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_drag_margin", "get_drag_margin", MARGIN_LEFT); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "drag_margin_top", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_drag_margin", "get_drag_margin", MARGIN_TOP); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "drag_margin_right", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_drag_margin", "get_drag_margin", MARGIN_RIGHT); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "drag_margin_bottom", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_drag_margin", "get_drag_margin", MARGIN_BOTTOM); ADD_GROUP("Editor", "editor_"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "editor_draw_screen"), "set_screen_drawing_enabled", "is_screen_drawing_enabled"); diff --git a/scene/2d/canvas_item.cpp b/scene/2d/canvas_item.cpp index aca0c4c959..942b63898d 100644 --- a/scene/2d/canvas_item.cpp +++ b/scene/2d/canvas_item.cpp @@ -1179,17 +1179,17 @@ void CanvasItem::_bind_methods() { ClassDB::bind_method(D_METHOD("draw_multiline_colors", "points", "colors", "width"), &CanvasItem::draw_multiline_colors, DEFVAL(1.0)); ClassDB::bind_method(D_METHOD("draw_rect", "rect", "color", "filled", "width"), &CanvasItem::draw_rect, DEFVAL(true), DEFVAL(1.0)); ClassDB::bind_method(D_METHOD("draw_circle", "position", "radius", "color"), &CanvasItem::draw_circle); - ClassDB::bind_method(D_METHOD("draw_texture", "texture", "position", "modulate", "normal_map", "specular_map", "specular_shinness", "texture_filter", "texture_repeat"), &CanvasItem::draw_texture, DEFVAL(Color(1, 1, 1, 1)), DEFVAL(Variant()), DEFVAL(Variant()), DEFVAL(Color(1, 1, 1, 1)), DEFVAL(TEXTURE_FILTER_PARENT_NODE), DEFVAL(TEXTURE_REPEAT_PARENT_NODE)); - ClassDB::bind_method(D_METHOD("draw_texture_rect", "texture", "rect", "tile", "modulate", "transpose", "normal_map", "specular_map", "specular_shinness", "texture_filter", "texture_repeat"), &CanvasItem::draw_texture_rect, DEFVAL(Color(1, 1, 1)), DEFVAL(false), DEFVAL(Variant()), DEFVAL(Variant()), DEFVAL(Color(1, 1, 1, 1)), DEFVAL(TEXTURE_FILTER_PARENT_NODE), DEFVAL(TEXTURE_REPEAT_PARENT_NODE)); - ClassDB::bind_method(D_METHOD("draw_texture_rect_region", "texture", "rect", "src_rect", "modulate", "transpose", "normal_map", "specular_map", "clip_uv", "specular_shinness", "texture_filter", "texture_repeat"), &CanvasItem::draw_texture_rect_region, DEFVAL(Color(1, 1, 1)), DEFVAL(false), DEFVAL(Variant()), DEFVAL(Variant()), DEFVAL(true), DEFVAL(Color(1, 1, 1, 1)), DEFVAL(TEXTURE_FILTER_PARENT_NODE), DEFVAL(TEXTURE_REPEAT_PARENT_NODE)); + ClassDB::bind_method(D_METHOD("draw_texture", "texture", "position", "modulate", "normal_map", "specular_map", "specular_shininess", "texture_filter", "texture_repeat"), &CanvasItem::draw_texture, DEFVAL(Color(1, 1, 1, 1)), DEFVAL(Ref<Texture2D>()), DEFVAL(Ref<Texture2D>()), DEFVAL(Color(1, 1, 1, 1)), DEFVAL(TEXTURE_FILTER_PARENT_NODE), DEFVAL(TEXTURE_REPEAT_PARENT_NODE)); + ClassDB::bind_method(D_METHOD("draw_texture_rect", "texture", "rect", "tile", "modulate", "transpose", "normal_map", "specular_map", "specular_shininess", "texture_filter", "texture_repeat"), &CanvasItem::draw_texture_rect, DEFVAL(Color(1, 1, 1, 1)), DEFVAL(false), DEFVAL(Ref<Texture2D>()), DEFVAL(Ref<Texture2D>()), DEFVAL(Color(1, 1, 1, 1)), DEFVAL(TEXTURE_FILTER_PARENT_NODE), DEFVAL(TEXTURE_REPEAT_PARENT_NODE)); + ClassDB::bind_method(D_METHOD("draw_texture_rect_region", "texture", "rect", "src_rect", "modulate", "transpose", "normal_map", "specular_map", "specular_shininess", "clip_uv", "texture_filter", "texture_repeat"), &CanvasItem::draw_texture_rect_region, DEFVAL(Color(1, 1, 1, 1)), DEFVAL(false), DEFVAL(Ref<Texture2D>()), DEFVAL(Ref<Texture2D>()), DEFVAL(Color(1, 1, 1, 1)), DEFVAL(true), DEFVAL(TEXTURE_FILTER_PARENT_NODE), DEFVAL(TEXTURE_REPEAT_PARENT_NODE)); ClassDB::bind_method(D_METHOD("draw_style_box", "style_box", "rect"), &CanvasItem::draw_style_box); - ClassDB::bind_method(D_METHOD("draw_primitive", "points", "colors", "uvs", "texture", "width", "normal_map", "specular_map", "specular_shinness", "texture_filter", "texture_repeat"), &CanvasItem::draw_primitive, DEFVAL(Variant()), DEFVAL(1.0), DEFVAL(Variant()), DEFVAL(Variant()), DEFVAL(Color(1, 1, 1, 1)), DEFVAL(TEXTURE_FILTER_PARENT_NODE), DEFVAL(TEXTURE_REPEAT_PARENT_NODE)); - ClassDB::bind_method(D_METHOD("draw_polygon", "points", "colors", "uvs", "texture", "normal_map", "specular_map", "specular_shinness", "texture_filter", "texture_repeat"), &CanvasItem::draw_polygon, DEFVAL(PoolVector2Array()), DEFVAL(Variant()), DEFVAL(Variant()), DEFVAL(Variant()), DEFVAL(Color(1, 1, 1, 1)), DEFVAL(TEXTURE_FILTER_PARENT_NODE), DEFVAL(TEXTURE_REPEAT_PARENT_NODE)); - ClassDB::bind_method(D_METHOD("draw_colored_polygon", "points", "color", "uvs", "texture", "normal_map", "specular_map", "specular_shinness", "texture_filter", "texture_repeat"), &CanvasItem::draw_colored_polygon, DEFVAL(PoolVector2Array()), DEFVAL(Variant()), DEFVAL(Variant()), DEFVAL(Variant()), DEFVAL(Color(1, 1, 1, 1)), DEFVAL(TEXTURE_FILTER_PARENT_NODE), DEFVAL(TEXTURE_REPEAT_PARENT_NODE)); - ClassDB::bind_method(D_METHOD("draw_string", "font", "position", "text", "modulate", "clip_w"), &CanvasItem::draw_string, DEFVAL(Color(1, 1, 1)), DEFVAL(-1)); - ClassDB::bind_method(D_METHOD("draw_char", "font", "position", "char", "next", "modulate"), &CanvasItem::draw_char, DEFVAL(Color(1, 1, 1))); - ClassDB::bind_method(D_METHOD("draw_mesh", "mesh", "texture", "normal_map", "specular_map", "transform", "modulate", "specular_shinness", "texture_filter", "texture_repeat"), &CanvasItem::draw_mesh, DEFVAL(Ref<Texture2D>()), DEFVAL(Ref<Texture2D>()), DEFVAL(Color(1, 1, 1, 1)), DEFVAL(Transform2D()), DEFVAL(Color(1, 1, 1)), DEFVAL(Color(1, 1, 1, 1)), DEFVAL(TEXTURE_FILTER_PARENT_NODE), DEFVAL(TEXTURE_REPEAT_PARENT_NODE)); - ClassDB::bind_method(D_METHOD("draw_multimesh", "multimesh", "texture", "normal_map", "specular_map", "specular_shinness", "texture_filter", "texture_repeat"), &CanvasItem::draw_multimesh, DEFVAL(Ref<Texture2D>()), DEFVAL(Ref<Texture2D>()), DEFVAL(Ref<Texture2D>()), DEFVAL(Color(1, 1, 1, 1)), DEFVAL(TEXTURE_FILTER_PARENT_NODE), DEFVAL(TEXTURE_REPEAT_PARENT_NODE)); + ClassDB::bind_method(D_METHOD("draw_primitive", "points", "colors", "uvs", "texture", "width", "normal_map", "specular_map", "specular_shininess", "texture_filter", "texture_repeat"), &CanvasItem::draw_primitive, DEFVAL(Ref<Texture2D>()), DEFVAL(1.0), DEFVAL(Ref<Texture2D>()), DEFVAL(Ref<Texture2D>()), DEFVAL(Color(1, 1, 1, 1)), DEFVAL(TEXTURE_FILTER_PARENT_NODE), DEFVAL(TEXTURE_REPEAT_PARENT_NODE)); + ClassDB::bind_method(D_METHOD("draw_polygon", "points", "colors", "uvs", "texture", "normal_map", "specular_map", "specular_shininess", "texture_filter", "texture_repeat"), &CanvasItem::draw_polygon, DEFVAL(PackedVector2Array()), DEFVAL(Ref<Texture2D>()), DEFVAL(Ref<Texture2D>()), DEFVAL(Ref<Texture2D>()), DEFVAL(Color(1, 1, 1, 1)), DEFVAL(TEXTURE_FILTER_PARENT_NODE), DEFVAL(TEXTURE_REPEAT_PARENT_NODE)); + ClassDB::bind_method(D_METHOD("draw_colored_polygon", "points", "color", "uvs", "texture", "normal_map", "specular_map", "specular_shininess", "texture_filter", "texture_repeat"), &CanvasItem::draw_colored_polygon, DEFVAL(PackedVector2Array()), DEFVAL(Ref<Texture2D>()), DEFVAL(Ref<Texture2D>()), DEFVAL(Ref<Texture2D>()), DEFVAL(Color(1, 1, 1, 1)), DEFVAL(TEXTURE_FILTER_PARENT_NODE), DEFVAL(TEXTURE_REPEAT_PARENT_NODE)); + ClassDB::bind_method(D_METHOD("draw_string", "font", "position", "text", "modulate", "clip_w"), &CanvasItem::draw_string, DEFVAL(Color(1, 1, 1, 1)), DEFVAL(-1)); + ClassDB::bind_method(D_METHOD("draw_char", "font", "position", "char", "next", "modulate"), &CanvasItem::draw_char, DEFVAL(Color(1, 1, 1, 1))); + ClassDB::bind_method(D_METHOD("draw_mesh", "mesh", "texture", "normal_map", "specular_map", "specular_shininess", "transform", "modulate", "texture_filter", "texture_repeat"), &CanvasItem::draw_mesh, DEFVAL(Ref<Texture2D>()), DEFVAL(Ref<Texture2D>()), DEFVAL(Color(1, 1, 1, 1)), DEFVAL(Transform2D()), DEFVAL(Color(1, 1, 1, 1)), DEFVAL(TEXTURE_FILTER_PARENT_NODE), DEFVAL(TEXTURE_REPEAT_PARENT_NODE)); + ClassDB::bind_method(D_METHOD("draw_multimesh", "multimesh", "texture", "normal_map", "specular_map", "specular_shininess", "texture_filter", "texture_repeat"), &CanvasItem::draw_multimesh, DEFVAL(Ref<Texture2D>()), DEFVAL(Ref<Texture2D>()), DEFVAL(Color(1, 1, 1, 1)), DEFVAL(TEXTURE_FILTER_PARENT_NODE), DEFVAL(TEXTURE_REPEAT_PARENT_NODE)); ClassDB::bind_method(D_METHOD("draw_set_transform", "position", "rotation", "scale"), &CanvasItem::draw_set_transform); ClassDB::bind_method(D_METHOD("draw_set_transform_matrix", "xform"), &CanvasItem::draw_set_transform_matrix); @@ -1263,9 +1263,9 @@ void CanvasItem::_bind_methods() { BIND_ENUM_CONSTANT(TEXTURE_FILTER_PARENT_NODE); BIND_ENUM_CONSTANT(TEXTURE_FILTER_NEAREST); BIND_ENUM_CONSTANT(TEXTURE_FILTER_LINEAR); - BIND_ENUM_CONSTANT(TEXTURE_FILTER_NEAREST_WITH_MIMPAMPS); + BIND_ENUM_CONSTANT(TEXTURE_FILTER_NEAREST_WITH_MIPMAPS); BIND_ENUM_CONSTANT(TEXTURE_FILTER_LINEAR_WITH_MIPMAPS); - BIND_ENUM_CONSTANT(TEXTURE_FILTER_NEAREST_WITH_MIMPAMPS_ANISOTROPIC); + BIND_ENUM_CONSTANT(TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC); BIND_ENUM_CONSTANT(TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC); BIND_ENUM_CONSTANT(TEXTURE_FILTER_MAX); @@ -1353,7 +1353,7 @@ void CanvasItem::_update_texture_filter_changed(bool p_propagate) { case Viewport::DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_NEAREST: texture_filter_cache = VS::CANVAS_ITEM_TEXTURE_FILTER_NEAREST; break; case Viewport::DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_LINEAR: texture_filter_cache = VS::CANVAS_ITEM_TEXTURE_FILTER_LINEAR; break; case Viewport::DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS: texture_filter_cache = VS::CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS; break; - case Viewport::DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIMPAMPS: texture_filter_cache = VS::CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIMPAMPS; break; + case Viewport::DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS: texture_filter_cache = VS::CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS; break; default: { } } diff --git a/scene/2d/canvas_item.h b/scene/2d/canvas_item.h index 1b0359f6ec..3cd8e6ef74 100644 --- a/scene/2d/canvas_item.h +++ b/scene/2d/canvas_item.h @@ -170,9 +170,9 @@ public: TEXTURE_FILTER_PARENT_NODE, TEXTURE_FILTER_NEAREST, TEXTURE_FILTER_LINEAR, - TEXTURE_FILTER_NEAREST_WITH_MIMPAMPS, + TEXTURE_FILTER_NEAREST_WITH_MIPMAPS, TEXTURE_FILTER_LINEAR_WITH_MIPMAPS, - TEXTURE_FILTER_NEAREST_WITH_MIMPAMPS_ANISOTROPIC, + TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC, TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC, TEXTURE_FILTER_MAX }; @@ -339,8 +339,8 @@ public: void draw_polygon(const Vector<Point2> &p_points, const Vector<Color> &p_colors, const Vector<Point2> &p_uvs = Vector<Point2>(), Ref<Texture2D> p_texture = Ref<Texture2D>(), const Ref<Texture2D> &p_normal_map = Ref<Texture2D>(), const Ref<Texture2D> &p_specular_map = Ref<Texture2D>(), const Color &p_specular_color_shininess = Color(1, 1, 1, 1), TextureFilter p_texture_filter = TEXTURE_FILTER_PARENT_NODE, TextureRepeat p_texture_repeat = TEXTURE_REPEAT_PARENT_NODE); void draw_colored_polygon(const Vector<Point2> &p_points, const Color &p_color, const Vector<Point2> &p_uvs = Vector<Point2>(), Ref<Texture2D> p_texture = Ref<Texture2D>(), const Ref<Texture2D> &p_normal_map = Ref<Texture2D>(), const Ref<Texture2D> &p_specular_map = Ref<Texture2D>(), const Color &p_specular_color_shininess = Color(1, 1, 1, 1), TextureFilter p_texture_filter = TEXTURE_FILTER_PARENT_NODE, TextureRepeat p_texture_repeat = TEXTURE_REPEAT_PARENT_NODE); - void draw_mesh(const Ref<Mesh> &p_mesh, const Ref<Texture2D> &p_texture, const Ref<Texture2D> &p_normal_map, const Ref<Texture2D> &p_specular_map = Ref<Texture2D>(), const Color &p_specular_color_shininess = Color(1, 1, 1, 1), const Transform2D &p_transform = Transform2D(), const Color &p_modulate = Color(1, 1, 1), TextureFilter p_texture_filter = TEXTURE_FILTER_PARENT_NODE, TextureRepeat p_texture_repeat = TEXTURE_REPEAT_PARENT_NODE); - void draw_multimesh(const Ref<MultiMesh> &p_multimesh, const Ref<Texture2D> &p_texture, const Ref<Texture2D> &p_normal_map, const Ref<Texture2D> &p_specular_map = Ref<Texture2D>(), const Color &p_specular_color_shininess = Color(1, 1, 1, 1), TextureFilter p_texture_filter = TEXTURE_FILTER_PARENT_NODE, TextureRepeat p_texture_repeat = TEXTURE_REPEAT_PARENT_NODE); + void draw_mesh(const Ref<Mesh> &p_mesh, const Ref<Texture2D> &p_texture, const Ref<Texture2D> &p_normal_map = Ref<Texture2D>(), const Ref<Texture2D> &p_specular_map = Ref<Texture2D>(), const Color &p_specular_color_shininess = Color(1, 1, 1, 1), const Transform2D &p_transform = Transform2D(), const Color &p_modulate = Color(1, 1, 1), TextureFilter p_texture_filter = TEXTURE_FILTER_PARENT_NODE, TextureRepeat p_texture_repeat = TEXTURE_REPEAT_PARENT_NODE); + void draw_multimesh(const Ref<MultiMesh> &p_multimesh, const Ref<Texture2D> &p_texture, const Ref<Texture2D> &p_normal_map = Ref<Texture2D>(), const Ref<Texture2D> &p_specular_map = Ref<Texture2D>(), const Color &p_specular_color_shininess = Color(1, 1, 1, 1), TextureFilter p_texture_filter = TEXTURE_FILTER_PARENT_NODE, TextureRepeat p_texture_repeat = TEXTURE_REPEAT_PARENT_NODE); void draw_string(const Ref<Font> &p_font, const Point2 &p_pos, const String &p_text, const Color &p_modulate = Color(1, 1, 1), int p_clip_w = -1); float draw_char(const Ref<Font> &p_font, const Point2 &p_pos, const String &p_char, const String &p_next = "", const Color &p_modulate = Color(1, 1, 1)); diff --git a/scene/2d/collision_polygon_2d.cpp b/scene/2d/collision_polygon_2d.cpp index d9cc94c6eb..4edf92197e 100644 --- a/scene/2d/collision_polygon_2d.cpp +++ b/scene/2d/collision_polygon_2d.cpp @@ -61,16 +61,15 @@ void CollisionPolygon2D::_build_polygon() { Ref<ConcavePolygonShape2D> concave = memnew(ConcavePolygonShape2D); - PoolVector<Vector2> segments; + Vector<Vector2> segments; segments.resize(polygon.size() * 2); - PoolVector<Vector2>::Write w = segments.write(); + Vector2 *w = segments.ptrw(); for (int i = 0; i < polygon.size(); i++) { w[(i << 1) + 0] = polygon[i]; w[(i << 1) + 1] = polygon[(i + 1) % polygon.size()]; } - w.release(); concave->set_segments(segments); parent->shape_owner_add_shape(owner_id, concave); @@ -306,10 +305,10 @@ void CollisionPolygon2D::_bind_methods() { ClassDB::bind_method(D_METHOD("get_one_way_collision_margin"), &CollisionPolygon2D::get_one_way_collision_margin); ADD_PROPERTY(PropertyInfo(Variant::INT, "build_mode", PROPERTY_HINT_ENUM, "Solids,Segments"), "set_build_mode", "get_build_mode"); - ADD_PROPERTY(PropertyInfo(Variant::POOL_VECTOR2_ARRAY, "polygon"), "set_polygon", "get_polygon"); + ADD_PROPERTY(PropertyInfo(Variant::PACKED_VECTOR2_ARRAY, "polygon"), "set_polygon", "get_polygon"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "disabled"), "set_disabled", "is_disabled"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "one_way_collision"), "set_one_way_collision", "is_one_way_collision_enabled"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "one_way_collision_margin", PROPERTY_HINT_RANGE, "0,128,0.1"), "set_one_way_collision_margin", "get_one_way_collision_margin"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "one_way_collision_margin", PROPERTY_HINT_RANGE, "0,128,0.1"), "set_one_way_collision_margin", "get_one_way_collision_margin"); BIND_ENUM_CONSTANT(BUILD_SOLIDS); BIND_ENUM_CONSTANT(BUILD_SEGMENTS); diff --git a/scene/2d/collision_shape_2d.cpp b/scene/2d/collision_shape_2d.cpp index bb975350a6..d37f8c5caa 100644 --- a/scene/2d/collision_shape_2d.cpp +++ b/scene/2d/collision_shape_2d.cpp @@ -149,7 +149,7 @@ void CollisionShape2D::_notification(int p_what) { void CollisionShape2D::set_shape(const Ref<Shape2D> &p_shape) { if (shape.is_valid()) - shape->disconnect("changed", this, "_shape_changed"); + shape->disconnect_compat("changed", this, "_shape_changed"); shape = p_shape; update(); if (parent) { @@ -160,7 +160,7 @@ void CollisionShape2D::set_shape(const Ref<Shape2D> &p_shape) { } if (shape.is_valid()) - shape->connect("changed", this, "_shape_changed"); + shape->connect_compat("changed", this, "_shape_changed"); update_configuration_warning(); } @@ -242,7 +242,7 @@ void CollisionShape2D::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "shape", PROPERTY_HINT_RESOURCE_TYPE, "Shape2D"), "set_shape", "get_shape"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "disabled"), "set_disabled", "is_disabled"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "one_way_collision"), "set_one_way_collision", "is_one_way_collision_enabled"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "one_way_collision_margin", PROPERTY_HINT_RANGE, "0,128,0.1"), "set_one_way_collision_margin", "get_one_way_collision_margin"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "one_way_collision_margin", PROPERTY_HINT_RANGE, "0,128,0.1"), "set_one_way_collision_margin", "get_one_way_collision_margin"); } CollisionShape2D::CollisionShape2D() { diff --git a/scene/2d/cpu_particles_2d.cpp b/scene/2d/cpu_particles_2d.cpp index 449951bc6c..35df6c8945 100644 --- a/scene/2d/cpu_particles_2d.cpp +++ b/scene/2d/cpu_particles_2d.cpp @@ -51,7 +51,7 @@ void CPUParticles2D::set_amount(int p_amount) { particles.resize(p_amount); { - PoolVector<Particle>::Write w = particles.write(); + Particle *w = particles.ptrw(); for (int i = 0; i < p_amount; i++) { w[i].active = false; @@ -163,12 +163,12 @@ void CPUParticles2D::_update_mesh_texture() { } else { tex_size = Size2(1, 1); } - PoolVector<Vector2> vertices; + Vector<Vector2> vertices; vertices.push_back(-tex_size * 0.5); vertices.push_back(-tex_size * 0.5 + Vector2(tex_size.x, 0)); vertices.push_back(-tex_size * 0.5 + Vector2(tex_size.x, tex_size.y)); vertices.push_back(-tex_size * 0.5 + Vector2(0, tex_size.y)); - PoolVector<Vector2> uvs; + Vector<Vector2> uvs; AtlasTexture *atlas_texure = Object::cast_to<AtlasTexture>(*texture); if (atlas_texure && atlas_texure->get_atlas().is_valid()) { Rect2 region_rect = atlas_texure->get_region(); @@ -183,12 +183,12 @@ void CPUParticles2D::_update_mesh_texture() { uvs.push_back(Vector2(1, 1)); uvs.push_back(Vector2(0, 1)); } - PoolVector<Color> colors; + Vector<Color> colors; colors.push_back(Color(1, 1, 1, 1)); colors.push_back(Color(1, 1, 1, 1)); colors.push_back(Color(1, 1, 1, 1)); colors.push_back(Color(1, 1, 1, 1)); - PoolVector<int> indices; + Vector<int> indices; indices.push_back(0); indices.push_back(1); indices.push_back(2); @@ -212,12 +212,12 @@ void CPUParticles2D::set_texture(const Ref<Texture2D> &p_texture) { return; if (texture.is_valid()) - texture->disconnect(CoreStringNames::get_singleton()->changed, this, "_texture_changed"); + texture->disconnect_compat(CoreStringNames::get_singleton()->changed, this, "_texture_changed"); texture = p_texture; if (texture.is_valid()) - texture->connect(CoreStringNames::get_singleton()->changed, this, "_texture_changed"); + texture->connect_compat(CoreStringNames::get_singleton()->changed, this, "_texture_changed"); update(); _update_mesh_texture(); @@ -291,7 +291,7 @@ void CPUParticles2D::restart() { { int pc = particles.size(); - PoolVector<Particle>::Write w = particles.write(); + Particle *w = particles.ptrw(); for (int i = 0; i < pc; i++) { w[i].active = false; @@ -455,17 +455,17 @@ void CPUParticles2D::set_emission_rect_extents(Vector2 p_extents) { emission_rect_extents = p_extents; } -void CPUParticles2D::set_emission_points(const PoolVector<Vector2> &p_points) { +void CPUParticles2D::set_emission_points(const Vector<Vector2> &p_points) { emission_points = p_points; } -void CPUParticles2D::set_emission_normals(const PoolVector<Vector2> &p_normals) { +void CPUParticles2D::set_emission_normals(const Vector<Vector2> &p_normals) { emission_normals = p_normals; } -void CPUParticles2D::set_emission_colors(const PoolVector<Color> &p_colors) { +void CPUParticles2D::set_emission_colors(const Vector<Color> &p_colors) { emission_colors = p_colors; } @@ -478,16 +478,16 @@ Vector2 CPUParticles2D::get_emission_rect_extents() const { return emission_rect_extents; } -PoolVector<Vector2> CPUParticles2D::get_emission_points() const { +Vector<Vector2> CPUParticles2D::get_emission_points() const { return emission_points; } -PoolVector<Vector2> CPUParticles2D::get_emission_normals() const { +Vector<Vector2> CPUParticles2D::get_emission_normals() const { return emission_normals; } -PoolVector<Color> CPUParticles2D::get_emission_colors() const { +Vector<Color> CPUParticles2D::get_emission_colors() const { return emission_colors; } @@ -630,9 +630,9 @@ void CPUParticles2D::_particles_process(float p_delta) { p_delta *= speed_scale; int pcount = particles.size(); - PoolVector<Particle>::Write w = particles.write(); + Particle *w = particles.ptrw(); - Particle *parray = w.ptr(); + Particle *parray = w; float prev_time = time; time += p_delta; @@ -978,23 +978,23 @@ void CPUParticles2D::_update_particle_data_buffer() { int pc = particles.size(); - PoolVector<int>::Write ow; + int *ow; int *order = NULL; - PoolVector<float>::Write w = particle_data.write(); - PoolVector<Particle>::Read r = particles.read(); - float *ptr = w.ptr(); + float *w = particle_data.ptrw(); + const Particle *r = particles.ptr(); + float *ptr = w; if (draw_order != DRAW_ORDER_INDEX) { - ow = particle_order.write(); - order = ow.ptr(); + ow = particle_order.ptrw(); + order = ow; for (int i = 0; i < pc; i++) { order[i] = i; } if (draw_order == DRAW_ORDER_LIFETIME) { SortArray<int, SortLifetime> sorter; - sorter.compare.particles = r.ptr(); + sorter.compare.particles = r; sorter.sort(order, pc); } } @@ -1053,13 +1053,13 @@ void CPUParticles2D::_set_redraw(bool p_redraw) { update_mutex->lock(); #endif if (redraw) { - VS::get_singleton()->connect("frame_pre_draw", this, "_update_render_thread"); + VS::get_singleton()->connect_compat("frame_pre_draw", this, "_update_render_thread"); VS::get_singleton()->canvas_item_set_update_when_visible(get_canvas_item(), true); VS::get_singleton()->multimesh_set_visible_instances(multimesh, -1); } else { - if (VS::get_singleton()->is_connected("frame_pre_draw", this, "_update_render_thread")) { - VS::get_singleton()->disconnect("frame_pre_draw", this, "_update_render_thread"); + if (VS::get_singleton()->is_connected_compat("frame_pre_draw", this, "_update_render_thread")) { + VS::get_singleton()->disconnect_compat("frame_pre_draw", this, "_update_render_thread"); } VS::get_singleton()->canvas_item_set_update_when_visible(get_canvas_item(), false); @@ -1127,9 +1127,9 @@ void CPUParticles2D::_notification(int p_what) { int pc = particles.size(); - PoolVector<float>::Write w = particle_data.write(); - PoolVector<Particle>::Read r = particles.read(); - float *ptr = w.ptr(); + float *w = particle_data.ptrw(); + const Particle *r = particles.ptr(); + float *ptr = w; for (int i = 0; i < pc; i++) { @@ -1273,13 +1273,13 @@ void CPUParticles2D::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::BOOL, "emitting"), "set_emitting", "is_emitting"); ADD_PROPERTY(PropertyInfo(Variant::INT, "amount", PROPERTY_HINT_EXP_RANGE, "1,1000000,1"), "set_amount", "get_amount"); ADD_GROUP("Time", ""); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "lifetime", PROPERTY_HINT_RANGE, "0.01,600.0,0.01,or_greater"), "set_lifetime", "get_lifetime"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "lifetime", PROPERTY_HINT_RANGE, "0.01,600.0,0.01,or_greater"), "set_lifetime", "get_lifetime"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "one_shot"), "set_one_shot", "get_one_shot"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "preprocess", PROPERTY_HINT_RANGE, "0.00,600.0,0.01"), "set_pre_process_time", "get_pre_process_time"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "speed_scale", PROPERTY_HINT_RANGE, "0,64,0.01"), "set_speed_scale", "get_speed_scale"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "explosiveness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_explosiveness_ratio", "get_explosiveness_ratio"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "randomness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_randomness_ratio", "get_randomness_ratio"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "lifetime_randomness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_lifetime_randomness", "get_lifetime_randomness"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "preprocess", PROPERTY_HINT_RANGE, "0.00,600.0,0.01"), "set_pre_process_time", "get_pre_process_time"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "speed_scale", PROPERTY_HINT_RANGE, "0,64,0.01"), "set_speed_scale", "get_speed_scale"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "explosiveness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_explosiveness_ratio", "get_explosiveness_ratio"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "randomness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_randomness_ratio", "get_randomness_ratio"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "lifetime_randomness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_lifetime_randomness", "get_lifetime_randomness"); ADD_PROPERTY(PropertyInfo(Variant::INT, "fixed_fps", PROPERTY_HINT_RANGE, "0,1000,1"), "set_fixed_fps", "get_fixed_fps"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "fract_delta"), "set_fractional_delta", "get_fractional_delta"); ADD_GROUP("Drawing", ""); @@ -1346,67 +1346,67 @@ void CPUParticles2D::_bind_methods() { ADD_GROUP("Emission Shape", "emission_"); ADD_PROPERTY(PropertyInfo(Variant::INT, "emission_shape", PROPERTY_HINT_ENUM, "Point,Sphere,Box,Points,Directed Points"), "set_emission_shape", "get_emission_shape"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "emission_sphere_radius", PROPERTY_HINT_RANGE, "0.01,128,0.01"), "set_emission_sphere_radius", "get_emission_sphere_radius"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "emission_sphere_radius", PROPERTY_HINT_RANGE, "0.01,128,0.01"), "set_emission_sphere_radius", "get_emission_sphere_radius"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "emission_rect_extents"), "set_emission_rect_extents", "get_emission_rect_extents"); - ADD_PROPERTY(PropertyInfo(Variant::POOL_VECTOR2_ARRAY, "emission_points"), "set_emission_points", "get_emission_points"); - ADD_PROPERTY(PropertyInfo(Variant::POOL_VECTOR2_ARRAY, "emission_normals"), "set_emission_normals", "get_emission_normals"); - ADD_PROPERTY(PropertyInfo(Variant::POOL_COLOR_ARRAY, "emission_colors"), "set_emission_colors", "get_emission_colors"); + ADD_PROPERTY(PropertyInfo(Variant::PACKED_VECTOR2_ARRAY, "emission_points"), "set_emission_points", "get_emission_points"); + ADD_PROPERTY(PropertyInfo(Variant::PACKED_VECTOR2_ARRAY, "emission_normals"), "set_emission_normals", "get_emission_normals"); + ADD_PROPERTY(PropertyInfo(Variant::PACKED_COLOR_ARRAY, "emission_colors"), "set_emission_colors", "get_emission_colors"); ADD_GROUP("Flags", "flag_"); ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "flag_align_y"), "set_particle_flag", "get_particle_flag", FLAG_ALIGN_Y_TO_VELOCITY); ADD_GROUP("Direction", ""); ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "direction"), "set_direction", "get_direction"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "spread", PROPERTY_HINT_RANGE, "0,180,0.01"), "set_spread", "get_spread"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "spread", PROPERTY_HINT_RANGE, "0,180,0.01"), "set_spread", "get_spread"); ADD_GROUP("Gravity", ""); ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "gravity"), "set_gravity", "get_gravity"); ADD_GROUP("Initial Velocity", "initial_"); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "initial_velocity", PROPERTY_HINT_RANGE, "0,1000,0.01,or_greater"), "set_param", "get_param", PARAM_INITIAL_LINEAR_VELOCITY); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "initial_velocity_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_INITIAL_LINEAR_VELOCITY); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "initial_velocity", PROPERTY_HINT_RANGE, "0,1000,0.01,or_greater"), "set_param", "get_param", PARAM_INITIAL_LINEAR_VELOCITY); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "initial_velocity_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_INITIAL_LINEAR_VELOCITY); ADD_GROUP("Angular Velocity", "angular_"); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_velocity", PROPERTY_HINT_RANGE, "-720,720,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_ANGULAR_VELOCITY); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_velocity_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANGULAR_VELOCITY); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_velocity", PROPERTY_HINT_RANGE, "-720,720,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_ANGULAR_VELOCITY); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_velocity_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANGULAR_VELOCITY); ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "angular_velocity_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_ANGULAR_VELOCITY); ADD_GROUP("Orbit Velocity", "orbit_"); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "orbit_velocity", PROPERTY_HINT_RANGE, "-1000,1000,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_ORBIT_VELOCITY); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "orbit_velocity_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ORBIT_VELOCITY); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "orbit_velocity", PROPERTY_HINT_RANGE, "-1000,1000,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_ORBIT_VELOCITY); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "orbit_velocity_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ORBIT_VELOCITY); ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "orbit_velocity_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_ORBIT_VELOCITY); ADD_GROUP("Linear Accel", "linear_"); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_accel", PROPERTY_HINT_RANGE, "-100,100,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_LINEAR_ACCEL); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_accel_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_LINEAR_ACCEL); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_accel", PROPERTY_HINT_RANGE, "-100,100,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_LINEAR_ACCEL); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_accel_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_LINEAR_ACCEL); ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "linear_accel_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_LINEAR_ACCEL); ADD_GROUP("Radial Accel", "radial_"); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "radial_accel", PROPERTY_HINT_RANGE, "-100,100,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_RADIAL_ACCEL); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "radial_accel_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_RADIAL_ACCEL); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "radial_accel", PROPERTY_HINT_RANGE, "-100,100,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_RADIAL_ACCEL); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "radial_accel_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_RADIAL_ACCEL); ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "radial_accel_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_RADIAL_ACCEL); ADD_GROUP("Tangential Accel", "tangential_"); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "tangential_accel", PROPERTY_HINT_RANGE, "-100,100,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_TANGENTIAL_ACCEL); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "tangential_accel_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_TANGENTIAL_ACCEL); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "tangential_accel", PROPERTY_HINT_RANGE, "-100,100,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_TANGENTIAL_ACCEL); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "tangential_accel_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_TANGENTIAL_ACCEL); ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "tangential_accel_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_TANGENTIAL_ACCEL); ADD_GROUP("Damping", ""); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "damping", PROPERTY_HINT_RANGE, "0,100,0.01"), "set_param", "get_param", PARAM_DAMPING); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "damping_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_DAMPING); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "damping", PROPERTY_HINT_RANGE, "0,100,0.01"), "set_param", "get_param", PARAM_DAMPING); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "damping_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_DAMPING); ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "damping_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_DAMPING); ADD_GROUP("Angle", ""); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angle", PROPERTY_HINT_RANGE, "-720,720,0.1,or_lesser,or_greater"), "set_param", "get_param", PARAM_ANGLE); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angle_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANGLE); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angle", PROPERTY_HINT_RANGE, "-720,720,0.1,or_lesser,or_greater"), "set_param", "get_param", PARAM_ANGLE); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angle_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANGLE); ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "angle_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_ANGLE); ADD_GROUP("Scale", ""); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "scale_amount", PROPERTY_HINT_RANGE, "0,1000,0.01,or_greater"), "set_param", "get_param", PARAM_SCALE); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "scale_amount_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_SCALE); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "scale_amount", PROPERTY_HINT_RANGE, "0,1000,0.01,or_greater"), "set_param", "get_param", PARAM_SCALE); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "scale_amount_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_SCALE); ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "scale_amount_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_SCALE); ADD_GROUP("Color", ""); ADD_PROPERTY(PropertyInfo(Variant::COLOR, "color"), "set_color", "get_color"); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "color_ramp", PROPERTY_HINT_RESOURCE_TYPE, "Gradient"), "set_color_ramp", "get_color_ramp"); ADD_GROUP("Hue Variation", "hue_"); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "hue_variation", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_param", "get_param", PARAM_HUE_VARIATION); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "hue_variation_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_HUE_VARIATION); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "hue_variation", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_param", "get_param", PARAM_HUE_VARIATION); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "hue_variation_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_HUE_VARIATION); ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "hue_variation_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_HUE_VARIATION); ADD_GROUP("Animation", "anim_"); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "anim_speed", PROPERTY_HINT_RANGE, "0,128,0.01,or_greater"), "set_param", "get_param", PARAM_ANIM_SPEED); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "anim_speed_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANIM_SPEED); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "anim_speed", PROPERTY_HINT_RANGE, "0,128,0.01,or_greater"), "set_param", "get_param", PARAM_ANIM_SPEED); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "anim_speed_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANIM_SPEED); ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "anim_speed_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_ANIM_SPEED); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "anim_offset", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param", "get_param", PARAM_ANIM_OFFSET); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "anim_offset_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANIM_OFFSET); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "anim_offset", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param", "get_param", PARAM_ANIM_OFFSET); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "anim_offset_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANIM_OFFSET); ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "anim_offset_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_ANIM_OFFSET); BIND_ENUM_CONSTANT(PARAM_INITIAL_LINEAR_VELOCITY); diff --git a/scene/2d/cpu_particles_2d.h b/scene/2d/cpu_particles_2d.h index 5eb563bbbc..6f85631fe1 100644 --- a/scene/2d/cpu_particles_2d.h +++ b/scene/2d/cpu_particles_2d.h @@ -108,9 +108,9 @@ private: RID mesh; RID multimesh; - PoolVector<Particle> particles; - PoolVector<float> particle_data; - PoolVector<int> particle_order; + Vector<Particle> particles; + Vector<float> particle_data; + Vector<int> particle_order; struct SortLifetime { const Particle *particles; @@ -167,9 +167,9 @@ private: EmissionShape emission_shape; float emission_sphere_radius; Vector2 emission_rect_extents; - PoolVector<Vector2> emission_points; - PoolVector<Vector2> emission_normals; - PoolVector<Color> emission_colors; + Vector<Vector2> emission_points; + Vector<Vector2> emission_normals; + Vector<Color> emission_colors; int emission_point_count; Vector2 gravity; @@ -265,17 +265,17 @@ public: void set_emission_shape(EmissionShape p_shape); void set_emission_sphere_radius(float p_radius); void set_emission_rect_extents(Vector2 p_extents); - void set_emission_points(const PoolVector<Vector2> &p_points); - void set_emission_normals(const PoolVector<Vector2> &p_normals); - void set_emission_colors(const PoolVector<Color> &p_colors); + void set_emission_points(const Vector<Vector2> &p_points); + void set_emission_normals(const Vector<Vector2> &p_normals); + void set_emission_colors(const Vector<Color> &p_colors); void set_emission_point_count(int p_count); EmissionShape get_emission_shape() const; float get_emission_sphere_radius() const; Vector2 get_emission_rect_extents() const; - PoolVector<Vector2> get_emission_points() const; - PoolVector<Vector2> get_emission_normals() const; - PoolVector<Color> get_emission_colors() const; + Vector<Vector2> get_emission_points() const; + Vector<Vector2> get_emission_normals() const; + Vector<Color> get_emission_colors() const; int get_emission_point_count() const; void set_gravity(const Vector2 &p_gravity); diff --git a/scene/2d/joints_2d.cpp b/scene/2d/joints_2d.cpp index 656ff45654..9cc9ab25ac 100644 --- a/scene/2d/joints_2d.cpp +++ b/scene/2d/joints_2d.cpp @@ -158,7 +158,7 @@ void Joint2D::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::NODE_PATH, "node_a", PROPERTY_HINT_NODE_PATH_VALID_TYPES, "CollisionObject2D"), "set_node_a", "get_node_a"); ADD_PROPERTY(PropertyInfo(Variant::NODE_PATH, "node_b", PROPERTY_HINT_NODE_PATH_VALID_TYPES, "CollisionObject2D"), "set_node_b", "get_node_b"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "bias", PROPERTY_HINT_RANGE, "0,0.9,0.001"), "set_bias", "get_bias"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "bias", PROPERTY_HINT_RANGE, "0,0.9,0.001"), "set_bias", "get_bias"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "disable_collision"), "set_exclude_nodes_from_collision", "get_exclude_nodes_from_collision"); } @@ -215,7 +215,7 @@ void PinJoint2D::_bind_methods() { ClassDB::bind_method(D_METHOD("set_softness", "softness"), &PinJoint2D::set_softness); ClassDB::bind_method(D_METHOD("get_softness"), &PinJoint2D::get_softness); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "softness", PROPERTY_HINT_EXP_RANGE, "0.00,16,0.01"), "set_softness", "get_softness"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "softness", PROPERTY_HINT_EXP_RANGE, "0.00,16,0.01"), "set_softness", "get_softness"); } PinJoint2D::PinJoint2D() { @@ -285,8 +285,8 @@ void GrooveJoint2D::_bind_methods() { ClassDB::bind_method(D_METHOD("set_initial_offset", "offset"), &GrooveJoint2D::set_initial_offset); ClassDB::bind_method(D_METHOD("get_initial_offset"), &GrooveJoint2D::get_initial_offset); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "length", PROPERTY_HINT_EXP_RANGE, "1,65535,1"), "set_length", "get_length"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "initial_offset", PROPERTY_HINT_EXP_RANGE, "1,65535,1"), "set_initial_offset", "get_initial_offset"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "length", PROPERTY_HINT_EXP_RANGE, "1,65535,1"), "set_length", "get_length"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "initial_offset", PROPERTY_HINT_EXP_RANGE, "1,65535,1"), "set_initial_offset", "get_initial_offset"); } GrooveJoint2D::GrooveJoint2D() { @@ -394,10 +394,10 @@ void DampedSpringJoint2D::_bind_methods() { ClassDB::bind_method(D_METHOD("set_damping", "damping"), &DampedSpringJoint2D::set_damping); ClassDB::bind_method(D_METHOD("get_damping"), &DampedSpringJoint2D::get_damping); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "length", PROPERTY_HINT_EXP_RANGE, "1,65535,1"), "set_length", "get_length"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "rest_length", PROPERTY_HINT_EXP_RANGE, "0,65535,1"), "set_rest_length", "get_rest_length"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "stiffness", PROPERTY_HINT_EXP_RANGE, "0.1,64,0.1"), "set_stiffness", "get_stiffness"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "damping", PROPERTY_HINT_EXP_RANGE, "0.01,16,0.01"), "set_damping", "get_damping"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "length", PROPERTY_HINT_EXP_RANGE, "1,65535,1"), "set_length", "get_length"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "rest_length", PROPERTY_HINT_EXP_RANGE, "0,65535,1"), "set_rest_length", "get_rest_length"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "stiffness", PROPERTY_HINT_EXP_RANGE, "0.1,64,0.1"), "set_stiffness", "get_stiffness"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "damping", PROPERTY_HINT_EXP_RANGE, "0.01,16,0.01"), "set_damping", "get_damping"); } DampedSpringJoint2D::DampedSpringJoint2D() { diff --git a/scene/2d/light_2d.cpp b/scene/2d/light_2d.cpp index 0b66d34ece..e61b1fa339 100644 --- a/scene/2d/light_2d.cpp +++ b/scene/2d/light_2d.cpp @@ -426,12 +426,12 @@ void Light2D::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::BOOL, "editor_only"), "set_editor_only", "is_editor_only"); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"), "set_texture", "get_texture"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "offset"), "set_texture_offset", "get_texture_offset"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "texture_scale", PROPERTY_HINT_RANGE, "0.01,50,0.01"), "set_texture_scale", "get_texture_scale"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "texture_scale", PROPERTY_HINT_RANGE, "0.01,50,0.01"), "set_texture_scale", "get_texture_scale"); ADD_PROPERTY(PropertyInfo(Variant::COLOR, "color"), "set_color", "get_color"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "energy", PROPERTY_HINT_RANGE, "0,16,0.01,or_greater"), "set_energy", "get_energy"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "energy", PROPERTY_HINT_RANGE, "0,16,0.01,or_greater"), "set_energy", "get_energy"); ADD_PROPERTY(PropertyInfo(Variant::INT, "mode", PROPERTY_HINT_ENUM, "Add,Sub,Mix,Mask"), "set_mode", "get_mode"); ADD_GROUP("Range", "range_"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "range_height", PROPERTY_HINT_RANGE, "-2048,2048,0.1,or_lesser,or_greater"), "set_height", "get_height"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "range_height", PROPERTY_HINT_RANGE, "-2048,2048,0.1,or_lesser,or_greater"), "set_height", "get_height"); ADD_PROPERTY(PropertyInfo(Variant::INT, "range_z_min", PROPERTY_HINT_RANGE, itos(VS::CANVAS_ITEM_Z_MIN) + "," + itos(VS::CANVAS_ITEM_Z_MAX) + ",1"), "set_z_range_min", "get_z_range_min"); ADD_PROPERTY(PropertyInfo(Variant::INT, "range_z_max", PROPERTY_HINT_RANGE, itos(VS::CANVAS_ITEM_Z_MIN) + "," + itos(VS::CANVAS_ITEM_Z_MAX) + ",1"), "set_z_range_max", "get_z_range_max"); ADD_PROPERTY(PropertyInfo(Variant::INT, "range_layer_min", PROPERTY_HINT_RANGE, "-512,512,1"), "set_layer_range_min", "get_layer_range_min"); @@ -443,7 +443,7 @@ void Light2D::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::COLOR, "shadow_color"), "set_shadow_color", "get_shadow_color"); ADD_PROPERTY(PropertyInfo(Variant::INT, "shadow_buffer_size", PROPERTY_HINT_RANGE, "32,16384,1"), "set_shadow_buffer_size", "get_shadow_buffer_size"); ADD_PROPERTY(PropertyInfo(Variant::INT, "shadow_filter", PROPERTY_HINT_ENUM, "None,PCF5,PCF13"), "set_shadow_filter", "get_shadow_filter"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "shadow_filter_smooth", PROPERTY_HINT_RANGE, "0,64,0.1"), "set_shadow_smooth", "get_shadow_smooth"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "shadow_filter_smooth", PROPERTY_HINT_RANGE, "0,64,0.1"), "set_shadow_smooth", "get_shadow_smooth"); ADD_PROPERTY(PropertyInfo(Variant::INT, "shadow_item_cull_mask", PROPERTY_HINT_LAYERS_2D_RENDER), "set_item_shadow_cull_mask", "get_item_shadow_cull_mask"); BIND_ENUM_CONSTANT(MODE_ADD); diff --git a/scene/2d/light_occluder_2d.cpp b/scene/2d/light_occluder_2d.cpp index 0e8e8f6679..019eeb9563 100644 --- a/scene/2d/light_occluder_2d.cpp +++ b/scene/2d/light_occluder_2d.cpp @@ -39,7 +39,7 @@ Rect2 OccluderPolygon2D::_edit_get_rect() const { if (rect_cache_dirty) { if (closed) { - PoolVector<Vector2>::Read r = polygon.read(); + const Vector2 *r = polygon.ptr(); item_rect = Rect2(); for (int i = 0; i < polygon.size(); i++) { Vector2 pos = r[i]; @@ -72,7 +72,7 @@ bool OccluderPolygon2D::_edit_is_selected_on_click(const Point2 &p_point, double return Geometry::is_point_in_polygon(p_point, Variant(polygon)); } else { const real_t d = LINE_GRAB_WIDTH / 2 + p_tolerance; - PoolVector<Vector2>::Read points = polygon.read(); + const Vector2 *points = polygon.ptr(); for (int i = 0; i < polygon.size() - 1; i++) { Vector2 p = Geometry::get_closest_point_to_segment_2d(p_point, &points[i]); if (p.distance_to(p_point) <= d) @@ -84,7 +84,7 @@ bool OccluderPolygon2D::_edit_is_selected_on_click(const Point2 &p_point, double } #endif -void OccluderPolygon2D::set_polygon(const PoolVector<Vector2> &p_polygon) { +void OccluderPolygon2D::set_polygon(const Vector<Vector2> &p_polygon) { polygon = p_polygon; rect_cache_dirty = true; @@ -92,7 +92,7 @@ void OccluderPolygon2D::set_polygon(const PoolVector<Vector2> &p_polygon) { emit_changed(); } -PoolVector<Vector2> OccluderPolygon2D::get_polygon() const { +Vector<Vector2> OccluderPolygon2D::get_polygon() const { return polygon; } @@ -141,7 +141,7 @@ void OccluderPolygon2D::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::BOOL, "closed"), "set_closed", "is_closed"); ADD_PROPERTY(PropertyInfo(Variant::INT, "cull_mode", PROPERTY_HINT_ENUM, "Disabled,ClockWise,CounterClockWise"), "set_cull_mode", "get_cull_mode"); - ADD_PROPERTY(PropertyInfo(Variant::POOL_VECTOR2_ARRAY, "polygon"), "set_polygon", "get_polygon"); + ADD_PROPERTY(PropertyInfo(Variant::PACKED_VECTOR2_ARRAY, "polygon"), "set_polygon", "get_polygon"); BIND_ENUM_CONSTANT(CULL_DISABLED); BIND_ENUM_CONSTANT(CULL_CLOCKWISE); @@ -191,7 +191,7 @@ void LightOccluder2D::_notification(int p_what) { if (occluder_polygon.is_valid()) { - PoolVector<Vector2> poly = occluder_polygon->get_polygon(); + Vector<Vector2> poly = occluder_polygon->get_polygon(); if (poly.size()) { if (occluder_polygon->is_closed()) { @@ -201,7 +201,7 @@ void LightOccluder2D::_notification(int p_what) { } else { int ps = poly.size(); - PoolVector<Vector2>::Read r = poly.read(); + const Vector2 *r = poly.ptr(); for (int i = 0; i < ps - 1; i++) { draw_line(r[i], r[i + 1], Color(0, 0, 0, 0.6), 3); @@ -234,7 +234,7 @@ void LightOccluder2D::set_occluder_polygon(const Ref<OccluderPolygon2D> &p_polyg #ifdef DEBUG_ENABLED if (occluder_polygon.is_valid()) - occluder_polygon->disconnect("changed", this, "_poly_changed"); + occluder_polygon->disconnect_compat("changed", this, "_poly_changed"); #endif occluder_polygon = p_polygon; @@ -245,7 +245,7 @@ void LightOccluder2D::set_occluder_polygon(const Ref<OccluderPolygon2D> &p_polyg #ifdef DEBUG_ENABLED if (occluder_polygon.is_valid()) - occluder_polygon->connect("changed", this, "_poly_changed"); + occluder_polygon->connect_compat("changed", this, "_poly_changed"); update(); #endif } diff --git a/scene/2d/light_occluder_2d.h b/scene/2d/light_occluder_2d.h index b20e347c35..83702f2875 100644 --- a/scene/2d/light_occluder_2d.h +++ b/scene/2d/light_occluder_2d.h @@ -46,7 +46,7 @@ public: private: RID occ_polygon; - PoolVector<Vector2> polygon; + Vector<Vector2> polygon; bool closed; CullMode cull; @@ -62,8 +62,8 @@ public: virtual bool _edit_is_selected_on_click(const Point2 &p_point, double p_tolerance) const; #endif - void set_polygon(const PoolVector<Vector2> &p_polygon); - PoolVector<Vector2> get_polygon() const; + void set_polygon(const Vector<Vector2> &p_polygon); + Vector<Vector2> get_polygon() const; void set_closed(bool p_closed); bool is_closed() const; diff --git a/scene/2d/line_2d.cpp b/scene/2d/line_2d.cpp index 92d06d6056..dd0af21c16 100644 --- a/scene/2d/line_2d.cpp +++ b/scene/2d/line_2d.cpp @@ -71,7 +71,7 @@ bool Line2D::_edit_use_rect() const { bool Line2D::_edit_is_selected_on_click(const Point2 &p_point, double p_tolerance) const { const real_t d = _width / 2 + p_tolerance; - PoolVector<Vector2>::Read points = _points.read(); + const Vector2 *points = _points.ptr(); for (int i = 0; i < _points.size() - 1; i++) { Vector2 p = Geometry::get_closest_point_to_segment_2d(p_point, &points[i]); if (p.distance_to(p_point) <= d) @@ -82,7 +82,7 @@ bool Line2D::_edit_is_selected_on_click(const Point2 &p_point, double p_toleranc } #endif -void Line2D::set_points(const PoolVector<Vector2> &p_points) { +void Line2D::set_points(const Vector<Vector2> &p_points) { _points = p_points; update(); } @@ -101,14 +101,14 @@ float Line2D::get_width() const { void Line2D::set_curve(const Ref<Curve> &p_curve) { // Cleanup previous connection if any if (_curve.is_valid()) { - _curve->disconnect(CoreStringNames::get_singleton()->changed, this, "_curve_changed"); + _curve->disconnect_compat(CoreStringNames::get_singleton()->changed, this, "_curve_changed"); } _curve = p_curve; // Connect to the curve so the line will update when it is changed if (_curve.is_valid()) { - _curve->connect(CoreStringNames::get_singleton()->changed, this, "_curve_changed"); + _curve->connect_compat(CoreStringNames::get_singleton()->changed, this, "_curve_changed"); } update(); @@ -118,7 +118,7 @@ Ref<Curve> Line2D::get_curve() const { return _curve; } -PoolVector<Vector2> Line2D::get_points() const { +Vector<Vector2> Line2D::get_points() const { return _points; } @@ -146,7 +146,7 @@ void Line2D::clear_points() { void Line2D::add_point(Vector2 p_pos, int p_atpos) { if (p_atpos < 0 || _points.size() < p_atpos) { - _points.append(p_pos); + _points.push_back(p_pos); } else { _points.insert(p_atpos, p_pos); } @@ -171,14 +171,14 @@ void Line2D::set_gradient(const Ref<Gradient> &p_gradient) { // Cleanup previous connection if any if (_gradient.is_valid()) { - _gradient->disconnect(CoreStringNames::get_singleton()->changed, this, "_gradient_changed"); + _gradient->disconnect_compat(CoreStringNames::get_singleton()->changed, this, "_gradient_changed"); } _gradient = p_gradient; // Connect to the gradient so the line will update when the ColorRamp is changed if (_gradient.is_valid()) { - _gradient->connect(CoreStringNames::get_singleton()->changed, this, "_gradient_changed"); + _gradient->connect_compat(CoreStringNames::get_singleton()->changed, this, "_gradient_changed"); } update(); @@ -282,7 +282,7 @@ void Line2D::_draw() { points.resize(_points.size()); int len = points.size(); { - PoolVector<Vector2>::Read points_read = _points.read(); + const Vector2 *points_read = _points.ptr(); for (int i = 0; i < len; ++i) { points.write[i] = points_read[i]; } @@ -400,8 +400,8 @@ void Line2D::_bind_methods() { ClassDB::bind_method(D_METHOD("set_antialiased", "antialiased"), &Line2D::set_antialiased); ClassDB::bind_method(D_METHOD("get_antialiased"), &Line2D::get_antialiased); - ADD_PROPERTY(PropertyInfo(Variant::POOL_VECTOR2_ARRAY, "points"), "set_points", "get_points"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "width"), "set_width", "get_width"); + ADD_PROPERTY(PropertyInfo(Variant::PACKED_VECTOR2_ARRAY, "points"), "set_points", "get_points"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "width"), "set_width", "get_width"); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "width_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_curve", "get_curve"); ADD_PROPERTY(PropertyInfo(Variant::COLOR, "default_color"), "set_default_color", "get_default_color"); ADD_GROUP("Fill", ""); @@ -413,7 +413,7 @@ void Line2D::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::INT, "begin_cap_mode", PROPERTY_HINT_ENUM, "None,Box,Round"), "set_begin_cap_mode", "get_begin_cap_mode"); ADD_PROPERTY(PropertyInfo(Variant::INT, "end_cap_mode", PROPERTY_HINT_ENUM, "None,Box,Round"), "set_end_cap_mode", "get_end_cap_mode"); ADD_GROUP("Border", ""); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "sharp_limit"), "set_sharp_limit", "get_sharp_limit"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "sharp_limit"), "set_sharp_limit", "get_sharp_limit"); ADD_PROPERTY(PropertyInfo(Variant::INT, "round_precision"), "set_round_precision", "get_round_precision"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "antialiased"), "set_antialiased", "get_antialiased"); diff --git a/scene/2d/line_2d.h b/scene/2d/line_2d.h index b7e7f59403..51706befdb 100644 --- a/scene/2d/line_2d.h +++ b/scene/2d/line_2d.h @@ -64,8 +64,8 @@ public: Line2D(); - void set_points(const PoolVector<Vector2> &p_points); - PoolVector<Vector2> get_points() const; + void set_points(const Vector<Vector2> &p_points); + Vector<Vector2> get_points() const; void set_point_position(int i, Vector2 pos); Vector2 get_point_position(int i) const; @@ -124,7 +124,7 @@ private: void _curve_changed(); private: - PoolVector<Vector2> _points; + Vector<Vector2> _points; LineJointMode _joint_mode; LineCapMode _begin_cap_mode; LineCapMode _end_cap_mode; diff --git a/scene/2d/navigation_2d.cpp b/scene/2d/navigation_2d.cpp index de01d97ad9..bbabfa16c7 100644 --- a/scene/2d/navigation_2d.cpp +++ b/scene/2d/navigation_2d.cpp @@ -35,6 +35,8 @@ void Navigation2D::_bind_methods() { ClassDB::bind_method(D_METHOD("get_rid"), &Navigation2D::get_rid); ClassDB::bind_method(D_METHOD("get_simple_path", "start", "end", "optimize"), &Navigation2D::get_simple_path, DEFVAL(true)); + ClassDB::bind_method(D_METHOD("get_closest_point", "to_point"), &Navigation2D::get_closest_point); + ClassDB::bind_method(D_METHOD("get_closest_point_owner", "to_point"), &Navigation2D::get_closest_point_owner); ClassDB::bind_method(D_METHOD("set_cell_size", "cell_size"), &Navigation2D::set_cell_size); ClassDB::bind_method(D_METHOD("get_cell_size"), &Navigation2D::get_cell_size); @@ -42,8 +44,8 @@ void Navigation2D::_bind_methods() { ClassDB::bind_method(D_METHOD("set_edge_connection_margin", "margin"), &Navigation2D::set_edge_connection_margin); ClassDB::bind_method(D_METHOD("get_edge_connection_margin"), &Navigation2D::get_edge_connection_margin); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "cell_size"), "set_cell_size", "get_cell_size"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "edge_connection_margin"), "set_edge_connection_margin", "get_edge_connection_margin"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "cell_size"), "set_cell_size", "get_cell_size"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "edge_connection_margin"), "set_edge_connection_margin", "get_edge_connection_margin"); } void Navigation2D::_notification(int p_what) { @@ -68,13 +70,25 @@ void Navigation2D::set_edge_connection_margin(float p_edge_connection_margin) { Navigation2DServer::get_singleton()->map_set_edge_connection_margin(map, edge_connection_margin); } -Vector<Vector2> Navigation2D::get_simple_path(const Vector2 &p_start, const Vector2 &p_end, bool p_optimize) { +Vector<Vector2> Navigation2D::get_simple_path(const Vector2 &p_start, const Vector2 &p_end, bool p_optimize) const { return Navigation2DServer::get_singleton()->map_get_path(map, p_start, p_end, p_optimize); } +Vector2 Navigation2D::get_closest_point(const Vector2 &p_point) const { + return Navigation2DServer::get_singleton()->map_get_closest_point(map, p_point); +} + +RID Navigation2D::get_closest_point_owner(const Vector2 &p_point) const { + return Navigation2DServer::get_singleton()->map_get_closest_point_owner(map, p_point); +} + Navigation2D::Navigation2D() { map = Navigation2DServer::get_singleton()->map_create(); set_cell_size(10); // Ten pixels set_edge_connection_margin(100); } + +Navigation2D::~Navigation2D() { + Navigation2DServer::get_singleton()->free(map); +} diff --git a/scene/2d/navigation_2d.h b/scene/2d/navigation_2d.h index 08642a5489..5520f5006e 100644 --- a/scene/2d/navigation_2d.h +++ b/scene/2d/navigation_2d.h @@ -61,9 +61,12 @@ public: return edge_connection_margin; } - Vector<Vector2> get_simple_path(const Vector2 &p_start, const Vector2 &p_end, bool p_optimize = true); + Vector<Vector2> get_simple_path(const Vector2 &p_start, const Vector2 &p_end, bool p_optimize = true) const; + Vector2 get_closest_point(const Vector2 &p_point) const; + RID get_closest_point_owner(const Vector2 &p_point) const; Navigation2D(); + ~Navigation2D(); }; #endif // NAVIGATION_2D_H diff --git a/scene/2d/navigation_agent_2d.cpp b/scene/2d/navigation_agent_2d.cpp index d019d72bc9..f5fe113f29 100644 --- a/scene/2d/navigation_agent_2d.cpp +++ b/scene/2d/navigation_agent_2d.cpp @@ -74,13 +74,13 @@ void NavigationAgent2D::_bind_methods() { ClassDB::bind_method(D_METHOD("_avoidance_done", "new_velocity"), &NavigationAgent2D::_avoidance_done); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "target_desired_distance", PROPERTY_HINT_RANGE, "0.1,100,0.01"), "set_target_desired_distance", "get_target_desired_distance"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "radius", PROPERTY_HINT_RANGE, "0.1,500,0.01"), "set_radius", "get_radius"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "neighbor_dist", PROPERTY_HINT_RANGE, "0.1,100000,0.01"), "set_neighbor_dist", "get_neighbor_dist"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "target_desired_distance", PROPERTY_HINT_RANGE, "0.1,100,0.01"), "set_target_desired_distance", "get_target_desired_distance"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "radius", PROPERTY_HINT_RANGE, "0.1,500,0.01"), "set_radius", "get_radius"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "neighbor_dist", PROPERTY_HINT_RANGE, "0.1,100000,0.01"), "set_neighbor_dist", "get_neighbor_dist"); ADD_PROPERTY(PropertyInfo(Variant::INT, "max_neighbors", PROPERTY_HINT_RANGE, "1,10000,1"), "set_max_neighbors", "get_max_neighbors"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "time_horizon", PROPERTY_HINT_RANGE, "0.1,10000,0.01"), "set_time_horizon", "get_time_horizon"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "max_speed", PROPERTY_HINT_RANGE, "0.1,100000,0.01"), "set_max_speed", "get_max_speed"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "path_max_distance", PROPERTY_HINT_RANGE, "10,100,1"), "set_path_max_distance", "get_path_max_distance"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "time_horizon", PROPERTY_HINT_RANGE, "0.1,10000,0.01"), "set_time_horizon", "get_time_horizon"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "max_speed", PROPERTY_HINT_RANGE, "0.1,100000,0.01"), "set_max_speed", "get_max_speed"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "path_max_distance", PROPERTY_HINT_RANGE, "10,100,1"), "set_path_max_distance", "get_path_max_distance"); ADD_SIGNAL(MethodInfo("path_changed")); ADD_SIGNAL(MethodInfo("target_reached")); diff --git a/scene/2d/navigation_polygon.cpp b/scene/2d/navigation_polygon.cpp index c40cdb4720..6754c1c9a6 100644 --- a/scene/2d/navigation_polygon.cpp +++ b/scene/2d/navigation_polygon.cpp @@ -46,11 +46,11 @@ Rect2 NavigationPolygon::_edit_get_rect() const { bool first = true; for (int i = 0; i < outlines.size(); i++) { - const PoolVector<Vector2> &outline = outlines[i]; + const Vector<Vector2> &outline = outlines[i]; const int outline_size = outline.size(); if (outline_size < 3) continue; - PoolVector<Vector2>::Read p = outline.read(); + const Vector2 *p = outline.ptr(); for (int j = 0; j < outline_size; j++) { if (first) { item_rect = Rect2(p[j], Vector2(0, 0)); @@ -69,7 +69,7 @@ Rect2 NavigationPolygon::_edit_get_rect() const { bool NavigationPolygon::_edit_is_selected_on_click(const Point2 &p_point, double p_tolerance) const { for (int i = 0; i < outlines.size(); i++) { - const PoolVector<Vector2> &outline = outlines[i]; + const Vector<Vector2> &outline = outlines[i]; const int outline_size = outline.size(); if (outline_size < 3) continue; @@ -80,7 +80,7 @@ bool NavigationPolygon::_edit_is_selected_on_click(const Point2 &p_point, double } #endif -void NavigationPolygon::set_vertices(const PoolVector<Vector2> &p_vertices) { +void NavigationPolygon::set_vertices(const Vector<Vector2> &p_vertices) { navmesh_generation->lock(); navmesh.unref(); @@ -89,7 +89,7 @@ void NavigationPolygon::set_vertices(const PoolVector<Vector2> &p_vertices) { rect_cache_dirty = true; } -PoolVector<Vector2> NavigationPolygon::get_vertices() const { +Vector<Vector2> NavigationPolygon::get_vertices() const { return vertices; } @@ -146,7 +146,7 @@ void NavigationPolygon::add_polygon(const Vector<int> &p_polygon) { navmesh_generation->unlock(); } -void NavigationPolygon::add_outline_at_index(const PoolVector<Vector2> &p_outline, int p_index) { +void NavigationPolygon::add_outline_at_index(const Vector<Vector2> &p_outline, int p_index) { outlines.insert(p_index, p_outline); rect_cache_dirty = true; @@ -173,12 +173,12 @@ Ref<NavigationMesh> NavigationPolygon::get_mesh() { navmesh_generation->lock(); if (navmesh.is_null()) { navmesh.instance(); - PoolVector<Vector3> verts; + Vector<Vector3> verts; { verts.resize(get_vertices().size()); - PoolVector<Vector3>::Write w = verts.write(); + Vector3 *w = verts.ptrw(); - PoolVector<Vector2>::Read r = get_vertices().read(); + const Vector2 *r = get_vertices().ptr(); for (int i(0); i < get_vertices().size(); i++) { w[i] = Vector3(r[i].x, 0.0, r[i].y); @@ -194,7 +194,7 @@ Ref<NavigationMesh> NavigationPolygon::get_mesh() { return navmesh; } -void NavigationPolygon::add_outline(const PoolVector<Vector2> &p_outline) { +void NavigationPolygon::add_outline(const Vector<Vector2> &p_outline) { outlines.push_back(p_outline); rect_cache_dirty = true; @@ -205,7 +205,7 @@ int NavigationPolygon::get_outline_count() const { return outlines.size(); } -void NavigationPolygon::set_outline(int p_idx, const PoolVector<Vector2> &p_outline) { +void NavigationPolygon::set_outline(int p_idx, const Vector<Vector2> &p_outline) { ERR_FAIL_INDEX(p_idx, outlines.size()); outlines.write[p_idx] = p_outline; rect_cache_dirty = true; @@ -218,8 +218,8 @@ void NavigationPolygon::remove_outline(int p_idx) { rect_cache_dirty = true; } -PoolVector<Vector2> NavigationPolygon::get_outline(int p_idx) const { - ERR_FAIL_INDEX_V(p_idx, outlines.size(), PoolVector<Vector2>()); +Vector<Vector2> NavigationPolygon::get_outline(int p_idx) const { + ERR_FAIL_INDEX_V(p_idx, outlines.size(), Vector<Vector2>()); return outlines[p_idx]; } @@ -239,11 +239,11 @@ void NavigationPolygon::make_polygons_from_outlines() { for (int i = 0; i < outlines.size(); i++) { - PoolVector<Vector2> ol = outlines[i]; + Vector<Vector2> ol = outlines[i]; int olsize = ol.size(); if (olsize < 3) continue; - PoolVector<Vector2>::Read r = ol.read(); + const Vector2 *r = ol.ptr(); for (int j = 0; j < olsize; j++) { outside_point.x = MAX(r[j].x, outside_point.x); outside_point.y = MAX(r[j].y, outside_point.y); @@ -254,11 +254,11 @@ void NavigationPolygon::make_polygons_from_outlines() { for (int i = 0; i < outlines.size(); i++) { - PoolVector<Vector2> ol = outlines[i]; + Vector<Vector2> ol = outlines[i]; int olsize = ol.size(); if (olsize < 3) continue; - PoolVector<Vector2>::Read r = ol.read(); + const Vector2 *r = ol.ptr(); int interscount = 0; //test if this is an outer outline @@ -267,11 +267,11 @@ void NavigationPolygon::make_polygons_from_outlines() { if (i == k) continue; //no self intersect - PoolVector<Vector2> ol2 = outlines[k]; + Vector<Vector2> ol2 = outlines[k]; int olsize2 = ol2.size(); if (olsize2 < 3) continue; - PoolVector<Vector2>::Read r2 = ol2.read(); + const Vector2 *r2 = ol2.ptr(); for (int l = 0; l < olsize2; l++) { @@ -356,15 +356,18 @@ void NavigationPolygon::_bind_methods() { ClassDB::bind_method(D_METHOD("_set_outlines", "outlines"), &NavigationPolygon::_set_outlines); ClassDB::bind_method(D_METHOD("_get_outlines"), &NavigationPolygon::_get_outlines); - ADD_PROPERTY(PropertyInfo(Variant::POOL_VECTOR2_ARRAY, "vertices", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "set_vertices", "get_vertices"); + ADD_PROPERTY(PropertyInfo(Variant::PACKED_VECTOR2_ARRAY, "vertices", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "set_vertices", "get_vertices"); ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "polygons", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_polygons", "_get_polygons"); ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "outlines", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_outlines", "_get_outlines"); } NavigationPolygon::NavigationPolygon() : rect_cache_dirty(true), - navmesh_generation(NULL) { - navmesh_generation = Mutex::create(); + navmesh_generation(Mutex::create()) { +} + +NavigationPolygon::~NavigationPolygon() { + memdelete(navmesh_generation); } void NavigationPolygonInstance::set_enabled(bool p_enabled) { @@ -448,7 +451,7 @@ void NavigationPolygonInstance::_notification(int p_what) { if (is_inside_tree() && (Engine::get_singleton()->is_editor_hint() || get_tree()->is_debugging_navigation_hint()) && navpoly.is_valid()) { - PoolVector<Vector2> verts = navpoly->get_vertices(); + Vector<Vector2> verts = navpoly->get_vertices(); int vsize = verts.size(); if (vsize < 3) return; @@ -464,7 +467,7 @@ void NavigationPolygonInstance::_notification(int p_what) { vertices.resize(vsize); colors.resize(vsize); { - PoolVector<Vector2>::Read vr = verts.read(); + const Vector2 *vr = verts.ptr(); for (int i = 0; i < vsize; i++) { vertices.write[i] = vr[i]; colors.write[i] = color; @@ -500,14 +503,14 @@ void NavigationPolygonInstance::set_navigation_polygon(const Ref<NavigationPolyg } if (navpoly.is_valid()) { - navpoly->disconnect(CoreStringNames::get_singleton()->changed, this, "_navpoly_changed"); + navpoly->disconnect_compat(CoreStringNames::get_singleton()->changed, this, "_navpoly_changed"); } navpoly = p_navpoly; Navigation2DServer::get_singleton()->region_set_navpoly(region, p_navpoly); if (navpoly.is_valid()) { - navpoly->connect(CoreStringNames::get_singleton()->changed, this, "_navpoly_changed"); + navpoly->connect_compat(CoreStringNames::get_singleton()->changed, this, "_navpoly_changed"); } _navpoly_changed(); diff --git a/scene/2d/navigation_polygon.h b/scene/2d/navigation_polygon.h index 92cfc8f5e6..557ce4b3e7 100644 --- a/scene/2d/navigation_polygon.h +++ b/scene/2d/navigation_polygon.h @@ -40,12 +40,12 @@ class NavigationPolygon : public Resource { GDCLASS(NavigationPolygon, Resource); - PoolVector<Vector2> vertices; + Vector<Vector2> vertices; struct Polygon { Vector<int> indices; }; Vector<Polygon> polygons; - Vector<PoolVector<Vector2> > outlines; + Vector<Vector<Vector2> > outlines; mutable Rect2 item_rect; mutable bool rect_cache_dirty; @@ -69,16 +69,16 @@ public: bool _edit_is_selected_on_click(const Point2 &p_point, double p_tolerance) const; #endif - void set_vertices(const PoolVector<Vector2> &p_vertices); - PoolVector<Vector2> get_vertices() const; + void set_vertices(const Vector<Vector2> &p_vertices); + Vector<Vector2> get_vertices() const; void add_polygon(const Vector<int> &p_polygon); int get_polygon_count() const; - void add_outline(const PoolVector<Vector2> &p_outline); - void add_outline_at_index(const PoolVector<Vector2> &p_outline, int p_index); - void set_outline(int p_idx, const PoolVector<Vector2> &p_outline); - PoolVector<Vector2> get_outline(int p_idx) const; + void add_outline(const Vector<Vector2> &p_outline); + void add_outline_at_index(const Vector<Vector2> &p_outline, int p_index); + void set_outline(int p_idx, const Vector<Vector2> &p_outline); + Vector<Vector2> get_outline(int p_idx) const; void remove_outline(int p_idx); int get_outline_count() const; @@ -91,6 +91,7 @@ public: Ref<NavigationMesh> get_mesh(); NavigationPolygon(); + ~NavigationPolygon(); }; class Navigation2D; diff --git a/scene/2d/node_2d.cpp b/scene/2d/node_2d.cpp index 7deebe9b27..df21538609 100644 --- a/scene/2d/node_2d.cpp +++ b/scene/2d/node_2d.cpp @@ -440,14 +440,14 @@ void Node2D::_bind_methods() { ADD_GROUP("Transform", ""); ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "position"), "set_position", "get_position"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "rotation", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_rotation", "get_rotation"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "rotation_degrees", PROPERTY_HINT_RANGE, "-360,360,0.1,or_lesser,or_greater", PROPERTY_USAGE_EDITOR), "set_rotation_degrees", "get_rotation_degrees"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "rotation", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_rotation", "get_rotation"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "rotation_degrees", PROPERTY_HINT_RANGE, "-360,360,0.1,or_lesser,or_greater", PROPERTY_USAGE_EDITOR), "set_rotation_degrees", "get_rotation_degrees"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "scale"), "set_scale", "get_scale"); ADD_PROPERTY(PropertyInfo(Variant::TRANSFORM2D, "transform", PROPERTY_HINT_NONE, "", 0), "set_transform", "get_transform"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "global_position", PROPERTY_HINT_NONE, "", 0), "set_global_position", "get_global_position"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "global_rotation", PROPERTY_HINT_NONE, "", 0), "set_global_rotation", "get_global_rotation"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "global_rotation_degrees", PROPERTY_HINT_NONE, "", 0), "set_global_rotation_degrees", "get_global_rotation_degrees"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "global_rotation", PROPERTY_HINT_NONE, "", 0), "set_global_rotation", "get_global_rotation"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "global_rotation_degrees", PROPERTY_HINT_NONE, "", 0), "set_global_rotation_degrees", "get_global_rotation_degrees"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "global_scale", PROPERTY_HINT_NONE, "", 0), "set_global_scale", "get_global_scale"); ADD_PROPERTY(PropertyInfo(Variant::TRANSFORM2D, "global_transform", PROPERTY_HINT_NONE, "", 0), "set_global_transform", "get_global_transform"); diff --git a/scene/2d/particles_2d.cpp b/scene/2d/particles_2d.cpp index d3bc7b6a5a..2ba2fd8f79 100644 --- a/scene/2d/particles_2d.cpp +++ b/scene/2d/particles_2d.cpp @@ -384,12 +384,12 @@ void Particles2D::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::BOOL, "emitting"), "set_emitting", "is_emitting"); ADD_PROPERTY(PropertyInfo(Variant::INT, "amount", PROPERTY_HINT_EXP_RANGE, "1,1000000,1"), "set_amount", "get_amount"); ADD_GROUP("Time", ""); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "lifetime", PROPERTY_HINT_RANGE, "0.01,600.0,0.01,or_greater"), "set_lifetime", "get_lifetime"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "lifetime", PROPERTY_HINT_RANGE, "0.01,600.0,0.01,or_greater"), "set_lifetime", "get_lifetime"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "one_shot"), "set_one_shot", "get_one_shot"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "preprocess", PROPERTY_HINT_RANGE, "0.00,600.0,0.01"), "set_pre_process_time", "get_pre_process_time"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "speed_scale", PROPERTY_HINT_RANGE, "0,64,0.01"), "set_speed_scale", "get_speed_scale"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "explosiveness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_explosiveness_ratio", "get_explosiveness_ratio"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "randomness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_randomness_ratio", "get_randomness_ratio"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "preprocess", PROPERTY_HINT_RANGE, "0.00,600.0,0.01"), "set_pre_process_time", "get_pre_process_time"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "speed_scale", PROPERTY_HINT_RANGE, "0,64,0.01"), "set_speed_scale", "get_speed_scale"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "explosiveness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_explosiveness_ratio", "get_explosiveness_ratio"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "randomness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_randomness_ratio", "get_randomness_ratio"); ADD_PROPERTY(PropertyInfo(Variant::INT, "fixed_fps", PROPERTY_HINT_RANGE, "0,1000,1"), "set_fixed_fps", "get_fixed_fps"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "fract_delta"), "set_fractional_delta", "get_fractional_delta"); ADD_GROUP("Drawing", ""); diff --git a/scene/2d/path_2d.cpp b/scene/2d/path_2d.cpp index d83c163b4c..9ef3d0ca4f 100644 --- a/scene/2d/path_2d.cpp +++ b/scene/2d/path_2d.cpp @@ -134,13 +134,13 @@ void Path2D::_curve_changed() { void Path2D::set_curve(const Ref<Curve2D> &p_curve) { if (curve.is_valid()) { - curve->disconnect("changed", this, "_curve_changed"); + curve->disconnect_compat("changed", this, "_curve_changed"); } curve = p_curve; if (curve.is_valid()) { - curve->connect("changed", this, "_curve_changed"); + curve->connect_compat("changed", this, "_curve_changed"); } _curve_changed(); @@ -308,14 +308,14 @@ void PathFollow2D::_bind_methods() { ClassDB::bind_method(D_METHOD("set_lookahead", "lookahead"), &PathFollow2D::set_lookahead); ClassDB::bind_method(D_METHOD("get_lookahead"), &PathFollow2D::get_lookahead); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "offset", PROPERTY_HINT_RANGE, "0,10000,0.01,or_lesser,or_greater"), "set_offset", "get_offset"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "unit_offset", PROPERTY_HINT_RANGE, "0,1,0.0001,or_lesser,or_greater", PROPERTY_USAGE_EDITOR), "set_unit_offset", "get_unit_offset"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "h_offset"), "set_h_offset", "get_h_offset"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "v_offset"), "set_v_offset", "get_v_offset"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "offset", PROPERTY_HINT_RANGE, "0,10000,0.01,or_lesser,or_greater"), "set_offset", "get_offset"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "unit_offset", PROPERTY_HINT_RANGE, "0,1,0.0001,or_lesser,or_greater", PROPERTY_USAGE_EDITOR), "set_unit_offset", "get_unit_offset"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "h_offset"), "set_h_offset", "get_h_offset"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "v_offset"), "set_v_offset", "get_v_offset"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "rotate"), "set_rotate", "is_rotating"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "cubic_interp"), "set_cubic_interpolation", "get_cubic_interpolation"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "loop"), "set_loop", "has_loop"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "lookahead", PROPERTY_HINT_RANGE, "0.001,1024.0,0.001"), "set_lookahead", "get_lookahead"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "lookahead", PROPERTY_HINT_RANGE, "0.001,1024.0,0.001"), "set_lookahead", "get_lookahead"); } void PathFollow2D::set_offset(float p_offset) { diff --git a/scene/2d/physics_body_2d.cpp b/scene/2d/physics_body_2d.cpp index 29bfc39477..aae37014b3 100644 --- a/scene/2d/physics_body_2d.cpp +++ b/scene/2d/physics_body_2d.cpp @@ -192,14 +192,14 @@ real_t StaticBody2D::get_constant_angular_velocity() const { void StaticBody2D::set_physics_material_override(const Ref<PhysicsMaterial> &p_physics_material_override) { if (physics_material_override.is_valid()) { - if (physics_material_override->is_connected(CoreStringNames::get_singleton()->changed, this, "_reload_physics_characteristics")) - physics_material_override->disconnect(CoreStringNames::get_singleton()->changed, this, "_reload_physics_characteristics"); + if (physics_material_override->is_connected_compat(CoreStringNames::get_singleton()->changed, this, "_reload_physics_characteristics")) + physics_material_override->disconnect_compat(CoreStringNames::get_singleton()->changed, this, "_reload_physics_characteristics"); } physics_material_override = p_physics_material_override; if (physics_material_override.is_valid()) { - physics_material_override->connect(CoreStringNames::get_singleton()->changed, this, "_reload_physics_characteristics"); + physics_material_override->connect_compat(CoreStringNames::get_singleton()->changed, this, "_reload_physics_characteristics"); } _reload_physics_characteristics(); } @@ -221,7 +221,7 @@ void StaticBody2D::_bind_methods() { ClassDB::bind_method(D_METHOD("_reload_physics_characteristics"), &StaticBody2D::_reload_physics_characteristics); ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "constant_linear_velocity"), "set_constant_linear_velocity", "get_constant_linear_velocity"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "constant_angular_velocity"), "set_constant_angular_velocity", "get_constant_angular_velocity"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "constant_angular_velocity"), "set_constant_angular_velocity", "get_constant_angular_velocity"); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "physics_material_override", PROPERTY_HINT_RESOURCE_TYPE, "PhysicsMaterial"), "set_physics_material_override", "get_physics_material_override"); } @@ -311,8 +311,8 @@ void RigidBody2D::_body_inout(int p_status, ObjectID p_instance, int p_body_shap //E->get().rc=0; E->get().in_scene = node && node->is_inside_tree(); if (node) { - node->connect(SceneStringNames::get_singleton()->tree_entered, this, SceneStringNames::get_singleton()->_body_enter_tree, make_binds(objid)); - node->connect(SceneStringNames::get_singleton()->tree_exiting, this, SceneStringNames::get_singleton()->_body_exit_tree, make_binds(objid)); + node->connect_compat(SceneStringNames::get_singleton()->tree_entered, this, SceneStringNames::get_singleton()->_body_enter_tree, make_binds(objid)); + node->connect_compat(SceneStringNames::get_singleton()->tree_exiting, this, SceneStringNames::get_singleton()->_body_exit_tree, make_binds(objid)); if (E->get().in_scene) { emit_signal(SceneStringNames::get_singleton()->body_entered, node); } @@ -340,8 +340,8 @@ void RigidBody2D::_body_inout(int p_status, ObjectID p_instance, int p_body_shap if (E->get().shapes.empty()) { if (node) { - node->disconnect(SceneStringNames::get_singleton()->tree_entered, this, SceneStringNames::get_singleton()->_body_enter_tree); - node->disconnect(SceneStringNames::get_singleton()->tree_exiting, this, SceneStringNames::get_singleton()->_body_exit_tree); + node->disconnect_compat(SceneStringNames::get_singleton()->tree_entered, this, SceneStringNames::get_singleton()->_body_enter_tree); + node->disconnect_compat(SceneStringNames::get_singleton()->tree_exiting, this, SceneStringNames::get_singleton()->_body_exit_tree); if (in_scene) emit_signal(SceneStringNames::get_singleton()->body_exited, node); } @@ -545,14 +545,14 @@ real_t RigidBody2D::get_weight() const { void RigidBody2D::set_physics_material_override(const Ref<PhysicsMaterial> &p_physics_material_override) { if (physics_material_override.is_valid()) { - if (physics_material_override->is_connected(CoreStringNames::get_singleton()->changed, this, "_reload_physics_characteristics")) - physics_material_override->disconnect(CoreStringNames::get_singleton()->changed, this, "_reload_physics_characteristics"); + if (physics_material_override->is_connected_compat(CoreStringNames::get_singleton()->changed, this, "_reload_physics_characteristics")) + physics_material_override->disconnect_compat(CoreStringNames::get_singleton()->changed, this, "_reload_physics_characteristics"); } physics_material_override = p_physics_material_override; if (physics_material_override.is_valid()) { - physics_material_override->connect(CoreStringNames::get_singleton()->changed, this, "_reload_physics_characteristics"); + physics_material_override->connect_compat(CoreStringNames::get_singleton()->changed, this, "_reload_physics_characteristics"); } _reload_physics_characteristics(); } @@ -775,8 +775,8 @@ void RigidBody2D::set_contact_monitor(bool p_enabled) { if (node) { - node->disconnect(SceneStringNames::get_singleton()->tree_entered, this, SceneStringNames::get_singleton()->_body_enter_tree); - node->disconnect(SceneStringNames::get_singleton()->tree_exiting, this, SceneStringNames::get_singleton()->_body_exit_tree); + node->disconnect_compat(SceneStringNames::get_singleton()->tree_entered, this, SceneStringNames::get_singleton()->_body_enter_tree); + node->disconnect_compat(SceneStringNames::get_singleton()->tree_exiting, this, SceneStringNames::get_singleton()->_body_exit_tree); } } @@ -906,11 +906,11 @@ void RigidBody2D::_bind_methods() { BIND_VMETHOD(MethodInfo("_integrate_forces", PropertyInfo(Variant::OBJECT, "state", PROPERTY_HINT_RESOURCE_TYPE, "Physics2DDirectBodyState"))); ADD_PROPERTY(PropertyInfo(Variant::INT, "mode", PROPERTY_HINT_ENUM, "Rigid,Static,Character,Kinematic"), "set_mode", "get_mode"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "mass", PROPERTY_HINT_EXP_RANGE, "0.01,65535,0.01"), "set_mass", "get_mass"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "inertia", PROPERTY_HINT_EXP_RANGE, "0.01,65535,0.01", 0), "set_inertia", "get_inertia"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "weight", PROPERTY_HINT_EXP_RANGE, "0.01,65535,0.01", PROPERTY_USAGE_EDITOR), "set_weight", "get_weight"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "mass", PROPERTY_HINT_EXP_RANGE, "0.01,65535,0.01"), "set_mass", "get_mass"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "inertia", PROPERTY_HINT_EXP_RANGE, "0.01,65535,0.01", 0), "set_inertia", "get_inertia"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "weight", PROPERTY_HINT_EXP_RANGE, "0.01,65535,0.01", PROPERTY_USAGE_EDITOR), "set_weight", "get_weight"); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "physics_material_override", PROPERTY_HINT_RESOURCE_TYPE, "PhysicsMaterial"), "set_physics_material_override", "get_physics_material_override"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "gravity_scale", PROPERTY_HINT_RANGE, "-128,128,0.01"), "set_gravity_scale", "get_gravity_scale"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "gravity_scale", PROPERTY_HINT_RANGE, "-128,128,0.01"), "set_gravity_scale", "get_gravity_scale"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "custom_integrator"), "set_use_custom_integrator", "is_using_custom_integrator"); ADD_PROPERTY(PropertyInfo(Variant::INT, "continuous_cd", PROPERTY_HINT_ENUM, "Disabled,Cast Ray,Cast Shape"), "set_continuous_collision_detection_mode", "get_continuous_collision_detection_mode"); ADD_PROPERTY(PropertyInfo(Variant::INT, "contacts_reported", PROPERTY_HINT_RANGE, "0,64,1,or_greater"), "set_max_contacts_reported", "get_max_contacts_reported"); @@ -919,13 +919,13 @@ void RigidBody2D::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::BOOL, "can_sleep"), "set_can_sleep", "is_able_to_sleep"); ADD_GROUP("Linear", "linear_"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "linear_velocity"), "set_linear_velocity", "get_linear_velocity"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "linear_damp", PROPERTY_HINT_RANGE, "-1,100,0.001,or_greater"), "set_linear_damp", "get_linear_damp"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "linear_damp", PROPERTY_HINT_RANGE, "-1,100,0.001,or_greater"), "set_linear_damp", "get_linear_damp"); ADD_GROUP("Angular", "angular_"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "angular_velocity"), "set_angular_velocity", "get_angular_velocity"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "angular_damp", PROPERTY_HINT_RANGE, "-1,100,0.001,or_greater"), "set_angular_damp", "get_angular_damp"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "angular_velocity"), "set_angular_velocity", "get_angular_velocity"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "angular_damp", PROPERTY_HINT_RANGE, "-1,100,0.001,or_greater"), "set_angular_damp", "get_angular_damp"); ADD_GROUP("Applied Forces", "applied_"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "applied_force"), "set_applied_force", "get_applied_force"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "applied_torque"), "set_applied_torque", "get_applied_torque"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "applied_torque"), "set_applied_torque", "get_applied_torque"); ADD_SIGNAL(MethodInfo("body_shape_entered", PropertyInfo(Variant::INT, "body_id"), PropertyInfo(Variant::OBJECT, "body", PROPERTY_HINT_RESOURCE_TYPE, "Node"), PropertyInfo(Variant::INT, "body_shape"), PropertyInfo(Variant::INT, "local_shape"))); ADD_SIGNAL(MethodInfo("body_shape_exited", PropertyInfo(Variant::INT, "body_id"), PropertyInfo(Variant::OBJECT, "body", PROPERTY_HINT_RESOURCE_TYPE, "Node"), PropertyInfo(Variant::INT, "body_shape"), PropertyInfo(Variant::INT, "local_shape"))); @@ -1357,7 +1357,7 @@ void KinematicBody2D::_bind_methods() { ClassDB::bind_method(D_METHOD("_direct_state_changed"), &KinematicBody2D::_direct_state_changed); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "collision/safe_margin", PROPERTY_HINT_RANGE, "0.001,256,0.001"), "set_safe_margin", "get_safe_margin"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "collision/safe_margin", PROPERTY_HINT_RANGE, "0.001,256,0.001"), "set_safe_margin", "get_safe_margin"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "motion/sync_to_physics"), "set_sync_to_physics", "is_sync_to_physics_enabled"); } diff --git a/scene/2d/polygon_2d.cpp b/scene/2d/polygon_2d.cpp index ba5b7d29e7..258292e316 100644 --- a/scene/2d/polygon_2d.cpp +++ b/scene/2d/polygon_2d.cpp @@ -61,7 +61,7 @@ bool Polygon2D::_edit_use_pivot() const { Rect2 Polygon2D::_edit_get_rect() const { if (rect_cache_dirty) { int l = polygon.size(); - PoolVector<Vector2>::Read r = polygon.read(); + const Vector2 *r = polygon.ptr(); item_rect = Rect2(); for (int i = 0; i < l; i++) { Vector2 pos = r[i] + offset; @@ -120,11 +120,11 @@ void Polygon2D::_notification(int p_what) { if (new_skeleton_id != current_skeleton_id) { Object *old_skeleton = ObjectDB::get_instance(current_skeleton_id); if (old_skeleton) { - old_skeleton->disconnect("bone_setup_changed", this, "_skeleton_bone_setup_changed"); + old_skeleton->disconnect_compat("bone_setup_changed", this, "_skeleton_bone_setup_changed"); } if (skeleton_node) { - skeleton_node->connect("bone_setup_changed", this, "_skeleton_bone_setup_changed"); + skeleton_node->connect_compat("bone_setup_changed", this, "_skeleton_bone_setup_changed"); } current_skeleton_id = new_skeleton_id; @@ -148,7 +148,7 @@ void Polygon2D::_notification(int p_what) { { - PoolVector<Vector2>::Read polyr = polygon.read(); + const Vector2 *polyr = polygon.ptr(); for (int i = 0; i < len; i++) { points.write[i] = polyr[i] + offset; } @@ -217,7 +217,7 @@ void Polygon2D::_notification(int p_what) { if (points.size() == uv.size()) { - PoolVector<Vector2>::Read uvr = uv.read(); + const Vector2 *uvr = uv.ptr(); for (int i = 0; i < len; i++) { uvs.write[i] = texmat.xform(uvr[i]) / tex_size; @@ -257,7 +257,7 @@ void Polygon2D::_notification(int p_what) { } int bone_index = bone->get_index_in_skeleton(); - PoolVector<float>::Read r = bone_weights[i].weights.read(); + const float *r = bone_weights[i].weights.ptr(); for (int j = 0; j < vc; j++) { if (r[j] == 0.0) continue; //weight is unpainted, skip @@ -296,7 +296,7 @@ void Polygon2D::_notification(int p_what) { Vector<Color> colors; if (vertex_colors.size() == points.size()) { colors.resize(len); - PoolVector<Color>::Read color_r = vertex_colors.read(); + const Color *color_r = vertex_colors.ptr(); for (int i = 0; i < len; i++) { colors.write[i] = color_r[i]; } @@ -313,11 +313,11 @@ void Polygon2D::_notification(int p_what) { //draw individual polygons Vector<int> total_indices; for (int i = 0; i < polygons.size(); i++) { - PoolVector<int> src_indices = polygons[i]; + Vector<int> src_indices = polygons[i]; int ic = src_indices.size(); if (ic < 3) continue; - PoolVector<int>::Read r = src_indices.read(); + const int *r = src_indices.ptr(); Vector<Vector2> tmp_points; tmp_points.resize(ic); @@ -349,13 +349,13 @@ void Polygon2D::_notification(int p_what) { } } -void Polygon2D::set_polygon(const PoolVector<Vector2> &p_polygon) { +void Polygon2D::set_polygon(const Vector<Vector2> &p_polygon) { polygon = p_polygon; rect_cache_dirty = true; update(); } -PoolVector<Vector2> Polygon2D::get_polygon() const { +Vector<Vector2> Polygon2D::get_polygon() const { return polygon; } @@ -369,13 +369,13 @@ int Polygon2D::get_internal_vertex_count() const { return internal_vertices; } -void Polygon2D::set_uv(const PoolVector<Vector2> &p_uv) { +void Polygon2D::set_uv(const Vector<Vector2> &p_uv) { uv = p_uv; update(); } -PoolVector<Vector2> Polygon2D::get_uv() const { +Vector<Vector2> Polygon2D::get_uv() const { return uv; } @@ -401,12 +401,12 @@ Color Polygon2D::get_color() const { return color; } -void Polygon2D::set_vertex_colors(const PoolVector<Color> &p_colors) { +void Polygon2D::set_vertex_colors(const Vector<Color> &p_colors) { vertex_colors = p_colors; update(); } -PoolVector<Color> Polygon2D::get_vertex_colors() const { +Vector<Color> Polygon2D::get_vertex_colors() const { return vertex_colors; } @@ -548,7 +548,7 @@ Vector2 Polygon2D::get_offset() const { return offset; } -void Polygon2D::add_bone(const NodePath &p_path, const PoolVector<float> &p_weights) { +void Polygon2D::add_bone(const NodePath &p_path, const Vector<float> &p_weights) { Bone bone; bone.path = p_path; @@ -562,9 +562,9 @@ NodePath Polygon2D::get_bone_path(int p_index) const { ERR_FAIL_INDEX_V(p_index, bone_weights.size(), NodePath()); return bone_weights[p_index].path; } -PoolVector<float> Polygon2D::get_bone_weights(int p_index) const { +Vector<float> Polygon2D::get_bone_weights(int p_index) const { - ERR_FAIL_INDEX_V(p_index, bone_weights.size(), PoolVector<float>()); + ERR_FAIL_INDEX_V(p_index, bone_weights.size(), Vector<float>()); return bone_weights[p_index].weights; } void Polygon2D::erase_bone(int p_idx) { @@ -577,7 +577,7 @@ void Polygon2D::clear_bones() { bone_weights.clear(); } -void Polygon2D::set_bone_weights(int p_index, const PoolVector<float> &p_weights) { +void Polygon2D::set_bone_weights(int p_index, const Vector<float> &p_weights) { ERR_FAIL_INDEX(p_index, bone_weights.size()); bone_weights.write[p_index].weights = p_weights; update(); @@ -700,24 +700,24 @@ void Polygon2D::_bind_methods() { ADD_GROUP("Texture2D", "texture_"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "texture_offset"), "set_texture_offset", "get_texture_offset"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "texture_scale"), "set_texture_scale", "get_texture_scale"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "texture_rotation_degrees", PROPERTY_HINT_RANGE, "-360,360,0.1,or_lesser,or_greater"), "set_texture_rotation_degrees", "get_texture_rotation_degrees"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "texture_rotation", PROPERTY_HINT_NONE, "", 0), "set_texture_rotation", "get_texture_rotation"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "texture_rotation_degrees", PROPERTY_HINT_RANGE, "-360,360,0.1,or_lesser,or_greater"), "set_texture_rotation_degrees", "get_texture_rotation_degrees"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "texture_rotation", PROPERTY_HINT_NONE, "", 0), "set_texture_rotation", "get_texture_rotation"); ADD_GROUP("Lighting", ""); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "normal_map", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"), "set_normal_map", "get_normal_map"); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "specular_map", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"), "set_specular_map", "get_specular_map"); ADD_PROPERTY(PropertyInfo(Variant::COLOR, "specular_color", PROPERTY_HINT_COLOR_NO_ALPHA), "set_specular_color", "get_specular_color"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "shininess", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_shininess", "get_shininess"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "shininess", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_shininess", "get_shininess"); ADD_GROUP("Skeleton", ""); ADD_PROPERTY(PropertyInfo(Variant::NODE_PATH, "skeleton", PROPERTY_HINT_NODE_PATH_VALID_TYPES, "Skeleton2D"), "set_skeleton", "get_skeleton"); ADD_GROUP("Invert", "invert_"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "invert_enable"), "set_invert", "get_invert"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "invert_border", PROPERTY_HINT_RANGE, "0.1,16384,0.1"), "set_invert_border", "get_invert_border"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "invert_border", PROPERTY_HINT_RANGE, "0.1,16384,0.1"), "set_invert_border", "get_invert_border"); ADD_GROUP("Data", ""); - ADD_PROPERTY(PropertyInfo(Variant::POOL_VECTOR2_ARRAY, "polygon"), "set_polygon", "get_polygon"); - ADD_PROPERTY(PropertyInfo(Variant::POOL_VECTOR2_ARRAY, "uv"), "set_uv", "get_uv"); - ADD_PROPERTY(PropertyInfo(Variant::POOL_COLOR_ARRAY, "vertex_colors"), "set_vertex_colors", "get_vertex_colors"); + ADD_PROPERTY(PropertyInfo(Variant::PACKED_VECTOR2_ARRAY, "polygon"), "set_polygon", "get_polygon"); + ADD_PROPERTY(PropertyInfo(Variant::PACKED_VECTOR2_ARRAY, "uv"), "set_uv", "get_uv"); + ADD_PROPERTY(PropertyInfo(Variant::PACKED_COLOR_ARRAY, "vertex_colors"), "set_vertex_colors", "get_vertex_colors"); ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "polygons"), "set_polygons", "get_polygons"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "bones", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "_set_bones", "_get_bones"); ADD_PROPERTY(PropertyInfo(Variant::INT, "internal_vertex_count", PROPERTY_HINT_RANGE, "0,1000"), "set_internal_vertex_count", "get_internal_vertex_count"); diff --git a/scene/2d/polygon_2d.h b/scene/2d/polygon_2d.h index 4816e2c869..777c1f82f3 100644 --- a/scene/2d/polygon_2d.h +++ b/scene/2d/polygon_2d.h @@ -37,15 +37,15 @@ class Polygon2D : public Node2D { GDCLASS(Polygon2D, Node2D); - PoolVector<Vector2> polygon; - PoolVector<Vector2> uv; - PoolVector<Color> vertex_colors; + Vector<Vector2> polygon; + Vector<Vector2> uv; + Vector<Color> vertex_colors; Array polygons; int internal_vertices; struct Bone { NodePath path; - PoolVector<float> weights; + Vector<float> weights; }; Vector<Bone> bone_weights; @@ -95,14 +95,14 @@ public: virtual bool _edit_is_selected_on_click(const Point2 &p_point, double p_tolerance) const; #endif - void set_polygon(const PoolVector<Vector2> &p_polygon); - PoolVector<Vector2> get_polygon() const; + void set_polygon(const Vector<Vector2> &p_polygon); + Vector<Vector2> get_polygon() const; void set_internal_vertex_count(int p_count); int get_internal_vertex_count() const; - void set_uv(const PoolVector<Vector2> &p_uv); - PoolVector<Vector2> get_uv() const; + void set_uv(const Vector<Vector2> &p_uv); + Vector<Vector2> get_uv() const; void set_polygons(const Array &p_polygons); Array get_polygons() const; @@ -110,8 +110,8 @@ public: void set_color(const Color &p_color); Color get_color() const; - void set_vertex_colors(const PoolVector<Color> &p_colors); - PoolVector<Color> get_vertex_colors() const; + void set_vertex_colors(const Vector<Color> &p_colors); + Vector<Color> get_vertex_colors() const; void set_texture(const Ref<Texture2D> &p_texture); Ref<Texture2D> get_texture() const; @@ -152,13 +152,13 @@ public: void set_offset(const Vector2 &p_offset); Vector2 get_offset() const; - void add_bone(const NodePath &p_path = NodePath(), const PoolVector<float> &p_weights = PoolVector<float>()); + void add_bone(const NodePath &p_path = NodePath(), const Vector<float> &p_weights = Vector<float>()); int get_bone_count() const; NodePath get_bone_path(int p_index) const; - PoolVector<float> get_bone_weights(int p_index) const; + Vector<float> get_bone_weights(int p_index) const; void erase_bone(int p_idx); void clear_bones(); - void set_bone_weights(int p_index, const PoolVector<float> &p_weights); + void set_bone_weights(int p_index, const Vector<float> &p_weights); void set_bone_path(int p_index, const NodePath &p_path); void set_skeleton(const NodePath &p_skeleton); diff --git a/scene/2d/position_2d.cpp b/scene/2d/position_2d.cpp index cdeb905c0c..9e95a55d9f 100644 --- a/scene/2d/position_2d.cpp +++ b/scene/2d/position_2d.cpp @@ -96,7 +96,7 @@ void Position2D::_bind_methods() { ClassDB::bind_method(D_METHOD("_set_gizmo_extents", "extents"), &Position2D::set_gizmo_extents); ClassDB::bind_method(D_METHOD("_get_gizmo_extents"), &Position2D::get_gizmo_extents); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "gizmo_extents", PROPERTY_HINT_RANGE, "0,1000,0.1,or_greater", PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_INTERNAL), "_set_gizmo_extents", "_get_gizmo_extents"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "gizmo_extents", PROPERTY_HINT_RANGE, "0,1000,0.1,or_greater", PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_INTERNAL), "_set_gizmo_extents", "_get_gizmo_extents"); } Position2D::Position2D() { diff --git a/scene/2d/skeleton_2d.cpp b/scene/2d/skeleton_2d.cpp index 6f64464cc9..9ebaf23c3a 100644 --- a/scene/2d/skeleton_2d.cpp +++ b/scene/2d/skeleton_2d.cpp @@ -90,7 +90,7 @@ void Bone2D::_bind_methods() { ClassDB::bind_method(D_METHOD("get_default_length"), &Bone2D::get_default_length); ADD_PROPERTY(PropertyInfo(Variant::TRANSFORM2D, "rest"), "set_rest", "get_rest"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "default_length", PROPERTY_HINT_RANGE, "1,1024,1"), "set_default_length", "get_default_length"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "default_length", PROPERTY_HINT_RANGE, "1,1024,1"), "set_default_length", "get_default_length"); } void Bone2D::set_rest(const Transform2D &p_rest) { diff --git a/scene/2d/sprite.cpp b/scene/2d/sprite.cpp index 2fe39ca104..a5648053c4 100644 --- a/scene/2d/sprite.cpp +++ b/scene/2d/sprite.cpp @@ -142,12 +142,12 @@ void Sprite::set_texture(const Ref<Texture2D> &p_texture) { return; if (texture.is_valid()) - texture->disconnect(CoreStringNames::get_singleton()->changed, this, "_texture_changed"); + texture->disconnect_compat(CoreStringNames::get_singleton()->changed, this, "_texture_changed"); texture = p_texture; if (texture.is_valid()) - texture->connect(CoreStringNames::get_singleton()->changed, this, "_texture_changed"); + texture->connect_compat(CoreStringNames::get_singleton()->changed, this, "_texture_changed"); update(); emit_signal("texture_changed"); @@ -502,7 +502,7 @@ void Sprite::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "normal_map", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"), "set_normal_map", "get_normal_map"); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "specular_map", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"), "set_specular_map", "get_specular_map"); ADD_PROPERTY(PropertyInfo(Variant::COLOR, "specular_color", PROPERTY_HINT_COLOR_NO_ALPHA), "set_specular_color", "get_specular_color"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "shininess", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_shininess", "get_shininess"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "shininess", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_shininess", "get_shininess"); ADD_GROUP("Offset", ""); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "centered"), "set_centered", "is_centered"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "offset"), "set_offset", "get_offset"); diff --git a/scene/2d/tile_map.cpp b/scene/2d/tile_map.cpp index e3fda5b585..60ad8c7a74 100644 --- a/scene/2d/tile_map.cpp +++ b/scene/2d/tile_map.cpp @@ -177,7 +177,7 @@ void TileMap::_update_quadrant_transform() { void TileMap::set_tileset(const Ref<TileSet> &p_tileset) { if (tile_set.is_valid()) { - tile_set->disconnect("changed", this, "_recreate_quadrants"); + tile_set->disconnect_compat("changed", this, "_recreate_quadrants"); tile_set->remove_change_receptor(this); } @@ -185,7 +185,7 @@ void TileMap::set_tileset(const Ref<TileSet> &p_tileset) { tile_set = p_tileset; if (tile_set.is_valid()) { - tile_set->connect("changed", this, "_recreate_quadrants"); + tile_set->connect_compat("changed", this, "_recreate_quadrants"); tile_set->add_change_receptor(this); } else { clear(); @@ -629,7 +629,7 @@ void TileMap::update_dirty_quadrants() { vs->canvas_item_set_z_index(debug_navigation_item, VS::CANVAS_ITEM_Z_MAX - 2); // Display one below collision debug if (debug_navigation_item.is_valid()) { - PoolVector<Vector2> navigation_polygon_vertices = navpoly->get_vertices(); + Vector<Vector2> navigation_polygon_vertices = navpoly->get_vertices(); int vsize = navigation_polygon_vertices.size(); if (vsize > 2) { @@ -638,7 +638,7 @@ void TileMap::update_dirty_quadrants() { vertices.resize(vsize); colors.resize(vsize); { - PoolVector<Vector2>::Read vr = navigation_polygon_vertices.read(); + const Vector2 *vr = navigation_polygon_vertices.ptr(); for (int j = 0; j < vsize; j++) { vertices.write[j] = vr[j]; colors.write[j] = debug_navigation_color; @@ -853,7 +853,7 @@ void TileMap::_set_celld(const Vector2 &p_pos, const Dictionary &p_data) { Variant v_pos_x = p_pos.x, v_pos_y = p_pos.y, v_tile = p_data["id"], v_flip_h = p_data["flip_h"], v_flip_v = p_data["flip_y"], v_transpose = p_data["transpose"], v_autotile_coord = p_data["auto_coord"]; const Variant *args[7] = { &v_pos_x, &v_pos_y, &v_tile, &v_flip_h, &v_flip_v, &v_transpose, &v_autotile_coord }; - Variant::CallError ce; + Callable::CallError ce; call("set_cell", args, 7, ce); } @@ -1207,12 +1207,12 @@ void TileMap::clear() { used_size_cache_dirty = true; } -void TileMap::_set_tile_data(const PoolVector<int> &p_data) { +void TileMap::_set_tile_data(const Vector<int> &p_data) { ERR_FAIL_COND(format > FORMAT_2); int c = p_data.size(); - PoolVector<int>::Read r = p_data.read(); + const int *r = p_data.ptr(); int offset = (format == FORMAT_2) ? 3 : 2; @@ -1255,11 +1255,11 @@ void TileMap::_set_tile_data(const PoolVector<int> &p_data) { } } -PoolVector<int> TileMap::_get_tile_data() const { +Vector<int> TileMap::_get_tile_data() const { - PoolVector<int> data; + Vector<int> data; data.resize(tile_map.size() * 3); - PoolVector<int>::Write w = data.write(); + int *w = data.ptrw(); // Save in highest format @@ -1281,8 +1281,6 @@ PoolVector<int> TileMap::_get_tile_data() const { idx += 3; } - w.release(); - return data; } @@ -1911,8 +1909,8 @@ void TileMap::_bind_methods() { ADD_GROUP("Collision", "collision_"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "collision_use_parent", PROPERTY_HINT_NONE, ""), "set_collision_use_parent", "get_collision_use_parent"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "collision_use_kinematic", PROPERTY_HINT_NONE, ""), "set_collision_use_kinematic", "get_collision_use_kinematic"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "collision_friction", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_collision_friction", "get_collision_friction"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "collision_bounce", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_collision_bounce", "get_collision_bounce"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "collision_friction", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_collision_friction", "get_collision_friction"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "collision_bounce", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_collision_bounce", "get_collision_bounce"); ADD_PROPERTY(PropertyInfo(Variant::INT, "collision_layer", PROPERTY_HINT_LAYERS_2D_PHYSICS), "set_collision_layer", "get_collision_layer"); ADD_PROPERTY(PropertyInfo(Variant::INT, "collision_mask", PROPERTY_HINT_LAYERS_2D_PHYSICS), "set_collision_mask", "get_collision_mask"); diff --git a/scene/2d/tile_map.h b/scene/2d/tile_map.h index d5ef7fc818..d9490aae13 100644 --- a/scene/2d/tile_map.h +++ b/scene/2d/tile_map.h @@ -220,8 +220,8 @@ private: _FORCE_INLINE_ int _get_quadrant_size() const; - void _set_tile_data(const PoolVector<int> &p_data); - PoolVector<int> _get_tile_data() const; + void _set_tile_data(const Vector<int> &p_data); + Vector<int> _get_tile_data() const; void _set_old_cell_size(int p_size) { set_cell_size(Size2(p_size, p_size)); } int _get_old_cell_size() const { return cell_size.x; } diff --git a/scene/2d/touch_screen_button.cpp b/scene/2d/touch_screen_button.cpp index beff74f496..7ca165985e 100644 --- a/scene/2d/touch_screen_button.cpp +++ b/scene/2d/touch_screen_button.cpp @@ -69,12 +69,12 @@ Ref<BitMap> TouchScreenButton::get_bitmask() const { void TouchScreenButton::set_shape(const Ref<Shape2D> &p_shape) { if (shape.is_valid()) - shape->disconnect("changed", this, "update"); + shape->disconnect_compat("changed", this, "update"); shape = p_shape; if (shape.is_valid()) - shape->connect("changed", this, "update"); + shape->connect_compat("changed", this, "update"); update(); } @@ -404,7 +404,7 @@ void TouchScreenButton::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::BOOL, "shape_centered"), "set_shape_centered", "is_shape_centered"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "shape_visible"), "set_shape_visible", "is_shape_visible"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "passby_press"), "set_passby_press", "is_passby_press_enabled"); - ADD_PROPERTY(PropertyInfo(Variant::STRING, "action"), "set_action", "get_action"); + ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "action"), "set_action", "get_action"); ADD_PROPERTY(PropertyInfo(Variant::INT, "visibility_mode", PROPERTY_HINT_ENUM, "Always,TouchScreen Only"), "set_visibility_mode", "get_visibility_mode"); ADD_SIGNAL(MethodInfo("pressed")); diff --git a/scene/2d/visibility_notifier_2d.cpp b/scene/2d/visibility_notifier_2d.cpp index 0ac725b7dd..3bfaf1f95c 100644 --- a/scene/2d/visibility_notifier_2d.cpp +++ b/scene/2d/visibility_notifier_2d.cpp @@ -224,7 +224,7 @@ void VisibilityEnabler2D::_find_nodes(Node *p_node) { if (add) { - p_node->connect(SceneStringNames::get_singleton()->tree_exiting, this, "_node_removed", varray(p_node), CONNECT_ONESHOT); + p_node->connect_compat(SceneStringNames::get_singleton()->tree_exiting, this, "_node_removed", varray(p_node), CONNECT_ONESHOT); nodes[p_node] = meta; _change_node_state(p_node, false); } @@ -267,7 +267,7 @@ void VisibilityEnabler2D::_notification(int p_what) { if (!visible) _change_node_state(E->key(), true); - E->key()->disconnect(SceneStringNames::get_singleton()->tree_exiting, this, "_node_removed"); + E->key()->disconnect_compat(SceneStringNames::get_singleton()->tree_exiting, this, "_node_removed"); } nodes.clear(); diff --git a/scene/3d/area.cpp b/scene/3d/area.cpp index 62908e2b0f..265b42ab5e 100644 --- a/scene/3d/area.cpp +++ b/scene/3d/area.cpp @@ -170,8 +170,8 @@ void Area::_body_inout(int p_status, const RID &p_body, ObjectID p_instance, int E->get().rc = 0; E->get().in_tree = node && node->is_inside_tree(); if (node) { - node->connect(SceneStringNames::get_singleton()->tree_entered, this, SceneStringNames::get_singleton()->_body_enter_tree, make_binds(objid)); - node->connect(SceneStringNames::get_singleton()->tree_exiting, this, SceneStringNames::get_singleton()->_body_exit_tree, make_binds(objid)); + node->connect_compat(SceneStringNames::get_singleton()->tree_entered, this, SceneStringNames::get_singleton()->_body_enter_tree, make_binds(objid)); + node->connect_compat(SceneStringNames::get_singleton()->tree_exiting, this, SceneStringNames::get_singleton()->_body_exit_tree, make_binds(objid)); if (E->get().in_tree) { emit_signal(SceneStringNames::get_singleton()->body_entered, node); } @@ -197,8 +197,8 @@ void Area::_body_inout(int p_status, const RID &p_body, ObjectID p_instance, int if (E->get().rc == 0) { if (node) { - node->disconnect(SceneStringNames::get_singleton()->tree_entered, this, SceneStringNames::get_singleton()->_body_enter_tree); - node->disconnect(SceneStringNames::get_singleton()->tree_exiting, this, SceneStringNames::get_singleton()->_body_exit_tree); + node->disconnect_compat(SceneStringNames::get_singleton()->tree_entered, this, SceneStringNames::get_singleton()->_body_enter_tree); + node->disconnect_compat(SceneStringNames::get_singleton()->tree_exiting, this, SceneStringNames::get_singleton()->_body_exit_tree); if (E->get().in_tree) emit_signal(SceneStringNames::get_singleton()->body_exited, obj); } @@ -244,8 +244,8 @@ void Area::_clear_monitoring() { emit_signal(SceneStringNames::get_singleton()->body_exited, node); - node->disconnect(SceneStringNames::get_singleton()->tree_entered, this, SceneStringNames::get_singleton()->_body_enter_tree); - node->disconnect(SceneStringNames::get_singleton()->tree_exiting, this, SceneStringNames::get_singleton()->_body_exit_tree); + node->disconnect_compat(SceneStringNames::get_singleton()->tree_entered, this, SceneStringNames::get_singleton()->_body_enter_tree); + node->disconnect_compat(SceneStringNames::get_singleton()->tree_exiting, this, SceneStringNames::get_singleton()->_body_exit_tree); } } @@ -274,8 +274,8 @@ void Area::_clear_monitoring() { emit_signal(SceneStringNames::get_singleton()->area_exited, obj); - node->disconnect(SceneStringNames::get_singleton()->tree_entered, this, SceneStringNames::get_singleton()->_area_enter_tree); - node->disconnect(SceneStringNames::get_singleton()->tree_exiting, this, SceneStringNames::get_singleton()->_area_exit_tree); + node->disconnect_compat(SceneStringNames::get_singleton()->tree_entered, this, SceneStringNames::get_singleton()->_area_enter_tree); + node->disconnect_compat(SceneStringNames::get_singleton()->tree_exiting, this, SceneStringNames::get_singleton()->_area_exit_tree); } } } @@ -363,8 +363,8 @@ void Area::_area_inout(int p_status, const RID &p_area, ObjectID p_instance, int E->get().rc = 0; E->get().in_tree = node && node->is_inside_tree(); if (node) { - node->connect(SceneStringNames::get_singleton()->tree_entered, this, SceneStringNames::get_singleton()->_area_enter_tree, make_binds(objid)); - node->connect(SceneStringNames::get_singleton()->tree_exiting, this, SceneStringNames::get_singleton()->_area_exit_tree, make_binds(objid)); + node->connect_compat(SceneStringNames::get_singleton()->tree_entered, this, SceneStringNames::get_singleton()->_area_enter_tree, make_binds(objid)); + node->connect_compat(SceneStringNames::get_singleton()->tree_exiting, this, SceneStringNames::get_singleton()->_area_exit_tree, make_binds(objid)); if (E->get().in_tree) { emit_signal(SceneStringNames::get_singleton()->area_entered, node); } @@ -390,8 +390,8 @@ void Area::_area_inout(int p_status, const RID &p_area, ObjectID p_instance, int if (E->get().rc == 0) { if (node) { - node->disconnect(SceneStringNames::get_singleton()->tree_entered, this, SceneStringNames::get_singleton()->_area_enter_tree); - node->disconnect(SceneStringNames::get_singleton()->tree_exiting, this, SceneStringNames::get_singleton()->_area_exit_tree); + node->disconnect_compat(SceneStringNames::get_singleton()->tree_entered, this, SceneStringNames::get_singleton()->_area_enter_tree); + node->disconnect_compat(SceneStringNames::get_singleton()->tree_exiting, this, SceneStringNames::get_singleton()->_area_exit_tree); if (E->get().in_tree) { emit_signal(SceneStringNames::get_singleton()->area_exited, obj); } @@ -706,11 +706,11 @@ void Area::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::INT, "space_override", PROPERTY_HINT_ENUM, "Disabled,Combine,Combine-Replace,Replace,Replace-Combine"), "set_space_override_mode", "get_space_override_mode"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "gravity_point"), "set_gravity_is_point", "is_gravity_a_point"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "gravity_distance_scale", PROPERTY_HINT_EXP_RANGE, "0,1024,0.001,or_greater"), "set_gravity_distance_scale", "get_gravity_distance_scale"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "gravity_distance_scale", PROPERTY_HINT_EXP_RANGE, "0,1024,0.001,or_greater"), "set_gravity_distance_scale", "get_gravity_distance_scale"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "gravity_vec"), "set_gravity_vector", "get_gravity_vector"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "gravity", PROPERTY_HINT_RANGE, "-1024,1024,0.01"), "set_gravity", "get_gravity"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "linear_damp", PROPERTY_HINT_RANGE, "0,100,0.001,or_greater"), "set_linear_damp", "get_linear_damp"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "angular_damp", PROPERTY_HINT_RANGE, "0,100,0.001,or_greater"), "set_angular_damp", "get_angular_damp"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "gravity", PROPERTY_HINT_RANGE, "-1024,1024,0.01"), "set_gravity", "get_gravity"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "linear_damp", PROPERTY_HINT_RANGE, "0,100,0.001,or_greater"), "set_linear_damp", "get_linear_damp"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "angular_damp", PROPERTY_HINT_RANGE, "0,100,0.001,or_greater"), "set_angular_damp", "get_angular_damp"); ADD_PROPERTY(PropertyInfo(Variant::INT, "priority", PROPERTY_HINT_RANGE, "0,128,1"), "set_priority", "get_priority"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "monitoring"), "set_monitoring", "is_monitoring"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "monitorable"), "set_monitorable", "is_monitorable"); @@ -719,12 +719,12 @@ void Area::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::INT, "collision_mask", PROPERTY_HINT_LAYERS_3D_PHYSICS), "set_collision_mask", "get_collision_mask"); ADD_GROUP("Audio Bus", "audio_bus_"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "audio_bus_override"), "set_audio_bus_override", "is_overriding_audio_bus"); - ADD_PROPERTY(PropertyInfo(Variant::STRING, "audio_bus_name", PROPERTY_HINT_ENUM, ""), "set_audio_bus", "get_audio_bus"); + ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "audio_bus_name", PROPERTY_HINT_ENUM, ""), "set_audio_bus", "get_audio_bus"); ADD_GROUP("Reverb Bus", "reverb_bus_"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "reverb_bus_enable"), "set_use_reverb_bus", "is_using_reverb_bus"); - ADD_PROPERTY(PropertyInfo(Variant::STRING, "reverb_bus_name", PROPERTY_HINT_ENUM, ""), "set_reverb_bus", "get_reverb_bus"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "reverb_bus_amount", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_reverb_amount", "get_reverb_amount"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "reverb_bus_uniformity", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_reverb_uniformity", "get_reverb_uniformity"); + ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "reverb_bus_name", PROPERTY_HINT_ENUM, ""), "set_reverb_bus", "get_reverb_bus"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "reverb_bus_amount", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_reverb_amount", "get_reverb_amount"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "reverb_bus_uniformity", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_reverb_uniformity", "get_reverb_uniformity"); BIND_ENUM_CONSTANT(SPACE_OVERRIDE_DISABLED); BIND_ENUM_CONSTANT(SPACE_OVERRIDE_COMBINE); diff --git a/scene/3d/arvr_nodes.cpp b/scene/3d/arvr_nodes.cpp index 8d1556ef1c..bf85a8bd53 100644 --- a/scene/3d/arvr_nodes.cpp +++ b/scene/3d/arvr_nodes.cpp @@ -252,7 +252,7 @@ void ARVRController::_bind_methods() { ClassDB::bind_method(D_METHOD("get_rumble"), &ARVRController::get_rumble); ClassDB::bind_method(D_METHOD("set_rumble", "rumble"), &ARVRController::set_rumble); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "rumble", PROPERTY_HINT_RANGE, "0.0,1.0,0.01"), "set_rumble", "get_rumble"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "rumble", PROPERTY_HINT_RANGE, "0.0,1.0,0.01"), "set_rumble", "get_rumble"); ADD_PROPERTY_DEFAULT("rumble", 0.0); ClassDB::bind_method(D_METHOD("get_mesh"), &ARVRController::get_mesh); @@ -544,7 +544,7 @@ String ARVROrigin::get_configuration_warning() const { void ARVROrigin::_bind_methods() { ClassDB::bind_method(D_METHOD("set_world_scale", "world_scale"), &ARVROrigin::set_world_scale); ClassDB::bind_method(D_METHOD("get_world_scale"), &ARVROrigin::get_world_scale); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "world_scale"), "set_world_scale", "get_world_scale"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "world_scale"), "set_world_scale", "get_world_scale"); }; void ARVROrigin::set_tracked_camera(ARVRCamera *p_tracked_camera) { diff --git a/scene/3d/audio_stream_player_3d.cpp b/scene/3d/audio_stream_player_3d.cpp index 596ef78fb5..461ac1748b 100644 --- a/scene/3d/audio_stream_player_3d.cpp +++ b/scene/3d/audio_stream_player_3d.cpp @@ -45,12 +45,12 @@ private: mutable real_t squared_gain; // temporary }; - PoolVector<Speaker> speakers; + Vector<Speaker> speakers; public: Spcap(unsigned int speaker_count, const Vector3 *speaker_directions) { this->speakers.resize(speaker_count); - PoolVector<Speaker>::Write w = this->speakers.write(); + Speaker *w = this->speakers.ptrw(); for (unsigned int speaker_num = 0; speaker_num < speaker_count; speaker_num++) { w[speaker_num].direction = speaker_directions[speaker_num]; w[speaker_num].squared_gain = 0.0; @@ -66,11 +66,11 @@ public: } Vector3 get_speaker_direction(unsigned int index) const { - return this->speakers.read()[index].direction; + return this->speakers.ptr()[index].direction; } void calculate(const Vector3 &source_direction, real_t tightness, unsigned int volume_count, real_t *volumes) const { - PoolVector<Speaker>::Read r = this->speakers.read(); + const Speaker *r = this->speakers.ptr(); real_t sum_squared_gains = 0.0; for (unsigned int speaker_num = 0; speaker_num < (unsigned int)this->speakers.size(); speaker_num++) { real_t initial_gain = 0.5 * powf(1.0 + r[speaker_num].direction.dot(source_direction), tightness) / r[speaker_num].effective_number_of_speakers; @@ -98,11 +98,18 @@ static const Vector3 speaker_directions[7] = { void AudioStreamPlayer3D::_calc_output_vol(const Vector3 &source_dir, real_t tightness, AudioStreamPlayer3D::Output &output) { unsigned int speaker_count; // only main speakers (no LFE) switch (AudioServer::get_singleton()->get_speaker_mode()) { - default: //fallthrough - case AudioServer::SPEAKER_MODE_STEREO: speaker_count = 2; break; - case AudioServer::SPEAKER_SURROUND_31: speaker_count = 3; break; - case AudioServer::SPEAKER_SURROUND_51: speaker_count = 5; break; - case AudioServer::SPEAKER_SURROUND_71: speaker_count = 7; break; + case AudioServer::SPEAKER_MODE_STEREO: + speaker_count = 2; + break; + case AudioServer::SPEAKER_SURROUND_31: + speaker_count = 3; + break; + case AudioServer::SPEAKER_SURROUND_51: + speaker_count = 5; + break; + case AudioServer::SPEAKER_SURROUND_71: + speaker_count = 7; + break; } Spcap spcap(speaker_count, speaker_directions); //TODO: should only be created/recreated once the speaker mode / speaker positions changes @@ -113,18 +120,19 @@ void AudioStreamPlayer3D::_calc_output_vol(const Vector3 &source_dir, real_t tig case AudioServer::SPEAKER_SURROUND_71: output.vol[3].l = volumes[5]; // side-left output.vol[3].r = volumes[6]; // side-right - //fallthrough + [[fallthrough]]; case AudioServer::SPEAKER_SURROUND_51: output.vol[2].l = volumes[3]; // rear-left output.vol[2].r = volumes[4]; // rear-right - //fallthrough + [[fallthrough]]; case AudioServer::SPEAKER_SURROUND_31: output.vol[1].r = 1.0; // LFE - always full power output.vol[1].l = volumes[2]; // center - //fallthrough + [[fallthrough]]; case AudioServer::SPEAKER_MODE_STEREO: output.vol[0].r = volumes[1]; // front-right output.vol[0].l = volumes[0]; // front-left + break; } } @@ -1004,24 +1012,24 @@ void AudioStreamPlayer3D::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "stream", PROPERTY_HINT_RESOURCE_TYPE, "AudioStream"), "set_stream", "get_stream"); ADD_PROPERTY(PropertyInfo(Variant::INT, "attenuation_model", PROPERTY_HINT_ENUM, "Inverse,InverseSquare,Log,Disabled"), "set_attenuation_model", "get_attenuation_model"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "unit_db", PROPERTY_HINT_RANGE, "-80,80"), "set_unit_db", "get_unit_db"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "unit_size", PROPERTY_HINT_RANGE, "0.1,100,0.1"), "set_unit_size", "get_unit_size"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "max_db", PROPERTY_HINT_RANGE, "-24,6"), "set_max_db", "get_max_db"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "pitch_scale", PROPERTY_HINT_RANGE, "0.01,32,0.01"), "set_pitch_scale", "get_pitch_scale"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "unit_db", PROPERTY_HINT_RANGE, "-80,80"), "set_unit_db", "get_unit_db"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "unit_size", PROPERTY_HINT_RANGE, "0.1,100,0.1"), "set_unit_size", "get_unit_size"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "max_db", PROPERTY_HINT_RANGE, "-24,6"), "set_max_db", "get_max_db"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "pitch_scale", PROPERTY_HINT_RANGE, "0.01,4,0.01,or_greater"), "set_pitch_scale", "get_pitch_scale"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "playing", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR), "_set_playing", "is_playing"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "autoplay"), "set_autoplay", "is_autoplay_enabled"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "stream_paused", PROPERTY_HINT_NONE, ""), "set_stream_paused", "get_stream_paused"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "max_distance", PROPERTY_HINT_EXP_RANGE, "0,4096,1,or_greater"), "set_max_distance", "get_max_distance"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "max_distance", PROPERTY_HINT_EXP_RANGE, "0,4096,1,or_greater"), "set_max_distance", "get_max_distance"); ADD_PROPERTY(PropertyInfo(Variant::INT, "out_of_range_mode", PROPERTY_HINT_ENUM, "Mix,Pause"), "set_out_of_range_mode", "get_out_of_range_mode"); - ADD_PROPERTY(PropertyInfo(Variant::STRING, "bus", PROPERTY_HINT_ENUM, ""), "set_bus", "get_bus"); + ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "bus", PROPERTY_HINT_ENUM, ""), "set_bus", "get_bus"); ADD_PROPERTY(PropertyInfo(Variant::INT, "area_mask", PROPERTY_HINT_LAYERS_2D_PHYSICS), "set_area_mask", "get_area_mask"); ADD_GROUP("Emission Angle", "emission_angle"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "emission_angle_enabled"), "set_emission_angle_enabled", "is_emission_angle_enabled"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "emission_angle_degrees", PROPERTY_HINT_RANGE, "0.1,90,0.1"), "set_emission_angle", "get_emission_angle"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "emission_angle_filter_attenuation_db", PROPERTY_HINT_RANGE, "-80,0,0.1"), "set_emission_angle_filter_attenuation_db", "get_emission_angle_filter_attenuation_db"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "emission_angle_degrees", PROPERTY_HINT_RANGE, "0.1,90,0.1"), "set_emission_angle", "get_emission_angle"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "emission_angle_filter_attenuation_db", PROPERTY_HINT_RANGE, "-80,0,0.1"), "set_emission_angle_filter_attenuation_db", "get_emission_angle_filter_attenuation_db"); ADD_GROUP("Attenuation Filter", "attenuation_filter_"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "attenuation_filter_cutoff_hz", PROPERTY_HINT_RANGE, "1,20500,1"), "set_attenuation_filter_cutoff_hz", "get_attenuation_filter_cutoff_hz"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "attenuation_filter_db", PROPERTY_HINT_RANGE, "-80,0,0.1"), "set_attenuation_filter_db", "get_attenuation_filter_db"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "attenuation_filter_cutoff_hz", PROPERTY_HINT_RANGE, "1,20500,1"), "set_attenuation_filter_cutoff_hz", "get_attenuation_filter_cutoff_hz"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "attenuation_filter_db", PROPERTY_HINT_RANGE, "-80,0,0.1"), "set_attenuation_filter_db", "get_attenuation_filter_db"); ADD_GROUP("Doppler", "doppler_"); ADD_PROPERTY(PropertyInfo(Variant::INT, "doppler_tracking", PROPERTY_HINT_ENUM, "Disabled,Idle,Physics"), "set_doppler_tracking", "get_doppler_tracking"); @@ -1068,7 +1076,7 @@ AudioStreamPlayer3D::AudioStreamPlayer3D() { stream_paused_fade_out = false; velocity_tracker.instance(); - AudioServer::get_singleton()->connect("bus_layout_changed", this, "_bus_layout_changed"); + AudioServer::get_singleton()->connect_compat("bus_layout_changed", this, "_bus_layout_changed"); set_disable_scale(true); } AudioStreamPlayer3D::~AudioStreamPlayer3D() { diff --git a/scene/3d/baked_lightmap.cpp b/scene/3d/baked_lightmap.cpp index 31a80bc2db..73b1d450f0 100644 --- a/scene/3d/baked_lightmap.cpp +++ b/scene/3d/baked_lightmap.cpp @@ -47,12 +47,12 @@ AABB BakedLightmapData::get_bounds() const { return bounds; } -void BakedLightmapData::set_octree(const PoolVector<uint8_t> &p_octree) { +void BakedLightmapData::set_octree(const Vector<uint8_t> &p_octree) { VS::get_singleton()->lightmap_capture_set_octree(baked_light, p_octree); } -PoolVector<uint8_t> BakedLightmapData::get_octree() const { +Vector<uint8_t> BakedLightmapData::get_octree() const { return VS::get_singleton()->lightmap_capture_get_octree(baked_light); } @@ -174,8 +174,8 @@ void BakedLightmapData::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::AABB, "bounds", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_bounds", "get_bounds"); ADD_PROPERTY(PropertyInfo(Variant::TRANSFORM, "cell_space_transform", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_cell_space_transform", "get_cell_space_transform"); ADD_PROPERTY(PropertyInfo(Variant::INT, "cell_subdiv", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_cell_subdiv", "get_cell_subdiv"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "energy", PROPERTY_HINT_RANGE, "0,16,0.01,or_greater"), "set_energy", "get_energy"); - ADD_PROPERTY(PropertyInfo(Variant::POOL_BYTE_ARRAY, "octree", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_octree", "get_octree"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "energy", PROPERTY_HINT_RANGE, "0,16,0.01,or_greater"), "set_energy", "get_energy"); + ADD_PROPERTY(PropertyInfo(Variant::PACKED_BYTE_ARRAY, "octree", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_octree", "get_octree"); ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "user_data", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_user_data", "_get_user_data"); } @@ -495,13 +495,13 @@ BakedLightmap::BakeError BakedLightmap::bake(Node *p_from_node, bool p_create_vi if (hdr) { //just save a regular image - PoolVector<uint8_t> data; + Vector<uint8_t> data; int s = lm.light.size(); data.resize(lm.light.size() * 2); { - PoolVector<uint8_t>::Write w = data.write(); - PoolVector<float>::Read r = lm.light.read(); + uint8_t* w = data.ptrw(); + const float* r = lm.light.ptr(); uint16_t *hfw = (uint16_t *)w.ptr(); for (int i = 0; i < s; i++) { hfw[i] = Math::make_half_float(r[i]); @@ -513,13 +513,13 @@ BakedLightmap::BakeError BakedLightmap::bake(Node *p_from_node, bool p_create_vi } else { //just save a regular image - PoolVector<uint8_t> data; + Vector<uint8_t> data; int s = lm.light.size(); data.resize(lm.light.size()); { - PoolVector<uint8_t>::Write w = data.write(); - PoolVector<float>::Read r = lm.light.read(); + uint8_t* w = data.ptrw(); + const float* r = lm.light.ptr(); for (int i = 0; i < s; i += 3) { Color c(r[i + 0], r[i + 1], r[i + 2]); c = c.to_srgb(); @@ -775,8 +775,8 @@ String BakedLightmap::get_image_path() const { AABB BakedLightmap::get_aabb() const { return AABB(-extents, extents * 2); } -PoolVector<Face3> BakedLightmap::get_faces(uint32_t p_usage_flags) const { - return PoolVector<Face3>(); +Vector<Face3> BakedLightmap::get_faces(uint32_t p_usage_flags) const { + return Vector<Face3>(); } void BakedLightmap::_bind_methods() { @@ -819,16 +819,16 @@ void BakedLightmap::_bind_methods() { ClassDB::set_method_flags(get_class_static(), _scs_create("debug_bake"), METHOD_FLAGS_DEFAULT | METHOD_FLAG_EDITOR); ADD_GROUP("Bake", "bake_"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "bake_cell_size", PROPERTY_HINT_RANGE, "0.01,64,0.01"), "set_bake_cell_size", "get_bake_cell_size"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "bake_cell_size", PROPERTY_HINT_RANGE, "0.01,64,0.01"), "set_bake_cell_size", "get_bake_cell_size"); ADD_PROPERTY(PropertyInfo(Variant::INT, "bake_quality", PROPERTY_HINT_ENUM, "Low,Medium,High"), "set_bake_quality", "get_bake_quality"); ADD_PROPERTY(PropertyInfo(Variant::INT, "bake_mode", PROPERTY_HINT_ENUM, "ConeTrace,RayTrace"), "set_bake_mode", "get_bake_mode"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "bake_propagation", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_propagation", "get_propagation"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "bake_energy", PROPERTY_HINT_RANGE, "0,32,0.01"), "set_energy", "get_energy"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "bake_propagation", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_propagation", "get_propagation"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "bake_energy", PROPERTY_HINT_RANGE, "0,32,0.01"), "set_energy", "get_energy"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "bake_hdr"), "set_hdr", "is_hdr"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "bake_extents"), "set_extents", "get_extents"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "bake_default_texels_per_unit"), "set_bake_default_texels_per_unit", "get_bake_default_texels_per_unit"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "bake_default_texels_per_unit"), "set_bake_default_texels_per_unit", "get_bake_default_texels_per_unit"); ADD_GROUP("Capture", "capture_"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "capture_cell_size", PROPERTY_HINT_RANGE, "0.01,64,0.01"), "set_capture_cell_size", "get_capture_cell_size"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "capture_cell_size", PROPERTY_HINT_RANGE, "0.01,64,0.01"), "set_capture_cell_size", "get_capture_cell_size"); ADD_GROUP("Data", ""); ADD_PROPERTY(PropertyInfo(Variant::STRING, "image_path", PROPERTY_HINT_DIR), "set_image_path", "get_image_path"); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "light_data", PROPERTY_HINT_RESOURCE_TYPE, "BakedLightmapData"), "set_light_data", "get_light_data"); diff --git a/scene/3d/baked_lightmap.h b/scene/3d/baked_lightmap.h index 0633ffa641..bc9e3f55ea 100644 --- a/scene/3d/baked_lightmap.h +++ b/scene/3d/baked_lightmap.h @@ -64,8 +64,8 @@ public: void set_bounds(const AABB &p_bounds); AABB get_bounds() const; - void set_octree(const PoolVector<uint8_t> &p_octree); - PoolVector<uint8_t> get_octree() const; + void set_octree(const Vector<uint8_t> &p_octree); + Vector<uint8_t> get_octree() const; void set_cell_space_transform(const Transform &p_xform); Transform get_cell_space_transform() const; @@ -202,7 +202,7 @@ public: String get_image_path() const; AABB get_aabb() const; - PoolVector<Face3> get_faces(uint32_t p_usage_flags) const; + Vector<Face3> get_faces(uint32_t p_usage_flags) const; BakeError bake(Node *p_from_node, bool p_create_visual_debug = false); BakedLightmap(); diff --git a/scene/3d/bone_attachment.cpp b/scene/3d/bone_attachment.cpp index e94e174b92..b1cd9bfe8b 100644 --- a/scene/3d/bone_attachment.cpp +++ b/scene/3d/bone_attachment.cpp @@ -123,5 +123,5 @@ void BoneAttachment::_bind_methods() { ClassDB::bind_method(D_METHOD("set_bone_name", "bone_name"), &BoneAttachment::set_bone_name); ClassDB::bind_method(D_METHOD("get_bone_name"), &BoneAttachment::get_bone_name); - ADD_PROPERTY(PropertyInfo(Variant::STRING, "bone_name"), "set_bone_name", "get_bone_name"); + ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "bone_name"), "set_bone_name", "get_bone_name"); } diff --git a/scene/3d/camera.cpp b/scene/3d/camera.cpp index ac8d50c419..741712025c 100644 --- a/scene/3d/camera.cpp +++ b/scene/3d/camera.cpp @@ -545,16 +545,16 @@ void Camera::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::INT, "cull_mask", PROPERTY_HINT_LAYERS_3D_RENDER), "set_cull_mask", "get_cull_mask"); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "environment", PROPERTY_HINT_RESOURCE_TYPE, "Environment"), "set_environment", "get_environment"); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "effects", PROPERTY_HINT_RESOURCE_TYPE, "CameraEffects"), "set_effects", "get_effects"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "h_offset"), "set_h_offset", "get_h_offset"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "v_offset"), "set_v_offset", "get_v_offset"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "h_offset"), "set_h_offset", "get_h_offset"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "v_offset"), "set_v_offset", "get_v_offset"); ADD_PROPERTY(PropertyInfo(Variant::INT, "doppler_tracking", PROPERTY_HINT_ENUM, "Disabled,Idle,Physics"), "set_doppler_tracking", "get_doppler_tracking"); ADD_PROPERTY(PropertyInfo(Variant::INT, "projection", PROPERTY_HINT_ENUM, "Perspective,Orthogonal,Frustum"), "set_projection", "get_projection"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "current"), "set_current", "is_current"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "fov", PROPERTY_HINT_RANGE, "1,179,0.1"), "set_fov", "get_fov"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "size", PROPERTY_HINT_RANGE, "0.1,16384,0.01"), "set_size", "get_size"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "fov", PROPERTY_HINT_RANGE, "1,179,0.1"), "set_fov", "get_fov"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "size", PROPERTY_HINT_RANGE, "0.1,16384,0.01"), "set_size", "get_size"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "frustum_offset"), "set_frustum_offset", "get_frustum_offset"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "near", PROPERTY_HINT_EXP_RANGE, "0.01,8192,0.01,or_greater"), "set_znear", "get_znear"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "far", PROPERTY_HINT_EXP_RANGE, "0.1,8192,0.1,or_greater"), "set_zfar", "get_zfar"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "near", PROPERTY_HINT_EXP_RANGE, "0.01,8192,0.01,or_greater"), "set_znear", "get_znear"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "far", PROPERTY_HINT_EXP_RANGE, "0.1,8192,0.1,or_greater"), "set_zfar", "get_zfar"); BIND_ENUM_CONSTANT(PROJECTION_PERSPECTIVE); BIND_ENUM_CONSTANT(PROJECTION_ORTHOGONAL); @@ -926,7 +926,7 @@ void ClippedCamera::_bind_methods() { ClassDB::bind_method(D_METHOD("clear_exceptions"), &ClippedCamera::clear_exceptions); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "margin", PROPERTY_HINT_RANGE, "0,32,0.01"), "set_margin", "get_margin"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "margin", PROPERTY_HINT_RANGE, "0,32,0.01"), "set_margin", "get_margin"); ADD_PROPERTY(PropertyInfo(Variant::INT, "process_mode", PROPERTY_HINT_ENUM, "Physics,Idle"), "set_process_mode", "get_process_mode"); ADD_PROPERTY(PropertyInfo(Variant::INT, "collision_mask", PROPERTY_HINT_LAYERS_3D_PHYSICS), "set_collision_mask", "get_collision_mask"); diff --git a/scene/3d/collision_polygon.cpp b/scene/3d/collision_polygon.cpp index cc07072962..636b859477 100644 --- a/scene/3d/collision_polygon.cpp +++ b/scene/3d/collision_polygon.cpp @@ -53,11 +53,11 @@ void CollisionPolygon::_build_polygon() { for (int i = 0; i < decomp.size(); i++) { Ref<ConvexPolygonShape> convex = memnew(ConvexPolygonShape); - PoolVector<Vector3> cp; + Vector<Vector3> cp; int cs = decomp[i].size(); cp.resize(cs * 2); { - PoolVector<Vector3>::Write w = cp.write(); + Vector3 *w = cp.ptrw(); int idx = 0; for (int j = 0; j < cs; j++) { @@ -191,9 +191,9 @@ void CollisionPolygon::_bind_methods() { ClassDB::bind_method(D_METHOD("_is_editable_3d_polygon"), &CollisionPolygon::_is_editable_3d_polygon); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "depth"), "set_depth", "get_depth"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "depth"), "set_depth", "get_depth"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "disabled"), "set_disabled", "is_disabled"); - ADD_PROPERTY(PropertyInfo(Variant::POOL_VECTOR2_ARRAY, "polygon"), "set_polygon", "get_polygon"); + ADD_PROPERTY(PropertyInfo(Variant::PACKED_VECTOR2_ARRAY, "polygon"), "set_polygon", "get_polygon"); } CollisionPolygon::CollisionPolygon() { diff --git a/scene/3d/collision_shape.cpp b/scene/3d/collision_shape.cpp index bf2816fd41..d0d775d557 100644 --- a/scene/3d/collision_shape.cpp +++ b/scene/3d/collision_shape.cpp @@ -152,12 +152,12 @@ void CollisionShape::set_shape(const Ref<Shape> &p_shape) { if (!shape.is_null()) { shape->unregister_owner(this); - shape->disconnect("changed", this, "_shape_changed"); + shape->disconnect_compat("changed", this, "_shape_changed"); } shape = p_shape; if (!shape.is_null()) { shape->register_owner(this); - shape->connect("changed", this, "_shape_changed"); + shape->connect_compat("changed", this, "_shape_changed"); } update_gizmo(); if (parent) { diff --git a/scene/3d/cpu_particles.cpp b/scene/3d/cpu_particles.cpp index 6e26f7ce8f..cddbe4bbbb 100644 --- a/scene/3d/cpu_particles.cpp +++ b/scene/3d/cpu_particles.cpp @@ -39,9 +39,9 @@ AABB CPUParticles::get_aabb() const { return AABB(); } -PoolVector<Face3> CPUParticles::get_faces(uint32_t p_usage_flags) const { +Vector<Face3> CPUParticles::get_faces(uint32_t p_usage_flags) const { - return PoolVector<Face3>(); + return Vector<Face3>(); } void CPUParticles::set_emitting(bool p_emitting) { @@ -65,7 +65,7 @@ void CPUParticles::set_amount(int p_amount) { particles.resize(p_amount); { - PoolVector<Particle>::Write w = particles.write(); + Particle *w = particles.ptrw(); for (int i = 0; i < p_amount; i++) { w[i].active = false; @@ -244,7 +244,7 @@ void CPUParticles::restart() { { int pc = particles.size(); - PoolVector<Particle>::Write w = particles.write(); + Particle *w = particles.ptrw(); for (int i = 0; i < pc; i++) { w[i].active = false; @@ -419,17 +419,17 @@ void CPUParticles::set_emission_box_extents(Vector3 p_extents) { emission_box_extents = p_extents; } -void CPUParticles::set_emission_points(const PoolVector<Vector3> &p_points) { +void CPUParticles::set_emission_points(const Vector<Vector3> &p_points) { emission_points = p_points; } -void CPUParticles::set_emission_normals(const PoolVector<Vector3> &p_normals) { +void CPUParticles::set_emission_normals(const Vector<Vector3> &p_normals) { emission_normals = p_normals; } -void CPUParticles::set_emission_colors(const PoolVector<Color> &p_colors) { +void CPUParticles::set_emission_colors(const Vector<Color> &p_colors) { emission_colors = p_colors; } @@ -442,16 +442,16 @@ Vector3 CPUParticles::get_emission_box_extents() const { return emission_box_extents; } -PoolVector<Vector3> CPUParticles::get_emission_points() const { +Vector<Vector3> CPUParticles::get_emission_points() const { return emission_points; } -PoolVector<Vector3> CPUParticles::get_emission_normals() const { +Vector<Vector3> CPUParticles::get_emission_normals() const { return emission_normals; } -PoolVector<Color> CPUParticles::get_emission_colors() const { +Vector<Color> CPUParticles::get_emission_colors() const { return emission_colors; } @@ -597,9 +597,9 @@ void CPUParticles::_particles_process(float p_delta) { p_delta *= speed_scale; int pcount = particles.size(); - PoolVector<Particle>::Write w = particles.write(); + Particle *w = particles.ptrw(); - Particle *parray = w.ptr(); + Particle *parray = w; float prev_time = time; time += p_delta; @@ -1025,23 +1025,23 @@ void CPUParticles::_update_particle_data_buffer() { int pc = particles.size(); - PoolVector<int>::Write ow; + int *ow; int *order = NULL; - PoolVector<float>::Write w = particle_data.write(); - PoolVector<Particle>::Read r = particles.read(); - float *ptr = w.ptr(); + float *w = particle_data.ptrw(); + const Particle *r = particles.ptr(); + float *ptr = w; if (draw_order != DRAW_ORDER_INDEX) { - ow = particle_order.write(); - order = ow.ptr(); + ow = particle_order.ptrw(); + order = ow; for (int i = 0; i < pc; i++) { order[i] = i; } if (draw_order == DRAW_ORDER_LIFETIME) { SortArray<int, SortLifetime> sorter; - sorter.compare.particles = r.ptr(); + sorter.compare.particles = r; sorter.sort(order, pc); } else if (draw_order == DRAW_ORDER_VIEW_DEPTH) { Camera *c = get_viewport()->get_camera(); @@ -1058,7 +1058,7 @@ void CPUParticles::_update_particle_data_buffer() { } SortArray<int, SortAxis> sorter; - sorter.compare.particles = r.ptr(); + sorter.compare.particles = r; sorter.compare.axis = dir; sorter.sort(order, pc); } @@ -1123,12 +1123,12 @@ void CPUParticles::_set_redraw(bool p_redraw) { update_mutex->lock(); #endif if (redraw) { - VS::get_singleton()->connect("frame_pre_draw", this, "_update_render_thread"); + VS::get_singleton()->connect_compat("frame_pre_draw", this, "_update_render_thread"); VS::get_singleton()->instance_geometry_set_flag(get_instance(), VS::INSTANCE_FLAG_DRAW_NEXT_FRAME_IF_VISIBLE, true); VS::get_singleton()->multimesh_set_visible_instances(multimesh, -1); } else { - if (VS::get_singleton()->is_connected("frame_pre_draw", this, "_update_render_thread")) { - VS::get_singleton()->disconnect("frame_pre_draw", this, "_update_render_thread"); + if (VS::get_singleton()->is_connected_compat("frame_pre_draw", this, "_update_render_thread")) { + VS::get_singleton()->disconnect_compat("frame_pre_draw", this, "_update_render_thread"); } VS::get_singleton()->instance_geometry_set_flag(get_instance(), VS::INSTANCE_FLAG_DRAW_NEXT_FRAME_IF_VISIBLE, false); VS::get_singleton()->multimesh_set_visible_instances(multimesh, 0); @@ -1185,9 +1185,9 @@ void CPUParticles::_notification(int p_what) { int pc = particles.size(); - PoolVector<float>::Write w = particle_data.write(); - PoolVector<Particle>::Read r = particles.read(); - float *ptr = w.ptr(); + float *w = particle_data.ptrw(); + const Particle *r = particles.ptr(); + float *ptr = w; for (int i = 0; i < pc; i++) { @@ -1327,13 +1327,13 @@ void CPUParticles::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::BOOL, "emitting"), "set_emitting", "is_emitting"); ADD_PROPERTY(PropertyInfo(Variant::INT, "amount", PROPERTY_HINT_EXP_RANGE, "1,1000000,1"), "set_amount", "get_amount"); ADD_GROUP("Time", ""); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "lifetime", PROPERTY_HINT_EXP_RANGE, "0.01,600.0,0.01,or_greater"), "set_lifetime", "get_lifetime"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "lifetime", PROPERTY_HINT_EXP_RANGE, "0.01,600.0,0.01,or_greater"), "set_lifetime", "get_lifetime"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "one_shot"), "set_one_shot", "get_one_shot"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "preprocess", PROPERTY_HINT_EXP_RANGE, "0.00,600.0,0.01"), "set_pre_process_time", "get_pre_process_time"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "speed_scale", PROPERTY_HINT_RANGE, "0,64,0.01"), "set_speed_scale", "get_speed_scale"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "explosiveness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_explosiveness_ratio", "get_explosiveness_ratio"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "randomness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_randomness_ratio", "get_randomness_ratio"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "lifetime_randomness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_lifetime_randomness", "get_lifetime_randomness"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "preprocess", PROPERTY_HINT_EXP_RANGE, "0.00,600.0,0.01"), "set_pre_process_time", "get_pre_process_time"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "speed_scale", PROPERTY_HINT_RANGE, "0,64,0.01"), "set_speed_scale", "get_speed_scale"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "explosiveness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_explosiveness_ratio", "get_explosiveness_ratio"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "randomness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_randomness_ratio", "get_randomness_ratio"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "lifetime_randomness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_lifetime_randomness", "get_lifetime_randomness"); ADD_PROPERTY(PropertyInfo(Variant::INT, "fixed_fps", PROPERTY_HINT_RANGE, "0,1000,1"), "set_fixed_fps", "get_fixed_fps"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "fract_delta"), "set_fractional_delta", "get_fractional_delta"); ADD_GROUP("Drawing", ""); @@ -1401,70 +1401,70 @@ void CPUParticles::_bind_methods() { ADD_GROUP("Emission Shape", "emission_"); ADD_PROPERTY(PropertyInfo(Variant::INT, "emission_shape", PROPERTY_HINT_ENUM, "Point,Sphere,Box,Points,Directed Points"), "set_emission_shape", "get_emission_shape"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "emission_sphere_radius", PROPERTY_HINT_RANGE, "0.01,128,0.01"), "set_emission_sphere_radius", "get_emission_sphere_radius"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "emission_sphere_radius", PROPERTY_HINT_RANGE, "0.01,128,0.01"), "set_emission_sphere_radius", "get_emission_sphere_radius"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "emission_box_extents"), "set_emission_box_extents", "get_emission_box_extents"); - ADD_PROPERTY(PropertyInfo(Variant::POOL_VECTOR3_ARRAY, "emission_points"), "set_emission_points", "get_emission_points"); - ADD_PROPERTY(PropertyInfo(Variant::POOL_VECTOR3_ARRAY, "emission_normals"), "set_emission_normals", "get_emission_normals"); - ADD_PROPERTY(PropertyInfo(Variant::POOL_COLOR_ARRAY, "emission_colors"), "set_emission_colors", "get_emission_colors"); + ADD_PROPERTY(PropertyInfo(Variant::PACKED_VECTOR3_ARRAY, "emission_points"), "set_emission_points", "get_emission_points"); + ADD_PROPERTY(PropertyInfo(Variant::PACKED_VECTOR3_ARRAY, "emission_normals"), "set_emission_normals", "get_emission_normals"); + ADD_PROPERTY(PropertyInfo(Variant::PACKED_COLOR_ARRAY, "emission_colors"), "set_emission_colors", "get_emission_colors"); ADD_GROUP("Flags", "flag_"); ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "flag_align_y"), "set_particle_flag", "get_particle_flag", FLAG_ALIGN_Y_TO_VELOCITY); ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "flag_rotate_y"), "set_particle_flag", "get_particle_flag", FLAG_ROTATE_Y); ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "flag_disable_z"), "set_particle_flag", "get_particle_flag", FLAG_DISABLE_Z); ADD_GROUP("Direction", ""); ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "direction"), "set_direction", "get_direction"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "spread", PROPERTY_HINT_RANGE, "0,180,0.01"), "set_spread", "get_spread"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "flatness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_flatness", "get_flatness"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "spread", PROPERTY_HINT_RANGE, "0,180,0.01"), "set_spread", "get_spread"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "flatness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_flatness", "get_flatness"); ADD_GROUP("Gravity", ""); ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "gravity"), "set_gravity", "get_gravity"); ADD_GROUP("Initial Velocity", "initial_"); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "initial_velocity", PROPERTY_HINT_RANGE, "0,1000,0.01,or_greater"), "set_param", "get_param", PARAM_INITIAL_LINEAR_VELOCITY); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "initial_velocity_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_INITIAL_LINEAR_VELOCITY); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "initial_velocity", PROPERTY_HINT_RANGE, "0,1000,0.01,or_greater"), "set_param", "get_param", PARAM_INITIAL_LINEAR_VELOCITY); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "initial_velocity_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_INITIAL_LINEAR_VELOCITY); ADD_GROUP("Angular Velocity", "angular_"); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_velocity", PROPERTY_HINT_RANGE, "-720,720,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_ANGULAR_VELOCITY); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_velocity_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANGULAR_VELOCITY); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_velocity", PROPERTY_HINT_RANGE, "-720,720,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_ANGULAR_VELOCITY); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_velocity_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANGULAR_VELOCITY); ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "angular_velocity_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_ANGULAR_VELOCITY); ADD_GROUP("Orbit Velocity", "orbit_"); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "orbit_velocity", PROPERTY_HINT_RANGE, "-1000,1000,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_ORBIT_VELOCITY); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "orbit_velocity_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ORBIT_VELOCITY); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "orbit_velocity", PROPERTY_HINT_RANGE, "-1000,1000,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_ORBIT_VELOCITY); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "orbit_velocity_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ORBIT_VELOCITY); ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "orbit_velocity_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_ORBIT_VELOCITY); ADD_GROUP("Linear Accel", "linear_"); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_accel", PROPERTY_HINT_RANGE, "-100,100,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_LINEAR_ACCEL); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_accel_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_LINEAR_ACCEL); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_accel", PROPERTY_HINT_RANGE, "-100,100,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_LINEAR_ACCEL); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_accel_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_LINEAR_ACCEL); ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "linear_accel_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_LINEAR_ACCEL); ADD_GROUP("Radial Accel", "radial_"); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "radial_accel", PROPERTY_HINT_RANGE, "-100,100,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_RADIAL_ACCEL); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "radial_accel_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_RADIAL_ACCEL); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "radial_accel", PROPERTY_HINT_RANGE, "-100,100,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_RADIAL_ACCEL); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "radial_accel_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_RADIAL_ACCEL); ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "radial_accel_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_RADIAL_ACCEL); ADD_GROUP("Tangential Accel", "tangential_"); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "tangential_accel", PROPERTY_HINT_RANGE, "-100,100,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_TANGENTIAL_ACCEL); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "tangential_accel_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_TANGENTIAL_ACCEL); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "tangential_accel", PROPERTY_HINT_RANGE, "-100,100,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_TANGENTIAL_ACCEL); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "tangential_accel_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_TANGENTIAL_ACCEL); ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "tangential_accel_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_TANGENTIAL_ACCEL); ADD_GROUP("Damping", ""); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "damping", PROPERTY_HINT_RANGE, "0,100,0.01"), "set_param", "get_param", PARAM_DAMPING); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "damping_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_DAMPING); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "damping", PROPERTY_HINT_RANGE, "0,100,0.01"), "set_param", "get_param", PARAM_DAMPING); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "damping_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_DAMPING); ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "damping_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_DAMPING); ADD_GROUP("Angle", ""); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angle", PROPERTY_HINT_RANGE, "-720,720,0.1,or_lesser,or_greater"), "set_param", "get_param", PARAM_ANGLE); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angle_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANGLE); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angle", PROPERTY_HINT_RANGE, "-720,720,0.1,or_lesser,or_greater"), "set_param", "get_param", PARAM_ANGLE); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angle_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANGLE); ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "angle_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_ANGLE); ADD_GROUP("Scale", ""); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "scale_amount", PROPERTY_HINT_RANGE, "0,1000,0.01,or_greater"), "set_param", "get_param", PARAM_SCALE); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "scale_amount_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_SCALE); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "scale_amount", PROPERTY_HINT_RANGE, "0,1000,0.01,or_greater"), "set_param", "get_param", PARAM_SCALE); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "scale_amount_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_SCALE); ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "scale_amount_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_SCALE); ADD_GROUP("Color", ""); ADD_PROPERTY(PropertyInfo(Variant::COLOR, "color"), "set_color", "get_color"); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "color_ramp", PROPERTY_HINT_RESOURCE_TYPE, "Gradient"), "set_color_ramp", "get_color_ramp"); ADD_GROUP("Hue Variation", "hue_"); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "hue_variation", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_param", "get_param", PARAM_HUE_VARIATION); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "hue_variation_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_HUE_VARIATION); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "hue_variation", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_param", "get_param", PARAM_HUE_VARIATION); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "hue_variation_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_HUE_VARIATION); ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "hue_variation_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_HUE_VARIATION); ADD_GROUP("Animation", "anim_"); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "anim_speed", PROPERTY_HINT_RANGE, "0,128,0.01,or_greater"), "set_param", "get_param", PARAM_ANIM_SPEED); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "anim_speed_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANIM_SPEED); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "anim_speed", PROPERTY_HINT_RANGE, "0,128,0.01,or_greater"), "set_param", "get_param", PARAM_ANIM_SPEED); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "anim_speed_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANIM_SPEED); ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "anim_speed_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_ANIM_SPEED); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "anim_offset", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param", "get_param", PARAM_ANIM_OFFSET); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "anim_offset_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANIM_OFFSET); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "anim_offset", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param", "get_param", PARAM_ANIM_OFFSET); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "anim_offset_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANIM_OFFSET); ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "anim_offset_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_ANIM_OFFSET); BIND_ENUM_CONSTANT(PARAM_INITIAL_LINEAR_VELOCITY); diff --git a/scene/3d/cpu_particles.h b/scene/3d/cpu_particles.h index d5a549b976..1a5537e4f2 100644 --- a/scene/3d/cpu_particles.h +++ b/scene/3d/cpu_particles.h @@ -106,9 +106,9 @@ private: RID multimesh; - PoolVector<Particle> particles; - PoolVector<float> particle_data; - PoolVector<int> particle_order; + Vector<Particle> particles; + Vector<float> particle_data; + Vector<int> particle_order; struct SortLifetime { const Particle *particles; @@ -167,9 +167,9 @@ private: EmissionShape emission_shape; float emission_sphere_radius; Vector3 emission_box_extents; - PoolVector<Vector3> emission_points; - PoolVector<Vector3> emission_normals; - PoolVector<Color> emission_colors; + Vector<Vector3> emission_points; + Vector<Vector3> emission_normals; + Vector<Color> emission_colors; int emission_point_count; Vector3 gravity; @@ -191,7 +191,7 @@ protected: public: AABB get_aabb() const; - PoolVector<Face3> get_faces(uint32_t p_usage_flags) const; + Vector<Face3> get_faces(uint32_t p_usage_flags) const; void set_emitting(bool p_emitting); void set_amount(int p_amount); @@ -264,17 +264,17 @@ public: void set_emission_shape(EmissionShape p_shape); void set_emission_sphere_radius(float p_radius); void set_emission_box_extents(Vector3 p_extents); - void set_emission_points(const PoolVector<Vector3> &p_points); - void set_emission_normals(const PoolVector<Vector3> &p_normals); - void set_emission_colors(const PoolVector<Color> &p_colors); + void set_emission_points(const Vector<Vector3> &p_points); + void set_emission_normals(const Vector<Vector3> &p_normals); + void set_emission_colors(const Vector<Color> &p_colors); void set_emission_point_count(int p_count); EmissionShape get_emission_shape() const; float get_emission_sphere_radius() const; Vector3 get_emission_box_extents() const; - PoolVector<Vector3> get_emission_points() const; - PoolVector<Vector3> get_emission_normals() const; - PoolVector<Color> get_emission_colors() const; + Vector<Vector3> get_emission_points() const; + Vector<Vector3> get_emission_normals() const; + Vector<Color> get_emission_colors() const; int get_emission_point_count() const; void set_gravity(const Vector3 &p_gravity); diff --git a/scene/3d/gi_probe.cpp b/scene/3d/gi_probe.cpp index 34540525af..c3f039ae85 100644 --- a/scene/3d/gi_probe.cpp +++ b/scene/3d/gi_probe.cpp @@ -47,14 +47,14 @@ void GIProbeData::_set_data(const Dictionary &p_data) { AABB bounds = p_data["bounds"]; Vector3 octree_size = p_data["octree_size"]; - PoolVector<uint8_t> octree_cells = p_data["octree_cells"]; - PoolVector<uint8_t> octree_data = p_data["octree_data"]; + Vector<uint8_t> octree_cells = p_data["octree_cells"]; + Vector<uint8_t> octree_data = p_data["octree_data"]; - PoolVector<uint8_t> octree_df; + Vector<uint8_t> octree_df; if (p_data.has("octree_df")) { octree_df = p_data["octree_df"]; } else if (p_data.has("octree_df_png")) { - PoolVector<uint8_t> octree_df_png = p_data["octree_df_png"]; + Vector<uint8_t> octree_df_png = p_data["octree_df_png"]; Ref<Image> img; img.instance(); Error err = img->load_png_from_buffer(octree_df_png); @@ -62,7 +62,7 @@ void GIProbeData::_set_data(const Dictionary &p_data) { ERR_FAIL_COND(img->get_format() != Image::FORMAT_L8); octree_df = img->get_data(); } - PoolVector<int> octree_levels = p_data["level_counts"]; + Vector<int> octree_levels = p_data["level_counts"]; Transform to_cell_xform = p_data["to_cell_xform"]; allocate(to_cell_xform, bounds, octree_size, octree_cells, octree_data, octree_df, octree_levels); @@ -79,11 +79,11 @@ Dictionary GIProbeData::_get_data() const { Ref<Image> img; img.instance(); img->create(otsize.x * otsize.y, otsize.z, false, Image::FORMAT_L8, get_distance_field()); - PoolVector<uint8_t> df_png = img->save_png_to_buffer(); + Vector<uint8_t> df_png = img->save_png_to_buffer(); ERR_FAIL_COND_V(df_png.size() == 0, Dictionary()); d["octree_df_png"] = df_png; } else { - d["octree_df"] = PoolVector<uint8_t>(); + d["octree_df"] = Vector<uint8_t>(); } d["level_counts"] = get_level_counts(); @@ -91,7 +91,7 @@ Dictionary GIProbeData::_get_data() const { return d; } -void GIProbeData::allocate(const Transform &p_to_cell_xform, const AABB &p_aabb, const Vector3 &p_octree_size, const PoolVector<uint8_t> &p_octree_cells, const PoolVector<uint8_t> &p_data_cells, const PoolVector<uint8_t> &p_distance_field, const PoolVector<int> &p_level_counts) { +void GIProbeData::allocate(const Transform &p_to_cell_xform, const AABB &p_aabb, const Vector3 &p_octree_size, const Vector<uint8_t> &p_octree_cells, const Vector<uint8_t> &p_data_cells, const Vector<uint8_t> &p_distance_field, const Vector<int> &p_level_counts) { VS::get_singleton()->gi_probe_allocate(probe, p_to_cell_xform, p_aabb, p_octree_size, p_octree_cells, p_data_cells, p_distance_field, p_level_counts); bounds = p_aabb; to_cell_xform = p_to_cell_xform; @@ -104,17 +104,17 @@ AABB GIProbeData::get_bounds() const { Vector3 GIProbeData::get_octree_size() const { return octree_size; } -PoolVector<uint8_t> GIProbeData::get_octree_cells() const { +Vector<uint8_t> GIProbeData::get_octree_cells() const { return VS::get_singleton()->gi_probe_get_octree_cells(probe); } -PoolVector<uint8_t> GIProbeData::get_data_cells() const { +Vector<uint8_t> GIProbeData::get_data_cells() const { return VS::get_singleton()->gi_probe_get_data_cells(probe); } -PoolVector<uint8_t> GIProbeData::get_distance_field() const { +Vector<uint8_t> GIProbeData::get_distance_field() const { return VS::get_singleton()->gi_probe_get_distance_field(probe); } -PoolVector<int> GIProbeData::get_level_counts() const { +Vector<int> GIProbeData::get_level_counts() const { return VS::get_singleton()->gi_probe_get_level_counts(probe); } Transform GIProbeData::get_to_cell_xform() const { @@ -271,13 +271,13 @@ void GIProbeData::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::DICTIONARY, "_data", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_data", "_get_data"); ADD_PROPERTY(PropertyInfo(Variant::INT, "dynamic_range", PROPERTY_HINT_RANGE, "0,8,0.01"), "set_dynamic_range", "get_dynamic_range"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "energy", PROPERTY_HINT_RANGE, "0,64,0.01"), "set_energy", "get_energy"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "bias", PROPERTY_HINT_RANGE, "0,8,0.01"), "set_bias", "get_bias"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "normal_bias", PROPERTY_HINT_RANGE, "0,8,0.01"), "set_normal_bias", "get_normal_bias"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "propagation", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_propagation", "get_propagation"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "anisotropy_strength", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_anisotropy_strength", "get_anisotropy_strength"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "ao", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_ao", "get_ao"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "ao_size", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_ao_size", "get_ao_size"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "energy", PROPERTY_HINT_RANGE, "0,64,0.01"), "set_energy", "get_energy"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "bias", PROPERTY_HINT_RANGE, "0,8,0.01"), "set_bias", "get_bias"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "normal_bias", PROPERTY_HINT_RANGE, "0,8,0.01"), "set_normal_bias", "get_normal_bias"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "propagation", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_propagation", "get_propagation"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "anisotropy_strength", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_anisotropy_strength", "get_anisotropy_strength"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "ao", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_ao", "get_ao"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "ao_size", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_ao_size", "get_ao_size"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "use_two_bounces"), "set_use_two_bounces", "is_using_two_bounces"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "interior"), "set_interior", "is_interior"); } @@ -492,7 +492,7 @@ void GIProbe::bake(Node *p_from_node, bool p_create_visual_debug) { bake_step_function(pmc++, RTR("Generating Distance Field")); } - PoolVector<uint8_t> df = baker.get_sdf_3d_image(); + Vector<uint8_t> df = baker.get_sdf_3d_image(); probe_data->allocate(baker.get_to_cell_space_xform(), AABB(-extents, extents * 2.0), baker.get_giprobe_octree_size(), baker.get_giprobe_octree_cells(), baker.get_giprobe_data_cells(), df, baker.get_giprobe_level_cell_count()); @@ -519,9 +519,9 @@ AABB GIProbe::get_aabb() const { return AABB(-extents, extents * 2); } -PoolVector<Face3> GIProbe::get_faces(uint32_t p_usage_flags) const { +Vector<Face3> GIProbe::get_faces(uint32_t p_usage_flags) const { - return PoolVector<Face3>(); + return Vector<Face3>(); } String GIProbe::get_configuration_warning() const { diff --git a/scene/3d/gi_probe.h b/scene/3d/gi_probe.h index 60aa1d952c..354eaad7c0 100644 --- a/scene/3d/gi_probe.h +++ b/scene/3d/gi_probe.h @@ -63,13 +63,13 @@ protected: void _validate_property(PropertyInfo &property) const; public: - void allocate(const Transform &p_to_cell_xform, const AABB &p_aabb, const Vector3 &p_octree_size, const PoolVector<uint8_t> &p_octree_cells, const PoolVector<uint8_t> &p_data_cells, const PoolVector<uint8_t> &p_distance_field, const PoolVector<int> &p_level_counts); + void allocate(const Transform &p_to_cell_xform, const AABB &p_aabb, const Vector3 &p_octree_size, const Vector<uint8_t> &p_octree_cells, const Vector<uint8_t> &p_data_cells, const Vector<uint8_t> &p_distance_field, const Vector<int> &p_level_counts); AABB get_bounds() const; Vector3 get_octree_size() const; - PoolVector<uint8_t> get_octree_cells() const; - PoolVector<uint8_t> get_data_cells() const; - PoolVector<uint8_t> get_distance_field() const; - PoolVector<int> get_level_counts() const; + Vector<uint8_t> get_octree_cells() const; + Vector<uint8_t> get_data_cells() const; + Vector<uint8_t> get_distance_field() const; + Vector<int> get_level_counts() const; Transform get_to_cell_xform() const; void set_dynamic_range(float p_range); @@ -164,7 +164,7 @@ public: void bake(Node *p_from_node = NULL, bool p_create_visual_debug = false); virtual AABB get_aabb() const; - virtual PoolVector<Face3> get_faces(uint32_t p_usage_flags) const; + virtual Vector<Face3> get_faces(uint32_t p_usage_flags) const; virtual String get_configuration_warning() const; diff --git a/scene/3d/immediate_geometry.cpp b/scene/3d/immediate_geometry.cpp index afe60226b6..f5b08b86e1 100644 --- a/scene/3d/immediate_geometry.cpp +++ b/scene/3d/immediate_geometry.cpp @@ -90,9 +90,9 @@ AABB ImmediateGeometry::get_aabb() const { return aabb; } -PoolVector<Face3> ImmediateGeometry::get_faces(uint32_t p_usage_flags) const { +Vector<Face3> ImmediateGeometry::get_faces(uint32_t p_usage_flags) const { - return PoolVector<Face3>(); + return Vector<Face3>(); } void ImmediateGeometry::add_sphere(int p_lats, int p_lons, float p_radius, bool p_add_uv) { diff --git a/scene/3d/immediate_geometry.h b/scene/3d/immediate_geometry.h index 7f506ce9ef..77a20e8d4d 100644 --- a/scene/3d/immediate_geometry.h +++ b/scene/3d/immediate_geometry.h @@ -64,7 +64,7 @@ public: void add_sphere(int p_lats, int p_lons, float p_radius, bool p_add_uv = true); virtual AABB get_aabb() const; - virtual PoolVector<Face3> get_faces(uint32_t p_usage_flags) const; + virtual Vector<Face3> get_faces(uint32_t p_usage_flags) const; ImmediateGeometry(); ~ImmediateGeometry(); diff --git a/scene/3d/interpolated_camera.cpp b/scene/3d/interpolated_camera.cpp index baf5ac4be6..592d592a38 100644 --- a/scene/3d/interpolated_camera.cpp +++ b/scene/3d/interpolated_camera.cpp @@ -144,7 +144,7 @@ void InterpolatedCamera::_bind_methods() { ClassDB::bind_method(D_METHOD("is_interpolation_enabled"), &InterpolatedCamera::is_interpolation_enabled); ADD_PROPERTY(PropertyInfo(Variant::NODE_PATH, "target"), "set_target_path", "get_target_path"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "speed"), "set_speed", "get_speed"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "speed"), "set_speed", "get_speed"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "enabled"), "set_interpolation_enabled", "is_interpolation_enabled"); } diff --git a/scene/3d/light.cpp b/scene/3d/light.cpp index 8d3b9bbaf0..7c922ce1cd 100644 --- a/scene/3d/light.cpp +++ b/scene/3d/light.cpp @@ -152,9 +152,9 @@ AABB Light::get_aabb() const { return AABB(); } -PoolVector<Face3> Light::get_faces(uint32_t p_usage_flags) const { +Vector<Face3> Light::get_faces(uint32_t p_usage_flags) const { - return PoolVector<Face3>(); + return Vector<Face3>(); } void Light::set_bake_mode(BakeMode p_mode) { @@ -253,17 +253,17 @@ void Light::_bind_methods() { ADD_GROUP("Light", "light_"); ADD_PROPERTY(PropertyInfo(Variant::COLOR, "light_color", PROPERTY_HINT_COLOR_NO_ALPHA), "set_color", "get_color"); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "light_energy", PROPERTY_HINT_RANGE, "0,16,0.01,or_greater"), "set_param", "get_param", PARAM_ENERGY); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "light_indirect_energy", PROPERTY_HINT_RANGE, "0,16,0.01,or_greater"), "set_param", "get_param", PARAM_INDIRECT_ENERGY); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "light_energy", PROPERTY_HINT_RANGE, "0,16,0.01,or_greater"), "set_param", "get_param", PARAM_ENERGY); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "light_indirect_energy", PROPERTY_HINT_RANGE, "0,16,0.01,or_greater"), "set_param", "get_param", PARAM_INDIRECT_ENERGY); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "light_negative"), "set_negative", "is_negative"); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "light_specular", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param", "get_param", PARAM_SPECULAR); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "light_specular", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param", "get_param", PARAM_SPECULAR); ADD_PROPERTY(PropertyInfo(Variant::INT, "light_bake_mode", PROPERTY_HINT_ENUM, "Disable,Indirect,All"), "set_bake_mode", "get_bake_mode"); ADD_PROPERTY(PropertyInfo(Variant::INT, "light_cull_mask", PROPERTY_HINT_LAYERS_3D_RENDER), "set_cull_mask", "get_cull_mask"); ADD_GROUP("Shadow", "shadow_"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "shadow_enabled"), "set_shadow", "has_shadow"); ADD_PROPERTY(PropertyInfo(Variant::COLOR, "shadow_color", PROPERTY_HINT_COLOR_NO_ALPHA), "set_shadow_color", "get_shadow_color"); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "shadow_bias", PROPERTY_HINT_RANGE, "-16,16,0.01"), "set_param", "get_param", PARAM_SHADOW_BIAS); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "shadow_contact", PROPERTY_HINT_RANGE, "0,16,0.01"), "set_param", "get_param", PARAM_CONTACT_SHADOW_SIZE); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "shadow_bias", PROPERTY_HINT_RANGE, "-16,16,0.01"), "set_param", "get_param", PARAM_SHADOW_BIAS); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "shadow_contact", PROPERTY_HINT_RANGE, "0,16,0.01"), "set_param", "get_param", PARAM_CONTACT_SHADOW_SIZE); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "shadow_reverse_cull_face"), "set_shadow_reverse_cull_face", "get_shadow_reverse_cull_face"); ADD_GROUP("Editor", ""); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "editor_only"), "set_editor_only", "is_editor_only"); @@ -393,15 +393,15 @@ void DirectionalLight::_bind_methods() { ADD_GROUP("Directional Shadow", "directional_shadow_"); ADD_PROPERTY(PropertyInfo(Variant::INT, "directional_shadow_mode", PROPERTY_HINT_ENUM, "Orthogonal,PSSM 2 Splits,PSSM 4 Splits"), "set_shadow_mode", "get_shadow_mode"); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "directional_shadow_split_1", PROPERTY_HINT_RANGE, "0,1,0.001"), "set_param", "get_param", PARAM_SHADOW_SPLIT_1_OFFSET); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "directional_shadow_split_2", PROPERTY_HINT_RANGE, "0,1,0.001"), "set_param", "get_param", PARAM_SHADOW_SPLIT_2_OFFSET); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "directional_shadow_split_3", PROPERTY_HINT_RANGE, "0,1,0.001"), "set_param", "get_param", PARAM_SHADOW_SPLIT_3_OFFSET); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "directional_shadow_fade_start", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param", "get_param", PARAM_SHADOW_FADE_START); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "directional_shadow_split_1", PROPERTY_HINT_RANGE, "0,1,0.001"), "set_param", "get_param", PARAM_SHADOW_SPLIT_1_OFFSET); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "directional_shadow_split_2", PROPERTY_HINT_RANGE, "0,1,0.001"), "set_param", "get_param", PARAM_SHADOW_SPLIT_2_OFFSET); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "directional_shadow_split_3", PROPERTY_HINT_RANGE, "0,1,0.001"), "set_param", "get_param", PARAM_SHADOW_SPLIT_3_OFFSET); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "directional_shadow_fade_start", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param", "get_param", PARAM_SHADOW_FADE_START); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "directional_shadow_blend_splits"), "set_blend_splits", "is_blend_splits_enabled"); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "directional_shadow_normal_bias", PROPERTY_HINT_RANGE, "0,16,0.01"), "set_param", "get_param", PARAM_SHADOW_NORMAL_BIAS); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "directional_shadow_bias_split_scale", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param", "get_param", PARAM_SHADOW_BIAS_SPLIT_SCALE); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "directional_shadow_normal_bias", PROPERTY_HINT_RANGE, "0,16,0.01"), "set_param", "get_param", PARAM_SHADOW_NORMAL_BIAS); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "directional_shadow_bias_split_scale", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param", "get_param", PARAM_SHADOW_BIAS_SPLIT_SCALE); ADD_PROPERTY(PropertyInfo(Variant::INT, "directional_shadow_depth_range", PROPERTY_HINT_ENUM, "Stable,Optimized"), "set_shadow_depth_range", "get_shadow_depth_range"); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "directional_shadow_max_distance", PROPERTY_HINT_EXP_RANGE, "0,8192,0.1,or_greater"), "set_param", "get_param", PARAM_SHADOW_MAX_DISTANCE); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "directional_shadow_max_distance", PROPERTY_HINT_EXP_RANGE, "0,8192,0.1,or_greater"), "set_param", "get_param", PARAM_SHADOW_MAX_DISTANCE); BIND_ENUM_CONSTANT(SHADOW_ORTHOGONAL); BIND_ENUM_CONSTANT(SHADOW_PARALLEL_2_SPLITS); @@ -442,8 +442,8 @@ void OmniLight::_bind_methods() { ClassDB::bind_method(D_METHOD("get_shadow_mode"), &OmniLight::get_shadow_mode); ADD_GROUP("Omni", "omni_"); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "omni_range", PROPERTY_HINT_EXP_RANGE, "0,4096,0.1,or_greater"), "set_param", "get_param", PARAM_RANGE); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "omni_attenuation", PROPERTY_HINT_EXP_EASING, "attenuation"), "set_param", "get_param", PARAM_ATTENUATION); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "omni_range", PROPERTY_HINT_EXP_RANGE, "0,4096,0.1,or_greater"), "set_param", "get_param", PARAM_RANGE); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "omni_attenuation", PROPERTY_HINT_EXP_EASING, "attenuation"), "set_param", "get_param", PARAM_ATTENUATION); ADD_PROPERTY(PropertyInfo(Variant::INT, "omni_shadow_mode", PROPERTY_HINT_ENUM, "Dual Paraboloid,Cube"), "set_shadow_mode", "get_shadow_mode"); BIND_ENUM_CONSTANT(SHADOW_DUAL_PARABOLOID); @@ -473,8 +473,8 @@ String SpotLight::get_configuration_warning() const { void SpotLight::_bind_methods() { ADD_GROUP("Spot", "spot_"); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "spot_range", PROPERTY_HINT_EXP_RANGE, "0,4096,0.1,or_greater"), "set_param", "get_param", PARAM_RANGE); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "spot_attenuation", PROPERTY_HINT_EXP_EASING, "attenuation"), "set_param", "get_param", PARAM_ATTENUATION); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "spot_angle", PROPERTY_HINT_RANGE, "0,180,0.1"), "set_param", "get_param", PARAM_SPOT_ANGLE); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "spot_angle_attenuation", PROPERTY_HINT_EXP_EASING, "attenuation"), "set_param", "get_param", PARAM_SPOT_ATTENUATION); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "spot_range", PROPERTY_HINT_EXP_RANGE, "0,4096,0.1,or_greater"), "set_param", "get_param", PARAM_RANGE); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "spot_attenuation", PROPERTY_HINT_EXP_EASING, "attenuation"), "set_param", "get_param", PARAM_ATTENUATION); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "spot_angle", PROPERTY_HINT_RANGE, "0,180,0.1"), "set_param", "get_param", PARAM_SPOT_ANGLE); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "spot_angle_attenuation", PROPERTY_HINT_EXP_EASING, "attenuation"), "set_param", "get_param", PARAM_SPOT_ATTENUATION); } diff --git a/scene/3d/light.h b/scene/3d/light.h index 7287518ae9..16e0c47083 100644 --- a/scene/3d/light.h +++ b/scene/3d/light.h @@ -124,7 +124,7 @@ public: BakeMode get_bake_mode() const; virtual AABB get_aabb() const; - virtual PoolVector<Face3> get_faces(uint32_t p_usage_flags) const; + virtual Vector<Face3> get_faces(uint32_t p_usage_flags) const; Light(); ~Light(); diff --git a/scene/3d/mesh_instance.cpp b/scene/3d/mesh_instance.cpp index 6d0216d99c..06e1202a24 100644 --- a/scene/3d/mesh_instance.cpp +++ b/scene/3d/mesh_instance.cpp @@ -96,7 +96,7 @@ void MeshInstance::_get_property_list(List<PropertyInfo> *p_list) const { ls.sort(); for (List<String>::Element *E = ls.front(); E; E = E->next()) { - p_list->push_back(PropertyInfo(Variant::REAL, E->get(), PROPERTY_HINT_RANGE, "0,1,0.00001")); + p_list->push_back(PropertyInfo(Variant::FLOAT, E->get(), PROPERTY_HINT_RANGE, "0,1,0.00001")); } if (mesh.is_valid()) { @@ -112,7 +112,7 @@ void MeshInstance::set_mesh(const Ref<Mesh> &p_mesh) { return; if (mesh.is_valid()) { - mesh->disconnect(CoreStringNames::get_singleton()->changed, this, SceneStringNames::get_singleton()->_mesh_changed); + mesh->disconnect_compat(CoreStringNames::get_singleton()->changed, this, SceneStringNames::get_singleton()->_mesh_changed); materials.clear(); } @@ -129,7 +129,7 @@ void MeshInstance::set_mesh(const Ref<Mesh> &p_mesh) { blend_shape_tracks["blend_shapes/" + String(mesh->get_blend_shape_name(i))] = mt; } - mesh->connect(CoreStringNames::get_singleton()->changed, this, SceneStringNames::get_singleton()->_mesh_changed); + mesh->connect_compat(CoreStringNames::get_singleton()->changed, this, SceneStringNames::get_singleton()->_mesh_changed); materials.resize(mesh->get_surface_count()); set_base(mesh->get_rid()); @@ -204,13 +204,13 @@ AABB MeshInstance::get_aabb() const { return AABB(); } -PoolVector<Face3> MeshInstance::get_faces(uint32_t p_usage_flags) const { +Vector<Face3> MeshInstance::get_faces(uint32_t p_usage_flags) const { if (!(p_usage_flags & (FACES_SOLID | FACES_ENCLOSING))) - return PoolVector<Face3>(); + return Vector<Face3>(); if (mesh.is_null()) - return PoolVector<Face3>(); + return Vector<Face3>(); return mesh->get_faces(); } diff --git a/scene/3d/mesh_instance.h b/scene/3d/mesh_instance.h index fd5f60a5d7..d49d9ed98f 100644 --- a/scene/3d/mesh_instance.h +++ b/scene/3d/mesh_instance.h @@ -94,7 +94,7 @@ public: void create_debug_tangents(); virtual AABB get_aabb() const; - virtual PoolVector<Face3> get_faces(uint32_t p_usage_flags) const; + virtual Vector<Face3> get_faces(uint32_t p_usage_flags) const; MeshInstance(); ~MeshInstance(); diff --git a/scene/3d/multimesh_instance.cpp b/scene/3d/multimesh_instance.cpp index 245dbdaf58..075eb0a1ec 100644 --- a/scene/3d/multimesh_instance.cpp +++ b/scene/3d/multimesh_instance.cpp @@ -51,9 +51,9 @@ Ref<MultiMesh> MultiMeshInstance::get_multimesh() const { return multimesh; } -PoolVector<Face3> MultiMeshInstance::get_faces(uint32_t p_usage_flags) const { +Vector<Face3> MultiMeshInstance::get_faces(uint32_t p_usage_flags) const { - return PoolVector<Face3>(); + return Vector<Face3>(); } AABB MultiMeshInstance::get_aabb() const { diff --git a/scene/3d/multimesh_instance.h b/scene/3d/multimesh_instance.h index 855bd54910..2b59c3b96c 100644 --- a/scene/3d/multimesh_instance.h +++ b/scene/3d/multimesh_instance.h @@ -44,7 +44,7 @@ protected: // bind helpers public: - virtual PoolVector<Face3> get_faces(uint32_t p_usage_flags) const; + virtual Vector<Face3> get_faces(uint32_t p_usage_flags) const; void set_multimesh(const Ref<MultiMesh> &p_multimesh); Ref<MultiMesh> get_multimesh() const; diff --git a/scene/3d/navigation.cpp b/scene/3d/navigation.cpp index 10b12f5c75..8c543bc97f 100644 --- a/scene/3d/navigation.cpp +++ b/scene/3d/navigation.cpp @@ -32,11 +32,27 @@ #include "servers/navigation_server.h" -Vector<Vector3> Navigation::get_simple_path(const Vector3 &p_start, const Vector3 &p_end, bool p_optimize) { +Vector<Vector3> Navigation::get_simple_path(const Vector3 &p_start, const Vector3 &p_end, bool p_optimize) const { return NavigationServer::get_singleton()->map_get_path(map, p_start, p_end, p_optimize); } +Vector3 Navigation::get_closest_point_to_segment(const Vector3 &p_from, const Vector3 &p_to, bool p_use_collision) const { + return NavigationServer::get_singleton()->map_get_closest_point_to_segment(map, p_from, p_to, p_use_collision); +} + +Vector3 Navigation::get_closest_point(const Vector3 &p_point) const { + return NavigationServer::get_singleton()->map_get_closest_point(map, p_point); +} + +Vector3 Navigation::get_closest_point_normal(const Vector3 &p_point) const { + return NavigationServer::get_singleton()->map_get_closest_point_normal(map, p_point); +} + +RID Navigation::get_closest_point_owner(const Vector3 &p_point) const { + return NavigationServer::get_singleton()->map_get_closest_point_owner(map, p_point); +} + void Navigation::set_up_vector(const Vector3 &p_up) { up = p_up; @@ -63,6 +79,10 @@ void Navigation::_bind_methods() { ClassDB::bind_method(D_METHOD("get_rid"), &Navigation::get_rid); ClassDB::bind_method(D_METHOD("get_simple_path", "start", "end", "optimize"), &Navigation::get_simple_path, DEFVAL(true)); + ClassDB::bind_method(D_METHOD("get_closest_point_to_segment", "start", "end", "use_collision"), &Navigation::get_closest_point_to_segment, DEFVAL(false)); + ClassDB::bind_method(D_METHOD("get_closest_point", "to_point"), &Navigation::get_closest_point); + ClassDB::bind_method(D_METHOD("get_closest_point_normal", "to_point"), &Navigation::get_closest_point_normal); + ClassDB::bind_method(D_METHOD("get_closest_point_owner", "to_point"), &Navigation::get_closest_point_owner); ClassDB::bind_method(D_METHOD("set_up_vector", "up"), &Navigation::set_up_vector); ClassDB::bind_method(D_METHOD("get_up_vector"), &Navigation::get_up_vector); @@ -74,8 +94,8 @@ void Navigation::_bind_methods() { ClassDB::bind_method(D_METHOD("get_edge_connection_margin"), &Navigation::get_edge_connection_margin); ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "up_vector"), "set_up_vector", "get_up_vector"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "cell_size"), "set_cell_size", "get_cell_size"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "edge_connection_margin"), "set_edge_connection_margin", "get_edge_connection_margin"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "cell_size"), "set_cell_size", "get_cell_size"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "edge_connection_margin"), "set_edge_connection_margin", "get_edge_connection_margin"); } void Navigation::_notification(int p_what) { diff --git a/scene/3d/navigation.h b/scene/3d/navigation.h index 68e041ad73..85887651ff 100644 --- a/scene/3d/navigation.h +++ b/scene/3d/navigation.h @@ -66,7 +66,11 @@ public: return edge_connection_margin; } - Vector<Vector3> get_simple_path(const Vector3 &p_start, const Vector3 &p_end, bool p_optimize = true); + Vector<Vector3> get_simple_path(const Vector3 &p_start, const Vector3 &p_end, bool p_optimize = true) const; + Vector3 get_closest_point_to_segment(const Vector3 &p_from, const Vector3 &p_to, bool p_use_collision = false) const; + Vector3 get_closest_point(const Vector3 &p_point) const; + Vector3 get_closest_point_normal(const Vector3 &p_point) const; + RID get_closest_point_owner(const Vector3 &p_point) const; Navigation(); ~Navigation(); diff --git a/scene/3d/navigation_agent.cpp b/scene/3d/navigation_agent.cpp index 29cdd6f204..728fc947e9 100644 --- a/scene/3d/navigation_agent.cpp +++ b/scene/3d/navigation_agent.cpp @@ -80,14 +80,14 @@ void NavigationAgent::_bind_methods() { ClassDB::bind_method(D_METHOD("_avoidance_done", "new_velocity"), &NavigationAgent::_avoidance_done); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "target_desired_distance", PROPERTY_HINT_RANGE, "0.1,100,0.01"), "set_target_desired_distance", "get_target_desired_distance"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "radius", PROPERTY_HINT_RANGE, "0.1,100,0.01"), "set_radius", "get_radius"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "agent_height_offset", PROPERTY_HINT_RANGE, "-100.0,100,0.01"), "set_agent_height_offset", "get_agent_height_offset"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "neighbor_dist", PROPERTY_HINT_RANGE, "0.1,10000,0.01"), "set_neighbor_dist", "get_neighbor_dist"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "target_desired_distance", PROPERTY_HINT_RANGE, "0.1,100,0.01"), "set_target_desired_distance", "get_target_desired_distance"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "radius", PROPERTY_HINT_RANGE, "0.1,100,0.01"), "set_radius", "get_radius"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "agent_height_offset", PROPERTY_HINT_RANGE, "-100.0,100,0.01"), "set_agent_height_offset", "get_agent_height_offset"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "neighbor_dist", PROPERTY_HINT_RANGE, "0.1,10000,0.01"), "set_neighbor_dist", "get_neighbor_dist"); ADD_PROPERTY(PropertyInfo(Variant::INT, "max_neighbors", PROPERTY_HINT_RANGE, "1,10000,1"), "set_max_neighbors", "get_max_neighbors"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "time_horizon", PROPERTY_HINT_RANGE, "0.01,100,0.01"), "set_time_horizon", "get_time_horizon"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "max_speed", PROPERTY_HINT_RANGE, "0.1,10000,0.01"), "set_max_speed", "get_max_speed"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "path_max_distance", PROPERTY_HINT_RANGE, "0.01,100,0.1"), "set_path_max_distance", "get_path_max_distance"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "time_horizon", PROPERTY_HINT_RANGE, "0.01,100,0.01"), "set_time_horizon", "get_time_horizon"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "max_speed", PROPERTY_HINT_RANGE, "0.1,10000,0.01"), "set_max_speed", "get_max_speed"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "path_max_distance", PROPERTY_HINT_RANGE, "0.01,100,0.1"), "set_path_max_distance", "get_path_max_distance"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "ignore_y"), "set_ignore_y", "get_ignore_y"); ADD_SIGNAL(MethodInfo("path_changed")); diff --git a/scene/3d/particles.cpp b/scene/3d/particles.cpp index 9fe626474e..e502b0c037 100644 --- a/scene/3d/particles.cpp +++ b/scene/3d/particles.cpp @@ -39,9 +39,9 @@ AABB Particles::get_aabb() const { return AABB(); } -PoolVector<Face3> Particles::get_faces(uint32_t p_usage_flags) const { +Vector<Face3> Particles::get_faces(uint32_t p_usage_flags) const { - return PoolVector<Face3>(); + return Vector<Face3>(); } void Particles::set_emitting(bool p_emitting) { @@ -386,12 +386,12 @@ void Particles::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::BOOL, "emitting"), "set_emitting", "is_emitting"); ADD_PROPERTY(PropertyInfo(Variant::INT, "amount", PROPERTY_HINT_EXP_RANGE, "1,1000000,1"), "set_amount", "get_amount"); ADD_GROUP("Time", ""); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "lifetime", PROPERTY_HINT_EXP_RANGE, "0.01,600.0,0.01,or_greater"), "set_lifetime", "get_lifetime"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "lifetime", PROPERTY_HINT_EXP_RANGE, "0.01,600.0,0.01,or_greater"), "set_lifetime", "get_lifetime"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "one_shot"), "set_one_shot", "get_one_shot"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "preprocess", PROPERTY_HINT_EXP_RANGE, "0.00,600.0,0.01"), "set_pre_process_time", "get_pre_process_time"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "speed_scale", PROPERTY_HINT_RANGE, "0,64,0.01"), "set_speed_scale", "get_speed_scale"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "explosiveness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_explosiveness_ratio", "get_explosiveness_ratio"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "randomness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_randomness_ratio", "get_randomness_ratio"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "preprocess", PROPERTY_HINT_EXP_RANGE, "0.00,600.0,0.01"), "set_pre_process_time", "get_pre_process_time"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "speed_scale", PROPERTY_HINT_RANGE, "0,64,0.01"), "set_speed_scale", "get_speed_scale"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "explosiveness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_explosiveness_ratio", "get_explosiveness_ratio"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "randomness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_randomness_ratio", "get_randomness_ratio"); ADD_PROPERTY(PropertyInfo(Variant::INT, "fixed_fps", PROPERTY_HINT_RANGE, "0,1000,1"), "set_fixed_fps", "get_fixed_fps"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "fract_delta"), "set_fractional_delta", "get_fractional_delta"); ADD_GROUP("Drawing", ""); diff --git a/scene/3d/particles.h b/scene/3d/particles.h index 69be7da29a..95c6de15ec 100644 --- a/scene/3d/particles.h +++ b/scene/3d/particles.h @@ -78,7 +78,7 @@ protected: public: AABB get_aabb() const; - PoolVector<Face3> get_faces(uint32_t p_usage_flags) const; + Vector<Face3> get_faces(uint32_t p_usage_flags) const; void set_emitting(bool p_emitting); void set_amount(int p_amount); diff --git a/scene/3d/path.cpp b/scene/3d/path.cpp index ac012de1ab..0cdcbd9a1f 100644 --- a/scene/3d/path.cpp +++ b/scene/3d/path.cpp @@ -59,13 +59,13 @@ void Path::_curve_changed() { void Path::set_curve(const Ref<Curve3D> &p_curve) { if (curve.is_valid()) { - curve->disconnect("changed", this, "_curve_changed"); + curve->disconnect_compat("changed", this, "_curve_changed"); } curve = p_curve; if (curve.is_valid()) { - curve->connect("changed", this, "_curve_changed"); + curve->connect_compat("changed", this, "_curve_changed"); } _curve_changed(); } @@ -297,10 +297,10 @@ void PathFollow::_bind_methods() { ClassDB::bind_method(D_METHOD("set_loop", "loop"), &PathFollow::set_loop); ClassDB::bind_method(D_METHOD("has_loop"), &PathFollow::has_loop); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "offset", PROPERTY_HINT_RANGE, "0,10000,0.01,or_lesser,or_greater"), "set_offset", "get_offset"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "unit_offset", PROPERTY_HINT_RANGE, "0,1,0.0001,or_lesser,or_greater", PROPERTY_USAGE_EDITOR), "set_unit_offset", "get_unit_offset"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "h_offset"), "set_h_offset", "get_h_offset"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "v_offset"), "set_v_offset", "get_v_offset"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "offset", PROPERTY_HINT_RANGE, "0,10000,0.01,or_lesser,or_greater"), "set_offset", "get_offset"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "unit_offset", PROPERTY_HINT_RANGE, "0,1,0.0001,or_lesser,or_greater", PROPERTY_USAGE_EDITOR), "set_unit_offset", "get_unit_offset"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "h_offset"), "set_h_offset", "get_h_offset"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "v_offset"), "set_v_offset", "get_v_offset"); ADD_PROPERTY(PropertyInfo(Variant::INT, "rotation_mode", PROPERTY_HINT_ENUM, "None,Y,XY,XYZ,Oriented"), "set_rotation_mode", "get_rotation_mode"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "cubic_interp"), "set_cubic_interpolation", "get_cubic_interpolation"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "loop"), "set_loop", "has_loop"); diff --git a/scene/3d/physics_body.cpp b/scene/3d/physics_body.cpp index 9848125d0f..f483787e49 100644 --- a/scene/3d/physics_body.cpp +++ b/scene/3d/physics_body.cpp @@ -180,14 +180,14 @@ PhysicsBody::PhysicsBody(PhysicsServer::BodyMode p_mode) : void StaticBody::set_physics_material_override(const Ref<PhysicsMaterial> &p_physics_material_override) { if (physics_material_override.is_valid()) { - if (physics_material_override->is_connected(CoreStringNames::get_singleton()->changed, this, "_reload_physics_characteristics")) - physics_material_override->disconnect(CoreStringNames::get_singleton()->changed, this, "_reload_physics_characteristics"); + if (physics_material_override->is_connected_compat(CoreStringNames::get_singleton()->changed, this, "_reload_physics_characteristics")) + physics_material_override->disconnect_compat(CoreStringNames::get_singleton()->changed, this, "_reload_physics_characteristics"); } physics_material_override = p_physics_material_override; if (physics_material_override.is_valid()) { - physics_material_override->connect(CoreStringNames::get_singleton()->changed, this, "_reload_physics_characteristics"); + physics_material_override->connect_compat(CoreStringNames::get_singleton()->changed, this, "_reload_physics_characteristics"); } _reload_physics_characteristics(); } @@ -322,8 +322,8 @@ void RigidBody::_body_inout(int p_status, ObjectID p_instance, int p_body_shape, //E->get().rc=0; E->get().in_tree = node && node->is_inside_tree(); if (node) { - node->connect(SceneStringNames::get_singleton()->tree_entered, this, SceneStringNames::get_singleton()->_body_enter_tree, make_binds(objid)); - node->connect(SceneStringNames::get_singleton()->tree_exiting, this, SceneStringNames::get_singleton()->_body_exit_tree, make_binds(objid)); + node->connect_compat(SceneStringNames::get_singleton()->tree_entered, this, SceneStringNames::get_singleton()->_body_enter_tree, make_binds(objid)); + node->connect_compat(SceneStringNames::get_singleton()->tree_exiting, this, SceneStringNames::get_singleton()->_body_exit_tree, make_binds(objid)); if (E->get().in_tree) { emit_signal(SceneStringNames::get_singleton()->body_entered, node); } @@ -349,8 +349,8 @@ void RigidBody::_body_inout(int p_status, ObjectID p_instance, int p_body_shape, if (E->get().shapes.empty()) { if (node) { - node->disconnect(SceneStringNames::get_singleton()->tree_entered, this, SceneStringNames::get_singleton()->_body_enter_tree); - node->disconnect(SceneStringNames::get_singleton()->tree_exiting, this, SceneStringNames::get_singleton()->_body_exit_tree); + node->disconnect_compat(SceneStringNames::get_singleton()->tree_entered, this, SceneStringNames::get_singleton()->_body_enter_tree); + node->disconnect_compat(SceneStringNames::get_singleton()->tree_exiting, this, SceneStringNames::get_singleton()->_body_exit_tree); if (in_tree) emit_signal(SceneStringNames::get_singleton()->body_exited, node); } @@ -550,14 +550,14 @@ real_t RigidBody::get_weight() const { void RigidBody::set_physics_material_override(const Ref<PhysicsMaterial> &p_physics_material_override) { if (physics_material_override.is_valid()) { - if (physics_material_override->is_connected(CoreStringNames::get_singleton()->changed, this, "_reload_physics_characteristics")) - physics_material_override->disconnect(CoreStringNames::get_singleton()->changed, this, "_reload_physics_characteristics"); + if (physics_material_override->is_connected_compat(CoreStringNames::get_singleton()->changed, this, "_reload_physics_characteristics")) + physics_material_override->disconnect_compat(CoreStringNames::get_singleton()->changed, this, "_reload_physics_characteristics"); } physics_material_override = p_physics_material_override; if (physics_material_override.is_valid()) { - physics_material_override->connect(CoreStringNames::get_singleton()->changed, this, "_reload_physics_characteristics"); + physics_material_override->connect_compat(CoreStringNames::get_singleton()->changed, this, "_reload_physics_characteristics"); } _reload_physics_characteristics(); } @@ -738,8 +738,8 @@ void RigidBody::set_contact_monitor(bool p_enabled) { if (node) { - node->disconnect(SceneStringNames::get_singleton()->tree_entered, this, SceneStringNames::get_singleton()->_body_enter_tree); - node->disconnect(SceneStringNames::get_singleton()->tree_exiting, this, SceneStringNames::get_singleton()->_body_exit_tree); + node->disconnect_compat(SceneStringNames::get_singleton()->tree_entered, this, SceneStringNames::get_singleton()->_body_enter_tree); + node->disconnect_compat(SceneStringNames::get_singleton()->tree_exiting, this, SceneStringNames::get_singleton()->_body_exit_tree); } } @@ -871,10 +871,10 @@ void RigidBody::_bind_methods() { BIND_VMETHOD(MethodInfo("_integrate_forces", PropertyInfo(Variant::OBJECT, "state", PROPERTY_HINT_RESOURCE_TYPE, "PhysicsDirectBodyState"))); ADD_PROPERTY(PropertyInfo(Variant::INT, "mode", PROPERTY_HINT_ENUM, "Rigid,Static,Character,Kinematic"), "set_mode", "get_mode"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "mass", PROPERTY_HINT_EXP_RANGE, "0.01,65535,0.01"), "set_mass", "get_mass"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "weight", PROPERTY_HINT_EXP_RANGE, "0.01,65535,0.01", PROPERTY_USAGE_EDITOR), "set_weight", "get_weight"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "mass", PROPERTY_HINT_EXP_RANGE, "0.01,65535,0.01"), "set_mass", "get_mass"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "weight", PROPERTY_HINT_EXP_RANGE, "0.01,65535,0.01", PROPERTY_USAGE_EDITOR), "set_weight", "get_weight"); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "physics_material_override", PROPERTY_HINT_RESOURCE_TYPE, "PhysicsMaterial"), "set_physics_material_override", "get_physics_material_override"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "gravity_scale", PROPERTY_HINT_RANGE, "-128,128,0.01"), "set_gravity_scale", "get_gravity_scale"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "gravity_scale", PROPERTY_HINT_RANGE, "-128,128,0.01"), "set_gravity_scale", "get_gravity_scale"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "custom_integrator"), "set_use_custom_integrator", "is_using_custom_integrator"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "continuous_cd"), "set_use_continuous_collision_detection", "is_using_continuous_collision_detection"); ADD_PROPERTY(PropertyInfo(Variant::INT, "contacts_reported", PROPERTY_HINT_RANGE, "0,64,1,or_greater"), "set_max_contacts_reported", "get_max_contacts_reported"); @@ -890,10 +890,10 @@ void RigidBody::_bind_methods() { ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "axis_lock_angular_z"), "set_axis_lock", "get_axis_lock", PhysicsServer::BODY_AXIS_ANGULAR_Z); ADD_GROUP("Linear", "linear_"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "linear_velocity"), "set_linear_velocity", "get_linear_velocity"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "linear_damp", PROPERTY_HINT_RANGE, "-1,100,0.001,or_greater"), "set_linear_damp", "get_linear_damp"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "linear_damp", PROPERTY_HINT_RANGE, "-1,100,0.001,or_greater"), "set_linear_damp", "get_linear_damp"); ADD_GROUP("Angular", "angular_"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "angular_velocity"), "set_angular_velocity", "get_angular_velocity"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "angular_damp", PROPERTY_HINT_RANGE, "-1,100,0.001,or_greater"), "set_angular_damp", "get_angular_damp"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "angular_damp", PROPERTY_HINT_RANGE, "-1,100,0.001,or_greater"), "set_angular_damp", "get_angular_damp"); ADD_SIGNAL(MethodInfo("body_shape_entered", PropertyInfo(Variant::INT, "body_id"), PropertyInfo(Variant::OBJECT, "body", PROPERTY_HINT_RESOURCE_TYPE, "Node"), PropertyInfo(Variant::INT, "body_shape"), PropertyInfo(Variant::INT, "local_shape"))); ADD_SIGNAL(MethodInfo("body_shape_exited", PropertyInfo(Variant::INT, "body_id"), PropertyInfo(Variant::OBJECT, "body", PROPERTY_HINT_RESOURCE_TYPE, "Node"), PropertyInfo(Variant::INT, "body_shape"), PropertyInfo(Variant::INT, "local_shape"))); @@ -1297,7 +1297,7 @@ void KinematicBody::_bind_methods() { ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "move_lock_y", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_axis_lock", "get_axis_lock", PhysicsServer::BODY_AXIS_LINEAR_Y); ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "move_lock_z", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_axis_lock", "get_axis_lock", PhysicsServer::BODY_AXIS_LINEAR_Z); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "collision/safe_margin", PROPERTY_HINT_RANGE, "0.001,256,0.001"), "set_safe_margin", "get_safe_margin"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "collision/safe_margin", PROPERTY_HINT_RANGE, "0.001,256,0.001"), "set_safe_margin", "get_safe_margin"); } void KinematicBody::_direct_state_changed(Object *p_state) { @@ -1514,9 +1514,9 @@ bool PhysicalBone::PinJointData::_get(const StringName &p_name, Variant &r_ret) void PhysicalBone::PinJointData::_get_property_list(List<PropertyInfo> *p_list) const { JointData::_get_property_list(p_list); - p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/bias", PROPERTY_HINT_RANGE, "0.01,0.99,0.01")); - p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/damping", PROPERTY_HINT_RANGE, "0.01,8.0,0.01")); - p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/impulse_clamp", PROPERTY_HINT_RANGE, "0.0,64.0,0.01")); + p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/bias", PROPERTY_HINT_RANGE, "0.01,0.99,0.01")); + p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/damping", PROPERTY_HINT_RANGE, "0.01,8.0,0.01")); + p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/impulse_clamp", PROPERTY_HINT_RANGE, "0.0,64.0,0.01")); } bool PhysicalBone::ConeJointData::_set(const StringName &p_name, const Variant &p_value, RID j) { @@ -1581,11 +1581,11 @@ bool PhysicalBone::ConeJointData::_get(const StringName &p_name, Variant &r_ret) void PhysicalBone::ConeJointData::_get_property_list(List<PropertyInfo> *p_list) const { JointData::_get_property_list(p_list); - p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/swing_span", PROPERTY_HINT_RANGE, "-180,180,0.01")); - p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/twist_span", PROPERTY_HINT_RANGE, "-40000,40000,0.1,or_lesser,or_greater")); - p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/bias", PROPERTY_HINT_RANGE, "0.01,16.0,0.01")); - p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/softness", PROPERTY_HINT_RANGE, "0.01,16.0,0.01")); - p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/relaxation", PROPERTY_HINT_RANGE, "0.01,16.0,0.01")); + p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/swing_span", PROPERTY_HINT_RANGE, "-180,180,0.01")); + p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/twist_span", PROPERTY_HINT_RANGE, "-40000,40000,0.1,or_lesser,or_greater")); + p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/bias", PROPERTY_HINT_RANGE, "0.01,16.0,0.01")); + p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/softness", PROPERTY_HINT_RANGE, "0.01,16.0,0.01")); + p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/relaxation", PROPERTY_HINT_RANGE, "0.01,16.0,0.01")); } bool PhysicalBone::HingeJointData::_set(const StringName &p_name, const Variant &p_value, RID j) { @@ -1658,11 +1658,11 @@ void PhysicalBone::HingeJointData::_get_property_list(List<PropertyInfo> *p_list JointData::_get_property_list(p_list); p_list->push_back(PropertyInfo(Variant::BOOL, "joint_constraints/angular_limit_enabled")); - p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/angular_limit_upper", PROPERTY_HINT_RANGE, "-180,180,0.01")); - p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/angular_limit_lower", PROPERTY_HINT_RANGE, "-180,180,0.01")); - p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/angular_limit_bias", PROPERTY_HINT_RANGE, "0.01,0.99,0.01")); - p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/angular_limit_softness", PROPERTY_HINT_RANGE, "0.01,16,0.01")); - p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/angular_limit_relaxation", PROPERTY_HINT_RANGE, "0.01,16,0.01")); + p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/angular_limit_upper", PROPERTY_HINT_RANGE, "-180,180,0.01")); + p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/angular_limit_lower", PROPERTY_HINT_RANGE, "-180,180,0.01")); + p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/angular_limit_bias", PROPERTY_HINT_RANGE, "0.01,0.99,0.01")); + p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/angular_limit_softness", PROPERTY_HINT_RANGE, "0.01,16,0.01")); + p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/angular_limit_relaxation", PROPERTY_HINT_RANGE, "0.01,16,0.01")); } bool PhysicalBone::SliderJointData::_set(const StringName &p_name, const Variant &p_value, RID j) { @@ -1762,17 +1762,17 @@ bool PhysicalBone::SliderJointData::_get(const StringName &p_name, Variant &r_re void PhysicalBone::SliderJointData::_get_property_list(List<PropertyInfo> *p_list) const { JointData::_get_property_list(p_list); - p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/linear_limit_upper")); - p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/linear_limit_lower")); - p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/linear_limit_softness", PROPERTY_HINT_RANGE, "0.01,16.0,0.01")); - p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/linear_limit_restitution", PROPERTY_HINT_RANGE, "0.01,16.0,0.01")); - p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/linear_limit_damping", PROPERTY_HINT_RANGE, "0,16.0,0.01")); + p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/linear_limit_upper")); + p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/linear_limit_lower")); + p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/linear_limit_softness", PROPERTY_HINT_RANGE, "0.01,16.0,0.01")); + p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/linear_limit_restitution", PROPERTY_HINT_RANGE, "0.01,16.0,0.01")); + p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/linear_limit_damping", PROPERTY_HINT_RANGE, "0,16.0,0.01")); - p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/angular_limit_upper", PROPERTY_HINT_RANGE, "-180,180,0.01")); - p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/angular_limit_lower", PROPERTY_HINT_RANGE, "-180,180,0.01")); - p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/angular_limit_softness", PROPERTY_HINT_RANGE, "0.01,16.0,0.01")); - p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/angular_limit_restitution", PROPERTY_HINT_RANGE, "0.01,16.0,0.01")); - p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/angular_limit_damping", PROPERTY_HINT_RANGE, "0,16.0,0.01")); + p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/angular_limit_upper", PROPERTY_HINT_RANGE, "-180,180,0.01")); + p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/angular_limit_lower", PROPERTY_HINT_RANGE, "-180,180,0.01")); + p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/angular_limit_softness", PROPERTY_HINT_RANGE, "0.01,16.0,0.01")); + p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/angular_limit_restitution", PROPERTY_HINT_RANGE, "0.01,16.0,0.01")); + p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/angular_limit_damping", PROPERTY_HINT_RANGE, "0,16.0,0.01")); } bool PhysicalBone::SixDOFJointData::_set(const StringName &p_name, const Variant &p_value, RID j) { @@ -1986,26 +1986,26 @@ void PhysicalBone::SixDOFJointData::_get_property_list(List<PropertyInfo> *p_lis const StringName axis_names[] = { "x", "y", "z" }; for (int i = 0; i < 3; ++i) { p_list->push_back(PropertyInfo(Variant::BOOL, "joint_constraints/" + axis_names[i] + "/linear_limit_enabled")); - p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/" + axis_names[i] + "/linear_limit_upper")); - p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/" + axis_names[i] + "/linear_limit_lower")); - p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/" + axis_names[i] + "/linear_limit_softness", PROPERTY_HINT_RANGE, "0.01,16,0.01")); + p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/" + axis_names[i] + "/linear_limit_upper")); + p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/" + axis_names[i] + "/linear_limit_lower")); + p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/" + axis_names[i] + "/linear_limit_softness", PROPERTY_HINT_RANGE, "0.01,16,0.01")); p_list->push_back(PropertyInfo(Variant::BOOL, "joint_constraints/" + axis_names[i] + "/linear_spring_enabled")); - p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/" + axis_names[i] + "/linear_spring_stiffness")); - p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/" + axis_names[i] + "/linear_spring_damping")); - p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/" + axis_names[i] + "/linear_equilibrium_point")); - p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/" + axis_names[i] + "/linear_restitution", PROPERTY_HINT_RANGE, "0.01,16,0.01")); - p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/" + axis_names[i] + "/linear_damping", PROPERTY_HINT_RANGE, "0.01,16,0.01")); + p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/" + axis_names[i] + "/linear_spring_stiffness")); + p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/" + axis_names[i] + "/linear_spring_damping")); + p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/" + axis_names[i] + "/linear_equilibrium_point")); + p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/" + axis_names[i] + "/linear_restitution", PROPERTY_HINT_RANGE, "0.01,16,0.01")); + p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/" + axis_names[i] + "/linear_damping", PROPERTY_HINT_RANGE, "0.01,16,0.01")); p_list->push_back(PropertyInfo(Variant::BOOL, "joint_constraints/" + axis_names[i] + "/angular_limit_enabled")); - p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/" + axis_names[i] + "/angular_limit_upper", PROPERTY_HINT_RANGE, "-180,180,0.01")); - p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/" + axis_names[i] + "/angular_limit_lower", PROPERTY_HINT_RANGE, "-180,180,0.01")); - p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/" + axis_names[i] + "/angular_limit_softness", PROPERTY_HINT_RANGE, "0.01,16,0.01")); - p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/" + axis_names[i] + "/angular_restitution", PROPERTY_HINT_RANGE, "0.01,16,0.01")); - p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/" + axis_names[i] + "/angular_damping", PROPERTY_HINT_RANGE, "0.01,16,0.01")); - p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/" + axis_names[i] + "/erp")); + p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/" + axis_names[i] + "/angular_limit_upper", PROPERTY_HINT_RANGE, "-180,180,0.01")); + p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/" + axis_names[i] + "/angular_limit_lower", PROPERTY_HINT_RANGE, "-180,180,0.01")); + p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/" + axis_names[i] + "/angular_limit_softness", PROPERTY_HINT_RANGE, "0.01,16,0.01")); + p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/" + axis_names[i] + "/angular_restitution", PROPERTY_HINT_RANGE, "0.01,16,0.01")); + p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/" + axis_names[i] + "/angular_damping", PROPERTY_HINT_RANGE, "0.01,16,0.01")); + p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/" + axis_names[i] + "/erp")); p_list->push_back(PropertyInfo(Variant::BOOL, "joint_constraints/" + axis_names[i] + "/angular_spring_enabled")); - p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/" + axis_names[i] + "/angular_spring_stiffness")); - p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/" + axis_names[i] + "/angular_spring_damping")); - p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/" + axis_names[i] + "/angular_equilibrium_point")); + p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/" + axis_names[i] + "/angular_spring_stiffness")); + p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/" + axis_names[i] + "/angular_spring_damping")); + p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/" + axis_names[i] + "/angular_equilibrium_point")); } } @@ -2054,10 +2054,10 @@ void PhysicalBone::_get_property_list(List<PropertyInfo> *p_list) const { names += parent->get_bone_name(i); } - p_list->push_back(PropertyInfo(Variant::STRING, "bone_name", PROPERTY_HINT_ENUM, names)); + p_list->push_back(PropertyInfo(Variant::STRING_NAME, "bone_name", PROPERTY_HINT_ENUM, names)); } else { - p_list->push_back(PropertyInfo(Variant::STRING, "bone_name")); + p_list->push_back(PropertyInfo(Variant::STRING_NAME, "bone_name")); } if (joint_data) { @@ -2169,11 +2169,11 @@ void PhysicalBone::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::TRANSFORM, "body_offset"), "set_body_offset", "get_body_offset"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "mass", PROPERTY_HINT_EXP_RANGE, "0.01,65535,0.01"), "set_mass", "get_mass"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "weight", PROPERTY_HINT_EXP_RANGE, "0.01,65535,0.01"), "set_weight", "get_weight"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "friction", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_friction", "get_friction"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "bounce", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_bounce", "get_bounce"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "gravity_scale", PROPERTY_HINT_RANGE, "-10,10,0.01"), "set_gravity_scale", "get_gravity_scale"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "mass", PROPERTY_HINT_EXP_RANGE, "0.01,65535,0.01"), "set_mass", "get_mass"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "weight", PROPERTY_HINT_EXP_RANGE, "0.01,65535,0.01"), "set_weight", "get_weight"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "friction", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_friction", "get_friction"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "bounce", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_bounce", "get_bounce"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "gravity_scale", PROPERTY_HINT_RANGE, "-10,10,0.01"), "set_gravity_scale", "get_gravity_scale"); BIND_ENUM_CONSTANT(JOINT_TYPE_NONE); BIND_ENUM_CONSTANT(JOINT_TYPE_PIN); diff --git a/scene/3d/physics_joint.cpp b/scene/3d/physics_joint.cpp index eacc6bcc0f..0699e366e0 100644 --- a/scene/3d/physics_joint.cpp +++ b/scene/3d/physics_joint.cpp @@ -172,9 +172,9 @@ void PinJoint::_bind_methods() { ClassDB::bind_method(D_METHOD("set_param", "param", "value"), &PinJoint::set_param); ClassDB::bind_method(D_METHOD("get_param", "param"), &PinJoint::get_param); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "params/bias", PROPERTY_HINT_RANGE, "0.01,0.99,0.01"), "set_param", "get_param", PARAM_BIAS); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "params/damping", PROPERTY_HINT_RANGE, "0.01,8.0,0.01"), "set_param", "get_param", PARAM_DAMPING); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "params/impulse_clamp", PROPERTY_HINT_RANGE, "0.0,64.0,0.01"), "set_param", "get_param", PARAM_IMPULSE_CLAMP); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "params/bias", PROPERTY_HINT_RANGE, "0.01,0.99,0.01"), "set_param", "get_param", PARAM_BIAS); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "params/damping", PROPERTY_HINT_RANGE, "0.01,8.0,0.01"), "set_param", "get_param", PARAM_DAMPING); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "params/impulse_clamp", PROPERTY_HINT_RANGE, "0.0,64.0,0.01"), "set_param", "get_param", PARAM_IMPULSE_CLAMP); BIND_ENUM_CONSTANT(PARAM_BIAS); BIND_ENUM_CONSTANT(PARAM_DAMPING); @@ -257,18 +257,18 @@ void HingeJoint::_bind_methods() { ClassDB::bind_method(D_METHOD("_set_lower_limit", "lower_limit"), &HingeJoint::_set_lower_limit); ClassDB::bind_method(D_METHOD("_get_lower_limit"), &HingeJoint::_get_lower_limit); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "params/bias", PROPERTY_HINT_RANGE, "0.00,0.99,0.01"), "set_param", "get_param", PARAM_BIAS); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "params/bias", PROPERTY_HINT_RANGE, "0.00,0.99,0.01"), "set_param", "get_param", PARAM_BIAS); ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "angular_limit/enable"), "set_flag", "get_flag", FLAG_USE_LIMIT); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "angular_limit/upper", PROPERTY_HINT_RANGE, "-180,180,0.1"), "_set_upper_limit", "_get_upper_limit"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "angular_limit/lower", PROPERTY_HINT_RANGE, "-180,180,0.1"), "_set_lower_limit", "_get_lower_limit"); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_limit/bias", PROPERTY_HINT_RANGE, "0.01,0.99,0.01"), "set_param", "get_param", PARAM_LIMIT_BIAS); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_limit/softness", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param", "get_param", PARAM_LIMIT_SOFTNESS); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_limit/relaxation", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param", "get_param", PARAM_LIMIT_RELAXATION); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "angular_limit/upper", PROPERTY_HINT_RANGE, "-180,180,0.1"), "_set_upper_limit", "_get_upper_limit"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "angular_limit/lower", PROPERTY_HINT_RANGE, "-180,180,0.1"), "_set_lower_limit", "_get_lower_limit"); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit/bias", PROPERTY_HINT_RANGE, "0.01,0.99,0.01"), "set_param", "get_param", PARAM_LIMIT_BIAS); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit/softness", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param", "get_param", PARAM_LIMIT_SOFTNESS); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit/relaxation", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param", "get_param", PARAM_LIMIT_RELAXATION); ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "motor/enable"), "set_flag", "get_flag", FLAG_ENABLE_MOTOR); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "motor/target_velocity", PROPERTY_HINT_RANGE, "-200,200,0.01,or_greater,or_lesser"), "set_param", "get_param", PARAM_MOTOR_TARGET_VELOCITY); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "motor/max_impulse", PROPERTY_HINT_RANGE, "0.01,1024,0.01"), "set_param", "get_param", PARAM_MOTOR_MAX_IMPULSE); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "motor/target_velocity", PROPERTY_HINT_RANGE, "-200,200,0.01,or_greater,or_lesser"), "set_param", "get_param", PARAM_MOTOR_TARGET_VELOCITY); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "motor/max_impulse", PROPERTY_HINT_RANGE, "0.01,1024,0.01"), "set_param", "get_param", PARAM_MOTOR_MAX_IMPULSE); BIND_ENUM_CONSTANT(PARAM_BIAS); BIND_ENUM_CONSTANT(PARAM_LIMIT_UPPER); @@ -392,29 +392,29 @@ void SliderJoint::_bind_methods() { ClassDB::bind_method(D_METHOD("_set_lower_limit_angular", "lower_limit_angular"), &SliderJoint::_set_lower_limit_angular); ClassDB::bind_method(D_METHOD("_get_lower_limit_angular"), &SliderJoint::_get_lower_limit_angular); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_limit/upper_distance", PROPERTY_HINT_RANGE, "-1024,1024,0.01"), "set_param", "get_param", PARAM_LINEAR_LIMIT_UPPER); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_limit/lower_distance", PROPERTY_HINT_RANGE, "-1024,1024,0.01"), "set_param", "get_param", PARAM_LINEAR_LIMIT_LOWER); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_limit/softness", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_LINEAR_LIMIT_SOFTNESS); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_limit/restitution", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_LINEAR_LIMIT_RESTITUTION); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_limit/damping", PROPERTY_HINT_RANGE, "0,16.0,0.01"), "set_param", "get_param", PARAM_LINEAR_LIMIT_DAMPING); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_motion/softness", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_LINEAR_MOTION_SOFTNESS); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_motion/restitution", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_LINEAR_MOTION_RESTITUTION); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_motion/damping", PROPERTY_HINT_RANGE, "0,16.0,0.01"), "set_param", "get_param", PARAM_LINEAR_MOTION_DAMPING); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_ortho/softness", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_LINEAR_ORTHOGONAL_SOFTNESS); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_ortho/restitution", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_LINEAR_ORTHOGONAL_RESTITUTION); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_ortho/damping", PROPERTY_HINT_RANGE, "0,16.0,0.01"), "set_param", "get_param", PARAM_LINEAR_ORTHOGONAL_DAMPING); - - ADD_PROPERTY(PropertyInfo(Variant::REAL, "angular_limit/upper_angle", PROPERTY_HINT_RANGE, "-180,180,0.1"), "_set_upper_limit_angular", "_get_upper_limit_angular"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "angular_limit/lower_angle", PROPERTY_HINT_RANGE, "-180,180,0.1"), "_set_lower_limit_angular", "_get_lower_limit_angular"); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_limit/softness", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_ANGULAR_LIMIT_SOFTNESS); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_limit/restitution", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_ANGULAR_LIMIT_RESTITUTION); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_limit/damping", PROPERTY_HINT_RANGE, "0,16.0,0.01"), "set_param", "get_param", PARAM_ANGULAR_LIMIT_DAMPING); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_motion/softness", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_ANGULAR_MOTION_SOFTNESS); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_motion/restitution", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_ANGULAR_MOTION_RESTITUTION); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_motion/damping", PROPERTY_HINT_RANGE, "0,16.0,0.01"), "set_param", "get_param", PARAM_ANGULAR_MOTION_DAMPING); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_ortho/softness", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_ANGULAR_ORTHOGONAL_SOFTNESS); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_ortho/restitution", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_ANGULAR_ORTHOGONAL_RESTITUTION); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_ortho/damping", PROPERTY_HINT_RANGE, "0,16.0,0.01"), "set_param", "get_param", PARAM_ANGULAR_ORTHOGONAL_DAMPING); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit/upper_distance", PROPERTY_HINT_RANGE, "-1024,1024,0.01"), "set_param", "get_param", PARAM_LINEAR_LIMIT_UPPER); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit/lower_distance", PROPERTY_HINT_RANGE, "-1024,1024,0.01"), "set_param", "get_param", PARAM_LINEAR_LIMIT_LOWER); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit/softness", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_LINEAR_LIMIT_SOFTNESS); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit/restitution", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_LINEAR_LIMIT_RESTITUTION); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit/damping", PROPERTY_HINT_RANGE, "0,16.0,0.01"), "set_param", "get_param", PARAM_LINEAR_LIMIT_DAMPING); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_motion/softness", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_LINEAR_MOTION_SOFTNESS); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_motion/restitution", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_LINEAR_MOTION_RESTITUTION); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_motion/damping", PROPERTY_HINT_RANGE, "0,16.0,0.01"), "set_param", "get_param", PARAM_LINEAR_MOTION_DAMPING); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_ortho/softness", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_LINEAR_ORTHOGONAL_SOFTNESS); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_ortho/restitution", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_LINEAR_ORTHOGONAL_RESTITUTION); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_ortho/damping", PROPERTY_HINT_RANGE, "0,16.0,0.01"), "set_param", "get_param", PARAM_LINEAR_ORTHOGONAL_DAMPING); + + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "angular_limit/upper_angle", PROPERTY_HINT_RANGE, "-180,180,0.1"), "_set_upper_limit_angular", "_get_upper_limit_angular"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "angular_limit/lower_angle", PROPERTY_HINT_RANGE, "-180,180,0.1"), "_set_lower_limit_angular", "_get_lower_limit_angular"); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit/softness", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_ANGULAR_LIMIT_SOFTNESS); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit/restitution", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_ANGULAR_LIMIT_RESTITUTION); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit/damping", PROPERTY_HINT_RANGE, "0,16.0,0.01"), "set_param", "get_param", PARAM_ANGULAR_LIMIT_DAMPING); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_motion/softness", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_ANGULAR_MOTION_SOFTNESS); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_motion/restitution", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_ANGULAR_MOTION_RESTITUTION); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_motion/damping", PROPERTY_HINT_RANGE, "0,16.0,0.01"), "set_param", "get_param", PARAM_ANGULAR_MOTION_DAMPING); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_ortho/softness", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_ANGULAR_ORTHOGONAL_SOFTNESS); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_ortho/restitution", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_ANGULAR_ORTHOGONAL_RESTITUTION); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_ortho/damping", PROPERTY_HINT_RANGE, "0,16.0,0.01"), "set_param", "get_param", PARAM_ANGULAR_ORTHOGONAL_DAMPING); BIND_ENUM_CONSTANT(PARAM_LINEAR_LIMIT_UPPER); BIND_ENUM_CONSTANT(PARAM_LINEAR_LIMIT_LOWER); @@ -541,12 +541,12 @@ void ConeTwistJoint::_bind_methods() { ClassDB::bind_method(D_METHOD("_set_twist_span", "twist_span"), &ConeTwistJoint::_set_twist_span); ClassDB::bind_method(D_METHOD("_get_twist_span"), &ConeTwistJoint::_get_twist_span); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "swing_span", PROPERTY_HINT_RANGE, "-180,180,0.1"), "_set_swing_span", "_get_swing_span"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "twist_span", PROPERTY_HINT_RANGE, "-40000,40000,0.1"), "_set_twist_span", "_get_twist_span"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "swing_span", PROPERTY_HINT_RANGE, "-180,180,0.1"), "_set_swing_span", "_get_swing_span"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "twist_span", PROPERTY_HINT_RANGE, "-40000,40000,0.1"), "_set_twist_span", "_get_twist_span"); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "bias", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_BIAS); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "softness", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_SOFTNESS); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "relaxation", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_RELAXATION); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "bias", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_BIAS); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "softness", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_SOFTNESS); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "relaxation", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_RELAXATION); BIND_ENUM_CONSTANT(PARAM_SWING_SPAN); BIND_ENUM_CONSTANT(PARAM_TWIST_SPAN); @@ -711,92 +711,92 @@ void Generic6DOFJoint::_bind_methods() { ClassDB::bind_method(D_METHOD("get_precision"), &Generic6DOFJoint::get_precision); ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "linear_limit_x/enabled"), "set_flag_x", "get_flag_x", FLAG_ENABLE_LINEAR_LIMIT); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_limit_x/upper_distance"), "set_param_x", "get_param_x", PARAM_LINEAR_UPPER_LIMIT); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_limit_x/lower_distance"), "set_param_x", "get_param_x", PARAM_LINEAR_LOWER_LIMIT); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_limit_x/softness", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_x", "get_param_x", PARAM_LINEAR_LIMIT_SOFTNESS); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "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::REAL, "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::FLOAT, "linear_limit_x/upper_distance"), "set_param_x", "get_param_x", PARAM_LINEAR_UPPER_LIMIT); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit_x/lower_distance"), "set_param_x", "get_param_x", PARAM_LINEAR_LOWER_LIMIT); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit_x/softness", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_x", "get_param_x", PARAM_LINEAR_LIMIT_SOFTNESS); + 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_motor_x/enabled"), "set_flag_x", "get_flag_x", FLAG_ENABLE_LINEAR_MOTOR); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_motor_x/target_velocity"), "set_param_x", "get_param_x", PARAM_LINEAR_MOTOR_TARGET_VELOCITY); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_motor_x/force_limit"), "set_param_x", "get_param_x", PARAM_LINEAR_MOTOR_FORCE_LIMIT); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_motor_x/target_velocity"), "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_spring_x/enabled"), "set_flag_x", "get_flag_x", FLAG_ENABLE_LINEAR_SPRING); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_spring_x/stiffness"), "set_param_x", "get_param_x", PARAM_LINEAR_SPRING_STIFFNESS); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_spring_x/damping"), "set_param_x", "get_param_x", PARAM_LINEAR_SPRING_DAMPING); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_spring_x/equilibrium_point"), "set_param_x", "get_param_x", PARAM_LINEAR_SPRING_EQUILIBRIUM_POINT); + 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, "angular_limit_x/enabled"), "set_flag_x", "get_flag_x", FLAG_ENABLE_ANGULAR_LIMIT); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "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::REAL, "angular_limit_x/lower_angle", PROPERTY_HINT_RANGE, "-180,180,0.01"), "_set_angular_lo_limit_x", "_get_angular_lo_limit_x"); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_limit_x/softness", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_x", "get_param_x", PARAM_ANGULAR_LIMIT_SOFTNESS); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_limit_x/restitution", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_x", "get_param_x", PARAM_ANGULAR_RESTITUTION); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_limit_x/damping", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_x", "get_param_x", PARAM_ANGULAR_DAMPING); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_limit_x/force_limit"), "set_param_x", "get_param_x", PARAM_ANGULAR_FORCE_LIMIT); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_limit_x/erp"), "set_param_x", "get_param_x", PARAM_ANGULAR_ERP); + 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"); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit_x/softness", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_x", "get_param_x", PARAM_ANGULAR_LIMIT_SOFTNESS); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit_x/restitution", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_x", "get_param_x", PARAM_ANGULAR_RESTITUTION); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit_x/damping", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_x", "get_param_x", PARAM_ANGULAR_DAMPING); + 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::REAL, "angular_motor_x/target_velocity"), "set_param_x", "get_param_x", PARAM_ANGULAR_MOTOR_TARGET_VELOCITY); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_motor_x/force_limit"), "set_param_x", "get_param_x", PARAM_ANGULAR_MOTOR_FORCE_LIMIT); + 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::REAL, "angular_spring_x/stiffness"), "set_param_x", "get_param_x", PARAM_ANGULAR_SPRING_STIFFNESS); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_spring_x/damping"), "set_param_x", "get_param_x", PARAM_ANGULAR_SPRING_DAMPING); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_spring_x/equilibrium_point"), "set_param_x", "get_param_x", PARAM_ANGULAR_SPRING_EQUILIBRIUM_POINT); + 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, "linear_limit_y/enabled"), "set_flag_y", "get_flag_y", FLAG_ENABLE_LINEAR_LIMIT); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_limit_y/upper_distance"), "set_param_y", "get_param_y", PARAM_LINEAR_UPPER_LIMIT); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_limit_y/lower_distance"), "set_param_y", "get_param_y", PARAM_LINEAR_LOWER_LIMIT); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "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::REAL, "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::REAL, "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::FLOAT, "linear_limit_y/upper_distance"), "set_param_y", "get_param_y", PARAM_LINEAR_UPPER_LIMIT); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit_y/lower_distance"), "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::REAL, "linear_motor_y/target_velocity"), "set_param_y", "get_param_y", PARAM_LINEAR_MOTOR_TARGET_VELOCITY); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_motor_y/force_limit"), "set_param_y", "get_param_y", PARAM_LINEAR_MOTOR_FORCE_LIMIT); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_motor_y/target_velocity"), "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::REAL, "linear_spring_y/stiffness"), "set_param_y", "get_param_y", PARAM_LINEAR_SPRING_STIFFNESS); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_spring_y/damping"), "set_param_y", "get_param_y", PARAM_LINEAR_SPRING_DAMPING); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_spring_y/equilibrium_point"), "set_param_y", "get_param_y", PARAM_LINEAR_SPRING_EQUILIBRIUM_POINT); + 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::REAL, "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::REAL, "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::REAL, "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::REAL, "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::REAL, "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::REAL, "angular_limit_y/force_limit"), "set_param_y", "get_param_y", PARAM_ANGULAR_FORCE_LIMIT); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_limit_y/erp"), "set_param_y", "get_param_y", PARAM_ANGULAR_ERP); + 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::REAL, "angular_motor_y/target_velocity"), "set_param_y", "get_param_y", PARAM_ANGULAR_MOTOR_TARGET_VELOCITY); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_motor_y/force_limit"), "set_param_y", "get_param_y", PARAM_ANGULAR_MOTOR_FORCE_LIMIT); + 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::REAL, "angular_spring_y/stiffness"), "set_param_y", "get_param_y", PARAM_ANGULAR_SPRING_STIFFNESS); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_spring_y/damping"), "set_param_y", "get_param_y", PARAM_ANGULAR_SPRING_DAMPING); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_spring_y/equilibrium_point"), "set_param_y", "get_param_y", PARAM_ANGULAR_SPRING_EQUILIBRIUM_POINT); + 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, "linear_limit_z/enabled"), "set_flag_z", "get_flag_z", FLAG_ENABLE_LINEAR_LIMIT); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_limit_z/upper_distance"), "set_param_z", "get_param_z", PARAM_LINEAR_UPPER_LIMIT); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_limit_z/lower_distance"), "set_param_z", "get_param_z", PARAM_LINEAR_LOWER_LIMIT); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "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::REAL, "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::REAL, "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::FLOAT, "linear_limit_z/upper_distance"), "set_param_z", "get_param_z", PARAM_LINEAR_UPPER_LIMIT); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit_z/lower_distance"), "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::REAL, "linear_motor_z/target_velocity"), "set_param_z", "get_param_z", PARAM_LINEAR_MOTOR_TARGET_VELOCITY); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_motor_z/force_limit"), "set_param_z", "get_param_z", PARAM_LINEAR_MOTOR_FORCE_LIMIT); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_motor_z/target_velocity"), "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::REAL, "linear_spring_z/stiffness"), "set_param_z", "get_param_z", PARAM_LINEAR_SPRING_STIFFNESS); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_spring_z/damping"), "set_param_z", "get_param_z", PARAM_LINEAR_SPRING_DAMPING); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_spring_z/equilibrium_point"), "set_param_z", "get_param_z", PARAM_LINEAR_SPRING_EQUILIBRIUM_POINT); + 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::REAL, "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::REAL, "angular_limit_z/lower_angle", PROPERTY_HINT_RANGE, "-180,180,0.01"), "_set_angular_lo_limit_z", "_get_angular_lo_limit_z"); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_limit_z/softness", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_z", "get_param_z", PARAM_ANGULAR_LIMIT_SOFTNESS); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_limit_z/restitution", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_z", "get_param_z", PARAM_ANGULAR_RESTITUTION); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_limit_z/damping", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_z", "get_param_z", PARAM_ANGULAR_DAMPING); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_limit_z/force_limit"), "set_param_z", "get_param_z", PARAM_ANGULAR_FORCE_LIMIT); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_limit_z/erp"), "set_param_z", "get_param_z", PARAM_ANGULAR_ERP); + 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"); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit_z/softness", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_z", "get_param_z", PARAM_ANGULAR_LIMIT_SOFTNESS); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit_z/restitution", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_z", "get_param_z", PARAM_ANGULAR_RESTITUTION); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit_z/damping", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_z", "get_param_z", PARAM_ANGULAR_DAMPING); + 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_PROPERTYI(PropertyInfo(Variant::BOOL, "angular_motor_z/enabled"), "set_flag_z", "get_flag_z", FLAG_ENABLE_MOTOR); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_motor_z/target_velocity"), "set_param_z", "get_param_z", PARAM_ANGULAR_MOTOR_TARGET_VELOCITY); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_motor_z/force_limit"), "set_param_z", "get_param_z", PARAM_ANGULAR_MOTOR_FORCE_LIMIT); + 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_PROPERTYI(PropertyInfo(Variant::BOOL, "angular_spring_z/enabled"), "set_flag_z", "get_flag_z", FLAG_ENABLE_ANGULAR_SPRING); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_spring_z/stiffness"), "set_param_z", "get_param_z", PARAM_ANGULAR_SPRING_STIFFNESS); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_spring_z/damping"), "set_param_z", "get_param_z", PARAM_ANGULAR_SPRING_DAMPING); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_spring_z/equilibrium_point"), "set_param_z", "get_param_z", PARAM_ANGULAR_SPRING_EQUILIBRIUM_POINT); + 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); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_spring_z/equilibrium_point"), "set_param_z", "get_param_z", PARAM_ANGULAR_SPRING_EQUILIBRIUM_POINT); ADD_PROPERTY(PropertyInfo(Variant::INT, "precision", PROPERTY_HINT_RANGE, "1,99999,1"), "set_precision", "get_precision"); diff --git a/scene/3d/reflection_probe.cpp b/scene/3d/reflection_probe.cpp index 2a5a84741f..3cf8e43ec2 100644 --- a/scene/3d/reflection_probe.cpp +++ b/scene/3d/reflection_probe.cpp @@ -186,9 +186,9 @@ AABB ReflectionProbe::get_aabb() const { aabb.size = origin_offset + extents; return aabb; } -PoolVector<Face3> ReflectionProbe::get_faces(uint32_t p_usage_flags) const { +Vector<Face3> ReflectionProbe::get_faces(uint32_t p_usage_flags) const { - return PoolVector<Face3>(); + return Vector<Face3>(); } void ReflectionProbe::_validate_property(PropertyInfo &property) const { @@ -239,8 +239,8 @@ void ReflectionProbe::_bind_methods() { ClassDB::bind_method(D_METHOD("get_update_mode"), &ReflectionProbe::get_update_mode); ADD_PROPERTY(PropertyInfo(Variant::INT, "update_mode", PROPERTY_HINT_ENUM, "Once,Always"), "set_update_mode", "get_update_mode"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "intensity", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_intensity", "get_intensity"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "max_distance", PROPERTY_HINT_EXP_RANGE, "0,16384,0.1,or_greater"), "set_max_distance", "get_max_distance"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "intensity", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_intensity", "get_intensity"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "max_distance", PROPERTY_HINT_EXP_RANGE, "0,16384,0.1,or_greater"), "set_max_distance", "get_max_distance"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "extents"), "set_extents", "get_extents"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "origin_offset"), "set_origin_offset", "get_origin_offset"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "box_projection"), "set_enable_box_projection", "is_box_projection_enabled"); @@ -250,8 +250,8 @@ void ReflectionProbe::_bind_methods() { ADD_GROUP("Interior", "interior_"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "interior_enable"), "set_as_interior", "is_set_as_interior"); ADD_PROPERTY(PropertyInfo(Variant::COLOR, "interior_ambient_color", PROPERTY_HINT_COLOR_NO_ALPHA), "set_interior_ambient", "get_interior_ambient"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "interior_ambient_energy", PROPERTY_HINT_RANGE, "0,16,0.01"), "set_interior_ambient_energy", "get_interior_ambient_energy"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "interior_ambient_contrib", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_interior_ambient_probe_contribution", "get_interior_ambient_probe_contribution"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "interior_ambient_energy", PROPERTY_HINT_RANGE, "0,16,0.01"), "set_interior_ambient_energy", "get_interior_ambient_energy"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "interior_ambient_contrib", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_interior_ambient_probe_contribution", "get_interior_ambient_probe_contribution"); BIND_ENUM_CONSTANT(UPDATE_ONCE); BIND_ENUM_CONSTANT(UPDATE_ALWAYS); diff --git a/scene/3d/reflection_probe.h b/scene/3d/reflection_probe.h index 28ca680e9f..57c1b0a320 100644 --- a/scene/3d/reflection_probe.h +++ b/scene/3d/reflection_probe.h @@ -103,7 +103,7 @@ public: UpdateMode get_update_mode() const; virtual AABB get_aabb() const; - virtual PoolVector<Face3> get_faces(uint32_t p_usage_flags) const; + virtual Vector<Face3> get_faces(uint32_t p_usage_flags) const; ReflectionProbe(); ~ReflectionProbe(); diff --git a/scene/3d/skeleton.cpp b/scene/3d/skeleton.cpp index aa5c439f8a..3ef502cfd3 100644 --- a/scene/3d/skeleton.cpp +++ b/scene/3d/skeleton.cpp @@ -41,6 +41,7 @@ void SkinReference::_skin_changed() { if (skeleton_node) { skeleton_node->_make_dirty(); } + skeleton_version = 0; } void SkinReference::_bind_methods() { @@ -322,10 +323,49 @@ void Skeleton::_notification(int p_what) { if (E->get()->bind_count != bind_count) { VS::get_singleton()->skeleton_allocate(skeleton, bind_count); E->get()->bind_count = bind_count; + E->get()->skin_bone_indices.resize(bind_count); + E->get()->skin_bone_indices_ptrs = E->get()->skin_bone_indices.ptrw(); + } + + if (E->get()->skeleton_version != version) { + + for (uint32_t i = 0; i < bind_count; i++) { + StringName bind_name = skin->get_bind_name(i); + + if (bind_name != StringName()) { + //bind name used, use this + bool found = false; + for (int j = 0; j < len; j++) { + if (bonesptr[j].name == bind_name) { + E->get()->skin_bone_indices_ptrs[i] = j; + found = true; + break; + } + } + + if (!found) { + ERR_PRINT("Skin bind #" + itos(i) + " contains named bind '" + String(bind_name) + "' but Skeleton has no bone by that name."); + E->get()->skin_bone_indices_ptrs[i] = 0; + } + } else if (skin->get_bind_bone(i) >= 0) { + int bind_index = skin->get_bind_bone(i); + if (bind_index >= len) { + ERR_PRINT("Skin bind #" + itos(i) + " contains bone index bind: " + itos(bind_index) + " , which is greater than the skeleton bone count: " + itos(len) + "."); + E->get()->skin_bone_indices_ptrs[i] = 0; + } else { + E->get()->skin_bone_indices_ptrs[i] = bind_index; + } + } else { + ERR_PRINT("Skin bind #" + itos(i) + " does not contain a name nor a bone index."); + E->get()->skin_bone_indices_ptrs[i] = 0; + } + } + + E->get()->skeleton_version = version; } for (uint32_t i = 0; i < bind_count; i++) { - uint32_t bone_index = skin->get_bind_bone(i); + uint32_t bone_index = E->get()->skin_bone_indices_ptrs[i]; ERR_CONTINUE(bone_index >= (uint32_t)len); vs->skeleton_bone_set_transform(skeleton, i, bonesptr[bone_index].pose_global * skin->get_bind_pose(i)); } @@ -388,6 +428,7 @@ void Skeleton::add_bone(const String &p_name) { b.name = p_name; bones.push_back(b); process_order_dirty = true; + version++; _make_dirty(); update_gizmo(); } @@ -539,7 +580,7 @@ void Skeleton::clear_bones() { bones.clear(); process_order_dirty = true; - + version++; _make_dirty(); } @@ -733,7 +774,8 @@ void Skeleton::physical_bones_start_simulation_on(const Array &p_bones) { sim_bones.resize(p_bones.size()); int c = 0; for (int i = sim_bones.size() - 1; 0 <= i; --i) { - if (Variant::STRING == p_bones.get(i).get_type()) { + Variant::Type type = p_bones.get(i).get_type(); + if (Variant::STRING == type || Variant::STRING_NAME == type) { int bone_id = find_bone(p_bones.get(i)); if (bone_id != -1) sim_bones.write[c++] = bone_id; @@ -829,7 +871,7 @@ Ref<SkinReference> Skeleton::register_skin(const Ref<Skin> &p_skin) { skin_bindings.insert(skin_ref.operator->()); - skin->connect("changed", skin_ref.operator->(), "_skin_changed"); + skin->connect_compat("changed", skin_ref.operator->(), "_skin_changed"); _make_dirty(); //skin needs to be updated, so update skeleton @@ -894,6 +936,7 @@ Skeleton::Skeleton() { animate_physical_bones = true; dirty = false; + version = 1; process_order_dirty = true; } diff --git a/scene/3d/skeleton.h b/scene/3d/skeleton.h index b42c2112e3..76fd96f30a 100644 --- a/scene/3d/skeleton.h +++ b/scene/3d/skeleton.h @@ -51,6 +51,9 @@ class SkinReference : public Reference { RID skeleton; Ref<Skin> skin; uint32_t bind_count = 0; + uint64_t skeleton_version = 0; + Vector<uint32_t> skin_bone_indices; + uint32_t *skin_bone_indices_ptrs; void _skin_changed(); protected: @@ -123,6 +126,8 @@ private: void _make_dirty(); bool dirty; + uint64_t version; + // bind helpers Array _get_bound_child_nodes_to_bone(int p_bone) const { diff --git a/scene/3d/soft_body.cpp b/scene/3d/soft_body.cpp index 931e786455..14b1c24fa3 100644 --- a/scene/3d/soft_body.cpp +++ b/scene/3d/soft_body.cpp @@ -73,11 +73,11 @@ void SoftBodyVisualServerHandler::clear() { } void SoftBodyVisualServerHandler::open() { - write_buffer = buffer.write(); + write_buffer = buffer.ptrw(); } void SoftBodyVisualServerHandler::close() { - write_buffer.release(); + //write_buffer.release(); } void SoftBodyVisualServerHandler::commit_changes() { @@ -149,7 +149,7 @@ bool SoftBody::_get(const StringName &p_name, Variant &r_ret) const { if ("pinned_points" == which) { Array arr_ret; const int pinned_points_indices_size = pinned_points.size(); - PoolVector<PinnedPoint>::Read r = pinned_points.read(); + const PinnedPoint *r = pinned_points.ptr(); arr_ret.resize(pinned_points_indices_size); for (int i = 0; i < pinned_points_indices_size; ++i) { @@ -174,7 +174,7 @@ void SoftBody::_get_property_list(List<PropertyInfo> *p_list) const { const int pinned_points_indices_size = pinned_points.size(); - p_list->push_back(PropertyInfo(Variant::POOL_INT_ARRAY, "pinned_points")); + p_list->push_back(PropertyInfo(Variant::PACKED_INT32_ARRAY, "pinned_points")); for (int i = 0; i < pinned_points_indices_size; ++i) { p_list->push_back(PropertyInfo(Variant::INT, "attachments/" + itos(i) + "/point_index")); @@ -188,7 +188,7 @@ bool SoftBody::_set_property_pinned_points_indices(const Array &p_indices) { const int p_indices_size = p_indices.size(); { // Remove the pined points on physics server that will be removed by resize - PoolVector<PinnedPoint>::Read r = pinned_points.read(); + const PinnedPoint *r = pinned_points.ptr(); if (p_indices_size < pinned_points.size()) { for (int i = pinned_points.size() - 1; i >= p_indices_size; --i) { pin_point(r[i].point_index, false); @@ -198,7 +198,7 @@ bool SoftBody::_set_property_pinned_points_indices(const Array &p_indices) { pinned_points.resize(p_indices_size); - PoolVector<PinnedPoint>::Write w = pinned_points.write(); + PinnedPoint *w = pinned_points.ptrw(); int point_index; for (int i = 0; i < p_indices_size; ++i) { point_index = p_indices.get(i); @@ -218,11 +218,11 @@ bool SoftBody::_set_property_pinned_points_attachment(int p_item, const String & } if ("spatial_attachment_path" == p_what) { - PoolVector<PinnedPoint>::Write w = pinned_points.write(); + PinnedPoint *w = pinned_points.ptrw(); pin_point(w[p_item].point_index, true, p_value); _make_cache_dirty(); } else if ("offset" == p_what) { - PoolVector<PinnedPoint>::Write w = pinned_points.write(); + PinnedPoint *w = pinned_points.ptrw(); w[p_item].offset = p_value; } else { return false; @@ -235,7 +235,7 @@ bool SoftBody::_get_property_pinned_points(int p_item, const String &p_what, Var if (pinned_points.size() <= p_item) { return false; } - PoolVector<PinnedPoint>::Read r = pinned_points.read(); + const PinnedPoint *r = pinned_points.ptr(); if ("point_index" == p_what) { r_ret = r[p_item].point_index; @@ -376,14 +376,14 @@ void SoftBody::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::NODE_PATH, "parent_collision_ignore", PROPERTY_HINT_PROPERTY_OF_VARIANT_TYPE, "Parent collision object"), "set_parent_collision_ignore", "get_parent_collision_ignore"); ADD_PROPERTY(PropertyInfo(Variant::INT, "simulation_precision", PROPERTY_HINT_RANGE, "1,100,1"), "set_simulation_precision", "get_simulation_precision"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "total_mass", PROPERTY_HINT_RANGE, "0.01,10000,1"), "set_total_mass", "get_total_mass"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "linear_stiffness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_linear_stiffness", "get_linear_stiffness"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "areaAngular_stiffness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_areaAngular_stiffness", "get_areaAngular_stiffness"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "volume_stiffness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_volume_stiffness", "get_volume_stiffness"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "pressure_coefficient"), "set_pressure_coefficient", "get_pressure_coefficient"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "damping_coefficient", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_damping_coefficient", "get_damping_coefficient"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "drag_coefficient", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_drag_coefficient", "get_drag_coefficient"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "pose_matching_coefficient", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_pose_matching_coefficient", "get_pose_matching_coefficient"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "total_mass", PROPERTY_HINT_RANGE, "0.01,10000,1"), "set_total_mass", "get_total_mass"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "linear_stiffness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_linear_stiffness", "get_linear_stiffness"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "areaAngular_stiffness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_areaAngular_stiffness", "get_areaAngular_stiffness"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "volume_stiffness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_volume_stiffness", "get_volume_stiffness"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "pressure_coefficient"), "set_pressure_coefficient", "get_pressure_coefficient"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "damping_coefficient", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_damping_coefficient", "get_damping_coefficient"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "drag_coefficient", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_drag_coefficient", "get_drag_coefficient"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "pose_matching_coefficient", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_pose_matching_coefficient", "get_pose_matching_coefficient"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "ray_pickable"), "set_ray_pickable", "is_ray_pickable"); } @@ -417,7 +417,7 @@ void SoftBody::_update_physics_server() { _update_cache_pin_points_datas(); // Submit bone attachment const int pinned_points_indices_size = pinned_points.size(); - PoolVector<PinnedPoint>::Read r = pinned_points.read(); + const PinnedPoint *r = pinned_points.ptr(); for (int i = 0; i < pinned_points_indices_size; ++i) { if (r[i].spatial_attachment) { PhysicsServer::get_singleton()->soft_body_move_point(physics_rid, r[i].point_index, r[i].spatial_attachment->get_global_transform().xform(r[i].offset)); @@ -464,12 +464,12 @@ void SoftBody::prepare_physics_server() { become_mesh_owner(); PhysicsServer::get_singleton()->soft_body_set_mesh(physics_rid, get_mesh()); - VS::get_singleton()->connect("frame_pre_draw", this, "_draw_soft_mesh"); + VS::get_singleton()->connect_compat("frame_pre_draw", this, "_draw_soft_mesh"); } else { PhysicsServer::get_singleton()->soft_body_set_mesh(physics_rid, NULL); - if (VS::get_singleton()->is_connected("frame_pre_draw", this, "_draw_soft_mesh")) { - VS::get_singleton()->disconnect("frame_pre_draw", this, "_draw_soft_mesh"); + if (VS::get_singleton()->is_connected_compat("frame_pre_draw", this, "_draw_soft_mesh")) { + VS::get_singleton()->disconnect_compat("frame_pre_draw", this, "_draw_soft_mesh"); } } } @@ -559,15 +559,14 @@ const NodePath &SoftBody::get_parent_collision_ignore() const { return parent_collision_ignore; } -void SoftBody::set_pinned_points_indices(PoolVector<SoftBody::PinnedPoint> p_pinned_points_indices) { +void SoftBody::set_pinned_points_indices(Vector<SoftBody::PinnedPoint> p_pinned_points_indices) { pinned_points = p_pinned_points_indices; - PoolVector<PinnedPoint>::Read w = pinned_points.read(); for (int i = pinned_points.size() - 1; 0 <= i; --i) { pin_point(p_pinned_points_indices[i].point_index, true); } } -PoolVector<SoftBody::PinnedPoint> SoftBody::get_pinned_points_indices() { +Vector<SoftBody::PinnedPoint> SoftBody::get_pinned_points_indices() { return pinned_points; } @@ -721,7 +720,7 @@ SoftBody::~SoftBody() { void SoftBody::reset_softbody_pin() { PhysicsServer::get_singleton()->soft_body_remove_all_pinned_points(physics_rid); - PoolVector<PinnedPoint>::Read pps = pinned_points.read(); + const PinnedPoint *pps = pinned_points.ptr(); for (int i = pinned_points.size() - 1; 0 < i; --i) { PhysicsServer::get_singleton()->soft_body_pin_point(physics_rid, pps[i].point_index, true); } @@ -737,7 +736,7 @@ void SoftBody::_update_cache_pin_points_datas() { pinned_points_cache_dirty = false; - PoolVector<PinnedPoint>::Write w = pinned_points.write(); + PinnedPoint *w = pinned_points.ptrw(); for (int i = pinned_points.size() - 1; 0 <= i; --i) { if (!w[i].spatial_attachment_path.is_empty()) { @@ -786,8 +785,8 @@ void SoftBody::_reset_points_offsets() { if (!Engine::get_singleton()->is_editor_hint()) return; - PoolVector<PinnedPoint>::Read r = pinned_points.read(); - PoolVector<PinnedPoint>::Write w = pinned_points.write(); + const PinnedPoint *r = pinned_points.ptr(); + PinnedPoint *w = pinned_points.ptrw(); for (int i = pinned_points.size() - 1; 0 <= i; --i) { if (!r[i].spatial_attachment) @@ -813,13 +812,13 @@ int SoftBody::_get_pinned_point(int p_point_index, SoftBody::PinnedPoint *&r_poi r_point = NULL; return -1; } else { - r_point = const_cast<SoftBody::PinnedPoint *>(&pinned_points.read()[id]); + r_point = const_cast<SoftBody::PinnedPoint *>(&pinned_points.ptr()[id]); return id; } } int SoftBody::_has_pinned_point(int p_point_index) const { - PoolVector<PinnedPoint>::Read r = pinned_points.read(); + const PinnedPoint *r = pinned_points.ptr(); for (int i = pinned_points.size() - 1; 0 <= i; --i) { if (p_point_index == r[i].point_index) { return i; diff --git a/scene/3d/soft_body.h b/scene/3d/soft_body.h index 800db12594..d6c35a5989 100644 --- a/scene/3d/soft_body.h +++ b/scene/3d/soft_body.h @@ -41,12 +41,12 @@ class SoftBodyVisualServerHandler { RID mesh; int surface; - PoolVector<uint8_t> buffer; + Vector<uint8_t> buffer; uint32_t stride; uint32_t offset_vertices; uint32_t offset_normal; - PoolVector<uint8_t>::Write write_buffer; + uint8_t *write_buffer; private: SoftBodyVisualServerHandler(); @@ -87,7 +87,7 @@ private: uint32_t collision_mask; uint32_t collision_layer; NodePath parent_collision_ignore; - PoolVector<PinnedPoint> pinned_points; + Vector<PinnedPoint> pinned_points; bool simulation_started; bool pinned_points_cache_dirty; @@ -138,8 +138,8 @@ public: void set_parent_collision_ignore(const NodePath &p_parent_collision_ignore); const NodePath &get_parent_collision_ignore() const; - void set_pinned_points_indices(PoolVector<PinnedPoint> p_pinned_points_indices); - PoolVector<PinnedPoint> get_pinned_points_indices(); + void set_pinned_points_indices(Vector<PinnedPoint> p_pinned_points_indices); + Vector<PinnedPoint> get_pinned_points_indices(); void set_simulation_precision(int p_simulation_precision); int get_simulation_precision(); diff --git a/scene/3d/spring_arm.cpp b/scene/3d/spring_arm.cpp index bce0535d64..ce277dae5b 100644 --- a/scene/3d/spring_arm.cpp +++ b/scene/3d/spring_arm.cpp @@ -81,8 +81,8 @@ void SpringArm::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::INT, "collision_mask", PROPERTY_HINT_LAYERS_3D_PHYSICS), "set_collision_mask", "get_collision_mask"); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "shape", PROPERTY_HINT_RESOURCE_TYPE, "Shape"), "set_shape", "get_shape"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "spring_length"), "set_length", "get_length"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "margin"), "set_margin", "get_margin"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "spring_length"), "set_length", "get_length"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "margin"), "set_margin", "get_margin"); } float SpringArm::get_length() const { diff --git a/scene/3d/sprite_3d.cpp b/scene/3d/sprite_3d.cpp index 04f00a527e..0aa404de7d 100644 --- a/scene/3d/sprite_3d.cpp +++ b/scene/3d/sprite_3d.cpp @@ -197,18 +197,18 @@ AABB SpriteBase3D::get_aabb() const { return aabb; } -PoolVector<Face3> SpriteBase3D::get_faces(uint32_t p_usage_flags) const { +Vector<Face3> SpriteBase3D::get_faces(uint32_t p_usage_flags) const { - return PoolVector<Face3>(); + return Vector<Face3>(); } Ref<TriangleMesh> SpriteBase3D::generate_triangle_mesh() const { if (triangle_mesh.is_valid()) return triangle_mesh; - PoolVector<Vector3> faces; + Vector<Vector3> faces; faces.resize(6); - PoolVector<Vector3>::Write facesw = faces.write(); + Vector3 *facesw = faces.ptrw(); Rect2 final_rect = get_item_rect(); @@ -254,8 +254,6 @@ Ref<TriangleMesh> SpriteBase3D::generate_triangle_mesh() const { facesw[j] = vtx; } - facesw.release(); - triangle_mesh = Ref<TriangleMesh>(memnew(TriangleMesh)); triangle_mesh->create(faces); @@ -344,8 +342,8 @@ void SpriteBase3D::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::BOOL, "flip_h"), "set_flip_h", "is_flipped_h"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "flip_v"), "set_flip_v", "is_flipped_v"); ADD_PROPERTY(PropertyInfo(Variant::COLOR, "modulate"), "set_modulate", "get_modulate"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "opacity", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_opacity", "get_opacity"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "pixel_size", PROPERTY_HINT_RANGE, "0.0001,128,0.0001"), "set_pixel_size", "get_pixel_size"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "opacity", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_opacity", "get_opacity"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "pixel_size", PROPERTY_HINT_RANGE, "0.0001,128,0.0001"), "set_pixel_size", "get_pixel_size"); ADD_PROPERTY(PropertyInfo(Variant::INT, "axis", PROPERTY_HINT_ENUM, "X-Axis,Y-Axis,Z-Axis"), "set_axis", "get_axis"); ADD_GROUP("Flags", ""); ADD_PROPERTY(PropertyInfo(Variant::INT, "billboard", PROPERTY_HINT_ENUM, "Disabled,Enabled,Y-Billboard"), "set_billboard_mode", "get_billboard_mode"); @@ -533,11 +531,11 @@ void Sprite3D::set_texture(const Ref<Texture2D> &p_texture) { if (p_texture == texture) return; if (texture.is_valid()) { - texture->disconnect(CoreStringNames::get_singleton()->changed, this, SceneStringNames::get_singleton()->_queue_update); + texture->disconnect_compat(CoreStringNames::get_singleton()->changed, this, SceneStringNames::get_singleton()->_queue_update); } texture = p_texture; if (texture.is_valid()) { - texture->connect(CoreStringNames::get_singleton()->changed, this, SceneStringNames::get_singleton()->_queue_update); + texture->connect_compat(CoreStringNames::get_singleton()->changed, this, SceneStringNames::get_singleton()->_queue_update); } _queue_update(); } @@ -954,10 +952,10 @@ void AnimatedSprite3D::_notification(int p_what) { void AnimatedSprite3D::set_sprite_frames(const Ref<SpriteFrames> &p_frames) { if (frames.is_valid()) - frames->disconnect("changed", this, "_res_changed"); + frames->disconnect_compat("changed", this, "_res_changed"); frames = p_frames; if (frames.is_valid()) - frames->connect("changed", this, "_res_changed"); + frames->connect_compat("changed", this, "_res_changed"); if (!frames.is_valid()) { frame = 0; @@ -1132,7 +1130,7 @@ void AnimatedSprite3D::_bind_methods() { ADD_SIGNAL(MethodInfo("frame_changed")); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "frames", PROPERTY_HINT_RESOURCE_TYPE, "SpriteFrames"), "set_sprite_frames", "get_sprite_frames"); - ADD_PROPERTY(PropertyInfo(Variant::STRING, "animation"), "set_animation", "get_animation"); + ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "animation"), "set_animation", "get_animation"); ADD_PROPERTY(PropertyInfo(Variant::INT, "frame"), "set_frame", "get_frame"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "playing"), "_set_playing", "_is_playing"); } diff --git a/scene/3d/sprite_3d.h b/scene/3d/sprite_3d.h index 9c31a667b5..3b3f0265ce 100644 --- a/scene/3d/sprite_3d.h +++ b/scene/3d/sprite_3d.h @@ -137,7 +137,7 @@ public: virtual Rect2 get_item_rect() const = 0; virtual AABB get_aabb() const; - virtual PoolVector<Face3> get_faces(uint32_t p_usage_flags) const; + virtual Vector<Face3> get_faces(uint32_t p_usage_flags) const; Ref<TriangleMesh> generate_triangle_mesh() const; SpriteBase3D(); diff --git a/scene/3d/vehicle_body.cpp b/scene/3d/vehicle_body.cpp index 52e50aa84e..c249d844d1 100644 --- a/scene/3d/vehicle_body.cpp +++ b/scene/3d/vehicle_body.cpp @@ -282,24 +282,24 @@ void VehicleWheel::_bind_methods() { ClassDB::bind_method(D_METHOD("get_steering"), &VehicleWheel::get_steering); ADD_GROUP("Per-Wheel Motion", ""); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "engine_force", PROPERTY_HINT_RANGE, "0.00,1024.0,0.01,or_greater"), "set_engine_force", "get_engine_force"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "brake", PROPERTY_HINT_RANGE, "0.0,1.0,0.01"), "set_brake", "get_brake"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "steering", PROPERTY_HINT_RANGE, "-180,180.0,0.01"), "set_steering", "get_steering"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "engine_force", PROPERTY_HINT_RANGE, "0.00,1024.0,0.01,or_greater"), "set_engine_force", "get_engine_force"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "brake", PROPERTY_HINT_RANGE, "0.0,1.0,0.01"), "set_brake", "get_brake"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "steering", PROPERTY_HINT_RANGE, "-180,180.0,0.01"), "set_steering", "get_steering"); ADD_GROUP("VehicleBody Motion", ""); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "use_as_traction"), "set_use_as_traction", "is_used_as_traction"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "use_as_steering"), "set_use_as_steering", "is_used_as_steering"); ADD_GROUP("Wheel", "wheel_"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "wheel_roll_influence"), "set_roll_influence", "get_roll_influence"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "wheel_radius"), "set_radius", "get_radius"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "wheel_rest_length"), "set_suspension_rest_length", "get_suspension_rest_length"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "wheel_friction_slip"), "set_friction_slip", "get_friction_slip"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "wheel_roll_influence"), "set_roll_influence", "get_roll_influence"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "wheel_radius"), "set_radius", "get_radius"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "wheel_rest_length"), "set_suspension_rest_length", "get_suspension_rest_length"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "wheel_friction_slip"), "set_friction_slip", "get_friction_slip"); ADD_GROUP("Suspension", "suspension_"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "suspension_travel"), "set_suspension_travel", "get_suspension_travel"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "suspension_stiffness"), "set_suspension_stiffness", "get_suspension_stiffness"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "suspension_max_force"), "set_suspension_max_force", "get_suspension_max_force"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "suspension_travel"), "set_suspension_travel", "get_suspension_travel"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "suspension_stiffness"), "set_suspension_stiffness", "get_suspension_stiffness"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "suspension_max_force"), "set_suspension_max_force", "get_suspension_max_force"); ADD_GROUP("Damping", "damping_"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "damping_compression"), "set_damping_compression", "get_damping_compression"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "damping_relaxation"), "set_damping_relaxation", "get_damping_relaxation"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "damping_compression"), "set_damping_compression", "get_damping_compression"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "damping_relaxation"), "set_damping_relaxation", "get_damping_relaxation"); } void VehicleWheel::set_engine_force(float p_engine_force) { @@ -974,9 +974,9 @@ void VehicleBody::_bind_methods() { ClassDB::bind_method(D_METHOD("get_steering"), &VehicleBody::get_steering); ADD_GROUP("Motion", ""); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "engine_force", PROPERTY_HINT_RANGE, "0.00,1024.0,0.01,or_greater"), "set_engine_force", "get_engine_force"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "brake", PROPERTY_HINT_RANGE, "0.0,1.0,0.01"), "set_brake", "get_brake"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "steering", PROPERTY_HINT_RANGE, "-180,180.0,0.01"), "set_steering", "get_steering"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "engine_force", PROPERTY_HINT_RANGE, "0.00,1024.0,0.01,or_greater"), "set_engine_force", "get_engine_force"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "brake", PROPERTY_HINT_RANGE, "0.0,1.0,0.01"), "set_brake", "get_brake"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "steering", PROPERTY_HINT_RANGE, "-180,180.0,0.01"), "set_steering", "get_steering"); } VehicleBody::VehicleBody() { diff --git a/scene/3d/visibility_notifier.cpp b/scene/3d/visibility_notifier.cpp index 510442dc1c..3bf9584258 100644 --- a/scene/3d/visibility_notifier.cpp +++ b/scene/3d/visibility_notifier.cpp @@ -170,7 +170,7 @@ void VisibilityEnabler::_find_nodes(Node *p_node) { if (add) { - p_node->connect(SceneStringNames::get_singleton()->tree_exiting, this, "_node_removed", varray(p_node), CONNECT_ONESHOT); + p_node->connect_compat(SceneStringNames::get_singleton()->tree_exiting, this, "_node_removed", varray(p_node), CONNECT_ONESHOT); nodes[p_node] = meta; _change_node_state(p_node, false); } @@ -208,7 +208,7 @@ void VisibilityEnabler::_notification(int p_what) { if (!visible) _change_node_state(E->key(), true); - E->key()->disconnect(SceneStringNames::get_singleton()->tree_exiting, this, "_node_removed"); + E->key()->disconnect_compat(SceneStringNames::get_singleton()->tree_exiting, this, "_node_removed"); } nodes.clear(); diff --git a/scene/3d/visual_instance.cpp b/scene/3d/visual_instance.cpp index 5a332fe0f9..73cffe9c89 100644 --- a/scene/3d/visual_instance.cpp +++ b/scene/3d/visual_instance.cpp @@ -296,7 +296,7 @@ void GeometryInstance::_bind_methods() { ADD_GROUP("Geometry", ""); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "material_override", PROPERTY_HINT_RESOURCE_TYPE, "ShaderMaterial,StandardMaterial3D"), "set_material_override", "get_material_override"); ADD_PROPERTY(PropertyInfo(Variant::INT, "cast_shadow", PROPERTY_HINT_ENUM, "Off,On,Double-Sided,Shadows Only"), "set_cast_shadows_setting", "get_cast_shadows_setting"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "extra_cull_margin", PROPERTY_HINT_RANGE, "0,16384,0.01"), "set_extra_cull_margin", "get_extra_cull_margin"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "extra_cull_margin", PROPERTY_HINT_RANGE, "0,16384,0.01"), "set_extra_cull_margin", "get_extra_cull_margin"); ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "use_in_baked_light"), "set_flag", "get_flag", FLAG_USE_BAKED_LIGHT); ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "use_dynamic_gi"), "set_flag", "get_flag", FLAG_USE_DYNAMIC_GI); diff --git a/scene/3d/visual_instance.h b/scene/3d/visual_instance.h index c1d6c2b015..fee6787c87 100644 --- a/scene/3d/visual_instance.h +++ b/scene/3d/visual_instance.h @@ -63,7 +63,7 @@ public: RID get_instance() const; virtual AABB get_aabb() const = 0; - virtual PoolVector<Face3> get_faces(uint32_t p_usage_flags) const = 0; + virtual Vector<Face3> get_faces(uint32_t p_usage_flags) const = 0; virtual AABB get_transformed_aabb() const; // helper diff --git a/scene/3d/voxelizer.cpp b/scene/3d/voxelizer.cpp index 4d7054726d..0257e6e83d 100644 --- a/scene/3d/voxelizer.cpp +++ b/scene/3d/voxelizer.cpp @@ -497,7 +497,7 @@ Vector<Color> Voxelizer::_get_bake_texture(Ref<Image> p_image, const Color &p_co p_image->convert(Image::FORMAT_RGBA8); p_image->resize(bake_texture_size, bake_texture_size, Image::INTERPOLATE_CUBIC); - PoolVector<uint8_t>::Read r = p_image->get_data().read(); + const uint8_t *r = p_image->get_data().ptr(); ret.resize(bake_texture_size * bake_texture_size); for (int i = 0; i < bake_texture_size * bake_texture_size; i++) { @@ -589,32 +589,32 @@ void Voxelizer::plot_mesh(const Transform &p_xform, Ref<Mesh> &p_mesh, const Vec Array a = p_mesh->surface_get_arrays(i); - PoolVector<Vector3> vertices = a[Mesh::ARRAY_VERTEX]; - PoolVector<Vector3>::Read vr = vertices.read(); - PoolVector<Vector2> uv = a[Mesh::ARRAY_TEX_UV]; - PoolVector<Vector2>::Read uvr; - PoolVector<Vector3> normals = a[Mesh::ARRAY_NORMAL]; - PoolVector<Vector3>::Read nr; - PoolVector<int> index = a[Mesh::ARRAY_INDEX]; + Vector<Vector3> vertices = a[Mesh::ARRAY_VERTEX]; + const Vector3 *vr = vertices.ptr(); + Vector<Vector2> uv = a[Mesh::ARRAY_TEX_UV]; + const Vector2 *uvr; + Vector<Vector3> normals = a[Mesh::ARRAY_NORMAL]; + const Vector3 *nr; + Vector<int> index = a[Mesh::ARRAY_INDEX]; bool read_uv = false; bool read_normals = false; if (uv.size()) { - uvr = uv.read(); + uvr = uv.ptr(); read_uv = true; } if (normals.size()) { read_normals = true; - nr = normals.read(); + nr = normals.ptr(); } if (index.size()) { int facecount = index.size() / 3; - PoolVector<int>::Read ir = index.read(); + const int *ir = index.ptr(); for (int j = 0; j < facecount; j++) { @@ -886,12 +886,12 @@ int Voxelizer::get_giprobe_cell_count() const { return bake_cells.size(); } -PoolVector<uint8_t> Voxelizer::get_giprobe_octree_cells() const { - PoolVector<uint8_t> data; +Vector<uint8_t> Voxelizer::get_giprobe_octree_cells() const { + Vector<uint8_t> data; data.resize((8 * 4) * bake_cells.size()); //8 uint32t values { - PoolVector<uint8_t>::Write w = data.write(); - uint32_t *children_cells = (uint32_t *)w.ptr(); + uint8_t *w = data.ptrw(); + uint32_t *children_cells = (uint32_t *)w; const Cell *cells = bake_cells.ptr(); uint32_t cell_count = bake_cells.size(); @@ -906,12 +906,12 @@ PoolVector<uint8_t> Voxelizer::get_giprobe_octree_cells() const { return data; } -PoolVector<uint8_t> Voxelizer::get_giprobe_data_cells() const { - PoolVector<uint8_t> data; +Vector<uint8_t> Voxelizer::get_giprobe_data_cells() const { + Vector<uint8_t> data; data.resize((4 * 4) * bake_cells.size()); //8 uint32t values { - PoolVector<uint8_t>::Write w = data.write(); - uint32_t *dataptr = (uint32_t *)w.ptr(); + uint8_t *w = data.ptrw(); + uint32_t *dataptr = (uint32_t *)w; const Cell *cells = bake_cells.ptr(); uint32_t cell_count = bake_cells.size(); @@ -962,13 +962,13 @@ PoolVector<uint8_t> Voxelizer::get_giprobe_data_cells() const { return data; } -PoolVector<int> Voxelizer::get_giprobe_level_cell_count() const { +Vector<int> Voxelizer::get_giprobe_level_cell_count() const { uint32_t cell_count = bake_cells.size(); const Cell *cells = bake_cells.ptr(); - PoolVector<int> level_count; + Vector<int> level_count; level_count.resize(cell_subdiv + 1); //remember, always x+1 levels for x subdivisions { - PoolVector<int>::Write w = level_count.write(); + int *w = level_count.ptrw(); for (int i = 0; i < cell_subdiv + 1; i++) { w[i] = 0; } @@ -1025,7 +1025,7 @@ static void edt(float *f, int stride, int n) { #undef square -PoolVector<uint8_t> Voxelizer::get_sdf_3d_image() const { +Vector<uint8_t> Voxelizer::get_sdf_3d_image() const { Vector3i octree_size = get_giprobe_octree_size(); @@ -1078,16 +1078,16 @@ PoolVector<uint8_t> Voxelizer::get_sdf_3d_image() const { } } - PoolVector<uint8_t> image3d; + Vector<uint8_t> image3d; image3d.resize(float_count); { - PoolVector<uint8_t>::Write w = image3d.write(); + uint8_t *w = image3d.ptrw(); for (uint32_t i = 0; i < float_count; i++) { uint32_t d = uint32_t(Math::sqrt(work_memory[i])); if (d == 0) { w[i] = 0; } else { - w[i] = CLAMP(d, 0, 254) + 1; + w[i] = MIN(d, 254) + 1; } } } @@ -1154,8 +1154,8 @@ Ref<MultiMesh> Voxelizer::create_debug_multimesh() { Array arr; arr.resize(Mesh::ARRAY_MAX); - PoolVector<Vector3> vertices; - PoolVector<Color> colors; + Vector<Vector3> vertices; + Vector<Color> colors; #define ADD_VTX(m_idx) \ vertices.push_back(face_points[m_idx]); \ colors.push_back(Color(1, 1, 1, 1)); diff --git a/scene/3d/voxelizer.h b/scene/3d/voxelizer.h index 5016ff029f..1d50f1cd18 100644 --- a/scene/3d/voxelizer.h +++ b/scene/3d/voxelizer.h @@ -109,7 +109,6 @@ private: int color_scan_cell_width; int bake_texture_size; float cell_size; - float propagation; int max_original_cells; int leaf_voxel_count; @@ -132,10 +131,10 @@ public: int get_gi_probe_octree_depth() const; Vector3i get_giprobe_octree_size() const; int get_giprobe_cell_count() const; - PoolVector<uint8_t> get_giprobe_octree_cells() const; - PoolVector<uint8_t> get_giprobe_data_cells() const; - PoolVector<int> get_giprobe_level_cell_count() const; - PoolVector<uint8_t> get_sdf_3d_image() const; + Vector<uint8_t> get_giprobe_octree_cells() const; + Vector<uint8_t> get_giprobe_data_cells() const; + Vector<int> get_giprobe_level_cell_count() const; + Vector<uint8_t> get_sdf_3d_image() const; Ref<MultiMesh> create_debug_multimesh(); diff --git a/scene/animation/animation_blend_space_1d.cpp b/scene/animation/animation_blend_space_1d.cpp index 0f55682427..93ebf88edb 100644 --- a/scene/animation/animation_blend_space_1d.cpp +++ b/scene/animation/animation_blend_space_1d.cpp @@ -31,7 +31,7 @@ #include "animation_blend_space_1d.h" void AnimationNodeBlendSpace1D::get_parameter_list(List<PropertyInfo> *r_list) const { - r_list->push_back(PropertyInfo(Variant::REAL, blend_position)); + r_list->push_back(PropertyInfo(Variant::FLOAT, blend_position)); } Variant AnimationNodeBlendSpace1D::get_parameter_default_value(const StringName &p_parameter) const { return 0; @@ -83,12 +83,12 @@ void AnimationNodeBlendSpace1D::_bind_methods() { for (int i = 0; i < MAX_BLEND_POINTS; i++) { ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "blend_point_" + itos(i) + "/node", PROPERTY_HINT_RESOURCE_TYPE, "AnimationRootNode", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_add_blend_point", "get_blend_point_node", i); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "blend_point_" + itos(i) + "/pos", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "set_blend_point_position", "get_blend_point_position", i); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "blend_point_" + itos(i) + "/pos", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "set_blend_point_position", "get_blend_point_position", i); } - ADD_PROPERTY(PropertyInfo(Variant::REAL, "min_space", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_min_space", "get_min_space"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "max_space", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_max_space", "get_max_space"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "snap", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_snap", "get_snap"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "min_space", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_min_space", "get_min_space"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "max_space", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_max_space", "get_max_space"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "snap", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_snap", "get_snap"); ADD_PROPERTY(PropertyInfo(Variant::STRING, "value_label", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_value_label", "get_value_label"); } @@ -118,7 +118,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", this, "_tree_changed", varray(), CONNECT_REFERENCE_COUNTED); + blend_points[p_at_index].node->connect_compat("tree_changed", this, "_tree_changed", varray(), CONNECT_REFERENCE_COUNTED); blend_points_used++; emit_signal("tree_changed"); @@ -135,11 +135,11 @@ void AnimationNodeBlendSpace1D::set_blend_point_node(int p_point, const Ref<Anim ERR_FAIL_COND(p_node.is_null()); if (blend_points[p_point].node.is_valid()) { - blend_points[p_point].node->disconnect("tree_changed", this, "_tree_changed"); + blend_points[p_point].node->disconnect_compat("tree_changed", this, "_tree_changed"); } blend_points[p_point].node = p_node; - blend_points[p_point].node->connect("tree_changed", this, "_tree_changed", varray(), CONNECT_REFERENCE_COUNTED); + blend_points[p_point].node->connect_compat("tree_changed", this, "_tree_changed", varray(), CONNECT_REFERENCE_COUNTED); emit_signal("tree_changed"); } @@ -158,7 +158,7 @@ void AnimationNodeBlendSpace1D::remove_blend_point(int p_point) { ERR_FAIL_INDEX(p_point, blend_points_used); ERR_FAIL_COND(blend_points[p_point].node.is_null()); - blend_points[p_point].node->disconnect("tree_changed", this, "_tree_changed"); + blend_points[p_point].node->disconnect_compat("tree_changed", this, "_tree_changed"); for (int i = p_point; i < blend_points_used - 1; i++) { blend_points[i] = blend_points[i + 1]; diff --git a/scene/animation/animation_blend_space_2d.cpp b/scene/animation/animation_blend_space_2d.cpp index d749959377..15ecf9fa1e 100644 --- a/scene/animation/animation_blend_space_2d.cpp +++ b/scene/animation/animation_blend_space_2d.cpp @@ -34,7 +34,7 @@ void AnimationNodeBlendSpace2D::get_parameter_list(List<PropertyInfo> *r_list) const { r_list->push_back(PropertyInfo(Variant::VECTOR2, blend_position)); r_list->push_back(PropertyInfo(Variant::INT, closest, PROPERTY_HINT_NONE, "", 0)); - r_list->push_back(PropertyInfo(Variant::REAL, length_internal, PROPERTY_HINT_NONE, "", 0)); + r_list->push_back(PropertyInfo(Variant::FLOAT, length_internal, PROPERTY_HINT_NONE, "", 0)); } Variant AnimationNodeBlendSpace2D::get_parameter_default_value(const StringName &p_parameter) const { if (p_parameter == closest) { @@ -77,7 +77,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", this, "_tree_changed", varray(), CONNECT_REFERENCE_COUNTED); + blend_points[p_at_index].node->connect_compat("tree_changed", this, "_tree_changed", varray(), CONNECT_REFERENCE_COUNTED); blend_points_used++; _queue_auto_triangles(); @@ -95,10 +95,10 @@ void AnimationNodeBlendSpace2D::set_blend_point_node(int p_point, const Ref<Anim ERR_FAIL_COND(p_node.is_null()); if (blend_points[p_point].node.is_valid()) { - blend_points[p_point].node->disconnect("tree_changed", this, "_tree_changed"); + blend_points[p_point].node->disconnect_compat("tree_changed", this, "_tree_changed"); } blend_points[p_point].node = p_node; - blend_points[p_point].node->connect("tree_changed", this, "_tree_changed", varray(), CONNECT_REFERENCE_COUNTED); + blend_points[p_point].node->connect_compat("tree_changed", this, "_tree_changed", varray(), CONNECT_REFERENCE_COUNTED); emit_signal("tree_changed"); } @@ -114,7 +114,7 @@ void AnimationNodeBlendSpace2D::remove_blend_point(int p_point) { ERR_FAIL_INDEX(p_point, blend_points_used); ERR_FAIL_COND(blend_points[p_point].node.is_null()); - blend_points[p_point].node->disconnect("tree_changed", this, "_tree_changed"); + blend_points[p_point].node->disconnect_compat("tree_changed", this, "_tree_changed"); for (int i = 0; i < triangles.size(); i++) { bool erase = false; @@ -650,7 +650,7 @@ void AnimationNodeBlendSpace2D::_bind_methods() { ADD_PROPERTYI(PropertyInfo(Variant::VECTOR2, "blend_point_" + itos(i) + "/pos", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "set_blend_point_position", "get_blend_point_position", i); } - ADD_PROPERTY(PropertyInfo(Variant::POOL_INT_ARRAY, "triangles", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_triangles", "_get_triangles"); + ADD_PROPERTY(PropertyInfo(Variant::PACKED_INT32_ARRAY, "triangles", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_triangles", "_get_triangles"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "min_space", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_min_space", "get_min_space"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "max_space", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_max_space", "get_max_space"); diff --git a/scene/animation/animation_blend_tree.cpp b/scene/animation/animation_blend_tree.cpp index 5c284cb483..1c99920569 100644 --- a/scene/animation/animation_blend_tree.cpp +++ b/scene/animation/animation_blend_tree.cpp @@ -44,7 +44,7 @@ StringName AnimationNodeAnimation::get_animation() const { Vector<String> (*AnimationNodeAnimation::get_editable_animation_list)() = NULL; void AnimationNodeAnimation::get_parameter_list(List<PropertyInfo> *r_list) const { - r_list->push_back(PropertyInfo(Variant::REAL, time, PROPERTY_HINT_NONE, "", 0)); + r_list->push_back(PropertyInfo(Variant::FLOAT, time, PROPERTY_HINT_NONE, "", 0)); } void AnimationNodeAnimation::_validate_property(PropertyInfo &property) const { @@ -126,7 +126,7 @@ void AnimationNodeAnimation::_bind_methods() { ClassDB::bind_method(D_METHOD("set_animation", "name"), &AnimationNodeAnimation::set_animation); ClassDB::bind_method(D_METHOD("get_animation"), &AnimationNodeAnimation::get_animation); - ADD_PROPERTY(PropertyInfo(Variant::STRING, "animation"), "set_animation", "get_animation"); + ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "animation"), "set_animation", "get_animation"); } AnimationNodeAnimation::AnimationNodeAnimation() { @@ -140,9 +140,9 @@ AnimationNodeAnimation::AnimationNodeAnimation() { void AnimationNodeOneShot::get_parameter_list(List<PropertyInfo> *r_list) const { r_list->push_back(PropertyInfo(Variant::BOOL, active)); r_list->push_back(PropertyInfo(Variant::BOOL, prev_active, PROPERTY_HINT_NONE, "", 0)); - r_list->push_back(PropertyInfo(Variant::REAL, time, PROPERTY_HINT_NONE, "", 0)); - r_list->push_back(PropertyInfo(Variant::REAL, remaining, PROPERTY_HINT_NONE, "", 0)); - r_list->push_back(PropertyInfo(Variant::REAL, time_to_restart, PROPERTY_HINT_NONE, "", 0)); + r_list->push_back(PropertyInfo(Variant::FLOAT, time, PROPERTY_HINT_NONE, "", 0)); + r_list->push_back(PropertyInfo(Variant::FLOAT, remaining, PROPERTY_HINT_NONE, "", 0)); + r_list->push_back(PropertyInfo(Variant::FLOAT, time_to_restart, PROPERTY_HINT_NONE, "", 0)); } Variant AnimationNodeOneShot::get_parameter_default_value(const StringName &p_parameter) const { @@ -339,14 +339,14 @@ void AnimationNodeOneShot::_bind_methods() { ClassDB::bind_method(D_METHOD("set_use_sync", "enable"), &AnimationNodeOneShot::set_use_sync); ClassDB::bind_method(D_METHOD("is_using_sync"), &AnimationNodeOneShot::is_using_sync); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "fadein_time", PROPERTY_HINT_RANGE, "0,60,0.01,or_greater"), "set_fadein_time", "get_fadein_time"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "fadeout_time", PROPERTY_HINT_RANGE, "0,60,0.01,or_greater"), "set_fadeout_time", "get_fadeout_time"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "fadein_time", PROPERTY_HINT_RANGE, "0,60,0.01,or_greater"), "set_fadein_time", "get_fadein_time"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "fadeout_time", PROPERTY_HINT_RANGE, "0,60,0.01,or_greater"), "set_fadeout_time", "get_fadeout_time"); ADD_GROUP("autorestart_", "Auto Restart"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "autorestart"), "set_autorestart", "has_autorestart"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "autorestart_delay", PROPERTY_HINT_RANGE, "0,60,0.01,or_greater"), "set_autorestart_delay", "get_autorestart_delay"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "autorestart_random_delay", PROPERTY_HINT_RANGE, "0,60,0.01,or_greater"), "set_autorestart_random_delay", "get_autorestart_random_delay"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "autorestart_delay", PROPERTY_HINT_RANGE, "0,60,0.01,or_greater"), "set_autorestart_delay", "get_autorestart_delay"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "autorestart_random_delay", PROPERTY_HINT_RANGE, "0,60,0.01,or_greater"), "set_autorestart_random_delay", "get_autorestart_random_delay"); ADD_GROUP("", ""); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "sync"), "set_use_sync", "is_using_sync"); @@ -379,7 +379,7 @@ AnimationNodeOneShot::AnimationNodeOneShot() { //////////////////////////////////////////////// void AnimationNodeAdd2::get_parameter_list(List<PropertyInfo> *r_list) const { - r_list->push_back(PropertyInfo(Variant::REAL, add_amount, PROPERTY_HINT_RANGE, "0,1,0.01")); + r_list->push_back(PropertyInfo(Variant::FLOAT, add_amount, PROPERTY_HINT_RANGE, "0,1,0.01")); } Variant AnimationNodeAdd2::get_parameter_default_value(const StringName &p_parameter) const { return 0; @@ -431,7 +431,7 @@ AnimationNodeAdd2::AnimationNodeAdd2() { //////////////////////////////////////////////// void AnimationNodeAdd3::get_parameter_list(List<PropertyInfo> *r_list) const { - r_list->push_back(PropertyInfo(Variant::REAL, add_amount, PROPERTY_HINT_RANGE, "-1,1,0.01")); + r_list->push_back(PropertyInfo(Variant::FLOAT, add_amount, PROPERTY_HINT_RANGE, "-1,1,0.01")); } Variant AnimationNodeAdd3::get_parameter_default_value(const StringName &p_parameter) const { return 0; @@ -484,7 +484,7 @@ AnimationNodeAdd3::AnimationNodeAdd3() { ///////////////////////////////////////////// void AnimationNodeBlend2::get_parameter_list(List<PropertyInfo> *r_list) const { - r_list->push_back(PropertyInfo(Variant::REAL, blend_amount, PROPERTY_HINT_RANGE, "0,1,0.01")); + r_list->push_back(PropertyInfo(Variant::FLOAT, blend_amount, PROPERTY_HINT_RANGE, "0,1,0.01")); } Variant AnimationNodeBlend2::get_parameter_default_value(const StringName &p_parameter) const { return 0; //for blend amount @@ -535,7 +535,7 @@ AnimationNodeBlend2::AnimationNodeBlend2() { ////////////////////////////////////// void AnimationNodeBlend3::get_parameter_list(List<PropertyInfo> *r_list) const { - r_list->push_back(PropertyInfo(Variant::REAL, blend_amount, PROPERTY_HINT_RANGE, "-1,1,0.01")); + r_list->push_back(PropertyInfo(Variant::FLOAT, blend_amount, PROPERTY_HINT_RANGE, "-1,1,0.01")); } Variant AnimationNodeBlend3::get_parameter_default_value(const StringName &p_parameter) const { return 0; //for blend amount @@ -583,7 +583,7 @@ AnimationNodeBlend3::AnimationNodeBlend3() { ///////////////////////////////// void AnimationNodeTimeScale::get_parameter_list(List<PropertyInfo> *r_list) const { - r_list->push_back(PropertyInfo(Variant::REAL, scale, PROPERTY_HINT_RANGE, "0,32,0.01,or_greater")); + r_list->push_back(PropertyInfo(Variant::FLOAT, scale, PROPERTY_HINT_RANGE, "0,32,0.01,or_greater")); } Variant AnimationNodeTimeScale::get_parameter_default_value(const StringName &p_parameter) const { return 1.0; //initial timescale @@ -613,7 +613,7 @@ AnimationNodeTimeScale::AnimationNodeTimeScale() { //////////////////////////////////// void AnimationNodeTimeSeek::get_parameter_list(List<PropertyInfo> *r_list) const { - r_list->push_back(PropertyInfo(Variant::REAL, seek_pos, PROPERTY_HINT_RANGE, "-1,3600,0.01,or_greater")); + r_list->push_back(PropertyInfo(Variant::FLOAT, seek_pos, PROPERTY_HINT_RANGE, "-1,3600,0.01,or_greater")); } Variant AnimationNodeTimeSeek::get_parameter_default_value(const StringName &p_parameter) const { return 1.0; //initial timescale @@ -661,8 +661,8 @@ void AnimationNodeTransition::get_parameter_list(List<PropertyInfo> *r_list) con r_list->push_back(PropertyInfo(Variant::INT, current, PROPERTY_HINT_ENUM, anims)); r_list->push_back(PropertyInfo(Variant::INT, prev_current, PROPERTY_HINT_NONE, "", 0)); r_list->push_back(PropertyInfo(Variant::INT, prev, PROPERTY_HINT_NONE, "", 0)); - r_list->push_back(PropertyInfo(Variant::REAL, time, PROPERTY_HINT_NONE, "", 0)); - r_list->push_back(PropertyInfo(Variant::REAL, prev_xfading, PROPERTY_HINT_NONE, "", 0)); + r_list->push_back(PropertyInfo(Variant::FLOAT, time, PROPERTY_HINT_NONE, "", 0)); + r_list->push_back(PropertyInfo(Variant::FLOAT, prev_xfading, PROPERTY_HINT_NONE, "", 0)); } Variant AnimationNodeTransition::get_parameter_default_value(const StringName &p_parameter) const { if (p_parameter == time || p_parameter == prev_xfading) { @@ -829,7 +829,7 @@ void AnimationNodeTransition::_bind_methods() { ClassDB::bind_method(D_METHOD("get_cross_fade_time"), &AnimationNodeTransition::get_cross_fade_time); ADD_PROPERTY(PropertyInfo(Variant::INT, "input_count", PROPERTY_HINT_RANGE, "0,64,1", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), "set_enabled_inputs", "get_enabled_inputs"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "xfade_time", PROPERTY_HINT_RANGE, "0,120,0.01"), "set_cross_fade_time", "get_cross_fade_time"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "xfade_time", PROPERTY_HINT_RANGE, "0,120,0.01"), "set_cross_fade_time", "get_cross_fade_time"); for (int i = 0; i < MAX_INPUTS; i++) { ADD_PROPERTYI(PropertyInfo(Variant::STRING, "input_" + itos(i) + "/name", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_INTERNAL), "set_input_caption", "get_input_caption", i); @@ -884,8 +884,8 @@ void AnimationNodeBlendTree::add_node(const StringName &p_name, Ref<AnimationNod emit_changed(); emit_signal("tree_changed"); - p_node->connect("tree_changed", this, "_tree_changed", varray(), CONNECT_REFERENCE_COUNTED); - p_node->connect("changed", this, "_node_changed", varray(p_name), CONNECT_REFERENCE_COUNTED); + p_node->connect_compat("tree_changed", this, "_tree_changed", varray(), CONNECT_REFERENCE_COUNTED); + p_node->connect_compat("changed", this, "_node_changed", varray(p_name), CONNECT_REFERENCE_COUNTED); } Ref<AnimationNode> AnimationNodeBlendTree::get_node(const StringName &p_name) const { @@ -947,8 +947,8 @@ void AnimationNodeBlendTree::remove_node(const StringName &p_name) { { Ref<AnimationNode> node = nodes[p_name].node; - node->disconnect("tree_changed", this, "_tree_changed"); - node->disconnect("changed", this, "_node_changed"); + node->disconnect_compat("tree_changed", this, "_tree_changed"); + node->disconnect_compat("changed", this, "_node_changed"); } nodes.erase(p_name); @@ -973,7 +973,7 @@ void AnimationNodeBlendTree::rename_node(const StringName &p_name, const StringN ERR_FAIL_COND(p_name == SceneStringNames::get_singleton()->output); ERR_FAIL_COND(p_new_name == SceneStringNames::get_singleton()->output); - nodes[p_name].node->disconnect("changed", this, "_node_changed"); + nodes[p_name].node->disconnect_compat("changed", this, "_node_changed"); nodes[p_new_name] = nodes[p_name]; nodes.erase(p_name); @@ -988,7 +988,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", this, "_node_changed", varray(p_new_name), CONNECT_REFERENCE_COUNTED); + nodes[p_new_name].node->connect_compat("changed", this, "_node_changed", varray(p_new_name), CONNECT_REFERENCE_COUNTED); emit_signal("tree_changed"); } diff --git a/scene/animation/animation_cache.cpp b/scene/animation/animation_cache.cpp index 8d1ffb43cc..16b6813bbe 100644 --- a/scene/animation/animation_cache.cpp +++ b/scene/animation/animation_cache.cpp @@ -56,7 +56,7 @@ void AnimationCache::_clear_cache() { while (connected_nodes.size()) { - connected_nodes.front()->get()->disconnect("tree_exiting", this, "_node_exit_tree"); + connected_nodes.front()->get()->disconnect_compat("tree_exiting", this, "_node_exit_tree"); connected_nodes.erase(connected_nodes.front()); } path_cache.clear(); @@ -174,7 +174,7 @@ void AnimationCache::_update_cache() { if (!connected_nodes.has(path.node)) { connected_nodes.insert(path.node); - path.node->connect("tree_exiting", this, "_node_exit_tree", Node::make_binds(path.node), CONNECT_ONESHOT); + path.node->connect_compat("tree_exiting", this, "_node_exit_tree", Node::make_binds(path.node), CONNECT_ONESHOT); } } @@ -218,7 +218,7 @@ void AnimationCache::set_track_value(int p_idx, const Variant &p_value) { p.object->set_indexed(p.subpath, p_value); } -void AnimationCache::call_track(int p_idx, const StringName &p_method, const Variant **p_args, int p_argcount, Variant::CallError &r_error) { +void AnimationCache::call_track(int p_idx, const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error) { if (cache_dirty) _update_cache(); @@ -283,7 +283,7 @@ void AnimationCache::set_all(float p_time, float p_delta) { Vector<Variant> args = animation->method_track_get_params(i, E->get()); StringName name = animation->method_track_get_name(i, E->get()); - Variant::CallError err; + Callable::CallError err; if (!args.size()) { @@ -313,12 +313,12 @@ void AnimationCache::set_animation(const Ref<Animation> &p_animation) { _clear_cache(); if (animation.is_valid()) - animation->disconnect("changed", this, "_animation_changed"); + animation->disconnect_compat("changed", this, "_animation_changed"); animation = p_animation; if (animation.is_valid()) - animation->connect("changed", this, "_animation_changed"); + animation->connect_compat("changed", this, "_animation_changed"); } void AnimationCache::_bind_methods() { diff --git a/scene/animation/animation_cache.h b/scene/animation/animation_cache.h index 26ad9dfee5..e73b9e2498 100644 --- a/scene/animation/animation_cache.h +++ b/scene/animation/animation_cache.h @@ -79,7 +79,7 @@ protected: public: void set_track_transform(int p_idx, const Transform &p_transform); void set_track_value(int p_idx, const Variant &p_value); - void call_track(int p_idx, const StringName &p_method, const Variant **p_args, int p_argcount, Variant::CallError &r_error); + void call_track(int p_idx, const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error); void set_all(float p_time, float p_delta = 0); diff --git a/scene/animation/animation_node_state_machine.cpp b/scene/animation/animation_node_state_machine.cpp index 59d0d9e87f..9c7dd7cdd7 100644 --- a/scene/animation/animation_node_state_machine.cpp +++ b/scene/animation/animation_node_state_machine.cpp @@ -120,8 +120,8 @@ void AnimationNodeStateMachineTransition::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::INT, "switch_mode", PROPERTY_HINT_ENUM, "Immediate,Sync,AtEnd"), "set_switch_mode", "get_switch_mode"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "auto_advance"), "set_auto_advance", "has_auto_advance"); - ADD_PROPERTY(PropertyInfo(Variant::STRING, "advance_condition"), "set_advance_condition", "get_advance_condition"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "xfade_time", PROPERTY_HINT_RANGE, "0,240,0.01"), "set_xfade_time", "get_xfade_time"); + ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "advance_condition"), "set_advance_condition", "get_advance_condition"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "xfade_time", PROPERTY_HINT_RANGE, "0,240,0.01"), "set_xfade_time", "get_xfade_time"); ADD_PROPERTY(PropertyInfo(Variant::INT, "priority", PROPERTY_HINT_RANGE, "0,32,1"), "set_priority", "get_priority"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "disabled"), "set_disabled", "is_disabled"); @@ -562,7 +562,7 @@ void AnimationNodeStateMachine::add_node(const StringName &p_name, Ref<Animation emit_changed(); emit_signal("tree_changed"); - p_node->connect("tree_changed", this, "_tree_changed", varray(), CONNECT_REFERENCE_COUNTED); + p_node->connect_compat("tree_changed", this, "_tree_changed", varray(), CONNECT_REFERENCE_COUNTED); } Ref<AnimationNode> AnimationNodeStateMachine::get_node(const StringName &p_name) const { @@ -611,7 +611,7 @@ void AnimationNodeStateMachine::remove_node(const StringName &p_name) { ERR_FAIL_COND(node.is_null()); - node->disconnect("tree_changed", this, "_tree_changed"); + node->disconnect_compat("tree_changed", this, "_tree_changed"); } states.erase(p_name); @@ -619,7 +619,7 @@ void AnimationNodeStateMachine::remove_node(const StringName &p_name) { for (int i = 0; i < transitions.size(); i++) { if (transitions[i].from == p_name || transitions[i].to == p_name) { - transitions.write[i].transition->disconnect("advance_condition_changed", this, "_tree_changed"); + transitions.write[i].transition->disconnect_compat("advance_condition_changed", this, "_tree_changed"); transitions.remove(i); i--; } @@ -722,7 +722,7 @@ void AnimationNodeStateMachine::add_transition(const StringName &p_from, const S tr.to = p_to; tr.transition = p_transition; - tr.transition->connect("advance_condition_changed", this, "_tree_changed", varray(), CONNECT_REFERENCE_COUNTED); + tr.transition->connect_compat("advance_condition_changed", this, "_tree_changed", varray(), CONNECT_REFERENCE_COUNTED); transitions.push_back(tr); } @@ -750,7 +750,7 @@ void AnimationNodeStateMachine::remove_transition(const StringName &p_from, cons for (int i = 0; i < transitions.size(); i++) { if (transitions[i].from == p_from && transitions[i].to == p_to) { - transitions.write[i].transition->disconnect("advance_condition_changed", this, "_tree_changed"); + transitions.write[i].transition->disconnect_compat("advance_condition_changed", this, "_tree_changed"); transitions.remove(i); return; } @@ -764,7 +764,7 @@ void AnimationNodeStateMachine::remove_transition(const StringName &p_from, cons void AnimationNodeStateMachine::remove_transition_by_index(int p_transition) { ERR_FAIL_INDEX(p_transition, transitions.size()); - transitions.write[p_transition].transition->disconnect("advance_condition_changed", this, "_tree_changed"); + transitions.write[p_transition].transition->disconnect_compat("advance_condition_changed", this, "_tree_changed"); transitions.remove(p_transition); /*if (playing) { path.clear(); @@ -926,8 +926,8 @@ void AnimationNodeStateMachine::_get_property_list(List<PropertyInfo> *p_list) c } p_list->push_back(PropertyInfo(Variant::ARRAY, "transitions", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR)); - p_list->push_back(PropertyInfo(Variant::STRING, "start_node", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR)); - p_list->push_back(PropertyInfo(Variant::STRING, "end_node", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR)); + p_list->push_back(PropertyInfo(Variant::STRING_NAME, "start_node", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR)); + p_list->push_back(PropertyInfo(Variant::STRING_NAME, "end_node", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR)); p_list->push_back(PropertyInfo(Variant::VECTOR2, "graph_offset", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR)); } diff --git a/scene/animation/animation_player.cpp b/scene/animation/animation_player.cpp index 740dad9a1a..481a4a9958 100644 --- a/scene/animation/animation_player.cpp +++ b/scene/animation/animation_player.cpp @@ -106,7 +106,7 @@ bool AnimationPlayer::_get(const StringName &p_name, Variant &r_ret) const { } else if (name.begins_with("anims/")) { String which = name.get_slicec('/', 1); - r_ret = get_animation(which).get_ref_ptr(); + r_ret = get_animation(which); } else if (name.begins_with("next/")) { @@ -263,8 +263,8 @@ void AnimationPlayer::_ensure_node_caches(AnimationData *p_anim) { } { - if (!child->is_connected("tree_exiting", this, "_node_removed")) - child->connect("tree_exiting", this, "_node_removed", make_binds(child), CONNECT_ONESHOT); + if (!child->is_connected_compat("tree_exiting", this, "_node_removed")) + child->connect_compat("tree_exiting", this, "_node_removed", make_binds(child), CONNECT_ONESHOT); } TrackNodeCacheKey key; @@ -1007,12 +1007,12 @@ void AnimationPlayer::remove_animation(const StringName &p_name) { void AnimationPlayer::_ref_anim(const Ref<Animation> &p_anim) { - Ref<Animation>(p_anim)->connect(SceneStringNames::get_singleton()->tracks_changed, this, "_animation_changed", varray(), CONNECT_REFERENCE_COUNTED); + Ref<Animation>(p_anim)->connect_compat(SceneStringNames::get_singleton()->tracks_changed, this, "_animation_changed", varray(), CONNECT_REFERENCE_COUNTED); } void AnimationPlayer::_unref_anim(const Ref<Animation> &p_anim) { - Ref<Animation>(p_anim)->disconnect(SceneStringNames::get_singleton()->tracks_changed, this, "_animation_changed"); + Ref<Animation>(p_anim)->disconnect_compat(SceneStringNames::get_singleton()->tracks_changed, this, "_animation_changed"); } void AnimationPlayer::rename_animation(const StringName &p_name, const StringName &p_new_name) { @@ -1129,8 +1129,8 @@ void AnimationPlayer::queue(const StringName &p_name) { queued.push_back(p_name); } -PoolVector<String> AnimationPlayer::get_queue() { - PoolVector<String> ret; +Vector<String> AnimationPlayer::get_queue() { + Vector<String> ret; for (List<StringName>::Element *E = queued.front(); E; E = E->next()) { ret.push_back(E->get()); } @@ -1682,22 +1682,22 @@ void AnimationPlayer::_bind_methods() { ClassDB::bind_method(D_METHOD("advance", "delta"), &AnimationPlayer::advance); ADD_PROPERTY(PropertyInfo(Variant::NODE_PATH, "root_node"), "set_root", "get_root"); - ADD_PROPERTY(PropertyInfo(Variant::STRING, "current_animation", PROPERTY_HINT_ENUM, "", PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_ANIMATE_AS_TRIGGER), "set_current_animation", "get_current_animation"); - ADD_PROPERTY(PropertyInfo(Variant::STRING, "assigned_animation", PROPERTY_HINT_NONE, "", 0), "set_assigned_animation", "get_assigned_animation"); - ADD_PROPERTY(PropertyInfo(Variant::STRING, "autoplay", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_autoplay", "get_autoplay"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "current_animation_length", PROPERTY_HINT_NONE, "", 0), "", "get_current_animation_length"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "current_animation_position", PROPERTY_HINT_NONE, "", 0), "", "get_current_animation_position"); + ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "current_animation", PROPERTY_HINT_ENUM, "", PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_ANIMATE_AS_TRIGGER), "set_current_animation", "get_current_animation"); + ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "assigned_animation", PROPERTY_HINT_NONE, "", 0), "set_assigned_animation", "get_assigned_animation"); + ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "autoplay", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_autoplay", "get_autoplay"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "current_animation_length", PROPERTY_HINT_NONE, "", 0), "", "get_current_animation_length"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "current_animation_position", PROPERTY_HINT_NONE, "", 0), "", "get_current_animation_position"); ADD_GROUP("Playback Options", "playback_"); ADD_PROPERTY(PropertyInfo(Variant::INT, "playback_process_mode", PROPERTY_HINT_ENUM, "Physics,Idle,Manual"), "set_animation_process_mode", "get_animation_process_mode"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "playback_default_blend_time", PROPERTY_HINT_RANGE, "0,4096,0.01"), "set_default_blend_time", "get_default_blend_time"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "playback_default_blend_time", PROPERTY_HINT_RANGE, "0,4096,0.01"), "set_default_blend_time", "get_default_blend_time"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "playback_active", PROPERTY_HINT_NONE, "", 0), "set_active", "is_active"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "playback_speed", PROPERTY_HINT_RANGE, "-64,64,0.01"), "set_speed_scale", "get_speed_scale"); + 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_SIGNAL(MethodInfo("animation_finished", PropertyInfo(Variant::STRING, "anim_name"))); - ADD_SIGNAL(MethodInfo("animation_changed", PropertyInfo(Variant::STRING, "old_name"), PropertyInfo(Variant::STRING, "new_name"))); - ADD_SIGNAL(MethodInfo("animation_started", PropertyInfo(Variant::STRING, "anim_name"))); + 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"))); ADD_SIGNAL(MethodInfo("caches_cleared")); BIND_ENUM_CONSTANT(ANIMATION_PROCESS_PHYSICS); diff --git a/scene/animation/animation_player.h b/scene/animation/animation_player.h index 48829b02b9..24f60363ed 100644 --- a/scene/animation/animation_player.h +++ b/scene/animation/animation_player.h @@ -264,11 +264,11 @@ private: void _stop_playing_caches(); // bind helpers - PoolVector<String> _get_animation_list() const { + Vector<String> _get_animation_list() const { List<StringName> animations; get_animation_list(&animations); - PoolVector<String> ret; + Vector<String> ret; while (animations.size()) { ret.push_back(animations.front()->get()); @@ -316,7 +316,7 @@ public: void play(const StringName &p_name = StringName(), float p_custom_blend = -1, float p_custom_scale = 1.0, bool p_from_end = false); void play_backwards(const StringName &p_name = StringName(), float p_custom_blend = -1); void queue(const StringName &p_name); - PoolVector<String> get_queue(); + Vector<String> get_queue(); void clear_queue(); void stop(bool p_reset = true); bool is_playing() const; diff --git a/scene/animation/animation_tree.cpp b/scene/animation/animation_tree.cpp index a08cc0927b..7117b3f5ac 100644 --- a/scene/animation/animation_tree.cpp +++ b/scene/animation/animation_tree.cpp @@ -433,13 +433,13 @@ void AnimationNode::_bind_methods() { BIND_VMETHOD(MethodInfo(Variant::ARRAY, "get_parameter_list")); BIND_VMETHOD(MethodInfo(Variant::OBJECT, "get_child_by_name", PropertyInfo(Variant::STRING, "name"))); { - MethodInfo mi = MethodInfo(Variant::NIL, "get_parameter_default_value", PropertyInfo(Variant::STRING, "name")); + MethodInfo mi = MethodInfo(Variant::NIL, "get_parameter_default_value", PropertyInfo(Variant::STRING_NAME, "name")); mi.return_val.usage = PROPERTY_USAGE_NIL_IS_VARIANT; BIND_VMETHOD(mi); } - BIND_VMETHOD(MethodInfo("process", PropertyInfo(Variant::REAL, "time"), PropertyInfo(Variant::BOOL, "seek"))); + BIND_VMETHOD(MethodInfo("process", PropertyInfo(Variant::FLOAT, "time"), PropertyInfo(Variant::BOOL, "seek"))); BIND_VMETHOD(MethodInfo(Variant::STRING, "get_caption")); - BIND_VMETHOD(MethodInfo(Variant::STRING, "has_filter")); + BIND_VMETHOD(MethodInfo(Variant::BOOL, "has_filter")); ADD_SIGNAL(MethodInfo("removed_from_graph")); @@ -463,13 +463,13 @@ AnimationNode::AnimationNode() { void AnimationTree::set_tree_root(const Ref<AnimationNode> &p_root) { if (root.is_valid()) { - root->disconnect("tree_changed", this, "_tree_changed"); + root->disconnect_compat("tree_changed", this, "_tree_changed"); } root = p_root; if (root.is_valid()) { - root->connect("tree_changed", this, "_tree_changed"); + root->connect_compat("tree_changed", this, "_tree_changed"); } properties_dirty = true; @@ -582,8 +582,8 @@ bool AnimationTree::_update_caches(AnimationPlayer *player) { continue; } - if (!child->is_connected("tree_exited", this, "_node_removed")) { - child->connect("tree_exited", this, "_node_removed", varray(child)); + if (!child->is_connected_compat("tree_exited", this, "_node_removed")) { + child->connect_compat("tree_exited", this, "_node_removed", varray(child)); } switch (track_type) { @@ -778,12 +778,12 @@ void AnimationTree::_process_graph(float p_delta) { if (last_animation_player.is_valid()) { Object *old_player = ObjectDB::get_instance(last_animation_player); if (old_player) { - old_player->disconnect("caches_cleared", this, "_clear_caches"); + old_player->disconnect_compat("caches_cleared", this, "_clear_caches"); } } if (player) { - player->connect("caches_cleared", this, "_clear_caches"); + player->connect_compat("caches_cleared", this, "_clear_caches"); } last_animation_player = current_animation_player; @@ -1300,7 +1300,7 @@ void AnimationTree::_notification(int p_what) { Object *player = ObjectDB::get_instance(last_animation_player); if (player) { - player->disconnect("caches_cleared", this, "_clear_caches"); + player->disconnect_compat("caches_cleared", this, "_clear_caches"); } } } else if (p_what == NOTIFICATION_ENTER_TREE) { @@ -1308,7 +1308,7 @@ void AnimationTree::_notification(int p_what) { Object *player = ObjectDB::get_instance(last_animation_player); if (player) { - player->connect("caches_cleared", this, "_clear_caches"); + player->connect_compat("caches_cleared", this, "_clear_caches"); } } } diff --git a/scene/animation/root_motion_view.cpp b/scene/animation/root_motion_view.cpp index fe062e0a20..ce9b8bd213 100644 --- a/scene/animation/root_motion_view.cpp +++ b/scene/animation/root_motion_view.cpp @@ -164,8 +164,8 @@ AABB RootMotionView::get_aabb() const { return AABB(Vector3(-radius, 0, -radius), Vector3(radius * 2, 0.001, radius * 2)); } -PoolVector<Face3> RootMotionView::get_faces(uint32_t p_usage_flags) const { - return PoolVector<Face3>(); +Vector<Face3> RootMotionView::get_faces(uint32_t p_usage_flags) const { + return Vector<Face3>(); } void RootMotionView::_bind_methods() { @@ -187,8 +187,8 @@ void RootMotionView::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::NODE_PATH, "animation_path", PROPERTY_HINT_NODE_PATH_VALID_TYPES, "AnimationTree"), "set_animation_path", "get_animation_path"); ADD_PROPERTY(PropertyInfo(Variant::COLOR, "color"), "set_color", "get_color"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "cell_size", PROPERTY_HINT_RANGE, "0.1,16,0.01,or_greater"), "set_cell_size", "get_cell_size"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "radius", PROPERTY_HINT_RANGE, "0.1,16,0.01,or_greater"), "set_radius", "get_radius"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "cell_size", PROPERTY_HINT_RANGE, "0.1,16,0.01,or_greater"), "set_cell_size", "get_cell_size"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "radius", PROPERTY_HINT_RANGE, "0.1,16,0.01,or_greater"), "set_radius", "get_radius"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "zero_y"), "set_zero_y", "get_zero_y"); } diff --git a/scene/animation/root_motion_view.h b/scene/animation/root_motion_view.h index 0a255cb5d2..42950dde42 100644 --- a/scene/animation/root_motion_view.h +++ b/scene/animation/root_motion_view.h @@ -69,7 +69,7 @@ public: bool get_zero_y() const; virtual AABB get_aabb() const; - virtual PoolVector<Face3> get_faces(uint32_t p_usage_flags) const; + virtual Vector<Face3> get_faces(uint32_t p_usage_flags) const; RootMotionView(); ~RootMotionView(); diff --git a/scene/animation/skeleton_ik.cpp b/scene/animation/skeleton_ik.cpp index 518c243dd0..5cdb38b5c2 100644 --- a/scene/animation/skeleton_ik.cpp +++ b/scene/animation/skeleton_ik.cpp @@ -390,15 +390,15 @@ void SkeletonIK::_bind_methods() { ClassDB::bind_method(D_METHOD("start", "one_time"), &SkeletonIK::start, DEFVAL(false)); ClassDB::bind_method(D_METHOD("stop"), &SkeletonIK::stop); - ADD_PROPERTY(PropertyInfo(Variant::STRING, "root_bone"), "set_root_bone", "get_root_bone"); - ADD_PROPERTY(PropertyInfo(Variant::STRING, "tip_bone"), "set_tip_bone", "get_tip_bone"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "interpolation", PROPERTY_HINT_RANGE, "0,1,0.001"), "set_interpolation", "get_interpolation"); + ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "root_bone"), "set_root_bone", "get_root_bone"); + ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "tip_bone"), "set_tip_bone", "get_tip_bone"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "interpolation", PROPERTY_HINT_RANGE, "0,1,0.001"), "set_interpolation", "get_interpolation"); ADD_PROPERTY(PropertyInfo(Variant::TRANSFORM, "target"), "set_target_transform", "get_target_transform"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "override_tip_basis"), "set_override_tip_basis", "is_override_tip_basis"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "use_magnet"), "set_use_magnet", "is_using_magnet"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "magnet"), "set_magnet_position", "get_magnet_position"); ADD_PROPERTY(PropertyInfo(Variant::NODE_PATH, "target_node"), "set_target_node", "get_target_node"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "min_distance"), "set_min_distance", "get_min_distance"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "min_distance"), "set_min_distance", "get_min_distance"); ADD_PROPERTY(PropertyInfo(Variant::INT, "max_iterations"), "set_max_iterations", "get_max_iterations"); } diff --git a/scene/animation/tween.cpp b/scene/animation/tween.cpp index 331a6c769c..4b8b537d43 100644 --- a/scene/animation/tween.cpp +++ b/scene/animation/tween.cpp @@ -67,7 +67,6 @@ void Tween::_add_pending_command(StringName p_key, const Variant &p_arg1, const count = 0; // Add the specified arguments to the command - // TODO: Make this a switch statement? if (count > 0) cmd.arg[0] = p_arg1; if (count > 1) @@ -97,7 +96,7 @@ void Tween::_process_pending_commands() { // Get the command PendingCommand &cmd = E->get(); - Variant::CallError err; + Callable::CallError err; // Grab all of the arguments for the command Variant *arg[10] = { @@ -157,7 +156,7 @@ void Tween::_get_property_list(List<PropertyInfo> *p_list) const { // Add the property info for the Tween object p_list->push_back(PropertyInfo(Variant::BOOL, "playback/active", PROPERTY_HINT_NONE, "")); p_list->push_back(PropertyInfo(Variant::BOOL, "playback/repeat", PROPERTY_HINT_NONE, "")); - p_list->push_back(PropertyInfo(Variant::REAL, "playback/speed", PROPERTY_HINT_RANGE, "-64,64,0.01")); + p_list->push_back(PropertyInfo(Variant::FLOAT, "playback/speed", PROPERTY_HINT_RANGE, "-64,64,0.01")); } void Tween::_notification(int p_what) { @@ -250,14 +249,14 @@ void Tween::_bind_methods() { // Add the Tween signals ADD_SIGNAL(MethodInfo("tween_started", PropertyInfo(Variant::OBJECT, "object"), PropertyInfo(Variant::NODE_PATH, "key"))); - ADD_SIGNAL(MethodInfo("tween_step", PropertyInfo(Variant::OBJECT, "object"), PropertyInfo(Variant::NODE_PATH, "key"), PropertyInfo(Variant::REAL, "elapsed"), PropertyInfo(Variant::OBJECT, "value"))); + ADD_SIGNAL(MethodInfo("tween_step", PropertyInfo(Variant::OBJECT, "object"), PropertyInfo(Variant::NODE_PATH, "key"), PropertyInfo(Variant::FLOAT, "elapsed"), PropertyInfo(Variant::OBJECT, "value"))); ADD_SIGNAL(MethodInfo("tween_completed", PropertyInfo(Variant::OBJECT, "object"), PropertyInfo(Variant::NODE_PATH, "key"))); ADD_SIGNAL(MethodInfo("tween_all_completed")); // Add the properties and tie them to the getters and setters ADD_PROPERTY(PropertyInfo(Variant::BOOL, "repeat"), "set_repeat", "is_repeat"); ADD_PROPERTY(PropertyInfo(Variant::INT, "playback_process_mode", PROPERTY_HINT_ENUM, "Physics,Idle"), "set_tween_process_mode", "get_tween_process_mode"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "playback_speed", PROPERTY_HINT_RANGE, "-64,64,0.01"), "set_speed_scale", "get_speed_scale"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "playback_speed", PROPERTY_HINT_RANGE, "-64,64,0.01"), "set_speed_scale", "get_speed_scale"); // Bind Idle vs Physics process BIND_ENUM_CONSTANT(TWEEN_PROCESS_PHYSICS); @@ -309,9 +308,9 @@ Variant Tween::_get_initial_val(const InterpolateData &p_data) const { ERR_FAIL_COND_V(!valid, p_data.initial_val); } else { // Call the method and get the initial value from it - Variant::CallError error; + Callable::CallError error; initial_val = object->call(p_data.target_key[0], NULL, 0, error); - ERR_FAIL_COND_V(error.error != Variant::CallError::CALL_OK, p_data.initial_val); + ERR_FAIL_COND_V(error.error != Callable::CallError::CALL_OK, p_data.initial_val); } return initial_val; } @@ -341,12 +340,12 @@ Variant Tween::_get_final_val(const InterpolateData &p_data) const { ERR_FAIL_COND_V(!valid, p_data.initial_val); } else { // We're looking at a method. Call the method on the target object - Variant::CallError error; + Callable::CallError error; final_val = target->call(p_data.target_key[0], NULL, 0, error); - ERR_FAIL_COND_V(error.error != Variant::CallError::CALL_OK, p_data.initial_val); + ERR_FAIL_COND_V(error.error != Callable::CallError::CALL_OK, p_data.initial_val); } - // If we're looking at an INT value, instead convert it to a REAL + // If we're looking at an INT value, instead convert it to a FLOAT // This is better for interpolation if (final_val.get_type() == Variant::INT) final_val = final_val.operator real_t(); @@ -383,12 +382,12 @@ Variant &Tween::_get_delta_val(InterpolateData &p_data) { ERR_FAIL_COND_V(!valid, p_data.initial_val); } else { // We're looking at a method. Call the method on the target object - Variant::CallError error; + Callable::CallError error; final_val = target->call(p_data.target_key[0], NULL, 0, error); - ERR_FAIL_COND_V(error.error != Variant::CallError::CALL_OK, p_data.initial_val); + ERR_FAIL_COND_V(error.error != Callable::CallError::CALL_OK, p_data.initial_val); } - // If we're looking at an INT value, instead convert it to a REAL + // If we're looking at an INT value, instead convert it to a FLOAT // This is better for interpolation if (final_val.get_type() == Variant::INT) final_val = final_val.operator real_t(); @@ -402,7 +401,7 @@ Variant &Tween::_get_delta_val(InterpolateData &p_data) { // Grab the initial value from the data to calculate delta Variant initial_val = _get_initial_val(p_data); - // If we're looking at an INT value, instead convert it to a REAL + // If we're looking at an INT value, instead convert it to a FLOAT // This is better for interpolation if (initial_val.get_type() == Variant::INT) initial_val = initial_val.operator real_t(); @@ -441,8 +440,8 @@ Variant Tween::_run_equation(InterpolateData &p_data) { result = (int)_run_equation(p_data.trans_type, p_data.ease_type, p_data.elapsed - p_data.delay, (int)initial_val, (int)delta_val, p_data.duration); break; - case Variant::REAL: - // Run the REAL specific equation + case Variant::FLOAT: + // Run the FLOAT specific equation result = _run_equation(p_data.trans_type, p_data.ease_type, p_data.elapsed - p_data.delay, (real_t)initial_val, (real_t)delta_val, p_data.duration); break; @@ -459,6 +458,20 @@ Variant Tween::_run_equation(InterpolateData &p_data) { result = r; } break; + case Variant::RECT2: { + // Get the Rect2 for initial and delta value + Rect2 i = initial_val; + Rect2 d = delta_val; + Rect2 r; + + // Execute the equation for the position and size of Rect2 + APPLY_EQUATION(position.x); + APPLY_EQUATION(position.y); + APPLY_EQUATION(size.x); + APPLY_EQUATION(size.y); + result = r; + } break; + case Variant::VECTOR3: { // Get vectors for initial and delta values Vector3 i = initial_val; @@ -473,26 +486,6 @@ Variant Tween::_run_equation(InterpolateData &p_data) { result = r; } break; - case Variant::BASIS: { - // Get the basis for initial and delta values - Basis i = initial_val; - Basis d = delta_val; - Basis r; - - // Execute the equation on all the basis and mutate the r basis - // This uses the custom APPLY_EQUATION macro defined above - APPLY_EQUATION(elements[0][0]); - APPLY_EQUATION(elements[0][1]); - APPLY_EQUATION(elements[0][2]); - APPLY_EQUATION(elements[1][0]); - APPLY_EQUATION(elements[1][1]); - APPLY_EQUATION(elements[1][2]); - APPLY_EQUATION(elements[2][0]); - APPLY_EQUATION(elements[2][1]); - APPLY_EQUATION(elements[2][2]); - result = r; - } break; - case Variant::TRANSFORM2D: { // Get the transforms for initial and delta values Transform2D i = initial_val; @@ -509,6 +502,7 @@ Variant Tween::_run_equation(InterpolateData &p_data) { APPLY_EQUATION(elements[2][1]); result = r; } break; + case Variant::QUAT: { // Get the quaternian for the initial and delta values Quat i = initial_val; @@ -523,6 +517,7 @@ Variant Tween::_run_equation(InterpolateData &p_data) { APPLY_EQUATION(w); result = r; } break; + case Variant::AABB: { // Get the AABB's for the initial and delta values AABB i = initial_val; @@ -539,6 +534,27 @@ Variant Tween::_run_equation(InterpolateData &p_data) { APPLY_EQUATION(size.z); result = r; } break; + + case Variant::BASIS: { + // Get the basis for initial and delta values + Basis i = initial_val; + Basis d = delta_val; + Basis r; + + // Execute the equation on all the basis and mutate the r basis + // This uses the custom APPLY_EQUATION macro defined above + APPLY_EQUATION(elements[0][0]); + APPLY_EQUATION(elements[0][1]); + APPLY_EQUATION(elements[0][2]); + APPLY_EQUATION(elements[1][0]); + APPLY_EQUATION(elements[1][1]); + APPLY_EQUATION(elements[1][2]); + APPLY_EQUATION(elements[2][0]); + APPLY_EQUATION(elements[2][1]); + APPLY_EQUATION(elements[2][2]); + result = r; + } break; + case Variant::TRANSFORM: { // Get the transforms for the initial and delta values Transform i = initial_val; @@ -561,6 +577,7 @@ Variant Tween::_run_equation(InterpolateData &p_data) { APPLY_EQUATION(origin.z); result = r; } break; + case Variant::COLOR: { // Get the Color for initial and delta value Color i = initial_val; @@ -575,6 +592,7 @@ Variant Tween::_run_equation(InterpolateData &p_data) { APPLY_EQUATION(a); result = r; } break; + default: { // If unknown, just return the initial value result = initial_val; @@ -607,7 +625,7 @@ bool Tween::_apply_tween_value(InterpolateData &p_data, Variant &value) { case FOLLOW_METHOD: case TARGETING_METHOD: { // We want to call the method on the target object - Variant::CallError error; + Callable::CallError error; // Do we have a non-nil value passed in? if (value.get_type() != Variant::NIL) { @@ -620,7 +638,7 @@ bool Tween::_apply_tween_value(InterpolateData &p_data, Variant &value) { } // Did we get an error from the function call? - return error.error == Variant::CallError::CALL_OK; + return error.error == Callable::CallError::CALL_OK; } case INTER_CALLBACK: @@ -732,7 +750,7 @@ void Tween::_tween_process(float p_delta) { } } else { // Call the function directly with the arguments - Variant::CallError error; + Callable::CallError error; Variant *arg[5] = { &data.arg[0], &data.arg[1], @@ -1119,8 +1137,8 @@ bool Tween::_calc_delta_val(const Variant &p_initial_val, const Variant &p_final delta_val = (int)final_val - (int)initial_val; break; - case Variant::REAL: - // Convert to REAL and find the delta + case Variant::FLOAT: + // Convert to FLOAT and find the delta delta_val = (real_t)final_val - (real_t)initial_val; break; @@ -1129,26 +1147,18 @@ bool Tween::_calc_delta_val(const Variant &p_initial_val, const Variant &p_final delta_val = final_val.operator Vector2() - initial_val.operator Vector2(); break; + case Variant::RECT2: { + // Build a new Rect2 and use the new position and sizes to make a delta + Rect2 i = initial_val; + Rect2 f = final_val; + delta_val = Rect2(f.position - i.position, f.size - i.size); + } break; + case Variant::VECTOR3: // Convert to Vectors and find the delta delta_val = final_val.operator Vector3() - initial_val.operator Vector3(); break; - case Variant::BASIS: { - // Build a new basis which is the delta between the initial and final values - Basis i = initial_val; - Basis f = final_val; - delta_val = Basis(f.elements[0][0] - i.elements[0][0], - f.elements[0][1] - i.elements[0][1], - f.elements[0][2] - i.elements[0][2], - f.elements[1][0] - i.elements[1][0], - f.elements[1][1] - i.elements[1][1], - f.elements[1][2] - i.elements[1][2], - f.elements[2][0] - i.elements[2][0], - f.elements[2][1] - i.elements[2][1], - f.elements[2][2] - i.elements[2][2]); - } break; - case Variant::TRANSFORM2D: { // Build a new transform which is the difference between the initial and final values Transform2D i = initial_val; @@ -1175,6 +1185,21 @@ bool Tween::_calc_delta_val(const Variant &p_initial_val, const Variant &p_final delta_val = AABB(f.position - i.position, f.size - i.size); } break; + case Variant::BASIS: { + // Build a new basis which is the delta between the initial and final values + Basis i = initial_val; + Basis f = final_val; + delta_val = Basis(f.elements[0][0] - i.elements[0][0], + f.elements[0][1] - i.elements[0][1], + f.elements[0][2] - i.elements[0][2], + f.elements[1][0] - i.elements[1][0], + f.elements[1][1] - i.elements[1][1], + f.elements[1][2] - i.elements[1][2], + f.elements[2][0] - i.elements[2][0], + f.elements[2][1] - i.elements[2][1], + f.elements[2][2] - i.elements[2][2]); + } break; + case Variant::TRANSFORM: { // Build a new transform which is the difference between the initial and final values Transform i = initial_val; @@ -1203,10 +1228,34 @@ bool Tween::_calc_delta_val(const Variant &p_initial_val, const Variant &p_final delta_val = Color(f.r - i.r, f.g - i.g, f.b - i.b, f.a - i.a); } break; - default: - // TODO: Should move away from a 'magic string'? - ERR_PRINT("Invalid param type, except(int/real/vector2/vector/matrix/matrix32/quat/aabb/transform/color)"); + default: { + static Variant::Type supported_types[] = { + Variant::BOOL, + Variant::INT, + Variant::FLOAT, + Variant::VECTOR2, + Variant::RECT2, + Variant::VECTOR3, + Variant::TRANSFORM2D, + Variant::QUAT, + Variant::AABB, + Variant::BASIS, + Variant::TRANSFORM, + Variant::COLOR, + }; + + int length = *(&supported_types + 1) - supported_types; + String error_msg = "Invalid parameter type. Supported types are: "; + for (int i = 0; i < length; i++) { + if (i != 0) { + error_msg += ", "; + } + error_msg += Variant::get_type_name(supported_types[i]); + } + error_msg += "."; + ERR_PRINT(error_msg); return false; + } }; return true; } @@ -1227,7 +1276,6 @@ bool Tween::_build_interpolation(InterpolateType p_interpolation_type, Object *p // Give it the object ERR_FAIL_COND_V_MSG(p_object == NULL, false, "Invalid object provided to Tween."); - ERR_FAIL_COND_V_MSG(!ObjectDB::instance_validate(p_object), false, "Invalid object provided to Tween."); data.id = p_object->get_instance_id(); // Validate the initial and final values @@ -1328,7 +1376,6 @@ bool Tween::interpolate_callback(Object *p_object, real_t p_duration, String p_c // Check that the target object is valid ERR_FAIL_COND_V(p_object == NULL, false); - ERR_FAIL_COND_V(!ObjectDB::instance_validate(p_object), false); // Duration cannot be negative ERR_FAIL_COND_V(p_duration < 0, false); @@ -1387,7 +1434,6 @@ bool Tween::interpolate_deferred_callback(Object *p_object, real_t p_duration, S // Check that the target object is valid ERR_FAIL_COND_V(p_object == NULL, false); - ERR_FAIL_COND_V(!ObjectDB::instance_validate(p_object), false); // No negative durations allowed ERR_FAIL_COND_V(p_duration < 0, false); @@ -1452,14 +1498,12 @@ bool Tween::follow_property(Object *p_object, NodePath p_property, Variant p_ini // TODO: Is this documented? It's really helpful for decluttering tweens if (p_initial_val.get_type() == Variant::NIL) p_initial_val = p_object->get_indexed(p_property.get_subnames()); - // Convert initial INT values to REAL as they are better for interpolation + // Convert initial INT values to FLOAT as they are better for interpolation if (p_initial_val.get_type() == Variant::INT) p_initial_val = p_initial_val.operator real_t(); // Confirm the source and target objects are valid ERR_FAIL_COND_V(p_object == NULL, false); - ERR_FAIL_COND_V(!ObjectDB::instance_validate(p_object), false); ERR_FAIL_COND_V(p_target == NULL, false); - ERR_FAIL_COND_V(!ObjectDB::instance_validate(p_target), false); // No negative durations ERR_FAIL_COND_V(p_duration < 0, false); @@ -1480,7 +1524,7 @@ bool Tween::follow_property(Object *p_object, NodePath p_property, Variant p_ini Variant target_val = p_target->get_indexed(p_target_property.get_subnames(), &target_prop_valid); ERR_FAIL_COND_V(!target_prop_valid, false); - // Convert target INT to REAL since it is better for interpolation + // Convert target INT to FLOAT since it is better for interpolation if (target_val.get_type() == Variant::INT) target_val = target_val.operator real_t(); // Verify that the target value and initial value are the same type @@ -1516,14 +1560,12 @@ bool Tween::follow_method(Object *p_object, StringName p_method, Variant p_initi _add_pending_command("follow_method", p_object, p_method, p_initial_val, p_target, p_target_method, p_duration, p_trans_type, p_ease_type, p_delay); return true; } - // Convert initial INT values to REAL as they are better for interpolation + // Convert initial INT values to FLOAT as they are better for interpolation if (p_initial_val.get_type() == Variant::INT) p_initial_val = p_initial_val.operator real_t(); // Verify the source and target objects are valid ERR_FAIL_COND_V(p_object == NULL, false); - ERR_FAIL_COND_V(!ObjectDB::instance_validate(p_object), false); ERR_FAIL_COND_V(p_target == NULL, false); - ERR_FAIL_COND_V(!ObjectDB::instance_validate(p_target), false); // No negative durations ERR_FAIL_COND_V(p_duration < 0, false); @@ -1540,11 +1582,11 @@ bool Tween::follow_method(Object *p_object, StringName p_method, Variant p_initi ERR_FAIL_COND_V_MSG(!p_target->has_method(p_target_method), false, "Target has no method named: " + p_target_method + "."); // Call the method to get the target value - Variant::CallError error; + Callable::CallError error; Variant target_val = p_target->call(p_target_method, NULL, 0, error); - ERR_FAIL_COND_V(error.error != Variant::CallError::CALL_OK, false); + ERR_FAIL_COND_V(error.error != Callable::CallError::CALL_OK, false); - // Convert target INT values to REAL as they are better for interpolation + // Convert target INT values to FLOAT as they are better for interpolation if (target_val.get_type() == Variant::INT) target_val = target_val.operator real_t(); ERR_FAIL_COND_V(target_val.get_type() != p_initial_val.get_type(), false); @@ -1582,14 +1624,12 @@ bool Tween::targeting_property(Object *p_object, NodePath p_property, Object *p_ p_property = p_property.get_as_property_path(); p_initial_property = p_initial_property.get_as_property_path(); - // Convert the initial INT values to REAL as they are better for Interpolation + // Convert the initial INT values to FLOAT as they are better for Interpolation if (p_final_val.get_type() == Variant::INT) p_final_val = p_final_val.operator real_t(); // Verify both objects are valid ERR_FAIL_COND_V(p_object == NULL, false); - ERR_FAIL_COND_V(!ObjectDB::instance_validate(p_object), false); ERR_FAIL_COND_V(p_initial == NULL, false); - ERR_FAIL_COND_V(!ObjectDB::instance_validate(p_initial), false); // No negative durations ERR_FAIL_COND_V(p_duration < 0, false); @@ -1610,7 +1650,7 @@ bool Tween::targeting_property(Object *p_object, NodePath p_property, Object *p_ Variant initial_val = p_initial->get_indexed(p_initial_property.get_subnames(), &initial_prop_valid); ERR_FAIL_COND_V(!initial_prop_valid, false); - // Convert the initial INT value to REAL as it is better for interpolation + // Convert the initial INT value to FLOAT as it is better for interpolation if (initial_val.get_type() == Variant::INT) initial_val = initial_val.operator real_t(); ERR_FAIL_COND_V(initial_val.get_type() != p_final_val.get_type(), false); @@ -1650,14 +1690,12 @@ bool Tween::targeting_method(Object *p_object, StringName p_method, Object *p_in return true; } - // Convert final INT values to REAL as they are better for interpolation + // Convert final INT values to FLOAT as they are better for interpolation if (p_final_val.get_type() == Variant::INT) p_final_val = p_final_val.operator real_t(); // Make sure the given objects are valid ERR_FAIL_COND_V(p_object == NULL, false); - ERR_FAIL_COND_V(!ObjectDB::instance_validate(p_object), false); ERR_FAIL_COND_V(p_initial == NULL, false); - ERR_FAIL_COND_V(!ObjectDB::instance_validate(p_initial), false); // No negative durations ERR_FAIL_COND_V(p_duration < 0, false); @@ -1674,11 +1712,11 @@ bool Tween::targeting_method(Object *p_object, StringName p_method, Object *p_in ERR_FAIL_COND_V_MSG(!p_initial->has_method(p_initial_method), false, "Initial Object has no method named: " + p_initial_method + "."); // Call the method to get the initial value - Variant::CallError error; + Callable::CallError error; Variant initial_val = p_initial->call(p_initial_method, NULL, 0, error); - ERR_FAIL_COND_V(error.error != Variant::CallError::CALL_OK, false); + ERR_FAIL_COND_V(error.error != Callable::CallError::CALL_OK, false); - // Convert initial INT values to REAL as they aer better for interpolation + // Convert initial INT values to FLOAT as they aer better for interpolation if (initial_val.get_type() == Variant::INT) initial_val = initial_val.operator real_t(); ERR_FAIL_COND_V(initial_val.get_type() != p_final_val.get_type(), false); diff --git a/scene/audio/audio_stream_player.cpp b/scene/audio/audio_stream_player.cpp index 3a0169f065..d738631d3b 100644 --- a/scene/audio/audio_stream_player.cpp +++ b/scene/audio/audio_stream_player.cpp @@ -411,13 +411,13 @@ void AudioStreamPlayer::_bind_methods() { ClassDB::bind_method(D_METHOD("get_stream_playback"), &AudioStreamPlayer::get_stream_playback); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "stream", PROPERTY_HINT_RESOURCE_TYPE, "AudioStream"), "set_stream", "get_stream"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "volume_db", PROPERTY_HINT_RANGE, "-80,24"), "set_volume_db", "get_volume_db"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "pitch_scale", PROPERTY_HINT_RANGE, "0.01,32,0.01"), "set_pitch_scale", "get_pitch_scale"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "volume_db", PROPERTY_HINT_RANGE, "-80,24"), "set_volume_db", "get_volume_db"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "pitch_scale", PROPERTY_HINT_RANGE, "0.01,4,0.01,or_greater"), "set_pitch_scale", "get_pitch_scale"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "playing", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR), "_set_playing", "is_playing"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "autoplay"), "set_autoplay", "is_autoplay_enabled"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "stream_paused", PROPERTY_HINT_NONE, ""), "set_stream_paused", "get_stream_paused"); ADD_PROPERTY(PropertyInfo(Variant::INT, "mix_target", PROPERTY_HINT_ENUM, "Stereo,Surround,Center"), "set_mix_target", "get_mix_target"); - ADD_PROPERTY(PropertyInfo(Variant::STRING, "bus", PROPERTY_HINT_ENUM, ""), "set_bus", "get_bus"); + ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "bus", PROPERTY_HINT_ENUM, ""), "set_bus", "get_bus"); ADD_SIGNAL(MethodInfo("finished")); @@ -441,7 +441,7 @@ AudioStreamPlayer::AudioStreamPlayer() { setstop = false; use_fadeout = false; - AudioServer::get_singleton()->connect("bus_layout_changed", this, "_bus_layout_changed"); + AudioServer::get_singleton()->connect_compat("bus_layout_changed", this, "_bus_layout_changed"); } AudioStreamPlayer::~AudioStreamPlayer() { diff --git a/scene/debugger/scene_debugger.cpp b/scene/debugger/scene_debugger.cpp new file mode 100644 index 0000000000..22ff0611a7 --- /dev/null +++ b/scene/debugger/scene_debugger.cpp @@ -0,0 +1,871 @@ +/*************************************************************************/ +/* scene_debugger.cpp */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* https://godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 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_debugger.h" + +#include "core/io/marshalls.h" +#include "core/script_debugger_remote.h" +#include "scene/main/scene_tree.h" +#include "scene/main/viewport.h" +#include "scene/resources/packed_scene.h" + +void SceneDebugger::initialize() { +#ifdef DEBUG_ENABLED + LiveEditor::singleton = memnew(LiveEditor); + ScriptDebuggerRemote::scene_tree_parse_func = SceneDebugger::parse_message; +#endif +} + +void SceneDebugger::deinitialize() { +#ifdef DEBUG_ENABLED + if (LiveEditor::singleton) { + memdelete(LiveEditor::singleton); + LiveEditor::singleton = NULL; + } +#endif +} + +#ifdef DEBUG_ENABLED +Error SceneDebugger::parse_message(const String &p_msg, const Array &p_args) { + SceneTree *scene_tree = SceneTree::get_singleton(); + if (!scene_tree) + return ERR_UNCONFIGURED; + LiveEditor *live_editor = LiveEditor::get_singleton(); + if (!live_editor) + return ERR_UNCONFIGURED; + if (p_msg == "request_scene_tree") { // Scene tree + live_editor->_send_tree(); + + } else if (p_msg == "save_node") { // Save node. + ERR_FAIL_COND_V(p_args.size() < 2, ERR_INVALID_DATA); + _save_node(p_args[0], p_args[1]); + + } else if (p_msg == "inspect_object") { // Object Inspect + ERR_FAIL_COND_V(p_args.size() < 1, ERR_INVALID_DATA); + ObjectID id = p_args[0]; + _send_object_id(id); + + } else if (p_msg == "override_camera_2D:set") { // Camera + ERR_FAIL_COND_V(p_args.size() < 1, ERR_INVALID_DATA); + bool enforce = p_args[0]; + scene_tree->get_root()->enable_canvas_transform_override(enforce); + + } else if (p_msg == "override_camera_2D:transform") { + ERR_FAIL_COND_V(p_args.size() < 1, ERR_INVALID_DATA); + Transform2D transform = p_args[1]; + scene_tree->get_root()->set_canvas_transform_override(transform); + + } else if (p_msg == "override_camera_3D:set") { + ERR_FAIL_COND_V(p_args.size() < 1, ERR_INVALID_DATA); + bool enable = p_args[0]; + scene_tree->get_root()->enable_camera_override(enable); + + } else if (p_msg == "override_camera_3D:transform") { + ERR_FAIL_COND_V(p_args.size() < 5, ERR_INVALID_DATA); + Transform transform = p_args[0]; + bool is_perspective = p_args[1]; + float size_or_fov = p_args[2]; + float near = p_args[3]; + float far = p_args[4]; + if (is_perspective) { + scene_tree->get_root()->set_camera_override_perspective(size_or_fov, near, far); + } else { + scene_tree->get_root()->set_camera_override_orthogonal(size_or_fov, near, far); + } + scene_tree->get_root()->set_camera_override_transform(transform); + + } else if (p_msg == "set_object_property") { + ERR_FAIL_COND_V(p_args.size() < 3, ERR_INVALID_DATA); + _set_object_property(p_args[0], p_args[1], p_args[2]); + + } else if (!p_msg.begins_with("live_")) { // Live edits below. + return ERR_SKIP; + } else if (p_msg == "live_set_root") { + ERR_FAIL_COND_V(p_args.size() < 2, ERR_INVALID_DATA); + live_editor->_root_func(p_args[0], p_args[1]); + + } else if (p_msg == "live_node_path") { + ERR_FAIL_COND_V(p_args.size() < 2, ERR_INVALID_DATA); + live_editor->_node_path_func(p_args[0], p_args[1]); + + } else if (p_msg == "live_res_path") { + ERR_FAIL_COND_V(p_args.size() < 2, ERR_INVALID_DATA); + live_editor->_res_path_func(p_args[0], p_args[1]); + + } else if (p_msg == "live_node_prop_res") { + ERR_FAIL_COND_V(p_args.size() < 3, ERR_INVALID_DATA); + live_editor->_node_set_res_func(p_args[0], p_args[1], p_args[2]); + + } else if (p_msg == "live_node_prop") { + ERR_FAIL_COND_V(p_args.size() < 3, ERR_INVALID_DATA); + live_editor->_node_set_func(p_args[0], p_args[1], p_args[2]); + + } else if (p_msg == "live_res_prop_res") { + ERR_FAIL_COND_V(p_args.size() < 3, ERR_INVALID_DATA); + live_editor->_res_set_res_func(p_args[0], p_args[1], p_args[2]); + + } else if (p_msg == "live_res_prop") { + ERR_FAIL_COND_V(p_args.size() < 3, ERR_INVALID_DATA); + live_editor->_res_set_func(p_args[0], p_args[1], p_args[2]); + + } else if (p_msg == "live_node_call") { + ERR_FAIL_COND_V(p_args.size() < 7, ERR_INVALID_DATA); + live_editor->_node_call_func(p_args[0], p_args[1], p_args[2], p_args[3], p_args[4], p_args[5], p_args[6]); + + } else if (p_msg == "live_res_call") { + ERR_FAIL_COND_V(p_args.size() < 7, ERR_INVALID_DATA); + live_editor->_res_call_func(p_args[0], p_args[1], p_args[2], p_args[3], p_args[4], p_args[5], p_args[6]); + + } else if (p_msg == "live_create_node") { + ERR_FAIL_COND_V(p_args.size() < 3, ERR_INVALID_DATA); + live_editor->_create_node_func(p_args[0], p_args[1], p_args[2]); + + } else if (p_msg == "live_instance_node") { + ERR_FAIL_COND_V(p_args.size() < 3, ERR_INVALID_DATA); + live_editor->_instance_node_func(p_args[0], p_args[1], p_args[2]); + + } else if (p_msg == "live_remove_node") { + ERR_FAIL_COND_V(p_args.size() < 1, ERR_INVALID_DATA); + live_editor->_remove_node_func(p_args[0]); + + } else if (p_msg == "live_remove_and_keep_node") { + ERR_FAIL_COND_V(p_args.size() < 2, ERR_INVALID_DATA); + live_editor->_remove_and_keep_node_func(p_args[0], p_args[1]); + + } else if (p_msg == "live_restore_node") { + ERR_FAIL_COND_V(p_args.size() < 3, ERR_INVALID_DATA); + live_editor->_restore_node_func(p_args[0], p_args[1], p_args[2]); + + } else if (p_msg == "live_duplicate_node") { + ERR_FAIL_COND_V(p_args.size() < 2, ERR_INVALID_DATA); + live_editor->_duplicate_node_func(p_args[0], p_args[1]); + + } else if (p_msg == "live_reparent_node") { + ERR_FAIL_COND_V(p_args.size() < 4, ERR_INVALID_DATA); + live_editor->_reparent_node_func(p_args[0], p_args[1], p_args[2], p_args[3]); + } else { + return ERR_SKIP; + } + return OK; +} + +void SceneDebugger::_save_node(ObjectID id, const String &p_path) { + Node *node = Object::cast_to<Node>(ObjectDB::get_instance(id)); + ERR_FAIL_COND(!node); + + WARN_PRINT("SAVING " + itos(id) + " TO " + p_path); + Ref<PackedScene> ps = memnew(PackedScene); + ps->pack(node); + ResourceSaver::save(p_path, ps); +} + +void SceneDebugger::_send_object_id(ObjectID p_id, int p_max_size) { + SceneDebuggerObject obj(p_id); + if (obj.id.is_null()) + return; + + Array arr; + obj.serialize(arr); + ScriptDebugger::get_singleton()->send_message("inspect_object", arr); +} + +void SceneDebugger::_set_object_property(ObjectID p_id, const String &p_property, const Variant &p_value) { + + Object *obj = ObjectDB::get_instance(p_id); + if (!obj) + return; + + String prop_name = p_property; + if (p_property.begins_with("Members/")) { + Vector<String> ss = p_property.split("/"); + prop_name = ss[ss.size() - 1]; + } + + obj->set(prop_name, p_value); +} + +void SceneDebugger::add_to_cache(const String &p_filename, Node *p_node) { + LiveEditor *debugger = LiveEditor::get_singleton(); + if (!debugger) + return; + + if (ScriptDebugger::get_singleton() && p_filename != String()) { + debugger->live_scene_edit_cache[p_filename].insert(p_node); + } +} +void SceneDebugger::remove_from_cache(const String &p_filename, Node *p_node) { + LiveEditor *debugger = LiveEditor::get_singleton(); + if (!debugger) + return; + + Map<String, Set<Node *> > &edit_cache = debugger->live_scene_edit_cache; + Map<String, Set<Node *> >::Element *E = edit_cache.find(p_filename); + if (E) { + E->get().erase(p_node); + if (E->get().size() == 0) { + edit_cache.erase(E); + } + } + + Map<Node *, Map<ObjectID, Node *> > &remove_list = debugger->live_edit_remove_list; + Map<Node *, Map<ObjectID, Node *> >::Element *F = remove_list.find(p_node); + if (F) { + for (Map<ObjectID, Node *>::Element *G = F->get().front(); G; G = G->next()) { + + memdelete(G->get()); + } + remove_list.erase(F); + } +} + +/// SceneDebuggerObject +SceneDebuggerObject::SceneDebuggerObject(ObjectID p_id) { + id = ObjectID(); + Object *obj = ObjectDB::get_instance(p_id); + if (!obj) + return; + + id = p_id; + class_name = obj->get_class(); + + if (ScriptInstance *si = obj->get_script_instance()) { + // Read script instance constants and variables + if (!si->get_script().is_null()) { + Script *s = si->get_script().ptr(); + _parse_script_properties(s, si); + } + } + + if (Node *node = Object::cast_to<Node>(obj)) { + // Add specialized NodePath info (if inside tree). + if (node->is_inside_tree()) { + PropertyInfo pi(Variant::NODE_PATH, String("Node/path")); + properties.push_back(SceneDebuggerProperty(pi, node->get_path())); + } else { // Can't ask for path if a node is not in tree. + PropertyInfo pi(Variant::STRING, String("Node/path")); + properties.push_back(SceneDebuggerProperty(pi, "[Orphan]")); + } + } else if (Script *s = Object::cast_to<Script>(obj)) { + // Add script constants (no instance). + _parse_script_properties(s, NULL); + } + + // Add base object properties. + List<PropertyInfo> pinfo; + obj->get_property_list(&pinfo, true); + for (List<PropertyInfo>::Element *E = pinfo.front(); E; E = E->next()) { + if (E->get().usage & (PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_CATEGORY)) { + properties.push_back(SceneDebuggerProperty(E->get(), obj->get(E->get().name))); + } + } +} + +void SceneDebuggerObject::_parse_script_properties(Script *p_script, ScriptInstance *p_instance) { + typedef Map<const Script *, Set<StringName> > ScriptMemberMap; + typedef Map<const Script *, Map<StringName, Variant> > ScriptConstantsMap; + + ScriptMemberMap members; + if (p_instance) { + members[p_script] = Set<StringName>(); + p_script->get_members(&(members[p_script])); + } + + ScriptConstantsMap constants; + constants[p_script] = Map<StringName, Variant>(); + p_script->get_constants(&(constants[p_script])); + + Ref<Script> base = p_script->get_base_script(); + while (base.is_valid()) { + if (p_instance) { + members[base.ptr()] = Set<StringName>(); + base->get_members(&(members[base.ptr()])); + } + + constants[base.ptr()] = Map<StringName, Variant>(); + base->get_constants(&(constants[base.ptr()])); + + base = base->get_base_script(); + } + + // Members + for (ScriptMemberMap::Element *sm = members.front(); sm; sm = sm->next()) { + for (Set<StringName>::Element *E = sm->get().front(); E; E = E->next()) { + Variant m; + if (p_instance->get(E->get(), m)) { + String script_path = sm->key() == p_script ? "" : sm->key()->get_path().get_file() + "/"; + PropertyInfo pi(m.get_type(), "Members/" + script_path + E->get()); + properties.push_back(SceneDebuggerProperty(pi, m)); + } + } + } + // Constants + for (ScriptConstantsMap::Element *sc = constants.front(); sc; sc = sc->next()) { + for (Map<StringName, Variant>::Element *E = sc->get().front(); E; E = E->next()) { + String script_path = sc->key() == p_script ? "" : sc->key()->get_path().get_file() + "/"; + if (E->value().get_type() == Variant::OBJECT) { + Variant id = ((Object *)E->value())->get_instance_id(); + PropertyInfo pi(id.get_type(), "Constants/" + E->key(), PROPERTY_HINT_OBJECT_ID, "Object"); + properties.push_back(SceneDebuggerProperty(pi, id)); + } else { + PropertyInfo pi(E->value().get_type(), "Constants/" + script_path + E->key()); + properties.push_back(SceneDebuggerProperty(pi, E->value())); + } + } + } +} + +void SceneDebuggerObject::serialize(Array &r_arr, int p_max_size) { + Array send_props; + for (int i = 0; i < properties.size(); i++) { + const PropertyInfo &pi = properties[i].first; + Variant &var = properties[i].second; + + RES res = var; + + if (var.get_type() == Variant::OBJECT && var.is_ref()) { + REF r = var; + if (r.is_valid()) { + res = *r; + } else { + res = RES(); + } + } + + Array prop; + prop.push_back(pi.name); + prop.push_back(pi.type); + + PropertyHint hint = pi.hint; + String hint_string = pi.hint_string; + if (!res.is_null()) { + var = res->get_path(); + } else { //only send information that can be sent.. + int len = 0; //test how big is this to encode + encode_variant(var, NULL, len); + if (len > p_max_size) { //limit to max size + hint = PROPERTY_HINT_OBJECT_TOO_BIG; + hint_string = ""; + var = Variant(); + } + } + prop.push_back(hint); + prop.push_back(hint_string); + prop.push_back(pi.usage); + prop.push_back(var); + send_props.push_back(prop); + } + r_arr.push_back(uint64_t(id)); + r_arr.push_back(class_name); + r_arr.push_back(send_props); +} + +void SceneDebuggerObject::deserialize(const Array &p_arr) { +#define CHECK_TYPE(p_what, p_type) ERR_FAIL_COND(p_what.get_type() != Variant::p_type); + ERR_FAIL_COND(p_arr.size() < 3); + CHECK_TYPE(p_arr[0], INT); + CHECK_TYPE(p_arr[1], STRING); + CHECK_TYPE(p_arr[2], ARRAY); + + id = uint64_t(p_arr[0]); + class_name = p_arr[1]; + Array props = p_arr[2]; + + for (int i = 0; i < props.size(); i++) { + + CHECK_TYPE(props[i], ARRAY); + Array prop = props[i]; + + ERR_FAIL_COND(prop.size() != 6); + CHECK_TYPE(prop[0], STRING); + CHECK_TYPE(prop[1], INT); + CHECK_TYPE(prop[2], INT); + CHECK_TYPE(prop[3], STRING); + CHECK_TYPE(prop[4], INT); + + PropertyInfo pinfo; + pinfo.name = prop[0]; + pinfo.type = Variant::Type(int(prop[1])); + pinfo.hint = PropertyHint(int(prop[2])); + pinfo.hint_string = prop[3]; + pinfo.usage = PropertyUsageFlags(int(prop[4])); + Variant var = prop[5]; + + if (pinfo.type == Variant::OBJECT) { + if (var.is_zero()) { + var = RES(); + } else if (var.get_type() == Variant::OBJECT) { + if (((Object *)var)->is_class("EncodedObjectAsID")) { + var = Object::cast_to<EncodedObjectAsID>(var)->get_object_id(); + pinfo.type = var.get_type(); + pinfo.hint = PROPERTY_HINT_OBJECT_ID; + pinfo.hint_string = "Object"; + } + } + } + properties.push_back(SceneDebuggerProperty(pinfo, var)); + } +} + +/// SceneDebuggerTree +SceneDebuggerTree::SceneDebuggerTree(Node *p_root) { + // Flatten tree into list, depth first, use stack to avoid recursion. + List<Node *> stack; + stack.push_back(p_root); + while (stack.size()) { + Node *n = stack[0]; + stack.pop_front(); + int count = n->get_child_count(); + nodes.push_back(RemoteNode(count, n->get_name(), n->get_class(), n->get_instance_id())); + for (int i = 0; i < count; i++) { + stack.push_front(n->get_child(count - i - 1)); + } + } +} + +void SceneDebuggerTree::serialize(Array &p_arr) { + for (List<RemoteNode>::Element *E = nodes.front(); E; E = E->next()) { + RemoteNode &n = E->get(); + p_arr.push_back(n.child_count); + p_arr.push_back(n.name); + p_arr.push_back(n.type_name); + p_arr.push_back(n.id); + } +} + +void SceneDebuggerTree::deserialize(const Array &p_arr) { + int idx = 0; + while (p_arr.size() > idx) { + ERR_FAIL_COND(p_arr.size() < 4); + CHECK_TYPE(p_arr[idx], INT); + CHECK_TYPE(p_arr[idx + 1], STRING); + CHECK_TYPE(p_arr[idx + 2], STRING); + CHECK_TYPE(p_arr[idx + 3], INT); + nodes.push_back(RemoteNode(p_arr[idx], p_arr[idx + 1], p_arr[idx + 2], p_arr[idx + 3])); + idx += 4; + } +} + +/// LiveEditor +LiveEditor *LiveEditor::singleton = NULL; +LiveEditor *LiveEditor::get_singleton() { + return singleton; +} + +void LiveEditor::_send_tree() { + SceneTree *scene_tree = SceneTree::get_singleton(); + if (!scene_tree) + return; + + Array arr; + // Encoded as a flat list depth fist. + SceneDebuggerTree tree(scene_tree->root); + tree.serialize(arr); + ScriptDebugger::get_singleton()->send_message("scene_tree", arr); +} + +void LiveEditor::_node_path_func(const NodePath &p_path, int p_id) { + + live_edit_node_path_cache[p_id] = p_path; +} + +void LiveEditor::_res_path_func(const String &p_path, int p_id) { + + live_edit_resource_cache[p_id] = p_path; +} + +void LiveEditor::_node_set_func(int p_id, const StringName &p_prop, const Variant &p_value) { + + SceneTree *scene_tree = SceneTree::get_singleton(); + if (!scene_tree) + return; + + if (!live_edit_node_path_cache.has(p_id)) + return; + + NodePath np = live_edit_node_path_cache[p_id]; + Node *base = NULL; + if (scene_tree->root->has_node(live_edit_root)) + base = scene_tree->root->get_node(live_edit_root); + + Map<String, Set<Node *> >::Element *E = live_scene_edit_cache.find(live_edit_scene); + if (!E) + return; //scene not editable + + for (Set<Node *>::Element *F = E->get().front(); F; F = F->next()) { + + Node *n = F->get(); + + if (base && !base->is_a_parent_of(n)) + continue; + + if (!n->has_node(np)) + continue; + Node *n2 = n->get_node(np); + + n2->set(p_prop, p_value); + } +} + +void LiveEditor::_node_set_res_func(int p_id, const StringName &p_prop, const String &p_value) { + + RES r = ResourceLoader::load(p_value); + if (!r.is_valid()) + return; + _node_set_func(p_id, p_prop, r); +} +void LiveEditor::_node_call_func(int p_id, const StringName &p_method, VARIANT_ARG_DECLARE) { + SceneTree *scene_tree = SceneTree::get_singleton(); + if (!scene_tree) + return; + if (!live_edit_node_path_cache.has(p_id)) + return; + + NodePath np = live_edit_node_path_cache[p_id]; + Node *base = NULL; + if (scene_tree->root->has_node(live_edit_root)) + base = scene_tree->root->get_node(live_edit_root); + + Map<String, Set<Node *> >::Element *E = live_scene_edit_cache.find(live_edit_scene); + if (!E) + return; //scene not editable + + for (Set<Node *>::Element *F = E->get().front(); F; F = F->next()) { + + Node *n = F->get(); + + if (base && !base->is_a_parent_of(n)) + continue; + + if (!n->has_node(np)) + continue; + Node *n2 = n->get_node(np); + + n2->call(p_method, VARIANT_ARG_PASS); + } +} +void LiveEditor::_res_set_func(int p_id, const StringName &p_prop, const Variant &p_value) { + + if (!live_edit_resource_cache.has(p_id)) + return; + + String resp = live_edit_resource_cache[p_id]; + + if (!ResourceCache::has(resp)) + return; + + RES r = ResourceCache::get(resp); + if (!r.is_valid()) + return; + + r->set(p_prop, p_value); +} +void LiveEditor::_res_set_res_func(int p_id, const StringName &p_prop, const String &p_value) { + + RES r = ResourceLoader::load(p_value); + if (!r.is_valid()) + return; + _res_set_func(p_id, p_prop, r); +} +void LiveEditor::_res_call_func(int p_id, const StringName &p_method, VARIANT_ARG_DECLARE) { + + if (!live_edit_resource_cache.has(p_id)) + return; + + String resp = live_edit_resource_cache[p_id]; + + if (!ResourceCache::has(resp)) + return; + + RES r = ResourceCache::get(resp); + if (!r.is_valid()) + return; + + r->call(p_method, VARIANT_ARG_PASS); +} + +void LiveEditor::_root_func(const NodePath &p_scene_path, const String &p_scene_from) { + + live_edit_root = p_scene_path; + live_edit_scene = p_scene_from; +} + +void LiveEditor::_create_node_func(const NodePath &p_parent, const String &p_type, const String &p_name) { + SceneTree *scene_tree = SceneTree::get_singleton(); + if (!scene_tree) + return; + + Node *base = NULL; + if (scene_tree->root->has_node(live_edit_root)) + base = scene_tree->root->get_node(live_edit_root); + + Map<String, Set<Node *> >::Element *E = live_scene_edit_cache.find(live_edit_scene); + if (!E) + return; //scene not editable + + for (Set<Node *>::Element *F = E->get().front(); F; F = F->next()) { + + Node *n = F->get(); + + if (base && !base->is_a_parent_of(n)) + continue; + + if (!n->has_node(p_parent)) + continue; + Node *n2 = n->get_node(p_parent); + + Node *no = Object::cast_to<Node>(ClassDB::instance(p_type)); + if (!no) { + continue; + } + + no->set_name(p_name); + n2->add_child(no); + } +} +void LiveEditor::_instance_node_func(const NodePath &p_parent, const String &p_path, const String &p_name) { + SceneTree *scene_tree = SceneTree::get_singleton(); + if (!scene_tree) + return; + + Ref<PackedScene> ps = ResourceLoader::load(p_path); + + if (!ps.is_valid()) + return; + + Node *base = NULL; + if (scene_tree->root->has_node(live_edit_root)) + base = scene_tree->root->get_node(live_edit_root); + + Map<String, Set<Node *> >::Element *E = live_scene_edit_cache.find(live_edit_scene); + if (!E) + return; //scene not editable + + for (Set<Node *>::Element *F = E->get().front(); F; F = F->next()) { + + Node *n = F->get(); + + if (base && !base->is_a_parent_of(n)) + continue; + + if (!n->has_node(p_parent)) + continue; + Node *n2 = n->get_node(p_parent); + + Node *no = ps->instance(); + if (!no) { + continue; + } + + no->set_name(p_name); + n2->add_child(no); + } +} +void LiveEditor::_remove_node_func(const NodePath &p_at) { + SceneTree *scene_tree = SceneTree::get_singleton(); + if (!scene_tree) + return; + + Node *base = NULL; + if (scene_tree->root->has_node(live_edit_root)) + base = scene_tree->root->get_node(live_edit_root); + + Map<String, Set<Node *> >::Element *E = live_scene_edit_cache.find(live_edit_scene); + if (!E) + return; //scene not editable + + for (Set<Node *>::Element *F = E->get().front(); F;) { + + Set<Node *>::Element *N = F->next(); + + Node *n = F->get(); + + if (base && !base->is_a_parent_of(n)) + continue; + + if (!n->has_node(p_at)) + continue; + Node *n2 = n->get_node(p_at); + + memdelete(n2); + + F = N; + } +} +void LiveEditor::_remove_and_keep_node_func(const NodePath &p_at, ObjectID p_keep_id) { + SceneTree *scene_tree = SceneTree::get_singleton(); + if (!scene_tree) + return; + + Node *base = NULL; + if (scene_tree->root->has_node(live_edit_root)) + base = scene_tree->root->get_node(live_edit_root); + + Map<String, Set<Node *> >::Element *E = live_scene_edit_cache.find(live_edit_scene); + if (!E) + return; //scene not editable + + for (Set<Node *>::Element *F = E->get().front(); F;) { + + Set<Node *>::Element *N = F->next(); + + Node *n = F->get(); + + if (base && !base->is_a_parent_of(n)) + continue; + + if (!n->has_node(p_at)) + continue; + + Node *n2 = n->get_node(p_at); + + n2->get_parent()->remove_child(n2); + + live_edit_remove_list[n][p_keep_id] = n2; + + F = N; + } +} +void LiveEditor::_restore_node_func(ObjectID p_id, const NodePath &p_at, int p_at_pos) { + SceneTree *scene_tree = SceneTree::get_singleton(); + if (!scene_tree) + return; + + Node *base = NULL; + if (scene_tree->root->has_node(live_edit_root)) + base = scene_tree->root->get_node(live_edit_root); + + Map<String, Set<Node *> >::Element *E = live_scene_edit_cache.find(live_edit_scene); + if (!E) + return; //scene not editable + + for (Set<Node *>::Element *F = E->get().front(); F;) { + + Set<Node *>::Element *N = F->next(); + + Node *n = F->get(); + + if (base && !base->is_a_parent_of(n)) + continue; + + if (!n->has_node(p_at)) + continue; + Node *n2 = n->get_node(p_at); + + Map<Node *, Map<ObjectID, Node *> >::Element *EN = live_edit_remove_list.find(n); + + if (!EN) + continue; + + Map<ObjectID, Node *>::Element *FN = EN->get().find(p_id); + + if (!FN) + continue; + n2->add_child(FN->get()); + + EN->get().erase(FN); + + if (EN->get().size() == 0) { + live_edit_remove_list.erase(EN); + } + + F = N; + } +} +void LiveEditor::_duplicate_node_func(const NodePath &p_at, const String &p_new_name) { + SceneTree *scene_tree = SceneTree::get_singleton(); + if (!scene_tree) + return; + + Node *base = NULL; + if (scene_tree->root->has_node(live_edit_root)) + base = scene_tree->root->get_node(live_edit_root); + + Map<String, Set<Node *> >::Element *E = live_scene_edit_cache.find(live_edit_scene); + if (!E) + return; //scene not editable + + for (Set<Node *>::Element *F = E->get().front(); F; F = F->next()) { + + Node *n = F->get(); + + if (base && !base->is_a_parent_of(n)) + continue; + + if (!n->has_node(p_at)) + continue; + Node *n2 = n->get_node(p_at); + + Node *dup = n2->duplicate(Node::DUPLICATE_SIGNALS | Node::DUPLICATE_GROUPS | Node::DUPLICATE_SCRIPTS); + + if (!dup) + continue; + + dup->set_name(p_new_name); + n2->get_parent()->add_child(dup); + } +} +void LiveEditor::_reparent_node_func(const NodePath &p_at, const NodePath &p_new_place, const String &p_new_name, int p_at_pos) { + SceneTree *scene_tree = SceneTree::get_singleton(); + if (!scene_tree) + return; + + Node *base = NULL; + if (scene_tree->root->has_node(live_edit_root)) + base = scene_tree->root->get_node(live_edit_root); + + Map<String, Set<Node *> >::Element *E = live_scene_edit_cache.find(live_edit_scene); + if (!E) + return; //scene not editable + + for (Set<Node *>::Element *F = E->get().front(); F; F = F->next()) { + + Node *n = F->get(); + + if (base && !base->is_a_parent_of(n)) + continue; + + if (!n->has_node(p_at)) + continue; + Node *nfrom = n->get_node(p_at); + + if (!n->has_node(p_new_place)) + continue; + Node *nto = n->get_node(p_new_place); + + nfrom->get_parent()->remove_child(nfrom); + nfrom->set_name(p_new_name); + + nto->add_child(nfrom); + if (p_at_pos >= 0) + nto->move_child(nfrom, p_at_pos); + } +} + +#endif diff --git a/scene/debugger/scene_debugger.h b/scene/debugger/scene_debugger.h new file mode 100644 index 0000000000..d22f8e8e18 --- /dev/null +++ b/scene/debugger/scene_debugger.h @@ -0,0 +1,151 @@ +/*************************************************************************/ +/* scene_debugger.h */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* https://godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 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_DEBUGGER_H +#define SCENE_DEBUGGER_H + +#include "core/array.h" +#include "core/object.h" +#include "core/pair.h" +#include "core/script_language.h" +#include "core/ustring.h" + +class SceneDebugger { + +public: + static void initialize(); + static void deinitialize(); + +#ifdef DEBUG_ENABLED +private: + static void _save_node(ObjectID id, const String &p_path); + static void _set_object_property(ObjectID p_id, const String &p_property, const Variant &p_value); + static void _send_object_id(ObjectID p_id, int p_max_size = 1 << 20); + +public: + static Error parse_message(const String &p_msg, const Array &p_args); + static void add_to_cache(const String &p_filename, Node *p_node); + static void remove_from_cache(const String &p_filename, Node *p_node); +#endif +}; + +#ifdef DEBUG_ENABLED +class SceneDebuggerObject { + +private: + void _parse_script_properties(Script *p_script, ScriptInstance *p_instance); + +public: + typedef Pair<PropertyInfo, Variant> SceneDebuggerProperty; + ObjectID id; + String class_name; + List<SceneDebuggerProperty> properties; + + SceneDebuggerObject(ObjectID p_id); + SceneDebuggerObject() {} + + void serialize(Array &r_arr, int p_max_size = 1 << 20); + void deserialize(const Array &p_arr); +}; + +class SceneDebuggerTree { + +public: + struct RemoteNode { + int child_count; + String name; + String type_name; + ObjectID id; + + RemoteNode(int p_child, const String &p_name, const String &p_type, ObjectID p_id) { + child_count = p_child; + name = p_name; + type_name = p_type; + id = p_id; + } + + RemoteNode() {} + }; + + List<RemoteNode> nodes; + + void serialize(Array &r_arr); + void deserialize(const Array &p_arr); + SceneDebuggerTree(Node *p_root); + SceneDebuggerTree(){}; +}; + +class LiveEditor { + +private: + friend class SceneDebugger; + Map<int, NodePath> live_edit_node_path_cache; + Map<int, String> live_edit_resource_cache; + + NodePath live_edit_root; + String live_edit_scene; + + Map<String, Set<Node *> > live_scene_edit_cache; + Map<Node *, Map<ObjectID, Node *> > live_edit_remove_list; + + void _send_tree(); + + void _node_path_func(const NodePath &p_path, int p_id); + void _res_path_func(const String &p_path, int p_id); + + void _node_set_func(int p_id, const StringName &p_prop, const Variant &p_value); + void _node_set_res_func(int p_id, const StringName &p_prop, const String &p_value); + void _node_call_func(int p_id, const StringName &p_method, VARIANT_ARG_DECLARE); + void _res_set_func(int p_id, const StringName &p_prop, const Variant &p_value); + void _res_set_res_func(int p_id, const StringName &p_prop, const String &p_value); + void _res_call_func(int p_id, const StringName &p_method, VARIANT_ARG_DECLARE); + void _root_func(const NodePath &p_scene_path, const String &p_scene_from); + + void _create_node_func(const NodePath &p_parent, const String &p_type, const String &p_name); + void _instance_node_func(const NodePath &p_parent, const String &p_path, const String &p_name); + void _remove_node_func(const NodePath &p_at); + void _remove_and_keep_node_func(const NodePath &p_at, ObjectID p_keep_id); + void _restore_node_func(ObjectID p_id, const NodePath &p_at, int p_at_pos); + void _duplicate_node_func(const NodePath &p_at, const String &p_new_name); + void _reparent_node_func(const NodePath &p_at, const NodePath &p_new_place, const String &p_new_name, int p_at_pos); + + LiveEditor() { + singleton = this; + live_edit_root = NodePath("/root"); + }; + + static LiveEditor *singleton; + +public: + static LiveEditor *get_singleton(); +}; +#endif + +#endif diff --git a/scene/debugger/script_debugger_remote.cpp b/scene/debugger/script_debugger_remote.cpp deleted file mode 100644 index 3608a11ed7..0000000000 --- a/scene/debugger/script_debugger_remote.cpp +++ /dev/null @@ -1,1313 +0,0 @@ -/*************************************************************************/ -/* script_debugger_remote.cpp */ -/*************************************************************************/ -/* This file is part of: */ -/* GODOT ENGINE */ -/* https://godotengine.org */ -/*************************************************************************/ -/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */ -/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */ -/* */ -/* Permission is hereby granted, free of charge, to any person obtaining */ -/* a copy of this software and associated documentation files (the */ -/* "Software"), to deal in the Software without restriction, including */ -/* without limitation the rights to use, copy, modify, merge, publish, */ -/* distribute, sublicense, and/or sell copies of the Software, and to */ -/* permit persons to whom the Software is furnished to do so, subject to */ -/* the following conditions: */ -/* */ -/* The above copyright notice and this permission notice shall be */ -/* included in all copies or substantial portions of the Software. */ -/* */ -/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ -/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ -/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ -/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ -/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ -/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ -/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -/*************************************************************************/ - -#include "script_debugger_remote.h" - -#include "core/engine.h" -#include "core/io/ip.h" -#include "core/io/marshalls.h" -#include "core/os/input.h" -#include "core/os/os.h" -#include "core/project_settings.h" -#include "scene/main/node.h" -#include "scene/main/scene_tree.h" -#include "scene/main/viewport.h" -#include "scene/resources/packed_scene.h" -#include "servers/visual_server.h" - -void ScriptDebuggerRemote::_send_video_memory() { - - List<ResourceUsage> usage; - if (resource_usage_func) - resource_usage_func(&usage); - - usage.sort(); - - packet_peer_stream->put_var("message:video_mem"); - packet_peer_stream->put_var(usage.size() * 4); - - for (List<ResourceUsage>::Element *E = usage.front(); E; E = E->next()) { - - packet_peer_stream->put_var(E->get().path); - packet_peer_stream->put_var(E->get().type); - packet_peer_stream->put_var(E->get().format); - packet_peer_stream->put_var(E->get().vram); - } -} - -Error ScriptDebuggerRemote::connect_to_host(const String &p_host, uint16_t p_port) { - - IP_Address ip; - if (p_host.is_valid_ip_address()) - ip = p_host; - else - ip = IP::get_singleton()->resolve_hostname(p_host); - - int port = p_port; - - const int tries = 6; - int waits[tries] = { 1, 10, 100, 1000, 1000, 1000 }; - - tcp_client->connect_to_host(ip, port); - - for (int i = 0; i < tries; i++) { - - if (tcp_client->get_status() == StreamPeerTCP::STATUS_CONNECTED) { - print_verbose("Remote Debugger: Connected!"); - break; - } else { - - const int ms = waits[i]; - OS::get_singleton()->delay_usec(ms * 1000); - print_verbose("Remote Debugger: Connection failed with status: '" + String::num(tcp_client->get_status()) + "', retrying in " + String::num(ms) + " msec."); - }; - }; - - if (tcp_client->get_status() != StreamPeerTCP::STATUS_CONNECTED) { - - ERR_PRINT("Remote Debugger: Unable to connect. Status: " + String::num(tcp_client->get_status()) + "."); - return FAILED; - }; - - packet_peer_stream->set_stream_peer(tcp_client); - - return OK; -} - -void ScriptDebuggerRemote::_put_variable(const String &p_name, const Variant &p_variable) { - - packet_peer_stream->put_var(p_name); - - Variant var = p_variable; - if (p_variable.get_type() == Variant::OBJECT && !ObjectDB::instance_validate(p_variable)) { - var = Variant(); - } - - int len = 0; - Error err = encode_variant(var, NULL, len, true); - if (err != OK) - ERR_PRINT("Failed to encode variant."); - - if (len > packet_peer_stream->get_output_buffer_max_size()) { //limit to max size - packet_peer_stream->put_var(Variant()); - } else { - packet_peer_stream->put_var(var); - } -} - -void ScriptDebuggerRemote::_save_node(ObjectID id, const String &p_path) { - - Node *node = Object::cast_to<Node>(ObjectDB::get_instance(id)); - ERR_FAIL_COND(!node); - - Ref<PackedScene> ps = memnew(PackedScene); - ps->pack(node); - ResourceSaver::save(p_path, ps); -} - -void ScriptDebuggerRemote::debug(ScriptLanguage *p_script, bool p_can_continue, bool p_is_error_breakpoint) { - - //this function is called when there is a debugger break (bug on script) - //or when execution is paused from editor - - if (skip_breakpoints && !p_is_error_breakpoint) - return; - - ERR_FAIL_COND_MSG(!tcp_client->is_connected_to_host(), "Script Debugger failed to connect, but being used anyway."); - - packet_peer_stream->put_var("debug_enter"); - packet_peer_stream->put_var(2); - packet_peer_stream->put_var(p_can_continue); - packet_peer_stream->put_var(p_script->debug_get_error()); - - skip_profile_frame = true; // to avoid super long frame time for the frame - - Input::MouseMode mouse_mode = Input::get_singleton()->get_mouse_mode(); - if (mouse_mode != Input::MOUSE_MODE_VISIBLE) - Input::get_singleton()->set_mouse_mode(Input::MOUSE_MODE_VISIBLE); - - uint64_t loop_begin_usec = 0; - uint64_t loop_time_sec = 0; - while (true) { - loop_begin_usec = OS::get_singleton()->get_ticks_usec(); - - _get_output(); - - if (packet_peer_stream->get_available_packet_count() > 0) { - - Variant var; - Error err = packet_peer_stream->get_var(var); - - ERR_CONTINUE(err != OK); - ERR_CONTINUE(var.get_type() != Variant::ARRAY); - - Array cmd = var; - - ERR_CONTINUE(cmd.size() == 0); - ERR_CONTINUE(cmd[0].get_type() != Variant::STRING); - - String command = cmd[0]; - - if (command == "get_stack_dump") { - - packet_peer_stream->put_var("stack_dump"); - int slc = p_script->debug_get_stack_level_count(); - packet_peer_stream->put_var(slc); - - for (int i = 0; i < slc; i++) { - - Dictionary d; - d["file"] = p_script->debug_get_stack_level_source(i); - d["line"] = p_script->debug_get_stack_level_line(i); - d["function"] = p_script->debug_get_stack_level_function(i); - //d["id"]=p_script->debug_get_stack_level_ - d["id"] = 0; - - packet_peer_stream->put_var(d); - } - - } else if (command == "get_stack_frame_vars") { - - cmd.remove(0); - ERR_CONTINUE(cmd.size() != 1); - int lv = cmd[0]; - - List<String> members; - List<Variant> member_vals; - if (ScriptInstance *inst = p_script->debug_get_stack_level_instance(lv)) { - members.push_back("self"); - member_vals.push_back(inst->get_owner()); - } - p_script->debug_get_stack_level_members(lv, &members, &member_vals); - ERR_CONTINUE(members.size() != member_vals.size()); - - List<String> locals; - List<Variant> local_vals; - p_script->debug_get_stack_level_locals(lv, &locals, &local_vals); - ERR_CONTINUE(locals.size() != local_vals.size()); - - List<String> globals; - List<Variant> globals_vals; - p_script->debug_get_globals(&globals, &globals_vals); - ERR_CONTINUE(globals.size() != globals_vals.size()); - - packet_peer_stream->put_var("stack_frame_vars"); - packet_peer_stream->put_var(3 + (locals.size() + members.size() + globals.size()) * 2); - - { //locals - packet_peer_stream->put_var(locals.size()); - - List<String>::Element *E = locals.front(); - List<Variant>::Element *F = local_vals.front(); - - while (E) { - _put_variable(E->get(), F->get()); - - E = E->next(); - F = F->next(); - } - } - - { //members - packet_peer_stream->put_var(members.size()); - - List<String>::Element *E = members.front(); - List<Variant>::Element *F = member_vals.front(); - - while (E) { - - _put_variable(E->get(), F->get()); - - E = E->next(); - F = F->next(); - } - } - - { //globals - packet_peer_stream->put_var(globals.size()); - - List<String>::Element *E = globals.front(); - List<Variant>::Element *F = globals_vals.front(); - - while (E) { - _put_variable(E->get(), F->get()); - - E = E->next(); - F = F->next(); - } - } - - } else if (command == "step") { - - set_depth(-1); - set_lines_left(1); - break; - } else if (command == "next") { - - set_depth(0); - set_lines_left(1); - break; - - } else if (command == "continue") { - set_depth(-1); - set_lines_left(-1); - OS::get_singleton()->move_window_to_foreground(); - break; - } else if (command == "break") { - ERR_PRINT("Got break when already broke!"); - break; - } else if (command == "request_scene_tree") { - -#ifdef DEBUG_ENABLED - if (scene_tree) - scene_tree->_debugger_request_tree(); -#endif - } else if (command == "request_video_mem") { - - _send_video_memory(); - } else if (command == "inspect_object") { - - ObjectID id = cmd[1]; - _send_object_id(id); - } else if (command == "set_object_property") { - - _set_object_property(cmd[1], cmd[2], cmd[3]); - - } else if (command == "override_camera_2D:set") { - bool enforce = cmd[1]; - - if (scene_tree) { - scene_tree->get_root()->enable_canvas_transform_override(enforce); - } - } else if (command == "override_camera_2D:transform") { - Transform2D transform = cmd[1]; - - if (scene_tree) { - scene_tree->get_root()->set_canvas_transform_override(transform); - } - } else if (command == "override_camera_3D:set") { - bool enable = cmd[1]; - - if (scene_tree) { - scene_tree->get_root()->enable_camera_override(enable); - } - } else if (command == "override_camera_3D:transform") { - Transform transform = cmd[1]; - bool is_perspective = cmd[2]; - float size_or_fov = cmd[3]; - float near = cmd[4]; - float far = cmd[5]; - - if (scene_tree) { - if (is_perspective) { - scene_tree->get_root()->set_camera_override_perspective(size_or_fov, near, far); - } else { - scene_tree->get_root()->set_camera_override_orthogonal(size_or_fov, near, far); - } - scene_tree->get_root()->set_camera_override_transform(transform); - } - - } else if (command == "reload_scripts") { - reload_all_scripts = true; - } else if (command == "breakpoint") { - - bool set = cmd[3]; - if (set) - insert_breakpoint(cmd[2], cmd[1]); - else - remove_breakpoint(cmd[2], cmd[1]); - - } else if (command == "save_node") { - _save_node(cmd[1], cmd[2]); - } else if (command == "set_skip_breakpoints") { - skip_breakpoints = cmd[1]; - } else { - _parse_live_edit(cmd); - } - - } else { - OS::get_singleton()->delay_usec(10000); - OS::get_singleton()->process_and_drop_events(); - } - - // This is for the camera override to stay live even when the game is paused from the editor - loop_time_sec = (OS::get_singleton()->get_ticks_usec() - loop_begin_usec) / 1000000.0f; - VisualServer::get_singleton()->sync(); - if (VisualServer::get_singleton()->has_changed()) { - VisualServer::get_singleton()->draw(true, loop_time_sec * Engine::get_singleton()->get_time_scale()); - } - } - - packet_peer_stream->put_var("debug_exit"); - packet_peer_stream->put_var(0); - - if (mouse_mode != Input::MOUSE_MODE_VISIBLE) - Input::get_singleton()->set_mouse_mode(mouse_mode); -} - -void ScriptDebuggerRemote::_get_output() { - - mutex->lock(); - if (output_strings.size()) { - - locking = true; - packet_peer_stream->put_var("output"); - packet_peer_stream->put_var(output_strings.size()); - - while (output_strings.size()) { - - packet_peer_stream->put_var(output_strings.front()->get()); - output_strings.pop_front(); - } - locking = false; - } - - if (n_messages_dropped > 0) { - Message msg; - msg.message = "Too many messages! " + String::num_int64(n_messages_dropped) + " messages were dropped."; - messages.push_back(msg); - n_messages_dropped = 0; - } - - while (messages.size()) { - locking = true; - packet_peer_stream->put_var("message:" + messages.front()->get().message); - packet_peer_stream->put_var(messages.front()->get().data.size()); - for (int i = 0; i < messages.front()->get().data.size(); i++) { - packet_peer_stream->put_var(messages.front()->get().data[i]); - } - messages.pop_front(); - locking = false; - } - - if (n_errors_dropped == 1) { - // Only print one message about dropping per second - OutputError oe; - oe.error = "TOO_MANY_ERRORS"; - oe.error_descr = "Too many errors! Ignoring errors for up to 1 second."; - oe.warning = false; - uint64_t time = OS::get_singleton()->get_ticks_msec(); - oe.hr = time / 3600000; - oe.min = (time / 60000) % 60; - oe.sec = (time / 1000) % 60; - oe.msec = time % 1000; - errors.push_back(oe); - } - - if (n_warnings_dropped == 1) { - // Only print one message about dropping per second - OutputError oe; - oe.error = "TOO_MANY_WARNINGS"; - oe.error_descr = "Too many warnings! Ignoring warnings for up to 1 second."; - oe.warning = true; - uint64_t time = OS::get_singleton()->get_ticks_msec(); - oe.hr = time / 3600000; - oe.min = (time / 60000) % 60; - oe.sec = (time / 1000) % 60; - oe.msec = time % 1000; - errors.push_back(oe); - } - - while (errors.size()) { - locking = true; - packet_peer_stream->put_var("error"); - OutputError oe = errors.front()->get(); - - packet_peer_stream->put_var(oe.callstack.size() + 2); - - Array error_data; - - error_data.push_back(oe.hr); - error_data.push_back(oe.min); - error_data.push_back(oe.sec); - error_data.push_back(oe.msec); - error_data.push_back(oe.source_func); - error_data.push_back(oe.source_file); - error_data.push_back(oe.source_line); - error_data.push_back(oe.error); - error_data.push_back(oe.error_descr); - error_data.push_back(oe.warning); - packet_peer_stream->put_var(error_data); - packet_peer_stream->put_var(oe.callstack.size()); - for (int i = 0; i < oe.callstack.size(); i++) { - packet_peer_stream->put_var(oe.callstack[i]); - } - - errors.pop_front(); - locking = false; - } - mutex->unlock(); -} - -void ScriptDebuggerRemote::line_poll() { - - //the purpose of this is just processing events every now and then when the script might get too busy - //otherwise bugs like infinite loops can't be caught - if (poll_every % 2048 == 0) - _poll_events(); - poll_every++; -} - -void ScriptDebuggerRemote::_err_handler(void *ud, const char *p_func, const char *p_file, int p_line, const char *p_err, const char *p_descr, ErrorHandlerType p_type) { - - if (p_type == ERR_HANDLER_SCRIPT) - return; //ignore script errors, those go through debugger - - Vector<ScriptLanguage::StackInfo> si; - - for (int i = 0; i < ScriptServer::get_language_count(); i++) { - si = ScriptServer::get_language(i)->debug_get_current_stack_info(); - if (si.size()) - break; - } - - ScriptDebuggerRemote *sdr = (ScriptDebuggerRemote *)ud; - sdr->send_error(p_func, p_file, p_line, p_err, p_descr, p_type, si); -} - -bool ScriptDebuggerRemote::_parse_live_edit(const Array &p_command) { - -#ifdef DEBUG_ENABLED - - String cmdstr = p_command[0]; - if (!scene_tree || !cmdstr.begins_with("live_")) - return false; - - if (cmdstr == "live_set_root") { - - scene_tree->_live_edit_root_func(p_command[1], p_command[2]); - - } else if (cmdstr == "live_node_path") { - - scene_tree->_live_edit_node_path_func(p_command[1], p_command[2]); - - } else if (cmdstr == "live_res_path") { - - scene_tree->_live_edit_res_path_func(p_command[1], p_command[2]); - - } else if (cmdstr == "live_node_prop_res") { - - scene_tree->_live_edit_node_set_res_func(p_command[1], p_command[2], p_command[3]); - - } else if (cmdstr == "live_node_prop") { - - scene_tree->_live_edit_node_set_func(p_command[1], p_command[2], p_command[3]); - - } else if (cmdstr == "live_res_prop_res") { - - scene_tree->_live_edit_res_set_res_func(p_command[1], p_command[2], p_command[3]); - - } else if (cmdstr == "live_res_prop") { - - scene_tree->_live_edit_res_set_func(p_command[1], p_command[2], p_command[3]); - - } else if (cmdstr == "live_node_call") { - - scene_tree->_live_edit_node_call_func(p_command[1], p_command[2], p_command[3], p_command[4], p_command[5], p_command[6], p_command[7]); - - } else if (cmdstr == "live_res_call") { - - scene_tree->_live_edit_res_call_func(p_command[1], p_command[2], p_command[3], p_command[4], p_command[5], p_command[6], p_command[7]); - - } else if (cmdstr == "live_create_node") { - - scene_tree->_live_edit_create_node_func(p_command[1], p_command[2], p_command[3]); - - } else if (cmdstr == "live_instance_node") { - - scene_tree->_live_edit_instance_node_func(p_command[1], p_command[2], p_command[3]); - - } else if (cmdstr == "live_remove_node") { - - scene_tree->_live_edit_remove_node_func(p_command[1]); - - } else if (cmdstr == "live_remove_and_keep_node") { - - scene_tree->_live_edit_remove_and_keep_node_func(p_command[1], p_command[2]); - - } else if (cmdstr == "live_restore_node") { - - scene_tree->_live_edit_restore_node_func(p_command[1], p_command[2], p_command[3]); - - } else if (cmdstr == "live_duplicate_node") { - - scene_tree->_live_edit_duplicate_node_func(p_command[1], p_command[2]); - - } else if (cmdstr == "live_reparent_node") { - - scene_tree->_live_edit_reparent_node_func(p_command[1], p_command[2], p_command[3], p_command[4]); - - } else { - - return false; - } - - return true; -#else - - return false; -#endif -} - -void ScriptDebuggerRemote::_send_object_id(ObjectID p_id) { - - Object *obj = ObjectDB::get_instance(p_id); - if (!obj) - return; - - typedef Pair<PropertyInfo, Variant> PropertyDesc; - List<PropertyDesc> properties; - - if (ScriptInstance *si = obj->get_script_instance()) { - if (!si->get_script().is_null()) { - - typedef Map<const Script *, Set<StringName> > ScriptMemberMap; - typedef Map<const Script *, Map<StringName, Variant> > ScriptConstantsMap; - - ScriptMemberMap members; - members[si->get_script().ptr()] = Set<StringName>(); - si->get_script()->get_members(&(members[si->get_script().ptr()])); - - ScriptConstantsMap constants; - constants[si->get_script().ptr()] = Map<StringName, Variant>(); - si->get_script()->get_constants(&(constants[si->get_script().ptr()])); - - Ref<Script> base = si->get_script()->get_base_script(); - while (base.is_valid()) { - - members[base.ptr()] = Set<StringName>(); - base->get_members(&(members[base.ptr()])); - - constants[base.ptr()] = Map<StringName, Variant>(); - base->get_constants(&(constants[base.ptr()])); - - base = base->get_base_script(); - } - - for (ScriptMemberMap::Element *sm = members.front(); sm; sm = sm->next()) { - for (Set<StringName>::Element *E = sm->get().front(); E; E = E->next()) { - Variant m; - if (si->get(E->get(), m)) { - String script_path = sm->key() == si->get_script().ptr() ? "" : sm->key()->get_path().get_file() + "/"; - PropertyInfo pi(m.get_type(), "Members/" + script_path + E->get()); - properties.push_back(PropertyDesc(pi, m)); - } - } - } - - for (ScriptConstantsMap::Element *sc = constants.front(); sc; sc = sc->next()) { - for (Map<StringName, Variant>::Element *E = sc->get().front(); E; E = E->next()) { - String script_path = sc->key() == si->get_script().ptr() ? "" : sc->key()->get_path().get_file() + "/"; - if (E->value().get_type() == Variant::OBJECT) { - Variant id = ((Object *)E->value())->get_instance_id(); - PropertyInfo pi(id.get_type(), "Constants/" + E->key(), PROPERTY_HINT_OBJECT_ID, "Object"); - properties.push_back(PropertyDesc(pi, id)); - } else { - PropertyInfo pi(E->value().get_type(), "Constants/" + script_path + E->key()); - properties.push_back(PropertyDesc(pi, E->value())); - } - } - } - } - } - - if (Node *node = Object::cast_to<Node>(obj)) { - // in some cases node will not be in tree here - // for instance where it created as variable and not yet added to tree - // in such cases we can't ask for it's path - if (node->is_inside_tree()) { - PropertyInfo pi(Variant::NODE_PATH, String("Node/path")); - properties.push_front(PropertyDesc(pi, node->get_path())); - } else { - PropertyInfo pi(Variant::STRING, String("Node/path")); - properties.push_front(PropertyDesc(pi, "[Orphan]")); - } - - } else if (Resource *res = Object::cast_to<Resource>(obj)) { - if (Script *s = Object::cast_to<Script>(res)) { - Map<StringName, Variant> constants; - s->get_constants(&constants); - for (Map<StringName, Variant>::Element *E = constants.front(); E; E = E->next()) { - if (E->value().get_type() == Variant::OBJECT) { - Variant id = ((Object *)E->value())->get_instance_id(); - PropertyInfo pi(id.get_type(), "Constants/" + E->key(), PROPERTY_HINT_OBJECT_ID, "Object"); - properties.push_front(PropertyDesc(pi, E->value())); - } else { - PropertyInfo pi(E->value().get_type(), String("Constants/") + E->key()); - properties.push_front(PropertyDesc(pi, E->value())); - } - } - } - } - - List<PropertyInfo> pinfo; - obj->get_property_list(&pinfo, true); - for (List<PropertyInfo>::Element *E = pinfo.front(); E; E = E->next()) { - if (E->get().usage & (PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_CATEGORY)) { - properties.push_back(PropertyDesc(E->get(), obj->get(E->get().name))); - } - } - - Array send_props; - for (int i = 0; i < properties.size(); i++) { - const PropertyInfo &pi = properties[i].first; - Variant &var = properties[i].second; - - WeakRef *ref = Object::cast_to<WeakRef>(var); - if (ref) { - var = ref->get_ref(); - } - - RES res = var; - - Array prop; - prop.push_back(pi.name); - prop.push_back(pi.type); - - //only send information that can be sent.. - int len = 0; //test how big is this to encode - encode_variant(var, NULL, len); - if (len > packet_peer_stream->get_output_buffer_max_size()) { //limit to max size - prop.push_back(PROPERTY_HINT_OBJECT_TOO_BIG); - prop.push_back(""); - prop.push_back(pi.usage); - prop.push_back(Variant()); - } else { - prop.push_back(pi.hint); - prop.push_back(pi.hint_string); - prop.push_back(pi.usage); - - if (!res.is_null()) { - var = res->get_path(); - } - - prop.push_back(var); - } - send_props.push_back(prop); - } - - packet_peer_stream->put_var("message:inspect_object"); - packet_peer_stream->put_var(3); - packet_peer_stream->put_var(p_id); - packet_peer_stream->put_var(obj->get_class()); - packet_peer_stream->put_var(send_props); -} - -void ScriptDebuggerRemote::_set_object_property(ObjectID p_id, const String &p_property, const Variant &p_value) { - - Object *obj = ObjectDB::get_instance(p_id); - if (!obj) - return; - - String prop_name = p_property; - if (p_property.begins_with("Members/")) { - Vector<String> ss = p_property.split("/"); - prop_name = ss[ss.size() - 1]; - } - - obj->set(prop_name, p_value); -} - -void ScriptDebuggerRemote::_poll_events() { - - //this si called from ::idle_poll, happens only when running the game, - //does not get called while on debug break - - while (packet_peer_stream->get_available_packet_count() > 0) { - - _get_output(); - - //send over output_strings - - Variant var; - Error err = packet_peer_stream->get_var(var); - - ERR_CONTINUE(err != OK); - ERR_CONTINUE(var.get_type() != Variant::ARRAY); - - Array cmd = var; - - ERR_CONTINUE(cmd.size() == 0); - ERR_CONTINUE(cmd[0].get_type() != Variant::STRING); - - String command = cmd[0]; - //cmd.remove(0); - - if (command == "break") { - - if (get_break_language()) - debug(get_break_language()); - } else if (command == "request_scene_tree") { - -#ifdef DEBUG_ENABLED - if (scene_tree) - scene_tree->_debugger_request_tree(); -#endif - } else if (command == "request_video_mem") { - - _send_video_memory(); - } else if (command == "inspect_object") { - - ObjectID id = cmd[1]; - _send_object_id(id); - } else if (command == "set_object_property") { - - _set_object_property(cmd[1], cmd[2], cmd[3]); - - } else if (command == "start_profiling") { - - for (int i = 0; i < ScriptServer::get_language_count(); i++) { - ScriptServer::get_language(i)->profiling_start(); - } - - max_frame_functions = cmd[1]; - profiler_function_signature_map.clear(); - profiling = true; - frame_time = 0; - idle_time = 0; - physics_time = 0; - physics_frame_time = 0; - - print_line("PROFILING ALRIGHT!"); - - } else if (command == "stop_profiling") { - - for (int i = 0; i < ScriptServer::get_language_count(); i++) { - ScriptServer::get_language(i)->profiling_stop(); - } - profiling = false; - _send_profiling_data(false); - print_line("PROFILING END!"); - } else if (command == "start_visual_profiling") { - - visual_profiling = true; - VS::get_singleton()->set_frame_profiling_enabled(true); - } else if (command == "stop_visual_profiling") { - - visual_profiling = false; - VS::get_singleton()->set_frame_profiling_enabled(false); - } else if (command == "start_network_profiling") { - - network_profiling = true; - multiplayer->profiling_start(); - } else if (command == "stop_network_profiling") { - - network_profiling = false; - multiplayer->profiling_end(); - } else if (command == "override_camera_2D:set") { - bool enforce = cmd[1]; - - if (scene_tree) { - scene_tree->get_root()->enable_canvas_transform_override(enforce); - } - } else if (command == "override_camera_2D:transform") { - Transform2D transform = cmd[1]; - - if (scene_tree) { - scene_tree->get_root()->set_canvas_transform_override(transform); - } - } else if (command == "override_camera_3D:set") { - bool enable = cmd[1]; - - if (scene_tree) { - scene_tree->get_root()->enable_camera_override(enable); - } - } else if (command == "override_camera_3D:transform") { - Transform transform = cmd[1]; - bool is_perspective = cmd[2]; - float size_or_fov = cmd[3]; - float near = cmd[4]; - float far = cmd[5]; - - if (scene_tree) { - if (is_perspective) { - scene_tree->get_root()->set_camera_override_perspective(size_or_fov, near, far); - } else { - scene_tree->get_root()->set_camera_override_orthogonal(size_or_fov, near, far); - } - scene_tree->get_root()->set_camera_override_transform(transform); - } - - } else if (command == "reload_scripts") { - reload_all_scripts = true; - } else if (command == "breakpoint") { - - bool set = cmd[3]; - if (set) - insert_breakpoint(cmd[2], cmd[1]); - else - remove_breakpoint(cmd[2], cmd[1]); - } else if (command == "set_skip_breakpoints") { - skip_breakpoints = cmd[1]; - } else { - _parse_live_edit(cmd); - } - } -} - -void ScriptDebuggerRemote::_send_profiling_data(bool p_for_frame) { - - int ofs = 0; - - for (int i = 0; i < ScriptServer::get_language_count(); i++) { - if (p_for_frame) - ofs += ScriptServer::get_language(i)->profiling_get_frame_data(&profile_info.write[ofs], profile_info.size() - ofs); - else - ofs += ScriptServer::get_language(i)->profiling_get_accumulated_data(&profile_info.write[ofs], profile_info.size() - ofs); - } - - for (int i = 0; i < ofs; i++) { - profile_info_ptrs.write[i] = &profile_info.write[i]; - } - - SortArray<ScriptLanguage::ProfilingInfo *, ProfileInfoSort> sa; - sa.sort(profile_info_ptrs.ptrw(), ofs); - - int to_send = MIN(ofs, max_frame_functions); - - //check signatures first - uint64_t total_script_time = 0; - - for (int i = 0; i < to_send; i++) { - - if (!profiler_function_signature_map.has(profile_info_ptrs[i]->signature)) { - - int idx = profiler_function_signature_map.size(); - packet_peer_stream->put_var("profile_sig"); - packet_peer_stream->put_var(2); - packet_peer_stream->put_var(profile_info_ptrs[i]->signature); - packet_peer_stream->put_var(idx); - - profiler_function_signature_map[profile_info_ptrs[i]->signature] = idx; - } - - total_script_time += profile_info_ptrs[i]->self_time; - } - - //send frames then - - if (p_for_frame) { - packet_peer_stream->put_var("profile_frame"); - packet_peer_stream->put_var(8 + profile_frame_data.size() * 2 + to_send * 4); - } else { - packet_peer_stream->put_var("profile_total"); - packet_peer_stream->put_var(8 + to_send * 4); - } - - packet_peer_stream->put_var(Engine::get_singleton()->get_frames_drawn()); //total frame time - packet_peer_stream->put_var(frame_time); //total frame time - packet_peer_stream->put_var(idle_time); //idle frame time - packet_peer_stream->put_var(physics_time); //fixed frame time - packet_peer_stream->put_var(physics_frame_time); //fixed frame time - - packet_peer_stream->put_var(USEC_TO_SEC(total_script_time)); //total script execution time - - if (p_for_frame) { - - packet_peer_stream->put_var(profile_frame_data.size()); //how many profile framedatas to send - packet_peer_stream->put_var(to_send); //how many script functions to send - for (int i = 0; i < profile_frame_data.size(); i++) { - - packet_peer_stream->put_var(profile_frame_data[i].name); - packet_peer_stream->put_var(profile_frame_data[i].data); - } - } else { - packet_peer_stream->put_var(0); //how many script functions to send - packet_peer_stream->put_var(to_send); //how many script functions to send - } - - for (int i = 0; i < to_send; i++) { - - int sig_id = -1; - - if (profiler_function_signature_map.has(profile_info_ptrs[i]->signature)) { - sig_id = profiler_function_signature_map[profile_info_ptrs[i]->signature]; - } - - packet_peer_stream->put_var(sig_id); - packet_peer_stream->put_var(profile_info_ptrs[i]->call_count); - packet_peer_stream->put_var(profile_info_ptrs[i]->total_time / 1000000.0); - packet_peer_stream->put_var(profile_info_ptrs[i]->self_time / 1000000.0); - } - - if (p_for_frame) { - profile_frame_data.clear(); - } -} - -void ScriptDebuggerRemote::idle_poll() { - - // this function is called every frame, except when there is a debugger break (::debug() in this class) - // execution stops and remains in the ::debug function - - _get_output(); - - if (requested_quit) { - - packet_peer_stream->put_var("kill_me"); - packet_peer_stream->put_var(0); - requested_quit = false; - } - - if (performance) { - - uint64_t pt = OS::get_singleton()->get_ticks_msec(); - if (pt - last_perf_time > 1000) { - - last_perf_time = pt; - int max = performance->get("MONITOR_MAX"); - Array arr; - arr.resize(max); - for (int i = 0; i < max; i++) { - arr[i] = performance->call("get_monitor", i); - } - packet_peer_stream->put_var("performance"); - packet_peer_stream->put_var(1); - packet_peer_stream->put_var(arr); - } - } - if (visual_profiling) { - Vector<VS::FrameProfileArea> profile_areas = VS::get_singleton()->get_frame_profile(); - if (profile_areas.size()) { - PoolVector<String> area_names; - PoolVector<real_t> area_times; - area_names.resize(profile_areas.size()); - area_times.resize(profile_areas.size() * 2); - { - PoolVector<String>::Write area_namesw = area_names.write(); - PoolVector<real_t>::Write area_timesw = area_times.write(); - - for (int i = 0; i < profile_areas.size(); i++) { - area_namesw[i] = profile_areas[i].name; - area_timesw[i * 2 + 0] = profile_areas[i].cpu_msec; - area_timesw[i * 2 + 1] = profile_areas[i].gpu_msec; - } - } - packet_peer_stream->put_var("visual_profile"); - packet_peer_stream->put_var(3); - packet_peer_stream->put_var(VS::get_singleton()->get_frame_profile_frame()); - packet_peer_stream->put_var(area_names); - packet_peer_stream->put_var(area_times); - } - } - - if (profiling) { - - if (skip_profile_frame) { - skip_profile_frame = false; - } else { - //send profiling info normally - _send_profiling_data(true); - } - } - - if (network_profiling) { - uint64_t pt = OS::get_singleton()->get_ticks_msec(); - if (pt - last_net_bandwidth_time > 200) { - last_net_bandwidth_time = pt; - _send_network_bandwidth_usage(); - } - if (pt - last_net_prof_time > 100) { - last_net_prof_time = pt; - _send_network_profiling_data(); - } - } - - if (reload_all_scripts) { - - for (int i = 0; i < ScriptServer::get_language_count(); i++) { - ScriptServer::get_language(i)->reload_all_scripts(); - } - reload_all_scripts = false; - } - - _poll_events(); -} - -void ScriptDebuggerRemote::_send_network_profiling_data() { - ERR_FAIL_COND(multiplayer.is_null()); - - int n_nodes = multiplayer->get_profiling_frame(&network_profile_info.write[0]); - - packet_peer_stream->put_var("network_profile"); - packet_peer_stream->put_var(n_nodes * 6); - for (int i = 0; i < n_nodes; ++i) { - packet_peer_stream->put_var(network_profile_info[i].node); - packet_peer_stream->put_var(network_profile_info[i].node_path); - packet_peer_stream->put_var(network_profile_info[i].incoming_rpc); - packet_peer_stream->put_var(network_profile_info[i].incoming_rset); - packet_peer_stream->put_var(network_profile_info[i].outgoing_rpc); - packet_peer_stream->put_var(network_profile_info[i].outgoing_rset); - } -} - -void ScriptDebuggerRemote::_send_network_bandwidth_usage() { - ERR_FAIL_COND(multiplayer.is_null()); - - int incoming_bandwidth = multiplayer->get_incoming_bandwidth_usage(); - int outgoing_bandwidth = multiplayer->get_outgoing_bandwidth_usage(); - - packet_peer_stream->put_var("network_bandwidth"); - packet_peer_stream->put_var(2); - packet_peer_stream->put_var(incoming_bandwidth); - packet_peer_stream->put_var(outgoing_bandwidth); -} - -void ScriptDebuggerRemote::send_message(const String &p_message, const Array &p_args) { - - mutex->lock(); - if (!locking && tcp_client->is_connected_to_host()) { - - if (messages.size() >= max_messages_per_frame) { - n_messages_dropped++; - } else { - Message msg; - msg.message = p_message; - msg.data = p_args; - messages.push_back(msg); - } - } - mutex->unlock(); -} - -void ScriptDebuggerRemote::send_error(const String &p_func, const String &p_file, int p_line, const String &p_err, const String &p_descr, ErrorHandlerType p_type, const Vector<ScriptLanguage::StackInfo> &p_stack_info) { - - OutputError oe; - oe.error = p_err; - oe.error_descr = p_descr; - oe.source_file = p_file; - oe.source_line = p_line; - oe.source_func = p_func; - oe.warning = p_type == ERR_HANDLER_WARNING; - uint64_t time = OS::get_singleton()->get_ticks_msec(); - oe.hr = time / 3600000; - oe.min = (time / 60000) % 60; - oe.sec = (time / 1000) % 60; - oe.msec = time % 1000; - Array cstack; - - uint64_t ticks = OS::get_singleton()->get_ticks_usec() / 1000; - msec_count += ticks - last_msec; - last_msec = ticks; - - if (msec_count > 1000) { - msec_count = 0; - - err_count = 0; - n_errors_dropped = 0; - warn_count = 0; - n_warnings_dropped = 0; - } - - cstack.resize(p_stack_info.size() * 3); - for (int i = 0; i < p_stack_info.size(); i++) { - cstack[i * 3 + 0] = p_stack_info[i].file; - cstack[i * 3 + 1] = p_stack_info[i].func; - cstack[i * 3 + 2] = p_stack_info[i].line; - } - - oe.callstack = cstack; - if (oe.warning) { - warn_count++; - } else { - err_count++; - } - - mutex->lock(); - - if (!locking && tcp_client->is_connected_to_host()) { - - if (oe.warning) { - if (warn_count > max_warnings_per_second) { - n_warnings_dropped++; - } else { - errors.push_back(oe); - } - } else { - if (err_count > max_errors_per_second) { - n_errors_dropped++; - } else { - errors.push_back(oe); - } - } - } - - mutex->unlock(); -} - -void ScriptDebuggerRemote::_print_handler(void *p_this, const String &p_string, bool p_error) { - - ScriptDebuggerRemote *sdr = (ScriptDebuggerRemote *)p_this; - - uint64_t ticks = OS::get_singleton()->get_ticks_usec() / 1000; - sdr->msec_count += ticks - sdr->last_msec; - sdr->last_msec = ticks; - - if (sdr->msec_count > 1000) { - sdr->char_count = 0; - sdr->msec_count = 0; - } - - String s = p_string; - int allowed_chars = MIN(MAX(sdr->max_cps - sdr->char_count, 0), s.length()); - - if (allowed_chars == 0) - return; - - if (allowed_chars < s.length()) { - s = s.substr(0, allowed_chars); - } - - sdr->char_count += allowed_chars; - bool overflowed = sdr->char_count >= sdr->max_cps; - - sdr->mutex->lock(); - if (!sdr->locking && sdr->tcp_client->is_connected_to_host()) { - - if (overflowed) - s += "[...]"; - - sdr->output_strings.push_back(s); - - if (overflowed) { - sdr->output_strings.push_back("[output overflow, print less text!]"); - } - } - sdr->mutex->unlock(); -} - -void ScriptDebuggerRemote::request_quit() { - - requested_quit = true; -} - -void ScriptDebuggerRemote::set_multiplayer(Ref<MultiplayerAPI> p_multiplayer) { - multiplayer = p_multiplayer; -} - -bool ScriptDebuggerRemote::is_profiling() const { - - return profiling; -} -void ScriptDebuggerRemote::add_profiling_frame_data(const StringName &p_name, const Array &p_data) { - - int idx = -1; - for (int i = 0; i < profile_frame_data.size(); i++) { - if (profile_frame_data[i].name == p_name) { - idx = i; - break; - } - } - - FrameData fd; - fd.name = p_name; - fd.data = p_data; - - if (idx == -1) { - profile_frame_data.push_back(fd); - } else { - profile_frame_data.write[idx] = fd; - } -} - -void ScriptDebuggerRemote::profiling_start() { - //ignores this, uses it via connection -} - -void ScriptDebuggerRemote::profiling_end() { - //ignores this, uses it via connection -} - -void ScriptDebuggerRemote::profiling_set_frame_times(float p_frame_time, float p_idle_time, float p_physics_time, float p_physics_frame_time) { - - frame_time = p_frame_time; - idle_time = p_idle_time; - physics_time = p_physics_time; - physics_frame_time = p_physics_frame_time; -} - -void ScriptDebuggerRemote::set_skip_breakpoints(bool p_skip_breakpoints) { - skip_breakpoints = p_skip_breakpoints; -} - -ScriptDebuggerRemote::ResourceUsageFunc ScriptDebuggerRemote::resource_usage_func = NULL; - -ScriptDebuggerRemote::ScriptDebuggerRemote() : - profiling(false), - visual_profiling(false), - network_profiling(false), - max_frame_functions(16), - skip_profile_frame(false), - reload_all_scripts(false), - tcp_client(Ref<StreamPeerTCP>(memnew(StreamPeerTCP))), - packet_peer_stream(Ref<PacketPeerStream>(memnew(PacketPeerStream))), - last_perf_time(0), - last_net_prof_time(0), - last_net_bandwidth_time(0), - performance(Engine::get_singleton()->get_singleton_object("Performance")), - requested_quit(false), - mutex(Mutex::create()), - max_messages_per_frame(GLOBAL_GET("network/limits/debugger_stdout/max_messages_per_frame")), - n_messages_dropped(0), - max_errors_per_second(GLOBAL_GET("network/limits/debugger_stdout/max_errors_per_second")), - max_warnings_per_second(GLOBAL_GET("network/limits/debugger_stdout/max_warnings_per_second")), - n_errors_dropped(0), - max_cps(GLOBAL_GET("network/limits/debugger_stdout/max_chars_per_second")), - char_count(0), - err_count(0), - warn_count(0), - last_msec(0), - msec_count(0), - locking(false), - poll_every(0), - scene_tree(NULL) { - - packet_peer_stream->set_stream_peer(tcp_client); - packet_peer_stream->set_output_buffer_max_size((1024 * 1024 * 8) - 4); // 8 MiB should be way more than enough, minus 4 bytes for separator. - - phl.printfunc = _print_handler; - phl.userdata = this; - add_print_handler(&phl); - - eh.errfunc = _err_handler; - eh.userdata = this; - add_error_handler(&eh); - - profile_info.resize(GLOBAL_GET("debug/settings/profiler/max_functions")); - network_profile_info.resize(GLOBAL_GET("debug/settings/profiler/max_functions")); - profile_info_ptrs.resize(profile_info.size()); -} - -ScriptDebuggerRemote::~ScriptDebuggerRemote() { - - remove_print_handler(&phl); - remove_error_handler(&eh); - memdelete(mutex); -} diff --git a/scene/gui/button.cpp b/scene/gui/button.cpp index 04ff11f20c..784d298bff 100644 --- a/scene/gui/button.cpp +++ b/scene/gui/button.cpp @@ -106,7 +106,7 @@ void Button::_notification(int p_what) { break; } - FALLTHROUGH; + [[fallthrough]]; } case DRAW_PRESSED: { diff --git a/scene/gui/color_picker.cpp b/scene/gui/color_picker.cpp index 68c12c38fa..cb71128424 100644 --- a/scene/gui/color_picker.cpp +++ b/scene/gui/color_picker.cpp @@ -59,7 +59,7 @@ void ColorPicker::_notification(int p_what) { #ifdef TOOLS_ENABLED if (Engine::get_singleton()->is_editor_hint()) { - PoolColorArray saved_presets = EditorSettings::get_singleton()->get_project_metadata("color_picker", "presets", PoolColorArray()); + PackedColorArray saved_presets = EditorSettings::get_singleton()->get_project_metadata("color_picker", "presets", PackedColorArray()); for (int i = 0; i < saved_presets.size(); i++) { add_preset(saved_presets[i]); @@ -295,7 +295,7 @@ void ColorPicker::add_preset(const Color &p_color) { #ifdef TOOLS_ENABLED if (Engine::get_singleton()->is_editor_hint()) { - PoolColorArray arr_to_save = get_presets(); + PackedColorArray arr_to_save = get_presets(); EditorSettings::get_singleton()->set_project_metadata("color_picker", "presets", arr_to_save); } #endif @@ -309,16 +309,16 @@ void ColorPicker::erase_preset(const Color &p_color) { #ifdef TOOLS_ENABLED if (Engine::get_singleton()->is_editor_hint()) { - PoolColorArray arr_to_save = get_presets(); + PackedColorArray arr_to_save = get_presets(); EditorSettings::get_singleton()->set_project_metadata("color_picker", "presets", arr_to_save); } #endif } } -PoolColorArray ColorPicker::get_presets() const { +PackedColorArray ColorPicker::get_presets() const { - PoolColorArray arr; + PackedColorArray arr; arr.resize(presets.size()); for (int i = 0; i < presets.size(); i++) { arr.set(i, presets[i]); @@ -593,10 +593,10 @@ void ColorPicker::_screen_input(const Ref<InputEvent> &p_event) { Ref<Image> img = r->get_texture()->get_data(); if (img.is_valid() && !img->empty()) { - img->lock(); + Vector2 ofs = mev->get_global_position() - r->get_visible_rect().get_position(); Color c = img->get_pixel(ofs.x, r->get_visible_rect().size.height - ofs.y); - img->unlock(); + set_pick_color(c); } } @@ -615,9 +615,9 @@ void ColorPicker::_screen_pick_pressed() { screen->set_as_toplevel(true); screen->set_anchors_and_margins_preset(Control::PRESET_WIDE); screen->set_default_cursor_shape(CURSOR_POINTING_HAND); - screen->connect("gui_input", this, "_screen_input"); + screen->connect_compat("gui_input", this, "_screen_input"); // It immediately toggles off in the first press otherwise. - screen->call_deferred("connect", "hide", btn_pick, "set_pressed", varray(false)); + screen->call_deferred("connect", "hide", Callable(btn_pick, "set_pressed"), varray(false)); } screen->raise(); screen->show_modal(); @@ -667,6 +667,7 @@ void ColorPicker::set_presets_visible(bool p_visible) { presets_visible = p_visible; preset_separator->set_visible(p_visible); preset_container->set_visible(p_visible); + preset_container2->set_visible(p_visible); } bool ColorPicker::are_presets_visible() const { @@ -741,20 +742,20 @@ ColorPicker::ColorPicker() : uv_edit = memnew(Control); hb_edit->add_child(uv_edit); - uv_edit->connect("gui_input", this, "_uv_input"); + uv_edit->connect_compat("gui_input", this, "_uv_input"); 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->set_custom_minimum_size(Size2(get_constant("sv_width"), get_constant("sv_height"))); - uv_edit->connect("draw", this, "_hsv_draw", make_binds(0, uv_edit)); + uv_edit->connect_compat("draw", this, "_hsv_draw", make_binds(0, uv_edit)); w_edit = memnew(Control); hb_edit->add_child(w_edit); w_edit->set_custom_minimum_size(Size2(get_constant("h_width"), 0)); w_edit->set_h_size_flags(SIZE_FILL); w_edit->set_v_size_flags(SIZE_EXPAND_FILL); - w_edit->connect("gui_input", this, "_w_input"); - w_edit->connect("draw", this, "_hsv_draw", make_binds(1, w_edit)); + w_edit->connect_compat("gui_input", this, "_w_input"); + w_edit->connect_compat("draw", this, "_hsv_draw", make_binds(1, w_edit)); HBoxContainer *hb_smpl = memnew(HBoxContainer); add_child(hb_smpl); @@ -762,13 +763,13 @@ ColorPicker::ColorPicker() : sample = memnew(TextureRect); hb_smpl->add_child(sample); sample->set_h_size_flags(SIZE_EXPAND_FILL); - sample->connect("draw", this, "_sample_draw"); + sample->connect_compat("draw", this, "_sample_draw"); btn_pick = memnew(ToolButton); hb_smpl->add_child(btn_pick); btn_pick->set_toggle_mode(true); btn_pick->set_tooltip(TTR("Pick a color from the editor window.")); - btn_pick->connect("pressed", this, "_screen_pick_pressed"); + btn_pick->connect_compat("pressed", this, "_screen_pick_pressed"); VBoxContainer *vbl = memnew(VBoxContainer); add_child(vbl); @@ -796,14 +797,14 @@ ColorPicker::ColorPicker() : values[i] = memnew(SpinBox); scroll[i]->share(values[i]); hbc->add_child(values[i]); - values[i]->get_line_edit()->connect("focus_entered", this, "_focus_enter"); - values[i]->get_line_edit()->connect("focus_exited", this, "_focus_exit"); + values[i]->get_line_edit()->connect_compat("focus_entered", this, "_focus_enter"); + values[i]->get_line_edit()->connect_compat("focus_exited", this, "_focus_exit"); scroll[i]->set_min(0); scroll[i]->set_page(0); scroll[i]->set_h_size_flags(SIZE_EXPAND_FILL); - scroll[i]->connect("value_changed", this, "_value_changed"); + scroll[i]->connect_compat("value_changed", this, "_value_changed"); vbr->add_child(hbc); } @@ -815,12 +816,12 @@ ColorPicker::ColorPicker() : btn_hsv = memnew(CheckButton); hhb->add_child(btn_hsv); btn_hsv->set_text(TTR("HSV")); - btn_hsv->connect("toggled", this, "set_hsv_mode"); + btn_hsv->connect_compat("toggled", this, "set_hsv_mode"); btn_raw = memnew(CheckButton); hhb->add_child(btn_raw); btn_raw->set_text(TTR("Raw")); - btn_raw->connect("toggled", this, "set_raw_mode"); + btn_raw->connect_compat("toggled", this, "set_raw_mode"); text_type = memnew(Button); hhb->add_child(text_type); @@ -831,7 +832,7 @@ ColorPicker::ColorPicker() : #ifdef TOOLS_ENABLED text_type->set_custom_minimum_size(Size2(28 * EDSCALE, 0)); // Adjust for the width of the "Script" icon. #endif - text_type->connect("pressed", this, "_text_type_toggled"); + text_type->connect_compat("pressed", this, "_text_type_toggled"); } else { text_type->set_flat(true); @@ -841,9 +842,9 @@ ColorPicker::ColorPicker() : c_text = memnew(LineEdit); hhb->add_child(c_text); c_text->set_h_size_flags(SIZE_EXPAND_FILL); - c_text->connect("text_entered", this, "_html_entered"); - c_text->connect("focus_entered", this, "_focus_enter"); - c_text->connect("focus_exited", this, "_html_focus_exit"); + c_text->connect_compat("text_entered", this, "_html_entered"); + c_text->connect_compat("focus_entered", this, "_focus_enter"); + c_text->connect_compat("focus_exited", this, "_html_focus_exit"); _update_controls(); updating = false; @@ -859,8 +860,8 @@ ColorPicker::ColorPicker() : preset = memnew(TextureRect); preset_container->add_child(preset); - preset->connect("gui_input", this, "_preset_input"); - preset->connect("draw", this, "_update_presets"); + preset->connect_compat("gui_input", this, "_preset_input"); + preset->connect_compat("draw", this, "_update_presets"); preset_container2 = memnew(HBoxContainer); preset_container2->set_h_size_flags(SIZE_EXPAND_FILL); @@ -868,7 +869,7 @@ ColorPicker::ColorPicker() : bt_add_preset = memnew(Button); preset_container2->add_child(bt_add_preset); bt_add_preset->set_tooltip(TTR("Add current color as a preset.")); - bt_add_preset->connect("pressed", this, "_add_preset_pressed"); + bt_add_preset->connect_compat("pressed", this, "_add_preset_pressed"); } ///////////////// @@ -968,10 +969,10 @@ void ColorPickerButton::_update_picker() { picker = memnew(ColorPicker); popup->add_child(picker); add_child(popup); - picker->connect("color_changed", this, "_color_changed"); - popup->connect("modal_closed", this, "_modal_closed"); - popup->connect("about_to_show", this, "set_pressed", varray(true)); - popup->connect("popup_hide", this, "set_pressed", varray(false)); + picker->connect_compat("color_changed", this, "_color_changed"); + popup->connect_compat("modal_closed", this, "_modal_closed"); + popup->connect_compat("about_to_show", this, "set_pressed", varray(true)); + popup->connect_compat("popup_hide", this, "set_pressed", varray(false)); picker->set_pick_color(color); picker->set_edit_alpha(edit_alpha); emit_signal("picker_created"); diff --git a/scene/gui/color_picker.h b/scene/gui/color_picker.h index 49d36dfb3a..dde2f37135 100644 --- a/scene/gui/color_picker.h +++ b/scene/gui/color_picker.h @@ -116,7 +116,7 @@ public: void add_preset(const Color &p_color); void erase_preset(const Color &p_color); - PoolColorArray get_presets() const; + PackedColorArray get_presets() const; void set_hsv_mode(bool p_enabled); bool is_hsv_mode() const; diff --git a/scene/gui/container.cpp b/scene/gui/container.cpp index b411f563b8..f6ce0c9a60 100644 --- a/scene/gui/container.cpp +++ b/scene/gui/container.cpp @@ -48,9 +48,9 @@ void Container::add_child_notify(Node *p_child) { if (!control) return; - control->connect("size_flags_changed", this, "queue_sort"); - control->connect("minimum_size_changed", this, "_child_minsize_changed"); - control->connect("visibility_changed", this, "_child_minsize_changed"); + control->connect_compat("size_flags_changed", this, "queue_sort"); + control->connect_compat("minimum_size_changed", this, "_child_minsize_changed"); + control->connect_compat("visibility_changed", this, "_child_minsize_changed"); minimum_size_changed(); queue_sort(); @@ -75,9 +75,9 @@ void Container::remove_child_notify(Node *p_child) { if (!control) return; - control->disconnect("size_flags_changed", this, "queue_sort"); - control->disconnect("minimum_size_changed", this, "_child_minsize_changed"); - control->disconnect("visibility_changed", this, "_child_minsize_changed"); + control->disconnect_compat("size_flags_changed", this, "queue_sort"); + control->disconnect_compat("minimum_size_changed", this, "_child_minsize_changed"); + control->disconnect_compat("visibility_changed", this, "_child_minsize_changed"); minimum_size_changed(); queue_sort(); diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp index b7bc2f9c9e..d3027b606d 100644 --- a/scene/gui/control.cpp +++ b/scene/gui/control.cpp @@ -221,28 +221,28 @@ bool Control::_set(const StringName &p_name, const Variant &p_value) { if (name.begins_with("custom_icons/")) { String dname = name.get_slicec('/', 1); if (data.icon_override.has(dname)) { - data.icon_override[dname]->disconnect("changed", this, "_override_changed"); + data.icon_override[dname]->disconnect_compat("changed", this, "_override_changed"); } data.icon_override.erase(dname); notification(NOTIFICATION_THEME_CHANGED); } else if (name.begins_with("custom_shaders/")) { String dname = name.get_slicec('/', 1); if (data.shader_override.has(dname)) { - data.shader_override[dname]->disconnect("changed", this, "_override_changed"); + data.shader_override[dname]->disconnect_compat("changed", this, "_override_changed"); } data.shader_override.erase(dname); notification(NOTIFICATION_THEME_CHANGED); } else if (name.begins_with("custom_styles/")) { String dname = name.get_slicec('/', 1); if (data.style_override.has(dname)) { - data.style_override[dname]->disconnect("changed", this, "_override_changed"); + data.style_override[dname]->disconnect_compat("changed", this, "_override_changed"); } data.style_override.erase(dname); notification(NOTIFICATION_THEME_CHANGED); } else if (name.begins_with("custom_fonts/")) { String dname = name.get_slicec('/', 1); if (data.font_override.has(dname)) { - data.font_override[dname]->disconnect("changed", this, "_override_changed"); + data.font_override[dname]->disconnect_compat("changed", this, "_override_changed"); } data.font_override.erase(dname); notification(NOTIFICATION_THEME_CHANGED); @@ -542,10 +542,10 @@ void Control::_notification(int p_notification) { if (data.parent_canvas_item) { - data.parent_canvas_item->connect("item_rect_changed", this, "_size_changed"); + data.parent_canvas_item->connect_compat("item_rect_changed", this, "_size_changed"); } else { //connect viewport - get_viewport()->connect("size_changed", this, "_size_changed"); + get_viewport()->connect_compat("size_changed", this, "_size_changed"); } } @@ -561,11 +561,11 @@ void Control::_notification(int p_notification) { if (data.parent_canvas_item) { - data.parent_canvas_item->disconnect("item_rect_changed", this, "_size_changed"); + data.parent_canvas_item->disconnect_compat("item_rect_changed", this, "_size_changed"); data.parent_canvas_item = NULL; } else if (!is_set_as_toplevel()) { //disconnect viewport - get_viewport()->disconnect("size_changed", this, "_size_changed"); + get_viewport()->disconnect_compat("size_changed", this, "_size_changed"); } if (data.MI) { @@ -687,9 +687,9 @@ bool Control::has_point(const Point2 &p_point) const { if (get_script_instance()) { Variant v = p_point; const Variant *p = &v; - Variant::CallError ce; + Callable::CallError ce; Variant ret = get_script_instance()->call(SceneStringNames::get_singleton()->has_point, &p, 1, ce); - if (ce.error == Variant::CallError::CALL_OK) { + if (ce.error == Callable::CallError::CALL_OK) { return ret; } } @@ -721,9 +721,9 @@ Variant Control::get_drag_data(const Point2 &p_point) { if (get_script_instance()) { Variant v = p_point; const Variant *p = &v; - Variant::CallError ce; + Callable::CallError ce; Variant ret = get_script_instance()->call(SceneStringNames::get_singleton()->get_drag_data, &p, 1, ce); - if (ce.error == Variant::CallError::CALL_OK) + if (ce.error == Callable::CallError::CALL_OK) return ret; } @@ -743,9 +743,9 @@ bool Control::can_drop_data(const Point2 &p_point, const Variant &p_data) const if (get_script_instance()) { Variant v = p_point; const Variant *p[2] = { &v, &p_data }; - Variant::CallError ce; + Callable::CallError ce; Variant ret = get_script_instance()->call(SceneStringNames::get_singleton()->can_drop_data, p, 2, ce); - if (ce.error == Variant::CallError::CALL_OK) + if (ce.error == Callable::CallError::CALL_OK) return ret; } @@ -765,9 +765,9 @@ void Control::drop_data(const Point2 &p_point, const Variant &p_data) { if (get_script_instance()) { Variant v = p_point; const Variant *p[2] = { &v, &p_data }; - Variant::CallError ce; + Callable::CallError ce; Variant ret = get_script_instance()->call(SceneStringNames::get_singleton()->drop_data, p, 2, ce); - if (ce.error == Variant::CallError::CALL_OK) + if (ce.error == Callable::CallError::CALL_OK) return; } } @@ -805,9 +805,9 @@ Size2 Control::get_minimum_size() const { ScriptInstance *si = const_cast<Control *>(this)->get_script_instance(); if (si) { - Variant::CallError ce; + Callable::CallError ce; Variant s = si->call(SceneStringNames::get_singleton()->_get_minimum_size, NULL, 0, ce); - if (ce.error == Variant::CallError::CALL_OK) + if (ce.error == Callable::CallError::CALL_OK) return s; } return Size2(); @@ -1883,7 +1883,7 @@ Rect2 Control::get_anchorable_rect() const { void Control::add_icon_override(const StringName &p_name, const Ref<Texture2D> &p_icon) { if (data.icon_override.has(p_name)) { - data.icon_override[p_name]->disconnect("changed", this, "_override_changed"); + data.icon_override[p_name]->disconnect_compat("changed", this, "_override_changed"); } // clear if "null" is passed instead of a icon @@ -1892,7 +1892,7 @@ void Control::add_icon_override(const StringName &p_name, const Ref<Texture2D> & } else { data.icon_override[p_name] = p_icon; if (data.icon_override[p_name].is_valid()) { - data.icon_override[p_name]->connect("changed", this, "_override_changed", Vector<Variant>(), CONNECT_REFERENCE_COUNTED); + data.icon_override[p_name]->connect_compat("changed", this, "_override_changed", Vector<Variant>(), CONNECT_REFERENCE_COUNTED); } } notification(NOTIFICATION_THEME_CHANGED); @@ -1901,7 +1901,7 @@ void Control::add_icon_override(const StringName &p_name, const Ref<Texture2D> & void Control::add_shader_override(const StringName &p_name, const Ref<Shader> &p_shader) { if (data.shader_override.has(p_name)) { - data.shader_override[p_name]->disconnect("changed", this, "_override_changed"); + data.shader_override[p_name]->disconnect_compat("changed", this, "_override_changed"); } // clear if "null" is passed instead of a shader @@ -1910,7 +1910,7 @@ void Control::add_shader_override(const StringName &p_name, const Ref<Shader> &p } else { data.shader_override[p_name] = p_shader; if (data.shader_override[p_name].is_valid()) { - data.shader_override[p_name]->connect("changed", this, "_override_changed", Vector<Variant>(), CONNECT_REFERENCE_COUNTED); + data.shader_override[p_name]->connect_compat("changed", this, "_override_changed", Vector<Variant>(), CONNECT_REFERENCE_COUNTED); } } notification(NOTIFICATION_THEME_CHANGED); @@ -1918,7 +1918,7 @@ void Control::add_shader_override(const StringName &p_name, const Ref<Shader> &p void Control::add_style_override(const StringName &p_name, const Ref<StyleBox> &p_style) { if (data.style_override.has(p_name)) { - data.style_override[p_name]->disconnect("changed", this, "_override_changed"); + data.style_override[p_name]->disconnect_compat("changed", this, "_override_changed"); } // clear if "null" is passed instead of a style @@ -1927,7 +1927,7 @@ void Control::add_style_override(const StringName &p_name, const Ref<StyleBox> & } else { data.style_override[p_name] = p_style; if (data.style_override[p_name].is_valid()) { - data.style_override[p_name]->connect("changed", this, "_override_changed", Vector<Variant>(), CONNECT_REFERENCE_COUNTED); + data.style_override[p_name]->connect_compat("changed", this, "_override_changed", Vector<Variant>(), CONNECT_REFERENCE_COUNTED); } } notification(NOTIFICATION_THEME_CHANGED); @@ -1936,7 +1936,7 @@ void Control::add_style_override(const StringName &p_name, const Ref<StyleBox> & void Control::add_font_override(const StringName &p_name, const Ref<Font> &p_font) { if (data.font_override.has(p_name)) { - data.font_override[p_name]->disconnect("changed", this, "_override_changed"); + data.font_override[p_name]->disconnect_compat("changed", this, "_override_changed"); } // clear if "null" is passed instead of a font @@ -1945,7 +1945,7 @@ void Control::add_font_override(const StringName &p_name, const Ref<Font> &p_fon } else { data.font_override[p_name] = p_font; if (data.font_override[p_name].is_valid()) { - data.font_override[p_name]->connect("changed", this, "_override_changed", Vector<Variant>(), CONNECT_REFERENCE_COUNTED); + data.font_override[p_name]->connect_compat("changed", this, "_override_changed", Vector<Variant>(), CONNECT_REFERENCE_COUNTED); } } notification(NOTIFICATION_THEME_CHANGED); @@ -2262,7 +2262,7 @@ void Control::set_theme(const Ref<Theme> &p_theme) { return; if (data.theme.is_valid()) { - data.theme->disconnect("changed", this, "_theme_changed"); + data.theme->disconnect_compat("changed", this, "_theme_changed"); } data.theme = p_theme; @@ -2282,7 +2282,7 @@ void Control::set_theme(const Ref<Theme> &p_theme) { } if (data.theme.is_valid()) { - data.theme->connect("changed", this, "_theme_changed", varray(), CONNECT_DEFERRED); + data.theme->connect_compat("changed", this, "_theme_changed", varray(), CONNECT_DEFERRED); } } @@ -2625,9 +2625,9 @@ bool Control::is_text_field() const { if (get_script_instance()) { Variant v=p_point; const Variant *p[2]={&v,&p_data}; - Variant::CallError ce; + Callable::CallError ce; Variant ret = get_script_instance()->call("is_text_field",p,2,ce); - if (ce.error==Variant::CallError::CALL_OK) + if (ce.error==Callable::CallError::CALL_OK) return ret; } */ @@ -2959,10 +2959,10 @@ void Control::_bind_methods() { BIND_VMETHOD(MethodInfo(Variant::BOOL, "_clips_input")); ADD_GROUP("Anchor", "anchor_"); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "anchor_left", PROPERTY_HINT_RANGE, "0,1,0.001,or_lesser,or_greater"), "_set_anchor", "get_anchor", MARGIN_LEFT); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "anchor_top", PROPERTY_HINT_RANGE, "0,1,0.001,or_lesser,or_greater"), "_set_anchor", "get_anchor", MARGIN_TOP); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "anchor_right", PROPERTY_HINT_RANGE, "0,1,0.001,or_lesser,or_greater"), "_set_anchor", "get_anchor", MARGIN_RIGHT); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "anchor_bottom", PROPERTY_HINT_RANGE, "0,1,0.001,or_lesser,or_greater"), "_set_anchor", "get_anchor", MARGIN_BOTTOM); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "anchor_left", PROPERTY_HINT_RANGE, "0,1,0.001,or_lesser,or_greater"), "_set_anchor", "get_anchor", MARGIN_LEFT); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "anchor_top", PROPERTY_HINT_RANGE, "0,1,0.001,or_lesser,or_greater"), "_set_anchor", "get_anchor", MARGIN_TOP); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "anchor_right", PROPERTY_HINT_RANGE, "0,1,0.001,or_lesser,or_greater"), "_set_anchor", "get_anchor", MARGIN_RIGHT); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "anchor_bottom", PROPERTY_HINT_RANGE, "0,1,0.001,or_lesser,or_greater"), "_set_anchor", "get_anchor", MARGIN_BOTTOM); ADD_GROUP("Margin", "margin_"); ADD_PROPERTYI(PropertyInfo(Variant::INT, "margin_left", PROPERTY_HINT_RANGE, "-4096,4096"), "set_margin", "get_margin", MARGIN_LEFT); @@ -2979,7 +2979,7 @@ void Control::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "rect_global_position", PROPERTY_HINT_NONE, "", 0), "_set_global_position", "get_global_position"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "rect_size", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR), "_set_size", "get_size"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "rect_min_size"), "set_custom_minimum_size", "get_custom_minimum_size"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "rect_rotation", PROPERTY_HINT_RANGE, "-360,360,0.1,or_lesser,or_greater"), "set_rotation_degrees", "get_rotation_degrees"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "rect_rotation", PROPERTY_HINT_RANGE, "-360,360,0.1,or_lesser,or_greater"), "set_rotation_degrees", "get_rotation_degrees"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "rect_scale"), "set_scale", "get_scale"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "rect_pivot_offset"), "set_pivot_offset", "get_pivot_offset"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "rect_clip_content"), "set_clip_contents", "is_clipping_contents"); @@ -3003,7 +3003,7 @@ void Control::_bind_methods() { ADD_GROUP("Size Flags", "size_flags_"); ADD_PROPERTY(PropertyInfo(Variant::INT, "size_flags_horizontal", PROPERTY_HINT_FLAGS, "Fill,Expand,Shrink Center,Shrink End"), "set_h_size_flags", "get_h_size_flags"); ADD_PROPERTY(PropertyInfo(Variant::INT, "size_flags_vertical", PROPERTY_HINT_FLAGS, "Fill,Expand,Shrink Center,Shrink End"), "set_v_size_flags", "get_v_size_flags"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "size_flags_stretch_ratio", PROPERTY_HINT_RANGE, "0,128,0.01"), "set_stretch_ratio", "get_stretch_ratio"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "size_flags_stretch_ratio", PROPERTY_HINT_RANGE, "0,128,0.01"), "set_stretch_ratio", "get_stretch_ratio"); ADD_GROUP("Theme", ""); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "theme", PROPERTY_HINT_RESOURCE_TYPE, "Theme"), "set_theme", "get_theme"); ADD_GROUP("", ""); diff --git a/scene/gui/dialogs.cpp b/scene/gui/dialogs.cpp index e0e88e1577..152738420a 100644 --- a/scene/gui/dialogs.cpp +++ b/scene/gui/dialogs.cpp @@ -347,7 +347,7 @@ WindowDialog::WindowDialog() { resizable = false; close_button = memnew(TextureButton); add_child(close_button); - close_button->connect("pressed", this, "_closed"); + close_button->connect_compat("pressed", this, "_closed"); #ifdef TOOLS_ENABLED was_editor_dimmed = false; @@ -446,7 +446,7 @@ void AcceptDialog::register_text_enter(Node *p_line_edit) { ERR_FAIL_NULL(p_line_edit); LineEdit *line_edit = Object::cast_to<LineEdit>(p_line_edit); if (line_edit) - line_edit->connect("text_entered", this, "_builtin_text_entered"); + line_edit->connect_compat("text_entered", this, "_builtin_text_entered"); } void AcceptDialog::_update_child_rects() { @@ -531,7 +531,7 @@ Button *AcceptDialog::add_button(const String &p_text, bool p_right, const Strin } if (p_action != "") { - button->connect("pressed", this, "_custom_action", varray(p_action)); + button->connect_compat("pressed", this, "_custom_action", varray(p_action)); } return button; @@ -543,7 +543,7 @@ Button *AcceptDialog::add_cancel(const String &p_cancel) { if (p_cancel == "") c = RTR("Cancel"); Button *b = swap_ok_cancel ? add_button(c, true) : add_button(c); - b->connect("pressed", this, "_closed"); + b->connect_compat("pressed", this, "_closed"); return b; } @@ -565,7 +565,7 @@ void AcceptDialog::_bind_methods() { ClassDB::bind_method(D_METHOD("has_autowrap"), &AcceptDialog::has_autowrap); ADD_SIGNAL(MethodInfo("confirmed")); - ADD_SIGNAL(MethodInfo("custom_action", PropertyInfo(Variant::STRING, "action"))); + ADD_SIGNAL(MethodInfo("custom_action", PropertyInfo(Variant::STRING_NAME, "action"))); ADD_GROUP("Dialog", "dialog"); ADD_PROPERTY(PropertyInfo(Variant::STRING, "dialog_text", PROPERTY_HINT_MULTILINE_TEXT, "", PROPERTY_USAGE_DEFAULT_INTL), "set_text", "get_text"); @@ -600,7 +600,7 @@ AcceptDialog::AcceptDialog() { hbc->add_child(ok); hbc->add_spacer(); - ok->connect("pressed", this, "_ok"); + ok->connect_compat("pressed", this, "_ok"); set_as_toplevel(true); hide_on_ok = true; diff --git a/scene/gui/file_dialog.cpp b/scene/gui/file_dialog.cpp index 6e7491e7b4..e27e7d1490 100644 --- a/scene/gui/file_dialog.cpp +++ b/scene/gui/file_dialog.cpp @@ -193,7 +193,7 @@ void FileDialog::_action_pressed() { TreeItem *ti = tree->get_next_selected(NULL); String fbase = dir_access->get_current_dir(); - PoolVector<String> files; + Vector<String> files; while (ti) { files.push_back(fbase.plus_file(ti->get_text(0))); @@ -849,14 +849,14 @@ void FileDialog::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::BOOL, "mode_overrides_title"), "set_mode_overrides_title", "is_mode_overriding_title"); ADD_PROPERTY(PropertyInfo(Variant::INT, "mode", PROPERTY_HINT_ENUM, "Open File,Open Files,Open Folder,Open Any,Save"), "set_mode", "get_mode"); ADD_PROPERTY(PropertyInfo(Variant::INT, "access", PROPERTY_HINT_ENUM, "Resources,User data,File system"), "set_access", "get_access"); - ADD_PROPERTY(PropertyInfo(Variant::POOL_STRING_ARRAY, "filters"), "set_filters", "get_filters"); + ADD_PROPERTY(PropertyInfo(Variant::PACKED_STRING_ARRAY, "filters"), "set_filters", "get_filters"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "show_hidden_files"), "set_show_hidden_files", "is_showing_hidden_files"); ADD_PROPERTY(PropertyInfo(Variant::STRING, "current_dir"), "set_current_dir", "get_current_dir"); ADD_PROPERTY(PropertyInfo(Variant::STRING, "current_file"), "set_current_file", "get_current_file"); ADD_PROPERTY(PropertyInfo(Variant::STRING, "current_path"), "set_current_path", "get_current_path"); ADD_SIGNAL(MethodInfo("file_selected", PropertyInfo(Variant::STRING, "path"))); - ADD_SIGNAL(MethodInfo("files_selected", PropertyInfo(Variant::POOL_STRING_ARRAY, "paths"))); + ADD_SIGNAL(MethodInfo("files_selected", PropertyInfo(Variant::PACKED_STRING_ARRAY, "paths"))); ADD_SIGNAL(MethodInfo("dir_selected", PropertyInfo(Variant::STRING, "dir"))); BIND_ENUM_CONSTANT(MODE_OPEN_FILE); @@ -900,11 +900,11 @@ FileDialog::FileDialog() { dir_up = memnew(ToolButton); dir_up->set_tooltip(RTR("Go to parent folder.")); hbc->add_child(dir_up); - dir_up->connect("pressed", this, "_go_up"); + dir_up->connect_compat("pressed", this, "_go_up"); drives = memnew(OptionButton); hbc->add_child(drives); - drives->connect("item_selected", this, "_select_drive"); + drives->connect_compat("item_selected", this, "_select_drive"); hbc->add_child(memnew(Label(RTR("Path:")))); dir = memnew(LineEdit); @@ -913,19 +913,19 @@ FileDialog::FileDialog() { refresh = memnew(ToolButton); refresh->set_tooltip(RTR("Refresh files.")); - refresh->connect("pressed", this, "_update_file_list"); + refresh->connect_compat("pressed", this, "_update_file_list"); hbc->add_child(refresh); show_hidden = memnew(ToolButton); show_hidden->set_toggle_mode(true); show_hidden->set_pressed(is_showing_hidden_files()); show_hidden->set_tooltip(RTR("Toggle the visibility of hidden files.")); - show_hidden->connect("toggled", this, "set_show_hidden_files"); + show_hidden->connect_compat("toggled", this, "set_show_hidden_files"); hbc->add_child(show_hidden); makedir = memnew(Button); makedir->set_text(RTR("Create Folder")); - makedir->connect("pressed", this, "_make_dir"); + makedir->connect_compat("pressed", this, "_make_dir"); hbc->add_child(makedir); vbc->add_child(hbc); @@ -950,20 +950,20 @@ FileDialog::FileDialog() { access = ACCESS_RESOURCES; _update_drives(); - connect("confirmed", this, "_action_pressed"); - tree->connect("multi_selected", this, "_tree_multi_selected", varray(), CONNECT_DEFERRED); - tree->connect("cell_selected", this, "_tree_selected", varray(), CONNECT_DEFERRED); - tree->connect("item_activated", this, "_tree_item_activated", varray()); - tree->connect("nothing_selected", this, "deselect_items"); - dir->connect("text_entered", this, "_dir_entered"); - file->connect("text_entered", this, "_file_entered"); - filter->connect("item_selected", this, "_filter_selected"); + connect_compat("confirmed", this, "_action_pressed"); + tree->connect_compat("multi_selected", this, "_tree_multi_selected", varray(), CONNECT_DEFERRED); + tree->connect_compat("cell_selected", this, "_tree_selected", varray(), CONNECT_DEFERRED); + tree->connect_compat("item_activated", this, "_tree_item_activated", varray()); + tree->connect_compat("nothing_selected", this, "deselect_items"); + dir->connect_compat("text_entered", this, "_dir_entered"); + file->connect_compat("text_entered", this, "_file_entered"); + filter->connect_compat("item_selected", this, "_filter_selected"); confirm_save = memnew(ConfirmationDialog); confirm_save->set_as_toplevel(true); add_child(confirm_save); - confirm_save->connect("confirmed", this, "_save_confirm_pressed"); + confirm_save->connect_compat("confirmed", this, "_save_confirm_pressed"); makedialog = memnew(ConfirmationDialog); makedialog->set_title(RTR("Create Folder")); @@ -974,7 +974,7 @@ FileDialog::FileDialog() { makevb->add_margin_child(RTR("Name:"), makedirname); add_child(makedialog); makedialog->register_text_enter(makedirname); - makedialog->connect("confirmed", this, "_make_dir_confirm"); + makedialog->connect_compat("confirmed", this, "_make_dir_confirm"); mkdirerr = memnew(AcceptDialog); mkdirerr->set_text(RTR("Could not create folder.")); add_child(mkdirerr); @@ -1029,10 +1029,10 @@ LineEditFileChooser::LineEditFileChooser() { button = memnew(Button); button->set_text(" .. "); add_child(button); - button->connect("pressed", this, "_browse"); + button->connect_compat("pressed", this, "_browse"); dialog = memnew(FileDialog); add_child(dialog); - dialog->connect("file_selected", this, "_chosen"); - dialog->connect("dir_selected", this, "_chosen"); - dialog->connect("files_selected", this, "_chosen"); + dialog->connect_compat("file_selected", this, "_chosen"); + dialog->connect_compat("dir_selected", this, "_chosen"); + dialog->connect_compat("files_selected", this, "_chosen"); } diff --git a/scene/gui/gradient_edit.cpp b/scene/gui/gradient_edit.cpp index 80431cefe0..98c2d3a0e9 100644 --- a/scene/gui/gradient_edit.cpp +++ b/scene/gui/gradient_edit.cpp @@ -302,8 +302,8 @@ void GradientEdit::_gui_input(const Ref<InputEvent> &p_event) { void GradientEdit::_notification(int p_what) { if (p_what == NOTIFICATION_ENTER_TREE) { - if (!picker->is_connected("color_changed", this, "_color_changed")) { - picker->connect("color_changed", this, "_color_changed"); + if (!picker->is_connected_compat("color_changed", this, "_color_changed")) { + picker->connect_compat("color_changed", this, "_color_changed"); } } if (p_what == NOTIFICATION_DRAW) { diff --git a/scene/gui/graph_edit.cpp b/scene/gui/graph_edit.cpp index c6a5e21ff8..a9bdede852 100644 --- a/scene/gui/graph_edit.cpp +++ b/scene/gui/graph_edit.cpp @@ -257,9 +257,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("offset_changed", this, "_graph_node_moved", varray(gn)); - gn->connect("raise_request", this, "_graph_node_raised", varray(gn)); - gn->connect("item_rect_changed", connections_layer, "update"); + gn->connect_compat("offset_changed", this, "_graph_node_moved", varray(gn)); + gn->connect_compat("raise_request", this, "_graph_node_raised", varray(gn)); + gn->connect_compat("item_rect_changed", connections_layer, "update"); _graph_node_moved(gn); gn->set_mouse_filter(MOUSE_FILTER_PASS); } @@ -273,8 +273,8 @@ void GraphEdit::remove_child_notify(Node *p_child) { } GraphNode *gn = Object::cast_to<GraphNode>(p_child); if (gn) { - gn->disconnect("offset_changed", this, "_graph_node_moved"); - gn->disconnect("raise_request", this, "_graph_node_raised"); + gn->disconnect_compat("offset_changed", this, "_graph_node_moved"); + gn->disconnect_compat("raise_request", this, "_graph_node_raised"); } } @@ -1315,17 +1315,17 @@ void GraphEdit::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "scroll_offset"), "set_scroll_ofs", "get_scroll_ofs"); ADD_PROPERTY(PropertyInfo(Variant::INT, "snap_distance"), "set_snap", "get_snap"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "use_snap"), "set_use_snap", "is_using_snap"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "zoom"), "set_zoom", "get_zoom"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "zoom"), "set_zoom", "get_zoom"); - ADD_SIGNAL(MethodInfo("connection_request", PropertyInfo(Variant::STRING, "from"), PropertyInfo(Variant::INT, "from_slot"), PropertyInfo(Variant::STRING, "to"), PropertyInfo(Variant::INT, "to_slot"))); - ADD_SIGNAL(MethodInfo("disconnection_request", PropertyInfo(Variant::STRING, "from"), PropertyInfo(Variant::INT, "from_slot"), PropertyInfo(Variant::STRING, "to"), PropertyInfo(Variant::INT, "to_slot"))); + ADD_SIGNAL(MethodInfo("connection_request", PropertyInfo(Variant::STRING_NAME, "from"), PropertyInfo(Variant::INT, "from_slot"), PropertyInfo(Variant::STRING_NAME, "to"), PropertyInfo(Variant::INT, "to_slot"))); + ADD_SIGNAL(MethodInfo("disconnection_request", PropertyInfo(Variant::STRING_NAME, "from"), PropertyInfo(Variant::INT, "from_slot"), PropertyInfo(Variant::STRING_NAME, "to"), PropertyInfo(Variant::INT, "to_slot"))); ADD_SIGNAL(MethodInfo("popup_request", PropertyInfo(Variant::VECTOR2, "position"))); ADD_SIGNAL(MethodInfo("duplicate_nodes_request")); ADD_SIGNAL(MethodInfo("copy_nodes_request")); ADD_SIGNAL(MethodInfo("paste_nodes_request")); ADD_SIGNAL(MethodInfo("node_selected", PropertyInfo(Variant::OBJECT, "node", PROPERTY_HINT_RESOURCE_TYPE, "Node"))); - ADD_SIGNAL(MethodInfo("connection_to_empty", PropertyInfo(Variant::STRING, "from"), PropertyInfo(Variant::INT, "from_slot"), PropertyInfo(Variant::VECTOR2, "release_position"))); - ADD_SIGNAL(MethodInfo("connection_from_empty", PropertyInfo(Variant::STRING, "to"), PropertyInfo(Variant::INT, "to_slot"), PropertyInfo(Variant::VECTOR2, "release_position"))); + ADD_SIGNAL(MethodInfo("connection_to_empty", PropertyInfo(Variant::STRING_NAME, "from"), PropertyInfo(Variant::INT, "from_slot"), PropertyInfo(Variant::VECTOR2, "release_position"))); + ADD_SIGNAL(MethodInfo("connection_from_empty", PropertyInfo(Variant::STRING_NAME, "to"), PropertyInfo(Variant::INT, "to_slot"), PropertyInfo(Variant::VECTOR2, "release_position"))); ADD_SIGNAL(MethodInfo("delete_nodes_request")); ADD_SIGNAL(MethodInfo("_begin_node_move")); ADD_SIGNAL(MethodInfo("_end_node_move")); @@ -1341,12 +1341,12 @@ GraphEdit::GraphEdit() { add_child(top_layer); top_layer->set_mouse_filter(MOUSE_FILTER_PASS); top_layer->set_anchors_and_margins_preset(Control::PRESET_WIDE); - top_layer->connect("draw", this, "_top_layer_draw"); - top_layer->connect("gui_input", this, "_top_layer_input"); + top_layer->connect_compat("draw", this, "_top_layer_draw"); + top_layer->connect_compat("gui_input", this, "_top_layer_input"); connections_layer = memnew(Control); add_child(connections_layer); - connections_layer->connect("draw", this, "_connections_layer_draw"); + connections_layer->connect_compat("draw", this, "_connections_layer_draw"); connections_layer->set_name("CLAYER"); connections_layer->set_disable_visibility_clip(true); // so it can draw freely and be offset connections_layer->set_mouse_filter(MOUSE_FILTER_IGNORE); @@ -1373,8 +1373,8 @@ GraphEdit::GraphEdit() { v_scroll->set_min(-10000); v_scroll->set_max(10000); - h_scroll->connect("value_changed", this, "_scroll_moved"); - v_scroll->connect("value_changed", this, "_scroll_moved"); + h_scroll->connect_compat("value_changed", this, "_scroll_moved"); + v_scroll->connect_compat("value_changed", this, "_scroll_moved"); zoom = 1; @@ -1385,25 +1385,25 @@ GraphEdit::GraphEdit() { zoom_minus = memnew(ToolButton); zoom_hb->add_child(zoom_minus); zoom_minus->set_tooltip(RTR("Zoom Out")); - zoom_minus->connect("pressed", this, "_zoom_minus"); + zoom_minus->connect_compat("pressed", this, "_zoom_minus"); zoom_minus->set_focus_mode(FOCUS_NONE); zoom_reset = memnew(ToolButton); zoom_hb->add_child(zoom_reset); zoom_reset->set_tooltip(RTR("Zoom Reset")); - zoom_reset->connect("pressed", this, "_zoom_reset"); + zoom_reset->connect_compat("pressed", this, "_zoom_reset"); zoom_reset->set_focus_mode(FOCUS_NONE); zoom_plus = memnew(ToolButton); zoom_hb->add_child(zoom_plus); zoom_plus->set_tooltip(RTR("Zoom In")); - zoom_plus->connect("pressed", this, "_zoom_plus"); + zoom_plus->connect_compat("pressed", this, "_zoom_plus"); zoom_plus->set_focus_mode(FOCUS_NONE); snap_button = memnew(ToolButton); snap_button->set_toggle_mode(true); snap_button->set_tooltip(RTR("Enable snap and show grid.")); - snap_button->connect("pressed", this, "_snap_toggled"); + snap_button->connect_compat("pressed", this, "_snap_toggled"); snap_button->set_pressed(true); snap_button->set_focus_mode(FOCUS_NONE); zoom_hb->add_child(snap_button); @@ -1413,7 +1413,7 @@ GraphEdit::GraphEdit() { snap_amount->set_max(100); snap_amount->set_step(1); snap_amount->set_value(20); - snap_amount->connect("value_changed", this, "_snap_value_changed"); + snap_amount->connect_compat("value_changed", this, "_snap_value_changed"); zoom_hb->add_child(snap_amount); setting_scroll_ofs = false; diff --git a/scene/gui/item_list.cpp b/scene/gui/item_list.cpp index cf798f36e4..174dc65e8a 100644 --- a/scene/gui/item_list.cpp +++ b/scene/gui/item_list.cpp @@ -1561,7 +1561,7 @@ void ItemList::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::INT, "fixed_column_width", PROPERTY_HINT_RANGE, "0,100,1,or_greater"), "set_fixed_column_width", "get_fixed_column_width"); ADD_GROUP("Icon", ""); ADD_PROPERTY(PropertyInfo(Variant::INT, "icon_mode", PROPERTY_HINT_ENUM, "Top,Left"), "set_icon_mode", "get_icon_mode"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "icon_scale"), "set_icon_scale", "get_icon_scale"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "icon_scale"), "set_icon_scale", "get_icon_scale"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "fixed_icon_size"), "set_fixed_icon_size", "get_fixed_icon_size"); BIND_ENUM_CONSTANT(ICON_MODE_TOP); @@ -1599,7 +1599,7 @@ ItemList::ItemList() { add_child(scroll_bar); shape_changed = true; - scroll_bar->connect("value_changed", this, "_scroll_changed"); + scroll_bar->connect_compat("value_changed", this, "_scroll_changed"); set_focus_mode(FOCUS_ALL); current_columns = 1; diff --git a/scene/gui/label.cpp b/scene/gui/label.cpp index 9b542cb179..c900b35d65 100644 --- a/scene/gui/label.cpp +++ b/scene/gui/label.cpp @@ -687,7 +687,7 @@ void Label::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::BOOL, "clip_text"), "set_clip_text", "is_clipping_text"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "uppercase"), "set_uppercase", "is_uppercase"); ADD_PROPERTY(PropertyInfo(Variant::INT, "visible_characters", PROPERTY_HINT_RANGE, "-1,128000,1", PROPERTY_USAGE_EDITOR), "set_visible_characters", "get_visible_characters"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "percent_visible", PROPERTY_HINT_RANGE, "0,1,0.001"), "set_percent_visible", "get_percent_visible"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "percent_visible", PROPERTY_HINT_RANGE, "0,1,0.001"), "set_percent_visible", "get_percent_visible"); ADD_PROPERTY(PropertyInfo(Variant::INT, "lines_skipped", PROPERTY_HINT_RANGE, "0,999,1"), "set_lines_skipped", "get_lines_skipped"); ADD_PROPERTY(PropertyInfo(Variant::INT, "max_lines_visible", PROPERTY_HINT_RANGE, "-1,999,1"), "set_max_lines_visible", "get_max_lines_visible"); } diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp index 3f4fd37c08..fb8396e4ff 100644 --- a/scene/gui/line_edit.cpp +++ b/scene/gui/line_edit.cpp @@ -355,14 +355,23 @@ void LineEdit::_gui_input(Ref<InputEvent> p_event) { handled = false; break; } - FALLTHROUGH; + [[fallthrough]]; } case KEY_LEFT: { - #ifndef APPLE_STYLE_KEYS - if (!k->get_alt()) + if (!k->get_alt()) { #endif + if (selection.enabled && !k->get_shift()) { + set_cursor_position(selection.begin); + deselect(); + handled = true; + break; + } + shift_selection_check_pre(k->get_shift()); +#ifndef APPLE_STYLE_KEYS + } +#endif #ifdef APPLE_STYLE_KEYS if (k->get_command()) { @@ -402,11 +411,23 @@ void LineEdit::_gui_input(Ref<InputEvent> p_event) { handled = false; break; } - FALLTHROUGH; + [[fallthrough]]; } case KEY_RIGHT: { +#ifndef APPLE_STYLE_KEYS + if (!k->get_alt()) { +#endif + if (selection.enabled && !k->get_shift()) { + set_cursor_position(selection.end); + deselect(); + handled = true; + break; + } - shift_selection_check_pre(k->get_shift()); + shift_selection_check_pre(k->get_shift()); +#ifndef APPLE_STYLE_KEYS + } +#endif #ifdef APPLE_STYLE_KEYS if (k->get_command()) { @@ -509,7 +530,7 @@ void LineEdit::_gui_input(Ref<InputEvent> p_event) { handled = false; break; } - FALLTHROUGH; + [[fallthrough]]; } case KEY_HOME: { @@ -522,7 +543,7 @@ void LineEdit::_gui_input(Ref<InputEvent> p_event) { handled = false; break; } - FALLTHROUGH; + [[fallthrough]]; } case KEY_END: { @@ -648,8 +669,8 @@ void LineEdit::_notification(int p_what) { cursor_set_blink_enabled(EDITOR_DEF("text_editor/cursor/caret_blink", false)); cursor_set_blink_speed(EDITOR_DEF("text_editor/cursor/caret_blink_speed", 0.65)); - if (!EditorSettings::get_singleton()->is_connected("settings_changed", this, "_editor_settings_changed")) { - EditorSettings::get_singleton()->connect("settings_changed", this, "_editor_settings_changed"); + if (!EditorSettings::get_singleton()->is_connected_compat("settings_changed", this, "_editor_settings_changed")) { + EditorSettings::get_singleton()->connect_compat("settings_changed", this, "_editor_settings_changed"); } } } break; @@ -1832,10 +1853,10 @@ void LineEdit::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "right_icon", PROPERTY_HINT_RESOURCE_TYPE, "Texture"), "set_right_icon", "get_right_icon"); ADD_GROUP("Placeholder", "placeholder_"); ADD_PROPERTY(PropertyInfo(Variant::STRING, "placeholder_text"), "set_placeholder", "get_placeholder"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "placeholder_alpha", PROPERTY_HINT_RANGE, "0,1,0.001"), "set_placeholder_alpha", "get_placeholder_alpha"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "placeholder_alpha", PROPERTY_HINT_RANGE, "0,1,0.001"), "set_placeholder_alpha", "get_placeholder_alpha"); ADD_GROUP("Caret", "caret_"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "caret_blink"), "cursor_set_blink_enabled", "cursor_get_blink_enabled"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "caret_blink_speed", PROPERTY_HINT_RANGE, "0.1,10,0.01"), "cursor_set_blink_speed", "cursor_get_blink_speed"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "caret_blink_speed", PROPERTY_HINT_RANGE, "0.1,10,0.01"), "cursor_set_blink_speed", "cursor_get_blink_speed"); ADD_PROPERTY(PropertyInfo(Variant::INT, "caret_position"), "set_cursor_position", "get_cursor_position"); } @@ -1870,7 +1891,7 @@ LineEdit::LineEdit() { caret_blink_timer = memnew(Timer); add_child(caret_blink_timer); caret_blink_timer->set_wait_time(0.65); - caret_blink_timer->connect("timeout", this, "_toggle_draw_caret"); + caret_blink_timer->connect_compat("timeout", this, "_toggle_draw_caret"); cursor_set_blink_enabled(false); context_menu_enabled = true; @@ -1878,7 +1899,7 @@ LineEdit::LineEdit() { add_child(menu); editable = false; // Initialise to opposite first, so we get past the early-out in set_editable. set_editable(true); - menu->connect("id_pressed", this, "menu_option"); + menu->connect_compat("id_pressed", this, "menu_option"); expand_to_text_length = false; } diff --git a/scene/gui/menu_button.cpp b/scene/gui/menu_button.cpp index 6e348054e2..a211ee02ed 100644 --- a/scene/gui/menu_button.cpp +++ b/scene/gui/menu_button.cpp @@ -137,8 +137,8 @@ MenuButton::MenuButton() { popup->hide(); add_child(popup); popup->set_pass_on_modal_close_click(false); - popup->connect("about_to_show", this, "set_pressed", varray(true)); // For when switching from another MenuButton. - popup->connect("popup_hide", this, "set_pressed", varray(false)); + popup->connect_compat("about_to_show", this, "set_pressed", varray(true)); // For when switching from another MenuButton. + popup->connect_compat("popup_hide", this, "set_pressed", varray(false)); } MenuButton::~MenuButton() { diff --git a/scene/gui/option_button.cpp b/scene/gui/option_button.cpp index 6f656025e6..6488d6ce0a 100644 --- a/scene/gui/option_button.cpp +++ b/scene/gui/option_button.cpp @@ -363,9 +363,9 @@ OptionButton::OptionButton() { popup->set_pass_on_modal_close_click(false); popup->set_notify_transform(true); popup->set_allow_search(true); - popup->connect("index_pressed", this, "_selected"); - popup->connect("id_focused", this, "_focused"); - popup->connect("popup_hide", this, "set_pressed", varray(false)); + popup->connect_compat("index_pressed", this, "_selected"); + popup->connect_compat("id_focused", this, "_focused"); + popup->connect_compat("popup_hide", this, "set_pressed", varray(false)); } OptionButton::~OptionButton() { diff --git a/scene/gui/popup_menu.cpp b/scene/gui/popup_menu.cpp index b494506c6c..659d8041a2 100644 --- a/scene/gui/popup_menu.cpp +++ b/scene/gui/popup_menu.cpp @@ -1233,7 +1233,7 @@ void PopupMenu::_ref_shortcut(Ref<ShortCut> p_sc) { if (!shortcut_refcount.has(p_sc)) { shortcut_refcount[p_sc] = 1; - p_sc->connect("changed", this, "update"); + p_sc->connect_compat("changed", this, "update"); } else { shortcut_refcount[p_sc] += 1; } @@ -1244,7 +1244,7 @@ void PopupMenu::_unref_shortcut(Ref<ShortCut> p_sc) { ERR_FAIL_COND(!shortcut_refcount.has(p_sc)); shortcut_refcount[p_sc]--; if (shortcut_refcount[p_sc] == 0) { - p_sc->disconnect("changed", this, "update"); + p_sc->disconnect_compat("changed", this, "update"); shortcut_refcount.erase(p_sc); } } @@ -1477,7 +1477,7 @@ void PopupMenu::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::BOOL, "hide_on_item_selection"), "set_hide_on_item_selection", "is_hide_on_item_selection"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "hide_on_checkable_item_selection"), "set_hide_on_checkable_item_selection", "is_hide_on_checkable_item_selection"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "hide_on_state_item_selection"), "set_hide_on_state_item_selection", "is_hide_on_state_item_selection"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "submenu_popup_delay"), "set_submenu_popup_delay", "get_submenu_popup_delay"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "submenu_popup_delay"), "set_submenu_popup_delay", "get_submenu_popup_delay"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "allow_search"), "set_allow_search", "get_allow_search"); ADD_SIGNAL(MethodInfo("id_pressed", PropertyInfo(Variant::INT, "id"))); @@ -1514,7 +1514,7 @@ PopupMenu::PopupMenu() { submenu_timer = memnew(Timer); submenu_timer->set_wait_time(0.3); submenu_timer->set_one_shot(true); - submenu_timer->connect("timeout", this, "_submenu_timeout"); + submenu_timer->connect_compat("timeout", this, "_submenu_timeout"); add_child(submenu_timer); } diff --git a/scene/gui/range.cpp b/scene/gui/range.cpp index 6b6f5bca93..adc5f81465 100644 --- a/scene/gui/range.cpp +++ b/scene/gui/range.cpp @@ -267,15 +267,15 @@ void Range::_bind_methods() { ClassDB::bind_method(D_METHOD("share", "with"), &Range::_share); ClassDB::bind_method(D_METHOD("unshare"), &Range::unshare); - ADD_SIGNAL(MethodInfo("value_changed", PropertyInfo(Variant::REAL, "value"))); + ADD_SIGNAL(MethodInfo("value_changed", PropertyInfo(Variant::FLOAT, "value"))); ADD_SIGNAL(MethodInfo("changed")); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "min_value"), "set_min", "get_min"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "max_value"), "set_max", "get_max"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "step"), "set_step", "get_step"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "page"), "set_page", "get_page"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "value"), "set_value", "get_value"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "ratio", PROPERTY_HINT_RANGE, "0,1,0.01", 0), "set_as_ratio", "get_as_ratio"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "min_value"), "set_min", "get_min"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "max_value"), "set_max", "get_max"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "step"), "set_step", "get_step"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "page"), "set_page", "get_page"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "value"), "set_value", "get_value"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "ratio", PROPERTY_HINT_RANGE, "0,1,0.01", 0), "set_as_ratio", "get_as_ratio"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "exp_edit"), "set_exp_ratio", "is_ratio_exp"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "rounded"), "set_use_rounded_values", "is_using_rounded_values"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "allow_greater"), "set_allow_greater", "is_greater_allowed"); diff --git a/scene/gui/rich_text_effect.cpp b/scene/gui/rich_text_effect.cpp index c5b1685ff9..0f5926ea1c 100644 --- a/scene/gui/rich_text_effect.cpp +++ b/scene/gui/rich_text_effect.cpp @@ -91,7 +91,7 @@ void CharFXTransform::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::INT, "relative_index"), "set_relative_index", "get_relative_index"); ADD_PROPERTY(PropertyInfo(Variant::INT, "absolute_index"), "set_absolute_index", "get_absolute_index"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "elapsed_time"), "set_elapsed_time", "get_elapsed_time"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "elapsed_time"), "set_elapsed_time", "get_elapsed_time"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "visible"), "set_visibility", "is_visible"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "offset"), "set_offset", "get_offset"); ADD_PROPERTY(PropertyInfo(Variant::COLOR, "color"), "set_color", "get_color"); diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp index 0c686296b3..6282b26a5a 100644 --- a/scene/gui/rich_text_label.cpp +++ b/scene/gui/rich_text_label.cpp @@ -1208,49 +1208,59 @@ void RichTextLabel::_gui_input(Ref<InputEvent> p_event) { if (k.is_valid()) { if (k->is_pressed() && !k->get_alt() && !k->get_shift()) { - bool handled = true; + bool handled = false; switch (k->get_scancode()) { case KEY_PAGEUP: { - if (vscroll->is_visible_in_tree()) + if (vscroll->is_visible_in_tree()) { vscroll->set_value(vscroll->get_value() - vscroll->get_page()); + handled = true; + } } break; case KEY_PAGEDOWN: { - if (vscroll->is_visible_in_tree()) + if (vscroll->is_visible_in_tree()) { vscroll->set_value(vscroll->get_value() + vscroll->get_page()); + handled = true; + } } break; case KEY_UP: { - if (vscroll->is_visible_in_tree()) + if (vscroll->is_visible_in_tree()) { vscroll->set_value(vscroll->get_value() - get_font("normal_font")->get_height()); + handled = true; + } } break; case KEY_DOWN: { - if (vscroll->is_visible_in_tree()) + if (vscroll->is_visible_in_tree()) { vscroll->set_value(vscroll->get_value() + get_font("normal_font")->get_height()); + handled = true; + } } break; case KEY_HOME: { - if (vscroll->is_visible_in_tree()) + if (vscroll->is_visible_in_tree()) { vscroll->set_value(0); + handled = true; + } } break; case KEY_END: { - if (vscroll->is_visible_in_tree()) + if (vscroll->is_visible_in_tree()) { vscroll->set_value(vscroll->get_max()); + handled = true; + } } break; case KEY_INSERT: case KEY_C: { if (k->get_command()) { selection_copy(); - } else { - handled = false; + handled = true; } } break; - default: handled = false; } if (handled) @@ -2664,7 +2674,7 @@ void RichTextLabel::set_effects(const Vector<Variant> &effects) { Vector<Variant> RichTextLabel::get_effects() { Vector<Variant> r; for (int i = 0; i < custom_effects.size(); i++) { - r.push_back(custom_effects[i].get_ref_ptr()); + r.push_back(custom_effects[i]); } return r; } @@ -2771,7 +2781,7 @@ void RichTextLabel::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::STRING, "bbcode_text", PROPERTY_HINT_MULTILINE_TEXT), "set_bbcode", "get_bbcode"); ADD_PROPERTY(PropertyInfo(Variant::INT, "visible_characters", PROPERTY_HINT_RANGE, "-1,128000,1"), "set_visible_characters", "get_visible_characters"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "percent_visible", PROPERTY_HINT_RANGE, "0,1,0.001"), "set_percent_visible", "get_percent_visible"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "percent_visible", PROPERTY_HINT_RANGE, "0,1,0.001"), "set_percent_visible", "get_percent_visible"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "meta_underlined"), "set_meta_underline", "is_meta_underlined"); ADD_PROPERTY(PropertyInfo(Variant::INT, "tab_size", PROPERTY_HINT_RANGE, "0,24,1"), "set_tab_size", "get_tab_size"); @@ -2953,7 +2963,7 @@ RichTextLabel::RichTextLabel() { vscroll->set_anchor_and_margin(MARGIN_TOP, ANCHOR_BEGIN, 0); vscroll->set_anchor_and_margin(MARGIN_BOTTOM, ANCHOR_END, 0); vscroll->set_anchor_and_margin(MARGIN_RIGHT, ANCHOR_END, 0); - vscroll->connect("value_changed", this, "_scroll_changed"); + vscroll->connect_compat("value_changed", this, "_scroll_changed"); vscroll->set_step(1); vscroll->hide(); current_idx = 1; diff --git a/scene/gui/scroll_bar.cpp b/scene/gui/scroll_bar.cpp index 8e6d0843a7..3d7b6b05ae 100644 --- a/scene/gui/scroll_bar.cpp +++ b/scene/gui/scroll_bar.cpp @@ -296,15 +296,15 @@ void ScrollBar::_notification(int p_what) { } if (drag_node) { - drag_node->connect("gui_input", this, "_drag_node_input"); - drag_node->connect("tree_exiting", this, "_drag_node_exit", varray(), CONNECT_ONESHOT); + drag_node->connect_compat("gui_input", this, "_drag_node_input"); + drag_node->connect_compat("tree_exiting", this, "_drag_node_exit", varray(), CONNECT_ONESHOT); } } if (p_what == NOTIFICATION_EXIT_TREE) { if (drag_node) { - drag_node->disconnect("gui_input", this, "_drag_node_input"); - drag_node->disconnect("tree_exiting", this, "_drag_node_exit"); + drag_node->disconnect_compat("gui_input", this, "_drag_node_input"); + drag_node->disconnect_compat("tree_exiting", this, "_drag_node_exit"); } drag_node = NULL; @@ -539,7 +539,7 @@ float ScrollBar::get_custom_step() const { void ScrollBar::_drag_node_exit() { if (drag_node) { - drag_node->disconnect("gui_input", this, "_drag_node_input"); + drag_node->disconnect_compat("gui_input", this, "_drag_node_input"); } drag_node = NULL; } @@ -611,8 +611,8 @@ void ScrollBar::set_drag_node(const NodePath &p_path) { if (is_inside_tree()) { if (drag_node) { - drag_node->disconnect("gui_input", this, "_drag_node_input"); - drag_node->disconnect("tree_exiting", this, "_drag_node_exit"); + drag_node->disconnect_compat("gui_input", this, "_drag_node_input"); + drag_node->disconnect_compat("tree_exiting", this, "_drag_node_exit"); } } @@ -627,8 +627,8 @@ void ScrollBar::set_drag_node(const NodePath &p_path) { } if (drag_node) { - drag_node->connect("gui_input", this, "_drag_node_input"); - drag_node->connect("tree_exiting", this, "_drag_node_exit", varray(), CONNECT_ONESHOT); + drag_node->connect_compat("gui_input", this, "_drag_node_input"); + drag_node->connect_compat("tree_exiting", this, "_drag_node_exit", varray(), CONNECT_ONESHOT); } } } @@ -656,7 +656,7 @@ void ScrollBar::_bind_methods() { ADD_SIGNAL(MethodInfo("scrolling")); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "custom_step", PROPERTY_HINT_RANGE, "-1,4096"), "set_custom_step", "get_custom_step"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "custom_step", PROPERTY_HINT_RANGE, "-1,4096"), "set_custom_step", "get_custom_step"); } ScrollBar::ScrollBar(Orientation p_orientation) { diff --git a/scene/gui/scroll_container.cpp b/scene/gui/scroll_container.cpp index 509e6d19f6..5829a86a42 100644 --- a/scene/gui/scroll_container.cpp +++ b/scene/gui/scroll_container.cpp @@ -267,7 +267,7 @@ void ScrollContainer::_notification(int p_what) { if (p_what == NOTIFICATION_READY) { - get_viewport()->connect("gui_focus_changed", this, "_ensure_focused_visible"); + get_viewport()->connect_compat("gui_focus_changed", this, "_ensure_focused_visible"); } if (p_what == NOTIFICATION_SORT_CHILDREN) { @@ -610,12 +610,12 @@ ScrollContainer::ScrollContainer() { h_scroll = memnew(HScrollBar); h_scroll->set_name("_h_scroll"); add_child(h_scroll); - h_scroll->connect("value_changed", this, "_scroll_moved"); + h_scroll->connect_compat("value_changed", this, "_scroll_moved"); v_scroll = memnew(VScrollBar); v_scroll->set_name("_v_scroll"); add_child(v_scroll); - v_scroll->connect("value_changed", this, "_scroll_moved"); + v_scroll->connect_compat("value_changed", this, "_scroll_moved"); drag_speed = Vector2(); drag_touching = false; diff --git a/scene/gui/spin_box.cpp b/scene/gui/spin_box.cpp index c49d7f3d12..1200877127 100644 --- a/scene/gui/spin_box.cpp +++ b/scene/gui/spin_box.cpp @@ -297,12 +297,12 @@ SpinBox::SpinBox() { line_edit->set_anchors_and_margins_preset(Control::PRESET_WIDE); line_edit->set_mouse_filter(MOUSE_FILTER_PASS); //connect("value_changed",this,"_value_changed"); - line_edit->connect("text_entered", this, "_text_entered", Vector<Variant>(), CONNECT_DEFERRED); - line_edit->connect("focus_exited", this, "_line_edit_focus_exit", Vector<Variant>(), CONNECT_DEFERRED); - line_edit->connect("gui_input", this, "_line_edit_input"); + line_edit->connect_compat("text_entered", this, "_text_entered", Vector<Variant>(), CONNECT_DEFERRED); + line_edit->connect_compat("focus_exited", this, "_line_edit_focus_exit", Vector<Variant>(), CONNECT_DEFERRED); + line_edit->connect_compat("gui_input", this, "_line_edit_input"); drag.enabled = false; range_click_timer = memnew(Timer); - range_click_timer->connect("timeout", this, "_range_click_timeout"); + range_click_timer->connect_compat("timeout", this, "_range_click_timeout"); add_child(range_click_timer); } diff --git a/scene/gui/tab_container.cpp b/scene/gui/tab_container.cpp index 402623e53d..66ecbea378 100644 --- a/scene/gui/tab_container.cpp +++ b/scene/gui/tab_container.cpp @@ -537,7 +537,7 @@ void TabContainer::add_child_notify(Node *p_child) { c->set_margin(Margin(MARGIN_BOTTOM), c->get_margin(Margin(MARGIN_BOTTOM)) - sb->get_margin(Margin(MARGIN_BOTTOM))); update(); - p_child->connect("renamed", this, "_child_renamed_callback"); + p_child->connect_compat("renamed", this, "_child_renamed_callback"); if (first) emit_signal("tab_changed", current); } @@ -620,7 +620,7 @@ void TabContainer::remove_child_notify(Node *p_child) { call_deferred("_update_current_tab"); - p_child->disconnect("renamed", this, "_child_renamed_callback"); + p_child->disconnect_compat("renamed", this, "_child_renamed_callback"); update(); } @@ -1048,5 +1048,5 @@ TabContainer::TabContainer() { tabs_rearrange_group = -1; use_hidden_tabs_for_min_size = false; - connect("mouse_exited", this, "_on_mouse_exited"); + connect_compat("mouse_exited", this, "_on_mouse_exited"); } diff --git a/scene/gui/tabs.cpp b/scene/gui/tabs.cpp index 4aa7ea8cb1..ea1e6546e9 100644 --- a/scene/gui/tabs.cpp +++ b/scene/gui/tabs.cpp @@ -1034,5 +1034,5 @@ Tabs::Tabs() { drag_to_rearrange_enabled = false; tabs_rearrange_group = -1; - connect("mouse_exited", this, "_on_mouse_exited"); + connect_compat("mouse_exited", this, "_on_mouse_exited"); } diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index a5c316848e..379e70b951 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -753,10 +753,18 @@ void TextEdit::_notification(int p_what) { } } - if (line_length_guideline) { - int x = xmargin_beg + (int)cache.font->get_char_size('0').width * line_length_guideline_col - cursor.x_ofs; - if (x > xmargin_beg && x < xmargin_end) { - VisualServer::get_singleton()->canvas_item_add_line(ci, Point2(x, 0), Point2(x, size.height), cache.line_length_guideline_color); + if (line_length_guidelines) { + const int hard_x = xmargin_beg + (int)cache.font->get_char_size('0').width * line_length_guideline_hard_col - cursor.x_ofs; + if (hard_x > xmargin_beg && hard_x < xmargin_end) { + VisualServer::get_singleton()->canvas_item_add_line(ci, Point2(hard_x, 0), Point2(hard_x, size.height), cache.line_length_guideline_color); + } + + // Draw a "Soft" line length guideline, less visible than the hard line length guideline. + // It's usually set to a lower column compared to the hard line length guideline. + // Only drawn if its column differs from the hard line length guideline. + const int soft_x = xmargin_beg + (int)cache.font->get_char_size('0').width * line_length_guideline_soft_col - cursor.x_ofs; + if (hard_x != soft_x && soft_x > xmargin_beg && soft_x < xmargin_end) { + VisualServer::get_singleton()->canvas_item_add_line(ci, Point2(soft_x, 0), Point2(soft_x, size.height), cache.line_length_guideline_color * Color(1, 1, 1, 0.5)); } } @@ -1844,6 +1852,42 @@ void TextEdit::_consume_pair_symbol(CharType ch) { } } + String line = text[cursor.line]; + + bool in_single_quote = false; + bool in_double_quote = false; + + int c = 0; + while (c < line.length()) { + if (line[c] == '\\') { + c++; // Skip quoted anything. + + if (cursor.column == c) { + break; + } + } else { + if (line[c] == '\'' && !in_double_quote) { + in_single_quote = !in_single_quote; + } else if (line[c] == '"' && !in_single_quote) { + in_double_quote = !in_double_quote; + } + } + + c++; + + if (cursor.column == c) { + break; + } + } + + // Disallow inserting duplicated quotes while already in string + if ((in_single_quote || in_double_quote) && (ch == '"' || ch == '\'')) { + insert_text_at_cursor(ch_single); + cursor_set_column(cursor_position_to_move); + + return; + } + insert_text_at_cursor(ch_pair); cursor_set_column(cursor_position_to_move); } @@ -3068,7 +3112,7 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) { scancode_handled = false; break; } - FALLTHROUGH; + [[fallthrough]]; } case KEY_LEFT: { @@ -3144,7 +3188,7 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) { scancode_handled = false; break; } - FALLTHROUGH; + [[fallthrough]]; } case KEY_RIGHT: { @@ -3205,7 +3249,7 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) { scancode_handled = false; break; } - FALLTHROUGH; + [[fallthrough]]; } case KEY_UP: { @@ -3258,7 +3302,7 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) { scancode_handled = false; break; } - FALLTHROUGH; + [[fallthrough]]; } case KEY_DOWN: { @@ -3381,7 +3425,7 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) { scancode_handled = false; break; } - FALLTHROUGH; + [[fallthrough]]; } case KEY_HOME: { #ifdef APPLE_STYLE_KEYS @@ -3442,7 +3486,7 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) { scancode_handled = false; break; } - FALLTHROUGH; + [[fallthrough]]; } case KEY_END: { #ifdef APPLE_STYLE_KEYS @@ -3489,7 +3533,7 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) { scancode_handled = false; break; } - FALLTHROUGH; + [[fallthrough]]; } case KEY_PAGEUP: { @@ -3512,7 +3556,7 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) { scancode_handled = false; break; } - FALLTHROUGH; + [[fallthrough]]; } case KEY_PAGEDOWN: { @@ -5446,11 +5490,11 @@ int TextEdit::_get_column_pos_of_word(const String &p_key, const String &p_searc return col; } -PoolVector<int> TextEdit::_search_bind(const String &p_key, uint32_t p_search_flags, int p_from_line, int p_from_column) const { +Vector<int> TextEdit::_search_bind(const String &p_key, uint32_t p_search_flags, int p_from_line, int p_from_column) const { int col, line; if (search(p_key, p_search_flags, p_from_line, p_from_column, line, col)) { - PoolVector<int> result; + Vector<int> result; result.resize(2); result.set(SEARCH_RESULT_COLUMN, col); result.set(SEARCH_RESULT_LINE, line); @@ -5458,7 +5502,7 @@ PoolVector<int> TextEdit::_search_bind(const String &p_key, uint32_t p_search_fl } else { - return PoolVector<int>(); + return Vector<int>(); } } @@ -6798,13 +6842,18 @@ bool TextEdit::is_show_line_numbers_enabled() const { return line_numbers; } -void TextEdit::set_show_line_length_guideline(bool p_show) { - line_length_guideline = p_show; +void TextEdit::set_show_line_length_guidelines(bool p_show) { + line_length_guidelines = p_show; + update(); +} + +void TextEdit::set_line_length_guideline_soft_column(int p_column) { + line_length_guideline_soft_col = p_column; update(); } -void TextEdit::set_line_length_guideline_column(int p_column) { - line_length_guideline_col = p_column; +void TextEdit::set_line_length_guideline_hard_column(int p_column) { + line_length_guideline_hard_col = p_column; update(); } @@ -7147,10 +7196,10 @@ void TextEdit::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::BOOL, "shortcut_keys_enabled"), "set_shortcut_keys_enabled", "is_shortcut_keys_enabled"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "selecting_enabled"), "set_selecting_enabled", "is_selecting_enabled"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "smooth_scrolling"), "set_smooth_scroll_enable", "is_smooth_scroll_enabled"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "v_scroll_speed"), "set_v_scroll_speed", "get_v_scroll_speed"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "v_scroll_speed"), "set_v_scroll_speed", "get_v_scroll_speed"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "hiding_enabled"), "set_hiding_enabled", "is_hiding_enabled"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "wrap_enabled"), "set_wrap_enabled", "is_wrap_enabled"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "scroll_vertical"), "set_v_scroll", "get_v_scroll"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "scroll_vertical"), "set_v_scroll", "get_v_scroll"); ADD_PROPERTY(PropertyInfo(Variant::INT, "scroll_horizontal"), "set_h_scroll", "get_h_scroll"); ADD_GROUP("Minimap", "minimap_"); @@ -7160,7 +7209,7 @@ void TextEdit::_bind_methods() { ADD_GROUP("Caret", "caret_"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "caret_block_mode"), "cursor_set_block_mode", "cursor_is_block_mode"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "caret_blink"), "cursor_set_blink_enabled", "cursor_get_blink_enabled"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "caret_blink_speed", PROPERTY_HINT_RANGE, "0.1,10,0.01"), "cursor_set_blink_speed", "cursor_get_blink_speed"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "caret_blink_speed", PROPERTY_HINT_RANGE, "0.1,10,0.01"), "cursor_set_blink_speed", "cursor_get_blink_speed"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "caret_moving_by_right_click"), "set_right_click_moves_caret", "is_right_click_moving_caret"); ADD_SIGNAL(MethodInfo("cursor_changed")); @@ -7180,7 +7229,7 @@ void TextEdit::_bind_methods() { BIND_ENUM_CONSTANT(MENU_MAX); GLOBAL_DEF("gui/timers/text_edit_idle_detect_sec", 3); - ProjectSettings::get_singleton()->set_custom_property_info("gui/timers/text_edit_idle_detect_sec", PropertyInfo(Variant::REAL, "gui/timers/text_edit_idle_detect_sec", PROPERTY_HINT_RANGE, "0,10,0.01,or_greater")); // No negative numbers. + ProjectSettings::get_singleton()->set_custom_property_info("gui/timers/text_edit_idle_detect_sec", PropertyInfo(Variant::FLOAT, "gui/timers/text_edit_idle_detect_sec", PROPERTY_HINT_RANGE, "0,10,0.01,or_greater")); // No negative numbers. } TextEdit::TextEdit() { @@ -7223,10 +7272,10 @@ TextEdit::TextEdit() { updating_scrolls = false; selection.active = false; - h_scroll->connect("value_changed", this, "_scroll_moved"); - v_scroll->connect("value_changed", this, "_scroll_moved"); + h_scroll->connect_compat("value_changed", this, "_scroll_moved"); + v_scroll->connect_compat("value_changed", this, "_scroll_moved"); - v_scroll->connect("scrolling", this, "_v_scroll_input"); + v_scroll->connect_compat("scrolling", this, "_v_scroll_input"); cursor_changed_dirty = false; text_changed_dirty = false; @@ -7243,7 +7292,7 @@ TextEdit::TextEdit() { caret_blink_timer = memnew(Timer); add_child(caret_blink_timer); caret_blink_timer->set_wait_time(0.65); - caret_blink_timer->connect("timeout", this, "_toggle_draw_caret"); + caret_blink_timer->connect_compat("timeout", this, "_toggle_draw_caret"); cursor_set_blink_enabled(false); right_click_moves_caret = true; @@ -7251,12 +7300,12 @@ TextEdit::TextEdit() { add_child(idle_detect); idle_detect->set_one_shot(true); idle_detect->set_wait_time(GLOBAL_GET("gui/timers/text_edit_idle_detect_sec")); - idle_detect->connect("timeout", this, "_push_current_op"); + idle_detect->connect_compat("timeout", this, "_push_current_op"); click_select_held = memnew(Timer); add_child(click_select_held); click_select_held->set_wait_time(0.05); - click_select_held->connect("timeout", this, "_click_selection_held"); + click_select_held->connect_compat("timeout", this, "_click_selection_held"); current_op.type = TextOperation::TYPE_NONE; undo_enabled = true; @@ -7273,8 +7322,9 @@ TextEdit::TextEdit() { tooltip_obj = NULL; line_numbers = false; line_numbers_zero_padded = false; - line_length_guideline = false; - line_length_guideline_col = 80; + line_length_guidelines = false; + line_length_guideline_soft_col = 80; + line_length_guideline_hard_col = 100; draw_bookmark_gutter = false; draw_breakpoint_gutter = false; draw_fold_gutter = false; @@ -7314,7 +7364,7 @@ TextEdit::TextEdit() { add_child(menu); readonly = true; // Initialise to opposite first, so we get past the early-out in set_readonly. set_readonly(false); - menu->connect("id_pressed", this, "menu_option"); + menu->connect_compat("id_pressed", this, "menu_option"); first_draw = true; executing_line = -1; diff --git a/scene/gui/text_edit.h b/scene/gui/text_edit.h index a849f62bc5..6e267f5a47 100644 --- a/scene/gui/text_edit.h +++ b/scene/gui/text_edit.h @@ -369,8 +369,9 @@ private: bool undo_enabled; bool line_numbers; bool line_numbers_zero_padded; - bool line_length_guideline; - int line_length_guideline_col; + bool line_length_guidelines; + int line_length_guideline_soft_col; + int line_length_guideline_hard_col; bool draw_bookmark_gutter; bool draw_breakpoint_gutter; int breakpoint_gutter_width; @@ -513,7 +514,7 @@ private: int _get_column_pos_of_word(const String &p_key, const String &p_search, uint32_t p_search_flags, int p_from_column); - PoolVector<int> _search_bind(const String &p_key, uint32_t p_search_flags, int p_from_line, int p_from_column) const; + Vector<int> _search_bind(const String &p_key, uint32_t p_search_flags, int p_from_line, int p_from_column) const; PopupMenu *menu; @@ -765,8 +766,9 @@ public: void set_line_numbers_zero_padded(bool p_zero_padded); - void set_show_line_length_guideline(bool p_show); - void set_line_length_guideline_column(int p_column); + void set_show_line_length_guidelines(bool p_show); + void set_line_length_guideline_soft_column(int p_column); + void set_line_length_guideline_hard_column(int p_column); void set_bookmark_gutter_enabled(bool p_draw); bool is_bookmark_gutter_enabled() const; diff --git a/scene/gui/texture_progress.cpp b/scene/gui/texture_progress.cpp index c5650b1795..abf6b2ed49 100644 --- a/scene/gui/texture_progress.cpp +++ b/scene/gui/texture_progress.cpp @@ -510,8 +510,8 @@ void TextureProgress::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::COLOR, "tint_over"), "set_tint_over", "get_tint_over"); ADD_PROPERTY(PropertyInfo(Variant::COLOR, "tint_progress"), "set_tint_progress", "get_tint_progress"); ADD_GROUP("Radial Fill", "radial_"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "radial_initial_angle", PROPERTY_HINT_RANGE, "0.0,360.0,0.1,slider"), "set_radial_initial_angle", "get_radial_initial_angle"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "radial_fill_degrees", PROPERTY_HINT_RANGE, "0.0,360.0,0.1,slider"), "set_fill_degrees", "get_fill_degrees"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "radial_initial_angle", PROPERTY_HINT_RANGE, "0.0,360.0,0.1,slider"), "set_radial_initial_angle", "get_radial_initial_angle"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "radial_fill_degrees", PROPERTY_HINT_RANGE, "0.0,360.0,0.1,slider"), "set_fill_degrees", "get_fill_degrees"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "radial_center_offset"), "set_radial_center_offset", "get_radial_center_offset"); ADD_GROUP("Stretch", "stretch_"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "nine_patch_stretch"), "set_nine_patch_stretch", "get_nine_patch_stretch"); diff --git a/scene/gui/texture_rect.cpp b/scene/gui/texture_rect.cpp index 64693e2531..87442f32e8 100644 --- a/scene/gui/texture_rect.cpp +++ b/scene/gui/texture_rect.cpp @@ -160,13 +160,13 @@ void TextureRect::set_texture(const Ref<Texture2D> &p_tex) { } if (texture.is_valid()) { - texture->disconnect(CoreStringNames::get_singleton()->changed, this, "_texture_changed"); + texture->disconnect_compat(CoreStringNames::get_singleton()->changed, this, "_texture_changed"); } texture = p_tex; if (texture.is_valid()) { - texture->connect(CoreStringNames::get_singleton()->changed, this, "_texture_changed"); + texture->connect_compat(CoreStringNames::get_singleton()->changed, this, "_texture_changed"); } update(); diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp index 08835be9fd..940692ebd7 100644 --- a/scene/gui/tree.cpp +++ b/scene/gui/tree.cpp @@ -729,18 +729,18 @@ bool TreeItem::is_folding_disabled() const { return disable_folding; } -Variant TreeItem::_call_recursive_bind(const Variant **p_args, int p_argcount, Variant::CallError &r_error) { +Variant TreeItem::_call_recursive_bind(const Variant **p_args, int p_argcount, Callable::CallError &r_error) { if (p_argcount < 1) { - r_error.error = Variant::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS; + r_error.error = Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS; r_error.argument = 0; return Variant(); } - if (p_args[0]->get_type() != Variant::STRING) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; + if (p_args[0]->get_type() != Variant::STRING && p_args[0]->get_type() != Variant::STRING_NAME) { + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.argument = 0; - r_error.expected = Variant::STRING; + r_error.expected = Variant::STRING_NAME; return Variant(); } @@ -750,7 +750,7 @@ Variant TreeItem::_call_recursive_bind(const Variant **p_args, int p_argcount, V return Variant(); } -void recursive_call_aux(TreeItem *p_item, const StringName &p_method, const Variant **p_args, int p_argcount, Variant::CallError &r_error) { +void recursive_call_aux(TreeItem *p_item, const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error) { if (!p_item) { return; } @@ -762,7 +762,7 @@ void recursive_call_aux(TreeItem *p_item, const StringName &p_method, const Vari } } -void TreeItem::call_recursive(const StringName &p_method, const Variant **p_args, int p_argcount, Variant::CallError &r_error) { +void TreeItem::call_recursive(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error) { recursive_call_aux(this, p_method, p_args, p_argcount, r_error); } @@ -861,7 +861,7 @@ void TreeItem::_bind_methods() { { MethodInfo mi; mi.name = "call_recursive"; - mi.arguments.push_back(PropertyInfo(Variant::STRING, "method")); + mi.arguments.push_back(PropertyInfo(Variant::STRING_NAME, "method")); ClassDB::bind_vararg_method(METHOD_FLAGS_DEFAULT, "call_recursive", &TreeItem::_call_recursive_bind, mi); } @@ -1020,7 +1020,7 @@ int Tree::compute_item_height(TreeItem *p_item) const { int check_icon_h = cache.checked->get_height(); if (height < check_icon_h) height = check_icon_h; - FALLTHROUGH; + [[fallthrough]]; } case TreeItem::CELL_MODE_STRING: case TreeItem::CELL_MODE_CUSTOM: @@ -4043,15 +4043,15 @@ Tree::Tree() { add_child(v_scroll); range_click_timer = memnew(Timer); - range_click_timer->connect("timeout", this, "_range_click_timeout"); + range_click_timer->connect_compat("timeout", this, "_range_click_timeout"); add_child(range_click_timer); - h_scroll->connect("value_changed", this, "_scroll_moved"); - v_scroll->connect("value_changed", this, "_scroll_moved"); - text_editor->connect("text_entered", this, "_text_editor_enter"); - text_editor->connect("modal_closed", this, "_text_editor_modal_close"); - popup_menu->connect("id_pressed", this, "_popup_select"); - value_editor->connect("value_changed", this, "_value_editor_changed"); + h_scroll->connect_compat("value_changed", this, "_scroll_moved"); + v_scroll->connect_compat("value_changed", this, "_scroll_moved"); + text_editor->connect_compat("text_entered", this, "_text_editor_enter"); + text_editor->connect_compat("modal_closed", this, "_text_editor_modal_close"); + popup_menu->connect_compat("id_pressed", this, "_popup_select"); + value_editor->connect_compat("value_changed", this, "_value_editor_changed"); value_editor->set_as_toplevel(true); text_editor->set_as_toplevel(true); diff --git a/scene/gui/tree.h b/scene/gui/tree.h index b58f937c57..b179c5bcba 100644 --- a/scene/gui/tree.h +++ b/scene/gui/tree.h @@ -172,7 +172,7 @@ protected: remove_child(Object::cast_to<TreeItem>(p_child)); } - Variant _call_recursive_bind(const Variant **p_args, int p_argcount, Variant::CallError &r_error); + Variant _call_recursive_bind(const Variant **p_args, int p_argcount, Callable::CallError &r_error); public: /* cell mode */ @@ -282,7 +282,7 @@ public: void set_disable_folding(bool p_disable); bool is_folding_disabled() const; - void call_recursive(const StringName &p_method, const Variant **p_args, int p_argcount, Variant::CallError &r_error); + void call_recursive(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error); ~TreeItem(); }; diff --git a/scene/gui/video_player.cpp b/scene/gui/video_player.cpp index 3d8112b986..ac1e4a5629 100644 --- a/scene/gui/video_player.cpp +++ b/scene/gui/video_player.cpp @@ -473,15 +473,15 @@ void VideoPlayer::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::INT, "audio_track", PROPERTY_HINT_RANGE, "0,128,1"), "set_audio_track", "get_audio_track"); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "stream", PROPERTY_HINT_RESOURCE_TYPE, "VideoStream"), "set_stream", "get_stream"); //ADD_PROPERTY( PropertyInfo(Variant::BOOL, "stream/loop"), "set_loop", "has_loop") ; - ADD_PROPERTY(PropertyInfo(Variant::REAL, "volume_db", PROPERTY_HINT_RANGE, "-80,24,0.01"), "set_volume_db", "get_volume_db"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "volume", PROPERTY_HINT_EXP_RANGE, "0,15,0.01", 0), "set_volume", "get_volume"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "volume_db", PROPERTY_HINT_RANGE, "-80,24,0.01"), "set_volume_db", "get_volume_db"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "volume", PROPERTY_HINT_EXP_RANGE, "0,15,0.01", 0), "set_volume", "get_volume"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "autoplay"), "set_autoplay", "has_autoplay"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "paused"), "set_paused", "is_paused"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "expand"), "set_expand", "has_expand"); ADD_PROPERTY(PropertyInfo(Variant::INT, "buffering_msec", PROPERTY_HINT_RANGE, "10,1000"), "set_buffering_msec", "get_buffering_msec"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "stream_position", PROPERTY_HINT_RANGE, "0,1280000,0.1", 0), "set_stream_position", "get_stream_position"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "stream_position", PROPERTY_HINT_RANGE, "0,1280000,0.1", 0), "set_stream_position", "get_stream_position"); - ADD_PROPERTY(PropertyInfo(Variant::STRING, "bus", PROPERTY_HINT_ENUM, ""), "set_bus", "get_bus"); + ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "bus", PROPERTY_HINT_ENUM, ""), "set_bus", "get_bus"); } VideoPlayer::VideoPlayer() { diff --git a/scene/main/canvas_layer.cpp b/scene/main/canvas_layer.cpp index 04cf5c6338..2085fa3a60 100644 --- a/scene/main/canvas_layer.cpp +++ b/scene/main/canvas_layer.cpp @@ -307,15 +307,15 @@ void CanvasLayer::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::INT, "layer", PROPERTY_HINT_RANGE, "-128,128,1"), "set_layer", "get_layer"); ADD_GROUP("Transform", ""); ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "offset"), "set_offset", "get_offset"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "rotation_degrees", PROPERTY_HINT_RANGE, "-1080,1080,0.1,or_lesser,or_greater", PROPERTY_USAGE_EDITOR), "set_rotation_degrees", "get_rotation_degrees"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "rotation", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_rotation", "get_rotation"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "rotation_degrees", PROPERTY_HINT_RANGE, "-1080,1080,0.1,or_lesser,or_greater", PROPERTY_USAGE_EDITOR), "set_rotation_degrees", "get_rotation_degrees"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "rotation", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_rotation", "get_rotation"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "scale"), "set_scale", "get_scale"); ADD_PROPERTY(PropertyInfo(Variant::TRANSFORM2D, "transform"), "set_transform", "get_transform"); ADD_GROUP("", ""); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "custom_viewport", PROPERTY_HINT_RESOURCE_TYPE, "Viewport", 0), "set_custom_viewport", "get_custom_viewport"); ADD_GROUP("Follow Viewport", "follow_viewport"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "follow_viewport_enable"), "set_follow_viewport", "is_following_viewport"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "follow_viewport_scale", PROPERTY_HINT_RANGE, "0.001,1000,0.001,or_greater,or_lesser"), "set_follow_viewport_scale", "get_follow_viewport_scale"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "follow_viewport_scale", PROPERTY_HINT_RANGE, "0.001,1000,0.001,or_greater,or_lesser"), "set_follow_viewport_scale", "get_follow_viewport_scale"); } CanvasLayer::CanvasLayer() { diff --git a/scene/main/http_request.cpp b/scene/main/http_request.cpp index 3c89069816..85bde92851 100644 --- a/scene/main/http_request.cpp +++ b/scene/main/http_request.cpp @@ -118,7 +118,7 @@ Error HTTPRequest::request(const String &p_url, const Vector<String> &p_custom_h client->set_blocking_mode(false); err = _request(); if (err != OK) { - call_deferred("_request_done", RESULT_CANT_CONNECT, 0, PoolStringArray(), PoolByteArray()); + call_deferred("_request_done", RESULT_CANT_CONNECT, 0, PackedStringArray(), PackedByteArray()); return ERR_CANT_CONNECT; } @@ -135,7 +135,7 @@ void HTTPRequest::_thread_func(void *p_userdata) { Error err = hr->_request(); if (err != OK) { - hr->call_deferred("_request_done", RESULT_CANT_CONNECT, 0, PoolStringArray(), PoolByteArray()); + hr->call_deferred("_request_done", RESULT_CANT_CONNECT, 0, PackedStringArray(), PackedByteArray()); } else { while (!hr->thread_request_quit) { @@ -180,7 +180,7 @@ void HTTPRequest::cancel_request() { bool HTTPRequest::_handle_response(bool *ret_value) { if (!client->has_response()) { - call_deferred("_request_done", RESULT_NO_RESPONSE, 0, PoolStringArray(), PoolByteArray()); + call_deferred("_request_done", RESULT_NO_RESPONSE, 0, PackedStringArray(), PackedByteArray()); *ret_value = true; return true; } @@ -200,7 +200,7 @@ bool HTTPRequest::_handle_response(bool *ret_value) { if (max_redirects >= 0 && redirections >= max_redirects) { - call_deferred("_request_done", RESULT_REDIRECT_LIMIT_REACHED, response_code, response_headers, PoolByteArray()); + call_deferred("_request_done", RESULT_REDIRECT_LIMIT_REACHED, response_code, response_headers, PackedByteArray()); *ret_value = true; return true; } @@ -246,7 +246,7 @@ bool HTTPRequest::_update_connection() { switch (client->get_status()) { case HTTPClient::STATUS_DISCONNECTED: { - call_deferred("_request_done", RESULT_CANT_CONNECT, 0, PoolStringArray(), PoolByteArray()); + call_deferred("_request_done", RESULT_CANT_CONNECT, 0, PackedStringArray(), PackedByteArray()); return true; // End it, since it's doing something } break; case HTTPClient::STATUS_RESOLVING: { @@ -255,7 +255,7 @@ bool HTTPRequest::_update_connection() { return false; } break; case HTTPClient::STATUS_CANT_RESOLVE: { - call_deferred("_request_done", RESULT_CANT_RESOLVE, 0, PoolStringArray(), PoolByteArray()); + call_deferred("_request_done", RESULT_CANT_RESOLVE, 0, PackedStringArray(), PackedByteArray()); return true; } break; @@ -266,7 +266,7 @@ bool HTTPRequest::_update_connection() { } break; // Connecting to IP case HTTPClient::STATUS_CANT_CONNECT: { - call_deferred("_request_done", RESULT_CANT_CONNECT, 0, PoolStringArray(), PoolByteArray()); + call_deferred("_request_done", RESULT_CANT_CONNECT, 0, PackedStringArray(), PackedByteArray()); return true; } break; @@ -283,7 +283,7 @@ bool HTTPRequest::_update_connection() { if (_handle_response(&ret_value)) return ret_value; - call_deferred("_request_done", RESULT_SUCCESS, response_code, response_headers, PoolByteArray()); + call_deferred("_request_done", RESULT_SUCCESS, response_code, response_headers, PackedByteArray()); return true; } if (body_len < 0) { @@ -292,7 +292,7 @@ bool HTTPRequest::_update_connection() { return true; } - call_deferred("_request_done", RESULT_CHUNKED_BODY_SIZE_MISMATCH, response_code, response_headers, PoolByteArray()); + call_deferred("_request_done", RESULT_CHUNKED_BODY_SIZE_MISMATCH, response_code, response_headers, PackedByteArray()); return true; // Request migh have been done } else { @@ -300,7 +300,7 @@ bool HTTPRequest::_update_connection() { Error err = client->request(method, request_string, headers, request_data); if (err != OK) { - call_deferred("_request_done", RESULT_CONNECTION_ERROR, 0, PoolStringArray(), PoolByteArray()); + call_deferred("_request_done", RESULT_CONNECTION_ERROR, 0, PackedStringArray(), PackedByteArray()); return true; } @@ -325,7 +325,7 @@ bool HTTPRequest::_update_connection() { if (!client->is_response_chunked() && client->get_response_body_length() == 0) { - call_deferred("_request_done", RESULT_SUCCESS, response_code, response_headers, PoolByteArray()); + call_deferred("_request_done", RESULT_SUCCESS, response_code, response_headers, PackedByteArray()); return true; } @@ -334,7 +334,7 @@ bool HTTPRequest::_update_connection() { body_len = client->get_response_body_length(); if (body_size_limit >= 0 && body_len > body_size_limit) { - call_deferred("_request_done", RESULT_BODY_SIZE_LIMIT_EXCEEDED, response_code, response_headers, PoolByteArray()); + call_deferred("_request_done", RESULT_BODY_SIZE_LIMIT_EXCEEDED, response_code, response_headers, PackedByteArray()); return true; } @@ -342,7 +342,7 @@ bool HTTPRequest::_update_connection() { file = FileAccess::open(download_to_file, FileAccess::WRITE); if (!file) { - call_deferred("_request_done", RESULT_DOWNLOAD_FILE_CANT_OPEN, response_code, response_headers, PoolByteArray()); + call_deferred("_request_done", RESULT_DOWNLOAD_FILE_CANT_OPEN, response_code, response_headers, PackedByteArray()); return true; } } @@ -350,14 +350,14 @@ bool HTTPRequest::_update_connection() { client->poll(); - PoolByteArray chunk = client->read_response_body_chunk(); + PackedByteArray chunk = client->read_response_body_chunk(); downloaded += chunk.size(); if (file) { - PoolByteArray::Read r = chunk.read(); - file->store_buffer(r.ptr(), chunk.size()); + const uint8_t *r = chunk.ptr(); + file->store_buffer(r, chunk.size()); if (file->get_error() != OK) { - call_deferred("_request_done", RESULT_DOWNLOAD_FILE_WRITE_ERROR, response_code, response_headers, PoolByteArray()); + call_deferred("_request_done", RESULT_DOWNLOAD_FILE_WRITE_ERROR, response_code, response_headers, PackedByteArray()); return true; } } else { @@ -365,7 +365,7 @@ bool HTTPRequest::_update_connection() { } if (body_size_limit >= 0 && downloaded > body_size_limit) { - call_deferred("_request_done", RESULT_BODY_SIZE_LIMIT_EXCEEDED, response_code, response_headers, PoolByteArray()); + call_deferred("_request_done", RESULT_BODY_SIZE_LIMIT_EXCEEDED, response_code, response_headers, PackedByteArray()); return true; } @@ -384,11 +384,11 @@ bool HTTPRequest::_update_connection() { } break; // Request resulted in body: break which must be read case HTTPClient::STATUS_CONNECTION_ERROR: { - call_deferred("_request_done", RESULT_CONNECTION_ERROR, 0, PoolStringArray(), PoolByteArray()); + call_deferred("_request_done", RESULT_CONNECTION_ERROR, 0, PackedStringArray(), PackedByteArray()); return true; } break; case HTTPClient::STATUS_SSL_HANDSHAKE_ERROR: { - call_deferred("_request_done", RESULT_SSL_HANDSHAKE_ERROR, 0, PoolStringArray(), PoolByteArray()); + call_deferred("_request_done", RESULT_SSL_HANDSHAKE_ERROR, 0, PackedStringArray(), PackedByteArray()); return true; } break; } @@ -396,7 +396,7 @@ bool HTTPRequest::_update_connection() { ERR_FAIL_V(false); } -void HTTPRequest::_request_done(int p_status, int p_code, const PoolStringArray &headers, const PoolByteArray &p_data) { +void HTTPRequest::_request_done(int p_status, int p_code, const PackedStringArray &headers, const PackedByteArray &p_data) { cancel_request(); emit_signal("request_completed", p_status, p_code, headers, p_data); @@ -505,12 +505,12 @@ int HTTPRequest::get_timeout() { void HTTPRequest::_timeout() { cancel_request(); - call_deferred("_request_done", RESULT_TIMEOUT, 0, PoolStringArray(), PoolByteArray()); + call_deferred("_request_done", RESULT_TIMEOUT, 0, PackedStringArray(), PackedByteArray()); } void HTTPRequest::_bind_methods() { - ClassDB::bind_method(D_METHOD("request", "url", "custom_headers", "ssl_validate_domain", "method", "request_data"), &HTTPRequest::request, DEFVAL(PoolStringArray()), DEFVAL(true), DEFVAL(HTTPClient::METHOD_GET), DEFVAL(String())); + ClassDB::bind_method(D_METHOD("request", "url", "custom_headers", "ssl_validate_domain", "method", "request_data"), &HTTPRequest::request, DEFVAL(PackedStringArray()), DEFVAL(true), DEFVAL(HTTPClient::METHOD_GET), DEFVAL(String())); ClassDB::bind_method(D_METHOD("cancel_request"), &HTTPRequest::cancel_request); ClassDB::bind_method(D_METHOD("get_http_client_status"), &HTTPRequest::get_http_client_status); @@ -548,7 +548,7 @@ void HTTPRequest::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::INT, "max_redirects", PROPERTY_HINT_RANGE, "-1,64"), "set_max_redirects", "get_max_redirects"); ADD_PROPERTY(PropertyInfo(Variant::INT, "timeout", PROPERTY_HINT_RANGE, "0,86400"), "set_timeout", "get_timeout"); - ADD_SIGNAL(MethodInfo("request_completed", PropertyInfo(Variant::INT, "result"), PropertyInfo(Variant::INT, "response_code"), PropertyInfo(Variant::POOL_STRING_ARRAY, "headers"), PropertyInfo(Variant::POOL_BYTE_ARRAY, "body"))); + ADD_SIGNAL(MethodInfo("request_completed", PropertyInfo(Variant::INT, "result"), PropertyInfo(Variant::INT, "response_code"), PropertyInfo(Variant::PACKED_STRING_ARRAY, "headers"), PropertyInfo(Variant::PACKED_BYTE_ARRAY, "body"))); BIND_ENUM_CONSTANT(RESULT_SUCCESS); //BIND_ENUM_CONSTANT( RESULT_NO_BODY ); @@ -589,7 +589,7 @@ HTTPRequest::HTTPRequest() { timer = memnew(Timer); timer->set_one_shot(true); - timer->connect("timeout", this, "_timeout"); + timer->connect_compat("timeout", this, "_timeout"); add_child(timer); timeout = 0; } diff --git a/scene/main/http_request.h b/scene/main/http_request.h index 94b323ae8a..a3d95cd652 100644 --- a/scene/main/http_request.h +++ b/scene/main/http_request.h @@ -73,12 +73,12 @@ private: bool request_sent; Ref<HTTPClient> client; - PoolByteArray body; + PackedByteArray body; volatile bool use_threads; bool got_response; int response_code; - PoolVector<String> response_headers; + Vector<String> response_headers; String download_to_file; @@ -108,7 +108,7 @@ private: Thread *thread; - void _request_done(int p_status, int p_code, const PoolStringArray &headers, const PoolByteArray &p_data); + void _request_done(int p_status, int p_code, const PackedStringArray &headers, const PackedByteArray &p_data); static void _thread_func(void *p_userdata); protected: diff --git a/scene/main/instance_placeholder.cpp b/scene/main/instance_placeholder.cpp index f1b3f91920..fe238af1c4 100644 --- a/scene/main/instance_placeholder.cpp +++ b/scene/main/instance_placeholder.cpp @@ -115,7 +115,7 @@ Node *InstancePlaceholder::create_instance(bool p_replace, const Ref<PackedScene Dictionary InstancePlaceholder::get_stored_values(bool p_with_order) { Dictionary ret; - PoolStringArray order; + PackedStringArray order; for (List<PropSet>::Element *E = stored_values.front(); E; E = E->next()) { ret[E->get().name] = E->get().value; diff --git a/scene/main/node.cpp b/scene/main/node.cpp index 8ceac74bb8..a0159c3858 100644 --- a/scene/main/node.cpp +++ b/scene/main/node.cpp @@ -37,6 +37,7 @@ #include "core/message_queue.h" #include "core/print_string.h" #include "instance_placeholder.h" +#include "scene/debugger/scene_debugger.h" #include "scene/resources/packed_scene.h" #include "scene/scene_string_names.h" #include "viewport.h" @@ -244,11 +245,7 @@ void Node::_propagate_enter_tree() { data.blocked--; #ifdef DEBUG_ENABLED - - if (ScriptDebugger::get_singleton() && data.filename != String()) { - //used for live edit - data.tree->live_scene_edit_cache[data.filename].insert(this); - } + SceneDebugger::add_to_cache(data.filename, this); #endif // enter groups } @@ -268,26 +265,7 @@ void Node::_propagate_exit_tree() { //block while removing children #ifdef DEBUG_ENABLED - - if (ScriptDebugger::get_singleton() && data.filename != String()) { - //used for live edit - Map<String, Set<Node *> >::Element *E = data.tree->live_scene_edit_cache.find(data.filename); - if (E) { - E->get().erase(this); - if (E->get().size() == 0) { - data.tree->live_scene_edit_cache.erase(E); - } - } - - Map<Node *, Map<ObjectID, Node *> >::Element *F = data.tree->live_edit_remove_list.find(this); - if (F) { - for (Map<ObjectID, Node *>::Element *G = F->get().front(); G; G = G->next()) { - - memdelete(G->get()); - } - data.tree->live_edit_remove_list.erase(F); - } - } + SceneDebugger::remove_from_cache(data.filename, this); #endif data.blocked++; @@ -592,16 +570,16 @@ void Node::rpc_unreliable_id(int p_peer_id, const StringName &p_method, VARIANT_ rpcp(p_peer_id, true, p_method, argptr, argc); } -Variant Node::_rpc_bind(const Variant **p_args, int p_argcount, Variant::CallError &r_error) { +Variant Node::_rpc_bind(const Variant **p_args, int p_argcount, Callable::CallError &r_error) { if (p_argcount < 1) { - r_error.error = Variant::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS; + r_error.error = Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS; r_error.argument = 1; return Variant(); } if (p_args[0]->get_type() != Variant::STRING) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.argument = 0; r_error.expected = Variant::STRING; return Variant(); @@ -611,27 +589,27 @@ Variant Node::_rpc_bind(const Variant **p_args, int p_argcount, Variant::CallErr rpcp(0, false, method, &p_args[1], p_argcount - 1); - r_error.error = Variant::CallError::CALL_OK; + r_error.error = Callable::CallError::CALL_OK; return Variant(); } -Variant Node::_rpc_id_bind(const Variant **p_args, int p_argcount, Variant::CallError &r_error) { +Variant Node::_rpc_id_bind(const Variant **p_args, int p_argcount, Callable::CallError &r_error) { if (p_argcount < 2) { - r_error.error = Variant::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS; + r_error.error = Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS; r_error.argument = 2; return Variant(); } if (p_args[0]->get_type() != Variant::INT) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.argument = 0; r_error.expected = Variant::INT; return Variant(); } if (p_args[1]->get_type() != Variant::STRING) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.argument = 1; r_error.expected = Variant::STRING; return Variant(); @@ -642,20 +620,20 @@ Variant Node::_rpc_id_bind(const Variant **p_args, int p_argcount, Variant::Call rpcp(peer_id, false, method, &p_args[2], p_argcount - 2); - r_error.error = Variant::CallError::CALL_OK; + r_error.error = Callable::CallError::CALL_OK; return Variant(); } -Variant Node::_rpc_unreliable_bind(const Variant **p_args, int p_argcount, Variant::CallError &r_error) { +Variant Node::_rpc_unreliable_bind(const Variant **p_args, int p_argcount, Callable::CallError &r_error) { if (p_argcount < 1) { - r_error.error = Variant::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS; + r_error.error = Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS; r_error.argument = 1; return Variant(); } if (p_args[0]->get_type() != Variant::STRING) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.argument = 0; r_error.expected = Variant::STRING; return Variant(); @@ -665,27 +643,27 @@ Variant Node::_rpc_unreliable_bind(const Variant **p_args, int p_argcount, Varia rpcp(0, true, method, &p_args[1], p_argcount - 1); - r_error.error = Variant::CallError::CALL_OK; + r_error.error = Callable::CallError::CALL_OK; return Variant(); } -Variant Node::_rpc_unreliable_id_bind(const Variant **p_args, int p_argcount, Variant::CallError &r_error) { +Variant Node::_rpc_unreliable_id_bind(const Variant **p_args, int p_argcount, Callable::CallError &r_error) { if (p_argcount < 2) { - r_error.error = Variant::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS; + r_error.error = Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS; r_error.argument = 2; return Variant(); } if (p_args[0]->get_type() != Variant::INT) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.argument = 0; r_error.expected = Variant::INT; return Variant(); } if (p_args[1]->get_type() != Variant::STRING) { - r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; + r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.argument = 1; r_error.expected = Variant::STRING; return Variant(); @@ -696,7 +674,7 @@ Variant Node::_rpc_unreliable_id_bind(const Variant **p_args, int p_argcount, Va rpcp(peer_id, true, method, &p_args[2], p_argcount - 2); - r_error.error = Variant::CallError::CALL_OK; + r_error.error = Callable::CallError::CALL_OK; return Variant(); } @@ -2360,7 +2338,7 @@ void Node::_duplicate_signals(const Node *p_original, Node *p_copy) const { NodePath p = p_original->get_path_to(this); Node *copy = p_copy->get_node(p); - Node *target = Object::cast_to<Node>(E->get().target); + Node *target = Object::cast_to<Node>(E->get().callable.get_object()); if (!target) { continue; } @@ -2375,8 +2353,8 @@ void Node::_duplicate_signals(const Node *p_original, Node *p_copy) const { if (p_copy->has_node(ptarget)) copytarget = p_copy->get_node(ptarget); - if (copy && copytarget && !copy->is_connected(E->get().signal, copytarget, E->get().method)) { - copy->connect(E->get().signal, copytarget, E->get().method, E->get().binds, E->get().flags); + if (copy && copytarget && !copy->is_connected_compat(E->get().signal.get_name(), copytarget, E->get().callable.get_method())) { + copy->connect_compat(E->get().signal.get_name(), copytarget, E->get().callable.get_method(), E->get().binds, E->get().flags); } } } @@ -2531,10 +2509,10 @@ void Node::_replace_connections_target(Node *p_new_target) { Connection &c = E->get(); if (c.flags & CONNECT_PERSIST) { - c.source->disconnect(c.signal, this, c.method); - bool valid = p_new_target->has_method(c.method) || Ref<Script>(p_new_target->get_script()).is_null() || Ref<Script>(p_new_target->get_script())->has_method(c.method); - ERR_CONTINUE_MSG(!valid, "Attempt to connect signal '" + c.source->get_class() + "." + c.signal + "' to nonexistent method '" + c.target->get_class() + "." + c.method + "'."); - c.source->connect(c.signal, p_new_target, c.method, c.binds, c.flags); + c.signal.get_object()->disconnect_compat(c.signal.get_name(), 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, "Attempt to connect signal '" + c.signal.get_object()->get_class() + "." + c.signal.get_name() + "' to nonexistent method '" + c.callable.get_object()->get_class() + "." + c.callable.get_method() + "'."); + c.signal.get_object()->connect_compat(c.signal.get_name(), p_new_target, c.callable.get_method(), c.binds, c.flags); } } } @@ -2822,7 +2800,7 @@ void Node::_bind_methods() { GLOBAL_DEF("node/name_casing", NAME_CASING_PASCAL_CASE); ProjectSettings::get_singleton()->set_custom_property_info("node/name_casing", PropertyInfo(Variant::INT, "node/name_casing", PROPERTY_HINT_ENUM, "PascalCase,camelCase,snake_case")); - ClassDB::bind_method(D_METHOD("add_child_below_node", "node", "child_node", "legible_unique_name"), &Node::add_child_below_node, DEFVAL(false)); + ClassDB::bind_method(D_METHOD("add_child_below_node", "preceding_node", "node", "legible_unique_name"), &Node::add_child_below_node, DEFVAL(false)); ClassDB::bind_method(D_METHOD("set_name", "name"), &Node::set_name); ClassDB::bind_method(D_METHOD("get_name"), &Node::get_name); @@ -2926,7 +2904,7 @@ void Node::_bind_methods() { { MethodInfo mi; - mi.arguments.push_back(PropertyInfo(Variant::STRING, "method")); + mi.arguments.push_back(PropertyInfo(Variant::STRING_NAME, "method")); mi.name = "rpc"; ClassDB::bind_vararg_method(METHOD_FLAGS_DEFAULT, "rpc", &Node::_rpc_bind, mi); @@ -2998,15 +2976,15 @@ void Node::_bind_methods() { ADD_GROUP("Pause", "pause_"); ADD_PROPERTY(PropertyInfo(Variant::INT, "pause_mode", PROPERTY_HINT_ENUM, "Inherit,Stop,Process"), "set_pause_mode", "get_pause_mode"); - ADD_PROPERTY(PropertyInfo(Variant::STRING, "name", PROPERTY_HINT_NONE, "", 0), "set_name", "get_name"); + ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "name", PROPERTY_HINT_NONE, "", 0), "set_name", "get_name"); ADD_PROPERTY(PropertyInfo(Variant::STRING, "filename", PROPERTY_HINT_NONE, "", 0), "set_filename", "get_filename"); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "owner", PROPERTY_HINT_RESOURCE_TYPE, "Node", 0), "set_owner", "get_owner"); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "multiplayer", PROPERTY_HINT_RESOURCE_TYPE, "MultiplayerAPI", 0), "", "get_multiplayer"); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "custom_multiplayer", PROPERTY_HINT_RESOURCE_TYPE, "MultiplayerAPI", 0), "set_custom_multiplayer", "get_custom_multiplayer"); ADD_PROPERTY(PropertyInfo(Variant::INT, "process_priority"), "set_process_priority", "get_process_priority"); - BIND_VMETHOD(MethodInfo("_process", PropertyInfo(Variant::REAL, "delta"))); - BIND_VMETHOD(MethodInfo("_physics_process", PropertyInfo(Variant::REAL, "delta"))); + BIND_VMETHOD(MethodInfo("_process", PropertyInfo(Variant::FLOAT, "delta"))); + BIND_VMETHOD(MethodInfo("_physics_process", PropertyInfo(Variant::FLOAT, "delta"))); BIND_VMETHOD(MethodInfo("_enter_tree")); BIND_VMETHOD(MethodInfo("_exit_tree")); BIND_VMETHOD(MethodInfo("_ready")); diff --git a/scene/main/node.h b/scene/main/node.h index 02c828e8ff..d1f75b71ec 100644 --- a/scene/main/node.h +++ b/scene/main/node.h @@ -185,10 +185,10 @@ private: Array _get_children() const; Array _get_groups() const; - Variant _rpc_bind(const Variant **p_args, int p_argcount, Variant::CallError &r_error); - Variant _rpc_unreliable_bind(const Variant **p_args, int p_argcount, Variant::CallError &r_error); - Variant _rpc_id_bind(const Variant **p_args, int p_argcount, Variant::CallError &r_error); - Variant _rpc_unreliable_id_bind(const Variant **p_args, int p_argcount, Variant::CallError &r_error); + Variant _rpc_bind(const Variant **p_args, int p_argcount, Callable::CallError &r_error); + Variant _rpc_unreliable_bind(const Variant **p_args, int p_argcount, Callable::CallError &r_error); + Variant _rpc_id_bind(const Variant **p_args, int p_argcount, Callable::CallError &r_error); + Variant _rpc_unreliable_id_bind(const Variant **p_args, int p_argcount, Callable::CallError &r_error); friend class SceneTree; diff --git a/scene/main/resource_preloader.cpp b/scene/main/resource_preloader.cpp index 5582ed59b0..43a61834eb 100644 --- a/scene/main/resource_preloader.cpp +++ b/scene/main/resource_preloader.cpp @@ -35,7 +35,7 @@ void ResourcePreloader::_set_resources(const Array &p_data) { resources.clear(); ERR_FAIL_COND(p_data.size() != 2); - PoolVector<String> names = p_data[0]; + Vector<String> names = p_data[0]; Array resdata = p_data[1]; ERR_FAIL_COND(names.size() != resdata.size()); @@ -53,7 +53,7 @@ void ResourcePreloader::_set_resources(const Array &p_data) { Array ResourcePreloader::_get_resources() const { - PoolVector<String> names; + Vector<String> names; Array arr; arr.resize(resources.size()); names.resize(resources.size()); @@ -129,9 +129,9 @@ RES ResourcePreloader::get_resource(const StringName &p_name) const { return resources[p_name]; } -PoolVector<String> ResourcePreloader::_get_resource_list() const { +Vector<String> ResourcePreloader::_get_resource_list() const { - PoolVector<String> res; + Vector<String> res; res.resize(resources.size()); int i = 0; for (Map<StringName, RES>::Element *E = resources.front(); E; E = E->next(), i++) { diff --git a/scene/main/resource_preloader.h b/scene/main/resource_preloader.h index d03c784883..9ad219dd92 100644 --- a/scene/main/resource_preloader.h +++ b/scene/main/resource_preloader.h @@ -41,7 +41,7 @@ class ResourcePreloader : public Node { void _set_resources(const Array &p_data); Array _get_resources() const; - PoolVector<String> _get_resource_list() const; + Vector<String> _get_resource_list() const; protected: static void _bind_methods(); diff --git a/scene/main/scene_tree.cpp b/scene/main/scene_tree.cpp index a27f8c4d94..ed89b70d65 100644 --- a/scene/main/scene_tree.cpp +++ b/scene/main/scene_tree.cpp @@ -38,9 +38,10 @@ #include "core/os/os.h" #include "core/print_string.h" #include "core/project_settings.h" +#include "core/script_debugger_remote.h" #include "main/input_default.h" #include "node.h" -#include "scene/debugger/script_debugger_remote.h" +#include "scene/debugger/scene_debugger.h" #include "scene/resources/dynamic_font.h" #include "scene/resources/material.h" #include "scene/resources/mesh.h" @@ -58,7 +59,7 @@ void SceneTreeTimer::_bind_methods() { ClassDB::bind_method(D_METHOD("set_time_left", "time"), &SceneTreeTimer::set_time_left); ClassDB::bind_method(D_METHOD("get_time_left"), &SceneTreeTimer::get_time_left); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "time_left"), "set_time_left", "get_time_left"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "time_left"), "set_time_left", "get_time_left"); ADD_SIGNAL(MethodInfo("timeout")); } @@ -87,7 +88,7 @@ void SceneTreeTimer::release_connections() { for (List<Connection>::Element *E = connections.front(); E; E = E->next()) { Connection const &connection = E->get(); - disconnect(connection.signal, connection.target, connection.method); + disconnect_compat(connection.signal.get_name(), connection.callable.get_object(), connection.callable.get_method()); } } @@ -873,11 +874,11 @@ Ref<ArrayMesh> SceneTree::get_debug_contact_mesh() { }; /* clang-format on */ - PoolVector<int> indices; + Vector<int> indices; for (int i = 0; i < 8 * 3; i++) indices.push_back(diamond_faces[i]); - PoolVector<Vector3> vertices; + Vector<Vector3> vertices; for (int i = 0; i < 6; i++) vertices.push_back(diamond[i] * 0.1); @@ -1004,14 +1005,14 @@ void SceneMainLoop::_update_listener_2d() { } */ -Variant SceneTree::_call_group_flags(const Variant **p_args, int p_argcount, Variant::CallError &r_error) { +Variant SceneTree::_call_group_flags(const Variant **p_args, int p_argcount, Callable::CallError &r_error) { - r_error.error = Variant::CallError::CALL_OK; + r_error.error = Callable::CallError::CALL_OK; ERR_FAIL_COND_V(p_argcount < 3, Variant()); ERR_FAIL_COND_V(!p_args[0]->is_num(), Variant()); - ERR_FAIL_COND_V(p_args[1]->get_type() != Variant::STRING, Variant()); - ERR_FAIL_COND_V(p_args[2]->get_type() != Variant::STRING, Variant()); + ERR_FAIL_COND_V(p_args[1]->get_type() != Variant::STRING_NAME && p_args[1]->get_type() != Variant::STRING, Variant()); + ERR_FAIL_COND_V(p_args[2]->get_type() != Variant::STRING_NAME && p_args[2]->get_type() != Variant::STRING, Variant()); int flags = *p_args[0]; StringName group = *p_args[1]; @@ -1027,13 +1028,13 @@ Variant SceneTree::_call_group_flags(const Variant **p_args, int p_argcount, Var return Variant(); } -Variant SceneTree::_call_group(const Variant **p_args, int p_argcount, Variant::CallError &r_error) { +Variant SceneTree::_call_group(const Variant **p_args, int p_argcount, Callable::CallError &r_error) { - r_error.error = Variant::CallError::CALL_OK; + r_error.error = Callable::CallError::CALL_OK; ERR_FAIL_COND_V(p_argcount < 2, Variant()); - ERR_FAIL_COND_V(p_args[0]->get_type() != Variant::STRING, Variant()); - ERR_FAIL_COND_V(p_args[1]->get_type() != Variant::STRING, Variant()); + ERR_FAIL_COND_V(p_args[0]->get_type() != Variant::STRING_NAME && p_args[0]->get_type() != Variant::STRING, Variant()); + ERR_FAIL_COND_V(p_args[1]->get_type() != Variant::STRING_NAME && p_args[1]->get_type() != Variant::STRING, Variant()); StringName group = *p_args[0]; StringName method = *p_args[1]; @@ -1329,380 +1330,6 @@ void SceneTree::add_current_scene(Node *p_current) { root->add_child(p_current); } -#ifdef DEBUG_ENABLED - -static void _fill_array(Node *p_node, Array &array, int p_level) { - - array.push_back(p_node->get_child_count()); - array.push_back(p_node->get_name()); - array.push_back(p_node->get_class()); - array.push_back(p_node->get_instance_id()); - for (int i = 0; i < p_node->get_child_count(); i++) { - - _fill_array(p_node->get_child(i), array, p_level + 1); - } -} - -void SceneTree::_debugger_request_tree() { - - Array arr; - _fill_array(root, arr, 0); - ScriptDebugger::get_singleton()->send_message("scene_tree", arr); -} - -void SceneTree::_live_edit_node_path_func(const NodePath &p_path, int p_id) { - - live_edit_node_path_cache[p_id] = p_path; -} - -void SceneTree::_live_edit_res_path_func(const String &p_path, int p_id) { - - live_edit_resource_cache[p_id] = p_path; -} - -void SceneTree::_live_edit_node_set_func(int p_id, const StringName &p_prop, const Variant &p_value) { - - if (!live_edit_node_path_cache.has(p_id)) - return; - - NodePath np = live_edit_node_path_cache[p_id]; - Node *base = NULL; - if (root->has_node(live_edit_root)) - base = root->get_node(live_edit_root); - - Map<String, Set<Node *> >::Element *E = live_scene_edit_cache.find(live_edit_scene); - if (!E) - return; //scene not editable - - for (Set<Node *>::Element *F = E->get().front(); F; F = F->next()) { - - Node *n = F->get(); - - if (base && !base->is_a_parent_of(n)) - continue; - - if (!n->has_node(np)) - continue; - Node *n2 = n->get_node(np); - - n2->set(p_prop, p_value); - } -} - -void SceneTree::_live_edit_node_set_res_func(int p_id, const StringName &p_prop, const String &p_value) { - - RES r = ResourceLoader::load(p_value); - if (!r.is_valid()) - return; - _live_edit_node_set_func(p_id, p_prop, r); -} -void SceneTree::_live_edit_node_call_func(int p_id, const StringName &p_method, VARIANT_ARG_DECLARE) { - - if (!live_edit_node_path_cache.has(p_id)) - return; - - NodePath np = live_edit_node_path_cache[p_id]; - Node *base = NULL; - if (root->has_node(live_edit_root)) - base = root->get_node(live_edit_root); - - Map<String, Set<Node *> >::Element *E = live_scene_edit_cache.find(live_edit_scene); - if (!E) - return; //scene not editable - - for (Set<Node *>::Element *F = E->get().front(); F; F = F->next()) { - - Node *n = F->get(); - - if (base && !base->is_a_parent_of(n)) - continue; - - if (!n->has_node(np)) - continue; - Node *n2 = n->get_node(np); - - n2->call(p_method, VARIANT_ARG_PASS); - } -} -void SceneTree::_live_edit_res_set_func(int p_id, const StringName &p_prop, const Variant &p_value) { - - if (!live_edit_resource_cache.has(p_id)) - return; - - String resp = live_edit_resource_cache[p_id]; - - if (!ResourceCache::has(resp)) - return; - - RES r = ResourceCache::get(resp); - if (!r.is_valid()) - return; - - r->set(p_prop, p_value); -} -void SceneTree::_live_edit_res_set_res_func(int p_id, const StringName &p_prop, const String &p_value) { - - RES r = ResourceLoader::load(p_value); - if (!r.is_valid()) - return; - _live_edit_res_set_func(p_id, p_prop, r); -} -void SceneTree::_live_edit_res_call_func(int p_id, const StringName &p_method, VARIANT_ARG_DECLARE) { - - if (!live_edit_resource_cache.has(p_id)) - return; - - String resp = live_edit_resource_cache[p_id]; - - if (!ResourceCache::has(resp)) - return; - - RES r = ResourceCache::get(resp); - if (!r.is_valid()) - return; - - r->call(p_method, VARIANT_ARG_PASS); -} - -void SceneTree::_live_edit_root_func(const NodePath &p_scene_path, const String &p_scene_from) { - - live_edit_root = p_scene_path; - live_edit_scene = p_scene_from; -} - -void SceneTree::_live_edit_create_node_func(const NodePath &p_parent, const String &p_type, const String &p_name) { - - Node *base = NULL; - if (root->has_node(live_edit_root)) - base = root->get_node(live_edit_root); - - Map<String, Set<Node *> >::Element *E = live_scene_edit_cache.find(live_edit_scene); - if (!E) - return; //scene not editable - - for (Set<Node *>::Element *F = E->get().front(); F; F = F->next()) { - - Node *n = F->get(); - - if (base && !base->is_a_parent_of(n)) - continue; - - if (!n->has_node(p_parent)) - continue; - Node *n2 = n->get_node(p_parent); - - Node *no = Object::cast_to<Node>(ClassDB::instance(p_type)); - if (!no) { - continue; - } - - no->set_name(p_name); - n2->add_child(no); - } -} -void SceneTree::_live_edit_instance_node_func(const NodePath &p_parent, const String &p_path, const String &p_name) { - - Ref<PackedScene> ps = ResourceLoader::load(p_path); - - if (!ps.is_valid()) - return; - - Node *base = NULL; - if (root->has_node(live_edit_root)) - base = root->get_node(live_edit_root); - - Map<String, Set<Node *> >::Element *E = live_scene_edit_cache.find(live_edit_scene); - if (!E) - return; //scene not editable - - for (Set<Node *>::Element *F = E->get().front(); F; F = F->next()) { - - Node *n = F->get(); - - if (base && !base->is_a_parent_of(n)) - continue; - - if (!n->has_node(p_parent)) - continue; - Node *n2 = n->get_node(p_parent); - - Node *no = ps->instance(); - if (!no) { - continue; - } - - no->set_name(p_name); - n2->add_child(no); - } -} -void SceneTree::_live_edit_remove_node_func(const NodePath &p_at) { - - Node *base = NULL; - if (root->has_node(live_edit_root)) - base = root->get_node(live_edit_root); - - Map<String, Set<Node *> >::Element *E = live_scene_edit_cache.find(live_edit_scene); - if (!E) - return; //scene not editable - - for (Set<Node *>::Element *F = E->get().front(); F;) { - - Set<Node *>::Element *N = F->next(); - - Node *n = F->get(); - - if (base && !base->is_a_parent_of(n)) - continue; - - if (!n->has_node(p_at)) - continue; - Node *n2 = n->get_node(p_at); - - memdelete(n2); - - F = N; - } -} -void SceneTree::_live_edit_remove_and_keep_node_func(const NodePath &p_at, ObjectID p_keep_id) { - - Node *base = NULL; - if (root->has_node(live_edit_root)) - base = root->get_node(live_edit_root); - - Map<String, Set<Node *> >::Element *E = live_scene_edit_cache.find(live_edit_scene); - if (!E) - return; //scene not editable - - for (Set<Node *>::Element *F = E->get().front(); F;) { - - Set<Node *>::Element *N = F->next(); - - Node *n = F->get(); - - if (base && !base->is_a_parent_of(n)) - continue; - - if (!n->has_node(p_at)) - continue; - - Node *n2 = n->get_node(p_at); - - n2->get_parent()->remove_child(n2); - - live_edit_remove_list[n][p_keep_id] = n2; - - F = N; - } -} -void SceneTree::_live_edit_restore_node_func(ObjectID p_id, const NodePath &p_at, int p_at_pos) { - - Node *base = NULL; - if (root->has_node(live_edit_root)) - base = root->get_node(live_edit_root); - - Map<String, Set<Node *> >::Element *E = live_scene_edit_cache.find(live_edit_scene); - if (!E) - return; //scene not editable - - for (Set<Node *>::Element *F = E->get().front(); F;) { - - Set<Node *>::Element *N = F->next(); - - Node *n = F->get(); - - if (base && !base->is_a_parent_of(n)) - continue; - - if (!n->has_node(p_at)) - continue; - Node *n2 = n->get_node(p_at); - - Map<Node *, Map<ObjectID, Node *> >::Element *EN = live_edit_remove_list.find(n); - - if (!EN) - continue; - - Map<ObjectID, Node *>::Element *FN = EN->get().find(p_id); - - if (!FN) - continue; - n2->add_child(FN->get()); - - EN->get().erase(FN); - - if (EN->get().size() == 0) { - live_edit_remove_list.erase(EN); - } - - F = N; - } -} -void SceneTree::_live_edit_duplicate_node_func(const NodePath &p_at, const String &p_new_name) { - - Node *base = NULL; - if (root->has_node(live_edit_root)) - base = root->get_node(live_edit_root); - - Map<String, Set<Node *> >::Element *E = live_scene_edit_cache.find(live_edit_scene); - if (!E) - return; //scene not editable - - for (Set<Node *>::Element *F = E->get().front(); F; F = F->next()) { - - Node *n = F->get(); - - if (base && !base->is_a_parent_of(n)) - continue; - - if (!n->has_node(p_at)) - continue; - Node *n2 = n->get_node(p_at); - - Node *dup = n2->duplicate(Node::DUPLICATE_SIGNALS | Node::DUPLICATE_GROUPS | Node::DUPLICATE_SCRIPTS); - - if (!dup) - continue; - - dup->set_name(p_new_name); - n2->get_parent()->add_child(dup); - } -} -void SceneTree::_live_edit_reparent_node_func(const NodePath &p_at, const NodePath &p_new_place, const String &p_new_name, int p_at_pos) { - - Node *base = NULL; - if (root->has_node(live_edit_root)) - base = root->get_node(live_edit_root); - - Map<String, Set<Node *> >::Element *E = live_scene_edit_cache.find(live_edit_scene); - if (!E) - return; //scene not editable - - for (Set<Node *>::Element *F = E->get().front(); F; F = F->next()) { - - Node *n = F->get(); - - if (base && !base->is_a_parent_of(n)) - continue; - - if (!n->has_node(p_at)) - continue; - Node *nfrom = n->get_node(p_at); - - if (!n->has_node(p_new_place)) - continue; - Node *nto = n->get_node(p_new_place); - - nfrom->get_parent()->remove_child(nfrom); - nfrom->set_name(p_new_name); - - nto->add_child(nfrom); - if (p_at_pos >= 0) - nto->move_child(nfrom, p_at_pos); - } -} - -#endif - void SceneTree::drop_files(const Vector<String> &p_files, int p_from_screen) { emit_signal("files_dropped", p_files, p_from_screen); @@ -1766,21 +1393,21 @@ void SceneTree::set_multiplayer(Ref<MultiplayerAPI> p_multiplayer) { ERR_FAIL_COND(!p_multiplayer.is_valid()); if (multiplayer.is_valid()) { - multiplayer->disconnect("network_peer_connected", this, "_network_peer_connected"); - multiplayer->disconnect("network_peer_disconnected", this, "_network_peer_disconnected"); - multiplayer->disconnect("connected_to_server", this, "_connected_to_server"); - multiplayer->disconnect("connection_failed", this, "_connection_failed"); - multiplayer->disconnect("server_disconnected", this, "_server_disconnected"); + multiplayer->disconnect_compat("network_peer_connected", this, "_network_peer_connected"); + multiplayer->disconnect_compat("network_peer_disconnected", this, "_network_peer_disconnected"); + multiplayer->disconnect_compat("connected_to_server", this, "_connected_to_server"); + multiplayer->disconnect_compat("connection_failed", this, "_connection_failed"); + multiplayer->disconnect_compat("server_disconnected", this, "_server_disconnected"); } multiplayer = p_multiplayer; multiplayer->set_root_node(root); - multiplayer->connect("network_peer_connected", this, "_network_peer_connected"); - multiplayer->connect("network_peer_disconnected", this, "_network_peer_disconnected"); - multiplayer->connect("connected_to_server", this, "_connected_to_server"); - multiplayer->connect("connection_failed", this, "_connection_failed"); - multiplayer->connect("server_disconnected", this, "_server_disconnected"); + multiplayer->connect_compat("network_peer_connected", this, "_network_peer_connected"); + multiplayer->connect_compat("network_peer_disconnected", this, "_network_peer_disconnected"); + multiplayer->connect_compat("connected_to_server", this, "_connected_to_server"); + multiplayer->connect_compat("connection_failed", this, "_connection_failed"); + multiplayer->connect_compat("server_disconnected", this, "_server_disconnected"); } void SceneTree::set_network_peer(const Ref<NetworkedMultiplayerPeer> &p_network_peer) { @@ -1858,8 +1485,8 @@ void SceneTree::_bind_methods() { MethodInfo mi; mi.name = "call_group_flags"; mi.arguments.push_back(PropertyInfo(Variant::INT, "flags")); - mi.arguments.push_back(PropertyInfo(Variant::STRING, "group")); - mi.arguments.push_back(PropertyInfo(Variant::STRING, "method")); + mi.arguments.push_back(PropertyInfo(Variant::STRING_NAME, "group")); + mi.arguments.push_back(PropertyInfo(Variant::STRING_NAME, "method")); ClassDB::bind_vararg_method(METHOD_FLAGS_DEFAULT, "call_group_flags", &SceneTree::_call_group_flags, mi); @@ -1868,8 +1495,8 @@ void SceneTree::_bind_methods() { MethodInfo mi2; mi2.name = "call_group"; - mi2.arguments.push_back(PropertyInfo(Variant::STRING, "group")); - mi2.arguments.push_back(PropertyInfo(Variant::STRING, "method")); + mi2.arguments.push_back(PropertyInfo(Variant::STRING_NAME, "group")); + mi2.arguments.push_back(PropertyInfo(Variant::STRING_NAME, "method")); ClassDB::bind_vararg_method(METHOD_FLAGS_DEFAULT, "call_group", &SceneTree::_call_group, mi2); @@ -1933,7 +1560,7 @@ void SceneTree::_bind_methods() { ADD_SIGNAL(MethodInfo("idle_frame")); ADD_SIGNAL(MethodInfo("physics_frame")); - ADD_SIGNAL(MethodInfo("files_dropped", PropertyInfo(Variant::POOL_STRING_ARRAY, "files"), PropertyInfo(Variant::INT, "screen"))); + ADD_SIGNAL(MethodInfo("files_dropped", PropertyInfo(Variant::PACKED_STRING_ARRAY, "files"), PropertyInfo(Variant::INT, "screen"))); ADD_SIGNAL(MethodInfo("global_menu_action", PropertyInfo(Variant::NIL, "id"), PropertyInfo(Variant::NIL, "meta"))); ADD_SIGNAL(MethodInfo("network_peer_connected", PropertyInfo(Variant::INT, "id"))); ADD_SIGNAL(MethodInfo("network_peer_disconnected", PropertyInfo(Variant::INT, "id"))); @@ -2073,8 +1700,6 @@ SceneTree::SceneTree() { root->set_as_audio_listener_2d(true); current_scene = NULL; - int ref_atlas_size = GLOBAL_DEF("rendering/quality/reflections/atlas_size", 2048); - ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/reflections/atlas_size", PropertyInfo(Variant::INT, "rendering/quality/reflections/atlas_size", PROPERTY_HINT_RANGE, "0,8192,or_greater")); //next_power_of_2 will return a 0 as min value int msaa_mode = GLOBAL_DEF("rendering/quality/filters/msaa", 0); ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/filters/msaa", PropertyInfo(Variant::INT, "rendering/quality/filters/msaa", PROPERTY_HINT_ENUM, "Disabled,2x,4x,8x,16x,AndroidVR 2x,AndroidVR 4x")); root->set_msaa(Viewport::MSAA(msaa_mode)); @@ -2118,11 +1743,6 @@ SceneTree::SceneTree() { _update_root_rect(); if (ScriptDebugger::get_singleton()) { - if (ScriptDebugger::get_singleton()->is_remote()) { - ScriptDebuggerRemote *remote_debugger = static_cast<ScriptDebuggerRemote *>(ScriptDebugger::get_singleton()); - - remote_debugger->set_scene_tree(this); - } ScriptDebugger::get_singleton()->set_multiplayer(multiplayer); } @@ -2131,12 +1751,6 @@ SceneTree::SceneTree() { #ifdef TOOLS_ENABLED edited_scene_root = NULL; #endif - -#ifdef DEBUG_ENABLED - - live_edit_root = NodePath("/root"); - -#endif } SceneTree::~SceneTree() { diff --git a/scene/main/scene_tree.h b/scene/main/scene_tree.h index 565c58fac1..1bef0d3131 100644 --- a/scene/main/scene_tree.h +++ b/scene/main/scene_tree.h @@ -44,6 +44,7 @@ class Node; class Viewport; class Material; class Mesh; +class SceneDebugger; class SceneTreeTimer : public Reference { GDCLASS(SceneTreeTimer, Reference); @@ -208,8 +209,8 @@ private: void _notify_group_pause(const StringName &p_group, int p_notification); void _call_input_pause(const StringName &p_group, const StringName &p_method, const Ref<InputEvent> &p_input); - Variant _call_group_flags(const Variant **p_args, int p_argcount, Variant::CallError &r_error); - Variant _call_group(const Variant **p_args, int p_argcount, Variant::CallError &r_error); + Variant _call_group_flags(const Variant **p_args, int p_argcount, Callable::CallError &r_error); + Variant _call_group(const Variant **p_args, int p_argcount, Callable::CallError &r_error); void _flush_delete_queue(); //optimization @@ -219,39 +220,8 @@ private: SelfList<Node>::List xform_change_list; - friend class ScriptDebuggerRemote; -#ifdef DEBUG_ENABLED - - Map<int, NodePath> live_edit_node_path_cache; - Map<int, String> live_edit_resource_cache; - - NodePath live_edit_root; - String live_edit_scene; - - Map<String, Set<Node *> > live_scene_edit_cache; - Map<Node *, Map<ObjectID, Node *> > live_edit_remove_list; - - void _debugger_request_tree(); - - void _live_edit_node_path_func(const NodePath &p_path, int p_id); - void _live_edit_res_path_func(const String &p_path, int p_id); - - void _live_edit_node_set_func(int p_id, const StringName &p_prop, const Variant &p_value); - void _live_edit_node_set_res_func(int p_id, const StringName &p_prop, const String &p_value); - void _live_edit_node_call_func(int p_id, const StringName &p_method, VARIANT_ARG_DECLARE); - void _live_edit_res_set_func(int p_id, const StringName &p_prop, const Variant &p_value); - void _live_edit_res_set_res_func(int p_id, const StringName &p_prop, const String &p_value); - void _live_edit_res_call_func(int p_id, const StringName &p_method, VARIANT_ARG_DECLARE); - void _live_edit_root_func(const NodePath &p_scene_path, const String &p_scene_from); - - void _live_edit_create_node_func(const NodePath &p_parent, const String &p_type, const String &p_name); - void _live_edit_instance_node_func(const NodePath &p_parent, const String &p_path, const String &p_name); - void _live_edit_remove_node_func(const NodePath &p_at); - void _live_edit_remove_and_keep_node_func(const NodePath &p_at, ObjectID p_keep_id); - void _live_edit_restore_node_func(ObjectID p_id, const NodePath &p_at, int p_at_pos); - void _live_edit_duplicate_node_func(const NodePath &p_at, const String &p_new_name); - void _live_edit_reparent_node_func(const NodePath &p_at, const NodePath &p_new_place, const String &p_new_name, int p_at_pos); - +#ifdef DEBUG_ENABLED // No live editor in release build. + friend class LiveEditor; #endif enum { diff --git a/scene/main/timer.cpp b/scene/main/timer.cpp index cb213be731..7c847095e1 100755 --- a/scene/main/timer.cpp +++ b/scene/main/timer.cpp @@ -206,11 +206,11 @@ void Timer::_bind_methods() { ADD_SIGNAL(MethodInfo("timeout")); ADD_PROPERTY(PropertyInfo(Variant::INT, "process_mode", PROPERTY_HINT_ENUM, "Physics,Idle"), "set_timer_process_mode", "get_timer_process_mode"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "wait_time", PROPERTY_HINT_EXP_RANGE, "0.001,4096,0.001,or_greater"), "set_wait_time", "get_wait_time"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "wait_time", PROPERTY_HINT_EXP_RANGE, "0.001,4096,0.001,or_greater"), "set_wait_time", "get_wait_time"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "one_shot"), "set_one_shot", "is_one_shot"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "autostart"), "set_autostart", "has_autostart"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "paused", PROPERTY_HINT_NONE, "", 0), "set_paused", "is_paused"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "time_left", PROPERTY_HINT_NONE, "", 0), "", "get_time_left"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "time_left", PROPERTY_HINT_NONE, "", 0), "", "get_time_left"); BIND_ENUM_CONSTANT(TIMER_PROCESS_PHYSICS); BIND_ENUM_CONSTANT(TIMER_PROCESS_IDLE); diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp index 748a713110..2f9c9f8a37 100644 --- a/scene/main/viewport.cpp +++ b/scene/main/viewport.cpp @@ -1124,7 +1124,7 @@ void Viewport::set_world(const Ref<World> &p_world) { _propagate_exit_world(this); if (own_world.is_valid() && world.is_valid()) { - world->disconnect(CoreStringNames::get_singleton()->changed, this, "_own_world_changed"); + world->disconnect_compat(CoreStringNames::get_singleton()->changed, this, "_own_world_changed"); } world = p_world; @@ -1132,7 +1132,7 @@ void Viewport::set_world(const Ref<World> &p_world) { if (own_world.is_valid()) { if (world.is_valid()) { own_world = world->duplicate(); - world->connect(CoreStringNames::get_singleton()->changed, this, "_own_world_changed"); + world->connect_compat(CoreStringNames::get_singleton()->changed, this, "_own_world_changed"); } else { own_world = Ref<World>(memnew(World)); } @@ -2473,7 +2473,7 @@ List<Control *>::Element *Viewport::_gui_add_root_control(Control *p_control) { List<Control *>::Element *Viewport::_gui_add_subwindow_control(Control *p_control) { - p_control->connect("visibility_changed", this, "_subwindow_visibility_changed"); + p_control->connect_compat("visibility_changed", this, "_subwindow_visibility_changed"); if (p_control->is_visible_in_tree()) { gui.subwindow_order_dirty = true; @@ -2568,7 +2568,7 @@ void Viewport::_gui_remove_subwindow_control(List<Control *>::Element *SI) { Control *control = SI->get(); - control->disconnect("visibility_changed", this, "_subwindow_visibility_changed"); + control->disconnect_compat("visibility_changed", this, "_subwindow_visibility_changed"); List<Control *>::Element *E = gui.subwindows.find(control); if (E) @@ -2850,12 +2850,12 @@ void Viewport::set_use_own_world(bool p_world) { if (!p_world) { own_world = Ref<World>(); if (world.is_valid()) { - world->disconnect(CoreStringNames::get_singleton()->changed, this, "_own_world_changed"); + world->disconnect_compat(CoreStringNames::get_singleton()->changed, this, "_own_world_changed"); } } else { if (world.is_valid()) { own_world = world->duplicate(); - world->connect(CoreStringNames::get_singleton()->changed, this, "_own_world_changed"); + world->connect_compat(CoreStringNames::get_singleton()->changed, this, "_own_world_changed"); } else { own_world = Ref<World>(memnew(World)); } @@ -3285,7 +3285,7 @@ void Viewport::_bind_methods() { BIND_ENUM_CONSTANT(DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_NEAREST); BIND_ENUM_CONSTANT(DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_LINEAR); BIND_ENUM_CONSTANT(DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS); - BIND_ENUM_CONSTANT(DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIMPAMPS); + BIND_ENUM_CONSTANT(DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS); BIND_ENUM_CONSTANT(DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_MAX); BIND_ENUM_CONSTANT(DEFAULT_CANVAS_ITEM_TEXTURE_REPEAT_DISABLED); @@ -3360,7 +3360,7 @@ Viewport::Viewport() { //gui.tooltip_timer->force_parent_owned(); gui.tooltip_delay = GLOBAL_DEF("gui/timers/tooltip_delay_sec", 0.5); - ProjectSettings::get_singleton()->set_custom_property_info("gui/timers/tooltip_delay_sec", PropertyInfo(Variant::REAL, "gui/timers/tooltip_delay_sec", PROPERTY_HINT_RANGE, "0,5,0.01,or_greater")); // No negative numbers + ProjectSettings::get_singleton()->set_custom_property_info("gui/timers/tooltip_delay_sec", PropertyInfo(Variant::FLOAT, "gui/timers/tooltip_delay_sec", PROPERTY_HINT_RANGE, "0,5,0.01,or_greater")); // No negative numbers gui.tooltip = NULL; gui.tooltip_label = NULL; diff --git a/scene/main/viewport.h b/scene/main/viewport.h index 44d4c89ed1..30c872b6ed 100644 --- a/scene/main/viewport.h +++ b/scene/main/viewport.h @@ -153,7 +153,7 @@ public: DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_NEAREST, DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_LINEAR, DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS, - DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIMPAMPS, + DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS, DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_MAX }; diff --git a/scene/register_scene_types.cpp b/scene/register_scene_types.cpp index 40f24ece87..6288598ce2 100644 --- a/scene/register_scene_types.cpp +++ b/scene/register_scene_types.cpp @@ -76,6 +76,7 @@ #include "scene/animation/root_motion_view.h" #include "scene/animation/tween.h" #include "scene/audio/audio_stream_player.h" +#include "scene/debugger/scene_debugger.h" #include "scene/gui/box_container.h" #include "scene/gui/button.h" #include "scene/gui/center_container.h" @@ -487,17 +488,20 @@ void register_scene_types() { ClassDB::register_class<VisualShaderNodeInput>(); ClassDB::register_virtual_class<VisualShaderNodeOutput>(); ClassDB::register_class<VisualShaderNodeGroupBase>(); - ClassDB::register_class<VisualShaderNodeScalarConstant>(); + ClassDB::register_class<VisualShaderNodeFloatConstant>(); + ClassDB::register_class<VisualShaderNodeIntConstant>(); ClassDB::register_class<VisualShaderNodeBooleanConstant>(); ClassDB::register_class<VisualShaderNodeColorConstant>(); ClassDB::register_class<VisualShaderNodeVec3Constant>(); ClassDB::register_class<VisualShaderNodeTransformConstant>(); - ClassDB::register_class<VisualShaderNodeScalarOp>(); + ClassDB::register_class<VisualShaderNodeFloatOp>(); + ClassDB::register_class<VisualShaderNodeIntOp>(); ClassDB::register_class<VisualShaderNodeVectorOp>(); ClassDB::register_class<VisualShaderNodeColorOp>(); ClassDB::register_class<VisualShaderNodeTransformMult>(); ClassDB::register_class<VisualShaderNodeTransformVecMult>(); - ClassDB::register_class<VisualShaderNodeScalarFunc>(); + ClassDB::register_class<VisualShaderNodeFloatFunc>(); + ClassDB::register_class<VisualShaderNodeIntFunc>(); ClassDB::register_class<VisualShaderNodeVectorFunc>(); ClassDB::register_class<VisualShaderNodeColorFunc>(); ClassDB::register_class<VisualShaderNodeTransformFunc>(); @@ -526,7 +530,8 @@ void register_scene_types() { ClassDB::register_class<VisualShaderNodeTexture>(); ClassDB::register_class<VisualShaderNodeCubemap>(); ClassDB::register_virtual_class<VisualShaderNodeUniform>(); - ClassDB::register_class<VisualShaderNodeScalarUniform>(); + ClassDB::register_class<VisualShaderNodeFloatUniform>(); + ClassDB::register_class<VisualShaderNodeIntUniform>(); ClassDB::register_class<VisualShaderNodeBooleanUniform>(); ClassDB::register_class<VisualShaderNodeColorUniform>(); ClassDB::register_class<VisualShaderNodeVec3Uniform>(); @@ -737,6 +742,10 @@ void register_scene_types() { ClassDB::add_compatibility_class("SpatialMaterial", "StandardMaterial3D"); ClassDB::add_compatibility_class("Mesh", "ArrayMesh"); ClassDB::add_compatibility_class("AnimationTreePlayer", "AnimationTree"); + ClassDB::add_compatibility_class("VisualShaderNodeScalarConstant", "VisualShaderNodeFloatConstant"); + ClassDB::add_compatibility_class("VisualShaderNodeScalarUniform", "VisualShaderNodeFloatUniform"); + ClassDB::add_compatibility_class("VisualShaderNodeScalarOp", "VisualShaderNodeFloatOp"); + ClassDB::add_compatibility_class("VisualShaderNodeScalarFunc", "VisualShaderNodeFloatFunc"); #endif OS::get_singleton()->yield(); //may take time to init @@ -777,10 +786,12 @@ void register_scene_types() { ERR_PRINT("Error loading custom theme '" + theme_path + "'"); } } + SceneDebugger::initialize(); } void unregister_scene_types() { + SceneDebugger::deinitialize(); clear_default_theme(); ResourceLoader::remove_resource_format_loader(resource_loader_dynamic_font); diff --git a/scene/resources/animation.cpp b/scene/resources/animation.cpp index 91d1e32053..ba1f738115 100644 --- a/scene/resources/animation.cpp +++ b/scene/resources/animation.cpp @@ -91,11 +91,11 @@ bool Animation::_set(const StringName &p_name, const Variant &p_value) { if (track_get_type(track) == TYPE_TRANSFORM) { TransformTrack *tt = static_cast<TransformTrack *>(tracks[track]); - PoolVector<float> values = p_value; + Vector<float> values = p_value; int vcount = values.size(); ERR_FAIL_COND_V(vcount % 12, false); // should be multiple of 11 - PoolVector<float>::Read r = values.read(); + const float *r = values.ptr(); tt->transforms.resize(vcount / 12); @@ -140,7 +140,7 @@ bool Animation::_set(const StringName &p_name, const Variant &p_value) { vt->update_mode = UpdateMode(um); } - PoolVector<float> times = d["times"]; + Vector<float> times = d["times"]; Array values = d["values"]; ERR_FAIL_COND_V(times.size() != values.size(), false); @@ -149,7 +149,7 @@ bool Animation::_set(const StringName &p_name, const Variant &p_value) { int valcount = times.size(); - PoolVector<float>::Read rt = times.read(); + const float *rt = times.ptr(); vt->values.resize(valcount); @@ -161,10 +161,10 @@ bool Animation::_set(const StringName &p_name, const Variant &p_value) { if (d.has("transitions")) { - PoolVector<float> transitions = d["transitions"]; + Vector<float> transitions = d["transitions"]; ERR_FAIL_COND_V(transitions.size() != valcount, false); - PoolVector<float>::Read rtr = transitions.read(); + const float *rtr = transitions.ptr(); for (int i = 0; i < valcount; i++) { @@ -184,7 +184,7 @@ bool Animation::_set(const StringName &p_name, const Variant &p_value) { ERR_FAIL_COND_V(!d.has("times"), false); ERR_FAIL_COND_V(!d.has("values"), false); - PoolVector<float> times = d["times"]; + Vector<float> times = d["times"]; Array values = d["values"]; ERR_FAIL_COND_V(times.size() != values.size(), false); @@ -193,7 +193,7 @@ bool Animation::_set(const StringName &p_name, const Variant &p_value) { int valcount = times.size(); - PoolVector<float>::Read rt = times.read(); + const float *rt = times.ptr(); for (int i = 0; i < valcount; i++) { @@ -202,10 +202,10 @@ bool Animation::_set(const StringName &p_name, const Variant &p_value) { if (d.has("transitions")) { - PoolVector<float> transitions = d["transitions"]; + Vector<float> transitions = d["transitions"]; ERR_FAIL_COND_V(transitions.size() != valcount, false); - PoolVector<float>::Read rtr = transitions.read(); + const float *rtr = transitions.ptr(); for (int i = 0; i < valcount; i++) { @@ -220,8 +220,8 @@ bool Animation::_set(const StringName &p_name, const Variant &p_value) { ERR_FAIL_COND_V(!d.has("times"), false); ERR_FAIL_COND_V(!d.has("points"), false); - PoolVector<float> times = d["times"]; - PoolRealArray values = d["points"]; + Vector<float> times = d["times"]; + PackedFloat32Array values = d["points"]; ERR_FAIL_COND_V(times.size() * 5 != values.size(), false); @@ -229,8 +229,8 @@ bool Animation::_set(const StringName &p_name, const Variant &p_value) { int valcount = times.size(); - PoolVector<float>::Read rt = times.read(); - PoolVector<float>::Read rv = values.read(); + const float *rt = times.ptr(); + const float *rv = values.ptr(); bt->values.resize(valcount); @@ -254,7 +254,7 @@ bool Animation::_set(const StringName &p_name, const Variant &p_value) { ERR_FAIL_COND_V(!d.has("times"), false); ERR_FAIL_COND_V(!d.has("clips"), false); - PoolVector<float> times = d["times"]; + Vector<float> times = d["times"]; Array clips = d["clips"]; ERR_FAIL_COND_V(clips.size() != times.size(), false); @@ -263,7 +263,7 @@ bool Animation::_set(const StringName &p_name, const Variant &p_value) { int valcount = times.size(); - PoolVector<float>::Read rt = times.read(); + const float *rt = times.ptr(); ad->values.clear(); @@ -295,8 +295,8 @@ bool Animation::_set(const StringName &p_name, const Variant &p_value) { ERR_FAIL_COND_V(!d.has("times"), false); ERR_FAIL_COND_V(!d.has("clips"), false); - PoolVector<float> times = d["times"]; - PoolVector<String> clips = d["clips"]; + Vector<float> times = d["times"]; + Vector<String> clips = d["clips"]; ERR_FAIL_COND_V(clips.size() != times.size(), false); @@ -304,8 +304,8 @@ bool Animation::_set(const StringName &p_name, const Variant &p_value) { int valcount = times.size(); - PoolVector<float>::Read rt = times.read(); - PoolVector<String>::Read rc = clips.read(); + const float *rt = times.ptr(); + const String *rc = clips.ptr(); an->values.resize(valcount); @@ -373,11 +373,11 @@ bool Animation::_get(const StringName &p_name, Variant &r_ret) const { if (track_get_type(track) == TYPE_TRANSFORM) { - PoolVector<real_t> keys; + Vector<float> keys; int kk = track_get_key_count(track); keys.resize(kk * 12); - PoolVector<real_t>::Write w = keys.write(); + real_t *w = keys.ptrw(); int idx = 0; for (int i = 0; i < track_get_key_count(track); i++) { @@ -403,7 +403,6 @@ bool Animation::_get(const StringName &p_name, Variant &r_ret) const { w[idx++] = scale.z; } - w.release(); r_ret = keys; return true; @@ -413,8 +412,8 @@ bool Animation::_get(const StringName &p_name, Variant &r_ret) const { Dictionary d; - PoolVector<float> key_times; - PoolVector<float> key_transitions; + Vector<float> key_times; + Vector<float> key_transitions; Array key_values; int kk = vt->values.size(); @@ -423,8 +422,8 @@ bool Animation::_get(const StringName &p_name, Variant &r_ret) const { key_transitions.resize(kk); key_values.resize(kk); - PoolVector<float>::Write wti = key_times.write(); - PoolVector<float>::Write wtr = key_transitions.write(); + float *wti = key_times.ptrw(); + float *wtr = key_transitions.ptrw(); int idx = 0; @@ -438,9 +437,6 @@ bool Animation::_get(const StringName &p_name, Variant &r_ret) const { idx++; } - wti.release(); - wtr.release(); - d["times"] = key_times; d["transitions"] = key_transitions; d["values"] = key_values; @@ -456,8 +452,8 @@ bool Animation::_get(const StringName &p_name, Variant &r_ret) const { Dictionary d; - PoolVector<float> key_times; - PoolVector<float> key_transitions; + Vector<float> key_times; + Vector<float> key_transitions; Array key_values; int kk = track_get_key_count(track); @@ -466,8 +462,8 @@ bool Animation::_get(const StringName &p_name, Variant &r_ret) const { key_transitions.resize(kk); key_values.resize(kk); - PoolVector<float>::Write wti = key_times.write(); - PoolVector<float>::Write wtr = key_transitions.write(); + float *wti = key_times.ptrw(); + float *wtr = key_transitions.ptrw(); int idx = 0; for (int i = 0; i < track_get_key_count(track); i++) { @@ -478,9 +474,6 @@ bool Animation::_get(const StringName &p_name, Variant &r_ret) const { idx++; } - wti.release(); - wtr.release(); - d["times"] = key_times; d["transitions"] = key_transitions; d["values"] = key_values; @@ -497,16 +490,16 @@ bool Animation::_get(const StringName &p_name, Variant &r_ret) const { Dictionary d; - PoolVector<float> key_times; - PoolVector<float> key_points; + Vector<float> key_times; + Vector<float> key_points; int kk = bt->values.size(); key_times.resize(kk); key_points.resize(kk * 5); - PoolVector<float>::Write wti = key_times.write(); - PoolVector<float>::Write wpo = key_points.write(); + float *wti = key_times.ptrw(); + float *wpo = key_points.ptrw(); int idx = 0; @@ -523,9 +516,6 @@ bool Animation::_get(const StringName &p_name, Variant &r_ret) const { idx++; } - wti.release(); - wpo.release(); - d["times"] = key_times; d["points"] = key_points; @@ -538,14 +528,14 @@ bool Animation::_get(const StringName &p_name, Variant &r_ret) const { Dictionary d; - PoolVector<float> key_times; + Vector<float> key_times; Array clips; int kk = ad->values.size(); key_times.resize(kk); - PoolVector<float>::Write wti = key_times.write(); + float *wti = key_times.ptrw(); int idx = 0; @@ -562,8 +552,6 @@ bool Animation::_get(const StringName &p_name, Variant &r_ret) const { idx++; } - wti.release(); - d["times"] = key_times; d["clips"] = clips; @@ -576,16 +564,16 @@ bool Animation::_get(const StringName &p_name, Variant &r_ret) const { Dictionary d; - PoolVector<float> key_times; - PoolVector<String> clips; + Vector<float> key_times; + Vector<String> clips; int kk = an->values.size(); key_times.resize(kk); clips.resize(kk); - PoolVector<float>::Write wti = key_times.write(); - PoolVector<String>::Write wcl = clips.write(); + float *wti = key_times.ptrw(); + String *wcl = clips.ptrw(); const TKey<StringName> *vls = an->values.ptr(); @@ -595,9 +583,6 @@ bool Animation::_get(const StringName &p_name, Variant &r_ret) const { wcl[i] = vls[i].value; } - wti.release(); - wcl.release(); - d["times"] = key_times; d["clips"] = clips; @@ -1063,7 +1048,7 @@ void Animation::track_insert_key(int p_track, float p_time, const Variant &p_key ERR_FAIL_COND(p_key.get_type() != Variant::DICTIONARY); Dictionary d = p_key; - ERR_FAIL_COND(!d.has("method") || d["method"].get_type() != Variant::STRING); + 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()); MethodKey k; @@ -1635,7 +1620,7 @@ Variant Animation::_cubic_interpolate(const Variant &p_pre_a, const Variant &p_a vformat |= 1 << type_pa; vformat |= 1 << type_pb; - if (vformat == ((1 << Variant::INT) | (1 << Variant::REAL)) || vformat == (1 << Variant::REAL)) { + if (vformat == ((1 << Variant::INT) | (1 << Variant::FLOAT)) || vformat == (1 << Variant::FLOAT)) { //mix of real and int real_t p0 = p_pre_a; @@ -2825,9 +2810,9 @@ void Animation::_bind_methods() { ClassDB::bind_method(D_METHOD("clear"), &Animation::clear); ClassDB::bind_method(D_METHOD("copy_track", "track_idx", "to_animation"), &Animation::copy_track); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "length", PROPERTY_HINT_RANGE, "0.001,99999,0.001"), "set_length", "get_length"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "length", PROPERTY_HINT_RANGE, "0.001,99999,0.001"), "set_length", "get_length"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "loop"), "set_loop", "has_loop"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "step", PROPERTY_HINT_RANGE, "0,4096,0.001"), "set_step", "get_step"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "step", PROPERTY_HINT_RANGE, "0,4096,0.001"), "set_step", "get_step"); ADD_SIGNAL(MethodInfo("tracks_changed")); diff --git a/scene/resources/animation.h b/scene/resources/animation.h index 6ac0ea04d9..ea4f92878d 100644 --- a/scene/resources/animation.h +++ b/scene/resources/animation.h @@ -242,11 +242,11 @@ private: return ret; } - PoolVector<int> _value_track_get_key_indices(int p_track, float p_time, float p_delta) const { + Vector<int> _value_track_get_key_indices(int p_track, float p_time, float p_delta) const { List<int> idxs; value_track_get_key_indices(p_track, p_time, p_delta, &idxs); - PoolVector<int> idxr; + Vector<int> idxr; for (List<int>::Element *E = idxs.front(); E; E = E->next()) { @@ -254,11 +254,11 @@ private: } return idxr; } - PoolVector<int> _method_track_get_key_indices(int p_track, float p_time, float p_delta) const { + Vector<int> _method_track_get_key_indices(int p_track, float p_time, float p_delta) const { List<int> idxs; method_track_get_key_indices(p_track, p_time, p_delta, &idxs); - PoolVector<int> idxr; + Vector<int> idxr; for (List<int>::Element *E = idxs.front(); E; E = E->next()) { diff --git a/scene/resources/audio_stream_sample.cpp b/scene/resources/audio_stream_sample.cpp index a412d8a5e2..ed25729c40 100644 --- a/scene/resources/audio_stream_sample.cpp +++ b/scene/resources/audio_stream_sample.cpp @@ -477,7 +477,7 @@ float AudioStreamSample::get_length() const { return float(len) / mix_rate; } -void AudioStreamSample::set_data(const PoolVector<uint8_t> &p_data) { +void AudioStreamSample::set_data(const Vector<uint8_t> &p_data) { AudioServer::get_singleton()->lock(); if (data) { @@ -489,28 +489,28 @@ void AudioStreamSample::set_data(const PoolVector<uint8_t> &p_data) { int datalen = p_data.size(); if (datalen) { - PoolVector<uint8_t>::Read r = p_data.read(); + const uint8_t *r = p_data.ptr(); int alloc_len = datalen + DATA_PAD * 2; data = AudioServer::get_singleton()->audio_data_alloc(alloc_len); //alloc with some padding for interpolation zeromem(data, alloc_len); uint8_t *dataptr = (uint8_t *)data; - copymem(dataptr + DATA_PAD, r.ptr(), datalen); + copymem(dataptr + DATA_PAD, r, datalen); data_bytes = datalen; } AudioServer::get_singleton()->unlock(); } -PoolVector<uint8_t> AudioStreamSample::get_data() const { +Vector<uint8_t> AudioStreamSample::get_data() const { - PoolVector<uint8_t> pv; + Vector<uint8_t> pv; if (data) { pv.resize(data_bytes); { - PoolVector<uint8_t>::Write w = pv.write(); + uint8_t *w = pv.ptrw(); uint8_t *dataptr = (uint8_t *)data; - copymem(w.ptr(), dataptr + DATA_PAD, data_bytes); + copymem(w, dataptr + DATA_PAD, data_bytes); } } @@ -566,8 +566,8 @@ Error AudioStreamSample::save_to_wav(const String &p_path) { file->store_32(sub_chunk_2_size); //Subchunk2Size // Add data - PoolVector<uint8_t> data = get_data(); - PoolVector<uint8_t>::Read read_data = data.read(); + Vector<uint8_t> data = get_data(); + const uint8_t *read_data = data.ptr(); switch (format) { case AudioStreamSample::FORMAT_8_BITS: for (unsigned int i = 0; i < data_bytes; i++) { @@ -629,7 +629,7 @@ void AudioStreamSample::_bind_methods() { ClassDB::bind_method(D_METHOD("save_to_wav", "path"), &AudioStreamSample::save_to_wav); - ADD_PROPERTY(PropertyInfo(Variant::POOL_BYTE_ARRAY, "data", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_data", "get_data"); + ADD_PROPERTY(PropertyInfo(Variant::PACKED_BYTE_ARRAY, "data", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_data", "get_data"); ADD_PROPERTY(PropertyInfo(Variant::INT, "format", PROPERTY_HINT_ENUM, "8-Bit,16-Bit,IMA-ADPCM"), "set_format", "get_format"); ADD_PROPERTY(PropertyInfo(Variant::INT, "loop_mode", PROPERTY_HINT_ENUM, "Disabled,Forward,Ping-Pong,Backward"), "set_loop_mode", "get_loop_mode"); ADD_PROPERTY(PropertyInfo(Variant::INT, "loop_begin"), "set_loop_begin", "get_loop_begin"); diff --git a/scene/resources/audio_stream_sample.h b/scene/resources/audio_stream_sample.h index adcac14ea8..0b46bc1c75 100644 --- a/scene/resources/audio_stream_sample.h +++ b/scene/resources/audio_stream_sample.h @@ -138,8 +138,8 @@ public: virtual float get_length() const; //if supported, otherwise return 0 - void set_data(const PoolVector<uint8_t> &p_data); - PoolVector<uint8_t> get_data() const; + void set_data(const Vector<uint8_t> &p_data); + Vector<uint8_t> get_data() const; Error save_to_wav(const String &p_path); diff --git a/scene/resources/bit_map.cpp b/scene/resources/bit_map.cpp index 06323a8d31..6730f86e0c 100644 --- a/scene/resources/bit_map.cpp +++ b/scene/resources/bit_map.cpp @@ -52,7 +52,7 @@ void BitMap::create_from_image_alpha(const Ref<Image> &p_image, float p_threshol create(Size2(img->get_width(), img->get_height())); - PoolVector<uint8_t>::Read r = img->get_data().read(); + const uint8_t *r = img->get_data().ptr(); uint8_t *w = bitmask.ptrw(); for (int i = 0; i < width * height; i++) { @@ -426,7 +426,7 @@ struct FillBitsStackEntry { static void fill_bits(const BitMap *p_src, Ref<BitMap> &p_map, const Point2i &p_pos, const Rect2i &rect) { // Using a custom stack to work iteratively to avoid stack overflow on big bitmaps - PoolVector<FillBitsStackEntry> stack; + Vector<FillBitsStackEntry> stack; // Tracking size since we won't be shrinking the stack vector int stack_size = 0; @@ -601,11 +601,11 @@ Array BitMap::_opaque_to_polygons_bind(const Rect2 &p_rect, float p_epsilon) con const Vector<Vector2> &polygon = result[i]; - PoolVector2Array polygon_array; + PackedVector2Array polygon_array; polygon_array.resize(polygon.size()); { - PoolVector2Array::Write w = polygon_array.write(); + Vector2 *w = polygon_array.ptrw(); for (int j = 0; j < polygon.size(); j++) { w[j] = polygon[j]; } @@ -640,15 +640,13 @@ Ref<Image> BitMap::convert_to_image() const { Ref<Image> image; image.instance(); image->create(width, height, false, Image::FORMAT_L8); - image->lock(); + for (int i = 0; i < width; i++) { for (int j = 0; j < height; j++) { image->set_pixel(i, j, get_bit(Point2(i, j)) ? Color(1, 1, 1) : Color(0, 0, 0)); } } - image->unlock(); - return image; } void BitMap::blit(const Vector2 &p_pos, const Ref<BitMap> &p_bitmap) { diff --git a/scene/resources/capsule_shape.cpp b/scene/resources/capsule_shape.cpp index 933129936a..dddbd7fef3 100644 --- a/scene/resources/capsule_shape.cpp +++ b/scene/resources/capsule_shape.cpp @@ -38,7 +38,7 @@ Vector<Vector3> CapsuleShape::get_debug_mesh_lines() { Vector<Vector3> points; - Vector3 d(0, 0, height * 0.5); + Vector3 d(0, height * 0.5, 0); for (int i = 0; i < 360; i++) { float ra = Math::deg2rad((float)i); @@ -46,24 +46,24 @@ Vector<Vector3> CapsuleShape::get_debug_mesh_lines() { Point2 a = Vector2(Math::sin(ra), Math::cos(ra)) * radius; Point2 b = Vector2(Math::sin(rb), Math::cos(rb)) * radius; - points.push_back(Vector3(a.x, a.y, 0) + d); - points.push_back(Vector3(b.x, b.y, 0) + d); + points.push_back(Vector3(a.x, 0, a.y) + d); + points.push_back(Vector3(b.x, 0, b.y) + d); - points.push_back(Vector3(a.x, a.y, 0) - d); - points.push_back(Vector3(b.x, b.y, 0) - d); + points.push_back(Vector3(a.x, 0, a.y) - d); + points.push_back(Vector3(b.x, 0, b.y) - d); if (i % 90 == 0) { - points.push_back(Vector3(a.x, a.y, 0) + d); - points.push_back(Vector3(a.x, a.y, 0) - d); + points.push_back(Vector3(a.x, 0, a.y) + d); + points.push_back(Vector3(a.x, 0, a.y) - d); } Vector3 dud = i < 180 ? d : -d; - points.push_back(Vector3(0, a.y, a.x) + dud); - points.push_back(Vector3(0, b.y, b.x) + dud); - points.push_back(Vector3(a.y, 0, a.x) + dud); - points.push_back(Vector3(b.y, 0, b.x) + dud); + points.push_back(Vector3(0, a.x, a.y) + dud); + points.push_back(Vector3(0, b.x, b.y) + dud); + points.push_back(Vector3(a.y, a.x, 0) + dud); + points.push_back(Vector3(b.y, b.x, 0) + dud); } return points; @@ -115,8 +115,8 @@ void CapsuleShape::_bind_methods() { ClassDB::bind_method(D_METHOD("set_height", "height"), &CapsuleShape::set_height); ClassDB::bind_method(D_METHOD("get_height"), &CapsuleShape::get_height); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "radius", PROPERTY_HINT_RANGE, "0.01,4096,0.01"), "set_radius", "get_radius"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "height", PROPERTY_HINT_RANGE, "0.01,4096,0.01"), "set_height", "get_height"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "radius", PROPERTY_HINT_RANGE, "0.01,4096,0.01"), "set_radius", "get_radius"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "height", PROPERTY_HINT_RANGE, "0.01,4096,0.01"), "set_height", "get_height"); } CapsuleShape::CapsuleShape() : diff --git a/scene/resources/capsule_shape_2d.cpp b/scene/resources/capsule_shape_2d.cpp index 5658395cee..9b8083de97 100644 --- a/scene/resources/capsule_shape_2d.cpp +++ b/scene/resources/capsule_shape_2d.cpp @@ -109,8 +109,8 @@ void CapsuleShape2D::_bind_methods() { ClassDB::bind_method(D_METHOD("set_height", "height"), &CapsuleShape2D::set_height); ClassDB::bind_method(D_METHOD("get_height"), &CapsuleShape2D::get_height); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "radius"), "set_radius", "get_radius"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "height"), "set_height", "get_height"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "radius"), "set_radius", "get_radius"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "height"), "set_height", "get_height"); } CapsuleShape2D::CapsuleShape2D() : diff --git a/scene/resources/circle_shape_2d.cpp b/scene/resources/circle_shape_2d.cpp index 10f8ab8a8a..37874e17ef 100644 --- a/scene/resources/circle_shape_2d.cpp +++ b/scene/resources/circle_shape_2d.cpp @@ -60,7 +60,7 @@ void CircleShape2D::_bind_methods() { ClassDB::bind_method(D_METHOD("set_radius", "radius"), &CircleShape2D::set_radius); ClassDB::bind_method(D_METHOD("get_radius"), &CircleShape2D::get_radius); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "radius", PROPERTY_HINT_RANGE, "0.01,16384,0.5"), "set_radius", "get_radius"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "radius", PROPERTY_HINT_RANGE, "0.01,16384,0.5"), "set_radius", "get_radius"); } Rect2 CircleShape2D::get_rect() const { diff --git a/scene/resources/concave_polygon_shape.cpp b/scene/resources/concave_polygon_shape.cpp index 0a93f99ea3..fe123a2df7 100644 --- a/scene/resources/concave_polygon_shape.cpp +++ b/scene/resources/concave_polygon_shape.cpp @@ -36,11 +36,11 @@ Vector<Vector3> ConcavePolygonShape::get_debug_mesh_lines() { Set<DrawEdge> edges; - PoolVector<Vector3> data = get_faces(); + Vector<Vector3> data = get_faces(); int datalen = data.size(); ERR_FAIL_COND_V((datalen % 3) != 0, Vector<Vector3>()); - PoolVector<Vector3>::Read r = data.read(); + const Vector3 *r = data.ptr(); for (int i = 0; i < datalen; i += 3) { @@ -65,8 +65,8 @@ Vector<Vector3> ConcavePolygonShape::get_debug_mesh_lines() { } real_t ConcavePolygonShape::get_enclosing_radius() const { - PoolVector<Vector3> data = get_faces(); - PoolVector<Vector3>::Read read = data.read(); + Vector<Vector3> data = get_faces(); + const Vector3 *read = data.ptr(); real_t r = 0; for (int i(0); i < data.size(); i++) { r = MAX(read[i].length_squared(), r); @@ -78,13 +78,13 @@ void ConcavePolygonShape::_update_shape() { Shape::_update_shape(); } -void ConcavePolygonShape::set_faces(const PoolVector<Vector3> &p_faces) { +void ConcavePolygonShape::set_faces(const Vector<Vector3> &p_faces) { PhysicsServer::get_singleton()->shape_set_data(get_shape(), p_faces); notify_change_to_owners(); } -PoolVector<Vector3> ConcavePolygonShape::get_faces() const { +Vector<Vector3> ConcavePolygonShape::get_faces() const { return PhysicsServer::get_singleton()->shape_get_data(get_shape()); } @@ -93,7 +93,7 @@ void ConcavePolygonShape::_bind_methods() { ClassDB::bind_method(D_METHOD("set_faces", "faces"), &ConcavePolygonShape::set_faces); ClassDB::bind_method(D_METHOD("get_faces"), &ConcavePolygonShape::get_faces); - ADD_PROPERTY(PropertyInfo(Variant::POOL_VECTOR3_ARRAY, "data", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "set_faces", "get_faces"); + ADD_PROPERTY(PropertyInfo(Variant::PACKED_VECTOR3_ARRAY, "data", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "set_faces", "get_faces"); } ConcavePolygonShape::ConcavePolygonShape() : diff --git a/scene/resources/concave_polygon_shape.h b/scene/resources/concave_polygon_shape.h index b4bebbd7b4..63aabb27d7 100644 --- a/scene/resources/concave_polygon_shape.h +++ b/scene/resources/concave_polygon_shape.h @@ -63,8 +63,8 @@ protected: virtual void _update_shape(); public: - void set_faces(const PoolVector<Vector3> &p_faces); - PoolVector<Vector3> get_faces() const; + void set_faces(const Vector<Vector3> &p_faces); + Vector<Vector3> get_faces() const; virtual Vector<Vector3> get_debug_mesh_lines(); virtual real_t get_enclosing_radius() const; diff --git a/scene/resources/concave_polygon_shape_2d.cpp b/scene/resources/concave_polygon_shape_2d.cpp index 840733add3..c3e9e19721 100644 --- a/scene/resources/concave_polygon_shape_2d.cpp +++ b/scene/resources/concave_polygon_shape_2d.cpp @@ -35,12 +35,12 @@ bool ConcavePolygonShape2D::_edit_is_selected_on_click(const Point2 &p_point, double p_tolerance) const { - PoolVector<Vector2> s = get_segments(); + Vector<Vector2> s = get_segments(); int len = s.size(); if (len == 0 || (len % 2) == 1) return false; - PoolVector<Vector2>::Read r = s.read(); + const Vector2 *r = s.ptr(); for (int i = 0; i < len; i += 2) { Vector2 closest = Geometry::get_closest_point_to_segment_2d(p_point, &r[i]); if (p_point.distance_to(closest) < p_tolerance) @@ -50,25 +50,25 @@ bool ConcavePolygonShape2D::_edit_is_selected_on_click(const Point2 &p_point, do return false; } -void ConcavePolygonShape2D::set_segments(const PoolVector<Vector2> &p_segments) { +void ConcavePolygonShape2D::set_segments(const Vector<Vector2> &p_segments) { Physics2DServer::get_singleton()->shape_set_data(get_rid(), p_segments); emit_changed(); } -PoolVector<Vector2> ConcavePolygonShape2D::get_segments() const { +Vector<Vector2> ConcavePolygonShape2D::get_segments() const { return Physics2DServer::get_singleton()->shape_get_data(get_rid()); } void ConcavePolygonShape2D::draw(const RID &p_to_rid, const Color &p_color) { - PoolVector<Vector2> s = get_segments(); + Vector<Vector2> s = get_segments(); int len = s.size(); if (len == 0 || (len % 2) == 1) return; - PoolVector<Vector2>::Read r = s.read(); + const Vector2 *r = s.ptr(); for (int i = 0; i < len; i += 2) { VisualServer::get_singleton()->canvas_item_add_line(p_to_rid, r[i], r[i + 1], p_color, 2); } @@ -76,14 +76,14 @@ void ConcavePolygonShape2D::draw(const RID &p_to_rid, const Color &p_color) { Rect2 ConcavePolygonShape2D::get_rect() const { - PoolVector<Vector2> s = get_segments(); + Vector<Vector2> s = get_segments(); int len = s.size(); if (len == 0) return Rect2(); Rect2 rect; - PoolVector<Vector2>::Read r = s.read(); + const Vector2 *r = s.ptr(); for (int i = 0; i < len; i++) { if (i == 0) rect.position = r[i]; @@ -95,8 +95,8 @@ Rect2 ConcavePolygonShape2D::get_rect() const { } real_t ConcavePolygonShape2D::get_enclosing_radius() const { - PoolVector<Vector2> data = get_segments(); - PoolVector<Vector2>::Read read = data.read(); + Vector<Vector2> data = get_segments(); + const Vector2 *read = data.ptr(); real_t r = 0; for (int i(0); i < data.size(); i++) { r = MAX(read[i].length_squared(), r); @@ -109,11 +109,11 @@ void ConcavePolygonShape2D::_bind_methods() { ClassDB::bind_method(D_METHOD("set_segments", "segments"), &ConcavePolygonShape2D::set_segments); ClassDB::bind_method(D_METHOD("get_segments"), &ConcavePolygonShape2D::get_segments); - ADD_PROPERTY(PropertyInfo(Variant::POOL_VECTOR2_ARRAY, "segments"), "set_segments", "get_segments"); + ADD_PROPERTY(PropertyInfo(Variant::PACKED_VECTOR2_ARRAY, "segments"), "set_segments", "get_segments"); } ConcavePolygonShape2D::ConcavePolygonShape2D() : Shape2D(Physics2DServer::get_singleton()->concave_polygon_shape_create()) { - PoolVector<Vector2> empty; + Vector<Vector2> empty; set_segments(empty); } diff --git a/scene/resources/concave_polygon_shape_2d.h b/scene/resources/concave_polygon_shape_2d.h index 4e47ad34b8..f89995567e 100644 --- a/scene/resources/concave_polygon_shape_2d.h +++ b/scene/resources/concave_polygon_shape_2d.h @@ -42,8 +42,8 @@ protected: public: virtual bool _edit_is_selected_on_click(const Point2 &p_point, double p_tolerance) const; - void set_segments(const PoolVector<Vector2> &p_segments); - PoolVector<Vector2> get_segments() const; + void set_segments(const Vector<Vector2> &p_segments); + Vector<Vector2> get_segments() const; virtual void draw(const RID &p_to_rid, const Color &p_color); virtual Rect2 get_rect() const; diff --git a/scene/resources/convex_polygon_shape.cpp b/scene/resources/convex_polygon_shape.cpp index 21fdcc1f06..b7463605b4 100644 --- a/scene/resources/convex_polygon_shape.cpp +++ b/scene/resources/convex_polygon_shape.cpp @@ -34,7 +34,7 @@ Vector<Vector3> ConvexPolygonShape::get_debug_mesh_lines() { - PoolVector<Vector3> points = get_points(); + Vector<Vector3> points = get_points(); if (points.size() > 3) { @@ -56,8 +56,8 @@ Vector<Vector3> ConvexPolygonShape::get_debug_mesh_lines() { } real_t ConvexPolygonShape::get_enclosing_radius() const { - PoolVector<Vector3> data = get_points(); - PoolVector<Vector3>::Read read = data.read(); + Vector<Vector3> data = get_points(); + const Vector3 *read = data.ptr(); real_t r = 0; for (int i(0); i < data.size(); i++) { r = MAX(read[i].length_squared(), r); @@ -71,14 +71,14 @@ void ConvexPolygonShape::_update_shape() { Shape::_update_shape(); } -void ConvexPolygonShape::set_points(const PoolVector<Vector3> &p_points) { +void ConvexPolygonShape::set_points(const Vector<Vector3> &p_points) { points = p_points; _update_shape(); notify_change_to_owners(); } -PoolVector<Vector3> ConvexPolygonShape::get_points() const { +Vector<Vector3> ConvexPolygonShape::get_points() const { return points; } diff --git a/scene/resources/convex_polygon_shape.h b/scene/resources/convex_polygon_shape.h index e3bf02399a..fcd733887e 100644 --- a/scene/resources/convex_polygon_shape.h +++ b/scene/resources/convex_polygon_shape.h @@ -36,7 +36,7 @@ class ConvexPolygonShape : public Shape { GDCLASS(ConvexPolygonShape, Shape); - PoolVector<Vector3> points; + Vector<Vector3> points; protected: static void _bind_methods(); @@ -44,8 +44,8 @@ protected: virtual void _update_shape(); public: - void set_points(const PoolVector<Vector3> &p_points); - PoolVector<Vector3> get_points() const; + void set_points(const Vector<Vector3> &p_points); + Vector<Vector3> get_points() const; virtual Vector<Vector3> get_debug_mesh_lines(); virtual real_t get_enclosing_radius() const; diff --git a/scene/resources/convex_polygon_shape_2d.cpp b/scene/resources/convex_polygon_shape_2d.cpp index 296d014cc7..95967429c9 100644 --- a/scene/resources/convex_polygon_shape_2d.cpp +++ b/scene/resources/convex_polygon_shape_2d.cpp @@ -74,7 +74,7 @@ void ConvexPolygonShape2D::_bind_methods() { ClassDB::bind_method(D_METHOD("set_points", "points"), &ConvexPolygonShape2D::set_points); ClassDB::bind_method(D_METHOD("get_points"), &ConvexPolygonShape2D::get_points); - ADD_PROPERTY(PropertyInfo(Variant::POOL_VECTOR2_ARRAY, "points"), "set_points", "get_points"); + ADD_PROPERTY(PropertyInfo(Variant::PACKED_VECTOR2_ARRAY, "points"), "set_points", "get_points"); } void ConvexPolygonShape2D::draw(const RID &p_to_rid, const Color &p_color) { diff --git a/scene/resources/curve.cpp b/scene/resources/curve.cpp index 397f6ca906..a68eb77378 100644 --- a/scene/resources/curve.cpp +++ b/scene/resources/curve.cpp @@ -392,7 +392,7 @@ void Curve::set_data(Array input) { for (int i = 0; i < input.size(); i += ELEMS) { ERR_FAIL_COND(input[i].get_type() != Variant::VECTOR2); ERR_FAIL_COND(!input[i + 1].is_num()); - ERR_FAIL_COND(input[i + 2].get_type() != Variant::REAL); + ERR_FAIL_COND(input[i + 2].get_type() != Variant::FLOAT); ERR_FAIL_COND(input[i + 3].get_type() != Variant::INT); int left_mode = input[i + 3]; @@ -524,8 +524,8 @@ void Curve::_bind_methods() { ClassDB::bind_method(D_METHOD("_get_data"), &Curve::get_data); ClassDB::bind_method(D_METHOD("_set_data", "data"), &Curve::set_data); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "min_value", PROPERTY_HINT_RANGE, "-1024,1024,0.01"), "set_min_value", "get_min_value"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "max_value", PROPERTY_HINT_RANGE, "-1024,1024,0.01"), "set_max_value", "get_max_value"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "min_value", PROPERTY_HINT_RANGE, "-1024,1024,0.01"), "set_min_value", "get_min_value"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "max_value", PROPERTY_HINT_RANGE, "-1024,1024,0.01"), "set_max_value", "get_max_value"); ADD_PROPERTY(PropertyInfo(Variant::INT, "bake_resolution", PROPERTY_HINT_RANGE, "1,1000,1"), "set_bake_resolution", "get_bake_resolution"); ADD_PROPERTY(PropertyInfo(Variant::INT, "_data", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_data", "_get_data"); @@ -741,7 +741,7 @@ void Curve2D::_bake() const { pointlist.push_back(lastpos); baked_point_cache.resize(pointlist.size()); - PoolVector2Array::Write w = baked_point_cache.write(); + Vector2 *w = baked_point_cache.ptrw(); int idx = 0; for (List<Vector2>::Element *E = pointlist.front(); E; E = E->next()) { @@ -771,7 +771,7 @@ Vector2 Curve2D::interpolate_baked(float p_offset, bool p_cubic) const { return baked_point_cache.get(0); int bpc = baked_point_cache.size(); - PoolVector2Array::Read r = baked_point_cache.read(); + const Vector2 *r = baked_point_cache.ptr(); if (p_offset < 0) return r[0]; @@ -800,7 +800,7 @@ Vector2 Curve2D::interpolate_baked(float p_offset, bool p_cubic) const { } } -PoolVector2Array Curve2D::get_baked_points() const { +PackedVector2Array Curve2D::get_baked_points() const { if (baked_cache_dirty) _bake(); @@ -833,7 +833,7 @@ Vector2 Curve2D::get_closest_point(const Vector2 &p_to_point) const { if (pc == 1) return baked_point_cache.get(0); - PoolVector2Array::Read r = baked_point_cache.read(); + const Vector2 *r = baked_point_cache.ptr(); Vector2 nearest; float nearest_dist = -1.0f; @@ -869,7 +869,7 @@ float Curve2D::get_closest_offset(const Vector2 &p_to_point) const { if (pc == 1) return 0.0f; - PoolVector2Array::Read r = baked_point_cache.read(); + const Vector2 *r = baked_point_cache.ptr(); float nearest = 0.0f; float nearest_dist = -1.0f; @@ -899,9 +899,9 @@ Dictionary Curve2D::_get_data() const { Dictionary dc; - PoolVector2Array d; + PackedVector2Array d; d.resize(points.size() * 3); - PoolVector2Array::Write w = d.write(); + Vector2 *w = d.ptrw(); for (int i = 0; i < points.size(); i++) { @@ -910,8 +910,6 @@ Dictionary Curve2D::_get_data() const { w[i * 3 + 2] = points[i].pos; } - w = PoolVector2Array::Write(); - dc["points"] = d; return dc; @@ -920,11 +918,11 @@ void Curve2D::_set_data(const Dictionary &p_data) { ERR_FAIL_COND(!p_data.has("points")); - PoolVector2Array rp = p_data["points"]; + PackedVector2Array rp = p_data["points"]; int pc = rp.size(); ERR_FAIL_COND(pc % 3 != 0); points.resize(pc / 3); - PoolVector2Array::Read r = rp.read(); + const Vector2 *r = rp.ptr(); for (int i = 0; i < points.size(); i++) { @@ -936,9 +934,9 @@ void Curve2D::_set_data(const Dictionary &p_data) { baked_cache_dirty = true; } -PoolVector2Array Curve2D::tessellate(int p_max_stages, float p_tolerance) const { +PackedVector2Array Curve2D::tessellate(int p_max_stages, float p_tolerance) const { - PoolVector2Array tess; + PackedVector2Array tess; if (points.size() == 0) { return tess; @@ -956,7 +954,7 @@ PoolVector2Array Curve2D::tessellate(int p_max_stages, float p_tolerance) const } tess.resize(pc); - PoolVector2Array::Write bpw = tess.write(); + Vector2 *bpw = tess.ptrw(); bpw[0] = points[0].pos; int pidx = 0; @@ -972,8 +970,6 @@ PoolVector2Array Curve2D::tessellate(int p_max_stages, float p_tolerance) const bpw[pidx] = points[i + 1].pos; } - bpw = PoolVector2Array::Write(); - return tess; } @@ -1005,7 +1001,7 @@ void Curve2D::_bind_methods() { ClassDB::bind_method(D_METHOD("_get_data"), &Curve2D::_get_data); ClassDB::bind_method(D_METHOD("_set_data"), &Curve2D::_set_data); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "bake_interval", PROPERTY_HINT_RANGE, "0.01,512,0.01"), "set_bake_interval", "get_bake_interval"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "bake_interval", PROPERTY_HINT_RANGE, "0.01,512,0.01"), "set_bake_interval", "get_bake_interval"); ADD_PROPERTY(PropertyInfo(Variant::INT, "_data", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_data", "_get_data"); } @@ -1258,14 +1254,14 @@ void Curve3D::_bake() const { pointlist.push_back(Plane(lastpos, lastilt)); baked_point_cache.resize(pointlist.size()); - PoolVector3Array::Write w = baked_point_cache.write(); + Vector3 *w = baked_point_cache.ptrw(); int idx = 0; baked_tilt_cache.resize(pointlist.size()); - PoolRealArray::Write wt = baked_tilt_cache.write(); + real_t *wt = baked_tilt_cache.ptrw(); baked_up_vector_cache.resize(up_vector_enabled ? pointlist.size() : 0); - PoolVector3Array::Write up_write = baked_up_vector_cache.write(); + Vector3 *up_write = baked_up_vector_cache.ptrw(); Vector3 sideways; Vector3 up; @@ -1333,7 +1329,7 @@ Vector3 Curve3D::interpolate_baked(float p_offset, bool p_cubic) const { return baked_point_cache.get(0); int bpc = baked_point_cache.size(); - PoolVector3Array::Read r = baked_point_cache.read(); + const Vector3 *r = baked_point_cache.ptr(); if (p_offset < 0) return r[0]; @@ -1375,7 +1371,7 @@ float Curve3D::interpolate_baked_tilt(float p_offset) const { return baked_tilt_cache.get(0); int bpc = baked_tilt_cache.size(); - PoolRealArray::Read r = baked_tilt_cache.read(); + const real_t *r = baked_tilt_cache.ptr(); if (p_offset < 0) return r[0]; @@ -1410,9 +1406,9 @@ Vector3 Curve3D::interpolate_baked_up_vector(float p_offset, bool p_apply_tilt) if (count == 1) return baked_up_vector_cache.get(0); - PoolVector3Array::Read r = baked_up_vector_cache.read(); - PoolVector3Array::Read rp = baked_point_cache.read(); - PoolRealArray::Read rt = baked_tilt_cache.read(); + const Vector3 *r = baked_up_vector_cache.ptr(); + const Vector3 *rp = baked_point_cache.ptr(); + const real_t *rt = baked_tilt_cache.ptr(); float offset = CLAMP(p_offset, 0.0f, baked_max_ofs); @@ -1441,7 +1437,7 @@ Vector3 Curve3D::interpolate_baked_up_vector(float p_offset, bool p_apply_tilt) return up.rotated(axis, up.angle_to(up1) * frac); } -PoolVector3Array Curve3D::get_baked_points() const { +PackedVector3Array Curve3D::get_baked_points() const { if (baked_cache_dirty) _bake(); @@ -1449,7 +1445,7 @@ PoolVector3Array Curve3D::get_baked_points() const { return baked_point_cache; } -PoolRealArray Curve3D::get_baked_tilts() const { +PackedFloat32Array Curve3D::get_baked_tilts() const { if (baked_cache_dirty) _bake(); @@ -1457,7 +1453,7 @@ PoolRealArray Curve3D::get_baked_tilts() const { return baked_tilt_cache; } -PoolVector3Array Curve3D::get_baked_up_vectors() const { +PackedVector3Array Curve3D::get_baked_up_vectors() const { if (baked_cache_dirty) _bake(); @@ -1478,7 +1474,7 @@ Vector3 Curve3D::get_closest_point(const Vector3 &p_to_point) const { if (pc == 1) return baked_point_cache.get(0); - PoolVector3Array::Read r = baked_point_cache.read(); + const Vector3 *r = baked_point_cache.ptr(); Vector3 nearest; float nearest_dist = -1.0f; @@ -1514,7 +1510,7 @@ float Curve3D::get_closest_offset(const Vector3 &p_to_point) const { if (pc == 1) return 0.0f; - PoolVector3Array::Read r = baked_point_cache.read(); + const Vector3 *r = baked_point_cache.ptr(); float nearest = 0.0f; float nearest_dist = -1.0f; @@ -1568,12 +1564,12 @@ Dictionary Curve3D::_get_data() const { Dictionary dc; - PoolVector3Array d; + PackedVector3Array d; d.resize(points.size() * 3); - PoolVector3Array::Write w = d.write(); - PoolRealArray t; + Vector3 *w = d.ptrw(); + PackedFloat32Array t; t.resize(points.size()); - PoolRealArray::Write wt = t.write(); + real_t *wt = t.ptrw(); for (int i = 0; i < points.size(); i++) { @@ -1583,9 +1579,6 @@ Dictionary Curve3D::_get_data() const { wt[i] = points[i].tilt; } - w = PoolVector3Array::Write(); - wt = PoolRealArray::Write(); - dc["points"] = d; dc["tilts"] = t; @@ -1596,13 +1589,13 @@ void Curve3D::_set_data(const Dictionary &p_data) { ERR_FAIL_COND(!p_data.has("points")); ERR_FAIL_COND(!p_data.has("tilts")); - PoolVector3Array rp = p_data["points"]; + PackedVector3Array rp = p_data["points"]; int pc = rp.size(); ERR_FAIL_COND(pc % 3 != 0); points.resize(pc / 3); - PoolVector3Array::Read r = rp.read(); - PoolRealArray rtl = p_data["tilts"]; - PoolRealArray::Read rt = rtl.read(); + const Vector3 *r = rp.ptr(); + PackedFloat32Array rtl = p_data["tilts"]; + const real_t *rt = rtl.ptr(); for (int i = 0; i < points.size(); i++) { @@ -1615,9 +1608,9 @@ void Curve3D::_set_data(const Dictionary &p_data) { baked_cache_dirty = true; } -PoolVector3Array Curve3D::tessellate(int p_max_stages, float p_tolerance) const { +PackedVector3Array Curve3D::tessellate(int p_max_stages, float p_tolerance) const { - PoolVector3Array tess; + PackedVector3Array tess; if (points.size() == 0) { return tess; @@ -1635,7 +1628,7 @@ PoolVector3Array Curve3D::tessellate(int p_max_stages, float p_tolerance) const } tess.resize(pc); - PoolVector3Array::Write bpw = tess.write(); + Vector3 *bpw = tess.ptrw(); bpw[0] = points[0].pos; int pidx = 0; @@ -1651,8 +1644,6 @@ PoolVector3Array Curve3D::tessellate(int p_max_stages, float p_tolerance) const bpw[pidx] = points[i + 1].pos; } - bpw = PoolVector3Array::Write(); - return tess; } @@ -1691,7 +1682,7 @@ void Curve3D::_bind_methods() { ClassDB::bind_method(D_METHOD("_get_data"), &Curve3D::_get_data); ClassDB::bind_method(D_METHOD("_set_data"), &Curve3D::_set_data); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "bake_interval", PROPERTY_HINT_RANGE, "0.01,512,0.01"), "set_bake_interval", "get_bake_interval"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "bake_interval", PROPERTY_HINT_RANGE, "0.01,512,0.01"), "set_bake_interval", "get_bake_interval"); ADD_PROPERTY(PropertyInfo(Variant::INT, "_data", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_data", "_get_data"); ADD_GROUP("Up Vector", "up_vector_"); diff --git a/scene/resources/curve.h b/scene/resources/curve.h index b02466534c..7dcbf1ceff 100644 --- a/scene/resources/curve.h +++ b/scene/resources/curve.h @@ -168,7 +168,7 @@ class Curve2D : public Resource { }; mutable bool baked_cache_dirty; - mutable PoolVector2Array baked_point_cache; + mutable PackedVector2Array baked_point_cache; mutable float baked_max_ofs; void _bake() const; @@ -202,11 +202,11 @@ public: float get_baked_length() const; Vector2 interpolate_baked(float p_offset, bool p_cubic = false) const; - PoolVector2Array get_baked_points() const; //useful for going through + PackedVector2Array get_baked_points() const; //useful for going through Vector2 get_closest_point(const Vector2 &p_to_point) const; float get_closest_offset(const Vector2 &p_to_point) const; - PoolVector2Array tessellate(int p_max_stages = 5, float p_tolerance = 4) const; //useful for display + PackedVector2Array tessellate(int p_max_stages = 5, float p_tolerance = 4) const; //useful for display Curve2D(); }; @@ -234,9 +234,9 @@ class Curve3D : public Resource { }; mutable bool baked_cache_dirty; - mutable PoolVector3Array baked_point_cache; - mutable PoolRealArray baked_tilt_cache; - mutable PoolVector3Array baked_up_vector_cache; + mutable PackedVector3Array baked_point_cache; + mutable PackedFloat32Array baked_tilt_cache; + mutable PackedVector3Array baked_up_vector_cache; mutable float baked_max_ofs; void _bake() const; @@ -277,13 +277,13 @@ public: Vector3 interpolate_baked(float p_offset, bool p_cubic = false) const; float interpolate_baked_tilt(float p_offset) const; Vector3 interpolate_baked_up_vector(float p_offset, bool p_apply_tilt = false) const; - PoolVector3Array get_baked_points() const; //useful for going through - PoolRealArray get_baked_tilts() const; //useful for going through - PoolVector3Array get_baked_up_vectors() const; + PackedVector3Array get_baked_points() const; //useful for going through + PackedFloat32Array get_baked_tilts() const; //useful for going through + PackedVector3Array get_baked_up_vectors() const; Vector3 get_closest_point(const Vector3 &p_to_point) const; float get_closest_offset(const Vector3 &p_to_point) const; - PoolVector3Array tessellate(int p_max_stages = 5, float p_tolerance = 4) const; //useful for display + PackedVector3Array tessellate(int p_max_stages = 5, float p_tolerance = 4) const; //useful for display Curve3D(); }; diff --git a/scene/resources/cylinder_shape.cpp b/scene/resources/cylinder_shape.cpp index b9b0d77a1b..53d368d32a 100644 --- a/scene/resources/cylinder_shape.cpp +++ b/scene/resources/cylinder_shape.cpp @@ -108,8 +108,8 @@ void CylinderShape::_bind_methods() { ClassDB::bind_method(D_METHOD("set_height", "height"), &CylinderShape::set_height); ClassDB::bind_method(D_METHOD("get_height"), &CylinderShape::get_height); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "radius", PROPERTY_HINT_RANGE, "0.01,4096,0.01"), "set_radius", "get_radius"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "height", PROPERTY_HINT_RANGE, "0.01,4096,0.01"), "set_height", "get_height"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "radius", PROPERTY_HINT_RANGE, "0.01,4096,0.01"), "set_radius", "get_radius"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "height", PROPERTY_HINT_RANGE, "0.01,4096,0.01"), "set_height", "get_height"); } CylinderShape::CylinderShape() : diff --git a/scene/resources/default_theme/default_theme.cpp b/scene/resources/default_theme/default_theme.cpp index 5a6a8dc286..04bc95ade6 100644 --- a/scene/resources/default_theme/default_theme.cpp +++ b/scene/resources/default_theme/default_theme.cpp @@ -706,9 +706,6 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const theme->set_color("font_color_disabled", "TabContainer", control_font_color_disabled); theme->set_constant("side_margin", "TabContainer", 8 * scale); - theme->set_constant("top_margin", "TabContainer", 24 * scale); - theme->set_constant("label_valign_fg", "TabContainer", 0 * scale); - theme->set_constant("label_valign_bg", "TabContainer", 2 * scale); theme->set_constant("hseparation", "TabContainer", 4 * scale); // Tabs @@ -732,9 +729,6 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const theme->set_color("font_color_bg", "Tabs", control_font_color_low); theme->set_color("font_color_disabled", "Tabs", control_font_color_disabled); - theme->set_constant("top_margin", "Tabs", 24 * scale); - theme->set_constant("label_valign_fg", "Tabs", 0 * scale); - theme->set_constant("label_valign_bg", "Tabs", 2 * scale); theme->set_constant("hseparation", "Tabs", 4 * scale); // Separators diff --git a/scene/resources/dynamic_font.cpp b/scene/resources/dynamic_font.cpp index d2a90f388e..79a1500129 100644 --- a/scene/resources/dynamic_font.cpp +++ b/scene/resources/dynamic_font.cpp @@ -442,7 +442,7 @@ DynamicFontAtSize::TexturePosition DynamicFontAtSize::_find_texture_pos_for_glyp { //zero texture - PoolVector<uint8_t>::Write w = tex.imgdata.write(); + uint8_t *w = tex.imgdata.ptrw(); ERR_FAIL_COND_V(texsize * texsize * p_color_size > tex.imgdata.size(), ret); for (int i = 0; i < texsize * texsize * p_color_size; i++) { w[i] = 0; @@ -480,7 +480,7 @@ DynamicFontAtSize::Character DynamicFontAtSize::_bitmap_to_character(FT_Bitmap b CharTexture &tex = textures.write[tex_pos.index]; { - PoolVector<uint8_t>::Write wr = tex.imgdata.write(); + uint8_t *wr = tex.imgdata.ptrw(); for (int i = 0; i < h; i++) { for (int j = 0; j < w; j++) { diff --git a/scene/resources/dynamic_font.h b/scene/resources/dynamic_font.h index 94f03665d3..fa6db370f8 100644 --- a/scene/resources/dynamic_font.h +++ b/scene/resources/dynamic_font.h @@ -129,7 +129,7 @@ class DynamicFontAtSize : public Reference { struct CharTexture { - PoolVector<uint8_t> imgdata; + Vector<uint8_t> imgdata; int texture_size; Vector<int> offsets; Ref<ImageTexture> texture; diff --git a/scene/resources/environment.cpp b/scene/resources/environment.cpp index 6790f02128..d407dd3722 100644 --- a/scene/resources/environment.cpp +++ b/scene/resources/environment.cpp @@ -870,16 +870,16 @@ void Environment::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::INT, "background_canvas_max_layer", PROPERTY_HINT_RANGE, "-1000,1000,1"), "set_canvas_max_layer", "get_canvas_max_layer"); ADD_PROPERTY(PropertyInfo(Variant::INT, "background_camera_feed_id", PROPERTY_HINT_RANGE, "1,10,1"), "set_camera_feed_id", "get_camera_feed_id"); ADD_PROPERTY(PropertyInfo(Variant::COLOR, "background_color"), "set_bg_color", "get_bg_color"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "background_energy", PROPERTY_HINT_RANGE, "0,16,0.01"), "set_bg_energy", "get_bg_energy"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "background_energy", PROPERTY_HINT_RANGE, "0,16,0.01"), "set_bg_energy", "get_bg_energy"); ADD_GROUP("Sky", "sky_"); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "sky", PROPERTY_HINT_RESOURCE_TYPE, "Sky"), "set_sky", "get_sky"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "sky_custom_fov", PROPERTY_HINT_RANGE, "0,180,0.1"), "set_sky_custom_fov", "get_sky_custom_fov"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "sky_custom_fov", PROPERTY_HINT_RANGE, "0,180,0.1"), "set_sky_custom_fov", "get_sky_custom_fov"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "sky_rotation"), "set_sky_rotation", "get_sky_rotation"); ADD_GROUP("Ambient Light", "ambient_light_"); ADD_PROPERTY(PropertyInfo(Variant::INT, "ambient_light_source", PROPERTY_HINT_ENUM, "Background,Disabled,Color,Sky"), "set_ambient_source", "get_ambient_source"); ADD_PROPERTY(PropertyInfo(Variant::COLOR, "ambient_light_color"), "set_ambient_light_color", "get_ambient_light_color"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "ambient_light_sky_contribution", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_ambient_light_sky_contribution", "get_ambient_light_sky_contribution"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "ambient_light_energy", PROPERTY_HINT_RANGE, "0,16,0.01"), "set_ambient_light_energy", "get_ambient_light_energy"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "ambient_light_sky_contribution", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_ambient_light_sky_contribution", "get_ambient_light_sky_contribution"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "ambient_light_energy", PROPERTY_HINT_RANGE, "0,16,0.01"), "set_ambient_light_energy", "get_ambient_light_energy"); ADD_PROPERTY(PropertyInfo(Variant::COLOR, "ambient_light_occlusion_color", PROPERTY_HINT_COLOR_NO_ALPHA), "set_ao_color", "get_ao_color"); ADD_GROUP("Reflected Light", "reflected_light_"); ADD_PROPERTY(PropertyInfo(Variant::INT, "reflected_light_source", PROPERTY_HINT_ENUM, "Background,Disabled,Sky"), "set_reflection_source", "get_reflection_source"); @@ -930,17 +930,17 @@ void Environment::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::BOOL, "fog_enabled"), "set_fog_enabled", "is_fog_enabled"); ADD_PROPERTY(PropertyInfo(Variant::COLOR, "fog_color"), "set_fog_color", "get_fog_color"); ADD_PROPERTY(PropertyInfo(Variant::COLOR, "fog_sun_color"), "set_fog_sun_color", "get_fog_sun_color"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "fog_sun_amount", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_fog_sun_amount", "get_fog_sun_amount"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "fog_sun_amount", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_fog_sun_amount", "get_fog_sun_amount"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "fog_depth_enabled"), "set_fog_depth_enabled", "is_fog_depth_enabled"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "fog_depth_begin", PROPERTY_HINT_RANGE, "0,4000,0.1"), "set_fog_depth_begin", "get_fog_depth_begin"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "fog_depth_end", PROPERTY_HINT_RANGE, "0,4000,0.1,or_greater"), "set_fog_depth_end", "get_fog_depth_end"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "fog_depth_curve", PROPERTY_HINT_EXP_EASING), "set_fog_depth_curve", "get_fog_depth_curve"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "fog_depth_begin", PROPERTY_HINT_RANGE, "0,4000,0.1"), "set_fog_depth_begin", "get_fog_depth_begin"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "fog_depth_end", PROPERTY_HINT_RANGE, "0,4000,0.1,or_greater"), "set_fog_depth_end", "get_fog_depth_end"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "fog_depth_curve", PROPERTY_HINT_EXP_EASING), "set_fog_depth_curve", "get_fog_depth_curve"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "fog_transmit_enabled"), "set_fog_transmit_enabled", "is_fog_transmit_enabled"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "fog_transmit_curve", PROPERTY_HINT_EXP_EASING), "set_fog_transmit_curve", "get_fog_transmit_curve"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "fog_transmit_curve", PROPERTY_HINT_EXP_EASING), "set_fog_transmit_curve", "get_fog_transmit_curve"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "fog_height_enabled"), "set_fog_height_enabled", "is_fog_height_enabled"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "fog_height_min", PROPERTY_HINT_RANGE, "-4000,4000,0.1,or_lesser,or_greater"), "set_fog_height_min", "get_fog_height_min"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "fog_height_max", PROPERTY_HINT_RANGE, "-4000,4000,0.1,or_lesser,or_greater"), "set_fog_height_max", "get_fog_height_max"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "fog_height_curve", PROPERTY_HINT_EXP_EASING), "set_fog_height_curve", "get_fog_height_curve"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "fog_height_min", PROPERTY_HINT_RANGE, "-4000,4000,0.1,or_lesser,or_greater"), "set_fog_height_min", "get_fog_height_min"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "fog_height_max", PROPERTY_HINT_RANGE, "-4000,4000,0.1,or_lesser,or_greater"), "set_fog_height_max", "get_fog_height_max"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "fog_height_curve", PROPERTY_HINT_EXP_EASING), "set_fog_height_curve", "get_fog_height_curve"); ClassDB::bind_method(D_METHOD("set_tonemapper", "mode"), &Environment::set_tonemapper); ClassDB::bind_method(D_METHOD("get_tonemapper"), &Environment::get_tonemapper); @@ -968,14 +968,14 @@ void Environment::_bind_methods() { ADD_GROUP("Tonemap", "tonemap_"); ADD_PROPERTY(PropertyInfo(Variant::INT, "tonemap_mode", PROPERTY_HINT_ENUM, "Linear,Reinhard,Filmic,Aces"), "set_tonemapper", "get_tonemapper"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "tonemap_exposure", PROPERTY_HINT_RANGE, "0,16,0.01"), "set_tonemap_exposure", "get_tonemap_exposure"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "tonemap_white", PROPERTY_HINT_RANGE, "0,16,0.01"), "set_tonemap_white", "get_tonemap_white"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "tonemap_exposure", PROPERTY_HINT_RANGE, "0,16,0.01"), "set_tonemap_exposure", "get_tonemap_exposure"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "tonemap_white", PROPERTY_HINT_RANGE, "0,16,0.01"), "set_tonemap_white", "get_tonemap_white"); ADD_GROUP("Auto Exposure", "auto_exposure_"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "auto_exposure_enabled"), "set_tonemap_auto_exposure", "get_tonemap_auto_exposure"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "auto_exposure_scale", PROPERTY_HINT_RANGE, "0.01,64,0.01"), "set_tonemap_auto_exposure_grey", "get_tonemap_auto_exposure_grey"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "auto_exposure_min_luma", PROPERTY_HINT_RANGE, "0,16,0.01"), "set_tonemap_auto_exposure_min", "get_tonemap_auto_exposure_min"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "auto_exposure_max_luma", PROPERTY_HINT_RANGE, "0,16,0.01"), "set_tonemap_auto_exposure_max", "get_tonemap_auto_exposure_max"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "auto_exposure_speed", PROPERTY_HINT_RANGE, "0.01,64,0.01"), "set_tonemap_auto_exposure_speed", "get_tonemap_auto_exposure_speed"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "auto_exposure_scale", PROPERTY_HINT_RANGE, "0.01,64,0.01"), "set_tonemap_auto_exposure_grey", "get_tonemap_auto_exposure_grey"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "auto_exposure_min_luma", PROPERTY_HINT_RANGE, "0,16,0.01"), "set_tonemap_auto_exposure_min", "get_tonemap_auto_exposure_min"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "auto_exposure_max_luma", PROPERTY_HINT_RANGE, "0,16,0.01"), "set_tonemap_auto_exposure_max", "get_tonemap_auto_exposure_max"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "auto_exposure_speed", PROPERTY_HINT_RANGE, "0.01,64,0.01"), "set_tonemap_auto_exposure_speed", "get_tonemap_auto_exposure_speed"); ClassDB::bind_method(D_METHOD("set_ssr_enabled", "enabled"), &Environment::set_ssr_enabled); ClassDB::bind_method(D_METHOD("is_ssr_enabled"), &Environment::is_ssr_enabled); @@ -998,9 +998,9 @@ void Environment::_bind_methods() { ADD_GROUP("SS Reflections", "ss_reflections_"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "ss_reflections_enabled"), "set_ssr_enabled", "is_ssr_enabled"); ADD_PROPERTY(PropertyInfo(Variant::INT, "ss_reflections_max_steps", PROPERTY_HINT_RANGE, "1,512,1"), "set_ssr_max_steps", "get_ssr_max_steps"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "ss_reflections_fade_in", PROPERTY_HINT_EXP_EASING), "set_ssr_fade_in", "get_ssr_fade_in"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "ss_reflections_fade_out", PROPERTY_HINT_EXP_EASING), "set_ssr_fade_out", "get_ssr_fade_out"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "ss_reflections_depth_tolerance", PROPERTY_HINT_RANGE, "0.1,128,0.1"), "set_ssr_depth_tolerance", "get_ssr_depth_tolerance"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "ss_reflections_fade_in", PROPERTY_HINT_EXP_EASING), "set_ssr_fade_in", "get_ssr_fade_in"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "ss_reflections_fade_out", PROPERTY_HINT_EXP_EASING), "set_ssr_fade_out", "get_ssr_fade_out"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "ss_reflections_depth_tolerance", PROPERTY_HINT_RANGE, "0.1,128,0.1"), "set_ssr_depth_tolerance", "get_ssr_depth_tolerance"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "ss_reflections_roughness"), "set_ssr_rough", "is_ssr_rough"); ClassDB::bind_method(D_METHOD("set_ssao_enabled", "enabled"), &Environment::set_ssao_enabled); @@ -1029,13 +1029,13 @@ void Environment::_bind_methods() { ADD_GROUP("SSAO", "ssao_"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "ssao_enabled"), "set_ssao_enabled", "is_ssao_enabled"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "ssao_radius", PROPERTY_HINT_RANGE, "0.1,128,0.1"), "set_ssao_radius", "get_ssao_radius"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "ssao_intensity", PROPERTY_HINT_RANGE, "0.0,128,0.1"), "set_ssao_intensity", "get_ssao_intensity"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "ssao_bias", PROPERTY_HINT_RANGE, "0.001,8,0.001"), "set_ssao_bias", "get_ssao_bias"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "ssao_light_affect", PROPERTY_HINT_RANGE, "0.00,1,0.01"), "set_ssao_direct_light_affect", "get_ssao_direct_light_affect"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "ssao_ao_channel_affect", PROPERTY_HINT_RANGE, "0.00,1,0.01"), "set_ssao_ao_channel_affect", "get_ssao_ao_channel_affect"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "ssao_radius", PROPERTY_HINT_RANGE, "0.1,128,0.1"), "set_ssao_radius", "get_ssao_radius"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "ssao_intensity", PROPERTY_HINT_RANGE, "0.0,128,0.1"), "set_ssao_intensity", "get_ssao_intensity"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "ssao_bias", PROPERTY_HINT_RANGE, "0.001,8,0.001"), "set_ssao_bias", "get_ssao_bias"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "ssao_light_affect", PROPERTY_HINT_RANGE, "0.00,1,0.01"), "set_ssao_direct_light_affect", "get_ssao_direct_light_affect"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "ssao_ao_channel_affect", PROPERTY_HINT_RANGE, "0.00,1,0.01"), "set_ssao_ao_channel_affect", "get_ssao_ao_channel_affect"); ADD_PROPERTY(PropertyInfo(Variant::INT, "ssao_blur", PROPERTY_HINT_ENUM, "Disabled,1x1,2x2,3x3"), "set_ssao_blur", "get_ssao_blur"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "ssao_edge_sharpness", PROPERTY_HINT_RANGE, "0,32,0.01"), "set_ssao_edge_sharpness", "get_ssao_edge_sharpness"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "ssao_edge_sharpness", PROPERTY_HINT_RANGE, "0,32,0.01"), "set_ssao_edge_sharpness", "get_ssao_edge_sharpness"); ClassDB::bind_method(D_METHOD("set_glow_enabled", "enabled"), &Environment::set_glow_enabled); ClassDB::bind_method(D_METHOD("is_glow_enabled"), &Environment::is_glow_enabled); @@ -1080,14 +1080,14 @@ void Environment::_bind_methods() { ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "glow_levels/6"), "set_glow_level", "is_glow_level_enabled", 5); ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "glow_levels/7"), "set_glow_level", "is_glow_level_enabled", 6); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "glow_intensity", PROPERTY_HINT_RANGE, "0.0,8.0,0.01"), "set_glow_intensity", "get_glow_intensity"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "glow_mix", PROPERTY_HINT_RANGE, "0.0,1.0,0.001"), "set_glow_mix", "get_glow_mix"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "glow_strength", PROPERTY_HINT_RANGE, "0.0,2.0,0.01"), "set_glow_strength", "get_glow_strength"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "glow_bloom", PROPERTY_HINT_RANGE, "0.0,1.0,0.01"), "set_glow_bloom", "get_glow_bloom"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "glow_intensity", PROPERTY_HINT_RANGE, "0.0,8.0,0.01"), "set_glow_intensity", "get_glow_intensity"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "glow_mix", PROPERTY_HINT_RANGE, "0.0,1.0,0.001"), "set_glow_mix", "get_glow_mix"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "glow_strength", PROPERTY_HINT_RANGE, "0.0,2.0,0.01"), "set_glow_strength", "get_glow_strength"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "glow_bloom", PROPERTY_HINT_RANGE, "0.0,1.0,0.01"), "set_glow_bloom", "get_glow_bloom"); ADD_PROPERTY(PropertyInfo(Variant::INT, "glow_blend_mode", PROPERTY_HINT_ENUM, "Additive,Screen,Softlight,Replace,Mix"), "set_glow_blend_mode", "get_glow_blend_mode"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "glow_hdr_threshold", PROPERTY_HINT_RANGE, "0.0,4.0,0.01"), "set_glow_hdr_bleed_threshold", "get_glow_hdr_bleed_threshold"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "glow_hdr_luminance_cap", PROPERTY_HINT_RANGE, "0.0,256.0,0.01"), "set_glow_hdr_luminance_cap", "get_glow_hdr_luminance_cap"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "glow_hdr_scale", PROPERTY_HINT_RANGE, "0.0,4.0,0.01"), "set_glow_hdr_bleed_scale", "get_glow_hdr_bleed_scale"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "glow_hdr_threshold", PROPERTY_HINT_RANGE, "0.0,4.0,0.01"), "set_glow_hdr_bleed_threshold", "get_glow_hdr_bleed_threshold"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "glow_hdr_luminance_cap", PROPERTY_HINT_RANGE, "0.0,256.0,0.01"), "set_glow_hdr_luminance_cap", "get_glow_hdr_luminance_cap"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "glow_hdr_scale", PROPERTY_HINT_RANGE, "0.0,4.0,0.01"), "set_glow_hdr_bleed_scale", "get_glow_hdr_bleed_scale"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "glow_bicubic_upscale"), "set_glow_bicubic_upscale", "is_glow_bicubic_upscale_enabled"); ClassDB::bind_method(D_METHOD("set_adjustment_enable", "enabled"), &Environment::set_adjustment_enable); @@ -1107,9 +1107,9 @@ void Environment::_bind_methods() { ADD_GROUP("Adjustments", "adjustment_"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "adjustment_enabled"), "set_adjustment_enable", "is_adjustment_enabled"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "adjustment_brightness", PROPERTY_HINT_RANGE, "0.01,8,0.01"), "set_adjustment_brightness", "get_adjustment_brightness"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "adjustment_contrast", PROPERTY_HINT_RANGE, "0.01,8,0.01"), "set_adjustment_contrast", "get_adjustment_contrast"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "adjustment_saturation", PROPERTY_HINT_RANGE, "0.01,8,0.01"), "set_adjustment_saturation", "get_adjustment_saturation"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "adjustment_brightness", PROPERTY_HINT_RANGE, "0.01,8,0.01"), "set_adjustment_brightness", "get_adjustment_brightness"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "adjustment_contrast", PROPERTY_HINT_RANGE, "0.01,8,0.01"), "set_adjustment_contrast", "get_adjustment_contrast"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "adjustment_saturation", PROPERTY_HINT_RANGE, "0.01,8,0.01"), "set_adjustment_saturation", "get_adjustment_saturation"); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "adjustment_color_correction", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"), "set_adjustment_color_correction", "get_adjustment_color_correction"); BIND_ENUM_CONSTANT(BG_CLEAR_COLOR); @@ -1361,7 +1361,7 @@ void CameraEffects::_bind_methods() { ClassDB::bind_method(D_METHOD("set_dof_blur_amount", "intensity"), &CameraEffects::set_dof_blur_amount); ClassDB::bind_method(D_METHOD("get_dof_blur_amount"), &CameraEffects::get_dof_blur_amount); - ClassDB::bind_method(D_METHOD("set_override_exposure_enabled", "enable"), &CameraEffects::set_override_exposure); + ClassDB::bind_method(D_METHOD("set_override_exposure_enabled", "enable"), &CameraEffects::set_override_exposure_enabled); ClassDB::bind_method(D_METHOD("is_override_exposure_enabled"), &CameraEffects::is_override_exposure_enabled); ClassDB::bind_method(D_METHOD("set_override_exposure", "exposure"), &CameraEffects::set_override_exposure); @@ -1369,15 +1369,15 @@ void CameraEffects::_bind_methods() { ADD_GROUP("DOF Blur", "dof_blur_"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "dof_blur_far_enabled"), "set_dof_blur_far_enabled", "is_dof_blur_far_enabled"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "dof_blur_far_distance", PROPERTY_HINT_EXP_RANGE, "0.01,8192,0.01"), "set_dof_blur_far_distance", "get_dof_blur_far_distance"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "dof_blur_far_transition", PROPERTY_HINT_EXP_RANGE, "0.01,8192,0.01"), "set_dof_blur_far_transition", "get_dof_blur_far_transition"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "dof_blur_far_distance", PROPERTY_HINT_EXP_RANGE, "0.01,8192,0.01"), "set_dof_blur_far_distance", "get_dof_blur_far_distance"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "dof_blur_far_transition", PROPERTY_HINT_EXP_RANGE, "0.01,8192,0.01"), "set_dof_blur_far_transition", "get_dof_blur_far_transition"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "dof_blur_near_enabled"), "set_dof_blur_near_enabled", "is_dof_blur_near_enabled"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "dof_blur_near_distance", PROPERTY_HINT_EXP_RANGE, "0.01,8192,0.01"), "set_dof_blur_near_distance", "get_dof_blur_near_distance"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "dof_blur_near_transition", PROPERTY_HINT_EXP_RANGE, "0.01,8192,0.01"), "set_dof_blur_near_transition", "get_dof_blur_near_transition"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "dof_blur_amount", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_dof_blur_amount", "get_dof_blur_amount"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "dof_blur_near_distance", PROPERTY_HINT_EXP_RANGE, "0.01,8192,0.01"), "set_dof_blur_near_distance", "get_dof_blur_near_distance"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "dof_blur_near_transition", PROPERTY_HINT_EXP_RANGE, "0.01,8192,0.01"), "set_dof_blur_near_transition", "get_dof_blur_near_transition"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "dof_blur_amount", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_dof_blur_amount", "get_dof_blur_amount"); ADD_GROUP("Override Exposure", "override_"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "override_exposure_enable"), "set_override_exposure_enabled", "is_override_exposure_enabled"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "override_exposure", PROPERTY_HINT_RANGE, "0,16,0.01"), "set_override_exposure", "get_override_exposure"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "override_exposure", PROPERTY_HINT_RANGE, "0,16,0.01"), "set_override_exposure", "get_override_exposure"); } CameraEffects::CameraEffects() { diff --git a/scene/resources/font.cpp b/scene/resources/font.cpp index 663ae5d45d..316d6f04d7 100644 --- a/scene/resources/font.cpp +++ b/scene/resources/font.cpp @@ -107,7 +107,7 @@ Font::Font() { ///////////////////////////////////////////////////////////////// -void BitmapFont::_set_chars(const PoolVector<int> &p_chars) { +void BitmapFont::_set_chars(const Vector<int> &p_chars) { int len = p_chars.size(); //char 1 charsize 1 texture, 4 rect, 2 align, advance 1 @@ -116,7 +116,7 @@ void BitmapFont::_set_chars(const PoolVector<int> &p_chars) { return; //none to do int chars = len / 9; - PoolVector<int>::Read r = p_chars.read(); + const int *r = p_chars.ptr(); for (int i = 0; i < chars; i++) { const int *data = &r[i * 9]; @@ -124,16 +124,16 @@ void BitmapFont::_set_chars(const PoolVector<int> &p_chars) { } } -PoolVector<int> BitmapFont::_get_chars() const { +Vector<int> BitmapFont::_get_chars() const { - PoolVector<int> chars; + Vector<int> chars; const CharType *key = NULL; while ((key = char_map.next(key))) { const Character *c = char_map.getptr(*key); - ERR_FAIL_COND_V(!c, PoolVector<int>()); + ERR_FAIL_COND_V(!c, Vector<int>()); chars.push_back(*key); chars.push_back(c->texture_idx); chars.push_back(c->rect.position.x); @@ -149,13 +149,13 @@ PoolVector<int> BitmapFont::_get_chars() const { return chars; } -void BitmapFont::_set_kernings(const PoolVector<int> &p_kernings) { +void BitmapFont::_set_kernings(const Vector<int> &p_kernings) { int len = p_kernings.size(); ERR_FAIL_COND(len % 3); if (!len) return; - PoolVector<int>::Read r = p_kernings.read(); + const int *r = p_kernings.ptr(); for (int i = 0; i < len / 3; i++) { @@ -164,9 +164,9 @@ void BitmapFont::_set_kernings(const PoolVector<int> &p_kernings) { } } -PoolVector<int> BitmapFont::_get_kernings() const { +Vector<int> BitmapFont::_get_kernings() const { - PoolVector<int> kernings; + Vector<int> kernings; for (Map<KerningPairKey, int>::Element *E = kerning_map.front(); E; E = E->next()) { @@ -192,7 +192,7 @@ Vector<Variant> BitmapFont::_get_textures() const { Vector<Variant> rtextures; for (int i = 0; i < textures.size(); i++) - rtextures.push_back(textures[i].get_ref_ptr()); + rtextures.push_back(textures[i]); return rtextures; } @@ -625,11 +625,11 @@ void BitmapFont::_bind_methods() { ClassDB::bind_method(D_METHOD("get_fallback"), &BitmapFont::get_fallback); ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "textures", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_textures", "_get_textures"); - ADD_PROPERTY(PropertyInfo(Variant::POOL_INT_ARRAY, "chars", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_chars", "_get_chars"); - ADD_PROPERTY(PropertyInfo(Variant::POOL_INT_ARRAY, "kernings", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_kernings", "_get_kernings"); + ADD_PROPERTY(PropertyInfo(Variant::PACKED_INT32_ARRAY, "chars", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_chars", "_get_chars"); + ADD_PROPERTY(PropertyInfo(Variant::PACKED_INT32_ARRAY, "kernings", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_kernings", "_get_kernings"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "height", PROPERTY_HINT_RANGE, "1,1024,1"), "set_height", "get_height"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "ascent", PROPERTY_HINT_RANGE, "0,1024,1"), "set_ascent", "get_ascent"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "height", PROPERTY_HINT_RANGE, "1,1024,1"), "set_height", "get_height"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "ascent", PROPERTY_HINT_RANGE, "0,1024,1"), "set_ascent", "get_ascent"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "distance_field"), "set_distance_field_hint", "is_distance_field_hint"); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "fallback", PROPERTY_HINT_RESOURCE_TYPE, "BitmapFont"), "set_fallback", "get_fallback"); } diff --git a/scene/resources/font.h b/scene/resources/font.h index fc1d92e2f9..1ce8e79f09 100644 --- a/scene/resources/font.h +++ b/scene/resources/font.h @@ -146,10 +146,10 @@ private: float ascent; bool distance_field_hint; - void _set_chars(const PoolVector<int> &p_chars); - PoolVector<int> _get_chars() const; - void _set_kernings(const PoolVector<int> &p_kernings); - PoolVector<int> _get_kernings() const; + void _set_chars(const Vector<int> &p_chars); + Vector<int> _get_chars() const; + void _set_kernings(const Vector<int> &p_kernings); + Vector<int> _get_kernings() const; void _set_textures(const Vector<Variant> &p_textures); Vector<Variant> _get_textures() const; diff --git a/scene/resources/gradient.cpp b/scene/resources/gradient.cpp index fe5a01886d..7bce04beaf 100644 --- a/scene/resources/gradient.cpp +++ b/scene/resources/gradient.cpp @@ -72,8 +72,8 @@ void Gradient::_bind_methods() { ClassDB::bind_method(D_METHOD(COLOR_RAMP_SET_COLORS, "colors"), &Gradient::set_colors); ClassDB::bind_method(D_METHOD(COLOR_RAMP_GET_COLORS), &Gradient::get_colors); - ADD_PROPERTY(PropertyInfo(Variant::POOL_REAL_ARRAY, "offsets"), COLOR_RAMP_SET_OFFSETS, COLOR_RAMP_GET_OFFSETS); - ADD_PROPERTY(PropertyInfo(Variant::POOL_COLOR_ARRAY, "colors"), COLOR_RAMP_SET_COLORS, COLOR_RAMP_GET_COLORS); + ADD_PROPERTY(PropertyInfo(Variant::PACKED_FLOAT32_ARRAY, "offsets"), COLOR_RAMP_SET_OFFSETS, COLOR_RAMP_GET_OFFSETS); + ADD_PROPERTY(PropertyInfo(Variant::PACKED_COLOR_ARRAY, "colors"), COLOR_RAMP_SET_COLORS, COLOR_RAMP_GET_COLORS); } Vector<float> Gradient::get_offsets() const { diff --git a/scene/resources/height_map_shape.cpp b/scene/resources/height_map_shape.cpp index 48c9221e27..fa45ddcabb 100644 --- a/scene/resources/height_map_shape.cpp +++ b/scene/resources/height_map_shape.cpp @@ -42,7 +42,7 @@ Vector<Vector3> HeightMapShape::get_debug_mesh_lines() { Vector2 size(map_width - 1, map_depth - 1); Vector2 start = size * -0.5; - PoolRealArray::Read r = map_data.read(); + const real_t *r = map_data.ptr(); // reserve some memory for our points.. points.resize(((map_width - 1) * map_depth * 2) + (map_width * (map_depth - 1) * 2)); @@ -102,7 +102,7 @@ void HeightMapShape::set_map_width(int p_new) { int new_size = map_width * map_depth; map_data.resize(map_width * map_depth); - PoolRealArray::Write w = map_data.write(); + real_t *w = map_data.ptrw(); while (was_size < new_size) { w[was_size++] = 0.0; } @@ -128,7 +128,7 @@ void HeightMapShape::set_map_depth(int p_new) { int new_size = map_width * map_depth; map_data.resize(new_size); - PoolRealArray::Write w = map_data.write(); + real_t *w = map_data.ptrw(); while (was_size < new_size) { w[was_size++] = 0.0; } @@ -144,7 +144,7 @@ int HeightMapShape::get_map_depth() const { return map_depth; } -void HeightMapShape::set_map_data(PoolRealArray p_new) { +void HeightMapShape::set_map_data(PackedFloat32Array p_new) { int size = (map_width * map_depth); if (p_new.size() != size) { // fail @@ -152,8 +152,8 @@ void HeightMapShape::set_map_data(PoolRealArray p_new) { } // copy - PoolRealArray::Write w = map_data.write(); - PoolRealArray::Read r = p_new.read(); + real_t *w = map_data.ptrw(); + const real_t *r = p_new.ptr(); for (int i = 0; i < size; i++) { float val = r[i]; w[i] = val; @@ -174,7 +174,7 @@ void HeightMapShape::set_map_data(PoolRealArray p_new) { _change_notify("map_data"); } -PoolRealArray HeightMapShape::get_map_data() const { +PackedFloat32Array HeightMapShape::get_map_data() const { return map_data; } @@ -188,7 +188,7 @@ void HeightMapShape::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::INT, "map_width", PROPERTY_HINT_RANGE, "1,4096,1"), "set_map_width", "get_map_width"); ADD_PROPERTY(PropertyInfo(Variant::INT, "map_depth", PROPERTY_HINT_RANGE, "1,4096,1"), "set_map_depth", "get_map_depth"); - ADD_PROPERTY(PropertyInfo(Variant::POOL_REAL_ARRAY, "map_data"), "set_map_data", "get_map_data"); + ADD_PROPERTY(PropertyInfo(Variant::PACKED_FLOAT32_ARRAY, "map_data"), "set_map_data", "get_map_data"); } HeightMapShape::HeightMapShape() : @@ -197,7 +197,7 @@ HeightMapShape::HeightMapShape() : map_width = 2; map_depth = 2; map_data.resize(map_width * map_depth); - PoolRealArray::Write w = map_data.write(); + real_t *w = map_data.ptrw(); w[0] = 0.0; w[1] = 0.0; w[2] = 0.0; diff --git a/scene/resources/height_map_shape.h b/scene/resources/height_map_shape.h index a6263f061f..b8204f6c98 100644 --- a/scene/resources/height_map_shape.h +++ b/scene/resources/height_map_shape.h @@ -38,7 +38,7 @@ class HeightMapShape : public Shape { int map_width; int map_depth; - PoolRealArray map_data; + PackedFloat32Array map_data; float min_height; float max_height; @@ -51,8 +51,8 @@ public: int get_map_width() const; void set_map_depth(int p_new); int get_map_depth() const; - void set_map_data(PoolRealArray p_new); - PoolRealArray get_map_data() const; + void set_map_data(PackedFloat32Array p_new); + PackedFloat32Array get_map_data() const; virtual Vector<Vector3> get_debug_mesh_lines(); virtual real_t get_enclosing_radius() const; diff --git a/scene/resources/line_shape_2d.cpp b/scene/resources/line_shape_2d.cpp index d1bb61820b..3b30b4528a 100644 --- a/scene/resources/line_shape_2d.cpp +++ b/scene/resources/line_shape_2d.cpp @@ -113,7 +113,7 @@ void LineShape2D::_bind_methods() { ClassDB::bind_method(D_METHOD("get_d"), &LineShape2D::get_d); ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "normal"), "set_normal", "get_normal"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "d"), "set_d", "get_d"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "d"), "set_d", "get_d"); } LineShape2D::LineShape2D() : diff --git a/scene/resources/material.cpp b/scene/resources/material.cpp index 01e3c4c930..ff51cab0a4 100644 --- a/scene/resources/material.cpp +++ b/scene/resources/material.cpp @@ -197,7 +197,7 @@ void ShaderMaterial::set_shader(const Ref<Shader> &p_shader) { // This can be a slow operation, and `_change_notify()` (which is called by `_shader_changed()`) // does nothing in non-editor builds anyway. See GH-34741 for details. if (shader.is_valid() && Engine::get_singleton()->is_editor_hint()) { - shader->disconnect("changed", this, "_shader_changed"); + shader->disconnect_compat("changed", this, "_shader_changed"); } shader = p_shader; @@ -207,7 +207,7 @@ void ShaderMaterial::set_shader(const Ref<Shader> &p_shader) { rid = shader->get_rid(); if (Engine::get_singleton()->is_editor_hint()) { - shader->connect("changed", this, "_shader_changed"); + shader->connect_compat("changed", this, "_shader_changed"); } } @@ -419,10 +419,11 @@ void BaseMaterial3D::_update_shader() { switch (texture_filter) { case TEXTURE_FILTER_NEAREST: texfilter_str = "filter_nearest"; break; case TEXTURE_FILTER_LINEAR: texfilter_str = "filter_linear"; break; - case TEXTURE_FILTER_NEAREST_WITH_MIMPAMPS: texfilter_str = "filter_nearest_mipmap"; break; + case TEXTURE_FILTER_NEAREST_WITH_MIPMAPS: texfilter_str = "filter_nearest_mipmap"; break; case TEXTURE_FILTER_LINEAR_WITH_MIPMAPS: texfilter_str = "filter_linear_mipmap"; break; - case TEXTURE_FILTER_NEAREST_WITH_MIMPAMPS_ANISOTROPIC: texfilter_str = "filter_nearest_mipmap_aniso"; break; + case TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC: texfilter_str = "filter_nearest_mipmap_aniso"; break; case TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC: texfilter_str = "filter_linear_mipmap_aniso"; break; + case TEXTURE_FILTER_MAX: break; // Internal value, skip. } if (flags[FLAG_USE_TEXTURE_REPEAT]) { @@ -2222,7 +2223,7 @@ void BaseMaterial3D::_bind_methods() { ADD_GROUP("Transparency", ""); ADD_PROPERTY(PropertyInfo(Variant::INT, "transparency", PROPERTY_HINT_ENUM, "Disabled,Alpha,AlphaScissor,DepthPrePass"), "set_transparency", "get_transparency"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "alpha_scissor_threshold", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_alpha_scissor_threshold", "get_alpha_scissor_threshold"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "alpha_scissor_threshold", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_alpha_scissor_threshold", "get_alpha_scissor_threshold"); ADD_PROPERTY(PropertyInfo(Variant::INT, "blend_mode", PROPERTY_HINT_ENUM, "Mix,Add,Sub,Mul"), "set_blend_mode", "get_blend_mode"); ADD_PROPERTY(PropertyInfo(Variant::INT, "cull_mode", PROPERTY_HINT_ENUM, "Back,Front,Disabled"), "set_cull_mode", "get_cull_mode"); ADD_PROPERTY(PropertyInfo(Variant::INT, "depth_draw_mode", PROPERTY_HINT_ENUM, "Opaque Only,Always,Never"), "set_depth_draw_mode", "get_depth_draw_mode"); @@ -2247,56 +2248,56 @@ void BaseMaterial3D::_bind_methods() { ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "orm_texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"), "set_texture", "get_texture", TEXTURE_ORM); ADD_GROUP("Metallic", "metallic_"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "metallic", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_metallic", "get_metallic"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "metallic_specular", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_specular", "get_specular"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "metallic", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_metallic", "get_metallic"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "metallic_specular", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_specular", "get_specular"); ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "metallic_texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"), "set_texture", "get_texture", TEXTURE_METALLIC); ADD_PROPERTY(PropertyInfo(Variant::INT, "metallic_texture_channel", PROPERTY_HINT_ENUM, "Red,Green,Blue,Alpha,Gray"), "set_metallic_texture_channel", "get_metallic_texture_channel"); ADD_GROUP("Roughness", "roughness_"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "roughness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_roughness", "get_roughness"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "roughness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_roughness", "get_roughness"); ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "roughness_texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"), "set_texture", "get_texture", TEXTURE_ROUGHNESS); ADD_PROPERTY(PropertyInfo(Variant::INT, "roughness_texture_channel", PROPERTY_HINT_ENUM, "Red,Green,Blue,Alpha,Gray"), "set_roughness_texture_channel", "get_roughness_texture_channel"); ADD_GROUP("Emission", "emission_"); ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "emission_enabled"), "set_feature", "get_feature", FEATURE_EMISSION); ADD_PROPERTY(PropertyInfo(Variant::COLOR, "emission", PROPERTY_HINT_COLOR_NO_ALPHA), "set_emission", "get_emission"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "emission_energy", PROPERTY_HINT_RANGE, "0,16,0.01,or_greater"), "set_emission_energy", "get_emission_energy"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "emission_energy", PROPERTY_HINT_RANGE, "0,16,0.01,or_greater"), "set_emission_energy", "get_emission_energy"); ADD_PROPERTY(PropertyInfo(Variant::INT, "emission_operator", PROPERTY_HINT_ENUM, "Add,Multiply"), "set_emission_operator", "get_emission_operator"); 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_PROPERTYI(PropertyInfo(Variant::BOOL, "normal_enabled"), "set_feature", "get_feature", FEATURE_NORMAL_MAPPING); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "normal_scale", PROPERTY_HINT_RANGE, "-16,16,0.01"), "set_normal_scale", "get_normal_scale"); + 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); ADD_GROUP("Rim", "rim_"); ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "rim_enabled"), "set_feature", "get_feature", FEATURE_RIM); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "rim", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_rim", "get_rim"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "rim_tint", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_rim_tint", "get_rim_tint"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "rim", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_rim", "get_rim"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "rim_tint", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_rim_tint", "get_rim_tint"); ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "rim_texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"), "set_texture", "get_texture", TEXTURE_RIM); ADD_GROUP("Clearcoat", "clearcoat_"); ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "clearcoat_enabled"), "set_feature", "get_feature", FEATURE_CLEARCOAT); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "clearcoat", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_clearcoat", "get_clearcoat"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "clearcoat_gloss", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_clearcoat_gloss", "get_clearcoat_gloss"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "clearcoat", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_clearcoat", "get_clearcoat"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "clearcoat_gloss", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_clearcoat_gloss", "get_clearcoat_gloss"); ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "clearcoat_texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"), "set_texture", "get_texture", TEXTURE_CLEARCOAT); ADD_GROUP("Anisotropy", "anisotropy_"); ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "anisotropy_enabled"), "set_feature", "get_feature", FEATURE_ANISOTROPY); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "anisotropy", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_anisotropy", "get_anisotropy"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "anisotropy", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_anisotropy", "get_anisotropy"); ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "anisotropy_flowmap", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"), "set_texture", "get_texture", TEXTURE_FLOWMAP); ADD_GROUP("Ambient Occlusion", "ao_"); ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "ao_enabled"), "set_feature", "get_feature", FEATURE_AMBIENT_OCCLUSION); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "ao_light_affect", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_ao_light_affect", "get_ao_light_affect"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "ao_light_affect", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_ao_light_affect", "get_ao_light_affect"); ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "ao_texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"), "set_texture", "get_texture", TEXTURE_AMBIENT_OCCLUSION); ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "ao_on_uv2"), "set_flag", "get_flag", FLAG_AO_ON_UV2); ADD_PROPERTY(PropertyInfo(Variant::INT, "ao_texture_channel", PROPERTY_HINT_ENUM, "Red,Green,Blue,Alpha,Gray"), "set_ao_texture_channel", "get_ao_texture_channel"); ADD_GROUP("Height", "heightmap_"); ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "heightmap_enabled"), "set_feature", "get_feature", FEATURE_HEIGHT_MAPPING); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "heightmap_scale", PROPERTY_HINT_RANGE, "-16,16,0.01"), "set_heightmap_scale", "get_heightmap_scale"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "heightmap_scale", PROPERTY_HINT_RANGE, "-16,16,0.01"), "set_heightmap_scale", "get_heightmap_scale"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "heightmap_deep_parallax"), "set_heightmap_deep_parallax", "is_heightmap_deep_parallax_enabled"); ADD_PROPERTY(PropertyInfo(Variant::INT, "heightmap_min_layers", PROPERTY_HINT_RANGE, "1,32,1"), "set_heightmap_deep_parallax_min_layers", "get_heightmap_deep_parallax_min_layers"); ADD_PROPERTY(PropertyInfo(Variant::INT, "heightmap_max_layers", PROPERTY_HINT_RANGE, "1,32,1"), "set_heightmap_deep_parallax_max_layers", "get_heightmap_deep_parallax_max_layers"); @@ -2307,7 +2308,7 @@ void BaseMaterial3D::_bind_methods() { ADD_GROUP("Subsurf Scatter", "subsurf_scatter_"); ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "subsurf_scatter_enabled"), "set_feature", "get_feature", FEATURE_SUBSURACE_SCATTERING); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "subsurf_scatter_strength", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_subsurface_scattering_strength", "get_subsurface_scattering_strength"); + 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::OBJECT, "subsurf_scatter_texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"), "set_texture", "get_texture", TEXTURE_SUBSURFACE_SCATTERING); ADD_GROUP("Transmission", "transmission_"); @@ -2317,7 +2318,7 @@ void BaseMaterial3D::_bind_methods() { ADD_GROUP("Refraction", "refraction_"); ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "refraction_enabled"), "set_feature", "get_feature", FEATURE_REFRACTION); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "refraction_scale", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_refraction", "get_refraction"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "refraction_scale", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_refraction", "get_refraction"); ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "refraction_texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"), "set_texture", "get_texture", TEXTURE_REFRACTION); ADD_PROPERTY(PropertyInfo(Variant::INT, "refraction_texture_channel", PROPERTY_HINT_ENUM, "Red,Green,Blue,Alpha,Gray"), "set_refraction_texture_channel", "get_refraction_texture_channel"); @@ -2333,14 +2334,14 @@ void BaseMaterial3D::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "uv1_scale"), "set_uv1_scale", "get_uv1_scale"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "uv1_offset"), "set_uv1_offset", "get_uv1_offset"); ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "uv1_triplanar"), "set_flag", "get_flag", FLAG_UV1_USE_TRIPLANAR); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "uv1_triplanar_sharpness", PROPERTY_HINT_EXP_EASING), "set_uv1_triplanar_blend_sharpness", "get_uv1_triplanar_blend_sharpness"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "uv1_triplanar_sharpness", PROPERTY_HINT_EXP_EASING), "set_uv1_triplanar_blend_sharpness", "get_uv1_triplanar_blend_sharpness"); ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "uv1_world_triplanar"), "set_flag", "get_flag", FLAG_UV1_USE_WORLD_TRIPLANAR); ADD_GROUP("UV2", "uv2_"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "uv2_scale"), "set_uv2_scale", "get_uv2_scale"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "uv2_offset"), "set_uv2_offset", "get_uv2_offset"); ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "uv2_triplanar"), "set_flag", "get_flag", FLAG_UV2_USE_TRIPLANAR); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "uv2_triplanar_sharpness", PROPERTY_HINT_EXP_EASING), "set_uv2_triplanar_blend_sharpness", "get_uv2_triplanar_blend_sharpness"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "uv2_triplanar_sharpness", PROPERTY_HINT_EXP_EASING), "set_uv2_triplanar_blend_sharpness", "get_uv2_triplanar_blend_sharpness"); ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "uv2_world_triplanar"), "set_flag", "get_flag", FLAG_UV2_USE_WORLD_TRIPLANAR); ADD_GROUP("Sampling", "texture_"); @@ -2362,18 +2363,18 @@ void BaseMaterial3D::_bind_methods() { ADD_GROUP("Grow", "grow_"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "grow"), "set_grow_enabled", "is_grow_enabled"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "grow_amount", PROPERTY_HINT_RANGE, "-16,16,0.001"), "set_grow", "get_grow"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "grow_amount", PROPERTY_HINT_RANGE, "-16,16,0.001"), "set_grow", "get_grow"); ADD_GROUP("Transform", ""); ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "fixed_size"), "set_flag", "get_flag", FLAG_FIXED_SIZE); ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "use_point_size"), "set_flag", "get_flag", FLAG_USE_POINT_SIZE); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "point_size", PROPERTY_HINT_RANGE, "0.1,128,0.1"), "set_point_size", "get_point_size"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "point_size", PROPERTY_HINT_RANGE, "0.1,128,0.1"), "set_point_size", "get_point_size"); ADD_GROUP("Proximity Fade", "proximity_fade_"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "proximity_fade_enable"), "set_proximity_fade", "is_proximity_fade_enabled"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "proximity_fade_distance", PROPERTY_HINT_RANGE, "0,4096,0.01"), "set_proximity_fade_distance", "get_proximity_fade_distance"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "proximity_fade_distance", PROPERTY_HINT_RANGE, "0,4096,0.01"), "set_proximity_fade_distance", "get_proximity_fade_distance"); ADD_GROUP("Distance Fade", "distance_fade_"); ADD_PROPERTY(PropertyInfo(Variant::INT, "distance_fade_mode", PROPERTY_HINT_ENUM, "Disabled,PixelAlpha,PixelDither,ObjectDither"), "set_distance_fade", "get_distance_fade"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "distance_fade_min_distance", PROPERTY_HINT_RANGE, "0,4096,0.01"), "set_distance_fade_min_distance", "get_distance_fade_min_distance"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "distance_fade_max_distance", PROPERTY_HINT_RANGE, "0,4096,0.01"), "set_distance_fade_max_distance", "get_distance_fade_max_distance"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "distance_fade_min_distance", PROPERTY_HINT_RANGE, "0,4096,0.01"), "set_distance_fade_min_distance", "get_distance_fade_min_distance"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "distance_fade_max_distance", PROPERTY_HINT_RANGE, "0,4096,0.01"), "set_distance_fade_max_distance", "get_distance_fade_max_distance"); BIND_ENUM_CONSTANT(TEXTURE_ALBEDO); BIND_ENUM_CONSTANT(TEXTURE_METALLIC); @@ -2396,9 +2397,9 @@ void BaseMaterial3D::_bind_methods() { BIND_ENUM_CONSTANT(TEXTURE_FILTER_NEAREST); BIND_ENUM_CONSTANT(TEXTURE_FILTER_LINEAR); - BIND_ENUM_CONSTANT(TEXTURE_FILTER_NEAREST_WITH_MIMPAMPS); + BIND_ENUM_CONSTANT(TEXTURE_FILTER_NEAREST_WITH_MIPMAPS); BIND_ENUM_CONSTANT(TEXTURE_FILTER_LINEAR_WITH_MIPMAPS); - BIND_ENUM_CONSTANT(TEXTURE_FILTER_NEAREST_WITH_MIMPAMPS_ANISOTROPIC); + BIND_ENUM_CONSTANT(TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC); BIND_ENUM_CONSTANT(TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC); BIND_ENUM_CONSTANT(TEXTURE_FILTER_MAX); diff --git a/scene/resources/material.h b/scene/resources/material.h index 8c5a648058..927334c74d 100644 --- a/scene/resources/material.h +++ b/scene/resources/material.h @@ -138,9 +138,9 @@ public: enum TextureFilter { TEXTURE_FILTER_NEAREST, TEXTURE_FILTER_LINEAR, - TEXTURE_FILTER_NEAREST_WITH_MIMPAMPS, + TEXTURE_FILTER_NEAREST_WITH_MIPMAPS, TEXTURE_FILTER_LINEAR_WITH_MIPMAPS, - TEXTURE_FILTER_NEAREST_WITH_MIMPAMPS_ANISOTROPIC, + TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC, TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC, TEXTURE_FILTER_MAX }; diff --git a/scene/resources/mesh.cpp b/scene/resources/mesh.cpp index 58463abad8..08c4169167 100644 --- a/scene/resources/mesh.cpp +++ b/scene/resources/mesh.cpp @@ -63,9 +63,9 @@ Ref<TriangleMesh> Mesh::generate_triangle_mesh() const { if (facecount == 0 || (facecount % 3) != 0) return triangle_mesh; - PoolVector<Vector3> faces; + Vector<Vector3> faces; faces.resize(facecount); - PoolVector<Vector3>::Write facesw = faces.write(); + Vector3 *facesw = faces.ptrw(); int widx = 0; @@ -78,14 +78,14 @@ Ref<TriangleMesh> Mesh::generate_triangle_mesh() const { ERR_FAIL_COND_V(a.empty(), Ref<TriangleMesh>()); int vc = surface_get_array_len(i); - PoolVector<Vector3> vertices = a[ARRAY_VERTEX]; - PoolVector<Vector3>::Read vr = vertices.read(); + Vector<Vector3> vertices = a[ARRAY_VERTEX]; + const Vector3 *vr = vertices.ptr(); if (surface_get_format(i) & ARRAY_FORMAT_INDEX) { int ic = surface_get_array_index_len(i); - PoolVector<int> indices = a[ARRAY_INDEX]; - PoolVector<int>::Read ir = indices.read(); + Vector<int> indices = a[ARRAY_INDEX]; + const int *ir = indices.ptr(); for (int j = 0; j < ic; j++) { int index = ir[j]; @@ -99,8 +99,6 @@ Ref<TriangleMesh> Mesh::generate_triangle_mesh() const { } } - facesw.release(); - triangle_mesh = Ref<TriangleMesh>(memnew(TriangleMesh)); triangle_mesh->create(faces); @@ -118,15 +116,15 @@ void Mesh::generate_debug_mesh_lines(Vector<Vector3> &r_lines) { if (tm.is_null()) return; - PoolVector<int> triangle_indices; + Vector<int> triangle_indices; tm->get_indices(&triangle_indices); const int triangles_num = tm->get_triangles().size(); - PoolVector<Vector3> vertices = tm->get_vertices(); + Vector<Vector3> vertices = tm->get_vertices(); debug_lines.resize(tm->get_triangles().size() * 6); // 3 lines x 2 points each line - PoolVector<int>::Read ind_r = triangle_indices.read(); - PoolVector<Vector3>::Read ver_r = vertices.read(); + const int *ind_r = triangle_indices.ptr(); + const Vector3 *ver_r = vertices.ptr(); for (int j = 0, x = 0, i = 0; i < triangles_num; j += 6, x += 3, ++i) { // Triangle line 1 debug_lines.write[j + 0] = ver_r[ind_r[x + 0]]; @@ -148,7 +146,7 @@ void Mesh::generate_debug_mesh_indices(Vector<Vector3> &r_points) { if (tm.is_null()) return; - PoolVector<Vector3> vertices = tm->get_vertices(); + Vector<Vector3> vertices = tm->get_vertices(); int vertices_size = vertices.size(); r_points.resize(vertices_size); @@ -162,20 +160,20 @@ bool Mesh::surface_is_softbody_friendly(int p_idx) const { return (surface_format & Mesh::ARRAY_FLAG_USE_DYNAMIC_UPDATE && (!(surface_format & Mesh::ARRAY_COMPRESS_NORMAL))); } -PoolVector<Face3> Mesh::get_faces() const { +Vector<Face3> Mesh::get_faces() const { Ref<TriangleMesh> tm = generate_triangle_mesh(); if (tm.is_valid()) return tm->get_faces(); - return PoolVector<Face3>(); + return Vector<Face3>(); /* for (int i=0;i<surfaces.size();i++) { if (VisualServer::get_singleton()->mesh_surface_get_primitive_type( mesh, i ) != VisualServer::PRIMITIVE_TRIANGLES ) continue; - PoolVector<int> indices; - PoolVector<Vector3> vertices; + Vector<int> indices; + Vector<Vector3> vertices; vertices=VisualServer::get_singleton()->mesh_surface_get_array(mesh, i,VisualServer::ARRAY_VERTEX); @@ -196,10 +194,10 @@ PoolVector<Face3> Mesh::get_faces() const { if (len<=0) continue; - PoolVector<int>::Read indicesr = indices.read(); + const int* indicesr = indices.ptr(); const int *indicesptr = indicesr.ptr(); - PoolVector<Vector3>::Read verticesr = vertices.read(); + const Vector3* verticesr = vertices.ptr(); const Vector3 *verticesptr = verticesr.ptr(); int old_faces=faces.size(); @@ -207,7 +205,7 @@ PoolVector<Face3> Mesh::get_faces() const { faces.resize(new_faces); - PoolVector<Face3>::Write facesw = faces.write(); + Face3* facesw = faces.ptrw(); Face3 *facesptr=facesw.ptr(); @@ -230,13 +228,13 @@ PoolVector<Face3> Mesh::get_faces() const { Ref<Shape> Mesh::create_convex_shape() const { - PoolVector<Vector3> vertices; + Vector<Vector3> vertices; for (int i = 0; i < get_surface_count(); i++) { Array a = surface_get_arrays(i); ERR_FAIL_COND_V(a.empty(), Ref<ConvexPolygonShape>()); - PoolVector<Vector3> v = a[ARRAY_VERTEX]; + Vector<Vector3> v = a[ARRAY_VERTEX]; vertices.append_array(v); } @@ -247,11 +245,11 @@ Ref<Shape> Mesh::create_convex_shape() const { Ref<Shape> Mesh::create_trimesh_shape() const { - PoolVector<Face3> faces = get_faces(); + Vector<Face3> faces = get_faces(); if (faces.size() == 0) return Ref<Shape>(); - PoolVector<Vector3> face_points; + Vector<Vector3> face_points; face_points.resize(faces.size() * 3); for (int i = 0; i < face_points.size(); i++) { @@ -279,7 +277,7 @@ Ref<Mesh> Mesh::create_outline(float p_margin) const { if (i == 0) { arrays = a; - PoolVector<Vector3> v = a[ARRAY_VERTEX]; + Vector<Vector3> v = a[ARRAY_VERTEX]; index_accum += v.size(); } else { @@ -297,8 +295,8 @@ Ref<Mesh> Mesh::create_outline(float p_margin) const { case ARRAY_VERTEX: case ARRAY_NORMAL: { - PoolVector<Vector3> dst = arrays[j]; - PoolVector<Vector3> src = a[j]; + Vector<Vector3> dst = arrays[j]; + Vector<Vector3> src = a[j]; if (j == ARRAY_VERTEX) vcount = src.size(); if (dst.size() == 0 || src.size() == 0) { @@ -312,8 +310,8 @@ Ref<Mesh> Mesh::create_outline(float p_margin) const { case ARRAY_BONES: case ARRAY_WEIGHTS: { - PoolVector<real_t> dst = arrays[j]; - PoolVector<real_t> src = a[j]; + Vector<real_t> dst = arrays[j]; + Vector<real_t> src = a[j]; if (dst.size() == 0 || src.size() == 0) { arrays[j] = Variant(); continue; @@ -323,8 +321,8 @@ Ref<Mesh> Mesh::create_outline(float p_margin) const { } break; case ARRAY_COLOR: { - PoolVector<Color> dst = arrays[j]; - PoolVector<Color> src = a[j]; + Vector<Color> dst = arrays[j]; + Vector<Color> src = a[j]; if (dst.size() == 0 || src.size() == 0) { arrays[j] = Variant(); continue; @@ -335,8 +333,8 @@ Ref<Mesh> Mesh::create_outline(float p_margin) const { } break; case ARRAY_TEX_UV: case ARRAY_TEX_UV2: { - PoolVector<Vector2> dst = arrays[j]; - PoolVector<Vector2> src = a[j]; + Vector<Vector2> dst = arrays[j]; + Vector<Vector2> src = a[j]; if (dst.size() == 0 || src.size() == 0) { arrays[j] = Variant(); continue; @@ -346,15 +344,15 @@ Ref<Mesh> Mesh::create_outline(float p_margin) const { } break; case ARRAY_INDEX: { - PoolVector<int> dst = arrays[j]; - PoolVector<int> src = a[j]; + Vector<int> dst = arrays[j]; + Vector<int> src = a[j]; if (dst.size() == 0 || src.size() == 0) { arrays[j] = Variant(); continue; } { int ss = src.size(); - PoolVector<int>::Write w = src.write(); + int *w = src.ptrw(); for (int k = 0; k < ss; k++) { w[k] += index_accum; } @@ -372,18 +370,18 @@ Ref<Mesh> Mesh::create_outline(float p_margin) const { ERR_FAIL_COND_V(arrays.size() != ARRAY_MAX, Ref<ArrayMesh>()); { - PoolVector<int>::Write ir; - PoolVector<int> indices = arrays[ARRAY_INDEX]; + int *ir; + Vector<int> indices = arrays[ARRAY_INDEX]; bool has_indices = false; - PoolVector<Vector3> vertices = arrays[ARRAY_VERTEX]; + Vector<Vector3> vertices = arrays[ARRAY_VERTEX]; int vc = vertices.size(); ERR_FAIL_COND_V(!vc, Ref<ArrayMesh>()); - PoolVector<Vector3>::Write r = vertices.write(); + Vector3 *r = vertices.ptrw(); if (indices.size()) { ERR_FAIL_COND_V(indices.size() % 3 != 0, Ref<ArrayMesh>()); vc = indices.size(); - ir = indices.write(); + ir = indices.ptrw(); has_indices = true; } @@ -440,14 +438,13 @@ Ref<Mesh> Mesh::create_outline(float p_margin) const { r[i] = t; } - r.release(); arrays[ARRAY_VERTEX] = vertices; if (!has_indices) { - PoolVector<int> new_indices; + Vector<int> new_indices; new_indices.resize(vertices.size()); - PoolVector<int>::Write iw = new_indices.write(); + int *iw = new_indices.ptrw(); for (int j = 0; j < vc2; j += 3) { @@ -456,7 +453,6 @@ Ref<Mesh> Mesh::create_outline(float p_margin) const { iw[j + 2] = j + 1; } - iw.release(); arrays[ARRAY_INDEX] = new_indices; } else { @@ -465,7 +461,6 @@ Ref<Mesh> Mesh::create_outline(float p_margin) const { SWAP(ir[j + 1], ir[j + 2]); } - ir.release(); arrays[ARRAY_INDEX] = indices; } } @@ -548,10 +543,10 @@ Vector<Ref<Shape> > Mesh::convex_decompose() const { ERR_FAIL_COND_V(!convex_composition_function, Vector<Ref<Shape> >()); - PoolVector<Face3> faces = get_faces(); + Vector<Face3> faces = get_faces(); Vector<Face3> f3; f3.resize(faces.size()); - PoolVector<Face3>::Read f = faces.read(); + const Face3 *f = faces.ptr(); for (int i = 0; i < f3.size(); i++) { f3.write[i] = f[i]; } @@ -568,10 +563,10 @@ Vector<Ref<Shape> > Mesh::convex_decompose() const { points.insert(decomposed[i][j].vertex[2]); } - PoolVector<Vector3> convex_points; + Vector<Vector3> convex_points; convex_points.resize(points.size()); { - PoolVector<Vector3>::Write w = convex_points.write(); + Vector3 *w = convex_points.ptrw(); int idx = 0; for (Set<Vector3>::Element *E = points.front(); E; E = E->next()) { w[idx++] = E->get(); @@ -590,7 +585,7 @@ Vector<Ref<Shape> > Mesh::convex_decompose() const { Mesh::Mesh() { } -static PoolVector<uint8_t> _fix_array_compatibility(const PoolVector<uint8_t> &p_src, uint32_t p_format, uint32_t p_elements) { +static Vector<uint8_t> _fix_array_compatibility(const Vector<uint8_t> &p_src, uint32_t p_format, uint32_t p_elements) { bool vertex_16bit = p_format & ((1 << (Mesh::ARRAY_VERTEX + Mesh::ARRAY_COMPRESS_BASE))); bool has_bones = (p_format & Mesh::ARRAY_FORMAT_BONES); @@ -608,18 +603,18 @@ static PoolVector<uint8_t> _fix_array_compatibility(const PoolVector<uint8_t> &p uint32_t src_stride = p_src.size() / p_elements; uint32_t dst_stride = src_stride + (vertex_16bit ? 4 : 0) + (bone_8 ? 4 : 0) - (weight_32 ? 8 : 0); - PoolVector<uint8_t> ret = p_src; + Vector<uint8_t> ret = p_src; ret.resize(dst_stride * p_elements); { - PoolVector<uint8_t>::Write w = ret.write(); - PoolVector<uint8_t>::Read r = p_src.read(); + uint8_t *w = ret.ptrw(); + const uint8_t *r = p_src.ptr(); for (uint32_t i = 0; i < p_elements; i++) { uint32_t remaining = src_stride; - const uint8_t *src = (const uint8_t *)(r.ptr() + src_stride * i); - uint8_t *dst = (uint8_t *)(w.ptr() + dst_stride * i); + const uint8_t *src = (const uint8_t *)(r + src_stride * i); + uint8_t *dst = (uint8_t *)(w + dst_stride * i); if (!vertex_2d) { //3D if (vertex_16bit) { @@ -714,9 +709,9 @@ bool ArrayMesh::_set(const StringName &p_name, const Variant &p_value) { if (p_name == "blend_shape/names") { - PoolVector<String> sk = p_value; + Vector<String> sk = p_value; int sz = sk.size(); - PoolVector<String>::Read r = sk.read(); + const String *r = sk.ptr(); for (int i = 0; i < sz; i++) add_blend_shape(r[i]); return true; @@ -766,8 +761,8 @@ bool ArrayMesh::_set(const StringName &p_name, const Variant &p_value) { } else if (d.has("array_data")) { //print_line("array data (old style"); //older format (3.x) - PoolVector<uint8_t> array_data = d["array_data"]; - PoolVector<uint8_t> array_index_data; + Vector<uint8_t> array_data = d["array_data"]; + Vector<uint8_t> array_index_data; if (d.has("array_index_data")) array_index_data = d["array_index_data"]; @@ -797,12 +792,12 @@ bool ArrayMesh::_set(const StringName &p_name, const Variant &p_value) { if (d.has("index_count")) index_count = d["index_count"]; - Vector<PoolVector<uint8_t> > blend_shapes; + Vector<Vector<uint8_t> > blend_shapes; if (d.has("blend_shape_data")) { Array blend_shape_data = d["blend_shape_data"]; for (int i = 0; i < blend_shape_data.size(); i++) { - PoolVector<uint8_t> shape = blend_shape_data[i]; + Vector<uint8_t> shape = blend_shape_data[i]; shape = _fix_array_compatibility(shape, format, vertex_count); blend_shapes.push_back(shape); @@ -1049,7 +1044,7 @@ bool ArrayMesh::_get(const StringName &p_name, Variant &r_ret) const { if (p_name == "blend_shape/names") { - PoolVector<String> sk; + Vector<String> sk; for (int i = 0; i < blend_shapes.size(); i++) sk.push_back(blend_shapes[i]); r_ret = sk; @@ -1081,7 +1076,7 @@ void ArrayMesh::_get_property_list(List<PropertyInfo> *p_list) const { return; if (blend_shapes.size()) { - p_list->push_back(PropertyInfo(Variant::POOL_STRING_ARRAY, "blend_shape/names", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL)); + p_list->push_back(PropertyInfo(Variant::PACKED_STRING_ARRAY, "blend_shape/names", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL)); p_list->push_back(PropertyInfo(Variant::INT, "blend_shape/mode", PROPERTY_HINT_ENUM, "Normalized,Relative")); } @@ -1112,7 +1107,7 @@ void ArrayMesh::_recompute_aabb() { #ifndef _MSC_VER #warning need to add binding to add_surface using future MeshSurfaceData object #endif -void ArrayMesh::add_surface(uint32_t p_format, PrimitiveType p_primitive, const PoolVector<uint8_t> &p_array, int p_vertex_count, const PoolVector<uint8_t> &p_index_array, int p_index_count, const AABB &p_aabb, const Vector<PoolVector<uint8_t> > &p_blend_shapes, const Vector<AABB> &p_bone_aabb, const Vector<VS::SurfaceData::LOD> &p_lods) { +void ArrayMesh::add_surface(uint32_t p_format, PrimitiveType p_primitive, const Vector<uint8_t> &p_array, int p_vertex_count, const Vector<uint8_t> &p_index_array, int p_index_count, const AABB &p_aabb, const Vector<Vector<uint8_t> > &p_blend_shapes, const Vector<AABB> &p_bone_aabb, const Vector<VS::SurfaceData::LOD> &p_lods) { _create_if_empty(); @@ -1293,7 +1288,7 @@ String ArrayMesh::surface_get_name(int p_idx) const { return surfaces[p_idx].name; } -void ArrayMesh::surface_update_region(int p_surface, int p_offset, const PoolVector<uint8_t> &p_data) { +void ArrayMesh::surface_update_region(int p_surface, int p_offset, const Vector<uint8_t> &p_data) { ERR_FAIL_INDEX(p_surface, surfaces.size()); VS::get_singleton()->mesh_surface_update_region(mesh, p_surface, p_offset, p_data); @@ -1404,12 +1399,12 @@ Error ArrayMesh::lightmap_unwrap(const Transform &p_base_transform, float p_texe s.material = surface_get_material(i); s.vertices = SurfaceTool::create_vertex_array_from_triangle_arrays(arrays); - PoolVector<Vector3> rvertices = arrays[Mesh::ARRAY_VERTEX]; + Vector<Vector3> rvertices = arrays[Mesh::ARRAY_VERTEX]; int vc = rvertices.size(); - PoolVector<Vector3>::Read r = rvertices.read(); + const Vector3 *r = rvertices.ptr(); - PoolVector<Vector3> rnormals = arrays[Mesh::ARRAY_NORMAL]; - PoolVector<Vector3>::Read rn = rnormals.read(); + Vector<Vector3> rnormals = arrays[Mesh::ARRAY_NORMAL]; + const Vector3 *rn = rnormals.ptr(); int vertex_ofs = vertices.size() / 3; @@ -1431,7 +1426,7 @@ Error ArrayMesh::lightmap_unwrap(const Transform &p_base_transform, float p_texe uv_index.write[j + vertex_ofs] = Pair<int, int>(i, j); } - PoolVector<int> rindices = arrays[Mesh::ARRAY_INDEX]; + Vector<int> rindices = arrays[Mesh::ARRAY_INDEX]; int ic = rindices.size(); if (ic == 0) { @@ -1447,7 +1442,7 @@ Error ArrayMesh::lightmap_unwrap(const Transform &p_base_transform, float p_texe } } else { - PoolVector<int>::Read ri = rindices.read(); + const int *ri = rindices.ptr(); for (int j = 0; j < ic / 3; j++) { if (Face3(r[ri[j * 3 + 0]], r[ri[j * 3 + 1]], r[ri[j * 3 + 2]]).is_degenerate()) diff --git a/scene/resources/mesh.h b/scene/resources/mesh.h index b8f3702bbe..0e356c16a6 100644 --- a/scene/resources/mesh.h +++ b/scene/resources/mesh.h @@ -126,7 +126,7 @@ public: virtual int get_blend_shape_count() const = 0; virtual StringName get_blend_shape_name(int p_index) const = 0; - PoolVector<Face3> get_faces() const; + Vector<Face3> get_faces() const; Ref<TriangleMesh> generate_triangle_mesh() const; void generate_debug_mesh_lines(Vector<Vector3> &r_lines); void generate_debug_mesh_indices(Vector<Vector3> &r_points); @@ -193,7 +193,7 @@ protected: public: void add_surface_from_arrays(PrimitiveType p_primitive, const Array &p_arrays, const Array &p_blend_shapes = Array(), const Dictionary &p_lods = Dictionary(), uint32_t p_flags = ARRAY_COMPRESS_DEFAULT); - void add_surface(uint32_t p_format, PrimitiveType p_primitive, const PoolVector<uint8_t> &p_array, int p_vertex_count, const PoolVector<uint8_t> &p_index_array, int p_index_count, const AABB &p_aabb, const Vector<PoolVector<uint8_t> > &p_blend_shapes = Vector<PoolVector<uint8_t> >(), const Vector<AABB> &p_bone_aabbs = Vector<AABB>(), const Vector<VS::SurfaceData::LOD> &p_lods = Vector<VS::SurfaceData::LOD>()); + void add_surface(uint32_t p_format, PrimitiveType p_primitive, const Vector<uint8_t> &p_array, int p_vertex_count, const Vector<uint8_t> &p_index_array, int p_index_count, const AABB &p_aabb, const Vector<Vector<uint8_t> > &p_blend_shapes = Vector<Vector<uint8_t> >(), const Vector<AABB> &p_bone_aabbs = Vector<AABB>(), const Vector<VS::SurfaceData::LOD> &p_lods = Vector<VS::SurfaceData::LOD>()); Array surface_get_arrays(int p_surface) const; Array surface_get_blend_shape_arrays(int p_surface) const; @@ -207,7 +207,7 @@ public: void set_blend_shape_mode(BlendShapeMode p_mode); BlendShapeMode get_blend_shape_mode() const; - void surface_update_region(int p_surface, int p_offset, const PoolVector<uint8_t> &p_data); + void surface_update_region(int p_surface, int p_offset, const Vector<uint8_t> &p_data); int get_surface_count() const; void surface_remove(int p_idx); diff --git a/scene/resources/mesh_data_tool.cpp b/scene/resources/mesh_data_tool.cpp index 7a303443e3..675cfc6d64 100644 --- a/scene/resources/mesh_data_tool.cpp +++ b/scene/resources/mesh_data_tool.cpp @@ -47,7 +47,7 @@ Error MeshDataTool::create_from_surface(const Ref<ArrayMesh> &p_mesh, int p_surf Array arrays = p_mesh->surface_get_arrays(p_surface); ERR_FAIL_COND_V(arrays.empty(), ERR_INVALID_PARAMETER); - PoolVector<Vector3> varray = arrays[Mesh::ARRAY_VERTEX]; + Vector<Vector3> varray = arrays[Mesh::ARRAY_VERTEX]; int vcount = varray.size(); ERR_FAIL_COND_V(vcount == 0, ERR_INVALID_PARAMETER); @@ -56,34 +56,34 @@ Error MeshDataTool::create_from_surface(const Ref<ArrayMesh> &p_mesh, int p_surf format = p_mesh->surface_get_format(p_surface); material = p_mesh->surface_get_material(p_surface); - PoolVector<Vector3>::Read vr = varray.read(); + const Vector3 *vr = varray.ptr(); - PoolVector<Vector3>::Read nr; + const Vector3 *nr; if (arrays[Mesh::ARRAY_NORMAL].get_type() != Variant::NIL) - nr = arrays[Mesh::ARRAY_NORMAL].operator PoolVector<Vector3>().read(); + nr = arrays[Mesh::ARRAY_NORMAL].operator Vector<Vector3>().ptr(); - PoolVector<real_t>::Read ta; + const real_t *ta; if (arrays[Mesh::ARRAY_TANGENT].get_type() != Variant::NIL) - ta = arrays[Mesh::ARRAY_TANGENT].operator PoolVector<real_t>().read(); + ta = arrays[Mesh::ARRAY_TANGENT].operator Vector<real_t>().ptr(); - PoolVector<Vector2>::Read uv; + const Vector2 *uv; if (arrays[Mesh::ARRAY_TEX_UV].get_type() != Variant::NIL) - uv = arrays[Mesh::ARRAY_TEX_UV].operator PoolVector<Vector2>().read(); - PoolVector<Vector2>::Read uv2; + uv = arrays[Mesh::ARRAY_TEX_UV].operator Vector<Vector2>().ptr(); + const Vector2 *uv2; if (arrays[Mesh::ARRAY_TEX_UV2].get_type() != Variant::NIL) - uv2 = arrays[Mesh::ARRAY_TEX_UV2].operator PoolVector<Vector2>().read(); + uv2 = arrays[Mesh::ARRAY_TEX_UV2].operator Vector<Vector2>().ptr(); - PoolVector<Color>::Read col; + const Color *col; if (arrays[Mesh::ARRAY_COLOR].get_type() != Variant::NIL) - col = arrays[Mesh::ARRAY_COLOR].operator PoolVector<Color>().read(); + col = arrays[Mesh::ARRAY_COLOR].operator Vector<Color>().ptr(); - PoolVector<int>::Read bo; + const int *bo; if (arrays[Mesh::ARRAY_BONES].get_type() != Variant::NIL) - bo = arrays[Mesh::ARRAY_BONES].operator PoolVector<int>().read(); + bo = arrays[Mesh::ARRAY_BONES].operator Vector<int>().ptr(); - PoolVector<real_t>::Read we; + const real_t *we; if (arrays[Mesh::ARRAY_WEIGHTS].get_type() != Variant::NIL) - we = arrays[Mesh::ARRAY_WEIGHTS].operator PoolVector<real_t>().read(); + we = arrays[Mesh::ARRAY_WEIGHTS].operator Vector<real_t>().ptr(); vertices.resize(vcount); @@ -91,18 +91,18 @@ Error MeshDataTool::create_from_surface(const Ref<ArrayMesh> &p_mesh, int p_surf Vertex v; v.vertex = vr[i]; - if (nr.ptr()) + if (nr) v.normal = nr[i]; - if (ta.ptr()) + if (ta) v.tangent = Plane(ta[i * 4 + 0], ta[i * 4 + 1], ta[i * 4 + 2], ta[i * 4 + 3]); - if (uv.ptr()) + if (uv) v.uv = uv[i]; - if (uv2.ptr()) + if (uv2) v.uv2 = uv2[i]; - if (col.ptr()) + if (col) v.color = col[i]; - if (we.ptr()) { + if (we) { v.weights.push_back(we[i * 4 + 0]); v.weights.push_back(we[i * 4 + 1]); @@ -110,7 +110,7 @@ Error MeshDataTool::create_from_surface(const Ref<ArrayMesh> &p_mesh, int p_surf v.weights.push_back(we[i * 4 + 3]); } - if (bo.ptr()) { + if (bo) { v.bones.push_back(bo[i * 4 + 0]); v.bones.push_back(bo[i * 4 + 1]); @@ -121,7 +121,7 @@ Error MeshDataTool::create_from_surface(const Ref<ArrayMesh> &p_mesh, int p_surf vertices.write[i] = v; } - PoolVector<int> indices; + Vector<int> indices; if (arrays[Mesh::ARRAY_INDEX].get_type() != Variant::NIL) { @@ -129,13 +129,13 @@ Error MeshDataTool::create_from_surface(const Ref<ArrayMesh> &p_mesh, int p_surf } else { //make code simpler indices.resize(vcount); - PoolVector<int>::Write iw = indices.write(); + int *iw = indices.ptrw(); for (int i = 0; i < vcount; i++) iw[i] = i; } int icount = indices.size(); - PoolVector<int>::Read r = indices.read(); + const int *r = indices.ptr(); Map<Point2i, int> edge_indices; @@ -187,61 +187,61 @@ Error MeshDataTool::commit_to_surface(const Ref<ArrayMesh> &p_mesh) { int vcount = vertices.size(); - PoolVector<Vector3> v; - PoolVector<Vector3> n; - PoolVector<real_t> t; - PoolVector<Vector2> u; - PoolVector<Vector2> u2; - PoolVector<Color> c; - PoolVector<int> b; - PoolVector<real_t> w; - PoolVector<int> in; + Vector<Vector3> v; + Vector<Vector3> n; + Vector<real_t> t; + Vector<Vector2> u; + Vector<Vector2> u2; + Vector<Color> c; + Vector<int> b; + Vector<real_t> w; + Vector<int> in; { v.resize(vcount); - PoolVector<Vector3>::Write vr = v.write(); + Vector3 *vr = v.ptrw(); - PoolVector<Vector3>::Write nr; + Vector3 *nr; if (format & Mesh::ARRAY_FORMAT_NORMAL) { n.resize(vcount); - nr = n.write(); + nr = n.ptrw(); } - PoolVector<real_t>::Write ta; + real_t *ta; if (format & Mesh::ARRAY_FORMAT_TANGENT) { t.resize(vcount * 4); - ta = t.write(); + ta = t.ptrw(); } - PoolVector<Vector2>::Write uv; + Vector2 *uv; if (format & Mesh::ARRAY_FORMAT_TEX_UV) { u.resize(vcount); - uv = u.write(); + uv = u.ptrw(); } - PoolVector<Vector2>::Write uv2; + Vector2 *uv2; if (format & Mesh::ARRAY_FORMAT_TEX_UV2) { u2.resize(vcount); - uv2 = u2.write(); + uv2 = u2.ptrw(); } - PoolVector<Color>::Write col; + Color *col; if (format & Mesh::ARRAY_FORMAT_COLOR) { c.resize(vcount); - col = c.write(); + col = c.ptrw(); } - PoolVector<int>::Write bo; + int *bo; if (format & Mesh::ARRAY_FORMAT_BONES) { b.resize(vcount * 4); - bo = b.write(); + bo = b.ptrw(); } - PoolVector<real_t>::Write we; + real_t *we; if (format & Mesh::ARRAY_FORMAT_WEIGHTS) { w.resize(vcount * 4); - we = w.write(); + we = w.ptrw(); } for (int i = 0; i < vcount; i++) { @@ -249,22 +249,22 @@ Error MeshDataTool::commit_to_surface(const Ref<ArrayMesh> &p_mesh) { const Vertex &vtx = vertices[i]; vr[i] = vtx.vertex; - if (nr.ptr()) + if (nr) nr[i] = vtx.normal; - if (ta.ptr()) { + if (ta) { ta[i * 4 + 0] = vtx.tangent.normal.x; ta[i * 4 + 1] = vtx.tangent.normal.y; ta[i * 4 + 2] = vtx.tangent.normal.z; ta[i * 4 + 3] = vtx.tangent.d; } - if (uv.ptr()) + if (uv) uv[i] = vtx.uv; - if (uv2.ptr()) + if (uv2) uv2[i] = vtx.uv2; - if (col.ptr()) + if (col) col[i] = vtx.color; - if (we.ptr()) { + if (we) { we[i * 4 + 0] = vtx.weights[0]; we[i * 4 + 1] = vtx.weights[1]; @@ -272,7 +272,7 @@ Error MeshDataTool::commit_to_surface(const Ref<ArrayMesh> &p_mesh) { we[i * 4 + 3] = vtx.weights[3]; } - if (bo.ptr()) { + if (bo) { bo[i * 4 + 0] = vtx.bones[0]; bo[i * 4 + 1] = vtx.bones[1]; @@ -283,7 +283,7 @@ Error MeshDataTool::commit_to_surface(const Ref<ArrayMesh> &p_mesh) { int fc = faces.size(); in.resize(fc * 3); - PoolVector<int>::Write iw = in.write(); + int *iw = in.ptrw(); for (int i = 0; i < fc; i++) { iw[i * 3 + 0] = faces[i].v[0]; diff --git a/scene/resources/mesh_library.cpp b/scene/resources/mesh_library.cpp index ac016bec5d..fffd192348 100644 --- a/scene/resources/mesh_library.cpp +++ b/scene/resources/mesh_library.cpp @@ -29,7 +29,6 @@ /*************************************************************************/ #include "mesh_library.h" -#include "core/engine.h" bool MeshLibrary::_set(const StringName &p_name, const Variant &p_value) { @@ -202,11 +201,6 @@ Transform MeshLibrary::get_item_navmesh_transform(int p_item) const { Ref<Texture2D> MeshLibrary::get_item_preview(int p_item) const { - if (!Engine::get_singleton()->is_editor_hint()) { - ERR_PRINT("MeshLibrary item previews are only generated in an editor context, which means they aren't available in a running project."); - return Ref<Texture2D>(); - } - ERR_FAIL_COND_V_MSG(!item_map.has(p_item), Ref<Texture2D>(), "Requested for nonexistent MeshLibrary item '" + itos(p_item) + "'."); return item_map[p_item].preview; } diff --git a/scene/resources/multimesh.cpp b/scene/resources/multimesh.cpp index 9c34ae0504..aa8be326f5 100644 --- a/scene/resources/multimesh.cpp +++ b/scene/resources/multimesh.cpp @@ -35,17 +35,17 @@ #ifndef DISABLE_DEPRECATED // Kept for compatibility from 3.x to 4.0. -void MultiMesh::_set_transform_array(const PoolVector<Vector3> &p_array) { +void MultiMesh::_set_transform_array(const Vector<Vector3> &p_array) { if (transform_format != TRANSFORM_3D) return; - const PoolVector<Vector3> &xforms = p_array; + const Vector<Vector3> &xforms = p_array; int len = xforms.size(); ERR_FAIL_COND((len / 4) != instance_count); if (len == 0) return; - PoolVector<Vector3>::Read r = xforms.read(); + const Vector3 *r = xforms.ptr(); for (int i = 0; i < len / 4; i++) { @@ -59,18 +59,18 @@ void MultiMesh::_set_transform_array(const PoolVector<Vector3> &p_array) { } } -PoolVector<Vector3> MultiMesh::_get_transform_array() const { +Vector<Vector3> MultiMesh::_get_transform_array() const { if (transform_format != TRANSFORM_3D) - return PoolVector<Vector3>(); + return Vector<Vector3>(); if (instance_count == 0) - return PoolVector<Vector3>(); + return Vector<Vector3>(); - PoolVector<Vector3> xforms; + Vector<Vector3> xforms; xforms.resize(instance_count * 4); - PoolVector<Vector3>::Write w = xforms.write(); + Vector3 *w = xforms.ptrw(); for (int i = 0; i < instance_count; i++) { @@ -84,18 +84,18 @@ PoolVector<Vector3> MultiMesh::_get_transform_array() const { return xforms; } -void MultiMesh::_set_transform_2d_array(const PoolVector<Vector2> &p_array) { +void MultiMesh::_set_transform_2d_array(const Vector<Vector2> &p_array) { if (transform_format != TRANSFORM_2D) return; - const PoolVector<Vector2> &xforms = p_array; + const Vector<Vector2> &xforms = p_array; int len = xforms.size(); ERR_FAIL_COND((len / 3) != instance_count); if (len == 0) return; - PoolVector<Vector2>::Read r = xforms.read(); + const Vector2 *r = xforms.ptr(); for (int i = 0; i < len / 3; i++) { @@ -108,18 +108,18 @@ void MultiMesh::_set_transform_2d_array(const PoolVector<Vector2> &p_array) { } } -PoolVector<Vector2> MultiMesh::_get_transform_2d_array() const { +Vector<Vector2> MultiMesh::_get_transform_2d_array() const { if (transform_format != TRANSFORM_2D) - return PoolVector<Vector2>(); + return Vector<Vector2>(); if (instance_count == 0) - return PoolVector<Vector2>(); + return Vector<Vector2>(); - PoolVector<Vector2> xforms; + Vector<Vector2> xforms; xforms.resize(instance_count * 3); - PoolVector<Vector2>::Write w = xforms.write(); + Vector2 *w = xforms.ptrw(); for (int i = 0; i < instance_count; i++) { @@ -132,15 +132,15 @@ PoolVector<Vector2> MultiMesh::_get_transform_2d_array() const { return xforms; } -void MultiMesh::_set_color_array(const PoolVector<Color> &p_array) { +void MultiMesh::_set_color_array(const Vector<Color> &p_array) { - const PoolVector<Color> &colors = p_array; + const Vector<Color> &colors = p_array; int len = colors.size(); if (len == 0) return; ERR_FAIL_COND(len != instance_count); - PoolVector<Color>::Read r = colors.read(); + const Color *r = colors.ptr(); for (int i = 0; i < len; i++) { @@ -148,12 +148,12 @@ void MultiMesh::_set_color_array(const PoolVector<Color> &p_array) { } } -PoolVector<Color> MultiMesh::_get_color_array() const { +Vector<Color> MultiMesh::_get_color_array() const { if (instance_count == 0 || !use_colors) - return PoolVector<Color>(); + return Vector<Color>(); - PoolVector<Color> colors; + Vector<Color> colors; colors.resize(instance_count); for (int i = 0; i < instance_count; i++) { @@ -164,15 +164,15 @@ PoolVector<Color> MultiMesh::_get_color_array() const { return colors; } -void MultiMesh::_set_custom_data_array(const PoolVector<Color> &p_array) { +void MultiMesh::_set_custom_data_array(const Vector<Color> &p_array) { - const PoolVector<Color> &custom_datas = p_array; + const Vector<Color> &custom_datas = p_array; int len = custom_datas.size(); if (len == 0) return; ERR_FAIL_COND(len != instance_count); - PoolVector<Color>::Read r = custom_datas.read(); + const Color *r = custom_datas.ptr(); for (int i = 0; i < len; i++) { @@ -180,12 +180,12 @@ void MultiMesh::_set_custom_data_array(const PoolVector<Color> &p_array) { } } -PoolVector<Color> MultiMesh::_get_custom_data_array() const { +Vector<Color> MultiMesh::_get_custom_data_array() const { if (instance_count == 0 || !use_custom_data) - return PoolVector<Color>(); + return Vector<Color>(); - PoolVector<Color> custom_datas; + Vector<Color> custom_datas; custom_datas.resize(instance_count); for (int i = 0; i < instance_count; i++) { @@ -197,11 +197,11 @@ PoolVector<Color> MultiMesh::_get_custom_data_array() const { } #endif // DISABLE_DEPRECATED -void MultiMesh::set_buffer(const PoolVector<float> &p_buffer) { +void MultiMesh::set_buffer(const Vector<float> &p_buffer) { VS::get_singleton()->multimesh_set_buffer(multimesh, p_buffer); } -PoolVector<float> MultiMesh::get_buffer() const { +Vector<float> MultiMesh::get_buffer() const { return VS::get_singleton()->multimesh_get_buffer(multimesh); } @@ -350,7 +350,7 @@ void MultiMesh::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::INT, "instance_count", PROPERTY_HINT_RANGE, "0,16384,1,or_greater"), "set_instance_count", "get_instance_count"); ADD_PROPERTY(PropertyInfo(Variant::INT, "visible_instance_count", PROPERTY_HINT_RANGE, "-1,16384,1,or_greater"), "set_visible_instance_count", "get_visible_instance_count"); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "mesh", PROPERTY_HINT_RESOURCE_TYPE, "Mesh"), "set_mesh", "get_mesh"); - ADD_PROPERTY(PropertyInfo(Variant::POOL_REAL_ARRAY, "buffer", PROPERTY_HINT_NONE), "set_buffer", "get_buffer"); + ADD_PROPERTY(PropertyInfo(Variant::PACKED_FLOAT32_ARRAY, "buffer", PROPERTY_HINT_NONE), "set_buffer", "get_buffer"); #ifndef DISABLE_DEPRECATED // Kept for compatibility from 3.x to 4.0. @@ -363,10 +363,10 @@ void MultiMesh::_bind_methods() { ClassDB::bind_method(D_METHOD("_set_custom_data_array"), &MultiMesh::_set_custom_data_array); ClassDB::bind_method(D_METHOD("_get_custom_data_array"), &MultiMesh::_get_custom_data_array); - ADD_PROPERTY(PropertyInfo(Variant::POOL_VECTOR3_ARRAY, "transform_array", PROPERTY_HINT_NONE, "", 0), "_set_transform_array", "_get_transform_array"); - ADD_PROPERTY(PropertyInfo(Variant::POOL_VECTOR2_ARRAY, "transform_2d_array", PROPERTY_HINT_NONE, "", 0), "_set_transform_2d_array", "_get_transform_2d_array"); - ADD_PROPERTY(PropertyInfo(Variant::POOL_COLOR_ARRAY, "color_array", PROPERTY_HINT_NONE, "", 0), "_set_color_array", "_get_color_array"); - ADD_PROPERTY(PropertyInfo(Variant::POOL_COLOR_ARRAY, "custom_data_array", PROPERTY_HINT_NONE, "", 0), "_set_custom_data_array", "_get_custom_data_array"); + ADD_PROPERTY(PropertyInfo(Variant::PACKED_VECTOR3_ARRAY, "transform_array", PROPERTY_HINT_NONE, "", 0), "_set_transform_array", "_get_transform_array"); + ADD_PROPERTY(PropertyInfo(Variant::PACKED_VECTOR2_ARRAY, "transform_2d_array", PROPERTY_HINT_NONE, "", 0), "_set_transform_2d_array", "_get_transform_2d_array"); + ADD_PROPERTY(PropertyInfo(Variant::PACKED_COLOR_ARRAY, "color_array", PROPERTY_HINT_NONE, "", 0), "_set_color_array", "_get_color_array"); + ADD_PROPERTY(PropertyInfo(Variant::PACKED_COLOR_ARRAY, "custom_data_array", PROPERTY_HINT_NONE, "", 0), "_set_custom_data_array", "_get_custom_data_array"); #endif BIND_ENUM_CONSTANT(TRANSFORM_2D); diff --git a/scene/resources/multimesh.h b/scene/resources/multimesh.h index 5423e66358..8ca30a5b88 100644 --- a/scene/resources/multimesh.h +++ b/scene/resources/multimesh.h @@ -59,20 +59,20 @@ protected: #ifndef DISABLE_DEPRECATED // Kept for compatibility from 3.x to 4.0. - void _set_transform_array(const PoolVector<Vector3> &p_array); - PoolVector<Vector3> _get_transform_array() const; + void _set_transform_array(const Vector<Vector3> &p_array); + Vector<Vector3> _get_transform_array() const; - void _set_transform_2d_array(const PoolVector<Vector2> &p_array); - PoolVector<Vector2> _get_transform_2d_array() const; + void _set_transform_2d_array(const Vector<Vector2> &p_array); + Vector<Vector2> _get_transform_2d_array() const; - void _set_color_array(const PoolVector<Color> &p_array); - PoolVector<Color> _get_color_array() const; + void _set_color_array(const Vector<Color> &p_array); + Vector<Color> _get_color_array() const; - void _set_custom_data_array(const PoolVector<Color> &p_array); - PoolVector<Color> _get_custom_data_array() const; + void _set_custom_data_array(const Vector<Color> &p_array); + Vector<Color> _get_custom_data_array() const; #endif - void set_buffer(const PoolVector<float> &p_buffer); - PoolVector<float> get_buffer() const; + void set_buffer(const Vector<float> &p_buffer); + Vector<float> get_buffer() const; public: void set_mesh(const Ref<Mesh> &p_mesh); diff --git a/scene/resources/navigation_mesh.cpp b/scene/resources/navigation_mesh.cpp index e6544778bc..e0aff2182e 100644 --- a/scene/resources/navigation_mesh.cpp +++ b/scene/resources/navigation_mesh.cpp @@ -32,7 +32,7 @@ void NavigationMesh::create_from_mesh(const Ref<Mesh> &p_mesh) { - vertices = PoolVector<Vector3>(); + vertices = Vector<Vector3>(); clear_polygons(); for (int i = 0; i < p_mesh->get_surface_count(); i++) { @@ -40,15 +40,15 @@ void NavigationMesh::create_from_mesh(const Ref<Mesh> &p_mesh) { if (p_mesh->surface_get_primitive_type(i) != Mesh::PRIMITIVE_TRIANGLES) continue; Array arr = p_mesh->surface_get_arrays(i); - PoolVector<Vector3> varr = arr[Mesh::ARRAY_VERTEX]; - PoolVector<int> iarr = arr[Mesh::ARRAY_INDEX]; + Vector<Vector3> varr = arr[Mesh::ARRAY_VERTEX]; + Vector<int> iarr = arr[Mesh::ARRAY_INDEX]; if (varr.size() == 0 || iarr.size() == 0) continue; int from = vertices.size(); vertices.append_array(varr); int rlen = iarr.size(); - PoolVector<int>::Read r = iarr.read(); + const int *r = iarr.ptr(); for (int j = 0; j < rlen; j += 3) { Vector<int> vi; @@ -252,13 +252,13 @@ bool NavigationMesh::get_filter_walkable_low_height_spans() const { return filter_walkable_low_height_spans; } -void NavigationMesh::set_vertices(const PoolVector<Vector3> &p_vertices) { +void NavigationMesh::set_vertices(const Vector<Vector3> &p_vertices) { vertices = p_vertices; _change_notify(); } -PoolVector<Vector3> NavigationMesh::get_vertices() const { +Vector<Vector3> NavigationMesh::get_vertices() const { return vertices; } @@ -309,8 +309,8 @@ Ref<Mesh> NavigationMesh::get_debug_mesh() { if (debug_mesh.is_valid()) return debug_mesh; - PoolVector<Vector3> vertices = get_vertices(); - PoolVector<Vector3>::Read vr = vertices.read(); + Vector<Vector3> vertices = get_vertices(); + const Vector3 *vr = vertices.ptr(); List<Face3> faces; for (int i = 0; i < get_polygon_count(); i++) { Vector<int> p = get_polygon(i); @@ -326,11 +326,11 @@ Ref<Mesh> NavigationMesh::get_debug_mesh() { } Map<_EdgeKey, bool> edge_map; - PoolVector<Vector3> tmeshfaces; + Vector<Vector3> tmeshfaces; tmeshfaces.resize(faces.size() * 3); { - PoolVector<Vector3>::Write tw = tmeshfaces.write(); + Vector3 *tw = tmeshfaces.ptrw(); int tidx = 0; for (List<Face3>::Element *E = faces.front(); E; E = E->next()) { @@ -369,10 +369,10 @@ Ref<Mesh> NavigationMesh::get_debug_mesh() { } } - PoolVector<Vector3> varr; + Vector<Vector3> varr; varr.resize(lines.size()); { - PoolVector<Vector3>::Write w = varr.write(); + Vector3 *w = varr.ptrw(); int idx = 0; for (List<Vector3>::Element *E = lines.front(); E; E = E->next()) { w[idx++] = E->get(); @@ -478,7 +478,7 @@ void NavigationMesh::_bind_methods() { BIND_CONSTANT(PARSED_GEOMETRY_STATIC_COLLIDERS); BIND_CONSTANT(PARSED_GEOMETRY_BOTH); - ADD_PROPERTY(PropertyInfo(Variant::POOL_VECTOR3_ARRAY, "vertices", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "set_vertices", "get_vertices"); + ADD_PROPERTY(PropertyInfo(Variant::PACKED_VECTOR3_ARRAY, "vertices", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "set_vertices", "get_vertices"); ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "polygons", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_polygons", "_get_polygons"); ADD_PROPERTY(PropertyInfo(Variant::INT, "sample_partition_type/sample_partition_type", PROPERTY_HINT_ENUM, "Watershed,Monotone,Layers"), "set_sample_partition_type", "get_sample_partition_type"); @@ -487,19 +487,19 @@ void NavigationMesh::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::INT, "geometry/source_geometry_mode", PROPERTY_HINT_ENUM, "Navmesh Children, Group With Children, Group Explicit"), "set_source_geometry_mode", "get_source_geometry_mode"); ADD_PROPERTY(PropertyInfo(Variant::STRING, "geometry/source_group_name"), "set_source_group_name", "get_source_group_name"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "cell/size", PROPERTY_HINT_RANGE, "0.1,1.0,0.01,or_greater"), "set_cell_size", "get_cell_size"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "cell/height", PROPERTY_HINT_RANGE, "0.1,1.0,0.01,or_greater"), "set_cell_height", "get_cell_height"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "agent/height", PROPERTY_HINT_RANGE, "0.1,5.0,0.01,or_greater"), "set_agent_height", "get_agent_height"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "agent/radius", PROPERTY_HINT_RANGE, "0.1,5.0,0.01,or_greater"), "set_agent_radius", "get_agent_radius"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "agent/max_climb", PROPERTY_HINT_RANGE, "0.1,5.0,0.01,or_greater"), "set_agent_max_climb", "get_agent_max_climb"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "agent/max_slope", PROPERTY_HINT_RANGE, "0.0,90.0,0.1"), "set_agent_max_slope", "get_agent_max_slope"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "region/min_size", PROPERTY_HINT_RANGE, "0.0,150.0,0.01,or_greater"), "set_region_min_size", "get_region_min_size"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "region/merge_size", PROPERTY_HINT_RANGE, "0.0,150.0,0.01,or_greater"), "set_region_merge_size", "get_region_merge_size"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "edge/max_length", PROPERTY_HINT_RANGE, "0.0,50.0,0.01,or_greater"), "set_edge_max_length", "get_edge_max_length"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "edge/max_error", PROPERTY_HINT_RANGE, "0.1,3.0,0.01,or_greater"), "set_edge_max_error", "get_edge_max_error"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "polygon/verts_per_poly", PROPERTY_HINT_RANGE, "3.0,12.0,1.0,or_greater"), "set_verts_per_poly", "get_verts_per_poly"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "detail/sample_distance", PROPERTY_HINT_RANGE, "0.0,16.0,0.01,or_greater"), "set_detail_sample_distance", "get_detail_sample_distance"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "detail/sample_max_error", PROPERTY_HINT_RANGE, "0.0,16.0,0.01,or_greater"), "set_detail_sample_max_error", "get_detail_sample_max_error"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "cell/size", PROPERTY_HINT_RANGE, "0.1,1.0,0.01,or_greater"), "set_cell_size", "get_cell_size"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "cell/height", PROPERTY_HINT_RANGE, "0.1,1.0,0.01,or_greater"), "set_cell_height", "get_cell_height"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "agent/height", PROPERTY_HINT_RANGE, "0.1,5.0,0.01,or_greater"), "set_agent_height", "get_agent_height"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "agent/radius", PROPERTY_HINT_RANGE, "0.1,5.0,0.01,or_greater"), "set_agent_radius", "get_agent_radius"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "agent/max_climb", PROPERTY_HINT_RANGE, "0.1,5.0,0.01,or_greater"), "set_agent_max_climb", "get_agent_max_climb"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "agent/max_slope", PROPERTY_HINT_RANGE, "0.0,90.0,0.1"), "set_agent_max_slope", "get_agent_max_slope"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "region/min_size", PROPERTY_HINT_RANGE, "0.0,150.0,0.01,or_greater"), "set_region_min_size", "get_region_min_size"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "region/merge_size", PROPERTY_HINT_RANGE, "0.0,150.0,0.01,or_greater"), "set_region_merge_size", "get_region_merge_size"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "edge/max_length", PROPERTY_HINT_RANGE, "0.0,50.0,0.01,or_greater"), "set_edge_max_length", "get_edge_max_length"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "edge/max_error", PROPERTY_HINT_RANGE, "0.1,3.0,0.01,or_greater"), "set_edge_max_error", "get_edge_max_error"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "polygon/verts_per_poly", PROPERTY_HINT_RANGE, "3.0,12.0,1.0,or_greater"), "set_verts_per_poly", "get_verts_per_poly"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "detail/sample_distance", PROPERTY_HINT_RANGE, "0.0,16.0,0.01,or_greater"), "set_detail_sample_distance", "get_detail_sample_distance"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "detail/sample_max_error", PROPERTY_HINT_RANGE, "0.0,16.0,0.01,or_greater"), "set_detail_sample_max_error", "get_detail_sample_max_error"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "filter/low_hanging_obstacles"), "set_filter_low_hanging_obstacles", "get_filter_low_hanging_obstacles"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "filter/ledge_spans"), "set_filter_ledge_spans", "get_filter_ledge_spans"); diff --git a/scene/resources/navigation_mesh.h b/scene/resources/navigation_mesh.h index a2b1c62eab..cc3ac6e3fd 100644 --- a/scene/resources/navigation_mesh.h +++ b/scene/resources/navigation_mesh.h @@ -39,7 +39,7 @@ class NavigationMesh : public Resource { GDCLASS(NavigationMesh, Resource); - PoolVector<Vector3> vertices; + Vector<Vector3> vertices; struct Polygon { Vector<int> indices; }; @@ -179,8 +179,8 @@ public: void create_from_mesh(const Ref<Mesh> &p_mesh); - void set_vertices(const PoolVector<Vector3> &p_vertices); - PoolVector<Vector3> get_vertices() const; + void set_vertices(const Vector<Vector3> &p_vertices); + Vector<Vector3> get_vertices() const; void add_polygon(const Vector<int> &p_polygon); int get_polygon_count() const; diff --git a/scene/resources/packed_scene.cpp b/scene/resources/packed_scene.cpp index 3e7d350eec..00910095c7 100644 --- a/scene/resources/packed_scene.cpp +++ b/scene/resources/packed_scene.cpp @@ -331,7 +331,7 @@ Node *SceneState::instance(GenEditState p_edit_state) const { binds.write[j] = props[c.binds[j]]; } - cfrom->connect(snames[c.signal], cto, snames[c.method], binds, CONNECT_PERSIST | c.flags); + cfrom->connect_compat(snames[c.signal], cto, snames[c.method], binds, CONNECT_PERSIST | c.flags); } //Node *s = ret_nodes[0]; @@ -532,7 +532,7 @@ Error SceneState::_parse_node(Node *p_owner, Node *p_node, int p_parent_idx, Map if (exists) { //check if already exists and did not change - if (value.get_type() == Variant::REAL && original.get_type() == Variant::REAL) { + if (value.get_type() == Variant::FLOAT && original.get_type() == Variant::FLOAT) { //this must be done because, as some scenes save as text, there might be a tiny difference in floats due to numerical error float a = value; float b = original; @@ -702,7 +702,7 @@ Error SceneState::_parse_connections(Node *p_owner, Node *p_node, Map<StringName // only connections that originate or end into main saved scene are saved // everything else is discarded - Node *target = Object::cast_to<Node>(c.target); + Node *target = Object::cast_to<Node>(c.callable.get_object()); if (!target) { continue; @@ -734,7 +734,7 @@ Error SceneState::_parse_connections(Node *p_owner, Node *p_node, Map<StringName NodePath signal_from = common_parent->get_path_to(p_node); NodePath signal_to = common_parent->get_path_to(target); - if (ps->has_connection(signal_from, c.signal, signal_to, c.method)) { + if (ps->has_connection(signal_from, c.signal.get_name(), signal_to, c.callable.get_method())) { exists = true; break; } @@ -766,7 +766,7 @@ Error SceneState::_parse_connections(Node *p_owner, Node *p_node, Map<StringName if (from_node >= 0 && to_node >= 0) { //this one has state for this node, save - if (state->is_connection(from_node, c.signal, to_node, c.method)) { + if (state->is_connection(from_node, c.signal.get_name(), to_node, c.callable.get_method())) { exists2 = true; break; } @@ -784,7 +784,7 @@ Error SceneState::_parse_connections(Node *p_owner, Node *p_node, Map<StringName if (from_node >= 0 && to_node >= 0) { //this one has state for this node, save - if (state->is_connection(from_node, c.signal, to_node, c.method)) { + if (state->is_connection(from_node, c.signal.get_name(), to_node, c.callable.get_method())) { exists2 = true; break; } @@ -831,8 +831,8 @@ Error SceneState::_parse_connections(Node *p_owner, Node *p_node, Map<StringName ConnectionData cd; cd.from = src_id; cd.to = target_id; - cd.method = _nm_get_string(c.method, name_map); - cd.signal = _nm_get_string(c.signal, name_map); + cd.method = _nm_get_string(c.callable.get_method(), name_map); + cd.signal = _nm_get_string(c.signal.get_name(), name_map); cd.flags = c.flags; for (int i = 0; i < c.binds.size(); i++) { @@ -1098,19 +1098,19 @@ void SceneState::set_bundled_scene(const Dictionary &p_dictionary) { ERR_FAIL_COND_MSG(version > PACKED_SCENE_VERSION, "Save format version too new."); const int node_count = p_dictionary["node_count"]; - const PoolVector<int> snodes = p_dictionary["nodes"]; + const Vector<int> snodes = p_dictionary["nodes"]; ERR_FAIL_COND(snodes.size() < node_count); const int conn_count = p_dictionary["conn_count"]; - const PoolVector<int> sconns = p_dictionary["conns"]; + const Vector<int> sconns = p_dictionary["conns"]; ERR_FAIL_COND(sconns.size() < conn_count); - PoolVector<String> snames = p_dictionary["names"]; + Vector<String> snames = p_dictionary["names"]; if (snames.size()) { int namecount = snames.size(); names.resize(namecount); - PoolVector<String>::Read r = snames.read(); + const String *r = snames.ptr(); for (int i = 0; i < names.size(); i++) names.write[i] = r[i]; } @@ -1131,7 +1131,7 @@ void SceneState::set_bundled_scene(const Dictionary &p_dictionary) { nodes.resize(node_count); if (node_count) { - PoolVector<int>::Read r = snodes.read(); + const int *r = snodes.ptr(); int idx = 0; for (int i = 0; i < node_count; i++) { NodeData &nd = nodes.write[i]; @@ -1159,7 +1159,7 @@ void SceneState::set_bundled_scene(const Dictionary &p_dictionary) { connections.resize(conn_count); if (conn_count) { - PoolVector<int>::Read r = sconns.read(); + const int *r = sconns.ptr(); int idx = 0; for (int i = 0; i < conn_count; i++) { ConnectionData &cd = connections.write[i]; @@ -1205,12 +1205,12 @@ void SceneState::set_bundled_scene(const Dictionary &p_dictionary) { Dictionary SceneState::get_bundled_scene() const { - PoolVector<String> rnames; + Vector<String> rnames; rnames.resize(names.size()); if (names.size()) { - PoolVector<String>::Write r = rnames.write(); + String *r = rnames.ptrw(); for (int i = 0; i < names.size(); i++) r[i] = names[i]; @@ -1612,10 +1612,10 @@ void SceneState::add_editable_instance(const NodePath &p_path) { editable_instances.push_back(p_path); } -PoolVector<String> SceneState::_get_node_groups(int p_idx) const { +Vector<String> SceneState::_get_node_groups(int p_idx) const { Vector<StringName> groups = get_node_groups(p_idx); - PoolVector<String> ret; + Vector<String> ret; for (int i = 0; i < groups.size(); i++) ret.push_back(groups[i]); diff --git a/scene/resources/packed_scene.h b/scene/resources/packed_scene.h index b4966e2528..c5873a0792 100644 --- a/scene/resources/packed_scene.h +++ b/scene/resources/packed_scene.h @@ -103,7 +103,7 @@ class SceneState : public Reference { static bool disable_placeholders; - PoolVector<String> _get_node_groups(int p_idx) const; + Vector<String> _get_node_groups(int p_idx) const; int _find_base_scene_node_remap_key(int p_idx) const; diff --git a/scene/resources/particles_material.cpp b/scene/resources/particles_material.cpp index d852dca7fa..e820aec2ed 100644 --- a/scene/resources/particles_material.cpp +++ b/scene/resources/particles_material.cpp @@ -189,7 +189,7 @@ void ParticlesMaterial::_update_shader() { } break; case EMISSION_SHAPE_DIRECTED_POINTS: { code += "uniform sampler2D emission_texture_normal : hint_black;\n"; - FALLTHROUGH; + [[fallthrough]]; } case EMISSION_SHAPE_POINTS: { code += "uniform sampler2D emission_texture_points : hint_black;\n"; @@ -1153,14 +1153,14 @@ void ParticlesMaterial::_bind_methods() { ClassDB::bind_method(D_METHOD("get_lifetime_randomness"), &ParticlesMaterial::get_lifetime_randomness); ADD_GROUP("Time", ""); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "lifetime_randomness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_lifetime_randomness", "get_lifetime_randomness"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "lifetime_randomness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_lifetime_randomness", "get_lifetime_randomness"); ADD_GROUP("Trail", "trail_"); ADD_PROPERTY(PropertyInfo(Variant::INT, "trail_divisor", PROPERTY_HINT_RANGE, "1,1000000,1"), "set_trail_divisor", "get_trail_divisor"); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "trail_size_modifier", PROPERTY_HINT_RESOURCE_TYPE, "CurveTexture"), "set_trail_size_modifier", "get_trail_size_modifier"); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "trail_color_modifier", PROPERTY_HINT_RESOURCE_TYPE, "GradientTexture"), "set_trail_color_modifier", "get_trail_color_modifier"); ADD_GROUP("Emission Shape", "emission_"); ADD_PROPERTY(PropertyInfo(Variant::INT, "emission_shape", PROPERTY_HINT_ENUM, "Point,Sphere,Box,Points,Directed Points"), "set_emission_shape", "get_emission_shape"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "emission_sphere_radius", PROPERTY_HINT_RANGE, "0.01,128,0.01,or_greater"), "set_emission_sphere_radius", "get_emission_sphere_radius"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "emission_sphere_radius", PROPERTY_HINT_RANGE, "0.01,128,0.01,or_greater"), "set_emission_sphere_radius", "get_emission_sphere_radius"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "emission_box_extents"), "set_emission_box_extents", "get_emission_box_extents"); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "emission_point_texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"), "set_emission_point_texture", "get_emission_point_texture"); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "emission_normal_texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"), "set_emission_normal_texture", "get_emission_normal_texture"); @@ -1172,59 +1172,59 @@ void ParticlesMaterial::_bind_methods() { ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "flag_disable_z"), "set_flag", "get_flag", FLAG_DISABLE_Z); ADD_GROUP("Direction", ""); ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "direction"), "set_direction", "get_direction"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "spread", PROPERTY_HINT_RANGE, "0,180,0.01"), "set_spread", "get_spread"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "flatness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_flatness", "get_flatness"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "spread", PROPERTY_HINT_RANGE, "0,180,0.01"), "set_spread", "get_spread"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "flatness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_flatness", "get_flatness"); ADD_GROUP("Gravity", ""); ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "gravity"), "set_gravity", "get_gravity"); ADD_GROUP("Initial Velocity", "initial_"); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "initial_velocity", PROPERTY_HINT_RANGE, "0,1000,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_INITIAL_LINEAR_VELOCITY); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "initial_velocity_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_INITIAL_LINEAR_VELOCITY); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "initial_velocity", PROPERTY_HINT_RANGE, "0,1000,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_INITIAL_LINEAR_VELOCITY); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "initial_velocity_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_INITIAL_LINEAR_VELOCITY); ADD_GROUP("Angular Velocity", "angular_"); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_velocity", PROPERTY_HINT_RANGE, "-720,720,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_ANGULAR_VELOCITY); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_velocity_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANGULAR_VELOCITY); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_velocity", PROPERTY_HINT_RANGE, "-720,720,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_ANGULAR_VELOCITY); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_velocity_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANGULAR_VELOCITY); ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "angular_velocity_curve", PROPERTY_HINT_RESOURCE_TYPE, "CurveTexture"), "set_param_texture", "get_param_texture", PARAM_ANGULAR_VELOCITY); ADD_GROUP("Orbit Velocity", "orbit_"); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "orbit_velocity", PROPERTY_HINT_RANGE, "-1000,1000,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_ORBIT_VELOCITY); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "orbit_velocity_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ORBIT_VELOCITY); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "orbit_velocity", PROPERTY_HINT_RANGE, "-1000,1000,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_ORBIT_VELOCITY); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "orbit_velocity_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ORBIT_VELOCITY); ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "orbit_velocity_curve", PROPERTY_HINT_RESOURCE_TYPE, "CurveTexture"), "set_param_texture", "get_param_texture", PARAM_ORBIT_VELOCITY); ADD_GROUP("Linear Accel", "linear_"); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_accel", PROPERTY_HINT_RANGE, "-100,100,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_LINEAR_ACCEL); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_accel_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_LINEAR_ACCEL); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_accel", PROPERTY_HINT_RANGE, "-100,100,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_LINEAR_ACCEL); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_accel_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_LINEAR_ACCEL); ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "linear_accel_curve", PROPERTY_HINT_RESOURCE_TYPE, "CurveTexture"), "set_param_texture", "get_param_texture", PARAM_LINEAR_ACCEL); ADD_GROUP("Radial Accel", "radial_"); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "radial_accel", PROPERTY_HINT_RANGE, "-100,100,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_RADIAL_ACCEL); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "radial_accel_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_RADIAL_ACCEL); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "radial_accel", PROPERTY_HINT_RANGE, "-100,100,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_RADIAL_ACCEL); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "radial_accel_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_RADIAL_ACCEL); ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "radial_accel_curve", PROPERTY_HINT_RESOURCE_TYPE, "CurveTexture"), "set_param_texture", "get_param_texture", PARAM_RADIAL_ACCEL); ADD_GROUP("Tangential Accel", "tangential_"); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "tangential_accel", PROPERTY_HINT_RANGE, "-100,100,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_TANGENTIAL_ACCEL); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "tangential_accel_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_TANGENTIAL_ACCEL); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "tangential_accel", PROPERTY_HINT_RANGE, "-100,100,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_TANGENTIAL_ACCEL); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "tangential_accel_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_TANGENTIAL_ACCEL); ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "tangential_accel_curve", PROPERTY_HINT_RESOURCE_TYPE, "CurveTexture"), "set_param_texture", "get_param_texture", PARAM_TANGENTIAL_ACCEL); ADD_GROUP("Damping", ""); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "damping", PROPERTY_HINT_RANGE, "0,100,0.01,or_greater"), "set_param", "get_param", PARAM_DAMPING); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "damping_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_DAMPING); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "damping", PROPERTY_HINT_RANGE, "0,100,0.01,or_greater"), "set_param", "get_param", PARAM_DAMPING); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "damping_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_DAMPING); ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "damping_curve", PROPERTY_HINT_RESOURCE_TYPE, "CurveTexture"), "set_param_texture", "get_param_texture", PARAM_DAMPING); ADD_GROUP("Angle", ""); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angle", PROPERTY_HINT_RANGE, "-720,720,0.1,or_lesser,or_greater"), "set_param", "get_param", PARAM_ANGLE); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angle_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANGLE); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angle", PROPERTY_HINT_RANGE, "-720,720,0.1,or_lesser,or_greater"), "set_param", "get_param", PARAM_ANGLE); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angle_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANGLE); ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "angle_curve", PROPERTY_HINT_RESOURCE_TYPE, "CurveTexture"), "set_param_texture", "get_param_texture", PARAM_ANGLE); ADD_GROUP("Scale", ""); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "scale", PROPERTY_HINT_RANGE, "0,1000,0.01,or_greater"), "set_param", "get_param", PARAM_SCALE); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "scale_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_SCALE); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "scale", PROPERTY_HINT_RANGE, "0,1000,0.01,or_greater"), "set_param", "get_param", PARAM_SCALE); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "scale_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_SCALE); ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "scale_curve", PROPERTY_HINT_RESOURCE_TYPE, "CurveTexture"), "set_param_texture", "get_param_texture", PARAM_SCALE); ADD_GROUP("Color", ""); ADD_PROPERTY(PropertyInfo(Variant::COLOR, "color"), "set_color", "get_color"); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "color_ramp", PROPERTY_HINT_RESOURCE_TYPE, "GradientTexture"), "set_color_ramp", "get_color_ramp"); ADD_GROUP("Hue Variation", "hue_"); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "hue_variation", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_param", "get_param", PARAM_HUE_VARIATION); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "hue_variation_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_HUE_VARIATION); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "hue_variation", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_param", "get_param", PARAM_HUE_VARIATION); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "hue_variation_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_HUE_VARIATION); ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "hue_variation_curve", PROPERTY_HINT_RESOURCE_TYPE, "CurveTexture"), "set_param_texture", "get_param_texture", PARAM_HUE_VARIATION); ADD_GROUP("Animation", "anim_"); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "anim_speed", PROPERTY_HINT_RANGE, "0,128,0.01,or_greater"), "set_param", "get_param", PARAM_ANIM_SPEED); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "anim_speed_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANIM_SPEED); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "anim_speed", PROPERTY_HINT_RANGE, "0,128,0.01,or_greater"), "set_param", "get_param", PARAM_ANIM_SPEED); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "anim_speed_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANIM_SPEED); ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "anim_speed_curve", PROPERTY_HINT_RESOURCE_TYPE, "CurveTexture"), "set_param_texture", "get_param_texture", PARAM_ANIM_SPEED); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "anim_offset", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param", "get_param", PARAM_ANIM_OFFSET); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "anim_offset_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANIM_OFFSET); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "anim_offset", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param", "get_param", PARAM_ANIM_OFFSET); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "anim_offset_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANIM_OFFSET); ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "anim_offset_curve", PROPERTY_HINT_RESOURCE_TYPE, "CurveTexture"), "set_param_texture", "get_param_texture", PARAM_ANIM_OFFSET); BIND_ENUM_CONSTANT(PARAM_INITIAL_LINEAR_VELOCITY); diff --git a/scene/resources/physics_material.cpp b/scene/resources/physics_material.cpp index 0db115ecc0..8ac0191452 100644 --- a/scene/resources/physics_material.cpp +++ b/scene/resources/physics_material.cpp @@ -44,9 +44,9 @@ void PhysicsMaterial::_bind_methods() { ClassDB::bind_method(D_METHOD("set_absorbent", "absorbent"), &PhysicsMaterial::set_absorbent); ClassDB::bind_method(D_METHOD("is_absorbent"), &PhysicsMaterial::is_absorbent); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "friction"), "set_friction", "get_friction"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "friction"), "set_friction", "get_friction"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "rough"), "set_rough", "is_rough"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "bounce"), "set_bounce", "get_bounce"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "bounce"), "set_bounce", "get_bounce"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "absorbent"), "set_absorbent", "is_absorbent"); } diff --git a/scene/resources/polygon_path_finder.cpp b/scene/resources/polygon_path_finder.cpp index 9a1d478777..eff0721cef 100644 --- a/scene/resources/polygon_path_finder.cpp +++ b/scene/resources/polygon_path_finder.cpp @@ -415,7 +415,7 @@ void PolygonPathFinder::_set_data(const Dictionary &p_data) { ERR_FAIL_COND(!p_data.has("segments")); ERR_FAIL_COND(!p_data.has("bounds")); - PoolVector<Vector2> p = p_data["points"]; + Vector<Vector2> p = p_data["points"]; Array c = p_data["connections"]; ERR_FAIL_COND(c.size() != p.size()); @@ -425,11 +425,11 @@ void PolygonPathFinder::_set_data(const Dictionary &p_data) { int pc = p.size(); points.resize(pc + 2); - PoolVector<Vector2>::Read pr = p.read(); + const Vector2 *pr = p.ptr(); for (int i = 0; i < pc; i++) { points.write[i].pos = pr[i]; - PoolVector<int> con = c[i]; - PoolVector<int>::Read cr = con.read(); + Vector<int> con = c[i]; + const int *cr = con.ptr(); int cc = con.size(); for (int j = 0; j < cc; j++) { @@ -439,19 +439,19 @@ void PolygonPathFinder::_set_data(const Dictionary &p_data) { if (p_data.has("penalties")) { - PoolVector<float> penalties = p_data["penalties"]; + Vector<float> penalties = p_data["penalties"]; if (penalties.size() == pc) { - PoolVector<float>::Read pr2 = penalties.read(); + const float *pr2 = penalties.ptr(); for (int i = 0; i < pc; i++) { points.write[i].penalty = pr2[i]; } } } - PoolVector<int> segs = p_data["segments"]; + Vector<int> segs = p_data["segments"]; int sc = segs.size(); ERR_FAIL_COND(sc & 1); - PoolVector<int>::Read sr = segs.read(); + const int *sr = segs.ptr(); for (int i = 0; i < sc; i += 2) { Edge e(sr[i], sr[i + 1]); @@ -463,25 +463,25 @@ void PolygonPathFinder::_set_data(const Dictionary &p_data) { Dictionary PolygonPathFinder::_get_data() const { Dictionary d; - PoolVector<Vector2> p; - PoolVector<int> ind; + Vector<Vector2> p; + Vector<int> ind; Array connections; p.resize(MAX(0, points.size() - 2)); connections.resize(MAX(0, points.size() - 2)); ind.resize(edges.size() * 2); - PoolVector<float> penalties; + Vector<float> penalties; penalties.resize(MAX(0, points.size() - 2)); { - PoolVector<Vector2>::Write wp = p.write(); - PoolVector<float>::Write pw = penalties.write(); + Vector2 *wp = p.ptrw(); + float *pw = penalties.ptrw(); for (int i = 0; i < points.size() - 2; i++) { wp[i] = points[i].pos; pw[i] = points[i].penalty; - PoolVector<int> c; + Vector<int> c; c.resize(points[i].connections.size()); { - PoolVector<int>::Write cw = c.write(); + int *cw = c.ptrw(); int idx = 0; for (Set<int>::Element *E = points[i].connections.front(); E; E = E->next()) { cw[idx++] = E->get(); @@ -492,7 +492,7 @@ Dictionary PolygonPathFinder::_get_data() const { } { - PoolVector<int>::Write iw = ind.write(); + int *iw = ind.ptrw(); int idx = 0; for (Set<Edge>::Element *E = edges.front(); E; E = E->next()) { iw[idx++] = E->get().points[0]; diff --git a/scene/resources/primitive_meshes.cpp b/scene/resources/primitive_meshes.cpp index fa0ded12a1..00fc016ca1 100644 --- a/scene/resources/primitive_meshes.cpp +++ b/scene/resources/primitive_meshes.cpp @@ -40,7 +40,7 @@ void PrimitiveMesh::_update() const { arr.resize(VS::ARRAY_MAX); _create_mesh_array(arr); - PoolVector<Vector3> points = arr[VS::ARRAY_VERTEX]; + Vector<Vector3> points = arr[VS::ARRAY_VERTEX]; aabb = AABB(); @@ -48,7 +48,7 @@ void PrimitiveMesh::_update() const { ERR_FAIL_COND(pc == 0); { - PoolVector<Vector3>::Read r = points.read(); + const Vector3 *r = points.ptr(); for (int i = 0; i < pc; i++) { if (i == 0) aabb.position = r[i]; @@ -57,16 +57,16 @@ void PrimitiveMesh::_update() const { } } - PoolVector<int> indices = arr[VS::ARRAY_INDEX]; + Vector<int> indices = arr[VS::ARRAY_INDEX]; if (flip_faces) { - PoolVector<Vector3> normals = arr[VS::ARRAY_NORMAL]; + Vector<Vector3> normals = arr[VS::ARRAY_NORMAL]; if (normals.size() && indices.size()) { { int nc = normals.size(); - PoolVector<Vector3>::Write w = normals.write(); + Vector3 *w = normals.ptrw(); for (int i = 0; i < nc; i++) { w[i] = -w[i]; } @@ -74,7 +74,7 @@ void PrimitiveMesh::_update() const { { int ic = indices.size(); - PoolVector<int>::Write w = indices.write(); + int *w = indices.ptrw(); for (int i = 0; i < ic; i += 3) { SWAP(w[i + 0], w[i + 1]); } @@ -282,11 +282,11 @@ void CapsuleMesh::_create_mesh_array(Array &p_arr) const { // note, this has been aligned with our collision shape but I've left the descriptions as top/middle/bottom - PoolVector<Vector3> points; - PoolVector<Vector3> normals; - PoolVector<float> tangents; - PoolVector<Vector2> uvs; - PoolVector<int> indices; + Vector<Vector3> points; + Vector<Vector3> normals; + Vector<float> tangents; + Vector<Vector2> uvs; + Vector<int> indices; point = 0; #define ADD_TANGENT(m_x, m_y, m_z, m_d) \ @@ -303,19 +303,19 @@ void CapsuleMesh::_create_mesh_array(Array &p_arr) const { v /= (rings + 1); w = sin(0.5 * Math_PI * v); - z = radius * cos(0.5 * Math_PI * v); + y = radius * cos(0.5 * Math_PI * v); for (i = 0; i <= radial_segments; i++) { u = i; u /= radial_segments; - x = sin(u * (Math_PI * 2.0)); - y = -cos(u * (Math_PI * 2.0)); + x = -sin(u * (Math_PI * 2.0)); + z = cos(u * (Math_PI * 2.0)); - Vector3 p = Vector3(x * radius * w, y * radius * w, z); - points.push_back(p + Vector3(0.0, 0.0, 0.5 * mid_height)); + Vector3 p = Vector3(x * radius * w, y, -z * radius * w); + points.push_back(p + Vector3(0.0, 0.5 * mid_height, 0.0)); normals.push_back(p.normalized()); - ADD_TANGENT(-y, x, 0.0, 1.0) + ADD_TANGENT(z, 0.0, x, 1.0) uvs.push_back(Vector2(u, v * onethird)); point++; @@ -341,20 +341,20 @@ void CapsuleMesh::_create_mesh_array(Array &p_arr) const { v = j; v /= (rings + 1); - z = mid_height * v; - z = (mid_height * 0.5) - z; + y = mid_height * v; + y = (mid_height * 0.5) - y; for (i = 0; i <= radial_segments; i++) { u = i; u /= radial_segments; - x = sin(u * (Math_PI * 2.0)); - y = -cos(u * (Math_PI * 2.0)); + x = -sin(u * (Math_PI * 2.0)); + z = cos(u * (Math_PI * 2.0)); - Vector3 p = Vector3(x * radius, y * radius, z); + Vector3 p = Vector3(x * radius, y, -z * radius); points.push_back(p); - normals.push_back(Vector3(x, y, 0.0)); - ADD_TANGENT(-y, x, 0.0, 1.0) + normals.push_back(Vector3(x, 0.0, -z)); + ADD_TANGENT(z, 0.0, x, 1.0) uvs.push_back(Vector2(u, onethird + (v * onethird))); point++; @@ -382,19 +382,19 @@ void CapsuleMesh::_create_mesh_array(Array &p_arr) const { v /= (rings + 1); v += 1.0; w = sin(0.5 * Math_PI * v); - z = radius * cos(0.5 * Math_PI * v); + y = radius * cos(0.5 * Math_PI * v); for (i = 0; i <= radial_segments; i++) { float u2 = i; u2 /= radial_segments; - x = sin(u2 * (Math_PI * 2.0)); - y = -cos(u2 * (Math_PI * 2.0)); + x = -sin(u2 * (Math_PI * 2.0)); + z = cos(u2 * (Math_PI * 2.0)); - Vector3 p = Vector3(x * radius * w, y * radius * w, z); - points.push_back(p + Vector3(0.0, 0.0, -0.5 * mid_height)); + Vector3 p = Vector3(x * radius * w, y, -z * radius * w); + points.push_back(p + Vector3(0.0, -0.5 * mid_height, 0.0)); normals.push_back(p.normalized()); - ADD_TANGENT(-y, x, 0.0, 1.0) + ADD_TANGENT(z, 0.0, x, 1.0) uvs.push_back(Vector2(u2, twothirds + ((v - 1.0) * onethird))); point++; @@ -431,8 +431,8 @@ void CapsuleMesh::_bind_methods() { ClassDB::bind_method(D_METHOD("set_rings", "rings"), &CapsuleMesh::set_rings); ClassDB::bind_method(D_METHOD("get_rings"), &CapsuleMesh::get_rings); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "radius", PROPERTY_HINT_RANGE, "0.001,100.0,0.001,or_greater"), "set_radius", "get_radius"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "mid_height", PROPERTY_HINT_RANGE, "0.001,100.0,0.001,or_greater"), "set_mid_height", "get_mid_height"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "radius", PROPERTY_HINT_RANGE, "0.001,100.0,0.001,or_greater"), "set_radius", "get_radius"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "mid_height", PROPERTY_HINT_RANGE, "0.001,100.0,0.001,or_greater"), "set_mid_height", "get_mid_height"); ADD_PROPERTY(PropertyInfo(Variant::INT, "radial_segments", PROPERTY_HINT_RANGE, "1,100,1,or_greater"), "set_radial_segments", "get_radial_segments"); ADD_PROPERTY(PropertyInfo(Variant::INT, "rings", PROPERTY_HINT_RANGE, "1,100,1,or_greater"), "set_rings", "get_rings"); } @@ -495,11 +495,11 @@ void CubeMesh::_create_mesh_array(Array &p_arr) const { // set our bounding box - PoolVector<Vector3> points; - PoolVector<Vector3> normals; - PoolVector<float> tangents; - PoolVector<Vector2> uvs; - PoolVector<int> indices; + Vector<Vector3> points; + Vector<Vector3> normals; + Vector<float> tangents; + Vector<Vector2> uvs; + Vector<int> indices; point = 0; #define ADD_TANGENT(m_x, m_y, m_z, m_d) \ @@ -746,11 +746,11 @@ void CylinderMesh::_create_mesh_array(Array &p_arr) const { int i, j, prevrow, thisrow, point; float x, y, z, u, v, radius; - PoolVector<Vector3> points; - PoolVector<Vector3> normals; - PoolVector<float> tangents; - PoolVector<Vector2> uvs; - PoolVector<int> indices; + Vector<Vector3> points; + Vector<Vector3> normals; + Vector<float> tangents; + Vector<Vector2> uvs; + Vector<int> indices; point = 0; #define ADD_TANGENT(m_x, m_y, m_z, m_d) \ @@ -891,9 +891,9 @@ void CylinderMesh::_bind_methods() { ClassDB::bind_method(D_METHOD("set_rings", "rings"), &CylinderMesh::set_rings); ClassDB::bind_method(D_METHOD("get_rings"), &CylinderMesh::get_rings); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "top_radius", PROPERTY_HINT_RANGE, "0.001,100.0,0.001,or_greater"), "set_top_radius", "get_top_radius"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "bottom_radius", PROPERTY_HINT_RANGE, "0.001,100.0,0.001,or_greater"), "set_bottom_radius", "get_bottom_radius"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "height", PROPERTY_HINT_RANGE, "0.001,100.0,0.001,or_greater"), "set_height", "get_height"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "top_radius", PROPERTY_HINT_RANGE, "0.001,100.0,0.001,or_greater"), "set_top_radius", "get_top_radius"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "bottom_radius", PROPERTY_HINT_RANGE, "0.001,100.0,0.001,or_greater"), "set_bottom_radius", "get_bottom_radius"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "height", PROPERTY_HINT_RANGE, "0.001,100.0,0.001,or_greater"), "set_height", "get_height"); ADD_PROPERTY(PropertyInfo(Variant::INT, "radial_segments", PROPERTY_HINT_RANGE, "1,100,1,or_greater"), "set_radial_segments", "get_radial_segments"); ADD_PROPERTY(PropertyInfo(Variant::INT, "rings", PROPERTY_HINT_RANGE, "1,100,1,or_greater"), "set_rings", "get_rings"); } @@ -962,11 +962,11 @@ void PlaneMesh::_create_mesh_array(Array &p_arr) const { Size2 start_pos = size * -0.5; - PoolVector<Vector3> points; - PoolVector<Vector3> normals; - PoolVector<float> tangents; - PoolVector<Vector2> uvs; - PoolVector<int> indices; + Vector<Vector3> points; + Vector<Vector3> normals; + Vector<float> tangents; + Vector<Vector2> uvs; + Vector<int> indices; point = 0; #define ADD_TANGENT(m_x, m_y, m_z, m_d) \ @@ -1079,11 +1079,11 @@ void PrismMesh::_create_mesh_array(Array &p_arr) const { // set our bounding box - PoolVector<Vector3> points; - PoolVector<Vector3> normals; - PoolVector<float> tangents; - PoolVector<Vector2> uvs; - PoolVector<int> indices; + Vector<Vector3> points; + Vector<Vector3> normals; + Vector<float> tangents; + Vector<Vector2> uvs; + Vector<int> indices; point = 0; #define ADD_TANGENT(m_x, m_y, m_z, m_d) \ @@ -1291,7 +1291,7 @@ void PrismMesh::_bind_methods() { ClassDB::bind_method(D_METHOD("set_subdivide_depth", "segments"), &PrismMesh::set_subdivide_depth); ClassDB::bind_method(D_METHOD("get_subdivide_depth"), &PrismMesh::get_subdivide_depth); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "left_to_right", PROPERTY_HINT_RANGE, "-2.0,2.0,0.1"), "set_left_to_right", "get_left_to_right"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "left_to_right", PROPERTY_HINT_RANGE, "-2.0,2.0,0.1"), "set_left_to_right", "get_left_to_right"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "size"), "set_size", "get_size"); ADD_PROPERTY(PropertyInfo(Variant::INT, "subdivide_width", PROPERTY_HINT_RANGE, "0,100,1,or_greater"), "set_subdivide_width", "get_subdivide_width"); ADD_PROPERTY(PropertyInfo(Variant::INT, "subdivide_height", PROPERTY_HINT_RANGE, "0,100,1,or_greater"), "set_subdivide_height", "get_subdivide_height"); @@ -1357,10 +1357,10 @@ PrismMesh::PrismMesh() { */ void QuadMesh::_create_mesh_array(Array &p_arr) const { - PoolVector<Vector3> faces; - PoolVector<Vector3> normals; - PoolVector<float> tangents; - PoolVector<Vector2> uvs; + Vector<Vector3> faces; + Vector<Vector3> normals; + Vector<float> tangents; + Vector<Vector2> uvs; faces.resize(6); normals.resize(6); @@ -1437,11 +1437,11 @@ void SphereMesh::_create_mesh_array(Array &p_arr) const { // set our bounding box - PoolVector<Vector3> points; - PoolVector<Vector3> normals; - PoolVector<float> tangents; - PoolVector<Vector2> uvs; - PoolVector<int> indices; + Vector<Vector3> points; + Vector<Vector3> normals; + Vector<float> tangents; + Vector<Vector2> uvs; + Vector<int> indices; point = 0; #define ADD_TANGENT(m_x, m_y, m_z, m_d) \ @@ -1515,8 +1515,8 @@ void SphereMesh::_bind_methods() { ClassDB::bind_method(D_METHOD("set_is_hemisphere", "is_hemisphere"), &SphereMesh::set_is_hemisphere); ClassDB::bind_method(D_METHOD("get_is_hemisphere"), &SphereMesh::get_is_hemisphere); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "radius", PROPERTY_HINT_RANGE, "0.001,100.0,0.001,or_greater"), "set_radius", "get_radius"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "height", PROPERTY_HINT_RANGE, "0.001,100.0,0.001,or_greater"), "set_height", "get_height"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "radius", PROPERTY_HINT_RANGE, "0.001,100.0,0.001,or_greater"), "set_radius", "get_radius"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "height", PROPERTY_HINT_RANGE, "0.001,100.0,0.001,or_greater"), "set_height", "get_height"); ADD_PROPERTY(PropertyInfo(Variant::INT, "radial_segments", PROPERTY_HINT_RANGE, "1,100,1,or_greater"), "set_radial_segments", "get_radial_segments"); ADD_PROPERTY(PropertyInfo(Variant::INT, "rings", PROPERTY_HINT_RANGE, "1,100,1,or_greater"), "set_rings", "get_rings"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "is_hemisphere"), "set_is_hemisphere", "get_is_hemisphere"); @@ -1581,7 +1581,7 @@ SphereMesh::SphereMesh() { */ void PointMesh::_create_mesh_array(Array &p_arr) const { - PoolVector<Vector3> faces; + Vector<Vector3> faces; faces.resize(1); faces.set(0, Vector3(0.0, 0.0, 0.0)); diff --git a/scene/resources/ray_shape.cpp b/scene/resources/ray_shape.cpp index 1a9b7e6dd2..906abaf60c 100644 --- a/scene/resources/ray_shape.cpp +++ b/scene/resources/ray_shape.cpp @@ -87,7 +87,7 @@ void RayShape::_bind_methods() { ClassDB::bind_method(D_METHOD("set_slips_on_slope", "active"), &RayShape::set_slips_on_slope); ClassDB::bind_method(D_METHOD("get_slips_on_slope"), &RayShape::get_slips_on_slope); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "length", PROPERTY_HINT_RANGE, "0,4096,0.01"), "set_length", "get_length"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "length", PROPERTY_HINT_RANGE, "0,4096,0.01"), "set_length", "get_length"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "slips_on_slope"), "set_slips_on_slope", "get_slips_on_slope"); } diff --git a/scene/resources/resource_format_text.cpp b/scene/resources/resource_format_text.cpp index 9779f9c9ca..956cc0bc4a 100644 --- a/scene/resources/resource_format_text.cpp +++ b/scene/resources/resource_format_text.cpp @@ -35,7 +35,7 @@ #include "core/project_settings.h" #include "core/version.h" -//version 2: changed names for basis, aabb, poolvectors, etc. +//version 2: changed names for basis, aabb, Vectors, etc. #define FORMAT_VERSION 2 #include "core/os/dir_access.h" @@ -1377,7 +1377,7 @@ void ResourceFormatSaverTextInstance::_find_resources(const Variant &p_variant, switch (p_variant.get_type()) { case Variant::OBJECT: { - RES res = p_variant.operator RefPtr(); + RES res = p_variant; if (res.is_null() || external_resources.has(res)) return; diff --git a/scene/resources/segment_shape_2d.cpp b/scene/resources/segment_shape_2d.cpp index 3094d0f9bd..2e78a4fccf 100644 --- a/scene/resources/segment_shape_2d.cpp +++ b/scene/resources/segment_shape_2d.cpp @@ -154,7 +154,7 @@ void RayShape2D::_bind_methods() { ClassDB::bind_method(D_METHOD("set_slips_on_slope", "active"), &RayShape2D::set_slips_on_slope); ClassDB::bind_method(D_METHOD("get_slips_on_slope"), &RayShape2D::get_slips_on_slope); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "length"), "set_length", "get_length"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "length"), "set_length", "get_length"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "slips_on_slope"), "set_slips_on_slope", "get_slips_on_slope"); } diff --git a/scene/resources/shape.cpp b/scene/resources/shape.cpp index b50c68727a..4a6da18f2b 100644 --- a/scene/resources/shape.cpp +++ b/scene/resources/shape.cpp @@ -35,7 +35,7 @@ #include "scene/resources/mesh.h" #include "servers/physics_server.h" -void Shape::add_vertices_to_array(PoolVector<Vector3> &array, const Transform &p_xform) { +void Shape::add_vertices_to_array(Vector<Vector3> &array, const Transform &p_xform) { Vector<Vector3> toadd = get_debug_mesh_lines(); @@ -43,7 +43,7 @@ void Shape::add_vertices_to_array(PoolVector<Vector3> &array, const Transform &p int base = array.size(); array.resize(base + toadd.size()); - PoolVector<Vector3>::Write w = array.write(); + Vector3 *w = array.ptrw(); for (int i = 0; i < toadd.size(); i++) { w[i + base] = p_xform.xform(toadd[i]); } @@ -70,11 +70,11 @@ Ref<ArrayMesh> Shape::get_debug_mesh() { if (!lines.empty()) { //make mesh - PoolVector<Vector3> array; + Vector<Vector3> array; array.resize(lines.size()); { - PoolVector<Vector3>::Write w = array.write(); + Vector3 *w = array.ptrw(); for (int i = 0; i < lines.size(); i++) { w[i] = lines[i]; } @@ -106,7 +106,7 @@ void Shape::_bind_methods() { ClassDB::bind_method(D_METHOD("set_margin", "margin"), &Shape::set_margin); ClassDB::bind_method(D_METHOD("get_margin"), &Shape::get_margin); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "margin", PROPERTY_HINT_RANGE, "0.001,10,0.001"), "set_margin", "get_margin"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "margin", PROPERTY_HINT_RANGE, "0.001,10,0.001"), "set_margin", "get_margin"); } Shape::Shape() : diff --git a/scene/resources/shape.h b/scene/resources/shape.h index 227a581c96..e5ccbf7e28 100644 --- a/scene/resources/shape.h +++ b/scene/resources/shape.h @@ -61,7 +61,7 @@ public: /// Returns the radius of a sphere that fully enclose this shape virtual real_t get_enclosing_radius() const = 0; - void add_vertices_to_array(PoolVector<Vector3> &array, const Transform &p_xform); + void add_vertices_to_array(Vector<Vector3> &array, const Transform &p_xform); real_t get_margin() const; void set_margin(real_t p_margin); diff --git a/scene/resources/shape_2d.cpp b/scene/resources/shape_2d.cpp index 9e97c65a3c..64930c3117 100644 --- a/scene/resources/shape_2d.cpp +++ b/scene/resources/shape_2d.cpp @@ -105,7 +105,7 @@ void Shape2D::_bind_methods() { ClassDB::bind_method(D_METHOD("collide_and_get_contacts", "local_xform", "with_shape", "shape_xform"), &Shape2D::collide_and_get_contacts); ClassDB::bind_method(D_METHOD("collide_with_motion_and_get_contacts", "local_xform", "local_motion", "with_shape", "shape_xform", "shape_motion"), &Shape2D::collide_with_motion_and_get_contacts); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "custom_solver_bias", PROPERTY_HINT_RANGE, "0,1,0.001"), "set_custom_solver_bias", "get_custom_solver_bias"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "custom_solver_bias", PROPERTY_HINT_RANGE, "0,1,0.001"), "set_custom_solver_bias", "get_custom_solver_bias"); } Shape2D::Shape2D(const RID &p_rid) { diff --git a/scene/resources/skin.cpp b/scene/resources/skin.cpp index 9c8710a59c..df0620b6c4 100644 --- a/scene/resources/skin.cpp +++ b/scene/resources/skin.cpp @@ -45,6 +45,24 @@ void Skin::add_bind(int p_bone, const Transform &p_pose) { set_bind_pose(index, p_pose); } +void Skin::add_named_bind(const String &p_name, const Transform &p_pose) { + + uint32_t index = bind_count; + set_bind_count(bind_count + 1); + set_bind_name(index, p_name); + set_bind_pose(index, p_pose); +} + +void Skin::set_bind_name(int p_index, const StringName &p_name) { + ERR_FAIL_INDEX(p_index, bind_count); + bool notify_change = (binds_ptr[p_index].name != StringName()) != (p_name != StringName()); + binds_ptr[p_index].name = p_name; + emit_changed(); + if (notify_change) { + _change_notify(); + } +} + void Skin::set_bind_bone(int p_index, int p_bone) { ERR_FAIL_INDEX(p_index, bind_count); binds_ptr[p_index].bone = p_bone; @@ -75,6 +93,9 @@ bool Skin::_set(const StringName &p_name, const Variant &p_value) { if (what == "bone") { set_bind_bone(index, p_value); return true; + } else if (what == "name") { + set_bind_name(index, p_value); + return true; } else if (what == "pose") { set_bind_pose(index, p_value); return true; @@ -95,6 +116,9 @@ bool Skin::_get(const StringName &p_name, Variant &r_ret) const { if (what == "bone") { r_ret = get_bind_bone(index); return true; + } else if (what == "name") { + r_ret = get_bind_name(index); + return true; } else if (what == "pose") { r_ret = get_bind_pose(index); return true; @@ -105,7 +129,8 @@ bool Skin::_get(const StringName &p_name, Variant &r_ret) const { void Skin::_get_property_list(List<PropertyInfo> *p_list) const { p_list->push_back(PropertyInfo(Variant::INT, "bind_count", PROPERTY_HINT_RANGE, "0,16384,1,or_greater")); for (int i = 0; i < get_bind_count(); i++) { - p_list->push_back(PropertyInfo(Variant::INT, "bind/" + itos(i) + "/bone", PROPERTY_HINT_RANGE, "0,16384,1,or_greater")); + p_list->push_back(PropertyInfo(Variant::STRING_NAME, "bind/" + itos(i) + "/name")); + p_list->push_back(PropertyInfo(Variant::INT, "bind/" + itos(i) + "/bone", PROPERTY_HINT_RANGE, "0,16384,1,or_greater", get_bind_name(i) != StringName() ? PROPERTY_USAGE_NOEDITOR : PROPERTY_USAGE_DEFAULT)); p_list->push_back(PropertyInfo(Variant::TRANSFORM, "bind/" + itos(i) + "/pose")); } } @@ -120,6 +145,9 @@ void Skin::_bind_methods() { ClassDB::bind_method(D_METHOD("set_bind_pose", "bind_index", "pose"), &Skin::set_bind_pose); ClassDB::bind_method(D_METHOD("get_bind_pose", "bind_index"), &Skin::get_bind_pose); + ClassDB::bind_method(D_METHOD("set_bind_name", "bind_index", "name"), &Skin::set_bind_name); + ClassDB::bind_method(D_METHOD("get_bind_name", "bind_index"), &Skin::get_bind_name); + ClassDB::bind_method(D_METHOD("set_bind_bone", "bind_index", "bone"), &Skin::set_bind_bone); ClassDB::bind_method(D_METHOD("get_bind_bone", "bind_index"), &Skin::get_bind_bone); diff --git a/scene/resources/skin.h b/scene/resources/skin.h index ddc7c655f5..57aaf1afd4 100644 --- a/scene/resources/skin.h +++ b/scene/resources/skin.h @@ -37,7 +37,8 @@ class Skin : public Resource { GDCLASS(Skin, Resource) struct Bind { - int bone; + int bone = -1; + StringName name; Transform pose; }; @@ -58,9 +59,11 @@ public: inline int get_bind_count() const { return bind_count; } void add_bind(int p_bone, const Transform &p_pose); + void add_named_bind(const String &p_name, const Transform &p_pose); void set_bind_bone(int p_index, int p_bone); void set_bind_pose(int p_index, const Transform &p_pose); + void set_bind_name(int p_index, const StringName &p_name); inline int get_bind_bone(int p_index) const { #ifdef DEBUG_ENABLED @@ -69,6 +72,13 @@ public: return binds_ptr[p_index].bone; } + inline StringName get_bind_name(int p_index) const { +#ifdef DEBUG_ENABLED + ERR_FAIL_INDEX_V(p_index, bind_count, StringName()); +#endif + return binds_ptr[p_index].name; + } + inline Transform get_bind_pose(int p_index) const { #ifdef DEBUG_ENABLED ERR_FAIL_INDEX_V(p_index, bind_count, Transform()); diff --git a/scene/resources/sky.cpp b/scene/resources/sky.cpp index 3e797a7bde..54648e8af7 100644 --- a/scene/resources/sky.cpp +++ b/scene/resources/sky.cpp @@ -130,7 +130,7 @@ Ref<Image> ProceduralSky::_generate_sky() { update_queued = false; - PoolVector<uint8_t> imgdata; + Vector<uint8_t> imgdata; static const int size[TEXTURE_SIZE_MAX] = { 256, 512, 1024, 2048, 4096 @@ -142,9 +142,9 @@ Ref<Image> ProceduralSky::_generate_sky() { imgdata.resize(w * h * 4); //RGBE { - PoolVector<uint8_t>::Write dataw = imgdata.write(); + uint8_t *dataw = imgdata.ptrw(); - uint32_t *ptr = (uint32_t *)dataw.ptr(); + uint32_t *ptr = (uint32_t *)dataw; Color sky_top_linear = sky_top_color.to_linear(); Color sky_horizon_linear = sky_horizon_color.to_linear(); @@ -509,23 +509,23 @@ void ProceduralSky::_bind_methods() { ADD_GROUP("Sky", "sky_"); ADD_PROPERTY(PropertyInfo(Variant::COLOR, "sky_top_color"), "set_sky_top_color", "get_sky_top_color"); ADD_PROPERTY(PropertyInfo(Variant::COLOR, "sky_horizon_color"), "set_sky_horizon_color", "get_sky_horizon_color"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "sky_curve", PROPERTY_HINT_EXP_EASING), "set_sky_curve", "get_sky_curve"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "sky_energy", PROPERTY_HINT_RANGE, "0,64,0.01"), "set_sky_energy", "get_sky_energy"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "sky_curve", PROPERTY_HINT_EXP_EASING), "set_sky_curve", "get_sky_curve"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "sky_energy", PROPERTY_HINT_RANGE, "0,64,0.01"), "set_sky_energy", "get_sky_energy"); ADD_GROUP("Ground", "ground_"); ADD_PROPERTY(PropertyInfo(Variant::COLOR, "ground_bottom_color"), "set_ground_bottom_color", "get_ground_bottom_color"); ADD_PROPERTY(PropertyInfo(Variant::COLOR, "ground_horizon_color"), "set_ground_horizon_color", "get_ground_horizon_color"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "ground_curve", PROPERTY_HINT_EXP_EASING), "set_ground_curve", "get_ground_curve"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "ground_energy", PROPERTY_HINT_RANGE, "0,64,0.01"), "set_ground_energy", "get_ground_energy"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "ground_curve", PROPERTY_HINT_EXP_EASING), "set_ground_curve", "get_ground_curve"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "ground_energy", PROPERTY_HINT_RANGE, "0,64,0.01"), "set_ground_energy", "get_ground_energy"); ADD_GROUP("Sun", "sun_"); ADD_PROPERTY(PropertyInfo(Variant::COLOR, "sun_color"), "set_sun_color", "get_sun_color"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "sun_latitude", PROPERTY_HINT_RANGE, "-180,180,0.01"), "set_sun_latitude", "get_sun_latitude"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "sun_longitude", PROPERTY_HINT_RANGE, "-180,180,0.01"), "set_sun_longitude", "get_sun_longitude"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "sun_angle_min", PROPERTY_HINT_RANGE, "0,360,0.01"), "set_sun_angle_min", "get_sun_angle_min"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "sun_angle_max", PROPERTY_HINT_RANGE, "0,360,0.01"), "set_sun_angle_max", "get_sun_angle_max"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "sun_curve", PROPERTY_HINT_EXP_EASING), "set_sun_curve", "get_sun_curve"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "sun_energy", PROPERTY_HINT_RANGE, "0,64,0.01"), "set_sun_energy", "get_sun_energy"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "sun_latitude", PROPERTY_HINT_RANGE, "-180,180,0.01"), "set_sun_latitude", "get_sun_latitude"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "sun_longitude", PROPERTY_HINT_RANGE, "-180,180,0.01"), "set_sun_longitude", "get_sun_longitude"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "sun_angle_min", PROPERTY_HINT_RANGE, "0,360,0.01"), "set_sun_angle_min", "get_sun_angle_min"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "sun_angle_max", PROPERTY_HINT_RANGE, "0,360,0.01"), "set_sun_angle_max", "get_sun_angle_max"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "sun_curve", PROPERTY_HINT_EXP_EASING), "set_sun_curve", "get_sun_curve"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "sun_energy", PROPERTY_HINT_RANGE, "0,64,0.01"), "set_sun_energy", "get_sun_energy"); ADD_GROUP("Texture2D", "texture_"); ADD_PROPERTY(PropertyInfo(Variant::INT, "texture_size", PROPERTY_HINT_ENUM, "256,512,1024,2048,4096"), "set_texture_size", "get_texture_size"); diff --git a/scene/resources/sphere_shape.cpp b/scene/resources/sphere_shape.cpp index 56121b6941..825708d1e2 100644 --- a/scene/resources/sphere_shape.cpp +++ b/scene/resources/sphere_shape.cpp @@ -83,7 +83,7 @@ void SphereShape::_bind_methods() { ClassDB::bind_method(D_METHOD("set_radius", "radius"), &SphereShape::set_radius); ClassDB::bind_method(D_METHOD("get_radius"), &SphereShape::get_radius); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "radius", PROPERTY_HINT_RANGE, "0,4096,0.01"), "set_radius", "get_radius"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "radius", PROPERTY_HINT_RANGE, "0,4096,0.01"), "set_radius", "get_radius"); } SphereShape::SphereShape() : diff --git a/scene/resources/style_box.cpp b/scene/resources/style_box.cpp index 1766b531d5..119cbcd098 100644 --- a/scene/resources/style_box.cpp +++ b/scene/resources/style_box.cpp @@ -104,10 +104,10 @@ void StyleBox::_bind_methods() { ClassDB::bind_method(D_METHOD("draw", "canvas_item", "rect"), &StyleBox::draw); ADD_GROUP("Content Margin", "content_margin_"); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "content_margin_left", PROPERTY_HINT_RANGE, "-1,2048,1"), "set_default_margin", "get_default_margin", MARGIN_LEFT); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "content_margin_right", PROPERTY_HINT_RANGE, "-1,2048,1"), "set_default_margin", "get_default_margin", MARGIN_RIGHT); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "content_margin_top", PROPERTY_HINT_RANGE, "-1,2048,1"), "set_default_margin", "get_default_margin", MARGIN_TOP); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "content_margin_bottom", PROPERTY_HINT_RANGE, "-1,2048,1"), "set_default_margin", "get_default_margin", MARGIN_BOTTOM); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "content_margin_left", PROPERTY_HINT_RANGE, "-1,2048,1"), "set_default_margin", "get_default_margin", MARGIN_LEFT); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "content_margin_right", PROPERTY_HINT_RANGE, "-1,2048,1"), "set_default_margin", "get_default_margin", MARGIN_RIGHT); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "content_margin_top", PROPERTY_HINT_RANGE, "-1,2048,1"), "set_default_margin", "get_default_margin", MARGIN_TOP); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "content_margin_bottom", PROPERTY_HINT_RANGE, "-1,2048,1"), "set_default_margin", "get_default_margin", MARGIN_BOTTOM); } StyleBox::StyleBox() { @@ -339,15 +339,15 @@ void StyleBoxTexture::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "normal_map", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"), "set_normal_map", "get_normal_map"); ADD_PROPERTY(PropertyInfo(Variant::RECT2, "region_rect"), "set_region_rect", "get_region_rect"); ADD_GROUP("Margin", "margin_"); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "margin_left", PROPERTY_HINT_RANGE, "0,2048,1"), "set_margin_size", "get_margin_size", MARGIN_LEFT); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "margin_right", PROPERTY_HINT_RANGE, "0,2048,1"), "set_margin_size", "get_margin_size", MARGIN_RIGHT); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "margin_top", PROPERTY_HINT_RANGE, "0,2048,1"), "set_margin_size", "get_margin_size", MARGIN_TOP); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "margin_bottom", PROPERTY_HINT_RANGE, "0,2048,1"), "set_margin_size", "get_margin_size", MARGIN_BOTTOM); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "margin_left", PROPERTY_HINT_RANGE, "0,2048,1"), "set_margin_size", "get_margin_size", MARGIN_LEFT); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "margin_right", PROPERTY_HINT_RANGE, "0,2048,1"), "set_margin_size", "get_margin_size", MARGIN_RIGHT); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "margin_top", PROPERTY_HINT_RANGE, "0,2048,1"), "set_margin_size", "get_margin_size", MARGIN_TOP); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "margin_bottom", PROPERTY_HINT_RANGE, "0,2048,1"), "set_margin_size", "get_margin_size", MARGIN_BOTTOM); ADD_GROUP("Expand Margin", "expand_margin_"); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "expand_margin_left", PROPERTY_HINT_RANGE, "0,2048,1"), "set_expand_margin_size", "get_expand_margin_size", MARGIN_LEFT); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "expand_margin_right", PROPERTY_HINT_RANGE, "0,2048,1"), "set_expand_margin_size", "get_expand_margin_size", MARGIN_RIGHT); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "expand_margin_top", PROPERTY_HINT_RANGE, "0,2048,1"), "set_expand_margin_size", "get_expand_margin_size", MARGIN_TOP); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "expand_margin_bottom", PROPERTY_HINT_RANGE, "0,2048,1"), "set_expand_margin_size", "get_expand_margin_size", MARGIN_BOTTOM); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "expand_margin_left", PROPERTY_HINT_RANGE, "0,2048,1"), "set_expand_margin_size", "get_expand_margin_size", MARGIN_LEFT); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "expand_margin_right", PROPERTY_HINT_RANGE, "0,2048,1"), "set_expand_margin_size", "get_expand_margin_size", MARGIN_RIGHT); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "expand_margin_top", PROPERTY_HINT_RANGE, "0,2048,1"), "set_expand_margin_size", "get_expand_margin_size", MARGIN_TOP); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "expand_margin_bottom", PROPERTY_HINT_RANGE, "0,2048,1"), "set_expand_margin_size", "get_expand_margin_size", MARGIN_BOTTOM); ADD_GROUP("Axis Stretch", "axis_stretch_"); ADD_PROPERTY(PropertyInfo(Variant::INT, "axis_stretch_horizontal", PROPERTY_HINT_ENUM, "Stretch,Tile,Tile Fit"), "set_h_axis_stretch_mode", "get_h_axis_stretch_mode"); ADD_PROPERTY(PropertyInfo(Variant::INT, "axis_stretch_vertical", PROPERTY_HINT_ENUM, "Stretch,Tile,Tile Fit"), "set_v_axis_stretch_mode", "get_v_axis_stretch_mode"); @@ -933,10 +933,10 @@ void StyleBoxFlat::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::INT, "corner_detail", PROPERTY_HINT_RANGE, "1,20,1"), "set_corner_detail", "get_corner_detail"); ADD_GROUP("Expand Margin", "expand_margin_"); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "expand_margin_left", PROPERTY_HINT_RANGE, "0,2048,1"), "set_expand_margin", "get_expand_margin", MARGIN_LEFT); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "expand_margin_right", PROPERTY_HINT_RANGE, "0,2048,1"), "set_expand_margin", "get_expand_margin", MARGIN_RIGHT); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "expand_margin_top", PROPERTY_HINT_RANGE, "0,2048,1"), "set_expand_margin", "get_expand_margin", MARGIN_TOP); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "expand_margin_bottom", PROPERTY_HINT_RANGE, "0,2048,1"), "set_expand_margin", "get_expand_margin", MARGIN_BOTTOM); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "expand_margin_left", PROPERTY_HINT_RANGE, "0,2048,1"), "set_expand_margin", "get_expand_margin", MARGIN_LEFT); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "expand_margin_right", PROPERTY_HINT_RANGE, "0,2048,1"), "set_expand_margin", "get_expand_margin", MARGIN_RIGHT); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "expand_margin_top", PROPERTY_HINT_RANGE, "0,2048,1"), "set_expand_margin", "get_expand_margin", MARGIN_TOP); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "expand_margin_bottom", PROPERTY_HINT_RANGE, "0,2048,1"), "set_expand_margin", "get_expand_margin", MARGIN_BOTTOM); ADD_GROUP("Shadow", "shadow_"); ADD_PROPERTY(PropertyInfo(Variant::COLOR, "shadow_color"), "set_shadow_color", "get_shadow_color"); @@ -1035,8 +1035,8 @@ void StyleBoxLine::_bind_methods() { ClassDB::bind_method(D_METHOD("is_vertical"), &StyleBoxLine::is_vertical); ADD_PROPERTY(PropertyInfo(Variant::COLOR, "color"), "set_color", "get_color"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "grow_begin", PROPERTY_HINT_RANGE, "-300,300,1"), "set_grow_begin", "get_grow_begin"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "grow_end", PROPERTY_HINT_RANGE, "-300,300,1"), "set_grow_end", "get_grow_end"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "grow_begin", PROPERTY_HINT_RANGE, "-300,300,1"), "set_grow_begin", "get_grow_begin"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "grow_end", PROPERTY_HINT_RANGE, "-300,300,1"), "set_grow_end", "get_grow_end"); ADD_PROPERTY(PropertyInfo(Variant::INT, "thickness", PROPERTY_HINT_RANGE, "0,10"), "set_thickness", "get_thickness"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "vertical"), "set_vertical", "is_vertical"); } diff --git a/scene/resources/surface_tool.cpp b/scene/resources/surface_tool.cpp index a1e6430255..fa177d03fb 100644 --- a/scene/resources/surface_tool.cpp +++ b/scene/resources/surface_tool.cpp @@ -288,9 +288,9 @@ Array SurfaceTool::commit_to_arrays() { case Mesh::ARRAY_VERTEX: case Mesh::ARRAY_NORMAL: { - PoolVector<Vector3> array; + Vector<Vector3> array; array.resize(varr_len); - PoolVector<Vector3>::Write w = array.write(); + Vector3 *w = array.ptrw(); int idx = 0; for (List<Vertex>::Element *E = vertex_array.front(); E; E = E->next(), idx++) { @@ -307,7 +307,6 @@ Array SurfaceTool::commit_to_arrays() { } } - w.release(); a[i] = array; } break; @@ -315,9 +314,9 @@ Array SurfaceTool::commit_to_arrays() { case Mesh::ARRAY_TEX_UV: case Mesh::ARRAY_TEX_UV2: { - PoolVector<Vector2> array; + Vector<Vector2> array; array.resize(varr_len); - PoolVector<Vector2>::Write w = array.write(); + Vector2 *w = array.ptrw(); int idx = 0; for (List<Vertex>::Element *E = vertex_array.front(); E; E = E->next(), idx++) { @@ -335,14 +334,13 @@ Array SurfaceTool::commit_to_arrays() { } } - w.release(); a[i] = array; } break; case Mesh::ARRAY_TANGENT: { - PoolVector<float> array; + Vector<float> array; array.resize(varr_len * 4); - PoolVector<float>::Write w = array.write(); + float *w = array.ptrw(); int idx = 0; for (List<Vertex>::Element *E = vertex_array.front(); E; E = E->next(), idx += 4) { @@ -358,15 +356,14 @@ Array SurfaceTool::commit_to_arrays() { w[idx + 3] = d < 0 ? -1 : 1; } - w.release(); a[i] = array; } break; case Mesh::ARRAY_COLOR: { - PoolVector<Color> array; + Vector<Color> array; array.resize(varr_len); - PoolVector<Color>::Write w = array.write(); + Color *w = array.ptrw(); int idx = 0; for (List<Vertex>::Element *E = vertex_array.front(); E; E = E->next(), idx++) { @@ -375,14 +372,13 @@ Array SurfaceTool::commit_to_arrays() { w[idx] = v.color; } - w.release(); a[i] = array; } break; case Mesh::ARRAY_BONES: { - PoolVector<int> array; + Vector<int> array; array.resize(varr_len * 4); - PoolVector<int>::Write w = array.write(); + int *w = array.ptrw(); int idx = 0; for (List<Vertex>::Element *E = vertex_array.front(); E; E = E->next(), idx += 4) { @@ -396,15 +392,14 @@ Array SurfaceTool::commit_to_arrays() { } } - w.release(); a[i] = array; } break; case Mesh::ARRAY_WEIGHTS: { - PoolVector<float> array; + Vector<float> array; array.resize(varr_len * 4); - PoolVector<float>::Write w = array.write(); + float *w = array.ptrw(); int idx = 0; for (List<Vertex>::Element *E = vertex_array.front(); E; E = E->next(), idx += 4) { @@ -418,7 +413,6 @@ Array SurfaceTool::commit_to_arrays() { } } - w.release(); a[i] = array; } break; @@ -426,9 +420,9 @@ Array SurfaceTool::commit_to_arrays() { ERR_CONTINUE(index_array.size() == 0); - PoolVector<int> array; + Vector<int> array; array.resize(index_array.size()); - PoolVector<int>::Write w = array.write(); + int *w = array.ptrw(); int idx = 0; for (List<int>::Element *E = index_array.front(); E; E = E->next(), idx++) { @@ -436,8 +430,6 @@ Array SurfaceTool::commit_to_arrays() { w[idx] = E->get(); } - w.release(); - a[i] = array; } break; @@ -535,68 +527,46 @@ Vector<SurfaceTool::Vertex> SurfaceTool::create_vertex_array_from_triangle_array Vector<SurfaceTool::Vertex> ret; - PoolVector<Vector3> varr = p_arrays[VS::ARRAY_VERTEX]; - PoolVector<Vector3> narr = p_arrays[VS::ARRAY_NORMAL]; - PoolVector<float> tarr = p_arrays[VS::ARRAY_TANGENT]; - PoolVector<Color> carr = p_arrays[VS::ARRAY_COLOR]; - PoolVector<Vector2> uvarr = p_arrays[VS::ARRAY_TEX_UV]; - PoolVector<Vector2> uv2arr = p_arrays[VS::ARRAY_TEX_UV2]; - PoolVector<int> barr = p_arrays[VS::ARRAY_BONES]; - PoolVector<float> warr = p_arrays[VS::ARRAY_WEIGHTS]; + Vector<Vector3> varr = p_arrays[VS::ARRAY_VERTEX]; + Vector<Vector3> narr = p_arrays[VS::ARRAY_NORMAL]; + Vector<float> tarr = p_arrays[VS::ARRAY_TANGENT]; + Vector<Color> carr = p_arrays[VS::ARRAY_COLOR]; + Vector<Vector2> uvarr = p_arrays[VS::ARRAY_TEX_UV]; + Vector<Vector2> uv2arr = p_arrays[VS::ARRAY_TEX_UV2]; + Vector<int> barr = p_arrays[VS::ARRAY_BONES]; + Vector<float> warr = p_arrays[VS::ARRAY_WEIGHTS]; int vc = varr.size(); - if (vc == 0) return ret; - int lformat = 0; - PoolVector<Vector3>::Read rv; + int lformat = 0; if (varr.size()) { lformat |= VS::ARRAY_FORMAT_VERTEX; - rv = varr.read(); } - PoolVector<Vector3>::Read rn; if (narr.size()) { lformat |= VS::ARRAY_FORMAT_NORMAL; - rn = narr.read(); } - PoolVector<float>::Read rt; if (tarr.size()) { lformat |= VS::ARRAY_FORMAT_TANGENT; - rt = tarr.read(); } - PoolVector<Color>::Read rc; if (carr.size()) { lformat |= VS::ARRAY_FORMAT_COLOR; - rc = carr.read(); } - - PoolVector<Vector2>::Read ruv; if (uvarr.size()) { lformat |= VS::ARRAY_FORMAT_TEX_UV; - ruv = uvarr.read(); } - - PoolVector<Vector2>::Read ruv2; if (uv2arr.size()) { lformat |= VS::ARRAY_FORMAT_TEX_UV2; - ruv2 = uv2arr.read(); } - - PoolVector<int>::Read rb; if (barr.size()) { lformat |= VS::ARRAY_FORMAT_BONES; - rb = barr.read(); } - - PoolVector<float>::Read rw; if (warr.size()) { lformat |= VS::ARRAY_FORMAT_WEIGHTS; - rw = warr.read(); } for (int i = 0; i < vc; i++) { - Vertex v; if (lformat & VS::ARRAY_FORMAT_VERTEX) v.vertex = varr[i]; @@ -640,68 +610,46 @@ Vector<SurfaceTool::Vertex> SurfaceTool::create_vertex_array_from_triangle_array void SurfaceTool::_create_list_from_arrays(Array arr, List<Vertex> *r_vertex, List<int> *r_index, int &lformat) { - PoolVector<Vector3> varr = arr[VS::ARRAY_VERTEX]; - PoolVector<Vector3> narr = arr[VS::ARRAY_NORMAL]; - PoolVector<float> tarr = arr[VS::ARRAY_TANGENT]; - PoolVector<Color> carr = arr[VS::ARRAY_COLOR]; - PoolVector<Vector2> uvarr = arr[VS::ARRAY_TEX_UV]; - PoolVector<Vector2> uv2arr = arr[VS::ARRAY_TEX_UV2]; - PoolVector<int> barr = arr[VS::ARRAY_BONES]; - PoolVector<float> warr = arr[VS::ARRAY_WEIGHTS]; + Vector<Vector3> varr = arr[VS::ARRAY_VERTEX]; + Vector<Vector3> narr = arr[VS::ARRAY_NORMAL]; + Vector<float> tarr = arr[VS::ARRAY_TANGENT]; + Vector<Color> carr = arr[VS::ARRAY_COLOR]; + Vector<Vector2> uvarr = arr[VS::ARRAY_TEX_UV]; + Vector<Vector2> uv2arr = arr[VS::ARRAY_TEX_UV2]; + Vector<int> barr = arr[VS::ARRAY_BONES]; + Vector<float> warr = arr[VS::ARRAY_WEIGHTS]; int vc = varr.size(); - if (vc == 0) return; - lformat = 0; - PoolVector<Vector3>::Read rv; + lformat = 0; if (varr.size()) { lformat |= VS::ARRAY_FORMAT_VERTEX; - rv = varr.read(); } - PoolVector<Vector3>::Read rn; if (narr.size()) { lformat |= VS::ARRAY_FORMAT_NORMAL; - rn = narr.read(); } - PoolVector<float>::Read rt; if (tarr.size()) { lformat |= VS::ARRAY_FORMAT_TANGENT; - rt = tarr.read(); } - PoolVector<Color>::Read rc; if (carr.size()) { lformat |= VS::ARRAY_FORMAT_COLOR; - rc = carr.read(); } - - PoolVector<Vector2>::Read ruv; if (uvarr.size()) { lformat |= VS::ARRAY_FORMAT_TEX_UV; - ruv = uvarr.read(); } - - PoolVector<Vector2>::Read ruv2; if (uv2arr.size()) { lformat |= VS::ARRAY_FORMAT_TEX_UV2; - ruv2 = uv2arr.read(); } - - PoolVector<int>::Read rb; if (barr.size()) { lformat |= VS::ARRAY_FORMAT_BONES; - rb = barr.read(); } - - PoolVector<float>::Read rw; if (warr.size()) { lformat |= VS::ARRAY_FORMAT_WEIGHTS; - rw = warr.read(); } for (int i = 0; i < vc; i++) { - Vertex v; if (lformat & VS::ARRAY_FORMAT_VERTEX) v.vertex = varr[i]; @@ -742,12 +690,12 @@ void SurfaceTool::_create_list_from_arrays(Array arr, List<Vertex> *r_vertex, Li //indices - PoolVector<int> idx = arr[VS::ARRAY_INDEX]; + Vector<int> idx = arr[VS::ARRAY_INDEX]; int is = idx.size(); if (is) { lformat |= VS::ARRAY_FORMAT_INDEX; - PoolVector<int>::Read iarr = idx.read(); + const int *iarr = idx.ptr(); for (int i = 0; i < is; i++) { r_index->push_back(iarr[i]); } diff --git a/scene/resources/text_file.cpp b/scene/resources/text_file.cpp index af55d2dde3..e291dcb67e 100644 --- a/scene/resources/text_file.cpp +++ b/scene/resources/text_file.cpp @@ -50,7 +50,7 @@ void TextFile::reload_from_file() { Error TextFile::load_text(const String &p_path) { - PoolVector<uint8_t> sourcef; + Vector<uint8_t> sourcef; Error err; FileAccess *f = FileAccess::open(p_path, FileAccess::READ, &err); @@ -58,15 +58,15 @@ Error TextFile::load_text(const String &p_path) { int len = f->get_len(); sourcef.resize(len + 1); - PoolVector<uint8_t>::Write w = sourcef.write(); - int r = f->get_buffer(w.ptr(), len); + uint8_t *w = sourcef.ptrw(); + int r = f->get_buffer(w, len); f->close(); memdelete(f); ERR_FAIL_COND_V(r != len, ERR_CANT_OPEN); w[len] = 0; String s; - ERR_FAIL_COND_V_MSG(s.parse_utf8((const char *)w.ptr()), ERR_INVALID_DATA, "Script '" + p_path + "' contains invalid unicode (UTF-8), so it was not loaded. Please ensure that scripts are saved in valid UTF-8 unicode."); + ERR_FAIL_COND_V_MSG(s.parse_utf8((const char *)w), ERR_INVALID_DATA, "Script '" + p_path + "' contains invalid unicode (UTF-8), so it was not loaded. Please ensure that scripts are saved in valid UTF-8 unicode."); text = s; path = p_path; return OK; diff --git a/scene/resources/texture.cpp b/scene/resources/texture.cpp index 4ddceed58e..64de19c197 100644 --- a/scene/resources/texture.cpp +++ b/scene/resources/texture.cpp @@ -388,11 +388,11 @@ Ref<Image> StreamTexture::load_image_from_file(FileAccess *f, int p_size_limit) continue; } - PoolVector<uint8_t> pv; + Vector<uint8_t> pv; pv.resize(size); { - PoolVector<uint8_t>::Write wr = pv.write(); - f->get_buffer(wr.ptr(), size); + uint8_t *wr = pv.ptrw(); + f->get_buffer(wr, size); } Ref<Image> img; @@ -405,7 +405,6 @@ Ref<Image> StreamTexture::load_image_from_file(FileAccess *f, int p_size_limit) } if (img.is_null() || img->empty()) { - memdelete(f); ERR_FAIL_COND_V(img.is_null() || img->empty(), Ref<Image>()); } @@ -438,19 +437,19 @@ Ref<Image> StreamTexture::load_image_from_file(FileAccess *f, int p_size_limit) } else { //rarer use case, but needs to be supported - PoolVector<uint8_t> img_data; + Vector<uint8_t> img_data; img_data.resize(total_size); { - PoolVector<uint8_t>::Write wr = img_data.write(); + uint8_t *wr = img_data.ptrw(); int ofs = 0; for (int i = 0; i < mipmap_images.size(); i++) { - PoolVector<uint8_t> id = mipmap_images[i]->get_data(); + Vector<uint8_t> id = mipmap_images[i]->get_data(); int len = id.size(); - PoolVector<uint8_t>::Read r = id.read(); - copymem(&wr[ofs], r.ptr(), len); + const uint8_t *r = id.ptr(); + copymem(&wr[ofs], r, len); ofs += len; } } @@ -474,12 +473,12 @@ Ref<Image> StreamTexture::load_image_from_file(FileAccess *f, int p_size_limit) continue; //oops, size limit enforced, go to next } - PoolVector<uint8_t> data; + Vector<uint8_t> data; data.resize(size - ofs); { - PoolVector<uint8_t>::Write wr = data.write(); - f->get_buffer(wr.ptr(), data.size()); + uint8_t *wr = data.ptrw(); + f->get_buffer(wr, data.size()); } Ref<Image> image; @@ -588,6 +587,8 @@ Error StreamTexture::_load_data(const String &p_path, int &tw, int &th, int &tw_ image = load_image_from_file(f, p_size_limit); + memdelete(f); + if (image.is_null() || image->empty()) { return ERR_CANT_OPEN; } @@ -1408,11 +1409,11 @@ void CurveTexture::ensure_default_setup(float p_min, float p_max) { void CurveTexture::set_curve(Ref<Curve> p_curve) { if (_curve != p_curve) { if (_curve.is_valid()) { - _curve->disconnect(CoreStringNames::get_singleton()->changed, this, "_update"); + _curve->disconnect_compat(CoreStringNames::get_singleton()->changed, this, "_update"); } _curve = p_curve; if (_curve.is_valid()) { - _curve->connect(CoreStringNames::get_singleton()->changed, this, "_update"); + _curve->connect_compat(CoreStringNames::get_singleton()->changed, this, "_update"); } _update(); } @@ -1420,13 +1421,13 @@ void CurveTexture::set_curve(Ref<Curve> p_curve) { void CurveTexture::_update() { - PoolVector<uint8_t> data; + Vector<uint8_t> data; data.resize(_width * sizeof(float)); // The array is locked in that scope { - PoolVector<uint8_t>::Write wd8 = data.write(); - float *wd = (float *)wd8.ptr(); + uint8_t *wd8 = data.ptrw(); + float *wd = (float *)wd8; if (_curve.is_valid()) { Curve &curve = **_curve; @@ -1513,11 +1514,11 @@ void GradientTexture::set_gradient(Ref<Gradient> p_gradient) { if (p_gradient == gradient) return; if (gradient.is_valid()) { - gradient->disconnect(CoreStringNames::get_singleton()->changed, this, "_update"); + gradient->disconnect_compat(CoreStringNames::get_singleton()->changed, this, "_update"); } gradient = p_gradient; if (gradient.is_valid()) { - gradient->connect(CoreStringNames::get_singleton()->changed, this, "_update"); + gradient->connect_compat(CoreStringNames::get_singleton()->changed, this, "_update"); } _update(); emit_changed(); @@ -1543,10 +1544,10 @@ void GradientTexture::_update() { if (gradient.is_null()) return; - PoolVector<uint8_t> data; + Vector<uint8_t> data; data.resize(width * 4); { - PoolVector<uint8_t>::Write wd8 = data.write(); + uint8_t *wd8 = data.ptrw(); Gradient &g = **gradient; for (int i = 0; i < width; i++) { @@ -1845,11 +1846,11 @@ void AnimatedTexture::_bind_methods() { ClassDB::bind_method(D_METHOD("_update_proxy"), &AnimatedTexture::_update_proxy); ADD_PROPERTY(PropertyInfo(Variant::INT, "frames", PROPERTY_HINT_RANGE, "1," + itos(MAX_FRAMES), PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), "set_frames", "get_frames"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "fps", PROPERTY_HINT_RANGE, "0,1024,0.1"), "set_fps", "get_fps"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "fps", PROPERTY_HINT_RANGE, "0,1024,0.1"), "set_fps", "get_fps"); for (int i = 0; i < MAX_FRAMES; i++) { ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "frame_" + itos(i) + "/texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_INTERNAL), "set_frame_texture", "get_frame_texture", i); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "frame_" + itos(i) + "/delay_sec", PROPERTY_HINT_RANGE, "0.0,16.0,0.01", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_INTERNAL), "set_frame_delay", "get_frame_delay", i); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "frame_" + itos(i) + "/delay_sec", PROPERTY_HINT_RANGE, "0.0,16.0,0.01", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_INTERNAL), "set_frame_delay", "get_frame_delay", i); } BIND_CONSTANT(MAX_FRAMES); @@ -1866,7 +1867,7 @@ AnimatedTexture::AnimatedTexture() { fps = 4; prev_ticks = 0; current_frame = 0; - VisualServer::get_singleton()->connect("frame_pre_draw", this, "_update_proxy"); + VisualServer::get_singleton()->connect_compat("frame_pre_draw", this, "_update_proxy"); #ifndef NO_THREADS rw_lock = RWLock::create(); @@ -2094,11 +2095,11 @@ RES ResourceFormatLoaderTextureLayered::load(const String &p_path, const String for (int i = 0; i < mipmaps; i++) { uint32_t size = f->get_32(); - PoolVector<uint8_t> pv; + Vector<uint8_t> pv; pv.resize(size); { - PoolVector<uint8_t>::Write w = pv.write(); - f->get_buffer(w.ptr(), size); + uint8_t *w = pv.ptrw(); + f->get_buffer(w, size); } Ref<Image> img = Image::lossless_unpacker(pv); @@ -2121,19 +2122,19 @@ RES ResourceFormatLoaderTextureLayered::load(const String &p_path, const String } else { int total_size = Image::get_image_data_size(tw, th, format, true); - PoolVector<uint8_t> img_data; + Vector<uint8_t> img_data; img_data.resize(total_size); { - PoolVector<uint8_t>::Write w = img_data.write(); + uint8_t *w = img_data.ptrw(); int ofs = 0; for (int i = 0; i < mipmap_images.size(); i++) { - PoolVector<uint8_t> id = mipmap_images[i]->get_data(); + Vector<uint8_t> id = mipmap_images[i]->get_data(); int len = id.size(); - PoolVector<uint8_t>::Read r = id.read(); - copymem(&w[ofs], r.ptr(), len); + const uint8_t *r = id.ptr(); + copymem(&w[ofs], r, len); ofs += len; } } @@ -2155,12 +2156,12 @@ RES ResourceFormatLoaderTextureLayered::load(const String &p_path, const String int total_size = Image::get_image_data_size(tw, th, format, use_mipmaps); - PoolVector<uint8_t> img_data; + Vector<uint8_t> img_data; img_data.resize(total_size); { - PoolVector<uint8_t>::Write w = img_data.write(); - int bytes = f->get_buffer(w.ptr(), total_size); + uint8_t *w = img_data.ptrw(); + int bytes = f->get_buffer(w, total_size); if (bytes != total_size) { if (r_error) { *r_error = ERR_FILE_CORRUPT; diff --git a/scene/resources/texture.h b/scene/resources/texture.h index b42b770903..cd8576539b 100644 --- a/scene/resources/texture.h +++ b/scene/resources/texture.h @@ -52,7 +52,7 @@ public: class Texture2D : public Texture { - GDCLASS(Texture2D, Resource); + GDCLASS(Texture2D, Texture); OBJ_SAVE_TYPE(Texture2D); // Saves derived classes with common type so they can be interchanged. protected: @@ -350,7 +350,7 @@ public: class TextureLayered : public Texture { - GDCLASS(TextureLayered, Resource); + GDCLASS(TextureLayered, Texture); VS::TextureLayeredType layered_type; diff --git a/scene/resources/theme.cpp b/scene/resources/theme.cpp index 75903c1383..5db521bc20 100644 --- a/scene/resources/theme.cpp +++ b/scene/resources/theme.cpp @@ -37,112 +37,112 @@ void Theme::_emit_theme_changed() { emit_changed(); } -PoolVector<String> Theme::_get_icon_list(const String &p_type) const { +Vector<String> Theme::_get_icon_list(const String &p_type) const { - PoolVector<String> ilret; + Vector<String> ilret; List<StringName> il; get_icon_list(p_type, &il); ilret.resize(il.size()); int i = 0; - PoolVector<String>::Write w = ilret.write(); + String *w = ilret.ptrw(); for (List<StringName>::Element *E = il.front(); E; E = E->next(), i++) { w[i] = E->get(); } return ilret; } -PoolVector<String> Theme::_get_stylebox_list(const String &p_type) const { +Vector<String> Theme::_get_stylebox_list(const String &p_type) const { - PoolVector<String> ilret; + Vector<String> ilret; List<StringName> il; get_stylebox_list(p_type, &il); ilret.resize(il.size()); int i = 0; - PoolVector<String>::Write w = ilret.write(); + String *w = ilret.ptrw(); for (List<StringName>::Element *E = il.front(); E; E = E->next(), i++) { w[i] = E->get(); } return ilret; } -PoolVector<String> Theme::_get_stylebox_types(void) const { +Vector<String> Theme::_get_stylebox_types(void) const { - PoolVector<String> ilret; + Vector<String> ilret; List<StringName> il; get_stylebox_types(&il); ilret.resize(il.size()); int i = 0; - PoolVector<String>::Write w = ilret.write(); + String *w = ilret.ptrw(); for (List<StringName>::Element *E = il.front(); E; E = E->next(), i++) { w[i] = E->get(); } return ilret; } -PoolVector<String> Theme::_get_font_list(const String &p_type) const { +Vector<String> Theme::_get_font_list(const String &p_type) const { - PoolVector<String> ilret; + Vector<String> ilret; List<StringName> il; get_font_list(p_type, &il); ilret.resize(il.size()); int i = 0; - PoolVector<String>::Write w = ilret.write(); + String *w = ilret.ptrw(); for (List<StringName>::Element *E = il.front(); E; E = E->next(), i++) { w[i] = E->get(); } return ilret; } -PoolVector<String> Theme::_get_color_list(const String &p_type) const { +Vector<String> Theme::_get_color_list(const String &p_type) const { - PoolVector<String> ilret; + Vector<String> ilret; List<StringName> il; get_color_list(p_type, &il); ilret.resize(il.size()); int i = 0; - PoolVector<String>::Write w = ilret.write(); + String *w = ilret.ptrw(); for (List<StringName>::Element *E = il.front(); E; E = E->next(), i++) { w[i] = E->get(); } return ilret; } -PoolVector<String> Theme::_get_constant_list(const String &p_type) const { +Vector<String> Theme::_get_constant_list(const String &p_type) const { - PoolVector<String> ilret; + Vector<String> ilret; List<StringName> il; get_constant_list(p_type, &il); ilret.resize(il.size()); int i = 0; - PoolVector<String>::Write w = ilret.write(); + String *w = ilret.ptrw(); for (List<StringName>::Element *E = il.front(); E; E = E->next(), i++) { w[i] = E->get(); } return ilret; } -PoolVector<String> Theme::_get_type_list(const String &p_type) const { +Vector<String> Theme::_get_type_list(const String &p_type) const { - PoolVector<String> ilret; + Vector<String> ilret; List<StringName> il; get_type_list(&il); ilret.resize(il.size()); int i = 0; - PoolVector<String>::Write w = ilret.write(); + String *w = ilret.ptrw(); for (List<StringName>::Element *E = il.front(); E; E = E->next(), i++) { w[i] = E->get(); } @@ -302,13 +302,13 @@ void Theme::set_default_theme_font(const Ref<Font> &p_default_font) { return; if (default_theme_font.is_valid()) { - default_theme_font->disconnect("changed", this, "_emit_theme_changed"); + default_theme_font->disconnect_compat("changed", this, "_emit_theme_changed"); } default_theme_font = p_default_font; if (default_theme_font.is_valid()) { - default_theme_font->connect("changed", this, "_emit_theme_changed", varray(), CONNECT_REFERENCE_COUNTED); + default_theme_font->connect_compat("changed", this, "_emit_theme_changed", varray(), CONNECT_REFERENCE_COUNTED); } _change_notify(); @@ -366,13 +366,13 @@ void Theme::set_icon(const StringName &p_name, const StringName &p_type, const R bool new_value = !icon_map.has(p_type) || !icon_map[p_type].has(p_name); if (icon_map[p_type].has(p_name) && icon_map[p_type][p_name].is_valid()) { - icon_map[p_type][p_name]->disconnect("changed", this, "_emit_theme_changed"); + icon_map[p_type][p_name]->disconnect_compat("changed", this, "_emit_theme_changed"); } icon_map[p_type][p_name] = p_icon; if (p_icon.is_valid()) { - icon_map[p_type][p_name]->connect("changed", this, "_emit_theme_changed", varray(), CONNECT_REFERENCE_COUNTED); + icon_map[p_type][p_name]->connect_compat("changed", this, "_emit_theme_changed", varray(), CONNECT_REFERENCE_COUNTED); } if (new_value) { @@ -401,7 +401,7 @@ void Theme::clear_icon(const StringName &p_name, const StringName &p_type) { ERR_FAIL_COND(!icon_map[p_type].has(p_name)); if (icon_map[p_type][p_name].is_valid()) { - icon_map[p_type][p_name]->disconnect("changed", this, "_emit_theme_changed"); + icon_map[p_type][p_name]->disconnect_compat("changed", this, "_emit_theme_changed"); } icon_map[p_type].erase(p_name); @@ -479,13 +479,13 @@ void Theme::set_stylebox(const StringName &p_name, const StringName &p_type, con bool new_value = !style_map.has(p_type) || !style_map[p_type].has(p_name); if (style_map[p_type].has(p_name) && style_map[p_type][p_name].is_valid()) { - style_map[p_type][p_name]->disconnect("changed", this, "_emit_theme_changed"); + style_map[p_type][p_name]->disconnect_compat("changed", this, "_emit_theme_changed"); } style_map[p_type][p_name] = p_style; if (p_style.is_valid()) { - style_map[p_type][p_name]->connect("changed", this, "_emit_theme_changed", varray(), CONNECT_REFERENCE_COUNTED); + style_map[p_type][p_name]->connect_compat("changed", this, "_emit_theme_changed", varray(), CONNECT_REFERENCE_COUNTED); } if (new_value) @@ -514,7 +514,7 @@ void Theme::clear_stylebox(const StringName &p_name, const StringName &p_type) { ERR_FAIL_COND(!style_map[p_type].has(p_name)); if (style_map[p_type][p_name].is_valid()) { - style_map[p_type][p_name]->disconnect("changed", this, "_emit_theme_changed"); + style_map[p_type][p_name]->disconnect_compat("changed", this, "_emit_theme_changed"); } style_map[p_type].erase(p_name); @@ -554,13 +554,13 @@ void Theme::set_font(const StringName &p_name, const StringName &p_type, const R bool new_value = !font_map.has(p_type) || !font_map[p_type].has(p_name); if (font_map[p_type][p_name].is_valid()) { - font_map[p_type][p_name]->disconnect("changed", this, "_emit_theme_changed"); + font_map[p_type][p_name]->disconnect_compat("changed", this, "_emit_theme_changed"); } font_map[p_type][p_name] = p_font; if (p_font.is_valid()) { - font_map[p_type][p_name]->connect("changed", this, "_emit_theme_changed", varray(), CONNECT_REFERENCE_COUNTED); + font_map[p_type][p_name]->connect_compat("changed", this, "_emit_theme_changed", varray(), CONNECT_REFERENCE_COUNTED); } if (new_value) { @@ -589,7 +589,7 @@ void Theme::clear_font(const StringName &p_name, const StringName &p_type) { ERR_FAIL_COND(!font_map[p_type].has(p_name)); if (font_map[p_type][p_name].is_valid()) { - font_map[p_type][p_name]->disconnect("changed", this, "_emit_theme_changed"); + font_map[p_type][p_name]->disconnect_compat("changed", this, "_emit_theme_changed"); } font_map[p_type].erase(p_name); @@ -722,7 +722,7 @@ void Theme::clear() { while ((L = icon_map[*K].next(L))) { Ref<Texture2D> icon = icon_map[*K][*L]; if (icon.is_valid()) { - icon->disconnect("changed", this, "_emit_theme_changed"); + icon->disconnect_compat("changed", this, "_emit_theme_changed"); } } } @@ -735,7 +735,7 @@ void Theme::clear() { while ((L = style_map[*K].next(L))) { Ref<StyleBox> style = style_map[*K][*L]; if (style.is_valid()) { - style->disconnect("changed", this, "_emit_theme_changed"); + style->disconnect_compat("changed", this, "_emit_theme_changed"); } } } @@ -748,7 +748,7 @@ void Theme::clear() { while ((L = font_map[*K].next(L))) { Ref<Font> font = font_map[*K][*L]; if (font.is_valid()) { - font->disconnect("changed", this, "_emit_theme_changed"); + font->disconnect_compat("changed", this, "_emit_theme_changed"); } } } diff --git a/scene/resources/theme.h b/scene/resources/theme.h index e60734b144..3d01f71ea0 100644 --- a/scene/resources/theme.h +++ b/scene/resources/theme.h @@ -52,13 +52,13 @@ class Theme : public Resource { HashMap<StringName, HashMap<StringName, Color> > color_map; HashMap<StringName, HashMap<StringName, int> > constant_map; - PoolVector<String> _get_icon_list(const String &p_type) const; - PoolVector<String> _get_stylebox_list(const String &p_type) const; - PoolVector<String> _get_stylebox_types(void) const; - PoolVector<String> _get_font_list(const String &p_type) const; - PoolVector<String> _get_color_list(const String &p_type) const; - PoolVector<String> _get_constant_list(const String &p_type) const; - PoolVector<String> _get_type_list(const String &p_type) const; + Vector<String> _get_icon_list(const String &p_type) const; + Vector<String> _get_stylebox_list(const String &p_type) const; + Vector<String> _get_stylebox_types(void) const; + Vector<String> _get_font_list(const String &p_type) const; + Vector<String> _get_color_list(const String &p_type) const; + Vector<String> _get_constant_list(const String &p_type) const; + Vector<String> _get_type_list(const String &p_type) const; protected: bool _set(const StringName &p_name, const Variant &p_value); diff --git a/scene/resources/tile_set.cpp b/scene/resources/tile_set.cpp index 7383e18473..f42b56bc83 100644 --- a/scene/resources/tile_set.cpp +++ b/scene/resources/tile_set.cpp @@ -360,7 +360,7 @@ void TileSet::_get_property_list(List<PropertyInfo> *p_list) const { p_list->push_back(PropertyInfo(Variant::VECTOR2, pre + "shape_transform", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR)); p_list->push_back(PropertyInfo(Variant::OBJECT, pre + "shape", PROPERTY_HINT_RESOURCE_TYPE, "Shape2D", PROPERTY_USAGE_NOEDITOR)); p_list->push_back(PropertyInfo(Variant::BOOL, pre + "shape_one_way", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR)); - p_list->push_back(PropertyInfo(Variant::REAL, pre + "shape_one_way_margin", PROPERTY_HINT_RANGE, "0,128,0.01", PROPERTY_USAGE_NOEDITOR)); + p_list->push_back(PropertyInfo(Variant::FLOAT, pre + "shape_one_way_margin", PROPERTY_HINT_RANGE, "0,128,0.01", PROPERTY_USAGE_NOEDITOR)); p_list->push_back(PropertyInfo(Variant::ARRAY, pre + "shapes", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR)); p_list->push_back(PropertyInfo(Variant::INT, pre + "z_index", PROPERTY_HINT_RANGE, itos(VS::CANVAS_ITEM_Z_MIN) + "," + itos(VS::CANVAS_ITEM_Z_MAX) + ",1", PROPERTY_USAGE_NOEDITOR)); } diff --git a/scene/resources/visual_shader.cpp b/scene/resources/visual_shader.cpp index f80fe9f791..556d299198 100644 --- a/scene/resources/visual_shader.cpp +++ b/scene/resources/visual_shader.cpp @@ -32,6 +32,7 @@ #include "core/vmap.h" #include "servers/visual/shader_types.h" +#include "visual_shader_nodes.h" bool VisualShaderNode::is_simple_decl() const { return simple_decl; @@ -127,6 +128,7 @@ void VisualShaderNode::_bind_methods() { ADD_SIGNAL(MethodInfo("editor_refresh_request")); BIND_ENUM_CONSTANT(PORT_TYPE_SCALAR); + BIND_ENUM_CONSTANT(PORT_TYPE_SCALAR_INT); BIND_ENUM_CONSTANT(PORT_TYPE_VECTOR); BIND_ENUM_CONSTANT(PORT_TYPE_BOOLEAN); BIND_ENUM_CONSTANT(PORT_TYPE_TRANSFORM); @@ -266,14 +268,13 @@ void VisualShaderNodeCustom::_bind_methods() { BIND_VMETHOD(MethodInfo(Variant::STRING, "_get_name")); BIND_VMETHOD(MethodInfo(Variant::STRING, "_get_description")); BIND_VMETHOD(MethodInfo(Variant::STRING, "_get_category")); - BIND_VMETHOD(MethodInfo(Variant::STRING, "_get_subcategory")); BIND_VMETHOD(MethodInfo(Variant::INT, "_get_return_icon_type")); BIND_VMETHOD(MethodInfo(Variant::INT, "_get_input_port_count")); BIND_VMETHOD(MethodInfo(Variant::INT, "_get_input_port_type", PropertyInfo(Variant::INT, "port"))); - BIND_VMETHOD(MethodInfo(Variant::STRING, "_get_input_port_name", PropertyInfo(Variant::INT, "port"))); + BIND_VMETHOD(MethodInfo(Variant::STRING_NAME, "_get_input_port_name", PropertyInfo(Variant::INT, "port"))); BIND_VMETHOD(MethodInfo(Variant::INT, "_get_output_port_count")); BIND_VMETHOD(MethodInfo(Variant::INT, "_get_output_port_type", PropertyInfo(Variant::INT, "port"))); - BIND_VMETHOD(MethodInfo(Variant::STRING, "_get_output_port_name", PropertyInfo(Variant::INT, "port"))); + BIND_VMETHOD(MethodInfo(Variant::STRING_NAME, "_get_output_port_name", PropertyInfo(Variant::INT, "port"))); BIND_VMETHOD(MethodInfo(Variant::STRING, "_get_code", PropertyInfo(Variant::ARRAY, "input_vars"), PropertyInfo(Variant::ARRAY, "output_vars"), PropertyInfo(Variant::INT, "mode"), PropertyInfo(Variant::INT, "type"))); BIND_VMETHOD(MethodInfo(Variant::STRING, "_get_global_code", PropertyInfo(Variant::INT, "mode"))); BIND_VMETHOD(MethodInfo(Variant::BOOL, "_is_highend")); @@ -285,6 +286,49 @@ VisualShaderNodeCustom::VisualShaderNodeCustom() { ///////////////////////////////////////////////////////// +void VisualShader::set_version(const String &p_version) { + version = p_version; +} + +String VisualShader::get_version() const { + return version; +} + +void VisualShader::update_version(const String &p_new_version) { + if (version == "") { + for (int i = 0; i < TYPE_MAX; i++) { + for (Map<int, Node>::Element *E = graph[i].nodes.front(); E; E = E->next()) { + Ref<VisualShaderNodeExpression> expression = Object::cast_to<VisualShaderNodeExpression>(E->get().node.ptr()); + if (expression.is_valid()) { + for (int j = 0; j < expression->get_input_port_count(); j++) { + int type = expression->get_input_port_type(j); + if (type > 0) { // + PORT_TYPE_SCALAR_INT + type += 1; + } + expression->set_input_port_type(j, type); + } + for (int j = 0; j < expression->get_output_port_count(); j++) { + int type = expression->get_output_port_type(j); + if (type > 0) { // + PORT_TYPE_SCALAR_INT + type += 1; + } + expression->set_output_port_type(j, type); + } + } + Ref<VisualShaderNodeCompare> compare = Object::cast_to<VisualShaderNodeCompare>(E->get().node.ptr()); + if (compare.is_valid()) { + int ctype = int(compare->get_comparison_type()); + if (int(ctype) > 0) { // + PORT_TYPE_SCALAR_INT + ctype += 1; + } + compare->set_comparison_type(VisualShaderNodeCompare::ComparisonType(ctype)); + } + } + } + } + set_version(p_new_version); +} + void VisualShader::add_node(Type p_type, const Ref<VisualShaderNode> &p_node, const Vector2 &p_position, int p_id) { ERR_FAIL_COND(p_node.is_null()); ERR_FAIL_COND(p_id < 2); @@ -305,10 +349,10 @@ void VisualShader::add_node(Type p_type, const Ref<VisualShaderNode> &p_node, co if (input.is_valid()) { input->shader_mode = shader_mode; input->shader_type = p_type; - input->connect("input_type_changed", this, "_input_type_changed", varray(p_type, p_id)); + input->connect_compat("input_type_changed", this, "_input_type_changed", varray(p_type, p_id)); } - n.node->connect("changed", this, "_queue_update"); + n.node->connect_compat("changed", this, "_queue_update"); Ref<VisualShaderNodeCustom> custom = n.node; if (custom.is_valid()) { @@ -375,10 +419,10 @@ void VisualShader::remove_node(Type p_type, int p_id) { Ref<VisualShaderNodeInput> input = g->nodes[p_id].node; if (input.is_valid()) { - input->disconnect("input_type_changed", this, "_input_type_changed"); + input->disconnect_compat("input_type_changed", this, "_input_type_changed"); } - g->nodes[p_id].node->disconnect("changed", this, "_queue_update"); + g->nodes[p_id].node->disconnect_compat("changed", this, "_queue_update"); g->nodes.erase(p_id); @@ -470,7 +514,7 @@ bool VisualShader::can_connect_nodes(Type p_type, int p_from_node, int p_from_po } bool VisualShader::is_port_types_compatible(int p_a, int p_b) const { - return MAX(0, p_a - 2) == (MAX(0, p_b - 2)); + return MAX(0, p_a - 3) == (MAX(0, p_b - 3)); } void VisualShader::connect_nodes_forced(Type p_type, int p_from_node, int p_from_port, int p_to_node, int p_to_port) { @@ -698,9 +742,11 @@ String VisualShader::generate_preview_shader(Type p_type, int p_node, int p_port ERR_FAIL_COND_V(err != OK, String()); if (node->get_output_port_type(p_port) == VisualShaderNode::PORT_TYPE_SCALAR) { - code += "\tCOLOR.rgb = vec3( n_out" + itos(p_node) + "p" + itos(p_port) + " );\n"; + code += "\tCOLOR.rgb = vec3(n_out" + itos(p_node) + "p" + itos(p_port) + " );\n"; + } else if (node->get_output_port_type(p_port) == VisualShaderNode::PORT_TYPE_SCALAR_INT) { + code += "\tCOLOR.rgb = vec3(float(n_out" + itos(p_node) + "p" + itos(p_port) + "));\n"; } else if (node->get_output_port_type(p_port) == VisualShaderNode::PORT_TYPE_BOOLEAN) { - code += "\tCOLOR.rgb = vec3( n_out" + itos(p_node) + "p" + itos(p_port) + " ? 1.0 : 0.0 );\n"; + code += "\tCOLOR.rgb = vec3(n_out" + itos(p_node) + "p" + itos(p_port) + " ? 1.0 : 0.0);\n"; } else { code += "\tCOLOR.rgb = n_out" + itos(p_node) + "p" + itos(p_port) + ";\n"; } @@ -985,8 +1031,8 @@ bool VisualShader::_get(const StringName &p_name, Variant &r_ret) const { } return false; } -void VisualShader::_get_property_list(List<PropertyInfo> *p_list) const { +void VisualShader::_get_property_list(List<PropertyInfo> *p_list) const { //mode p_list->push_back(PropertyInfo(Variant::INT, "mode", PROPERTY_HINT_ENUM, "Spatial,CanvasItem,Particles")); //render modes @@ -995,7 +1041,6 @@ void VisualShader::_get_property_list(List<PropertyInfo> *p_list) const { Set<String> toggles; for (int i = 0; i < ShaderTypes::get_singleton()->get_modes(VisualServer::ShaderMode(shader_mode)).size(); i++) { - String mode = ShaderTypes::get_singleton()->get_modes(VisualServer::ShaderMode(shader_mode))[i]; int idx = 0; bool in_enum = false; @@ -1020,7 +1065,6 @@ void VisualShader::_get_property_list(List<PropertyInfo> *p_list) const { } for (Map<String, String>::Element *E = blend_mode_enums.front(); E; E = E->next()) { - p_list->push_back(PropertyInfo(Variant::INT, "modes/" + E->key(), PROPERTY_HINT_ENUM, E->get())); } @@ -1050,7 +1094,7 @@ void VisualShader::_get_property_list(List<PropertyInfo> *p_list) const { p_list->push_back(PropertyInfo(Variant::STRING, prop_name + "/expression", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR)); } } - p_list->push_back(PropertyInfo(Variant::POOL_INT_ARRAY, "nodes/" + String(type_string[i]) + "/connections", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR)); + p_list->push_back(PropertyInfo(Variant::PACKED_INT32_ARRAY, "nodes/" + String(type_string[i]) + "/connections", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR)); } } @@ -1113,24 +1157,40 @@ Error VisualShader::_write_node(Type type, StringBuilder &global_code, StringBui inputs[i] = src_var; } else if (in_type == VisualShaderNode::PORT_TYPE_SCALAR && out_type == VisualShaderNode::PORT_TYPE_VECTOR) { inputs[i] = "dot(" + src_var + ", vec3(0.333333, 0.333333, 0.333333))"; + } else if (in_type == VisualShaderNode::PORT_TYPE_SCALAR_INT && out_type == VisualShaderNode::PORT_TYPE_VECTOR) { + inputs[i] = "dot(float(" + src_var + "), vec3(0.333333, 0.333333, 0.333333))"; } else if (in_type == VisualShaderNode::PORT_TYPE_VECTOR && out_type == VisualShaderNode::PORT_TYPE_SCALAR) { inputs[i] = "vec3(" + src_var + ")"; + } else if (in_type == VisualShaderNode::PORT_TYPE_VECTOR && out_type == VisualShaderNode::PORT_TYPE_SCALAR_INT) { + inputs[i] = "vec3(float(" + src_var + "))"; } else if (in_type == VisualShaderNode::PORT_TYPE_BOOLEAN && out_type == VisualShaderNode::PORT_TYPE_VECTOR) { inputs[i] = "all(bvec3(" + src_var + "))"; } else if (in_type == VisualShaderNode::PORT_TYPE_BOOLEAN && out_type == VisualShaderNode::PORT_TYPE_SCALAR) { inputs[i] = src_var + " > 0.0 ? true : false"; + } else if (in_type == VisualShaderNode::PORT_TYPE_BOOLEAN && out_type == VisualShaderNode::PORT_TYPE_SCALAR_INT) { + inputs[i] = src_var + " > 0 ? true : false"; } else if (in_type == VisualShaderNode::PORT_TYPE_SCALAR && out_type == VisualShaderNode::PORT_TYPE_BOOLEAN) { inputs[i] = src_var + " ? 1.0 : 0.0"; + } else if (in_type == VisualShaderNode::PORT_TYPE_SCALAR_INT && out_type == VisualShaderNode::PORT_TYPE_BOOLEAN) { + inputs[i] = src_var + " ? 1 : 0"; } else if (in_type == VisualShaderNode::PORT_TYPE_VECTOR && out_type == VisualShaderNode::PORT_TYPE_BOOLEAN) { inputs[i] = "vec3(" + src_var + " ? 1.0 : 0.0)"; + } else if (in_type == VisualShaderNode::PORT_TYPE_SCALAR && out_type == VisualShaderNode::PORT_TYPE_SCALAR_INT) { + inputs[i] = "float(" + src_var + ")"; + } else if (in_type == VisualShaderNode::PORT_TYPE_SCALAR_INT && out_type == VisualShaderNode::PORT_TYPE_SCALAR) { + inputs[i] = "int(" + src_var + ")"; } } else { Variant defval = vsnode->get_input_port_default_value(i); - if (defval.get_type() == Variant::REAL || defval.get_type() == Variant::INT) { + if (defval.get_type() == Variant::FLOAT) { float val = defval; inputs[i] = "n_in" + itos(node) + "p" + itos(i); code += "\tfloat " + inputs[i] + " = " + vformat("%.5f", val) + ";\n"; + } else if (defval.get_type() == Variant::INT) { + int val = defval; + inputs[i] = "n_in" + itos(node) + "p" + itos(i); + code += "\tint " + inputs[i] + " = " + itos(val) + ";\n"; } else if (defval.get_type() == Variant::BOOL) { bool val = defval; inputs[i] = "n_in" + itos(node) + "p" + itos(i); @@ -1170,6 +1230,7 @@ Error VisualShader::_write_node(Type type, StringBuilder &global_code, StringBui String var_name = "n_out" + itos(node) + "p" + itos(i); switch (vsnode->get_output_port_type(i)) { case VisualShaderNode::PORT_TYPE_SCALAR: outputs[i] = "float " + var_name; break; + case VisualShaderNode::PORT_TYPE_SCALAR_INT: outputs[i] = "int " + var_name; break; case VisualShaderNode::PORT_TYPE_VECTOR: outputs[i] = "vec3 " + var_name; break; case VisualShaderNode::PORT_TYPE_BOOLEAN: outputs[i] = "bool " + var_name; break; case VisualShaderNode::PORT_TYPE_TRANSFORM: outputs[i] = "mat4 " + var_name; break; @@ -1183,6 +1244,7 @@ Error VisualShader::_write_node(Type type, StringBuilder &global_code, StringBui outputs[i] = "n_out" + itos(node) + "p" + itos(i); switch (vsnode->get_output_port_type(i)) { case VisualShaderNode::PORT_TYPE_SCALAR: code += String() + "\tfloat " + outputs[i] + ";\n"; break; + case VisualShaderNode::PORT_TYPE_SCALAR_INT: code += String() + "\tint " + outputs[i] + ";\n"; break; case VisualShaderNode::PORT_TYPE_VECTOR: code += String() + "\tvec3 " + outputs[i] + ";\n"; break; case VisualShaderNode::PORT_TYPE_BOOLEAN: code += String() + "\tbool " + outputs[i] + ";\n"; break; case VisualShaderNode::PORT_TYPE_TRANSFORM: code += String() + "\tmat4 " + outputs[i] + ";\n"; break; @@ -1412,6 +1474,9 @@ void VisualShader::_bind_methods() { ClassDB::bind_method(D_METHOD("get_node_connections", "type"), &VisualShader::_get_node_connections); + ClassDB::bind_method(D_METHOD("set_version", "version"), &VisualShader::set_version); + ClassDB::bind_method(D_METHOD("get_version"), &VisualShader::get_version); + ClassDB::bind_method(D_METHOD("set_graph_offset", "offset"), &VisualShader::set_graph_offset); ClassDB::bind_method(D_METHOD("get_graph_offset"), &VisualShader::get_graph_offset); @@ -1421,6 +1486,7 @@ void VisualShader::_bind_methods() { ClassDB::bind_method(D_METHOD("_input_type_changed"), &VisualShader::_input_type_changed); ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "graph_offset", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_graph_offset", "get_graph_offset"); + ADD_PROPERTY(PropertyInfo(Variant::STRING, "version", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_version", "get_version"); BIND_ENUM_CONSTANT(TYPE_VERTEX); BIND_ENUM_CONSTANT(TYPE_FRAGMENT); @@ -1576,7 +1642,7 @@ const VisualShaderNodeInput::Port VisualShaderNodeInput::ports[] = { { Shader::MODE_PARTICLES, VisualShader::TYPE_VERTEX, VisualShaderNode::PORT_TYPE_SCALAR, "delta", "DELTA" }, { Shader::MODE_PARTICLES, VisualShader::TYPE_VERTEX, VisualShaderNode::PORT_TYPE_SCALAR, "lifetime", "LIFETIME" }, - { Shader::MODE_PARTICLES, VisualShader::TYPE_VERTEX, VisualShaderNode::PORT_TYPE_SCALAR, "index", "float(INDEX)" }, + { Shader::MODE_PARTICLES, VisualShader::TYPE_VERTEX, VisualShaderNode::PORT_TYPE_SCALAR_INT, "index", "INDEX" }, { Shader::MODE_PARTICLES, VisualShader::TYPE_VERTEX, VisualShaderNode::PORT_TYPE_TRANSFORM, "emission_transform", "EMISSION_TRANSFORM" }, { Shader::MODE_PARTICLES, VisualShader::TYPE_VERTEX, VisualShaderNode::PORT_TYPE_SCALAR, "time", "TIME" }, @@ -1684,17 +1750,20 @@ String VisualShaderNodeInput::generate_code(Shader::Mode p_mode, VisualShader::T switch (get_output_port_type(0)) { case PORT_TYPE_SCALAR: { code = "\t" + p_output_vars[0] + " = 0.0;\n"; - } break; //default (none found) is scalar + } break; + case PORT_TYPE_SCALAR_INT: { + code = "\t" + p_output_vars[0] + " = 0;\n"; + } break; case PORT_TYPE_VECTOR: { code = "\t" + p_output_vars[0] + " = vec3(0.0);\n"; - } break; //default (none found) is scalar + } break; case PORT_TYPE_TRANSFORM: { code = "\t" + p_output_vars[0] + " = mat4( vec4(1.0,0.0,0.0,0.0), vec4(0.0,1.0,0.0,0.0), vec4(0.0,0.0,1.0,0.0), vec4(0.0,0.0,0.0,1.0) );\n"; - } break; //default (none found) is scalar + } break; case PORT_TYPE_BOOLEAN: { code = "\t" + p_output_vars[0] + " = false;\n"; } break; - default: + default: //default (none found) is scalar break; } } @@ -1847,7 +1916,7 @@ void VisualShaderNodeInput::_bind_methods() { ClassDB::bind_method(D_METHOD("get_input_name"), &VisualShaderNodeInput::get_input_name); ClassDB::bind_method(D_METHOD("get_input_real_name"), &VisualShaderNodeInput::get_input_real_name); - ADD_PROPERTY(PropertyInfo(Variant::STRING, "input_name", PROPERTY_HINT_ENUM, ""), "set_input_name", "get_input_name"); + ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "input_name", PROPERTY_HINT_ENUM, ""), "set_input_name", "get_input_name"); ADD_SIGNAL(MethodInfo("input_type_changed")); } VisualShaderNodeInput::VisualShaderNodeInput() { @@ -2047,7 +2116,7 @@ void VisualShaderNodeUniform::_bind_methods() { ClassDB::bind_method(D_METHOD("set_uniform_name", "name"), &VisualShaderNodeUniform::set_uniform_name); ClassDB::bind_method(D_METHOD("get_uniform_name"), &VisualShaderNodeUniform::get_uniform_name); - ADD_PROPERTY(PropertyInfo(Variant::STRING, "uniform_name"), "set_uniform_name", "get_uniform_name"); + ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "uniform_name"), "set_uniform_name", "get_uniform_name"); } VisualShaderNodeUniform::VisualShaderNodeUniform() { @@ -2626,6 +2695,9 @@ String VisualShaderNodeExpression::generate_code(Shader::Mode p_mode, VisualShad case PORT_TYPE_SCALAR: tk = "0.0"; break; + case PORT_TYPE_SCALAR_INT: + tk = "0"; + break; case PORT_TYPE_VECTOR: tk = "vec3(0.0, 0.0, 0.0)"; break; diff --git a/scene/resources/visual_shader.h b/scene/resources/visual_shader.h index 1ee75a4cb7..450dcfa081 100644 --- a/scene/resources/visual_shader.h +++ b/scene/resources/visual_shader.h @@ -41,6 +41,10 @@ class VisualShaderNode; class VisualShader : public Shader { GDCLASS(VisualShader, Shader); + friend class VisualShaderNodeVersionChecker; + + String version = ""; + public: enum Type { TYPE_VERTEX, @@ -118,6 +122,11 @@ protected: void _get_property_list(List<PropertyInfo> *p_list) const; public: + void set_version(const String &p_version); + String get_version() const; + + void update_version(const String &p_new_version); + enum { NODE_ID_INVALID = -1, NODE_ID_OUTPUT = 0, @@ -182,6 +191,7 @@ protected: public: enum PortType { PORT_TYPE_SCALAR, + PORT_TYPE_SCALAR_INT, PORT_TYPE_VECTOR, PORT_TYPE_BOOLEAN, PORT_TYPE_TRANSFORM, diff --git a/scene/resources/visual_shader_nodes.cpp b/scene/resources/visual_shader_nodes.cpp index 95a8155c31..2064ca10f3 100644 --- a/scene/resources/visual_shader_nodes.cpp +++ b/scene/resources/visual_shader_nodes.cpp @@ -30,66 +30,127 @@ #include "visual_shader_nodes.h" -////////////// Scalar +////////////// Scalar(Float) -String VisualShaderNodeScalarConstant::get_caption() const { - return "Scalar"; +String VisualShaderNodeFloatConstant::get_caption() const { + return "ScalarFloat"; } -int VisualShaderNodeScalarConstant::get_input_port_count() const { +int VisualShaderNodeFloatConstant::get_input_port_count() const { return 0; } -VisualShaderNodeScalarConstant::PortType VisualShaderNodeScalarConstant::get_input_port_type(int p_port) const { +VisualShaderNodeFloatConstant::PortType VisualShaderNodeFloatConstant::get_input_port_type(int p_port) const { return PORT_TYPE_SCALAR; } -String VisualShaderNodeScalarConstant::get_input_port_name(int p_port) const { +String VisualShaderNodeFloatConstant::get_input_port_name(int p_port) const { return String(); } -int VisualShaderNodeScalarConstant::get_output_port_count() const { +int VisualShaderNodeFloatConstant::get_output_port_count() const { return 1; } -VisualShaderNodeScalarConstant::PortType VisualShaderNodeScalarConstant::get_output_port_type(int p_port) const { +VisualShaderNodeFloatConstant::PortType VisualShaderNodeFloatConstant::get_output_port_type(int p_port) const { return PORT_TYPE_SCALAR; } -String VisualShaderNodeScalarConstant::get_output_port_name(int p_port) const { +String VisualShaderNodeFloatConstant::get_output_port_name(int p_port) const { return ""; //no output port means the editor will be used as port } -String VisualShaderNodeScalarConstant::generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview) const { +String VisualShaderNodeFloatConstant::generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview) const { return "\t" + p_output_vars[0] + " = " + vformat("%.6f", constant) + ";\n"; } -void VisualShaderNodeScalarConstant::set_constant(float p_value) { +void VisualShaderNodeFloatConstant::set_constant(float p_value) { constant = p_value; emit_changed(); } -float VisualShaderNodeScalarConstant::get_constant() const { +float VisualShaderNodeFloatConstant::get_constant() const { return constant; } -Vector<StringName> VisualShaderNodeScalarConstant::get_editable_properties() const { +Vector<StringName> VisualShaderNodeFloatConstant::get_editable_properties() const { Vector<StringName> props; props.push_back("constant"); return props; } -void VisualShaderNodeScalarConstant::_bind_methods() { +void VisualShaderNodeFloatConstant::_bind_methods() { - ClassDB::bind_method(D_METHOD("set_constant", "value"), &VisualShaderNodeScalarConstant::set_constant); - ClassDB::bind_method(D_METHOD("get_constant"), &VisualShaderNodeScalarConstant::get_constant); + ClassDB::bind_method(D_METHOD("set_constant", "value"), &VisualShaderNodeFloatConstant::set_constant); + ClassDB::bind_method(D_METHOD("get_constant"), &VisualShaderNodeFloatConstant::get_constant); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "constant"), "set_constant", "get_constant"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "constant"), "set_constant", "get_constant"); } -VisualShaderNodeScalarConstant::VisualShaderNodeScalarConstant() { +VisualShaderNodeFloatConstant::VisualShaderNodeFloatConstant() { + constant = 0.0; +} + +////////////// Scalar(Int) + +String VisualShaderNodeIntConstant::get_caption() const { + return "ScalarInt"; +} + +int VisualShaderNodeIntConstant::get_input_port_count() const { + return 0; +} + +VisualShaderNodeIntConstant::PortType VisualShaderNodeIntConstant::get_input_port_type(int p_port) const { + return PORT_TYPE_SCALAR_INT; +} + +String VisualShaderNodeIntConstant::get_input_port_name(int p_port) const { + return String(); +} + +int VisualShaderNodeIntConstant::get_output_port_count() const { + return 1; +} + +VisualShaderNodeIntConstant::PortType VisualShaderNodeIntConstant::get_output_port_type(int p_port) const { + return PORT_TYPE_SCALAR_INT; +} + +String VisualShaderNodeIntConstant::get_output_port_name(int p_port) const { + return ""; //no output port means the editor will be used as port +} + +String VisualShaderNodeIntConstant::generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview) const { + return "\t" + p_output_vars[0] + " = " + itos(constant) + ";\n"; +} + +void VisualShaderNodeIntConstant::set_constant(int p_value) { + constant = p_value; + emit_changed(); +} + +int VisualShaderNodeIntConstant::get_constant() const { + return constant; +} + +Vector<StringName> VisualShaderNodeIntConstant::get_editable_properties() const { + Vector<StringName> props; + props.push_back("constant"); + return props; +} + +void VisualShaderNodeIntConstant::_bind_methods() { + + ClassDB::bind_method(D_METHOD("set_constant", "value"), &VisualShaderNodeIntConstant::set_constant); + ClassDB::bind_method(D_METHOD("get_constant"), &VisualShaderNodeIntConstant::get_constant); + + ADD_PROPERTY(PropertyInfo(Variant::INT, "constant"), "set_constant", "get_constant"); +} + +VisualShaderNodeIntConstant::VisualShaderNodeIntConstant() { constant = 0; } @@ -936,37 +997,37 @@ VisualShaderNodeCubemap::VisualShaderNodeCubemap() { simple_decl = false; } -////////////// Scalar Op +////////////// Float Op -String VisualShaderNodeScalarOp::get_caption() const { - return "ScalarOp"; +String VisualShaderNodeFloatOp::get_caption() const { + return "FloatOp"; } -int VisualShaderNodeScalarOp::get_input_port_count() const { +int VisualShaderNodeFloatOp::get_input_port_count() const { return 2; } -VisualShaderNodeScalarOp::PortType VisualShaderNodeScalarOp::get_input_port_type(int p_port) const { +VisualShaderNodeFloatOp::PortType VisualShaderNodeFloatOp::get_input_port_type(int p_port) const { return PORT_TYPE_SCALAR; } -String VisualShaderNodeScalarOp::get_input_port_name(int p_port) const { +String VisualShaderNodeFloatOp::get_input_port_name(int p_port) const { return p_port == 0 ? "a" : "b"; } -int VisualShaderNodeScalarOp::get_output_port_count() const { +int VisualShaderNodeFloatOp::get_output_port_count() const { return 1; } -VisualShaderNodeScalarOp::PortType VisualShaderNodeScalarOp::get_output_port_type(int p_port) const { +VisualShaderNodeFloatOp::PortType VisualShaderNodeFloatOp::get_output_port_type(int p_port) const { return PORT_TYPE_SCALAR; } -String VisualShaderNodeScalarOp::get_output_port_name(int p_port) const { +String VisualShaderNodeFloatOp::get_output_port_name(int p_port) const { return "op"; //no output port means the editor will be used as port } -String VisualShaderNodeScalarOp::generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview) const { +String VisualShaderNodeFloatOp::generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview) const { String code = "\t" + p_output_vars[0] + " = "; switch (op) { @@ -986,27 +1047,27 @@ String VisualShaderNodeScalarOp::generate_code(Shader::Mode p_mode, VisualShader return code; } -void VisualShaderNodeScalarOp::set_operator(Operator p_op) { +void VisualShaderNodeFloatOp::set_operator(Operator p_op) { op = p_op; emit_changed(); } -VisualShaderNodeScalarOp::Operator VisualShaderNodeScalarOp::get_operator() const { +VisualShaderNodeFloatOp::Operator VisualShaderNodeFloatOp::get_operator() const { return op; } -Vector<StringName> VisualShaderNodeScalarOp::get_editable_properties() const { +Vector<StringName> VisualShaderNodeFloatOp::get_editable_properties() const { Vector<StringName> props; props.push_back("operator"); return props; } -void VisualShaderNodeScalarOp::_bind_methods() { +void VisualShaderNodeFloatOp::_bind_methods() { - ClassDB::bind_method(D_METHOD("set_operator", "op"), &VisualShaderNodeScalarOp::set_operator); - ClassDB::bind_method(D_METHOD("get_operator"), &VisualShaderNodeScalarOp::get_operator); + ClassDB::bind_method(D_METHOD("set_operator", "op"), &VisualShaderNodeFloatOp::set_operator); + ClassDB::bind_method(D_METHOD("get_operator"), &VisualShaderNodeFloatOp::get_operator); ADD_PROPERTY(PropertyInfo(Variant::INT, "operator", PROPERTY_HINT_ENUM, "Add,Sub,Multiply,Divide,Remainder,Power,Max,Min,Atan2,Step"), "set_operator", "get_operator"); @@ -1022,12 +1083,97 @@ void VisualShaderNodeScalarOp::_bind_methods() { BIND_ENUM_CONSTANT(OP_STEP); } -VisualShaderNodeScalarOp::VisualShaderNodeScalarOp() { +VisualShaderNodeFloatOp::VisualShaderNodeFloatOp() { op = OP_ADD; set_input_port_default_value(0, 0.0); set_input_port_default_value(1, 0.0); } +////////////// Integer Op + +String VisualShaderNodeIntOp::get_caption() const { + return "IntOp"; +} + +int VisualShaderNodeIntOp::get_input_port_count() const { + return 2; +} + +VisualShaderNodeIntOp::PortType VisualShaderNodeIntOp::get_input_port_type(int p_port) const { + return PORT_TYPE_SCALAR_INT; +} + +String VisualShaderNodeIntOp::get_input_port_name(int p_port) const { + return p_port == 0 ? "a" : "b"; +} + +int VisualShaderNodeIntOp::get_output_port_count() const { + return 1; +} + +VisualShaderNodeIntOp::PortType VisualShaderNodeIntOp::get_output_port_type(int p_port) const { + return PORT_TYPE_SCALAR_INT; +} + +String VisualShaderNodeIntOp::get_output_port_name(int p_port) const { + return "op"; //no output port means the editor will be used as port +} + +String VisualShaderNodeIntOp::generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview) const { + + String code = "\t" + p_output_vars[0] + " = "; + switch (op) { + + case OP_ADD: code += p_input_vars[0] + " + " + p_input_vars[1] + ";\n"; break; + case OP_SUB: code += p_input_vars[0] + " - " + p_input_vars[1] + ";\n"; break; + case OP_MUL: code += p_input_vars[0] + " * " + p_input_vars[1] + ";\n"; break; + case OP_DIV: code += p_input_vars[0] + " / " + p_input_vars[1] + ";\n"; break; + case OP_MOD: code += p_input_vars[0] + " % " + p_input_vars[1] + ";\n"; break; + case OP_MAX: code += "max(" + p_input_vars[0] + ", " + p_input_vars[1] + ");\n"; break; + case OP_MIN: code += "min(" + p_input_vars[0] + ", " + p_input_vars[1] + ");\n"; break; + } + + return code; +} + +void VisualShaderNodeIntOp::set_operator(Operator p_op) { + + op = p_op; + emit_changed(); +} + +VisualShaderNodeIntOp::Operator VisualShaderNodeIntOp::get_operator() const { + return op; +} + +Vector<StringName> VisualShaderNodeIntOp::get_editable_properties() const { + Vector<StringName> props; + props.push_back("operator"); + return props; +} + +void VisualShaderNodeIntOp::_bind_methods() { + + ClassDB::bind_method(D_METHOD("set_operator", "op"), &VisualShaderNodeIntOp::set_operator); + ClassDB::bind_method(D_METHOD("get_operator"), &VisualShaderNodeIntOp::get_operator); + + ADD_PROPERTY(PropertyInfo(Variant::INT, "operator", PROPERTY_HINT_ENUM, "Add,Sub,Multiply,Divide,Remainder,Max,Min"), "set_operator", "get_operator"); + + BIND_ENUM_CONSTANT(OP_ADD); + BIND_ENUM_CONSTANT(OP_SUB); + BIND_ENUM_CONSTANT(OP_MUL); + BIND_ENUM_CONSTANT(OP_DIV); + BIND_ENUM_CONSTANT(OP_MOD); + BIND_ENUM_CONSTANT(OP_MAX); + BIND_ENUM_CONSTANT(OP_MIN); +} + +VisualShaderNodeIntOp::VisualShaderNodeIntOp() { + op = OP_ADD; + set_input_port_default_value(0, 0); + set_input_port_default_value(1, 0); +} + ////////////// Vector Op String VisualShaderNodeVectorOp::get_caption() const { @@ -1462,37 +1608,37 @@ VisualShaderNodeTransformVecMult::VisualShaderNodeTransformVecMult() { set_input_port_default_value(1, Vector3()); } -////////////// Scalar Func +////////////// Float Func -String VisualShaderNodeScalarFunc::get_caption() const { - return "ScalarFunc"; +String VisualShaderNodeFloatFunc::get_caption() const { + return "FloatFunc"; } -int VisualShaderNodeScalarFunc::get_input_port_count() const { +int VisualShaderNodeFloatFunc::get_input_port_count() const { return 1; } -VisualShaderNodeScalarFunc::PortType VisualShaderNodeScalarFunc::get_input_port_type(int p_port) const { +VisualShaderNodeFloatFunc::PortType VisualShaderNodeFloatFunc::get_input_port_type(int p_port) const { return PORT_TYPE_SCALAR; } -String VisualShaderNodeScalarFunc::get_input_port_name(int p_port) const { +String VisualShaderNodeFloatFunc::get_input_port_name(int p_port) const { return ""; } -int VisualShaderNodeScalarFunc::get_output_port_count() const { +int VisualShaderNodeFloatFunc::get_output_port_count() const { return 1; } -VisualShaderNodeScalarFunc::PortType VisualShaderNodeScalarFunc::get_output_port_type(int p_port) const { +VisualShaderNodeFloatFunc::PortType VisualShaderNodeFloatFunc::get_output_port_type(int p_port) const { return PORT_TYPE_SCALAR; } -String VisualShaderNodeScalarFunc::get_output_port_name(int p_port) const { +String VisualShaderNodeFloatFunc::get_output_port_name(int p_port) const { return ""; //no output port means the editor will be used as port } -String VisualShaderNodeScalarFunc::generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview) const { +String VisualShaderNodeFloatFunc::generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview) const { static const char *scalar_func_id[FUNC_ONEMINUS + 1] = { "sin($)", @@ -1532,27 +1678,27 @@ String VisualShaderNodeScalarFunc::generate_code(Shader::Mode p_mode, VisualShad return "\t" + p_output_vars[0] + " = " + String(scalar_func_id[func]).replace("$", p_input_vars[0]) + ";\n"; } -void VisualShaderNodeScalarFunc::set_function(Function p_func) { +void VisualShaderNodeFloatFunc::set_function(Function p_func) { func = p_func; emit_changed(); } -VisualShaderNodeScalarFunc::Function VisualShaderNodeScalarFunc::get_function() const { +VisualShaderNodeFloatFunc::Function VisualShaderNodeFloatFunc::get_function() const { return func; } -Vector<StringName> VisualShaderNodeScalarFunc::get_editable_properties() const { +Vector<StringName> VisualShaderNodeFloatFunc::get_editable_properties() const { Vector<StringName> props; props.push_back("function"); return props; } -void VisualShaderNodeScalarFunc::_bind_methods() { +void VisualShaderNodeFloatFunc::_bind_methods() { - ClassDB::bind_method(D_METHOD("set_function", "func"), &VisualShaderNodeScalarFunc::set_function); - ClassDB::bind_method(D_METHOD("get_function"), &VisualShaderNodeScalarFunc::get_function); + ClassDB::bind_method(D_METHOD("set_function", "func"), &VisualShaderNodeFloatFunc::set_function); + ClassDB::bind_method(D_METHOD("get_function"), &VisualShaderNodeFloatFunc::get_function); ADD_PROPERTY(PropertyInfo(Variant::INT, "function", PROPERTY_HINT_ENUM, "Sin,Cos,Tan,ASin,ACos,ATan,SinH,CosH,TanH,Log,Exp,Sqrt,Abs,Sign,Floor,Round,Ceil,Frac,Saturate,Negate,ACosH,ASinH,ATanH,Degrees,Exp2,InverseSqrt,Log2,Radians,Reciprocal,RoundEven,Trunc,OneMinus"), "set_function", "get_function"); @@ -1590,11 +1736,108 @@ void VisualShaderNodeScalarFunc::_bind_methods() { BIND_ENUM_CONSTANT(FUNC_ONEMINUS); } -VisualShaderNodeScalarFunc::VisualShaderNodeScalarFunc() { +VisualShaderNodeFloatFunc::VisualShaderNodeFloatFunc() { func = FUNC_SIGN; set_input_port_default_value(0, 0.0); } +////////////// Int Func + +String VisualShaderNodeIntFunc::get_caption() const { + return "IntFunc"; +} + +int VisualShaderNodeIntFunc::get_input_port_count() const { + if (func == FUNC_CLAMP) { + return 3; + } + return 1; +} + +VisualShaderNodeIntFunc::PortType VisualShaderNodeIntFunc::get_input_port_type(int p_port) const { + return PORT_TYPE_SCALAR_INT; +} + +String VisualShaderNodeIntFunc::get_input_port_name(int p_port) const { + if (func == FUNC_CLAMP) { + if (p_port == 0) { + return ""; + } else if (p_port == 1) { + return "min"; + } else if (p_port == 2) { + return "max"; + } + } + return ""; +} + +int VisualShaderNodeIntFunc::get_output_port_count() const { + return 1; +} + +VisualShaderNodeIntFunc::PortType VisualShaderNodeIntFunc::get_output_port_type(int p_port) const { + return PORT_TYPE_SCALAR_INT; +} + +String VisualShaderNodeIntFunc::get_output_port_name(int p_port) const { + return ""; //no output port means the editor will be used as port +} + +String VisualShaderNodeIntFunc::generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview) const { + if (func == FUNC_CLAMP) { + return "\t" + p_output_vars[0] + " = clamp(" + p_input_vars[0] + ", " + p_input_vars[1] + ", " + p_input_vars[2] + ");\n"; + } + + static const char *int_func_id[FUNC_SIGN + 1] = { + "abs($)", + "", + "-($)", + "sign($)" + }; + + return "\t" + p_output_vars[0] + " = " + String(int_func_id[func]).replace("$", p_input_vars[0]) + ";\n"; +} + +void VisualShaderNodeIntFunc::set_function(Function p_func) { + if (func != p_func) { + if (p_func == FUNC_CLAMP) { + set_input_port_default_value(1, 0); + set_input_port_default_value(2, 0); + } + } + func = p_func; + emit_changed(); +} + +VisualShaderNodeIntFunc::Function VisualShaderNodeIntFunc::get_function() const { + + return func; +} + +Vector<StringName> VisualShaderNodeIntFunc::get_editable_properties() const { + Vector<StringName> props; + props.push_back("function"); + return props; +} + +void VisualShaderNodeIntFunc::_bind_methods() { + + ClassDB::bind_method(D_METHOD("set_function", "func"), &VisualShaderNodeIntFunc::set_function); + ClassDB::bind_method(D_METHOD("get_function"), &VisualShaderNodeIntFunc::get_function); + + ADD_PROPERTY(PropertyInfo(Variant::INT, "function", PROPERTY_HINT_ENUM, "Abs,Clamp,Negate,Sign"), "set_function", "get_function"); + + BIND_ENUM_CONSTANT(FUNC_ABS); + BIND_ENUM_CONSTANT(FUNC_CLAMP); + BIND_ENUM_CONSTANT(FUNC_NEGATE); + BIND_ENUM_CONSTANT(FUNC_SIGN); +} + +VisualShaderNodeIntFunc::VisualShaderNodeIntFunc() { + func = FUNC_SIGN; + set_input_port_default_value(0, 0); +} + ////////////// Vector Func String VisualShaderNodeVectorFunc::get_caption() const { @@ -3008,37 +3251,37 @@ VisualShaderNodeTransformDecompose::VisualShaderNodeTransformDecompose() { set_input_port_default_value(0, Transform()); } -////////////// Scalar Uniform +////////////// Float Uniform -String VisualShaderNodeScalarUniform::get_caption() const { - return "ScalarUniform"; +String VisualShaderNodeFloatUniform::get_caption() const { + return "FloatUniform"; } -int VisualShaderNodeScalarUniform::get_input_port_count() const { +int VisualShaderNodeFloatUniform::get_input_port_count() const { return 0; } -VisualShaderNodeScalarUniform::PortType VisualShaderNodeScalarUniform::get_input_port_type(int p_port) const { +VisualShaderNodeFloatUniform::PortType VisualShaderNodeFloatUniform::get_input_port_type(int p_port) const { return PORT_TYPE_SCALAR; } -String VisualShaderNodeScalarUniform::get_input_port_name(int p_port) const { +String VisualShaderNodeFloatUniform::get_input_port_name(int p_port) const { return String(); } -int VisualShaderNodeScalarUniform::get_output_port_count() const { +int VisualShaderNodeFloatUniform::get_output_port_count() const { return 1; } -VisualShaderNodeScalarUniform::PortType VisualShaderNodeScalarUniform::get_output_port_type(int p_port) const { +VisualShaderNodeFloatUniform::PortType VisualShaderNodeFloatUniform::get_output_port_type(int p_port) const { return PORT_TYPE_SCALAR; } -String VisualShaderNodeScalarUniform::get_output_port_name(int p_port) const { +String VisualShaderNodeFloatUniform::get_output_port_name(int p_port) const { return ""; //no output port means the editor will be used as port } -String VisualShaderNodeScalarUniform::generate_global(Shader::Mode p_mode, VisualShader::Type p_type, int p_id) const { +String VisualShaderNodeFloatUniform::generate_global(Shader::Mode p_mode, VisualShader::Type p_type, int p_id) const { if (hint == HINT_RANGE) { return "uniform float " + get_uniform_name() + " : hint_range(" + rtos(hint_range_min) + ", " + rtos(hint_range_max) + ");\n"; } else if (hint == HINT_RANGE_STEP) { @@ -3047,70 +3290,70 @@ String VisualShaderNodeScalarUniform::generate_global(Shader::Mode p_mode, Visua return "uniform float " + get_uniform_name() + ";\n"; } -String VisualShaderNodeScalarUniform::generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview) const { +String VisualShaderNodeFloatUniform::generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview) const { return "\t" + p_output_vars[0] + " = " + get_uniform_name() + ";\n"; } -void VisualShaderNodeScalarUniform::set_hint(Hint p_hint) { +void VisualShaderNodeFloatUniform::set_hint(Hint p_hint) { hint = p_hint; emit_changed(); } -VisualShaderNodeScalarUniform::Hint VisualShaderNodeScalarUniform::get_hint() const { +VisualShaderNodeFloatUniform::Hint VisualShaderNodeFloatUniform::get_hint() const { return hint; } -void VisualShaderNodeScalarUniform::set_min(float p_value) { +void VisualShaderNodeFloatUniform::set_min(float p_value) { hint_range_min = p_value; emit_changed(); } -float VisualShaderNodeScalarUniform::get_min() const { +float VisualShaderNodeFloatUniform::get_min() const { return hint_range_min; } -void VisualShaderNodeScalarUniform::set_max(float p_value) { +void VisualShaderNodeFloatUniform::set_max(float p_value) { hint_range_max = p_value; emit_changed(); } -float VisualShaderNodeScalarUniform::get_max() const { +float VisualShaderNodeFloatUniform::get_max() const { return hint_range_max; } -void VisualShaderNodeScalarUniform::set_step(float p_value) { +void VisualShaderNodeFloatUniform::set_step(float p_value) { hint_range_step = p_value; emit_changed(); } -float VisualShaderNodeScalarUniform::get_step() const { +float VisualShaderNodeFloatUniform::get_step() const { return hint_range_step; } -void VisualShaderNodeScalarUniform::_bind_methods() { - ClassDB::bind_method(D_METHOD("set_hint", "hint"), &VisualShaderNodeScalarUniform::set_hint); - ClassDB::bind_method(D_METHOD("get_hint"), &VisualShaderNodeScalarUniform::get_hint); +void VisualShaderNodeFloatUniform::_bind_methods() { + ClassDB::bind_method(D_METHOD("set_hint", "hint"), &VisualShaderNodeFloatUniform::set_hint); + ClassDB::bind_method(D_METHOD("get_hint"), &VisualShaderNodeFloatUniform::get_hint); - ClassDB::bind_method(D_METHOD("set_min", "value"), &VisualShaderNodeScalarUniform::set_min); - ClassDB::bind_method(D_METHOD("get_min"), &VisualShaderNodeScalarUniform::get_min); + ClassDB::bind_method(D_METHOD("set_min", "value"), &VisualShaderNodeFloatUniform::set_min); + ClassDB::bind_method(D_METHOD("get_min"), &VisualShaderNodeFloatUniform::get_min); - ClassDB::bind_method(D_METHOD("set_max", "value"), &VisualShaderNodeScalarUniform::set_max); - ClassDB::bind_method(D_METHOD("get_max"), &VisualShaderNodeScalarUniform::get_max); + ClassDB::bind_method(D_METHOD("set_max", "value"), &VisualShaderNodeFloatUniform::set_max); + ClassDB::bind_method(D_METHOD("get_max"), &VisualShaderNodeFloatUniform::get_max); - ClassDB::bind_method(D_METHOD("set_step", "value"), &VisualShaderNodeScalarUniform::set_step); - ClassDB::bind_method(D_METHOD("get_step"), &VisualShaderNodeScalarUniform::get_step); + ClassDB::bind_method(D_METHOD("set_step", "value"), &VisualShaderNodeFloatUniform::set_step); + ClassDB::bind_method(D_METHOD("get_step"), &VisualShaderNodeFloatUniform::get_step); ADD_PROPERTY(PropertyInfo(Variant::INT, "hint", PROPERTY_HINT_ENUM, "None,Range,Range+Step"), "set_hint", "get_hint"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "min"), "set_min", "get_min"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "max"), "set_max", "get_max"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "step"), "set_step", "get_step"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "min"), "set_min", "get_min"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "max"), "set_max", "get_max"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "step"), "set_step", "get_step"); BIND_ENUM_CONSTANT(HINT_NONE); BIND_ENUM_CONSTANT(HINT_RANGE); BIND_ENUM_CONSTANT(HINT_RANGE_STEP); } -Vector<StringName> VisualShaderNodeScalarUniform::get_editable_properties() const { +Vector<StringName> VisualShaderNodeFloatUniform::get_editable_properties() const { Vector<StringName> props; props.push_back("hint"); if (hint == HINT_RANGE || hint == HINT_RANGE_STEP) { @@ -3123,13 +3366,135 @@ Vector<StringName> VisualShaderNodeScalarUniform::get_editable_properties() cons return props; } -VisualShaderNodeScalarUniform::VisualShaderNodeScalarUniform() { +VisualShaderNodeFloatUniform::VisualShaderNodeFloatUniform() { hint = HINT_NONE; hint_range_min = 0.0; hint_range_max = 1.0; hint_range_step = 0.1; } +////////////// Integer Uniform + +String VisualShaderNodeIntUniform::get_caption() const { + return "IntUniform"; +} + +int VisualShaderNodeIntUniform::get_input_port_count() const { + return 0; +} + +VisualShaderNodeIntUniform::PortType VisualShaderNodeIntUniform::get_input_port_type(int p_port) const { + return PORT_TYPE_SCALAR_INT; +} + +String VisualShaderNodeIntUniform::get_input_port_name(int p_port) const { + return String(); +} + +int VisualShaderNodeIntUniform::get_output_port_count() const { + return 1; +} + +VisualShaderNodeIntUniform::PortType VisualShaderNodeIntUniform::get_output_port_type(int p_port) const { + return PORT_TYPE_SCALAR_INT; +} + +String VisualShaderNodeIntUniform::get_output_port_name(int p_port) const { + return ""; //no output port means the editor will be used as port +} + +String VisualShaderNodeIntUniform::generate_global(Shader::Mode p_mode, VisualShader::Type p_type, int p_id) const { + if (hint == HINT_RANGE) { + return "uniform int " + get_uniform_name() + " : hint_range(" + rtos(hint_range_min) + ", " + rtos(hint_range_max) + ");\n"; + } else if (hint == HINT_RANGE_STEP) { + return "uniform int " + get_uniform_name() + " : hint_range(" + rtos(hint_range_min) + ", " + rtos(hint_range_max) + ", " + rtos(hint_range_step) + ");\n"; + } + return "uniform int " + get_uniform_name() + ";\n"; +} + +String VisualShaderNodeIntUniform::generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview) const { + return "\t" + p_output_vars[0] + " = " + get_uniform_name() + ";\n"; +} + +void VisualShaderNodeIntUniform::set_hint(Hint p_hint) { + hint = p_hint; + emit_changed(); +} + +VisualShaderNodeIntUniform::Hint VisualShaderNodeIntUniform::get_hint() const { + return hint; +} + +void VisualShaderNodeIntUniform::set_min(int p_value) { + hint_range_min = p_value; + emit_changed(); +} + +int VisualShaderNodeIntUniform::get_min() const { + return hint_range_min; +} + +void VisualShaderNodeIntUniform::set_max(int p_value) { + hint_range_max = p_value; + emit_changed(); +} + +int VisualShaderNodeIntUniform::get_max() const { + return hint_range_max; +} + +void VisualShaderNodeIntUniform::set_step(int p_value) { + hint_range_step = p_value; + emit_changed(); +} + +int VisualShaderNodeIntUniform::get_step() const { + return hint_range_step; +} + +void VisualShaderNodeIntUniform::_bind_methods() { + ClassDB::bind_method(D_METHOD("set_hint", "hint"), &VisualShaderNodeIntUniform::set_hint); + ClassDB::bind_method(D_METHOD("get_hint"), &VisualShaderNodeIntUniform::get_hint); + + ClassDB::bind_method(D_METHOD("set_min", "value"), &VisualShaderNodeIntUniform::set_min); + ClassDB::bind_method(D_METHOD("get_min"), &VisualShaderNodeIntUniform::get_min); + + ClassDB::bind_method(D_METHOD("set_max", "value"), &VisualShaderNodeIntUniform::set_max); + ClassDB::bind_method(D_METHOD("get_max"), &VisualShaderNodeIntUniform::get_max); + + ClassDB::bind_method(D_METHOD("set_step", "value"), &VisualShaderNodeIntUniform::set_step); + ClassDB::bind_method(D_METHOD("get_step"), &VisualShaderNodeIntUniform::get_step); + + ADD_PROPERTY(PropertyInfo(Variant::INT, "hint", PROPERTY_HINT_ENUM, "None,Range,Range+Step"), "set_hint", "get_hint"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "min"), "set_min", "get_min"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "max"), "set_max", "get_max"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "step"), "set_step", "get_step"); + + BIND_ENUM_CONSTANT(HINT_NONE); + BIND_ENUM_CONSTANT(HINT_RANGE); + BIND_ENUM_CONSTANT(HINT_RANGE_STEP); +} + +Vector<StringName> VisualShaderNodeIntUniform::get_editable_properties() const { + Vector<StringName> props; + props.push_back("hint"); + if (hint == HINT_RANGE || hint == HINT_RANGE_STEP) { + props.push_back("min"); + props.push_back("max"); + } + if (hint == HINT_RANGE_STEP) { + props.push_back("step"); + } + return props; +} + +VisualShaderNodeIntUniform::VisualShaderNodeIntUniform() { + hint = HINT_NONE; + hint_range_min = 0; + hint_range_max = 100; + hint_range_step = 1; +} + ////////////// Boolean Uniform String VisualShaderNodeBooleanUniform::get_caption() const { @@ -3968,6 +4333,8 @@ VisualShaderNodeCompare::PortType VisualShaderNodeCompare::get_input_port_type(i switch (ctype) { case CTYPE_SCALAR: return PORT_TYPE_SCALAR; + case CTYPE_SCALAR_INT: + return PORT_TYPE_SCALAR_INT; case CTYPE_VECTOR: return PORT_TYPE_VECTOR; case CTYPE_BOOLEAN: @@ -4046,10 +4413,14 @@ String VisualShaderNodeCompare::generate_code(Shader::Mode p_mode, VisualShader: } else if (func == FUNC_NOT_EQUAL) { code += "\t" + p_output_vars[0] + " = !(abs(" + p_input_vars[0] + " - " + p_input_vars[1] + ") < " + p_input_vars[2] + ");"; } else { - code += "\t" + p_output_vars[0] + " = " + (p_input_vars[0] + "$" + p_input_vars[1]).replace("$", ops[func]) + ";\n"; + code += "\t" + p_output_vars[0] + " = " + (p_input_vars[0] + " $ " + p_input_vars[1]).replace("$", ops[func]) + ";\n"; } break; + case CTYPE_SCALAR_INT: + code += "\t" + p_output_vars[0] + " = " + (p_input_vars[0] + " $ " + p_input_vars[1]).replace("$", ops[func]) + ";\n"; + break; + case CTYPE_VECTOR: code += "\t{\n"; code += "\t\tbvec3 _bv = " + String(funcs[func]).replace("$", p_input_vars[0] + ", " + p_input_vars[1]) + ";\n"; @@ -4085,6 +4456,11 @@ void VisualShaderNodeCompare::set_comparison_type(ComparisonType p_type) { set_input_port_default_value(1, 0.0); simple_decl = true; break; + case CTYPE_SCALAR_INT: + set_input_port_default_value(0, 0); + set_input_port_default_value(1, 0); + simple_decl = true; + break; case CTYPE_VECTOR: set_input_port_default_value(0, Vector3(0.0, 0.0, 0.0)); set_input_port_default_value(1, Vector3(0.0, 0.0, 0.0)); @@ -4151,11 +4527,12 @@ void VisualShaderNodeCompare::_bind_methods() { ClassDB::bind_method(D_METHOD("set_condition", "condition"), &VisualShaderNodeCompare::set_condition); ClassDB::bind_method(D_METHOD("get_condition"), &VisualShaderNodeCompare::get_condition); - ADD_PROPERTY(PropertyInfo(Variant::INT, "type", PROPERTY_HINT_ENUM, "Scalar,Vector,Boolean,Transform"), "set_comparison_type", "get_comparison_type"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "type", PROPERTY_HINT_ENUM, "Float,Int,Vector,Boolean,Transform"), "set_comparison_type", "get_comparison_type"); ADD_PROPERTY(PropertyInfo(Variant::INT, "function", PROPERTY_HINT_ENUM, "a == b,a != b,a > b,a >= b,a < b,a <= b"), "set_function", "get_function"); ADD_PROPERTY(PropertyInfo(Variant::INT, "condition", PROPERTY_HINT_ENUM, "All,Any"), "set_condition", "get_condition"); BIND_ENUM_CONSTANT(CTYPE_SCALAR); + BIND_ENUM_CONSTANT(CTYPE_SCALAR_INT); BIND_ENUM_CONSTANT(CTYPE_VECTOR); BIND_ENUM_CONSTANT(CTYPE_BOOLEAN); BIND_ENUM_CONSTANT(CTYPE_TRANSFORM); diff --git a/scene/resources/visual_shader_nodes.h b/scene/resources/visual_shader_nodes.h index 85782bc509..035e39230c 100644 --- a/scene/resources/visual_shader_nodes.h +++ b/scene/resources/visual_shader_nodes.h @@ -37,8 +37,8 @@ /// CONSTANTS /////////////////////////////////////// -class VisualShaderNodeScalarConstant : public VisualShaderNode { - GDCLASS(VisualShaderNodeScalarConstant, VisualShaderNode); +class VisualShaderNodeFloatConstant : public VisualShaderNode { + GDCLASS(VisualShaderNodeFloatConstant, VisualShaderNode); float constant; protected: @@ -62,7 +62,37 @@ public: virtual Vector<StringName> get_editable_properties() const; - VisualShaderNodeScalarConstant(); + VisualShaderNodeFloatConstant(); +}; + +/////////////////////////////////////// + +class VisualShaderNodeIntConstant : public VisualShaderNode { + GDCLASS(VisualShaderNodeIntConstant, VisualShaderNode); + int constant; + +protected: + static void _bind_methods(); + +public: + virtual String get_caption() const; + + virtual int get_input_port_count() const; + virtual PortType get_input_port_type(int p_port) const; + virtual String get_input_port_name(int p_port) const; + + virtual int get_output_port_count() const; + virtual PortType get_output_port_type(int p_port) const; + virtual String get_output_port_name(int p_port) const; + + virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty + + void set_constant(int p_value); + int get_constant() const; + + virtual Vector<StringName> get_editable_properties() const; + + VisualShaderNodeIntConstant(); }; /////////////////////////////////////// @@ -314,8 +344,8 @@ VARIANT_ENUM_CAST(VisualShaderNodeCubemap::Source) /// OPS /////////////////////////////////////// -class VisualShaderNodeScalarOp : public VisualShaderNode { - GDCLASS(VisualShaderNodeScalarOp, VisualShaderNode); +class VisualShaderNodeFloatOp : public VisualShaderNode { + GDCLASS(VisualShaderNodeFloatOp, VisualShaderNode); public: enum Operator { @@ -354,10 +384,52 @@ public: virtual Vector<StringName> get_editable_properties() const; - VisualShaderNodeScalarOp(); + VisualShaderNodeFloatOp(); }; -VARIANT_ENUM_CAST(VisualShaderNodeScalarOp::Operator) +VARIANT_ENUM_CAST(VisualShaderNodeFloatOp::Operator) + +class VisualShaderNodeIntOp : public VisualShaderNode { + GDCLASS(VisualShaderNodeIntOp, VisualShaderNode); + +public: + enum Operator { + OP_ADD, + OP_SUB, + OP_MUL, + OP_DIV, + OP_MOD, + OP_MAX, + OP_MIN, + }; + +protected: + Operator op; + + static void _bind_methods(); + +public: + virtual String get_caption() const; + + virtual int get_input_port_count() const; + virtual PortType get_input_port_type(int p_port) const; + virtual String get_input_port_name(int p_port) const; + + virtual int get_output_port_count() const; + virtual PortType get_output_port_type(int p_port) const; + virtual String get_output_port_name(int p_port) const; + + virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty + + void set_operator(Operator p_op); + Operator get_operator() const; + + virtual Vector<StringName> get_editable_properties() const; + + VisualShaderNodeIntOp(); +}; + +VARIANT_ENUM_CAST(VisualShaderNodeIntOp::Operator) class VisualShaderNodeVectorOp : public VisualShaderNode { GDCLASS(VisualShaderNodeVectorOp, VisualShaderNode); @@ -539,11 +611,11 @@ public: VARIANT_ENUM_CAST(VisualShaderNodeTransformVecMult::Operator) /////////////////////////////////////// -/// SCALAR FUNC +/// FLOAT FUNC /////////////////////////////////////// -class VisualShaderNodeScalarFunc : public VisualShaderNode { - GDCLASS(VisualShaderNodeScalarFunc, VisualShaderNode); +class VisualShaderNodeFloatFunc : public VisualShaderNode { + GDCLASS(VisualShaderNodeFloatFunc, VisualShaderNode); public: enum Function { @@ -604,10 +676,53 @@ public: virtual Vector<StringName> get_editable_properties() const; - VisualShaderNodeScalarFunc(); + VisualShaderNodeFloatFunc(); +}; + +VARIANT_ENUM_CAST(VisualShaderNodeFloatFunc::Function) + +/////////////////////////////////////// +/// INT FUNC +/////////////////////////////////////// + +class VisualShaderNodeIntFunc : public VisualShaderNode { + GDCLASS(VisualShaderNodeIntFunc, VisualShaderNode); + +public: + enum Function { + FUNC_ABS, + FUNC_CLAMP, + FUNC_NEGATE, + FUNC_SIGN, + }; + +protected: + Function func; + + static void _bind_methods(); + +public: + virtual String get_caption() const; + + virtual int get_input_port_count() const; + virtual PortType get_input_port_type(int p_port) const; + virtual String get_input_port_name(int p_port) const; + + virtual int get_output_port_count() const; + virtual PortType get_output_port_type(int p_port) const; + virtual String get_output_port_name(int p_port) const; + + virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty + + void set_function(Function p_func); + Function get_function() const; + + virtual Vector<StringName> get_editable_properties() const; + + VisualShaderNodeIntFunc(); }; -VARIANT_ENUM_CAST(VisualShaderNodeScalarFunc::Function) +VARIANT_ENUM_CAST(VisualShaderNodeIntFunc::Function) /////////////////////////////////////// /// VECTOR FUNC @@ -1297,8 +1412,8 @@ public: /// UNIFORMS /////////////////////////////////////// -class VisualShaderNodeScalarUniform : public VisualShaderNodeUniform { - GDCLASS(VisualShaderNodeScalarUniform, VisualShaderNodeUniform); +class VisualShaderNodeFloatUniform : public VisualShaderNodeUniform { + GDCLASS(VisualShaderNodeFloatUniform, VisualShaderNodeUniform); public: enum Hint { @@ -1344,10 +1459,62 @@ public: virtual Vector<StringName> get_editable_properties() const; - VisualShaderNodeScalarUniform(); + VisualShaderNodeFloatUniform(); +}; + +VARIANT_ENUM_CAST(VisualShaderNodeFloatUniform::Hint) + +class VisualShaderNodeIntUniform : public VisualShaderNodeUniform { + GDCLASS(VisualShaderNodeIntUniform, VisualShaderNodeUniform); + +public: + enum Hint { + HINT_NONE, + HINT_RANGE, + HINT_RANGE_STEP, + }; + +private: + Hint hint; + int hint_range_min; + int hint_range_max; + int hint_range_step; + +protected: + static void _bind_methods(); + +public: + virtual String get_caption() const; + + virtual int get_input_port_count() const; + virtual PortType get_input_port_type(int p_port) const; + virtual String get_input_port_name(int p_port) const; + + virtual int get_output_port_count() const; + virtual PortType get_output_port_type(int p_port) const; + virtual String get_output_port_name(int p_port) const; + + virtual String generate_global(Shader::Mode p_mode, VisualShader::Type p_type, int p_id) const; + virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty + + void set_hint(Hint p_hint); + Hint get_hint() const; + + void set_min(int p_value); + int get_min() const; + + void set_max(int p_value); + int get_max() const; + + void set_step(int p_value); + int get_step() const; + + virtual Vector<StringName> get_editable_properties() const; + + VisualShaderNodeIntUniform(); }; -VARIANT_ENUM_CAST(VisualShaderNodeScalarUniform::Hint) +VARIANT_ENUM_CAST(VisualShaderNodeIntUniform::Hint) /////////////////////////////////////// @@ -1669,9 +1836,10 @@ class VisualShaderNodeCompare : public VisualShaderNode { public: enum ComparisonType { CTYPE_SCALAR, + CTYPE_SCALAR_INT, CTYPE_VECTOR, CTYPE_BOOLEAN, - CTYPE_TRANSFORM + CTYPE_TRANSFORM, }; enum Function { diff --git a/scene/resources/world.cpp b/scene/resources/world.cpp index 78c08080b5..a7e519479f 100644 --- a/scene/resources/world.cpp +++ b/scene/resources/world.cpp @@ -360,9 +360,9 @@ World::World() { PhysicsServer::get_singleton()->area_set_param(space, PhysicsServer::AREA_PARAM_GRAVITY, GLOBAL_DEF("physics/3d/default_gravity", 9.8)); PhysicsServer::get_singleton()->area_set_param(space, PhysicsServer::AREA_PARAM_GRAVITY_VECTOR, GLOBAL_DEF("physics/3d/default_gravity_vector", Vector3(0, -1, 0))); PhysicsServer::get_singleton()->area_set_param(space, PhysicsServer::AREA_PARAM_LINEAR_DAMP, GLOBAL_DEF("physics/3d/default_linear_damp", 0.1)); - ProjectSettings::get_singleton()->set_custom_property_info("physics/3d/default_linear_damp", PropertyInfo(Variant::REAL, "physics/3d/default_linear_damp", PROPERTY_HINT_RANGE, "-1,100,0.001,or_greater")); + ProjectSettings::get_singleton()->set_custom_property_info("physics/3d/default_linear_damp", PropertyInfo(Variant::FLOAT, "physics/3d/default_linear_damp", PROPERTY_HINT_RANGE, "-1,100,0.001,or_greater")); PhysicsServer::get_singleton()->area_set_param(space, PhysicsServer::AREA_PARAM_ANGULAR_DAMP, GLOBAL_DEF("physics/3d/default_angular_damp", 0.1)); - ProjectSettings::get_singleton()->set_custom_property_info("physics/3d/default_angular_damp", PropertyInfo(Variant::REAL, "physics/3d/default_angular_damp", PROPERTY_HINT_RANGE, "-1,100,0.001,or_greater")); + ProjectSettings::get_singleton()->set_custom_property_info("physics/3d/default_angular_damp", PropertyInfo(Variant::FLOAT, "physics/3d/default_angular_damp", PROPERTY_HINT_RANGE, "-1,100,0.001,or_greater")); #ifdef _3D_DISABLED indexer = NULL; diff --git a/scene/resources/world_2d.cpp b/scene/resources/world_2d.cpp index 5cc809d8e3..6bdc4cf6f0 100644 --- a/scene/resources/world_2d.cpp +++ b/scene/resources/world_2d.cpp @@ -394,9 +394,9 @@ World2D::World2D() { Physics2DServer::get_singleton()->area_set_param(space, Physics2DServer::AREA_PARAM_GRAVITY, GLOBAL_DEF("physics/2d/default_gravity", 98)); Physics2DServer::get_singleton()->area_set_param(space, Physics2DServer::AREA_PARAM_GRAVITY_VECTOR, GLOBAL_DEF("physics/2d/default_gravity_vector", Vector2(0, 1))); Physics2DServer::get_singleton()->area_set_param(space, Physics2DServer::AREA_PARAM_LINEAR_DAMP, GLOBAL_DEF("physics/2d/default_linear_damp", 0.1)); - ProjectSettings::get_singleton()->set_custom_property_info("physics/2d/default_linear_damp", PropertyInfo(Variant::REAL, "physics/2d/default_linear_damp", PROPERTY_HINT_RANGE, "-1,100,0.001,or_greater")); + ProjectSettings::get_singleton()->set_custom_property_info("physics/2d/default_linear_damp", PropertyInfo(Variant::FLOAT, "physics/2d/default_linear_damp", PROPERTY_HINT_RANGE, "-1,100,0.001,or_greater")); Physics2DServer::get_singleton()->area_set_param(space, Physics2DServer::AREA_PARAM_ANGULAR_DAMP, GLOBAL_DEF("physics/2d/default_angular_damp", 1.0)); - ProjectSettings::get_singleton()->set_custom_property_info("physics/2d/default_angular_damp", PropertyInfo(Variant::REAL, "physics/2d/default_angular_damp", PROPERTY_HINT_RANGE, "-1,100,0.001,or_greater")); + ProjectSettings::get_singleton()->set_custom_property_info("physics/2d/default_angular_damp", PropertyInfo(Variant::FLOAT, "physics/2d/default_angular_damp", PROPERTY_HINT_RANGE, "-1,100,0.001,or_greater")); indexer = memnew(SpatialIndexer2D); } diff --git a/servers/arvr/arvr_positional_tracker.cpp b/servers/arvr/arvr_positional_tracker.cpp index 4438475d44..9acc36a139 100644 --- a/servers/arvr/arvr_positional_tracker.cpp +++ b/servers/arvr/arvr_positional_tracker.cpp @@ -58,7 +58,7 @@ void ARVRPositionalTracker::_bind_methods() { ClassDB::bind_method(D_METHOD("get_rumble"), &ARVRPositionalTracker::get_rumble); ClassDB::bind_method(D_METHOD("set_rumble", "rumble"), &ARVRPositionalTracker::set_rumble); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "rumble"), "set_rumble", "get_rumble"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "rumble"), "set_rumble", "get_rumble"); }; void ARVRPositionalTracker::set_type(ARVRServer::TrackerType p_type) { diff --git a/servers/arvr_server.cpp b/servers/arvr_server.cpp index a5bb9f794d..4b3417db6c 100644 --- a/servers/arvr_server.cpp +++ b/servers/arvr_server.cpp @@ -46,7 +46,7 @@ void ARVRServer::_bind_methods() { ClassDB::bind_method(D_METHOD("center_on_hmd", "rotation_mode", "keep_height"), &ARVRServer::center_on_hmd); ClassDB::bind_method(D_METHOD("get_hmd_transform"), &ARVRServer::get_hmd_transform); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "world_scale"), "set_world_scale", "get_world_scale"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "world_scale"), "set_world_scale", "get_world_scale"); ClassDB::bind_method(D_METHOD("get_interface_count"), &ARVRServer::get_interface_count); ClassDB::bind_method(D_METHOD("get_interface", "idx"), &ARVRServer::get_interface); @@ -75,11 +75,11 @@ void ARVRServer::_bind_methods() { BIND_ENUM_CONSTANT(RESET_BUT_KEEP_TILT); BIND_ENUM_CONSTANT(DONT_RESET_ROTATION); - ADD_SIGNAL(MethodInfo("interface_added", PropertyInfo(Variant::STRING, "interface_name"))); - ADD_SIGNAL(MethodInfo("interface_removed", PropertyInfo(Variant::STRING, "interface_name"))); + ADD_SIGNAL(MethodInfo("interface_added", PropertyInfo(Variant::STRING_NAME, "interface_name"))); + ADD_SIGNAL(MethodInfo("interface_removed", PropertyInfo(Variant::STRING_NAME, "interface_name"))); - ADD_SIGNAL(MethodInfo("tracker_added", PropertyInfo(Variant::STRING, "tracker_name"), PropertyInfo(Variant::INT, "type"), PropertyInfo(Variant::INT, "id"))); - ADD_SIGNAL(MethodInfo("tracker_removed", PropertyInfo(Variant::STRING, "tracker_name"), PropertyInfo(Variant::INT, "type"), PropertyInfo(Variant::INT, "id"))); + ADD_SIGNAL(MethodInfo("tracker_added", PropertyInfo(Variant::STRING_NAME, "tracker_name"), PropertyInfo(Variant::INT, "type"), PropertyInfo(Variant::INT, "id"))); + ADD_SIGNAL(MethodInfo("tracker_removed", PropertyInfo(Variant::STRING_NAME, "tracker_name"), PropertyInfo(Variant::INT, "type"), PropertyInfo(Variant::INT, "id"))); }; real_t ARVRServer::get_world_scale() const { diff --git a/servers/audio/audio_stream.cpp b/servers/audio/audio_stream.cpp index 259c5487e9..46e674fd9b 100644 --- a/servers/audio/audio_stream.cpp +++ b/servers/audio/audio_stream.cpp @@ -300,7 +300,7 @@ void AudioStreamRandomPitch::_bind_methods() { ClassDB::bind_method(D_METHOD("get_random_pitch"), &AudioStreamRandomPitch::get_random_pitch); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "audio_stream", PROPERTY_HINT_RESOURCE_TYPE, "AudioStream"), "set_audio_stream", "get_audio_stream"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "random_pitch", PROPERTY_HINT_RANGE, "1,16,0.01"), "set_random_pitch", "get_random_pitch"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "random_pitch", PROPERTY_HINT_RANGE, "1,16,0.01"), "set_random_pitch", "get_random_pitch"); } AudioStreamRandomPitch::AudioStreamRandomPitch() { diff --git a/servers/audio/effects/audio_effect_amplify.cpp b/servers/audio/effects/audio_effect_amplify.cpp index 938d29f764..8ad2ecc5ce 100644 --- a/servers/audio/effects/audio_effect_amplify.cpp +++ b/servers/audio/effects/audio_effect_amplify.cpp @@ -67,7 +67,7 @@ void AudioEffectAmplify::_bind_methods() { ClassDB::bind_method(D_METHOD("set_volume_db", "volume"), &AudioEffectAmplify::set_volume_db); ClassDB::bind_method(D_METHOD("get_volume_db"), &AudioEffectAmplify::get_volume_db); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "volume_db", PROPERTY_HINT_RANGE, "-80,24,0.01"), "set_volume_db", "get_volume_db"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "volume_db", PROPERTY_HINT_RANGE, "-80,24,0.01"), "set_volume_db", "get_volume_db"); } AudioEffectAmplify::AudioEffectAmplify() { diff --git a/servers/audio/effects/audio_effect_chorus.cpp b/servers/audio/effects/audio_effect_chorus.cpp index 58943582c9..34c03dca8d 100644 --- a/servers/audio/effects/audio_effect_chorus.cpp +++ b/servers/audio/effects/audio_effect_chorus.cpp @@ -326,36 +326,36 @@ void AudioEffectChorus::_bind_methods() { ClassDB::bind_method(D_METHOD("get_dry"), &AudioEffectChorus::get_dry); ADD_PROPERTY(PropertyInfo(Variant::INT, "voice_count", PROPERTY_HINT_RANGE, "1,4,1"), "set_voice_count", "get_voice_count"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "dry", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_dry", "get_dry"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "wet", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_wet", "get_wet"); - - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "voice/1/delay_ms", PROPERTY_HINT_RANGE, "0,50,0.01"), "set_voice_delay_ms", "get_voice_delay_ms", 0); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "voice/1/rate_hz", PROPERTY_HINT_RANGE, "0.1,20,0.1"), "set_voice_rate_hz", "get_voice_rate_hz", 0); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "voice/1/depth_ms", PROPERTY_HINT_RANGE, "0,20,0.01"), "set_voice_depth_ms", "get_voice_depth_ms", 0); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "voice/1/level_db", PROPERTY_HINT_RANGE, "-60,24,0.1"), "set_voice_level_db", "get_voice_level_db", 0); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "voice/1/cutoff_hz", PROPERTY_HINT_RANGE, "1,20500,1"), "set_voice_cutoff_hz", "get_voice_cutoff_hz", 0); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "voice/1/pan", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_voice_pan", "get_voice_pan", 0); - - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "voice/2/delay_ms", PROPERTY_HINT_RANGE, "0,50,0.01"), "set_voice_delay_ms", "get_voice_delay_ms", 1); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "voice/2/rate_hz", PROPERTY_HINT_RANGE, "0.1,20,0.1"), "set_voice_rate_hz", "get_voice_rate_hz", 1); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "voice/2/depth_ms", PROPERTY_HINT_RANGE, "0,20,0.01"), "set_voice_depth_ms", "get_voice_depth_ms", 1); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "voice/2/level_db", PROPERTY_HINT_RANGE, "-60,24,0.1"), "set_voice_level_db", "get_voice_level_db", 1); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "voice/2/cutoff_hz", PROPERTY_HINT_RANGE, "1,20500,1"), "set_voice_cutoff_hz", "get_voice_cutoff_hz", 1); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "voice/2/pan", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_voice_pan", "get_voice_pan", 1); - - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "voice/3/delay_ms", PROPERTY_HINT_RANGE, "0,50,0.01"), "set_voice_delay_ms", "get_voice_delay_ms", 2); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "voice/3/rate_hz", PROPERTY_HINT_RANGE, "0.1,20,0.1"), "set_voice_rate_hz", "get_voice_rate_hz", 2); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "voice/3/depth_ms", PROPERTY_HINT_RANGE, "0,20,0.01"), "set_voice_depth_ms", "get_voice_depth_ms", 2); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "voice/3/level_db", PROPERTY_HINT_RANGE, "-60,24,0.1"), "set_voice_level_db", "get_voice_level_db", 2); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "voice/3/cutoff_hz", PROPERTY_HINT_RANGE, "1,20500,1"), "set_voice_cutoff_hz", "get_voice_cutoff_hz", 2); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "voice/3/pan", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_voice_pan", "get_voice_pan", 2); - - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "voice/4/delay_ms", PROPERTY_HINT_RANGE, "0,50,0.01"), "set_voice_delay_ms", "get_voice_delay_ms", 3); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "voice/4/rate_hz", PROPERTY_HINT_RANGE, "0.1,20,0.1"), "set_voice_rate_hz", "get_voice_rate_hz", 3); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "voice/4/depth_ms", PROPERTY_HINT_RANGE, "0,20,0.01"), "set_voice_depth_ms", "get_voice_depth_ms", 3); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "voice/4/level_db", PROPERTY_HINT_RANGE, "-60,24,0.1"), "set_voice_level_db", "get_voice_level_db", 3); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "voice/4/cutoff_hz", PROPERTY_HINT_RANGE, "1,20500,1"), "set_voice_cutoff_hz", "get_voice_cutoff_hz", 3); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "voice/4/pan", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_voice_pan", "get_voice_pan", 3); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "dry", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_dry", "get_dry"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "wet", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_wet", "get_wet"); + + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "voice/1/delay_ms", PROPERTY_HINT_RANGE, "0,50,0.01"), "set_voice_delay_ms", "get_voice_delay_ms", 0); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "voice/1/rate_hz", PROPERTY_HINT_RANGE, "0.1,20,0.1"), "set_voice_rate_hz", "get_voice_rate_hz", 0); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "voice/1/depth_ms", PROPERTY_HINT_RANGE, "0,20,0.01"), "set_voice_depth_ms", "get_voice_depth_ms", 0); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "voice/1/level_db", PROPERTY_HINT_RANGE, "-60,24,0.1"), "set_voice_level_db", "get_voice_level_db", 0); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "voice/1/cutoff_hz", PROPERTY_HINT_RANGE, "1,20500,1"), "set_voice_cutoff_hz", "get_voice_cutoff_hz", 0); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "voice/1/pan", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_voice_pan", "get_voice_pan", 0); + + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "voice/2/delay_ms", PROPERTY_HINT_RANGE, "0,50,0.01"), "set_voice_delay_ms", "get_voice_delay_ms", 1); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "voice/2/rate_hz", PROPERTY_HINT_RANGE, "0.1,20,0.1"), "set_voice_rate_hz", "get_voice_rate_hz", 1); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "voice/2/depth_ms", PROPERTY_HINT_RANGE, "0,20,0.01"), "set_voice_depth_ms", "get_voice_depth_ms", 1); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "voice/2/level_db", PROPERTY_HINT_RANGE, "-60,24,0.1"), "set_voice_level_db", "get_voice_level_db", 1); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "voice/2/cutoff_hz", PROPERTY_HINT_RANGE, "1,20500,1"), "set_voice_cutoff_hz", "get_voice_cutoff_hz", 1); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "voice/2/pan", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_voice_pan", "get_voice_pan", 1); + + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "voice/3/delay_ms", PROPERTY_HINT_RANGE, "0,50,0.01"), "set_voice_delay_ms", "get_voice_delay_ms", 2); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "voice/3/rate_hz", PROPERTY_HINT_RANGE, "0.1,20,0.1"), "set_voice_rate_hz", "get_voice_rate_hz", 2); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "voice/3/depth_ms", PROPERTY_HINT_RANGE, "0,20,0.01"), "set_voice_depth_ms", "get_voice_depth_ms", 2); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "voice/3/level_db", PROPERTY_HINT_RANGE, "-60,24,0.1"), "set_voice_level_db", "get_voice_level_db", 2); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "voice/3/cutoff_hz", PROPERTY_HINT_RANGE, "1,20500,1"), "set_voice_cutoff_hz", "get_voice_cutoff_hz", 2); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "voice/3/pan", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_voice_pan", "get_voice_pan", 2); + + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "voice/4/delay_ms", PROPERTY_HINT_RANGE, "0,50,0.01"), "set_voice_delay_ms", "get_voice_delay_ms", 3); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "voice/4/rate_hz", PROPERTY_HINT_RANGE, "0.1,20,0.1"), "set_voice_rate_hz", "get_voice_rate_hz", 3); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "voice/4/depth_ms", PROPERTY_HINT_RANGE, "0,20,0.01"), "set_voice_depth_ms", "get_voice_depth_ms", 3); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "voice/4/level_db", PROPERTY_HINT_RANGE, "-60,24,0.1"), "set_voice_level_db", "get_voice_level_db", 3); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "voice/4/cutoff_hz", PROPERTY_HINT_RANGE, "1,20500,1"), "set_voice_cutoff_hz", "get_voice_cutoff_hz", 3); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "voice/4/pan", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_voice_pan", "get_voice_pan", 3); } AudioEffectChorus::AudioEffectChorus() { diff --git a/servers/audio/effects/audio_effect_compressor.cpp b/servers/audio/effects/audio_effect_compressor.cpp index 1ef3bb9b10..8d54bd8e36 100644 --- a/servers/audio/effects/audio_effect_compressor.cpp +++ b/servers/audio/effects/audio_effect_compressor.cpp @@ -230,13 +230,13 @@ void AudioEffectCompressor::_bind_methods() { ClassDB::bind_method(D_METHOD("set_sidechain", "sidechain"), &AudioEffectCompressor::set_sidechain); ClassDB::bind_method(D_METHOD("get_sidechain"), &AudioEffectCompressor::get_sidechain); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "threshold", PROPERTY_HINT_RANGE, "-60,0,0.1"), "set_threshold", "get_threshold"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "ratio", PROPERTY_HINT_RANGE, "1,48,0.1"), "set_ratio", "get_ratio"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "gain", PROPERTY_HINT_RANGE, "-20,20,0.1"), "set_gain", "get_gain"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "attack_us", PROPERTY_HINT_RANGE, "20,2000,1"), "set_attack_us", "get_attack_us"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "release_ms", PROPERTY_HINT_RANGE, "20,2000,1"), "set_release_ms", "get_release_ms"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "mix", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_mix", "get_mix"); - ADD_PROPERTY(PropertyInfo(Variant::STRING, "sidechain", PROPERTY_HINT_ENUM), "set_sidechain", "get_sidechain"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "threshold", PROPERTY_HINT_RANGE, "-60,0,0.1"), "set_threshold", "get_threshold"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "ratio", PROPERTY_HINT_RANGE, "1,48,0.1"), "set_ratio", "get_ratio"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "gain", PROPERTY_HINT_RANGE, "-20,20,0.1"), "set_gain", "get_gain"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "attack_us", PROPERTY_HINT_RANGE, "20,2000,1"), "set_attack_us", "get_attack_us"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "release_ms", PROPERTY_HINT_RANGE, "20,2000,1"), "set_release_ms", "get_release_ms"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "mix", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_mix", "get_mix"); + ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "sidechain", PROPERTY_HINT_ENUM), "set_sidechain", "get_sidechain"); } AudioEffectCompressor::AudioEffectCompressor() { diff --git a/servers/audio/effects/audio_effect_delay.cpp b/servers/audio/effects/audio_effect_delay.cpp index 21d979a78c..fa57a94977 100644 --- a/servers/audio/effects/audio_effect_delay.cpp +++ b/servers/audio/effects/audio_effect_delay.cpp @@ -305,22 +305,22 @@ void AudioEffectDelay::_bind_methods() { ClassDB::bind_method(D_METHOD("set_feedback_lowpass", "amount"), &AudioEffectDelay::set_feedback_lowpass); ClassDB::bind_method(D_METHOD("get_feedback_lowpass"), &AudioEffectDelay::get_feedback_lowpass); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "dry", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_dry", "get_dry"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "dry", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_dry", "get_dry"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "tap1/active"), "set_tap1_active", "is_tap1_active"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "tap1/delay_ms", PROPERTY_HINT_RANGE, "0,1500,1"), "set_tap1_delay_ms", "get_tap1_delay_ms"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "tap1/level_db", PROPERTY_HINT_RANGE, "-60,0,0.01"), "set_tap1_level_db", "get_tap1_level_db"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "tap1/pan", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_tap1_pan", "get_tap1_pan"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "tap1/delay_ms", PROPERTY_HINT_RANGE, "0,1500,1"), "set_tap1_delay_ms", "get_tap1_delay_ms"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "tap1/level_db", PROPERTY_HINT_RANGE, "-60,0,0.01"), "set_tap1_level_db", "get_tap1_level_db"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "tap1/pan", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_tap1_pan", "get_tap1_pan"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "tap2/active"), "set_tap2_active", "is_tap2_active"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "tap2/delay_ms", PROPERTY_HINT_RANGE, "0,1500,1"), "set_tap2_delay_ms", "get_tap2_delay_ms"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "tap2/level_db", PROPERTY_HINT_RANGE, "-60,0,0.01"), "set_tap2_level_db", "get_tap2_level_db"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "tap2/pan", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_tap2_pan", "get_tap2_pan"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "tap2/delay_ms", PROPERTY_HINT_RANGE, "0,1500,1"), "set_tap2_delay_ms", "get_tap2_delay_ms"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "tap2/level_db", PROPERTY_HINT_RANGE, "-60,0,0.01"), "set_tap2_level_db", "get_tap2_level_db"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "tap2/pan", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_tap2_pan", "get_tap2_pan"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "feedback/active"), "set_feedback_active", "is_feedback_active"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "feedback/delay_ms", PROPERTY_HINT_RANGE, "0,1500,1"), "set_feedback_delay_ms", "get_feedback_delay_ms"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "feedback/level_db", PROPERTY_HINT_RANGE, "-60,0,0.01"), "set_feedback_level_db", "get_feedback_level_db"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "feedback/lowpass", PROPERTY_HINT_RANGE, "1,16000,1"), "set_feedback_lowpass", "get_feedback_lowpass"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "feedback/delay_ms", PROPERTY_HINT_RANGE, "0,1500,1"), "set_feedback_delay_ms", "get_feedback_delay_ms"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "feedback/level_db", PROPERTY_HINT_RANGE, "-60,0,0.01"), "set_feedback_level_db", "get_feedback_level_db"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "feedback/lowpass", PROPERTY_HINT_RANGE, "1,16000,1"), "set_feedback_lowpass", "get_feedback_lowpass"); } AudioEffectDelay::AudioEffectDelay() { diff --git a/servers/audio/effects/audio_effect_distortion.cpp b/servers/audio/effects/audio_effect_distortion.cpp index 8f2c0743ef..bc4fc7ecd6 100644 --- a/servers/audio/effects/audio_effect_distortion.cpp +++ b/servers/audio/effects/audio_effect_distortion.cpp @@ -172,10 +172,10 @@ void AudioEffectDistortion::_bind_methods() { ClassDB::bind_method(D_METHOD("get_post_gain"), &AudioEffectDistortion::get_post_gain); ADD_PROPERTY(PropertyInfo(Variant::INT, "mode", PROPERTY_HINT_ENUM, "Clip,ATan,LoFi,Overdrive,WaveShape"), "set_mode", "get_mode"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "pre_gain", PROPERTY_HINT_RANGE, "-60,60,0.01"), "set_pre_gain", "get_pre_gain"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "keep_hf_hz", PROPERTY_HINT_RANGE, "1,20500,1"), "set_keep_hf_hz", "get_keep_hf_hz"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "drive", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_drive", "get_drive"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "post_gain", PROPERTY_HINT_RANGE, "-80,24,0.01"), "set_post_gain", "get_post_gain"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "pre_gain", PROPERTY_HINT_RANGE, "-60,60,0.01"), "set_pre_gain", "get_pre_gain"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "keep_hf_hz", PROPERTY_HINT_RANGE, "1,20500,1"), "set_keep_hf_hz", "get_keep_hf_hz"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "drive", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_drive", "get_drive"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "post_gain", PROPERTY_HINT_RANGE, "-80,24,0.01"), "set_post_gain", "get_post_gain"); BIND_ENUM_CONSTANT(MODE_CLIP); BIND_ENUM_CONSTANT(MODE_ATAN); diff --git a/servers/audio/effects/audio_effect_eq.cpp b/servers/audio/effects/audio_effect_eq.cpp index ecd5f04d5f..b315fdc3bb 100644 --- a/servers/audio/effects/audio_effect_eq.cpp +++ b/servers/audio/effects/audio_effect_eq.cpp @@ -117,7 +117,7 @@ void AudioEffectEQ::_get_property_list(List<PropertyInfo> *p_list) const { for (int i = 0; i < band_names.size(); i++) { - p_list->push_back(PropertyInfo(Variant::REAL, band_names[i], PROPERTY_HINT_RANGE, "-60,24,0.1")); + p_list->push_back(PropertyInfo(Variant::FLOAT, band_names[i], PROPERTY_HINT_RANGE, "-60,24,0.1")); } } diff --git a/servers/audio/effects/audio_effect_filter.cpp b/servers/audio/effects/audio_effect_filter.cpp index 9ba5ceb500..18047bc99e 100644 --- a/servers/audio/effects/audio_effect_filter.cpp +++ b/servers/audio/effects/audio_effect_filter.cpp @@ -156,9 +156,9 @@ void AudioEffectFilter::_bind_methods() { ClassDB::bind_method(D_METHOD("set_db", "amount"), &AudioEffectFilter::set_db); ClassDB::bind_method(D_METHOD("get_db"), &AudioEffectFilter::get_db); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "cutoff_hz", PROPERTY_HINT_RANGE, "1,20500,1"), "set_cutoff", "get_cutoff"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "resonance", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_resonance", "get_resonance"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "gain", PROPERTY_HINT_RANGE, "0,4,0.01"), "set_gain", "get_gain"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "cutoff_hz", PROPERTY_HINT_RANGE, "1,20500,1"), "set_cutoff", "get_cutoff"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "resonance", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_resonance", "get_resonance"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "gain", PROPERTY_HINT_RANGE, "0,4,0.01"), "set_gain", "get_gain"); ADD_PROPERTY(PropertyInfo(Variant::INT, "db", PROPERTY_HINT_ENUM, "6 dB,12 dB,18 dB,24 dB"), "set_db", "get_db"); BIND_ENUM_CONSTANT(FILTER_6DB); diff --git a/servers/audio/effects/audio_effect_limiter.cpp b/servers/audio/effects/audio_effect_limiter.cpp index d495964719..40a4243168 100644 --- a/servers/audio/effects/audio_effect_limiter.cpp +++ b/servers/audio/effects/audio_effect_limiter.cpp @@ -128,10 +128,10 @@ void AudioEffectLimiter::_bind_methods() { ClassDB::bind_method(D_METHOD("set_soft_clip_ratio", "soft_clip"), &AudioEffectLimiter::set_soft_clip_ratio); ClassDB::bind_method(D_METHOD("get_soft_clip_ratio"), &AudioEffectLimiter::get_soft_clip_ratio); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "ceiling_db", PROPERTY_HINT_RANGE, "-20,-0.1,0.1"), "set_ceiling_db", "get_ceiling_db"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "threshold_db", PROPERTY_HINT_RANGE, "-30,0,0.1"), "set_threshold_db", "get_threshold_db"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "soft_clip_db", PROPERTY_HINT_RANGE, "0,6,0.1"), "set_soft_clip_db", "get_soft_clip_db"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "soft_clip_ratio", PROPERTY_HINT_RANGE, "3,20,0.1"), "set_soft_clip_ratio", "get_soft_clip_ratio"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "ceiling_db", PROPERTY_HINT_RANGE, "-20,-0.1,0.1"), "set_ceiling_db", "get_ceiling_db"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "threshold_db", PROPERTY_HINT_RANGE, "-30,0,0.1"), "set_threshold_db", "get_threshold_db"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "soft_clip_db", PROPERTY_HINT_RANGE, "0,6,0.1"), "set_soft_clip_db", "get_soft_clip_db"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "soft_clip_ratio", PROPERTY_HINT_RANGE, "3,20,0.1"), "set_soft_clip_ratio", "get_soft_clip_ratio"); } AudioEffectLimiter::AudioEffectLimiter() { diff --git a/servers/audio/effects/audio_effect_panner.cpp b/servers/audio/effects/audio_effect_panner.cpp index b9e95f44df..10724175e5 100644 --- a/servers/audio/effects/audio_effect_panner.cpp +++ b/servers/audio/effects/audio_effect_panner.cpp @@ -63,7 +63,7 @@ void AudioEffectPanner::_bind_methods() { ClassDB::bind_method(D_METHOD("set_pan", "cpanume"), &AudioEffectPanner::set_pan); ClassDB::bind_method(D_METHOD("get_pan"), &AudioEffectPanner::get_pan); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "pan", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_pan", "get_pan"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "pan", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_pan", "get_pan"); } AudioEffectPanner::AudioEffectPanner() { diff --git a/servers/audio/effects/audio_effect_phaser.cpp b/servers/audio/effects/audio_effect_phaser.cpp index d811522576..3709b69d45 100644 --- a/servers/audio/effects/audio_effect_phaser.cpp +++ b/servers/audio/effects/audio_effect_phaser.cpp @@ -154,11 +154,11 @@ void AudioEffectPhaser::_bind_methods() { ClassDB::bind_method(D_METHOD("set_depth", "depth"), &AudioEffectPhaser::set_depth); ClassDB::bind_method(D_METHOD("get_depth"), &AudioEffectPhaser::get_depth); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "range_min_hz", PROPERTY_HINT_RANGE, "10,10000"), "set_range_min_hz", "get_range_min_hz"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "range_max_hz", PROPERTY_HINT_RANGE, "10,10000"), "set_range_max_hz", "get_range_max_hz"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "rate_hz", PROPERTY_HINT_RANGE, "0.01,20"), "set_rate_hz", "get_rate_hz"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "feedback", PROPERTY_HINT_RANGE, "0.1,0.9,0.1"), "set_feedback", "get_feedback"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "depth", PROPERTY_HINT_RANGE, "0.1,4,0.1"), "set_depth", "get_depth"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "range_min_hz", PROPERTY_HINT_RANGE, "10,10000"), "set_range_min_hz", "get_range_min_hz"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "range_max_hz", PROPERTY_HINT_RANGE, "10,10000"), "set_range_max_hz", "get_range_max_hz"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "rate_hz", PROPERTY_HINT_RANGE, "0.01,20"), "set_rate_hz", "get_rate_hz"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "feedback", PROPERTY_HINT_RANGE, "0.1,0.9,0.1"), "set_feedback", "get_feedback"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "depth", PROPERTY_HINT_RANGE, "0.1,4,0.1"), "set_depth", "get_depth"); } AudioEffectPhaser::AudioEffectPhaser() { diff --git a/servers/audio/effects/audio_effect_pitch_shift.cpp b/servers/audio/effects/audio_effect_pitch_shift.cpp index 28185e591f..56529e208e 100644 --- a/servers/audio/effects/audio_effect_pitch_shift.cpp +++ b/servers/audio/effects/audio_effect_pitch_shift.cpp @@ -347,8 +347,8 @@ void AudioEffectPitchShift::_bind_methods() { ClassDB::bind_method(D_METHOD("set_fft_size", "size"), &AudioEffectPitchShift::set_fft_size); ClassDB::bind_method(D_METHOD("get_fft_size"), &AudioEffectPitchShift::get_fft_size); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "pitch_scale", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_pitch_scale", "get_pitch_scale"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "oversampling", PROPERTY_HINT_RANGE, "4,32,1"), "set_oversampling", "get_oversampling"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "pitch_scale", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_pitch_scale", "get_pitch_scale"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "oversampling", PROPERTY_HINT_RANGE, "4,32,1"), "set_oversampling", "get_oversampling"); ADD_PROPERTY(PropertyInfo(Variant::INT, "fft_size", PROPERTY_HINT_ENUM, "256,512,1024,2048,4096"), "set_fft_size", "get_fft_size"); BIND_ENUM_CONSTANT(FFT_SIZE_256); diff --git a/servers/audio/effects/audio_effect_record.cpp b/servers/audio/effects/audio_effect_record.cpp index 9be3a2d554..8f0c55ad83 100644 --- a/servers/audio/effects/audio_effect_record.cpp +++ b/servers/audio/effects/audio_effect_record.cpp @@ -215,7 +215,7 @@ Ref<AudioStreamSample> AudioEffectRecord::get_recording() const { AudioStreamSample::Format dst_format = format; bool stereo = true; //forcing mono is not implemented - PoolVector<uint8_t> dst_data; + Vector<uint8_t> dst_data; ERR_FAIL_COND_V(current_instance.is_null(), NULL); ERR_FAIL_COND_V(current_instance->recording_data.size() == 0, NULL); @@ -223,7 +223,7 @@ Ref<AudioStreamSample> AudioEffectRecord::get_recording() const { if (dst_format == AudioStreamSample::FORMAT_8_BITS) { int data_size = current_instance->recording_data.size(); dst_data.resize(data_size); - PoolVector<uint8_t>::Write w = dst_data.write(); + uint8_t *w = dst_data.ptrw(); for (int i = 0; i < data_size; i++) { int8_t v = CLAMP(current_instance->recording_data[i] * 128, -128, 127); @@ -232,7 +232,7 @@ Ref<AudioStreamSample> AudioEffectRecord::get_recording() const { } else if (dst_format == AudioStreamSample::FORMAT_16_BITS) { int data_size = current_instance->recording_data.size(); dst_data.resize(data_size * 2); - PoolVector<uint8_t>::Write w = dst_data.write(); + uint8_t *w = dst_data.ptrw(); for (int i = 0; i < data_size; i++) { int16_t v = CLAMP(current_instance->recording_data[i] * 32768, -32768, 32767); @@ -252,8 +252,8 @@ Ref<AudioStreamSample> AudioEffectRecord::get_recording() const { right.set(i, current_instance->recording_data[i * 2 + 1]); } - PoolVector<uint8_t> bleft; - PoolVector<uint8_t> bright; + Vector<uint8_t> bleft; + Vector<uint8_t> bright; ResourceImporterWAV::_compress_ima_adpcm(left, bleft); ResourceImporterWAV::_compress_ima_adpcm(right, bright); @@ -261,9 +261,9 @@ Ref<AudioStreamSample> AudioEffectRecord::get_recording() const { int dl = bleft.size(); dst_data.resize(dl * 2); - PoolVector<uint8_t>::Write w = dst_data.write(); - PoolVector<uint8_t>::Read rl = bleft.read(); - PoolVector<uint8_t>::Read rr = bright.read(); + uint8_t *w = dst_data.ptrw(); + const uint8_t *rl = bleft.ptr(); + const uint8_t *rr = bright.ptr(); for (int i = 0; i < dl; i++) { w[i * 2 + 0] = rl[i]; diff --git a/servers/audio/effects/audio_effect_reverb.cpp b/servers/audio/effects/audio_effect_reverb.cpp index caa2d8ab26..6dccb2945b 100644 --- a/servers/audio/effects/audio_effect_reverb.cpp +++ b/servers/audio/effects/audio_effect_reverb.cpp @@ -184,15 +184,15 @@ void AudioEffectReverb::_bind_methods() { ClassDB::bind_method(D_METHOD("get_hpf"), &AudioEffectReverb::get_hpf); ADD_GROUP("Predelay", "predelay_"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "predelay_msec", PROPERTY_HINT_RANGE, "20,500,1"), "set_predelay_msec", "get_predelay_msec"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "predelay_feedback", PROPERTY_HINT_RANGE, "0,0.98,0.01"), "set_predelay_feedback", "get_predelay_feedback"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "predelay_msec", PROPERTY_HINT_RANGE, "20,500,1"), "set_predelay_msec", "get_predelay_msec"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "predelay_feedback", PROPERTY_HINT_RANGE, "0,0.98,0.01"), "set_predelay_feedback", "get_predelay_feedback"); ADD_GROUP("", ""); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "room_size", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_room_size", "get_room_size"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "damping", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_damping", "get_damping"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "spread", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_spread", "get_spread"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "hipass", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_hpf", "get_hpf"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "dry", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_dry", "get_dry"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "wet", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_wet", "get_wet"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "room_size", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_room_size", "get_room_size"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "damping", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_damping", "get_damping"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "spread", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_spread", "get_spread"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "hipass", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_hpf", "get_hpf"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "dry", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_dry", "get_dry"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "wet", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_wet", "get_wet"); } AudioEffectReverb::AudioEffectReverb() { diff --git a/servers/audio/effects/audio_effect_spectrum_analyzer.cpp b/servers/audio/effects/audio_effect_spectrum_analyzer.cpp index d4bd3e2461..47aee02de2 100644 --- a/servers/audio/effects/audio_effect_spectrum_analyzer.cpp +++ b/servers/audio/effects/audio_effect_spectrum_analyzer.cpp @@ -268,8 +268,8 @@ void AudioEffectSpectrumAnalyzer::_bind_methods() { ClassDB::bind_method(D_METHOD("set_fft_size", "size"), &AudioEffectSpectrumAnalyzer::set_fft_size); ClassDB::bind_method(D_METHOD("get_fft_size"), &AudioEffectSpectrumAnalyzer::get_fft_size); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "buffer_length", PROPERTY_HINT_RANGE, "0.1,4,0.1"), "set_buffer_length", "get_buffer_length"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "tap_back_pos", PROPERTY_HINT_RANGE, "0.1,4,0.1"), "set_tap_back_pos", "get_tap_back_pos"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "buffer_length", PROPERTY_HINT_RANGE, "0.1,4,0.1"), "set_buffer_length", "get_buffer_length"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "tap_back_pos", PROPERTY_HINT_RANGE, "0.1,4,0.1"), "set_tap_back_pos", "get_tap_back_pos"); ADD_PROPERTY(PropertyInfo(Variant::INT, "fft_size", PROPERTY_HINT_ENUM, "256,512,1024,2048,4096"), "set_fft_size", "get_fft_size"); BIND_ENUM_CONSTANT(FFT_SIZE_256); diff --git a/servers/audio/effects/audio_effect_stereo_enhance.cpp b/servers/audio/effects/audio_effect_stereo_enhance.cpp index e8b8f47676..a10aca02b2 100644 --- a/servers/audio/effects/audio_effect_stereo_enhance.cpp +++ b/servers/audio/effects/audio_effect_stereo_enhance.cpp @@ -146,9 +146,9 @@ void AudioEffectStereoEnhance::_bind_methods() { ClassDB::bind_method(D_METHOD("set_surround", "amount"), &AudioEffectStereoEnhance::set_surround); ClassDB::bind_method(D_METHOD("get_surround"), &AudioEffectStereoEnhance::get_surround); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "pan_pullout", PROPERTY_HINT_RANGE, "0,4,0.01"), "set_pan_pullout", "get_pan_pullout"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "time_pullout_ms", PROPERTY_HINT_RANGE, "0,50,0.01"), "set_time_pullout", "get_time_pullout"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "surround", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_surround", "get_surround"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "pan_pullout", PROPERTY_HINT_RANGE, "0,4,0.01"), "set_pan_pullout", "get_pan_pullout"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "time_pullout_ms", PROPERTY_HINT_RANGE, "0,50,0.01"), "set_time_pullout", "get_time_pullout"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "surround", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_surround", "get_surround"); } AudioEffectStereoEnhance::AudioEffectStereoEnhance() { diff --git a/servers/audio/effects/audio_stream_generator.cpp b/servers/audio/effects/audio_stream_generator.cpp index 9e1019afbc..5f24cf3d6b 100644 --- a/servers/audio/effects/audio_stream_generator.cpp +++ b/servers/audio/effects/audio_stream_generator.cpp @@ -74,8 +74,8 @@ void AudioStreamGenerator::_bind_methods() { ClassDB::bind_method(D_METHOD("set_buffer_length", "seconds"), &AudioStreamGenerator::set_buffer_length); ClassDB::bind_method(D_METHOD("get_buffer_length"), &AudioStreamGenerator::get_buffer_length); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "mix_rate", PROPERTY_HINT_RANGE, "20,192000,1"), "set_mix_rate", "get_mix_rate"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "buffer_length", PROPERTY_HINT_RANGE, "0.01,10,0.01"), "set_buffer_length", "get_buffer_length"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "mix_rate", PROPERTY_HINT_RANGE, "20,192000,1"), "set_mix_rate", "get_mix_rate"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "buffer_length", PROPERTY_HINT_RANGE, "0.01,10,0.01"), "set_buffer_length", "get_buffer_length"); } AudioStreamGenerator::AudioStreamGenerator() { @@ -99,17 +99,17 @@ bool AudioStreamGeneratorPlayback::push_frame(const Vector2 &p_frame) { bool AudioStreamGeneratorPlayback::can_push_buffer(int p_frames) const { return buffer.space_left() >= p_frames; } -bool AudioStreamGeneratorPlayback::push_buffer(const PoolVector2Array &p_frames) { +bool AudioStreamGeneratorPlayback::push_buffer(const PackedVector2Array &p_frames) { int to_write = p_frames.size(); if (buffer.space_left() < to_write) { return false; } - PoolVector2Array::Read r = p_frames.read(); + const Vector2 *r = p_frames.ptr(); if (sizeof(real_t) == 4) { //write directly - buffer.write((const AudioFrame *)r.ptr(), to_write); + buffer.write((const AudioFrame *)r, to_write); } else { //convert from double AudioFrame buf[2048]; diff --git a/servers/audio/effects/audio_stream_generator.h b/servers/audio/effects/audio_stream_generator.h index f1cd73d266..aee3459e17 100644 --- a/servers/audio/effects/audio_stream_generator.h +++ b/servers/audio/effects/audio_stream_generator.h @@ -85,7 +85,7 @@ public: bool push_frame(const Vector2 &p_frame); bool can_push_buffer(int p_frames) const; - bool push_buffer(const PoolVector2Array &p_frames); + bool push_buffer(const PackedVector2Array &p_frames); int get_frames_available() const; int get_skips() const; diff --git a/servers/audio_server.cpp b/servers/audio_server.cpp index 2a5a5040b6..abf351135a 100644 --- a/servers/audio_server.cpp +++ b/servers/audio_server.cpp @@ -971,7 +971,7 @@ void AudioServer::init() { channel_disable_threshold_db = GLOBAL_DEF_RST("audio/channel_disable_threshold_db", -60.0); channel_disable_frames = float(GLOBAL_DEF_RST("audio/channel_disable_time", 2.0)) * get_mix_rate(); - ProjectSettings::get_singleton()->set_custom_property_info("audio/channel_disable_time", PropertyInfo(Variant::REAL, "audio/channel_disable_time", PROPERTY_HINT_RANGE, "0,5,0.01,or_greater")); + ProjectSettings::get_singleton()->set_custom_property_info("audio/channel_disable_time", PropertyInfo(Variant::FLOAT, "audio/channel_disable_time", PROPERTY_HINT_RANGE, "0,5,0.01,or_greater")); buffer_size = 1024; //hardcoded for now init_channels_and_buffers(); @@ -1384,7 +1384,7 @@ void AudioServer::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::INT, "bus_count"), "set_bus_count", "get_bus_count"); ADD_PROPERTY(PropertyInfo(Variant::STRING, "device"), "set_device", "get_device"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "global_rate_scale"), "set_global_rate_scale", "get_global_rate_scale"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "global_rate_scale"), "set_global_rate_scale", "get_global_rate_scale"); ADD_SIGNAL(MethodInfo("bus_layout_changed")); @@ -1531,8 +1531,8 @@ void AudioBusLayout::_get_property_list(List<PropertyInfo> *p_list) const { p_list->push_back(PropertyInfo(Variant::BOOL, "bus/" + itos(i) + "/solo", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL)); p_list->push_back(PropertyInfo(Variant::BOOL, "bus/" + itos(i) + "/mute", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL)); p_list->push_back(PropertyInfo(Variant::BOOL, "bus/" + itos(i) + "/bypass_fx", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL)); - p_list->push_back(PropertyInfo(Variant::REAL, "bus/" + itos(i) + "/volume_db", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL)); - p_list->push_back(PropertyInfo(Variant::REAL, "bus/" + itos(i) + "/send", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL)); + p_list->push_back(PropertyInfo(Variant::FLOAT, "bus/" + itos(i) + "/volume_db", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL)); + p_list->push_back(PropertyInfo(Variant::FLOAT, "bus/" + itos(i) + "/send", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL)); for (int j = 0; j < buses[i].effects.size(); j++) { p_list->push_back(PropertyInfo(Variant::OBJECT, "bus/" + itos(i) + "/effect/" + itos(j) + "/effect", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL)); diff --git a/servers/audio_server.h b/servers/audio_server.h index eff66d4008..1d9e5100fa 100644 --- a/servers/audio_server.h +++ b/servers/audio_server.h @@ -104,7 +104,7 @@ public: virtual Error capture_stop() { return FAILED; } virtual void capture_set_device(const String &p_name) {} virtual String capture_get_device() { return "Default"; } - virtual Array capture_get_device_list(); // TODO: convert this and get_device_list to PoolStringArray + virtual Array capture_get_device_list(); // TODO: convert this and get_device_list to PackedStringArray virtual float get_latency() { return 0; } diff --git a/servers/navigation_2d_server.cpp b/servers/navigation_2d_server.cpp index 94ddecf9c3..d9b53122e2 100644 --- a/servers/navigation_2d_server.cpp +++ b/servers/navigation_2d_server.cpp @@ -62,6 +62,12 @@ Navigation2DServer *Navigation2DServer::singleton = NULL; return NavigationServer::get_singleton()->FUNC_NAME(CONV_0(D_0), CONV_1(D_1)); \ } +#define FORWARD_2_R_C(CONV_R, FUNC_NAME, T_0, D_0, T_1, D_1, CONV_0, CONV_1) \ + Navigation2DServer::FUNC_NAME(T_0 D_0, T_1 D_1) \ + const { \ + return CONV_R(NavigationServer::get_singleton()->FUNC_NAME(CONV_0(D_0), CONV_1(D_1))); \ + } + #define FORWARD_4_R_C(CONV_R, FUNC_NAME, T_0, D_0, T_1, D_1, T_2, D_2, T_3, D_3, CONV_0, CONV_1, CONV_2, CONV_3) \ Navigation2DServer::FUNC_NAME(T_0 D_0, T_1 D_1, T_2 D_2, T_3 D_3) \ const { \ @@ -132,6 +138,8 @@ void Navigation2DServer::_bind_methods() { ClassDB::bind_method(D_METHOD("map_set_edge_connection_margin", "map", "margin"), &Navigation2DServer::map_set_edge_connection_margin); ClassDB::bind_method(D_METHOD("map_get_edge_connection_margin", "map"), &Navigation2DServer::map_get_edge_connection_margin); ClassDB::bind_method(D_METHOD("map_get_path", "map", "origin", "destination", "optimize"), &Navigation2DServer::map_get_path); + ClassDB::bind_method(D_METHOD("map_get_closest_point", "map", "to_point"), &Navigation2DServer::map_get_closest_point); + ClassDB::bind_method(D_METHOD("map_get_closest_point_owner", "map", "to_point"), &Navigation2DServer::map_get_closest_point_owner); ClassDB::bind_method(D_METHOD("region_create"), &Navigation2DServer::region_create); ClassDB::bind_method(D_METHOD("region_set_map", "region", "map"), &Navigation2DServer::region_set_map); @@ -176,6 +184,9 @@ real_t FORWARD_1_C(map_get_edge_connection_margin, RID, p_map, rid_to_rid); Vector<Vector2> FORWARD_4_R_C(vector_v3_to_v2, map_get_path, RID, p_map, Vector2, p_origin, Vector2, p_destination, bool, p_optimize, rid_to_rid, v2_to_v3, v2_to_v3, bool_to_bool); +Vector2 FORWARD_2_R_C(v3_to_v2, map_get_closest_point, RID, p_map, const Vector2 &, p_point, rid_to_rid, v2_to_v3); +RID FORWARD_2_C(map_get_closest_point_owner, RID, p_map, const Vector2 &, p_point, rid_to_rid, v2_to_v3); + RID FORWARD_0_C(region_create); void FORWARD_2_C(region_set_map, RID, p_region, RID, p_map, rid_to_rid, rid_to_rid); diff --git a/servers/navigation_2d_server.h b/servers/navigation_2d_server.h index 2ac0e8f875..955b0c3726 100644 --- a/servers/navigation_2d_server.h +++ b/servers/navigation_2d_server.h @@ -79,6 +79,9 @@ public: /// Returns the navigation path to reach the destination from the origin. virtual Vector<Vector2> map_get_path(RID p_map, Vector2 p_origin, Vector2 p_destination, bool p_optimize) const; + virtual Vector2 map_get_closest_point(RID p_map, const Vector2 &p_point) const; + virtual RID map_get_closest_point_owner(RID p_map, const Vector2 &p_point) const; + /// Creates a new region. virtual RID region_create() const; diff --git a/servers/navigation_server.cpp b/servers/navigation_server.cpp index d28aed9110..f2b727ac47 100644 --- a/servers/navigation_server.cpp +++ b/servers/navigation_server.cpp @@ -48,6 +48,10 @@ void NavigationServer::_bind_methods() { ClassDB::bind_method(D_METHOD("map_set_edge_connection_margin", "map", "margin"), &NavigationServer::map_set_edge_connection_margin); ClassDB::bind_method(D_METHOD("map_get_edge_connection_margin", "map"), &NavigationServer::map_get_edge_connection_margin); ClassDB::bind_method(D_METHOD("map_get_path", "map", "origin", "destination", "optimize"), &NavigationServer::map_get_path); + ClassDB::bind_method(D_METHOD("map_get_closest_point_to_segment", "map", "start", "end", "use_collision"), &NavigationServer::map_get_closest_point_to_segment, DEFVAL(false)); + ClassDB::bind_method(D_METHOD("map_get_closest_point", "map", "to_point"), &NavigationServer::map_get_closest_point); + ClassDB::bind_method(D_METHOD("map_get_closest_point_normal", "map", "to_point"), &NavigationServer::map_get_closest_point_normal); + ClassDB::bind_method(D_METHOD("map_get_closest_point_owner", "map", "to_point"), &NavigationServer::map_get_closest_point_owner); ClassDB::bind_method(D_METHOD("region_create"), &NavigationServer::region_create); ClassDB::bind_method(D_METHOD("region_set_map", "region", "map"), &NavigationServer::region_set_map); @@ -71,7 +75,7 @@ void NavigationServer::_bind_methods() { ClassDB::bind_method(D_METHOD("free", "object"), &NavigationServer::free); ClassDB::bind_method(D_METHOD("set_active", "active"), &NavigationServer::set_active); - ClassDB::bind_method(D_METHOD("step", "delta_time"), &NavigationServer::step); + ClassDB::bind_method(D_METHOD("process", "delta_time"), &NavigationServer::process); } const NavigationServer *NavigationServer::get_singleton() { diff --git a/servers/navigation_server.h b/servers/navigation_server.h index bcdbf84339..2587e53ab2 100644 --- a/servers/navigation_server.h +++ b/servers/navigation_server.h @@ -90,6 +90,11 @@ public: /// Returns the navigation path to reach the destination from the origin. virtual Vector<Vector3> map_get_path(RID p_map, Vector3 p_origin, Vector3 p_destination, bool p_optimize) const = 0; + virtual Vector3 map_get_closest_point_to_segment(RID p_map, const Vector3 &p_from, const Vector3 &p_to, const bool p_use_collision = false) const = 0; + virtual Vector3 map_get_closest_point(RID p_map, const Vector3 &p_point) const = 0; + virtual Vector3 map_get_closest_point_normal(RID p_map, const Vector3 &p_point) const = 0; + virtual RID map_get_closest_point_owner(RID p_map, const Vector3 &p_point) const = 0; + /// Creates a new region. virtual RID region_create() const = 0; @@ -170,9 +175,11 @@ public: /// Control activation of this server. virtual void set_active(bool p_active) const = 0; - /// Step the server - /// NOTE: This function is not Threadsafe and MUST be called in single thread. - virtual void step(real_t delta_time) = 0; + /// Process the collision avoidance agents. + /// The result of this process is needed by the physics server, + /// so this must be called in the main thread. + /// Note: This function is not thread safe. + virtual void process(real_t delta_time) = 0; NavigationServer(); virtual ~NavigationServer(); diff --git a/servers/physics/area_sw.cpp b/servers/physics/area_sw.cpp index 1016afcaba..4b54a56253 100644 --- a/servers/physics/area_sw.cpp +++ b/servers/physics/area_sw.cpp @@ -200,7 +200,7 @@ void AreaSW::call_queries() { res[3] = E->key().body_shape; res[4] = E->key().area_shape; - Variant::CallError ce; + Callable::CallError ce; obj->call(monitor_callback_method, (const Variant **)resptr, 5, ce); } } @@ -232,7 +232,7 @@ void AreaSW::call_queries() { res[3] = E->key().body_shape; res[4] = E->key().area_shape; - Variant::CallError ce; + Callable::CallError ce; obj->call(area_monitor_callback_method, (const Variant **)resptr, 5, ce); } } diff --git a/servers/physics/body_sw.cpp b/servers/physics/body_sw.cpp index b71c9772df..8819941f04 100644 --- a/servers/physics/body_sw.cpp +++ b/servers/physics/body_sw.cpp @@ -713,7 +713,7 @@ void BodySW::call_queries() { } else { const Variant *vp[2] = { &v, &fi_callback->udata }; - Variant::CallError ce; + Callable::CallError ce; int argc = (fi_callback->udata.get_type() == Variant::NIL) ? 1 : 2; obj->call(fi_callback->method, vp, argc, ce); } diff --git a/servers/physics/shape_sw.cpp b/servers/physics/shape_sw.cpp index 7c92178803..4a6ed6be58 100644 --- a/servers/physics/shape_sw.cpp +++ b/servers/physics/shape_sw.cpp @@ -1106,9 +1106,9 @@ FaceShapeSW::FaceShapeSW() { configure(AABB()); } -PoolVector<Vector3> ConcavePolygonShapeSW::get_faces() const { +Vector<Vector3> ConcavePolygonShapeSW::get_faces() const { - PoolVector<Vector3> rfaces; + Vector<Vector3> rfaces; rfaces.resize(faces.size() * 3); for (int i = 0; i < faces.size(); i++) { @@ -1132,8 +1132,7 @@ void ConcavePolygonShapeSW::project_range(const Vector3 &p_normal, const Transfo r_max = 0; return; } - PoolVector<Vector3>::Read r = vertices.read(); - const Vector3 *vptr = r.ptr(); + const Vector3 *vptr = vertices.ptr(); for (int i = 0; i < count; i++) { @@ -1152,8 +1151,7 @@ Vector3 ConcavePolygonShapeSW::get_support(const Vector3 &p_normal) const { if (count == 0) return Vector3(); - PoolVector<Vector3>::Read r = vertices.read(); - const Vector3 *vptr = r.ptr(); + const Vector3 *vptr = vertices.ptr(); Vector3 n = p_normal; @@ -1231,9 +1229,9 @@ bool ConcavePolygonShapeSW::intersect_segment(const Vector3 &p_begin, const Vect return false; // unlock data - PoolVector<Face>::Read fr = faces.read(); - PoolVector<Vector3>::Read vr = vertices.read(); - PoolVector<BVH>::Read br = bvh.read(); + const Face *fr = faces.ptr(); + const Vector3 *vr = vertices.ptr(); + const BVH *br = bvh.ptr(); _SegmentCullParams params; params.from = p_begin; @@ -1241,9 +1239,9 @@ bool ConcavePolygonShapeSW::intersect_segment(const Vector3 &p_begin, const Vect params.collisions = 0; params.dir = (p_end - p_begin).normalized(); - params.faces = fr.ptr(); - params.vertices = vr.ptr(); - params.bvh = br.ptr(); + params.faces = fr; + params.vertices = vr; + params.bvh = br; params.min_d = 1e20; // cull @@ -1310,18 +1308,18 @@ void ConcavePolygonShapeSW::cull(const AABB &p_local_aabb, Callback p_callback, AABB local_aabb = p_local_aabb; // unlock data - PoolVector<Face>::Read fr = faces.read(); - PoolVector<Vector3>::Read vr = vertices.read(); - PoolVector<BVH>::Read br = bvh.read(); + const Face *fr = faces.ptr(); + const Vector3 *vr = vertices.ptr(); + const BVH *br = bvh.ptr(); FaceShapeSW face; // use this to send in the callback _CullParams params; params.aabb = local_aabb; params.face = &face; - params.faces = fr.ptr(); - params.vertices = vr.ptr(); - params.bvh = br.ptr(); + params.faces = fr; + params.vertices = vr; + params.bvh = br; params.callback = p_callback; params.userdata = p_userdata; @@ -1464,7 +1462,7 @@ void ConcavePolygonShapeSW::_fill_bvh(_VolumeSW_BVH *p_bvh_tree, BVH *p_bvh_arra memdelete(p_bvh_tree); } -void ConcavePolygonShapeSW::_setup(PoolVector<Vector3> p_faces) { +void ConcavePolygonShapeSW::_setup(Vector<Vector3> p_faces) { int src_face_count = p_faces.size(); if (src_face_count == 0) { @@ -1474,23 +1472,19 @@ void ConcavePolygonShapeSW::_setup(PoolVector<Vector3> p_faces) { ERR_FAIL_COND(src_face_count % 3); src_face_count /= 3; - PoolVector<Vector3>::Read r = p_faces.read(); - const Vector3 *facesr = r.ptr(); + const Vector3 *facesr = p_faces.ptr(); - PoolVector<_VolumeSW_BVH_Element> bvh_array; + Vector<_VolumeSW_BVH_Element> bvh_array; bvh_array.resize(src_face_count); - PoolVector<_VolumeSW_BVH_Element>::Write bvhw = bvh_array.write(); - _VolumeSW_BVH_Element *bvh_arrayw = bvhw.ptr(); + _VolumeSW_BVH_Element *bvh_arrayw = bvh_array.ptrw(); faces.resize(src_face_count); - PoolVector<Face>::Write w = faces.write(); - Face *facesw = w.ptr(); + Face *facesw = faces.ptrw(); vertices.resize(src_face_count * 3); - PoolVector<Vector3>::Write vw = vertices.write(); - Vector3 *verticesw = vw.ptr(); + Vector3 *verticesw = vertices.ptrw(); AABB _aabb; @@ -1514,16 +1508,12 @@ void ConcavePolygonShapeSW::_setup(PoolVector<Vector3> p_faces) { _aabb.merge_with(bvh_arrayw[i].aabb); } - w.release(); - vw.release(); - int count = 0; _VolumeSW_BVH *bvh_tree = _volume_sw_build_bvh(bvh_arrayw, src_face_count, count); bvh.resize(count + 1); - PoolVector<BVH>::Write bvhw2 = bvh.write(); - BVH *bvh_arrayw2 = bvhw2.ptr(); + BVH *bvh_arrayw2 = bvh.ptrw(); int idx = 0; _fill_bvh(bvh_tree, bvh_arrayw2, idx); @@ -1546,7 +1536,7 @@ ConcavePolygonShapeSW::ConcavePolygonShapeSW() { /* HEIGHT MAP SHAPE */ -PoolVector<real_t> HeightMapShapeSW::get_heights() const { +Vector<real_t> HeightMapShapeSW::get_heights() const { return heights; } @@ -1603,14 +1593,14 @@ Vector3 HeightMapShapeSW::get_moment_of_inertia(real_t p_mass) const { (p_mass / 3.0) * (extents.y * extents.y + extents.y * extents.y)); } -void HeightMapShapeSW::_setup(PoolVector<real_t> p_heights, int p_width, int p_depth, real_t p_cell_size) { +void HeightMapShapeSW::_setup(Vector<real_t> p_heights, int p_width, int p_depth, real_t p_cell_size) { heights = p_heights; width = p_width; depth = p_depth; cell_size = p_cell_size; - PoolVector<real_t>::Read r = heights.read(); + const real_t *r = heights.ptr(); AABB aabb; @@ -1643,7 +1633,7 @@ void HeightMapShapeSW::set_data(const Variant &p_data) { int width = d["width"]; int depth = d["depth"]; real_t cell_size = d["cell_size"]; - PoolVector<real_t> heights = d["heights"]; + Vector<real_t> heights = d["heights"]; ERR_FAIL_COND(width <= 0); ERR_FAIL_COND(depth <= 0); diff --git a/servers/physics/shape_sw.h b/servers/physics/shape_sw.h index 62a6cb7f29..eaae64be66 100644 --- a/servers/physics/shape_sw.h +++ b/servers/physics/shape_sw.h @@ -31,7 +31,6 @@ #ifndef SHAPE_SW_H #define SHAPE_SW_H -#include "core/math/bsp_tree.h" #include "core/math/geometry.h" #include "servers/physics_server.h" /* @@ -297,8 +296,8 @@ struct ConcavePolygonShapeSW : public ConcaveShapeSW { int indices[3]; }; - PoolVector<Face> faces; - PoolVector<Vector3> vertices; + Vector<Face> faces; + Vector<Vector3> vertices; struct BVH { @@ -309,7 +308,7 @@ struct ConcavePolygonShapeSW : public ConcaveShapeSW { int face_index; }; - PoolVector<BVH> bvh; + Vector<BVH> bvh; struct _CullParams { @@ -342,10 +341,10 @@ struct ConcavePolygonShapeSW : public ConcaveShapeSW { void _fill_bvh(_VolumeSW_BVH *p_bvh_tree, BVH *p_bvh_array, int &p_idx); - void _setup(PoolVector<Vector3> p_faces); + void _setup(Vector<Vector3> p_faces); public: - PoolVector<Vector3> get_faces() const; + Vector<Vector3> get_faces() const; virtual PhysicsServer::ShapeType get_type() const { return PhysicsServer::SHAPE_CONCAVE_POLYGON; } @@ -368,7 +367,7 @@ public: struct HeightMapShapeSW : public ConcaveShapeSW { - PoolVector<real_t> heights; + Vector<real_t> heights; int width; int depth; real_t cell_size; @@ -376,10 +375,10 @@ struct HeightMapShapeSW : public ConcaveShapeSW { //void _cull_segment(int p_idx,_SegmentCullParams *p_params) const; //void _cull(int p_idx,_CullParams *p_params) const; - void _setup(PoolVector<real_t> p_heights, int p_width, int p_depth, real_t p_cell_size); + void _setup(Vector<real_t> p_heights, int p_width, int p_depth, real_t p_cell_size); public: - PoolVector<real_t> get_heights() const; + Vector<real_t> get_heights() const; int get_width() const; int get_depth() const; real_t get_cell_size() const; @@ -468,16 +467,4 @@ struct MotionShapeSW : public ShapeSW { MotionShapeSW() { configure(AABB()); } }; -struct _ShapeTestConvexBSPSW { - - const BSP_Tree *bsp; - const ShapeSW *shape; - Transform transform; - - _FORCE_INLINE_ void project_range(const Vector3 &p_normal, real_t &r_min, real_t &r_max) const { - - shape->project_range(p_normal, transform, r_min, r_max); - } -}; - -#endif // SHAPESW_H +#endif // SHAPE_SW_H diff --git a/servers/physics/space_sw.cpp b/servers/physics/space_sw.cpp index 03dca8b9ec..110520db5a 100644 --- a/servers/physics/space_sw.cpp +++ b/servers/physics/space_sw.cpp @@ -1220,7 +1220,7 @@ SpaceSW::SpaceSW() { body_linear_velocity_sleep_threshold = GLOBAL_DEF("physics/3d/sleep_threshold_linear", 0.1); body_angular_velocity_sleep_threshold = GLOBAL_DEF("physics/3d/sleep_threshold_angular", (8.0 / 180.0 * Math_PI)); body_time_to_sleep = GLOBAL_DEF("physics/3d/time_before_sleep", 0.5); - ProjectSettings::get_singleton()->set_custom_property_info("physics/3d/time_before_sleep", PropertyInfo(Variant::REAL, "physics/3d/time_before_sleep", PROPERTY_HINT_RANGE, "0,5,0.01,or_greater")); + ProjectSettings::get_singleton()->set_custom_property_info("physics/3d/time_before_sleep", PropertyInfo(Variant::FLOAT, "physics/3d/time_before_sleep", PROPERTY_HINT_RANGE, "0,5,0.01,or_greater")); body_angular_velocity_damp_ratio = 10; broadphase = BroadPhaseSW::create_func(); diff --git a/servers/physics_2d/area_2d_sw.cpp b/servers/physics_2d/area_2d_sw.cpp index c67d870b2a..45666d9d09 100644 --- a/servers/physics_2d/area_2d_sw.cpp +++ b/servers/physics_2d/area_2d_sw.cpp @@ -200,7 +200,7 @@ void Area2DSW::call_queries() { res[3] = E->key().body_shape; res[4] = E->key().area_shape; - Variant::CallError ce; + Callable::CallError ce; obj->call(monitor_callback_method, (const Variant **)resptr, 5, ce); } } @@ -232,7 +232,7 @@ void Area2DSW::call_queries() { res[3] = E->key().body_shape; res[4] = E->key().area_shape; - Variant::CallError ce; + Callable::CallError ce; obj->call(area_monitor_callback_method, (const Variant **)resptr, 5, ce); } } diff --git a/servers/physics_2d/body_2d_sw.cpp b/servers/physics_2d/body_2d_sw.cpp index 4de52cacbd..863b422996 100644 --- a/servers/physics_2d/body_2d_sw.cpp +++ b/servers/physics_2d/body_2d_sw.cpp @@ -612,7 +612,7 @@ void Body2DSW::call_queries() { set_force_integration_callback(ObjectID(), StringName()); } else { - Variant::CallError ce; + Callable::CallError ce; if (fi_callback->callback_udata.get_type() != Variant::NIL) { obj->call(fi_callback->method, vp, 2, ce); diff --git a/servers/physics_2d/shape_2d_sw.cpp b/servers/physics_2d/shape_2d_sw.cpp index 75c604f0fa..5fefb9595f 100644 --- a/servers/physics_2d/shape_2d_sw.cpp +++ b/servers/physics_2d/shape_2d_sw.cpp @@ -639,19 +639,19 @@ real_t ConvexPolygonShape2DSW::get_moment_of_inertia(real_t p_mass, const Size2 void ConvexPolygonShape2DSW::set_data(const Variant &p_data) { - ERR_FAIL_COND(p_data.get_type() != Variant::POOL_VECTOR2_ARRAY && p_data.get_type() != Variant::POOL_REAL_ARRAY); + ERR_FAIL_COND(p_data.get_type() != Variant::PACKED_VECTOR2_ARRAY && p_data.get_type() != Variant::PACKED_FLOAT32_ARRAY); if (points) memdelete_arr(points); points = NULL; point_count = 0; - if (p_data.get_type() == Variant::POOL_VECTOR2_ARRAY) { - PoolVector<Vector2> arr = p_data; + if (p_data.get_type() == Variant::PACKED_VECTOR2_ARRAY) { + Vector<Vector2> arr = p_data; ERR_FAIL_COND(arr.size() == 0); point_count = arr.size(); points = memnew_arr(Point, point_count); - PoolVector<Vector2>::Read r = arr.read(); + const Vector2 *r = arr.ptr(); for (int i = 0; i < point_count; i++) { points[i].pos = r[i]; @@ -665,12 +665,12 @@ void ConvexPolygonShape2DSW::set_data(const Variant &p_data) { } } else { - PoolVector<real_t> dvr = p_data; + Vector<real_t> dvr = p_data; point_count = dvr.size() / 4; ERR_FAIL_COND(point_count == 0); points = memnew_arr(Point, point_count); - PoolVector<real_t>::Read r = dvr.read(); + const real_t *r = dvr.ptr(); for (int i = 0; i < point_count; i++) { @@ -693,7 +693,7 @@ void ConvexPolygonShape2DSW::set_data(const Variant &p_data) { Variant ConvexPolygonShape2DSW::get_data() const { - PoolVector<Vector2> dvr; + Vector<Vector2> dvr; dvr.resize(point_count); @@ -899,13 +899,13 @@ int ConcavePolygonShape2DSW::_generate_bvh(BVH *p_bvh, int p_len, int p_depth) { void ConcavePolygonShape2DSW::set_data(const Variant &p_data) { - ERR_FAIL_COND(p_data.get_type() != Variant::POOL_VECTOR2_ARRAY && p_data.get_type() != Variant::POOL_REAL_ARRAY); + ERR_FAIL_COND(p_data.get_type() != Variant::PACKED_VECTOR2_ARRAY && p_data.get_type() != Variant::PACKED_FLOAT32_ARRAY); Rect2 aabb; - if (p_data.get_type() == Variant::POOL_VECTOR2_ARRAY) { + if (p_data.get_type() == Variant::PACKED_VECTOR2_ARRAY) { - PoolVector<Vector2> p2arr = p_data; + Vector<Vector2> p2arr = p_data; int len = p2arr.size(); ERR_FAIL_COND(len % 2); @@ -919,7 +919,7 @@ void ConcavePolygonShape2DSW::set_data(const Variant &p_data) { return; } - PoolVector<Vector2>::Read arr = p2arr.read(); + const Vector2 *arr = p2arr.ptr(); Map<Point2, int> pointmap; for (int i = 0; i < len; i += 2) { @@ -976,18 +976,16 @@ void ConcavePolygonShape2DSW::set_data(const Variant &p_data) { } Variant ConcavePolygonShape2DSW::get_data() const { - PoolVector<Vector2> rsegments; + Vector<Vector2> rsegments; int len = segments.size(); rsegments.resize(len * 2); - PoolVector<Vector2>::Write w = rsegments.write(); + Vector2 *w = rsegments.ptrw(); for (int i = 0; i < len; i++) { w[(i << 1) + 0] = points[segments[i].points[0]]; w[(i << 1) + 1] = points[segments[i].points[1]]; } - w.release(); - return rsegments; } diff --git a/servers/physics_2d/space_2d_sw.cpp b/servers/physics_2d/space_2d_sw.cpp index 83bcae4607..2009cb823d 100644 --- a/servers/physics_2d/space_2d_sw.cpp +++ b/servers/physics_2d/space_2d_sw.cpp @@ -1346,7 +1346,7 @@ Space2DSW::Space2DSW() { body_linear_velocity_sleep_threshold = GLOBAL_DEF("physics/2d/sleep_threshold_linear", 2.0); body_angular_velocity_sleep_threshold = GLOBAL_DEF("physics/2d/sleep_threshold_angular", (8.0 / 180.0 * Math_PI)); body_time_to_sleep = GLOBAL_DEF("physics/2d/time_before_sleep", 0.5); - ProjectSettings::get_singleton()->set_custom_property_info("physics/2d/time_before_sleep", PropertyInfo(Variant::REAL, "physics/2d/time_before_sleep", PROPERTY_HINT_RANGE, "0,5,0.01,or_greater")); + ProjectSettings::get_singleton()->set_custom_property_info("physics/2d/time_before_sleep", PropertyInfo(Variant::FLOAT, "physics/2d/time_before_sleep", PROPERTY_HINT_RANGE, "0,5,0.01,or_greater")); broadphase = BroadPhase2DSW::create_func(); broadphase->set_pair_callback(_broadphase_pair, this); diff --git a/servers/physics_2d_server.cpp b/servers/physics_2d_server.cpp index 925af52eeb..1f92d6e419 100644 --- a/servers/physics_2d_server.cpp +++ b/servers/physics_2d_server.cpp @@ -118,13 +118,13 @@ void Physics2DDirectBodyState::_bind_methods() { ClassDB::bind_method(D_METHOD("integrate_forces"), &Physics2DDirectBodyState::integrate_forces); ClassDB::bind_method(D_METHOD("get_space_state"), &Physics2DDirectBodyState::get_space_state); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "step"), "", "get_step"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "inverse_mass"), "", "get_inverse_mass"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "inverse_inertia"), "", "get_inverse_inertia"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "total_angular_damp"), "", "get_total_angular_damp"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "total_linear_damp"), "", "get_total_linear_damp"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "step"), "", "get_step"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "inverse_mass"), "", "get_inverse_mass"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "inverse_inertia"), "", "get_inverse_inertia"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "total_angular_damp"), "", "get_total_angular_damp"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "total_linear_damp"), "", "get_total_linear_damp"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "total_gravity"), "", "get_total_gravity"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "angular_velocity"), "set_angular_velocity", "get_angular_velocity"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "angular_velocity"), "set_angular_velocity", "get_angular_velocity"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "linear_velocity"), "set_linear_velocity", "get_linear_velocity"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "sleeping"), "set_sleep_state", "is_sleeping"); ADD_PROPERTY(PropertyInfo(Variant::TRANSFORM2D, "transform"), "set_transform", "get_transform"); @@ -249,7 +249,7 @@ void Physics2DShapeQueryParameters::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::INT, "collision_layer", PROPERTY_HINT_LAYERS_2D_PHYSICS), "set_collision_layer", "get_collision_layer"); ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "exclude", PROPERTY_HINT_NONE, itos(Variant::_RID) + ":"), "set_exclude", "get_exclude"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "margin", PROPERTY_HINT_RANGE, "0,100,0.01"), "set_margin", "get_margin"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "margin", PROPERTY_HINT_RANGE, "0,100,0.01"), "set_margin", "get_margin"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "motion"), "set_motion", "get_motion"); //ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "shape", PROPERTY_HINT_RESOURCE_TYPE, "Shape2D"), "set_shape", ""); // FIXME: Lacks a getter ADD_PROPERTY(PropertyInfo(Variant::_RID, "shape_rid"), "set_shape_rid", "get_shape_rid"); diff --git a/servers/physics_server.cpp b/servers/physics_server.cpp index 94bcf1f76e..57f3a7979e 100644 --- a/servers/physics_server.cpp +++ b/servers/physics_server.cpp @@ -120,10 +120,10 @@ void PhysicsDirectBodyState::_bind_methods() { ClassDB::bind_method(D_METHOD("integrate_forces"), &PhysicsDirectBodyState::integrate_forces); ClassDB::bind_method(D_METHOD("get_space_state"), &PhysicsDirectBodyState::get_space_state); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "step"), "", "get_step"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "inverse_mass"), "", "get_inverse_mass"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "total_angular_damp"), "", "get_total_angular_damp"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "total_linear_damp"), "", "get_total_linear_damp"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "step"), "", "get_step"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "inverse_mass"), "", "get_inverse_mass"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "total_angular_damp"), "", "get_total_angular_damp"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "total_linear_damp"), "", "get_total_linear_damp"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "inverse_inertia"), "", "get_inverse_inertia"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "total_gravity"), "", "get_total_gravity"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "center_of_mass"), "", "get_center_of_mass"); @@ -242,7 +242,7 @@ void PhysicsShapeQueryParameters::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::INT, "collision_mask", PROPERTY_HINT_LAYERS_3D_PHYSICS), "set_collision_mask", "get_collision_mask"); ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "exclude", PROPERTY_HINT_NONE, itos(Variant::_RID) + ":"), "set_exclude", "get_exclude"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "margin", PROPERTY_HINT_RANGE, "0,100,0.01"), "set_margin", "get_margin"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "margin", PROPERTY_HINT_RANGE, "0,100,0.01"), "set_margin", "get_margin"); //ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "shape", PROPERTY_HINT_RESOURCE_TYPE, "Shape2D"), "set_shape", ""); // FIXME: Lacks a getter ADD_PROPERTY(PropertyInfo(Variant::_RID, "shape_rid"), "set_shape_rid", "get_shape_rid"); ADD_PROPERTY(PropertyInfo(Variant::TRANSFORM, "transform"), "set_transform", "get_transform"); diff --git a/servers/register_server_types.cpp b/servers/register_server_types.cpp index 25d122604a..c9f5277a4d 100644 --- a/servers/register_server_types.cpp +++ b/servers/register_server_types.cpp @@ -56,6 +56,7 @@ #include "audio_server.h" #include "camera/camera_feed.h" #include "camera_server.h" +#include "core/script_debugger_remote.h" #include "navigation_2d_server.h" #include "navigation_server.h" #include "physics/physics_server_sw.h" @@ -63,18 +64,17 @@ #include "physics_2d/physics_2d_server_wrap_mt.h" #include "physics_2d_server.h" #include "physics_server.h" -#include "scene/debugger/script_debugger_remote.h" #include "visual/shader_types.h" #include "visual_server.h" -static void _debugger_get_resource_usage(List<ScriptDebuggerRemote::ResourceUsage> *r_usage) { +static void _debugger_get_resource_usage(ScriptDebuggerRemote::ResourceUsage *r_usage) { List<VS::TextureInfo> tinfo; VS::get_singleton()->texture_debug_usage(&tinfo); for (List<VS::TextureInfo>::Element *E = tinfo.front(); E; E = E->next()) { - ScriptDebuggerRemote::ResourceUsage usage; + ScriptDebuggerRemote::ResourceInfo usage; usage.path = E->get().path; usage.vram = E->get().bytes; usage.id = E->get().texture; @@ -84,7 +84,7 @@ static void _debugger_get_resource_usage(List<ScriptDebuggerRemote::ResourceUsag } else { usage.format = itos(E->get().width) + "x" + itos(E->get().height) + "x" + itos(E->get().depth) + " " + Image::get_format_name(E->get().format); } - r_usage->push_back(usage); + r_usage->infos.push_back(usage); } } diff --git a/servers/visual/rasterizer.h b/servers/visual/rasterizer.h index 72c9a7f913..3a219ec7e3 100644 --- a/servers/visual/rasterizer.h +++ b/servers/visual/rasterizer.h @@ -356,7 +356,7 @@ public: virtual void mesh_set_blend_shape_mode(RID p_mesh, VS::BlendShapeMode p_mode) = 0; virtual VS::BlendShapeMode mesh_get_blend_shape_mode(RID p_mesh) const = 0; - virtual void mesh_surface_update_region(RID p_mesh, int p_surface, int p_offset, const PoolVector<uint8_t> &p_data) = 0; + virtual void mesh_surface_update_region(RID p_mesh, int p_surface, int p_offset, const Vector<uint8_t> &p_data) = 0; virtual void mesh_surface_set_material(RID p_mesh, int p_surface, RID p_material) = 0; virtual RID mesh_surface_get_material(RID p_mesh, int p_surface) const = 0; @@ -393,8 +393,8 @@ public: virtual Color multimesh_instance_get_color(RID p_multimesh, int p_index) const = 0; virtual Color multimesh_instance_get_custom_data(RID p_multimesh, int p_index) const = 0; - virtual void multimesh_set_buffer(RID p_multimesh, const PoolVector<float> &p_buffer) = 0; - virtual PoolVector<float> multimesh_get_buffer(RID p_multimesh) const = 0; + virtual void multimesh_set_buffer(RID p_multimesh, const Vector<float> &p_buffer) = 0; + virtual Vector<float> multimesh_get_buffer(RID p_multimesh) const = 0; virtual void multimesh_set_visible_instances(RID p_multimesh, int p_visible) = 0; virtual int multimesh_get_visible_instances(RID p_multimesh) const = 0; @@ -499,15 +499,15 @@ public: virtual RID gi_probe_create() = 0; - virtual void gi_probe_allocate(RID p_gi_probe, const Transform &p_to_cell_xform, const AABB &p_aabb, const Vector3i &p_octree_size, const PoolVector<uint8_t> &p_octree_cells, const PoolVector<uint8_t> &p_data_cells, const PoolVector<uint8_t> &p_distance_field, const PoolVector<int> &p_level_counts) = 0; + virtual void gi_probe_allocate(RID p_gi_probe, const Transform &p_to_cell_xform, const AABB &p_aabb, const Vector3i &p_octree_size, const Vector<uint8_t> &p_octree_cells, const Vector<uint8_t> &p_data_cells, const Vector<uint8_t> &p_distance_field, const Vector<int> &p_level_counts) = 0; virtual AABB gi_probe_get_bounds(RID p_gi_probe) const = 0; virtual Vector3i gi_probe_get_octree_size(RID p_gi_probe) const = 0; - virtual PoolVector<uint8_t> gi_probe_get_octree_cells(RID p_gi_probe) const = 0; - virtual PoolVector<uint8_t> gi_probe_get_data_cells(RID p_gi_probe) const = 0; - virtual PoolVector<uint8_t> gi_probe_get_distance_field(RID p_gi_probe) const = 0; + virtual Vector<uint8_t> gi_probe_get_octree_cells(RID p_gi_probe) const = 0; + virtual Vector<uint8_t> gi_probe_get_data_cells(RID p_gi_probe) const = 0; + virtual Vector<uint8_t> gi_probe_get_distance_field(RID p_gi_probe) const = 0; - virtual PoolVector<int> gi_probe_get_level_counts(RID p_gi_probe) const = 0; + virtual Vector<int> gi_probe_get_level_counts(RID p_gi_probe) const = 0; virtual Transform gi_probe_get_to_cell_xform(RID p_gi_probe) const = 0; virtual void gi_probe_set_dynamic_range(RID p_gi_probe, float p_range) = 0; @@ -558,15 +558,15 @@ public: virtual RID lightmap_capture_create() = 0; virtual void lightmap_capture_set_bounds(RID p_capture, const AABB &p_bounds) = 0; virtual AABB lightmap_capture_get_bounds(RID p_capture) const = 0; - virtual void lightmap_capture_set_octree(RID p_capture, const PoolVector<uint8_t> &p_octree) = 0; - virtual PoolVector<uint8_t> lightmap_capture_get_octree(RID p_capture) const = 0; + virtual void lightmap_capture_set_octree(RID p_capture, const Vector<uint8_t> &p_octree) = 0; + virtual Vector<uint8_t> lightmap_capture_get_octree(RID p_capture) const = 0; virtual void lightmap_capture_set_octree_cell_transform(RID p_capture, const Transform &p_xform) = 0; virtual Transform lightmap_capture_get_octree_cell_transform(RID p_capture) const = 0; virtual void lightmap_capture_set_octree_cell_subdiv(RID p_capture, int p_subdiv) = 0; virtual int lightmap_capture_get_octree_cell_subdiv(RID p_capture) const = 0; virtual void lightmap_capture_set_energy(RID p_capture, float p_energy) = 0; virtual float lightmap_capture_get_energy(RID p_capture) const = 0; - virtual const PoolVector<LightmapCaptureOctree> *lightmap_capture_get_octree_ptr(RID p_capture) const = 0; + virtual const Vector<LightmapCaptureOctree> *lightmap_capture_get_octree_ptr(RID p_capture) const = 0; /* PARTICLES */ @@ -1080,8 +1080,8 @@ public: const Item::CommandTransform *transform = static_cast<const Item::CommandTransform *>(c); xf = transform->xform; found_xform = true; - - } //passthrough + [[fallthrough]]; + } default: { c = c->next; continue; @@ -1258,7 +1258,7 @@ public: virtual void light_update_shadow(RID p_rid, const Transform2D &p_light_xform, int p_light_mask, float p_near, float p_far, LightOccluderInstance *p_occluders) = 0; virtual RID occluder_polygon_create() = 0; - virtual void occluder_polygon_set_shape_as_lines(RID p_occluder, const PoolVector<Vector2> &p_lines) = 0; + virtual void occluder_polygon_set_shape_as_lines(RID p_occluder, const Vector<Vector2> &p_lines) = 0; virtual void occluder_polygon_set_cull_mode(RID p_occluder, VS::CanvasOccluderPolygonCullMode p_mode) = 0; virtual void draw_window_margins(int *p_margins, RID *p_margin_textures) = 0; diff --git a/servers/visual/rasterizer_rd/light_cluster_builder.cpp b/servers/visual/rasterizer_rd/light_cluster_builder.cpp index 5fe734e82d..943ef1c7fa 100644 --- a/servers/visual/rasterizer_rd/light_cluster_builder.cpp +++ b/servers/visual/rasterizer_rd/light_cluster_builder.cpp @@ -47,8 +47,8 @@ void LightClusterBuilder::bake_cluster() { float slice_depth = (z_near - z_far) / depth; - PoolVector<uint8_t>::Write cluster_dataw = cluster_data.write(); - Cell *cluster_data_ptr = (Cell *)cluster_dataw.ptr(); + uint8_t *cluster_dataw = cluster_data.ptrw(); + Cell *cluster_data_ptr = (Cell *)cluster_dataw; //clear the cluster zeromem(cluster_data_ptr, (width * height * depth * sizeof(Cell))); @@ -112,8 +112,8 @@ void LightClusterBuilder::bake_cluster() { int sx = MAX(0, from_x); int sy = MAX(0, from_y); - int dx = MIN(width - 1, to_x); - int dy = MIN(height - 1, to_y); + int dx = MIN((int)width - 1, to_x); + int dy = MIN((int)height - 1, to_y); //print_line(itos(j) + " - " + Vector2i(sx, sy) + " -> " + Vector2i(dx, dy)); @@ -160,8 +160,7 @@ void LightClusterBuilder::bake_cluster() { //print_line("offset: " + itos(offset)); /* Step 3, Place item lists */ - PoolVector<uint32_t>::Write idsw = ids.write(); - uint32_t *ids_ptr = idsw.ptr(); + uint32_t *ids_ptr = ids.ptrw(); for (uint32_t i = 0; i < sort_id_count; i++) { const SortID &id = sort_ids[i]; @@ -173,12 +172,8 @@ void LightClusterBuilder::bake_cluster() { cell.item_pointers[id.item_type] = pointer | ((counter + 1) << COUNTER_SHIFT); } - cluster_dataw = PoolVector<uint8_t>::Write(); - RD::get_singleton()->texture_update(cluster_texture, 0, cluster_data, true); RD::get_singleton()->buffer_update(items_buffer, 0, offset * sizeof(uint32_t), ids_ptr, true); - - idsw = PoolVector<uint32_t>::Write(); } void LightClusterBuilder::setup(uint32_t p_width, uint32_t p_height, uint32_t p_depth) { diff --git a/servers/visual/rasterizer_rd/light_cluster_builder.h b/servers/visual/rasterizer_rd/light_cluster_builder.h index fd2bd612c3..83014a7dd0 100644 --- a/servers/visual/rasterizer_rd/light_cluster_builder.h +++ b/servers/visual/rasterizer_rd/light_cluster_builder.h @@ -104,7 +104,7 @@ private: uint32_t item_pointers[ITEM_TYPE_MAX]; }; - PoolVector<uint8_t> cluster_data; + Vector<uint8_t> cluster_data; RID cluster_texture; struct SortID { @@ -114,7 +114,7 @@ private: }; SortID *sort_ids = nullptr; - PoolVector<uint32_t> ids; + Vector<uint32_t> ids; uint32_t sort_id_count = 0; uint32_t sort_id_max = 0; RID items_buffer; diff --git a/servers/visual/rasterizer_rd/rasterizer_canvas_rd.cpp b/servers/visual/rasterizer_rd/rasterizer_canvas_rd.cpp index 7012cb04cd..54f330ecdd 100644 --- a/servers/visual/rasterizer_rd/rasterizer_canvas_rd.cpp +++ b/servers/visual/rasterizer_rd/rasterizer_canvas_rd.cpp @@ -271,7 +271,7 @@ RasterizerCanvas::PolygonID RasterizerCanvasRD::request_polygon(const Vector<int uint32_t buffer_size = stride * p_points.size(); - PoolVector<uint8_t> polygon_buffer; + Vector<uint8_t> polygon_buffer; polygon_buffer.resize(buffer_size * sizeof(float)); Vector<RD::VertexDescription> descriptions; descriptions.resize(4); @@ -279,9 +279,9 @@ RasterizerCanvas::PolygonID RasterizerCanvasRD::request_polygon(const Vector<int buffers.resize(4); { - PoolVector<uint8_t>::Read r = polygon_buffer.read(); - float *fptr = (float *)r.ptr(); - uint32_t *uptr = (uint32_t *)r.ptr(); + const uint8_t *r = polygon_buffer.ptr(); + float *fptr = (float *)r; + uint32_t *uptr = (uint32_t *)r; uint32_t base_offset = 0; { //vertices RD::VertexDescription vd; @@ -430,11 +430,11 @@ RasterizerCanvas::PolygonID RasterizerCanvasRD::request_polygon(const Vector<int if (p_indices.size()) { //create indices, as indices were requested - PoolVector<uint8_t> index_buffer; + Vector<uint8_t> index_buffer; index_buffer.resize(p_indices.size() * sizeof(int32_t)); { - PoolVector<uint8_t>::Write w = index_buffer.write(); - copymem(w.ptr(), p_indices.ptr(), sizeof(int32_t) * p_indices.size()); + uint8_t *w = index_buffer.ptrw(); + copymem(w, p_indices.ptr(), sizeof(int32_t) * p_indices.size()); } pb.index_buffer = RD::get_singleton()->index_buffer_create(p_indices.size(), RD::INDEX_BUFFER_FORMAT_UINT32, index_buffer); pb.indices = RD::get_singleton()->index_array_create(pb.index_buffer, 0, p_indices.size()); @@ -991,6 +991,15 @@ void RasterizerCanvasRD::_render_item(RD::DrawListID p_draw_list, const Item *p_ } } break; + case Item::Command::TYPE_MESH: + case Item::Command::TYPE_MULTIMESH: + case Item::Command::TYPE_PARTICLES: { + ERR_PRINT("FIXME: Mesh, MultiMesh and Particles render commands are unimplemented currently, they need to be ported to the 4.0 rendering architecture."); +#ifndef _MSC_VER +#warning Item::Command types for Mesh, MultiMesh and Particles need to be implemented. +#endif + // See #if 0'ed code below to port from GLES3. + } break; #if 0 case Item::Command::TYPE_MESH: { @@ -1707,7 +1716,7 @@ RID RasterizerCanvasRD::occluder_polygon_create() { return occluder_polygon_owner.make_rid(occluder); } -void RasterizerCanvasRD::occluder_polygon_set_shape_as_lines(RID p_occluder, const PoolVector<Vector2> &p_lines) { +void RasterizerCanvasRD::occluder_polygon_set_shape_as_lines(RID p_occluder, const Vector<Vector2> &p_lines) { OccluderPolygon *oc = occluder_polygon_owner.getornull(p_occluder); ERR_FAIL_COND(!oc); @@ -1727,20 +1736,20 @@ void RasterizerCanvasRD::occluder_polygon_set_shape_as_lines(RID p_occluder, con if (p_lines.size()) { - PoolVector<uint8_t> geometry; - PoolVector<uint8_t> indices; + Vector<uint8_t> geometry; + Vector<uint8_t> indices; int lc = p_lines.size(); geometry.resize(lc * 6 * sizeof(float)); indices.resize(lc * 3 * sizeof(uint16_t)); { - PoolVector<uint8_t>::Write vw = geometry.write(); - float *vwptr = (float *)vw.ptr(); - PoolVector<uint8_t>::Write iw = indices.write(); - uint16_t *iwptr = (uint16_t *)iw.ptr(); + uint8_t *vw = geometry.ptrw(); + float *vwptr = (float *)vw; + uint8_t *iw = indices.ptrw(); + uint16_t *iwptr = (uint16_t *)iw; - PoolVector<Vector2>::Read lr = p_lines.read(); + const Vector2 *lr = p_lines.ptr(); const int POLY_HEIGHT = 16384; @@ -1789,10 +1798,10 @@ void RasterizerCanvasRD::occluder_polygon_set_shape_as_lines(RID p_occluder, con } else { //update existing - PoolVector<uint8_t>::Read vr = geometry.read(); - RD::get_singleton()->buffer_update(oc->vertex_buffer, 0, geometry.size(), vr.ptr()); - PoolVector<uint8_t>::Read ir = indices.read(); - RD::get_singleton()->buffer_update(oc->index_buffer, 0, indices.size(), ir.ptr()); + const uint8_t *vr = geometry.ptr(); + RD::get_singleton()->buffer_update(oc->vertex_buffer, 0, geometry.size(), vr); + const uint8_t *ir = indices.ptr(); + RD::get_singleton()->buffer_update(oc->index_buffer, 0, indices.size(), ir); } } } @@ -2131,15 +2140,15 @@ void RasterizerCanvasRD::MaterialData::update_parameters(const Map<StringName, V RID *ids_ptr = u.ids.ptrw(); ids_ptr[0] = canvas_singleton->storage->sampler_rd_get_default(VS::CANVAS_ITEM_TEXTURE_FILTER_NEAREST, VS::CANVAS_ITEM_TEXTURE_REPEAT_DISABLED); ids_ptr[1] = canvas_singleton->storage->sampler_rd_get_default(VS::CANVAS_ITEM_TEXTURE_FILTER_LINEAR, VS::CANVAS_ITEM_TEXTURE_REPEAT_DISABLED); - ids_ptr[2] = canvas_singleton->storage->sampler_rd_get_default(VS::CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIMPAMPS, VS::CANVAS_ITEM_TEXTURE_REPEAT_DISABLED); + ids_ptr[2] = canvas_singleton->storage->sampler_rd_get_default(VS::CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS, VS::CANVAS_ITEM_TEXTURE_REPEAT_DISABLED); ids_ptr[3] = canvas_singleton->storage->sampler_rd_get_default(VS::CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS, VS::CANVAS_ITEM_TEXTURE_REPEAT_DISABLED); - ids_ptr[4] = canvas_singleton->storage->sampler_rd_get_default(VS::CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIMPAMPS_ANISOTROPIC, VS::CANVAS_ITEM_TEXTURE_REPEAT_DISABLED); + ids_ptr[4] = canvas_singleton->storage->sampler_rd_get_default(VS::CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC, VS::CANVAS_ITEM_TEXTURE_REPEAT_DISABLED); ids_ptr[5] = canvas_singleton->storage->sampler_rd_get_default(VS::CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC, VS::CANVAS_ITEM_TEXTURE_REPEAT_DISABLED); ids_ptr[6] = canvas_singleton->storage->sampler_rd_get_default(VS::CANVAS_ITEM_TEXTURE_FILTER_NEAREST, VS::CANVAS_ITEM_TEXTURE_REPEAT_ENABLED); ids_ptr[7] = canvas_singleton->storage->sampler_rd_get_default(VS::CANVAS_ITEM_TEXTURE_FILTER_LINEAR, VS::CANVAS_ITEM_TEXTURE_REPEAT_ENABLED); - ids_ptr[8] = canvas_singleton->storage->sampler_rd_get_default(VS::CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIMPAMPS, VS::CANVAS_ITEM_TEXTURE_REPEAT_ENABLED); + ids_ptr[8] = canvas_singleton->storage->sampler_rd_get_default(VS::CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS, VS::CANVAS_ITEM_TEXTURE_REPEAT_ENABLED); ids_ptr[9] = canvas_singleton->storage->sampler_rd_get_default(VS::CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS, VS::CANVAS_ITEM_TEXTURE_REPEAT_ENABLED); - ids_ptr[10] = canvas_singleton->storage->sampler_rd_get_default(VS::CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIMPAMPS_ANISOTROPIC, VS::CANVAS_ITEM_TEXTURE_REPEAT_ENABLED); + ids_ptr[10] = canvas_singleton->storage->sampler_rd_get_default(VS::CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC, VS::CANVAS_ITEM_TEXTURE_REPEAT_ENABLED); ids_ptr[11] = canvas_singleton->storage->sampler_rd_get_default(VS::CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC, VS::CANVAS_ITEM_TEXTURE_REPEAT_ENABLED); uniforms.push_back(u); } @@ -2431,11 +2440,11 @@ RasterizerCanvasRD::RasterizerCanvasRD(RasterizerStorageRD *p_storage) { { // default index buffer - PoolVector<uint8_t> pv; + Vector<uint8_t> pv; pv.resize(6 * 4); { - PoolVector<uint8_t>::Write w = pv.write(); - int *p32 = (int *)w.ptr(); + uint8_t *w = pv.ptrw(); + int *p32 = (int *)w; p32[0] = 0; p32[1] = 1; p32[2] = 2; @@ -2482,7 +2491,7 @@ bool RasterizerCanvasRD::free(RID p_rid) { light_set_use_shadow(p_rid, false, 64); canvas_light_owner.free(p_rid); } else if (occluder_polygon_owner.owns(p_rid)) { - occluder_polygon_set_shape_as_lines(p_rid, PoolVector<Vector2>()); + occluder_polygon_set_shape_as_lines(p_rid, Vector<Vector2>()); occluder_polygon_owner.free(p_rid); } else { return false; diff --git a/servers/visual/rasterizer_rd/rasterizer_canvas_rd.h b/servers/visual/rasterizer_rd/rasterizer_canvas_rd.h index 17560ea540..894a00a436 100644 --- a/servers/visual/rasterizer_rd/rasterizer_canvas_rd.h +++ b/servers/visual/rasterizer_rd/rasterizer_canvas_rd.h @@ -482,7 +482,7 @@ public: void light_update_shadow(RID p_rid, const Transform2D &p_light_xform, int p_light_mask, float p_near, float p_far, LightOccluderInstance *p_occluders); RID occluder_polygon_create(); - void occluder_polygon_set_shape_as_lines(RID p_occluder, const PoolVector<Vector2> &p_lines); + void occluder_polygon_set_shape_as_lines(RID p_occluder, const Vector<Vector2> &p_lines); void occluder_polygon_set_cull_mode(RID p_occluder, VS::CanvasOccluderPolygonCullMode p_mode); void canvas_render_items(RID p_to_render_target, Item *p_item_list, const Color &p_modulate, Light *p_light_list, const Transform2D &p_canvas_transform); diff --git a/servers/visual/rasterizer_rd/rasterizer_effects_rd.cpp b/servers/visual/rasterizer_rd/rasterizer_effects_rd.cpp index 4b8b3334b5..c05f5cead0 100644 --- a/servers/visual/rasterizer_rd/rasterizer_effects_rd.cpp +++ b/servers/visual/rasterizer_rd/rasterizer_effects_rd.cpp @@ -955,11 +955,11 @@ RasterizerEffectsRD::RasterizerEffectsRD() { default_mipmap_sampler = RD::get_singleton()->sampler_create(sampler); { //create index array for copy shaders - PoolVector<uint8_t> pv; + Vector<uint8_t> pv; pv.resize(6 * 4); { - PoolVector<uint8_t>::Write w = pv.write(); - int *p32 = (int *)w.ptr(); + uint8_t *w = pv.ptrw(); + int *p32 = (int *)w; p32[0] = 0; p32[1] = 1; p32[2] = 2; diff --git a/servers/visual/rasterizer_rd/rasterizer_rd.cpp b/servers/visual/rasterizer_rd/rasterizer_rd.cpp index ee33f395e7..206320376b 100644 --- a/servers/visual/rasterizer_rd/rasterizer_rd.cpp +++ b/servers/visual/rasterizer_rd/rasterizer_rd.cpp @@ -126,11 +126,11 @@ void RasterizerRD::initialize() { } { //create index array for copy shader - PoolVector<uint8_t> pv; + Vector<uint8_t> pv; pv.resize(6 * 4); { - PoolVector<uint8_t>::Write w = pv.write(); - int *p32 = (int *)w.ptr(); + uint8_t *w = pv.ptrw(); + int *p32 = (int *)w; p32[0] = 0; p32[1] = 1; p32[2] = 2; diff --git a/servers/visual/rasterizer_rd/rasterizer_scene_high_end_rd.cpp b/servers/visual/rasterizer_rd/rasterizer_scene_high_end_rd.cpp index f029cddc79..dd6bece11d 100644 --- a/servers/visual/rasterizer_rd/rasterizer_scene_high_end_rd.cpp +++ b/servers/visual/rasterizer_rd/rasterizer_scene_high_end_rd.cpp @@ -67,18 +67,6 @@ static _FORCE_INLINE_ void store_transform_3x3(const Transform &p_mtx, float *p_ p_array[11] = 0; } -static _FORCE_INLINE_ void store_transform_3x3_430(const Transform &p_mtx, float *p_array) { - p_array[0] = p_mtx.basis.elements[0][0]; - p_array[1] = p_mtx.basis.elements[1][0]; - p_array[2] = p_mtx.basis.elements[2][0]; - p_array[3] = p_mtx.basis.elements[0][1]; - p_array[4] = p_mtx.basis.elements[1][1]; - p_array[5] = p_mtx.basis.elements[2][1]; - p_array[6] = p_mtx.basis.elements[0][2]; - p_array[7] = p_mtx.basis.elements[1][2]; - p_array[8] = p_mtx.basis.elements[2][2]; -} - static _FORCE_INLINE_ void store_camera(const CameraMatrix &p_mtx, float *p_array) { for (int i = 0; i < 4; i++) { @@ -1409,7 +1397,7 @@ void RasterizerSceneHighEndRD::_setup_reflections(RID *p_reflection_probe_cull_r } if (p_reflection_probe_cull_count) { - RD::get_singleton()->buffer_update(scene_state.reflection_buffer, 0, MIN(scene_state.max_reflections, p_reflection_probe_cull_count) * sizeof(ReflectionData), scene_state.reflections, true); + RD::get_singleton()->buffer_update(scene_state.reflection_buffer, 0, MIN(scene_state.max_reflections, (unsigned int)p_reflection_probe_cull_count) * sizeof(ReflectionData), scene_state.reflections, true); } } @@ -1566,10 +1554,10 @@ void RasterizerSceneHighEndRD::_setup_lights(RID *p_light_cull_result, int p_lig light_data.attenuation_energy[0] = Math::make_half_float(storage->light_get_param(base, VS::LIGHT_PARAM_ATTENUATION)); light_data.attenuation_energy[1] = Math::make_half_float(sign * storage->light_get_param(base, VS::LIGHT_PARAM_ENERGY) * Math_PI); - light_data.color_specular[0] = CLAMP(uint32_t(linear_col.r * 255), 0, 255); - light_data.color_specular[1] = CLAMP(uint32_t(linear_col.g * 255), 0, 255); - light_data.color_specular[2] = CLAMP(uint32_t(linear_col.b * 255), 0, 255); - light_data.color_specular[3] = CLAMP(uint32_t(storage->light_get_param(base, VS::LIGHT_PARAM_SPECULAR) * 255), 0, 255); + light_data.color_specular[0] = MIN(uint32_t(linear_col.r * 255), 255); + light_data.color_specular[1] = MIN(uint32_t(linear_col.g * 255), 255); + light_data.color_specular[2] = MIN(uint32_t(linear_col.b * 255), 255); + light_data.color_specular[3] = MIN(uint32_t(storage->light_get_param(base, VS::LIGHT_PARAM_SPECULAR) * 255), 255); float radius = MAX(0.001, storage->light_get_param(base, VS::LIGHT_PARAM_RANGE)); light_data.inv_radius = 1.0 / radius; @@ -1595,9 +1583,9 @@ void RasterizerSceneHighEndRD::_setup_lights(RID *p_light_cull_result, int p_lig Color shadow_color = storage->light_get_shadow_color(base); bool has_shadow = p_using_shadows && storage->light_has_shadow(base); - light_data.shadow_color_enabled[0] = CLAMP(uint32_t(shadow_color.r * 255), 0, 255); - light_data.shadow_color_enabled[1] = CLAMP(uint32_t(shadow_color.g * 255), 0, 255); - light_data.shadow_color_enabled[2] = CLAMP(uint32_t(shadow_color.b * 255), 0, 255); + light_data.shadow_color_enabled[0] = MIN(uint32_t(shadow_color.r * 255), 255); + light_data.shadow_color_enabled[1] = MIN(uint32_t(shadow_color.g * 255), 255); + light_data.shadow_color_enabled[2] = MIN(uint32_t(shadow_color.b * 255), 255); light_data.shadow_color_enabled[3] = has_shadow ? 255 : 0; light_data.atlas_rect[0] = 0; @@ -1821,7 +1809,7 @@ void RasterizerSceneHighEndRD::_render_scene(RID p_render_buffer, const Transfor case VS::ENV_BG_SKY: { RID sky = environment_get_sky(p_environment); if (sky.is_valid()) { - radiance_uniform_set = sky_get_radiance_uniform_set_rd(sky, radiance_uniform_set, RADIANCE_UNIFORM_SET); + radiance_uniform_set = sky_get_radiance_uniform_set_rd(sky, default_shader_rd, RADIANCE_UNIFORM_SET); draw_sky = true; } } break; @@ -1906,8 +1894,16 @@ void RasterizerSceneHighEndRD::_render_scene(RID p_render_buffer, const Transfor if (draw_sky) { RENDER_TIMESTAMP("Render Sky"); + + CameraMatrix projection = p_cam_projection; + if (p_reflection_probe.is_valid()) { + CameraMatrix correction; + correction.set_depth_correction(true); + projection = correction * p_cam_projection; + } + RD::DrawListID draw_list = RD::get_singleton()->draw_list_begin(opaque_framebuffer, RD::INITIAL_ACTION_CONTINUE, can_continue ? RD::FINAL_ACTION_CONTINUE : RD::FINAL_ACTION_READ, RD::INITIAL_ACTION_CONTINUE, can_continue ? RD::FINAL_ACTION_CONTINUE : RD::FINAL_ACTION_READ); - _draw_sky(draw_list, RD::get_singleton()->framebuffer_get_format(opaque_framebuffer), p_environment, p_cam_projection, p_cam_transform, 1.0); + _draw_sky(draw_list, RD::get_singleton()->framebuffer_get_format(opaque_framebuffer), p_environment, projection, p_cam_transform, 1.0); RD::get_singleton()->draw_list_end(); if (using_separate_specular && !can_continue) { @@ -2104,15 +2100,15 @@ void RasterizerSceneHighEndRD::_update_render_base_uniform_set() { RID *ids_ptr = u.ids.ptrw(); ids_ptr[0] = storage->sampler_rd_get_default(VS::CANVAS_ITEM_TEXTURE_FILTER_NEAREST, VS::CANVAS_ITEM_TEXTURE_REPEAT_DISABLED); ids_ptr[1] = storage->sampler_rd_get_default(VS::CANVAS_ITEM_TEXTURE_FILTER_LINEAR, VS::CANVAS_ITEM_TEXTURE_REPEAT_DISABLED); - ids_ptr[2] = storage->sampler_rd_get_default(VS::CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIMPAMPS, VS::CANVAS_ITEM_TEXTURE_REPEAT_DISABLED); + ids_ptr[2] = storage->sampler_rd_get_default(VS::CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS, VS::CANVAS_ITEM_TEXTURE_REPEAT_DISABLED); ids_ptr[3] = storage->sampler_rd_get_default(VS::CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS, VS::CANVAS_ITEM_TEXTURE_REPEAT_DISABLED); - ids_ptr[4] = storage->sampler_rd_get_default(VS::CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIMPAMPS_ANISOTROPIC, VS::CANVAS_ITEM_TEXTURE_REPEAT_DISABLED); + ids_ptr[4] = storage->sampler_rd_get_default(VS::CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC, VS::CANVAS_ITEM_TEXTURE_REPEAT_DISABLED); ids_ptr[5] = storage->sampler_rd_get_default(VS::CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC, VS::CANVAS_ITEM_TEXTURE_REPEAT_DISABLED); ids_ptr[6] = storage->sampler_rd_get_default(VS::CANVAS_ITEM_TEXTURE_FILTER_NEAREST, VS::CANVAS_ITEM_TEXTURE_REPEAT_ENABLED); ids_ptr[7] = storage->sampler_rd_get_default(VS::CANVAS_ITEM_TEXTURE_FILTER_LINEAR, VS::CANVAS_ITEM_TEXTURE_REPEAT_ENABLED); - ids_ptr[8] = storage->sampler_rd_get_default(VS::CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIMPAMPS, VS::CANVAS_ITEM_TEXTURE_REPEAT_ENABLED); + ids_ptr[8] = storage->sampler_rd_get_default(VS::CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS, VS::CANVAS_ITEM_TEXTURE_REPEAT_ENABLED); ids_ptr[9] = storage->sampler_rd_get_default(VS::CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS, VS::CANVAS_ITEM_TEXTURE_REPEAT_ENABLED); - ids_ptr[10] = storage->sampler_rd_get_default(VS::CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIMPAMPS_ANISOTROPIC, VS::CANVAS_ITEM_TEXTURE_REPEAT_ENABLED); + ids_ptr[10] = storage->sampler_rd_get_default(VS::CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC, VS::CANVAS_ITEM_TEXTURE_REPEAT_ENABLED); ids_ptr[11] = storage->sampler_rd_get_default(VS::CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC, VS::CANVAS_ITEM_TEXTURE_REPEAT_ENABLED); uniforms.push_back(u); } @@ -2690,13 +2686,27 @@ RasterizerSceneHighEndRD::RasterizerSceneHighEndRD(RasterizerStorageRD *p_storag } RasterizerSceneHighEndRD::~RasterizerSceneHighEndRD() { + directional_shadow_atlas_set_size(0); + //clear base uniform set if still valid if (view_dependant_uniform_set.is_valid() && RD::get_singleton()->uniform_set_is_valid(view_dependant_uniform_set)) { RD::get_singleton()->free(view_dependant_uniform_set); } + storage->free(wireframe_material_shader); + storage->free(overdraw_material_shader); + storage->free(default_shader); + + storage->free(wireframe_material); + storage->free(overdraw_material); + storage->free(default_material); + { RD::get_singleton()->free(scene_state.reflection_buffer); + memdelete_arr(scene_state.instances); + memdelete_arr(scene_state.gi_probes); + memdelete_arr(scene_state.directional_lights); + memdelete_arr(scene_state.lights); memdelete_arr(scene_state.reflections); } } diff --git a/servers/visual/rasterizer_rd/rasterizer_scene_rd.cpp b/servers/visual/rasterizer_rd/rasterizer_scene_rd.cpp index e95b7c0b2a..a19e633089 100644 --- a/servers/visual/rasterizer_rd/rasterizer_scene_rd.cpp +++ b/servers/visual/rasterizer_rd/rasterizer_scene_rd.cpp @@ -1406,7 +1406,7 @@ void RasterizerSceneRD::gi_probe_update(RID p_probe, bool p_update_light_instanc if (octree_size != Vector3i()) { //can create a 3D texture - PoolVector<int> levels = storage->gi_probe_get_level_counts(gi_probe->probe); + Vector<int> levels = storage->gi_probe_get_level_counts(gi_probe->probe); RD::TextureFormat tf; tf.format = RD::DATA_FORMAT_R8G8B8A8_UNORM; @@ -2745,7 +2745,6 @@ void RasterizerSceneRD::render_shadow(RID p_light, RID p_shadow_atlas, int p_pas Rect2i atlas_rect; RID atlas_fb; - int atlas_fb_size; bool using_dual_paraboloid = false; bool using_dual_paraboloid_flip = false; @@ -2816,7 +2815,6 @@ void RasterizerSceneRD::render_shadow(RID p_light, RID p_shadow_atlas, int p_pas render_fb = shadow_map->fb; render_texture = shadow_map->depth; atlas_fb = directional_shadow.fb; - atlas_fb_size = directional_shadow.size; } else { //set from shadow atlas @@ -2844,7 +2842,6 @@ void RasterizerSceneRD::render_shadow(RID p_light, RID p_shadow_atlas, int p_pas atlas_rect.size.width = shadow_size; atlas_rect.size.height = shadow_size; atlas_fb = shadow_atlas->fb; - atlas_fb_size = shadow_atlas->size; zfar = storage->light_get_param(light_instance->light, VS::LIGHT_PARAM_RANGE); bias = storage->light_get_param(light_instance->light, VS::LIGHT_PARAM_SHADOW_BIAS); @@ -3125,8 +3122,6 @@ RasterizerSceneRD::RasterizerSceneRD(RasterizerStorageRD *p_storage) { } RasterizerSceneRD::~RasterizerSceneRD() { - directional_shadow_atlas_set_size(0); - for (Map<Vector2i, ShadowMap>::Element *E = shadow_maps.front(); E; E = E->next()) { RD::get_singleton()->free(E->get().depth); } diff --git a/servers/visual/rasterizer_rd/rasterizer_storage_rd.cpp b/servers/visual/rasterizer_rd/rasterizer_storage_rd.cpp index c92400c188..5d43876192 100644 --- a/servers/visual/rasterizer_rd/rasterizer_storage_rd.cpp +++ b/servers/visual/rasterizer_rd/rasterizer_storage_rd.cpp @@ -584,8 +584,8 @@ RID RasterizerStorageRD::texture_2d_create(const Ref<Image> &p_image) { rd_view.swizzle_b = ret_format.swizzle_b; rd_view.swizzle_a = ret_format.swizzle_a; } - PoolVector<uint8_t> data = image->get_data(); //use image data - Vector<PoolVector<uint8_t> > data_slices; + Vector<uint8_t> data = image->get_data(); //use image data + Vector<Vector<uint8_t> > data_slices; data_slices.push_back(data); texture.rd_texture = RD::get_singleton()->texture_create(rd_format, rd_view, data_slices); ERR_FAIL_COND_V(texture.rd_texture.is_null(), RID()); @@ -720,13 +720,12 @@ RID RasterizerStorageRD::texture_2d_placeholder_create() { Ref<Image> image; image.instance(); image->create(4, 4, false, Image::FORMAT_RGBA8); - image->lock(); + for (int i = 0; i < 4; i++) { for (int j = 0; j < 4; j++) { image->set_pixel(i, j, Color(1, 0, 1, 1)); } } - image->unlock(); return texture_2d_create(image); } @@ -749,7 +748,7 @@ Ref<Image> RasterizerStorageRD::texture_2d_get(RID p_texture) const { return tex->image_cache_2d; } #endif - PoolVector<uint8_t> data = RD::get_singleton()->texture_get_data(tex->rd_texture, 0); + Vector<uint8_t> data = RD::get_singleton()->texture_get_data(tex->rd_texture, 0); ERR_FAIL_COND_V(data.size() == 0, Ref<Image>()); Ref<Image> image; image.instance(); @@ -1195,11 +1194,11 @@ _FORCE_INLINE_ static void _fill_std140_variant_ubo_value(ShaderLanguage::DataTy } break; case ShaderLanguage::TYPE_IVEC2: { - PoolVector<int> iv = value; + Vector<int> iv = value; int s = iv.size(); int32_t *gui = (int32_t *)data; - PoolVector<int>::Read r = iv.read(); + const int *r = iv.ptr(); for (int i = 0; i < 2; i++) { if (i < s) @@ -1211,11 +1210,11 @@ _FORCE_INLINE_ static void _fill_std140_variant_ubo_value(ShaderLanguage::DataTy } break; case ShaderLanguage::TYPE_IVEC3: { - PoolVector<int> iv = value; + Vector<int> iv = value; int s = iv.size(); int32_t *gui = (int32_t *)data; - PoolVector<int>::Read r = iv.read(); + const int *r = iv.ptr(); for (int i = 0; i < 3; i++) { if (i < s) @@ -1226,11 +1225,11 @@ _FORCE_INLINE_ static void _fill_std140_variant_ubo_value(ShaderLanguage::DataTy } break; case ShaderLanguage::TYPE_IVEC4: { - PoolVector<int> iv = value; + Vector<int> iv = value; int s = iv.size(); int32_t *gui = (int32_t *)data; - PoolVector<int>::Read r = iv.read(); + const int *r = iv.ptr(); for (int i = 0; i < 4; i++) { if (i < s) @@ -1248,11 +1247,11 @@ _FORCE_INLINE_ static void _fill_std140_variant_ubo_value(ShaderLanguage::DataTy } break; case ShaderLanguage::TYPE_UVEC2: { - PoolVector<int> iv = value; + Vector<int> iv = value; int s = iv.size(); uint32_t *gui = (uint32_t *)data; - PoolVector<int>::Read r = iv.read(); + const int *r = iv.ptr(); for (int i = 0; i < 2; i++) { if (i < s) @@ -1262,11 +1261,11 @@ _FORCE_INLINE_ static void _fill_std140_variant_ubo_value(ShaderLanguage::DataTy } } break; case ShaderLanguage::TYPE_UVEC3: { - PoolVector<int> iv = value; + Vector<int> iv = value; int s = iv.size(); uint32_t *gui = (uint32_t *)data; - PoolVector<int>::Read r = iv.read(); + const int *r = iv.ptr(); for (int i = 0; i < 3; i++) { if (i < s) @@ -1277,11 +1276,11 @@ _FORCE_INLINE_ static void _fill_std140_variant_ubo_value(ShaderLanguage::DataTy } break; case ShaderLanguage::TYPE_UVEC4: { - PoolVector<int> iv = value; + Vector<int> iv = value; int s = iv.size(); uint32_t *gui = (uint32_t *)data; - PoolVector<int>::Read r = iv.read(); + const int *r = iv.ptr(); for (int i = 0; i < 4; i++) { if (i < s) @@ -1945,7 +1944,7 @@ int RasterizerStorageRD::mesh_get_blend_shape_count(RID p_mesh) const { void RasterizerStorageRD::mesh_set_blend_shape_mode(RID p_mesh, VS::BlendShapeMode p_mode) { Mesh *mesh = mesh_owner.getornull(p_mesh); ERR_FAIL_COND(!mesh); - ERR_FAIL_INDEX(p_mode, 2); + ERR_FAIL_INDEX((int)p_mode, 2); mesh->blend_shape_mode = p_mode; } @@ -1955,21 +1954,21 @@ VS::BlendShapeMode RasterizerStorageRD::mesh_get_blend_shape_mode(RID p_mesh) co return mesh->blend_shape_mode; } -void RasterizerStorageRD::mesh_surface_update_region(RID p_mesh, int p_surface, int p_offset, const PoolVector<uint8_t> &p_data) { +void RasterizerStorageRD::mesh_surface_update_region(RID p_mesh, int p_surface, int p_offset, const Vector<uint8_t> &p_data) { Mesh *mesh = mesh_owner.getornull(p_mesh); ERR_FAIL_COND(!mesh); - ERR_FAIL_INDEX((uint32_t)p_surface, mesh->surface_count); + ERR_FAIL_UNSIGNED_INDEX((uint32_t)p_surface, mesh->surface_count); ERR_FAIL_COND(p_data.size() == 0); uint64_t data_size = p_data.size(); - PoolVector<uint8_t>::Read r = p_data.read(); + const uint8_t *r = p_data.ptr(); - RD::get_singleton()->buffer_update(mesh->surfaces[p_surface]->vertex_buffer, p_offset, data_size, r.ptr()); + RD::get_singleton()->buffer_update(mesh->surfaces[p_surface]->vertex_buffer, p_offset, data_size, r); } void RasterizerStorageRD::mesh_surface_set_material(RID p_mesh, int p_surface, RID p_material) { Mesh *mesh = mesh_owner.getornull(p_mesh); ERR_FAIL_COND(!mesh); - ERR_FAIL_INDEX((uint32_t)p_surface, mesh->surface_count); + ERR_FAIL_UNSIGNED_INDEX((uint32_t)p_surface, mesh->surface_count); mesh->surfaces[p_surface]->material = p_material; mesh->instance_dependency.instance_notify_changed(false, true); @@ -1978,7 +1977,7 @@ void RasterizerStorageRD::mesh_surface_set_material(RID p_mesh, int p_surface, R RID RasterizerStorageRD::mesh_surface_get_material(RID p_mesh, int p_surface) const { Mesh *mesh = mesh_owner.getornull(p_mesh); ERR_FAIL_COND_V(!mesh, RID()); - ERR_FAIL_INDEX_V((uint32_t)p_surface, mesh->surface_count, RID()); + ERR_FAIL_UNSIGNED_INDEX_V((uint32_t)p_surface, mesh->surface_count, RID()); return mesh->surfaces[p_surface]->material; } @@ -1987,7 +1986,7 @@ VS::SurfaceData RasterizerStorageRD::mesh_get_surface(RID p_mesh, int p_surface) Mesh *mesh = mesh_owner.getornull(p_mesh); ERR_FAIL_COND_V(!mesh, VS::SurfaceData()); - ERR_FAIL_INDEX_V((uint32_t)p_surface, mesh->surface_count, VS::SurfaceData()); + ERR_FAIL_UNSIGNED_INDEX_V((uint32_t)p_surface, mesh->surface_count, VS::SurfaceData()); Mesh::Surface &s = *mesh->surfaces[p_surface]; @@ -2012,7 +2011,7 @@ VS::SurfaceData RasterizerStorageRD::mesh_get_surface(RID p_mesh, int p_surface) sd.bone_aabbs = s.bone_aabbs; for (int i = 0; i < s.blend_shapes.size(); i++) { - PoolVector<uint8_t> bs = RD::get_singleton()->buffer_get_data(s.blend_shapes[i]); + Vector<uint8_t> bs = RD::get_singleton()->buffer_get_data(s.blend_shapes[i]); sd.blend_shapes.push_back(bs); } @@ -2386,7 +2385,7 @@ void RasterizerStorageRD::multimesh_allocate(RID p_multimesh, int p_instances, V multimesh->buffer_set = false; //print_line("allocate, elements: " + itos(p_instances) + " 2D: " + itos(p_transform_format == VS::MULTIMESH_TRANSFORM_2D) + " colors " + itos(multimesh->uses_colors) + " data " + itos(multimesh->uses_custom_data) + " stride " + itos(multimesh->stride_cache) + " total size " + itos(multimesh->stride_cache * multimesh->instances)); - multimesh->data_cache = PoolVector<float>(); + multimesh->data_cache = Vector<float>(); multimesh->aabb = AABB(); multimesh->aabb_dirty = false; multimesh->visible_instances = MIN(multimesh->visible_instances, multimesh->instances); @@ -2421,9 +2420,9 @@ void RasterizerStorageRD::multimesh_set_mesh(RID p_multimesh, RID p_mesh) { } else if (multimesh->instances) { //need to re-create AABB unfortunately, calling this has a penalty if (multimesh->buffer_set) { - PoolVector<uint8_t> buffer = RD::get_singleton()->buffer_get_data(multimesh->buffer); - PoolVector<uint8_t>::Read r = buffer.read(); - const float *data = (const float *)r.ptr(); + Vector<uint8_t> buffer = RD::get_singleton()->buffer_get_data(multimesh->buffer); + const uint8_t *r = buffer.ptr(); + const float *data = (const float *)r; _multimesh_re_create_aabb(multimesh, data, multimesh->instances); } } @@ -2442,17 +2441,17 @@ void RasterizerStorageRD::_multimesh_make_local(MultiMesh *multimesh) const { // for this, the data must reside on CPU, so just copy it there. multimesh->data_cache.resize(multimesh->instances * multimesh->stride_cache); { - PoolVector<float>::Write w = multimesh->data_cache.write(); + float *w = multimesh->data_cache.ptrw(); if (multimesh->buffer_set) { - PoolVector<uint8_t> buffer = RD::get_singleton()->buffer_get_data(multimesh->buffer); + Vector<uint8_t> buffer = RD::get_singleton()->buffer_get_data(multimesh->buffer); { - PoolVector<uint8_t>::Read r = buffer.read(); - copymem(w.ptr(), r.ptr(), buffer.size()); + const uint8_t *r = buffer.ptr(); + copymem(w, r, buffer.size()); } } else { - zeromem(w.ptr(), multimesh->instances * multimesh->stride_cache * sizeof(float)); + zeromem(w, multimesh->instances * multimesh->stride_cache * sizeof(float)); } } uint32_t data_cache_dirty_region_count = (multimesh->instances - 1) / MULTIMESH_DIRTY_REGION_SIZE + 1; @@ -2468,10 +2467,10 @@ void RasterizerStorageRD::_multimesh_mark_dirty(MultiMesh *multimesh, int p_inde uint32_t region_index = p_index / MULTIMESH_DIRTY_REGION_SIZE; #ifdef DEBUG_ENABLED uint32_t data_cache_dirty_region_count = (multimesh->instances - 1) / MULTIMESH_DIRTY_REGION_SIZE + 1; - ERR_FAIL_INDEX(region_index, data_cache_dirty_region_count); //bug + ERR_FAIL_UNSIGNED_INDEX(region_index, data_cache_dirty_region_count); //bug #endif if (!multimesh->data_cache_dirty_regions[region_index]) { - multimesh->data_cache_dirty_regions[p_index] = true; + multimesh->data_cache_dirty_regions[region_index] = true; multimesh->data_cache_used_dirty_regions++; } @@ -2564,9 +2563,9 @@ void RasterizerStorageRD::multimesh_instance_set_transform(RID p_multimesh, int _multimesh_make_local(multimesh); { - PoolVector<float>::Write w = multimesh->data_cache.write(); + float *w = multimesh->data_cache.ptrw(); - float *dataptr = w.ptr() + p_index * multimesh->stride_cache; + float *dataptr = w + p_index * multimesh->stride_cache; dataptr[0] = p_transform.basis.elements[0][0]; dataptr[1] = p_transform.basis.elements[0][1]; @@ -2595,9 +2594,9 @@ void RasterizerStorageRD::multimesh_instance_set_transform_2d(RID p_multimesh, i _multimesh_make_local(multimesh); { - PoolVector<float>::Write w = multimesh->data_cache.write(); + float *w = multimesh->data_cache.ptrw(); - float *dataptr = w.ptr() + p_index * multimesh->stride_cache; + float *dataptr = w + p_index * multimesh->stride_cache; dataptr[0] = p_transform.elements[0][0]; dataptr[1] = p_transform.elements[1][0]; @@ -2621,9 +2620,9 @@ void RasterizerStorageRD::multimesh_instance_set_color(RID p_multimesh, int p_in _multimesh_make_local(multimesh); { - PoolVector<float>::Write w = multimesh->data_cache.write(); + float *w = multimesh->data_cache.ptrw(); - float *dataptr = w.ptr() + p_index * multimesh->stride_cache + multimesh->color_offset_cache; + float *dataptr = w + p_index * multimesh->stride_cache + multimesh->color_offset_cache; dataptr[0] = p_color.r; dataptr[1] = p_color.g; @@ -2637,14 +2636,14 @@ void RasterizerStorageRD::multimesh_instance_set_custom_data(RID p_multimesh, in MultiMesh *multimesh = multimesh_owner.getornull(p_multimesh); ERR_FAIL_COND(!multimesh); ERR_FAIL_INDEX(p_index, multimesh->instances); - ERR_FAIL_INDEX(p_index, !multimesh->uses_custom_data); + ERR_FAIL_COND(!multimesh->uses_custom_data); _multimesh_make_local(multimesh); { - PoolVector<float>::Write w = multimesh->data_cache.write(); + float *w = multimesh->data_cache.ptrw(); - float *dataptr = w.ptr() + p_index * multimesh->stride_cache + multimesh->custom_data_offset_cache; + float *dataptr = w + p_index * multimesh->stride_cache + multimesh->custom_data_offset_cache; dataptr[0] = p_color.r; dataptr[1] = p_color.g; @@ -2674,9 +2673,9 @@ Transform RasterizerStorageRD::multimesh_instance_get_transform(RID p_multimesh, Transform t; { - PoolVector<float>::Read r = multimesh->data_cache.read(); + const float *r = multimesh->data_cache.ptr(); - const float *dataptr = r.ptr() + p_index * multimesh->stride_cache; + const float *dataptr = r + p_index * multimesh->stride_cache; t.basis.elements[0][0] = dataptr[0]; t.basis.elements[0][1] = dataptr[1]; @@ -2705,9 +2704,9 @@ Transform2D RasterizerStorageRD::multimesh_instance_get_transform_2d(RID p_multi Transform2D t; { - PoolVector<float>::Read r = multimesh->data_cache.read(); + const float *r = multimesh->data_cache.ptr(); - const float *dataptr = r.ptr() + p_index * multimesh->stride_cache; + const float *dataptr = r + p_index * multimesh->stride_cache; t.elements[0][0] = dataptr[0]; t.elements[1][0] = dataptr[1]; @@ -2724,15 +2723,15 @@ Color RasterizerStorageRD::multimesh_instance_get_color(RID p_multimesh, int p_i MultiMesh *multimesh = multimesh_owner.getornull(p_multimesh); ERR_FAIL_COND_V(!multimesh, Color()); ERR_FAIL_INDEX_V(p_index, multimesh->instances, Color()); - ERR_FAIL_INDEX_V(p_index, !multimesh->uses_colors, Color()); + ERR_FAIL_COND_V(!multimesh->uses_colors, Color()); _multimesh_make_local(multimesh); Color c; { - PoolVector<float>::Read r = multimesh->data_cache.read(); + const float *r = multimesh->data_cache.ptr(); - const float *dataptr = r.ptr() + p_index * multimesh->stride_cache + multimesh->color_offset_cache; + const float *dataptr = r + p_index * multimesh->stride_cache + multimesh->color_offset_cache; c.r = dataptr[0]; c.g = dataptr[1]; @@ -2747,15 +2746,15 @@ Color RasterizerStorageRD::multimesh_instance_get_custom_data(RID p_multimesh, i MultiMesh *multimesh = multimesh_owner.getornull(p_multimesh); ERR_FAIL_COND_V(!multimesh, Color()); ERR_FAIL_INDEX_V(p_index, multimesh->instances, Color()); - ERR_FAIL_INDEX_V(p_index, !multimesh->uses_custom_data, Color()); + ERR_FAIL_COND_V(!multimesh->uses_custom_data, Color()); _multimesh_make_local(multimesh); Color c; { - PoolVector<float>::Read r = multimesh->data_cache.read(); + const float *r = multimesh->data_cache.ptr(); - const float *dataptr = r.ptr() + p_index * multimesh->stride_cache + multimesh->custom_data_offset_cache; + const float *dataptr = r + p_index * multimesh->stride_cache + multimesh->custom_data_offset_cache; c.r = dataptr[0]; c.g = dataptr[1]; @@ -2766,14 +2765,14 @@ Color RasterizerStorageRD::multimesh_instance_get_custom_data(RID p_multimesh, i return c; } -void RasterizerStorageRD::multimesh_set_buffer(RID p_multimesh, const PoolVector<float> &p_buffer) { +void RasterizerStorageRD::multimesh_set_buffer(RID p_multimesh, const Vector<float> &p_buffer) { MultiMesh *multimesh = multimesh_owner.getornull(p_multimesh); ERR_FAIL_COND(!multimesh); ERR_FAIL_COND(p_buffer.size() != (multimesh->instances * (int)multimesh->stride_cache)); { - PoolVector<float>::Read r = p_buffer.read(); - RD::get_singleton()->buffer_update(multimesh->buffer, 0, p_buffer.size() * sizeof(float), r.ptr(), false); + const float *r = p_buffer.ptr(); + RD::get_singleton()->buffer_update(multimesh->buffer, 0, p_buffer.size() * sizeof(float), r, false); multimesh->buffer_set = true; } @@ -2792,30 +2791,30 @@ void RasterizerStorageRD::multimesh_set_buffer(RID p_multimesh, const PoolVector _multimesh_mark_all_dirty(multimesh, false, true); //update AABB } else if (multimesh->mesh.is_valid()) { //if we have a mesh set, we need to re-generate the AABB from the new data - PoolVector<float>::Read r = p_buffer.read(); - const float *data = r.ptr(); + const float *data = p_buffer.ptr(); + _multimesh_re_create_aabb(multimesh, data, multimesh->instances); multimesh->instance_dependency.instance_notify_changed(true, false); } } -PoolVector<float> RasterizerStorageRD::multimesh_get_buffer(RID p_multimesh) const { +Vector<float> RasterizerStorageRD::multimesh_get_buffer(RID p_multimesh) const { MultiMesh *multimesh = multimesh_owner.getornull(p_multimesh); - ERR_FAIL_COND_V(!multimesh, PoolVector<float>()); + ERR_FAIL_COND_V(!multimesh, Vector<float>()); if (multimesh->buffer.is_null()) { - return PoolVector<float>(); + return Vector<float>(); } else if (multimesh->data_cache.size()) { return multimesh->data_cache; } else { //get from memory - PoolVector<uint8_t> buffer = RD::get_singleton()->buffer_get_data(multimesh->buffer); - PoolVector<float> ret; + Vector<uint8_t> buffer = RD::get_singleton()->buffer_get_data(multimesh->buffer); + Vector<float> ret; ret.resize(multimesh->instances); { - PoolVector<float>::Write w = multimesh->data_cache.write(); - PoolVector<uint8_t>::Read r = buffer.read(); - copymem(w.ptr(), r.ptr(), buffer.size()); + float *w = multimesh->data_cache.ptrw(); + const uint8_t *r = buffer.ptr(); + copymem(w, r, buffer.size()); } return ret; @@ -2860,8 +2859,7 @@ void RasterizerStorageRD::_update_dirty_multimeshes() { MultiMesh *multimesh = multimesh_dirty_list; if (multimesh->data_cache.size()) { //may have been cleared, so only process if it exists - PoolVector<float>::Read r = multimesh->data_cache.read(); - const float *data = r.ptr(); + const float *data = multimesh->data_cache.ptr(); uint32_t visible_instances = multimesh->visible_instances >= 0 ? multimesh->visible_instances : multimesh->instances; @@ -3552,7 +3550,7 @@ RID RasterizerStorageRD::gi_probe_create() { return gi_probe_owner.make_rid(GIProbe()); } -void RasterizerStorageRD::gi_probe_allocate(RID p_gi_probe, const Transform &p_to_cell_xform, const AABB &p_aabb, const Vector3i &p_octree_size, const PoolVector<uint8_t> &p_octree_cells, const PoolVector<uint8_t> &p_data_cells, const PoolVector<uint8_t> &p_distance_field, const PoolVector<int> &p_level_counts) { +void RasterizerStorageRD::gi_probe_allocate(RID p_gi_probe, const Transform &p_to_cell_xform, const AABB &p_aabb, const Vector3i &p_octree_size, const Vector<uint8_t> &p_octree_cells, const Vector<uint8_t> &p_data_cells, const Vector<uint8_t> &p_distance_field, const Vector<int> &p_level_counts) { GIProbe *gi_probe = gi_probe_owner.getornull(p_gi_probe); ERR_FAIL_COND(!gi_probe); @@ -3581,7 +3579,7 @@ void RasterizerStorageRD::gi_probe_allocate(RID p_gi_probe, const Transform &p_t uint32_t cell_count = p_octree_cells.size() / 32; - ERR_FAIL_COND(p_data_cells.size() != cell_count * 16); //see that data size matches + ERR_FAIL_COND(p_data_cells.size() != (int)cell_count * 16); //see that data size matches gi_probe->cell_count = cell_count; gi_probe->octree_buffer = RD::get_singleton()->storage_buffer_create(p_octree_cells.size(), p_octree_cells); @@ -3597,7 +3595,7 @@ void RasterizerStorageRD::gi_probe_allocate(RID p_gi_probe, const Transform &p_t tf.depth = gi_probe->octree_size.z; tf.type = RD::TEXTURE_TYPE_3D; tf.usage_bits = RD::TEXTURE_USAGE_SAMPLING_BIT | RD::TEXTURE_USAGE_CAN_UPDATE_BIT | RD::TEXTURE_USAGE_CAN_COPY_FROM_BIT; - Vector<PoolVector<uint8_t> > s; + Vector<Vector<uint8_t> > s; s.push_back(p_distance_field); gi_probe->sdf_texture = RD::get_singleton()->texture_create(tf, RD::TextureView(), s); } @@ -3690,36 +3688,36 @@ Vector3i RasterizerStorageRD::gi_probe_get_octree_size(RID p_gi_probe) const { ERR_FAIL_COND_V(!gi_probe, Vector3i()); return gi_probe->octree_size; } -PoolVector<uint8_t> RasterizerStorageRD::gi_probe_get_octree_cells(RID p_gi_probe) const { +Vector<uint8_t> RasterizerStorageRD::gi_probe_get_octree_cells(RID p_gi_probe) const { GIProbe *gi_probe = gi_probe_owner.getornull(p_gi_probe); - ERR_FAIL_COND_V(!gi_probe, PoolVector<uint8_t>()); + ERR_FAIL_COND_V(!gi_probe, Vector<uint8_t>()); if (gi_probe->octree_buffer.is_valid()) { return RD::get_singleton()->buffer_get_data(gi_probe->octree_buffer); } - return PoolVector<uint8_t>(); + return Vector<uint8_t>(); } -PoolVector<uint8_t> RasterizerStorageRD::gi_probe_get_data_cells(RID p_gi_probe) const { +Vector<uint8_t> RasterizerStorageRD::gi_probe_get_data_cells(RID p_gi_probe) const { GIProbe *gi_probe = gi_probe_owner.getornull(p_gi_probe); - ERR_FAIL_COND_V(!gi_probe, PoolVector<uint8_t>()); + ERR_FAIL_COND_V(!gi_probe, Vector<uint8_t>()); if (gi_probe->data_buffer.is_valid()) { return RD::get_singleton()->buffer_get_data(gi_probe->data_buffer); } - return PoolVector<uint8_t>(); + return Vector<uint8_t>(); } -PoolVector<uint8_t> RasterizerStorageRD::gi_probe_get_distance_field(RID p_gi_probe) const { +Vector<uint8_t> RasterizerStorageRD::gi_probe_get_distance_field(RID p_gi_probe) const { GIProbe *gi_probe = gi_probe_owner.getornull(p_gi_probe); - ERR_FAIL_COND_V(!gi_probe, PoolVector<uint8_t>()); + ERR_FAIL_COND_V(!gi_probe, Vector<uint8_t>()); if (gi_probe->data_buffer.is_valid()) { return RD::get_singleton()->texture_get_data(gi_probe->sdf_texture, 0); } - return PoolVector<uint8_t>(); + return Vector<uint8_t>(); } -PoolVector<int> RasterizerStorageRD::gi_probe_get_level_counts(RID p_gi_probe) const { +Vector<int> RasterizerStorageRD::gi_probe_get_level_counts(RID p_gi_probe) const { GIProbe *gi_probe = gi_probe_owner.getornull(p_gi_probe); - ERR_FAIL_COND_V(!gi_probe, PoolVector<int>()); + ERR_FAIL_COND_V(!gi_probe, Vector<int>()); return gi_probe->level_counts; } @@ -4387,7 +4385,7 @@ bool RasterizerStorageRD::free(RID p_rid) { reflection_probe->instance_dependency.instance_notify_deleted(p_rid); reflection_probe_owner.free(p_rid); } else if (gi_probe_owner.owns(p_rid)) { - gi_probe_allocate(p_rid, Transform(), AABB(), Vector3i(), PoolVector<uint8_t>(), PoolVector<uint8_t>(), PoolVector<uint8_t>(), PoolVector<int>()); //deallocate + gi_probe_allocate(p_rid, Transform(), AABB(), Vector3i(), Vector<uint8_t>(), Vector<uint8_t>(), Vector<uint8_t>(), Vector<int>()); //deallocate GIProbe *gi_probe = gi_probe_owner.getornull(p_rid); gi_probe->instance_dependency.instance_notify_deleted(p_rid); gi_probe_owner.free(p_rid); @@ -4463,7 +4461,7 @@ RasterizerStorageRD::RasterizerStorageRD() { tformat.usage_bits = RD::TEXTURE_USAGE_SAMPLING_BIT | RD::TEXTURE_USAGE_CAN_UPDATE_BIT; tformat.type = RD::TEXTURE_TYPE_2D; - PoolVector<uint8_t> pv; + Vector<uint8_t> pv; pv.resize(16 * 4); for (int i = 0; i < 16; i++) { pv.set(i * 4 + 0, 255); @@ -4473,7 +4471,7 @@ RasterizerStorageRD::RasterizerStorageRD() { } { - Vector<PoolVector<uint8_t> > vpv; + Vector<Vector<uint8_t> > vpv; vpv.push_back(pv); default_rd_textures[DEFAULT_RD_TEXTURE_WHITE] = RD::get_singleton()->texture_create(tformat, RD::TextureView(), vpv); } @@ -4486,7 +4484,7 @@ RasterizerStorageRD::RasterizerStorageRD() { } { - Vector<PoolVector<uint8_t> > vpv; + Vector<Vector<uint8_t> > vpv; vpv.push_back(pv); default_rd_textures[DEFAULT_RD_TEXTURE_BLACK] = RD::get_singleton()->texture_create(tformat, RD::TextureView(), vpv); } @@ -4499,7 +4497,7 @@ RasterizerStorageRD::RasterizerStorageRD() { } { - Vector<PoolVector<uint8_t> > vpv; + Vector<Vector<uint8_t> > vpv; vpv.push_back(pv); default_rd_textures[DEFAULT_RD_TEXTURE_NORMAL] = RD::get_singleton()->texture_create(tformat, RD::TextureView(), vpv); } @@ -4512,7 +4510,7 @@ RasterizerStorageRD::RasterizerStorageRD() { } { - Vector<PoolVector<uint8_t> > vpv; + Vector<Vector<uint8_t> > vpv; vpv.push_back(pv); default_rd_textures[DEFAULT_RD_TEXTURE_ANISO] = RD::get_singleton()->texture_create(tformat, RD::TextureView(), vpv); } @@ -4537,7 +4535,7 @@ RasterizerStorageRD::RasterizerStorageRD() { tformat.usage_bits = RD::TEXTURE_USAGE_SAMPLING_BIT | RD::TEXTURE_USAGE_CAN_UPDATE_BIT; tformat.type = RD::TEXTURE_TYPE_CUBE_ARRAY; - PoolVector<uint8_t> pv; + Vector<uint8_t> pv; pv.resize(16 * 4); for (int i = 0; i < 16; i++) { pv.set(i * 4 + 0, 0); @@ -4547,7 +4545,7 @@ RasterizerStorageRD::RasterizerStorageRD() { } { - Vector<PoolVector<uint8_t> > vpv; + Vector<Vector<uint8_t> > vpv; for (int i = 0; i < 6; i++) { vpv.push_back(pv); } @@ -4565,7 +4563,7 @@ RasterizerStorageRD::RasterizerStorageRD() { tformat.usage_bits = RD::TEXTURE_USAGE_SAMPLING_BIT | RD::TEXTURE_USAGE_CAN_UPDATE_BIT; tformat.type = RD::TEXTURE_TYPE_CUBE; - PoolVector<uint8_t> pv; + Vector<uint8_t> pv; pv.resize(16 * 4); for (int i = 0; i < 16; i++) { pv.set(i * 4 + 0, 0); @@ -4575,7 +4573,7 @@ RasterizerStorageRD::RasterizerStorageRD() { } { - Vector<PoolVector<uint8_t> > vpv; + Vector<Vector<uint8_t> > vpv; for (int i = 0; i < 6; i++) { vpv.push_back(pv); } @@ -4593,7 +4591,7 @@ RasterizerStorageRD::RasterizerStorageRD() { tformat.usage_bits = RD::TEXTURE_USAGE_SAMPLING_BIT | RD::TEXTURE_USAGE_CAN_UPDATE_BIT; tformat.type = RD::TEXTURE_TYPE_3D; - PoolVector<uint8_t> pv; + Vector<uint8_t> pv; pv.resize(64 * 4); for (int i = 0; i < 64; i++) { pv.set(i * 4 + 0, 0); @@ -4603,7 +4601,7 @@ RasterizerStorageRD::RasterizerStorageRD() { } { - Vector<PoolVector<uint8_t> > vpv; + Vector<Vector<uint8_t> > vpv; vpv.push_back(pv); default_rd_textures[DEFAULT_RD_TEXTURE_3D_WHITE] = RD::get_singleton()->texture_create(tformat, RD::TextureView(), vpv); } @@ -4625,7 +4623,7 @@ RasterizerStorageRD::RasterizerStorageRD() { sampler_state.min_filter = RD::SAMPLER_FILTER_LINEAR; sampler_state.max_lod = 0; } break; - case VS::CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIMPAMPS: { + case VS::CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS: { sampler_state.mag_filter = RD::SAMPLER_FILTER_NEAREST; sampler_state.min_filter = RD::SAMPLER_FILTER_LINEAR; sampler_state.mip_filter = RD::SAMPLER_FILTER_LINEAR; @@ -4636,7 +4634,7 @@ RasterizerStorageRD::RasterizerStorageRD() { sampler_state.mip_filter = RD::SAMPLER_FILTER_LINEAR; } break; - case VS::CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIMPAMPS_ANISOTROPIC: { + case VS::CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC: { sampler_state.mag_filter = RD::SAMPLER_FILTER_NEAREST; sampler_state.min_filter = RD::SAMPLER_FILTER_LINEAR; sampler_state.mip_filter = RD::SAMPLER_FILTER_LINEAR; @@ -4682,11 +4680,11 @@ RasterizerStorageRD::RasterizerStorageRD() { { //vertex - PoolVector<uint8_t> buffer; + Vector<uint8_t> buffer; buffer.resize(sizeof(float) * 3); { - PoolVector<uint8_t>::Write w = buffer.write(); - float *fptr = (float *)w.ptr(); + uint8_t *w = buffer.ptrw(); + float *fptr = (float *)w; fptr[0] = 0.0; fptr[1] = 0.0; fptr[2] = 0.0; @@ -4695,11 +4693,11 @@ RasterizerStorageRD::RasterizerStorageRD() { } { //normal - PoolVector<uint8_t> buffer; + Vector<uint8_t> buffer; buffer.resize(sizeof(float) * 3); { - PoolVector<uint8_t>::Write w = buffer.write(); - float *fptr = (float *)w.ptr(); + uint8_t *w = buffer.ptrw(); + float *fptr = (float *)w; fptr[0] = 1.0; fptr[1] = 0.0; fptr[2] = 0.0; @@ -4708,11 +4706,11 @@ RasterizerStorageRD::RasterizerStorageRD() { } { //tangent - PoolVector<uint8_t> buffer; + Vector<uint8_t> buffer; buffer.resize(sizeof(float) * 4); { - PoolVector<uint8_t>::Write w = buffer.write(); - float *fptr = (float *)w.ptr(); + uint8_t *w = buffer.ptrw(); + float *fptr = (float *)w; fptr[0] = 1.0; fptr[1] = 0.0; fptr[2] = 0.0; @@ -4722,11 +4720,11 @@ RasterizerStorageRD::RasterizerStorageRD() { } { //color - PoolVector<uint8_t> buffer; + Vector<uint8_t> buffer; buffer.resize(sizeof(float) * 4); { - PoolVector<uint8_t>::Write w = buffer.write(); - float *fptr = (float *)w.ptr(); + uint8_t *w = buffer.ptrw(); + float *fptr = (float *)w; fptr[0] = 1.0; fptr[1] = 1.0; fptr[2] = 1.0; @@ -4736,22 +4734,22 @@ RasterizerStorageRD::RasterizerStorageRD() { } { //tex uv 1 - PoolVector<uint8_t> buffer; + Vector<uint8_t> buffer; buffer.resize(sizeof(float) * 2); { - PoolVector<uint8_t>::Write w = buffer.write(); - float *fptr = (float *)w.ptr(); + uint8_t *w = buffer.ptrw(); + float *fptr = (float *)w; fptr[0] = 0.0; fptr[1] = 0.0; } mesh_default_rd_buffers[DEFAULT_RD_BUFFER_TEX_UV] = RD::get_singleton()->vertex_buffer_create(buffer.size(), buffer); } { //tex uv 2 - PoolVector<uint8_t> buffer; + Vector<uint8_t> buffer; buffer.resize(sizeof(float) * 2); { - PoolVector<uint8_t>::Write w = buffer.write(); - float *fptr = (float *)w.ptr(); + uint8_t *w = buffer.ptrw(); + float *fptr = (float *)w; fptr[0] = 0.0; fptr[1] = 0.0; } @@ -4759,11 +4757,11 @@ RasterizerStorageRD::RasterizerStorageRD() { } { //bones - PoolVector<uint8_t> buffer; + Vector<uint8_t> buffer; buffer.resize(sizeof(uint32_t) * 4); { - PoolVector<uint8_t>::Write w = buffer.write(); - uint32_t *fptr = (uint32_t *)w.ptr(); + uint8_t *w = buffer.ptrw(); + uint32_t *fptr = (uint32_t *)w; fptr[0] = 0; fptr[1] = 0; fptr[2] = 0; @@ -4773,11 +4771,11 @@ RasterizerStorageRD::RasterizerStorageRD() { } { //weights - PoolVector<uint8_t> buffer; + Vector<uint8_t> buffer; buffer.resize(sizeof(float) * 4); { - PoolVector<uint8_t>::Write w = buffer.write(); - float *fptr = (float *)w.ptr(); + uint8_t *w = buffer.ptrw(); + float *fptr = (float *)w; fptr[0] = 0.0; fptr[1] = 0.0; fptr[2] = 0.0; diff --git a/servers/visual/rasterizer_rd/rasterizer_storage_rd.h b/servers/visual/rasterizer_rd/rasterizer_storage_rd.h index 7ab8b904ad..48097ffaac 100644 --- a/servers/visual/rasterizer_rd/rasterizer_storage_rd.h +++ b/servers/visual/rasterizer_rd/rasterizer_storage_rd.h @@ -306,7 +306,7 @@ private: uint32_t color_offset_cache = 0; uint32_t custom_data_offset_cache = 0; - PoolVector<float> data_cache; //used if individual setting is used + Vector<float> data_cache; //used if individual setting is used bool *data_cache_dirty_regions = nullptr; uint32_t data_cache_used_dirty_regions = 0; @@ -413,7 +413,7 @@ private: uint32_t octree_buffer_size = 0; uint32_t data_buffer_size = 0; - PoolVector<int> level_counts; + Vector<int> level_counts; int cell_count = 0; @@ -621,7 +621,7 @@ public: virtual void mesh_set_blend_shape_mode(RID p_mesh, VS::BlendShapeMode p_mode); virtual VS::BlendShapeMode mesh_get_blend_shape_mode(RID p_mesh) const; - virtual void mesh_surface_update_region(RID p_mesh, int p_surface, int p_offset, const PoolVector<uint8_t> &p_data); + virtual void mesh_surface_update_region(RID p_mesh, int p_surface, int p_offset, const Vector<uint8_t> &p_data); virtual void mesh_surface_set_material(RID p_mesh, int p_surface, RID p_material); virtual RID mesh_surface_get_material(RID p_mesh, int p_surface) const; @@ -657,7 +657,7 @@ public: _FORCE_INLINE_ VS::PrimitiveType mesh_surface_get_primitive(RID p_mesh, uint32_t p_surface_index) { Mesh *mesh = mesh_owner.getornull(p_mesh); ERR_FAIL_COND_V(!mesh, VS::PRIMITIVE_MAX); - ERR_FAIL_INDEX_V(p_surface_index, mesh->surface_count, VS::PRIMITIVE_MAX); + ERR_FAIL_UNSIGNED_INDEX_V(p_surface_index, mesh->surface_count, VS::PRIMITIVE_MAX); return mesh->surfaces[p_surface_index]->primitive; } @@ -665,7 +665,7 @@ public: _FORCE_INLINE_ void mesh_surface_get_arrays_and_format(RID p_mesh, uint32_t p_surface_index, uint32_t p_input_mask, RID &r_vertex_array_rd, RID &r_index_array_rd, RD::VertexFormatID &r_vertex_format) { Mesh *mesh = mesh_owner.getornull(p_mesh); ERR_FAIL_COND(!mesh); - ERR_FAIL_INDEX(p_surface_index, mesh->surface_count); + ERR_FAIL_UNSIGNED_INDEX(p_surface_index, mesh->surface_count); Mesh::Surface *s = mesh->surfaces[p_surface_index]; @@ -747,8 +747,8 @@ public: Color multimesh_instance_get_color(RID p_multimesh, int p_index) const; Color multimesh_instance_get_custom_data(RID p_multimesh, int p_index) const; - void multimesh_set_buffer(RID p_multimesh, const PoolVector<float> &p_buffer); - PoolVector<float> multimesh_get_buffer(RID p_multimesh) const; + void multimesh_set_buffer(RID p_multimesh, const Vector<float> &p_buffer); + Vector<float> multimesh_get_buffer(RID p_multimesh) const; void multimesh_set_visible_instances(RID p_multimesh, int p_visible); int multimesh_get_visible_instances(RID p_multimesh) const; @@ -969,15 +969,15 @@ public: RID gi_probe_create(); - void gi_probe_allocate(RID p_gi_probe, const Transform &p_to_cell_xform, const AABB &p_aabb, const Vector3i &p_octree_size, const PoolVector<uint8_t> &p_octree_cells, const PoolVector<uint8_t> &p_data_cells, const PoolVector<uint8_t> &p_distance_field, const PoolVector<int> &p_level_counts); + void gi_probe_allocate(RID p_gi_probe, const Transform &p_to_cell_xform, const AABB &p_aabb, const Vector3i &p_octree_size, const Vector<uint8_t> &p_octree_cells, const Vector<uint8_t> &p_data_cells, const Vector<uint8_t> &p_distance_field, const Vector<int> &p_level_counts); AABB gi_probe_get_bounds(RID p_gi_probe) const; Vector3i gi_probe_get_octree_size(RID p_gi_probe) const; - PoolVector<uint8_t> gi_probe_get_octree_cells(RID p_gi_probe) const; - PoolVector<uint8_t> gi_probe_get_data_cells(RID p_gi_probe) const; - PoolVector<uint8_t> gi_probe_get_distance_field(RID p_gi_probe) const; + Vector<uint8_t> gi_probe_get_octree_cells(RID p_gi_probe) const; + Vector<uint8_t> gi_probe_get_data_cells(RID p_gi_probe) const; + Vector<uint8_t> gi_probe_get_distance_field(RID p_gi_probe) const; - PoolVector<int> gi_probe_get_level_counts(RID p_gi_probe) const; + Vector<int> gi_probe_get_level_counts(RID p_gi_probe) const; Transform gi_probe_get_to_cell_xform(RID p_gi_probe) const; void gi_probe_set_dynamic_range(RID p_gi_probe, float p_range); @@ -1022,12 +1022,12 @@ public: void lightmap_capture_set_bounds(RID p_capture, const AABB &p_bounds) {} AABB lightmap_capture_get_bounds(RID p_capture) const { return AABB(); } - void lightmap_capture_set_octree(RID p_capture, const PoolVector<uint8_t> &p_octree) {} + void lightmap_capture_set_octree(RID p_capture, const Vector<uint8_t> &p_octree) {} RID lightmap_capture_create() { return RID(); } - PoolVector<uint8_t> lightmap_capture_get_octree(RID p_capture) const { - return PoolVector<uint8_t>(); + Vector<uint8_t> lightmap_capture_get_octree(RID p_capture) const { + return Vector<uint8_t>(); } void lightmap_capture_set_octree_cell_transform(RID p_capture, const Transform &p_xform) {} Transform lightmap_capture_get_octree_cell_transform(RID p_capture) const { return Transform(); } @@ -1035,7 +1035,7 @@ public: int lightmap_capture_get_octree_cell_subdiv(RID p_capture) const { return 0; } void lightmap_capture_set_energy(RID p_capture, float p_energy) {} float lightmap_capture_get_energy(RID p_capture) const { return 0.0; } - const PoolVector<LightmapCaptureOctree> *lightmap_capture_get_octree_ptr(RID p_capture) const { + const Vector<LightmapCaptureOctree> *lightmap_capture_get_octree_ptr(RID p_capture) const { return NULL; } diff --git a/servers/visual/rasterizer_rd/render_pipeline_vertex_format_cache_rd.h b/servers/visual/rasterizer_rd/render_pipeline_vertex_format_cache_rd.h index 173e839330..05c5968360 100644 --- a/servers/visual/rasterizer_rd/render_pipeline_vertex_format_cache_rd.h +++ b/servers/visual/rasterizer_rd/render_pipeline_vertex_format_cache_rd.h @@ -41,7 +41,6 @@ class RenderPipelineVertexFormatCacheRD { RID shader; uint32_t input_mask; - RD::FramebufferFormatID framebuffer_format; RD::RenderPrimitive render_primitive; RD::PipelineRasterizationState rasterization_state; RD::PipelineMultisampleState multisample_state; diff --git a/servers/visual/rasterizer_rd/shader_rd.h b/servers/visual/rasterizer_rd/shader_rd.h index dce46fc0b5..8581b85ff4 100644 --- a/servers/visual/rasterizer_rd/shader_rd.h +++ b/servers/visual/rasterizer_rd/shader_rd.h @@ -35,6 +35,7 @@ #include "core/map.h" #include "core/rid_owner.h" #include "core/variant.h" + #include <stdio.h> #include <mutex> /** @@ -47,11 +48,7 @@ class ShaderRD { CharString general_defines; Vector<CharString> variant_defines; - int vertex_code_start; - int fragment_code_start; - struct Version { - CharString uniforms; CharString vertex_globals; CharString vertex_code; diff --git a/servers/visual/rasterizer_rd/shaders/scene_high_end_inc.glsl b/servers/visual/rasterizer_rd/shaders/scene_high_end_inc.glsl index 9b14499923..baef1e060f 100644 --- a/servers/visual/rasterizer_rd/shaders/scene_high_end_inc.glsl +++ b/servers/visual/rasterizer_rd/shaders/scene_high_end_inc.glsl @@ -11,15 +11,15 @@ draw_call; #define SAMPLER_NEAREST_CLAMP 0 #define SAMPLER_LINEAR_CLAMP 1 -#define SAMPLER_NEAREST_WITH_MIMPAMPS_CLAMP 2 +#define SAMPLER_NEAREST_WITH_MIPMAPS_CLAMP 2 #define SAMPLER_LINEAR_WITH_MIPMAPS_CLAMP 3 -#define SAMPLER_NEAREST_WITH_MIMPAMPS_ANISOTROPIC_CLAMP 4 +#define SAMPLER_NEAREST_WITH_MIPMAPS_ANISOTROPIC_CLAMP 4 #define SAMPLER_LINEAR_WITH_MIPMAPS_ANISOTROPIC_CLAMP 5 #define SAMPLER_NEAREST_REPEAT 6 #define SAMPLER_LINEAR_REPEAT 7 -#define SAMPLER_NEAREST_WITH_MIMPAMPS_REPEAT 8 +#define SAMPLER_NEAREST_WITH_MIPMAPS_REPEAT 8 #define SAMPLER_LINEAR_WITH_MIPMAPS_REPEAT 9 -#define SAMPLER_NEAREST_WITH_MIMPAMPS_ANISOTROPIC_REPEAT 10 +#define SAMPLER_NEAREST_WITH_MIPMAPS_ANISOTROPIC_REPEAT 10 #define SAMPLER_LINEAR_WITH_MIPMAPS_ANISOTROPIC_REPEAT 11 layout(set = 0, binding = 1) uniform sampler material_samplers[12]; diff --git a/servers/visual/rendering_device.cpp b/servers/visual/rendering_device.cpp index dab936d9a9..3c1795161d 100644 --- a/servers/visual/rendering_device.cpp +++ b/servers/visual/rendering_device.cpp @@ -46,23 +46,19 @@ void RenderingDevice::shader_set_cache_function(ShaderCacheFunction p_function) cache_function = p_function; } -PoolVector<uint8_t> RenderingDevice::shader_compile_from_source(ShaderStage p_stage, const String &p_source_code, ShaderLanguage p_language, String *r_error, bool p_allow_cache) { +Vector<uint8_t> RenderingDevice::shader_compile_from_source(ShaderStage p_stage, const String &p_source_code, ShaderLanguage p_language, String *r_error, bool p_allow_cache) { if (p_allow_cache && cache_function) { - PoolVector<uint8_t> cache = cache_function(p_stage, p_source_code, p_language); + Vector<uint8_t> cache = cache_function(p_stage, p_source_code, p_language); if (cache.size()) { return cache; } } - ERR_FAIL_COND_V(!compile_function, PoolVector<uint8_t>()); + ERR_FAIL_COND_V(!compile_function, Vector<uint8_t>()); return compile_function(p_stage, p_source_code, p_language, r_error); } RenderingDevice::RenderingDevice() { - - ShaderCompileFunction compile_function; - ShaderCacheFunction cache_function; - singleton = this; } diff --git a/servers/visual/rendering_device.h b/servers/visual/rendering_device.h index d7b13a739c..c3b937d5e2 100644 --- a/servers/visual/rendering_device.h +++ b/servers/visual/rendering_device.h @@ -55,8 +55,8 @@ public: SHADER_LANGUAGE_HLSL }; - typedef PoolVector<uint8_t> (*ShaderCompileFunction)(ShaderStage p_stage, const String &p_source_code, ShaderLanguage p_language, String *r_error); - typedef PoolVector<uint8_t> (*ShaderCacheFunction)(ShaderStage p_stage, const String &p_source_code, ShaderLanguage p_language); + typedef Vector<uint8_t> (*ShaderCompileFunction)(ShaderStage p_stage, const String &p_source_code, ShaderLanguage p_language, String *r_error); + typedef Vector<uint8_t> (*ShaderCacheFunction)(ShaderStage p_stage, const String &p_source_code, ShaderLanguage p_language); private: static ShaderCompileFunction compile_function; @@ -407,7 +407,7 @@ public: } }; - virtual RID texture_create(const TextureFormat &p_format, const TextureView &p_view, const Vector<PoolVector<uint8_t> > &p_data = Vector<PoolVector<uint8_t> >()) = 0; + virtual RID texture_create(const TextureFormat &p_format, const TextureView &p_view, const Vector<Vector<uint8_t> > &p_data = Vector<Vector<uint8_t> >()) = 0; virtual RID texture_create_shared(const TextureView &p_view, RID p_with_texture) = 0; enum TextureSliceType { @@ -418,8 +418,8 @@ public: virtual RID texture_create_shared_from_slice(const TextureView &p_view, RID p_with_texture, uint32_t p_layer, uint32_t p_mipmap, TextureSliceType p_slice_type = TEXTURE_SLICE_2D) = 0; - virtual Error texture_update(RID p_texture, uint32_t p_layer, const PoolVector<uint8_t> &p_data, bool p_sync_with_draw = false) = 0; //this function can be used from any thread and it takes effect at the begining of the frame, unless sync with draw is used, which is used to mix updates with draw calls - virtual PoolVector<uint8_t> texture_get_data(RID p_texture, uint32_t p_layer) = 0; // CPU textures will return immediately, while GPU textures will most likely force a flush + virtual Error texture_update(RID p_texture, uint32_t p_layer, const Vector<uint8_t> &p_data, bool p_sync_with_draw = false) = 0; //this function can be used from any thread and it takes effect at the begining of the frame, unless sync with draw is used, which is used to mix updates with draw calls + virtual Vector<uint8_t> texture_get_data(RID p_texture, uint32_t p_layer) = 0; // CPU textures will return immediately, while GPU textures will most likely force a flush virtual bool texture_is_format_supported_for_usage(DataFormat p_format, uint32_t p_usage) const = 0; virtual bool texture_is_shared(RID p_texture) = 0; @@ -542,7 +542,7 @@ public: frequency = VERTEX_FREQUENCY_VERTEX; } }; - virtual RID vertex_buffer_create(uint32_t p_size_bytes, const PoolVector<uint8_t> &p_data = PoolVector<uint8_t>()) = 0; + virtual RID vertex_buffer_create(uint32_t p_size_bytes, const Vector<uint8_t> &p_data = Vector<uint8_t>()) = 0; typedef int64_t VertexFormatID; @@ -555,21 +555,21 @@ public: INDEX_BUFFER_FORMAT_UINT32, }; - virtual RID index_buffer_create(uint32_t p_size_indices, IndexBufferFormat p_format, const PoolVector<uint8_t> &p_data = PoolVector<uint8_t>(), bool p_use_restart_indices = false) = 0; + virtual RID index_buffer_create(uint32_t p_size_indices, IndexBufferFormat p_format, const Vector<uint8_t> &p_data = Vector<uint8_t>(), bool p_use_restart_indices = false) = 0; virtual RID index_array_create(RID p_index_buffer, uint32_t p_index_offset, uint32_t p_index_count) = 0; /****************/ /**** SHADER ****/ /****************/ - virtual PoolVector<uint8_t> shader_compile_from_source(ShaderStage p_stage, const String &p_source_code, ShaderLanguage p_language = SHADER_LANGUAGE_GLSL, String *r_error = NULL, bool p_allow_cache = true); + virtual Vector<uint8_t> shader_compile_from_source(ShaderStage p_stage, const String &p_source_code, ShaderLanguage p_language = SHADER_LANGUAGE_GLSL, String *r_error = NULL, bool p_allow_cache = true); static void shader_set_compile_function(ShaderCompileFunction p_function); static void shader_set_cache_function(ShaderCacheFunction p_function); struct ShaderStageData { ShaderStage shader_stage; - PoolVector<uint8_t> spir_v; + Vector<uint8_t> spir_v; ShaderStageData() { shader_stage = SHADER_STAGE_VERTEX; @@ -597,9 +597,9 @@ public: UNIFORM_TYPE_MAX }; - virtual RID uniform_buffer_create(uint32_t p_size_bytes, const PoolVector<uint8_t> &p_data = PoolVector<uint8_t>()) = 0; - virtual RID storage_buffer_create(uint32_t p_size, const PoolVector<uint8_t> &p_data = PoolVector<uint8_t>()) = 0; - virtual RID texture_buffer_create(uint32_t p_size_elements, DataFormat p_format, const PoolVector<uint8_t> &p_data = PoolVector<uint8_t>()) = 0; + virtual RID uniform_buffer_create(uint32_t p_size_bytes, const Vector<uint8_t> &p_data = Vector<uint8_t>()) = 0; + virtual RID storage_buffer_create(uint32_t p_size, const Vector<uint8_t> &p_data = Vector<uint8_t>()) = 0; + virtual RID texture_buffer_create(uint32_t p_size_elements, DataFormat p_format, const Vector<uint8_t> &p_data = Vector<uint8_t>()) = 0; struct Uniform { UniformType type; @@ -622,7 +622,7 @@ public: virtual bool uniform_set_is_valid(RID p_uniform_set) = 0; virtual Error buffer_update(RID p_buffer, uint32_t p_offset, uint32_t p_size, const void *p_data, bool p_sync_with_draw = false) = 0; //this function can be used from any thread and it takes effect at the begining of the frame, unless sync with draw is used, which is used to mix updates with draw calls - virtual PoolVector<uint8_t> buffer_get_data(RID p_buffer) = 0; //this causes stall, only use to retrieve large buffers for saving + virtual Vector<uint8_t> buffer_get_data(RID p_buffer) = 0; //this causes stall, only use to retrieve large buffers for saving /*************************/ /**** RENDER PIPELINE ****/ diff --git a/servers/visual/shader_language.cpp b/servers/visual/shader_language.cpp index 6166489302..97a18e6d86 100644 --- a/servers/visual/shader_language.cpp +++ b/servers/visual/shader_language.cpp @@ -2657,10 +2657,10 @@ PropertyInfo ShaderLanguage::uniform_to_property_info(const ShaderNode::Uniform case ShaderLanguage::TYPE_UVEC3: case ShaderLanguage::TYPE_UVEC4: { - pi.type = Variant::POOL_INT_ARRAY; + pi.type = Variant::PACKED_INT32_ARRAY; } break; case ShaderLanguage::TYPE_FLOAT: { - pi.type = Variant::REAL; + pi.type = Variant::FLOAT; if (p_uniform.hint == ShaderLanguage::ShaderNode::Uniform::HINT_RANGE) { pi.hint = PROPERTY_HINT_RANGE; pi.hint_string = rtos(p_uniform.hint_range[0]) + "," + rtos(p_uniform.hint_range[1]) + "," + rtos(p_uniform.hint_range[2]); @@ -2708,31 +2708,43 @@ PropertyInfo ShaderLanguage::uniform_to_property_info(const ShaderNode::Uniform pi.hint = PROPERTY_HINT_RESOURCE_TYPE; pi.hint_string = "CubeMap"; } break; + case ShaderLanguage::TYPE_STRUCT: { + // FIXME: Implement this. + } break; } return pi; } uint32_t ShaderLanguage::get_type_size(DataType p_type) { switch (p_type) { + case TYPE_VOID: + return 0; case TYPE_BOOL: case TYPE_INT: case TYPE_UINT: - case TYPE_FLOAT: return 4; + case TYPE_FLOAT: + return 4; case TYPE_BVEC2: case TYPE_IVEC2: case TYPE_UVEC2: - case TYPE_VEC2: return 8; + case TYPE_VEC2: + return 8; case TYPE_BVEC3: case TYPE_IVEC3: case TYPE_UVEC3: - case TYPE_VEC3: return 12; + case TYPE_VEC3: + return 12; case TYPE_BVEC4: case TYPE_IVEC4: case TYPE_UVEC4: - case TYPE_VEC4: return 16; - case TYPE_MAT2: return 8; - case TYPE_MAT3: return 12; - case TYPE_MAT4: return 16; + case TYPE_VEC4: + return 16; + case TYPE_MAT2: + return 8; + case TYPE_MAT3: + return 12; + case TYPE_MAT4: + return 16; case TYPE_SAMPLER2D: case TYPE_ISAMPLER2D: case TYPE_USAMPLER2D: @@ -2742,7 +2754,11 @@ uint32_t ShaderLanguage::get_type_size(DataType p_type) { case TYPE_SAMPLER3D: case TYPE_ISAMPLER3D: case TYPE_USAMPLER3D: - case TYPE_SAMPLERCUBE: return 4; //not really, but useful for indices + case TYPE_SAMPLERCUBE: + return 4; //not really, but useful for indices + case TYPE_STRUCT: + // FIXME: Implement. + return 0; } return 0; } @@ -5659,7 +5675,7 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct st.shader_struct = st_node; int member_count = 0; - + Set<String> member_names; while (true) { // variables list tk = _get_token(); if (tk.type == TK_CURLY_BRACKET_CLOSE) { @@ -5716,6 +5732,12 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct member->struct_name = struct_name; member->name = tk.text; + if (member_names.has(member->name)) { + _set_error("Redefinition of '" + String(member->name) + "'"); + return ERR_PARSE_ERROR; + } + member_names.insert(member->name); + tk = _get_token(); if (tk.type == TK_BRACKET_OPEN) { tk = _get_token(); @@ -6273,6 +6295,13 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct return ERR_PARSE_ERROR; } + if (qualifier == ARGUMENT_QUALIFIER_OUT || qualifier == ARGUMENT_QUALIFIER_INOUT) { + if (is_sampler_type(get_token_datatype(tk.type))) { + _set_error("Opaque types cannot be output parameters."); + return ERR_PARSE_ERROR; + } + } + if (is_struct) { ptype = TYPE_STRUCT; } else { diff --git a/servers/visual/visual_server_canvas.cpp b/servers/visual/visual_server_canvas.cpp index 69f843eb4b..c1833fea44 100644 --- a/servers/visual/visual_server_canvas.cpp +++ b/servers/visual/visual_server_canvas.cpp @@ -1265,20 +1265,20 @@ RID VisualServerCanvas::canvas_occluder_polygon_create() { occluder_poly->occluder = VSG::canvas_render->occluder_polygon_create(); return canvas_light_occluder_polygon_owner.make_rid(occluder_poly); } -void VisualServerCanvas::canvas_occluder_polygon_set_shape(RID p_occluder_polygon, const PoolVector<Vector2> &p_shape, bool p_closed) { +void VisualServerCanvas::canvas_occluder_polygon_set_shape(RID p_occluder_polygon, const Vector<Vector2> &p_shape, bool p_closed) { if (p_shape.size() < 3) { canvas_occluder_polygon_set_shape_as_lines(p_occluder_polygon, p_shape); return; } - PoolVector<Vector2> lines; + Vector<Vector2> lines; int lc = p_shape.size() * 2; lines.resize(lc - (p_closed ? 0 : 2)); { - PoolVector<Vector2>::Write w = lines.write(); - PoolVector<Vector2>::Read r = p_shape.read(); + Vector2 *w = lines.ptrw(); + const Vector2 *r = p_shape.ptr(); int max = lc / 2; if (!p_closed) { @@ -1295,7 +1295,7 @@ void VisualServerCanvas::canvas_occluder_polygon_set_shape(RID p_occluder_polygo canvas_occluder_polygon_set_shape_as_lines(p_occluder_polygon, lines); } -void VisualServerCanvas::canvas_occluder_polygon_set_shape_as_lines(RID p_occluder_polygon, const PoolVector<Vector2> &p_shape) { +void VisualServerCanvas::canvas_occluder_polygon_set_shape_as_lines(RID p_occluder_polygon, const Vector<Vector2> &p_shape) { LightOccluderPolygon *occluder_poly = canvas_light_occluder_polygon_owner.getornull(p_occluder_polygon); ERR_FAIL_COND(!occluder_poly); @@ -1304,7 +1304,7 @@ void VisualServerCanvas::canvas_occluder_polygon_set_shape_as_lines(RID p_occlud int lc = p_shape.size(); occluder_poly->aabb = Rect2(); { - PoolVector<Vector2>::Read r = p_shape.read(); + const Vector2 *r = p_shape.ptr(); for (int i = 0; i < lc; i++) { if (i == 0) occluder_poly->aabb.position = r[i]; diff --git a/servers/visual/visual_server_canvas.h b/servers/visual/visual_server_canvas.h index c120a90314..dea4183752 100644 --- a/servers/visual/visual_server_canvas.h +++ b/servers/visual/visual_server_canvas.h @@ -257,8 +257,8 @@ public: void canvas_light_occluder_set_light_mask(RID p_occluder, int p_mask); RID canvas_occluder_polygon_create(); - void canvas_occluder_polygon_set_shape(RID p_occluder_polygon, const PoolVector<Vector2> &p_shape, bool p_closed); - void canvas_occluder_polygon_set_shape_as_lines(RID p_occluder_polygon, const PoolVector<Vector2> &p_shape); + void canvas_occluder_polygon_set_shape(RID p_occluder_polygon, const Vector<Vector2> &p_shape, bool p_closed); + void canvas_occluder_polygon_set_shape_as_lines(RID p_occluder_polygon, const Vector<Vector2> &p_shape); void canvas_occluder_polygon_set_cull_mode(RID p_occluder_polygon, VS::CanvasOccluderPolygonCullMode p_mode); diff --git a/servers/visual/visual_server_raster.cpp b/servers/visual/visual_server_raster.cpp index 6599b9a2d2..35ec52a5c0 100644 --- a/servers/visual/visual_server_raster.cpp +++ b/servers/visual/visual_server_raster.cpp @@ -120,10 +120,10 @@ void VisualServerRaster::draw(bool p_swap_buffers, double frame_step) { Object *obj = ObjectDB::get_instance(frame_drawn_callbacks.front()->get().object); if (obj) { - Variant::CallError ce; + Callable::CallError ce; const Variant *v = &frame_drawn_callbacks.front()->get().param; obj->call(frame_drawn_callbacks.front()->get().method, &v, 1, ce); - if (ce.error != Variant::CallError::CALL_OK) { + if (ce.error != Callable::CallError::CALL_OK) { String err = Variant::get_call_error_text(obj, frame_drawn_callbacks.front()->get().method, &v, 1, ce); ERR_PRINT("Error calling frame drawn function: " + err); } @@ -139,7 +139,7 @@ void VisualServerRaster::draw(bool p_swap_buffers, double frame_step) { uint64_t base_cpu = VSG::storage->get_captured_timestamp_cpu_time(0); uint64_t base_gpu = VSG::storage->get_captured_timestamp_gpu_time(0); - for (int i = 0; i < VSG::storage->get_captured_timestamps_count(); i++) { + for (uint32_t i = 0; i < VSG::storage->get_captured_timestamps_count(); i++) { uint64_t time_cpu = VSG::storage->get_captured_timestamp_cpu_time(i) - base_cpu; uint64_t time_gpu = VSG::storage->get_captured_timestamp_gpu_time(i) - base_gpu; new_profile.write[i].gpu_msec = float(time_gpu / 1000) / 1000.0; diff --git a/servers/visual/visual_server_raster.h b/servers/visual/visual_server_raster.h index 297f0727a0..4fea6082f4 100644 --- a/servers/visual/visual_server_raster.h +++ b/servers/visual/visual_server_raster.h @@ -233,7 +233,7 @@ public: BIND2(mesh_set_blend_shape_mode, RID, BlendShapeMode) BIND1RC(BlendShapeMode, mesh_get_blend_shape_mode, RID) - BIND4(mesh_surface_update_region, RID, int, int, const PoolVector<uint8_t> &) + BIND4(mesh_surface_update_region, RID, int, int, const Vector<uint8_t> &) BIND3(mesh_surface_set_material, RID, int, RID) BIND2RC(RID, mesh_surface_get_material, RID, int) @@ -268,8 +268,8 @@ public: BIND2RC(Color, multimesh_instance_get_color, RID, int) BIND2RC(Color, multimesh_instance_get_custom_data, RID, int) - BIND2(multimesh_set_buffer, RID, const PoolVector<float> &) - BIND1RC(PoolVector<float>, multimesh_get_buffer, RID) + BIND2(multimesh_set_buffer, RID, const Vector<float> &) + BIND1RC(Vector<float>, multimesh_get_buffer, RID) BIND2(multimesh_set_visible_instances, RID, int) BIND1RC(int, multimesh_get_visible_instances, RID) @@ -344,14 +344,14 @@ public: BIND0R(RID, gi_probe_create) - BIND8(gi_probe_allocate, RID, const Transform &, const AABB &, const Vector3i &, const PoolVector<uint8_t> &, const PoolVector<uint8_t> &, const PoolVector<uint8_t> &, const PoolVector<int> &) + BIND8(gi_probe_allocate, RID, const Transform &, const AABB &, const Vector3i &, const Vector<uint8_t> &, const Vector<uint8_t> &, const Vector<uint8_t> &, const Vector<int> &) BIND1RC(AABB, gi_probe_get_bounds, RID) BIND1RC(Vector3i, gi_probe_get_octree_size, RID) - BIND1RC(PoolVector<uint8_t>, gi_probe_get_octree_cells, RID) - BIND1RC(PoolVector<uint8_t>, gi_probe_get_data_cells, RID) - BIND1RC(PoolVector<uint8_t>, gi_probe_get_distance_field, RID) - BIND1RC(PoolVector<int>, gi_probe_get_level_counts, RID) + BIND1RC(Vector<uint8_t>, gi_probe_get_octree_cells, RID) + BIND1RC(Vector<uint8_t>, gi_probe_get_data_cells, RID) + BIND1RC(Vector<uint8_t>, gi_probe_get_distance_field, RID) + BIND1RC(Vector<int>, gi_probe_get_level_counts, RID) BIND1RC(Transform, gi_probe_get_to_cell_xform, RID) BIND2(gi_probe_set_dynamic_range, RID, float) @@ -391,8 +391,8 @@ public: BIND2(lightmap_capture_set_bounds, RID, const AABB &) BIND1RC(AABB, lightmap_capture_get_bounds, RID) - BIND2(lightmap_capture_set_octree, RID, const PoolVector<uint8_t> &) - BIND1RC(PoolVector<uint8_t>, lightmap_capture_get_octree, RID) + BIND2(lightmap_capture_set_octree, RID, const Vector<uint8_t> &) + BIND1RC(Vector<uint8_t>, lightmap_capture_get_octree, RID) BIND2(lightmap_capture_set_octree_cell_transform, RID, const Transform &) BIND1RC(Transform, lightmap_capture_get_octree_cell_transform, RID) @@ -686,8 +686,8 @@ public: BIND2(canvas_light_occluder_set_light_mask, RID, int) BIND0R(RID, canvas_occluder_polygon_create) - BIND3(canvas_occluder_polygon_set_shape, RID, const PoolVector<Vector2> &, bool) - BIND2(canvas_occluder_polygon_set_shape_as_lines, RID, const PoolVector<Vector2> &) + BIND3(canvas_occluder_polygon_set_shape, RID, const Vector<Vector2> &, bool) + BIND2(canvas_occluder_polygon_set_shape_as_lines, RID, const Vector<Vector2> &) BIND2(canvas_occluder_polygon_set_cull_mode, RID, CanvasOccluderPolygonCullMode) diff --git a/servers/visual/visual_server_scene.cpp b/servers/visual/visual_server_scene.cpp index 61c885cba3..1a9ecae23a 100644 --- a/servers/visual/visual_server_scene.cpp +++ b/servers/visual/visual_server_scene.cpp @@ -1313,7 +1313,7 @@ void VisualServerScene::_update_instance_lightmap_captures(Instance *p_instance) //this could use some sort of blending.. for (List<Instance *>::Element *E = geom->lightmap_captures.front(); E; E = E->next()) { - const PoolVector<RasterizerStorage::LightmapCaptureOctree> *octree = VSG::storage->lightmap_capture_get_octree_ptr(E->get()->base); + const Vector<RasterizerStorage::LightmapCaptureOctree> *octree = VSG::storage->lightmap_capture_get_octree_ptr(E->get()->base); //print_line("octree size: " + itos(octree->size())); if (octree->size() == 0) continue; @@ -1321,14 +1321,14 @@ void VisualServerScene::_update_instance_lightmap_captures(Instance *p_instance) int cell_subdiv = VSG::storage->lightmap_capture_get_octree_cell_subdiv(E->get()->base); to_cell_xform = to_cell_xform * E->get()->transform.affine_inverse(); - PoolVector<RasterizerStorage::LightmapCaptureOctree>::Read octree_r = octree->read(); + const RasterizerStorage::LightmapCaptureOctree *octree_r = octree->ptr(); Vector3 pos = to_cell_xform.xform(p_instance->transform.origin); for (int i = 0; i < 12; i++) { Vector3 dir = to_cell_xform.basis.xform(cone_traces[i]).normalized(); - Color capture = _light_capture_voxel_cone_trace(octree_r.ptr(), pos, dir, cone_aperture, cell_subdiv); + Color capture = _light_capture_voxel_cone_trace(octree_r, pos, dir, cone_aperture, cell_subdiv); p_instance->lightmap_capture_data.write[i] += capture; } } diff --git a/servers/visual/visual_server_wrap_mt.h b/servers/visual/visual_server_wrap_mt.h index 3ed3728757..9d5281b17a 100644 --- a/servers/visual/visual_server_wrap_mt.h +++ b/servers/visual/visual_server_wrap_mt.h @@ -157,7 +157,7 @@ public: FUNC2(mesh_set_blend_shape_mode, RID, BlendShapeMode) FUNC1RC(BlendShapeMode, mesh_get_blend_shape_mode, RID) - FUNC4(mesh_surface_update_region, RID, int, int, const PoolVector<uint8_t> &) + FUNC4(mesh_surface_update_region, RID, int, int, const Vector<uint8_t> &) FUNC3(mesh_surface_set_material, RID, int, RID) FUNC2RC(RID, mesh_surface_get_material, RID, int) @@ -192,8 +192,8 @@ public: FUNC2RC(Color, multimesh_instance_get_color, RID, int) FUNC2RC(Color, multimesh_instance_get_custom_data, RID, int) - FUNC2(multimesh_set_buffer, RID, const PoolVector<float> &) - FUNC1RC(PoolVector<float>, multimesh_get_buffer, RID) + FUNC2(multimesh_set_buffer, RID, const Vector<float> &) + FUNC1RC(Vector<float>, multimesh_get_buffer, RID) FUNC2(multimesh_set_visible_instances, RID, int) FUNC1RC(int, multimesh_get_visible_instances, RID) @@ -268,14 +268,14 @@ public: FUNCRID(gi_probe) - FUNC8(gi_probe_allocate, RID, const Transform &, const AABB &, const Vector3i &, const PoolVector<uint8_t> &, const PoolVector<uint8_t> &, const PoolVector<uint8_t> &, const PoolVector<int> &) + FUNC8(gi_probe_allocate, RID, const Transform &, const AABB &, const Vector3i &, const Vector<uint8_t> &, const Vector<uint8_t> &, const Vector<uint8_t> &, const Vector<int> &) FUNC1RC(AABB, gi_probe_get_bounds, RID) FUNC1RC(Vector3i, gi_probe_get_octree_size, RID) - FUNC1RC(PoolVector<uint8_t>, gi_probe_get_octree_cells, RID) - FUNC1RC(PoolVector<uint8_t>, gi_probe_get_data_cells, RID) - FUNC1RC(PoolVector<uint8_t>, gi_probe_get_distance_field, RID) - FUNC1RC(PoolVector<int>, gi_probe_get_level_counts, RID) + FUNC1RC(Vector<uint8_t>, gi_probe_get_octree_cells, RID) + FUNC1RC(Vector<uint8_t>, gi_probe_get_data_cells, RID) + FUNC1RC(Vector<uint8_t>, gi_probe_get_distance_field, RID) + FUNC1RC(Vector<int>, gi_probe_get_level_counts, RID) FUNC1RC(Transform, gi_probe_get_to_cell_xform, RID) FUNC2(gi_probe_set_dynamic_range, RID, float) @@ -315,8 +315,8 @@ public: FUNC2(lightmap_capture_set_bounds, RID, const AABB &) FUNC1RC(AABB, lightmap_capture_get_bounds, RID) - FUNC2(lightmap_capture_set_octree, RID, const PoolVector<uint8_t> &) - FUNC1RC(PoolVector<uint8_t>, lightmap_capture_get_octree, RID) + FUNC2(lightmap_capture_set_octree, RID, const Vector<uint8_t> &) + FUNC1RC(Vector<uint8_t>, lightmap_capture_get_octree, RID) FUNC2(lightmap_capture_set_octree_cell_transform, RID, const Transform &) FUNC1RC(Transform, lightmap_capture_get_octree_cell_transform, RID) FUNC2(lightmap_capture_set_octree_cell_subdiv, RID, int) @@ -590,8 +590,8 @@ public: FUNC2(canvas_light_occluder_set_light_mask, RID, int) FUNCRID(canvas_occluder_polygon) - FUNC3(canvas_occluder_polygon_set_shape, RID, const PoolVector<Vector2> &, bool) - FUNC2(canvas_occluder_polygon_set_shape_as_lines, RID, const PoolVector<Vector2> &) + FUNC3(canvas_occluder_polygon_set_shape, RID, const Vector<Vector2> &, bool) + FUNC2(canvas_occluder_polygon_set_shape_as_lines, RID, const Vector<Vector2> &) FUNC2(canvas_occluder_polygon_set_cull_mode, RID, CanvasOccluderPolygonCullMode) diff --git a/servers/visual_server.cpp b/servers/visual_server.cpp index 83efbabc36..d493c20e9a 100644 --- a/servers/visual_server.cpp +++ b/servers/visual_server.cpp @@ -120,11 +120,11 @@ RID VisualServer::get_test_texture() { #define TEST_TEXTURE_SIZE 256 - PoolVector<uint8_t> test_data; + Vector<uint8_t> test_data; test_data.resize(TEST_TEXTURE_SIZE * TEST_TEXTURE_SIZE * 3); { - PoolVector<uint8_t>::Write w = test_data.write(); + uint8_t *w = test_data.ptrw(); for (int x = 0; x < TEST_TEXTURE_SIZE; x++) { @@ -172,10 +172,10 @@ void VisualServer::_free_internal_rids() { RID VisualServer::_make_test_cube() { - PoolVector<Vector3> vertices; - PoolVector<Vector3> normals; - PoolVector<float> tangents; - PoolVector<Vector3> uvs; + Vector<Vector3> vertices; + Vector<Vector3> normals; + Vector<float> tangents; + Vector<Vector3> uvs; #define ADD_VTX(m_idx) \ vertices.push_back(face_points[m_idx]); \ @@ -229,7 +229,7 @@ RID VisualServer::_make_test_cube() { d[VisualServer::ARRAY_TEX_UV] = uvs; d[VisualServer::ARRAY_VERTEX] = vertices; - PoolVector<int> indices; + Vector<int> indices; indices.resize(vertices.size()); for (int i = 0; i < vertices.size(); i++) indices.set(i, i); @@ -254,8 +254,8 @@ RID VisualServer::_make_test_cube() { RID VisualServer::make_sphere_mesh(int p_lats, int p_lons, float p_radius) { - PoolVector<Vector3> vertices; - PoolVector<Vector3> normals; + Vector<Vector3> vertices; + Vector<Vector3> normals; for (int i = 1; i <= p_lats; i++) { double lat0 = Math_PI * (-0.5 + (double)(i - 1) / p_lats); @@ -314,10 +314,10 @@ RID VisualServer::get_white_texture() { if (white_texture.is_valid()) return white_texture; - PoolVector<uint8_t> wt; + Vector<uint8_t> wt; wt.resize(16 * 3); { - PoolVector<uint8_t>::Write w = wt.write(); + uint8_t *w = wt.ptrw(); for (int i = 0; i < 16 * 3; i++) w[i] = 255; } @@ -329,13 +329,13 @@ RID VisualServer::get_white_texture() { #define SMALL_VEC2 Vector2(0.00001, 0.00001) #define SMALL_VEC3 Vector3(0.00001, 0.00001, 0.00001) -Error VisualServer::_surface_set_data(Array p_arrays, uint32_t p_format, uint32_t *p_offsets, uint32_t p_stride, PoolVector<uint8_t> &r_vertex_array, int p_vertex_array_len, PoolVector<uint8_t> &r_index_array, int p_index_array_len, AABB &r_aabb, Vector<AABB> &r_bone_aabb) { +Error VisualServer::_surface_set_data(Array p_arrays, uint32_t p_format, uint32_t *p_offsets, uint32_t p_stride, Vector<uint8_t> &r_vertex_array, int p_vertex_array_len, Vector<uint8_t> &r_index_array, int p_index_array_len, AABB &r_aabb, Vector<AABB> &r_bone_aabb) { - PoolVector<uint8_t>::Write vw = r_vertex_array.write(); + uint8_t *vw = r_vertex_array.ptrw(); - PoolVector<uint8_t>::Write iw; + uint8_t *iw; if (r_index_array.size()) { - iw = r_index_array.write(); + iw = r_index_array.ptrw(); } int max_bone = 0; @@ -351,11 +351,10 @@ Error VisualServer::_surface_set_data(Array p_arrays, uint32_t p_format, uint32_ if (p_format & VS::ARRAY_FLAG_USE_2D_VERTICES) { - PoolVector<Vector2> array = p_arrays[ai]; + Vector<Vector2> array = p_arrays[ai]; ERR_FAIL_COND_V(array.size() != p_vertex_array_len, ERR_INVALID_PARAMETER); - PoolVector<Vector2>::Read read = array.read(); - const Vector2 *src = read.ptr(); + const Vector2 *src = array.ptr(); // setting vertices means regenerating the AABB Rect2 aabb; @@ -380,11 +379,10 @@ Error VisualServer::_surface_set_data(Array p_arrays, uint32_t p_format, uint32_ r_aabb = AABB(Vector3(aabb.position.x, aabb.position.y, 0), Vector3(aabb.size.x, aabb.size.y, 0)); } else { - PoolVector<Vector3> array = p_arrays[ai]; + Vector<Vector3> array = p_arrays[ai]; ERR_FAIL_COND_V(array.size() != p_vertex_array_len, ERR_INVALID_PARAMETER); - PoolVector<Vector3>::Read read = array.read(); - const Vector3 *src = read.ptr(); + const Vector3 *src = array.ptr(); // setting vertices means regenerating the AABB AABB aabb; @@ -412,13 +410,12 @@ Error VisualServer::_surface_set_data(Array p_arrays, uint32_t p_format, uint32_ } break; case VS::ARRAY_NORMAL: { - ERR_FAIL_COND_V(p_arrays[ai].get_type() != Variant::POOL_VECTOR3_ARRAY, ERR_INVALID_PARAMETER); + ERR_FAIL_COND_V(p_arrays[ai].get_type() != Variant::PACKED_VECTOR3_ARRAY, ERR_INVALID_PARAMETER); - PoolVector<Vector3> array = p_arrays[ai]; + Vector<Vector3> array = p_arrays[ai]; ERR_FAIL_COND_V(array.size() != p_vertex_array_len, ERR_INVALID_PARAMETER); - PoolVector<Vector3>::Read read = array.read(); - const Vector3 *src = read.ptr(); + const Vector3 *src = array.ptr(); // setting vertices means regenerating the AABB @@ -448,14 +445,13 @@ Error VisualServer::_surface_set_data(Array p_arrays, uint32_t p_format, uint32_ case VS::ARRAY_TANGENT: { - ERR_FAIL_COND_V(p_arrays[ai].get_type() != Variant::POOL_REAL_ARRAY, ERR_INVALID_PARAMETER); + ERR_FAIL_COND_V(p_arrays[ai].get_type() != Variant::PACKED_FLOAT32_ARRAY, ERR_INVALID_PARAMETER); - PoolVector<real_t> array = p_arrays[ai]; + Vector<real_t> array = p_arrays[ai]; ERR_FAIL_COND_V(array.size() != p_vertex_array_len * 4, ERR_INVALID_PARAMETER); - PoolVector<real_t>::Read read = array.read(); - const real_t *src = read.ptr(); + const real_t *src = array.ptr(); if (p_format & ARRAY_COMPRESS_TANGENT) { @@ -487,14 +483,13 @@ Error VisualServer::_surface_set_data(Array p_arrays, uint32_t p_format, uint32_ } break; case VS::ARRAY_COLOR: { - ERR_FAIL_COND_V(p_arrays[ai].get_type() != Variant::POOL_COLOR_ARRAY, ERR_INVALID_PARAMETER); + ERR_FAIL_COND_V(p_arrays[ai].get_type() != Variant::PACKED_COLOR_ARRAY, ERR_INVALID_PARAMETER); - PoolVector<Color> array = p_arrays[ai]; + Vector<Color> array = p_arrays[ai]; ERR_FAIL_COND_V(array.size() != p_vertex_array_len, ERR_INVALID_PARAMETER); - PoolVector<Color>::Read read = array.read(); - const Color *src = read.ptr(); + const Color *src = array.ptr(); if (p_format & ARRAY_COMPRESS_COLOR) { @@ -520,15 +515,13 @@ Error VisualServer::_surface_set_data(Array p_arrays, uint32_t p_format, uint32_ } break; case VS::ARRAY_TEX_UV: { - ERR_FAIL_COND_V(p_arrays[ai].get_type() != Variant::POOL_VECTOR3_ARRAY && p_arrays[ai].get_type() != Variant::POOL_VECTOR2_ARRAY, ERR_INVALID_PARAMETER); + ERR_FAIL_COND_V(p_arrays[ai].get_type() != Variant::PACKED_VECTOR3_ARRAY && p_arrays[ai].get_type() != Variant::PACKED_VECTOR2_ARRAY, ERR_INVALID_PARAMETER); - PoolVector<Vector2> array = p_arrays[ai]; + Vector<Vector2> array = p_arrays[ai]; ERR_FAIL_COND_V(array.size() != p_vertex_array_len, ERR_INVALID_PARAMETER); - PoolVector<Vector2>::Read read = array.read(); - - const Vector2 *src = read.ptr(); + const Vector2 *src = array.ptr(); if (p_format & ARRAY_COMPRESS_TEX_UV) { @@ -551,15 +544,13 @@ Error VisualServer::_surface_set_data(Array p_arrays, uint32_t p_format, uint32_ case VS::ARRAY_TEX_UV2: { - ERR_FAIL_COND_V(p_arrays[ai].get_type() != Variant::POOL_VECTOR3_ARRAY && p_arrays[ai].get_type() != Variant::POOL_VECTOR2_ARRAY, ERR_INVALID_PARAMETER); + ERR_FAIL_COND_V(p_arrays[ai].get_type() != Variant::PACKED_VECTOR3_ARRAY && p_arrays[ai].get_type() != Variant::PACKED_VECTOR2_ARRAY, ERR_INVALID_PARAMETER); - PoolVector<Vector2> array = p_arrays[ai]; + Vector<Vector2> array = p_arrays[ai]; ERR_FAIL_COND_V(array.size() != p_vertex_array_len, ERR_INVALID_PARAMETER); - PoolVector<Vector2>::Read read = array.read(); - - const Vector2 *src = read.ptr(); + const Vector2 *src = array.ptr(); if (p_format & ARRAY_COMPRESS_TEX_UV2) { @@ -580,15 +571,13 @@ Error VisualServer::_surface_set_data(Array p_arrays, uint32_t p_format, uint32_ } break; case VS::ARRAY_WEIGHTS: { - ERR_FAIL_COND_V(p_arrays[ai].get_type() != Variant::POOL_REAL_ARRAY, ERR_INVALID_PARAMETER); + ERR_FAIL_COND_V(p_arrays[ai].get_type() != Variant::PACKED_FLOAT32_ARRAY, ERR_INVALID_PARAMETER); - PoolVector<real_t> array = p_arrays[ai]; + Vector<real_t> array = p_arrays[ai]; ERR_FAIL_COND_V(array.size() != p_vertex_array_len * VS::ARRAY_WEIGHTS_SIZE, ERR_INVALID_PARAMETER); - PoolVector<real_t>::Read read = array.read(); - - const real_t *src = read.ptr(); + const real_t *src = array.ptr(); { @@ -606,15 +595,13 @@ Error VisualServer::_surface_set_data(Array p_arrays, uint32_t p_format, uint32_ } break; case VS::ARRAY_BONES: { - ERR_FAIL_COND_V(p_arrays[ai].get_type() != Variant::POOL_INT_ARRAY && p_arrays[ai].get_type() != Variant::POOL_REAL_ARRAY, ERR_INVALID_PARAMETER); + ERR_FAIL_COND_V(p_arrays[ai].get_type() != Variant::PACKED_INT32_ARRAY && p_arrays[ai].get_type() != Variant::PACKED_FLOAT32_ARRAY, ERR_INVALID_PARAMETER); - PoolVector<int> array = p_arrays[ai]; + Vector<int> array = p_arrays[ai]; ERR_FAIL_COND_V(array.size() != p_vertex_array_len * VS::ARRAY_WEIGHTS_SIZE, ERR_INVALID_PARAMETER); - PoolVector<int>::Read read = array.read(); - - const int *src = read.ptr(); + const int *src = array.ptr(); for (int i = 0; i < p_vertex_array_len; i++) { @@ -631,16 +618,15 @@ Error VisualServer::_surface_set_data(Array p_arrays, uint32_t p_format, uint32_ case VS::ARRAY_INDEX: { ERR_FAIL_COND_V(p_index_array_len <= 0, ERR_INVALID_DATA); - ERR_FAIL_COND_V(p_arrays[ai].get_type() != Variant::POOL_INT_ARRAY, ERR_INVALID_PARAMETER); + ERR_FAIL_COND_V(p_arrays[ai].get_type() != Variant::PACKED_INT32_ARRAY, ERR_INVALID_PARAMETER); - PoolVector<int> indices = p_arrays[ai]; + Vector<int> indices = p_arrays[ai]; ERR_FAIL_COND_V(indices.size() == 0, ERR_INVALID_PARAMETER); ERR_FAIL_COND_V(indices.size() != p_index_array_len, ERR_INVALID_PARAMETER); /* determine whether using 16 or 32 bits indices */ - PoolVector<int>::Read read = indices.read(); - const int *src = read.ptr(); + const int *src = indices.ptr(); for (int i = 0; i < p_index_array_len; i++) { @@ -675,18 +661,18 @@ Error VisualServer::_surface_set_data(Array p_arrays, uint32_t p_format, uint32_ } } - PoolVector<Vector3> vertices = p_arrays[VS::ARRAY_VERTEX]; - PoolVector<int> bones = p_arrays[VS::ARRAY_BONES]; - PoolVector<float> weights = p_arrays[VS::ARRAY_WEIGHTS]; + Vector<Vector3> vertices = p_arrays[VS::ARRAY_VERTEX]; + Vector<int> bones = p_arrays[VS::ARRAY_BONES]; + Vector<float> weights = p_arrays[VS::ARRAY_WEIGHTS]; bool any_valid = false; if (vertices.size() && bones.size() == vertices.size() * 4 && weights.size() == bones.size()) { int vs = vertices.size(); - PoolVector<Vector3>::Read rv = vertices.read(); - PoolVector<int>::Read rb = bones.read(); - PoolVector<float>::Read rw = weights.read(); + const Vector3 *rv = vertices.ptr(); + const int *rb = bones.ptr(); + const float *rw = weights.ptr(); AABB *bptr = r_bone_aabb.ptrw(); @@ -866,22 +852,22 @@ Error VisualServer::mesh_create_surface_data_from_arrays(SurfaceData *r_surface_ Variant var = p_arrays[i]; switch (var.get_type()) { - case Variant::POOL_VECTOR2_ARRAY: { - PoolVector<Vector2> v2 = var; + case Variant::PACKED_VECTOR2_ARRAY: { + Vector<Vector2> v2 = var; } break; - case Variant::POOL_VECTOR3_ARRAY: { - PoolVector<Vector3> v3 = var; + case Variant::PACKED_VECTOR3_ARRAY: { + Vector<Vector3> v3 = var; } break; default: { Array v = var; } break; } - array_len = PoolVector3Array(p_arrays[i]).size(); + array_len = PackedVector3Array(p_arrays[i]).size(); ERR_FAIL_COND_V(array_len == 0, ERR_INVALID_DATA); } else if (i == VS::ARRAY_INDEX) { - index_array_len = PoolIntArray(p_arrays[i]).size(); + index_array_len = PackedInt32Array(p_arrays[i]).size(); } } @@ -921,10 +907,10 @@ Error VisualServer::mesh_create_surface_data_from_arrays(SurfaceData *r_surface_ case VS::ARRAY_VERTEX: { Variant arr = p_arrays[0]; - if (arr.get_type() == Variant::POOL_VECTOR2_ARRAY) { + if (arr.get_type() == Variant::PACKED_VECTOR2_ARRAY) { elem_size = 2; p_compress_format |= ARRAY_FLAG_USE_2D_VERTICES; - } else if (arr.get_type() == Variant::POOL_VECTOR3_ARRAY) { + } else if (arr.get_type() == Variant::PACKED_VECTOR3_ARRAY) { p_compress_format &= ~ARRAY_FLAG_USE_2D_VERTICES; elem_size = 3; } else { @@ -1020,12 +1006,12 @@ Error VisualServer::mesh_create_surface_data_from_arrays(SurfaceData *r_surface_ int array_size = total_elem_size * array_len; - PoolVector<uint8_t> vertex_array; + Vector<uint8_t> vertex_array; vertex_array.resize(array_size); int index_array_size = offsets[VS::ARRAY_INDEX] * index_array_len; - PoolVector<uint8_t> index_array; + Vector<uint8_t> index_array; index_array.resize(index_array_size); AABB aabb; @@ -1034,13 +1020,13 @@ Error VisualServer::mesh_create_surface_data_from_arrays(SurfaceData *r_surface_ Error err = _surface_set_data(p_arrays, format, offsets, total_elem_size, vertex_array, array_len, index_array, index_array_len, aabb, bone_aabb); ERR_FAIL_COND_V_MSG(err != OK, ERR_INVALID_DATA, "Invalid array format for surface."); - Vector<PoolVector<uint8_t> > blend_shape_data; + Vector<Vector<uint8_t> > blend_shape_data; for (int i = 0; i < p_blend_shapes.size(); i++) { - PoolVector<uint8_t> vertex_array_shape; + Vector<uint8_t> vertex_array_shape; vertex_array_shape.resize(array_size); - PoolVector<uint8_t> noindex; + Vector<uint8_t> noindex; AABB laabb; Error err2 = _surface_set_data(p_blend_shapes[i], format & ~ARRAY_FORMAT_INDEX, offsets, total_elem_size, vertex_array_shape, array_len, noindex, 0, laabb, bone_aabb); @@ -1057,27 +1043,27 @@ Error VisualServer::mesh_create_surface_data_from_arrays(SurfaceData *r_surface_ for (List<Variant>::Element *E = keys.front(); E; E = E->next()) { float distance = E->get(); ERR_CONTINUE(distance <= 0.0); - PoolVector<int> indices = p_lods[E->get()]; + Vector<int> indices = p_lods[E->get()]; ERR_CONTINUE(indices.size() == 0); uint32_t index_count = indices.size(); ERR_CONTINUE(index_count >= (uint32_t)index_array_len); //should be smaller.. - PoolVector<int>::Read r = indices.read(); + const int *r = indices.ptr(); - PoolVector<uint8_t> data; + Vector<uint8_t> data; if (array_len <= 65536) { //16 bits indices data.resize(indices.size() * 2); - PoolVector<uint8_t>::Write w = data.write(); - uint16_t *index_ptr = (uint16_t *)w.ptr(); + uint8_t *w = data.ptrw(); + uint16_t *index_ptr = (uint16_t *)w; for (uint32_t i = 0; i < index_count; i++) { index_ptr[i] = r[i]; } } else { //32 bits indices data.resize(indices.size() * 4); - PoolVector<uint8_t>::Write w = data.write(); - uint32_t *index_ptr = (uint32_t *)w.ptr(); + uint8_t *w = data.ptrw(); + uint32_t *index_ptr = (uint32_t *)w; for (uint32_t i = 0; i < index_count; i++) { index_ptr[i] = r[i]; } @@ -1115,7 +1101,7 @@ void VisualServer::mesh_add_surface_from_arrays(RID p_mesh, PrimitiveType p_prim mesh_add_surface(p_mesh, sd); } -Array VisualServer::_get_array_from_surface(uint32_t p_format, PoolVector<uint8_t> p_vertex_data, int p_vertex_len, PoolVector<uint8_t> p_index_data, int p_index_len) const { +Array VisualServer::_get_array_from_surface(uint32_t p_format, Vector<uint8_t> p_vertex_data, int p_vertex_len, Vector<uint8_t> p_index_data, int p_index_len) const { uint32_t offsets[ARRAY_MAX]; @@ -1227,7 +1213,7 @@ Array VisualServer::_get_array_from_surface(uint32_t p_format, PoolVector<uint8_ Array ret; ret.resize(VS::ARRAY_MAX); - PoolVector<uint8_t>::Read r = p_vertex_data.read(); + const uint8_t *r = p_vertex_data.ptr(); for (int i = 0; i < VS::ARRAY_MAX; i++) { @@ -1240,12 +1226,12 @@ Array VisualServer::_get_array_from_surface(uint32_t p_format, PoolVector<uint8_ if (p_format & ARRAY_FLAG_USE_2D_VERTICES) { - PoolVector<Vector2> arr_2d; + Vector<Vector2> arr_2d; arr_2d.resize(p_vertex_len); { - PoolVector<Vector2>::Write w = arr_2d.write(); + Vector2 *w = arr_2d.ptrw(); for (int j = 0; j < p_vertex_len; j++) { @@ -1257,12 +1243,12 @@ Array VisualServer::_get_array_from_surface(uint32_t p_format, PoolVector<uint8_ ret[i] = arr_2d; } else { - PoolVector<Vector3> arr_3d; + Vector<Vector3> arr_3d; arr_3d.resize(p_vertex_len); { - PoolVector<Vector3>::Write w = arr_3d.write(); + Vector3 *w = arr_3d.ptrw(); for (int j = 0; j < p_vertex_len; j++) { @@ -1276,12 +1262,12 @@ Array VisualServer::_get_array_from_surface(uint32_t p_format, PoolVector<uint8_ } break; case VS::ARRAY_NORMAL: { - PoolVector<Vector3> arr; + Vector<Vector3> arr; arr.resize(p_vertex_len); if (p_format & ARRAY_COMPRESS_NORMAL) { - PoolVector<Vector3>::Write w = arr.write(); + Vector3 *w = arr.ptrw(); const float multiplier = 1.f / 127.f; for (int j = 0; j < p_vertex_len; j++) { @@ -1290,7 +1276,7 @@ Array VisualServer::_get_array_from_surface(uint32_t p_format, PoolVector<uint8_ w[j] = Vector3(float(v[0]) * multiplier, float(v[1]) * multiplier, float(v[2]) * multiplier); } } else { - PoolVector<Vector3>::Write w = arr.write(); + Vector3 *w = arr.ptrw(); for (int j = 0; j < p_vertex_len; j++) { @@ -1304,10 +1290,10 @@ Array VisualServer::_get_array_from_surface(uint32_t p_format, PoolVector<uint8_ } break; case VS::ARRAY_TANGENT: { - PoolVector<float> arr; + Vector<float> arr; arr.resize(p_vertex_len * 4); if (p_format & ARRAY_COMPRESS_TANGENT) { - PoolVector<float>::Write w = arr.write(); + float *w = arr.ptrw(); for (int j = 0; j < p_vertex_len; j++) { @@ -1318,7 +1304,7 @@ Array VisualServer::_get_array_from_surface(uint32_t p_format, PoolVector<uint8_ } } else { - PoolVector<float>::Write w = arr.write(); + float *w = arr.ptrw(); for (int j = 0; j < p_vertex_len; j++) { const float *v = (const float *)&r[j * total_elem_size + offsets[i]]; @@ -1333,12 +1319,12 @@ Array VisualServer::_get_array_from_surface(uint32_t p_format, PoolVector<uint8_ } break; case VS::ARRAY_COLOR: { - PoolVector<Color> arr; + Vector<Color> arr; arr.resize(p_vertex_len); if (p_format & ARRAY_COMPRESS_COLOR) { - PoolVector<Color>::Write w = arr.write(); + Color *w = arr.ptrw(); for (int j = 0; j < p_vertex_len; j++) { @@ -1346,7 +1332,7 @@ Array VisualServer::_get_array_from_surface(uint32_t p_format, PoolVector<uint8_ w[j] = Color(float(v[0] / 255.0), float(v[1] / 255.0), float(v[2] / 255.0), float(v[3] / 255.0)); } } else { - PoolVector<Color>::Write w = arr.write(); + Color *w = arr.ptrw(); for (int j = 0; j < p_vertex_len; j++) { @@ -1359,12 +1345,12 @@ Array VisualServer::_get_array_from_surface(uint32_t p_format, PoolVector<uint8_ } break; case VS::ARRAY_TEX_UV: { - PoolVector<Vector2> arr; + Vector<Vector2> arr; arr.resize(p_vertex_len); if (p_format & ARRAY_COMPRESS_TEX_UV) { - PoolVector<Vector2>::Write w = arr.write(); + Vector2 *w = arr.ptrw(); for (int j = 0; j < p_vertex_len; j++) { @@ -1373,7 +1359,7 @@ Array VisualServer::_get_array_from_surface(uint32_t p_format, PoolVector<uint8_ } } else { - PoolVector<Vector2>::Write w = arr.write(); + Vector2 *w = arr.ptrw(); for (int j = 0; j < p_vertex_len; j++) { @@ -1386,12 +1372,12 @@ Array VisualServer::_get_array_from_surface(uint32_t p_format, PoolVector<uint8_ } break; case VS::ARRAY_TEX_UV2: { - PoolVector<Vector2> arr; + Vector<Vector2> arr; arr.resize(p_vertex_len); if (p_format & ARRAY_COMPRESS_TEX_UV2) { - PoolVector<Vector2>::Write w = arr.write(); + Vector2 *w = arr.ptrw(); for (int j = 0; j < p_vertex_len; j++) { @@ -1400,7 +1386,7 @@ Array VisualServer::_get_array_from_surface(uint32_t p_format, PoolVector<uint8_ } } else { - PoolVector<Vector2>::Write w = arr.write(); + Vector2 *w = arr.ptrw(); for (int j = 0; j < p_vertex_len; j++) { @@ -1414,10 +1400,10 @@ Array VisualServer::_get_array_from_surface(uint32_t p_format, PoolVector<uint8_ } break; case VS::ARRAY_WEIGHTS: { - PoolVector<float> arr; + Vector<float> arr; arr.resize(p_vertex_len * 4); { - PoolVector<float>::Write w = arr.write(); + float *w = arr.ptrw(); for (int j = 0; j < p_vertex_len; j++) { @@ -1433,10 +1419,10 @@ Array VisualServer::_get_array_from_surface(uint32_t p_format, PoolVector<uint8_ } break; case VS::ARRAY_BONES: { - PoolVector<int> arr; + Vector<int> arr; arr.resize(p_vertex_len * 4); - PoolVector<int>::Write w = arr.write(); + int *w = arr.ptrw(); for (int j = 0; j < p_vertex_len; j++) { @@ -1452,13 +1438,13 @@ Array VisualServer::_get_array_from_surface(uint32_t p_format, PoolVector<uint8_ case VS::ARRAY_INDEX: { /* determine whether using 16 or 32 bits indices */ - PoolVector<uint8_t>::Read ir = p_index_data.read(); + const uint8_t *ir = p_index_data.ptr(); - PoolVector<int> arr; + Vector<int> arr; arr.resize(p_index_len); if (p_vertex_len < (1 << 16)) { - PoolVector<int>::Write w = arr.write(); + int *w = arr.ptrw(); for (int j = 0; j < p_index_len; j++) { @@ -1467,7 +1453,7 @@ Array VisualServer::_get_array_from_surface(uint32_t p_format, PoolVector<uint8_ } } else { - PoolVector<int>::Write w = arr.write(); + int *w = arr.ptrw(); for (int j = 0; j < p_index_len; j++) { const int *v = (const int *)&ir[j * 4]; @@ -1499,22 +1485,22 @@ Dictionary VisualServer::mesh_surface_get_lods(RID p_mesh, int p_surface) const Dictionary ret; for (int i = 0; i < sd.lods.size(); i++) { - PoolVector<int> lods; + Vector<int> lods; if (sd.vertex_count <= 65536) { uint32_t lc = sd.lods[i].index_data.size() / 2; lods.resize(lc); - PoolVector<uint8_t>::Read r = sd.lods[i].index_data.read(); - const uint16_t *rptr = (const uint16_t *)r.ptr(); - PoolVector<int>::Write w = lods.write(); + const uint8_t *r = sd.lods[i].index_data.ptr(); + const uint16_t *rptr = (const uint16_t *)r; + int *w = lods.ptrw(); for (uint32_t j = 0; j < lc; j++) { w[j] = rptr[i]; } } else { uint32_t lc = sd.lods[i].index_data.size() / 4; lods.resize(lc); - PoolVector<uint8_t>::Read r = sd.lods[i].index_data.read(); - const uint32_t *rptr = (const uint32_t *)r.ptr(); - PoolVector<int>::Write w = lods.write(); + const uint8_t *r = sd.lods[i].index_data.ptr(); + const uint32_t *rptr = (const uint32_t *)r; + int *w = lods.ptrw(); for (uint32_t j = 0; j < lc; j++) { w[j] = rptr[i]; } @@ -1531,12 +1517,12 @@ Array VisualServer::mesh_surface_get_blend_shape_arrays(RID p_mesh, int p_surfac SurfaceData sd = mesh_get_surface(p_mesh, p_surface); ERR_FAIL_COND_V(sd.vertex_count == 0, Array()); - Vector<PoolVector<uint8_t> > blend_shape_data = sd.blend_shapes; + Vector<Vector<uint8_t> > blend_shape_data = sd.blend_shapes; if (blend_shape_data.size() > 0) { int vertex_len = sd.vertex_count; - PoolVector<uint8_t> index_data = sd.index_data; + Vector<uint8_t> index_data = sd.index_data; int index_len = sd.index_count; uint32_t format = sd.format; @@ -1555,12 +1541,12 @@ Array VisualServer::mesh_surface_get_blend_shape_arrays(RID p_mesh, int p_surfac Array VisualServer::mesh_create_arrays_from_surface_data(const SurfaceData &p_data) const { - PoolVector<uint8_t> vertex_data = p_data.vertex_data; + Vector<uint8_t> vertex_data = p_data.vertex_data; ERR_FAIL_COND_V(vertex_data.size() == 0, Array()); int vertex_len = p_data.vertex_count; - PoolVector<uint8_t> index_data = p_data.index_data; + Vector<uint8_t> index_data = p_data.index_data; int index_len = p_data.index_count; uint32_t format = p_data.format; @@ -1819,7 +1805,7 @@ void VisualServer::_bind_methods() { ClassDB::bind_method(D_METHOD("environment_set_tonemap", "env", "tone_mapper", "exposure", "white", "auto_exposure", "min_luminance", "max_luminance", "auto_exp_speed", "auto_exp_grey"), &VisualServer::environment_set_tonemap); ClassDB::bind_method(D_METHOD("environment_set_adjustment", "env", "enable", "brightness", "contrast", "saturation", "ramp"), &VisualServer::environment_set_adjustment); ClassDB::bind_method(D_METHOD("environment_set_ssr", "env", "enable", "max_steps", "fade_in", "fade_out", "depth_tolerance", "roughness"), &VisualServer::environment_set_ssr); - ClassDB::bind_method(D_METHOD("environment_set_ssao", "env", "enable", "radius", "intensity", "radius2", "intensity2", "bias", "light_affect", "ao_channel_affect", "color", "blur", "bilateral_sharpness"), &VisualServer::environment_set_ssao); + ClassDB::bind_method(D_METHOD("environment_set_ssao", "env", "enable", "radius", "intensity", "bias", "light_affect", "ao_channel_affect", "blur", "bilateral_sharpness"), &VisualServer::environment_set_ssao); ClassDB::bind_method(D_METHOD("environment_set_fog", "env", "enable", "color", "sun_color", "sun_amount"), &VisualServer::environment_set_fog); ClassDB::bind_method(D_METHOD("environment_set_fog_depth", "env", "enable", "depth_begin", "depth_end", "depth_curve", "transmit", "transmit_curve"), &VisualServer::environment_set_fog_depth); @@ -2141,10 +2127,6 @@ void VisualServer::_bind_methods() { BIND_ENUM_CONSTANT(ENV_TONE_MAPPER_FILMIC); BIND_ENUM_CONSTANT(ENV_TONE_MAPPER_ACES); - BIND_ENUM_CONSTANT(ENV_SSAO_QUALITY_LOW); - BIND_ENUM_CONSTANT(ENV_SSAO_QUALITY_MEDIUM); - BIND_ENUM_CONSTANT(ENV_SSAO_QUALITY_HIGH); - BIND_ENUM_CONSTANT(ENV_SSAO_BLUR_DISABLED); BIND_ENUM_CONSTANT(ENV_SSAO_BLUR_1x1); BIND_ENUM_CONSTANT(ENV_SSAO_BLUR_2x2); @@ -2198,9 +2180,9 @@ void VisualServer::_bind_methods() { BIND_ENUM_CONSTANT(CANVAS_ITEM_TEXTURE_FILTER_DEFAULT); BIND_ENUM_CONSTANT(CANVAS_ITEM_TEXTURE_FILTER_NEAREST); BIND_ENUM_CONSTANT(CANVAS_ITEM_TEXTURE_FILTER_LINEAR); - BIND_ENUM_CONSTANT(CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIMPAMPS); + BIND_ENUM_CONSTANT(CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS); BIND_ENUM_CONSTANT(CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS); - BIND_ENUM_CONSTANT(CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIMPAMPS_ANISOTROPIC); + BIND_ENUM_CONSTANT(CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC); BIND_ENUM_CONSTANT(CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC); BIND_ENUM_CONSTANT(CANVAS_ITEM_TEXTURE_FILTER_MAX); @@ -2255,8 +2237,8 @@ void VisualServer::_camera_set_orthogonal(RID p_camera, float p_size, float p_z_ void VisualServer::mesh_add_surface_from_mesh_data(RID p_mesh, const Geometry::MeshData &p_mesh_data) { - PoolVector<Vector3> vertices; - PoolVector<Vector3> normals; + Vector<Vector3> vertices; + Vector<Vector3> normals; for (int i = 0; i < p_mesh_data.faces.size(); i++) { @@ -2281,7 +2263,7 @@ void VisualServer::mesh_add_surface_from_mesh_data(RID p_mesh, const Geometry::M mesh_add_surface_from_arrays(p_mesh, PRIMITIVE_TRIANGLES, d); } -void VisualServer::mesh_add_surface_from_planes(RID p_mesh, const PoolVector<Plane> &p_planes) { +void VisualServer::mesh_add_surface_from_planes(RID p_mesh, const Vector<Plane> &p_planes) { Geometry::MeshData mdata = Geometry::build_convex_mesh(p_planes); mesh_add_surface_from_mesh_data(p_mesh, mdata); @@ -2370,7 +2352,7 @@ VisualServer::VisualServer() { GLOBAL_DEF("rendering/quality/filters/screen_space_roughness_limiter", 0); ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/filters/screen_space_roughness_limiter", PropertyInfo(Variant::INT, "rendering/quality/filters/screen_space_roughness_limiter", PROPERTY_HINT_ENUM, "Disabled,Enabled (Small Cost)")); GLOBAL_DEF("rendering/quality/filters/screen_space_roughness_limiter_curve", 1.0); - ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/filters/screen_space_roughness_limiter_curve", PropertyInfo(Variant::REAL, "rendering/quality/filters/screen_space_roughness_limiter_curve", PROPERTY_HINT_EXP_EASING, "0.01,8,0.01")); + ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/filters/screen_space_roughness_limiter_curve", PropertyInfo(Variant::FLOAT, "rendering/quality/filters/screen_space_roughness_limiter_curve", PROPERTY_HINT_EXP_EASING, "0.01,8,0.01")); } VisualServer::~VisualServer() { diff --git a/servers/visual_server.h b/servers/visual_server.h index 9b7a3ffa76..9129f940ee 100644 --- a/servers/visual_server.h +++ b/servers/visual_server.h @@ -32,7 +32,6 @@ #define VISUAL_SERVER_H #include "core/image.h" -#include "core/math/bsp_tree.h" #include "core/math/geometry.h" #include "core/math/transform_2d.h" #include "core/object.h" @@ -49,7 +48,7 @@ class VisualServer : public Object { void _camera_set_orthogonal(RID p_camera, float p_size, float p_z_near, float p_z_far); void _canvas_item_add_style_box(RID p_item, const Rect2 &p_rect, const Rect2 &p_source, RID p_texture, const Vector<float> &p_margins, const Color &p_modulate = Color(1, 1, 1)); - Array _get_array_from_surface(uint32_t p_format, PoolVector<uint8_t> p_vertex_data, int p_vertex_len, PoolVector<uint8_t> p_index_data, int p_index_len) const; + Array _get_array_from_surface(uint32_t p_format, Vector<uint8_t> p_vertex_data, int p_vertex_len, Vector<uint8_t> p_index_data, int p_index_len) const; protected: RID _make_test_cube(); @@ -58,7 +57,7 @@ protected: RID white_texture; RID test_material; - Error _surface_set_data(Array p_arrays, uint32_t p_format, uint32_t *p_offsets, uint32_t p_stride, PoolVector<uint8_t> &r_vertex_array, int p_vertex_array_len, PoolVector<uint8_t> &r_index_array, int p_index_array_len, AABB &r_aabb, Vector<AABB> &r_bone_aabb); + Error _surface_set_data(Array p_arrays, uint32_t p_format, uint32_t *p_offsets, uint32_t p_stride, Vector<uint8_t> &r_vertex_array, int p_vertex_array_len, Vector<uint8_t> &r_index_array, int p_index_array_len, AABB &r_aabb, Vector<AABB> &r_bone_aabb); static VisualServer *(*create_func)(); static void _bind_methods(); @@ -250,20 +249,20 @@ public: PrimitiveType primitive = PRIMITIVE_MAX; uint32_t format = 0; - PoolVector<uint8_t> vertex_data; + Vector<uint8_t> vertex_data; uint32_t vertex_count = 0; - PoolVector<uint8_t> index_data; + Vector<uint8_t> index_data; uint32_t index_count = 0; AABB aabb; struct LOD { float edge_length; - PoolVector<uint8_t> index_data; + Vector<uint8_t> index_data; }; Vector<LOD> lods; Vector<AABB> bone_aabbs; - Vector<PoolVector<uint8_t> > blend_shapes; + Vector<Vector<uint8_t> > blend_shapes; RID material; }; @@ -294,7 +293,7 @@ public: virtual void mesh_set_blend_shape_mode(RID p_mesh, BlendShapeMode p_mode) = 0; virtual BlendShapeMode mesh_get_blend_shape_mode(RID p_mesh) const = 0; - virtual void mesh_surface_update_region(RID p_mesh, int p_surface, int p_offset, const PoolVector<uint8_t> &p_data) = 0; + virtual void mesh_surface_update_region(RID p_mesh, int p_surface, int p_offset, const Vector<uint8_t> &p_data) = 0; virtual void mesh_surface_set_material(RID p_mesh, int p_surface, RID p_material) = 0; virtual RID mesh_surface_get_material(RID p_mesh, int p_surface) const = 0; @@ -334,8 +333,8 @@ public: virtual Color multimesh_instance_get_color(RID p_multimesh, int p_index) const = 0; virtual Color multimesh_instance_get_custom_data(RID p_multimesh, int p_index) const = 0; - virtual void multimesh_set_buffer(RID p_multimesh, const PoolVector<float> &p_buffer) = 0; - virtual PoolVector<float> multimesh_get_buffer(RID p_multimesh) const = 0; + virtual void multimesh_set_buffer(RID p_multimesh, const Vector<float> &p_buffer) = 0; + virtual Vector<float> multimesh_get_buffer(RID p_multimesh) const = 0; virtual void multimesh_set_visible_instances(RID p_multimesh, int p_visible) = 0; virtual int multimesh_get_visible_instances(RID p_multimesh) const = 0; @@ -463,14 +462,14 @@ public: virtual RID gi_probe_create() = 0; - virtual void gi_probe_allocate(RID p_gi_probe, const Transform &p_to_cell_xform, const AABB &p_aabb, const Vector3i &p_octree_size, const PoolVector<uint8_t> &p_octree_cells, const PoolVector<uint8_t> &p_data_cells, const PoolVector<uint8_t> &p_distance_field, const PoolVector<int> &p_level_counts) = 0; + virtual void gi_probe_allocate(RID p_gi_probe, const Transform &p_to_cell_xform, const AABB &p_aabb, const Vector3i &p_octree_size, const Vector<uint8_t> &p_octree_cells, const Vector<uint8_t> &p_data_cells, const Vector<uint8_t> &p_distance_field, const Vector<int> &p_level_counts) = 0; virtual AABB gi_probe_get_bounds(RID p_gi_probe) const = 0; virtual Vector3i gi_probe_get_octree_size(RID p_gi_probe) const = 0; - virtual PoolVector<uint8_t> gi_probe_get_octree_cells(RID p_gi_probe) const = 0; - virtual PoolVector<uint8_t> gi_probe_get_data_cells(RID p_gi_probe) const = 0; - virtual PoolVector<uint8_t> gi_probe_get_distance_field(RID p_gi_probe) const = 0; - virtual PoolVector<int> gi_probe_get_level_counts(RID p_gi_probe) const = 0; + virtual Vector<uint8_t> gi_probe_get_octree_cells(RID p_gi_probe) const = 0; + virtual Vector<uint8_t> gi_probe_get_data_cells(RID p_gi_probe) const = 0; + virtual Vector<uint8_t> gi_probe_get_distance_field(RID p_gi_probe) const = 0; + virtual Vector<int> gi_probe_get_level_counts(RID p_gi_probe) const = 0; virtual Transform gi_probe_get_to_cell_xform(RID p_gi_probe) const = 0; virtual void gi_probe_set_dynamic_range(RID p_gi_probe, float p_range) = 0; @@ -508,12 +507,12 @@ public: virtual RID lightmap_capture_create() = 0; virtual void lightmap_capture_set_bounds(RID p_capture, const AABB &p_bounds) = 0; virtual AABB lightmap_capture_get_bounds(RID p_capture) const = 0; - virtual void lightmap_capture_set_octree(RID p_capture, const PoolVector<uint8_t> &p_octree) = 0; + virtual void lightmap_capture_set_octree(RID p_capture, const Vector<uint8_t> &p_octree) = 0; virtual void lightmap_capture_set_octree_cell_transform(RID p_capture, const Transform &p_xform) = 0; virtual Transform lightmap_capture_get_octree_cell_transform(RID p_capture) const = 0; virtual void lightmap_capture_set_octree_cell_subdiv(RID p_capture, int p_subdiv) = 0; virtual int lightmap_capture_get_octree_cell_subdiv(RID p_capture) const = 0; - virtual PoolVector<uint8_t> lightmap_capture_get_octree(RID p_capture) const = 0; + virtual Vector<uint8_t> lightmap_capture_get_octree(RID p_capture) const = 0; virtual void lightmap_capture_set_energy(RID p_capture, float p_energy) = 0; virtual float lightmap_capture_get_energy(RID p_capture) const = 0; @@ -753,7 +752,7 @@ public: ENV_SSAO_BLUR_3x3, }; - virtual void environment_set_ssao(RID p_env, bool p_enable, float p_radius, float p_intensity2, float p_bias, float p_light_affect, float p_ao_channel_affect, EnvironmentSSAOBlur p_blur, float p_bilateral_sharpness) = 0; + virtual void environment_set_ssao(RID p_env, bool p_enable, float p_radius, float p_intensity, float p_bias, float p_light_affect, float p_ao_channel_affect, EnvironmentSSAOBlur p_blur, float p_bilateral_sharpness) = 0; enum EnvironmentSSAOQuality { ENV_SSAO_QUALITY_LOW, @@ -917,9 +916,9 @@ public: CANVAS_ITEM_TEXTURE_FILTER_DEFAULT, //uses canvas item setting for draw command, uses global setting for canvas item CANVAS_ITEM_TEXTURE_FILTER_NEAREST, CANVAS_ITEM_TEXTURE_FILTER_LINEAR, - CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIMPAMPS, + CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS, CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS, - CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIMPAMPS_ANISOTROPIC, + CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC, CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC, CANVAS_ITEM_TEXTURE_FILTER_MAX }; @@ -1011,8 +1010,8 @@ public: virtual void canvas_light_occluder_set_light_mask(RID p_occluder, int p_mask) = 0; virtual RID canvas_occluder_polygon_create() = 0; - virtual void canvas_occluder_polygon_set_shape(RID p_occluder_polygon, const PoolVector<Vector2> &p_shape, bool p_closed) = 0; - virtual void canvas_occluder_polygon_set_shape_as_lines(RID p_occluder_polygon, const PoolVector<Vector2> &p_shape) = 0; + virtual void canvas_occluder_polygon_set_shape(RID p_occluder_polygon, const Vector<Vector2> &p_shape, bool p_closed) = 0; + virtual void canvas_occluder_polygon_set_shape_as_lines(RID p_occluder_polygon, const Vector<Vector2> &p_shape) = 0; enum CanvasOccluderPolygonCullMode { CANVAS_OCCLUDER_POLYGON_CULL_DISABLED, @@ -1082,7 +1081,7 @@ public: virtual RID make_sphere_mesh(int p_lats, int p_lons, float p_radius); virtual void mesh_add_surface_from_mesh_data(RID p_mesh, const Geometry::MeshData &p_mesh_data); - virtual void mesh_add_surface_from_planes(RID p_mesh, const PoolVector<Plane> &p_planes); + virtual void mesh_add_surface_from_planes(RID p_mesh, const Vector<Plane> &p_planes); virtual void set_boot_image(const Ref<Image> &p_image, const Color &p_color, bool p_scale, bool p_use_filter = true) = 0; virtual void set_default_clear_color(const Color &p_color) = 0; diff --git a/thirdparty/README.md b/thirdparty/README.md index f77f573221..934d719ca6 100644 --- a/thirdparty/README.md +++ b/thirdparty/README.md @@ -16,7 +16,7 @@ Subcategories (`###` level) where needed are separated by a single empty line. ## basis_universal - Upstream: https://github.com/BinomialLLC/basis_universal -- Version: git (6afb2fc, 2019) +- Version: git (895ee8e, 2020) - License: Apache 2.0 Files extracted from upstream source: diff --git a/thirdparty/basis_universal/basisu_backend.cpp b/thirdparty/basis_universal/basisu_backend.cpp index ef1a5c378a..3a689e58d7 100644 --- a/thirdparty/basis_universal/basisu_backend.cpp +++ b/thirdparty/basis_universal/basisu_backend.cpp @@ -597,7 +597,7 @@ namespace basisu const uint32_t num_blocks_y = m_slices[slice_index].m_num_blocks_y; gpu_image gi; - gi.init(cETC1, width, height); + gi.init(texture_format::cETC1, width, height); for (uint32_t block_y = 0; block_y < num_blocks_y; block_y++) { diff --git a/thirdparty/basis_universal/basisu_basis_file.cpp b/thirdparty/basis_universal/basisu_basis_file.cpp index 81e0be3b78..3e6b1906b9 100644 --- a/thirdparty/basis_universal/basisu_basis_file.cpp +++ b/thirdparty/basis_universal/basisu_basis_file.cpp @@ -32,7 +32,7 @@ namespace basisu for (uint32_t i = 0; i < encoder_output.m_slice_desc.size(); i++) m_header.m_total_images = maximum<uint32_t>(m_header.m_total_images, encoder_output.m_slice_desc[i].m_source_file_index + 1); - m_header.m_format = basist::cETC1; + m_header.m_format = 0;// basist::block_format::cETC1; m_header.m_flags = 0; if (encoder_output.m_etc1s) diff --git a/thirdparty/basis_universal/basisu_comp.cpp b/thirdparty/basis_universal/basisu_comp.cpp index b6765884bc..1e4679311c 100644 --- a/thirdparty/basis_universal/basisu_comp.cpp +++ b/thirdparty/basis_universal/basisu_comp.cpp @@ -57,7 +57,7 @@ namespace basisu PRINT_BOOL_VALUE(m_debug); PRINT_BOOL_VALUE(m_debug_images); PRINT_BOOL_VALUE(m_global_sel_pal); - PRINT_BOOL_VALUE(m_no_auto_global_sel_pal); + PRINT_BOOL_VALUE(m_auto_global_sel_pal); PRINT_BOOL_VALUE(m_compression_level); PRINT_BOOL_VALUE(m_no_hybrid_sel_cb); PRINT_BOOL_VALUE(m_perceptual); @@ -774,7 +774,7 @@ namespace basisu } m_auto_global_sel_pal = false; - if (!m_params.m_global_sel_pal && !m_params.m_no_auto_global_sel_pal) + if (!m_params.m_global_sel_pal && m_params.m_auto_global_sel_pal) { const float bits_per_selector_cluster = 31.0f; double selector_codebook_bpp_est = (bits_per_selector_cluster * selector_clusters) / total_texels; @@ -860,7 +860,7 @@ namespace basisu const uint32_t width = num_blocks_x * 4; const uint32_t height = num_blocks_y * 4; - m_frontend_output_textures[i].init(cETC1, width, height); + m_frontend_output_textures[i].init(texture_format::cETC1, width, height); for (uint32_t block_y = 0; block_y < num_blocks_y; block_y++) for (uint32_t block_x = 0; block_x < num_blocks_x; block_x++) @@ -875,7 +875,7 @@ namespace basisu } #endif - m_best_etc1s_images[i].init(cETC1, width, height); + m_best_etc1s_images[i].init(texture_format::cETC1, width, height); for (uint32_t block_y = 0; block_y < num_blocks_y; block_y++) for (uint32_t block_x = 0; block_x < num_blocks_x; block_x++) memcpy(m_best_etc1s_images[i].get_block_ptr(block_x, block_y, 0), &m_frontend.get_etc1s_block(slice_desc.m_first_block_index + block_x + block_y * num_blocks_x), sizeof(etc_block)); @@ -970,12 +970,12 @@ namespace basisu for (uint32_t i = 0; i < m_slice_descs.size(); i++) { gpu_image decoded_texture; - decoded_texture.init(cETC1, m_slice_descs[i].m_width, m_slice_descs[i].m_height); + decoded_texture.init(texture_format::cETC1, m_slice_descs[i].m_width, m_slice_descs[i].m_height); tm.start(); if (!decoder.transcode_slice(&comp_data[0], (uint32_t)comp_data.size(), i, - reinterpret_cast<etc_block *>(decoded_texture.get_ptr()), m_slice_descs[i].m_num_blocks_x * m_slice_descs[i].m_num_blocks_y, basist::cETC1, 8)) + reinterpret_cast<etc_block *>(decoded_texture.get_ptr()), m_slice_descs[i].m_num_blocks_x * m_slice_descs[i].m_num_blocks_y, basist::block_format::cETC1, 8)) { error_printf("Transcoding failed to ETC1 on slice %u!\n", i); return false; @@ -1008,12 +1008,12 @@ namespace basisu for (uint32_t i = 0; i < m_slice_descs.size(); i++) { gpu_image decoded_texture; - decoded_texture.init(cBC1, m_slice_descs[i].m_width, m_slice_descs[i].m_height); + decoded_texture.init(texture_format::cBC1, m_slice_descs[i].m_width, m_slice_descs[i].m_height); tm.start(); if (!decoder.transcode_slice(&comp_data[0], (uint32_t)comp_data.size(), i, - reinterpret_cast<etc_block *>(decoded_texture.get_ptr()), m_slice_descs[i].m_num_blocks_x * m_slice_descs[i].m_num_blocks_y, basist::cBC1, 8)) + reinterpret_cast<etc_block *>(decoded_texture.get_ptr()), m_slice_descs[i].m_num_blocks_x * m_slice_descs[i].m_num_blocks_y, basist::block_format::cBC1, 8)) { error_printf("Transcoding failed to BC1 on slice %u!\n", i); return false; @@ -1066,9 +1066,7 @@ namespace basisu { const uint8_vec &comp_data = m_basis_file.get_compressed_data(); - std::string basis_filename(m_params.m_out_filename); - string_remove_extension(basis_filename); - basis_filename += ".basis"; + const std::string& basis_filename = m_params.m_out_filename; if (!write_vec_to_file(basis_filename.c_str(), comp_data)) { diff --git a/thirdparty/basis_universal/basisu_comp.h b/thirdparty/basis_universal/basisu_comp.h index affbbd9632..1c201ddbed 100644 --- a/thirdparty/basis_universal/basisu_comp.h +++ b/thirdparty/basis_universal/basisu_comp.h @@ -207,7 +207,7 @@ namespace basisu m_debug.clear(); m_debug_images.clear(); m_global_sel_pal.clear(); - m_no_auto_global_sel_pal.clear(); + m_auto_global_sel_pal.clear(); m_no_hybrid_sel_cb.clear(); m_perceptual.clear(); m_no_selector_rdo.clear(); @@ -279,7 +279,7 @@ namespace basisu param<int> m_compression_level; bool_param<false> m_global_sel_pal; - bool_param<false> m_no_auto_global_sel_pal; + bool_param<false> m_auto_global_sel_pal; // Frontend/backend codec parameters bool_param<false> m_no_hybrid_sel_cb; diff --git a/thirdparty/basis_universal/basisu_enc.h b/thirdparty/basis_universal/basisu_enc.h index e0ebfa3c03..c2b9133045 100644 --- a/thirdparty/basis_universal/basisu_enc.h +++ b/thirdparty/basis_universal/basisu_enc.h @@ -1070,7 +1070,7 @@ namespace basisu assert(node.is_leaf()); var_heap.delete_top(); - + if (node.m_training_vecs.size() > 1) { if (split_node(node_index, var_heap, l_children, r_children)) @@ -1197,11 +1197,11 @@ namespace basisu } if ((l_child.m_var > 0.0f) && (l_child.m_training_vecs.size() > 1)) - var_heap.add_heap(l_child_index, l_var); - + var_heap.add_heap(l_child_index, l_child.m_var); + if ((r_child.m_var > 0.0f) && (r_child.m_training_vecs.size() > 1)) - var_heap.add_heap(r_child_index, r_var); - + var_heap.add_heap(r_child_index, r_child.m_var); + return true; } diff --git a/thirdparty/basis_universal/basisu_frontend.cpp b/thirdparty/basis_universal/basisu_frontend.cpp index 06a8eb4e87..6f7a9bf889 100644 --- a/thirdparty/basis_universal/basisu_frontend.cpp +++ b/thirdparty/basis_universal/basisu_frontend.cpp @@ -343,6 +343,7 @@ namespace basisu cur_blk.set_block_color5_etc1s(get_endpoint_cluster_unscaled_color(endpoint_cluster_index, false)); cur_blk.set_inten_tables_etc1s(get_endpoint_cluster_inten_table(endpoint_cluster_index, false)); cur_blk.set_raw_selector_bits(get_selector_cluster_selector_bits(old_selector_cluster_index).get_raw_selector_bits()); + cur_blk.set_flip_bit(true); const uint64_t cur_err = cur_blk.evaluate_etc1_error(get_source_pixel_block(block_index).get_ptr(), m_params.m_perceptual); @@ -2385,7 +2386,7 @@ namespace basisu void basisu_frontend::dump_debug_image(const char *pFilename, uint32_t first_block, uint32_t num_blocks_x, uint32_t num_blocks_y, bool output_blocks) { gpu_image g; - g.init(cETC1, num_blocks_x * 4, num_blocks_y * 4); + g.init(texture_format::cETC1, num_blocks_x * 4, num_blocks_y * 4); for (uint32_t y = 0; y < num_blocks_y; y++) { diff --git a/thirdparty/basis_universal/basisu_gpu_texture.cpp b/thirdparty/basis_universal/basisu_gpu_texture.cpp index d1d1018163..117668c5e2 100644 --- a/thirdparty/basis_universal/basisu_gpu_texture.cpp +++ b/thirdparty/basis_universal/basisu_gpu_texture.cpp @@ -596,33 +596,375 @@ namespace basisu return true; } + + struct fxt1_block + { + union + { + struct + { + uint64_t m_t00 : 2; + uint64_t m_t01 : 2; + uint64_t m_t02 : 2; + uint64_t m_t03 : 2; + uint64_t m_t04 : 2; + uint64_t m_t05 : 2; + uint64_t m_t06 : 2; + uint64_t m_t07 : 2; + uint64_t m_t08 : 2; + uint64_t m_t09 : 2; + uint64_t m_t10 : 2; + uint64_t m_t11 : 2; + uint64_t m_t12 : 2; + uint64_t m_t13 : 2; + uint64_t m_t14 : 2; + uint64_t m_t15 : 2; + uint64_t m_t16 : 2; + uint64_t m_t17 : 2; + uint64_t m_t18 : 2; + uint64_t m_t19 : 2; + uint64_t m_t20 : 2; + uint64_t m_t21 : 2; + uint64_t m_t22 : 2; + uint64_t m_t23 : 2; + uint64_t m_t24 : 2; + uint64_t m_t25 : 2; + uint64_t m_t26 : 2; + uint64_t m_t27 : 2; + uint64_t m_t28 : 2; + uint64_t m_t29 : 2; + uint64_t m_t30 : 2; + uint64_t m_t31 : 2; + } m_lo; + uint64_t m_lo_bits; + uint8_t m_sels[8]; + }; + + union + { + struct + { +#ifdef BASISU_USE_ORIGINAL_3DFX_FXT1_ENCODING + // This is the format that 3DFX's DECOMP.EXE tool expects, which I'm assuming is what the actual 3DFX hardware wanted. + // Unfortunately, color0/color1 and color2/color3 are flipped relative to the official OpenGL extension and Intel's documentation! + uint64_t m_b1 : 5; + uint64_t m_g1 : 5; + uint64_t m_r1 : 5; + uint64_t m_b0 : 5; + uint64_t m_g0 : 5; + uint64_t m_r0 : 5; + uint64_t m_b3 : 5; + uint64_t m_g3 : 5; + uint64_t m_r3 : 5; + uint64_t m_b2 : 5; + uint64_t m_g2 : 5; + uint64_t m_r2 : 5; +#else + // Intel's encoding, and the encoding in the OpenGL FXT1 spec. + uint64_t m_b0 : 5; + uint64_t m_g0 : 5; + uint64_t m_r0 : 5; + uint64_t m_b1 : 5; + uint64_t m_g1 : 5; + uint64_t m_r1 : 5; + uint64_t m_b2 : 5; + uint64_t m_g2 : 5; + uint64_t m_r2 : 5; + uint64_t m_b3 : 5; + uint64_t m_g3 : 5; + uint64_t m_r3 : 5; +#endif + uint64_t m_alpha : 1; + uint64_t m_glsb : 2; + uint64_t m_mode : 1; + } m_hi; + + uint64_t m_hi_bits; + }; + }; + + static color_rgba expand_565(const color_rgba& c) + { + return color_rgba((c.r << 3) | (c.r >> 2), (c.g << 2) | (c.g >> 4), (c.b << 3) | (c.b >> 2), 255); + } + + // We only support CC_MIXED non-alpha blocks here because that's the only mode the transcoder uses at the moment. + bool unpack_fxt1(const void *p, color_rgba *pPixels) + { + const fxt1_block* pBlock = static_cast<const fxt1_block*>(p); + + if (pBlock->m_hi.m_mode == 0) + return false; + if (pBlock->m_hi.m_alpha == 1) + return false; + + color_rgba colors[4]; + + colors[0].r = pBlock->m_hi.m_r0; + colors[0].g = (uint8_t)((pBlock->m_hi.m_g0 << 1) | ((pBlock->m_lo.m_t00 >> 1) ^ (pBlock->m_hi.m_glsb & 1))); + colors[0].b = pBlock->m_hi.m_b0; + colors[0].a = 255; + + colors[1].r = pBlock->m_hi.m_r1; + colors[1].g = (uint8_t)((pBlock->m_hi.m_g1 << 1) | (pBlock->m_hi.m_glsb & 1)); + colors[1].b = pBlock->m_hi.m_b1; + colors[1].a = 255; + + colors[2].r = pBlock->m_hi.m_r2; + colors[2].g = (uint8_t)((pBlock->m_hi.m_g2 << 1) | ((pBlock->m_lo.m_t16 >> 1) ^ (pBlock->m_hi.m_glsb >> 1))); + colors[2].b = pBlock->m_hi.m_b2; + colors[2].a = 255; + + colors[3].r = pBlock->m_hi.m_r3; + colors[3].g = (uint8_t)((pBlock->m_hi.m_g3 << 1) | (pBlock->m_hi.m_glsb >> 1)); + colors[3].b = pBlock->m_hi.m_b3; + colors[3].a = 255; + + for (uint32_t i = 0; i < 4; i++) + colors[i] = expand_565(colors[i]); + + color_rgba block0_colors[4]; + block0_colors[0] = colors[0]; + block0_colors[1] = color_rgba((colors[0].r * 2 + colors[1].r + 1) / 3, (colors[0].g * 2 + colors[1].g + 1) / 3, (colors[0].b * 2 + colors[1].b + 1) / 3, 255); + block0_colors[2] = color_rgba((colors[1].r * 2 + colors[0].r + 1) / 3, (colors[1].g * 2 + colors[0].g + 1) / 3, (colors[1].b * 2 + colors[0].b + 1) / 3, 255); + block0_colors[3] = colors[1]; + + for (uint32_t i = 0; i < 16; i++) + { + const uint32_t sel = (pBlock->m_sels[i >> 2] >> ((i & 3) * 2)) & 3; + + const uint32_t x = i & 3; + const uint32_t y = i >> 2; + pPixels[x + y * 8] = block0_colors[sel]; + } + + color_rgba block1_colors[4]; + block1_colors[0] = colors[2]; + block1_colors[1] = color_rgba((colors[2].r * 2 + colors[3].r + 1) / 3, (colors[2].g * 2 + colors[3].g + 1) / 3, (colors[2].b * 2 + colors[3].b + 1) / 3, 255); + block1_colors[2] = color_rgba((colors[3].r * 2 + colors[2].r + 1) / 3, (colors[3].g * 2 + colors[2].g + 1) / 3, (colors[3].b * 2 + colors[2].b + 1) / 3, 255); + block1_colors[3] = colors[3]; + + for (uint32_t i = 0; i < 16; i++) + { + const uint32_t sel = (pBlock->m_sels[4 + (i >> 2)] >> ((i & 3) * 2)) & 3; + + const uint32_t x = i & 3; + const uint32_t y = i >> 2; + pPixels[4 + x + y * 8] = block1_colors[sel]; + } + + return true; + } + + struct pvrtc2_block + { + uint8_t m_modulation[4]; + + union + { + union + { + // Opaque mode: RGB colora=554 and colorb=555 + struct + { + uint32_t m_mod_flag : 1; + uint32_t m_blue_a : 4; + uint32_t m_green_a : 5; + uint32_t m_red_a : 5; + uint32_t m_hard_flag : 1; + uint32_t m_blue_b : 5; + uint32_t m_green_b : 5; + uint32_t m_red_b : 5; + uint32_t m_opaque_flag : 1; + + } m_opaque_color_data; + + // Transparent mode: RGBA colora=4433 and colorb=4443 + struct + { + uint32_t m_mod_flag : 1; + uint32_t m_blue_a : 3; + uint32_t m_green_a : 4; + uint32_t m_red_a : 4; + uint32_t m_alpha_a : 3; + uint32_t m_hard_flag : 1; + uint32_t m_blue_b : 4; + uint32_t m_green_b : 4; + uint32_t m_red_b : 4; + uint32_t m_alpha_b : 3; + uint32_t m_opaque_flag : 1; + + } m_trans_color_data; + }; + + uint32_t m_color_data_bits; + }; + }; + + static color_rgba convert_rgb_555_to_888(const color_rgba& col) + { + return color_rgba((col[0] << 3) | (col[0] >> 2), (col[1] << 3) | (col[1] >> 2), (col[2] << 3) | (col[2] >> 2), 255); + } + + static color_rgba convert_rgba_5554_to_8888(const color_rgba& col) + { + return color_rgba((col[0] << 3) | (col[0] >> 2), (col[1] << 3) | (col[1] >> 2), (col[2] << 3) | (col[2] >> 2), (col[3] << 4) | col[3]); + } + + // PVRTC2 is currently limited to only what our transcoder outputs (non-interpolated, hard_flag=1 modulation=0). In this mode, PVRTC2 looks much like BC1/ATC. + bool unpack_pvrtc2(const void *p, color_rgba *pPixels) + { + const pvrtc2_block* pBlock = static_cast<const pvrtc2_block*>(p); + + if ((!pBlock->m_opaque_color_data.m_hard_flag) || (pBlock->m_opaque_color_data.m_mod_flag)) + { + // This mode isn't supported by the transcoder, so we aren't bothering with it here. + return false; + } + + color_rgba colors[4]; + + if (pBlock->m_opaque_color_data.m_opaque_flag) + { + // colora=554 + color_rgba color_a(pBlock->m_opaque_color_data.m_red_a, pBlock->m_opaque_color_data.m_green_a, (pBlock->m_opaque_color_data.m_blue_a << 1) | (pBlock->m_opaque_color_data.m_blue_a >> 3), 255); + + // colora=555 + color_rgba color_b(pBlock->m_opaque_color_data.m_red_b, pBlock->m_opaque_color_data.m_green_b, pBlock->m_opaque_color_data.m_blue_b, 255); + + colors[0] = convert_rgb_555_to_888(color_a); + colors[3] = convert_rgb_555_to_888(color_b); + + colors[1].set((colors[0].r * 5 + colors[3].r * 3) / 8, (colors[0].g * 5 + colors[3].g * 3) / 8, (colors[0].b * 5 + colors[3].b * 3) / 8, 255); + colors[2].set((colors[0].r * 3 + colors[3].r * 5) / 8, (colors[0].g * 3 + colors[3].g * 5) / 8, (colors[0].b * 3 + colors[3].b * 5) / 8, 255); + } + else + { + // colora=4433 + color_rgba color_a( + (pBlock->m_trans_color_data.m_red_a << 1) | (pBlock->m_trans_color_data.m_red_a >> 3), + (pBlock->m_trans_color_data.m_green_a << 1) | (pBlock->m_trans_color_data.m_green_a >> 3), + (pBlock->m_trans_color_data.m_blue_a << 2) | (pBlock->m_trans_color_data.m_blue_a >> 1), + pBlock->m_trans_color_data.m_alpha_a << 1); + + //colorb=4443 + color_rgba color_b( + (pBlock->m_trans_color_data.m_red_b << 1) | (pBlock->m_trans_color_data.m_red_b >> 3), + (pBlock->m_trans_color_data.m_green_b << 1) | (pBlock->m_trans_color_data.m_green_b >> 3), + (pBlock->m_trans_color_data.m_blue_b << 1) | (pBlock->m_trans_color_data.m_blue_b >> 3), + (pBlock->m_trans_color_data.m_alpha_b << 1) | 1); + + colors[0] = convert_rgba_5554_to_8888(color_a); + colors[3] = convert_rgba_5554_to_8888(color_b); + } + + colors[1].set((colors[0].r * 5 + colors[3].r * 3) / 8, (colors[0].g * 5 + colors[3].g * 3) / 8, (colors[0].b * 5 + colors[3].b * 3) / 8, (colors[0].a * 5 + colors[3].a * 3) / 8); + colors[2].set((colors[0].r * 3 + colors[3].r * 5) / 8, (colors[0].g * 3 + colors[3].g * 5) / 8, (colors[0].b * 3 + colors[3].b * 5) / 8, (colors[0].a * 3 + colors[3].a * 5) / 8); + + for (uint32_t i = 0; i < 16; i++) + { + const uint32_t sel = (pBlock->m_modulation[i >> 2] >> ((i & 3) * 2)) & 3; + pPixels[i] = colors[sel]; + } + + return true; + } + + struct etc2_eac_r11 + { + uint64_t m_base : 8; + uint64_t m_table : 4; + uint64_t m_mul : 4; + uint64_t m_sels_0 : 8; + uint64_t m_sels_1 : 8; + uint64_t m_sels_2 : 8; + uint64_t m_sels_3 : 8; + uint64_t m_sels_4 : 8; + uint64_t m_sels_5 : 8; + + uint64_t get_sels() const + { + return ((uint64_t)m_sels_0 << 40U) | ((uint64_t)m_sels_1 << 32U) | ((uint64_t)m_sels_2 << 24U) | ((uint64_t)m_sels_3 << 16U) | ((uint64_t)m_sels_4 << 8U) | m_sels_5; + } + + void set_sels(uint64_t v) + { + m_sels_0 = (v >> 40U) & 0xFF; + m_sels_1 = (v >> 32U) & 0xFF; + m_sels_2 = (v >> 24U) & 0xFF; + m_sels_3 = (v >> 16U) & 0xFF; + m_sels_4 = (v >> 8U) & 0xFF; + m_sels_5 = v & 0xFF; + } + }; + + struct etc2_eac_rg11 + { + etc2_eac_r11 m_c[2]; + }; + + static void unpack_etc2_eac_r(const etc2_eac_r11* p, color_rgba* pPixels, uint32_t c) + { + const uint64_t sels = p->get_sels(); + + const int base = (int)p->m_base * 8 + 4; + const int mul = p->m_mul ? ((int)p->m_mul * 8) : 1; + const int table = (int)p->m_table; + + for (uint32_t y = 0; y < 4; y++) + { + for (uint32_t x = 0; x < 4; x++) + { + const uint32_t shift = 45 - ((y + x * 4) * 3); + + const uint32_t sel = (uint32_t)((sels >> shift) & 7); + + int val = base + g_etc2_eac_tables[table][sel] * mul; + val = clamp<int>(val, 0, 2047); + + // Convert to 8-bits with rounding + pPixels[x + y * 4].m_comps[c] = static_cast<uint8_t>((val * 255 + 1024) / 2047); + + } // x + } // y + } + + void unpack_etc2_eac_rg(const void* p, color_rgba* pPixels) + { + for (uint32_t c = 0; c < 2; c++) + { + const etc2_eac_r11* pBlock = &static_cast<const etc2_eac_rg11*>(p)->m_c[c]; + + unpack_etc2_eac_r(pBlock, pPixels, c); + } + } // Unpacks to RGBA, R, RG, or A bool unpack_block(texture_format fmt, const void* pBlock, color_rgba* pPixels) { switch (fmt) { - case cBC1: + case texture_format::cBC1: { unpack_bc1(pBlock, pPixels, true); break; } - case cBC3: + case texture_format::cBC3: { return unpack_bc3(pBlock, pPixels); } - case cBC4: + case texture_format::cBC4: { // Unpack to R unpack_bc4(pBlock, &pPixels[0].r, sizeof(color_rgba)); break; } - case cBC5: + case texture_format::cBC5: { unpack_bc5(pBlock, pPixels); break; } - case cBC7: + case texture_format::cBC7: { // We only support modes 5 and 6. if (!unpack_bc7_mode5(pBlock, pPixels)) @@ -634,42 +976,62 @@ namespace basisu break; } // Full ETC2 color blocks (planar/T/H modes) is currently unsupported in basisu, but we do support ETC2 with alpha (using ETC1 for color) - case cETC2_RGB: - case cETC1: - case cETC1S: + case texture_format::cETC2_RGB: + case texture_format::cETC1: + case texture_format::cETC1S: { return unpack_etc1(*static_cast<const etc_block*>(pBlock), pPixels); } - case cETC2_RGBA: + case texture_format::cETC2_RGBA: { if (!unpack_etc1(static_cast<const etc_block*>(pBlock)[1], pPixels)) return false; unpack_etc2_eac(pBlock, pPixels); break; } - case cETC2_ALPHA: + case texture_format::cETC2_ALPHA: { // Unpack to A unpack_etc2_eac(pBlock, pPixels); break; } - case cASTC4x4: + case texture_format::cASTC4x4: { const bool astc_srgb = false; basisu_astc::astc::decompress(reinterpret_cast<uint8_t*>(pPixels), static_cast<const uint8_t*>(pBlock), astc_srgb, 4, 4); break; } - case cATC_RGB: + case texture_format::cATC_RGB: { unpack_atc(pBlock, pPixels); break; } - case cATC_RGBA_INTERPOLATED_ALPHA: + case texture_format::cATC_RGBA_INTERPOLATED_ALPHA: { unpack_atc(static_cast<const uint8_t*>(pBlock) + 8, pPixels); unpack_bc4(pBlock, &pPixels[0].a, sizeof(color_rgba)); break; } + case texture_format::cFXT1_RGB: + { + unpack_fxt1(pBlock, pPixels); + break; + } + case texture_format::cPVRTC2_4_RGBA: + { + unpack_pvrtc2(pBlock, pPixels); + break; + } + case texture_format::cETC2_R11_EAC: + { + unpack_etc2_eac_r(static_cast<const etc2_eac_r11 *>(pBlock), pPixels, 0); + break; + } + case texture_format::cETC2_RG11_EAC: + { + unpack_etc2_eac_rg(pBlock, pPixels); + break; + } default: { assert(0); @@ -680,7 +1042,7 @@ namespace basisu return true; } - bool gpu_image::unpack(image& img, bool pvrtc_wrap_addressing) const + bool gpu_image::unpack(image& img) const { img.resize(get_pixel_width(), get_pixel_height()); img.set_all(g_black_color); @@ -688,9 +1050,9 @@ namespace basisu if (!img.get_width() || !img.get_height()) return true; - if ((m_fmt == cPVRTC1_4_RGB) || (m_fmt == cPVRTC1_4_RGBA)) + if ((m_fmt == texture_format::cPVRTC1_4_RGB) || (m_fmt == texture_format::cPVRTC1_4_RGBA)) { - pvrtc4_image pi(m_width, m_height, pvrtc_wrap_addressing); + pvrtc4_image pi(m_width, m_height); if (get_total_blocks() != pi.get_total_blocks()) return false; @@ -704,6 +1066,7 @@ namespace basisu return true; } + assert((m_block_width <= cMaxBlockSize) && (m_block_height <= cMaxBlockSize)); color_rgba pixels[cMaxBlockSize * cMaxBlockSize]; for (uint32_t i = 0; i < cMaxBlockSize * cMaxBlockSize; i++) pixels[i] = g_black_color; @@ -751,7 +1114,12 @@ namespace basisu KTX_COMPRESSED_RGBA_ASTC_4x4_KHR = 0x93B0, KTX_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR = 0x93D0, KTX_ATC_RGB_AMD = 0x8C92, - KTX_ATC_RGBA_INTERPOLATED_ALPHA_AMD = 0x87EE + KTX_ATC_RGBA_INTERPOLATED_ALPHA_AMD = 0x87EE, + KTX_COMPRESSED_RGB_FXT1_3DFX = 0x86B0, + KTX_COMPRESSED_RGBA_FXT1_3DFX = 0x86B1, + KTX_COMPRESSED_RGBA_PVRTC_4BPPV2_IMG = 0x9138, + KTX_COMPRESSED_R11_EAC = 0x9270, + KTX_COMPRESSED_RG11_EAC = 0x9272 }; struct ktx_header @@ -784,7 +1152,7 @@ namespace basisu } uint32_t width = 0, height = 0, total_levels = 0; - basisu::texture_format fmt = cInvalidTextureFormat; + basisu::texture_format fmt = texture_format::cInvalidTextureFormat; if (cubemap_flag) { @@ -851,80 +1219,103 @@ namespace basisu switch (fmt) { - case cBC1: + case texture_format::cBC1: { internal_fmt = KTX_COMPRESSED_RGB_S3TC_DXT1_EXT; break; } - case cBC3: + case texture_format::cBC3: { internal_fmt = KTX_COMPRESSED_RGBA_S3TC_DXT5_EXT; base_internal_fmt = KTX_RGBA; break; } - case cBC4: + case texture_format::cBC4: { internal_fmt = KTX_COMPRESSED_RED_RGTC1_EXT;// KTX_COMPRESSED_LUMINANCE_LATC1_EXT; base_internal_fmt = KTX_RED; break; } - case cBC5: + case texture_format::cBC5: { internal_fmt = KTX_COMPRESSED_RED_GREEN_RGTC2_EXT; base_internal_fmt = KTX_RG; break; } - case cETC1: - case cETC1S: + case texture_format::cETC1: + case texture_format::cETC1S: { internal_fmt = KTX_ETC1_RGB8_OES; break; } - case cETC2_RGB: + case texture_format::cETC2_RGB: { internal_fmt = KTX_COMPRESSED_RGB8_ETC2; break; } - case cETC2_RGBA: + case texture_format::cETC2_RGBA: { internal_fmt = KTX_COMPRESSED_RGBA8_ETC2_EAC; base_internal_fmt = KTX_RGBA; break; } - case cBC7: + case texture_format::cBC7: { internal_fmt = KTX_COMPRESSED_RGBA_BPTC_UNORM; base_internal_fmt = KTX_RGBA; break; } - case cPVRTC1_4_RGB: + case texture_format::cPVRTC1_4_RGB: { internal_fmt = KTX_COMPRESSED_RGB_PVRTC_4BPPV1_IMG; break; } - case cPVRTC1_4_RGBA: + case texture_format::cPVRTC1_4_RGBA: { internal_fmt = KTX_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG; base_internal_fmt = KTX_RGBA; break; } - case cASTC4x4: + case texture_format::cASTC4x4: { internal_fmt = KTX_COMPRESSED_RGBA_ASTC_4x4_KHR; base_internal_fmt = KTX_RGBA; break; } - case cATC_RGB: + case texture_format::cATC_RGB: { internal_fmt = KTX_ATC_RGB_AMD; break; } - case cATC_RGBA_INTERPOLATED_ALPHA: + case texture_format::cATC_RGBA_INTERPOLATED_ALPHA: { internal_fmt = KTX_ATC_RGBA_INTERPOLATED_ALPHA_AMD; base_internal_fmt = KTX_RGBA; break; } + case texture_format::cETC2_R11_EAC: + { + internal_fmt = KTX_COMPRESSED_R11_EAC; + base_internal_fmt = KTX_RED; + break; + } + case texture_format::cETC2_RG11_EAC: + { + internal_fmt = KTX_COMPRESSED_RG11_EAC; + base_internal_fmt = KTX_RG; + break; + } + case texture_format::cFXT1_RGB: + { + internal_fmt = KTX_COMPRESSED_RGB_FXT1_3DFX; + break; + } + case texture_format::cPVRTC2_4_RGBA: + { + internal_fmt = KTX_COMPRESSED_RGBA_PVRTC_4BPPV2_IMG; + base_internal_fmt = KTX_RGBA; + break; + } default: { // TODO @@ -1024,5 +1415,37 @@ namespace basisu return write_compressed_texture_file(pFilename, v, false); } + const uint32_t OUT_FILE_MAGIC = 'TEXC'; + struct out_file_header + { + packed_uint<4> m_magic; + packed_uint<4> m_pad; + packed_uint<4> m_width; + packed_uint<4> m_height; + }; + + // As no modern tool supports FXT1 format .KTX files, let's write .OUT files and make sure 3DFX's original tools shipped in 1999 can decode our encoded output. + bool write_3dfx_out_file(const char* pFilename, const gpu_image& gi) + { + out_file_header hdr; + hdr.m_magic = OUT_FILE_MAGIC; + hdr.m_pad = 0; + hdr.m_width = gi.get_blocks_x() * 8; + hdr.m_height = gi.get_blocks_y() * 4; + + FILE* pFile = nullptr; +#ifdef _WIN32 + fopen_s(&pFile, pFilename, "wb"); +#else + pFile = fopen(pFilename, "wb"); +#endif + if (!pFile) + return false; + + fwrite(&hdr, sizeof(hdr), 1, pFile); + fwrite(gi.get_ptr(), gi.get_size_in_bytes(), 1, pFile); + + return fclose(pFile) != EOF; + } } // basisu diff --git a/thirdparty/basis_universal/basisu_gpu_texture.h b/thirdparty/basis_universal/basisu_gpu_texture.h index 9b18116737..8a49757ca7 100644 --- a/thirdparty/basis_universal/basisu_gpu_texture.h +++ b/thirdparty/basis_universal/basisu_gpu_texture.h @@ -37,7 +37,7 @@ namespace basisu void clear() { - m_fmt = cInvalidTextureFormat; + m_fmt = texture_format::cInvalidTextureFormat; m_width = 0; m_height = 0; m_block_width = 0; @@ -101,7 +101,7 @@ namespace basisu m_blocks.resize(m_blocks_x * m_blocks_y * m_qwords_per_block); } - bool unpack(image& img, bool pvrtc_wrap_addressing = true) const; + bool unpack(image& img) const; void override_dimensions(uint32_t w, uint32_t h) { @@ -132,6 +132,7 @@ namespace basisu bool write_compressed_texture_file(const char *pFilename, const gpu_image &g); + bool write_3dfx_out_file(const char* pFilename, const gpu_image& gi); // GPU texture block unpacking void unpack_etc2_eac(const void *pBlock_bits, color_rgba *pPixels); @@ -142,6 +143,9 @@ namespace basisu bool unpack_bc7_mode6(const void *pBlock_bits, color_rgba *pPixels); bool unpack_bc7_mode5(const void* pBlock_bits, color_rgba* pPixels); void unpack_atc(const void* pBlock_bits, color_rgba* pPixels); + bool unpack_fxt1(const void* p, color_rgba* pPixels); + bool unpack_pvrtc2(const void* p, color_rgba* pPixels); + void unpack_etc2_eac_rg(const void* p, color_rgba* pPixels); // unpack_block() is only capable of unpacking texture data created by the transcoder. // For some texture formats (like BC7, or ETC2) it's not a complete implementation. diff --git a/thirdparty/basis_universal/basisu_pvrtc1_4.cpp b/thirdparty/basis_universal/basisu_pvrtc1_4.cpp index 5a732b2ceb..f0122fcb6c 100644 --- a/thirdparty/basis_universal/basisu_pvrtc1_4.cpp +++ b/thirdparty/basis_universal/basisu_pvrtc1_4.cpp @@ -193,21 +193,12 @@ namespace basisu int block_x1 = block_x0 + 1; int block_y0 = (static_cast<int>(y) - 2) >> 2; int block_y1 = block_y0 + 1; - if (m_wrap_addressing) - { - block_x0 = posmod(block_x0, m_block_width); - block_x1 = posmod(block_x1, m_block_width); - block_y0 = posmod(block_y0, m_block_height); - block_y1 = posmod(block_y1, m_block_height); - } - else - { - block_x0 = clamp<int>(block_x0, 0, m_block_width - 1); - block_x1 = clamp<int>(block_x1, 0, m_block_width - 1); - block_y0 = clamp<int>(block_y0, 0, m_block_height - 1); - block_y1 = clamp<int>(block_y1, 0, m_block_height - 1); - } - + + block_x0 = posmod(block_x0, m_block_width); + block_x1 = posmod(block_x1, m_block_width); + block_y0 = posmod(block_y0, m_block_height); + block_y1 = posmod(block_y1, m_block_height); + pColors[0] = interpolate(x, y, m_blocks(block_x0, block_y0).get_endpoint_5554(0), m_blocks(block_x1, block_y0).get_endpoint_5554(0), m_blocks(block_x0, block_y1).get_endpoint_5554(0), m_blocks(block_x1, block_y1).get_endpoint_5554(0)); pColors[3] = interpolate(x, y, m_blocks(block_x0, block_y0).get_endpoint_5554(1), m_blocks(block_x1, block_y0).get_endpoint_5554(1), m_blocks(block_x0, block_y1).get_endpoint_5554(1), m_blocks(block_x1, block_y1).get_endpoint_5554(1)); @@ -240,21 +231,12 @@ namespace basisu int block_x1 = block_x0 + 1; int block_y0 = (static_cast<int>(y) - 2) >> 2; int block_y1 = block_y0 + 1; - if (m_wrap_addressing) - { - block_x0 = posmod(block_x0, m_block_width); - block_x1 = posmod(block_x1, m_block_width); - block_y0 = posmod(block_y0, m_block_height); - block_y1 = posmod(block_y1, m_block_height); - } - else - { - block_x0 = clamp<int>(block_x0, 0, m_block_width - 1); - block_x1 = clamp<int>(block_x1, 0, m_block_width - 1); - block_y0 = clamp<int>(block_y0, 0, m_block_height - 1); - block_y1 = clamp<int>(block_y1, 0, m_block_height - 1); - } - + + block_x0 = posmod(block_x0, m_block_width); + block_x1 = posmod(block_x1, m_block_width); + block_y0 = posmod(block_y0, m_block_height); + block_y1 = posmod(block_y1, m_block_height); + if (get_block_uses_transparent_modulation(x >> 2, y >> 2)) { if (m == 0) diff --git a/thirdparty/basis_universal/basisu_pvrtc1_4.h b/thirdparty/basis_universal/basisu_pvrtc1_4.h index 71c4fba1d8..80b4413351 100644 --- a/thirdparty/basis_universal/basisu_pvrtc1_4.h +++ b/thirdparty/basis_universal/basisu_pvrtc1_4.h @@ -168,15 +168,14 @@ namespace basisu { public: inline pvrtc4_image() : - m_width(0), m_height(0), m_block_width(0), m_block_height(0), m_wrap_addressing(false), m_uses_alpha(false) + m_width(0), m_height(0), m_block_width(0), m_block_height(0), m_uses_alpha(false) { } - inline pvrtc4_image(uint32_t width, uint32_t height, bool wrap_addressing = false) : - m_width(0), m_height(0), m_block_width(0), m_block_height(0), m_wrap_addressing(false), m_uses_alpha(false) + inline pvrtc4_image(uint32_t width, uint32_t height) : + m_width(0), m_height(0), m_block_width(0), m_block_height(0), m_uses_alpha(false) { resize(width, height); - set_wrap_addressing(wrap_addressing); } inline void clear() @@ -187,7 +186,6 @@ namespace basisu m_block_height = 0; m_blocks.clear(); m_uses_alpha = false; - m_wrap_addressing = false; } inline void resize(uint32_t width, uint32_t height) @@ -218,9 +216,6 @@ namespace basisu inline bool get_uses_alpha() const { return m_uses_alpha; } inline void set_uses_alpha(bool uses_alpha) { m_uses_alpha = uses_alpha; } - inline void set_wrap_addressing(bool wrapping) { m_wrap_addressing = wrapping; } - inline bool get_wrap_addressing() const { return m_wrap_addressing; } - inline bool are_blocks_equal(const pvrtc4_image& rhs) const { return m_blocks == rhs.m_blocks; @@ -298,24 +293,24 @@ namespace basisu dst(x, y) = get_pixel(block_x * 4 + x, block_y * 4 + y); } - inline int wrap_or_clamp_x(int x) const + inline int wrap_x(int x) const { - return m_wrap_addressing ? posmod(x, m_width) : clamp<int>(x, 0, m_width - 1); + return posmod(x, m_width); } - inline int wrap_or_clamp_y(int y) const + inline int wrap_y(int y) const { - return m_wrap_addressing ? posmod(y, m_height) : clamp<int>(y, 0, m_height - 1); + return posmod(y, m_height); } - inline int wrap_or_clamp_block_x(int bx) const + inline int wrap_block_x(int bx) const { - return m_wrap_addressing ? posmod(bx, m_block_width) : clamp<int>(bx, 0, m_block_width - 1); + return posmod(bx, m_block_width); } - inline int wrap_or_clamp_block_y(int by) const + inline int wrap_block_y(int by) const { - return m_wrap_addressing ? posmod(by, m_block_height) : clamp<int>(by, 0, m_block_height - 1); + return posmod(by, m_block_height); } inline vec2F get_interpolation_factors(uint32_t x, uint32_t y) const @@ -362,7 +357,6 @@ namespace basisu pvrtc4_block_vector2D m_blocks; uint32_t m_block_width, m_block_height; - bool m_wrap_addressing; bool m_uses_alpha; }; diff --git a/thirdparty/basis_universal/basisu_tool.cpp b/thirdparty/basis_universal/basisu_tool.cpp index 92ff6e9c6f..8172a8c5cc 100644 --- a/thirdparty/basis_universal/basisu_tool.cpp +++ b/thirdparty/basis_universal/basisu_tool.cpp @@ -27,7 +27,7 @@ using namespace basisu; -#define BASISU_TOOL_VERSION "1.09.00" +#define BASISU_TOOL_VERSION "1.10.00" enum tool_mode { @@ -35,7 +35,8 @@ enum tool_mode cCompress, cValidate, cUnpack, - cCompare + cCompare, + cVersion, }; static void print_usage() @@ -47,6 +48,7 @@ static void print_usage() " -unpack: Use transcoder to unpack .basis file to one or more .ktx/.png files\n" " -validate: Validate and display information about a .basis file\n" " -compare: Compare two PNG images specified with -file, output PSNR and SSIM statistics and RGB/A delta images\n" + " -version: Print basisu version and exit\n" "Unless an explicit mode is specified, if one or more files have the .basis extension this tool defaults to unpack mode.\n" "\n" "Important: By default, the compressor assumes the input is in the sRGB colorspace (like photos/albedo textures).\n" @@ -82,7 +84,7 @@ static void print_usage() " -normal_map: Tunes codec parameters for better quality on normal maps (linear colorspace metrics, linear mipmap filtering, no selector RDO, no sRGB)\n" " -no_alpha: Always output non-alpha basis files, even if one or more inputs has alpha\n" " -force_alpha: Always output alpha basis files, even if no inputs has alpha\n" - " -seperate_rg_to_color_alpha: Seperate input R and G channels to RGB and A (for tangent space XY normal maps)\n" + " -separate_rg_to_color_alpha: Separate input R and G channels to RGB and A (for tangent space XY normal maps)\n" " -no_multithreading: Disable multithreading\n" " -no_ktx: Disable KTX writing when unpacking (faster)\n" " -etc1_only: Only unpack to ETC1, skipping the other texture formats during -unpack\n" @@ -108,7 +110,7 @@ static void print_usage() "\n" "Hierarchical virtual selector codebook options:\n" " -global_sel_pal: Always use vitual selector palettes (instead of custom palettes), slightly smaller files, but lower quality, slower encoding\n" - " -no_auto_global_sel_pal: Don't automatically use virtual selector palettes on small images\n" + " -auto_global_sel_pal: Automatically use virtual selector palettes on small images for slightly smaller files (defaults to off for faster encoding time)\n" " -no_hybrid_sel_cb: Don't automatically use hybrid virtual selector codebooks (for higher quality, only active when -global_sel_pal is specified)\n" " -global_pal_bits X: Set virtual selector codebook palette bits, range is [0,12], default is 8, higher is slower/better quality\n" " -global_mod_bits X: Set virtual selector codebook modifier bits, range is [0,15], defualt is 8, higher is slower/better quality\n" @@ -216,6 +218,8 @@ static bool load_listing_file(const std::string &f, std::vector<std::string> &fi class command_line_params { + BASISU_NO_EQUALS_OR_COPY_CONSTRUCT(command_line_params); + public: command_line_params() : m_mode(cDefault), @@ -248,6 +252,8 @@ public: m_mode = cUnpack; else if (strcasecmp(pArg, "-validate") == 0) m_mode = cValidate; + else if (strcasecmp(pArg, "-version") == 0) + m_mode = cVersion; else if (strcasecmp(pArg, "-compare_ssim") == 0) m_compare_ssim = true; else if (strcasecmp(pArg, "-file") == 0) @@ -347,7 +353,8 @@ public: m_comp_params.m_check_for_alpha = false; else if (strcasecmp(pArg, "-force_alpha") == 0) m_comp_params.m_force_alpha = true; - else if (strcasecmp(pArg, "-seperate_rg_to_color_alpha") == 0) + else if ((strcasecmp(pArg, "-separate_rg_to_color_alpha") == 0) || + (strcasecmp(pArg, "-seperate_rg_to_color_alpha") == 0)) // was mispelled for a while - whoops! m_comp_params.m_seperate_rg_to_color_alpha = true; else if (strcasecmp(pArg, "-no_multithreading") == 0) { @@ -407,7 +414,9 @@ public: else if (strcasecmp(pArg, "-global_sel_pal") == 0) m_comp_params.m_global_sel_pal = true; else if (strcasecmp(pArg, "-no_auto_global_sel_pal") == 0) - m_comp_params.m_no_auto_global_sel_pal = true; + m_comp_params.m_auto_global_sel_pal = false; + else if (strcasecmp(pArg, "-auto_global_sel_pal") == 0) + m_comp_params.m_auto_global_sel_pal = true; else if (strcasecmp(pArg, "-global_pal_bits") == 0) { REMAINING_ARGS_CHECK(1); @@ -942,14 +951,14 @@ static bool unpack_and_validate_mode(command_line_params &opts, bool validate_fl printf("start_transcoding time: %3.3f ms\n", tm.get_elapsed_ms()); - std::vector< gpu_image_vec > gpu_images[basist::cTFTotalTextureFormats]; + std::vector< gpu_image_vec > gpu_images[(int)basist::transcoder_texture_format::cTFTotalTextureFormats]; int first_format = 0; - int last_format = basist::cTFTotalBlockTextureFormats; + int last_format = (int)basist::transcoder_texture_format::cTFTotalTextureFormats; if (opts.m_etc1_only) { - first_format = basist::cTFETC1; + first_format = (int)basist::transcoder_texture_format::cTFETC1_RGB; last_format = first_format + 1; } @@ -957,15 +966,23 @@ static bool unpack_and_validate_mode(command_line_params &opts, bool validate_fl { basist::transcoder_texture_format tex_fmt = static_cast<basist::transcoder_texture_format>(format_iter); - gpu_images[tex_fmt].resize(fileinfo.m_total_images); + if (basist::basis_transcoder_format_is_uncompressed(tex_fmt)) + continue; + + gpu_images[(int)tex_fmt].resize(fileinfo.m_total_images); for (uint32_t image_index = 0; image_index < fileinfo.m_total_images; image_index++) - gpu_images[tex_fmt][image_index].resize(fileinfo.m_image_mipmap_levels[image_index]); + gpu_images[(int)tex_fmt][image_index].resize(fileinfo.m_image_mipmap_levels[image_index]); } // Now transcode the file to all supported texture formats and save mipmapped KTX files for (int format_iter = first_format; format_iter < last_format; format_iter++) { + const basist::transcoder_texture_format transcoder_tex_fmt = static_cast<basist::transcoder_texture_format>(format_iter); + + if (basist::basis_transcoder_format_is_uncompressed(transcoder_tex_fmt)) + continue; + for (uint32_t image_index = 0; image_index < fileinfo.m_total_images; image_index++) { for (uint32_t level_index = 0; level_index < fileinfo.m_image_mipmap_levels[image_index]; level_index++) @@ -977,10 +994,8 @@ static bool unpack_and_validate_mode(command_line_params &opts, bool validate_fl error_printf("Failed retrieving image level information (%u %u)!\n", image_index, level_index); return false; } - - const basist::transcoder_texture_format transcoder_tex_fmt = static_cast<basist::transcoder_texture_format>(format_iter); - - if ((transcoder_tex_fmt == basist::cTFPVRTC1_4_RGB) || (transcoder_tex_fmt == basist::cTFPVRTC1_4_RGBA)) + + if ((transcoder_tex_fmt == basist::transcoder_texture_format::cTFPVRTC1_4_RGB) || (transcoder_tex_fmt == basist::transcoder_texture_format::cTFPVRTC1_4_RGBA)) { if (!is_pow2(level_info.m_width) || !is_pow2(level_info.m_height)) { @@ -995,52 +1010,24 @@ static bool unpack_and_validate_mode(command_line_params &opts, bool validate_fl basisu::texture_format tex_fmt = basis_get_basisu_texture_format(transcoder_tex_fmt); - gpu_image& gi = gpu_images[transcoder_tex_fmt][image_index][level_index]; + gpu_image& gi = gpu_images[(int)transcoder_tex_fmt][image_index][level_index]; gi.init(tex_fmt, level_info.m_orig_width, level_info.m_orig_height); // Fill the buffer with psuedo-random bytes, to help more visibly detect cases where the transcoder fails to write to part of the output. fill_buffer_with_random_bytes(gi.get_ptr(), gi.get_size_in_bytes()); - tm.start(); -#if 1 - if (!dec.transcode_image_level(&basis_data[0], (uint32_t)basis_data.size(), image_index, level_index, gi.get_ptr(), gi.get_total_blocks(), transcoder_tex_fmt, 0)) - { - error_printf("Failed transcoding image level (%u %u %u)!\n", image_index, level_index, format_iter); - return false; - } - - double total_transcode_time = tm.get_elapsed_ms(); -#else - // quick and dirty row pitch parameter test, to be moved into a unit test - uint8_vec temp; - uint32_t block_pitch_to_test = level_info.m_num_blocks_x; - if ((transcoder_tex_fmt != basist::cTFPVRTC1_4_RGB) || (transcoder_tex_fmt != basist::cTFPVRTC1_4_RGBA)) - block_pitch_to_test += 5; - - temp.resize(level_info.m_num_blocks_y * block_pitch_to_test * gi.get_bytes_per_block()); - fill_buffer_with_random_bytes(&temp[0], temp.size()); + uint32_t decode_flags = 0; tm.start(); - - if (!dec.transcode_image_level(&basis_data[0], (uint32_t)basis_data.size(), image_index, level_index, &temp[0], (uint32_t)(temp.size() / gi.get_bytes_per_block()), transcoder_tex_fmt, 0, block_pitch_to_test)) + + if (!dec.transcode_image_level(&basis_data[0], (uint32_t)basis_data.size(), image_index, level_index, gi.get_ptr(), gi.get_total_blocks(), transcoder_tex_fmt, decode_flags)) { error_printf("Failed transcoding image level (%u %u %u)!\n", image_index, level_index, format_iter); return false; } + double total_transcode_time = tm.get_elapsed_ms(); - if ((transcoder_tex_fmt == basist::cTFPVRTC1_4_RGB) || (transcoder_tex_fmt == basist::cTFPVRTC1_4_RGBA)) - { - assert(temp.size() == gi.get_size_in_bytes()); - memcpy(gi.get_ptr(), &temp[0], gi.get_size_in_bytes()); - } - else - { - for (uint32_t y = 0; y < level_info.m_num_blocks_y; y++) - memcpy(gi.get_block_ptr(0, y), &temp[y * block_pitch_to_test * gi.get_bytes_per_block()], gi.get_row_pitch_in_bytes()); - } -#endif - printf("Transcode of image %u level %u res %ux%u format %s succeeded in %3.3f ms\n", image_index, level_index, level_info.m_orig_width, level_info.m_orig_height, basist::basis_get_format_name(transcoder_tex_fmt), total_transcode_time); } // format_iter @@ -1057,6 +1044,9 @@ static bool unpack_and_validate_mode(command_line_params &opts, bool validate_fl { const basist::transcoder_texture_format transcoder_tex_fmt = static_cast<basist::transcoder_texture_format>(format_iter); + if (basist::basis_transcoder_format_is_uncompressed(transcoder_tex_fmt)) + continue; + if ((!opts.m_no_ktx) && (fileinfo.m_tex_type == basist::cBASISTexTypeCubemapArray)) { // No KTX tool that we know of supports cubemap arrays, so write individual cubemap files. @@ -1132,6 +1122,21 @@ static bool unpack_and_validate_mode(command_line_params &opts, bool validate_fl } printf("Wrote PNG file \"%s\"\n", rgb_filename.c_str()); + if (transcoder_tex_fmt == basist::transcoder_texture_format::cTFFXT1_RGB) + { + std::string out_filename; + if (gi.size() > 1) + out_filename = base_filename + string_format("_unpacked_rgb_%s_%u_%04u.out", basist::basis_get_format_name(transcoder_tex_fmt), level_index, image_index); + else + out_filename = base_filename + string_format("_unpacked_rgb_%s_%04u.out", basist::basis_get_format_name(transcoder_tex_fmt), image_index); + if (!write_3dfx_out_file(out_filename.c_str(), gi[level_index])) + { + error_printf("Failed writing to OUT file \"%s\"\n", out_filename.c_str()); + return false; + } + printf("Wrote .OUT file \"%s\"\n", out_filename.c_str()); + } + if (basis_transcoder_format_has_alpha(transcoder_tex_fmt)) { std::string a_filename; @@ -1160,7 +1165,7 @@ static bool unpack_and_validate_mode(command_line_params &opts, bool validate_fl { for (uint32_t level_index = 0; level_index < fileinfo.m_image_mipmap_levels[image_index]; level_index++) { - const basist::transcoder_texture_format transcoder_tex_fmt = basist::cTFRGBA32; + const basist::transcoder_texture_format transcoder_tex_fmt = basist::transcoder_texture_format::cTFRGBA32; basist::basisu_image_level_info level_info; @@ -1210,7 +1215,7 @@ static bool unpack_and_validate_mode(command_line_params &opts, bool validate_fl { for (uint32_t level_index = 0; level_index < fileinfo.m_image_mipmap_levels[image_index]; level_index++) { - const basist::transcoder_texture_format transcoder_tex_fmt = basist::cTFRGB565; + const basist::transcoder_texture_format transcoder_tex_fmt = basist::transcoder_texture_format::cTFRGB565; basist::basisu_image_level_info level_info; @@ -1258,14 +1263,6 @@ static bool unpack_and_validate_mode(command_line_params &opts, bool validate_fl } printf("Wrote PNG file \"%s\"\n", rgb_filename.c_str()); - std::string a_filename(base_filename + string_format("_unpacked_a_%s_%u_%04u.png", basist::basis_get_format_name(transcoder_tex_fmt), level_index, image_index)); - if (!save_png(a_filename, img, cImageSaveGrayscale, 3)) - { - error_printf("Failed writing to PNG file \"%s\"\n", a_filename.c_str()); - return false; - } - printf("Wrote PNG file \"%s\"\n", a_filename.c_str()); - } // level_index } // image_index @@ -1274,7 +1271,7 @@ static bool unpack_and_validate_mode(command_line_params &opts, bool validate_fl { for (uint32_t level_index = 0; level_index < fileinfo.m_image_mipmap_levels[image_index]; level_index++) { - const basist::transcoder_texture_format transcoder_tex_fmt = basist::cTFRGBA4444; + const basist::transcoder_texture_format transcoder_tex_fmt = basist::transcoder_texture_format::cTFRGBA4444; basist::basisu_image_level_info level_info; @@ -1515,6 +1512,9 @@ static int main_internal(int argc, const char **argv) case cCompare: status = compare_mode(opts); break; + case cVersion: + status = true; // We printed the version at the beginning of main_internal + break; default: assert(0); break; diff --git a/thirdparty/basis_universal/transcoder/basisu.h b/thirdparty/basis_universal/transcoder/basisu.h index 58b74df376..25600a69bf 100644 --- a/thirdparty/basis_universal/transcoder/basisu.h +++ b/thirdparty/basis_universal/transcoder/basisu.h @@ -301,7 +301,7 @@ namespace basisu // GPU texture formats - enum texture_format + enum class texture_format { cInvalidTextureFormat = -1, @@ -321,6 +321,10 @@ namespace basisu cPVRTC1_4_RGBA, cATC_RGB, cATC_RGBA_INTERPOLATED_ALPHA, + cFXT1_RGB, + cPVRTC2_4_RGBA, + cETC2_R11_EAC, + cETC2_RG11_EAC, // Uncompressed/raw pixels cRGBA32, @@ -334,17 +338,19 @@ namespace basisu { switch (fmt) { - case cETC1: - case cETC1S: - case cETC2_RGB: - case cETC2_ALPHA: - case cBC1: - case cBC4: - case cPVRTC1_4_RGB: - case cPVRTC1_4_RGBA: - case cATC_RGB: + case texture_format::cETC1: + case texture_format::cETC1S: + case texture_format::cETC2_RGB: + case texture_format::cETC2_ALPHA: + case texture_format::cBC1: + case texture_format::cBC4: + case texture_format::cPVRTC1_4_RGB: + case texture_format::cPVRTC1_4_RGBA: + case texture_format::cATC_RGB: + case texture_format::cPVRTC2_4_RGBA: + case texture_format::cETC2_R11_EAC: return 8; - case cRGBA32: + case texture_format::cRGBA32: return sizeof(uint32_t) * 16; default: break; @@ -360,6 +366,13 @@ namespace basisu inline uint32_t get_block_width(texture_format fmt) { BASISU_NOTE_UNUSED(fmt); + switch (fmt) + { + case texture_format::cFXT1_RGB: + return 8; + default: + break; + } return 4; } diff --git a/thirdparty/basis_universal/transcoder/basisu_transcoder.cpp b/thirdparty/basis_universal/transcoder/basisu_transcoder.cpp index 08a4661dfa..d15b6013d9 100644 --- a/thirdparty/basis_universal/transcoder/basisu_transcoder.cpp +++ b/thirdparty/basis_universal/transcoder/basisu_transcoder.cpp @@ -71,6 +71,11 @@ #define BASISD_SUPPORT_ATC 1 #endif +// Support for ETC2 EAC R11 and ETC2 EAC RG11 +#ifndef BASISD_SUPPORT_ETC2_EAC_RG11 +#define BASISD_SUPPORT_ETC2_EAC_RG11 1 +#endif + // If BASISD_SUPPORT_ASTC_HIGHER_OPAQUE_QUALITY is 1, opaque blocks will be transcoded to ASTC at slightly higher quality (higher than BC1), but the transcoder tables will be 2x as large. // This impacts grayscale and grayscale+alpha textures the most. #ifndef BASISD_SUPPORT_ASTC_HIGHER_OPAQUE_QUALITY @@ -83,12 +88,33 @@ #endif #endif -#define BASISD_WRITE_NEW_BC7_TABLES 0 -#define BASISD_WRITE_NEW_BC7_MODE5_TABLES 0 -#define BASISD_WRITE_NEW_DXT1_TABLES 0 -#define BASISD_WRITE_NEW_ETC2_EAC_A8_TABLES 0 -#define BASISD_WRITE_NEW_ASTC_TABLES 0 -#define BASISD_WRITE_NEW_ATC_TABLES 0 +#ifndef BASISD_SUPPORT_FXT1 +#define BASISD_SUPPORT_FXT1 1 +#endif + +#ifndef BASISD_SUPPORT_PVRTC2 +#define BASISD_SUPPORT_PVRTC2 1 +#endif + +#if BASISD_SUPPORT_PVRTC2 +#if !BASISD_SUPPORT_ATC +#error BASISD_SUPPORT_ATC must be 1 if BASISD_SUPPORT_PVRTC2 is 1 +#endif +#endif + +#if BASISD_SUPPORT_ATC +#if !BASISD_SUPPORT_DXT5A +#error BASISD_SUPPORT_DXT5A must be 1 if BASISD_SUPPORT_ATC is 1 +#endif +#endif + +#define BASISD_WRITE_NEW_BC7_TABLES 0 +#define BASISD_WRITE_NEW_BC7_MODE5_TABLES 0 +#define BASISD_WRITE_NEW_DXT1_TABLES 0 +#define BASISD_WRITE_NEW_ETC2_EAC_A8_TABLES 0 +#define BASISD_WRITE_NEW_ASTC_TABLES 0 +#define BASISD_WRITE_NEW_ATC_TABLES 0 +#define BASISD_WRITE_NEW_ETC2_EAC_R11_TABLES 0 #ifndef BASISD_ENABLE_DEBUG_FLAGS #define BASISD_ENABLE_DEBUG_FLAGS 0 @@ -120,7 +146,9 @@ namespace basisu namespace basist { +#if BASISD_SUPPORT_BC7_MODE6_OPAQUE_ONLY #include "basisu_transcoder_tables_bc7_m6.inc" +#endif #if BASISD_ENABLE_DEBUG_FLAGS static uint32_t g_debug_flags = 0; @@ -1240,20 +1268,8 @@ namespace basist } #endif -#if BASISD_SUPPORT_ETC2_EAC_A8 - enum - { - cEAC_A8_BYTES_PER_BLOCK = 8, - cEAC_A8_SELECTOR_BYTES = 6, - cEAC_A8_SELECTOR_BITS = 3, - cEAC_RGBA8_BYTES_PER_BLOCK = 16, - cEAC_RGBA8_RGB_OFFSET = 8, - cEAC_RGBA8_A_OFFSET = 0, - cEAC_A8_MIN_VALUE_SELECTOR = 3, - cEAC_A8_MAX_VALUE_SELECTOR = 7 - }; - - static const int8_t g_eac_a8_modifier_table[16][8] = +#if BASISD_SUPPORT_ETC2_EAC_A8 || BASISD_SUPPORT_ETC2_EAC_RG11 + static const int8_t g_eac_modifier_table[16][8] = { { -3, -6, -9, -15, 2, 5, 8, 14 }, { -3, -7, -10, -13, 2, 6, 9, 12 }, @@ -1274,7 +1290,8 @@ namespace basist { -3, -5, -7, -9, 2, 4, 6, 8 } }; - struct eac_a8_block + // Used by ETC2 EAC A8 and ETC2 EAC R11/RG11. + struct eac_block { uint16_t m_base : 8; @@ -1327,6 +1344,28 @@ namespace basist } }; + static const dxt_selector_range s_etc2_eac_selector_ranges[] = + { + { 0, 3 }, + + { 1, 3 }, + { 0, 2 }, + + { 1, 2 }, + }; + + const uint32_t NUM_ETC2_EAC_SELECTOR_RANGES = sizeof(s_etc2_eac_selector_ranges) / sizeof(s_etc2_eac_selector_ranges[0]); + + struct etc1_g_to_eac_conversion + { + uint8_t m_base; + uint8_t m_table_mul; // mul*16+table + uint16_t m_trans; // translates ETC1 selectors to ETC2_EAC_A8 + }; +#endif // BASISD_SUPPORT_ETC2_EAC_A8 || BASISD_SUPPORT_ETC2_EAC_RG11 + +#if BASISD_SUPPORT_ETC2_EAC_A8 + #if BASISD_WRITE_NEW_ETC2_EAC_A8_TABLES struct pack_eac_a8_results { @@ -1360,7 +1399,7 @@ namespace basist uint32_t best_s = 0; for (uint32_t s = 0; s < 8; s++) { - int v = (int)multiplier * g_eac_a8_modifier_table[table][s] + (int)base_color; + int v = (int)multiplier * g_eac_modifier_table[table][s] + (int)base_color; if (v < 0) v = 0; else if (v > 255) @@ -1398,32 +1437,13 @@ namespace basist return best_err; } -#endif - - static const dxt_selector_range s_etc2_eac_a8_selector_ranges[] = - { - { 0, 3 }, - - { 1, 3 }, - { 0, 2 }, - - { 1, 2 }, - }; - - const uint32_t NUM_ETC2_EAC_A8_SELECTOR_RANGES = sizeof(s_etc2_eac_a8_selector_ranges) / sizeof(s_etc2_eac_a8_selector_ranges[0]); - - struct etc1_g_to_etc2_a8_conversion - { - uint8_t m_base; - uint8_t m_table_mul; // mul*16+table - uint16_t m_trans; // translates ETC1 selectors to ETC2_EAC_A8 - }; - +#endif // BASISD_WRITE_NEW_ETC2_EAC_A8_TABLES + static #if !BASISD_WRITE_NEW_ETC2_EAC_A8_TABLES const #endif - etc1_g_to_etc2_a8_conversion s_etc1_g_to_etc2_a8[32 * 8][NUM_ETC2_EAC_A8_SELECTOR_RANGES] = + etc1_g_to_eac_conversion s_etc1_g_to_etc2_a8[32 * 8][NUM_ETC2_EAC_SELECTOR_RANGES] = { { { 0,1,3328 },{ 0,1,3328 },{ 0,1,256 },{ 0,1,256 } }, { { 0,226,3936 },{ 0,226,3936 },{ 0,81,488 },{ 0,81,488 } }, @@ -1682,7 +1702,7 @@ namespace basist { { 168,40,4075 },{ 80,15,4080 },{ 168,40,491 },{ 80,15,496 } }, { { 144,8,4082 },{ 88,15,4080 },{ 144,8,498 },{ 88,15,496 } } }; -#endif +#endif // BASISD_SUPPORT_ETC2_EAC_A8 #if BASISD_WRITE_NEW_ETC2_EAC_A8_TABLES static void create_etc2_eac_a8_conversion_table() @@ -1698,10 +1718,10 @@ namespace basist fprintf(pFile, "{"); - for (uint32_t sel_range = 0; sel_range < NUM_ETC2_EAC_A8_SELECTOR_RANGES; sel_range++) + for (uint32_t sel_range = 0; sel_range < NUM_ETC2_EAC_SELECTOR_RANGES; sel_range++) { - const uint32_t low_selector = s_etc2_eac_a8_selector_ranges[sel_range].m_low; - const uint32_t high_selector = s_etc2_eac_a8_selector_ranges[sel_range].m_high; + const uint32_t low_selector = s_etc2_eac_selector_ranges[sel_range].m_low; + const uint32_t high_selector = s_etc2_eac_selector_ranges[sel_range].m_high; // We have a ETC1 base color and intensity, and a used selector range from low_selector-high_selector. // Now find the best ETC2 EAC A8 base/table/multiplier that fits these colors. @@ -1714,7 +1734,7 @@ namespace basist pack_eac_a8_results pack_results; pack_eac_a8_exhaustive(pack_results, pixels, num_pixels); - etc1_g_to_etc2_a8_conversion& c = s_etc1_g_to_etc2_a8[base + inten * 32][sel_range]; + etc1_g_to_eac_conversion& c = s_etc1_g_to_etc2_a8[base + inten * 32][sel_range]; c.m_base = pack_results.m_base; c.m_table_mul = pack_results.m_table * 16 + pack_results.m_multiplier; @@ -1731,7 +1751,7 @@ namespace basist } fprintf(pFile, "{%u,%u,%u}", c.m_base, c.m_table_mul, c.m_trans); - if (sel_range < (NUM_ETC2_EAC_A8_SELECTOR_RANGES - 1)) + if (sel_range < (NUM_ETC2_EAC_SELECTOR_RANGES - 1)) fprintf(pFile, ","); } @@ -1743,6 +1763,138 @@ namespace basist } #endif +#if BASISD_WRITE_NEW_ETC2_EAC_R11_TABLES + struct pack_eac_r11_results + { + uint32_t m_base; + uint32_t m_table; + uint32_t m_multiplier; + std::vector<uint8_t> m_selectors; + std::vector<uint8_t> m_selectors_temp; + }; + + static uint64_t pack_eac_r11_exhaustive(pack_eac_r11_results& results, const uint8_t* pPixels, uint32_t num_pixels) + { + results.m_selectors.resize(num_pixels); + results.m_selectors_temp.resize(num_pixels); + + uint64_t best_err = UINT64_MAX; + + for (uint32_t base_color = 0; base_color < 256; base_color++) + { + for (uint32_t multiplier = 0; multiplier < 16; multiplier++) + { + for (uint32_t table = 0; table < 16; table++) + { + uint64_t total_err = 0; + + for (uint32_t i = 0; i < num_pixels; i++) + { + // Convert 8-bit input to 11-bits + const int a = (pPixels[i] * 2047 + 128) / 255; + + uint32_t best_s_err = UINT32_MAX; + uint32_t best_s = 0; + for (uint32_t s = 0; s < 8; s++) + { + int v = (int)(multiplier ? (multiplier * 8) : 1) * g_eac_modifier_table[table][s] + (int)base_color * 8 + 4; + if (v < 0) + v = 0; + else if (v > 2047) + v = 2047; + + uint32_t err = abs(a - v); + if (err < best_s_err) + { + best_s_err = err; + best_s = s; + } + } + + results.m_selectors_temp[i] = static_cast<uint8_t>(best_s); + + total_err += best_s_err * best_s_err; + if (total_err >= best_err) + break; + } + + if (total_err < best_err) + { + best_err = total_err; + results.m_base = base_color; + results.m_multiplier = multiplier; + results.m_table = table; + results.m_selectors.swap(results.m_selectors_temp); + } + + } // table + + } // multiplier + + } // base_color + + return best_err; + } + + static void create_etc2_eac_r11_conversion_table() + { + FILE* pFile = nullptr; + fopen_s(&pFile, "basisu_decoder_tables_etc2_eac_r11.inc", "w"); + + for (uint32_t inten = 0; inten < 8; inten++) + { + for (uint32_t base = 0; base < 32; base++) + { + color32 block_colors[4]; + decoder_etc_block::get_diff_subblock_colors(block_colors, decoder_etc_block::pack_color5(color32(base, base, base, 255), false), inten); + + fprintf(pFile, "{"); + + for (uint32_t sel_range = 0; sel_range < NUM_ETC2_EAC_SELECTOR_RANGES; sel_range++) + { + const uint32_t low_selector = s_etc2_eac_selector_ranges[sel_range].m_low; + const uint32_t high_selector = s_etc2_eac_selector_ranges[sel_range].m_high; + + // We have a ETC1 base color and intensity, and a used selector range from low_selector-high_selector. + // Now find the best ETC2 EAC R11 base/table/multiplier that fits these colors. + + uint8_t pixels[4]; + uint32_t num_pixels = 0; + for (uint32_t s = low_selector; s <= high_selector; s++) + pixels[num_pixels++] = block_colors[s].g; + + pack_eac_r11_results pack_results; + pack_eac_r11_exhaustive(pack_results, pixels, num_pixels); + + etc1_g_to_eac_conversion c; + + c.m_base = (uint8_t)pack_results.m_base; + c.m_table_mul = (uint8_t)(pack_results.m_table * 16 + pack_results.m_multiplier); + c.m_trans = 0; + + for (uint32_t s = 0; s < 4; s++) + { + if ((s < low_selector) || (s > high_selector)) + continue; + + uint32_t etc2_selector = pack_results.m_selectors[s - low_selector]; + + c.m_trans |= (etc2_selector << (s * 3)); + } + + fprintf(pFile, "{%u,%u,%u}", c.m_base, c.m_table_mul, c.m_trans); + if (sel_range < (NUM_ETC2_EAC_SELECTOR_RANGES - 1)) + fprintf(pFile, ","); + } + + fprintf(pFile, "},\n"); + } + } + + fclose(pFile); + } +#endif // BASISD_WRITE_NEW_ETC2_EAC_R11_TABLES + #if BASISD_WRITE_NEW_ASTC_TABLES static void create_etc1_to_astc_conversion_table_0_47(); static void create_etc1_to_astc_conversion_table_0_255(); @@ -1769,6 +1921,10 @@ namespace basist static void transcoder_init_atc(); #endif +#if BASISD_SUPPORT_PVRTC2 + static void transcoder_init_pvrtc2(); +#endif + // Library global initialization. Requires ~9 milliseconds when compiled and executed natively on a Core i7 2.2 GHz. // If this is too slow, these computed tables can easilky be moved to be compiled in. void basisu_transcoder_init() @@ -1814,6 +1970,11 @@ namespace basist exit(0); #endif +#if BASISD_WRITE_NEW_ETC2_EAC_R11_TABLES + create_etc2_eac_r11_conversion_table(); + exit(0); +#endif + #if BASISD_SUPPORT_DXT1 uint8_t bc1_expand5[32]; for (int i = 0; i < 32; i++) @@ -1881,7 +2042,11 @@ namespace basist #if BASISD_SUPPORT_ATC transcoder_init_atc(); -#endif +#endif + +#if BASISD_SUPPORT_PVRTC2 + transcoder_init_pvrtc2(); +#endif s_initialized = true; } @@ -2101,6 +2266,176 @@ namespace basist #endif #endif +#if BASISD_SUPPORT_FXT1 + struct fxt1_block + { + union + { + struct + { + uint64_t m_t00 : 2; + uint64_t m_t01 : 2; + uint64_t m_t02 : 2; + uint64_t m_t03 : 2; + uint64_t m_t04 : 2; + uint64_t m_t05 : 2; + uint64_t m_t06 : 2; + uint64_t m_t07 : 2; + uint64_t m_t08 : 2; + uint64_t m_t09 : 2; + uint64_t m_t10 : 2; + uint64_t m_t11 : 2; + uint64_t m_t12 : 2; + uint64_t m_t13 : 2; + uint64_t m_t14 : 2; + uint64_t m_t15 : 2; + uint64_t m_t16 : 2; + uint64_t m_t17 : 2; + uint64_t m_t18 : 2; + uint64_t m_t19 : 2; + uint64_t m_t20 : 2; + uint64_t m_t21 : 2; + uint64_t m_t22 : 2; + uint64_t m_t23 : 2; + uint64_t m_t24 : 2; + uint64_t m_t25 : 2; + uint64_t m_t26 : 2; + uint64_t m_t27 : 2; + uint64_t m_t28 : 2; + uint64_t m_t29 : 2; + uint64_t m_t30 : 2; + uint64_t m_t31 : 2; + } m_lo; + uint64_t m_lo_bits; + uint8_t m_sels[8]; + }; + union + { + struct + { +#ifdef BASISU_USE_ORIGINAL_3DFX_FXT1_ENCODING + uint64_t m_b1 : 5; + uint64_t m_g1 : 5; + uint64_t m_r1 : 5; + uint64_t m_b0 : 5; + uint64_t m_g0 : 5; + uint64_t m_r0 : 5; + uint64_t m_b3 : 5; + uint64_t m_g3 : 5; + uint64_t m_r3 : 5; + uint64_t m_b2 : 5; + uint64_t m_g2 : 5; + uint64_t m_r2 : 5; +#else + uint64_t m_b0 : 5; + uint64_t m_g0 : 5; + uint64_t m_r0 : 5; + uint64_t m_b1 : 5; + uint64_t m_g1 : 5; + uint64_t m_r1 : 5; + uint64_t m_b2 : 5; + uint64_t m_g2 : 5; + uint64_t m_r2 : 5; + uint64_t m_b3 : 5; + uint64_t m_g3 : 5; + uint64_t m_r3 : 5; +#endif + uint64_t m_alpha : 1; + uint64_t m_glsb : 2; + uint64_t m_mode : 1; + } m_hi; + uint64_t m_hi_bits; + }; + }; + + static uint8_t conv_dxt1_to_fxt1_sels(uint32_t sels) + { + static uint8_t s_conv_table[16] = { 0, 3, 1, 2, 12, 15, 13, 14, 4, 7, 5, 6, 8, 11, 9, 10 }; + return s_conv_table[sels & 15] | (s_conv_table[sels >> 4] << 4); + } + + static void convert_etc1s_to_fxt1(void *pDst, const endpoint *pEndpoints, const selector *pSelectors, uint32_t fxt1_subblock) + { + fxt1_block* pBlock = static_cast<fxt1_block*>(pDst); + + // CC_MIXED is basically DXT1 with different encoding tricks. + // So transcode ETC1S to DXT1, then transcode that to FXT1 which is easy and nearly lossless. + // (It's not completely lossless because FXT1 rounds in its color lerps while DXT1 doesn't, but it should be good enough.) + dxt1_block blk; + convert_etc1s_to_dxt1(&blk, pEndpoints, pSelectors, false); + + const uint32_t l = blk.get_low_color(); + const uint32_t h = blk.get_high_color(); + + color32 color0((l >> 11) & 31, (l >> 5) & 63, l & 31, 255); + color32 color1((h >> 11) & 31, (h >> 5) & 63, h & 31, 255); + + uint32_t g0 = color0.g & 1; + uint32_t g1 = color1.g & 1; + + color0.g >>= 1; + color1.g >>= 1; + + blk.m_selectors[0] = conv_dxt1_to_fxt1_sels(blk.m_selectors[0]); + blk.m_selectors[1] = conv_dxt1_to_fxt1_sels(blk.m_selectors[1]); + blk.m_selectors[2] = conv_dxt1_to_fxt1_sels(blk.m_selectors[2]); + blk.m_selectors[3] = conv_dxt1_to_fxt1_sels(blk.m_selectors[3]); + + if ((blk.get_selector(0, 0) >> 1) != (g0 ^ g1)) + { + std::swap(color0, color1); + std::swap(g0, g1); + + blk.m_selectors[0] ^= 0xFF; + blk.m_selectors[1] ^= 0xFF; + blk.m_selectors[2] ^= 0xFF; + blk.m_selectors[3] ^= 0xFF; + } + + if (fxt1_subblock == 0) + { + pBlock->m_hi.m_mode = 1; + pBlock->m_hi.m_alpha = 0; + pBlock->m_hi.m_glsb = g1 | (g1 << 1); + pBlock->m_hi.m_r0 = color0.r; + pBlock->m_hi.m_g0 = color0.g; + pBlock->m_hi.m_b0 = color0.b; + pBlock->m_hi.m_r1 = color1.r; + pBlock->m_hi.m_g1 = color1.g; + pBlock->m_hi.m_b1 = color1.b; + pBlock->m_hi.m_r2 = color0.r; + pBlock->m_hi.m_g2 = color0.g; + pBlock->m_hi.m_b2 = color0.b; + pBlock->m_hi.m_r3 = color1.r; + pBlock->m_hi.m_g3 = color1.g; + pBlock->m_hi.m_b3 = color1.b; + pBlock->m_sels[0] = blk.m_selectors[0]; + pBlock->m_sels[1] = blk.m_selectors[1]; + pBlock->m_sels[2] = blk.m_selectors[2]; + pBlock->m_sels[3] = blk.m_selectors[3]; + + static const uint8_t s_border_dup[4] = { 0, 85, 170, 255 }; + pBlock->m_sels[4] = s_border_dup[blk.m_selectors[0] >> 6]; + pBlock->m_sels[5] = s_border_dup[blk.m_selectors[1] >> 6]; + pBlock->m_sels[6] = s_border_dup[blk.m_selectors[2] >> 6]; + pBlock->m_sels[7] = s_border_dup[blk.m_selectors[3] >> 6]; + } + else + { + pBlock->m_hi.m_glsb = (pBlock->m_hi.m_glsb & 1) | (g1 << 1); + pBlock->m_hi.m_r2 = color0.r; + pBlock->m_hi.m_g2 = color0.g; + pBlock->m_hi.m_b2 = color0.b; + pBlock->m_hi.m_r3 = color1.r; + pBlock->m_hi.m_g3 = color1.g; + pBlock->m_hi.m_b3 = color1.b; + pBlock->m_sels[4] = blk.m_selectors[0]; + pBlock->m_sels[5] = blk.m_selectors[1]; + pBlock->m_sels[6] = blk.m_selectors[2]; + pBlock->m_sels[7] = blk.m_selectors[3]; + } + } +#endif // BASISD_SUPPORT_FXT1 #if BASISD_SUPPORT_DXT5A static dxt_selector_range s_dxt5a_selector_ranges[] = { @@ -3069,7 +3404,7 @@ namespace basist } // TODO: Support decoding a non-pow2 ETC1S texture into the next larger pow2 PVRTC texture. - static void fixup_pvrtc1_4_modulation_rgb(const decoder_etc_block* pETC_Blocks, const uint32_t* pPVRTC_endpoints, void* pDst_blocks, uint32_t num_blocks_x, uint32_t num_blocks_y, bool pvrtc_wrap_addressing) + static void fixup_pvrtc1_4_modulation_rgb(const decoder_etc_block* pETC_Blocks, const uint32_t* pPVRTC_endpoints, void* pDst_blocks, uint32_t num_blocks_x, uint32_t num_blocks_y) { const uint32_t x_mask = num_blocks_x - 1; const uint32_t y_mask = num_blocks_y - 1; @@ -3090,7 +3425,7 @@ namespace basist for (int ey = 0; ey < 3; ey++) { - int by = y + ey - 1; if (!pvrtc_wrap_addressing) by = basisu::clamp<int>(by, 0, y_mask); + int by = y + ey - 1; const uint32_t* pE = &pPVRTC_endpoints[(by & y_mask) * num_blocks_x]; @@ -3098,7 +3433,7 @@ namespace basist for (int ex = 0; ex < 3; ex++) { - int bx = 0 + ex - 1; if (!pvrtc_wrap_addressing) bx = basisu::clamp<int>(bx, 0, x_mask); + int bx = 0 + ex - 1; const uint32_t e = pE[bx & x_mask]; @@ -3144,8 +3479,6 @@ namespace basist { const uint32_t ex = 2; int bx = x + ex - 1; - if (!pvrtc_wrap_addressing) - bx = basisu::clamp<int>(bx, 0, x_mask); bx &= x_mask; #define DO_ROW(ey) \ @@ -3251,7 +3584,7 @@ namespace basist static void fixup_pvrtc1_4_modulation_rgba( const decoder_etc_block* pETC_Blocks, const uint32_t* pPVRTC_endpoints, - void* pDst_blocks, uint32_t num_blocks_x, uint32_t num_blocks_y, bool pvrtc_wrap_addressing, void *pAlpha_blocks, + void* pDst_blocks, uint32_t num_blocks_x, uint32_t num_blocks_y, void *pAlpha_blocks, const endpoint* pEndpoints, const selector* pSelectors) { const uint32_t x_mask = num_blocks_x - 1; @@ -3273,7 +3606,7 @@ namespace basist for (int ey = 0; ey < 3; ey++) { - int by = y + ey - 1; if (!pvrtc_wrap_addressing) by = basisu::clamp<int>(by, 0, y_mask); + int by = y + ey - 1; const uint32_t* pE = &pPVRTC_endpoints[(by & y_mask) * num_blocks_x]; @@ -3281,7 +3614,7 @@ namespace basist for (int ex = 0; ex < 3; ex++) { - int bx = 0 + ex - 1; if (!pvrtc_wrap_addressing) bx = basisu::clamp<int>(bx, 0, x_mask); + int bx = 0 + ex - 1; const uint32_t e = pE[bx & x_mask]; @@ -3341,8 +3674,6 @@ namespace basist { const uint32_t ex = 2; int bx = x + ex - 1; - if (!pvrtc_wrap_addressing) - bx = basisu::clamp<int>(bx, 0, x_mask); bx &= x_mask; #define DO_ROW(ey) \ @@ -4361,7 +4692,7 @@ namespace basist #endif // BASISD_SUPPORT_BC7_MODE5 #if BASISD_SUPPORT_ETC2_EAC_A8 - static void convert_etc1s_to_etc2_eac_a8(eac_a8_block* pDst_block, const endpoint* pEndpoints, const selector* pSelector) + static void convert_etc1s_to_etc2_eac_a8(eac_block* pDst_block, const endpoint* pEndpoints, const selector* pSelector) { const uint32_t low_selector = pSelector->m_lo_selector; const uint32_t high_selector = pSelector->m_hi_selector; @@ -4388,13 +4719,13 @@ namespace basist } uint32_t selector_range_table = 0; - for (selector_range_table = 0; selector_range_table < NUM_ETC2_EAC_A8_SELECTOR_RANGES; selector_range_table++) - if ((low_selector == s_etc2_eac_a8_selector_ranges[selector_range_table].m_low) && (high_selector == s_etc2_eac_a8_selector_ranges[selector_range_table].m_high)) + for (selector_range_table = 0; selector_range_table < NUM_ETC2_EAC_SELECTOR_RANGES; selector_range_table++) + if ((low_selector == s_etc2_eac_selector_ranges[selector_range_table].m_low) && (high_selector == s_etc2_eac_selector_ranges[selector_range_table].m_high)) break; - if (selector_range_table >= NUM_ETC2_EAC_A8_SELECTOR_RANGES) + if (selector_range_table >= NUM_ETC2_EAC_SELECTOR_RANGES) selector_range_table = 0; - const etc1_g_to_etc2_a8_conversion* pTable_entry = &s_etc1_g_to_etc2_a8[base_color.r + inten_table * 32][selector_range_table]; + const etc1_g_to_eac_conversion* pTable_entry = &s_etc1_g_to_etc2_a8[base_color.r + inten_table * 32][selector_range_table]; pDst_block->m_base = pTable_entry->m_base; pDst_block->m_table = pTable_entry->m_table_mul >> 4; @@ -4419,6 +4750,325 @@ namespace basist } #endif // BASISD_SUPPORT_ETC2_EAC_A8 +#if BASISD_SUPPORT_ETC2_EAC_RG11 + static const etc1_g_to_eac_conversion s_etc1_g_to_etc2_r11[32 * 8][NUM_ETC2_EAC_SELECTOR_RANGES] = + { + {{0,1,3328},{0,1,3328},{0,16,457},{0,16,456}}, + {{0,226,3936},{0,226,3936},{0,17,424},{8,0,472}}, + {{6,178,4012},{6,178,4008},{0,146,501},{16,0,472}}, + {{14,178,4012},{14,178,4008},{8,146,501},{24,0,472}}, + {{23,178,4012},{23,178,4008},{17,146,501},{33,0,472}}, + {{31,178,4012},{31,178,4008},{25,146,501},{41,0,472}}, + {{39,178,4012},{39,178,4008},{33,146,501},{49,0,472}}, + {{47,178,4012},{47,178,4008},{41,146,501},{27,228,496}}, + {{56,178,4012},{56,178,4008},{50,146,501},{36,228,496}}, + {{64,178,4012},{64,178,4008},{58,146,501},{44,228,496}}, + {{72,178,4012},{72,178,4008},{66,146,501},{52,228,496}}, + {{80,178,4012},{80,178,4008},{74,146,501},{60,228,496}}, + {{89,178,4012},{89,178,4008},{83,146,501},{69,228,496}}, + {{97,178,4012},{97,178,4008},{91,146,501},{77,228,496}}, + {{105,178,4012},{105,178,4008},{99,146,501},{85,228,496}}, + {{113,178,4012},{113,178,4008},{107,146,501},{93,228,496}}, + {{122,178,4012},{122,178,4008},{116,146,501},{102,228,496}}, + {{130,178,4012},{130,178,4008},{124,146,501},{110,228,496}}, + {{138,178,4012},{138,178,4008},{132,146,501},{118,228,496}}, + {{146,178,4012},{146,178,4008},{140,146,501},{126,228,496}}, + {{155,178,4012},{155,178,4008},{149,146,501},{135,228,496}}, + {{163,178,4012},{163,178,4008},{157,146,501},{143,228,496}}, + {{171,178,4012},{171,178,4008},{165,146,501},{151,228,496}}, + {{179,178,4012},{179,178,4008},{173,146,501},{159,228,496}}, + {{188,178,4012},{188,178,4008},{182,146,501},{168,228,496}}, + {{196,178,4012},{196,178,4008},{190,146,501},{176,228,496}}, + {{204,178,4012},{204,178,4008},{198,146,501},{184,228,496}}, + {{212,178,4012},{212,178,4008},{206,146,501},{192,228,496}}, + {{221,178,4012},{221,178,4008},{215,146,501},{201,228,496}}, + {{229,178,4012},{229,178,4008},{223,146,501},{209,228,496}}, + {{235,66,4012},{221,100,4008},{231,146,501},{217,228,496}}, + {{211,102,4085},{254,32,4040},{211,102,501},{254,32,456}}, + {{0,2,3328},{0,2,3328},{0,1,320},{0,1,320}}, + {{7,162,3905},{7,162,3904},{0,17,480},{0,17,480}}, + {{15,162,3906},{15,162,3904},{1,117,352},{1,117,352}}, + {{23,162,3906},{23,162,3904},{5,34,500},{4,53,424}}, + {{32,162,3906},{32,162,3904},{14,34,500},{3,69,424}}, + {{40,162,3906},{40,162,3904},{22,34,500},{1,133,496}}, + {{48,162,3906},{48,162,3904},{30,34,500},{4,85,496}}, + {{56,162,3906},{56,162,3904},{38,34,500},{12,85,496}}, + {{65,162,3906},{65,162,3904},{47,34,500},{1,106,424}}, + {{73,162,3906},{73,162,3904},{55,34,500},{9,106,424}}, + {{81,162,3906},{81,162,3904},{63,34,500},{7,234,496}}, + {{89,162,3906},{89,162,3904},{71,34,500},{15,234,496}}, + {{98,162,3906},{98,162,3904},{80,34,500},{24,234,496}}, + {{106,162,3906},{106,162,3904},{88,34,500},{32,234,496}}, + {{114,162,3906},{114,162,3904},{96,34,500},{40,234,496}}, + {{122,162,3906},{122,162,3904},{104,34,500},{48,234,496}}, + {{131,162,3906},{131,162,3904},{113,34,500},{57,234,496}}, + {{139,162,3906},{139,162,3904},{121,34,500},{65,234,496}}, + {{147,162,3906},{147,162,3904},{129,34,500},{73,234,496}}, + {{155,162,3906},{155,162,3904},{137,34,500},{81,234,496}}, + {{164,162,3906},{164,162,3904},{146,34,500},{90,234,496}}, + {{172,162,3906},{172,162,3904},{154,34,500},{98,234,496}}, + {{180,162,3906},{180,162,3904},{162,34,500},{106,234,496}}, + {{188,162,3906},{188,162,3904},{170,34,500},{114,234,496}}, + {{197,162,3906},{197,162,3904},{179,34,500},{123,234,496}}, + {{205,162,3906},{205,162,3904},{187,34,500},{131,234,496}}, + {{213,162,3906},{213,162,3904},{195,34,500},{139,234,496}}, + {{221,162,3906},{221,162,3904},{203,34,500},{147,234,496}}, + {{230,162,3906},{230,162,3904},{212,34,500},{156,234,496}}, + {{238,162,3906},{174,106,4008},{220,34,500},{164,234,496}}, + {{240,178,4001},{182,106,4008},{228,34,500},{172,234,496}}, + {{166,108,4085},{115,31,4080},{166,108,501},{115,31,496}}, + {{1,68,3328},{1,68,3328},{0,1,384},{0,1,384}}, + {{1,51,3968},{1,51,3968},{0,2,384},{0,2,384}}, + {{21,18,3851},{21,18,3848},{1,50,488},{1,50,488}}, + {{26,195,3851},{29,18,3848},{0,67,488},{0,67,488}}, + {{35,195,3851},{38,18,3848},{12,115,488},{0,3,496}}, + {{43,195,3851},{46,18,3848},{20,115,488},{2,6,424}}, + {{51,195,3851},{54,18,3848},{36,66,482},{4,22,424}}, + {{59,195,3851},{62,18,3848},{44,66,482},{3,73,424}}, + {{68,195,3851},{71,18,3848},{53,66,482},{3,22,496}}, + {{76,195,3851},{79,18,3848},{61,66,482},{2,137,496}}, + {{84,195,3851},{87,18,3848},{69,66,482},{1,89,496}}, + {{92,195,3851},{95,18,3848},{77,66,482},{9,89,496}}, + {{101,195,3851},{104,18,3848},{86,66,482},{18,89,496}}, + {{109,195,3851},{112,18,3848},{94,66,482},{26,89,496}}, + {{117,195,3851},{120,18,3848},{102,66,482},{34,89,496}}, + {{125,195,3851},{128,18,3848},{110,66,482},{42,89,496}}, + {{134,195,3851},{137,18,3848},{119,66,482},{51,89,496}}, + {{141,195,3907},{145,18,3848},{127,66,482},{59,89,496}}, + {{149,195,3907},{153,18,3848},{135,66,482},{67,89,496}}, + {{157,195,3907},{161,18,3848},{143,66,482},{75,89,496}}, + {{166,195,3907},{170,18,3848},{152,66,482},{84,89,496}}, + {{174,195,3907},{178,18,3848},{160,66,482},{92,89,496}}, + {{182,195,3907},{186,18,3848},{168,66,482},{100,89,496}}, + {{190,195,3907},{194,18,3848},{176,66,482},{108,89,496}}, + {{199,195,3907},{203,18,3848},{185,66,482},{117,89,496}}, + {{207,195,3907},{211,18,3848},{193,66,482},{125,89,496}}, + {{215,195,3907},{219,18,3848},{201,66,482},{133,89,496}}, + {{223,195,3907},{227,18,3848},{209,66,482},{141,89,496}}, + {{232,195,3907},{168,89,4008},{218,66,482},{150,89,496}}, + {{236,18,3907},{176,89,4008},{226,66,482},{158,89,496}}, + {{158,90,4085},{103,31,4080},{158,90,501},{103,31,496}}, + {{166,90,4085},{111,31,4080},{166,90,501},{111,31,496}}, + {{0,70,3328},{0,70,3328},{0,17,448},{0,17,448}}, + {{0,117,3904},{0,117,3904},{0,35,384},{0,35,384}}, + {{13,165,3905},{13,165,3904},{2,211,480},{2,211,480}}, + {{21,165,3906},{21,165,3904},{1,51,488},{1,51,488}}, + {{30,165,3906},{30,165,3904},{7,61,352},{7,61,352}}, + {{38,165,3906},{38,165,3904},{2,125,352},{2,125,352}}, + {{46,165,3906},{46,165,3904},{1,37,500},{10,125,352}}, + {{54,165,3906},{54,165,3904},{9,37,500},{5,61,424}}, + {{63,165,3906},{63,165,3904},{18,37,500},{1,189,424}}, + {{71,165,3906},{71,165,3904},{26,37,500},{9,189,424}}, + {{79,165,3906},{79,165,3904},{34,37,500},{4,77,424}}, + {{87,165,3906},{87,165,3904},{42,37,500},{12,77,424}}, + {{96,165,3906},{96,165,3904},{51,37,500},{8,93,424}}, + {{104,165,3906},{104,165,3904},{59,37,500},{3,141,496}}, + {{112,165,3906},{112,165,3904},{68,37,500},{11,141,496}}, + {{120,165,3906},{120,165,3904},{76,37,500},{6,93,496}}, + {{129,165,3906},{129,165,3904},{85,37,500},{15,93,496}}, + {{70,254,4012},{137,165,3904},{93,37,500},{23,93,496}}, + {{145,165,3906},{145,165,3904},{101,37,500},{31,93,496}}, + {{86,254,4012},{153,165,3904},{109,37,500},{39,93,496}}, + {{163,165,3906},{162,165,3904},{118,37,500},{48,93,496}}, + {{171,165,3906},{170,165,3904},{126,37,500},{56,93,496}}, + {{179,165,3906},{178,165,3904},{134,37,500},{64,93,496}}, + {{187,165,3906},{187,165,3904},{142,37,500},{72,93,496}}, + {{196,165,3906},{196,165,3904},{151,37,500},{81,93,496}}, + {{204,165,3906},{204,165,3904},{159,37,500},{89,93,496}}, + {{212,165,3906},{136,77,4008},{167,37,500},{97,93,496}}, + {{220,165,3906},{131,93,4008},{175,37,500},{105,93,496}}, + {{214,181,4001},{140,93,4008},{184,37,500},{114,93,496}}, + {{222,181,4001},{148,93,4008},{192,37,500},{122,93,496}}, + {{115,95,4085},{99,31,4080},{115,95,501},{99,31,496}}, + {{123,95,4085},{107,31,4080},{123,95,501},{107,31,496}}, + {{0,102,3840},{0,102,3840},{0,18,384},{0,18,384}}, + {{5,167,3904},{5,167,3904},{0,13,256},{0,13,256}}, + {{4,54,3968},{4,54,3968},{1,67,448},{1,67,448}}, + {{30,198,3850},{30,198,3848},{0,3,480},{0,3,480}}, + {{39,198,3850},{39,198,3848},{3,52,488},{3,52,488}}, + {{47,198,3851},{47,198,3848},{3,4,488},{3,4,488}}, + {{55,198,3851},{55,198,3848},{1,70,488},{1,70,488}}, + {{53,167,3906},{63,198,3848},{3,22,488},{3,22,488}}, + {{62,167,3906},{72,198,3848},{24,118,488},{0,6,496}}, + {{70,167,3906},{80,198,3848},{32,118,488},{2,89,488}}, + {{78,167,3906},{88,198,3848},{40,118,488},{1,73,496}}, + {{86,167,3906},{96,198,3848},{48,118,488},{0,28,424}}, + {{95,167,3906},{105,198,3848},{57,118,488},{9,28,424}}, + {{103,167,3906},{113,198,3848},{65,118,488},{5,108,496}}, + {{111,167,3906},{121,198,3848},{73,118,488},{13,108,496}}, + {{119,167,3906},{129,198,3848},{81,118,488},{21,108,496}}, + {{128,167,3906},{138,198,3848},{90,118,488},{6,28,496}}, + {{136,167,3906},{146,198,3848},{98,118,488},{14,28,496}}, + {{145,167,3906},{154,198,3848},{106,118,488},{22,28,496}}, + {{153,167,3906},{162,198,3848},{114,118,488},{30,28,496}}, + {{162,167,3906},{171,198,3848},{123,118,488},{39,28,496}}, + {{170,167,3906},{179,198,3848},{131,118,488},{47,28,496}}, + {{178,167,3906},{187,198,3848},{139,118,488},{55,28,496}}, + {{186,167,3906},{195,198,3848},{147,118,488},{63,28,496}}, + {{194,167,3906},{120,12,4008},{156,118,488},{72,28,496}}, + {{206,198,3907},{116,28,4008},{164,118,488},{80,28,496}}, + {{214,198,3907},{124,28,4008},{172,118,488},{88,28,496}}, + {{222,198,3395},{132,28,4008},{180,118,488},{96,28,496}}, + {{207,134,4001},{141,28,4008},{189,118,488},{105,28,496}}, + {{95,30,4085},{86,31,4080},{95,30,501},{86,31,496}}, + {{103,30,4085},{94,31,4080},{103,30,501},{94,31,496}}, + {{111,30,4085},{102,31,4080},{111,30,501},{102,31,496}}, + {{0,104,3840},{0,104,3840},{0,18,448},{0,18,448}}, + {{4,39,3904},{4,39,3904},{0,4,384},{0,4,384}}, + {{0,56,3968},{0,56,3968},{0,84,448},{0,84,448}}, + {{6,110,3328},{6,110,3328},{0,20,448},{0,20,448}}, + {{41,200,3850},{41,200,3848},{1,4,480},{1,4,480}}, + {{49,200,3850},{49,200,3848},{1,8,416},{1,8,416}}, + {{57,200,3851},{57,200,3848},{1,38,488},{1,38,488}}, + {{65,200,3851},{65,200,3848},{1,120,488},{1,120,488}}, + {{74,200,3851},{74,200,3848},{2,72,488},{2,72,488}}, + {{68,6,3907},{82,200,3848},{2,24,488},{2,24,488}}, + {{77,6,3907},{90,200,3848},{26,120,488},{10,24,488}}, + {{97,63,3330},{98,200,3848},{34,120,488},{2,8,496}}, + {{106,63,3330},{107,200,3848},{43,120,488},{3,92,488}}, + {{114,63,3330},{115,200,3848},{51,120,488},{11,92,488}}, + {{122,63,3330},{123,200,3848},{59,120,488},{7,76,496}}, + {{130,63,3330},{131,200,3848},{67,120,488},{15,76,496}}, + {{139,63,3330},{140,200,3848},{76,120,488},{24,76,496}}, + {{147,63,3330},{148,200,3848},{84,120,488},{32,76,496}}, + {{155,63,3330},{156,200,3848},{92,120,488},{40,76,496}}, + {{164,63,3330},{164,200,3848},{100,120,488},{48,76,496}}, + {{173,63,3330},{173,200,3848},{109,120,488},{57,76,496}}, + {{184,6,3851},{181,200,3848},{117,120,488},{65,76,496}}, + {{192,6,3851},{133,28,3936},{125,120,488},{73,76,496}}, + {{189,200,3907},{141,28,3936},{133,120,488},{81,76,496}}, + {{198,200,3907},{138,108,4000},{142,120,488},{90,76,496}}, + {{206,200,3907},{146,108,4000},{150,120,488},{98,76,496}}, + {{214,200,3395},{154,108,4000},{158,120,488},{106,76,496}}, + {{190,136,4001},{162,108,4000},{166,120,488},{114,76,496}}, + {{123,30,4076},{87,15,4080},{123,30,492},{87,15,496}}, + {{117,110,4084},{80,31,4080},{117,110,500},{80,31,496}}, + {{125,110,4084},{88,31,4080},{125,110,500},{88,31,496}}, + {{133,110,4084},{96,31,4080},{133,110,500},{96,31,496}}, + {{9,56,3904},{9,56,3904},{0,67,448},{0,67,448}}, + {{1,8,3904},{1,8,3904},{1,84,448},{1,84,448}}, + {{1,124,3904},{1,124,3904},{0,39,384},{0,39,384}}, + {{9,124,3904},{9,124,3904},{1,4,448},{1,4,448}}, + {{6,76,3904},{6,76,3904},{0,70,448},{0,70,448}}, + {{62,6,3859},{62,6,3856},{2,38,480},{2,38,480}}, + {{70,6,3859},{70,6,3856},{5,43,416},{5,43,416}}, + {{78,6,3859},{78,6,3856},{2,11,416},{2,11,416}}, + {{87,6,3859},{87,6,3856},{0,171,488},{0,171,488}}, + {{67,8,3906},{95,6,3856},{8,171,488},{8,171,488}}, + {{75,8,3907},{103,6,3856},{5,123,488},{5,123,488}}, + {{83,8,3907},{111,6,3856},{2,75,488},{2,75,488}}, + {{92,8,3907},{120,6,3856},{0,27,488},{0,27,488}}, + {{100,8,3907},{128,6,3856},{8,27,488},{8,27,488}}, + {{120,106,3843},{136,6,3856},{99,6,387},{16,27,488}}, + {{128,106,3843},{144,6,3856},{107,6,387},{2,11,496}}, + {{137,106,3843},{153,6,3856},{117,6,387},{11,11,496}}, + {{145,106,3843},{161,6,3856},{125,6,387},{19,11,496}}, + {{163,8,3851},{137,43,3904},{133,6,387},{27,11,496}}, + {{171,8,3851},{145,43,3904},{141,6,387},{35,11,496}}, + {{180,8,3851},{110,11,4000},{150,6,387},{44,11,496}}, + {{188,8,3851},{118,11,4000},{158,6,387},{52,11,496}}, + {{172,72,3907},{126,11,4000},{166,6,387},{60,11,496}}, + {{174,6,3971},{134,11,4000},{174,6,387},{68,11,496}}, + {{183,6,3971},{143,11,4000},{183,6,387},{77,11,496}}, + {{191,6,3971},{151,11,4000},{191,6,387},{85,11,496}}, + {{199,6,3971},{159,11,4000},{199,6,387},{93,11,496}}, + {{92,12,4084},{69,15,4080},{92,12,500},{69,15,496}}, + {{101,12,4084},{78,15,4080},{101,12,500},{78,15,496}}, + {{110,12,4084},{86,15,4080},{110,12,500},{86,15,496}}, + {{118,12,4084},{79,31,4080},{118,12,500},{79,31,496}}, + {{126,12,4084},{87,31,4080},{126,12,500},{87,31,496}}, + {{71,8,3602},{71,8,3600},{2,21,384},{2,21,384}}, + {{79,8,3611},{79,8,3608},{0,69,448},{0,69,448}}, + {{87,8,3611},{87,8,3608},{0,23,384},{0,23,384}}, + {{95,8,3611},{95,8,3608},{1,5,448},{1,5,448}}, + {{104,8,3611},{104,8,3608},{0,88,448},{0,88,448}}, + {{112,8,3611},{112,8,3608},{0,72,448},{0,72,448}}, + {{120,8,3611},{121,8,3608},{36,21,458},{36,21,456}}, + {{133,47,3091},{129,8,3608},{44,21,458},{44,21,456}}, + {{142,47,3091},{138,8,3608},{53,21,459},{53,21,456}}, + {{98,12,3850},{98,12,3848},{61,21,459},{61,21,456}}, + {{106,12,3850},{106,12,3848},{10,92,480},{69,21,456}}, + {{114,12,3851},{114,12,3848},{18,92,480},{77,21,456}}, + {{123,12,3851},{123,12,3848},{3,44,488},{86,21,456}}, + {{95,12,3906},{95,12,3904},{11,44,488},{94,21,456}}, + {{103,12,3906},{103,12,3904},{19,44,488},{102,21,456}}, + {{111,12,3907},{111,12,3904},{27,44,489},{110,21,456}}, + {{120,12,3907},{120,12,3904},{36,44,489},{119,21,456}}, + {{128,12,3907},{128,12,3904},{44,44,489},{127,21,456}}, + {{136,12,3907},{136,12,3904},{52,44,489},{135,21,456}}, + {{144,12,3907},{144,12,3904},{60,44,490},{144,21,456}}, + {{153,12,3907},{153,12,3904},{69,44,490},{153,21,456}}, + {{161,12,3395},{149,188,3968},{77,44,490},{161,21,456}}, + {{169,12,3395},{199,21,3928},{85,44,490},{169,21,456}}, + {{113,95,4001},{202,69,3992},{125,8,483},{177,21,456}}, + {{122,95,4001},{201,21,3984},{134,8,483},{186,21,456}}, + {{143,8,4067},{209,21,3984},{142,8,483},{194,21,456}}, + {{151,8,4067},{47,15,4080},{151,8,483},{47,15,496}}, + {{159,8,4067},{55,15,4080},{159,8,483},{55,15,496}}, + {{168,8,4067},{64,15,4080},{168,8,483},{64,15,496}}, + {{160,40,4075},{72,15,4080},{160,40,491},{72,15,496}}, + {{168,40,4075},{80,15,4080},{168,40,491},{80,15,496}}, + {{144,8,4082},{88,15,4080},{144,8,498},{88,15,496}}, + }; + + static void convert_etc1s_to_etc2_eac_r11(eac_block* pDst_block, const endpoint* pEndpoints, const selector* pSelector) + { + const uint32_t low_selector = pSelector->m_lo_selector; + const uint32_t high_selector = pSelector->m_hi_selector; + + const color32& base_color = pEndpoints->m_color5; + const uint32_t inten_table = pEndpoints->m_inten5; + + if (low_selector == high_selector) + { + uint32_t r; + decoder_etc_block::get_block_color5_r(base_color, inten_table, low_selector, r); + + // Constant alpha block + // Select table 13, use selector 4 (0), set multiplier to 1 and base color r + pDst_block->m_base = r; + pDst_block->m_table = 13; + pDst_block->m_multiplier = 1; + + // selectors are all 4's + static const uint8_t s_etc2_eac_r11_sel4[6] = { 0x92, 0x49, 0x24, 0x92, 0x49, 0x24 }; + memcpy(pDst_block->m_selectors, s_etc2_eac_r11_sel4, sizeof(s_etc2_eac_r11_sel4)); + + return; + } + + uint32_t selector_range_table = 0; + for (selector_range_table = 0; selector_range_table < NUM_ETC2_EAC_SELECTOR_RANGES; selector_range_table++) + if ((low_selector == s_etc2_eac_selector_ranges[selector_range_table].m_low) && (high_selector == s_etc2_eac_selector_ranges[selector_range_table].m_high)) + break; + if (selector_range_table >= NUM_ETC2_EAC_SELECTOR_RANGES) + selector_range_table = 0; + + const etc1_g_to_eac_conversion* pTable_entry = &s_etc1_g_to_etc2_r11[base_color.r + inten_table * 32][selector_range_table]; + + pDst_block->m_base = pTable_entry->m_base; + pDst_block->m_table = pTable_entry->m_table_mul >> 4; + pDst_block->m_multiplier = pTable_entry->m_table_mul & 15; + + uint64_t selector_bits = 0; + + for (uint32_t y = 0; y < 4; y++) + { + for (uint32_t x = 0; x < 4; x++) + { + uint32_t s = pSelector->get_selector(x, y); + + uint32_t ds = (pTable_entry->m_trans >> (s * 3)) & 7; + + const uint32_t dst_ofs = 45 - (y + x * 4) * 3; + selector_bits |= (static_cast<uint64_t>(ds) << dst_ofs); + } + } + + pDst_block->set_selector_bits(selector_bits); + } +#endif // BASISD_SUPPORT_ETC2_EAC_RG11 + // ASTC struct etc1_to_astc_solution { @@ -5563,6 +6213,7 @@ namespace basist #endif #if BASISD_SUPPORT_ATC + // ATC and PVRTC2 both use these tables. struct etc1s_to_atc_solution { uint8_t m_lo; @@ -5600,6 +6251,16 @@ namespace basist }; const uint32_t ATC_IDENTITY_SELECTOR_MAPPING_INDEX = 6; +#if BASISD_SUPPORT_PVRTC2 + static const etc1s_to_atc_solution g_etc1s_to_pvrtc2_45[32 * 8 * NUM_ETC1S_TO_ATC_SELECTOR_MAPPINGS * NUM_ETC1S_TO_ATC_SELECTOR_RANGES] = { +#include "basisu_transcoder_tables_pvrtc2_45.inc" + }; + + static const etc1s_to_atc_solution g_etc1s_to_pvrtc2_alpha_33[32 * 8 * NUM_ETC1S_TO_ATC_SELECTOR_MAPPINGS * NUM_ETC1S_TO_ATC_SELECTOR_RANGES] = { +#include "basisu_transcoder_tables_pvrtc2_alpha_33.inc" + }; +#endif + static const etc1s_to_atc_solution g_etc1s_to_atc_55[32 * 8 * NUM_ETC1S_TO_ATC_SELECTOR_MAPPINGS * NUM_ETC1S_TO_ATC_SELECTOR_RANGES] = { #include "basisu_transcoder_tables_atc_55.inc" }; @@ -5613,8 +6274,8 @@ namespace basist uint8_t m_lo; uint8_t m_hi; }; - static atc_match_entry g_atc_match55_equals_1[256], g_atc_match56_equals_1[256]; // selector 1 - static atc_match_entry g_atc_match5[256], g_atc_match6[256]; + static atc_match_entry g_pvrtc2_match45_equals_1[256], g_atc_match55_equals_1[256], g_atc_match56_equals_1[256]; // selector 1 + static atc_match_entry g_pvrtc2_match4[256], g_atc_match5[256], g_atc_match6[256]; static void prepare_atc_single_color_table(atc_match_entry* pTable, int size0, int size1, int sel) { @@ -5624,7 +6285,12 @@ namespace basist for (int lo = 0; lo < size0; lo++) { int lo_e = lo; - if (size0 == 32) + if (size0 == 16) + { + lo_e = (lo_e << 1) | (lo_e >> 3); + lo_e = (lo_e << 3) | (lo_e >> 2); + } + else if (size0 == 32) lo_e = (lo_e << 3) | (lo_e >> 2); else lo_e = (lo_e << 2) | (lo_e >> 4); @@ -5632,7 +6298,13 @@ namespace basist for (int hi = 0; hi < size1; hi++) { int hi_e = hi; - if (size1 == 32) + if (size1 == 16) + { + // This is only for PVRTC2 - expand to 5 then 8 + hi_e = (hi_e << 1) | (hi_e >> 3); + hi_e = (hi_e << 3) | (hi_e >> 2); + } + else if (size1 == 32) hi_e = (hi_e << 3) | (hi_e >> 2); else hi_e = (hi_e << 2) | (hi_e >> 4); @@ -5667,9 +6339,11 @@ namespace basist static void transcoder_init_atc() { - prepare_atc_single_color_table(g_atc_match55_equals_1, 32, 32, 1); - prepare_atc_single_color_table(g_atc_match56_equals_1, 32, 64, 1); + prepare_atc_single_color_table(g_pvrtc2_match45_equals_1, 16, 32, 1); + prepare_atc_single_color_table(g_atc_match55_equals_1, 32, 32, 1); + prepare_atc_single_color_table(g_atc_match56_equals_1, 32, 64, 1); + prepare_atc_single_color_table(g_pvrtc2_match4, 1, 16, 3); prepare_atc_single_color_table(g_atc_match5, 1, 32, 3); prepare_atc_single_color_table(g_atc_match6, 1, 64, 3); @@ -5813,6 +6487,7 @@ namespace basist #if BASISD_WRITE_NEW_ATC_TABLES static void create_etc1s_to_atc_conversion_tables() { + // ATC 55 FILE* pFile = nullptr; fopen_s(&pFile, "basisu_transcoder_tables_atc_55.inc", "w"); @@ -5887,6 +6562,7 @@ namespace basist fclose(pFile); pFile = nullptr; + // ATC 56 fopen_s(&pFile, "basisu_transcoder_tables_atc_56.inc", "w"); n = 0; @@ -5958,11 +6634,1140 @@ namespace basist } // inten fclose(pFile); + + // PVRTC2 45 + fopen_s(&pFile, "basisu_transcoder_tables_pvrtc2_45.inc", "w"); + + n = 0; + + for (int inten = 0; inten < 8; inten++) + { + for (uint32_t g = 0; g < 32; g++) + { + color32 block_colors[4]; + decoder_etc_block::get_diff_subblock_colors(block_colors, decoder_etc_block::pack_color5(color32(g, g, g, 255), false), inten); + + for (uint32_t sr = 0; sr < NUM_ETC1S_TO_ATC_SELECTOR_RANGES; sr++) + { + const uint32_t low_selector = g_etc1s_to_atc_selector_ranges[sr].m_low; + const uint32_t high_selector = g_etc1s_to_atc_selector_ranges[sr].m_high; + + for (uint32_t m = 0; m < NUM_ETC1S_TO_ATC_SELECTOR_MAPPINGS; m++) + { + uint32_t best_lo = 0; + uint32_t best_hi = 0; + uint64_t best_err = UINT64_MAX; + + for (uint32_t hi = 0; hi <= 31; hi++) + { + for (uint32_t lo = 0; lo <= 15; lo++) + { + uint32_t colors[4]; + + colors[0] = (lo << 1) | (lo >> 3); + colors[0] = (colors[0] << 3) | (colors[0] >> 2); + + colors[3] = (hi << 3) | (hi >> 2); + + colors[1] = (colors[0] * 5 + colors[3] * 3) / 8; + colors[2] = (colors[3] * 5 + colors[0] * 3) / 8; + + uint64_t total_err = 0; + + for (uint32_t s = low_selector; s <= high_selector; s++) + { + int err = block_colors[s].g - colors[g_etc1s_to_atc_selector_mappings[m][s]]; + + int err_scale = 1; + // Special case when the intensity table is 7, low_selector is 0, and high_selector is 3. In this extreme case, it's likely the encoder is trying to strongly favor + // the low/high selectors which are clamping to either 0 or 255. + if (((inten == 7) && (low_selector == 0) && (high_selector == 3)) && ((s == 0) || (s == 3))) + err_scale = 5; + + total_err += (err * err) * err_scale; + } + + if (total_err < best_err) + { + best_err = total_err; + best_lo = lo; + best_hi = hi; + } + } + } + + //assert(best_err <= 0xFFFF); + best_err = basisu::minimum<uint32_t>(best_err, 0xFFFF); + + fprintf(pFile, "{%u,%u,%u},", best_lo, best_hi, (uint32_t)best_err); + n++; + if ((n & 31) == 31) + fprintf(pFile, "\n"); + } // m + } // sr + } // g + } // inten + + fclose(pFile); + +#if 0 + // PVRTC2 34 + fopen_s(&pFile, "basisu_transcoder_tables_pvrtc2_34.inc", "w"); + + n = 0; + + for (int inten = 0; inten < 8; inten++) + { + for (uint32_t g = 0; g < 32; g++) + { + color32 block_colors[4]; + decoder_etc_block::get_diff_subblock_colors(block_colors, decoder_etc_block::pack_color5(color32(g, g, g, 255), false), inten); + + for (uint32_t sr = 0; sr < NUM_ETC1S_TO_ATC_SELECTOR_RANGES; sr++) + { + const uint32_t low_selector = g_etc1s_to_atc_selector_ranges[sr].m_low; + const uint32_t high_selector = g_etc1s_to_atc_selector_ranges[sr].m_high; + + for (uint32_t m = 0; m < NUM_ETC1S_TO_ATC_SELECTOR_MAPPINGS; m++) + { + uint32_t best_lo = 0; + uint32_t best_hi = 0; + uint64_t best_err = UINT64_MAX; + + for (uint32_t hi = 0; hi <= 15; hi++) + { + for (uint32_t lo = 0; lo <= 7; lo++) + { + uint32_t colors[4]; + + colors[0] = (lo << 2) | (lo >> 1); + colors[0] = (colors[0] << 3) | (colors[0] >> 2); + + colors[3] = (hi << 1) | (hi >> 3); + colors[3] = (colors[3] << 3) | (colors[3] >> 2); + + colors[1] = (colors[0] * 5 + colors[3] * 3) / 8; + colors[2] = (colors[3] * 5 + colors[0] * 3) / 8; + + uint64_t total_err = 0; + + for (uint32_t s = low_selector; s <= high_selector; s++) + { + int err = block_colors[s].g - colors[g_etc1s_to_atc_selector_mappings[m][s]]; + + int err_scale = 1; + // Special case when the intensity table is 7, low_selector is 0, and high_selector is 3. In this extreme case, it's likely the encoder is trying to strongly favor + // the low/high selectors which are clamping to either 0 or 255. + if (((inten == 7) && (low_selector == 0) && (high_selector == 3)) && ((s == 0) || (s == 3))) + err_scale = 5; + + total_err += (err * err) * err_scale; + } + + if (total_err < best_err) + { + best_err = total_err; + best_lo = lo; + best_hi = hi; + } + } + } + + //assert(best_err <= 0xFFFF); + best_err = basisu::minimum<uint32_t>(best_err, 0xFFFF); + + fprintf(pFile, "{%u,%u,%u},", best_lo, best_hi, (uint32_t)best_err); + n++; + if ((n & 31) == 31) + fprintf(pFile, "\n"); + } // m + } // sr + } // g + } // inten + + fclose(pFile); +#endif +#if 0 + // PVRTC2 44 + fopen_s(&pFile, "basisu_transcoder_tables_pvrtc2_44.inc", "w"); + + n = 0; + + for (int inten = 0; inten < 8; inten++) + { + for (uint32_t g = 0; g < 32; g++) + { + color32 block_colors[4]; + decoder_etc_block::get_diff_subblock_colors(block_colors, decoder_etc_block::pack_color5(color32(g, g, g, 255), false), inten); + + for (uint32_t sr = 0; sr < NUM_ETC1S_TO_ATC_SELECTOR_RANGES; sr++) + { + const uint32_t low_selector = g_etc1s_to_atc_selector_ranges[sr].m_low; + const uint32_t high_selector = g_etc1s_to_atc_selector_ranges[sr].m_high; + + for (uint32_t m = 0; m < NUM_ETC1S_TO_ATC_SELECTOR_MAPPINGS; m++) + { + uint32_t best_lo = 0; + uint32_t best_hi = 0; + uint64_t best_err = UINT64_MAX; + + for (uint32_t hi = 0; hi <= 15; hi++) + { + for (uint32_t lo = 0; lo <= 15; lo++) + { + uint32_t colors[4]; + + colors[0] = (lo << 1) | (lo >> 3); + colors[0] = (colors[0] << 3) | (colors[0] >> 2); + + colors[3] = (hi << 1) | (hi >> 3); + colors[3] = (colors[3] << 3) | (colors[3] >> 2); + + colors[1] = (colors[0] * 5 + colors[3] * 3) / 8; + colors[2] = (colors[3] * 5 + colors[0] * 3) / 8; + + uint64_t total_err = 0; + + for (uint32_t s = low_selector; s <= high_selector; s++) + { + int err = block_colors[s].g - colors[g_etc1s_to_atc_selector_mappings[m][s]]; + + int err_scale = 1; + // Special case when the intensity table is 7, low_selector is 0, and high_selector is 3. In this extreme case, it's likely the encoder is trying to strongly favor + // the low/high selectors which are clamping to either 0 or 255. + if (((inten == 7) && (low_selector == 0) && (high_selector == 3)) && ((s == 0) || (s == 3))) + err_scale = 5; + + total_err += (err * err) * err_scale; + } + + if (total_err < best_err) + { + best_err = total_err; + best_lo = lo; + best_hi = hi; + } + } + } + + //assert(best_err <= 0xFFFF); + best_err = basisu::minimum<uint32_t>(best_err, 0xFFFF); + + fprintf(pFile, "{%u,%u,%u},", best_lo, best_hi, (uint32_t)best_err); + n++; + if ((n & 31) == 31) + fprintf(pFile, "\n"); + } // m + } // sr + } // g + } // inten + + fclose(pFile); +#endif + + // PVRTC2 alpha 33 + fopen_s(&pFile, "basisu_transcoder_tables_pvrtc2_alpha_33.inc", "w"); + + n = 0; + + for (int inten = 0; inten < 8; inten++) + { + for (uint32_t g = 0; g < 32; g++) + { + color32 block_colors[4]; + decoder_etc_block::get_diff_subblock_colors(block_colors, decoder_etc_block::pack_color5(color32(g, g, g, 255), false), inten); + + for (uint32_t sr = 0; sr < NUM_ETC1S_TO_ATC_SELECTOR_RANGES; sr++) + { + const uint32_t low_selector = g_etc1s_to_atc_selector_ranges[sr].m_low; + const uint32_t high_selector = g_etc1s_to_atc_selector_ranges[sr].m_high; + + for (uint32_t m = 0; m < NUM_ETC1S_TO_ATC_SELECTOR_MAPPINGS; m++) + { + uint32_t best_lo = 0; + uint32_t best_hi = 0; + uint64_t best_err = UINT64_MAX; + + for (uint32_t hi = 0; hi <= 7; hi++) + { + for (uint32_t lo = 0; lo <= 7; lo++) + { + uint32_t colors[4]; + + colors[0] = (lo << 1); + colors[0] = (colors[0] << 4) | colors[0]; + + colors[3] = (hi << 1) | 1; + colors[3] = (colors[3] << 4) | colors[3]; + + colors[1] = (colors[0] * 5 + colors[3] * 3) / 8; + colors[2] = (colors[3] * 5 + colors[0] * 3) / 8; + + uint64_t total_err = 0; + + for (uint32_t s = low_selector; s <= high_selector; s++) + { + int err = block_colors[s].g - colors[g_etc1s_to_atc_selector_mappings[m][s]]; + + int err_scale = 1; + // Special case when the intensity table is 7, low_selector is 0, and high_selector is 3. In this extreme case, it's likely the encoder is trying to strongly favor + // the low/high selectors which are clamping to either 0 or 255. + if (((inten == 7) && (low_selector == 0) && (high_selector == 3)) && ((s == 0) || (s == 3))) + err_scale = 5; + + total_err += (err * err) * err_scale; + } + + if (total_err < best_err) + { + best_err = total_err; + best_lo = lo; + best_hi = hi; + } + } + } + + //assert(best_err <= 0xFFFF); + best_err = basisu::minimum<uint32_t>(best_err, 0xFFFF); + + fprintf(pFile, "{%u,%u,%u},", best_lo, best_hi, (uint32_t)best_err); + n++; + if ((n & 31) == 31) + fprintf(pFile, "\n"); + } // m + } // sr + } // g + } // inten + + fclose(pFile); } #endif // BASISD_WRITE_NEW_ATC_TABLES #endif // BASISD_SUPPORT_ATC +#if BASISD_SUPPORT_PVRTC2 + struct pvrtc2_block + { + uint8_t m_modulation[4]; + + union + { + union + { + // Opaque mode: RGB colora=554 and colorb=555 + struct + { + uint32_t m_mod_flag : 1; + uint32_t m_blue_a : 4; + uint32_t m_green_a : 5; + uint32_t m_red_a : 5; + uint32_t m_hard_flag : 1; + uint32_t m_blue_b : 5; + uint32_t m_green_b : 5; + uint32_t m_red_b : 5; + uint32_t m_opaque_flag : 1; + + } m_opaque_color_data; + + // Transparent mode: RGBA colora=4433 and colorb=4443 + struct + { + uint32_t m_mod_flag : 1; + uint32_t m_blue_a : 3; + uint32_t m_green_a : 4; + uint32_t m_red_a : 4; + uint32_t m_alpha_a : 3; + uint32_t m_hard_flag : 1; + uint32_t m_blue_b : 4; + uint32_t m_green_b : 4; + uint32_t m_red_b : 4; + uint32_t m_alpha_b : 3; + uint32_t m_opaque_flag : 1; + + } m_trans_color_data; + }; + + uint32_t m_color_data_bits; + }; + + // 554 + void set_low_color(uint32_t r, uint32_t g, uint32_t b) + { + assert((r < 32) && (g < 32) && (b < 16)); + m_opaque_color_data.m_red_a = r; + m_opaque_color_data.m_green_a = g; + m_opaque_color_data.m_blue_a = b; + } + + // 555 + void set_high_color(uint32_t r, uint32_t g, uint32_t b) + { + assert((r < 32) && (g < 32) && (b < 32)); + m_opaque_color_data.m_red_b = r; + m_opaque_color_data.m_green_b = g; + m_opaque_color_data.m_blue_b = b; + } + + // 4433 + void set_trans_low_color(uint32_t r, uint32_t g, uint32_t b, uint32_t a) + { + assert((r < 16) && (g < 16) && (b < 8) && (a < 8)); + m_trans_color_data.m_red_a = r; + m_trans_color_data.m_green_a = g; + m_trans_color_data.m_blue_a = b; + m_trans_color_data.m_alpha_a = a; + } + + // 4443 + void set_trans_high_color(uint32_t r, uint32_t g, uint32_t b, uint32_t a) + { + assert((r < 16) && (g < 16) && (b < 16) && (a < 8)); + m_trans_color_data.m_red_b = r; + m_trans_color_data.m_green_b = g; + m_trans_color_data.m_blue_b = b; + m_trans_color_data.m_alpha_b = a; + } + }; + + static struct + { + uint8_t m_l, m_h; + } g_pvrtc2_trans_match34[256]; + + static struct + { + uint8_t m_l, m_h; + } g_pvrtc2_trans_match44[256]; + + static struct + { + uint8_t m_l, m_h; + } g_pvrtc2_alpha_match33[256]; + + static struct + { + uint8_t m_l, m_h; + } g_pvrtc2_alpha_match33_0[256]; + + static struct + { + uint8_t m_l, m_h; + } g_pvrtc2_alpha_match33_3[256]; + + // PVRTC2 can be forced to look like a slightly weaker variant of ATC/BC1, so that's what we do here for simplicity. + static void convert_etc1s_to_pvrtc2_rgb(void* pDst, const endpoint* pEndpoints, const selector* pSelector) + { + pvrtc2_block* pBlock = static_cast<pvrtc2_block*>(pDst); + + pBlock->m_opaque_color_data.m_hard_flag = 1; + pBlock->m_opaque_color_data.m_mod_flag = 0; + pBlock->m_opaque_color_data.m_opaque_flag = 1; + + const uint32_t low_selector = pSelector->m_lo_selector; + const uint32_t high_selector = pSelector->m_hi_selector; + + const color32& base_color = pEndpoints->m_color5; + const uint32_t inten_table = pEndpoints->m_inten5; + + if (low_selector == high_selector) + { + uint32_t r, g, b; + decoder_etc_block::get_block_color5(base_color, inten_table, low_selector, r, g, b); + + pBlock->set_low_color(g_atc_match55_equals_1[r].m_lo, g_atc_match55_equals_1[g].m_lo, g_pvrtc2_match45_equals_1[b].m_lo); + pBlock->set_high_color(g_atc_match55_equals_1[r].m_hi, g_atc_match55_equals_1[g].m_hi, g_pvrtc2_match45_equals_1[b].m_hi); + + pBlock->m_modulation[0] = 0x55; + pBlock->m_modulation[1] = 0x55; + pBlock->m_modulation[2] = 0x55; + pBlock->m_modulation[3] = 0x55; + + return; + } + else if ((inten_table >= 7) && (pSelector->m_num_unique_selectors == 2) && (pSelector->m_lo_selector == 0) && (pSelector->m_hi_selector == 3)) + { + color32 block_colors[4]; + decoder_etc_block::get_block_colors5(block_colors, base_color, inten_table); + + const uint32_t r0 = block_colors[0].r; + const uint32_t g0 = block_colors[0].g; + const uint32_t b0 = block_colors[0].b; + + const uint32_t r1 = block_colors[3].r; + const uint32_t g1 = block_colors[3].g; + const uint32_t b1 = block_colors[3].b; + + pBlock->set_low_color(g_atc_match5[r0].m_hi, g_atc_match5[g0].m_hi, g_pvrtc2_match4[b0].m_hi); + pBlock->set_high_color(g_atc_match5[r1].m_hi, g_atc_match5[g1].m_hi, g_atc_match5[b1].m_hi); + + pBlock->m_modulation[0] = pSelector->m_selectors[0]; + pBlock->m_modulation[1] = pSelector->m_selectors[1]; + pBlock->m_modulation[2] = pSelector->m_selectors[2]; + pBlock->m_modulation[3] = pSelector->m_selectors[3]; + + return; + } + + const uint32_t selector_range_table = g_etc1s_to_atc_selector_range_index[low_selector][high_selector]; + + //[32][8][RANGES][MAPPING] + const etc1s_to_atc_solution* pTable_r = &g_etc1s_to_atc_55[(inten_table * 32 + base_color.r) * (NUM_ETC1S_TO_ATC_SELECTOR_RANGES * NUM_ETC1S_TO_ATC_SELECTOR_MAPPINGS) + selector_range_table * NUM_ETC1S_TO_ATC_SELECTOR_MAPPINGS]; + const etc1s_to_atc_solution* pTable_g = &g_etc1s_to_atc_55[(inten_table * 32 + base_color.g) * (NUM_ETC1S_TO_ATC_SELECTOR_RANGES * NUM_ETC1S_TO_ATC_SELECTOR_MAPPINGS) + selector_range_table * NUM_ETC1S_TO_ATC_SELECTOR_MAPPINGS]; + const etc1s_to_atc_solution* pTable_b = &g_etc1s_to_pvrtc2_45[(inten_table * 32 + base_color.b) * (NUM_ETC1S_TO_ATC_SELECTOR_RANGES * NUM_ETC1S_TO_ATC_SELECTOR_MAPPINGS) + selector_range_table * NUM_ETC1S_TO_ATC_SELECTOR_MAPPINGS]; + + uint32_t best_err = UINT_MAX; + uint32_t best_mapping = 0; + + assert(NUM_ETC1S_TO_ATC_SELECTOR_MAPPINGS == 10); +#define DO_ITER(m) { uint32_t total_err = pTable_r[m].m_err + pTable_g[m].m_err + pTable_b[m].m_err; if (total_err < best_err) { best_err = total_err; best_mapping = m; } } + DO_ITER(0); DO_ITER(1); DO_ITER(2); DO_ITER(3); DO_ITER(4); + DO_ITER(5); DO_ITER(6); DO_ITER(7); DO_ITER(8); DO_ITER(9); +#undef DO_ITER + + pBlock->set_low_color(pTable_r[best_mapping].m_lo, pTable_g[best_mapping].m_lo, pTable_b[best_mapping].m_lo); + pBlock->set_high_color(pTable_r[best_mapping].m_hi, pTable_g[best_mapping].m_hi, pTable_b[best_mapping].m_hi); + + if (ATC_IDENTITY_SELECTOR_MAPPING_INDEX == best_mapping) + { + pBlock->m_modulation[0] = pSelector->m_selectors[0]; + pBlock->m_modulation[1] = pSelector->m_selectors[1]; + pBlock->m_modulation[2] = pSelector->m_selectors[2]; + pBlock->m_modulation[3] = pSelector->m_selectors[3]; + } + else + { + // TODO: We could make this faster using several precomputed 256 entry tables, like ETC1S->BC1 does. + const uint8_t* pSelectors_xlat = &g_etc1s_to_atc_selector_mappings[best_mapping][0]; + + const uint32_t sel_bits0 = pSelector->m_selectors[0]; + const uint32_t sel_bits1 = pSelector->m_selectors[1]; + const uint32_t sel_bits2 = pSelector->m_selectors[2]; + const uint32_t sel_bits3 = pSelector->m_selectors[3]; + + uint32_t sels0 = 0, sels1 = 0, sels2 = 0, sels3 = 0; + +#define DO_X(x) { \ + const uint32_t x_shift = (x) * 2; \ + sels0 |= (pSelectors_xlat[(sel_bits0 >> x_shift) & 3] << x_shift); \ + sels1 |= (pSelectors_xlat[(sel_bits1 >> x_shift) & 3] << x_shift); \ + sels2 |= (pSelectors_xlat[(sel_bits2 >> x_shift) & 3] << x_shift); \ + sels3 |= (pSelectors_xlat[(sel_bits3 >> x_shift) & 3] << x_shift); } + + DO_X(0); + DO_X(1); + DO_X(2); + DO_X(3); +#undef DO_X + + pBlock->m_modulation[0] = (uint8_t)sels0; + pBlock->m_modulation[1] = (uint8_t)sels1; + pBlock->m_modulation[2] = (uint8_t)sels2; + pBlock->m_modulation[3] = (uint8_t)sels3; + } + } + + typedef struct { float c[4]; } vec4F; + + static inline int32_t clampi(int32_t value, int32_t low, int32_t high) { if (value < low) value = low; else if (value > high) value = high; return value; } + static inline float clampf(float value, float low, float high) { if (value < low) value = low; else if (value > high) value = high; return value; } + static inline float saturate(float value) { return clampf(value, 0, 1.0f); } + static inline vec4F* vec4F_set_scalar(vec4F* pV, float x) { pV->c[0] = x; pV->c[1] = x; pV->c[2] = x; pV->c[3] = x; return pV; } + static inline vec4F* vec4F_set(vec4F* pV, float x, float y, float z, float w) { pV->c[0] = x; pV->c[1] = y; pV->c[2] = z; pV->c[3] = w; return pV; } + static inline vec4F* vec4F_saturate_in_place(vec4F* pV) { pV->c[0] = saturate(pV->c[0]); pV->c[1] = saturate(pV->c[1]); pV->c[2] = saturate(pV->c[2]); pV->c[3] = saturate(pV->c[3]); return pV; } + static inline vec4F vec4F_saturate(const vec4F* pV) { vec4F res; res.c[0] = saturate(pV->c[0]); res.c[1] = saturate(pV->c[1]); res.c[2] = saturate(pV->c[2]); res.c[3] = saturate(pV->c[3]); return res; } + static inline vec4F vec4F_from_color(const color32* pC) { vec4F res; vec4F_set(&res, pC->c[0], pC->c[1], pC->c[2], pC->c[3]); return res; } + static inline vec4F vec4F_add(const vec4F* pLHS, const vec4F* pRHS) { vec4F res; vec4F_set(&res, pLHS->c[0] + pRHS->c[0], pLHS->c[1] + pRHS->c[1], pLHS->c[2] + pRHS->c[2], pLHS->c[3] + pRHS->c[3]); return res; } + static inline vec4F vec4F_sub(const vec4F* pLHS, const vec4F* pRHS) { vec4F res; vec4F_set(&res, pLHS->c[0] - pRHS->c[0], pLHS->c[1] - pRHS->c[1], pLHS->c[2] - pRHS->c[2], pLHS->c[3] - pRHS->c[3]); return res; } + static inline float vec4F_dot(const vec4F* pLHS, const vec4F* pRHS) { return pLHS->c[0] * pRHS->c[0] + pLHS->c[1] * pRHS->c[1] + pLHS->c[2] * pRHS->c[2] + pLHS->c[3] * pRHS->c[3]; } + static inline vec4F vec4F_mul(const vec4F* pLHS, float s) { vec4F res; vec4F_set(&res, pLHS->c[0] * s, pLHS->c[1] * s, pLHS->c[2] * s, pLHS->c[3] * s); return res; } + static inline vec4F* vec4F_normalize_in_place(vec4F* pV) { float s = pV->c[0] * pV->c[0] + pV->c[1] * pV->c[1] + pV->c[2] * pV->c[2] + pV->c[3] * pV->c[3]; if (s != 0.0f) { s = 1.0f / sqrtf(s); pV->c[0] *= s; pV->c[1] *= s; pV->c[2] *= s; pV->c[3] *= s; } return pV; } + + static color32 convert_rgba_5554_to_8888(const color32& col) + { + return color32((col[0] << 3) | (col[0] >> 2), (col[1] << 3) | (col[1] >> 2), (col[2] << 3) | (col[2] >> 2), (col[3] << 4) | col[3]); + } + + static inline int sq(int x) { return x * x; } + + // PVRTC2 is a slightly borked format for alpha: In Non-Interpolated mode, the way AlphaB8 is exanded from 4 to 8 bits means it can never be 0. + // This is actually very bad, because on 100% transparent blocks which have non-trivial color pixels, part of the color channel will leak into alpha! + // And there's nothing straightforward we can do because using the other modes is too expensive/complex. I can see why Apple didn't adopt it. + static void convert_etc1s_to_pvrtc2_rgba(void* pDst, const endpoint* pEndpoints, const selector* pSelector, const endpoint* pEndpoint_codebook, const selector* pSelector_codebook) + { + pvrtc2_block* pBlock = static_cast<pvrtc2_block*>(pDst); + + const endpoint& alpha_endpoint = pEndpoint_codebook[((uint16_t*)pBlock)[0]]; + const selector& alpha_selectors = pSelector_codebook[((uint16_t*)pBlock)[1]]; + + pBlock->m_opaque_color_data.m_hard_flag = 1; + pBlock->m_opaque_color_data.m_mod_flag = 0; + pBlock->m_opaque_color_data.m_opaque_flag = 0; + + const int num_unique_alpha_selectors = alpha_selectors.m_num_unique_selectors; + + const color32& alpha_base_color = alpha_endpoint.m_color5; + const uint32_t alpha_inten_table = alpha_endpoint.m_inten5; + + int constant_alpha_val = -1; + + int alpha_block_colors[4]; + decoder_etc_block::get_block_colors5_g(alpha_block_colors, alpha_base_color, alpha_inten_table); + + if (num_unique_alpha_selectors == 1) + { + constant_alpha_val = alpha_block_colors[alpha_selectors.m_lo_selector]; + } + else + { + constant_alpha_val = alpha_block_colors[alpha_selectors.m_lo_selector]; + + for (uint32_t i = alpha_selectors.m_lo_selector + 1; i <= alpha_selectors.m_hi_selector; i++) + { + if (constant_alpha_val != alpha_block_colors[i]) + { + constant_alpha_val = -1; + break; + } + } + } + + if (constant_alpha_val >= 250) + { + // It's opaque enough, so don't bother trying to encode it as an alpha block. + convert_etc1s_to_pvrtc2_rgb(pDst, pEndpoints, pSelector); + return; + } + + const color32& base_color = pEndpoints->m_color5; + const uint32_t inten_table = pEndpoints->m_inten5; + + const uint32_t low_selector = pSelector->m_lo_selector; + const uint32_t high_selector = pSelector->m_hi_selector; + + const int num_unique_color_selectors = pSelector->m_num_unique_selectors; + + // We need to reencode the block at the pixel level, unfortunately, from two ETC1S planes. + // Do 4D incremental PCA, project all pixels to this hyperline, then quantize to packed endpoints and compute the modulation values. + const int br = (base_color.r << 3) | (base_color.r >> 2); + const int bg = (base_color.g << 3) | (base_color.g >> 2); + const int bb = (base_color.b << 3) | (base_color.b >> 2); + + color32 block_cols[4]; + for (uint32_t i = 0; i < 4; i++) + { + const int ci = g_etc1_inten_tables[inten_table][i]; + block_cols[i].set_clamped(br + ci, bg + ci, bb + ci, alpha_block_colors[i]); + } + + bool solid_color_block = true; + if (num_unique_color_selectors > 1) + { + for (uint32_t i = low_selector + 1; i <= high_selector; i++) + { + if ((block_cols[low_selector].r != block_cols[i].r) || (block_cols[low_selector].g != block_cols[i].g) || (block_cols[low_selector].b != block_cols[i].b)) + { + solid_color_block = false; + break; + } + } + } + + if ((solid_color_block) && (constant_alpha_val >= 0)) + { + // Constant color/alpha block. + // This is more complex than it may seem because of the way color and alpha are packed in PVRTC2. We need to evaluate mod0, mod1 and mod3 encodings to find the best one. + uint32_t r, g, b; + decoder_etc_block::get_block_color5(base_color, inten_table, low_selector, r, g, b); + + // Mod 0 + uint32_t lr0 = (r * 15 + 128) / 255, lg0 = (g * 15 + 128) / 255, lb0 = (b * 7 + 128) / 255; + uint32_t la0 = g_pvrtc2_alpha_match33_0[constant_alpha_val].m_l; + + uint32_t cr0 = (lr0 << 1) | (lr0 >> 3); + uint32_t cg0 = (lg0 << 1) | (lg0 >> 3); + uint32_t cb0 = (lb0 << 2) | (lb0 >> 1); + uint32_t ca0 = (la0 << 1); + + cr0 = (cr0 << 3) | (cr0 >> 2); + cg0 = (cg0 << 3) | (cg0 >> 2); + cb0 = (cb0 << 3) | (cb0 >> 2); + ca0 = (ca0 << 4) | ca0; + + uint32_t err0 = sq(cr0 - r) + sq(cg0 - g) + sq(cb0 - b) + sq(ca0 - constant_alpha_val) * 2; + + // If the alpha is < 3 or so we're kinda screwed. It's better to have some RGB error than it is to turn a 100% transparent area slightly opaque. + if ((err0 == 0) || (constant_alpha_val < 3)) + { + pBlock->set_trans_low_color(lr0, lg0, lb0, la0); + pBlock->set_trans_high_color(0, 0, 0, 0); + + pBlock->m_modulation[0] = 0; + pBlock->m_modulation[1] = 0; + pBlock->m_modulation[2] = 0; + pBlock->m_modulation[3] = 0; + return; + } + + // Mod 3 + uint32_t lr3 = (r * 15 + 128) / 255, lg3 = (g * 15 + 128) / 255, lb3 = (b * 15 + 128) / 255; + uint32_t la3 = g_pvrtc2_alpha_match33_3[constant_alpha_val].m_l; + + uint32_t cr3 = (lr3 << 1) | (lr3 >> 3); + uint32_t cg3 = (lg3 << 1) | (lg3 >> 3); + uint32_t cb3 = (lb3 << 1) | (lb3 >> 3); + uint32_t ca3 = (la3 << 1) | 1; + + cr3 = (cr3 << 3) | (cr3 >> 2); + cg3 = (cg3 << 3) | (cg3 >> 2); + cb3 = (cb3 << 3) | (cb3 >> 2); + ca3 = (ca3 << 4) | ca3; + + uint32_t err3 = sq(cr3 - r) + sq(cg3 - g) + sq(cb3 - b) + sq(ca3 - constant_alpha_val) * 2; + + // Mod 1 + uint32_t lr1 = g_pvrtc2_trans_match44[r].m_l, lg1 = g_pvrtc2_trans_match44[g].m_l, lb1 = g_pvrtc2_trans_match34[b].m_l; + uint32_t hr1 = g_pvrtc2_trans_match44[r].m_h, hg1 = g_pvrtc2_trans_match44[g].m_h, hb1 = g_pvrtc2_trans_match34[b].m_h; + uint32_t la1 = g_pvrtc2_alpha_match33[constant_alpha_val].m_l, ha1 = g_pvrtc2_alpha_match33[constant_alpha_val].m_h; + + uint32_t clr1 = (lr1 << 1) | (lr1 >> 3); + uint32_t clg1 = (lg1 << 1) | (lg1 >> 3); + uint32_t clb1 = (lb1 << 2) | (lb1 >> 1); + uint32_t cla1 = (la1 << 1); + + clr1 = (clr1 << 3) | (clr1 >> 2); + clg1 = (clg1 << 3) | (clg1 >> 2); + clb1 = (clb1 << 3) | (clb1 >> 2); + cla1 = (cla1 << 4) | cla1; + + uint32_t chr1 = (hr1 << 1) | (hr1 >> 3); + uint32_t chg1 = (hg1 << 1) | (hg1 >> 3); + uint32_t chb1 = (hb1 << 1) | (hb1 >> 3); + uint32_t cha1 = (ha1 << 1) | 1; + + chr1 = (chr1 << 3) | (chr1 >> 2); + chg1 = (chg1 << 3) | (chg1 >> 2); + chb1 = (chb1 << 3) | (chb1 >> 2); + cha1 = (cha1 << 4) | cha1; + + uint32_t r1 = (clr1 * 5 + chr1 * 3) / 8; + uint32_t g1 = (clg1 * 5 + chg1 * 3) / 8; + uint32_t b1 = (clb1 * 5 + chb1 * 3) / 8; + uint32_t a1 = (cla1 * 5 + cha1 * 3) / 8; + + uint32_t err1 = sq(r1 - r) + sq(g1 - g) + sq(b1 - b) + sq(a1 - constant_alpha_val) * 2; + + if ((err1 < err0) && (err1 < err3)) + { + pBlock->set_trans_low_color(lr1, lg1, lb1, la1); + pBlock->set_trans_high_color(hr1, hg1, hb1, ha1); + + pBlock->m_modulation[0] = 0x55; + pBlock->m_modulation[1] = 0x55; + pBlock->m_modulation[2] = 0x55; + pBlock->m_modulation[3] = 0x55; + } + else if (err0 < err3) + { + pBlock->set_trans_low_color(lr0, lg0, lb0, la0); + pBlock->set_trans_high_color(0, 0, 0, 0); + + pBlock->m_modulation[0] = 0; + pBlock->m_modulation[1] = 0; + pBlock->m_modulation[2] = 0; + pBlock->m_modulation[3] = 0; + } + else + { + pBlock->set_trans_low_color(0, 0, 0, 0); + pBlock->set_trans_high_color(lr3, lg3, lb3, la3); + + pBlock->m_modulation[0] = 0xFF; + pBlock->m_modulation[1] = 0xFF; + pBlock->m_modulation[2] = 0xFF; + pBlock->m_modulation[3] = 0xFF; + } + + return; + } + + // It's a complex block with non-solid color and/or alpha pixels. + vec4F minColor, maxColor; + + if (solid_color_block) + { + // It's a solid color block. + uint32_t low_a = block_cols[alpha_selectors.m_lo_selector].a; + uint32_t high_a = block_cols[alpha_selectors.m_hi_selector].a; + + const float S = 1.0f / 255.0f; + vec4F_set(&minColor, block_cols[low_selector].r * S, block_cols[low_selector].g * S, block_cols[low_selector].b * S, low_a * S); + vec4F_set(&maxColor, block_cols[low_selector].r * S, block_cols[low_selector].g * S, block_cols[low_selector].b * S, high_a * S); + } + else if (constant_alpha_val >= 0) + { + // It's a solid alpha block. + const float S = 1.0f / 255.0f; + vec4F_set(&minColor, block_cols[low_selector].r * S, block_cols[low_selector].g * S, block_cols[low_selector].b * S, constant_alpha_val * S); + vec4F_set(&maxColor, block_cols[high_selector].r * S, block_cols[high_selector].g * S, block_cols[high_selector].b * S, constant_alpha_val * S); + } + // See if any of the block colors got clamped - if so the principle axis got distorted (it's no longer just the ETC1S luma axis). + // To keep quality up we need to use full 4D PCA in this case. + else if ((block_cols[low_selector].c[0] == 0) || (block_cols[high_selector].c[0] == 255) || + (block_cols[low_selector].c[1] == 0) || (block_cols[high_selector].c[1] == 255) || + (block_cols[low_selector].c[2] == 0) || (block_cols[high_selector].c[2] == 255) || + (block_cols[alpha_selectors.m_lo_selector].c[3] == 0) || (block_cols[alpha_selectors.m_hi_selector].c[3] == 255)) + { + // Find principle component of RGBA colors treated as 4D vectors. + color32 pixels[16]; + + uint32_t sum_r = 0, sum_g = 0, sum_b = 0, sum_a = 0; + for (uint32_t i = 0; i < 16; i++) + { + color32 rgb(block_cols[pSelector->get_selector(i & 3, i >> 2)]); + uint32_t a = block_cols[alpha_selectors.get_selector(i & 3, i >> 2)].a; + + pixels[i].set(rgb.r, rgb.g, rgb.b, a); + + sum_r += rgb.r; + sum_g += rgb.g; + sum_b += rgb.b; + sum_a += a; + } + + vec4F meanColor; + vec4F_set(&meanColor, (float)sum_r, (float)sum_g, (float)sum_b, (float)sum_a); + vec4F meanColorScaled = vec4F_mul(&meanColor, 1.0f / 16.0f); + + meanColor = vec4F_mul(&meanColor, 1.0f / (float)(16.0f * 255.0f)); + vec4F_saturate_in_place(&meanColor); + + vec4F axis; + vec4F_set_scalar(&axis, 0.0f); + // Why this incremental method? Because it's stable and predictable. Covar+power method can require a lot of iterations to converge in 4D. + for (uint32_t i = 0; i < 16; i++) + { + vec4F color = vec4F_from_color(&pixels[i]); + color = vec4F_sub(&color, &meanColorScaled); + vec4F a = vec4F_mul(&color, color.c[0]); + vec4F b = vec4F_mul(&color, color.c[1]); + vec4F c = vec4F_mul(&color, color.c[2]); + vec4F d = vec4F_mul(&color, color.c[3]); + vec4F n = i ? axis : color; + vec4F_normalize_in_place(&n); + axis.c[0] += vec4F_dot(&a, &n); + axis.c[1] += vec4F_dot(&b, &n); + axis.c[2] += vec4F_dot(&c, &n); + axis.c[3] += vec4F_dot(&d, &n); + } + + vec4F_normalize_in_place(&axis); + + if (vec4F_dot(&axis, &axis) < .5f) + vec4F_set_scalar(&axis, .5f); + + float l = 1e+9f, h = -1e+9f; + + for (uint32_t i = 0; i < 16; i++) + { + vec4F color = vec4F_from_color(&pixels[i]); + + vec4F q = vec4F_sub(&color, &meanColorScaled); + float d = vec4F_dot(&q, &axis); + + l = basisu::minimum(l, d); + h = basisu::maximum(h, d); + } + + l *= (1.0f / 255.0f); + h *= (1.0f / 255.0f); + + vec4F b0 = vec4F_mul(&axis, l); + vec4F b1 = vec4F_mul(&axis, h); + vec4F c0 = vec4F_add(&meanColor, &b0); + vec4F c1 = vec4F_add(&meanColor, &b1); + minColor = vec4F_saturate(&c0); + maxColor = vec4F_saturate(&c1); + if (minColor.c[3] > maxColor.c[3]) + std::swap(minColor, maxColor); + } + else + { + // We know the RGB axis is luma, because it's an ETC1S block and none of the block colors got clamped. So we only need to use 2D PCA. + // We project each LA vector onto two 2D lines with axes (1,1) and (1,-1) and find the largest projection to determine if axis A is flipped relative to L. + uint32_t block_cols_l[4], block_cols_a[4]; + for (uint32_t i = 0; i < 4; i++) + { + block_cols_l[i] = block_cols[i].r + block_cols[i].g + block_cols[i].b; + block_cols_a[i] = block_cols[i].a * 3; + } + + int p0_min = INT_MAX, p0_max = INT_MIN; + int p1_min = INT_MAX, p1_max = INT_MIN; + for (uint32_t y = 0; y < 4; y++) + { + const uint32_t cs = pSelector->m_selectors[y]; + const uint32_t as = alpha_selectors.m_selectors[y]; + + { + const int l = block_cols_l[cs & 3]; + const int a = block_cols_a[as & 3]; + const int p0 = l + a; p0_min = basisu::minimum(p0_min, p0); p0_max = basisu::maximum(p0_max, p0); + const int p1 = l - a; p1_min = basisu::minimum(p1_min, p1); p1_max = basisu::maximum(p1_max, p1); + } + { + const int l = block_cols_l[(cs >> 2) & 3]; + const int a = block_cols_a[(as >> 2) & 3]; + const int p0 = l + a; p0_min = basisu::minimum(p0_min, p0); p0_max = basisu::maximum(p0_max, p0); + const int p1 = l - a; p1_min = basisu::minimum(p1_min, p1); p1_max = basisu::maximum(p1_max, p1); + } + { + const int l = block_cols_l[(cs >> 4) & 3]; + const int a = block_cols_a[(as >> 4) & 3]; + const int p0 = l + a; p0_min = basisu::minimum(p0_min, p0); p0_max = basisu::maximum(p0_max, p0); + const int p1 = l - a; p1_min = basisu::minimum(p1_min, p1); p1_max = basisu::maximum(p1_max, p1); + } + { + const int l = block_cols_l[cs >> 6]; + const int a = block_cols_a[as >> 6]; + const int p0 = l + a; p0_min = basisu::minimum(p0_min, p0); p0_max = basisu::maximum(p0_max, p0); + const int p1 = l - a; p1_min = basisu::minimum(p1_min, p1); p1_max = basisu::maximum(p1_max, p1); + } + } + + int dist0 = p0_max - p0_min; + int dist1 = p1_max - p1_min; + + const float S = 1.0f / 255.0f; + + vec4F_set(&minColor, block_cols[low_selector].r * S, block_cols[low_selector].g * S, block_cols[low_selector].b * S, block_cols[alpha_selectors.m_lo_selector].a * S); + vec4F_set(&maxColor, block_cols[high_selector].r * S, block_cols[high_selector].g * S, block_cols[high_selector].b * S, block_cols[alpha_selectors.m_hi_selector].a * S); + + // See if the A component of the principle axis is flipped relative to L. If so, we need to flip either RGB or A bounds. + if (dist1 > dist0) + { + std::swap(minColor.c[0], maxColor.c[0]); + std::swap(minColor.c[1], maxColor.c[1]); + std::swap(minColor.c[2], maxColor.c[2]); + } + } + + // 4433 4443 + color32 trialMinColor, trialMaxColor; + + trialMinColor.set_clamped((int)(minColor.c[0] * 15.0f + .5f), (int)(minColor.c[1] * 15.0f + .5f), (int)(minColor.c[2] * 7.0f + .5f), (int)(minColor.c[3] * 7.0f + .5f)); + trialMaxColor.set_clamped((int)(maxColor.c[0] * 15.0f + .5f), (int)(maxColor.c[1] * 15.0f + .5f), (int)(maxColor.c[2] * 15.0f + .5f), (int)(maxColor.c[3] * 7.0f + .5f)); + + pBlock->set_trans_low_color(trialMinColor.r, trialMinColor.g, trialMinColor.b, trialMinColor.a); + pBlock->set_trans_high_color(trialMaxColor.r, trialMaxColor.g, trialMaxColor.b, trialMaxColor.a); + + color32 color_a((trialMinColor.r << 1) | (trialMinColor.r >> 3), (trialMinColor.g << 1) | (trialMinColor.g >> 3), (trialMinColor.b << 2) | (trialMinColor.b >> 1), trialMinColor.a << 1); + color32 color_b((trialMaxColor.r << 1) | (trialMaxColor.r >> 3), (trialMaxColor.g << 1) | (trialMaxColor.g >> 3), (trialMaxColor.b << 1) | (trialMaxColor.b >> 3), (trialMaxColor.a << 1) | 1); + + color32 color0(convert_rgba_5554_to_8888(color_a)); + color32 color3(convert_rgba_5554_to_8888(color_b)); + + const int lr = color0.r; + const int lg = color0.g; + const int lb = color0.b; + const int la = color0.a; + + const int axis_r = color3.r - lr; + const int axis_g = color3.g - lg; + const int axis_b = color3.b - lb; + const int axis_a = color3.a - la; + const int len_a = (axis_r * axis_r) + (axis_g * axis_g) + (axis_b * axis_b) + (axis_a * axis_a); + + const int thresh01 = (len_a * 3) / 16; + const int thresh12 = len_a >> 1; + const int thresh23 = (len_a * 13) / 16; + + if ((axis_r | axis_g | axis_b) == 0) + { + int ca_sel[4]; + + for (uint32_t i = 0; i < 4; i++) + { + int ca = (block_cols[i].a - la) * axis_a; + ca_sel[i] = (ca >= thresh23) + (ca >= thresh12) + (ca >= thresh01); + } + + for (uint32_t y = 0; y < 4; y++) + { + const uint32_t a_sels = alpha_selectors.m_selectors[y]; + + uint32_t sel = ca_sel[a_sels & 3] | (ca_sel[(a_sels >> 2) & 3] << 2) | (ca_sel[(a_sels >> 4) & 3] << 4) | (ca_sel[a_sels >> 6] << 6); + + pBlock->m_modulation[y] = (uint8_t)sel; + } + } + else + { + int cy[4], ca[4]; + + for (uint32_t i = 0; i < 4; i++) + { + cy[i] = (block_cols[i].r - lr) * axis_r + (block_cols[i].g - lg) * axis_g + (block_cols[i].b - lb) * axis_b; + ca[i] = (block_cols[i].a - la) * axis_a; + } + + for (uint32_t y = 0; y < 4; y++) + { + const uint32_t c_sels = pSelector->m_selectors[y]; + const uint32_t a_sels = alpha_selectors.m_selectors[y]; + + const int d0 = cy[c_sels & 3] + ca[a_sels & 3]; + const int d1 = cy[(c_sels >> 2) & 3] + ca[(a_sels >> 2) & 3]; + const int d2 = cy[(c_sels >> 4) & 3] + ca[(a_sels >> 4) & 3]; + const int d3 = cy[c_sels >> 6] + ca[a_sels >> 6]; + + uint32_t sel = ((d0 >= thresh23) + (d0 >= thresh12) + (d0 >= thresh01)) | + (((d1 >= thresh23) + (d1 >= thresh12) + (d1 >= thresh01)) << 2) | + (((d2 >= thresh23) + (d2 >= thresh12) + (d2 >= thresh01)) << 4) | + (((d3 >= thresh23) + (d3 >= thresh12) + (d3 >= thresh01)) << 6); + + pBlock->m_modulation[y] = (uint8_t)sel; + } + } + } + + static void transcoder_init_pvrtc2() + { + for (uint32_t v = 0; v < 256; v++) + { + int best_l = 0, best_h = 0, lowest_err = INT_MAX; + + for (uint32_t l = 0; l < 8; l++) + { + uint32_t le = (l << 1); + le = (le << 4) | le; + + for (uint32_t h = 0; h < 8; h++) + { + uint32_t he = (h << 1) | 1; + he = (he << 4) | he; + + uint32_t m = (le * 5 + he * 3) / 8; + + int err = labs((int)v - (int)m); + if (err < lowest_err) + { + lowest_err = err; + best_l = l; + best_h = h; + } + } + } + + g_pvrtc2_alpha_match33[v].m_l = (uint8_t)best_l; + g_pvrtc2_alpha_match33[v].m_h = (uint8_t)best_h; + } + + for (uint32_t v = 0; v < 256; v++) + { + int best_l = 0, best_h = 0, lowest_err = INT_MAX; + + for (uint32_t l = 0; l < 8; l++) + { + uint32_t le = (l << 1); + le = (le << 4) | le; + + int err = labs((int)v - (int)le); + if (err < lowest_err) + { + lowest_err = err; + best_l = l; + best_h = l; + } + } + + g_pvrtc2_alpha_match33_0[v].m_l = (uint8_t)best_l; + g_pvrtc2_alpha_match33_0[v].m_h = (uint8_t)best_h; + } + + for (uint32_t v = 0; v < 256; v++) + { + int best_l = 0, best_h = 0, lowest_err = INT_MAX; + + for (uint32_t h = 0; h < 8; h++) + { + uint32_t he = (h << 1) | 1; + he = (he << 4) | he; + + int err = labs((int)v - (int)he); + if (err < lowest_err) + { + lowest_err = err; + best_l = h; + best_h = h; + } + } + + g_pvrtc2_alpha_match33_3[v].m_l = (uint8_t)best_l; + g_pvrtc2_alpha_match33_3[v].m_h = (uint8_t)best_h; + } + + for (uint32_t v = 0; v < 256; v++) + { + int best_l = 0, best_h = 0, lowest_err = INT_MAX; + + for (uint32_t l = 0; l < 8; l++) + { + uint32_t le = (l << 2) | (l >> 1); + le = (le << 3) | (le >> 2); + + for (uint32_t h = 0; h < 16; h++) + { + uint32_t he = (h << 1) | (h >> 3); + he = (he << 3) | (he >> 2); + + uint32_t m = (le * 5 + he * 3) / 8; + + int err = labs((int)v - (int)m); + if (err < lowest_err) + { + lowest_err = err; + best_l = l; + best_h = h; + } + } + } + + g_pvrtc2_trans_match34[v].m_l = (uint8_t)best_l; + g_pvrtc2_trans_match34[v].m_h = (uint8_t)best_h; + } + + for (uint32_t v = 0; v < 256; v++) + { + int best_l = 0, best_h = 0, lowest_err = INT_MAX; + + for (uint32_t l = 0; l < 16; l++) + { + uint32_t le = (l << 1) | (l >> 3); + le = (le << 3) | (le >> 2); + + for (uint32_t h = 0; h < 16; h++) + { + uint32_t he = (h << 1) | (h >> 3); + he = (he << 3) | (he >> 2); + + uint32_t m = (le * 5 + he * 3) / 8; + + int err = labs((int)v - (int)m); + if (err < lowest_err) + { + lowest_err = err; + best_l = l; + best_h = h; + } + } + } + + g_pvrtc2_trans_match44[v].m_l = (uint8_t)best_l; + g_pvrtc2_trans_match44[v].m_h = (uint8_t)best_h; + } + } +#endif // BASISD_SUPPORT_PVRTC2 + basisu_lowlevel_transcoder::basisu_lowlevel_transcoder(const etc1_global_selector_codebook* pGlobal_sel_codebook) : m_pGlobal_sel_codebook(pGlobal_sel_codebook), m_selector_history_buf_size(0) @@ -6331,12 +8136,11 @@ namespace basist } bool basisu_lowlevel_transcoder::transcode_slice(void* pDst_blocks, uint32_t num_blocks_x, uint32_t num_blocks_y, const uint8_t* pImage_data, uint32_t image_data_size, block_format fmt, - uint32_t output_block_or_pixel_stride_in_bytes, bool pvrtc_wrap_addressing, bool bc1_allow_threecolor_blocks, const basis_file_header& header, const basis_slice_desc& slice_desc, uint32_t output_row_pitch_in_blocks_or_pixels, + uint32_t output_block_or_pixel_stride_in_bytes, bool bc1_allow_threecolor_blocks, const basis_file_header& header, const basis_slice_desc& slice_desc, uint32_t output_row_pitch_in_blocks_or_pixels, basisu_transcoder_state* pState, bool transcode_alpha, void *pAlpha_blocks, uint32_t output_rows_in_pixels) { (void)transcode_alpha; (void)pAlpha_blocks; - (void)pvrtc_wrap_addressing; if (!pState) pState = &m_def_state; @@ -6349,7 +8153,12 @@ namespace basist if (basis_block_format_is_uncompressed(fmt)) output_row_pitch_in_blocks_or_pixels = slice_desc.m_orig_width; else - output_row_pitch_in_blocks_or_pixels = num_blocks_x; + { + if (fmt == block_format::cFXT1_RGB) + output_row_pitch_in_blocks_or_pixels = (slice_desc.m_orig_width + 7) / 8; + else + output_row_pitch_in_blocks_or_pixels = num_blocks_x; + } } if (basis_block_format_is_uncompressed(fmt)) @@ -6398,7 +8207,7 @@ namespace basist void* pPVRTC_work_mem = nullptr; uint32_t* pPVRTC_endpoints = nullptr; - if ((fmt == cPVRTC1_4_RGB) || (fmt == cPVRTC1_4_RGBA)) + if ((fmt == block_format::cPVRTC1_4_RGB) || (fmt == block_format::cPVRTC1_4_RGBA)) { pPVRTC_work_mem = malloc(num_blocks_x * num_blocks_y * (sizeof(decoder_etc_block) + sizeof(uint32_t))); if (!pPVRTC_work_mem) @@ -6608,7 +8417,7 @@ namespace basist (*pPrev_frame_indices)[block_x + block_y * num_blocks_x] = endpoint_index | (selector_index << 16); #if BASISD_ENABLE_DEBUG_FLAGS - if ((g_debug_flags & cDebugFlagVisCRs) && ((fmt == cETC1) || (fmt == cBC1))) + if ((g_debug_flags & cDebugFlagVisCRs) && ((fmt == block_format::cETC1) || (fmt == block_format::cBC1))) { if ((is_video) && (pred == 2)) { @@ -6624,7 +8433,7 @@ namespace basist switch (fmt) { - case cETC1: + case block_format::cETC1: { decoder_etc_block* pDst_block = reinterpret_cast<decoder_etc_block*>(static_cast<uint8_t*>(pDst_blocks) + (block_x + block_y * output_row_pitch_in_blocks_or_pixels) * output_block_or_pixel_stride_in_bytes); @@ -6637,7 +8446,7 @@ namespace basist break; } - case cBC1: + case block_format::cBC1: { void* pDst_block = static_cast<uint8_t*>(pDst_blocks) + (block_x + block_y * output_row_pitch_in_blocks_or_pixels) * output_block_or_pixel_stride_in_bytes; @@ -6653,7 +8462,7 @@ namespace basist #endif break; } - case cBC4: + case block_format::cBC4: { #if BASISD_SUPPORT_DXT5A void* pDst_block = static_cast<uint8_t*>(pDst_blocks) + (block_x + block_y * output_row_pitch_in_blocks_or_pixels) * output_block_or_pixel_stride_in_bytes; @@ -6663,7 +8472,7 @@ namespace basist #endif break; } - case cPVRTC1_4_RGB: + case block_format::cPVRTC1_4_RGB: { #if BASISD_SUPPORT_PVRTC1 block.set_base5_color(decoder_etc_block::pack_color5(pEndpoints->m_color5, false)); @@ -6699,7 +8508,7 @@ namespace basist break; } - case cPVRTC1_4_RGBA: + case block_format::cPVRTC1_4_RGBA: { #if BASISD_SUPPORT_PVRTC1 assert(pAlpha_blocks); @@ -6750,7 +8559,7 @@ namespace basist break; } - case cBC7_M6_OPAQUE_ONLY: + case block_format::cBC7_M6_OPAQUE_ONLY: { #if BASISD_SUPPORT_BC7_MODE6_OPAQUE_ONLY void* pDst_block = static_cast<uint8_t*>(pDst_blocks) + (block_x + block_y * output_row_pitch_in_blocks_or_pixels) * output_block_or_pixel_stride_in_bytes; @@ -6760,7 +8569,7 @@ namespace basist #endif break; } - case cBC7_M5_COLOR: + case block_format::cBC7_M5_COLOR: { #if BASISD_SUPPORT_BC7_MODE5 void* pDst_block = static_cast<uint8_t*>(pDst_blocks) + (block_x + block_y * output_row_pitch_in_blocks_or_pixels) * output_block_or_pixel_stride_in_bytes; @@ -6770,7 +8579,7 @@ namespace basist #endif break; } - case cBC7_M5_ALPHA: + case block_format::cBC7_M5_ALPHA: { #if BASISD_SUPPORT_BC7_MODE5 void* pDst_block = static_cast<uint8_t*>(pDst_blocks) + (block_x + block_y * output_row_pitch_in_blocks_or_pixels) * output_block_or_pixel_stride_in_bytes; @@ -6780,17 +8589,17 @@ namespace basist #endif break; } - case cETC2_EAC_A8: + case block_format::cETC2_EAC_A8: { #if BASISD_SUPPORT_ETC2_EAC_A8 void* pDst_block = static_cast<uint8_t*>(pDst_blocks) + (block_x + block_y * output_row_pitch_in_blocks_or_pixels) * output_block_or_pixel_stride_in_bytes; - convert_etc1s_to_etc2_eac_a8(static_cast<eac_a8_block*>(pDst_block), pEndpoints, pSelector); + convert_etc1s_to_etc2_eac_a8(static_cast<eac_block*>(pDst_block), pEndpoints, pSelector); #else assert(0); #endif break; } - case cASTC_4x4: + case block_format::cASTC_4x4: { #if BASISD_SUPPORT_ASTC void* pDst_block = static_cast<uint8_t*>(pDst_blocks) + (block_x + block_y * output_row_pitch_in_blocks_or_pixels) * output_block_or_pixel_stride_in_bytes; @@ -6800,7 +8609,7 @@ namespace basist #endif break; } - case cATC_RGB: + case block_format::cATC_RGB: { #if BASISD_SUPPORT_ATC void* pDst_block = static_cast<uint8_t*>(pDst_blocks) + (block_x + block_y * output_row_pitch_in_blocks_or_pixels) * output_block_or_pixel_stride_in_bytes; @@ -6810,14 +8619,48 @@ namespace basist #endif break; } - case cIndices: + case block_format::cFXT1_RGB: + { +#if BASISD_SUPPORT_FXT1 + const uint32_t fxt1_block_x = block_x >> 1; + const uint32_t fxt1_block_y = block_y; + const uint32_t fxt1_subblock = block_x & 1; + + void* pDst_block = static_cast<uint8_t*>(pDst_blocks) + (fxt1_block_x + fxt1_block_y * output_row_pitch_in_blocks_or_pixels) * output_block_or_pixel_stride_in_bytes; + + convert_etc1s_to_fxt1(pDst_block, pEndpoints, pSelector, fxt1_subblock); +#else + assert(0); +#endif + break; + } + case block_format::cPVRTC2_4_RGB: + { +#if BASISD_SUPPORT_PVRTC2 + void* pDst_block = static_cast<uint8_t*>(pDst_blocks) + (block_x + block_y * output_row_pitch_in_blocks_or_pixels) * output_block_or_pixel_stride_in_bytes; + convert_etc1s_to_pvrtc2_rgb(pDst_block, pEndpoints, pSelector); +#endif + break; + } + case block_format::cPVRTC2_4_RGBA: + { +#if BASISD_SUPPORT_PVRTC2 + assert(transcode_alpha); + + void* pDst_block = static_cast<uint8_t*>(pDst_blocks) + (block_x + block_y * output_row_pitch_in_blocks_or_pixels) * output_block_or_pixel_stride_in_bytes; + + convert_etc1s_to_pvrtc2_rgba(pDst_block, pEndpoints, pSelector, &m_endpoints[0], &m_selectors[0]); +#endif + break; + } + case block_format::cIndices: { uint16_t* pDst_block = reinterpret_cast<uint16_t *>(static_cast<uint8_t*>(pDst_blocks) + (block_x + block_y * output_row_pitch_in_blocks_or_pixels) * output_block_or_pixel_stride_in_bytes); pDst_block[0] = static_cast<uint16_t>(endpoint_index); pDst_block[1] = static_cast<uint16_t>(selector_index); break; } - case cA32: + case block_format::cA32: { assert(sizeof(uint32_t) == output_block_or_pixel_stride_in_bytes); uint8_t* pDst_pixels = static_cast<uint8_t*>(pDst_blocks) + (block_x * 4 + block_y * 4 * output_row_pitch_in_blocks_or_pixels) * sizeof(uint32_t); @@ -6857,7 +8700,7 @@ namespace basist break; } - case cRGB32: + case block_format::cRGB32: { assert(sizeof(uint32_t) == output_block_or_pixel_stride_in_bytes); uint8_t* pDst_pixels = static_cast<uint8_t*>(pDst_blocks) + (block_x * 4 + block_y * 4 * output_row_pitch_in_blocks_or_pixels) * sizeof(uint32_t); @@ -6886,7 +8729,7 @@ namespace basist break; } - case cRGBA32: + case block_format::cRGBA32: { assert(sizeof(uint32_t) == output_block_or_pixel_stride_in_bytes); uint8_t* pDst_pixels = static_cast<uint8_t*>(pDst_blocks) + (block_x * 4 + block_y * 4 * output_row_pitch_in_blocks_or_pixels) * sizeof(uint32_t); @@ -6916,8 +8759,8 @@ namespace basist break; } - case cRGB565: - case cBGR565: + case block_format::cRGB565: + case block_format::cBGR565: { assert(sizeof(uint16_t) == output_block_or_pixel_stride_in_bytes); uint8_t* pDst_pixels = static_cast<uint8_t*>(pDst_blocks) + (block_x * 4 + block_y * 4 * output_row_pitch_in_blocks_or_pixels) * sizeof(uint16_t); @@ -6929,7 +8772,7 @@ namespace basist decoder_etc_block::get_block_colors5(colors, pEndpoints->m_color5, pEndpoints->m_inten5); uint16_t packed_colors[4]; - if (fmt == cRGB565) + if (fmt == block_format::cRGB565) { for (uint32_t i = 0; i < 4; i++) packed_colors[i] = static_cast<uint16_t>(((colors[i].r >> 3) << 11) | ((colors[i].g >> 2) << 5) | (colors[i].b >> 3)); @@ -6952,7 +8795,7 @@ namespace basist break; } - case cRGBA4444_COLOR: + case block_format::cRGBA4444_COLOR: { assert(sizeof(uint16_t) == output_block_or_pixel_stride_in_bytes); uint8_t* pDst_pixels = static_cast<uint8_t*>(pDst_blocks) + (block_x * 4 + block_y * 4 * output_row_pitch_in_blocks_or_pixels) * sizeof(uint16_t); @@ -6983,7 +8826,7 @@ namespace basist break; } - case cRGBA4444_COLOR_OPAQUE: + case block_format::cRGBA4444_COLOR_OPAQUE: { assert(sizeof(uint16_t) == output_block_or_pixel_stride_in_bytes); uint8_t* pDst_pixels = static_cast<uint8_t*>(pDst_blocks) + (block_x * 4 + block_y * 4 * output_row_pitch_in_blocks_or_pixels) * sizeof(uint16_t); @@ -7010,7 +8853,7 @@ namespace basist break; } - case cRGBA4444_ALPHA: + case block_format::cRGBA4444_ALPHA: { assert(sizeof(uint16_t) == output_block_or_pixel_stride_in_bytes); uint8_t* pDst_pixels = static_cast<uint8_t*>(pDst_blocks) + (block_x * 4 + block_y * 4 * output_row_pitch_in_blocks_or_pixels) * sizeof(uint16_t); @@ -7037,6 +8880,16 @@ namespace basist break; } + case block_format::cETC2_EAC_R11: + { +#if BASISD_SUPPORT_ETC2_EAC_RG11 + void* pDst_block = static_cast<uint8_t*>(pDst_blocks) + (block_x + block_y * output_row_pitch_in_blocks_or_pixels) * output_block_or_pixel_stride_in_bytes; + convert_etc1s_to_etc2_eac_r11(static_cast<eac_block*>(pDst_block), pEndpoints, pSelector); +#else + assert(0); +#endif + break; + } default: { assert(0); @@ -7058,10 +8911,10 @@ namespace basist #if BASISD_SUPPORT_PVRTC1 // PVRTC post process - create per-pixel modulation values. - if (fmt == cPVRTC1_4_RGB) - fixup_pvrtc1_4_modulation_rgb((decoder_etc_block*)pPVRTC_work_mem, pPVRTC_endpoints, pDst_blocks, num_blocks_x, num_blocks_y, pvrtc_wrap_addressing); - else if (fmt == cPVRTC1_4_RGBA) - fixup_pvrtc1_4_modulation_rgba((decoder_etc_block*)pPVRTC_work_mem, pPVRTC_endpoints, pDst_blocks, num_blocks_x, num_blocks_y, pvrtc_wrap_addressing, pAlpha_blocks, &m_endpoints[0], &m_selectors[0]); + if (fmt == block_format::cPVRTC1_4_RGB) + fixup_pvrtc1_4_modulation_rgb((decoder_etc_block*)pPVRTC_work_mem, pPVRTC_endpoints, pDst_blocks, num_blocks_x, num_blocks_y); + else if (fmt == block_format::cPVRTC1_4_RGBA) + fixup_pvrtc1_4_modulation_rgba((decoder_etc_block*)pPVRTC_work_mem, pPVRTC_endpoints, pDst_blocks, num_blocks_x, num_blocks_y, pAlpha_blocks, &m_endpoints[0], &m_selectors[0]); #endif // BASISD_SUPPORT_PVRTC1 if (pPVRTC_work_mem) @@ -7612,7 +9465,7 @@ namespace basist const basis_slice_desc& slice_desc = reinterpret_cast<const basis_slice_desc*>(pDataU8 + pHeader->m_slice_desc_file_ofs)[slice_index]; - uint32_t total_blocks = slice_desc.m_num_blocks_x * slice_desc.m_num_blocks_y; + uint32_t total_4x4_blocks = slice_desc.m_num_blocks_x * slice_desc.m_num_blocks_y; if (basis_block_format_is_uncompressed(fmt)) { @@ -7630,18 +9483,30 @@ namespace basist return false; } } + else if (fmt == block_format::cFXT1_RGB) + { + const uint32_t num_blocks_fxt1_x = (slice_desc.m_orig_width + 7) / 8; + const uint32_t num_blocks_fxt1_y = (slice_desc.m_orig_height + 3) / 4; + const uint32_t total_blocks_fxt1 = num_blocks_fxt1_x * num_blocks_fxt1_y; + + if (output_blocks_buf_size_in_blocks_or_pixels < total_blocks_fxt1) + { + BASISU_DEVEL_ERROR("basisu_transcoder::transcode_slice: output_blocks_buf_size_in_blocks_or_pixels < total_blocks_fxt1\n"); + return false; + } + } else { - if (output_blocks_buf_size_in_blocks_or_pixels < total_blocks) + if (output_blocks_buf_size_in_blocks_or_pixels < total_4x4_blocks) { BASISU_DEVEL_ERROR("basisu_transcoder::transcode_slice: output_blocks_buf_size_in_blocks_or_pixels < total_blocks\n"); return false; } } - if (fmt != cETC1) + if (fmt != block_format::cETC1) { - if ((fmt == cPVRTC1_4_RGB) || (fmt == cPVRTC1_4_RGBA)) + if ((fmt == block_format::cPVRTC1_4_RGB) || (fmt == block_format::cPVRTC1_4_RGBA)) { if ((!basisu::is_pow2(slice_desc.m_num_blocks_x * 4)) || (!basisu::is_pow2(slice_desc.m_num_blocks_y * 4))) { @@ -7667,7 +9532,7 @@ namespace basist return m_lowlevel_decoder.transcode_slice(pOutput_blocks, slice_desc.m_num_blocks_x, slice_desc.m_num_blocks_y, pDataU8 + slice_desc.m_file_ofs, slice_desc.m_file_size, - fmt, output_block_or_pixel_stride_in_bytes, (decode_flags & cDecodeFlagsPVRTCWrapAddressing) != 0, (decode_flags & cDecodeFlagsBC1ForbidThreeColorBlocks) == 0, *pHeader, slice_desc, output_row_pitch_in_blocks_or_pixels, pState, + fmt, output_block_or_pixel_stride_in_bytes, (decode_flags & cDecodeFlagsBC1ForbidThreeColorBlocks) == 0, *pHeader, slice_desc, output_row_pitch_in_blocks_or_pixels, pState, (decode_flags & cDecodeFlagsOutputHasAlphaIndices) != 0, pAlpha_blocks, output_rows_in_pixels); } @@ -7731,11 +9596,11 @@ namespace basist if (!output_row_pitch_in_blocks_or_pixels) output_row_pitch_in_blocks_or_pixels = num_blocks_x; - - if (fmt == cETC2_EAC_A8) + + if ((fmt == block_format::cETC2_EAC_A8) || (fmt == block_format::cETC2_EAC_R11)) { #if BASISD_SUPPORT_ETC2_EAC_A8 - eac_a8_block blk; + eac_block blk; blk.m_base = 255; blk.m_multiplier = 1; blk.m_table = 13; @@ -7755,7 +9620,7 @@ namespace basist } #endif } - else if (fmt == cBC4) + else if (fmt == block_format::cBC4) { #if BASISD_SUPPORT_DXT5A dxt5a_block blk; @@ -7822,10 +9687,10 @@ namespace basist return false; } - if ((fmt == cTFPVRTC1_4_RGBA) && (!basis_file_has_alpha_slices)) + if ((fmt == transcoder_texture_format::cTFPVRTC1_4_RGBA) && (!basis_file_has_alpha_slices)) { // Switch to PVRTC1 RGB if the input doesn't have alpha. - fmt = cTFPVRTC1_4_RGB; + fmt = transcoder_texture_format::cTFPVRTC1_4_RGB; } if (pSlice_descs[slice_index].m_flags & cSliceDescFlagsIsAlphaData) @@ -7866,7 +9731,7 @@ namespace basist const uint32_t total_slice_blocks = pSlice_descs[slice_index].m_num_blocks_x * pSlice_descs[slice_index].m_num_blocks_y; - if (((fmt == cTFPVRTC1_4_RGB) || (fmt == cTFPVRTC1_4_RGBA)) && (output_blocks_buf_size_in_blocks_or_pixels > total_slice_blocks)) + if (((fmt == transcoder_texture_format::cTFPVRTC1_4_RGB) || (fmt == transcoder_texture_format::cTFPVRTC1_4_RGBA)) && (output_blocks_buf_size_in_blocks_or_pixels > total_slice_blocks)) { // The transcoder doesn't write beyond total_slice_blocks, so we need to clear the rest ourselves. // For GL usage, PVRTC1 4bpp image size is (max(width, 8)* max(height, 8) * 4 + 7) / 8. @@ -7876,21 +9741,21 @@ namespace basist switch (fmt) { - case cTFETC1: + case transcoder_texture_format::cTFETC1_RGB: { uint32_t slice_index_to_decode = slice_index; // If the caller wants us to transcode the mip level's alpha data, then use the next slice. if ((basis_file_has_alpha_slices) && (transcode_alpha_data_to_opaque_formats)) slice_index_to_decode++; - status = transcode_slice(pData, data_size, slice_index_to_decode, pOutput_blocks, output_blocks_buf_size_in_blocks_or_pixels, cETC1, bytes_per_block, decode_flags, output_row_pitch_in_blocks_or_pixels, pState); + status = transcode_slice(pData, data_size, slice_index_to_decode, pOutput_blocks, output_blocks_buf_size_in_blocks_or_pixels, block_format::cETC1, bytes_per_block, decode_flags, output_row_pitch_in_blocks_or_pixels, pState); if (!status) { BASISU_DEVEL_ERROR("basisu_transcoder::transcode_image_level: transcode_slice() to ETC1 failed\n"); } break; } - case cTFBC1: + case transcoder_texture_format::cTFBC1_RGB: { #if !BASISD_SUPPORT_DXT1 return false; @@ -7900,14 +9765,14 @@ namespace basist if ((basis_file_has_alpha_slices) && (transcode_alpha_data_to_opaque_formats)) slice_index_to_decode++; - status = transcode_slice(pData, data_size, slice_index_to_decode, pOutput_blocks, output_blocks_buf_size_in_blocks_or_pixels, cBC1, bytes_per_block, decode_flags, output_row_pitch_in_blocks_or_pixels, pState); + status = transcode_slice(pData, data_size, slice_index_to_decode, pOutput_blocks, output_blocks_buf_size_in_blocks_or_pixels, block_format::cBC1, bytes_per_block, decode_flags, output_row_pitch_in_blocks_or_pixels, pState); if (!status) { BASISU_DEVEL_ERROR("basisu_transcoder::transcode_image_level: transcode_slice() to BC1 failed\n"); } break; } - case cTFBC4: + case transcoder_texture_format::cTFBC4_R: { #if !BASISD_SUPPORT_DXT5A return false; @@ -7917,14 +9782,14 @@ namespace basist if ((basis_file_has_alpha_slices) && (transcode_alpha_data_to_opaque_formats)) slice_index_to_decode++; - status = transcode_slice(pData, data_size, slice_index_to_decode, pOutput_blocks, output_blocks_buf_size_in_blocks_or_pixels, cBC4, bytes_per_block, decode_flags, output_row_pitch_in_blocks_or_pixels, pState); + status = transcode_slice(pData, data_size, slice_index_to_decode, pOutput_blocks, output_blocks_buf_size_in_blocks_or_pixels, block_format::cBC4, bytes_per_block, decode_flags, output_row_pitch_in_blocks_or_pixels, pState); if (!status) { BASISU_DEVEL_ERROR("basisu_transcoder::transcode_image_level: transcode_slice() to BC4 failed\n"); } break; } - case cTFPVRTC1_4_RGB: + case transcoder_texture_format::cTFPVRTC1_4_RGB: { #if !BASISD_SUPPORT_PVRTC1 return false; @@ -7935,14 +9800,14 @@ namespace basist slice_index_to_decode++; // output_row_pitch_in_blocks_or_pixels is actually ignored because we're transcoding to PVRTC1. (Print a dev warning if it's != 0?) - status = transcode_slice(pData, data_size, slice_index_to_decode, pOutput_blocks, output_blocks_buf_size_in_blocks_or_pixels, cPVRTC1_4_RGB, bytes_per_block, decode_flags, output_row_pitch_in_blocks_or_pixels, pState); + status = transcode_slice(pData, data_size, slice_index_to_decode, pOutput_blocks, output_blocks_buf_size_in_blocks_or_pixels, block_format::cPVRTC1_4_RGB, bytes_per_block, decode_flags, output_row_pitch_in_blocks_or_pixels, pState); if (!status) { BASISU_DEVEL_ERROR("basisu_transcoder::transcode_image_level: transcode_slice() to PVRTC1 4 RGB failed\n"); } break; } - case cTFPVRTC1_4_RGBA: + case transcoder_texture_format::cTFPVRTC1_4_RGBA: { #if !BASISD_SUPPORT_PVRTC1 return false; @@ -7953,7 +9818,7 @@ namespace basist std::vector<uint32_t> temp_block_indices(total_slice_blocks); // First transcode alpha data to temp buffer - status = transcode_slice(pData, data_size, slice_index + 1, &temp_block_indices[0], total_slice_blocks, cIndices, sizeof(uint32_t), decode_flags, pSlice_descs[slice_index].m_num_blocks_x, pState); + status = transcode_slice(pData, data_size, slice_index + 1, &temp_block_indices[0], total_slice_blocks, block_format::cIndices, sizeof(uint32_t), decode_flags, pSlice_descs[slice_index].m_num_blocks_x, pState); if (!status) { BASISU_DEVEL_ERROR("basisu_transcoder::transcode_image_level: transcode_slice() to PVRTC1 4 RGBA failed (0)\n"); @@ -7961,7 +9826,7 @@ namespace basist else { // output_row_pitch_in_blocks_or_pixels is actually ignored because we're transcoding to PVRTC1. (Print a dev warning if it's != 0?) - status = transcode_slice(pData, data_size, slice_index, pOutput_blocks, output_blocks_buf_size_in_blocks_or_pixels, cPVRTC1_4_RGBA, bytes_per_block, decode_flags, output_row_pitch_in_blocks_or_pixels, pState, &temp_block_indices[0]); + status = transcode_slice(pData, data_size, slice_index, pOutput_blocks, output_blocks_buf_size_in_blocks_or_pixels, block_format::cPVRTC1_4_RGBA, bytes_per_block, decode_flags, output_row_pitch_in_blocks_or_pixels, pState, &temp_block_indices[0]); if (!status) { BASISU_DEVEL_ERROR("basisu_transcoder::transcode_image_level: transcode_slice() to PVRTC1 4 RGBA failed (1)\n"); @@ -7970,7 +9835,7 @@ namespace basist break; } - case cTFBC7_M6_OPAQUE_ONLY: + case transcoder_texture_format::cTFBC7_M6_RGB: { #if !BASISD_SUPPORT_BC7_MODE6_OPAQUE_ONLY return false; @@ -7980,50 +9845,54 @@ namespace basist if ((basis_file_has_alpha_slices) && (transcode_alpha_data_to_opaque_formats)) slice_index_to_decode++; - status = transcode_slice(pData, data_size, slice_index_to_decode, pOutput_blocks, output_blocks_buf_size_in_blocks_or_pixels, cBC7_M6_OPAQUE_ONLY, bytes_per_block, decode_flags, output_row_pitch_in_blocks_or_pixels, pState); + status = transcode_slice(pData, data_size, slice_index_to_decode, pOutput_blocks, output_blocks_buf_size_in_blocks_or_pixels, block_format::cBC7_M6_OPAQUE_ONLY, bytes_per_block, decode_flags, output_row_pitch_in_blocks_or_pixels, pState); if (!status) { BASISU_DEVEL_ERROR("basisu_transcoder::transcode_image_level: transcode_slice() to BC7 m6 opaque only failed\n"); } break; } - case cTFBC7_M5: + case transcoder_texture_format::cTFBC7_M5_RGBA: { #if !BASISD_SUPPORT_BC7_MODE5 return false; #else + assert(bytes_per_block == 16); + // First transcode the color slice. The cBC7_M5_COLOR transcoder will output opaque mode 5 blocks. - status = transcode_slice(pData, data_size, slice_index, pOutput_blocks, output_blocks_buf_size_in_blocks_or_pixels, cBC7_M5_COLOR, 16, decode_flags, output_row_pitch_in_blocks_or_pixels, pState); + status = transcode_slice(pData, data_size, slice_index, pOutput_blocks, output_blocks_buf_size_in_blocks_or_pixels, block_format::cBC7_M5_COLOR, 16, decode_flags, output_row_pitch_in_blocks_or_pixels, pState); if ((status) && (basis_file_has_alpha_slices)) { // Now transcode the alpha slice. The cBC7_M5_ALPHA transcoder will now change the opaque mode 5 blocks to blocks with alpha. - status = transcode_slice(pData, data_size, slice_index + 1, pOutput_blocks, output_blocks_buf_size_in_blocks_or_pixels, cBC7_M5_ALPHA, 16, decode_flags, output_row_pitch_in_blocks_or_pixels, pState); + status = transcode_slice(pData, data_size, slice_index + 1, pOutput_blocks, output_blocks_buf_size_in_blocks_or_pixels, block_format::cBC7_M5_ALPHA, 16, decode_flags, output_row_pitch_in_blocks_or_pixels, pState); } break; #endif } - case cTFETC2: + case transcoder_texture_format::cTFETC2_RGBA: { #if !BASISD_SUPPORT_ETC2_EAC_A8 return false; #endif + assert(bytes_per_block == 16); + if (basis_file_has_alpha_slices) { // First decode the alpha data - status = transcode_slice(pData, data_size, slice_index + 1, pOutput_blocks, output_blocks_buf_size_in_blocks_or_pixels, cETC2_EAC_A8, 16, decode_flags, output_row_pitch_in_blocks_or_pixels, pState); + status = transcode_slice(pData, data_size, slice_index + 1, pOutput_blocks, output_blocks_buf_size_in_blocks_or_pixels, block_format::cETC2_EAC_A8, 16, decode_flags, output_row_pitch_in_blocks_or_pixels, pState); } else { - write_opaque_alpha_blocks(pSlice_descs[slice_index].m_num_blocks_x, pSlice_descs[slice_index].m_num_blocks_y, pOutput_blocks, output_blocks_buf_size_in_blocks_or_pixels, cETC2_EAC_A8, 16, output_row_pitch_in_blocks_or_pixels); + write_opaque_alpha_blocks(pSlice_descs[slice_index].m_num_blocks_x, pSlice_descs[slice_index].m_num_blocks_y, pOutput_blocks, output_blocks_buf_size_in_blocks_or_pixels, block_format::cETC2_EAC_A8, 16, output_row_pitch_in_blocks_or_pixels); status = true; } if (status) { // Now decode the color data - status = transcode_slice(pData, data_size, slice_index, (uint8_t*)pOutput_blocks + 8, output_blocks_buf_size_in_blocks_or_pixels, cETC1, 16, decode_flags, output_row_pitch_in_blocks_or_pixels, pState); + status = transcode_slice(pData, data_size, slice_index, (uint8_t*)pOutput_blocks + 8, output_blocks_buf_size_in_blocks_or_pixels, block_format::cETC1, 16, decode_flags, output_row_pitch_in_blocks_or_pixels, pState); if (!status) { BASISU_DEVEL_ERROR("basisu_transcoder::transcode_image_level: transcode_slice() to ETC2 RGB failed\n"); @@ -8035,7 +9904,7 @@ namespace basist } break; } - case cTFBC3: + case transcoder_texture_format::cTFBC3_RGBA: { #if !BASISD_SUPPORT_DXT1 return false; @@ -8043,21 +9912,23 @@ namespace basist #if !BASISD_SUPPORT_DXT5A return false; #endif + assert(bytes_per_block == 16); + // First decode the alpha data if (basis_file_has_alpha_slices) { - status = transcode_slice(pData, data_size, slice_index + 1, pOutput_blocks, output_blocks_buf_size_in_blocks_or_pixels, cBC4, 16, decode_flags, output_row_pitch_in_blocks_or_pixels, pState); + status = transcode_slice(pData, data_size, slice_index + 1, pOutput_blocks, output_blocks_buf_size_in_blocks_or_pixels, block_format::cBC4, 16, decode_flags, output_row_pitch_in_blocks_or_pixels, pState); } else { - write_opaque_alpha_blocks(pSlice_descs[slice_index].m_num_blocks_x, pSlice_descs[slice_index].m_num_blocks_y, pOutput_blocks, output_blocks_buf_size_in_blocks_or_pixels, cBC4, 16, output_row_pitch_in_blocks_or_pixels); + write_opaque_alpha_blocks(pSlice_descs[slice_index].m_num_blocks_x, pSlice_descs[slice_index].m_num_blocks_y, pOutput_blocks, output_blocks_buf_size_in_blocks_or_pixels, block_format::cBC4, 16, output_row_pitch_in_blocks_or_pixels); status = true; } if (status) { // Now decode the color data. Forbid 3 color blocks, which aren't allowed in BC3. - status = transcode_slice(pData, data_size, slice_index, (uint8_t*)pOutput_blocks + 8, output_blocks_buf_size_in_blocks_or_pixels, cBC1, 16, decode_flags | cDecodeFlagsBC1ForbidThreeColorBlocks, output_row_pitch_in_blocks_or_pixels, pState); + status = transcode_slice(pData, data_size, slice_index, (uint8_t*)pOutput_blocks + 8, output_blocks_buf_size_in_blocks_or_pixels, block_format::cBC1, 16, decode_flags | cDecodeFlagsBC1ForbidThreeColorBlocks, output_row_pitch_in_blocks_or_pixels, pState); if (!status) { BASISU_DEVEL_ERROR("basisu_transcoder::transcode_image_level: transcode_slice() to BC3 RGB failed\n"); @@ -8070,19 +9941,21 @@ namespace basist break; } - case cTFBC5: + case transcoder_texture_format::cTFBC5_RG: { #if !BASISD_SUPPORT_DXT5A return false; #endif + assert(bytes_per_block == 16); + // Decode the R data (actually the green channel of the color data slice in the basis file) - status = transcode_slice(pData, data_size, slice_index, pOutput_blocks, output_blocks_buf_size_in_blocks_or_pixels, cBC4, 16, decode_flags, output_row_pitch_in_blocks_or_pixels, pState); + status = transcode_slice(pData, data_size, slice_index, pOutput_blocks, output_blocks_buf_size_in_blocks_or_pixels, block_format::cBC4, 16, decode_flags, output_row_pitch_in_blocks_or_pixels, pState); if (status) { if (basis_file_has_alpha_slices) { // Decode the G data (actually the green channel of the alpha data slice in the basis file) - status = transcode_slice(pData, data_size, slice_index + 1, (uint8_t*)pOutput_blocks + 8, output_blocks_buf_size_in_blocks_or_pixels, cBC4, 16, decode_flags, output_row_pitch_in_blocks_or_pixels, pState); + status = transcode_slice(pData, data_size, slice_index + 1, (uint8_t*)pOutput_blocks + 8, output_blocks_buf_size_in_blocks_or_pixels, block_format::cBC4, 16, decode_flags, output_row_pitch_in_blocks_or_pixels, pState); if (!status) { BASISU_DEVEL_ERROR("basisu_transcoder::transcode_image_level: transcode_slice() to BC5 1 failed\n"); @@ -8090,7 +9963,7 @@ namespace basist } else { - write_opaque_alpha_blocks(pSlice_descs[slice_index].m_num_blocks_x, pSlice_descs[slice_index].m_num_blocks_y, (uint8_t*)pOutput_blocks + 8, output_blocks_buf_size_in_blocks_or_pixels, cBC4, 16, output_row_pitch_in_blocks_or_pixels); + write_opaque_alpha_blocks(pSlice_descs[slice_index].m_num_blocks_x, pSlice_descs[slice_index].m_num_blocks_y, (uint8_t*)pOutput_blocks + 8, output_blocks_buf_size_in_blocks_or_pixels, block_format::cBC4, 16, output_row_pitch_in_blocks_or_pixels); status = true; } } @@ -8100,15 +9973,17 @@ namespace basist } break; } - case cTFASTC_4x4: + case transcoder_texture_format::cTFASTC_4x4_RGBA: { #if !BASISD_SUPPORT_ASTC return false; #endif + assert(bytes_per_block == 16); + if (basis_file_has_alpha_slices) { // First decode the alpha data to the output (we're using the output texture as a temp buffer here). - status = transcode_slice(pData, data_size, slice_index + 1, (uint8_t*)pOutput_blocks, output_blocks_buf_size_in_blocks_or_pixels, cIndices, 16, decode_flags, output_row_pitch_in_blocks_or_pixels, pState); + status = transcode_slice(pData, data_size, slice_index + 1, (uint8_t*)pOutput_blocks, output_blocks_buf_size_in_blocks_or_pixels, block_format::cIndices, 16, decode_flags, output_row_pitch_in_blocks_or_pixels, pState); if (!status) { BASISU_DEVEL_ERROR("basisu_transcoder::transcode_image_level: transcode_slice() to failed\n"); @@ -8117,15 +9992,15 @@ namespace basist { // Now decode the color data and transcode to ASTC. The transcoder function will read the alpha selector data from the output texture as it converts and // transcode both the alpha and color data at the same time to ASTC. - status = transcode_slice(pData, data_size, slice_index, pOutput_blocks, output_blocks_buf_size_in_blocks_or_pixels, cASTC_4x4, 16, decode_flags | cDecodeFlagsOutputHasAlphaIndices, output_row_pitch_in_blocks_or_pixels, pState); + status = transcode_slice(pData, data_size, slice_index, pOutput_blocks, output_blocks_buf_size_in_blocks_or_pixels, block_format::cASTC_4x4, 16, decode_flags | cDecodeFlagsOutputHasAlphaIndices, output_row_pitch_in_blocks_or_pixels, pState); } } else - status = transcode_slice(pData, data_size, slice_index, pOutput_blocks, output_blocks_buf_size_in_blocks_or_pixels, cASTC_4x4, 16, decode_flags, output_row_pitch_in_blocks_or_pixels, pState); + status = transcode_slice(pData, data_size, slice_index, pOutput_blocks, output_blocks_buf_size_in_blocks_or_pixels, block_format::cASTC_4x4, 16, decode_flags, output_row_pitch_in_blocks_or_pixels, pState); break; } - case cTFATC_RGB: + case transcoder_texture_format::cTFATC_RGB: { #if !BASISD_SUPPORT_ATC return false; @@ -8135,14 +10010,14 @@ namespace basist if ((basis_file_has_alpha_slices) && (transcode_alpha_data_to_opaque_formats)) slice_index_to_decode++; - status = transcode_slice(pData, data_size, slice_index_to_decode, pOutput_blocks, output_blocks_buf_size_in_blocks_or_pixels, cATC_RGB, bytes_per_block, decode_flags, output_row_pitch_in_blocks_or_pixels, pState); + status = transcode_slice(pData, data_size, slice_index_to_decode, pOutput_blocks, output_blocks_buf_size_in_blocks_or_pixels, block_format::cATC_RGB, bytes_per_block, decode_flags, output_row_pitch_in_blocks_or_pixels, pState); if (!status) { BASISU_DEVEL_ERROR("basisu_transcoder::transcode_image_level: transcode_slice() to ATC_RGB failed\n"); } break; } - case cTFATC_RGBA_INTERPOLATED_ALPHA: + case transcoder_texture_format::cTFATC_RGBA: { #if !BASISD_SUPPORT_ATC return false; @@ -8150,20 +10025,22 @@ namespace basist #if !BASISD_SUPPORT_DXT5A return false; #endif + assert(bytes_per_block == 16); + // First decode the alpha data if (basis_file_has_alpha_slices) { - status = transcode_slice(pData, data_size, slice_index + 1, pOutput_blocks, output_blocks_buf_size_in_blocks_or_pixels, cBC4, 16, decode_flags, output_row_pitch_in_blocks_or_pixels, pState); + status = transcode_slice(pData, data_size, slice_index + 1, pOutput_blocks, output_blocks_buf_size_in_blocks_or_pixels, block_format::cBC4, 16, decode_flags, output_row_pitch_in_blocks_or_pixels, pState); } else { - write_opaque_alpha_blocks(pSlice_descs[slice_index].m_num_blocks_x, pSlice_descs[slice_index].m_num_blocks_y, pOutput_blocks, output_blocks_buf_size_in_blocks_or_pixels, cBC4, 16, output_row_pitch_in_blocks_or_pixels); + write_opaque_alpha_blocks(pSlice_descs[slice_index].m_num_blocks_x, pSlice_descs[slice_index].m_num_blocks_y, pOutput_blocks, output_blocks_buf_size_in_blocks_or_pixels, block_format::cBC4, 16, output_row_pitch_in_blocks_or_pixels); status = true; } if (status) { - status = transcode_slice(pData, data_size, slice_index, (uint8_t*)pOutput_blocks + 8, output_blocks_buf_size_in_blocks_or_pixels, cATC_RGB, 16, decode_flags, output_row_pitch_in_blocks_or_pixels, pState); + status = transcode_slice(pData, data_size, slice_index, (uint8_t*)pOutput_blocks + 8, output_blocks_buf_size_in_blocks_or_pixels, block_format::cATC_RGB, 16, decode_flags, output_row_pitch_in_blocks_or_pixels, pState); if (!status) { BASISU_DEVEL_ERROR("basisu_transcoder::transcode_image_level: transcode_slice() to ATC RGB failed\n"); @@ -8173,22 +10050,67 @@ namespace basist { BASISU_DEVEL_ERROR("basisu_transcoder::transcode_image_level: transcode_slice() to ATC A failed\n"); } + break; + } + case transcoder_texture_format::cTFPVRTC2_4_RGB: + { +#if !BASISD_SUPPORT_PVRTC2 + return false; +#endif + uint32_t slice_index_to_decode = slice_index; + // If the caller wants us to transcode the mip level's alpha data, then use the next slice. + if ((basis_file_has_alpha_slices) && (transcode_alpha_data_to_opaque_formats)) + slice_index_to_decode++; + + status = transcode_slice(pData, data_size, slice_index_to_decode, pOutput_blocks, output_blocks_buf_size_in_blocks_or_pixels, block_format::cPVRTC2_4_RGB, bytes_per_block, decode_flags, output_row_pitch_in_blocks_or_pixels, pState); + if (!status) + { + BASISU_DEVEL_ERROR("basisu_transcoder::transcode_image_level: transcode_slice() to cPVRTC2_4_RGB failed\n"); + } + break; + } + case transcoder_texture_format::cTFPVRTC2_4_RGBA: + { +#if !BASISD_SUPPORT_PVRTC2 + return false; +#endif + if (basis_file_has_alpha_slices) + { + // First decode the alpha data to the output (we're using the output texture as a temp buffer here). + status = transcode_slice(pData, data_size, slice_index + 1, (uint8_t*)pOutput_blocks, output_blocks_buf_size_in_blocks_or_pixels, block_format::cIndices, bytes_per_block, decode_flags, output_row_pitch_in_blocks_or_pixels, pState); + if (!status) + { + BASISU_DEVEL_ERROR("basisu_transcoder::transcode_image_level: transcode_slice() to failed\n"); + } + else + { + // Now decode the color data and transcode to PVRTC2 RGBA. + status = transcode_slice(pData, data_size, slice_index, pOutput_blocks, output_blocks_buf_size_in_blocks_or_pixels, block_format::cPVRTC2_4_RGBA, bytes_per_block, decode_flags | cDecodeFlagsOutputHasAlphaIndices, output_row_pitch_in_blocks_or_pixels, pState); + } + } + else + status = transcode_slice(pData, data_size, slice_index, pOutput_blocks, output_blocks_buf_size_in_blocks_or_pixels, block_format::cPVRTC2_4_RGB, bytes_per_block, decode_flags, output_row_pitch_in_blocks_or_pixels, pState); + + if (!status) + { + BASISU_DEVEL_ERROR("basisu_transcoder::transcode_image_level: transcode_slice() to cPVRTC2_4_RGBA failed\n"); + } break; } - case cTFRGBA32: + case transcoder_texture_format::cTFRGBA32: { // Raw 32bpp pixels, decoded in the usual raster order (NOT block order) into an image in memory. // First decode the alpha data if (basis_file_has_alpha_slices) - status = transcode_slice(pData, data_size, slice_index + 1, pOutput_blocks, output_blocks_buf_size_in_blocks_or_pixels, cA32, sizeof(uint32_t), decode_flags, output_row_pitch_in_blocks_or_pixels, pState, nullptr, output_rows_in_pixels); + status = transcode_slice(pData, data_size, slice_index + 1, pOutput_blocks, output_blocks_buf_size_in_blocks_or_pixels, block_format::cA32, sizeof(uint32_t), decode_flags, output_row_pitch_in_blocks_or_pixels, pState, nullptr, output_rows_in_pixels); else status = true; if (status) { - status = transcode_slice(pData, data_size, slice_index, pOutput_blocks, output_blocks_buf_size_in_blocks_or_pixels, basis_file_has_alpha_slices ? cRGB32 : cRGBA32, sizeof(uint32_t), decode_flags, output_row_pitch_in_blocks_or_pixels, pState, nullptr, output_rows_in_pixels); + status = transcode_slice(pData, data_size, slice_index, pOutput_blocks, output_blocks_buf_size_in_blocks_or_pixels, basis_file_has_alpha_slices ? block_format::cRGB32 : block_format::cRGBA32, sizeof(uint32_t), decode_flags, output_row_pitch_in_blocks_or_pixels, pState, nullptr, output_rows_in_pixels); if (!status) { BASISU_DEVEL_ERROR("basisu_transcoder::transcode_image_level: transcode_slice() to RGBA32 RGB failed\n"); @@ -8201,8 +10123,8 @@ namespace basist break; } - case cTFRGB565: - case cTFBGR565: + case transcoder_texture_format::cTFRGB565: + case transcoder_texture_format::cTFBGR565: { // Raw 16bpp pixels, decoded in the usual raster order (NOT block order) into an image in memory. @@ -8211,7 +10133,7 @@ namespace basist if ((basis_file_has_alpha_slices) && (transcode_alpha_data_to_opaque_formats)) slice_index_to_decode++; - status = transcode_slice(pData, data_size, slice_index_to_decode, pOutput_blocks, output_blocks_buf_size_in_blocks_or_pixels, (fmt == cTFRGB565) ? cRGB565 : cBGR565, sizeof(uint16_t), decode_flags, output_row_pitch_in_blocks_or_pixels, pState, nullptr, output_rows_in_pixels); + status = transcode_slice(pData, data_size, slice_index_to_decode, pOutput_blocks, output_blocks_buf_size_in_blocks_or_pixels, (fmt == transcoder_texture_format::cTFRGB565) ? block_format::cRGB565 : block_format::cBGR565, sizeof(uint16_t), decode_flags, output_row_pitch_in_blocks_or_pixels, pState, nullptr, output_rows_in_pixels); if (!status) { BASISU_DEVEL_ERROR("basisu_transcoder::transcode_image_level: transcode_slice() to RGB565 RGB failed\n"); @@ -8219,19 +10141,19 @@ namespace basist break; } - case cTFRGBA4444: + case transcoder_texture_format::cTFRGBA4444: { // Raw 16bpp pixels, decoded in the usual raster order (NOT block order) into an image in memory. // First decode the alpha data if (basis_file_has_alpha_slices) - status = transcode_slice(pData, data_size, slice_index + 1, pOutput_blocks, output_blocks_buf_size_in_blocks_or_pixels, cRGBA4444_ALPHA, sizeof(uint16_t), decode_flags, output_row_pitch_in_blocks_or_pixels, pState, nullptr, output_rows_in_pixels); + status = transcode_slice(pData, data_size, slice_index + 1, pOutput_blocks, output_blocks_buf_size_in_blocks_or_pixels, block_format::cRGBA4444_ALPHA, sizeof(uint16_t), decode_flags, output_row_pitch_in_blocks_or_pixels, pState, nullptr, output_rows_in_pixels); else status = true; if (status) { - status = transcode_slice(pData, data_size, slice_index, pOutput_blocks, output_blocks_buf_size_in_blocks_or_pixels, basis_file_has_alpha_slices ? cRGBA4444_COLOR : cRGBA4444_COLOR_OPAQUE, sizeof(uint16_t), decode_flags, output_row_pitch_in_blocks_or_pixels, pState, nullptr, output_rows_in_pixels); + status = transcode_slice(pData, data_size, slice_index, pOutput_blocks, output_blocks_buf_size_in_blocks_or_pixels, basis_file_has_alpha_slices ? block_format::cRGBA4444_COLOR : block_format::cRGBA4444_COLOR_OPAQUE, sizeof(uint16_t), decode_flags, output_row_pitch_in_blocks_or_pixels, pState, nullptr, output_rows_in_pixels); if (!status) { BASISU_DEVEL_ERROR("basisu_transcoder::transcode_image_level: transcode_slice() to RGBA4444 RGB failed\n"); @@ -8244,6 +10166,75 @@ namespace basist break; } + case transcoder_texture_format::cTFFXT1_RGB: + { +#if !BASISD_SUPPORT_FXT1 + return false; +#endif + uint32_t slice_index_to_decode = slice_index; + // If the caller wants us to transcode the mip level's alpha data, then use the next slice. + if ((basis_file_has_alpha_slices) && (transcode_alpha_data_to_opaque_formats)) + slice_index_to_decode++; + + status = transcode_slice(pData, data_size, slice_index_to_decode, pOutput_blocks, output_blocks_buf_size_in_blocks_or_pixels, block_format::cFXT1_RGB, bytes_per_block, decode_flags, output_row_pitch_in_blocks_or_pixels, pState); + if (!status) + { + BASISU_DEVEL_ERROR("basisu_transcoder::transcode_image_level: transcode_slice() to FXT1_RGB failed\n"); + } + break; + } + case transcoder_texture_format::cTFETC2_EAC_R11: + { +#if !BASISD_SUPPORT_ETC2_EAC_RG11 + return false; +#endif + uint32_t slice_index_to_decode = slice_index; + // If the caller wants us to transcode the mip level's alpha data, then use the next slice. + if ((basis_file_has_alpha_slices) && (transcode_alpha_data_to_opaque_formats)) + slice_index_to_decode++; + + status = transcode_slice(pData, data_size, slice_index_to_decode, pOutput_blocks, output_blocks_buf_size_in_blocks_or_pixels, block_format::cETC2_EAC_R11, bytes_per_block, decode_flags, output_row_pitch_in_blocks_or_pixels, pState); + if (!status) + { + BASISU_DEVEL_ERROR("basisu_transcoder::transcode_image_level: transcode_slice() to ETC2_EAC_R11 failed\n"); + } + + break; + } + case transcoder_texture_format::cTFETC2_EAC_RG11: + { +#if !BASISD_SUPPORT_ETC2_EAC_RG11 + return false; +#endif + assert(bytes_per_block == 16); + + if (basis_file_has_alpha_slices) + { + // First decode the alpha data to G + status = transcode_slice(pData, data_size, slice_index + 1, (uint8_t *)pOutput_blocks + 8, output_blocks_buf_size_in_blocks_or_pixels, block_format::cETC2_EAC_R11, 16, decode_flags, output_row_pitch_in_blocks_or_pixels, pState); + } + else + { + write_opaque_alpha_blocks(pSlice_descs[slice_index].m_num_blocks_x, pSlice_descs[slice_index].m_num_blocks_y, (uint8_t *)pOutput_blocks + 8, output_blocks_buf_size_in_blocks_or_pixels, block_format::cETC2_EAC_R11, 16, output_row_pitch_in_blocks_or_pixels); + status = true; + } + + if (status) + { + // Now decode the color data to R + status = transcode_slice(pData, data_size, slice_index, pOutput_blocks, output_blocks_buf_size_in_blocks_or_pixels, block_format::cETC2_EAC_R11, 16, decode_flags, output_row_pitch_in_blocks_or_pixels, pState); + if (!status) + { + BASISU_DEVEL_ERROR("basisu_transcoder::transcode_image_level: transcode_slice() to ETC2_EAC_R11 R failed\n"); + } + } + else + { + BASISU_DEVEL_ERROR("basisu_transcoder::transcode_image_level: transcode_slice() to ETC2_EAC_R11 G failed\n"); + } + + break; + } default: { assert(0); @@ -8259,26 +10250,31 @@ namespace basist { switch (fmt) { - case cTFETC1: - case cTFBC1: - case cTFBC4: - case cTFPVRTC1_4_RGB: - case cTFPVRTC1_4_RGBA: - case cTFATC_RGB: + case transcoder_texture_format::cTFETC1_RGB: + case transcoder_texture_format::cTFBC1_RGB: + case transcoder_texture_format::cTFBC4_R: + case transcoder_texture_format::cTFPVRTC1_4_RGB: + case transcoder_texture_format::cTFPVRTC1_4_RGBA: + case transcoder_texture_format::cTFATC_RGB: + case transcoder_texture_format::cTFPVRTC2_4_RGB: + case transcoder_texture_format::cTFPVRTC2_4_RGBA: + case transcoder_texture_format::cTFETC2_EAC_R11: return 8; - case cTFBC7_M6_OPAQUE_ONLY: - case cTFBC7_M5: - case cTFETC2: - case cTFBC3: - case cTFBC5: - case cTFASTC_4x4: - case cTFATC_RGBA_INTERPOLATED_ALPHA: + case transcoder_texture_format::cTFBC7_M6_RGB: + case transcoder_texture_format::cTFBC7_M5_RGBA: + case transcoder_texture_format::cTFETC2_RGBA: + case transcoder_texture_format::cTFBC3_RGBA: + case transcoder_texture_format::cTFBC5_RG: + case transcoder_texture_format::cTFASTC_4x4_RGBA: + case transcoder_texture_format::cTFATC_RGBA: + case transcoder_texture_format::cTFFXT1_RGB: + case transcoder_texture_format::cTFETC2_EAC_RG11: return 16; - case cTFRGBA32: + case transcoder_texture_format::cTFRGBA32: return sizeof(uint32_t) * 16; - case cTFRGB565: - case cTFBGR565: - case cTFRGBA4444: + case transcoder_texture_format::cTFRGB565: + case transcoder_texture_format::cTFBGR565: + case transcoder_texture_format::cTFRGBA4444: return sizeof(uint16_t) * 16; default: assert(0); @@ -8292,23 +10288,28 @@ namespace basist { switch (fmt) { - case cTFETC1: return "ETC1"; - case cTFBC1: return "BC1"; - case cTFBC4: return "BC4"; - case cTFPVRTC1_4_RGB: return "PVRTC1_4_RGB"; - case cTFPVRTC1_4_RGBA: return "PVRTC1_4_RGBA"; - case cTFBC7_M6_OPAQUE_ONLY: return "BC7_M6_OPAQUE_ONLY"; - case cTFBC7_M5: return "BC7_M5"; - case cTFETC2: return "ETC2"; - case cTFBC3: return "BC3"; - case cTFBC5: return "BC5"; - case cTFASTC_4x4: return "ASTC"; - case cTFATC_RGB: return "ATC_RGB"; - case cTFATC_RGBA_INTERPOLATED_ALPHA: return "ATC_RGBA_INTERPOLATED_ALPHA"; - case cTFRGBA32: return "RGBA32"; - case cTFRGB565: return "RGB565"; - case cTFBGR565: return "BGR565"; - case cTFRGBA4444: return "RGBA4444"; + case transcoder_texture_format::cTFETC1_RGB: return "ETC1_RGB"; + case transcoder_texture_format::cTFBC1_RGB: return "BC1_RGB"; + case transcoder_texture_format::cTFBC4_R: return "BC4_R"; + case transcoder_texture_format::cTFPVRTC1_4_RGB: return "PVRTC1_4_RGB"; + case transcoder_texture_format::cTFPVRTC1_4_RGBA: return "PVRTC1_4_RGBA"; + case transcoder_texture_format::cTFBC7_M6_RGB: return "BC7_M6_RGB"; + case transcoder_texture_format::cTFBC7_M5_RGBA: return "BC7_M5_RGBA"; + case transcoder_texture_format::cTFETC2_RGBA: return "ETC2_RGBA"; + case transcoder_texture_format::cTFBC3_RGBA: return "BC3_RGBA"; + case transcoder_texture_format::cTFBC5_RG: return "BC5_RG"; + case transcoder_texture_format::cTFASTC_4x4_RGBA: return "ASTC_RGBA"; + case transcoder_texture_format::cTFATC_RGB: return "ATC_RGB"; + case transcoder_texture_format::cTFATC_RGBA: return "ATC_RGBA"; + case transcoder_texture_format::cTFRGBA32: return "RGBA32"; + case transcoder_texture_format::cTFRGB565: return "RGB565"; + case transcoder_texture_format::cTFBGR565: return "BGR565"; + case transcoder_texture_format::cTFRGBA4444: return "RGBA4444"; + case transcoder_texture_format::cTFFXT1_RGB: return "FXT1_RGB"; + case transcoder_texture_format::cTFPVRTC2_4_RGB: return "PVRTC2_4_RGB"; + case transcoder_texture_format::cTFPVRTC2_4_RGBA: return "PVRTC2_4_RGBA"; + case transcoder_texture_format::cTFETC2_EAC_R11: return "ETC2_EAC_R11"; + case transcoder_texture_format::cTFETC2_EAC_RG11: return "ETC2_EAC_RG11"; default: assert(0); BASISU_DEVEL_ERROR("basis_get_basisu_texture_format: Invalid fmt\n"); @@ -8338,14 +10339,15 @@ namespace basist { switch (fmt) { - case cTFETC2: - case cTFBC3: - case cTFASTC_4x4: - case cTFBC7_M5: - case cTFPVRTC1_4_RGBA: - case cTFATC_RGBA_INTERPOLATED_ALPHA: - case cTFRGBA32: - case cTFRGBA4444: + case transcoder_texture_format::cTFETC2_RGBA: + case transcoder_texture_format::cTFBC3_RGBA: + case transcoder_texture_format::cTFASTC_4x4_RGBA: + case transcoder_texture_format::cTFBC7_M5_RGBA: + case transcoder_texture_format::cTFPVRTC1_4_RGBA: + case transcoder_texture_format::cTFPVRTC2_4_RGBA: + case transcoder_texture_format::cTFATC_RGBA: + case transcoder_texture_format::cTFRGBA32: + case transcoder_texture_format::cTFRGBA4444: return true; default: break; @@ -8357,39 +10359,44 @@ namespace basist { switch (fmt) { - case cTFETC1: return basisu::cETC1; - case cTFBC1: return basisu::cBC1; - case cTFBC4: return basisu::cBC4; - case cTFPVRTC1_4_RGB: return basisu::cPVRTC1_4_RGB; - case cTFPVRTC1_4_RGBA: return basisu::cPVRTC1_4_RGBA; - case cTFBC7_M6_OPAQUE_ONLY: return basisu::cBC7; - case cTFBC7_M5: return basisu::cBC7; - case cTFETC2: return basisu::cETC2_RGBA; - case cTFBC3: return basisu::cBC3; - case cTFBC5: return basisu::cBC5; - case cTFASTC_4x4: return basisu::cASTC4x4; - case cTFATC_RGB: return basisu::cATC_RGB; - case cTFATC_RGBA_INTERPOLATED_ALPHA: return basisu::cATC_RGBA_INTERPOLATED_ALPHA; - case cTFRGBA32: return basisu::cRGBA32; - case cTFRGB565: return basisu::cRGB565; - case cTFBGR565: return basisu::cBGR565; - case cTFRGBA4444: return basisu::cRGBA4444; + case transcoder_texture_format::cTFETC1_RGB: return basisu::texture_format::cETC1; + case transcoder_texture_format::cTFBC1_RGB: return basisu::texture_format::cBC1; + case transcoder_texture_format::cTFBC4_R: return basisu::texture_format::cBC4; + case transcoder_texture_format::cTFPVRTC1_4_RGB: return basisu::texture_format::cPVRTC1_4_RGB; + case transcoder_texture_format::cTFPVRTC1_4_RGBA: return basisu::texture_format::cPVRTC1_4_RGBA; + case transcoder_texture_format::cTFBC7_M6_RGB: return basisu::texture_format::cBC7; + case transcoder_texture_format::cTFBC7_M5_RGBA: return basisu::texture_format::cBC7; + case transcoder_texture_format::cTFETC2_RGBA: return basisu::texture_format::cETC2_RGBA; + case transcoder_texture_format::cTFBC3_RGBA: return basisu::texture_format::cBC3; + case transcoder_texture_format::cTFBC5_RG: return basisu::texture_format::cBC5; + case transcoder_texture_format::cTFASTC_4x4_RGBA: return basisu::texture_format::cASTC4x4; + case transcoder_texture_format::cTFATC_RGB: return basisu::texture_format::cATC_RGB; + case transcoder_texture_format::cTFATC_RGBA: return basisu::texture_format::cATC_RGBA_INTERPOLATED_ALPHA; + case transcoder_texture_format::cTFRGBA32: return basisu::texture_format::cRGBA32; + case transcoder_texture_format::cTFRGB565: return basisu::texture_format::cRGB565; + case transcoder_texture_format::cTFBGR565: return basisu::texture_format::cBGR565; + case transcoder_texture_format::cTFRGBA4444: return basisu::texture_format::cRGBA4444; + case transcoder_texture_format::cTFFXT1_RGB: return basisu::texture_format::cFXT1_RGB; + case transcoder_texture_format::cTFPVRTC2_4_RGB: return basisu::texture_format::cPVRTC2_4_RGBA; + case transcoder_texture_format::cTFPVRTC2_4_RGBA: return basisu::texture_format::cPVRTC2_4_RGBA; + case transcoder_texture_format::cTFETC2_EAC_R11: return basisu::texture_format::cETC2_R11_EAC; + case transcoder_texture_format::cTFETC2_EAC_RG11: return basisu::texture_format::cETC2_RG11_EAC; default: assert(0); BASISU_DEVEL_ERROR("basis_get_basisu_texture_format: Invalid fmt\n"); break; } - return basisu::cInvalidTextureFormat; + return basisu::texture_format::cInvalidTextureFormat; } bool basis_transcoder_format_is_uncompressed(transcoder_texture_format tex_type) { switch (tex_type) { - case cTFRGBA32: - case cTFRGB565: - case cTFBGR565: - case cTFRGBA4444: + case transcoder_texture_format::cTFRGBA32: + case transcoder_texture_format::cTFRGB565: + case transcoder_texture_format::cTFBGR565: + case transcoder_texture_format::cTFRGBA4444: return true; default: break; @@ -8401,14 +10408,14 @@ namespace basist { switch (tex_type) { - case cRGB32: - case cRGBA32: - case cA32: - case cRGB565: - case cBGR565: - case cRGBA4444_COLOR: - case cRGBA4444_ALPHA: - case cRGBA4444_COLOR_OPAQUE: + case block_format::cRGB32: + case block_format::cRGBA32: + case block_format::cA32: + case block_format::cRGB565: + case block_format::cBGR565: + case block_format::cRGBA4444_COLOR: + case block_format::cRGBA4444_ALPHA: + case block_format::cRGBA4444_COLOR_OPAQUE: return true; default: break; @@ -8420,17 +10427,106 @@ namespace basist { switch (fmt) { - case cTFRGBA32: + case transcoder_texture_format::cTFRGBA32: return sizeof(uint32_t); - case cTFRGB565: - case cTFBGR565: - case cTFRGBA4444: + case transcoder_texture_format::cTFRGB565: + case transcoder_texture_format::cTFBGR565: + case transcoder_texture_format::cTFRGBA4444: return sizeof(uint16_t); default: break; } return 0; } + + uint32_t basis_get_block_width(transcoder_texture_format tex_type) + { + switch (tex_type) + { + case transcoder_texture_format::cTFFXT1_RGB: + return 8; + default: + break; + } + return 4; + } + + uint32_t basis_get_block_height(transcoder_texture_format tex_type) + { + (void)tex_type; + return 4; + } + + bool basis_is_format_supported(transcoder_texture_format tex_type) + { + switch (tex_type) + { + // ETC1 and uncompressed are always supported. + case transcoder_texture_format::cTFETC1_RGB: + case transcoder_texture_format::cTFRGBA32: + case transcoder_texture_format::cTFRGB565: + case transcoder_texture_format::cTFBGR565: + case transcoder_texture_format::cTFRGBA4444: + return true; +#if BASISD_SUPPORT_DXT1 + case transcoder_texture_format::cTFBC1_RGB: + return true; +#endif +#if BASISD_SUPPORT_DXT5A + case transcoder_texture_format::cTFBC4_R: + case transcoder_texture_format::cTFBC5_RG: + return true; +#endif +#if BASISD_SUPPORT_DXT1 && BASISD_SUPPORT_DXT5A + case transcoder_texture_format::cTFBC3_RGBA: + return true; +#endif +#if BASISD_SUPPORT_PVRTC1 + case transcoder_texture_format::cTFPVRTC1_4_RGB: + case transcoder_texture_format::cTFPVRTC1_4_RGBA: + return true; +#endif +#if BASISD_SUPPORT_BC7_MODE6_OPAQUE_ONLY + case transcoder_texture_format::cTFBC7_M6_RGB: + return true; +#endif +#if BASISD_SUPPORT_BC7_MODE5 + case transcoder_texture_format::cTFBC7_M5_RGBA: + return true; +#endif +#if BASISD_SUPPORT_ETC2_EAC_A8 + case transcoder_texture_format::cTFETC2_RGBA: + return true; +#endif +#if BASISD_SUPPORT_ASTC + case transcoder_texture_format::cTFASTC_4x4_RGBA: + return true; +#endif +#if BASISD_SUPPORT_ATC + case transcoder_texture_format::cTFATC_RGB: + case transcoder_texture_format::cTFATC_RGBA: + return true; +#endif +#if BASISD_SUPPORT_FXT1 + case transcoder_texture_format::cTFFXT1_RGB: + return true; +#endif +#if BASISD_SUPPORT_PVRTC2 + case transcoder_texture_format::cTFPVRTC2_4_RGB: + case transcoder_texture_format::cTFPVRTC2_4_RGBA: + return true; +#endif +#if BASISD_SUPPORT_ETC2_EAC_RG11 + case transcoder_texture_format::cTFETC2_EAC_R11: + case transcoder_texture_format::cTFETC2_EAC_RG11: + return true; +#endif + default: + break; + } + + return false; + } } // namespace basist diff --git a/thirdparty/basis_universal/transcoder/basisu_transcoder.h b/thirdparty/basis_universal/transcoder/basisu_transcoder.h index 877dee43b1..770c64122d 100644 --- a/thirdparty/basis_universal/transcoder/basisu_transcoder.h +++ b/thirdparty/basis_universal/transcoder/basisu_transcoder.h @@ -31,42 +31,64 @@ namespace basist // fully opaque (255) alpha channel. // - The PVRTC1 texture formats only support power of 2 dimension .basis files, but this may be relaxed in a future version. // - The PVRTC1 transcoders are real-time encoders, so don't expect the highest quality. We may add a slower encoder with improved quality. - enum transcoder_texture_format + // - These enums must be kept in sync with Javascript code that calls the transcoder. + enum class transcoder_texture_format { // Compressed formats // ETC1-2 - cTFETC1, // Opaque only, returns RGB or alpha data if cDecodeFlagsTranscodeAlphaDataToOpaqueFormats flag is specified - cTFETC2, // Opaque+alpha, ETC2_EAC_A8 block followed by a ETC1 block, alpha channel will be opaque for opaque .basis files - - // BC1-5, BC7 - cTFBC1, // Opaque only, no punchthrough alpha support yet, transcodes alpha slice if cDecodeFlagsTranscodeAlphaDataToOpaqueFormats flag is specified - cTFBC3, // Opaque+alpha, BC4 followed by a BC1 block, alpha channel will be opaque for opaque .basis files - cTFBC4, // Red only, alpha slice is transcoded to output if cDecodeFlagsTranscodeAlphaDataToOpaqueFormats flag is specified - cTFBC5, // XY: Two BC4 blocks, X=R and Y=Alpha, .basis file should have alpha data (if not Y will be all 255's) - cTFBC7_M6_OPAQUE_ONLY, // Opaque only, RGB or alpha if cDecodeFlagsTranscodeAlphaDataToOpaqueFormats flag is specified. Highest quality of all the non-ETC1 formats. - cTFBC7_M5, // Opaque+alpha, alpha channel will be opaque for opaque .basis files - - // PVRTC1 4bpp - cTFPVRTC1_4_RGB, // Opaque only, RGB or alpha if cDecodeFlagsTranscodeAlphaDataToOpaqueFormats flag is specified, nearly lowest quality of any texture format. - cTFPVRTC1_4_RGBA, // Opaque+alpha, most useful for simple opacity maps. If .basis file doens't have alpha cTFPVRTC1_4_RGB will be used instead. Lowest quality of any supported texture format. - - // ASTC - cTFASTC_4x4, // Opaque+alpha, ASTC 4x4, alpha channel will be opaque for opaque .basis files. Transcoder uses RGB/RGBA/L/LA modes, void extent, and up to two ([0,47] and [0,255]) endpoint precisions. - - // ATC - cTFATC_RGB, // Opaque, RGB or alpha if cDecodeFlagsTranscodeAlphaDataToOpaqueFormats flag is specified. ATI ATC (GL_ATC_RGB_AMD) - cTFATC_RGBA_INTERPOLATED_ALPHA, // Opaque+alpha, alpha channel will be opaque for opaque .basis files. ATI ATC (ATC_RGBA_INTERPOLATED_ALPHA_AMD) - - cTFTotalBlockTextureFormats, - + cTFETC1_RGB = 0, // Opaque only, returns RGB or alpha data if cDecodeFlagsTranscodeAlphaDataToOpaqueFormats flag is specified + cTFETC2_RGBA = 1, // Opaque+alpha, ETC2_EAC_A8 block followed by a ETC1 block, alpha channel will be opaque for opaque .basis files + + // BC1-5, BC7 (desktop, some mobile devices) + cTFBC1_RGB = 2, // Opaque only, no punchthrough alpha support yet, transcodes alpha slice if cDecodeFlagsTranscodeAlphaDataToOpaqueFormats flag is specified + cTFBC3_RGBA = 3, // Opaque+alpha, BC4 followed by a BC1 block, alpha channel will be opaque for opaque .basis files + cTFBC4_R = 4, // Red only, alpha slice is transcoded to output if cDecodeFlagsTranscodeAlphaDataToOpaqueFormats flag is specified + cTFBC5_RG = 5, // XY: Two BC4 blocks, X=R and Y=Alpha, .basis file should have alpha data (if not Y will be all 255's) + cTFBC7_M6_RGB = 6, // Opaque only, RGB or alpha if cDecodeFlagsTranscodeAlphaDataToOpaqueFormats flag is specified. Highest quality of all the non-ETC1 formats. + cTFBC7_M5_RGBA = 7, // Opaque+alpha, alpha channel will be opaque for opaque .basis files + + // PVRTC1 4bpp (mobile, PowerVR devices) + cTFPVRTC1_4_RGB = 8, // Opaque only, RGB or alpha if cDecodeFlagsTranscodeAlphaDataToOpaqueFormats flag is specified, nearly lowest quality of any texture format. + cTFPVRTC1_4_RGBA = 9, // Opaque+alpha, most useful for simple opacity maps. If .basis file doens't have alpha cTFPVRTC1_4_RGB will be used instead. Lowest quality of any supported texture format. + + // ASTC (mobile, Intel devices, hopefully all desktop GPU's one day) + cTFASTC_4x4_RGBA = 10, // Opaque+alpha, ASTC 4x4, alpha channel will be opaque for opaque .basis files. Transcoder uses RGB/RGBA/L/LA modes, void extent, and up to two ([0,47] and [0,255]) endpoint precisions. + + // ATC (mobile, Adreno devices, this is a niche format) + cTFATC_RGB = 11, // Opaque, RGB or alpha if cDecodeFlagsTranscodeAlphaDataToOpaqueFormats flag is specified. ATI ATC (GL_ATC_RGB_AMD) + cTFATC_RGBA = 12, // Opaque+alpha, alpha channel will be opaque for opaque .basis files. ATI ATC (GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD) + + // FXT1 (desktop, Intel devices, this is a super obscure format) + cTFFXT1_RGB = 17, // Opaque only, uses exclusively CC_MIXED blocks. Notable for having a 8x4 block size. GL_3DFX_texture_compression_FXT1 is supported on Intel integrated GPU's (such as HD 630). + // Punch-through alpha is relatively easy to support, but full alpha is harder. This format is only here for completeness so opaque-only is fine for now. + // See the BASISU_USE_ORIGINAL_3DFX_FXT1_ENCODING macro in basisu_transcoder_internal.h. + + cTFPVRTC2_4_RGB = 18, // Opaque-only, almost BC1 quality, much faster to transcode and supports arbitrary texture dimensions (unlike PVRTC1 RGB). + cTFPVRTC2_4_RGBA = 19, // Opaque+alpha, slower to encode than cTFPVRTC2_4_RGB. Premultiplied alpha is highly recommended, otherwise the color channel can leak into the alpha channel on transparent blocks. + + cTFETC2_EAC_R11 = 20, // R only (ETC2 EAC R11 unsigned) + cTFETC2_EAC_RG11 = 21, // RG only (ETC2 EAC RG11 unsigned), R=opaque.r, G=alpha - for tangent space normal maps + // Uncompressed (raw pixel) formats - cTFRGBA32 = cTFTotalBlockTextureFormats, // 32bpp RGBA image stored in raster (not block) order in memory, R is first byte, A is last byte. - cTFRGB565, // 166pp RGB image stored in raster (not block) order in memory, R at bit position 11 - cTFBGR565, // 16bpp RGB image stored in raster (not block) order in memory, R at bit position 0 - cTFRGBA4444, // 16bpp RGBA image stored in raster (not block) order in memory, R at bit position 12, A at bit position 0 - - cTFTotalTextureFormats + cTFRGBA32 = 13, // 32bpp RGBA image stored in raster (not block) order in memory, R is first byte, A is last byte. + cTFRGB565 = 14, // 166pp RGB image stored in raster (not block) order in memory, R at bit position 11 + cTFBGR565 = 15, // 16bpp RGB image stored in raster (not block) order in memory, R at bit position 0 + cTFRGBA4444 = 16, // 16bpp RGBA image stored in raster (not block) order in memory, R at bit position 12, A at bit position 0 + + cTFTotalTextureFormats = 22, + + // Old enums for compatibility with code compiled against previous versions + cTFETC1 = cTFETC1_RGB, + cTFETC2 = cTFETC2_RGBA, + cTFBC1 = cTFBC1_RGB, + cTFBC3 = cTFBC3_RGBA, + cTFBC4 = cTFBC4_R, + cTFBC5 = cTFBC5_RG, + cTFBC7_M6_OPAQUE_ONLY = cTFBC7_M6_RGB, + cTFBC7_M5 = cTFBC7_M5_RGBA, + cTFASTC_4x4 = cTFASTC_4x4_RGBA, + cTFATC_RGBA_INTERPOLATED_ALPHA = cTFATC_RGBA, }; uint32_t basis_get_bytes_per_block(transcoder_texture_format fmt); @@ -74,10 +96,16 @@ namespace basist bool basis_transcoder_format_has_alpha(transcoder_texture_format fmt); basisu::texture_format basis_get_basisu_texture_format(transcoder_texture_format fmt); const char* basis_get_texture_type_name(basis_texture_type tex_type); + bool basis_transcoder_format_is_uncompressed(transcoder_texture_format tex_type); - bool basis_block_format_is_uncompressed(block_format tex_type); uint32_t basis_get_uncompressed_bytes_per_pixel(transcoder_texture_format fmt); + uint32_t basis_get_block_width(transcoder_texture_format tex_type); + uint32_t basis_get_block_height(transcoder_texture_format tex_type); + + // Returns true if the specified format was enabled at compile time. + bool basis_is_format_supported(transcoder_texture_format tex_type); + class basisu_transcoder; // This struct holds all state used during transcoding. For video, it needs to persist between image transcodes (it holds the previous frame). @@ -111,7 +139,7 @@ namespace basist bool decode_tables(const uint8_t *pTable_data, uint32_t table_data_size); bool transcode_slice(void *pDst_blocks, uint32_t num_blocks_x, uint32_t num_blocks_y, const uint8_t *pImage_data, uint32_t image_data_size, block_format fmt, - uint32_t output_block_or_pixel_stride_in_bytes, bool wrap_addressing, bool bc1_allow_threecolor_blocks, const basis_file_header &header, const basis_slice_desc& slice_desc, uint32_t output_row_pitch_in_blocks_or_pixels = 0, + uint32_t output_block_or_pixel_stride_in_bytes, bool bc1_allow_threecolor_blocks, const basis_file_header &header, const basis_slice_desc& slice_desc, uint32_t output_row_pitch_in_blocks_or_pixels = 0, basisu_transcoder_state *pState = nullptr, bool astc_transcode_alpha = false, void* pAlpha_blocks = nullptr, uint32_t output_rows_in_pixels = 0); private: @@ -276,9 +304,6 @@ namespace basist enum { - // PVRTC1: texture will use wrap addressing vs. clamp (most PVRTC viewer tools assume wrap addressing, so we default to wrap although that can cause edge artifacts) - cDecodeFlagsPVRTCWrapAddressing = 1, - // PVRTC1: decode non-pow2 ETC1S texture level to the next larger power of 2 (not implemented yet, but we're going to support it). Ignored if the slice's dimensions are already a power of 2. cDecodeFlagsPVRTCDecodeToNextPow2 = 2, @@ -292,7 +317,7 @@ namespace basist // The output buffer contains alpha endpoint/selector indices. // Used internally when decoding formats like ASTC that require both color and alpha data to be available when transcoding to the output format. - cDecodeFlagsOutputHasAlphaIndices = 16, + cDecodeFlagsOutputHasAlphaIndices = 16 }; // transcode_image_level() decodes a single mipmap level from the .basis file to any of the supported output texture formats. @@ -311,7 +336,7 @@ namespace basist uint32_t image_index, uint32_t level_index, void *pOutput_blocks, uint32_t output_blocks_buf_size_in_blocks_or_pixels, transcoder_texture_format fmt, - uint32_t decode_flags = cDecodeFlagsPVRTCWrapAddressing, uint32_t output_row_pitch_in_blocks_or_pixels = 0, basisu_transcoder_state *pState = nullptr, uint32_t output_rows_in_pixels = 0) const; + uint32_t decode_flags = 0, uint32_t output_row_pitch_in_blocks_or_pixels = 0, basisu_transcoder_state *pState = nullptr, uint32_t output_rows_in_pixels = 0) const; // Finds the basis slice corresponding to the specified image/level/alpha params, or -1 if the slice can't be found. int find_slice(const void *pData, uint32_t data_size, uint32_t image_index, uint32_t level_index, bool alpha_data) const; @@ -327,7 +352,7 @@ namespace basist // - basisu_transcoder_init() must have been called first to initialize the transcoder lookup tables before calling this function. bool transcode_slice(const void *pData, uint32_t data_size, uint32_t slice_index, void *pOutput_blocks, uint32_t output_blocks_buf_size_in_blocks_or_pixels, - block_format fmt, uint32_t output_block_stride_in_bytes, uint32_t decode_flags = cDecodeFlagsPVRTCWrapAddressing, uint32_t output_row_pitch_in_blocks_or_pixels = 0, basisu_transcoder_state * pState = nullptr, void* pAlpha_blocks = nullptr, uint32_t output_rows_in_pixels = 0) const; + block_format fmt, uint32_t output_block_stride_in_bytes, uint32_t decode_flags = 0, uint32_t output_row_pitch_in_blocks_or_pixels = 0, basisu_transcoder_state * pState = nullptr, void* pAlpha_blocks = nullptr, uint32_t output_rows_in_pixels = 0) const; private: mutable basisu_lowlevel_transcoder m_lowlevel_decoder; diff --git a/thirdparty/basis_universal/transcoder/basisu_transcoder_internal.h b/thirdparty/basis_universal/transcoder/basisu_transcoder_internal.h index ffa9b6fcae..a9c6823d92 100644 --- a/thirdparty/basis_universal/transcoder/basisu_transcoder_internal.h +++ b/thirdparty/basis_universal/transcoder/basisu_transcoder_internal.h @@ -42,7 +42,7 @@ namespace basist { // Low-level formats directly supported by the transcoder (other supported texture formats are combinations of these low-level block formats). // You probably don't care about these enum's unless you are going pretty low-level and calling the transcoder to decode individual slices. - enum block_format + enum class block_format { cETC1, // ETC1S RGB cBC1, // DXT1 RGB @@ -57,6 +57,7 @@ namespace basist // data. If you use a sRGB ASTC format you'll get ~1 LSB of additional error, because of the different way ASTC decoders scale 8-bit endpoints to 16-bits during unpacking. cATC_RGB, cATC_RGBA_INTERPOLATED_ALPHA, + cFXT1_RGB, // Opaque-only, has oddball 8x4 pixel block size cIndices, // Used internally: Write 16-bit endpoint and selector indices directly to output (output block must be at least 32-bits) @@ -71,6 +72,11 @@ namespace basist cRGBA4444_ALPHA, cRGBA4444_COLOR_OPAQUE, + cPVRTC2_4_RGB, + cPVRTC2_4_RGBA, + + cETC2_EAC_R11, + cTotalBlockFormats }; @@ -624,6 +630,11 @@ namespace basist struct decoder_etc_block; + inline uint8_t clamp255(int32_t i) + { + return (uint8_t)((i & 0xFFFFFF00U) ? (~(i >> 31)) : i); + } + struct color32 { union @@ -647,6 +658,8 @@ namespace basist void set(uint32_t vr, uint32_t vg, uint32_t vb, uint32_t va) { c[0] = static_cast<uint8_t>(vr); c[1] = static_cast<uint8_t>(vg); c[2] = static_cast<uint8_t>(vb); c[3] = static_cast<uint8_t>(va); } + void set_clamped(int vr, int vg, int vb, int va) { c[0] = clamp255(vr); c[1] = clamp255(vg); c[2] = clamp255(vb); c[3] = clamp255(va); } + uint8_t operator[] (uint32_t idx) const { assert(idx < 4); return c[idx]; } uint8_t &operator[] (uint32_t idx) { assert(idx < 4); return c[idx]; } @@ -733,6 +746,8 @@ namespace basist } }; + bool basis_block_format_is_uncompressed(block_format tex_type); + } // namespace basist diff --git a/thirdparty/basis_universal/transcoder/basisu_transcoder_tables_pvrtc2_45.inc b/thirdparty/basis_universal/transcoder/basisu_transcoder_tables_pvrtc2_45.inc new file mode 100644 index 0000000000..0bca0bbddc --- /dev/null +++ b/thirdparty/basis_universal/transcoder/basisu_transcoder_tables_pvrtc2_45.inc @@ -0,0 +1,481 @@ +{0,2,20},{0,1,10},{0,1,1},{0,1,9},{0,1,35},{0,1,27},{0,1,18},{0,1,61},{0,1,52},{0,0,68},{0,2,20},{0,1,10},{0,1,1},{0,1,9},{0,1,35},{0,1,27},{0,1,18},{0,1,61},{0,1,43},{0,1,61},{0,1,1},{0,1,1},{0,1,1},{0,0,4},{0,0,4},{0,0,4},{0,0,4},{0,0,4},{0,0,4},{0,0,4},{0,1,1}, +{0,1,1},{0,1,1},{0,0,4},{0,0,4},{0,0,4},{0,0,4},{0,0,4},{0,0,4},{0,0,4},{0,2,20},{0,1,10},{0,1,1},{0,1,9},{0,2,20},{0,1,18},{0,1,9},{0,1,36},{0,1,18},{0,1,36},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,4,56},{0,3,38},{0,2,52}, +{0,2,36},{0,4,56},{0,3,35},{0,2,0},{0,2,52},{0,2,88},{0,1,78},{0,4,56},{0,3,38},{0,2,52},{0,2,36},{1,0,52},{0,3,35},{0,2,0},{0,2,52},{1,1,51},{0,2,52},{0,3,37},{0,3,37},{0,3,37},{0,2,36},{0,3,10},{0,2,0},{0,2,0},{0,1,5},{0,1,35},{0,1,14},{0,3,37},{0,3,37},{0,3,37},{0,2,36},{0,3,10}, +{0,2,0},{0,2,0},{0,1,5},{1,0,16},{0,1,5},{1,1,18},{0,3,2},{0,2,16},{0,2,0},{1,1,18},{2,0,20},{0,2,0},{0,2,36},{2,0,20},{0,2,36},{0,0,36},{0,0,36},{0,0,36},{0,0,36},{0,2,0},{0,2,0},{0,2,0},{0,1,1},{0,1,10},{0,1,10},{1,4,88},{1,3,78},{1,3,69},{1,3,77},{1,3,115},{0,4,88},{0,3,98}, +{0,3,101},{0,4,72},{0,3,38},{1,4,24},{1,3,14},{1,3,5},{1,3,13},{1,3,51},{0,4,24},{0,3,34},{0,3,37},{3,0,52},{0,3,37},{1,3,69},{1,3,69},{1,3,69},{1,2,72},{1,2,72},{1,2,72},{1,2,72},{1,2,72},{0,3,11},{0,2,24},{1,3,5},{1,3,5},{1,3,5},{1,2,8},{1,2,8},{1,2,8},{1,2,8},{1,2,8},{1,2,8}, +{1,2,8},{0,7,18},{1,3,10},{1,3,1},{0,3,9},{0,7,18},{1,3,18},{0,3,9},{0,3,36},{1,3,18},{0,3,36},{1,0,68},{1,0,68},{1,0,68},{1,0,68},{1,1,65},{1,1,65},{1,1,65},{0,3,65},{0,3,2},{0,3,2},{1,6,56},{1,5,38},{1,4,53},{1,4,37},{1,6,56},{1,5,35},{1,4,1},{1,4,66},{0,5,60},{0,4,70},{1,6,56}, +{1,5,38},{1,4,53},{1,4,37},{0,9,51},{1,5,35},{1,4,1},{0,4,54},{2,3,51},{0,4,54},{1,5,37},{1,5,37},{1,5,37},{1,4,36},{1,5,10},{1,4,0},{1,4,0},{1,3,5},{0,5,11},{1,3,14},{1,5,37},{1,5,37},{1,5,37},{1,4,36},{0,8,8},{1,4,0},{1,4,0},{1,3,5},{4,0,8},{1,3,5},{2,3,18},{1,5,2},{1,4,17}, +{1,4,1},{2,3,18},{4,1,18},{1,4,1},{0,4,50},{4,1,18},{0,4,50},{1,0,36},{1,0,36},{1,0,36},{1,0,36},{1,4,0},{1,4,0},{1,4,0},{1,3,1},{1,3,10},{1,3,10},{2,6,88},{2,5,78},{2,5,69},{2,5,77},{2,5,115},{2,5,107},{2,5,98},{1,5,117},{1,6,60},{1,5,36},{2,6,24},{2,5,14},{2,5,5},{2,5,13},{3,2,51}, +{1,6,35},{2,5,34},{1,5,36},{1,6,51},{1,5,36},{2,5,69},{2,5,69},{2,5,69},{2,4,72},{2,4,72},{2,4,72},{2,4,72},{2,4,72},{1,5,16},{1,5,36},{2,5,5},{2,5,5},{2,5,5},{2,4,8},{3,1,8},{2,4,8},{2,4,8},{2,4,8},{3,3,8},{2,4,8},{3,3,20},{2,5,10},{2,5,1},{2,5,9},{3,3,20},{2,5,18},{2,5,9}, +{0,5,36},{2,5,18},{0,5,36},{2,0,68},{2,0,68},{2,0,68},{2,0,68},{2,3,68},{2,3,68},{2,3,68},{2,4,68},{1,5,0},{1,5,0},{2,8,56},{2,7,38},{2,6,52},{2,6,36},{2,8,56},{2,7,35},{2,6,0},{2,6,52},{1,7,76},{1,6,70},{2,8,56},{2,7,38},{2,6,52},{2,6,36},{4,1,51},{2,7,35},{2,6,0},{1,6,45},{3,5,51}, +{1,6,45},{2,7,37},{2,7,37},{2,7,37},{2,6,36},{2,7,10},{2,6,0},{2,6,0},{2,5,5},{1,7,12},{2,5,14},{2,7,37},{2,7,37},{2,7,37},{2,6,36},{4,0,8},{2,6,0},{2,6,0},{2,5,5},{1,7,8},{2,5,5},{3,5,18},{2,7,2},{2,6,16},{2,6,0},{3,5,18},{0,9,18},{2,6,0},{0,6,36},{0,9,18},{0,6,36},{2,0,36}, +{2,0,36},{2,0,36},{2,0,36},{2,6,0},{2,6,0},{2,6,0},{2,5,1},{1,7,8},{1,7,8},{3,8,88},{3,7,78},{3,7,69},{3,7,77},{3,7,115},{2,8,88},{2,7,98},{2,7,101},{1,9,67},{2,7,38},{3,8,24},{3,7,14},{3,7,5},{3,7,13},{3,7,51},{2,8,24},{2,7,34},{2,7,37},{8,0,51},{2,7,37},{3,7,69},{3,7,69},{3,7,69}, +{3,6,72},{3,6,72},{3,6,72},{3,6,72},{3,6,72},{2,7,11},{2,6,24},{3,7,5},{3,7,5},{3,7,5},{3,6,8},{3,6,8},{3,6,8},{3,6,8},{3,6,8},{3,6,8},{3,6,8},{5,1,18},{3,7,10},{3,7,1},{2,7,9},{5,1,18},{3,7,18},{2,7,9},{0,7,36},{3,7,18},{0,7,36},{3,0,68},{3,0,68},{3,0,68},{3,0,68},{3,5,65}, +{3,5,65},{3,5,65},{2,7,65},{2,7,2},{2,7,2},{3,10,56},{3,9,38},{3,8,53},{3,8,37},{3,10,56},{3,9,35},{3,8,1},{3,8,66},{2,9,60},{2,8,70},{3,10,56},{3,9,38},{3,8,53},{3,8,37},{5,3,51},{3,9,35},{3,8,1},{2,8,54},{4,7,51},{2,8,54},{3,9,37},{3,9,37},{3,9,37},{3,8,36},{3,9,10},{3,8,0},{3,8,0}, +{3,7,5},{2,9,11},{3,7,14},{3,9,37},{3,9,37},{3,9,37},{3,8,36},{5,2,8},{3,8,0},{3,8,0},{3,7,5},{8,1,8},{3,7,5},{4,7,18},{3,9,2},{3,8,17},{3,8,1},{4,7,18},{8,2,18},{3,8,1},{0,8,50},{8,2,18},{0,8,50},{3,0,36},{3,0,36},{3,0,36},{3,0,36},{3,8,0},{3,8,0},{3,8,0},{3,7,1},{3,7,10}, +{3,7,10},{4,10,88},{4,9,78},{4,9,69},{4,9,77},{4,9,115},{4,9,107},{4,9,98},{3,9,117},{3,10,60},{3,9,36},{4,10,24},{4,9,14},{4,9,5},{4,9,13},{5,6,51},{3,10,35},{4,9,34},{3,9,36},{10,1,51},{3,9,36},{4,9,69},{4,9,69},{4,9,69},{4,8,72},{4,8,72},{4,8,72},{4,8,72},{4,8,72},{3,9,16},{3,9,36},{4,9,5}, +{4,9,5},{4,9,5},{4,8,8},{5,5,8},{4,8,8},{4,8,8},{4,8,8},{5,7,8},{4,8,8},{7,0,18},{4,9,10},{4,9,1},{4,9,9},{7,0,18},{4,9,18},{4,9,9},{0,9,36},{4,9,18},{0,9,36},{4,0,68},{4,0,68},{4,0,68},{4,0,68},{4,7,68},{4,7,68},{4,7,68},{4,8,68},{3,9,0},{3,9,0},{4,12,56},{4,11,38},{4,10,52}, +{4,10,36},{4,12,56},{4,11,35},{4,10,0},{4,10,52},{3,11,76},{3,10,70},{4,12,56},{4,11,38},{4,10,52},{4,10,36},{7,2,51},{4,11,35},{4,10,0},{3,10,45},{12,0,51},{3,10,45},{4,11,37},{4,11,37},{4,11,37},{4,10,36},{4,11,10},{4,10,0},{4,10,0},{4,9,5},{3,11,12},{4,9,14},{4,11,37},{4,11,37},{4,11,37},{4,10,36},{7,1,8}, +{4,10,0},{4,10,0},{4,9,5},{10,2,8},{4,9,5},{5,9,18},{4,11,2},{4,10,16},{4,10,0},{5,9,18},{10,3,18},{4,10,0},{0,10,36},{10,3,18},{0,10,36},{4,0,36},{4,0,36},{4,0,36},{4,0,36},{4,10,0},{4,10,0},{4,10,0},{4,9,1},{3,11,8},{3,11,8},{5,12,88},{5,11,78},{5,11,69},{5,11,77},{5,11,115},{4,12,88},{4,11,98}, +{4,11,101},{3,13,67},{4,11,38},{5,12,24},{5,11,14},{5,11,5},{5,11,13},{5,11,51},{4,12,24},{4,11,34},{4,11,37},{11,3,51},{4,11,37},{5,11,69},{5,11,69},{5,11,69},{5,10,72},{5,10,72},{5,10,72},{5,10,72},{5,10,72},{4,11,11},{4,10,24},{5,11,5},{5,11,5},{5,11,5},{5,10,8},{5,10,8},{5,10,8},{5,10,8},{5,10,8},{12,1,8}, +{5,10,8},{8,0,18},{5,11,10},{5,11,1},{4,11,9},{8,0,18},{12,2,18},{4,11,9},{0,11,36},{12,2,18},{0,11,36},{5,0,68},{5,0,68},{5,0,68},{5,0,68},{5,9,65},{5,9,65},{5,9,65},{4,11,65},{4,11,2},{4,11,2},{5,14,56},{5,13,38},{5,12,53},{5,12,37},{5,14,56},{5,13,35},{5,12,1},{5,12,66},{4,13,60},{4,12,70},{5,14,56}, +{5,13,38},{5,12,53},{5,12,37},{8,2,51},{5,13,35},{5,12,1},{4,12,54},{13,2,51},{4,12,54},{5,13,37},{5,13,37},{5,13,37},{5,12,36},{5,13,10},{5,12,0},{5,12,0},{5,11,5},{4,13,11},{5,11,14},{5,13,37},{5,13,37},{5,13,37},{5,12,36},{8,1,8},{5,12,0},{5,12,0},{5,11,5},{10,5,8},{5,11,5},{6,11,18},{5,13,2},{5,12,17}, +{5,12,1},{6,11,18},{15,0,18},{5,12,1},{0,12,50},{15,0,18},{0,12,50},{5,0,36},{5,0,36},{5,0,36},{5,0,36},{5,12,0},{5,12,0},{5,12,0},{5,11,1},{5,11,10},{5,11,10},{6,14,88},{6,13,78},{6,13,69},{6,13,77},{6,13,115},{6,13,107},{6,13,98},{5,13,117},{5,14,60},{5,13,36},{6,14,24},{6,13,14},{6,13,5},{6,13,13},{8,5,51}, +{5,14,35},{6,13,34},{5,13,36},{12,5,51},{5,13,36},{6,13,69},{6,13,69},{6,13,69},{6,12,72},{6,12,72},{6,12,72},{6,12,72},{6,12,72},{5,13,16},{5,13,36},{6,13,5},{6,13,5},{6,13,5},{6,12,8},{8,4,8},{6,12,8},{6,12,8},{6,12,8},{14,2,8},{6,12,8},{3,24,18},{6,13,10},{6,13,1},{6,13,9},{3,24,18},{14,3,18},{6,13,9}, +{0,13,36},{14,3,18},{0,13,36},{6,0,68},{6,0,68},{6,0,68},{6,0,68},{6,11,68},{6,11,68},{6,11,68},{6,12,68},{5,13,0},{5,13,0},{6,16,56},{6,15,38},{6,14,52},{6,14,36},{6,16,56},{6,15,35},{6,14,0},{6,14,52},{5,15,76},{5,14,70},{6,16,56},{6,15,38},{6,14,52},{6,14,36},{3,26,51},{6,15,35},{6,14,0},{5,14,45},{15,3,51}, +{5,14,45},{6,15,37},{6,15,37},{6,15,37},{6,14,36},{6,15,10},{6,14,0},{6,14,0},{6,13,5},{5,15,12},{6,13,14},{6,15,37},{6,15,37},{6,15,37},{6,14,36},{3,25,8},{6,14,0},{6,14,0},{6,13,5},{12,6,8},{6,13,5},{9,5,18},{6,15,2},{6,14,16},{6,14,0},{9,5,18},{12,7,18},{6,14,0},{0,14,36},{12,7,18},{0,14,36},{6,0,36}, +{6,0,36},{6,0,36},{6,0,36},{6,14,0},{6,14,0},{6,14,0},{6,13,1},{5,15,8},{5,15,8},{7,16,88},{7,15,78},{7,15,69},{7,15,77},{7,15,115},{6,16,88},{6,15,98},{6,15,101},{5,17,67},{6,15,38},{7,16,24},{7,15,14},{7,15,5},{7,15,13},{11,0,51},{6,16,24},{6,15,34},{6,15,37},{13,7,51},{6,15,37},{7,15,69},{7,15,69},{7,15,69}, +{7,14,72},{7,14,72},{7,14,72},{7,14,72},{7,14,72},{6,15,11},{6,14,24},{7,15,5},{7,15,5},{7,15,5},{7,14,8},{9,6,8},{7,14,8},{7,14,8},{7,14,8},{14,5,8},{7,14,8},{10,4,18},{7,15,10},{7,15,1},{6,15,9},{10,4,18},{14,6,18},{6,15,9},{0,15,36},{14,6,18},{0,15,36},{7,0,68},{7,0,68},{7,0,68},{7,0,68},{7,13,65}, +{7,13,65},{7,13,65},{6,15,65},{6,15,2},{6,15,2},{7,18,56},{7,17,38},{7,16,53},{7,16,37},{7,18,56},{7,17,35},{7,16,1},{7,16,66},{6,17,60},{6,16,70},{7,18,56},{7,17,38},{7,16,53},{7,16,37},{10,6,51},{7,17,35},{7,16,1},{6,16,54},{15,6,51},{6,16,54},{7,17,37},{7,17,37},{7,17,37},{7,16,36},{7,17,10},{7,16,0},{7,16,0}, +{7,15,5},{6,17,11},{7,15,14},{7,17,37},{7,17,37},{7,17,37},{7,16,36},{10,5,8},{7,16,0},{7,16,0},{7,15,5},{12,9,8},{7,15,5},{12,0,18},{7,17,2},{7,16,17},{7,16,1},{12,0,18},{12,10,18},{7,16,1},{0,16,50},{12,10,18},{0,16,50},{7,0,36},{7,0,36},{7,0,36},{7,0,36},{7,16,0},{7,16,0},{7,16,0},{7,15,1},{7,15,10}, +{7,15,10},{7,21,326},{7,19,322},{8,17,392},{7,17,322},{7,21,137},{7,18,116},{7,17,133},{7,17,117},{7,18,60},{7,17,36},{8,16,118},{8,16,134},{8,17,136},{8,17,136},{10,9,51},{7,18,35},{7,17,52},{7,17,36},{14,9,51},{7,17,36},{7,20,307},{7,20,307},{7,20,307},{7,18,307},{7,20,91},{7,18,91},{7,18,91},{7,16,110},{7,17,16},{7,17,36},{8,15,101}, +{8,15,101},{8,15,101},{8,16,101},{10,8,8},{7,18,10},{7,18,10},{7,16,29},{11,12,8},{7,16,29},{12,3,18},{7,19,16},{8,17,36},{7,17,16},{12,3,18},{11,13,18},{7,17,16},{0,17,36},{11,13,18},{0,17,36},{7,0,306},{7,0,306},{7,0,306},{7,0,306},{7,19,81},{7,19,81},{7,19,81},{7,17,81},{7,17,0},{7,17,0},{8,19,88},{8,18,78},{8,18,69}, +{8,18,77},{8,18,115},{8,18,107},{8,18,98},{8,17,136},{7,19,76},{7,18,70},{8,19,24},{8,18,14},{8,18,5},{8,18,13},{9,15,51},{8,18,43},{8,18,34},{7,18,45},{5,22,51},{7,18,45},{8,18,69},{8,18,69},{8,18,69},{8,17,72},{8,17,72},{8,17,72},{8,17,72},{8,17,72},{7,19,12},{7,18,70},{8,18,5},{8,18,5},{8,18,5},{8,17,8},{9,14,8}, +{8,17,8},{8,17,8},{8,17,8},{14,10,8},{8,17,8},{11,9,18},{8,18,10},{8,18,1},{8,18,9},{11,9,18},{14,11,18},{8,18,9},{0,18,36},{14,11,18},{0,18,36},{8,0,68},{8,0,68},{8,0,68},{8,0,68},{8,16,65},{8,16,65},{8,16,65},{8,17,68},{7,19,8},{7,19,8},{8,21,56},{8,20,38},{8,19,52},{8,19,36},{8,21,56},{8,20,35},{8,19,0}, +{8,19,52},{7,21,67},{8,18,78},{8,21,56},{8,20,38},{8,19,52},{8,19,36},{13,4,51},{8,20,35},{8,19,0},{8,19,52},{15,11,51},{8,19,52},{8,20,37},{8,20,37},{8,20,37},{8,19,36},{8,20,10},{8,19,0},{8,19,0},{8,18,5},{8,18,35},{8,18,14},{8,20,37},{8,20,37},{8,20,37},{8,19,36},{11,10,8},{8,19,0},{8,19,0},{8,18,5},{5,23,8}, +{8,18,5},{12,8,18},{8,20,2},{8,19,16},{8,19,0},{12,8,18},{11,16,18},{8,19,0},{0,19,36},{11,16,18},{0,19,36},{8,0,36},{8,0,36},{8,0,36},{8,0,36},{8,19,0},{8,19,0},{8,19,0},{8,18,1},{8,18,10},{8,18,10},{9,21,88},{9,20,78},{9,20,70},{9,20,78},{9,20,115},{8,21,88},{8,20,99},{8,20,115},{8,21,72},{8,20,52},{9,21,24}, +{9,20,14},{9,20,6},{9,20,14},{15,0,51},{8,21,24},{8,20,35},{8,20,51},{12,16,51},{8,20,51},{9,20,69},{9,20,69},{9,20,69},{9,19,72},{9,19,72},{9,19,72},{9,19,72},{9,19,72},{8,20,11},{8,19,24},{9,20,5},{9,20,5},{9,20,5},{9,19,8},{12,9,8},{9,19,8},{9,19,8},{9,19,8},{14,13,8},{9,19,8},{14,4,18},{9,20,10},{9,20,2}, +{8,20,10},{14,4,18},{14,14,18},{8,20,10},{0,20,50},{14,14,18},{0,20,50},{9,0,68},{9,0,68},{9,0,68},{9,0,68},{9,18,65},{9,18,65},{9,18,65},{8,20,65},{8,20,2},{8,20,2},{9,24,70},{9,22,58},{9,21,75},{9,21,51},{9,23,52},{9,22,25},{9,21,3},{9,21,46},{8,23,68},{8,21,70},{9,24,69},{9,22,57},{9,21,74},{9,21,50},{15,3,51}, +{9,22,24},{9,21,2},{8,21,45},{11,19,51},{8,21,45},{9,23,51},{9,23,51},{9,23,51},{9,21,51},{9,22,9},{9,21,3},{9,21,3},{9,20,9},{8,22,12},{9,20,12},{9,23,50},{9,23,50},{9,23,50},{9,21,50},{15,2,8},{9,21,2},{9,21,2},{9,20,8},{13,16,8},{9,20,8},{14,7,18},{9,22,8},{9,21,25},{9,21,1},{14,7,18},{13,17,18},{9,21,1}, +{0,21,36},{13,17,18},{0,21,36},{9,0,50},{9,0,50},{9,0,50},{9,0,50},{9,21,2},{9,21,2},{9,21,2},{9,20,5},{9,20,8},{9,20,8},{10,23,88},{10,22,78},{10,22,69},{10,22,77},{10,22,115},{10,22,107},{10,22,98},{9,22,117},{9,23,60},{9,22,36},{10,23,24},{10,22,14},{10,22,5},{10,22,13},{11,19,51},{9,23,35},{10,22,34},{9,22,36},{9,23,51}, +{9,22,36},{10,22,69},{10,22,69},{10,22,69},{10,21,72},{10,21,72},{10,21,72},{10,21,72},{10,21,72},{9,22,16},{9,22,36},{10,22,5},{10,22,5},{10,22,5},{10,21,8},{11,18,8},{10,21,8},{10,21,8},{10,21,8},{10,21,8},{10,21,8},{13,13,18},{10,22,10},{10,22,1},{10,22,9},{13,13,18},{15,16,18},{10,22,9},{0,22,36},{15,16,18},{0,22,36},{10,0,68}, +{10,0,68},{10,0,68},{10,0,68},{10,20,65},{10,20,65},{10,20,65},{10,21,68},{9,22,0},{9,22,0},{10,25,56},{10,24,38},{10,23,52},{10,23,36},{10,25,56},{10,24,35},{10,23,0},{10,23,52},{9,24,63},{9,23,70},{10,25,56},{10,24,38},{10,23,52},{10,23,36},{15,8,51},{10,24,35},{10,23,0},{9,23,45},{11,22,51},{9,23,45},{10,24,37},{10,24,37},{10,24,37}, +{10,23,36},{10,24,10},{10,23,0},{10,23,0},{10,22,5},{9,24,14},{10,22,14},{10,24,37},{10,24,37},{10,24,37},{10,23,36},{13,14,8},{10,23,0},{10,23,0},{10,22,5},{8,25,8},{10,22,5},{14,12,18},{10,24,2},{10,23,16},{10,23,0},{14,12,18},{13,20,18},{10,23,0},{0,23,36},{13,20,18},{0,23,36},{10,0,36},{10,0,36},{10,0,36},{10,0,36},{10,23,0}, +{10,23,0},{10,23,0},{10,22,1},{10,22,10},{10,22,10},{11,25,88},{11,24,78},{11,24,70},{11,24,78},{11,24,115},{10,25,88},{10,24,99},{10,24,115},{9,26,67},{10,24,52},{11,25,24},{11,24,14},{11,24,6},{11,24,14},{14,14,51},{10,25,24},{10,24,35},{10,24,51},{14,20,51},{10,24,51},{11,24,69},{11,24,69},{11,24,69},{11,23,72},{11,23,72},{11,23,72},{11,23,72}, +{11,23,72},{10,24,11},{10,23,24},{11,24,5},{11,24,5},{11,24,5},{11,23,8},{14,13,8},{11,23,8},{11,23,8},{11,23,8},{11,23,8},{11,23,8},{13,18,18},{11,24,10},{11,24,2},{10,24,10},{13,18,18},{11,24,18},{10,24,10},{0,24,50},{11,24,18},{0,24,50},{11,0,68},{11,0,68},{11,0,68},{11,0,68},{11,22,65},{11,22,65},{11,22,65},{10,24,65},{10,24,2}, +{10,24,2},{11,28,70},{11,26,58},{11,25,75},{11,25,51},{11,27,52},{11,26,25},{11,25,3},{11,25,46},{10,27,68},{10,25,70},{11,28,69},{11,26,57},{11,25,74},{11,25,50},{14,17,51},{11,26,24},{11,25,2},{10,25,45},{13,23,51},{10,25,45},{11,27,51},{11,27,51},{11,27,51},{11,25,51},{11,26,9},{11,25,3},{11,25,3},{11,24,9},{10,26,12},{11,24,12},{11,27,50}, +{11,27,50},{11,27,50},{11,25,50},{14,16,8},{11,25,2},{11,25,2},{11,24,8},{15,20,8},{11,24,8},{13,21,18},{11,26,8},{11,25,25},{11,25,1},{13,21,18},{15,21,18},{11,25,1},{0,25,36},{15,21,18},{0,25,36},{11,0,50},{11,0,50},{11,0,50},{11,0,50},{11,25,2},{11,25,2},{11,25,2},{11,24,5},{11,24,8},{11,24,8},{12,27,88},{12,26,78},{12,26,69}, +{12,26,77},{12,26,115},{12,26,107},{12,26,98},{11,26,117},{11,27,60},{11,26,36},{12,27,24},{12,26,14},{12,26,5},{12,26,13},{13,23,51},{11,27,35},{12,26,34},{11,26,36},{11,27,51},{11,26,36},{12,26,69},{12,26,69},{12,26,69},{12,25,72},{12,25,72},{12,25,72},{12,25,72},{12,25,72},{11,26,16},{11,26,36},{12,26,5},{12,26,5},{12,26,5},{12,25,8},{13,22,8}, +{12,25,8},{12,25,8},{12,25,8},{12,25,8},{12,25,8},{15,17,18},{12,26,10},{12,26,1},{12,26,9},{15,17,18},{12,26,18},{12,26,9},{0,26,36},{12,26,18},{0,26,36},{12,0,68},{12,0,68},{12,0,68},{12,0,68},{12,24,65},{12,24,65},{12,24,65},{12,25,68},{11,26,0},{11,26,0},{12,29,56},{12,28,38},{12,27,52},{12,27,36},{12,29,56},{12,28,35},{12,27,0}, +{12,27,52},{11,28,63},{11,27,70},{12,29,56},{12,28,38},{12,27,52},{12,27,36},{15,19,51},{12,28,35},{12,27,0},{11,27,45},{13,26,51},{11,27,45},{12,28,37},{12,28,37},{12,28,37},{12,27,36},{12,28,10},{12,27,0},{12,27,0},{12,26,5},{11,28,14},{12,26,14},{12,28,37},{12,28,37},{12,28,37},{12,27,36},{15,18,8},{12,27,0},{12,27,0},{12,26,5},{10,29,8}, +{12,26,5},{13,26,18},{12,28,2},{12,27,16},{12,27,0},{13,26,18},{15,24,18},{12,27,0},{0,27,36},{15,24,18},{0,27,36},{12,0,36},{12,0,36},{12,0,36},{12,0,36},{12,27,0},{12,27,0},{12,27,0},{12,26,1},{12,26,10},{12,26,10},{13,29,88},{13,28,78},{13,28,70},{13,28,78},{13,28,115},{12,29,88},{12,28,99},{12,28,115},{11,30,67},{12,28,52},{13,29,24}, +{13,28,14},{13,28,6},{13,28,14},{13,28,51},{12,29,24},{12,28,35},{12,28,51},{11,30,51},{12,28,51},{13,28,69},{13,28,69},{13,28,69},{13,27,72},{13,27,72},{13,27,72},{13,27,72},{13,27,72},{12,28,11},{12,27,24},{13,28,5},{13,28,5},{13,28,5},{13,27,8},{13,27,8},{13,27,8},{13,27,8},{13,27,8},{13,27,8},{13,27,8},{15,22,18},{13,28,10},{13,28,2}, +{12,28,10},{15,22,18},{13,28,18},{12,28,10},{0,28,50},{13,28,18},{0,28,50},{13,0,68},{13,0,68},{13,0,68},{13,0,68},{13,26,65},{13,26,65},{13,26,65},{12,28,65},{12,28,2},{12,28,2},{13,31,76},{13,30,58},{13,29,75},{13,29,51},{13,31,52},{13,30,25},{13,29,3},{13,29,46},{12,31,68},{12,29,70},{13,31,75},{13,30,57},{13,29,74},{13,29,50},{13,31,51}, +{13,30,24},{13,29,2},{12,29,45},{15,27,51},{12,29,45},{13,31,51},{13,31,51},{13,31,51},{13,29,51},{13,30,9},{13,29,3},{13,29,3},{13,28,9},{12,30,12},{13,28,12},{13,31,50},{13,31,50},{13,31,50},{13,29,50},{13,30,8},{13,29,2},{13,29,2},{13,28,8},{12,30,8},{13,28,8},{15,25,18},{13,30,8},{13,29,25},{13,29,1},{15,25,18},{12,31,18},{13,29,1}, +{0,29,36},{12,31,18},{0,29,36},{13,0,50},{13,0,50},{13,0,50},{13,0,50},{13,29,2},{13,29,2},{13,29,2},{13,28,5},{13,28,8},{13,28,8},{14,31,88},{14,30,78},{14,30,69},{14,30,77},{14,30,115},{14,30,107},{14,30,98},{13,30,117},{13,31,60},{13,30,36},{14,31,24},{14,30,14},{14,30,5},{14,30,13},{15,27,51},{13,31,35},{14,30,34},{13,30,36},{13,31,51}, +{13,30,36},{14,30,69},{14,30,69},{14,30,69},{14,29,72},{14,29,72},{14,29,72},{14,29,72},{14,29,72},{13,30,16},{13,30,36},{14,30,5},{14,30,5},{14,30,5},{14,29,8},{15,26,8},{14,29,8},{14,29,8},{14,29,8},{14,29,8},{14,29,8},{14,31,20},{14,30,10},{14,30,1},{14,30,9},{14,31,20},{14,30,18},{14,30,9},{0,30,36},{14,30,18},{0,30,36},{14,0,68}, +{14,0,68},{14,0,68},{14,0,68},{14,28,65},{14,28,65},{14,28,65},{14,29,68},{13,30,0},{13,30,0},{14,31,152},{14,31,88},{14,31,52},{14,31,36},{14,31,116},{14,31,36},{14,31,0},{14,31,52},{14,31,88},{13,31,70},{15,30,118},{14,31,88},{14,31,52},{14,31,36},{15,29,52},{14,31,36},{14,31,0},{13,31,45},{15,30,51},{13,31,45},{14,31,52},{14,31,52},{14,31,52}, +{14,31,36},{14,31,16},{14,31,0},{14,31,0},{14,30,5},{14,30,35},{14,30,14},{14,31,52},{14,31,52},{14,31,52},{14,31,36},{15,28,10},{14,31,0},{14,31,0},{14,30,5},{15,29,16},{14,30,5},{15,30,18},{15,30,34},{14,31,16},{14,31,0},{15,30,18},{15,30,26},{14,31,0},{0,31,36},{15,30,26},{0,31,36},{14,0,36},{14,0,36},{14,0,36},{14,0,36},{14,31,0}, +{14,31,0},{14,31,0},{14,30,1},{14,30,10},{14,30,10},{15,31,68},{15,31,68},{15,31,68},{15,31,68},{15,31,68},{15,31,68},{15,31,68},{15,31,68},{15,31,68},{14,31,20},{15,31,4},{15,31,4},{15,31,4},{15,31,4},{15,31,4},{15,31,4},{15,31,4},{15,31,4},{15,31,4},{15,31,4},{15,31,68},{15,31,68},{15,31,68},{15,31,68},{15,31,68},{15,31,68},{15,31,68}, +{15,31,68},{14,31,56},{14,31,20},{15,31,4},{15,31,4},{15,31,4},{15,31,4},{15,31,4},{15,31,4},{15,31,4},{15,31,4},{15,31,4},{15,31,4},{15,31,0},{15,31,0},{15,31,0},{15,31,0},{15,31,0},{15,31,0},{15,31,0},{0,31,0},{15,31,0},{0,31,0},{15,0,68},{15,0,68},{15,0,68},{15,0,68},{15,30,65},{15,30,65},{15,30,65},{15,31,68},{14,31,20}, +{14,31,20},{0,4,74},{0,3,20},{0,2,2},{0,2,26},{0,2,158},{0,2,110},{0,2,62},{0,1,115},{0,1,178},{0,1,124},{0,4,74},{0,3,20},{0,2,2},{0,2,26},{0,2,158},{0,2,110},{0,2,62},{0,1,115},{1,0,158},{0,1,115},{0,2,1},{0,2,1},{0,2,1},{0,1,0},{0,1,13},{0,1,9},{0,1,9},{0,0,25},{0,0,25},{0,0,25},{0,2,1}, +{0,2,1},{0,2,1},{0,1,0},{0,1,13},{0,1,9},{0,1,9},{0,0,25},{0,0,25},{0,0,25},{1,0,74},{0,3,20},{0,2,2},{0,2,26},{1,0,74},{1,1,72},{0,2,26},{0,1,90},{1,1,72},{0,1,90},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,6,83},{0,5,13},{0,3,26}, +{0,3,14},{0,5,248},{0,3,140},{0,3,41},{0,2,139},{0,2,319},{0,2,175},{0,6,83},{0,5,13},{0,3,26},{0,3,14},{1,1,244},{0,3,140},{0,3,41},{0,2,139},{0,3,248},{0,2,139},{0,4,10},{0,4,10},{0,4,10},{0,3,13},{0,3,52},{0,2,18},{0,2,18},{0,1,29},{0,1,77},{0,1,38},{0,4,10},{0,4,10},{0,4,10},{0,3,13},{0,3,52}, +{0,2,18},{0,2,18},{0,1,29},{1,0,58},{0,1,29},{1,3,72},{0,5,4},{0,3,17},{0,3,5},{1,3,72},{3,0,74},{0,3,5},{0,2,90},{3,0,74},{0,2,90},{0,0,9},{0,0,9},{0,0,9},{0,0,9},{0,1,0},{0,1,0},{0,1,0},{0,1,4},{0,0,9},{0,0,9},{0,9,193},{0,7,125},{0,4,202},{0,4,122},{0,7,244},{0,5,96},{0,4,2}, +{0,3,106},{0,4,395},{0,3,187},{1,6,99},{1,5,45},{1,4,26},{1,4,50},{1,4,243},{0,5,96},{0,4,2},{0,3,106},{2,2,243},{0,3,106},{0,7,121},{0,7,121},{0,7,121},{0,4,122},{0,5,52},{0,4,2},{0,4,2},{0,3,25},{0,3,133},{0,2,62},{1,4,26},{1,4,26},{1,4,26},{1,3,25},{1,2,50},{0,4,2},{0,4,2},{0,3,25},{1,2,50}, +{0,3,25},{0,9,72},{0,7,4},{1,4,1},{0,4,1},{0,9,72},{2,3,72},{0,4,1},{0,3,90},{2,3,72},{0,3,90},{0,0,121},{0,0,121},{0,0,121},{0,0,121},{0,4,1},{0,4,1},{0,4,1},{0,2,1},{0,2,37},{0,2,37},{1,8,164},{1,7,94},{1,5,106},{1,5,94},{0,10,292},{0,7,125},{0,5,81},{0,4,130},{0,6,364},{0,4,106},{1,8,83}, +{1,7,13},{1,5,25},{1,5,13},{3,0,243},{0,7,76},{0,5,32},{0,4,81},{5,0,243},{0,4,81},{1,6,91},{1,6,91},{1,6,91},{1,5,94},{0,8,99},{0,6,51},{0,6,51},{0,4,66},{0,4,107},{0,4,42},{1,6,10},{1,6,10},{1,6,10},{1,5,13},{0,8,50},{0,6,2},{0,6,2},{0,4,17},{4,0,50},{0,4,17},{3,2,74},{1,7,4},{1,5,16}, +{1,5,4},{3,2,74},{5,1,72},{1,5,4},{0,4,80},{5,1,72},{0,4,80},{1,0,90},{1,0,90},{1,0,90},{1,0,90},{0,6,50},{0,6,50},{0,6,50},{0,4,50},{0,3,20},{0,3,20},{1,11,218},{1,9,149},{1,7,242},{1,6,149},{1,10,248},{1,7,99},{1,6,5},{1,5,99},{0,7,308},{0,5,100},{2,8,99},{2,7,45},{2,6,27},{2,6,51},{3,3,243}, +{0,9,81},{1,6,5},{0,5,99},{4,3,243},{0,5,99},{1,9,145},{1,9,145},{1,9,145},{1,6,148},{1,8,52},{1,6,4},{1,6,4},{1,5,18},{0,6,72},{0,5,19},{2,6,26},{2,6,26},{2,6,26},{2,5,25},{3,1,50},{1,6,4},{1,6,4},{0,5,18},{3,3,50},{0,5,18},{4,1,72},{1,9,5},{2,6,2},{1,6,5},{4,1,72},{3,5,72},{1,6,5}, +{0,5,90},{3,5,72},{0,5,90},{1,0,144},{1,0,144},{1,0,144},{1,0,144},{1,6,0},{1,6,0},{1,6,0},{1,4,4},{0,6,8},{0,6,8},{2,10,164},{2,9,94},{2,7,107},{2,7,95},{1,12,307},{1,9,137},{1,7,115},{1,6,154},{0,9,253},{1,6,106},{2,10,83},{2,9,13},{2,7,26},{2,7,14},{4,2,243},{1,9,73},{2,7,41},{1,6,90},{6,2,243}, +{1,6,90},{2,8,91},{2,8,91},{2,8,91},{2,7,94},{1,10,116},{1,8,69},{1,8,69},{1,6,73},{0,8,50},{1,6,25},{2,8,10},{2,8,10},{2,8,10},{2,7,13},{4,0,50},{1,8,5},{1,8,5},{1,6,9},{1,7,50},{1,6,9},{3,7,72},{2,9,4},{2,7,17},{2,7,5},{3,7,72},{8,0,72},{2,7,5},{0,6,90},{8,0,72},{0,6,90},{2,0,90}, +{2,0,90},{2,0,90},{2,0,90},{1,9,65},{1,9,65},{1,9,65},{1,6,64},{0,7,10},{0,7,10},{2,13,194},{2,11,126},{2,8,203},{2,8,123},{2,11,245},{2,9,97},{2,8,3},{2,7,107},{0,11,249},{1,7,100},{3,10,99},{3,9,45},{3,8,26},{3,8,50},{3,8,243},{1,11,81},{2,8,2},{1,7,99},{4,6,243},{1,7,99},{2,11,122},{2,11,122},{2,11,122}, +{2,8,123},{2,9,53},{2,8,3},{2,8,3},{2,7,26},{1,8,62},{1,7,19},{3,8,26},{3,8,26},{3,8,26},{3,7,25},{3,6,50},{2,8,2},{2,8,2},{1,7,18},{3,6,50},{1,7,18},{5,3,72},{2,11,4},{3,8,1},{2,8,1},{5,3,72},{4,7,72},{2,8,1},{0,7,90},{4,7,72},{0,7,90},{2,0,122},{2,0,122},{2,0,122},{2,0,122},{2,8,2}, +{2,8,2},{2,8,2},{2,6,2},{1,7,10},{1,7,10},{3,12,164},{3,11,94},{3,9,106},{3,9,94},{2,14,292},{2,11,125},{2,9,81},{2,8,130},{1,11,253},{2,8,106},{3,12,83},{3,11,13},{3,9,25},{3,9,13},{5,4,243},{2,11,76},{2,9,32},{2,8,81},{9,1,243},{2,8,81},{3,10,91},{3,10,91},{3,10,91},{3,9,94},{2,12,99},{2,10,51},{2,10,51}, +{2,8,66},{1,10,50},{2,8,42},{3,10,10},{3,10,10},{3,10,10},{3,9,13},{5,2,50},{2,10,2},{2,10,2},{2,8,17},{8,1,50},{2,8,17},{1,19,72},{3,11,4},{3,9,16},{3,9,4},{1,19,72},{9,2,72},{3,9,4},{0,8,80},{9,2,72},{0,8,80},{3,0,90},{3,0,90},{3,0,90},{3,0,90},{2,10,50},{2,10,50},{2,10,50},{2,8,50},{1,9,9}, +{1,9,9},{3,15,218},{3,13,149},{3,11,242},{3,10,149},{3,14,248},{3,11,99},{3,10,5},{3,9,99},{1,13,244},{2,9,100},{4,12,99},{4,11,45},{4,10,27},{4,10,51},{5,7,243},{2,13,81},{3,10,5},{2,9,99},{6,7,243},{2,9,99},{3,13,145},{3,13,145},{3,13,145},{3,10,148},{3,12,52},{3,10,4},{3,10,4},{3,9,18},{1,12,56},{2,9,19},{4,10,26}, +{4,10,26},{4,10,26},{4,9,25},{5,5,50},{3,10,4},{3,10,4},{2,9,18},{5,7,50},{2,9,18},{7,2,72},{3,13,5},{4,10,2},{3,10,5},{7,2,72},{12,0,72},{3,10,5},{0,9,90},{12,0,72},{0,9,90},{3,0,144},{3,0,144},{3,0,144},{3,0,144},{3,10,0},{3,10,0},{3,10,0},{3,8,4},{2,10,8},{2,10,8},{4,14,164},{4,13,94},{4,11,107}, +{4,11,95},{3,16,307},{3,13,137},{3,11,115},{3,10,154},{2,13,253},{3,10,106},{4,14,83},{4,13,13},{4,11,26},{4,11,14},{7,3,243},{3,13,73},{4,11,41},{3,10,90},{11,2,243},{3,10,90},{4,12,91},{4,12,91},{4,12,91},{4,11,94},{3,14,116},{3,12,69},{3,12,69},{3,10,73},{2,12,50},{3,10,25},{4,12,10},{4,12,10},{4,12,10},{4,11,13},{7,1,50}, +{3,12,5},{3,12,5},{3,10,9},{10,2,50},{3,10,9},{5,11,72},{4,13,4},{4,11,17},{4,11,5},{5,11,72},{11,3,72},{4,11,5},{0,10,90},{11,3,72},{0,10,90},{4,0,90},{4,0,90},{4,0,90},{4,0,90},{3,13,65},{3,13,65},{3,13,65},{3,10,64},{2,11,10},{2,11,10},{4,17,194},{4,15,126},{4,12,203},{4,12,123},{4,15,245},{4,13,97},{4,12,3}, +{4,11,107},{2,15,249},{3,11,100},{5,14,99},{5,13,45},{5,12,26},{5,12,50},{5,12,243},{3,15,81},{4,12,2},{3,11,99},{13,1,243},{3,11,99},{4,15,122},{4,15,122},{4,15,122},{4,12,123},{4,13,53},{4,12,3},{4,12,3},{4,11,26},{3,12,62},{3,11,19},{5,12,26},{5,12,26},{5,12,26},{5,11,25},{5,10,50},{4,12,2},{4,12,2},{3,11,18},{12,1,50}, +{3,11,18},{8,2,72},{4,15,4},{5,12,1},{4,12,1},{8,2,72},{13,2,72},{4,12,1},{0,11,90},{13,2,72},{0,11,90},{4,0,122},{4,0,122},{4,0,122},{4,0,122},{4,12,2},{4,12,2},{4,12,2},{4,10,2},{3,11,10},{3,11,10},{5,16,164},{5,15,94},{5,13,106},{5,13,94},{4,18,292},{4,15,125},{4,13,81},{4,12,130},{3,15,253},{4,12,106},{5,16,83}, +{5,15,13},{5,13,25},{5,13,13},{8,3,243},{4,15,76},{4,13,32},{4,12,81},{11,5,243},{4,12,81},{5,14,91},{5,14,91},{5,14,91},{5,13,94},{4,16,99},{4,14,51},{4,14,51},{4,12,66},{3,14,50},{4,12,42},{5,14,10},{5,14,10},{5,14,10},{5,13,13},{8,1,50},{4,14,2},{4,14,2},{4,12,17},{10,5,50},{4,12,17},{3,23,72},{5,15,4},{5,13,16}, +{5,13,4},{3,23,72},{11,6,72},{5,13,4},{0,12,80},{11,6,72},{0,12,80},{5,0,90},{5,0,90},{5,0,90},{5,0,90},{4,14,50},{4,14,50},{4,14,50},{4,12,50},{3,13,9},{3,13,9},{5,19,218},{5,17,149},{5,15,242},{5,14,149},{5,18,248},{5,15,99},{5,14,5},{5,13,99},{3,17,244},{4,13,100},{6,16,99},{6,15,45},{6,14,27},{6,14,51},{8,6,243}, +{4,17,81},{5,14,5},{4,13,99},{15,2,243},{4,13,99},{5,17,145},{5,17,145},{5,17,145},{5,14,148},{5,16,52},{5,14,4},{5,14,4},{5,13,18},{3,16,56},{4,13,19},{6,14,26},{6,14,26},{6,14,26},{6,13,25},{8,4,50},{5,14,4},{5,14,4},{4,13,18},{14,2,50},{4,13,18},{3,26,72},{5,17,5},{6,14,2},{5,14,5},{3,26,72},{15,3,72},{5,14,5}, +{0,13,90},{15,3,72},{0,13,90},{5,0,144},{5,0,144},{5,0,144},{5,0,144},{5,14,0},{5,14,0},{5,14,0},{5,12,4},{4,14,8},{4,14,8},{6,18,164},{6,17,94},{6,15,107},{6,15,95},{5,20,307},{5,17,137},{5,15,115},{5,14,154},{4,17,253},{5,14,106},{6,18,83},{6,17,13},{6,15,26},{6,15,14},{5,20,243},{5,17,73},{6,15,41},{5,14,90},{13,6,243}, +{5,14,90},{6,16,91},{6,16,91},{6,16,91},{6,15,94},{5,18,116},{5,16,69},{5,16,69},{5,14,73},{4,16,50},{5,14,25},{6,16,10},{6,16,10},{6,16,10},{6,15,13},{3,25,50},{5,16,5},{5,16,5},{5,14,9},{12,6,50},{5,14,9},{11,0,72},{6,17,4},{6,15,17},{6,15,5},{11,0,72},{13,7,72},{6,15,5},{0,14,90},{13,7,72},{0,14,90},{6,0,90}, +{6,0,90},{6,0,90},{6,0,90},{5,17,65},{5,17,65},{5,17,65},{5,14,64},{4,15,10},{4,15,10},{6,21,194},{6,19,126},{6,16,203},{6,16,123},{6,19,245},{6,17,97},{6,16,3},{6,15,107},{4,19,249},{5,15,100},{7,18,99},{7,17,45},{7,16,26},{7,16,50},{11,1,243},{5,19,81},{6,16,2},{5,15,99},{15,5,243},{5,15,99},{6,19,122},{6,19,122},{6,19,122}, +{6,16,123},{6,17,53},{6,16,3},{6,16,3},{6,15,26},{5,16,62},{5,15,19},{7,16,26},{7,16,26},{7,16,26},{7,15,25},{9,6,50},{6,16,2},{6,16,2},{5,15,18},{14,5,50},{5,15,18},{10,6,72},{6,19,4},{7,16,1},{6,16,1},{10,6,72},{15,6,72},{6,16,1},{0,15,90},{15,6,72},{0,15,90},{6,0,122},{6,0,122},{6,0,122},{6,0,122},{6,16,2}, +{6,16,2},{6,16,2},{6,14,2},{5,15,10},{5,15,10},{7,20,164},{7,19,94},{7,17,106},{7,17,94},{6,22,292},{6,19,125},{6,17,81},{6,16,130},{5,19,253},{6,16,106},{7,20,83},{7,19,13},{7,17,25},{7,17,13},{10,7,243},{6,19,76},{6,17,32},{6,16,81},{13,9,243},{6,16,81},{7,18,91},{7,18,91},{7,18,91},{7,17,94},{6,20,99},{6,18,51},{6,18,51}, +{6,16,66},{5,18,50},{6,16,42},{7,18,10},{7,18,10},{7,18,10},{7,17,13},{10,5,50},{6,18,2},{6,18,2},{6,16,17},{12,9,50},{6,16,17},{12,2,72},{7,19,4},{7,17,16},{7,17,4},{12,2,72},{13,10,72},{7,17,4},{0,16,80},{13,10,72},{0,16,80},{7,0,90},{7,0,90},{7,0,90},{7,0,90},{6,18,50},{6,18,50},{6,18,50},{6,16,50},{5,17,9}, +{5,17,9},{7,23,218},{7,21,149},{7,19,242},{7,18,149},{7,22,248},{7,19,99},{7,18,5},{7,17,99},{5,21,244},{6,17,100},{7,23,218},{7,21,149},{8,18,206},{7,18,149},{13,0,243},{6,21,81},{7,18,5},{6,17,99},{5,21,243},{6,17,99},{7,21,145},{7,21,145},{7,21,145},{7,18,148},{7,20,52},{7,18,4},{7,18,4},{7,17,18},{5,20,56},{6,17,19},{7,21,145}, +{7,21,145},{7,21,145},{7,18,148},{10,8,50},{7,18,4},{7,18,4},{6,17,18},{11,12,50},{6,17,18},{9,15,72},{7,21,5},{8,18,37},{7,18,5},{9,15,72},{5,22,72},{7,18,5},{0,17,90},{5,22,72},{0,17,90},{7,0,144},{7,0,144},{7,0,144},{7,0,144},{7,18,0},{7,18,0},{7,18,0},{7,16,4},{6,18,8},{6,18,8},{8,21,388},{8,20,334},{8,19,316}, +{8,19,340},{7,24,307},{7,21,137},{7,19,115},{7,18,154},{6,21,253},{7,18,106},{8,21,99},{8,20,45},{8,19,27},{8,19,51},{8,19,243},{7,21,73},{7,19,51},{7,18,90},{15,10,243},{7,18,90},{8,19,315},{8,19,315},{8,19,315},{8,18,314},{7,22,116},{7,20,69},{7,20,69},{7,18,73},{6,20,50},{7,18,25},{8,19,26},{8,19,26},{8,19,26},{8,18,25},{9,14,50}, +{7,20,5},{7,20,5},{7,18,9},{14,10,50},{7,18,9},{13,4,72},{8,20,20},{8,19,2},{7,19,26},{13,4,72},{15,11,72},{7,19,26},{0,18,90},{15,11,72},{0,18,90},{8,0,314},{8,0,314},{8,0,314},{8,0,314},{7,21,65},{7,21,65},{7,21,65},{7,18,64},{6,19,10},{6,19,10},{8,23,164},{8,22,94},{8,20,106},{8,20,94},{8,22,329},{8,20,221},{8,20,121}, +{8,19,220},{6,23,249},{7,19,100},{8,23,83},{8,22,13},{8,20,25},{8,20,13},{13,5,243},{7,23,81},{8,20,40},{7,19,99},{12,15,243},{7,19,99},{8,21,91},{8,21,91},{8,21,91},{8,20,94},{8,20,133},{8,19,99},{8,19,99},{8,18,110},{7,20,62},{7,19,19},{8,21,10},{8,21,10},{8,21,10},{8,20,13},{11,10,50},{8,19,18},{8,19,18},{7,19,18},{5,23,50}, +{7,19,18},{15,0,72},{8,22,4},{8,20,16},{8,20,4},{15,0,72},{12,16,72},{8,20,4},{0,19,90},{12,16,72},{0,19,90},{8,0,90},{8,0,90},{8,0,90},{8,0,90},{8,18,81},{8,18,81},{8,18,81},{8,18,85},{7,19,10},{7,19,10},{8,26,194},{8,24,131},{8,21,203},{8,21,123},{8,24,245},{8,22,97},{8,21,3},{8,20,97},{7,23,253},{7,20,141},{9,23,99}, +{9,22,45},{9,21,26},{9,21,50},{15,1,243},{8,22,96},{8,21,2},{8,20,96},{15,13,243},{8,20,96},{8,24,122},{8,24,122},{8,24,122},{8,21,123},{8,22,53},{8,21,3},{8,21,3},{8,19,27},{7,22,50},{8,19,75},{9,21,26},{9,21,26},{9,21,26},{9,20,25},{12,9,50},{8,21,2},{8,21,2},{8,19,26},{14,13,50},{8,19,26},{14,6,72},{8,24,9},{9,21,1}, +{8,21,1},{14,6,72},{15,14,72},{8,21,1},{0,20,80},{15,14,72},{0,20,80},{8,0,122},{8,0,122},{8,0,122},{8,0,122},{8,21,2},{8,21,2},{8,21,2},{8,19,2},{7,21,9},{7,21,9},{9,26,154},{9,24,81},{9,22,106},{9,22,82},{9,24,307},{8,24,137},{9,22,91},{8,21,154},{7,25,244},{8,21,106},{9,26,90},{9,24,17},{9,22,42},{9,22,18},{15,4,243}, +{8,24,73},{9,22,27},{8,21,90},{9,22,243},{8,21,90},{9,24,81},{9,24,81},{9,24,81},{9,22,81},{9,22,114},{8,23,68},{8,23,68},{8,21,73},{7,24,56},{8,21,25},{9,24,17},{9,24,17},{9,24,17},{9,22,17},{15,2,50},{8,23,4},{8,23,4},{8,21,9},{13,16,50},{8,21,9},{11,19,72},{9,24,1},{9,22,26},{9,22,2},{11,19,72},{9,23,72},{9,22,2}, +{0,21,90},{9,23,72},{0,21,90},{9,0,80},{9,0,80},{9,0,80},{9,0,80},{9,20,65},{9,20,65},{9,20,65},{8,21,64},{8,21,16},{8,21,16},{9,28,216},{9,26,149},{9,23,245},{9,23,149},{9,27,248},{9,24,89},{9,23,5},{9,22,99},{7,27,260},{8,22,100},{10,25,99},{10,24,45},{10,23,27},{10,23,51},{10,23,243},{8,26,81},{9,23,5},{8,22,99},{11,21,243}, +{8,22,99},{9,26,145},{9,26,145},{9,26,145},{9,23,148},{9,25,52},{9,23,4},{9,23,4},{9,22,18},{8,23,72},{8,22,19},{10,23,26},{10,23,26},{10,23,26},{10,22,25},{11,18,50},{9,23,4},{9,23,4},{8,22,18},{10,21,50},{8,22,18},{15,8,72},{9,26,5},{10,23,2},{9,23,5},{15,8,72},{11,22,72},{9,23,5},{0,22,90},{11,22,72},{0,22,90},{9,0,144}, +{9,0,144},{9,0,144},{9,0,144},{9,23,0},{9,23,0},{9,23,0},{9,21,4},{8,23,8},{8,23,8},{10,27,164},{10,26,94},{10,24,106},{10,24,94},{9,29,307},{9,26,137},{9,24,105},{9,23,154},{8,26,253},{9,23,106},{10,27,83},{10,26,13},{10,24,25},{10,24,13},{15,9,243},{9,26,73},{10,24,40},{9,23,90},{14,19,243},{9,23,90},{10,25,91},{10,25,91},{10,25,91}, +{10,24,94},{9,27,116},{9,25,69},{9,25,69},{9,23,73},{8,25,50},{9,23,25},{10,25,10},{10,25,10},{10,25,10},{10,24,13},{13,14,50},{9,25,5},{9,25,5},{9,23,9},{8,25,50},{9,23,9},{14,14,72},{10,26,4},{10,24,16},{10,24,4},{14,14,72},{14,20,72},{10,24,4},{0,23,90},{14,20,72},{0,23,90},{10,0,90},{10,0,90},{10,0,90},{10,0,90},{9,26,65}, +{9,26,65},{9,26,65},{9,23,64},{8,24,9},{8,24,9},{10,30,194},{10,28,131},{10,25,203},{10,25,123},{10,28,245},{10,26,97},{10,25,3},{10,24,97},{8,28,252},{9,24,85},{11,27,99},{11,26,45},{11,25,26},{11,25,50},{14,15,243},{9,28,80},{10,25,2},{9,24,84},{12,23,243},{9,24,84},{10,28,122},{10,28,122},{10,28,122},{10,25,123},{10,26,53},{10,25,3},{10,25,3}, +{10,23,27},{9,25,62},{9,24,21},{11,25,26},{11,25,26},{11,25,26},{11,24,25},{14,13,50},{10,25,2},{10,25,2},{9,24,20},{11,23,50},{9,24,20},{13,20,72},{10,28,9},{11,25,1},{10,25,1},{13,20,72},{13,23,74},{10,25,1},{0,24,80},{13,23,74},{0,24,80},{10,0,122},{10,0,122},{10,0,122},{10,0,122},{10,25,2},{10,25,2},{10,25,2},{10,23,2},{9,24,5}, +{9,24,5},{11,30,154},{11,28,81},{11,26,106},{11,26,82},{11,28,307},{10,28,137},{11,26,91},{10,25,154},{9,28,260},{10,25,106},{11,30,90},{11,28,17},{11,26,42},{11,26,18},{14,18,243},{10,28,73},{11,26,27},{10,25,90},{11,26,243},{10,25,90},{11,28,81},{11,28,81},{11,28,81},{11,26,81},{11,26,114},{10,27,68},{10,27,68},{10,25,73},{9,27,53},{10,25,25},{11,28,17}, +{11,28,17},{11,28,17},{11,26,17},{14,16,50},{10,27,4},{10,27,4},{10,25,9},{15,20,50},{10,25,9},{13,23,72},{11,28,1},{11,26,26},{11,26,2},{13,23,72},{11,27,72},{11,26,2},{0,25,90},{11,27,72},{0,25,90},{11,0,80},{11,0,80},{11,0,80},{11,0,80},{11,24,65},{11,24,65},{11,24,65},{10,25,64},{10,25,16},{10,25,16},{11,31,248},{11,30,149},{11,27,245}, +{11,27,149},{11,31,248},{11,28,89},{11,27,5},{11,26,99},{9,30,244},{10,26,100},{12,29,99},{12,28,45},{12,27,27},{12,27,51},{12,27,243},{10,30,81},{11,27,5},{10,26,99},{13,25,243},{10,26,99},{11,30,145},{11,30,145},{11,30,145},{11,27,148},{11,29,52},{11,27,4},{11,27,4},{11,26,18},{9,29,56},{10,26,19},{12,27,26},{12,27,26},{12,27,26},{12,26,25},{13,22,50}, +{11,27,4},{11,27,4},{10,26,18},{12,25,50},{10,26,18},{15,19,72},{11,30,5},{12,27,2},{11,27,5},{15,19,72},{13,26,72},{11,27,5},{0,26,90},{13,26,72},{0,26,90},{11,0,144},{11,0,144},{11,0,144},{11,0,144},{11,27,0},{11,27,0},{11,27,0},{11,25,4},{10,27,8},{10,27,8},{12,31,164},{12,30,94},{12,28,106},{12,28,94},{12,30,329},{11,30,137},{11,28,105}, +{11,27,154},{10,30,253},{11,27,106},{12,31,83},{12,30,13},{12,28,25},{12,28,13},{14,23,243},{11,30,73},{12,28,40},{11,27,90},{11,29,243},{11,27,90},{12,29,91},{12,29,91},{12,29,91},{12,28,94},{11,31,116},{11,29,69},{11,29,69},{11,27,73},{10,29,50},{11,27,25},{12,29,10},{12,29,10},{12,29,10},{12,28,13},{15,18,50},{11,29,5},{11,29,5},{11,27,9},{10,29,50}, +{11,27,9},{13,28,72},{12,30,4},{12,28,16},{12,28,4},{13,28,72},{11,30,72},{12,28,4},{0,27,90},{11,30,72},{0,27,90},{12,0,90},{12,0,90},{12,0,90},{12,0,90},{11,30,65},{11,30,65},{11,30,65},{11,27,64},{10,28,9},{10,28,9},{12,31,356},{12,31,140},{12,29,203},{12,29,123},{12,31,284},{12,30,97},{12,29,3},{12,28,97},{10,31,287},{11,28,85},{13,31,99}, +{13,30,45},{13,29,26},{13,29,50},{13,29,243},{12,30,96},{12,29,2},{11,28,84},{14,27,243},{11,28,84},{12,31,131},{12,31,131},{12,31,131},{12,29,123},{12,30,53},{12,29,3},{12,29,3},{12,27,27},{11,29,62},{11,28,21},{13,29,26},{13,29,26},{13,29,26},{13,28,25},{13,27,50},{12,29,2},{12,29,2},{11,28,20},{13,27,50},{11,28,20},{15,24,72},{12,31,18},{13,29,1}, +{12,29,1},{15,24,72},{15,27,74},{12,29,1},{0,28,80},{15,27,74},{0,28,80},{12,0,122},{12,0,122},{12,0,122},{12,0,122},{12,29,2},{12,29,2},{12,29,2},{12,27,2},{11,28,5},{11,28,5},{13,31,280},{13,31,120},{13,30,106},{13,30,82},{13,31,328},{13,31,200},{13,30,91},{12,29,154},{12,31,344},{12,29,106},{13,31,216},{13,31,56},{13,30,42},{13,30,18},{15,25,244}, +{13,31,136},{13,30,27},{12,29,90},{13,30,243},{12,29,90},{13,31,84},{13,31,84},{13,31,84},{13,30,81},{13,30,114},{12,31,68},{12,31,68},{12,29,73},{11,31,53},{12,29,25},{13,31,20},{13,31,20},{13,31,20},{13,30,17},{13,30,50},{12,31,4},{12,31,4},{12,29,9},{12,30,50},{12,29,9},{15,27,72},{13,31,40},{13,30,26},{13,30,2},{15,27,72},{13,31,72},{13,30,2}, +{0,29,90},{13,31,72},{0,29,90},{13,0,80},{13,0,80},{13,0,80},{13,0,80},{13,28,65},{13,28,65},{13,28,65},{12,29,64},{12,29,16},{12,29,16},{14,31,415},{14,31,351},{13,31,244},{13,31,148},{14,31,511},{13,31,173},{13,31,4},{13,30,82},{13,31,381},{12,30,83},{14,31,126},{14,31,62},{14,31,26},{14,31,50},{14,31,222},{13,31,173},{13,31,4},{12,30,82},{14,30,221}, +{12,30,82},{13,31,244},{13,31,244},{13,31,244},{13,31,148},{13,31,100},{13,31,4},{13,31,4},{13,30,18},{12,31,72},{12,30,19},{14,31,26},{14,31,26},{14,31,26},{14,30,25},{15,26,50},{13,31,4},{13,31,4},{12,30,18},{14,29,50},{12,30,18},{15,29,61},{14,31,37},{14,31,1},{13,31,4},{15,29,61},{15,30,61},{13,31,4},{0,30,73},{15,30,61},{0,30,73},{13,0,144}, +{13,0,144},{13,0,144},{13,0,144},{13,31,0},{13,31,0},{13,31,0},{13,29,4},{12,31,8},{12,31,8},{14,31,239},{14,31,175},{14,31,139},{14,31,99},{14,31,239},{14,31,135},{14,31,99},{13,31,73},{13,31,285},{13,31,25},{14,31,158},{14,31,94},{14,31,58},{14,31,18},{15,29,94},{14,31,54},{14,31,18},{13,31,9},{15,30,93},{13,31,9},{14,31,139},{14,31,139},{14,31,139}, +{14,31,99},{14,31,139},{14,31,99},{14,31,99},{13,31,73},{13,31,116},{13,31,25},{14,31,58},{14,31,58},{14,31,58},{14,31,18},{15,28,52},{14,31,18},{14,31,18},{13,31,9},{15,29,58},{13,31,9},{15,30,9},{15,31,9},{15,31,9},{14,31,9},{15,30,9},{15,31,9},{14,31,9},{0,31,9},{15,31,9},{0,31,9},{14,0,90},{14,0,90},{14,0,90},{14,0,90},{14,30,81}, +{14,30,81},{14,30,81},{13,31,64},{13,31,16},{13,31,16},{15,31,314},{14,31,258},{14,31,222},{14,31,158},{14,31,226},{14,31,98},{14,31,62},{14,31,2},{14,31,122},{14,31,50},{15,31,25},{15,31,25},{15,31,25},{15,31,25},{15,30,22},{15,31,25},{15,31,25},{14,31,1},{15,31,25},{14,31,1},{14,31,222},{14,31,222},{14,31,222},{14,31,158},{14,31,126},{14,31,62},{14,31,62}, +{14,31,2},{14,31,86},{14,31,50},{15,31,25},{15,31,25},{15,31,25},{15,31,25},{15,30,13},{15,31,25},{15,31,25},{14,31,1},{15,30,25},{14,31,1},{15,31,0},{15,31,0},{15,31,0},{15,31,0},{15,31,0},{15,31,0},{15,31,0},{0,31,0},{15,31,0},{0,31,0},{14,0,122},{14,0,122},{14,0,122},{14,0,122},{14,31,26},{14,31,26},{14,31,26},{14,31,2},{14,31,50}, +{14,31,50},{0,6,202},{0,5,52},{0,3,25},{0,3,61},{0,4,442},{0,3,313},{0,3,142},{0,2,318},{0,2,498},{0,2,354},{0,6,202},{0,5,52},{0,3,25},{0,3,61},{1,1,441},{0,3,313},{0,3,142},{0,2,318},{2,0,442},{0,2,318},{0,3,0},{0,3,0},{0,3,0},{0,2,1},{0,1,45},{0,1,25},{0,1,25},{0,1,26},{0,1,50},{0,1,35},{0,3,0}, +{0,3,0},{0,3,0},{0,2,1},{0,1,45},{0,1,25},{0,1,25},{0,1,26},{0,1,41},{0,1,26},{1,3,200},{0,5,52},{0,3,25},{0,3,61},{1,3,200},{3,0,202},{0,3,61},{0,2,218},{3,0,202},{0,2,218},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,9,200},{0,7,20},{0,5,20}, +{0,4,25},{0,6,686},{0,5,433},{0,4,169},{0,3,443},{0,3,794},{0,3,524},{0,9,200},{0,7,20},{0,5,20},{0,4,25},{0,6,686},{0,5,433},{0,4,169},{0,3,443},{3,0,686},{0,3,443},{0,6,1},{0,6,1},{0,6,1},{0,3,4},{0,3,145},{0,2,85},{0,2,85},{0,2,101},{0,1,178},{0,1,115},{0,6,1},{0,6,1},{0,6,1},{0,3,4},{0,3,145}, +{0,2,85},{0,2,85},{0,2,101},{0,2,149},{0,2,101},{0,9,200},{0,7,20},{0,5,20},{0,4,25},{0,9,200},{2,3,200},{0,4,25},{0,3,218},{2,3,200},{0,3,218},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,11,257},{0,9,54},{0,6,114},{0,5,65},{0,9,728},{0,6,371},{0,5,80}, +{0,4,377},{0,5,949},{0,4,521},{0,11,257},{0,9,54},{1,5,97},{0,5,65},{2,2,723},{0,6,371},{0,5,80},{0,4,377},{1,4,723},{0,4,377},{0,8,50},{0,8,50},{0,8,50},{0,5,49},{0,5,164},{0,4,50},{0,4,50},{0,3,65},{0,3,245},{0,2,126},{0,8,50},{0,8,50},{0,8,50},{0,5,49},{1,2,162},{0,4,50},{0,4,50},{0,3,65},{1,2,162}, +{0,3,65},{3,2,202},{0,9,5},{1,5,16},{0,5,16},{3,2,202},{5,1,200},{0,5,16},{0,4,208},{5,1,200},{0,4,208},{0,0,49},{0,0,49},{0,0,49},{0,0,49},{0,2,1},{0,2,1},{0,2,1},{0,1,4},{0,1,13},{0,1,13},{0,14,425},{0,11,234},{1,7,277},{0,7,245},{0,11,724},{0,8,289},{0,6,34},{0,5,308},{0,6,1087},{0,5,533},{1,11,201}, +{1,9,18},{1,7,21},{1,6,26},{1,8,723},{0,8,289},{0,6,34},{0,5,308},{4,2,723},{0,5,308},{0,11,225},{0,11,225},{0,11,225},{0,7,229},{0,8,162},{0,6,18},{0,6,18},{0,4,25},{0,4,338},{0,3,162},{1,8,2},{1,8,2},{1,8,2},{1,5,5},{0,8,162},{0,6,18},{0,6,18},{0,4,25},{4,0,162},{0,4,25},{3,4,200},{0,11,9},{1,7,20}, +{0,7,20},{3,4,200},{7,0,200},{0,7,20},{0,5,208},{7,0,200},{0,5,208},{0,0,225},{0,0,225},{0,0,225},{0,0,225},{0,5,0},{0,5,0},{0,5,0},{0,3,0},{0,2,61},{0,2,61},{1,14,410},{1,11,209},{1,8,288},{1,7,234},{0,14,739},{0,10,254},{0,8,33},{0,6,270},{0,8,1131},{0,6,450},{1,14,266},{1,11,65},{2,7,106},{1,7,90},{3,4,723}, +{0,10,238},{0,8,17},{0,6,254},{7,0,723},{0,6,254},{1,11,209},{1,11,209},{1,11,209},{1,7,209},{0,11,178},{0,8,17},{0,8,17},{0,5,18},{0,6,376},{0,5,123},{1,11,65},{1,11,65},{1,11,65},{1,7,65},{3,1,162},{0,8,1},{0,8,1},{0,5,2},{3,3,162},{0,5,2},{3,7,200},{1,11,1},{2,7,25},{0,8,17},{3,7,200},{8,0,200},{0,8,17}, +{0,6,218},{8,0,200},{0,6,218},{1,0,208},{1,0,208},{1,0,208},{1,0,208},{0,8,16},{0,8,16},{0,8,16},{0,5,17},{0,4,80},{0,4,80},{1,16,474},{1,13,276},{1,9,457},{1,9,292},{1,13,740},{1,10,298},{1,8,45},{1,7,315},{0,9,1013},{0,7,308},{2,13,201},{2,11,21},{2,9,21},{2,8,26},{5,0,723},{0,12,227},{1,8,29},{0,7,227},{5,4,723}, +{0,7,227},{1,13,272},{1,13,272},{1,13,272},{1,9,276},{1,10,180},{1,8,29},{1,8,29},{1,6,33},{0,8,306},{0,6,41},{2,10,2},{2,10,2},{2,10,2},{2,7,5},{4,0,162},{0,10,5},{0,10,5},{0,6,5},{1,7,162},{0,6,5},{5,3,200},{1,13,4},{2,9,20},{1,9,20},{5,3,200},{4,7,200},{1,9,20},{0,7,218},{4,7,200},{0,7,218},{1,0,272}, +{1,0,272},{1,0,272},{1,0,272},{1,7,17},{1,7,17},{1,7,17},{1,5,17},{0,6,40},{0,6,40},{2,15,426},{2,13,223},{2,10,283},{2,9,234},{1,16,739},{1,12,267},{1,10,33},{1,8,273},{0,11,913},{0,8,225},{2,15,257},{2,13,54},{3,9,97},{2,9,65},{4,6,723},{0,13,208},{1,10,17},{0,8,209},{3,8,723},{0,8,209},{2,12,219},{2,12,219},{2,12,219}, +{2,9,218},{1,13,180},{1,10,17},{1,10,17},{1,7,18},{0,9,229},{0,7,27},{2,12,50},{2,12,50},{2,12,50},{2,9,49},{3,6,162},{1,10,1},{1,10,1},{1,7,2},{3,6,162},{1,7,2},{1,19,200},{2,13,5},{3,9,16},{2,9,16},{1,19,200},{9,2,200},{2,9,16},{0,8,208},{9,2,200},{0,8,208},{2,0,218},{2,0,218},{2,0,218},{2,0,218},{1,10,16}, +{1,10,16},{1,10,16},{1,7,17},{0,8,17},{0,8,17},{2,18,450},{2,15,259},{2,11,410},{2,11,270},{2,15,749},{2,12,314},{2,10,59},{2,9,333},{0,13,868},{0,9,213},{3,15,201},{3,13,18},{3,11,21},{3,10,26},{6,2,723},{0,15,204},{2,10,34},{0,9,212},{8,3,723},{0,9,212},{2,15,250},{2,15,250},{2,15,250},{2,11,254},{2,12,187},{2,10,43},{2,10,43}, +{2,8,50},{0,11,189},{1,8,37},{3,12,2},{3,12,2},{3,12,2},{3,9,5},{5,2,162},{1,12,2},{1,12,2},{1,8,1},{8,1,162},{1,8,1},{5,8,200},{2,15,9},{3,11,20},{2,11,20},{5,8,200},{4,10,200},{2,11,20},{0,9,208},{4,10,200},{0,9,208},{2,0,250},{2,0,250},{2,0,250},{2,0,250},{2,9,25},{2,9,25},{2,9,25},{2,7,25},{0,9,5}, +{0,9,5},{3,18,410},{3,15,209},{3,12,288},{3,11,234},{2,18,739},{2,14,254},{2,12,33},{2,10,270},{0,15,804},{1,10,227},{3,18,266},{3,15,65},{4,11,106},{3,11,90},{5,8,723},{1,15,219},{2,12,17},{1,10,218},{4,10,723},{1,10,218},{3,15,209},{3,15,209},{3,15,209},{3,11,209},{2,15,178},{2,12,17},{2,12,17},{2,9,18},{0,13,171},{1,9,26},{3,15,65}, +{3,15,65},{3,15,65},{3,11,65},{5,5,162},{2,12,1},{2,12,1},{2,9,2},{5,7,162},{2,9,2},{5,11,200},{3,15,1},{4,11,25},{2,12,17},{5,11,200},{11,3,200},{2,12,17},{0,10,218},{11,3,200},{0,10,218},{3,0,208},{3,0,208},{3,0,208},{3,0,208},{2,12,16},{2,12,16},{2,12,16},{2,9,17},{1,10,9},{1,10,9},{3,20,474},{3,17,276},{3,13,457}, +{3,13,292},{3,17,740},{3,14,298},{3,12,45},{3,11,315},{0,16,747},{1,11,231},{4,17,201},{4,15,21},{4,13,21},{4,12,26},{7,4,723},{1,17,209},{3,12,29},{1,11,227},{9,5,723},{1,11,227},{3,17,272},{3,17,272},{3,17,272},{3,13,276},{3,14,180},{3,12,29},{3,12,29},{3,10,33},{0,15,171},{2,10,41},{4,14,2},{4,14,2},{4,14,2},{4,11,5},{7,1,162}, +{2,14,5},{2,14,5},{2,10,5},{10,2,162},{2,10,5},{8,2,200},{3,17,4},{4,13,20},{3,13,20},{8,2,200},{13,2,200},{3,13,20},{0,11,218},{13,2,200},{0,11,218},{3,0,272},{3,0,272},{3,0,272},{3,0,272},{3,11,17},{3,11,17},{3,11,17},{3,9,17},{1,12,8},{1,12,8},{4,19,426},{4,17,223},{4,14,283},{4,13,234},{3,20,739},{3,16,267},{3,14,33}, +{3,12,273},{0,18,727},{2,12,225},{4,19,257},{4,17,54},{5,13,97},{4,13,65},{6,10,723},{2,17,208},{3,14,17},{2,12,209},{12,3,723},{2,12,209},{4,16,219},{4,16,219},{4,16,219},{4,13,218},{3,17,180},{3,14,17},{3,14,17},{3,11,18},{1,15,171},{2,11,27},{4,16,50},{4,16,50},{4,16,50},{4,13,49},{5,10,162},{3,14,1},{3,14,1},{3,11,2},{12,1,162}, +{3,11,2},{3,23,200},{4,17,5},{5,13,16},{4,13,16},{3,23,200},{11,6,200},{4,13,16},{0,12,208},{11,6,200},{0,12,208},{4,0,218},{4,0,218},{4,0,218},{4,0,218},{3,14,16},{3,14,16},{3,14,16},{3,11,17},{1,13,10},{1,13,10},{4,22,450},{4,19,259},{4,15,410},{4,15,270},{4,19,749},{4,16,314},{4,14,59},{4,13,333},{1,18,747},{2,13,213},{5,19,201}, +{5,17,18},{5,15,21},{5,14,26},{9,1,723},{2,19,204},{4,14,34},{2,13,212},{15,1,723},{2,13,212},{4,19,250},{4,19,250},{4,19,250},{4,15,254},{4,16,187},{4,14,43},{4,14,43},{4,12,50},{1,16,174},{3,12,37},{5,16,2},{5,16,2},{5,16,2},{5,13,5},{8,1,162},{3,16,2},{3,16,2},{3,12,1},{10,5,162},{3,12,1},{9,4,200},{4,19,9},{5,15,20}, +{4,15,20},{9,4,200},{9,10,200},{4,15,20},{0,13,208},{9,10,200},{0,13,208},{4,0,250},{4,0,250},{4,0,250},{4,0,250},{4,13,25},{4,13,25},{4,13,25},{4,11,25},{2,13,5},{2,13,5},{5,22,410},{5,19,209},{5,16,288},{5,15,234},{4,22,739},{4,18,254},{4,16,33},{4,14,270},{1,20,724},{3,14,227},{5,22,266},{5,19,65},{6,15,106},{5,15,90},{9,4,723}, +{3,19,219},{4,16,17},{3,14,218},{9,10,723},{3,14,218},{5,19,209},{5,19,209},{5,19,209},{5,15,209},{4,19,178},{4,16,17},{4,16,17},{4,13,18},{2,17,171},{3,13,26},{5,19,65},{5,19,65},{5,19,65},{5,15,65},{8,4,162},{4,16,1},{4,16,1},{4,13,2},{14,2,162},{4,13,2},{11,0,200},{5,19,1},{6,15,25},{4,16,17},{11,0,200},{13,7,200},{4,16,17}, +{0,14,218},{13,7,200},{0,14,218},{5,0,208},{5,0,208},{5,0,208},{5,0,208},{4,16,16},{4,16,16},{4,16,16},{4,13,17},{3,14,9},{3,14,9},{5,24,474},{5,21,276},{5,17,457},{5,17,292},{5,21,740},{5,18,298},{5,16,45},{5,15,315},{1,22,740},{3,15,231},{6,21,201},{6,19,21},{6,17,21},{6,16,26},{10,3,723},{3,21,209},{5,16,29},{3,15,227},{11,9,723}, +{3,15,227},{5,21,272},{5,21,272},{5,21,272},{5,17,276},{5,18,180},{5,16,29},{5,16,29},{5,14,33},{2,19,171},{4,14,41},{6,18,2},{6,18,2},{6,18,2},{6,15,5},{3,25,162},{4,18,5},{4,18,5},{4,14,5},{12,6,162},{4,14,5},{10,6,200},{5,21,4},{6,17,20},{5,17,20},{10,6,200},{15,6,200},{5,17,20},{0,15,218},{15,6,200},{0,15,218},{5,0,272}, +{5,0,272},{5,0,272},{5,0,272},{5,15,17},{5,15,17},{5,15,17},{5,13,17},{3,16,8},{3,16,8},{6,23,426},{6,21,223},{6,18,283},{6,17,234},{5,24,739},{5,20,267},{5,18,33},{5,16,273},{2,22,727},{4,16,225},{6,23,257},{6,21,54},{7,17,97},{6,17,65},{9,9,723},{4,21,208},{5,18,17},{4,16,209},{14,7,723},{4,16,209},{6,20,219},{6,20,219},{6,20,219}, +{6,17,218},{5,21,180},{5,18,17},{5,18,17},{5,15,18},{3,19,171},{4,15,27},{6,20,50},{6,20,50},{6,20,50},{6,17,49},{9,6,162},{5,18,1},{5,18,1},{5,15,2},{14,5,162},{5,15,2},{12,2,200},{6,21,5},{7,17,16},{6,17,16},{12,2,200},{13,10,200},{6,17,16},{0,16,208},{13,10,200},{0,16,208},{6,0,218},{6,0,218},{6,0,218},{6,0,218},{5,18,16}, +{5,18,16},{5,18,16},{5,15,17},{3,17,10},{3,17,10},{6,26,450},{6,23,259},{6,19,410},{6,19,270},{6,23,749},{6,20,314},{6,18,59},{6,17,333},{3,22,747},{4,17,213},{7,23,201},{7,21,18},{7,19,21},{7,18,26},{11,5,723},{4,23,204},{6,18,34},{4,17,212},{12,11,723},{4,17,212},{6,23,250},{6,23,250},{6,23,250},{6,19,254},{6,20,187},{6,18,43},{6,18,43}, +{6,16,50},{3,20,174},{5,16,37},{7,20,2},{7,20,2},{7,20,2},{7,17,5},{10,5,162},{5,20,2},{5,20,2},{5,16,1},{12,9,162},{5,16,1},{11,8,200},{6,23,9},{7,19,20},{6,19,20},{11,8,200},{11,14,200},{6,19,20},{0,17,208},{11,14,200},{0,17,208},{6,0,250},{6,0,250},{6,0,250},{6,0,250},{6,17,25},{6,17,25},{6,17,25},{6,15,25},{4,17,5}, +{4,17,5},{7,26,410},{7,23,209},{7,20,288},{7,19,234},{6,26,739},{6,22,254},{6,20,33},{6,18,270},{3,24,724},{5,18,227},{7,26,266},{7,23,65},{7,20,144},{7,19,90},{11,8,723},{5,23,219},{6,20,17},{5,18,218},{11,14,723},{5,18,218},{7,23,209},{7,23,209},{7,23,209},{7,19,209},{6,23,178},{6,20,17},{6,20,17},{6,17,18},{4,21,171},{5,17,26},{7,23,65}, +{7,23,65},{7,23,65},{7,19,65},{10,8,162},{6,20,1},{6,20,1},{6,17,2},{11,12,162},{6,17,2},{13,4,200},{7,23,1},{8,19,50},{6,20,17},{13,4,200},{15,11,200},{6,20,17},{0,18,218},{15,11,200},{0,18,218},{7,0,208},{7,0,208},{7,0,208},{7,0,208},{6,20,16},{6,20,16},{6,20,16},{6,17,17},{5,18,9},{5,18,9},{7,28,474},{7,25,276},{7,21,457}, +{7,21,292},{7,25,740},{7,22,298},{7,20,45},{7,19,315},{3,26,740},{5,19,231},{8,23,283},{8,22,133},{8,20,97},{8,20,133},{12,7,723},{5,25,209},{7,20,29},{5,19,227},{13,13,723},{5,19,227},{7,25,272},{7,25,272},{7,25,272},{7,21,276},{7,22,180},{7,20,29},{7,20,29},{7,18,33},{4,23,171},{6,18,41},{8,20,81},{8,20,81},{8,20,81},{8,19,82},{9,14,162}, +{6,22,5},{6,22,5},{6,18,5},{14,10,162},{6,18,5},{15,0,200},{7,25,4},{8,20,16},{7,21,20},{15,0,200},{12,16,200},{7,21,20},{0,19,218},{12,16,200},{0,19,218},{7,0,272},{7,0,272},{7,0,272},{7,0,272},{7,19,17},{7,19,17},{7,19,17},{7,17,17},{5,20,8},{5,20,8},{8,26,642},{8,24,459},{8,22,462},{8,21,467},{7,28,739},{7,24,267},{7,22,33}, +{7,20,273},{4,26,727},{6,20,225},{8,26,201},{8,24,18},{8,22,21},{8,21,26},{14,3,723},{6,25,208},{7,22,17},{6,20,209},{11,17,723},{6,20,209},{8,23,443},{8,23,443},{8,23,443},{8,20,446},{7,25,180},{7,22,17},{7,22,17},{7,19,18},{5,23,171},{6,19,27},{8,23,2},{8,23,2},{8,23,2},{8,20,5},{11,10,162},{7,22,1},{7,22,1},{7,19,2},{5,23,162}, +{7,19,2},{14,6,200},{8,24,17},{8,22,20},{7,22,17},{14,6,200},{15,14,200},{7,22,17},{0,20,208},{15,14,200},{0,20,208},{8,0,442},{8,0,442},{8,0,442},{8,0,442},{7,22,16},{7,22,16},{7,22,16},{7,19,17},{5,21,10},{5,21,10},{8,28,420},{8,26,223},{8,23,283},{8,22,234},{7,31,872},{7,26,371},{7,23,201},{7,21,368},{5,26,747},{6,21,213},{8,28,251}, +{8,26,54},{9,22,97},{8,22,65},{13,9,723},{6,27,204},{7,23,57},{6,21,212},{14,15,723},{6,21,212},{8,25,219},{8,25,219},{8,25,219},{8,22,218},{7,27,308},{7,24,146},{7,24,146},{7,20,145},{5,24,174},{7,20,37},{8,25,50},{8,25,50},{8,25,50},{8,22,49},{12,9,162},{7,24,2},{7,24,2},{7,20,1},{14,13,162},{7,20,1},{13,12,200},{8,26,5},{9,22,16}, +{8,22,16},{13,12,200},{13,18,200},{8,22,16},{0,21,208},{13,18,200},{0,21,208},{8,0,218},{8,0,218},{8,0,218},{8,0,218},{7,24,145},{7,24,145},{7,24,145},{7,20,145},{6,21,5},{6,21,5},{8,31,474},{8,28,276},{9,24,425},{8,24,292},{8,28,740},{8,25,298},{8,23,61},{8,22,315},{5,28,724},{7,22,227},{9,28,200},{9,26,13},{9,24,25},{9,23,29},{13,12,723}, +{7,27,219},{8,23,45},{7,22,218},{13,18,723},{7,22,218},{8,28,272},{8,28,272},{8,28,272},{8,24,276},{8,25,180},{8,23,36},{8,23,36},{8,21,33},{6,25,171},{7,21,26},{9,25,0},{9,25,0},{9,25,0},{9,23,4},{15,2,162},{8,23,20},{8,23,20},{8,21,17},{13,16,162},{8,21,17},{15,8,200},{8,28,4},{9,24,25},{8,24,20},{15,8,200},{11,22,200},{8,24,20}, +{0,22,218},{11,22,200},{0,22,218},{8,0,272},{8,0,272},{8,0,272},{8,0,272},{8,22,17},{8,22,17},{8,22,17},{8,20,17},{7,22,9},{7,22,9},{9,31,410},{9,28,212},{9,25,288},{9,24,224},{8,31,739},{8,27,254},{8,25,33},{8,23,270},{5,30,740},{7,23,231},{9,31,266},{9,28,68},{10,24,97},{9,24,80},{14,11,723},{7,29,209},{8,25,17},{7,23,227},{15,17,723}, +{7,23,227},{9,27,212},{9,27,212},{9,27,212},{9,24,208},{8,28,180},{8,25,17},{8,25,17},{8,22,18},{6,27,171},{7,23,62},{9,27,68},{9,27,68},{9,27,68},{9,24,64},{11,18,162},{8,25,1},{8,25,1},{8,22,2},{10,21,162},{8,22,2},{14,14,200},{9,28,4},{10,24,16},{9,24,16},{14,14,200},{14,20,200},{9,24,16},{0,23,218},{14,20,200},{0,23,218},{9,0,208}, +{9,0,208},{9,0,208},{9,0,208},{8,25,16},{8,25,16},{8,25,16},{8,22,17},{7,24,8},{7,24,8},{9,31,570},{9,30,276},{9,26,457},{9,26,292},{9,30,740},{9,27,298},{9,25,45},{9,24,324},{6,30,727},{7,24,280},{10,30,201},{10,28,18},{10,26,21},{10,25,26},{13,17,723},{8,29,227},{9,25,29},{8,24,224},{13,21,723},{8,24,224},{9,30,272},{9,30,272},{9,30,272}, +{9,26,276},{9,27,180},{9,25,29},{9,25,29},{9,23,33},{7,27,171},{8,23,41},{10,27,2},{10,27,2},{10,27,2},{10,24,5},{13,14,162},{8,27,5},{8,27,5},{8,23,5},{8,25,162},{8,23,5},{13,20,200},{9,30,4},{10,26,20},{9,26,20},{13,20,200},{13,23,202},{9,26,20},{0,24,208},{13,23,202},{0,24,208},{9,0,272},{9,0,272},{9,0,272},{9,0,272},{9,24,17}, +{9,24,17},{9,24,17},{9,22,17},{7,25,10},{7,25,10},{10,31,468},{10,30,223},{10,27,283},{10,26,234},{9,31,835},{9,29,267},{9,27,33},{9,25,273},{7,30,747},{8,25,225},{11,29,283},{10,30,54},{11,26,97},{10,26,65},{15,13,723},{8,30,208},{9,27,17},{8,25,209},{11,25,723},{8,25,209},{10,29,219},{10,29,219},{10,29,219},{10,26,218},{9,30,180},{9,27,17},{9,27,17}, +{9,24,20},{7,28,174},{8,24,17},{10,29,50},{10,29,50},{10,29,50},{10,26,49},{14,13,162},{9,27,1},{9,27,1},{9,24,4},{11,23,162},{9,24,4},{15,16,200},{10,30,5},{11,26,16},{10,26,16},{15,16,200},{15,22,200},{10,26,16},{0,25,208},{15,22,200},{0,25,208},{10,0,218},{10,0,218},{10,0,218},{10,0,218},{9,27,16},{9,27,16},{9,27,16},{9,24,20},{8,24,17}, +{8,24,17},{11,31,632},{10,31,297},{11,28,425},{10,28,292},{10,31,804},{10,29,298},{10,27,61},{10,26,315},{7,31,823},{8,26,231},{11,31,232},{11,30,13},{11,28,25},{11,27,29},{15,16,723},{9,31,216},{10,27,45},{8,26,227},{15,22,723},{8,26,227},{10,31,288},{10,31,288},{10,31,288},{10,28,276},{10,29,180},{10,27,36},{10,27,36},{10,25,33},{7,30,189},{9,25,30},{11,29,0}, +{11,29,0},{11,29,0},{11,27,4},{14,16,162},{9,29,4},{9,29,4},{9,25,5},{15,20,162},{9,25,5},{15,19,200},{11,30,13},{11,28,25},{10,28,20},{15,19,200},{13,26,200},{10,28,20},{0,26,218},{13,26,200},{0,26,218},{10,0,272},{10,0,272},{10,0,272},{10,0,272},{10,26,17},{10,26,17},{10,26,17},{10,24,17},{8,27,5},{8,27,5},{11,31,696},{11,31,237},{11,29,288}, +{11,28,224},{11,31,888},{10,31,254},{10,29,33},{10,27,270},{8,31,824},{9,27,227},{12,31,283},{11,31,93},{12,28,97},{11,28,80},{13,25,723},{10,31,238},{10,29,17},{9,27,218},{12,27,723},{9,27,218},{11,31,212},{11,31,212},{11,31,212},{11,28,208},{10,31,196},{10,29,17},{10,29,17},{10,26,18},{8,30,171},{9,26,26},{11,31,68},{11,31,68},{11,31,68},{11,28,64},{13,22,162}, +{10,29,1},{10,29,1},{10,26,2},{12,25,162},{10,26,2},{13,28,200},{11,31,29},{12,28,16},{11,28,16},{13,28,200},{11,30,200},{11,28,16},{0,27,218},{11,30,200},{0,27,218},{11,0,208},{11,0,208},{11,0,208},{11,0,208},{10,29,16},{10,29,16},{10,29,16},{10,26,17},{9,27,9},{9,27,9},{12,31,804},{12,31,492},{11,30,457},{11,30,292},{11,31,1080},{11,31,298},{11,29,45}, +{11,28,324},{9,31,920},{9,28,218},{12,31,363},{12,31,51},{12,30,21},{12,29,26},{15,21,723},{11,31,282},{11,29,29},{9,28,217},{15,25,723},{9,28,217},{11,31,372},{11,31,372},{11,31,372},{11,30,276},{11,31,180},{11,29,29},{11,29,29},{11,27,33},{8,31,184},{10,27,41},{12,31,2},{12,31,2},{12,31,2},{12,28,5},{15,18,162},{10,31,5},{10,31,5},{10,27,5},{10,29,162}, +{10,27,5},{15,24,200},{12,31,50},{12,30,20},{11,30,20},{15,24,200},{15,27,202},{11,30,20},{0,28,208},{15,27,202},{0,28,208},{11,0,272},{11,0,272},{11,0,272},{11,0,272},{11,28,17},{11,28,17},{11,28,17},{11,26,17},{9,29,8},{9,29,8},{12,31,996},{12,31,492},{12,31,283},{12,30,234},{12,31,1068},{11,31,458},{11,31,33},{11,29,273},{10,31,999},{10,29,225},{13,31,379}, +{13,31,171},{13,30,97},{12,30,65},{14,27,723},{12,31,371},{11,31,17},{10,29,209},{13,29,723},{10,29,209},{12,31,267},{12,31,267},{12,31,267},{12,30,218},{12,30,333},{11,31,17},{11,31,17},{11,28,20},{9,31,212},{10,28,17},{13,30,81},{13,30,81},{13,30,81},{12,30,49},{13,27,162},{11,31,1},{11,31,1},{11,28,4},{13,27,162},{11,28,4},{15,27,202},{13,31,90},{13,30,16}, +{12,30,16},{15,27,202},{15,28,202},{12,30,16},{0,29,208},{15,28,202},{0,29,208},{12,0,218},{12,0,218},{12,0,218},{12,0,218},{11,31,16},{11,31,16},{11,31,16},{11,28,20},{9,30,10},{9,30,10},{13,31,877},{13,31,605},{13,31,436},{12,31,288},{13,31,1021},{12,31,397},{12,31,36},{12,30,210},{11,31,910},{10,30,126},{14,31,414},{13,31,205},{13,31,36},{13,31,4},{15,26,546}, +{13,31,317},{12,31,20},{10,30,122},{14,29,546},{10,30,122},{13,31,436},{13,31,436},{13,31,436},{12,31,288},{12,31,276},{12,31,36},{12,31,36},{12,29,33},{10,31,261},{11,29,30},{13,31,36},{13,31,36},{13,31,36},{13,31,4},{13,30,162},{12,31,20},{12,31,20},{11,29,5},{12,30,162},{11,29,5},{15,28,117},{14,31,61},{14,31,25},{13,31,4},{15,28,117},{14,31,117},{13,31,4}, +{0,30,113},{14,31,117},{0,30,113},{12,0,272},{12,0,272},{12,0,272},{12,0,272},{12,30,17},{12,30,17},{12,30,17},{12,28,17},{10,31,5},{10,31,5},{13,31,845},{13,31,573},{13,31,404},{13,31,244},{13,31,797},{13,31,365},{12,31,196},{12,30,82},{12,31,737},{11,31,58},{14,31,190},{14,31,126},{14,31,90},{14,31,82},{14,31,334},{13,31,221},{13,31,52},{11,31,49},{14,30,333}, +{11,31,49},{13,31,404},{13,31,404},{13,31,404},{13,31,244},{13,31,356},{12,31,196},{12,31,196},{12,30,18},{11,31,333},{11,30,26},{14,31,90},{14,31,90},{14,31,90},{14,31,82},{15,26,162},{13,31,52},{13,31,52},{12,30,2},{14,29,162},{12,30,2},{15,30,25},{15,30,41},{14,31,9},{14,31,1},{15,30,25},{15,30,29},{14,31,1},{0,31,49},{15,30,29},{0,31,49},{13,0,208}, +{13,0,208},{13,0,208},{13,0,208},{12,31,52},{12,31,52},{12,31,52},{12,30,17},{11,31,9},{11,31,9},{14,31,642},{14,31,578},{14,31,542},{13,31,441},{14,31,690},{13,31,370},{13,31,201},{13,31,32},{13,31,610},{12,31,40},{14,31,201},{14,31,137},{14,31,101},{14,31,37},{15,29,193},{14,31,121},{14,31,85},{12,31,4},{14,31,193},{12,31,4},{14,31,542},{14,31,542},{14,31,542}, +{13,31,441},{13,31,473},{13,31,201},{13,31,201},{13,31,32},{12,31,401},{12,31,40},{14,31,101},{14,31,101},{14,31,101},{14,31,37},{15,28,145},{14,31,85},{14,31,85},{12,31,4},{15,29,149},{12,31,4},{15,31,0},{15,31,0},{15,31,0},{15,31,0},{15,31,0},{15,31,0},{15,31,0},{0,31,0},{15,31,0},{0,31,0},{13,0,272},{13,0,272},{13,0,272},{13,0,272},{13,31,32}, +{13,31,32},{13,31,32},{13,30,17},{12,31,40},{12,31,40},{14,31,418},{14,31,354},{14,31,318},{14,31,254},{14,31,370},{14,31,242},{14,31,206},{13,31,32},{13,31,418},{13,31,80},{15,31,81},{15,31,81},{15,31,81},{15,31,81},{15,30,54},{14,31,73},{14,31,37},{14,31,9},{15,30,66},{14,31,9},{14,31,318},{14,31,318},{14,31,318},{14,31,254},{14,31,270},{14,31,206},{14,31,206}, +{13,31,32},{13,31,249},{13,31,80},{15,31,81},{15,31,81},{15,31,81},{15,31,81},{15,29,45},{14,31,37},{14,31,37},{14,31,9},{15,30,41},{14,31,9},{15,31,0},{15,31,0},{15,31,0},{15,31,0},{15,31,0},{15,31,0},{15,31,0},{0,31,0},{15,31,0},{0,31,0},{14,0,218},{14,0,218},{14,0,218},{14,0,218},{13,31,160},{13,31,160},{13,31,160},{13,31,32},{13,31,80}, +{13,31,80},{0,9,421},{0,7,113},{0,5,5},{0,4,130},{0,6,925},{0,5,658},{0,4,274},{0,3,670},{0,3,1039},{0,3,751},{0,9,421},{0,7,113},{0,5,5},{0,4,130},{0,6,925},{0,5,658},{0,4,274},{0,3,670},{3,0,925},{0,3,670},{0,4,1},{0,4,1},{0,4,1},{0,3,4},{0,2,85},{0,2,45},{0,2,45},{0,1,50},{0,1,98},{0,1,59},{0,4,1}, +{0,4,1},{0,4,1},{0,3,4},{0,2,85},{0,2,45},{0,2,45},{0,1,50},{1,0,85},{0,1,50},{1,6,421},{0,7,113},{0,5,5},{0,4,130},{1,6,421},{3,2,421},{0,4,130},{0,3,445},{3,2,421},{0,3,445},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,12,425},{0,9,52},{0,6,10}, +{0,6,82},{0,8,1261},{0,6,805},{0,5,322},{0,4,833},{0,4,1445},{0,4,977},{0,12,425},{0,9,52},{0,6,10},{0,6,82},{0,8,1261},{0,6,805},{0,5,322},{0,4,833},{4,0,1261},{0,4,833},{0,7,0},{0,7,0},{0,7,0},{0,4,1},{0,3,225},{0,3,117},{0,3,117},{0,2,125},{0,2,257},{0,2,161},{0,7,0},{0,7,0},{0,7,0},{0,4,1},{1,0,221}, +{0,3,117},{0,3,117},{0,2,125},{1,1,221},{0,2,125},{3,2,421},{0,9,52},{0,6,10},{0,6,82},{3,2,421},{5,1,421},{0,6,82},{0,4,433},{5,1,421},{0,4,433},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,14,430},{0,11,29},{0,7,74},{0,7,46},{0,10,1514},{0,8,874},{0,6,307}, +{0,5,917},{0,5,1814},{0,4,1074},{0,14,430},{0,11,29},{0,7,74},{0,7,46},{3,0,1514},{0,8,874},{0,6,307},{0,5,917},{5,0,1514},{0,5,917},{0,10,10},{0,10,10},{0,10,10},{0,6,10},{0,5,340},{0,5,160},{0,5,160},{0,3,169},{0,3,421},{0,3,250},{0,10,10},{0,10,10},{0,10,10},{0,6,10},{1,2,338},{0,5,160},{0,5,160},{0,3,169},{1,2,338}, +{0,3,169},{4,1,421},{0,11,20},{1,7,5},{0,7,37},{4,1,421},{7,0,421},{0,7,37},{0,5,433},{7,0,421},{0,5,433},{0,0,9},{0,0,9},{0,0,9},{0,0,9},{0,1,0},{0,1,0},{0,1,0},{0,1,4},{0,0,9},{0,0,9},{0,17,542},{0,13,130},{0,9,285},{0,8,137},{0,12,1517},{0,9,737},{0,7,185},{0,6,794},{0,7,1982},{0,5,1062},{1,13,450}, +{1,11,77},{1,8,34},{1,7,122},{3,3,1517},{0,9,737},{0,7,185},{0,6,794},{2,5,1514},{0,6,794},{0,12,121},{0,12,121},{0,12,121},{0,7,125},{0,8,338},{0,6,98},{0,6,98},{0,4,97},{0,4,514},{0,4,241},{1,9,25},{1,9,25},{1,9,25},{1,6,26},{0,8,338},{0,6,98},{0,6,98},{0,4,97},{4,0,338},{0,4,97},{5,0,421},{0,13,9},{1,8,9}, +{0,8,16},{5,0,421},{8,0,421},{0,8,16},{0,6,433},{8,0,421},{0,6,433},{0,0,121},{0,0,121},{0,0,121},{0,0,121},{0,4,1},{0,4,1},{0,4,1},{0,2,1},{0,2,37},{0,2,37},{1,16,697},{1,13,297},{1,9,354},{1,9,309},{0,15,1517},{0,11,630},{0,9,50},{0,7,670},{0,8,2198},{0,6,1109},{1,16,441},{1,13,41},{1,9,98},{1,9,53},{4,2,1514}, +{0,11,630},{0,9,50},{0,7,670},{6,2,1514},{0,7,670},{1,12,273},{1,12,273},{1,12,273},{1,8,273},{0,11,338},{0,8,41},{0,8,41},{0,5,50},{0,6,680},{0,5,275},{1,12,17},{1,12,17},{1,12,17},{1,8,17},{3,1,338},{0,8,41},{0,8,41},{0,5,50},{3,3,338},{0,5,50},{6,0,421},{0,15,1},{2,9,5},{0,9,1},{6,0,421},{5,6,421},{0,9,1}, +{0,7,445},{5,6,421},{0,7,445},{1,0,272},{1,0,272},{1,0,272},{1,0,272},{0,7,1},{0,7,1},{0,7,1},{0,4,0},{0,3,106},{0,3,106},{1,19,821},{1,15,405},{1,11,570},{1,10,410},{0,18,1514},{0,13,577},{0,10,14},{0,8,602},{0,10,2462},{0,7,1175},{2,16,450},{2,13,77},{2,10,35},{2,10,107},{3,8,1514},{0,13,577},{0,10,14},{0,8,602},{4,6,1514}, +{0,8,602},{1,14,401},{1,14,401},{1,14,401},{1,9,404},{0,13,340},{0,10,13},{0,10,13},{0,6,29},{0,7,851},{0,6,353},{2,11,25},{2,11,25},{2,11,25},{2,8,26},{4,0,338},{0,10,13},{0,10,13},{0,6,29},{1,7,338},{0,6,29},{5,6,421},{1,15,5},{2,10,10},{0,10,10},{5,6,421},{10,1,421},{0,10,10},{0,8,433},{10,1,421},{0,8,433},{1,0,400}, +{1,0,400},{1,0,400},{1,0,400},{0,9,1},{0,9,1},{0,9,1},{0,6,4},{0,4,208},{0,4,208},{1,22,902},{1,17,485},{2,11,750},{1,11,482},{0,21,1566},{0,15,570},{0,11,95},{0,9,582},{0,11,2337},{0,9,933},{2,18,430},{2,15,29},{2,11,74},{2,11,46},{5,4,1514},{0,15,521},{0,11,46},{0,9,533},{9,1,1514},{0,9,533},{1,17,481},{1,17,481},{1,17,481}, +{1,11,481},{0,16,387},{0,12,51},{0,12,51},{0,7,75},{0,8,755},{0,7,222},{2,14,10},{2,14,10},{2,14,10},{2,10,10},{3,6,338},{0,12,2},{0,12,2},{0,7,26},{3,6,338},{0,7,26},{7,2,421},{1,17,4},{3,11,5},{1,11,1},{7,2,421},{12,0,421},{1,11,1},{0,9,433},{12,0,421},{0,9,433},{1,0,481},{1,0,481},{1,0,481},{1,0,481},{0,12,50}, +{0,12,50},{0,12,50},{0,7,50},{0,6,157},{0,6,157},{2,21,866},{2,17,454},{2,13,609},{2,12,461},{1,20,1515},{1,15,578},{1,12,19},{1,10,603},{0,13,2214},{0,10,707},{3,17,450},{3,15,77},{3,12,34},{3,11,122},{7,0,1514},{0,16,458},{1,12,18},{0,10,482},{4,9,1514},{0,10,482},{2,16,445},{2,16,445},{2,16,445},{2,11,449},{1,15,341},{1,12,19},{1,12,19}, +{1,8,26},{0,10,635},{0,8,106},{3,13,25},{3,13,25},{3,13,25},{3,10,26},{5,2,338},{0,14,2},{0,14,2},{0,9,20},{8,1,338},{0,9,20},{7,4,421},{2,17,9},{3,12,9},{1,12,9},{7,4,421},{11,3,421},{1,12,9},{0,10,433},{11,3,421},{0,10,433},{2,0,445},{2,0,445},{2,0,445},{2,0,445},{1,11,2},{1,11,2},{1,11,2},{1,7,10},{0,8,90}, +{0,8,90},{2,24,902},{2,19,482},{3,13,723},{2,13,482},{1,23,1578},{1,17,566},{1,14,117},{1,11,590},{0,15,2046},{0,11,535},{3,20,441},{3,17,41},{3,13,98},{3,13,53},{7,3,1514},{0,18,429},{2,13,50},{0,11,454},{11,2,1514},{0,11,454},{2,19,481},{2,19,481},{2,19,481},{2,13,481},{1,18,404},{1,14,68},{1,14,68},{1,10,89},{0,12,557},{0,10,49},{3,16,17}, +{3,16,17},{3,16,17},{3,12,17},{5,5,338},{1,14,4},{1,14,4},{0,10,13},{5,7,338},{0,10,13},{8,2,421},{2,19,1},{4,13,5},{2,13,1},{8,2,421},{14,1,421},{2,13,1},{0,11,445},{14,1,421},{0,11,445},{2,0,481},{2,0,481},{2,0,481},{2,0,481},{1,14,64},{1,14,64},{1,14,64},{1,9,65},{0,10,40},{0,10,40},{3,23,854},{3,19,438},{3,15,603}, +{3,14,443},{2,22,1515},{2,17,578},{2,14,15},{2,12,603},{0,16,1911},{0,12,458},{4,20,450},{4,17,77},{4,14,35},{4,14,107},{5,12,1514},{0,20,425},{2,14,14},{0,12,433},{13,1,1514},{0,12,433},{3,18,434},{3,18,434},{3,18,434},{3,13,437},{2,17,341},{2,14,14},{2,14,14},{2,10,30},{0,14,477},{0,11,35},{4,15,25},{4,15,25},{4,15,25},{4,12,26},{7,1,338}, +{1,16,5},{1,16,5},{1,11,10},{10,2,338},{1,11,10},{8,5,421},{3,19,5},{4,14,10},{2,14,10},{8,5,421},{12,5,421},{2,14,10},{0,12,433},{12,5,421},{0,12,433},{3,0,433},{3,0,433},{3,0,433},{3,0,433},{2,13,2},{2,13,2},{2,13,2},{2,10,5},{0,12,25},{0,12,25},{3,26,902},{3,21,485},{4,15,750},{3,15,482},{2,25,1566},{2,19,570},{2,15,95}, +{2,13,582},{0,18,1787},{0,13,442},{4,22,430},{4,19,29},{4,15,74},{4,15,46},{8,3,1514},{1,20,425},{2,15,46},{0,13,442},{11,5,1514},{0,13,442},{3,21,481},{3,21,481},{3,21,481},{3,15,481},{2,20,387},{2,16,51},{2,16,51},{2,11,75},{0,16,419},{1,12,69},{4,18,10},{4,18,10},{4,18,10},{4,14,10},{5,10,338},{2,16,2},{2,16,2},{1,12,20},{12,1,338}, +{1,12,20},{9,4,421},{3,21,4},{5,15,5},{3,15,1},{9,4,421},{15,3,421},{3,15,1},{0,13,433},{15,3,421},{0,13,433},{3,0,481},{3,0,481},{3,0,481},{3,0,481},{2,16,50},{2,16,50},{2,16,50},{2,11,50},{0,13,9},{0,13,9},{4,25,866},{4,21,454},{4,17,609},{4,16,461},{3,24,1515},{3,19,578},{3,16,19},{3,14,603},{0,20,1686},{1,14,458},{5,21,450}, +{5,19,77},{5,16,34},{5,15,122},{3,24,1514},{1,22,425},{3,16,18},{1,14,433},{14,3,1514},{1,14,433},{4,20,445},{4,20,445},{4,20,445},{4,15,449},{3,19,341},{3,16,19},{3,16,19},{3,12,26},{0,17,372},{1,13,45},{5,17,25},{5,17,25},{5,17,25},{5,14,26},{8,1,338},{2,18,2},{2,18,2},{2,13,20},{10,5,338},{2,13,20},{11,0,421},{4,21,9},{5,16,9}, +{3,16,9},{11,0,421},{13,7,421},{3,16,9},{0,14,433},{13,7,421},{0,14,433},{4,0,445},{4,0,445},{4,0,445},{4,0,445},{3,15,2},{3,15,2},{3,15,2},{3,11,10},{0,15,5},{0,15,5},{4,28,902},{4,23,482},{5,17,723},{4,17,482},{3,27,1578},{3,21,566},{3,18,117},{3,15,590},{0,22,1614},{1,15,462},{5,24,441},{5,21,41},{5,17,98},{5,17,53},{5,20,1514}, +{2,22,429},{4,17,50},{2,15,454},{13,6,1514},{2,15,454},{4,23,481},{4,23,481},{4,23,481},{4,17,481},{3,22,404},{3,18,68},{3,18,68},{3,14,89},{0,19,347},{2,14,49},{5,20,17},{5,20,17},{5,20,17},{5,16,17},{8,4,338},{3,18,4},{3,18,4},{2,14,13},{14,2,338},{2,14,13},{11,3,421},{4,23,1},{6,17,5},{4,17,1},{11,3,421},{15,6,421},{4,17,1}, +{0,15,445},{15,6,421},{0,15,445},{4,0,481},{4,0,481},{4,0,481},{4,0,481},{3,18,64},{3,18,64},{3,18,64},{3,13,65},{1,16,8},{1,16,8},{5,27,854},{5,23,438},{5,19,603},{5,18,443},{4,26,1515},{4,21,578},{4,18,15},{4,16,603},{0,23,1566},{2,16,458},{6,24,450},{6,21,77},{6,18,35},{6,18,107},{11,1,1514},{2,24,425},{4,18,14},{2,16,433},{15,5,1514}, +{2,16,433},{5,22,434},{5,22,434},{5,22,434},{5,17,437},{4,21,341},{4,18,14},{4,18,14},{4,14,30},{0,21,341},{2,15,35},{6,19,25},{6,19,25},{6,19,25},{6,16,26},{3,25,338},{3,20,5},{3,20,5},{3,15,10},{12,6,338},{3,15,10},{12,2,421},{5,23,5},{6,18,10},{4,18,10},{12,2,421},{14,9,421},{4,18,10},{0,16,433},{14,9,421},{0,16,433},{5,0,433}, +{5,0,433},{5,0,433},{5,0,433},{4,17,2},{4,17,2},{4,17,2},{4,14,5},{1,17,10},{1,17,10},{5,30,902},{5,25,485},{6,19,750},{5,19,482},{4,29,1566},{4,23,570},{4,19,95},{4,17,582},{0,25,1533},{2,17,442},{6,26,430},{6,23,29},{6,19,74},{6,19,46},{10,7,1514},{3,24,425},{4,19,46},{2,17,442},{13,9,1514},{2,17,442},{5,25,481},{5,25,481},{5,25,481}, +{5,19,481},{4,24,387},{4,20,51},{4,20,51},{4,15,75},{1,21,341},{3,16,69},{6,22,10},{6,22,10},{6,22,10},{6,18,10},{9,6,338},{4,20,2},{4,20,2},{3,16,20},{14,5,338},{3,16,20},{11,8,421},{5,25,4},{7,19,5},{5,19,1},{11,8,421},{11,14,421},{5,19,1},{0,17,433},{11,14,421},{0,17,433},{5,0,481},{5,0,481},{5,0,481},{5,0,481},{4,20,50}, +{4,20,50},{4,20,50},{4,15,50},{2,17,9},{2,17,9},{6,29,866},{6,25,454},{6,21,609},{6,20,461},{5,28,1515},{5,23,578},{5,20,19},{5,18,603},{0,27,1521},{3,18,458},{7,25,450},{7,23,77},{7,20,34},{7,19,122},{12,3,1514},{3,26,425},{5,20,18},{3,18,433},{11,13,1514},{3,18,433},{6,24,445},{6,24,445},{6,24,445},{6,19,449},{5,23,341},{5,20,19},{5,20,19}, +{5,16,26},{1,23,341},{3,17,45},{7,21,25},{7,21,25},{7,21,25},{7,18,26},{10,5,338},{4,22,2},{4,22,2},{4,17,20},{12,9,338},{4,17,20},{13,4,421},{6,25,9},{7,20,9},{5,20,9},{13,4,421},{15,11,421},{5,20,9},{0,18,433},{15,11,421},{0,18,433},{6,0,445},{6,0,445},{6,0,445},{6,0,445},{5,19,2},{5,19,2},{5,19,2},{5,15,10},{2,19,5}, +{2,19,5},{6,31,914},{6,27,482},{7,21,723},{6,21,482},{5,31,1578},{5,25,566},{5,22,117},{5,19,590},{1,27,1535},{3,19,462},{7,28,441},{7,25,41},{7,21,98},{7,21,53},{8,19,1514},{4,26,429},{6,21,50},{4,19,454},{15,10,1514},{4,19,454},{6,27,481},{6,27,481},{6,27,481},{6,21,481},{5,26,404},{5,22,68},{5,22,68},{5,18,89},{2,23,347},{4,18,49},{7,24,17}, +{7,24,17},{7,24,17},{7,20,17},{10,8,338},{5,22,4},{5,22,4},{4,18,13},{11,12,338},{4,18,13},{15,0,421},{6,27,1},{8,21,50},{6,21,1},{15,0,421},{13,15,421},{6,21,1},{0,19,445},{13,15,421},{0,19,445},{6,0,481},{6,0,481},{6,0,481},{6,0,481},{5,22,64},{5,22,64},{5,22,64},{5,17,65},{3,20,8},{3,20,8},{7,31,854},{7,27,438},{7,23,603}, +{7,22,443},{6,30,1515},{6,25,578},{6,22,15},{6,20,603},{1,29,1518},{4,20,458},{7,31,565},{7,27,149},{8,22,174},{7,22,154},{13,5,1514},{4,28,425},{6,22,14},{4,20,433},{12,15,1514},{4,20,433},{7,26,434},{7,26,434},{7,26,434},{7,21,437},{6,25,341},{6,22,14},{6,22,14},{6,18,30},{2,25,341},{4,19,35},{7,26,145},{7,26,145},{7,26,145},{7,21,148},{9,14,338}, +{5,24,5},{5,24,5},{5,19,10},{14,10,338},{5,19,10},{15,3,421},{7,27,5},{8,22,5},{6,22,10},{15,3,421},{15,14,421},{6,22,10},{0,20,433},{15,14,421},{0,20,433},{7,0,433},{7,0,433},{7,0,433},{7,0,433},{6,21,2},{6,21,2},{6,21,2},{6,18,5},{3,21,10},{3,21,10},{7,31,1046},{7,29,485},{7,24,770},{7,23,482},{7,29,1598},{6,27,570},{6,23,95}, +{6,21,582},{2,29,1533},{4,21,442},{8,28,450},{8,26,77},{8,23,35},{8,23,107},{15,1,1514},{5,28,425},{6,23,46},{4,21,442},{15,13,1514},{4,21,442},{7,29,481},{7,29,481},{7,29,481},{7,23,481},{6,28,387},{6,24,51},{6,24,51},{6,19,75},{3,25,341},{5,20,69},{8,24,25},{8,24,25},{8,24,25},{8,21,26},{11,10,338},{6,24,2},{6,24,2},{5,20,20},{5,23,338}, +{5,20,20},{13,12,421},{7,29,4},{8,23,10},{7,23,1},{13,12,421},{13,18,421},{7,23,1},{0,21,433},{13,18,421},{0,21,433},{7,0,481},{7,0,481},{7,0,481},{7,0,481},{6,24,50},{6,24,50},{6,24,50},{6,19,50},{4,21,9},{4,21,9},{8,31,1106},{8,28,714},{8,24,749},{8,24,734},{7,31,1542},{7,27,578},{7,24,19},{7,22,603},{2,31,1521},{5,22,458},{8,31,430}, +{8,28,38},{8,24,73},{8,24,58},{14,7,1514},{5,30,425},{7,24,18},{5,22,433},{13,17,1514},{5,22,433},{8,27,686},{8,27,686},{8,27,686},{8,23,686},{7,27,341},{7,24,19},{7,24,19},{7,20,26},{3,27,341},{5,21,45},{8,27,10},{8,27,10},{8,27,10},{8,23,10},{12,9,338},{6,26,2},{6,26,2},{6,21,20},{14,13,338},{6,21,20},{15,8,421},{7,31,20},{9,24,4}, +{7,24,9},{15,8,421},{15,17,421},{7,24,9},{0,22,433},{15,17,421},{0,22,433},{8,0,685},{8,0,685},{8,0,685},{8,0,685},{7,23,2},{7,23,2},{7,23,2},{7,19,10},{4,23,5},{4,23,5},{8,31,1034},{8,30,438},{8,26,603},{8,25,443},{8,30,1806},{7,29,566},{7,26,117},{7,23,590},{3,31,1535},{5,23,462},{9,31,437},{9,28,77},{9,25,33},{9,25,98},{10,23,1514}, +{6,30,429},{7,26,53},{6,23,454},{11,21,1514},{6,23,454},{8,29,434},{8,29,434},{8,29,434},{8,24,437},{7,30,404},{7,26,68},{7,26,68},{7,22,89},{4,27,347},{6,22,49},{9,26,17},{9,26,17},{9,26,17},{9,23,20},{15,2,338},{7,26,4},{7,26,4},{6,22,13},{13,16,338},{6,22,13},{15,11,421},{8,30,5},{9,25,17},{8,25,10},{15,11,421},{15,19,421},{8,25,10}, +{0,23,445},{15,19,421},{0,23,445},{8,0,433},{8,0,433},{8,0,433},{8,0,433},{7,26,64},{7,26,64},{7,26,64},{7,21,65},{5,24,8},{5,24,8},{9,31,1174},{8,31,506},{9,26,723},{8,26,482},{8,31,1643},{7,30,717},{8,26,131},{7,24,725},{4,31,1566},{6,24,458},{9,31,549},{9,30,41},{9,26,98},{9,26,53},{15,9,1514},{7,30,461},{8,26,50},{6,24,433},{14,19,1514}, +{6,24,433},{8,31,490},{8,31,490},{8,31,490},{8,26,481},{8,28,421},{8,25,122},{8,25,122},{8,22,131},{4,29,341},{6,23,35},{9,29,17},{9,29,17},{9,29,17},{9,25,17},{11,18,338},{7,28,5},{7,28,5},{7,23,10},{10,21,338},{7,23,10},{14,17,421},{9,30,25},{10,26,5},{8,26,1},{14,17,421},{13,23,421},{8,26,1},{0,24,433},{13,23,421},{0,24,433},{8,0,481}, +{8,0,481},{8,0,481},{8,0,481},{8,24,82},{8,24,82},{8,24,82},{8,21,81},{5,25,10},{5,25,10},{9,31,1334},{9,31,470},{9,28,597},{9,27,443},{9,31,1815},{8,30,578},{8,27,15},{8,25,603},{5,31,1638},{6,25,442},{10,31,506},{10,30,77},{10,27,35},{10,27,107},{14,15,1514},{7,31,506},{8,27,14},{6,25,442},{12,23,1514},{6,25,442},{9,31,434},{9,31,434},{9,31,434}, +{9,26,437},{8,30,341},{8,27,14},{8,27,14},{8,23,30},{5,29,341},{7,24,69},{10,28,25},{10,28,25},{10,28,25},{10,25,26},{13,14,338},{8,27,13},{8,27,13},{7,24,20},{8,25,338},{7,24,20},{15,16,421},{9,31,37},{10,27,10},{8,27,10},{15,16,421},{15,22,421},{8,27,10},{0,25,433},{15,22,421},{0,25,433},{9,0,433},{9,0,433},{9,0,433},{9,0,433},{8,26,2}, +{8,26,2},{8,26,2},{8,23,5},{6,25,9},{6,25,9},{10,31,1470},{10,31,735},{10,28,749},{9,28,481},{9,31,1895},{8,31,579},{8,28,89},{8,26,582},{6,31,1761},{7,26,458},{11,31,614},{10,31,59},{10,28,73},{10,28,58},{13,21,1514},{8,31,530},{8,28,40},{7,26,433},{15,21,1514},{7,26,433},{9,31,562},{9,31,562},{9,31,562},{9,28,481},{9,30,421},{8,29,51},{8,29,51}, +{8,24,65},{5,31,341},{7,25,45},{10,31,10},{10,31,10},{10,31,10},{10,27,10},{14,13,338},{8,29,2},{8,29,2},{8,24,16},{11,23,338},{8,24,16},{15,19,421},{10,31,50},{11,28,4},{9,28,0},{15,19,421},{13,26,421},{9,28,0},{0,26,433},{13,26,421},{0,26,433},{9,0,481},{9,0,481},{9,0,481},{9,0,481},{8,29,50},{8,29,50},{8,29,50},{8,24,49},{6,27,5}, +{6,27,5},{11,31,1838},{10,31,753},{10,30,603},{10,29,443},{10,31,2046},{9,31,629},{9,29,21},{9,27,589},{7,31,1935},{7,27,462},{11,31,749},{11,31,120},{11,29,33},{11,29,98},{12,27,1514},{9,31,629},{9,29,21},{7,27,461},{13,25,1514},{7,27,461},{10,31,497},{10,31,497},{10,31,497},{10,28,437},{9,31,388},{9,29,20},{9,29,20},{9,25,29},{6,31,347},{8,25,105},{11,30,17}, +{11,30,17},{11,30,17},{11,27,20},{14,16,338},{8,31,4},{8,31,4},{8,26,10},{15,20,338},{8,26,10},{14,25,421},{11,31,104},{11,29,17},{10,29,10},{14,25,421},{12,29,421},{10,29,10},{0,27,445},{12,29,421},{0,27,445},{10,0,433},{10,0,433},{10,0,433},{10,0,433},{9,28,1},{9,28,1},{9,28,1},{9,25,4},{7,28,8},{7,28,8},{11,31,1902},{11,31,1001},{11,30,723}, +{10,30,482},{11,31,2286},{10,31,782},{9,31,117},{9,28,578},{8,31,2118},{7,29,491},{12,31,770},{12,31,338},{11,30,98},{11,30,53},{14,23,1514},{10,31,701},{10,30,50},{8,28,442},{11,29,1514},{8,28,442},{11,31,677},{11,31,677},{11,31,677},{10,30,481},{10,31,437},{9,31,68},{9,31,68},{9,27,89},{7,31,379},{8,27,49},{11,31,52},{11,31,52},{11,31,52},{11,29,17},{13,22,338}, +{9,31,4},{9,31,4},{8,27,13},{12,25,338},{8,27,13},{15,24,421},{12,31,169},{12,30,5},{10,30,1},{15,24,421},{15,27,421},{10,30,1},{0,28,433},{15,27,421},{0,28,433},{10,0,481},{10,0,481},{10,0,481},{10,0,481},{9,31,64},{9,31,64},{9,31,64},{9,26,65},{7,29,10},{7,29,10},{12,31,2151},{11,31,1254},{11,31,629},{11,31,442},{11,31,2393},{10,31,975},{10,31,14}, +{10,29,570},{9,31,2241},{8,29,425},{13,31,931},{12,31,395},{12,31,34},{12,30,105},{13,29,1459},{11,31,778},{10,31,13},{8,29,400},{14,27,1459},{8,29,400},{11,31,629},{11,31,629},{11,31,629},{11,30,437},{10,31,581},{10,31,14},{10,31,14},{10,27,30},{8,31,477},{8,28,45},{12,31,34},{12,31,34},{12,31,34},{12,29,26},{15,18,338},{10,31,13},{10,31,13},{9,28,17},{10,29,338}, +{9,28,17},{15,27,394},{13,31,218},{12,31,9},{10,31,9},{15,27,394},{15,28,394},{10,31,9},{0,29,400},{15,28,394},{0,29,400},{11,0,433},{11,0,433},{11,0,433},{11,0,433},{10,30,2},{10,30,2},{10,30,2},{10,27,5},{8,29,25},{8,29,25},{12,31,1767},{12,31,1167},{12,31,806},{11,31,506},{12,31,1983},{11,31,747},{11,31,122},{10,29,346},{10,31,1836},{8,30,217},{13,31,611}, +{13,31,339},{12,31,130},{12,31,10},{15,24,1064},{12,31,587},{11,31,41},{8,30,217},{15,27,1067},{8,30,217},{12,31,806},{12,31,806},{12,31,806},{11,31,506},{11,31,581},{11,31,122},{11,31,122},{10,28,65},{9,31,557},{9,29,69},{12,31,130},{12,31,130},{12,31,130},{12,31,10},{13,27,338},{11,31,41},{11,31,41},{10,28,16},{13,27,338},{10,28,16},{14,31,200},{14,31,136},{13,31,1}, +{12,31,1},{14,31,200},{15,29,200},{12,31,1},{0,30,208},{15,29,200},{0,30,208},{11,0,481},{11,0,481},{11,0,481},{11,0,481},{11,30,82},{11,30,82},{11,30,82},{10,28,49},{8,30,9},{8,30,9},{13,31,1646},{12,31,1194},{12,31,833},{12,31,497},{12,31,1686},{12,31,750},{11,31,221},{11,30,122},{11,31,1541},{9,30,110},{14,31,542},{13,31,285},{13,31,116},{13,31,20},{15,26,722}, +{13,31,429},{12,31,100},{10,30,74},{14,29,722},{10,30,74},{12,31,833},{12,31,833},{12,31,833},{12,31,497},{12,31,725},{11,31,221},{11,31,221},{11,29,29},{10,31,632},{9,30,46},{13,31,116},{13,31,116},{13,31,116},{13,31,20},{13,30,338},{12,31,100},{12,31,100},{10,30,10},{12,30,338},{10,30,10},{15,29,61},{14,31,37},{14,31,1},{13,31,4},{15,29,61},{15,30,61},{13,31,4}, +{0,30,73},{15,30,61},{0,30,73},{12,0,433},{12,0,433},{12,0,433},{12,0,433},{11,31,25},{11,31,25},{11,31,25},{11,29,4},{9,31,17},{9,31,17},{13,31,1406},{13,31,1134},{13,31,965},{12,31,737},{13,31,1454},{12,31,702},{12,31,341},{11,31,89},{11,31,1381},{10,31,49},{14,31,318},{14,31,254},{14,31,218},{13,31,116},{14,31,510},{13,31,333},{13,31,164},{10,31,13},{14,30,509}, +{10,31,13},{13,31,965},{13,31,965},{13,31,965},{12,31,737},{12,31,869},{12,31,341},{12,31,341},{11,31,89},{11,31,756},{10,31,49},{14,31,218},{14,31,218},{14,31,218},{13,31,116},{15,26,338},{13,31,164},{13,31,164},{10,31,13},{14,29,338},{10,31,13},{15,30,9},{15,31,9},{15,31,9},{14,31,9},{15,30,9},{15,31,9},{14,31,9},{0,31,9},{15,31,9},{0,31,9},{12,0,481}, +{12,0,481},{12,0,481},{12,0,481},{12,31,85},{12,31,85},{12,31,85},{11,30,65},{10,31,40},{10,31,40},{13,31,1315},{13,31,1043},{13,31,874},{13,31,602},{13,31,1171},{13,31,627},{13,31,458},{12,31,5},{12,31,1087},{11,31,80},{14,31,225},{14,31,161},{14,31,125},{14,31,61},{15,29,297},{14,31,193},{14,31,157},{12,31,4},{14,31,297},{12,31,4},{13,31,874},{13,31,874},{13,31,874}, +{13,31,602},{13,31,730},{13,31,458},{13,31,458},{12,31,5},{11,31,705},{11,31,80},{14,31,125},{14,31,125},{14,31,125},{14,31,61},{14,31,221},{14,31,157},{14,31,157},{12,31,4},{15,29,221},{12,31,4},{15,31,0},{15,31,0},{15,31,0},{15,31,0},{15,31,0},{15,31,0},{15,31,0},{0,31,0},{15,31,0},{0,31,0},{13,0,433},{13,0,433},{13,0,433},{13,0,433},{12,31,101}, +{12,31,101},{12,31,101},{12,31,5},{11,31,80},{11,31,80},{14,31,885},{14,31,821},{14,31,785},{13,31,650},{14,31,885},{13,31,483},{13,31,314},{13,31,81},{13,31,779},{11,31,144},{15,31,169},{14,31,145},{14,31,109},{14,31,45},{15,30,118},{14,31,81},{14,31,45},{13,31,0},{15,30,114},{13,31,0},{14,31,785},{14,31,785},{14,31,785},{13,31,650},{13,31,586},{13,31,314},{13,31,314}, +{13,31,81},{12,31,518},{11,31,144},{14,31,109},{14,31,109},{14,31,109},{14,31,45},{15,29,85},{14,31,45},{14,31,45},{13,31,0},{14,31,85},{13,31,0},{15,31,0},{15,31,0},{15,31,0},{15,31,0},{15,31,0},{15,31,0},{15,31,0},{0,31,0},{15,31,0},{0,31,0},{13,0,481},{13,0,481},{13,0,481},{13,0,481},{13,31,145},{13,31,145},{13,31,145},{13,31,81},{11,31,144}, +{11,31,144},{0,13,884},{0,10,225},{0,7,18},{0,6,265},{0,9,1899},{0,7,1355},{0,6,589},{0,4,1354},{0,5,2124},{0,4,1498},{0,13,884},{0,10,225},{0,7,18},{0,6,265},{2,2,1896},{0,7,1355},{0,6,589},{0,4,1354},{1,4,1896},{0,4,1354},{0,6,0},{0,6,0},{0,6,0},{0,4,4},{0,3,162},{0,3,90},{0,3,90},{0,2,104},{0,2,200},{0,1,134},{0,6,0}, +{0,6,0},{0,6,0},{0,4,4},{0,3,162},{0,3,90},{0,3,90},{0,2,104},{0,2,164},{0,2,104},{3,3,882},{0,10,225},{0,7,18},{0,6,265},{3,3,882},{4,3,882},{0,6,265},{0,5,890},{4,3,882},{0,5,890},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,15,884},{0,12,170},{0,8,8}, +{0,7,202},{0,10,2360},{0,8,1530},{0,7,643},{0,5,1579},{0,6,2684},{0,5,1804},{0,15,884},{0,12,170},{0,8,8},{0,7,202},{1,7,2355},{0,8,1530},{0,7,643},{0,5,1579},{1,5,2355},{0,5,1579},{0,9,1},{0,9,1},{0,9,1},{0,5,1},{0,4,340},{0,4,180},{0,4,180},{0,2,200},{0,2,392},{0,2,236},{0,9,1},{0,9,1},{0,9,1},{0,5,1},{1,1,338}, +{0,4,180},{0,4,180},{0,2,200},{2,0,340},{0,2,200},{4,2,882},{0,12,170},{0,8,8},{0,7,202},{4,2,882},{6,2,882},{0,7,202},{0,6,890},{6,2,882},{0,6,890},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,18,882},{0,14,106},{0,10,52},{0,9,148},{0,12,2899},{0,9,1773},{0,8,725}, +{0,6,1854},{0,7,3348},{0,5,2124},{0,18,882},{0,14,106},{0,10,52},{0,9,148},{1,9,2899},{0,9,1773},{0,8,725},{0,6,1854},{6,0,2899},{0,6,1854},{0,11,1},{0,11,1},{0,11,1},{0,7,1},{0,6,580},{0,5,306},{0,5,306},{0,3,325},{0,3,667},{0,3,406},{0,11,1},{0,11,1},{0,11,1},{0,7,1},{1,2,580},{0,5,306},{0,5,306},{0,3,325},{2,1,578}, +{0,3,325},{3,8,882},{0,14,106},{1,9,13},{0,9,148},{3,8,882},{4,6,882},{0,9,148},{0,7,890},{4,6,882},{0,7,890},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,21,920},{0,16,89},{0,11,153},{0,10,121},{0,14,3051},{0,11,1709},{0,9,557},{0,7,1795},{0,8,3651},{0,6,2174},{0,21,920}, +{0,16,89},{1,10,108},{0,10,121},{4,1,3048},{0,11,1709},{0,9,557},{0,7,1795},{3,5,3048},{0,7,1795},{0,14,37},{0,14,37},{0,14,37},{0,8,37},{0,8,648},{0,7,274},{0,7,274},{0,4,277},{0,4,824},{0,4,421},{0,14,37},{0,14,37},{0,14,37},{0,8,37},{0,8,648},{0,7,274},{0,7,274},{0,4,277},{4,0,648},{0,4,277},{5,4,882},{0,16,53},{1,10,8}, +{0,10,85},{5,4,882},{9,1,882},{0,10,85},{0,8,900},{9,1,882},{0,8,900},{0,0,36},{0,0,36},{0,0,36},{0,0,36},{0,2,0},{0,2,0},{0,2,0},{0,1,1},{0,1,10},{0,1,10},{0,23,1115},{0,18,242},{1,12,309},{0,11,259},{0,17,3051},{0,13,1579},{0,10,346},{0,8,1630},{0,9,3924},{0,7,2173},{1,20,885},{1,16,90},{1,12,53},{1,11,131},{4,4,3048}, +{0,13,1579},{0,10,346},{0,8,1630},{7,2,3048},{0,8,1630},{0,17,226},{0,17,226},{0,17,226},{0,10,225},{0,11,648},{0,9,169},{0,9,169},{0,5,200},{0,6,990},{0,5,425},{1,13,2},{1,13,2},{1,13,2},{1,9,2},{3,1,648},{0,9,169},{0,9,169},{0,5,200},{3,3,648},{0,5,200},{5,7,882},{0,18,17},{2,11,18},{0,11,34},{5,7,882},{6,7,882},{0,11,34}, +{0,9,890},{6,7,882},{0,9,890},{0,0,225},{0,0,225},{0,0,225},{0,0,225},{0,5,0},{0,5,0},{0,5,0},{0,3,0},{0,2,61},{0,2,61},{1,23,1187},{1,18,350},{1,13,422},{1,12,373},{0,20,3048},{0,15,1443},{0,12,204},{0,9,1483},{0,11,4212},{0,8,2174},{1,23,931},{1,18,94},{2,12,108},{1,12,117},{6,0,3048},{0,15,1443},{0,12,204},{0,9,1483},{5,6,3048}, +{0,9,1483},{1,16,305},{1,16,305},{1,16,305},{1,10,309},{0,13,650},{0,11,109},{0,11,109},{0,7,148},{0,7,1161},{0,6,473},{1,16,49},{1,16,49},{1,16,49},{1,10,53},{4,0,648},{0,11,109},{0,11,109},{0,7,148},{1,7,648},{0,7,148},{7,3,882},{0,20,8},{2,12,8},{0,12,8},{7,3,882},{11,2,882},{0,12,8},{0,10,890},{11,2,882},{0,10,890},{1,0,305}, +{1,0,305},{1,0,305},{1,0,305},{0,8,1},{0,8,1},{0,8,1},{0,5,4},{0,3,145},{0,3,145},{1,25,1365},{1,20,497},{1,14,713},{1,13,510},{0,23,3051},{0,16,1278},{0,13,86},{0,10,1354},{0,12,4609},{0,9,2228},{2,22,886},{2,18,110},{2,14,56},{2,13,152},{5,6,3048},{0,16,1278},{0,13,86},{0,10,1354},{10,1,3048},{0,10,1354},{1,19,482},{1,19,482},{1,19,482}, +{1,12,481},{0,16,648},{0,12,72},{0,12,72},{0,8,101},{0,8,1352},{0,7,557},{2,15,5},{2,15,5},{2,15,5},{2,11,5},{3,6,648},{0,12,72},{0,12,72},{0,8,101},{3,6,648},{0,8,101},{5,12,882},{0,21,10},{3,13,13},{0,13,5},{5,12,882},{13,1,882},{0,13,5},{0,11,890},{13,1,882},{0,11,890},{1,0,481},{1,0,481},{1,0,481},{1,0,481},{0,10,1}, +{0,10,1},{0,10,1},{0,6,1},{0,5,261},{0,5,261},{1,28,1667},{1,22,793},{1,15,1182},{1,14,793},{0,25,3048},{0,18,1170},{0,14,36},{0,11,1243},{0,14,5005},{0,10,2318},{2,25,920},{2,20,89},{3,14,108},{2,14,121},{7,2,3048},{0,18,1170},{0,14,36},{0,11,1243},{12,0,3048},{0,11,1243},{1,21,786},{1,21,786},{1,21,786},{1,14,789},{0,19,650},{0,14,32},{0,14,32}, +{0,9,50},{0,9,1619},{0,8,661},{2,18,37},{2,18,37},{2,18,37},{2,12,37},{5,2,648},{0,14,32},{0,14,32},{0,9,50},{8,1,648},{0,9,50},{8,3,882},{1,22,8},{3,14,8},{1,14,8},{8,3,882},{11,5,882},{1,14,8},{0,12,900},{11,5,882},{0,12,900},{1,0,785},{1,0,785},{1,0,785},{1,0,785},{0,13,1},{0,13,1},{0,13,1},{0,8,4},{0,6,405}, +{0,6,405},{2,27,1844},{2,22,971},{2,16,1186},{2,15,988},{0,28,3084},{0,20,1095},{0,16,77},{0,12,1159},{0,16,4945},{0,12,2084},{3,24,885},{3,20,90},{3,16,53},{3,15,131},{6,8,3048},{0,20,1059},{0,16,41},{0,12,1123},{4,12,3048},{0,12,1123},{2,21,955},{2,21,955},{2,21,955},{2,14,954},{0,22,686},{0,16,41},{0,16,41},{0,10,49},{0,11,1577},{0,9,545},{3,17,2}, +{3,17,2},{3,17,2},{3,13,2},{5,5,648},{0,16,5},{0,16,5},{0,10,13},{5,7,648},{0,10,13},{8,6,882},{1,24,9},{4,15,18},{1,15,13},{8,6,882},{15,2,882},{1,15,13},{0,13,890},{15,2,882},{0,13,890},{2,0,954},{2,0,954},{2,0,954},{2,0,954},{0,16,37},{0,16,37},{0,16,37},{0,9,40},{0,8,373},{0,8,373},{2,30,1772},{2,24,898},{2,17,1287}, +{2,16,898},{1,27,3055},{1,20,1143},{1,16,33},{1,13,1214},{0,17,4639},{0,13,1730},{3,27,931},{3,22,94},{4,16,108},{3,16,117},{5,14,3048},{0,21,996},{1,16,29},{0,13,1054},{14,1,3048},{0,13,1054},{2,23,891},{2,23,891},{2,23,891},{2,16,894},{1,21,652},{1,16,29},{1,16,29},{1,11,44},{0,13,1452},{0,11,365},{3,20,49},{3,20,49},{3,20,49},{3,14,53},{7,1,648}, +{0,18,1},{0,18,1},{0,11,4},{10,2,648},{0,11,4},{5,20,882},{2,24,8},{4,16,8},{2,16,8},{5,20,882},{13,6,882},{2,16,8},{0,14,890},{13,6,882},{0,14,890},{2,0,890},{2,0,890},{2,0,890},{2,0,890},{1,15,4},{1,15,4},{1,15,4},{1,10,5},{0,9,269},{0,9,269},{3,29,1838},{3,24,970},{3,18,1186},{3,17,983},{1,30,3084},{1,22,1095},{1,18,77}, +{1,14,1159},{0,19,4419},{0,14,1444},{4,26,886},{4,22,110},{4,18,56},{4,17,152},{8,5,3048},{0,23,936},{1,18,41},{0,14,1003},{12,5,3048},{0,14,1003},{3,23,955},{3,23,955},{3,23,955},{3,16,954},{1,23,692},{1,18,41},{1,18,41},{1,12,46},{0,15,1296},{0,12,235},{4,19,5},{4,19,5},{4,19,5},{4,15,5},{5,10,648},{1,18,5},{1,18,5},{0,12,10},{12,1,648}, +{0,12,10},{11,1,882},{2,25,10},{5,17,13},{2,17,5},{11,1,882},{15,5,882},{2,17,5},{0,15,890},{15,5,882},{0,15,890},{3,0,954},{3,0,954},{3,0,954},{3,0,954},{1,18,37},{1,18,37},{1,18,37},{1,11,40},{0,11,185},{0,11,185},{3,31,1790},{3,26,898},{3,19,1287},{3,18,898},{2,29,3057},{2,22,1179},{2,18,45},{1,15,1250},{0,20,4156},{0,15,1226},{4,29,920}, +{4,24,89},{5,18,108},{4,18,121},{3,26,3048},{0,25,909},{2,18,36},{0,15,970},{15,3,3048},{0,15,970},{3,25,891},{3,25,891},{3,25,891},{3,18,894},{2,23,659},{2,18,41},{2,18,41},{2,13,59},{0,16,1137},{0,13,137},{4,22,37},{4,22,37},{4,22,37},{4,16,37},{8,1,648},{1,20,2},{1,20,2},{1,13,1},{10,5,648},{1,13,1},{10,7,882},{3,26,8},{5,18,8}, +{3,18,8},{10,7,882},{13,9,882},{3,18,8},{0,16,900},{13,9,882},{0,16,900},{3,0,890},{3,0,890},{3,0,890},{3,0,890},{2,17,10},{2,17,10},{2,17,10},{2,12,13},{0,13,136},{0,13,136},{4,31,1844},{4,26,971},{4,20,1186},{4,19,988},{2,31,3111},{2,24,1095},{2,20,77},{2,16,1159},{0,22,3940},{0,16,1055},{5,28,885},{5,24,90},{5,20,53},{5,19,131},{5,22,3048}, +{0,27,886},{2,20,41},{0,17,926},{8,13,3048},{0,17,926},{4,25,955},{4,25,955},{4,25,955},{4,18,954},{2,26,686},{2,20,41},{2,20,41},{2,14,49},{0,18,1002},{0,15,110},{5,21,2},{5,21,2},{5,21,2},{5,17,2},{8,4,648},{2,20,5},{2,20,5},{2,14,13},{14,2,648},{2,14,13},{13,0,882},{3,28,9},{6,19,18},{3,19,13},{13,0,882},{5,21,882},{3,19,13}, +{0,17,890},{5,21,882},{0,17,890},{4,0,954},{4,0,954},{4,0,954},{4,0,954},{2,20,37},{2,20,37},{2,20,37},{2,13,40},{0,15,74},{0,15,74},{4,31,1972},{4,28,898},{4,21,1287},{4,20,898},{3,31,3055},{3,24,1143},{3,20,33},{3,17,1214},{0,23,3820},{0,18,963},{5,31,931},{5,26,94},{6,20,108},{5,20,117},{11,3,3048},{0,28,899},{3,20,29},{0,18,899},{11,11,3048}, +{0,18,899},{4,27,891},{4,27,891},{4,27,891},{4,20,894},{3,25,652},{3,20,29},{3,20,29},{3,15,44},{0,20,876},{0,16,102},{5,24,49},{5,24,49},{5,24,49},{5,18,53},{3,25,648},{2,22,1},{2,22,1},{2,15,4},{12,6,648},{2,15,4},{8,19,882},{4,28,8},{6,20,8},{4,20,8},{8,19,882},{15,10,882},{4,20,8},{0,18,890},{15,10,882},{0,18,890},{4,0,890}, +{4,0,890},{4,0,890},{4,0,890},{3,19,4},{3,19,4},{3,19,4},{3,14,5},{0,17,29},{0,17,29},{5,31,1964},{5,28,970},{5,22,1186},{5,21,983},{4,31,3172},{3,26,1095},{3,22,77},{3,18,1159},{0,25,3679},{0,19,899},{6,30,886},{6,26,110},{6,22,56},{6,21,152},{10,9,3048},{1,29,888},{3,22,41},{0,19,890},{14,9,3048},{0,19,890},{5,27,955},{5,27,955},{5,27,955}, +{5,20,954},{3,27,692},{3,22,41},{3,22,41},{3,16,46},{0,22,800},{1,16,98},{6,23,5},{6,23,5},{6,23,5},{6,19,5},{9,6,648},{3,22,5},{3,22,5},{2,16,10},{14,5,648},{2,16,10},{13,5,882},{4,29,10},{7,21,13},{4,21,5},{13,5,882},{12,15,882},{4,21,5},{0,19,890},{12,15,882},{0,19,890},{5,0,954},{5,0,954},{5,0,954},{5,0,954},{3,22,37}, +{3,22,37},{3,22,37},{3,15,40},{0,19,9},{0,19,9},{6,31,2264},{5,30,898},{5,23,1287},{5,22,898},{4,31,3204},{4,26,1179},{4,22,45},{3,19,1250},{0,27,3523},{0,20,908},{6,31,968},{6,28,89},{7,22,108},{6,22,121},{9,15,3048},{1,30,899},{4,22,36},{0,20,904},{5,22,3048},{0,20,904},{5,29,891},{5,29,891},{5,29,891},{5,22,894},{4,27,659},{4,22,41},{4,22,41}, +{4,17,59},{0,23,747},{1,18,102},{6,26,37},{6,26,37},{6,26,37},{6,20,37},{10,5,648},{3,24,2},{3,24,2},{3,17,1},{12,9,648},{3,17,1},{15,1,882},{5,30,8},{7,22,8},{5,22,8},{15,1,882},{15,13,882},{5,22,8},{0,20,900},{15,13,882},{0,20,900},{5,0,890},{5,0,890},{5,0,890},{5,0,890},{4,21,10},{4,21,10},{4,21,10},{4,16,13},{0,20,8}, +{0,20,8},{6,31,2228},{6,30,971},{6,24,1186},{6,23,988},{5,31,3256},{4,28,1095},{4,24,77},{4,20,1159},{0,29,3364},{1,21,894},{7,31,915},{7,28,90},{7,24,53},{7,23,131},{14,1,3048},{2,31,886},{4,24,41},{1,21,890},{10,17,3048},{1,21,890},{6,29,955},{6,29,955},{6,29,955},{6,22,954},{4,30,686},{4,24,41},{4,24,41},{4,18,49},{0,25,705},{2,19,110},{7,25,2}, +{7,25,2},{7,25,2},{7,21,2},{10,8,648},{4,24,5},{4,24,5},{4,18,13},{11,12,648},{4,18,13},{15,4,882},{6,30,17},{7,24,52},{5,23,13},{15,4,882},{9,22,882},{5,23,13},{0,21,890},{9,22,882},{0,21,890},{6,0,954},{6,0,954},{6,0,954},{6,0,954},{4,24,37},{4,24,37},{4,24,37},{4,17,40},{1,21,4},{1,21,4},{7,31,2444},{6,31,907},{6,25,1287}, +{6,24,898},{6,31,3436},{5,28,1143},{5,24,33},{5,21,1214},{0,31,3276},{1,22,908},{8,30,1208},{7,30,94},{7,25,166},{7,24,117},{13,7,3048},{3,31,906},{5,24,29},{1,22,899},{13,15,3048},{1,22,899},{6,31,891},{6,31,891},{6,31,891},{6,24,894},{5,29,652},{5,24,29},{5,24,29},{5,19,44},{0,27,665},{2,20,102},{7,28,49},{7,28,49},{7,28,49},{7,22,53},{9,14,648}, +{4,26,1},{4,26,1},{4,19,4},{14,10,648},{4,19,4},{10,23,882},{6,31,17},{8,24,13},{6,24,8},{10,23,882},{11,21,882},{6,24,8},{0,22,890},{11,21,882},{0,22,890},{6,0,890},{6,0,890},{6,0,890},{6,0,890},{5,23,4},{5,23,4},{5,23,4},{5,18,5},{1,23,4},{1,23,4},{7,31,2636},{7,31,991},{7,26,1186},{7,25,983},{6,31,3532},{5,30,1095},{5,26,77}, +{5,22,1159},{0,31,3340},{2,23,899},{8,31,1014},{7,31,262},{8,25,108},{7,25,254},{15,3,3048},{4,31,936},{5,26,41},{2,23,890},{11,19,3048},{2,23,890},{7,31,955},{7,31,955},{7,31,955},{7,24,954},{5,31,692},{5,26,41},{5,26,41},{5,20,46},{0,29,651},{3,20,98},{8,26,101},{8,26,101},{8,26,101},{8,22,101},{11,10,648},{5,26,5},{5,26,5},{4,20,10},{5,23,648}, +{4,20,10},{15,9,882},{7,31,37},{8,25,8},{6,25,5},{15,9,882},{14,19,882},{6,25,5},{0,23,890},{14,19,882},{0,23,890},{7,0,954},{7,0,954},{7,0,954},{7,0,954},{5,26,37},{5,26,37},{5,26,37},{5,19,40},{2,23,9},{2,23,9},{8,31,3110},{7,31,1135},{7,27,1287},{7,26,898},{7,31,3652},{6,30,1179},{6,26,45},{5,23,1250},{1,31,3492},{2,24,908},{8,31,1174}, +{8,31,110},{8,27,56},{8,26,152},{11,19,3048},{5,31,996},{6,26,36},{2,24,904},{9,23,3048},{2,24,904},{7,31,939},{7,31,939},{7,31,939},{7,26,894},{6,31,659},{6,26,41},{6,26,41},{6,21,59},{1,29,659},{3,22,102},{8,28,4},{8,28,4},{8,28,4},{8,24,8},{12,9,648},{5,28,2},{5,28,2},{5,21,1},{14,13,648},{5,21,1},{14,15,882},{8,31,106},{9,26,13}, +{7,26,8},{14,15,882},{12,23,882},{7,26,8},{0,24,900},{12,23,882},{0,24,900},{7,0,890},{7,0,890},{7,0,890},{7,0,890},{6,25,10},{6,25,10},{6,25,10},{6,20,13},{2,24,8},{2,24,8},{8,31,3038},{8,31,1470},{8,28,1391},{7,27,1137},{7,31,4120},{6,31,1146},{6,28,77},{6,24,1159},{3,31,3681},{3,25,894},{9,31,1205},{8,31,245},{9,27,99},{8,27,122},{10,25,3048}, +{6,31,1110},{6,28,41},{3,25,890},{12,21,3048},{3,25,890},{8,31,1274},{8,31,1274},{8,31,1274},{7,27,1128},{7,30,750},{6,28,41},{6,28,41},{6,22,49},{1,31,648},{4,23,110},{8,31,49},{8,31,49},{8,31,49},{8,25,53},{15,2,648},{6,28,5},{6,28,5},{6,22,13},{13,16,648},{6,22,13},{14,18,882},{9,31,164},{9,27,18},{7,27,13},{14,18,882},{11,26,882},{7,27,13}, +{0,25,890},{11,26,882},{0,25,890},{7,0,1124},{7,0,1124},{7,0,1124},{7,0,1124},{6,28,37},{6,28,37},{6,28,37},{6,21,40},{3,25,4},{3,25,4},{9,31,3454},{8,31,1502},{8,29,1186},{8,28,983},{8,31,4077},{7,31,1230},{7,28,33},{7,25,1214},{4,31,3820},{3,26,908},{10,31,1368},{9,31,261},{9,29,53},{9,28,126},{15,11,3048},{7,31,1226},{7,28,29},{3,26,899},{15,19,3048}, +{3,26,899},{8,31,1018},{8,31,1018},{8,31,1018},{8,27,954},{7,31,724},{7,28,29},{7,28,29},{7,23,44},{2,31,665},{4,24,102},{9,30,2},{9,30,2},{9,30,2},{9,26,2},{11,18,648},{6,30,1},{6,30,1},{6,23,4},{10,21,648},{6,23,4},{12,27,882},{10,31,225},{10,28,13},{7,28,20},{12,27,882},{13,25,882},{7,28,20},{0,26,890},{13,25,882},{0,26,890},{8,0,954}, +{8,0,954},{8,0,954},{8,0,954},{7,27,4},{7,27,4},{7,27,4},{7,22,5},{3,27,4},{3,27,4},{9,31,3614},{9,31,1886},{8,30,1287},{8,29,898},{8,31,4381},{7,31,1582},{7,30,77},{7,26,1159},{5,31,4036},{4,27,899},{10,31,1560},{10,31,405},{10,29,108},{9,29,117},{14,17,3048},{8,31,1444},{7,30,41},{4,27,890},{13,23,3048},{4,27,890},{8,31,1146},{8,31,1146},{8,31,1146}, +{8,29,894},{8,30,1011},{7,30,41},{7,30,41},{7,24,46},{3,31,705},{5,24,98},{9,31,85},{9,31,85},{9,31,85},{9,27,53},{13,14,648},{7,30,5},{7,30,5},{6,24,10},{8,25,648},{6,24,10},{14,23,882},{10,31,305},{10,29,8},{8,29,8},{14,23,882},{11,29,882},{8,29,8},{0,27,890},{11,29,882},{0,27,890},{8,0,890},{8,0,890},{8,0,890},{8,0,890},{7,30,37}, +{7,30,37},{7,30,37},{7,23,40},{4,27,9},{4,27,9},{10,31,4072},{9,31,2174},{9,31,1186},{9,30,983},{9,31,4545},{8,31,1725},{8,30,207},{7,27,1250},{6,31,4339},{4,28,908},{11,31,1656},{10,31,645},{10,31,56},{10,30,152},{13,23,3048},{8,31,1604},{7,31,77},{4,28,904},{11,27,3048},{4,28,904},{9,31,1150},{9,31,1150},{9,31,1150},{9,29,954},{8,31,841},{8,29,193},{8,29,193}, +{7,25,197},{4,31,747},{5,26,102},{10,31,20},{10,31,20},{10,31,20},{10,28,8},{14,13,648},{7,31,41},{7,31,41},{7,25,1},{11,23,648},{7,25,1},{13,29,882},{11,31,397},{11,30,13},{8,30,5},{13,29,882},{14,27,882},{8,30,5},{0,28,900},{14,27,882},{0,28,900},{9,0,954},{9,0,954},{9,0,954},{9,0,954},{8,27,122},{8,27,122},{8,27,122},{8,23,122},{4,28,8}, +{4,28,8},{10,31,4147},{10,31,2404},{9,31,1429},{9,31,901},{10,31,4627},{9,31,1938},{8,31,38},{8,28,1061},{7,31,4330},{5,29,789},{12,31,1701},{11,31,715},{11,31,90},{10,31,113},{15,19,2814},{10,31,1554},{8,31,34},{5,29,785},{13,26,2814},{5,29,785},{9,31,1429},{9,31,1429},{9,31,1429},{9,31,901},{9,31,1022},{8,31,38},{8,31,38},{8,26,44},{5,31,840},{6,27,110},{11,31,90}, +{11,31,90},{11,31,90},{10,29,53},{14,16,648},{8,31,34},{8,31,34},{7,26,20},{15,20,648},{7,26,20},{15,25,761},{12,31,425},{11,31,9},{9,31,1},{15,25,761},{12,31,761},{9,31,1},{0,29,785},{12,31,761},{0,29,785},{9,0,900},{9,0,900},{9,0,900},{9,0,900},{8,30,4},{8,30,4},{8,30,4},{8,25,5},{5,29,4},{5,29,4},{11,31,3735},{10,31,2356},{10,31,1395}, +{10,31,954},{10,31,4099},{9,31,1618},{9,31,174},{8,29,686},{7,31,3930},{6,29,510},{12,31,1285},{12,31,685},{11,31,122},{11,31,37},{13,27,2249},{10,31,1186},{9,31,74},{6,29,485},{13,27,2249},{6,29,485},{10,31,1395},{10,31,1395},{10,31,1395},{10,31,954},{9,31,1086},{9,31,174},{9,31,174},{8,27,49},{6,31,969},{6,28,102},{11,31,122},{11,31,122},{11,31,122},{11,30,2},{13,22,648}, +{9,31,74},{9,31,74},{8,27,13},{12,25,648},{8,27,13},{15,26,481},{13,31,269},{12,31,0},{10,31,0},{15,26,481},{15,28,481},{10,31,0},{0,29,481},{15,28,481},{0,29,481},{10,0,954},{10,0,954},{10,0,954},{10,0,954},{8,31,61},{8,31,61},{8,31,61},{8,26,40},{5,31,4},{5,31,4},{11,31,3399},{11,31,2260},{11,31,1635},{10,31,954},{11,31,3639},{10,31,1435},{9,31,238}, +{9,29,430},{8,31,3443},{6,30,314},{13,31,1121},{12,31,525},{12,31,164},{11,31,53},{13,29,1769},{11,31,918},{10,31,113},{7,30,290},{14,27,1769},{7,30,290},{11,31,1635},{11,31,1635},{11,31,1635},{10,31,954},{10,31,1251},{9,31,238},{9,31,238},{9,28,41},{7,31,1105},{7,28,98},{12,31,164},{12,31,164},{12,31,164},{11,31,53},{15,18,648},{10,31,113},{10,31,113},{8,28,1},{10,29,648}, +{8,28,1},{15,27,269},{13,31,173},{13,31,4},{11,31,4},{15,27,269},{14,30,265},{11,31,4},{0,30,289},{14,30,265},{0,30,289},{10,0,890},{10,0,890},{10,0,890},{10,0,890},{9,31,13},{9,31,13},{9,31,13},{9,27,5},{6,31,9},{6,31,9},{12,31,3157},{11,31,2308},{11,31,1683},{11,31,1054},{11,31,3303},{10,31,1339},{10,31,378},{9,30,213},{9,31,3103},{7,30,166},{13,31,801}, +{13,31,529},{12,31,260},{12,31,20},{15,24,1374},{12,31,777},{11,31,181},{8,30,117},{15,27,1377},{8,30,117},{11,31,1683},{11,31,1683},{11,31,1683},{11,31,1054},{10,31,1491},{10,31,378},{10,31,378},{9,29,46},{8,31,1331},{7,30,102},{12,31,260},{12,31,260},{12,31,260},{12,31,20},{13,27,648},{11,31,181},{11,31,181},{8,29,10},{13,27,648},{8,29,10},{15,28,117},{14,31,61},{14,31,25}, +{13,31,4},{15,28,117},{14,31,117},{13,31,4},{0,30,113},{14,31,117},{0,30,113},{11,0,954},{11,0,954},{11,0,954},{11,0,954},{10,31,122},{10,31,122},{10,31,122},{9,28,40},{7,31,29},{7,31,29},{12,31,2860},{12,31,2260},{12,31,1899},{11,31,1261},{12,31,2932},{11,31,1310},{11,31,685},{10,30,108},{10,31,2731},{7,31,173},{13,31,747},{13,31,475},{13,31,306},{13,31,130},{15,26,1032}, +{12,31,651},{12,31,290},{8,31,40},{14,29,1032},{8,31,40},{12,31,1899},{12,31,1899},{12,31,1899},{11,31,1261},{11,31,1620},{11,31,685},{11,31,685},{10,30,44},{9,31,1524},{8,30,134},{13,31,306},{13,31,306},{13,31,306},{13,31,130},{13,30,648},{12,31,290},{12,31,290},{9,30,5},{12,30,648},{9,30,5},{15,30,18},{15,30,34},{14,31,16},{14,31,0},{15,30,18},{15,30,26},{14,31,0}, +{0,31,36},{15,30,26},{0,31,36},{11,0,900},{11,0,900},{11,0,900},{11,0,900},{10,31,104},{10,31,104},{10,31,104},{10,29,5},{8,30,130},{8,30,130},{13,31,2732},{12,31,2276},{12,31,1915},{12,31,1315},{12,31,2660},{11,31,1414},{11,31,789},{10,31,45},{11,31,2487},{8,31,116},{14,31,524},{14,31,460},{14,31,424},{13,31,170},{14,31,776},{13,31,507},{13,31,338},{10,31,9},{14,30,771}, +{10,31,9},{12,31,1915},{12,31,1915},{12,31,1915},{12,31,1315},{12,31,1699},{11,31,789},{11,31,789},{10,31,45},{10,31,1546},{8,31,116},{14,31,424},{14,31,424},{14,31,424},{13,31,170},{15,26,580},{13,31,338},{13,31,338},{10,31,9},{14,29,580},{10,31,9},{15,31,0},{15,31,0},{15,31,0},{15,31,0},{15,31,0},{15,31,0},{15,31,0},{0,31,0},{15,31,0},{0,31,0},{12,0,954}, +{12,0,954},{12,0,954},{12,0,954},{11,31,164},{11,31,164},{11,31,164},{10,30,40},{8,31,116},{8,31,116},{13,31,2156},{13,31,1884},{13,31,1715},{12,31,1251},{13,31,2132},{12,31,1108},{12,31,747},{11,31,5},{11,31,1927},{9,31,180},{14,31,300},{14,31,236},{14,31,200},{14,31,136},{15,28,451},{14,31,328},{13,31,194},{11,31,1},{15,29,456},{11,31,1},{13,31,1715},{13,31,1715},{13,31,1715}, +{12,31,1251},{12,31,1347},{12,31,747},{12,31,747},{11,31,5},{10,31,1242},{9,31,180},{14,31,200},{14,31,200},{14,31,200},{14,31,136},{15,27,338},{13,31,194},{13,31,194},{11,31,1},{13,31,338},{11,31,1},{15,31,0},{15,31,0},{15,31,0},{15,31,0},{15,31,0},{15,31,0},{15,31,0},{0,31,0},{15,31,0},{0,31,0},{12,0,890},{12,0,890},{12,0,890},{12,0,890},{11,31,260}, +{11,31,260},{11,31,260},{11,31,5},{9,31,180},{9,31,180},{13,31,1836},{13,31,1564},{13,31,1395},{13,31,1123},{13,31,1620},{12,31,1012},{12,31,651},{11,31,85},{12,31,1564},{10,31,233},{14,31,204},{14,31,140},{14,31,104},{14,31,40},{15,29,216},{14,31,136},{14,31,100},{12,31,1},{14,31,216},{12,31,1},{13,31,1395},{13,31,1395},{13,31,1395},{13,31,1123},{13,31,1179},{12,31,651},{12,31,651}, +{11,31,85},{11,31,998},{10,31,233},{14,31,104},{14,31,104},{14,31,104},{14,31,40},{15,28,162},{14,31,100},{14,31,100},{12,31,1},{15,29,164},{12,31,1},{15,31,0},{15,31,0},{15,31,0},{15,31,0},{15,31,0},{15,31,0},{15,31,0},{0,31,0},{15,31,0},{0,31,0},{13,0,954},{13,0,954},{13,0,954},{13,0,954},{12,31,290},{12,31,290},{12,31,290},{11,31,85},{10,31,233}, +{10,31,233},{0,17,1568},{0,14,442},{0,10,40},{0,8,485},{0,11,3379},{0,9,2369},{0,8,1061},{0,5,2435},{0,6,3760},{0,5,2660},{0,17,1568},{0,14,442},{0,10,40},{0,8,485},{1,8,3372},{0,9,2369},{0,8,1061},{0,5,2435},{5,1,3371},{0,5,2435},{0,8,0},{0,8,0},{0,8,0},{0,5,1},{0,4,288},{0,4,160},{0,4,160},{0,2,164},{0,2,332},{0,2,200},{0,8,0}, +{0,8,0},{0,8,0},{0,5,1},{0,4,288},{0,4,160},{0,4,160},{0,2,164},{2,0,288},{0,2,164},{3,7,1568},{0,14,442},{0,10,40},{0,8,485},{3,7,1568},{8,0,1568},{0,8,485},{0,6,1586},{8,0,1568},{0,6,1586},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,20,1570},{0,16,325},{0,11,5}, +{0,9,392},{0,13,3968},{0,10,2630},{0,9,1121},{0,6,2710},{0,7,4484},{0,6,3034},{0,20,1570},{0,16,325},{0,11,5},{0,9,392},{1,10,3968},{0,10,2630},{0,9,1121},{0,6,2710},{5,2,3968},{0,6,2710},{0,11,1},{0,11,1},{0,11,1},{0,6,4},{0,5,514},{0,5,274},{0,5,274},{0,3,289},{0,3,595},{0,3,370},{0,11,1},{0,11,1},{0,11,1},{0,6,4},{1,2,512}, +{0,5,274},{0,5,274},{0,3,289},{1,2,512},{0,3,289},{5,3,1568},{0,16,325},{0,11,5},{0,9,392},{5,3,1568},{4,7,1568},{0,9,392},{0,7,1586},{4,7,1568},{0,7,1586},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,22,1570},{0,17,225},{0,12,18},{0,11,292},{0,15,4652},{0,11,2945},{0,10,1217}, +{0,7,3035},{0,8,5283},{0,7,3476},{0,22,1570},{0,17,225},{0,12,18},{0,11,292},{2,8,4651},{0,11,2945},{0,10,1217},{0,7,3035},{5,3,4651},{0,7,3035},{0,13,0},{0,13,0},{0,13,0},{0,8,1},{0,7,802},{0,6,424},{0,6,424},{0,4,449},{0,3,931},{0,3,562},{0,13,0},{0,13,0},{0,13,0},{0,8,1},{2,0,800},{0,6,424},{0,6,424},{0,4,449},{0,4,800}, +{0,4,449},{1,19,1568},{0,17,225},{0,12,18},{0,11,292},{1,19,1568},{9,2,1568},{0,11,292},{0,8,1576},{9,2,1568},{0,8,1576},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,25,1570},{0,19,149},{0,13,73},{0,12,194},{0,17,5424},{0,13,3368},{0,11,1349},{0,8,3449},{0,9,6213},{0,7,3956},{0,25,1570}, +{0,19,149},{0,13,73},{0,12,194},{5,0,5419},{0,13,3368},{0,11,1349},{0,8,3449},{5,4,5419},{0,8,3449},{0,16,1},{0,16,1},{0,16,1},{0,9,4},{0,8,1152},{0,7,610},{0,7,610},{0,4,625},{0,4,1328},{0,4,769},{0,16,1},{0,16,1},{0,16,1},{0,9,4},{0,8,1152},{0,7,610},{0,7,610},{0,4,625},{4,0,1152},{0,4,625},{5,8,1568},{0,19,149},{1,13,13}, +{0,12,194},{5,8,1568},{4,10,1568},{0,12,194},{0,9,1576},{4,10,1568},{0,9,1576},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,28,1651},{0,21,155},{0,14,281},{0,13,198},{0,20,5424},{0,15,3099},{0,12,996},{0,9,3179},{0,10,6544},{0,8,3890},{1,24,1619},{0,21,155},{1,14,69},{0,13,198},{5,3,5419}, +{0,15,3099},{0,12,996},{0,9,3179},{4,7,5419},{0,9,3179},{0,19,82},{0,19,82},{0,19,82},{0,11,82},{0,11,1152},{0,9,445},{0,9,445},{0,6,505},{0,6,1494},{0,5,737},{1,15,50},{1,15,50},{1,15,50},{1,10,49},{3,1,1152},{0,9,445},{0,9,445},{0,6,505},{3,3,1152},{0,6,505},{5,11,1568},{0,21,74},{1,14,20},{0,13,117},{5,11,1568},{11,3,1568},{0,13,117}, +{0,10,1586},{11,3,1568},{0,10,1586},{0,0,81},{0,0,81},{0,0,81},{0,0,81},{0,3,0},{0,3,0},{0,3,0},{0,2,1},{0,1,25},{0,1,25},{1,27,1825},{0,23,323},{1,15,342},{0,14,361},{0,22,5420},{0,16,2834},{0,13,726},{0,10,2966},{0,11,6916},{0,9,3860},{1,27,1569},{1,21,131},{1,15,86},{1,14,181},{1,19,5419},{0,16,2834},{0,13,726},{0,10,2966},{9,2,5419}, +{0,10,2966},{1,18,257},{1,18,257},{1,18,257},{1,12,261},{0,13,1154},{0,11,337},{0,11,337},{0,7,388},{0,7,1665},{0,6,749},{1,18,1},{1,18,1},{1,18,1},{1,12,5},{4,0,1152},{0,11,337},{0,11,337},{0,7,388},{1,7,1152},{0,7,388},{8,2,1568},{0,23,34},{2,15,5},{0,14,72},{8,2,1568},{13,2,1568},{0,14,72},{0,11,1586},{13,2,1568},{0,11,1586},{1,0,257}, +{1,0,257},{1,0,257},{1,0,257},{0,6,1},{0,6,1},{0,6,1},{0,3,4},{0,2,85},{0,2,85},{1,30,1907},{1,23,411},{1,16,542},{1,15,454},{0,25,5424},{0,18,2630},{0,15,486},{0,11,2771},{0,13,7299},{0,11,3860},{2,26,1634},{1,23,155},{2,16,82},{1,15,198},{5,8,5419},{0,18,2630},{0,15,486},{0,11,2771},{4,10,5419},{0,11,2771},{1,21,338},{1,21,338},{1,21,338}, +{1,13,338},{0,16,1152},{0,13,274},{0,13,274},{0,8,305},{0,8,1856},{0,7,797},{2,17,64},{2,17,64},{2,17,64},{2,12,65},{3,6,1152},{0,13,274},{0,13,274},{0,8,305},{3,6,1152},{0,8,305},{3,23,1568},{0,25,17},{2,16,18},{0,15,45},{3,23,1568},{11,6,1568},{0,15,45},{0,12,1576},{11,6,1568},{0,12,1576},{1,0,337},{1,0,337},{1,0,337},{1,0,337},{0,8,1}, +{0,8,1},{0,8,1},{0,5,0},{0,4,169},{0,4,169},{1,31,2145},{1,25,590},{1,17,915},{1,16,619},{0,27,5420},{0,20,2424},{0,16,282},{0,12,2552},{0,15,7711},{0,11,3908},{2,29,1570},{2,23,149},{2,17,73},{2,16,194},{7,4,5419},{0,20,2424},{0,16,282},{0,12,2552},{9,5,5419},{0,12,2552},{1,23,546},{1,23,546},{1,23,546},{1,15,546},{0,19,1154},{0,15,194},{0,15,194}, +{0,9,218},{0,9,2123},{0,8,865},{2,20,1},{2,20,1},{2,20,1},{2,13,4},{5,2,1152},{0,15,194},{0,15,194},{0,9,218},{8,1,1152},{0,9,218},{9,4,1568},{0,27,5},{3,17,13},{0,16,26},{9,4,1568},{9,10,1568},{0,16,26},{0,13,1576},{9,10,1568},{0,13,1576},{1,0,545},{1,0,545},{1,0,545},{1,0,545},{0,11,0},{0,11,0},{0,11,0},{0,7,4},{0,5,289}, +{0,5,289},{2,31,2746},{1,27,945},{2,18,1370},{1,17,977},{0,30,5420},{0,22,2243},{0,17,145},{0,13,2386},{0,16,8161},{0,13,3986},{3,28,1619},{2,25,155},{3,18,69},{2,17,198},{8,2,5419},{0,22,2243},{0,17,145},{0,13,2386},{13,2,5419},{0,13,2386},{1,26,932},{1,26,932},{1,26,932},{1,16,936},{0,22,1154},{0,17,109},{0,17,109},{0,10,145},{0,11,2441},{0,9,1001},{3,19,50}, +{3,19,50},{3,19,50},{3,14,49},{5,5,1152},{0,17,109},{0,17,109},{0,10,145},{5,7,1152},{0,10,145},{11,0,1568},{0,29,10},{3,18,20},{0,18,8},{11,0,1568},{13,7,1568},{0,18,8},{0,14,1586},{13,7,1568},{0,14,1586},{1,0,932},{1,0,932},{1,0,932},{1,0,932},{0,14,1},{0,14,1},{0,14,1},{0,8,1},{0,6,468},{0,6,468},{2,31,3146},{2,27,1412},{2,19,1743}, +{1,19,1441},{0,31,5515},{0,23,2096},{0,19,69},{0,14,2251},{0,18,8669},{0,14,4100},{3,31,1569},{3,25,131},{3,19,86},{3,18,181},{3,23,5419},{0,23,2096},{0,19,69},{0,14,2251},{11,6,5419},{0,14,2251},{2,25,1379},{2,25,1379},{2,25,1379},{2,17,1379},{0,24,1152},{0,18,61},{0,18,61},{0,11,100},{0,12,2859},{0,10,1157},{3,22,1},{3,22,1},{3,22,1},{3,16,5},{7,1,1152}, +{0,18,61},{0,18,61},{0,11,100},{10,2,1152},{0,11,100},{10,6,1568},{1,29,2},{4,19,5},{0,19,5},{10,6,1568},{15,6,1568},{0,19,5},{0,15,1586},{15,6,1568},{0,15,1586},{2,0,1378},{2,0,1378},{2,0,1378},{2,0,1378},{0,16,1},{0,16,1},{0,16,1},{0,10,1},{0,8,657},{0,8,657},{2,31,3802},{2,29,1603},{2,21,2148},{2,19,1631},{1,31,5655},{0,25,2005},{0,20,31}, +{0,15,2138},{0,19,8963},{0,15,4070},{4,30,1634},{3,27,155},{4,20,82},{3,19,198},{9,4,5419},{0,25,2001},{0,20,27},{0,15,2134},{9,10,5419},{0,15,2134},{2,28,1587},{2,28,1587},{2,28,1587},{2,18,1590},{0,27,1158},{0,20,22},{0,20,22},{0,12,62},{0,14,3075},{0,11,1221},{4,21,64},{4,21,64},{4,21,64},{4,16,65},{5,10,1152},{0,20,18},{0,20,18},{0,12,58},{12,1,1152}, +{0,12,58},{12,2,1568},{1,31,10},{4,20,18},{0,20,18},{12,2,1568},{13,10,1568},{0,20,18},{0,16,1576},{13,10,1568},{0,16,1576},{2,0,1586},{2,0,1586},{2,0,1586},{2,0,1586},{0,19,4},{0,19,4},{0,19,4},{0,11,8},{0,9,769},{0,9,769},{3,31,3890},{2,31,1623},{3,21,2180},{2,20,1644},{1,31,5863},{0,27,1989},{1,21,109},{0,17,2117},{0,21,8560},{0,16,3545},{4,31,1640}, +{4,27,149},{4,21,73},{4,20,194},{10,3,5419},{0,27,1889},{0,21,49},{0,17,2017},{11,9,5419},{0,17,2017},{2,30,1619},{2,30,1619},{2,30,1619},{2,20,1619},{1,26,1188},{1,20,86},{1,20,86},{1,13,121},{0,16,2801},{0,13,949},{4,24,1},{4,24,1},{4,24,1},{4,17,4},{8,1,1152},{0,22,2},{0,22,2},{0,14,26},{10,5,1152},{0,14,26},{11,8,1568},{2,31,5},{5,21,13}, +{1,21,9},{11,8,1568},{11,14,1568},{1,21,9},{0,17,1576},{11,14,1568},{0,17,1576},{2,0,1618},{2,0,1618},{2,0,1618},{2,0,1618},{1,18,37},{1,18,37},{1,18,37},{1,12,37},{0,10,625},{0,10,625},{4,31,4308},{3,31,1589},{3,23,2160},{3,21,1621},{2,31,5895},{1,27,1999},{1,22,33},{1,18,2124},{0,23,8196},{0,17,3043},{5,31,1667},{4,29,155},{5,22,69},{4,21,198},{10,6,5419}, +{0,29,1772},{1,22,24},{0,18,1875},{15,6,5419},{0,18,1875},{3,30,1576},{3,30,1576},{3,30,1576},{3,20,1580},{1,29,1161},{1,22,29},{1,22,29},{1,15,58},{0,17,2529},{0,14,656},{5,23,50},{5,23,50},{5,23,50},{5,18,49},{8,4,1152},{0,24,1},{0,24,1},{0,15,1},{14,2,1152},{0,15,1},{13,4,1568},{3,31,13},{5,22,20},{2,22,8},{13,4,1568},{15,11,1568},{2,22,8}, +{0,18,1586},{15,11,1568},{0,18,1586},{3,0,1576},{3,0,1576},{3,0,1576},{3,0,1576},{1,21,10},{1,21,10},{1,21,10},{1,14,13},{0,12,520},{0,12,520},{4,31,4436},{3,31,1765},{4,23,2175},{3,23,1669},{3,31,6079},{1,29,1977},{2,23,105},{1,19,2107},{0,24,7969},{0,18,2675},{6,31,1832},{5,29,131},{5,23,86},{5,22,181},{12,2,5419},{0,30,1699},{1,23,62},{0,19,1782},{13,10,5419}, +{0,19,1782},{3,31,1665},{3,31,1665},{3,31,1665},{3,22,1640},{2,28,1188},{2,22,97},{2,22,97},{2,15,136},{0,19,2313},{0,15,474},{5,26,1},{5,26,1},{5,26,1},{5,20,5},{3,25,1152},{1,24,5},{1,24,5},{0,16,2},{12,6,1152},{0,16,2},{15,0,1568},{4,31,34},{6,23,5},{2,23,5},{15,0,1568},{12,16,1568},{2,23,5},{0,19,1586},{12,16,1568},{0,19,1586},{3,0,1640}, +{3,0,1640},{3,0,1640},{3,0,1640},{2,20,37},{2,20,37},{2,20,37},{2,14,37},{0,14,400},{0,14,400},{5,31,4740},{4,31,1716},{4,25,2148},{4,23,1631},{3,31,6351},{2,29,2005},{2,24,31},{2,19,2138},{0,26,7669},{0,19,2375},{6,31,1832},{5,31,155},{6,24,82},{5,23,198},{11,8,5419},{0,31,1712},{2,24,27},{0,20,1720},{11,14,5419},{0,20,1720},{4,31,1595},{4,31,1595},{4,31,1595}, +{4,22,1590},{2,31,1158},{2,24,22},{2,24,22},{2,16,62},{0,21,2091},{0,17,306},{6,25,64},{6,25,64},{6,25,64},{6,20,65},{9,6,1152},{1,26,1},{1,26,1},{1,17,5},{14,5,1152},{1,17,5},{14,6,1568},{5,31,74},{6,24,18},{2,24,18},{14,6,1568},{15,14,1568},{2,24,18},{0,20,1576},{15,14,1568},{0,20,1576},{4,0,1586},{4,0,1586},{4,0,1586},{4,0,1586},{2,23,4}, +{2,23,4},{2,23,4},{2,15,8},{0,16,277},{0,16,277},{5,31,5060},{5,31,1980},{5,25,2180},{4,24,1644},{4,31,6508},{2,31,1989},{3,25,109},{2,21,2117},{0,28,7364},{0,21,2098},{7,31,1952},{6,31,149},{6,25,73},{6,24,194},{12,7,5419},{1,31,1804},{2,25,49},{0,21,1657},{13,13,5419},{0,21,1657},{4,31,1739},{4,31,1739},{4,31,1739},{4,24,1619},{3,30,1188},{3,24,86},{3,24,86}, +{3,17,121},{0,22,1928},{0,18,194},{6,28,1},{6,28,1},{6,28,1},{6,21,4},{10,5,1152},{2,26,2},{2,26,2},{1,18,2},{12,9,1152},{1,18,2},{13,12,1568},{6,31,149},{7,25,13},{3,25,9},{13,12,1568},{13,18,1568},{3,25,9},{0,21,1576},{13,18,1568},{0,21,1576},{4,0,1618},{4,0,1618},{4,0,1618},{4,0,1618},{3,22,37},{3,22,37},{3,22,37},{3,16,37},{0,18,193}, +{0,18,193},{6,31,5316},{5,31,2160},{5,27,2160},{5,25,1621},{5,31,6800},{3,31,1999},{3,26,33},{3,22,2124},{0,29,7068},{0,22,1836},{7,31,2195},{7,31,270},{7,26,69},{6,25,198},{15,0,5419},{2,31,1970},{3,26,24},{0,22,1611},{12,16,5419},{0,22,1611},{5,31,1676},{5,31,1676},{5,31,1676},{5,24,1580},{3,31,1233},{3,26,29},{3,26,29},{3,19,58},{0,24,1798},{0,19,157},{7,27,50}, +{7,27,50},{7,27,50},{7,22,49},{10,8,1152},{2,28,1},{2,28,1},{2,19,1},{11,12,1152},{2,19,1},{15,8,1568},{7,31,221},{7,26,20},{4,26,8},{15,8,1568},{11,22,1568},{4,26,8},{0,22,1586},{11,22,1568},{0,22,1586},{5,0,1576},{5,0,1576},{5,0,1576},{5,0,1576},{3,25,10},{3,25,10},{3,25,10},{3,18,13},{0,20,106},{0,20,106},{6,31,5828},{6,31,2435},{6,27,2175}, +{5,27,1669},{5,31,7184},{4,31,2132},{4,27,105},{3,23,2107},{0,31,6820},{0,23,1690},{8,31,2306},{7,31,334},{7,27,86},{7,26,181},{14,6,5419},{4,31,2096},{3,27,62},{0,23,1590},{15,14,5419},{0,23,1590},{6,31,1859},{6,31,1859},{6,31,1859},{5,26,1640},{4,31,1220},{4,26,97},{4,26,97},{4,19,136},{0,26,1650},{0,21,161},{7,30,1},{7,30,1},{7,30,1},{7,24,5},{9,14,1152}, +{3,28,5},{3,28,5},{2,20,2},{14,10,1152},{2,20,2},{14,14,1568},{7,31,333},{8,27,40},{4,27,5},{14,14,1568},{14,20,1568},{4,27,5},{0,23,1586},{14,20,1568},{0,23,1586},{5,0,1640},{5,0,1640},{5,0,1640},{5,0,1640},{4,24,37},{4,24,37},{4,24,37},{4,18,37},{0,22,58},{0,22,58},{7,31,6036},{6,31,2835},{6,29,2148},{6,27,1631},{6,31,7316},{4,31,2228},{4,28,31}, +{4,23,2138},{0,31,6884},{0,24,1613},{8,31,2402},{8,31,666},{8,28,269},{7,27,198},{13,12,5419},{4,31,2224},{4,28,27},{0,24,1577},{13,18,5419},{0,24,1577},{6,31,1811},{6,31,1811},{6,31,1811},{6,26,1590},{5,31,1356},{4,28,22},{4,28,22},{4,20,62},{0,28,1508},{1,21,137},{7,31,106},{7,31,106},{7,31,106},{7,25,82},{11,10,1152},{3,30,1},{3,30,1},{3,21,5},{5,23,1152}, +{3,21,5},{13,20,1568},{8,31,410},{8,28,13},{4,28,18},{13,20,1568},{13,23,1570},{4,28,18},{0,24,1576},{13,23,1570},{0,24,1576},{6,0,1586},{6,0,1586},{6,0,1586},{6,0,1586},{4,27,4},{4,27,4},{4,27,4},{4,19,8},{0,24,37},{0,24,37},{7,31,6740},{7,31,3135},{7,29,2180},{6,28,1644},{7,31,7676},{5,31,2448},{5,29,109},{4,25,2117},{1,31,7196},{0,25,1593},{9,31,2594}, +{8,31,698},{8,29,82},{8,28,345},{14,11,5419},{5,31,2412},{4,29,49},{1,25,1580},{15,17,5419},{1,25,1580},{7,31,1979},{7,31,1979},{7,31,1979},{6,28,1619},{5,31,1388},{5,28,86},{5,28,86},{5,21,121},{0,30,1416},{1,23,161},{8,30,64},{8,30,64},{8,30,64},{8,25,65},{12,9,1152},{4,30,2},{4,30,2},{3,22,2},{14,13,1152},{3,22,2},{15,16,1568},{9,31,530},{8,29,18}, +{5,29,9},{15,16,1568},{15,22,1568},{5,29,9},{0,25,1576},{15,22,1568},{0,25,1576},{6,0,1618},{6,0,1618},{6,0,1618},{6,0,1618},{5,26,37},{5,26,37},{5,26,37},{5,20,37},{0,25,17},{0,25,17},{8,31,6906},{7,31,3909},{7,31,2160},{7,29,1621},{7,31,8144},{6,31,2902},{5,30,33},{5,26,2124},{2,31,7661},{1,26,1615},{9,31,2945},{9,31,1025},{8,30,86},{8,29,181},{14,14,5419}, +{7,31,2694},{5,30,24},{1,26,1590},{14,20,5419},{1,26,1590},{7,31,2060},{7,31,2060},{7,31,2060},{7,28,1580},{6,31,1476},{5,30,29},{5,30,29},{5,23,58},{0,31,1324},{2,23,157},{8,31,37},{8,31,37},{8,31,37},{8,27,5},{15,2,1152},{5,30,20},{5,30,20},{4,23,1},{13,16,1152},{4,23,1},{15,19,1568},{10,31,637},{9,30,5},{6,30,8},{15,19,1568},{13,26,1568},{6,30,8}, +{0,26,1586},{13,26,1568},{0,26,1586},{7,0,1576},{7,0,1576},{7,0,1576},{7,0,1576},{5,29,10},{5,29,10},{5,29,10},{5,22,13},{0,28,10},{0,28,10},{8,31,7386},{8,31,4250},{8,31,2490},{7,31,1669},{8,31,8461},{6,31,3350},{6,31,105},{5,27,2107},{4,31,8004},{1,27,1611},{10,31,3112},{9,31,1361},{9,31,69},{8,30,198},{13,20,5419},{7,31,2950},{5,31,62},{2,27,1590},{11,25,5420}, +{2,27,1590},{8,31,2486},{8,31,2486},{8,31,2486},{7,30,1640},{6,31,1700},{6,30,97},{6,30,97},{6,23,136},{1,31,1424},{2,25,161},{9,31,65},{9,31,65},{9,31,65},{9,27,49},{11,18,1152},{5,31,58},{5,31,58},{4,24,2},{10,21,1152},{4,24,2},{13,28,1568},{11,31,785},{9,31,20},{6,31,5},{13,28,1568},{11,30,1568},{6,31,5},{0,27,1586},{11,30,1568},{0,27,1586},{7,0,1640}, +{7,0,1640},{7,0,1640},{7,0,1640},{6,28,37},{6,28,37},{6,28,37},{6,22,37},{1,28,10},{1,28,10},{9,31,7014},{8,31,4230},{8,31,2294},{8,31,1846},{8,31,7865},{7,31,3114},{6,31,85},{6,27,1706},{4,31,7436},{2,28,1289},{11,31,2852},{10,31,1221},{9,31,145},{9,30,114},{13,22,4803},{8,31,2648},{6,31,81},{2,28,1253},{12,25,4803},{2,28,1253},{8,31,2294},{8,31,2294},{8,31,2294}, +{8,30,1811},{7,31,1740},{6,31,85},{6,31,85},{6,24,62},{2,31,1577},{3,25,137},{9,31,145},{9,31,145},{9,31,145},{9,29,5},{13,14,1152},{6,31,81},{6,31,81},{5,25,5},{8,25,1152},{5,25,5},{15,23,1250},{11,31,689},{10,31,4},{7,31,9},{15,23,1250},{11,31,1250},{7,31,9},{0,28,1252},{11,31,1250},{0,28,1252},{8,0,1810},{8,0,1810},{8,0,1810},{8,0,1810},{6,31,4}, +{6,31,4},{6,31,4},{6,23,8},{1,29,8},{1,29,8},{9,31,6534},{9,31,4134},{8,31,2486},{8,31,1590},{9,31,7237},{7,31,2970},{7,31,161},{6,28,1256},{5,31,6748},{2,29,949},{11,31,2340},{10,31,1125},{10,31,164},{9,31,97},{15,17,4056},{9,31,2244},{7,31,125},{3,28,909},{12,26,4056},{3,28,909},{8,31,2486},{8,31,2486},{8,31,2486},{8,31,1590},{7,31,2156},{7,31,161},{7,31,161}, +{7,25,121},{3,31,1729},{3,27,161},{10,31,164},{10,31,164},{10,31,164},{10,29,65},{14,13,1152},{7,31,125},{7,31,125},{5,26,2},{11,23,1152},{5,26,2},{13,31,882},{12,31,482},{11,31,0},{8,31,4},{13,31,882},{15,27,882},{8,31,4},{0,28,900},{15,27,882},{0,28,900},{8,0,1586},{8,0,1586},{8,0,1586},{8,0,1586},{7,30,37},{7,30,37},{7,30,37},{7,24,37},{1,31,16}, +{1,31,16},{10,31,6091},{9,31,4053},{9,31,2609},{8,31,1761},{9,31,6490},{8,31,2622},{7,31,458},{7,28,835},{6,31,6162},{3,29,598},{12,31,1989},{11,31,931},{11,31,306},{10,31,5},{15,19,3318},{10,31,1806},{8,31,202},{4,29,545},{13,26,3318},{4,29,545},{9,31,2609},{9,31,2609},{9,31,2609},{8,31,1761},{8,31,2086},{7,31,458},{7,31,458},{7,27,58},{4,31,1868},{4,27,157},{11,31,306}, +{11,31,306},{11,31,306},{10,31,5},{14,16,1152},{8,31,202},{8,31,202},{6,27,1},{15,20,1152},{6,27,1},{15,26,545},{13,31,313},{12,31,4},{10,31,4},{15,26,545},{14,29,545},{10,31,4},{0,29,545},{14,29,545},{0,29,545},{8,0,1640},{8,0,1640},{8,0,1640},{8,0,1640},{7,31,58},{7,31,58},{7,31,58},{7,26,13},{2,31,13},{2,31,13},{10,31,5723},{10,31,3980},{9,31,2945}, +{9,31,1745},{10,31,6083},{8,31,2494},{8,31,558},{7,29,558},{7,31,5674},{4,30,411},{12,31,1573},{11,31,963},{11,31,338},{11,31,49},{13,27,2753},{10,31,1438},{9,31,290},{5,29,341},{13,27,2753},{5,29,341},{9,31,2945},{9,31,2945},{9,31,2945},{9,31,1745},{9,31,2390},{8,31,558},{8,31,558},{7,28,147},{5,31,2064},{4,29,161},{11,31,338},{11,31,338},{11,31,338},{11,31,49},{13,22,1152}, +{9,31,290},{9,31,290},{6,28,2},{12,25,1152},{6,28,2},{15,27,313},{13,31,185},{13,31,16},{11,31,0},{15,27,313},{13,31,313},{11,31,0},{0,29,337},{13,31,313},{0,29,337},{9,0,1576},{9,0,1576},{9,0,1576},{9,0,1576},{8,31,197},{8,31,197},{8,31,197},{7,27,122},{3,31,25},{3,31,25},{11,31,5415},{10,31,3996},{10,31,3035},{10,31,2006},{10,31,5619},{9,31,2378},{8,31,814}, +{8,29,414},{7,31,5338},{5,30,251},{12,31,1413},{12,31,813},{12,31,452},{11,31,65},{13,29,2273},{11,31,1218},{10,31,365},{6,30,146},{14,27,2273},{6,30,146},{10,31,3035},{10,31,3035},{10,31,3035},{10,31,2006},{9,31,2518},{8,31,814},{8,31,814},{8,28,121},{6,31,2329},{5,29,137},{12,31,452},{12,31,452},{12,31,452},{11,31,65},{15,18,1152},{10,31,365},{10,31,365},{7,29,5},{10,29,1152}, +{7,29,5},{15,28,145},{14,31,85},{13,31,16},{12,31,4},{15,28,145},{15,29,149},{12,31,4},{0,30,145},{15,29,149},{0,30,145},{9,0,1640},{9,0,1640},{9,0,1640},{9,0,1640},{8,31,85},{8,31,85},{8,31,85},{8,27,37},{4,31,40},{4,31,40},{11,31,5143},{11,31,4004},{11,31,3379},{10,31,2070},{11,31,5287},{10,31,2431},{9,31,1062},{8,30,133},{8,31,5011},{5,31,161},{13,31,1161}, +{13,31,889},{12,31,548},{12,31,164},{15,24,1878},{11,31,1106},{11,31,481},{7,30,66},{15,27,1881},{7,30,66},{11,31,3379},{11,31,3379},{11,31,3379},{10,31,2070},{10,31,2835},{9,31,1062},{9,31,1062},{8,29,62},{7,31,2577},{5,31,161},{12,31,548},{12,31,548},{12,31,548},{12,31,164},{13,27,1152},{11,31,481},{11,31,481},{7,30,2},{13,27,1152},{7,30,2},{15,29,45},{14,31,37},{14,31,1}, +{14,31,9},{15,29,45},{15,30,41},{14,31,9},{0,30,65},{15,30,41},{0,30,65},{10,0,1586},{10,0,1586},{10,0,1586},{10,0,1586},{9,31,221},{9,31,221},{9,31,221},{8,28,8},{5,31,80},{5,31,80},{12,31,4948},{11,31,4157},{11,31,3532},{11,31,2393},{11,31,5008},{10,31,2422},{10,31,1461},{9,31,125},{9,31,4752},{6,31,157},{13,31,1107},{13,31,835},{13,31,666},{12,31,362},{15,26,1536}, +{12,31,1011},{12,31,650},{8,31,16},{14,29,1536},{8,31,16},{11,31,3532},{11,31,3532},{11,31,3532},{11,31,2393},{10,31,3204},{10,31,1461},{10,31,1461},{9,30,114},{8,31,2976},{6,31,157},{13,31,666},{13,31,666},{13,31,666},{12,31,362},{13,30,1152},{12,31,650},{12,31,650},{8,31,16},{12,30,1152},{8,31,16},{15,31,0},{15,31,0},{15,31,0},{15,31,0},{15,31,0},{15,31,0},{15,31,0}, +{0,31,0},{15,31,0},{0,31,0},{10,0,1640},{10,0,1640},{10,0,1640},{10,0,1640},{9,31,221},{9,31,221},{9,31,221},{9,29,25},{6,31,157},{6,31,157},{12,31,4212},{12,31,3612},{12,31,3251},{11,31,2201},{12,31,4212},{11,31,2154},{10,31,1301},{9,31,13},{10,31,3939},{7,31,233},{14,31,776},{13,31,659},{13,31,490},{13,31,218},{15,27,1067},{13,31,699},{12,31,442},{9,31,4},{13,31,1067}, +{9,31,4},{12,31,3251},{12,31,3251},{12,31,3251},{11,31,2201},{11,31,2668},{10,31,1301},{10,31,1301},{9,31,13},{8,31,2528},{7,31,233},{13,31,490},{13,31,490},{13,31,490},{13,31,218},{15,25,802},{12,31,442},{12,31,442},{9,31,4},{15,27,802},{9,31,4},{15,31,0},{15,31,0},{15,31,0},{15,31,0},{15,31,0},{15,31,0},{15,31,0},{0,31,0},{15,31,0},{0,31,0},{11,0,1576}, +{11,0,1576},{11,0,1576},{11,0,1576},{10,31,340},{10,31,340},{10,31,340},{9,31,13},{7,31,233},{7,31,233},{12,31,3732},{12,31,3132},{12,31,2771},{12,31,2171},{12,31,3444},{11,31,1834},{11,31,1209},{10,31,37},{10,31,3219},{8,31,400},{14,31,456},{14,31,392},{14,31,356},{13,31,170},{14,31,684},{13,31,459},{13,31,290},{10,31,1},{14,30,683},{10,31,1},{12,31,2771},{12,31,2771},{12,31,2771}, +{12,31,2171},{11,31,2348},{11,31,1209},{11,31,1209},{10,31,37},{9,31,2156},{8,31,400},{14,31,356},{14,31,356},{14,31,356},{13,31,170},{15,26,512},{13,31,290},{13,31,290},{10,31,1},{14,29,512},{10,31,1},{15,31,0},{15,31,0},{15,31,0},{15,31,0},{15,31,0},{15,31,0},{15,31,0},{0,31,0},{15,31,0},{0,31,0},{11,0,1640},{11,0,1640},{11,0,1640},{11,0,1640},{10,31,436}, +{10,31,436},{10,31,436},{10,31,37},{8,31,400},{8,31,400},{13,31,3172},{13,31,2900},{12,31,2547},{12,31,1947},{12,31,2932},{12,31,1732},{11,31,1145},{10,31,53},{11,31,2695},{8,31,464},{14,31,264},{14,31,200},{14,31,164},{14,31,100},{15,28,387},{14,31,268},{13,31,178},{11,31,1},{15,29,396},{11,31,1},{12,31,2547},{12,31,2547},{12,31,2547},{12,31,1947},{12,31,1971},{11,31,1145},{11,31,1145}, +{10,31,53},{10,31,1794},{8,31,464},{14,31,164},{14,31,164},{14,31,164},{14,31,100},{15,27,290},{13,31,178},{13,31,178},{11,31,1},{14,30,290},{11,31,1},{15,31,0},{15,31,0},{15,31,0},{15,31,0},{15,31,0},{15,31,0},{15,31,0},{0,31,0},{15,31,0},{0,31,0},{12,0,1586},{12,0,1586},{12,0,1586},{12,0,1586},{11,31,520},{11,31,520},{11,31,520},{10,31,53},{8,31,464}, +{8,31,464},{0,23,2665},{0,18,680},{0,13,50},{0,11,785},{0,15,5885},{0,11,4118},{0,10,1800},{0,7,4202},{0,8,6546},{0,7,4643},{0,23,2665},{0,18,680},{0,13,50},{0,11,785},{3,5,5885},{0,11,4118},{0,10,1800},{0,7,4202},{0,9,5885},{0,7,4202},{0,11,0},{0,11,0},{0,11,0},{0,7,4},{0,5,549},{0,5,289},{0,5,289},{0,3,306},{0,3,630},{0,3,387},{0,11,0}, +{0,11,0},{0,11,0},{0,7,4},{1,2,545},{0,5,289},{0,5,289},{0,3,306},{2,1,545},{0,3,306},{6,3,2665},{0,18,680},{0,13,50},{0,11,785},{6,3,2665},{11,0,2665},{0,11,785},{0,8,2689},{11,0,2665},{0,8,2689},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,25,2665},{0,20,521},{0,14,5}, +{0,12,625},{0,17,6669},{0,13,4529},{0,11,1890},{0,8,4610},{0,9,7494},{0,7,5171},{0,25,2665},{0,20,521},{0,14,5},{0,12,625},{3,7,6669},{0,13,4529},{0,11,1890},{0,8,4610},{8,0,6669},{0,8,4610},{0,13,1},{0,13,1},{0,13,1},{0,8,0},{0,7,841},{0,6,445},{0,6,445},{0,4,464},{0,3,982},{0,3,595},{0,13,1},{0,13,1},{0,13,1},{0,8,0},{2,0,841}, +{0,6,445},{0,6,445},{0,4,464},{1,3,841},{0,4,464},{7,2,2665},{0,20,521},{0,14,5},{0,12,625},{7,2,2665},{12,0,2665},{0,12,625},{0,9,2689},{12,0,2665},{0,9,2689},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,28,2665},{0,22,405},{0,15,10},{0,13,514},{0,19,7541},{0,14,4934},{0,12,2042}, +{0,9,5045},{0,10,8546},{0,8,5682},{0,28,2665},{0,22,405},{0,15,10},{0,13,514},{5,2,7538},{0,14,4934},{0,12,2042},{0,9,5045},{8,1,7538},{0,9,5045},{0,16,0},{0,16,0},{0,16,0},{0,10,4},{0,8,1201},{0,7,637},{0,7,637},{0,4,656},{0,4,1385},{0,4,800},{0,16,0},{0,16,0},{0,16,0},{0,10,4},{1,5,1201},{0,7,637},{0,7,637},{0,4,656},{4,0,1201}, +{0,4,656},{6,8,2665},{0,22,405},{0,15,10},{0,13,514},{6,8,2665},{11,3,2665},{0,13,514},{0,10,2689},{11,3,2665},{0,10,2689},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,30,2669},{0,23,313},{0,16,68},{0,15,410},{0,20,8498},{0,16,5330},{0,13,2210},{0,10,5530},{0,11,9702},{0,9,6270},{0,30,2669}, +{0,23,313},{0,16,68},{0,15,410},{4,7,8493},{0,16,5330},{0,13,2210},{0,10,5530},{8,2,8493},{0,10,5530},{0,19,1},{0,19,1},{0,19,1},{0,11,1},{0,9,1629},{0,8,832},{0,8,832},{0,5,881},{0,5,1874},{0,5,1106},{0,19,1},{0,19,1},{0,19,1},{0,11,1},{2,3,1625},{0,8,832},{0,8,832},{0,5,881},{4,1,1625},{0,5,881},{8,2,2665},{0,23,313},{1,16,8}, +{0,15,410},{8,2,2665},{14,1,2665},{0,15,410},{0,11,2689},{14,1,2665},{0,11,2689},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,31,2777},{0,26,232},{0,17,197},{0,16,305},{0,22,9674},{0,17,5849},{0,14,2450},{0,10,6106},{0,12,11199},{0,10,7006},{0,31,2777},{0,26,232},{0,17,197},{0,16,305},{1,19,9669}, +{0,17,5849},{0,14,2450},{0,10,6106},{9,2,9669},{0,10,6106},{0,22,1},{0,22,1},{0,22,1},{0,13,0},{0,11,2178},{0,10,1125},{0,10,1125},{0,6,1189},{0,6,2520},{0,5,1475},{0,22,1},{0,22,1},{0,22,1},{0,13,0},{3,1,2178},{0,10,1125},{0,10,1125},{0,6,1189},{3,3,2178},{0,6,1189},{9,2,2665},{0,26,232},{1,17,17},{0,16,305},{9,2,2665},{13,4,2665},{0,16,305}, +{0,12,2689},{13,4,2665},{0,12,2689},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{1,31,3045},{0,28,217},{0,19,401},{0,17,282},{0,25,9670},{0,19,5529},{0,16,1970},{0,12,5738},{0,13,11589},{0,11,6898},{1,31,2789},{0,28,217},{1,18,146},{0,17,282},{5,8,9669},{0,19,5529},{0,16,1970},{0,12,5738},{4,10,9669}, +{0,12,5738},{0,24,64},{0,24,64},{0,24,64},{0,15,68},{0,13,2180},{0,11,949},{0,11,949},{0,7,1018},{0,7,2691},{0,6,1433},{1,21,64},{1,21,64},{1,21,64},{1,13,68},{4,0,2178},{0,11,949},{0,11,949},{0,7,1018},{1,7,2178},{0,7,1018},{10,1,2665},{0,28,153},{2,18,5},{0,17,218},{10,1,2665},{15,3,2665},{0,17,218},{0,13,2689},{15,3,2665},{0,13,2689},{0,0,64}, +{0,0,64},{0,0,64},{0,0,64},{0,3,1},{0,3,1},{0,3,1},{0,2,4},{0,1,18},{0,1,18},{1,31,3285},{0,29,341},{1,19,453},{0,18,405},{0,27,9674},{0,20,5170},{0,17,1546},{0,13,5429},{0,15,11993},{0,12,6819},{2,31,2966},{1,28,221},{1,19,197},{1,18,305},{7,4,9669},{0,20,5170},{0,17,1546},{0,13,5429},{9,5,9669},{0,13,5429},{0,27,257},{0,27,257},{0,27,257}, +{1,15,256},{0,16,2178},{0,13,832},{0,13,832},{0,8,881},{0,8,2882},{0,7,1427},{1,23,4},{1,23,4},{1,23,4},{1,15,0},{3,6,2178},{0,13,832},{0,13,832},{0,8,881},{3,6,2178},{0,8,881},{11,0,2665},{0,29,85},{2,19,10},{0,18,149},{11,0,2665},{13,7,2665},{0,18,149},{0,14,2689},{13,7,2665},{0,14,2689},{0,0,256},{0,0,256},{0,0,256},{0,0,256},{0,5,1}, +{0,5,1},{0,5,1},{0,3,1},{0,2,72},{0,2,72},{1,31,3909},{1,29,465},{1,21,676},{1,19,538},{0,30,9669},{0,22,4878},{0,18,1190},{0,14,5138},{0,16,12390},{0,13,6789},{2,31,2966},{1,29,209},{2,20,149},{1,19,282},{6,10,9669},{0,22,4878},{0,18,1190},{0,14,5138},{12,3,9669},{0,14,5138},{1,26,320},{1,26,320},{1,26,320},{1,16,324},{0,19,2180},{0,15,680},{0,15,680}, +{0,9,740},{0,9,3149},{0,8,1441},{1,26,64},{1,26,64},{1,26,64},{1,16,68},{5,2,2178},{0,15,680},{0,15,680},{0,9,740},{8,1,2178},{0,9,740},{11,3,2665},{0,31,41},{3,20,8},{0,19,98},{11,3,2665},{15,6,2665},{0,19,98},{0,15,2689},{15,6,2665},{0,15,2689},{1,0,320},{1,0,320},{1,0,320},{1,0,320},{0,8,0},{0,8,0},{0,8,0},{0,5,1},{0,4,160}, +{0,4,160},{2,31,4514},{1,31,630},{1,22,1110},{1,20,694},{0,31,9789},{0,23,4646},{0,20,849},{0,15,4826},{0,18,12955},{0,14,6798},{3,31,3101},{2,30,232},{2,21,197},{2,20,305},{3,23,9669},{0,23,4646},{0,20,849},{0,15,4826},{11,6,9669},{0,15,4826},{1,29,545},{1,29,545},{1,29,545},{1,18,546},{0,22,2180},{0,17,505},{0,17,505},{0,11,610},{0,11,3467},{0,10,1513},{2,26,1}, +{2,26,1},{2,26,1},{2,17,0},{5,5,2178},{0,17,505},{0,17,505},{0,11,610},{5,7,2178},{0,11,610},{11,6,2665},{1,31,85},{3,21,17},{0,20,65},{11,6,2665},{15,8,2665},{0,20,65},{0,16,2689},{15,8,2665},{0,16,2689},{1,0,545},{1,0,545},{1,0,545},{1,0,545},{0,11,0},{0,11,0},{0,11,0},{0,7,4},{0,5,289},{0,5,289},{2,31,5330},{1,31,1110},{2,23,1490}, +{1,21,979},{1,31,9981},{0,26,4406},{0,21,579},{0,16,4610},{0,19,13489},{0,15,6846},{3,31,3341},{2,31,226},{3,22,146},{2,21,282},{9,4,9669},{0,26,4406},{0,21,579},{0,16,4610},{9,10,9669},{0,16,4610},{1,31,885},{1,31,885},{1,31,885},{1,20,885},{0,24,2178},{0,19,389},{0,19,389},{0,12,464},{0,12,3885},{0,11,1603},{3,25,64},{3,25,64},{3,25,64},{3,17,68},{7,1,2178}, +{0,19,389},{0,19,389},{0,12,464},{10,2,2178},{0,12,464},{13,2,2665},{2,31,162},{4,22,5},{0,22,37},{13,2,2665},{12,13,2665},{0,22,37},{0,17,2689},{12,13,2665},{0,17,2689},{1,0,881},{1,0,881},{1,0,881},{1,0,881},{0,13,1},{0,13,1},{0,13,1},{0,8,0},{0,6,445},{0,6,445},{3,31,6366},{2,31,1635},{2,24,1886},{1,22,1410},{1,31,10381},{0,28,4146},{0,22,377}, +{0,17,4373},{0,20,14006},{0,16,6915},{4,31,3434},{3,31,242},{3,23,197},{3,22,305},{10,3,9669},{0,28,4146},{0,22,377},{0,17,4373},{11,9,9669},{0,17,4373},{2,31,1346},{2,31,1346},{2,31,1346},{2,20,1345},{0,27,2180},{0,21,274},{0,21,274},{0,13,353},{0,14,4269},{0,11,1763},{3,27,4},{3,27,4},{3,27,4},{3,19,0},{5,10,2178},{0,21,274},{0,21,274},{0,13,353},{12,1,2178}, +{0,13,353},{14,1,2665},{3,31,242},{4,23,10},{0,23,10},{14,1,2665},{15,11,2665},{0,23,10},{0,18,2689},{15,11,2665},{0,18,2689},{1,0,1345},{1,0,1345},{1,0,1345},{1,0,1345},{0,16,0},{0,16,0},{0,16,0},{0,10,4},{0,7,637},{0,7,637},{3,31,7374},{2,31,2339},{2,25,2441},{2,23,1763},{2,31,11019},{0,29,3909},{0,23,243},{0,18,4154},{0,22,14614},{0,17,7029},{5,31,3654}, +{4,31,394},{4,24,149},{3,23,282},{9,9,9669},{0,29,3909},{0,23,243},{0,18,4154},{14,7,9669},{0,18,4154},{2,31,1714},{2,31,1714},{2,31,1714},{2,22,1669},{0,29,2180},{0,23,194},{0,23,194},{0,14,260},{0,15,4686},{0,13,1937},{3,30,64},{3,30,64},{3,30,64},{3,20,68},{8,1,2178},{0,23,194},{0,23,194},{0,14,260},{10,5,2178},{0,14,260},{15,0,2665},{4,31,313},{5,24,8}, +{0,24,4},{15,0,2665},{13,15,2665},{0,24,4},{0,19,2689},{13,15,2665},{0,19,2689},{2,0,1665},{2,0,1665},{2,0,1665},{2,0,1665},{0,19,1},{0,19,1},{0,19,1},{0,11,1},{0,8,832},{0,8,832},{3,31,8967},{3,31,3510},{3,26,3255},{2,24,2243},{2,31,11766},{0,31,3686},{0,25,138},{0,19,3938},{0,23,15369},{0,18,7206},{5,31,3933},{4,31,457},{4,25,197},{4,24,305},{12,2,9669}, +{0,31,3686},{0,25,138},{0,19,3938},{13,10,9669},{0,19,3938},{2,31,2434},{2,31,2434},{2,31,2434},{2,23,2182},{0,31,2210},{0,25,137},{0,25,137},{0,15,181},{0,16,5157},{0,14,2163},{4,30,1},{4,30,1},{4,30,1},{4,21,0},{8,4,2178},{0,25,137},{0,25,137},{0,15,181},{14,2,2178},{0,15,181},{15,3,2665},{5,31,421},{5,25,17},{1,25,5},{15,3,2665},{12,18,2665},{1,25,5}, +{0,20,2689},{12,18,2665},{0,20,2689},{2,0,2178},{2,0,2178},{2,0,2178},{2,0,2178},{0,22,1},{0,22,1},{0,22,1},{0,13,0},{0,10,1125},{0,10,1125},{4,31,10234},{3,31,4421},{3,27,3739},{2,26,2742},{2,31,12773},{0,31,3719},{0,26,87},{0,20,3771},{0,25,16061},{0,19,7283},{6,31,4050},{5,31,629},{5,26,146},{4,25,282},{11,8,9669},{0,31,3718},{0,26,86},{0,20,3770},{11,14,9669}, +{0,20,3770},{3,31,3125},{3,31,3125},{3,31,3125},{2,25,2706},{1,31,2411},{0,26,86},{0,26,86},{0,16,129},{0,18,5544},{0,15,2318},{5,29,64},{5,29,64},{5,29,64},{5,21,68},{3,25,2178},{0,26,85},{0,26,85},{0,16,128},{12,6,2178},{0,16,128},{15,6,2665},{5,31,565},{6,26,5},{1,26,2},{15,6,2665},{14,17,2665},{1,26,2},{0,21,2689},{14,17,2665},{0,21,2689},{2,0,2705}, +{2,0,2705},{2,0,2705},{2,0,2705},{0,24,1},{0,24,1},{0,24,1},{0,15,5},{0,11,1348},{0,11,1348},{4,31,10874},{4,31,5018},{3,28,3750},{3,26,2754},{3,31,13045},{1,31,4003},{0,27,183},{0,21,3686},{0,27,15601},{0,20,6570},{7,31,4366},{5,31,965},{5,27,197},{5,26,305},{12,7,9669},{1,31,3954},{0,27,102},{0,21,3605},{13,13,9669},{0,21,3605},{3,31,3173},{3,31,3173},{3,31,3173}, +{3,25,2690},{1,31,2427},{0,28,113},{0,28,113},{0,17,170},{0,20,5170},{0,16,1856},{5,31,4},{5,31,4},{5,31,4},{5,23,0},{9,6,2178},{0,28,32},{0,28,32},{0,17,89},{14,5,2178},{0,17,89},{15,8,2665},{6,31,706},{6,27,10},{2,27,10},{15,8,2665},{12,21,2665},{2,27,10},{0,22,2689},{12,21,2665},{0,22,2689},{3,0,2689},{3,0,2689},{3,0,2689},{3,0,2689},{1,23,53}, +{1,23,53},{1,23,53},{1,15,49},{0,13,1217},{0,13,1217},{5,31,11278},{4,31,5402},{4,29,3753},{3,28,2745},{4,31,13566},{1,31,4403},{1,28,77},{0,22,3747},{0,28,15046},{0,21,5958},{7,31,4590},{6,31,1171},{6,28,149},{5,27,282},{14,3,9669},{2,31,4265},{1,28,76},{0,22,3458},{11,17,9669},{0,22,3458},{4,31,3377},{4,31,3377},{4,31,3377},{3,27,2706},{2,31,2532},{1,28,73},{1,28,73}, +{1,18,129},{0,21,4837},{0,17,1490},{6,31,82},{6,31,82},{6,31,82},{5,24,68},{10,5,2178},{0,30,8},{0,30,8},{0,19,49},{12,9,2178},{0,19,49},{15,11,2665},{7,31,850},{7,28,8},{2,28,4},{15,11,2665},{15,19,2665},{2,28,4},{0,23,2689},{15,19,2665},{0,23,2689},{3,0,2705},{3,0,2705},{3,0,2705},{3,0,2705},{1,26,1},{1,26,1},{1,26,1},{1,16,5},{0,14,1037}, +{0,14,1037},{6,31,11954},{5,31,6090},{4,30,3794},{4,28,2754},{5,31,14170},{2,31,4863},{2,29,187},{1,24,3689},{0,30,14558},{0,23,5274},{8,31,5030},{7,31,1556},{6,29,197},{6,28,305},{14,6,9669},{3,31,4594},{1,29,101},{0,24,3265},{15,14,9669},{0,24,3265},{4,31,3530},{4,31,3530},{4,31,3530},{4,27,2693},{2,31,2739},{1,30,134},{1,30,134},{1,19,197},{0,23,4506},{0,19,1109},{6,31,64}, +{6,31,64},{6,31,64},{6,25,0},{10,8,2178},{1,30,34},{1,30,34},{0,20,16},{11,12,2178},{0,20,16},{15,14,2665},{8,31,1053},{7,29,17},{3,29,5},{15,14,2665},{14,22,2665},{3,29,5},{0,24,2689},{14,22,2665},{0,24,2689},{4,0,2689},{4,0,2689},{4,0,2689},{4,0,2689},{2,26,50},{2,26,50},{2,26,50},{2,17,49},{0,16,818},{0,16,818},{6,31,12466},{5,31,6794},{5,31,3739}, +{4,30,2742},{5,31,14554},{3,31,5363},{2,30,87},{1,24,3737},{0,31,14190},{0,24,4785},{8,31,5158},{7,31,2036},{7,30,146},{6,29,282},{13,12,9669},{4,31,4806},{2,30,86},{0,25,3130},{13,18,9669},{0,25,3130},{5,31,3658},{5,31,3658},{5,31,3658},{4,29,2706},{3,31,2795},{2,30,86},{2,30,86},{2,20,129},{0,25,4315},{0,20,809},{7,31,100},{7,31,100},{7,31,100},{7,25,68},{9,14,2178}, +{1,31,68},{1,31,68},{0,21,1},{14,10,2178},{0,21,1},{13,23,2665},{9,31,1241},{8,30,50},{3,30,2},{13,23,2665},{11,27,2665},{3,30,2},{0,25,2689},{11,27,2665},{0,25,2689},{4,0,2705},{4,0,2705},{4,0,2705},{4,0,2705},{2,28,1},{2,28,1},{2,28,1},{2,19,5},{0,18,666},{0,18,666},{7,31,13094},{6,31,7445},{5,31,3915},{5,30,2754},{6,31,14998},{4,31,5926},{2,31,183}, +{2,25,3686},{0,31,14254},{0,25,4323},{9,31,5546},{8,31,2478},{7,31,197},{7,30,305},{14,11,9669},{5,31,5138},{2,31,102},{0,26,3013},{15,17,9669},{0,26,3013},{5,31,3914},{5,31,3914},{5,31,3914},{5,29,2690},{4,31,3042},{2,31,182},{2,31,182},{2,21,170},{0,27,4059},{0,21,597},{7,31,196},{7,31,196},{7,31,196},{7,27,0},{11,10,2178},{2,31,101},{2,31,101},{0,22,4},{5,23,2178}, +{0,22,4},{15,19,2665},{10,31,1384},{8,31,5},{4,31,10},{15,19,2665},{14,25,2665},{4,31,10},{0,26,2689},{14,25,2665},{0,26,2689},{5,0,2689},{5,0,2689},{5,0,2689},{5,0,2689},{3,27,53},{3,27,53},{3,27,53},{3,19,49},{0,20,505},{0,20,505},{7,31,12517},{6,31,7482},{6,31,4001},{5,31,2706},{6,31,14185},{4,31,5491},{3,31,154},{2,26,3124},{0,31,13437},{0,26,3306},{9,31,4949}, +{8,31,2261},{8,31,325},{7,30,192},{14,13,8712},{6,31,4686},{3,31,153},{0,27,2403},{11,23,8712},{0,27,2403},{6,31,4001},{6,31,4001},{6,31,4001},{5,31,2706},{4,31,3234},{3,31,154},{3,31,154},{3,22,129},{0,28,3762},{0,23,425},{8,31,325},{8,31,325},{8,31,325},{7,28,68},{12,9,2178},{3,31,153},{3,31,153},{1,23,1},{14,13,2178},{1,23,1},{13,27,2178},{10,31,1157},{9,31,16}, +{5,31,1},{13,27,2178},{13,27,2178},{5,31,1},{0,27,2178},{13,27,2178},{0,27,2178},{5,0,2705},{5,0,2705},{5,0,2705},{5,0,2705},{3,30,1},{3,30,1},{3,30,1},{3,20,5},{0,22,389},{0,22,389},{8,31,12034},{7,31,7195},{6,31,4370},{6,31,2693},{7,31,13066},{5,31,5014},{4,31,261},{3,27,2390},{1,31,12394},{0,27,2277},{10,31,4410},{9,31,2045},{8,31,289},{8,30,192},{14,15,7578}, +{7,31,4050},{4,31,212},{0,27,1701},{12,23,7578},{0,27,1701},{6,31,4370},{6,31,4370},{6,31,4370},{6,31,2693},{5,31,3429},{4,31,261},{4,31,261},{3,23,197},{0,30,3509},{0,24,306},{8,31,289},{8,31,289},{8,31,289},{8,28,68},{15,2,2178},{4,31,212},{4,31,212},{1,24,9},{13,16,2178},{1,24,9},{15,22,1625},{11,31,850},{9,31,25},{6,31,4},{15,22,1625},{13,28,1625},{6,31,4}, +{0,27,1665},{13,28,1625},{0,27,1665},{6,0,2689},{6,0,2689},{6,0,2689},{6,0,2689},{4,30,50},{4,30,50},{4,30,50},{4,21,49},{0,24,306},{0,24,306},{8,31,11042},{7,31,7259},{7,31,4450},{6,31,2805},{7,31,12298},{5,31,4742},{4,31,501},{4,27,1875},{2,31,11643},{0,28,1578},{10,31,3802},{9,31,1869},{9,31,425},{8,31,25},{13,20,6661},{7,31,3554},{5,31,292},{0,28,1217},{13,23,6662}, +{0,28,1217},{7,31,4450},{7,31,4450},{7,31,4450},{6,31,2805},{6,31,3714},{4,31,501},{4,31,501},{4,24,129},{0,31,3354},{0,25,244},{9,31,425},{9,31,425},{9,31,425},{8,30,0},{11,18,2178},{5,31,292},{5,31,292},{2,25,1},{10,21,2178},{2,25,1},{15,23,1201},{11,31,674},{10,31,9},{7,31,16},{15,23,1201},{12,30,1201},{7,31,16},{0,28,1201},{12,30,1201},{0,28,1201},{6,0,2705}, +{6,0,2705},{6,0,2705},{6,0,2705},{4,31,17},{4,31,17},{4,31,17},{4,23,5},{0,26,218},{0,26,218},{8,31,10434},{8,31,7186},{7,31,4898},{7,31,2833},{8,31,11595},{6,31,4462},{5,31,629},{4,28,1387},{3,31,10895},{0,28,1002},{11,31,3446},{10,31,1707},{9,31,505},{8,31,73},{13,22,5829},{8,31,3170},{6,31,405},{1,28,869},{12,25,5829},{1,28,869},{7,31,4898},{7,31,4898},{7,31,4898}, +{7,31,2833},{6,31,3906},{5,31,629},{5,31,629},{4,25,170},{0,31,3546},{0,27,228},{9,31,505},{9,31,505},{9,31,505},{9,30,68},{13,14,2178},{6,31,405},{6,31,405},{2,26,4},{8,25,2178},{2,26,4},{13,31,841},{12,31,461},{11,31,1},{8,31,9},{13,31,841},{15,27,841},{8,31,9},{0,28,865},{15,27,841},{0,28,865},{7,0,2689},{7,0,2689},{7,0,2689},{7,0,2689},{5,31,53}, +{5,31,53},{5,31,53},{5,23,49},{0,28,137},{0,28,137},{9,31,10014},{8,31,6962},{8,31,5026},{7,31,3105},{8,31,10683},{7,31,4354},{6,31,933},{5,28,1019},{4,31,10078},{0,29,630},{11,31,2934},{10,31,1611},{10,31,650},{9,31,25},{15,17,5082},{8,31,2786},{7,31,521},{1,29,546},{12,26,5082},{1,29,546},{8,31,5026},{8,31,5026},{8,31,5026},{7,31,3105},{7,31,4170},{6,31,933},{6,31,933}, +{5,26,129},{1,31,3814},{0,28,234},{10,31,650},{10,31,650},{10,31,650},{9,31,25},{14,13,2178},{7,31,521},{7,31,521},{3,27,1},{11,23,2178},{3,27,1},{15,26,545},{13,31,313},{12,31,4},{10,31,4},{15,26,545},{14,29,545},{10,31,4},{0,29,545},{14,29,545},{0,29,545},{7,0,2705},{7,0,2705},{7,0,2705},{7,0,2705},{5,31,101},{5,31,101},{5,31,101},{5,24,5},{0,29,85}, +{0,29,85},{9,31,9465},{9,31,7065},{8,31,5233},{8,31,3329},{8,31,10116},{7,31,4183},{6,31,1338},{5,29,645},{5,31,9447},{0,30,441},{11,31,2664},{11,31,1525},{10,31,848},{10,31,113},{15,19,4344},{9,31,2424},{8,31,724},{2,30,321},{13,26,4344},{2,30,321},{8,31,5233},{8,31,5233},{8,31,5233},{8,31,3329},{7,31,4629},{6,31,1338},{6,31,1338},{5,27,197},{2,31,4212},{1,29,213},{10,31,848}, +{10,31,848},{10,31,848},{10,31,113},{14,16,2178},{8,31,724},{8,31,724},{3,28,9},{15,20,2178},{3,28,9},{15,27,290},{13,31,178},{13,31,9},{11,31,1},{15,27,290},{14,30,290},{11,31,1},{0,29,320},{14,30,290},{0,29,320},{8,0,2929},{8,0,2929},{8,0,2929},{8,0,2929},{6,31,113},{6,31,113},{6,31,113},{6,25,49},{0,31,45},{0,31,45},{10,31,9329},{9,31,6985},{9,31,5541}, +{8,31,3473},{9,31,9496},{8,31,4420},{7,31,1630},{6,29,426},{5,31,9031},{1,30,301},{12,31,2275},{11,31,1557},{11,31,932},{10,31,225},{13,27,3779},{10,31,2086},{8,31,884},{3,30,129},{13,27,3779},{3,30,129},{9,31,5541},{9,31,5541},{9,31,5541},{8,31,3473},{8,31,4836},{7,31,1630},{7,31,1630},{6,28,129},{4,31,4442},{1,30,237},{11,31,932},{11,31,932},{11,31,932},{10,31,225},{13,22,2178}, +{8,31,884},{8,31,884},{4,29,1},{12,25,2178},{4,29,1},{15,28,130},{14,31,72},{13,31,25},{12,31,9},{15,28,130},{15,29,136},{12,31,9},{0,30,128},{15,29,136},{0,30,128},{8,0,2689},{8,0,2689},{8,0,2689},{8,0,2689},{6,31,257},{6,31,257},{6,31,257},{6,27,5},{1,31,89},{1,31,89},{10,31,8929},{10,31,7186},{9,31,5845},{9,31,3829},{9,31,9208},{8,31,4260},{7,31,2270}, +{6,30,245},{6,31,8708},{2,31,228},{12,31,2115},{12,31,1515},{12,31,1154},{11,31,353},{13,29,3299},{11,31,1938},{10,31,1013},{4,30,68},{14,27,3299},{4,30,68},{9,31,5845},{9,31,5845},{9,31,5845},{9,31,3829},{8,31,5124},{7,31,2270},{7,31,2270},{6,29,170},{4,31,4762},{2,31,228},{12,31,1154},{12,31,1154},{12,31,1154},{11,31,353},{15,18,2178},{10,31,1013},{10,31,1013},{4,30,4},{10,29,2178}, +{4,30,4},{15,30,34},{14,31,40},{14,31,4},{14,31,4},{15,30,34},{15,30,34},{14,31,4},{0,30,64},{15,30,34},{0,30,64},{8,0,2705},{8,0,2705},{8,0,2705},{8,0,2705},{7,31,245},{7,31,245},{7,31,245},{7,27,49},{2,31,164},{2,31,164},{11,31,8857},{10,31,7170},{10,31,6209},{9,31,4133},{10,31,8853},{8,31,4484},{8,31,2548},{7,31,170},{7,31,8388},{3,31,244},{13,31,1971}, +{12,31,1611},{12,31,1250},{11,31,625},{15,24,2904},{11,31,1826},{10,31,1157},{5,31,1},{15,27,2907},{5,31,1},{10,31,6209},{10,31,6209},{10,31,6209},{9,31,4133},{9,31,5460},{8,31,2548},{8,31,2548},{7,30,129},{5,31,5126},{3,31,244},{12,31,1250},{12,31,1250},{12,31,1250},{11,31,625},{13,27,2178},{10,31,1157},{10,31,1157},{5,31,1},{13,27,2178},{5,31,1},{15,31,0},{15,31,0},{15,31,0}, +{15,31,0},{15,31,0},{15,31,0},{15,31,0},{0,31,0},{15,31,0},{0,31,0},{9,0,2689},{9,0,2689},{9,0,2689},{9,0,2689},{7,31,485},{7,31,485},{7,31,485},{7,28,5},{3,31,244},{3,31,244},{11,31,7705},{11,31,6566},{10,31,5633},{10,31,3890},{10,31,7737},{9,31,3874},{8,31,2386},{7,31,116},{7,31,7398},{4,31,317},{13,31,1458},{13,31,1186},{13,31,1017},{12,31,425},{15,25,2166}, +{12,31,1398},{11,31,850},{6,31,4},{12,31,2166},{6,31,4},{10,31,5633},{10,31,5633},{10,31,5633},{10,31,3890},{9,31,4830},{8,31,2386},{8,31,2386},{7,31,116},{6,31,4509},{4,31,317},{13,31,1017},{13,31,1017},{13,31,1017},{12,31,425},{15,22,1625},{11,31,850},{11,31,850},{6,31,4},{13,28,1625},{6,31,4},{15,31,0},{15,31,0},{15,31,0},{15,31,0},{15,31,0},{15,31,0},{15,31,0}, +{0,31,0},{15,31,0},{0,31,0},{9,0,2725},{9,0,2725},{9,0,2725},{9,0,2725},{8,31,450},{8,31,450},{8,31,450},{7,30,101},{4,31,317},{4,31,317},{11,31,6953},{11,31,5814},{11,31,5189},{10,31,3650},{11,31,6713},{10,31,3531},{9,31,2142},{8,31,74},{8,31,6397},{5,31,425},{13,31,1138},{13,31,866},{13,31,697},{12,31,361},{15,26,1601},{12,31,1046},{11,31,674},{7,31,16},{14,29,1601}, +{7,31,16},{11,31,5189},{11,31,5189},{11,31,5189},{10,31,3650},{10,31,4313},{9,31,2142},{9,31,2142},{8,31,74},{7,31,3981},{5,31,425},{13,31,697},{13,31,697},{13,31,697},{12,31,361},{15,23,1201},{11,31,674},{11,31,674},{7,31,16},{12,30,1201},{7,31,16},{15,31,0},{15,31,0},{15,31,0},{15,31,0},{15,31,0},{15,31,0},{15,31,0},{0,31,0},{15,31,0},{0,31,0},{10,0,2689}, +{10,0,2689},{10,0,2689},{10,0,2689},{8,31,578},{8,31,578},{8,31,578},{8,30,49},{5,31,425},{5,31,425},{12,31,6211},{11,31,5318},{11,31,4693},{11,31,3554},{11,31,5833},{10,31,3067},{10,31,2106},{8,31,10},{9,31,5601},{6,31,580},{14,31,825},{13,31,674},{13,31,505},{13,31,233},{15,27,1122},{13,31,738},{12,31,461},{8,31,9},{13,31,1122},{8,31,9},{11,31,4693},{11,31,4693},{11,31,4693}, +{11,31,3554},{10,31,3849},{10,31,2106},{10,31,2106},{8,31,10},{7,31,3629},{6,31,580},{13,31,505},{13,31,505},{13,31,505},{13,31,233},{13,31,841},{12,31,461},{12,31,461},{8,31,9},{15,27,841},{8,31,9},{15,31,0},{15,31,0},{15,31,0},{15,31,0},{15,31,0},{15,31,0},{15,31,0},{0,31,0},{15,31,0},{0,31,0},{10,0,2705},{10,0,2705},{10,0,2705},{10,0,2705},{9,31,666}, +{9,31,666},{9,31,666},{8,31,10},{6,31,580},{6,31,580},{12,31,5427},{12,31,4827},{11,31,4453},{11,31,3314},{12,31,5175},{10,31,2859},{10,31,1898},{9,31,74},{10,31,4842},{7,31,724},{14,31,489},{14,31,425},{14,31,389},{13,31,169},{14,31,729},{13,31,482},{13,31,313},{10,31,4},{14,30,726},{10,31,4},{11,31,4453},{11,31,4453},{11,31,4453},{11,31,3314},{11,31,3445},{10,31,1898},{10,31,1898}, +{9,31,74},{8,31,3213},{7,31,724},{14,31,389},{14,31,389},{14,31,389},{13,31,169},{15,26,545},{13,31,313},{13,31,313},{10,31,4},{14,29,545},{10,31,4},{15,31,0},{15,31,0},{15,31,0},{15,31,0},{15,31,0},{15,31,0},{15,31,0},{0,31,0},{15,31,0},{0,31,0},{11,0,2689},{11,0,2689},{11,0,2689},{11,0,2689},{9,31,890},{9,31,890},{9,31,890},{9,31,74},{7,31,724}, +{7,31,724},{2,31,33740},{0,31,5184},{0,22,420},{0,21,4221},{1,31,46089},{0,29,24105},{0,21,8317},{0,18,24790},{0,21,63990},{0,16,38959},{1,31,9704},{0,30,2866},{0,21,389},{0,19,3229},{7,2,18065},{0,20,13257},{0,17,6153},{0,12,13481},{12,0,18065},{0,12,13481},{0,15,1},{0,15,1},{0,15,1},{0,9,1},{0,8,1105},{0,7,585},{0,7,585},{0,4,596},{0,4,1273},{0,4,740},{0,15,1}, +{0,15,1},{0,15,1},{0,9,1},{2,1,1105},{0,7,585},{0,7,585},{0,4,596},{4,0,1105},{0,4,596},{9,6,9248},{0,30,2866},{0,21,389},{0,19,3229},{9,6,9248},{14,5,9248},{0,19,3229},{0,14,9248},{14,5,9248},{0,14,9248},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{2,31,38380},{0,31,6720},{0,23,245}, +{0,22,3864},{2,31,50747},{0,31,24961},{0,22,8353},{0,19,25735},{0,22,65535},{0,17,41319},{1,31,10152},{0,31,2624},{0,23,229},{0,20,2980},{5,10,19334},{0,20,13769},{0,18,6243},{0,13,14116},{12,1,19334},{0,13,14116},{0,18,0},{0,18,0},{0,18,0},{0,11,1},{0,9,1513},{0,8,772},{0,8,772},{0,5,821},{0,5,1750},{0,4,1028},{0,18,0},{0,18,0},{0,18,0},{0,11,1},{1,6,1513}, +{0,8,772},{0,8,772},{0,5,821},{3,2,1513},{0,5,821},{10,5,9248},{0,31,2624},{0,23,229},{0,20,2980},{10,5,9248},{12,9,9248},{0,20,2980},{0,15,9248},{12,9,9248},{0,15,9248},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{2,31,43788},{0,31,9024},{0,24,126},{0,23,3525},{2,31,56155},{0,31,26241},{0,23,8425}, +{0,20,26793},{0,23,65535},{0,18,43819},{2,31,10787},{0,31,2624},{0,24,122},{0,21,2701},{8,0,20689},{0,22,14385},{0,19,6369},{0,13,14756},{12,2,20689},{0,13,14756},{0,21,1},{0,21,1},{0,21,1},{0,12,4},{0,10,1989},{0,9,1018},{0,9,1018},{0,6,1096},{0,5,2294},{0,5,1334},{0,21,1},{0,21,1},{0,21,1},{0,12,4},{1,7,1985},{0,9,1018},{0,9,1018},{0,6,1096},{1,5,1985}, +{0,6,1096},{12,1,9248},{0,31,2624},{0,24,122},{0,21,2701},{12,1,9248},{15,7,9248},{0,21,2701},{0,16,9250},{15,7,9248},{0,16,9250},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{2,31,49964},{1,31,11512},{0,25,41},{0,24,3109},{2,31,62331},{0,31,28289},{0,24,8585},{0,21,27848},{0,23,65535},{0,19,46459},{2,31,11395}, +{0,31,2880},{0,25,37},{0,22,2440},{8,2,22129},{0,23,15030},{0,20,6509},{0,14,15441},{13,2,22129},{0,14,15441},{0,23,1},{0,23,1},{0,23,1},{0,14,0},{0,12,2525},{0,10,1300},{0,10,1300},{0,6,1384},{0,6,2905},{0,6,1708},{0,23,1},{0,23,1},{0,23,1},{0,14,0},{3,2,2521},{0,10,1300},{0,10,1300},{0,6,1384},{5,1,2521},{0,6,1384},{11,7,9248},{0,31,2880},{0,25,37}, +{0,22,2440},{11,7,9248},{13,11,9248},{0,22,2440},{0,17,9250},{13,11,9248},{0,17,9250},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{3,31,57022},{1,31,15166},{0,26,20},{0,25,2804},{2,31,65535},{0,31,31511},{0,25,8733},{0,22,29095},{0,26,65535},{0,20,49444},{2,31,12385},{0,31,3474},{0,26,4},{0,23,2173},{8,4,23851}, +{0,23,15948},{0,21,6729},{0,15,16274},{14,2,23851},{0,15,16274},{0,26,0},{0,26,0},{0,26,0},{0,16,4},{0,13,3200},{0,11,1665},{0,11,1665},{0,7,1754},{0,7,3691},{0,6,2185},{0,26,0},{0,26,0},{0,26,0},{0,16,4},{1,10,3200},{0,11,1665},{0,11,1665},{0,7,1754},{5,2,3200},{0,7,1754},{11,10,9248},{1,31,3226},{0,26,4},{0,23,2173},{11,10,9248},{5,23,9248},{0,23,2173}, +{0,18,9248},{5,23,9248},{0,18,9248},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{3,31,63870},{1,31,19230},{0,27,45},{0,27,2520},{3,31,65535},{0,31,35191},{0,26,8925},{0,23,30250},{0,28,65535},{0,21,52374},{3,31,13449},{1,31,4026},{0,27,29},{0,24,1901},{3,24,25472},{0,26,16706},{0,22,6963},{0,16,17124},{14,3,25472}, +{0,16,17124},{0,29,1},{0,29,1},{0,29,1},{0,17,1},{0,14,3874},{0,13,2084},{0,13,2084},{0,8,2165},{0,8,4466},{0,7,2627},{0,29,1},{0,29,1},{0,29,1},{0,17,1},{4,1,3872},{0,13,2084},{0,13,2084},{0,8,2165},{3,5,3872},{0,8,2165},{12,9,9248},{2,31,3593},{0,27,29},{0,24,1901},{12,9,9248},{14,13,9248},{0,24,1901},{0,19,9248},{14,13,9248},{0,19,9248},{0,0,0}, +{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{3,31,65535},{1,31,24002},{0,28,109},{0,27,2268},{3,31,65535},{1,31,39095},{0,27,8825},{0,24,30825},{0,28,65535},{0,22,54996},{3,31,14345},{1,31,4766},{0,29,102},{0,26,1697},{3,26,26744},{0,28,17104},{0,23,6957},{0,17,17625},{15,3,26744},{0,17,17625},{0,31,5},{0,31,5},{0,31,5}, +{0,19,5},{0,16,4418},{0,14,2306},{0,14,2306},{0,9,2420},{0,8,5122},{0,8,2997},{0,31,5},{0,31,5},{0,31,5},{0,19,5},{3,6,4418},{0,14,2306},{0,14,2306},{0,9,2420},{3,6,4418},{0,9,2420},{14,5,9248},{4,31,3904},{1,28,1},{0,26,1693},{14,5,9248},{12,17,9248},{0,26,1693},{0,20,9250},{12,17,9248},{0,20,9250},{0,0,4},{0,0,4},{0,0,4},{0,0,4},{0,1,1}, +{0,1,1},{0,1,1},{0,0,4},{0,0,4},{0,0,4},{3,31,65535},{1,31,29442},{0,29,330},{0,28,2105},{3,31,65535},{1,31,42151},{0,28,7781},{0,25,30108},{0,29,65535},{0,22,56388},{4,31,14976},{2,31,5434},{1,29,62},{0,27,1580},{11,0,26744},{0,29,16547},{0,24,6221},{0,18,17124},{13,7,26744},{0,18,17124},{0,31,181},{0,31,181},{0,31,181},{0,20,101},{0,19,4420},{0,16,2005},{0,16,2005}, +{0,10,2165},{0,9,5389},{0,9,2925},{1,31,37},{1,31,37},{1,31,37},{1,19,37},{5,2,4418},{0,16,2005},{0,16,2005},{0,10,2165},{8,1,4418},{0,10,2165},{13,11,9248},{4,31,4160},{1,29,26},{0,27,1480},{13,11,9248},{15,15,9248},{0,27,1480},{0,21,9250},{15,15,9248},{0,21,9250},{0,0,100},{0,0,100},{0,0,100},{0,0,100},{0,3,1},{0,3,1},{0,3,1},{0,2,0},{0,1,34}, +{0,1,34},{4,31,65535},{2,31,36070},{0,30,822},{0,30,2062},{3,31,65535},{1,31,46660},{0,29,6696},{0,26,29322},{0,31,65535},{0,23,58077},{4,31,15507},{3,31,6253},{1,31,109},{0,28,1646},{11,3,26744},{0,31,15992},{0,26,5346},{0,19,16582},{11,11,26744},{0,19,16582},{1,31,329},{1,31,329},{1,31,329},{1,21,266},{0,22,4420},{0,18,1737},{0,18,1737},{0,11,1898},{0,11,5707},{0,10,2885},{1,31,73}, +{1,31,73},{1,31,73},{1,21,10},{5,5,4418},{0,18,1737},{0,18,1737},{0,11,1898},{5,7,4418},{0,11,1898},{13,14,9248},{5,31,4570},{2,30,4},{0,28,1285},{13,14,9248},{8,25,9248},{0,28,1285},{0,22,9248},{8,25,9248},{0,22,9248},{1,0,265},{1,0,265},{1,0,265},{1,0,265},{0,6,1},{0,6,1},{0,6,1},{0,4,1},{0,3,97},{0,3,97},{4,31,65535},{2,31,40786},{0,31,1405}, +{0,30,2138},{4,31,65535},{1,31,49800},{0,30,5634},{0,27,27967},{0,31,65535},{0,24,58770},{5,31,15531},{3,31,6593},{2,31,61},{1,29,1533},{12,2,26259},{0,31,15284},{0,27,4514},{0,20,15812},{13,10,26259},{0,20,15812},{1,31,633},{1,31,633},{1,31,633},{1,22,381},{0,24,4418},{0,20,1480},{0,20,1480},{0,12,1640},{0,12,6125},{0,11,2891},{2,31,61},{2,31,61},{2,31,61},{2,21,37},{7,1,4418}, +{0,20,1480},{0,20,1480},{0,12,1640},{10,2,4418},{0,12,1640},{13,16,8978},{6,31,4777},{2,31,25},{0,29,1040},{13,16,8978},{15,18,8978},{0,29,1040},{0,23,8980},{15,18,8978},{0,23,8980},{1,0,377},{1,0,377},{1,0,377},{1,0,377},{0,9,0},{0,9,0},{0,9,0},{0,5,4},{0,4,193},{0,4,193},{4,31,65535},{2,31,40898},{1,31,2217},{0,31,2125},{4,31,65535},{1,31,47976},{0,30,4194}, +{0,27,24703},{0,31,65535},{0,24,56130},{5,31,14379},{4,31,6051},{2,31,173},{2,29,1284},{9,14,24371},{0,31,13716},{0,28,3402},{0,21,13989},{14,10,24371},{0,21,13989},{1,31,1193},{1,31,1193},{1,31,1193},{1,24,617},{0,27,4420},{0,22,1280},{0,22,1280},{0,13,1445},{0,14,6509},{0,12,2945},{2,31,173},{2,31,173},{2,31,173},{2,23,5},{5,10,4418},{0,22,1280},{0,22,1280},{0,13,1445},{12,1,4418}, +{0,13,1445},{14,14,7938},{7,31,4253},{3,31,9},{0,29,656},{14,14,7938},{14,20,7938},{0,29,656},{0,23,7956},{14,20,7938},{0,23,7956},{1,0,617},{1,0,617},{1,0,617},{1,0,617},{0,11,4},{0,11,4},{0,11,4},{0,7,0},{0,5,325},{0,5,325},{4,31,65535},{2,31,41266},{1,31,3033},{0,31,2333},{4,31,65535},{1,31,46408},{0,30,3010},{0,27,21695},{0,31,65535},{0,25,53636},{6,31,13140}, +{4,31,5571},{3,31,157},{2,29,932},{11,9,22568},{0,31,12404},{0,28,2474},{0,21,12245},{14,11,22568},{0,21,12245},{2,31,1630},{2,31,1630},{2,31,1630},{1,26,989},{0,29,4420},{0,23,1090},{0,23,1090},{0,14,1268},{0,15,6926},{0,13,3029},{3,31,157},{3,31,157},{3,31,157},{3,23,37},{8,1,4418},{0,23,1090},{0,23,1090},{0,14,1268},{10,5,4418},{0,14,1268},{15,12,6962},{7,31,3709},{4,31,1}, +{0,30,353},{15,12,6962},{13,22,6962},{0,30,353},{0,24,6970},{13,22,6962},{0,24,6970},{1,0,985},{1,0,985},{1,0,985},{1,0,985},{0,14,0},{0,14,0},{0,14,0},{0,8,4},{0,6,493},{0,6,493},{4,31,65535},{2,31,41986},{1,31,4257},{0,31,2873},{4,31,65535},{1,31,44950},{0,30,1984},{0,28,18569},{0,31,65535},{0,25,51026},{6,31,11934},{5,31,5125},{4,31,296},{3,29,706},{13,4,20642}, +{0,31,11234},{0,29,1634},{0,22,10422},{15,11,20642},{0,22,10422},{2,31,2350},{2,31,2350},{2,31,2350},{2,26,1450},{0,31,4450},{0,25,949},{0,25,949},{0,16,1096},{0,16,7397},{0,14,3171},{4,31,296},{4,31,296},{4,31,296},{3,25,10},{8,4,4418},{0,25,949},{0,25,949},{0,16,1096},{14,2,4418},{0,16,1096},{14,17,5941},{7,31,3250},{5,31,0},{0,30,128},{14,17,5941},{13,23,5941},{0,30,128}, +{0,24,5953},{13,23,5941},{0,24,5953},{2,0,1450},{2,0,1450},{2,0,1450},{2,0,1450},{0,17,0},{0,17,0},{0,17,0},{0,10,1},{0,8,697},{0,8,697},{4,31,65535},{2,31,42898},{1,31,5617},{1,31,3337},{4,31,65535},{1,31,43926},{0,31,1250},{0,28,15865},{0,31,65535},{0,25,48978},{7,31,10938},{5,31,4773},{4,31,360},{3,30,509},{12,9,19021},{1,31,10246},{0,30,1088},{0,23,8945},{14,13,19021}, +{0,23,8945},{2,31,3262},{2,31,3262},{2,31,3262},{2,28,1822},{1,31,4682},{0,28,776},{0,28,776},{0,17,925},{0,18,7893},{0,15,3333},{4,31,360},{4,31,360},{4,31,360},{4,25,37},{3,25,4418},{0,28,776},{0,28,776},{0,17,925},{12,6,4418},{0,17,925},{15,15,5101},{8,31,2777},{6,31,9},{0,31,25},{15,15,5101},{11,26,5101},{0,31,25},{0,25,5105},{11,26,5101},{0,25,5105},{2,0,1818}, +{2,0,1818},{2,0,1818},{2,0,1818},{0,20,1},{0,20,1},{0,20,1},{0,12,1},{0,9,925},{0,9,925},{4,31,65535},{2,31,44066},{1,31,7233},{1,31,3993},{4,31,65535},{2,31,43110},{0,31,738},{0,28,13417},{0,31,65535},{0,25,47186},{7,31,9978},{6,31,4467},{5,31,452},{4,30,357},{15,1,17485},{2,31,9441},{0,30,704},{0,24,7570},{15,13,17485},{0,24,7570},{3,31,4058},{3,31,4058},{3,31,4058}, +{2,29,2315},{1,31,4874},{0,29,610},{0,29,610},{0,18,772},{0,20,8427},{0,16,3497},{5,31,452},{5,31,452},{5,31,452},{4,27,5},{9,6,4418},{0,29,610},{0,29,610},{0,18,772},{14,5,4418},{0,18,772},{15,16,4325},{8,31,2377},{6,31,25},{0,31,9},{15,16,4325},{15,22,4325},{0,31,9},{0,25,4337},{15,22,4325},{0,25,4337},{2,0,2314},{2,0,2314},{2,0,2314},{2,0,2314},{0,22,1}, +{0,22,1},{0,22,1},{0,13,4},{0,10,1189},{0,10,1189},{5,31,65535},{3,31,45090},{1,31,9105},{1,31,4905},{4,31,65535},{2,31,42326},{0,31,482},{0,28,11225},{0,31,65535},{0,26,45590},{7,31,9274},{6,31,4179},{5,31,612},{4,30,245},{14,6,16034},{3,31,8633},{0,31,482},{0,24,6242},{15,14,16034},{0,24,6242},{3,31,5066},{3,31,5066},{3,31,5066},{2,31,2939},{1,31,5322},{0,31,482},{0,31,482}, +{0,19,637},{0,20,8939},{0,17,3725},{5,31,612},{5,31,612},{5,31,612},{5,27,37},{10,5,4418},{0,31,482},{0,31,482},{0,19,637},{12,9,4418},{0,19,637},{13,24,3613},{9,31,1973},{7,31,9},{2,31,1},{13,24,3613},{15,23,3613},{2,31,1},{0,26,3617},{15,23,3613},{0,26,3617},{2,0,2938},{2,0,2938},{2,0,2938},{2,0,2938},{0,25,1},{0,25,1},{0,25,1},{0,15,0},{0,11,1489}, +{0,11,1489},{5,31,65535},{3,31,46530},{1,31,11517},{1,31,6237},{4,31,65535},{2,31,41750},{0,31,500},{0,29,8976},{0,31,65535},{0,26,43934},{8,31,8225},{7,31,3853},{6,31,680},{5,30,109},{11,18,14504},{4,31,7667},{0,31,500},{0,25,4979},{10,21,14504},{0,25,4979},{3,31,6506},{3,31,6506},{3,31,6506},{3,31,3701},{2,31,6019},{0,31,500},{0,31,500},{0,20,520},{0,22,9629},{0,18,4035},{6,31,680}, +{6,31,680},{6,31,680},{5,29,10},{10,8,4418},{0,31,500},{0,31,500},{0,20,520},{11,12,4418},{0,20,520},{15,19,2888},{10,31,1537},{8,31,16},{3,31,4},{15,19,2888},{13,26,2888},{3,31,4},{0,26,2906},{13,26,2888},{0,26,2906},{3,0,3697},{3,0,3697},{3,0,3697},{3,0,3697},{0,28,1},{0,28,1},{0,28,1},{0,17,4},{0,11,1930},{0,11,1930},{5,31,65535},{3,31,48082},{1,31,13933}, +{1,31,7693},{4,31,65535},{2,31,41510},{0,31,788},{0,29,7120},{0,31,65535},{0,26,42734},{8,31,7409},{7,31,3693},{7,31,884},{6,30,116},{13,13,13235},{4,31,6899},{1,31,628},{0,25,3987},{15,16,13235},{0,25,3987},{4,31,7686},{4,31,7686},{4,31,7686},{3,31,4437},{2,31,6659},{0,31,788},{0,31,788},{0,21,421},{0,23,10286},{0,20,4305},{7,31,884},{7,31,884},{7,31,884},{6,29,37},{9,14,4418}, +{1,31,628},{1,31,628},{0,21,421},{14,10,4418},{0,21,421},{15,20,2312},{10,31,1217},{8,31,16},{4,31,9},{15,20,2312},{12,28,2312},{4,31,9},{0,27,2314},{12,28,2312},{0,27,2314},{3,0,4337},{3,0,4337},{3,0,4337},{3,0,4337},{0,30,1},{0,30,1},{0,30,1},{0,18,1},{0,13,2329},{0,13,2329},{5,31,65535},{3,31,49890},{2,31,16310},{1,31,9405},{4,31,65535},{2,31,41526},{0,31,1332}, +{0,29,5520},{0,31,65535},{0,26,41790},{8,31,6849},{8,31,3601},{7,31,980},{6,31,5},{15,8,12051},{5,31,6275},{2,31,801},{0,26,3066},{11,22,12051},{0,26,3066},{4,31,9062},{4,31,9062},{4,31,9062},{3,31,5429},{2,31,7555},{1,31,1172},{1,31,1172},{0,23,325},{0,23,11118},{0,20,4625},{7,31,980},{7,31,980},{7,31,980},{6,31,5},{11,10,4418},{2,31,801},{2,31,801},{0,23,325},{5,23,4418}, +{0,23,325},{13,28,1800},{11,31,949},{9,31,4},{6,31,1},{13,28,1800},{11,30,1800},{6,31,1},{0,27,1818},{11,30,1800},{0,27,1818},{3,0,5105},{3,0,5105},{3,0,5105},{3,0,5105},{0,31,36},{0,31,36},{0,31,36},{0,20,4},{0,15,2741},{0,15,2741},{5,31,65535},{3,31,51954},{2,31,18790},{1,31,11373},{5,31,65535},{2,31,41798},{0,31,2132},{0,29,4176},{0,31,65535},{0,27,41092},{9,31,6153}, +{8,31,3297},{7,31,1332},{7,31,37},{14,13,10952},{5,31,5763},{3,31,965},{0,27,2291},{11,23,10952},{0,27,2291},{4,31,10694},{4,31,10694},{4,31,10694},{4,31,6566},{3,31,8619},{1,31,1716},{1,31,1716},{0,24,221},{0,26,11876},{0,22,4989},{7,31,1332},{7,31,1332},{7,31,1332},{7,31,37},{12,9,4418},{3,31,965},{3,31,965},{0,24,221},{14,13,4418},{0,24,221},{14,26,1352},{11,31,725},{10,31,0}, +{7,31,1},{14,26,1352},{15,26,1352},{7,31,1},{0,28,1360},{15,26,1352},{0,28,1360},{3,0,6001},{3,0,6001},{3,0,6001},{3,0,6001},{0,31,196},{0,31,196},{0,31,196},{0,21,1},{0,16,3130},{0,16,3130},{5,31,65535},{3,31,54582},{2,31,21886},{1,31,13893},{5,31,65535},{2,31,42410},{0,31,3338},{0,30,2841},{0,31,65535},{0,27,40390},{9,31,5649},{9,31,3249},{8,31,1325},{7,31,109},{14,15,9818}, +{6,31,5258},{4,31,1108},{0,27,1589},{12,23,9818},{0,27,1589},{5,31,12376},{5,31,12376},{5,31,12376},{4,31,7844},{3,31,9861},{1,31,2634},{1,31,2634},{0,25,136},{0,28,12696},{0,23,5429},{8,31,1325},{8,31,1325},{8,31,1325},{7,31,109},{15,2,4418},{4,31,1108},{4,31,1108},{0,25,136},{13,16,4418},{0,25,136},{15,24,925},{12,31,505},{11,31,1},{8,31,1},{15,24,925},{15,27,925},{8,31,1}, +{0,28,937},{15,27,925},{0,28,937},{4,0,7060},{4,0,7060},{4,0,7060},{4,0,7060},{1,31,425},{1,31,425},{1,31,425},{0,23,0},{0,17,3665},{0,17,3665},{5,31,65535},{3,31,57190},{2,31,24910},{1,31,16405},{5,31,65535},{2,31,43226},{0,31,4682},{0,30,1833},{0,31,65535},{0,27,40038},{10,31,5202},{9,31,3073},{8,31,1565},{8,31,277},{13,20,8901},{7,31,4814},{5,31,1300},{0,28,1021},{13,23,8902}, +{0,28,1021},{5,31,14136},{5,31,14136},{5,31,14136},{4,31,9252},{3,31,11237},{2,31,3590},{2,31,3590},{0,26,85},{0,29,13491},{0,23,5925},{8,31,1565},{8,31,1565},{8,31,1565},{8,31,277},{11,18,4418},{5,31,1300},{5,31,1300},{0,26,85},{10,21,4418},{0,26,85},{15,25,617},{13,31,365},{12,31,16},{9,31,9},{15,25,617},{13,30,613},{9,31,9},{0,29,617},{13,30,613},{0,29,617},{4,0,7956}, +{4,0,7956},{4,0,7956},{4,0,7956},{1,31,697},{1,31,697},{1,31,697},{0,25,4},{0,18,4181},{0,18,4181},{5,31,65535},{3,31,60054},{2,31,28190},{2,31,18895},{5,31,65535},{2,31,44298},{1,31,6090},{0,30,1081},{0,31,65535},{0,27,39942},{10,31,4850},{10,31,3107},{9,31,1709},{8,31,325},{13,22,8069},{7,31,4574},{6,31,1553},{0,29,602},{12,25,8069},{0,29,602},{6,31,16067},{6,31,16067},{6,31,16067}, +{5,31,10872},{4,31,12824},{2,31,4662},{2,31,4662},{0,27,52},{0,30,14340},{0,25,6449},{9,31,1709},{9,31,1709},{9,31,1709},{8,31,325},{13,14,4418},{6,31,1553},{6,31,1553},{0,27,52},{8,25,4418},{0,27,52},{15,27,365},{13,31,205},{12,31,16},{11,31,4},{15,27,365},{13,31,365},{11,31,4},{0,29,377},{13,31,365},{0,29,377},{4,0,8980},{4,0,8980},{4,0,8980},{4,0,8980},{1,31,1097}, +{1,31,1097},{1,31,1097},{0,26,1},{0,20,4682},{0,20,4682},{6,31,65535},{4,31,58981},{2,31,29926},{2,31,19751},{5,31,65535},{3,31,43402},{1,31,6910},{0,30,765},{0,31,65535},{0,28,34909},{11,31,4502},{10,31,3011},{9,31,2045},{9,31,557},{15,17,7322},{8,31,4242},{7,31,1781},{0,29,314},{12,26,7322},{0,29,314},{6,31,16739},{6,31,16739},{6,31,16739},{5,31,11492},{4,31,13636},{3,31,5586},{3,31,5586}, +{0,28,65},{0,31,14139},{0,26,6041},{9,31,2045},{9,31,2045},{9,31,2045},{9,31,557},{14,13,4418},{7,31,1781},{7,31,1781},{0,28,29},{11,23,4418},{0,28,29},{15,28,181},{14,31,117},{13,31,4},{12,31,0},{15,28,181},{15,29,181},{12,31,0},{0,30,185},{15,29,181},{0,30,185},{4,0,9376},{4,0,9376},{4,0,9376},{4,0,9376},{2,31,1405},{2,31,1405},{2,31,1405},{0,28,40},{0,21,4520}, +{0,21,4520},{6,31,65535},{4,31,57316},{3,31,30345},{3,31,20808},{6,31,65535},{3,31,41449},{2,31,8321},{1,31,301},{0,31,65535},{0,28,28330},{11,31,4232},{11,31,3093},{10,31,2248},{9,31,809},{15,19,6584},{9,31,3992},{7,31,2105},{0,30,77},{13,26,6584},{0,30,77},{7,31,17380},{7,31,17380},{7,31,17380},{6,31,12161},{5,31,14315},{3,31,6405},{3,31,6405},{1,29,53},{0,31,13860},{0,28,5286},{10,31,2248}, +{10,31,2248},{10,31,2248},{9,31,809},{14,16,4418},{7,31,2105},{7,31,2105},{0,30,13},{15,20,4418},{0,30,13},{15,29,52},{14,31,36},{14,31,0},{13,31,9},{15,29,52},{15,30,50},{13,31,9},{0,30,68},{15,30,50},{0,30,68},{5,0,9250},{5,0,9250},{5,0,9250},{5,0,9250},{2,31,1549},{2,31,1549},{2,31,1549},{1,28,2},{0,23,4114},{0,23,4114},{6,31,65535},{5,31,55908},{4,31,31583}, +{3,31,21256},{6,31,65535},{4,31,39740},{2,31,9073},{1,31,285},{0,31,65535},{0,29,23356},{12,31,4011},{11,31,3125},{11,31,2500},{10,31,1037},{13,27,6019},{10,31,3738},{8,31,2340},{0,31,4},{13,27,6019},{0,31,4},{7,31,17796},{7,31,17796},{7,31,17796},{6,31,12625},{6,31,14996},{4,31,7139},{4,31,7139},{1,30,86},{0,31,14020},{0,29,4652},{11,31,2500},{11,31,2500},{11,31,2500},{10,31,1037},{13,22,4418}, +{8,31,2340},{8,31,2340},{0,31,4},{12,25,4418},{0,31,4},{15,31,4},{15,31,4},{15,31,4},{15,31,4},{15,31,4},{15,31,4},{15,31,4},{0,31,4},{15,31,4},{0,31,4},{6,0,9376},{6,0,9376},{6,0,9376},{6,0,9376},{3,31,1765},{3,31,1765},{3,31,1765},{1,30,50},{0,25,3877},{0,25,3877},{7,31,65535},{5,31,53236},{4,31,30487},{4,31,21367},{6,31,65535},{4,31,37332},{3,31,9385}, +{2,31,36},{0,31,65535},{0,29,18680},{12,31,3443},{12,31,2843},{11,31,2248},{10,31,997},{14,25,5163},{10,31,3218},{9,31,2120},{1,31,4},{12,29,5163},{1,31,4},{7,31,17504},{7,31,17504},{7,31,17504},{7,31,12569},{6,31,14328},{4,31,7227},{4,31,7227},{2,31,20},{0,31,13376},{0,29,3944},{11,31,2248},{11,31,2248},{11,31,2248},{10,31,997},{15,17,3872},{9,31,2120},{9,31,2120},{1,31,4},{12,26,3872}, +{1,31,4},{15,31,0},{15,31,0},{15,31,0},{15,31,0},{15,31,0},{15,31,0},{15,31,0},{0,31,0},{15,31,0},{0,31,0},{6,0,9248},{6,0,9248},{6,0,9248},{6,0,9248},{3,31,2005},{3,31,2005},{3,31,2005},{2,30,5},{0,27,3545},{0,27,3545},{7,31,65535},{6,31,50785},{4,31,29687},{4,31,20567},{7,31,65535},{4,31,35412},{3,31,8985},{2,31,196},{1,31,65535},{0,29,14712},{12,31,2883}, +{12,31,2283},{12,31,1922},{11,31,821},{13,29,4267},{11,31,2694},{10,31,1745},{3,31,4},{14,27,4267},{3,31,4},{8,31,16610},{8,31,16610},{8,31,16610},{7,31,12185},{6,31,13528},{5,31,6915},{5,31,6915},{2,31,52},{1,31,12556},{0,30,3314},{12,31,1922},{12,31,1922},{12,31,1922},{11,31,821},{12,28,3200},{10,31,1745},{10,31,1745},{3,31,4},{11,28,3200},{3,31,4},{15,31,0},{15,31,0},{15,31,0}, +{15,31,0},{15,31,0},{15,31,0},{15,31,0},{0,31,0},{15,31,0},{0,31,0},{6,0,9376},{6,0,9376},{6,0,9376},{6,0,9376},{4,31,2250},{4,31,2250},{4,31,2250},{2,31,52},{0,28,3170},{0,28,3170},{7,31,65535},{6,31,47239},{5,31,28065},{5,31,20409},{7,31,65535},{5,31,32574},{4,31,8965},{3,31,54},{1,31,65206},{0,30,10964},{13,31,2326},{12,31,1806},{12,31,1445},{11,31,650},{13,30,3361}, +{11,31,2091},{10,31,1322},{4,31,0},{12,30,3361},{4,31,0},{8,31,15584},{8,31,15584},{8,31,15584},{7,31,12059},{7,31,12522},{6,31,6811},{6,31,6811},{3,31,50},{1,31,11710},{0,31,2834},{12,31,1445},{12,31,1445},{12,31,1445},{11,31,650},{14,23,2521},{10,31,1322},{10,31,1322},{4,31,0},{15,24,2521},{4,31,0},{15,31,0},{15,31,0},{15,31,0},{15,31,0},{15,31,0},{15,31,0},{15,31,0}, +{0,31,0},{15,31,0},{0,31,0},{7,0,9250},{7,0,9250},{7,0,9250},{7,0,9250},{5,31,2600},{5,31,2600},{5,31,2600},{3,31,50},{0,31,2834},{0,31,2834},{8,31,65535},{6,31,44903},{5,31,27361},{5,31,19705},{7,31,64494},{5,31,30846},{4,31,8677},{3,31,470},{2,31,60777},{0,30,8308},{13,31,1782},{13,31,1510},{12,31,1157},{12,31,557},{13,31,2646},{11,31,1691},{11,31,1066},{5,31,4},{15,27,2646}, +{5,31,4},{8,31,14944},{8,31,14944},{8,31,14944},{8,31,11696},{7,31,11850},{6,31,6555},{6,31,6555},{4,31,164},{2,31,11097},{0,31,2610},{12,31,1157},{12,31,1157},{12,31,1157},{12,31,557},{15,21,1985},{11,31,1066},{11,31,1066},{5,31,4},{15,25,1985},{5,31,4},{15,31,0},{15,31,0},{15,31,0},{15,31,0},{15,31,0},{15,31,0},{15,31,0},{0,31,0},{15,31,0},{0,31,0},{7,0,9410}, +{7,0,9410},{7,0,9410},{7,0,9410},{5,31,2792},{5,31,2792},{5,31,2792},{4,31,164},{0,31,2610},{0,31,2610},{8,31,63584},{7,31,42019},{6,31,25930},{5,31,19769},{8,31,60273},{6,31,28860},{5,31,8761},{4,31,276},{3,31,56253},{0,30,6420},{13,31,1366},{13,31,1094},{13,31,925},{12,31,397},{15,25,2018},{12,31,1298},{11,31,794},{7,31,4},{13,30,2017},{7,31,4},{9,31,14244},{9,31,14244},{9,31,14244}, +{8,31,11312},{8,31,11249},{7,31,6499},{7,31,6499},{4,31,260},{3,31,10457},{0,31,2642},{13,31,925},{13,31,925},{13,31,925},{12,31,397},{15,22,1513},{11,31,794},{11,31,794},{7,31,4},{14,27,1513},{7,31,4},{15,31,0},{15,31,0},{15,31,0},{15,31,0},{15,31,0},{15,31,0},{15,31,0},{0,31,0},{15,31,0},{0,31,0},{8,0,9376},{8,0,9376},{8,0,9376},{8,0,9376},{6,31,3074}, +{6,31,3074},{6,31,3074},{4,31,260},{0,31,2642},{0,31,2642},{8,31,58848},{7,31,39683},{6,31,25130},{6,31,19007},{8,31,54849},{6,31,27132},{5,31,8569},{4,31,756},{4,31,51302},{0,31,5046},{13,31,1078},{13,31,806},{13,31,637},{12,31,365},{15,26,1473},{12,31,978},{12,31,617},{8,31,9},{14,29,1473},{8,31,9},{9,31,13604},{9,31,13604},{9,31,13604},{8,31,11184},{8,31,10433},{7,31,6339},{7,31,6339}, +{5,31,424},{4,31,9713},{0,31,2930},{13,31,637},{13,31,637},{13,31,637},{12,31,365},{14,27,1105},{12,31,617},{12,31,617},{8,31,9},{13,29,1105},{8,31,9},{15,31,0},{15,31,0},{15,31,0},{15,31,0},{15,31,0},{15,31,0},{15,31,0},{0,31,0},{15,31,0},{0,31,0},{8,0,9248},{8,0,9248},{8,0,9248},{8,0,9248},{6,31,3330},{6,31,3330},{6,31,3330},{5,31,424},{0,31,2930}, +{0,31,2930},
\ No newline at end of file diff --git a/thirdparty/basis_universal/transcoder/basisu_transcoder_tables_pvrtc2_alpha_33.inc b/thirdparty/basis_universal/transcoder/basisu_transcoder_tables_pvrtc2_alpha_33.inc new file mode 100644 index 0000000000..10c94153ad --- /dev/null +++ b/thirdparty/basis_universal/transcoder/basisu_transcoder_tables_pvrtc2_alpha_33.inc @@ -0,0 +1,481 @@ +{0,0,20},{0,0,20},{0,0,97},{0,0,145},{0,0,56},{0,0,104},{0,0,181},{0,0,406},{0,0,204},{0,0,442},{0,0,20},{0,0,20},{0,0,97},{0,0,145},{0,0,56},{0,0,104},{0,0,181},{0,0,406},{0,0,168},{0,0,406},{0,0,16},{0,0,16},{0,0,16},{0,0,64},{0,0,52},{0,0,100},{0,0,100},{0,0,325},{0,0,200},{0,0,361},{0,0,16}, +{0,0,16},{0,0,16},{0,0,64},{0,0,52},{0,0,100},{0,0,100},{0,0,325},{0,0,164},{0,0,325},{0,0,20},{0,0,20},{0,0,97},{0,0,145},{0,0,20},{0,0,68},{0,0,145},{0,0,306},{0,0,68},{0,0,306},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,36},{0,0,36},{0,0,36},{0,0,100},{0,0,136},{0,0,136},{0,1,126},{0,0,88},{0,0,53}, +{0,0,37},{0,0,116},{0,0,36},{0,0,1},{0,0,66},{0,0,88},{0,0,102},{0,1,126},{0,0,88},{0,0,53},{0,0,37},{0,0,116},{0,0,36},{0,0,1},{0,0,66},{0,0,52},{0,0,66},{0,0,52},{0,0,52},{0,0,52},{0,0,36},{0,0,16},{0,0,0},{0,0,0},{0,0,65},{0,0,52},{0,0,101},{0,0,52},{0,0,52},{0,0,52},{0,0,36},{0,0,16}, +{0,0,0},{0,0,0},{0,0,65},{0,0,16},{0,0,65},{0,1,90},{0,0,52},{0,0,17},{0,0,1},{0,1,90},{0,0,36},{0,0,1},{0,0,50},{0,0,36},{0,0,50},{0,0,36},{0,0,36},{0,0,36},{0,0,36},{0,0,0},{0,0,0},{0,0,0},{0,0,16},{0,0,52},{0,0,52},{0,1,286},{0,1,310},{0,0,453},{0,0,373},{0,1,115},{0,1,307},{0,0,241}, +{0,0,130},{0,0,280},{0,0,70},{0,1,222},{0,1,246},{0,0,389},{0,0,309},{0,1,51},{1,0,195},{0,0,177},{0,0,66},{1,0,107},{0,0,66},{0,1,261},{0,1,261},{0,1,261},{0,0,324},{0,1,90},{0,0,192},{0,0,192},{0,0,81},{0,0,84},{0,0,21},{0,1,197},{0,1,197},{0,1,197},{0,0,260},{0,1,26},{0,0,128},{0,0,128},{0,0,17},{0,0,80}, +{0,0,17},{0,1,26},{0,1,50},{1,0,130},{1,0,74},{0,1,26},{1,0,26},{1,0,74},{0,0,50},{1,0,26},{0,0,50},{0,0,260},{0,0,260},{0,0,260},{0,0,260},{0,1,89},{0,1,89},{0,1,89},{0,0,80},{0,0,20},{0,0,20},{1,0,494},{1,0,550},{1,0,694},{1,0,702},{0,2,363},{0,1,291},{1,0,583},{1,0,631},{0,1,116},{1,0,428},{1,0,170}, +{1,0,226},{1,0,370},{1,0,378},{1,0,51},{0,1,35},{1,0,259},{1,0,307},{1,0,91},{1,0,307},{1,0,469},{1,0,469},{1,0,469},{1,0,477},{0,1,314},{0,1,290},{0,1,290},{1,0,406},{0,1,115},{1,0,203},{1,0,145},{1,0,145},{1,0,145},{1,0,153},{1,0,26},{1,0,34},{1,0,34},{1,0,82},{1,0,10},{1,0,82},{1,0,26},{0,1,50},{1,0,226}, +{1,0,234},{1,0,26},{0,1,26},{1,0,234},{0,0,306},{0,1,26},{0,0,306},{1,0,468},{1,0,468},{1,0,468},{1,0,468},{0,1,265},{0,1,265},{0,1,265},{1,0,325},{0,1,90},{0,1,90},{1,1,116},{1,1,124},{1,1,215},{1,1,271},{1,1,188},{1,1,252},{1,1,343},{1,1,606},{0,1,152},{0,1,392},{1,1,35},{1,1,43},{1,1,134},{1,1,190},{1,1,107}, +{1,1,171},{0,1,260},{0,1,356},{2,0,51},{0,1,356},{1,1,115},{1,1,115},{1,1,115},{1,1,171},{1,0,161},{1,0,241},{1,0,241},{1,0,469},{0,1,52},{0,1,292},{1,1,34},{1,1,34},{1,1,34},{1,1,90},{0,2,16},{1,0,160},{1,0,160},{0,1,256},{0,1,16},{0,1,256},{1,1,26},{1,1,34},{1,1,125},{0,1,116},{1,1,26},{2,0,26},{0,1,116}, +{0,1,356},{2,0,26},{0,1,356},{1,0,90},{1,0,90},{1,0,90},{1,0,90},{1,0,97},{1,0,97},{1,0,97},{1,0,145},{0,1,36},{0,1,36},{1,1,116},{1,1,60},{1,1,39},{1,1,31},{1,1,92},{1,1,28},{1,1,7},{1,1,94},{1,1,100},{1,1,142},{1,1,115},{1,1,59},{1,1,38},{1,1,30},{0,3,51},{1,1,27},{1,1,6},{1,1,93},{1,1,51}, +{1,1,93},{1,1,35},{1,1,35},{1,1,35},{1,1,27},{1,1,11},{1,1,3},{1,1,3},{1,1,90},{1,1,75},{1,1,138},{1,1,34},{1,1,34},{1,1,34},{1,1,26},{1,1,10},{1,1,2},{1,1,2},{1,1,89},{1,1,26},{1,1,89},{2,0,26},{1,1,34},{1,1,13},{1,1,5},{2,0,26},{3,0,26},{1,1,5},{0,1,68},{3,0,26},{0,1,68},{1,0,26}, +{1,0,26},{1,0,26},{1,0,26},{1,1,2},{1,1,2},{1,1,2},{1,1,26},{1,1,74},{1,1,74},{1,2,238},{1,2,286},{1,1,375},{1,1,303},{1,2,105},{1,1,316},{1,1,183},{1,1,94},{0,2,156},{1,1,46},{1,2,189},{1,2,237},{1,1,326},{1,1,254},{1,2,56},{2,1,232},{1,1,134},{1,1,45},{0,2,56},{1,1,45},{1,2,222},{1,2,222},{1,2,222}, +{1,1,267},{1,2,89},{1,1,147},{1,1,147},{1,1,58},{1,1,59},{1,1,10},{1,2,173},{1,2,173},{1,2,173},{1,1,218},{2,0,10},{1,1,98},{1,1,98},{1,1,9},{3,0,10},{1,1,9},{1,2,20},{1,2,68},{2,1,136},{2,1,72},{1,2,20},{0,2,20},{2,1,72},{0,1,36},{0,2,20},{0,1,36},{1,0,218},{1,0,218},{1,0,218},{1,0,218},{1,2,85}, +{1,2,85},{1,2,85},{1,1,58},{1,1,10},{1,1,10},{2,1,550},{2,1,598},{2,1,730},{2,1,730},{1,3,361},{1,2,265},{2,1,597},{1,1,606},{1,2,152},{2,1,408},{2,1,189},{2,1,237},{2,1,369},{2,1,369},{2,1,56},{1,2,40},{2,1,236},{2,1,264},{4,0,56},{2,1,264},{2,1,534},{2,1,534},{2,1,534},{2,1,534},{1,2,265},{1,2,265},{1,2,265}, +{1,1,410},{2,1,152},{2,1,212},{2,1,173},{2,1,173},{2,1,173},{2,1,173},{0,4,8},{2,1,40},{2,1,40},{2,1,68},{2,1,8},{2,1,68},{2,1,20},{1,2,36},{2,1,200},{2,1,200},{2,1,20},{4,0,20},{2,1,200},{0,1,260},{4,0,20},{0,1,260},{2,0,530},{2,0,530},{2,0,530},{2,0,530},{1,2,229},{1,2,229},{1,2,229},{1,2,325},{1,2,116}, +{1,2,116},{2,2,152},{2,2,168},{2,2,273},{2,2,337},{2,2,236},{2,2,316},{2,2,421},{2,2,706},{1,2,116},{1,2,436},{2,2,52},{2,2,68},{2,2,173},{2,2,237},{3,0,56},{1,2,211},{1,2,251},{1,2,411},{3,1,56},{1,2,411},{2,2,152},{2,2,152},{2,2,152},{2,2,216},{2,1,158},{2,1,230},{2,1,230},{2,1,438},{1,2,35},{1,2,315},{2,2,52}, +{2,2,52},{2,2,52},{2,2,116},{1,3,10},{2,1,130},{2,1,130},{1,2,290},{1,2,10},{1,2,290},{3,0,20},{2,2,52},{2,2,157},{1,2,130},{3,0,20},{3,1,20},{1,2,130},{0,2,410},{3,1,20},{0,2,410},{2,0,116},{2,0,116},{2,0,116},{2,0,116},{2,1,109},{2,1,109},{2,1,109},{2,1,149},{1,2,26},{1,2,26},{2,2,88},{2,2,40},{2,2,33}, +{2,2,33},{2,2,76},{2,2,28},{2,2,21},{2,2,130},{2,2,120},{2,2,190},{2,2,84},{2,2,36},{2,2,29},{2,2,29},{1,4,56},{2,2,24},{2,2,17},{2,2,126},{2,2,56},{2,2,126},{2,2,24},{2,2,24},{2,2,24},{2,2,24},{2,2,12},{2,2,12},{2,2,12},{2,2,121},{2,2,104},{2,2,181},{2,2,20},{2,2,20},{2,2,20},{2,2,20},{2,2,8}, +{2,2,8},{2,2,8},{2,2,117},{5,0,8},{2,2,117},{1,4,20},{2,2,20},{2,2,13},{2,2,13},{1,4,20},{2,2,20},{2,2,13},{0,2,90},{2,2,20},{0,2,90},{2,0,20},{2,0,20},{2,0,20},{2,0,20},{2,2,8},{2,2,8},{2,2,8},{2,2,40},{2,2,100},{2,2,100},{2,3,198},{2,3,270},{2,2,305},{2,2,241},{2,3,103},{2,2,252},{2,2,133}, +{2,2,66},{1,3,148},{2,2,30},{2,3,162},{2,3,234},{2,2,269},{2,2,205},{2,3,67},{2,2,216},{2,2,97},{2,2,30},{6,0,67},{2,2,30},{2,3,189},{2,3,189},{2,3,189},{2,2,216},{2,3,94},{2,2,108},{2,2,108},{2,2,41},{2,2,40},{2,2,5},{2,3,153},{2,3,153},{2,3,153},{2,2,180},{3,1,8},{2,2,72},{2,2,72},{2,2,5},{4,1,8}, +{2,2,5},{2,3,18},{2,3,90},{2,2,125},{2,2,61},{2,3,18},{6,0,18},{2,2,61},{0,2,26},{6,0,18},{0,2,26},{2,0,180},{2,0,180},{2,0,180},{2,0,180},{2,2,72},{2,2,72},{2,2,72},{2,2,40},{2,2,4},{2,2,4},{3,2,614},{2,3,622},{3,2,774},{3,2,766},{2,3,343},{2,3,247},{3,2,619},{2,2,514},{2,3,196},{2,2,382},{3,2,214}, +{3,2,254},{3,2,374},{3,2,366},{4,0,59},{2,3,51},{3,2,219},{3,2,227},{3,2,59},{3,2,227},{3,2,605},{3,2,605},{3,2,605},{3,2,597},{2,3,222},{2,3,246},{2,3,246},{2,2,345},{3,2,179},{2,2,213},{3,2,205},{3,2,205},{3,2,205},{3,2,197},{4,0,10},{3,2,50},{3,2,50},{3,2,58},{3,2,10},{3,2,58},{3,2,18},{2,3,26},{3,2,178}, +{3,2,170},{3,2,18},{5,1,18},{3,2,170},{0,2,218},{5,1,18},{0,2,218},{2,0,596},{2,0,596},{2,0,596},{2,0,596},{2,3,197},{2,3,197},{2,3,197},{2,2,296},{2,3,146},{2,3,146},{3,3,196},{3,3,220},{3,3,339},{3,3,411},{3,3,292},{3,3,388},{3,3,507},{3,3,814},{2,3,88},{2,3,488},{3,3,75},{3,3,99},{3,3,218},{3,3,290},{4,1,67}, +{2,3,168},{2,3,248},{2,3,472},{4,2,67},{2,3,472},{3,2,182},{3,2,182},{3,2,182},{3,2,246},{3,2,161},{3,2,225},{3,2,225},{3,2,413},{2,3,24},{3,2,308},{3,2,61},{3,2,61},{3,2,61},{3,2,125},{2,4,8},{3,2,104},{3,2,104},{3,2,292},{7,0,8},{3,2,292},{4,1,18},{3,3,74},{3,3,193},{2,3,148},{4,1,18},{4,2,18},{2,3,148}, +{0,3,468},{4,2,18},{0,3,468},{3,0,146},{3,0,146},{3,0,146},{3,0,146},{3,2,125},{3,2,125},{3,2,125},{3,2,157},{2,3,20},{2,3,20},{3,3,68},{3,3,28},{3,3,35},{3,3,43},{3,3,68},{3,3,36},{3,3,43},{3,3,174},{3,3,148},{3,3,246},{3,3,59},{3,3,19},{3,3,26},{3,3,34},{3,3,59},{3,3,27},{3,3,34},{2,3,152},{6,1,59}, +{2,3,152},{3,3,19},{3,3,19},{3,3,19},{3,3,27},{3,3,19},{3,3,27},{3,3,27},{3,3,158},{3,3,139},{3,3,230},{3,3,10},{3,3,10},{3,3,10},{3,3,18},{3,3,10},{3,3,18},{3,3,18},{2,3,136},{6,1,10},{2,3,136},{5,0,18},{3,3,10},{3,3,17},{3,3,25},{5,0,18},{3,3,18},{3,3,25},{0,3,116},{3,3,18},{0,3,116},{3,0,18}, +{3,0,18},{3,0,18},{3,0,18},{3,3,18},{3,3,18},{3,3,18},{3,3,58},{3,3,130},{3,3,130},{3,4,166},{3,4,262},{3,3,243},{3,3,187},{3,4,109},{3,3,196},{3,3,91},{3,3,46},{3,3,148},{3,3,22},{3,4,141},{3,4,237},{3,3,218},{3,3,162},{4,2,59},{3,3,171},{3,3,66},{3,3,21},{5,2,59},{3,3,21},{3,4,162},{3,4,162},{3,4,162}, +{3,3,171},{3,4,105},{3,3,75},{3,3,75},{3,3,30},{3,3,27},{3,3,6},{3,4,137},{3,4,137},{3,4,137},{3,3,146},{4,2,10},{3,3,50},{3,3,50},{3,3,5},{5,2,10},{3,3,5},{3,4,20},{3,4,116},{3,3,97},{3,3,41},{3,4,20},{7,1,20},{3,3,41},{0,3,20},{7,1,20},{0,3,20},{3,0,146},{3,0,146},{3,0,146},{3,0,146},{3,3,50}, +{3,3,50},{3,3,50},{3,3,26},{3,3,2},{3,3,2},{3,5,598},{3,4,550},{4,3,826},{4,3,810},{3,4,285},{3,4,237},{4,3,649},{3,3,430},{4,3,248},{3,3,310},{4,3,245},{4,3,277},{4,3,385},{4,3,369},{5,1,52},{3,4,68},{4,3,208},{4,3,196},{4,3,52},{4,3,196},{3,4,546},{3,4,546},{3,4,546},{3,4,594},{3,4,185},{3,4,233},{3,4,233}, +{3,3,286},{4,3,212},{3,3,166},{4,3,241},{4,3,241},{4,3,241},{4,3,225},{5,1,16},{4,3,64},{4,3,64},{4,3,52},{7,1,16},{4,3,52},{4,3,20},{3,4,20},{4,3,160},{4,3,144},{4,3,20},{6,2,20},{4,3,144},{0,3,180},{6,2,20},{0,3,180},{3,0,530},{3,0,530},{3,0,530},{3,0,530},{3,4,169},{3,4,169},{3,4,169},{3,3,250},{3,3,130}, +{3,3,130},{4,4,248},{4,4,280},{4,4,413},{4,4,493},{4,3,291},{4,3,451},{4,4,601},{4,3,835},{3,4,68},{3,4,548},{4,4,104},{4,4,136},{4,4,269},{4,4,349},{6,0,59},{3,4,131},{3,4,251},{3,4,539},{3,4,59},{3,4,539},{4,3,205},{4,3,205},{4,3,205},{4,3,261},{4,3,170},{4,3,226},{4,3,226},{4,3,394},{3,4,19},{4,3,275},{4,3,61}, +{4,3,61},{4,3,61},{4,3,117},{6,0,10},{4,3,82},{4,3,82},{4,3,250},{3,4,10},{4,3,250},{5,2,20},{4,4,100},{4,4,233},{3,4,170},{5,2,20},{5,3,20},{3,4,170},{0,4,530},{5,3,20},{0,4,530},{4,0,180},{4,0,180},{4,0,180},{4,0,180},{4,3,145},{4,3,145},{4,3,145},{4,3,169},{3,4,18},{3,4,18},{4,4,56},{4,4,24},{4,4,45}, +{4,4,61},{4,4,68},{4,4,52},{4,4,73},{4,4,226},{4,4,184},{3,4,292},{4,4,40},{4,4,8},{4,4,29},{4,4,45},{4,4,52},{4,4,36},{4,4,57},{3,4,171},{7,2,52},{3,4,171},{4,4,20},{4,4,20},{4,4,20},{4,4,36},{4,4,32},{4,4,48},{4,4,48},{4,4,201},{4,4,180},{3,4,267},{4,4,4},{4,4,4},{4,4,4},{4,4,20},{5,2,16}, +{4,4,32},{4,4,32},{3,4,146},{7,2,16},{3,4,146},{6,1,20},{4,4,4},{4,4,25},{4,4,41},{6,1,20},{4,4,20},{4,4,41},{0,4,146},{4,4,20},{0,4,146},{4,0,20},{4,0,20},{4,0,20},{4,0,20},{4,4,32},{4,4,32},{4,4,32},{4,4,80},{3,4,146},{3,4,146},{4,5,142},{4,5,262},{4,4,189},{4,4,141},{4,5,123},{4,4,148},{4,4,57}, +{4,4,34},{4,4,120},{4,4,22},{4,5,126},{4,5,246},{4,4,173},{4,4,125},{5,3,52},{4,4,132},{4,4,41},{4,4,18},{6,3,52},{4,4,18},{4,5,141},{4,5,141},{4,5,141},{4,4,132},{4,4,96},{4,4,48},{4,4,48},{4,4,25},{4,4,20},{4,4,13},{4,5,125},{4,5,125},{4,5,125},{4,4,116},{6,1,16},{4,4,32},{4,4,32},{4,4,9},{6,3,16}, +{4,4,9},{7,0,26},{4,5,146},{4,4,73},{4,4,25},{7,0,26},{3,5,26},{4,4,25},{0,4,18},{3,5,26},{0,4,18},{4,0,116},{4,0,116},{4,0,116},{4,0,116},{4,4,32},{4,4,32},{4,4,32},{4,4,16},{4,4,4},{4,4,4},{4,5,558},{4,5,486},{4,4,845},{4,4,733},{4,5,235},{4,5,235},{4,4,553},{4,4,354},{5,4,276},{4,4,246},{5,4,282}, +{5,4,306},{5,4,402},{5,4,378},{6,2,51},{4,5,91},{5,4,203},{5,4,171},{5,4,51},{5,4,171},{4,5,477},{4,5,477},{4,5,477},{4,5,549},{4,5,154},{4,5,226},{4,5,226},{4,4,233},{3,5,235},{4,4,125},{5,4,281},{5,4,281},{5,4,281},{5,4,257},{7,0,10},{5,4,82},{5,4,82},{5,4,50},{3,5,10},{5,4,50},{6,2,26},{4,5,18},{5,4,146}, +{5,4,122},{6,2,26},{7,3,26},{5,4,122},{0,4,146},{7,3,26},{0,4,146},{4,0,468},{4,0,468},{4,0,468},{4,0,468},{4,5,145},{4,5,145},{4,5,145},{4,4,208},{4,4,100},{4,4,100},{5,5,308},{5,5,348},{5,5,495},{5,5,583},{5,4,285},{5,4,429},{5,4,633},{5,4,781},{4,5,56},{4,5,616},{5,5,139},{5,5,179},{5,5,326},{5,5,414},{7,1,52}, +{4,5,100},{4,5,260},{5,4,612},{4,5,52},{5,4,612},{5,4,234},{5,4,234},{5,4,234},{5,4,282},{5,4,185},{5,4,233},{5,4,233},{5,4,381},{4,5,20},{5,4,248},{5,4,65},{5,4,65},{5,4,65},{5,4,113},{7,1,16},{5,4,64},{5,4,64},{5,4,212},{7,3,16},{5,4,212},{6,3,26},{5,5,130},{5,5,277},{4,5,196},{6,3,26},{6,4,26},{4,5,196}, +{0,4,596},{6,4,26},{0,4,596},{5,0,218},{5,0,218},{5,0,218},{5,0,218},{5,4,169},{5,4,169},{5,4,169},{5,4,185},{4,5,20},{4,5,20},{5,5,52},{5,5,28},{5,5,63},{5,5,87},{5,5,76},{5,5,76},{5,5,111},{5,5,286},{5,5,228},{4,5,296},{5,5,27},{5,5,3},{5,5,38},{5,5,62},{5,5,51},{5,5,51},{5,5,86},{4,5,196},{3,6,51}, +{4,5,196},{5,5,27},{5,5,27},{5,5,27},{5,5,51},{5,5,51},{5,5,75},{5,5,75},{5,5,250},{4,5,180},{4,5,260},{5,5,2},{5,5,2},{5,5,2},{5,5,26},{6,3,10},{5,5,50},{5,5,50},{4,5,160},{6,4,10},{4,5,160},{7,2,26},{5,5,2},{5,5,37},{5,5,61},{7,2,26},{5,5,26},{5,5,61},{0,5,180},{5,5,26},{0,5,180},{5,0,26}, +{5,0,26},{5,0,26},{5,0,26},{5,5,50},{5,5,50},{5,5,50},{5,5,106},{4,5,116},{4,5,116},{5,6,126},{5,5,220},{5,5,143},{5,5,103},{5,6,145},{5,5,108},{5,5,31},{5,5,30},{5,5,100},{5,5,30},{5,6,117},{5,5,211},{5,5,134},{5,5,94},{6,4,51},{5,5,99},{5,5,22},{5,5,21},{7,4,51},{5,5,21},{5,6,126},{5,6,126},{5,6,126}, +{5,5,99},{5,5,67},{5,5,27},{5,5,27},{5,5,26},{5,5,19},{5,5,26},{5,6,117},{5,6,117},{5,6,117},{5,5,90},{7,2,10},{5,5,18},{5,5,18},{5,5,17},{5,5,10},{5,5,17},{6,4,26},{5,5,130},{5,5,53},{5,5,13},{6,4,26},{7,4,26},{5,5,13},{0,5,20},{7,4,26},{0,5,20},{5,0,90},{5,0,90},{5,0,90},{5,0,90},{5,5,18}, +{5,5,18},{5,5,18},{5,5,10},{5,5,10},{5,5,10},{5,6,478},{5,6,430},{5,5,735},{5,5,631},{5,6,193},{5,6,241},{5,5,463},{5,5,286},{4,6,268},{5,5,190},{6,5,325},{5,6,309},{6,5,425},{6,5,393},{7,3,56},{6,5,120},{6,5,204},{6,5,152},{6,5,56},{6,5,152},{5,6,414},{5,6,414},{5,6,414},{5,6,510},{5,6,129},{5,6,225},{5,6,225}, +{5,5,186},{5,5,195},{5,5,90},{5,6,293},{5,6,293},{5,6,293},{6,5,293},{5,6,8},{6,5,104},{6,5,104},{6,5,52},{4,6,8},{6,5,52},{7,3,20},{5,6,20},{6,5,136},{6,5,104},{7,3,20},{6,5,20},{6,5,104},{0,5,116},{6,5,20},{0,5,116},{5,0,410},{5,0,410},{5,0,410},{5,0,410},{5,6,125},{5,6,125},{5,6,125},{5,5,170},{5,5,74}, +{5,5,74},{6,5,350},{6,6,424},{6,6,585},{6,5,670},{6,5,287},{6,5,415},{6,5,607},{6,5,735},{5,6,52},{6,5,588},{6,5,154},{6,6,228},{6,6,389},{6,5,474},{5,7,51},{5,6,75},{5,6,275},{6,5,539},{5,6,51},{6,5,539},{6,5,269},{6,5,269},{6,5,269},{6,5,309},{6,5,206},{6,5,246},{6,5,246},{6,5,374},{5,6,27},{6,5,227},{6,5,73}, +{6,5,73},{6,5,73},{6,5,113},{6,5,10},{6,5,50},{6,5,50},{6,5,178},{3,7,10},{6,5,178},{5,7,26},{5,6,146},{6,6,325},{5,6,226},{5,7,26},{5,6,26},{5,6,226},{0,5,530},{5,6,26},{0,5,530},{6,0,260},{6,0,260},{6,0,260},{6,0,260},{6,5,197},{6,5,197},{6,5,197},{6,5,205},{5,6,26},{5,6,26},{6,6,56},{6,6,40},{6,6,89}, +{6,6,121},{6,6,92},{6,6,108},{6,6,157},{6,6,354},{6,6,280},{5,6,308},{6,6,20},{6,6,4},{6,6,53},{6,6,85},{6,6,56},{6,6,72},{6,6,121},{5,6,227},{4,7,56},{5,6,227},{6,6,40},{6,6,40},{6,6,40},{6,6,72},{6,6,76},{6,6,108},{6,6,108},{6,6,305},{5,6,139},{5,6,259},{6,6,4},{6,6,4},{6,6,4},{6,6,36},{7,4,8}, +{6,6,72},{6,6,72},{5,6,178},{7,5,8},{5,6,178},{6,6,20},{6,6,4},{6,6,53},{6,6,85},{6,6,20},{4,7,20},{6,6,85},{0,6,218},{4,7,20},{0,6,218},{6,0,36},{6,0,36},{6,0,36},{6,0,36},{6,6,72},{6,6,72},{6,6,72},{6,6,136},{5,6,90},{5,6,90},{6,7,118},{6,6,168},{6,6,105},{6,6,73},{6,7,175},{6,6,76},{6,6,13}, +{6,6,34},{6,6,88},{6,6,46},{6,7,114},{6,6,164},{6,6,101},{6,6,69},{7,5,56},{6,6,72},{6,6,9},{6,6,30},{6,6,72},{6,6,30},{6,6,104},{6,6,104},{6,6,104},{6,6,72},{6,6,44},{6,6,12},{6,6,12},{6,6,33},{6,6,24},{6,6,45},{6,6,100},{6,6,100},{6,6,100},{6,6,68},{7,5,40},{6,6,8},{6,6,8},{6,6,29},{6,6,8}, +{6,6,29},{7,5,20},{6,6,100},{6,6,37},{6,6,5},{7,5,20},{5,7,50},{6,6,5},{0,6,26},{5,7,50},{0,6,26},{6,0,68},{6,0,68},{6,0,68},{6,0,68},{6,6,8},{6,6,8},{6,6,8},{6,6,8},{6,6,20},{6,6,20},{6,7,406},{6,7,382},{6,6,633},{6,6,537},{6,7,159},{6,7,255},{6,6,381},{6,6,226},{5,7,228},{6,6,142},{6,7,306}, +{6,7,282},{7,6,454},{7,6,414},{6,7,59},{7,6,139},{7,6,211},{6,6,126},{5,7,59},{6,6,126},{6,7,357},{6,7,357},{6,7,357},{6,6,456},{6,7,110},{6,7,230},{6,7,230},{6,6,145},{6,6,152},{6,6,61},{6,7,257},{6,7,257},{6,7,257},{7,6,333},{6,7,10},{7,6,130},{7,6,130},{6,6,45},{5,7,10},{6,6,45},{7,6,50},{6,7,26},{7,6,130}, +{7,6,90},{7,6,50},{7,6,18},{7,6,90},{0,6,90},{7,6,18},{0,6,90},{6,0,356},{6,0,356},{6,0,356},{6,0,356},{6,7,109},{6,7,109},{6,7,109},{6,6,136},{6,6,52},{6,6,52},{7,6,374},{7,6,454},{7,6,634},{7,6,666},{7,6,297},{7,6,409},{7,6,589},{7,6,697},{6,7,56},{7,6,536},{7,6,149},{7,6,229},{7,6,409},{7,6,441},{7,6,72}, +{6,7,56},{6,7,296},{7,6,472},{6,7,56},{7,6,472},{7,6,310},{7,6,310},{7,6,310},{7,6,342},{7,6,233},{7,6,265},{7,6,265},{7,6,373},{6,7,40},{7,6,212},{7,6,85},{7,6,85},{7,6,85},{7,6,117},{7,6,8},{7,6,40},{7,6,40},{7,6,148},{7,6,40},{7,6,148},{7,6,68},{6,7,116},{7,6,328},{6,7,260},{7,6,68},{6,7,20},{6,7,260}, +{0,6,468},{6,7,20},{0,6,468},{7,0,306},{7,0,306},{7,0,306},{7,0,306},{7,6,229},{7,6,229},{7,6,229},{7,6,229},{6,7,36},{6,7,36},{7,7,68},{7,7,60},{7,7,123},{7,7,163},{7,7,116},{7,7,148},{7,7,211},{7,7,430},{6,7,248},{6,7,328},{7,7,19},{7,7,11},{7,7,74},{7,7,114},{7,7,67},{7,7,99},{7,7,162},{6,7,264},{7,7,171}, +{6,7,264},{7,7,59},{7,7,59},{7,7,59},{7,7,99},{7,7,107},{7,7,147},{7,7,147},{7,7,366},{6,7,104},{6,7,264},{7,7,10},{7,7,10},{7,7,10},{7,7,50},{7,7,58},{7,7,98},{7,7,98},{6,7,200},{6,7,40},{6,7,200},{7,7,18},{7,7,10},{7,7,73},{6,7,100},{7,7,18},{7,7,50},{6,7,100},{0,7,260},{7,7,50},{0,7,260},{7,0,50}, +{7,0,50},{7,0,50},{7,0,50},{7,6,85},{7,6,85},{7,6,85},{7,6,149},{6,7,68},{6,7,68},{7,7,196},{7,7,124},{7,7,75},{7,7,51},{7,7,148},{7,7,52},{7,7,3},{7,7,46},{7,7,84},{7,7,70},{7,7,195},{7,7,123},{7,7,74},{7,7,50},{7,7,147},{7,7,51},{7,7,2},{7,7,45},{7,7,59},{7,7,45},{7,7,75},{7,7,75},{7,7,75}, +{7,7,51},{7,7,27},{7,7,3},{7,7,3},{7,7,46},{7,7,35},{7,7,70},{7,7,74},{7,7,74},{7,7,74},{7,7,50},{7,7,26},{7,7,2},{7,7,2},{7,7,45},{7,7,10},{7,7,45},{7,7,146},{7,7,74},{7,7,25},{7,7,1},{7,7,146},{7,7,50},{7,7,1},{0,7,36},{7,7,50},{0,7,36},{7,0,50},{7,0,50},{7,0,50},{7,0,50},{7,7,2}, +{7,7,2},{7,7,2},{7,7,10},{7,7,34},{7,7,34},{7,7,548},{7,7,476},{7,7,427},{7,7,355},{7,7,404},{7,7,260},{7,7,211},{7,7,106},{7,7,132},{7,7,34},{7,7,467},{7,7,395},{7,7,346},{7,7,274},{7,7,323},{7,7,179},{7,7,130},{7,7,25},{7,7,123},{7,7,25},{7,7,427},{7,7,427},{7,7,427},{7,7,355},{7,7,283},{7,7,211},{7,7,211}, +{7,7,106},{7,7,83},{7,7,34},{7,7,346},{7,7,346},{7,7,346},{7,7,274},{7,7,202},{7,7,130},{7,7,130},{7,7,25},{7,7,74},{7,7,25},{7,7,242},{7,7,170},{7,7,121},{7,7,49},{7,7,242},{7,7,98},{7,7,49},{0,7,0},{7,7,98},{0,7,0},{7,0,306},{7,0,306},{7,0,306},{7,0,306},{7,7,162},{7,7,162},{7,7,162},{7,7,106},{7,7,34}, +{7,7,34},{0,0,122},{0,0,50},{0,0,1},{0,0,25},{0,0,158},{0,0,110},{0,0,61},{0,0,244},{0,0,210},{0,0,280},{0,0,122},{0,0,50},{0,0,1},{0,0,25},{0,0,158},{0,0,110},{0,0,61},{0,0,244},{0,0,174},{0,0,244},{0,0,1},{0,0,1},{0,0,1},{0,0,25},{0,0,37},{0,0,61},{0,0,61},{0,0,244},{0,0,161},{0,0,280},{0,0,1}, +{0,0,1},{0,0,1},{0,0,25},{0,0,37},{0,0,61},{0,0,61},{0,0,244},{0,0,125},{0,0,244},{0,0,122},{0,0,50},{0,0,1},{0,0,25},{0,0,122},{0,0,74},{0,0,25},{0,0,144},{0,0,74},{0,0,144},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,36},{0,0,36},{0,0,36},{0,0,100},{0,0,136},{0,0,136},{0,1,81},{0,1,81},{0,0,122}, +{0,0,82},{0,1,328},{0,0,243},{0,0,82},{0,0,129},{0,0,319},{0,0,165},{0,1,81},{0,1,81},{0,0,122},{0,0,82},{0,1,328},{0,0,243},{0,0,82},{0,0,129},{0,0,283},{0,0,129},{0,1,45},{0,1,45},{0,1,45},{0,0,18},{0,0,58},{0,0,18},{0,0,18},{0,0,65},{0,0,94},{0,0,101},{0,1,45},{0,1,45},{0,1,45},{0,0,18},{0,0,58}, +{0,0,18},{0,0,18},{0,0,65},{0,0,58},{0,0,65},{0,1,72},{0,1,72},{0,0,113},{0,0,73},{0,1,72},{1,0,104},{0,0,73},{0,0,80},{1,0,104},{0,0,80},{0,0,9},{0,0,9},{0,0,9},{0,0,9},{0,0,9},{0,0,9},{0,0,9},{0,0,49},{0,0,85},{0,0,85},{0,2,225},{0,1,129},{0,1,449},{0,0,498},{0,1,264},{0,1,168},{0,0,402}, +{0,0,273},{0,0,687},{0,0,309},{0,2,225},{0,1,129},{0,1,449},{0,0,498},{0,1,264},{0,1,168},{0,0,402},{0,0,273},{1,0,248},{0,0,273},{0,1,125},{0,1,125},{0,1,125},{0,1,221},{0,1,68},{0,0,146},{0,0,146},{0,0,17},{0,0,158},{0,0,53},{0,1,125},{0,1,125},{0,1,125},{0,1,221},{0,1,68},{0,0,146},{0,0,146},{0,0,17},{0,0,122}, +{0,0,17},{1,0,72},{0,1,8},{1,0,292},{1,0,260},{1,0,72},{1,0,104},{1,0,260},{0,0,272},{1,0,104},{0,0,272},{0,0,121},{0,0,121},{0,0,121},{0,0,121},{0,0,25},{0,0,25},{0,0,25},{0,0,1},{0,0,37},{0,0,37},{0,2,514},{0,2,558},{0,1,610},{0,1,514},{0,2,297},{0,1,153},{0,1,153},{0,1,777},{0,1,392},{0,0,802},{1,1,347}, +{1,1,355},{1,1,446},{0,1,465},{0,2,248},{0,1,104},{0,1,104},{0,1,728},{0,1,248},{0,1,728},{0,2,414},{0,2,414},{0,2,414},{0,1,414},{0,1,149},{0,1,53},{0,1,53},{0,0,274},{0,1,292},{0,0,226},{1,0,229},{1,0,229},{1,0,229},{1,0,261},{1,0,68},{0,1,4},{0,1,4},{1,0,160},{1,0,52},{1,0,160},{0,2,104},{1,1,130},{0,1,200}, +{0,1,104},{0,2,104},{2,0,74},{0,1,104},{0,1,584},{2,0,74},{0,1,584},{0,0,410},{0,0,410},{0,0,410},{0,0,410},{0,1,49},{0,1,49},{0,1,49},{0,0,130},{0,0,82},{0,0,82},{1,1,464},{1,1,400},{1,1,365},{1,1,397},{1,1,572},{0,2,499},{0,1,387},{0,1,435},{0,1,428},{0,1,188},{1,1,140},{1,1,76},{1,1,41},{1,1,73},{1,1,248}, +{1,1,216},{0,1,131},{0,1,179},{2,0,264},{0,1,179},{1,1,364},{1,1,364},{1,1,364},{1,1,396},{0,2,314},{0,1,386},{0,1,386},{0,1,434},{0,1,67},{0,1,187},{1,1,40},{1,1,40},{1,1,40},{1,1,72},{0,2,58},{0,1,130},{0,1,130},{0,1,178},{0,1,58},{0,1,178},{0,3,72},{1,1,40},{1,1,5},{1,1,37},{0,3,72},{1,1,72},{1,1,37}, +{0,1,170},{1,1,72},{0,1,170},{1,0,360},{1,0,360},{1,0,360},{1,0,360},{0,2,265},{0,2,265},{0,2,265},{0,1,265},{0,1,18},{0,1,18},{1,2,178},{1,2,202},{1,1,189},{1,1,157},{1,2,463},{1,1,316},{1,1,169},{1,1,238},{0,2,412},{0,1,124},{1,2,78},{1,2,102},{1,1,89},{1,1,57},{2,0,248},{0,2,99},{1,1,69},{0,1,99},{3,0,248}, +{0,1,99},{1,1,140},{1,1,140},{1,1,140},{1,1,108},{1,1,152},{1,1,120},{1,1,120},{1,1,189},{0,1,275},{0,1,75},{1,1,40},{1,1,40},{1,1,40},{1,1,8},{1,1,52},{1,1,20},{1,1,20},{0,1,50},{1,1,68},{0,1,50},{1,2,74},{1,2,98},{1,1,85},{1,1,53},{1,2,74},{0,2,74},{1,1,53},{0,1,74},{0,2,74},{0,1,74},{1,0,104}, +{1,0,104},{1,0,104},{1,0,104},{1,1,116},{1,1,116},{1,1,116},{1,1,164},{0,1,50},{0,1,50},{1,3,226},{1,2,106},{1,2,466},{1,1,429},{1,2,255},{1,2,207},{1,1,345},{1,1,238},{0,2,252},{1,1,298},{1,3,222},{1,2,102},{1,2,462},{1,1,425},{1,2,251},{1,2,203},{1,1,341},{1,1,234},{0,2,251},{1,1,234},{1,2,105},{1,2,105},{1,2,105}, +{1,1,204},{1,2,86},{1,1,120},{1,1,120},{1,1,13},{0,2,83},{1,1,73},{1,2,101},{1,2,101},{1,2,101},{1,1,200},{2,0,52},{1,1,116},{1,1,116},{1,1,9},{3,0,52},{1,1,9},{2,1,74},{1,2,2},{2,1,274},{2,1,234},{2,1,74},{4,0,74},{2,1,234},{0,1,234},{4,0,74},{0,1,234},{1,0,104},{1,0,104},{1,0,104},{1,0,104},{1,1,20}, +{1,1,20},{1,1,20},{1,1,4},{1,1,64},{1,1,64},{1,3,450},{1,2,522},{1,2,562},{1,2,490},{1,3,295},{1,2,127},{1,2,167},{1,1,750},{1,2,428},{1,1,714},{2,2,400},{2,2,416},{2,2,521},{1,2,454},{2,1,251},{1,2,91},{1,2,131},{0,2,651},{4,0,251},{0,2,651},{1,3,369},{1,3,369},{1,3,369},{1,2,369},{1,2,118},{1,2,46},{1,2,46}, +{1,1,221},{0,2,163},{1,1,185},{2,1,257},{2,1,257},{2,1,257},{2,1,281},{0,4,50},{1,2,10},{1,2,10},{2,1,146},{2,1,50},{2,1,146},{3,0,80},{2,2,160},{1,2,202},{1,2,130},{3,0,80},{3,1,80},{1,2,130},{0,1,650},{3,1,80},{0,1,650},{1,0,360},{1,0,360},{1,0,360},{1,0,360},{1,2,37},{1,2,37},{1,2,37},{1,1,100},{1,1,64}, +{1,1,64},{2,2,500},{2,2,444},{2,2,423},{2,2,463},{1,4,588},{1,3,513},{1,2,329},{1,2,441},{0,3,284},{1,2,232},{2,2,139},{2,2,83},{2,2,62},{2,2,102},{3,0,251},{2,2,243},{1,2,104},{1,2,216},{3,1,251},{1,2,216},{2,2,419},{2,2,419},{2,2,419},{2,2,459},{1,3,277},{1,2,325},{1,2,325},{1,2,437},{1,2,68},{1,2,228},{2,2,58}, +{2,2,58},{2,2,58},{2,2,98},{1,3,52},{1,2,100},{1,2,100},{1,2,212},{1,2,52},{1,2,212},{1,4,74},{2,2,34},{2,2,13},{1,2,40},{1,4,74},{2,2,74},{1,2,40},{0,2,200},{2,2,74},{0,2,200},{2,0,410},{2,0,410},{2,0,410},{2,0,410},{1,3,241},{1,3,241},{1,3,241},{1,2,241},{1,2,32},{1,2,32},{2,3,202},{2,3,250},{2,2,183}, +{2,2,159},{2,2,460},{2,2,316},{2,2,183},{2,2,274},{1,3,468},{1,2,104},{2,3,81},{2,3,129},{2,2,62},{2,2,38},{1,4,251},{1,3,96},{2,2,62},{1,2,88},{2,2,251},{1,2,88},{2,2,147},{2,2,147},{2,2,147},{2,2,123},{2,2,171},{2,2,147},{2,2,147},{2,2,238},{0,3,219},{1,2,68},{2,2,26},{2,2,26},{2,2,26},{2,2,2},{2,2,50}, +{2,2,26},{2,2,26},{1,2,52},{5,0,50},{1,2,52},{2,3,80},{2,3,128},{2,2,61},{2,2,37},{2,3,80},{6,0,80},{2,2,37},{0,2,72},{6,0,80},{0,2,72},{2,0,122},{2,0,122},{2,0,122},{2,0,122},{2,2,146},{2,2,146},{2,2,146},{2,2,202},{1,2,32},{1,2,32},{2,3,234},{2,3,90},{2,2,455},{2,2,367},{2,3,253},{2,3,253},{2,2,295}, +{2,2,210},{1,3,244},{2,2,282},{2,3,225},{2,3,81},{2,2,446},{2,2,358},{2,3,244},{2,3,244},{2,2,286},{2,2,201},{6,0,244},{2,2,201},{2,3,90},{2,3,90},{2,3,90},{2,2,171},{2,3,109},{2,2,99},{2,2,99},{2,2,14},{1,3,100},{2,2,86},{2,3,81},{2,3,81},{2,3,81},{2,2,162},{3,1,50},{2,2,90},{2,2,90},{2,2,5},{4,1,50}, +{2,2,5},{4,0,80},{2,3,0},{3,2,260},{3,2,212},{4,0,80},{5,1,80},{3,2,212},{0,2,200},{5,1,80},{0,2,200},{2,0,90},{2,0,90},{2,0,90},{2,0,90},{2,2,18},{2,2,18},{2,2,18},{2,2,10},{2,2,82},{2,2,82},{2,4,394},{2,3,442},{2,3,522},{2,3,474},{2,4,301},{2,3,109},{2,3,189},{2,2,658},{2,3,472},{2,2,634},{2,4,369}, +{2,3,417},{2,3,497},{2,3,449},{3,2,244},{2,3,84},{2,3,164},{3,2,620},{5,1,244},{3,2,620},{2,4,330},{2,4,330},{2,4,330},{2,3,330},{2,3,93},{2,3,45},{2,3,45},{2,2,174},{1,3,132},{2,2,150},{3,2,289},{3,2,289},{3,2,289},{3,2,305},{4,0,52},{2,3,20},{2,3,20},{3,2,136},{3,2,52},{3,2,136},{2,4,80},{2,3,128},{2,3,208}, +{2,3,160},{2,4,80},{7,0,80},{2,3,160},{0,2,584},{7,0,80},{0,2,584},{2,0,314},{2,0,314},{2,0,314},{2,0,314},{2,3,29},{2,3,29},{2,3,29},{2,2,74},{2,2,50},{2,2,50},{3,3,544},{3,3,496},{3,3,489},{3,3,537},{2,4,535},{2,4,535},{2,3,279},{2,3,455},{1,4,292},{2,3,284},{3,3,144},{3,3,96},{3,3,89},{3,3,137},{4,1,244}, +{3,3,276},{2,3,83},{2,3,259},{4,2,244},{2,3,259},{3,3,480},{3,3,480},{3,3,480},{3,3,528},{2,4,246},{2,3,270},{2,3,270},{2,3,446},{2,3,75},{2,3,275},{3,3,80},{3,3,80},{3,3,80},{3,3,128},{2,4,50},{2,3,74},{2,3,74},{2,3,250},{7,0,50},{2,3,250},{5,0,80},{3,3,32},{3,3,25},{2,3,34},{5,0,80},{6,1,80},{2,3,34}, +{0,3,234},{6,1,80},{0,3,234},{3,0,464},{3,0,464},{3,0,464},{3,0,464},{2,4,221},{2,4,221},{2,4,221},{2,3,221},{2,3,50},{2,3,50},{3,4,234},{3,3,304},{3,3,185},{3,3,169},{3,3,452},{3,3,324},{3,3,205},{3,3,318},{1,4,452},{2,3,92},{3,4,90},{3,3,160},{3,3,41},{3,3,25},{5,0,244},{2,4,99},{3,3,61},{2,3,83},{3,3,244}, +{2,3,83},{3,3,160},{3,3,160},{3,3,160},{3,3,144},{3,3,196},{3,3,180},{3,3,180},{3,3,293},{2,3,187},{2,3,67},{3,3,16},{3,3,16},{3,3,16},{3,3,0},{3,3,52},{3,3,36},{3,3,36},{2,3,58},{6,1,52},{2,3,58},{4,2,80},{3,3,160},{3,3,41},{3,3,25},{4,2,80},{5,2,80},{3,3,25},{0,3,74},{5,2,80},{0,3,74},{3,0,144}, +{3,0,144},{3,0,144},{3,0,144},{3,3,180},{3,3,180},{3,3,180},{3,3,244},{2,3,18},{2,3,18},{3,4,202},{3,4,82},{3,3,393},{3,3,313},{3,4,259},{3,4,307},{3,3,253},{3,3,190},{2,4,244},{3,3,274},{3,4,186},{3,4,66},{3,3,377},{3,3,297},{3,4,243},{2,4,243},{3,3,237},{3,3,174},{7,1,243},{3,3,174},{3,4,81},{3,4,81},{3,4,81}, +{3,3,144},{3,4,138},{3,3,84},{3,3,84},{3,3,21},{2,4,123},{3,3,105},{3,4,65},{3,4,65},{3,4,65},{3,3,128},{4,2,52},{3,3,68},{3,3,68},{3,3,5},{5,2,52},{3,3,5},{5,1,74},{3,4,2},{4,3,250},{4,3,194},{5,1,74},{4,3,74},{4,3,194},{0,3,170},{4,3,74},{0,3,170},{3,0,80},{3,0,80},{3,0,80},{3,0,80},{3,3,20}, +{3,3,20},{3,3,20},{3,3,20},{3,3,104},{3,3,104},{3,5,346},{3,4,370},{3,4,490},{3,4,466},{3,5,315},{3,4,99},{3,4,219},{3,3,574},{2,4,468},{3,3,562},{3,5,330},{3,4,354},{3,4,474},{3,4,450},{4,3,243},{3,4,83},{3,4,203},{3,3,558},{6,2,243},{3,3,558},{3,5,297},{3,5,297},{3,5,297},{3,4,297},{3,4,74},{3,4,50},{3,4,50}, +{3,3,133},{2,4,107},{3,3,121},{3,5,281},{3,5,281},{3,5,281},{3,4,281},{5,1,58},{3,4,34},{3,4,34},{3,3,117},{7,1,58},{3,3,117},{6,0,74},{3,4,98},{3,4,218},{3,4,194},{6,0,74},{3,4,74},{3,4,194},{0,3,522},{3,4,74},{0,3,522},{3,0,272},{3,0,272},{3,0,272},{3,0,272},{3,4,25},{3,4,25},{3,4,25},{3,3,52},{3,3,40}, +{3,3,40},{4,4,596},{4,4,556},{4,4,563},{4,4,619},{3,5,477},{3,4,477},{3,4,237},{3,4,477},{2,5,308},{3,4,344},{4,4,155},{4,4,115},{4,4,122},{4,4,178},{5,2,243},{2,5,299},{3,4,68},{2,4,308},{5,3,243},{2,4,308},{4,4,547},{4,4,547},{4,4,547},{4,4,603},{3,5,221},{3,4,221},{3,4,221},{3,4,461},{3,4,88},{3,4,328},{4,4,106}, +{4,4,106},{4,4,106},{4,4,162},{6,0,52},{3,4,52},{3,4,52},{2,4,292},{3,4,52},{2,4,292},{4,4,74},{4,4,34},{4,4,41},{3,4,32},{4,4,74},{7,2,74},{3,4,32},{0,4,272},{7,2,74},{0,4,272},{4,0,522},{4,0,522},{4,0,522},{4,0,522},{3,4,205},{3,4,205},{3,4,205},{3,4,205},{3,4,72},{3,4,72},{4,5,274},{4,4,300},{4,4,195}, +{4,4,187},{4,4,452},{4,4,340},{4,4,235},{4,4,370},{2,5,404},{3,4,88},{4,5,105},{4,4,131},{4,4,26},{4,4,18},{6,1,243},{3,5,108},{4,4,66},{3,4,84},{4,4,243},{3,4,84},{4,4,179},{4,4,179},{4,4,179},{4,4,171},{4,4,227},{4,4,219},{4,4,219},{4,4,354},{3,4,152},{3,4,72},{4,4,10},{4,4,10},{4,4,10},{4,4,2},{5,2,58}, +{4,4,50},{4,4,50},{3,4,68},{7,2,58},{3,4,68},{5,3,74},{4,4,130},{4,4,25},{4,4,17},{5,3,74},{6,3,74},{4,4,17},{0,4,80},{6,3,74},{0,4,80},{4,0,170},{4,0,170},{4,0,170},{4,0,170},{4,3,205},{4,3,205},{4,3,205},{4,3,269},{3,4,8},{3,4,8},{4,5,178},{4,5,82},{4,4,339},{4,4,267},{4,5,273},{4,5,369},{4,4,219}, +{4,4,178},{3,5,252},{4,4,274},{4,5,153},{4,5,57},{4,4,314},{4,4,242},{7,0,248},{3,5,204},{4,4,194},{4,4,153},{3,5,248},{4,4,153},{4,5,78},{4,5,78},{4,5,78},{4,4,123},{4,4,147},{4,4,75},{4,4,75},{4,4,34},{3,5,152},{4,4,130},{4,5,53},{4,5,53},{4,5,53},{4,4,98},{6,1,58},{4,4,50},{4,4,50},{4,4,9},{6,3,58}, +{4,4,9},{6,2,72},{4,5,8},{5,4,244},{5,4,180},{6,2,72},{5,4,72},{5,4,180},{0,4,144},{5,4,72},{0,4,144},{4,0,74},{4,0,74},{4,0,74},{4,0,74},{4,4,26},{4,4,26},{4,4,26},{4,4,34},{4,4,130},{4,4,130},{4,6,306},{4,5,306},{4,5,466},{4,5,466},{4,6,337},{4,5,97},{4,5,257},{4,4,498},{3,5,412},{4,4,498},{4,6,297}, +{4,5,297},{4,5,457},{4,5,457},{5,4,248},{4,5,88},{4,5,248},{4,4,489},{7,3,248},{4,4,489},{4,5,270},{4,5,270},{4,5,270},{4,5,270},{4,5,61},{4,5,61},{4,5,61},{4,4,98},{3,5,88},{4,4,98},{4,5,261},{4,5,261},{4,5,261},{4,5,261},{7,0,52},{4,5,52},{4,5,52},{4,4,89},{3,5,52},{4,4,89},{7,1,72},{4,5,72},{4,5,232}, +{3,5,232},{7,1,72},{4,5,72},{3,5,232},{0,4,464},{4,5,72},{0,4,464},{4,0,234},{4,0,234},{4,0,234},{4,0,234},{4,5,25},{4,5,25},{4,5,25},{4,4,34},{4,4,34},{4,4,34},{5,5,656},{5,5,624},{5,5,645},{5,5,709},{4,6,427},{4,5,403},{4,5,203},{4,5,507},{4,5,332},{4,5,412},{5,5,172},{5,5,140},{5,5,161},{5,5,225},{6,3,248}, +{4,5,259},{4,5,59},{3,5,339},{6,4,248},{3,5,339},{5,5,620},{5,5,620},{5,5,620},{5,5,684},{4,6,202},{4,5,178},{4,5,178},{4,5,482},{4,5,107},{4,5,387},{5,5,136},{5,5,136},{5,5,136},{5,5,200},{7,1,58},{4,5,34},{4,5,34},{5,4,290},{7,3,58},{5,4,290},{5,5,72},{5,5,40},{5,5,61},{4,5,34},{5,5,72},{3,6,72},{4,5,34}, +{0,5,314},{3,6,72},{0,5,314},{5,0,584},{5,0,584},{5,0,584},{5,0,584},{4,5,169},{4,5,169},{4,5,169},{4,5,193},{4,5,98},{4,5,98},{5,6,322},{5,5,304},{5,5,213},{5,5,213},{5,5,460},{5,5,364},{5,5,273},{5,5,430},{3,6,364},{4,5,92},{5,6,126},{5,5,108},{5,5,17},{5,5,17},{7,2,248},{4,6,123},{5,5,77},{4,5,91},{5,5,248}, +{4,5,91},{5,5,204},{5,5,204},{5,5,204},{5,5,204},{5,5,264},{5,5,264},{5,5,264},{5,5,421},{4,5,123},{4,5,83},{5,5,8},{5,5,8},{5,5,8},{5,5,8},{6,3,52},{5,5,68},{5,5,68},{4,5,82},{6,4,52},{4,5,82},{6,4,72},{5,5,104},{5,5,13},{5,5,13},{6,4,72},{7,4,72},{5,5,13},{0,5,90},{7,4,72},{0,5,90},{5,0,200}, +{5,0,200},{5,0,200},{5,0,200},{5,4,221},{5,4,221},{5,4,221},{5,4,277},{4,5,2},{4,5,2},{5,6,162},{5,6,90},{5,5,293},{5,5,229},{5,6,295},{5,5,396},{5,5,193},{5,5,174},{4,6,268},{5,5,282},{5,6,126},{5,6,54},{5,5,257},{5,5,193},{5,6,259},{4,6,171},{5,5,157},{5,5,138},{4,6,259},{5,5,138},{5,6,81},{5,6,81},{5,6,81}, +{5,5,108},{5,5,136},{5,5,72},{5,5,72},{5,5,53},{4,6,187},{5,5,161},{5,6,45},{5,6,45},{5,6,45},{5,5,72},{7,2,52},{5,5,36},{5,5,36},{5,5,17},{5,5,52},{5,5,17},{7,3,74},{5,6,18},{5,5,221},{5,5,157},{7,3,74},{6,5,74},{5,5,157},{0,5,122},{6,5,74},{0,5,122},{5,0,72},{5,0,72},{5,0,72},{5,0,72},{5,5,36}, +{5,5,36},{5,5,36},{5,5,52},{5,5,160},{5,5,160},{5,7,274},{5,6,250},{5,6,450},{5,6,474},{5,6,343},{5,6,103},{5,6,303},{5,5,430},{4,6,364},{5,5,442},{5,7,270},{5,6,246},{5,6,446},{5,6,470},{7,3,251},{5,6,99},{5,6,299},{5,5,426},{6,5,251},{5,5,426},{5,6,225},{5,6,225},{5,6,225},{5,6,249},{5,6,54},{5,6,78},{5,6,78}, +{5,5,69},{4,6,75},{5,5,81},{5,6,221},{5,6,221},{5,6,221},{5,6,245},{5,6,50},{5,6,74},{5,6,74},{5,5,65},{4,6,50},{5,5,65},{5,7,74},{5,6,50},{5,6,250},{4,6,250},{5,7,74},{5,6,74},{4,6,250},{0,5,410},{5,6,74},{0,5,410},{5,0,200},{5,0,200},{5,0,200},{5,0,200},{5,6,29},{5,6,29},{5,6,29},{5,5,20},{5,5,32}, +{5,5,32},{6,6,724},{6,6,700},{6,6,735},{5,6,690},{5,7,385},{5,6,337},{5,6,177},{5,6,545},{5,6,328},{5,6,488},{6,6,195},{6,6,171},{6,6,206},{6,6,278},{7,4,259},{5,6,216},{5,6,56},{4,6,376},{7,5,259},{4,6,376},{5,7,654},{5,7,654},{5,7,654},{5,6,654},{5,7,189},{5,6,141},{5,6,141},{5,6,509},{5,6,132},{5,5,450},{6,5,157}, +{6,5,157},{6,5,157},{6,5,221},{6,5,52},{5,6,20},{5,6,20},{6,5,256},{3,7,52},{6,5,256},{6,6,74},{6,6,50},{6,6,85},{5,6,40},{6,6,74},{4,7,74},{5,6,40},{0,6,360},{4,7,74},{0,6,360},{5,0,650},{5,0,650},{5,0,650},{5,0,650},{5,6,137},{5,6,137},{5,6,137},{5,6,185},{5,6,128},{5,6,128},{6,7,378},{6,6,316},{6,6,239}, +{6,6,247},{6,6,476},{6,6,396},{6,6,319},{5,6,465},{4,7,332},{5,6,104},{6,7,153},{6,6,91},{6,6,14},{6,6,22},{6,6,251},{5,7,144},{6,6,94},{5,6,104},{4,7,251},{5,6,104},{6,6,235},{6,6,235},{6,6,235},{6,6,243},{6,6,307},{6,6,315},{6,6,315},{5,6,461},{5,6,100},{5,6,100},{6,6,10},{6,6,10},{6,6,10},{6,6,18},{7,4,50}, +{6,6,90},{6,6,90},{5,6,100},{7,5,50},{5,6,100},{7,5,74},{6,6,82},{6,6,5},{6,6,13},{7,5,74},{6,6,90},{6,6,13},{0,6,104},{6,6,90},{0,6,104},{6,0,234},{6,0,234},{6,0,234},{6,0,234},{6,5,241},{6,5,241},{6,5,241},{6,5,289},{5,6,0},{5,6,0},{6,7,154},{6,7,106},{6,6,255},{6,6,199},{6,7,325},{6,6,364},{6,6,175}, +{6,6,178},{5,7,292},{5,6,232},{6,7,105},{6,7,57},{6,6,206},{6,6,150},{7,5,251},{5,7,144},{6,6,126},{6,6,129},{5,7,276},{6,6,129},{6,7,90},{6,7,90},{6,7,90},{6,6,99},{6,6,131},{6,6,75},{6,6,75},{6,6,78},{6,6,219},{5,6,132},{6,7,41},{6,7,41},{6,7,41},{6,6,50},{7,5,82},{6,6,26},{6,6,26},{6,6,29},{6,6,50}, +{6,6,29},{6,7,80},{6,7,32},{6,6,181},{6,6,125},{6,7,80},{7,6,80},{6,6,125},{0,6,104},{7,6,80},{0,6,104},{6,0,74},{6,0,74},{6,0,74},{6,0,74},{6,6,50},{6,6,50},{6,6,50},{6,6,74},{5,6,128},{5,6,128},{6,7,442},{6,7,202},{6,7,442},{6,7,490},{6,7,309},{6,7,117},{6,7,357},{6,6,370},{5,7,324},{6,6,394},{6,7,441}, +{6,7,201},{6,7,441},{6,7,489},{7,6,276},{6,7,116},{6,7,356},{6,6,369},{7,6,244},{6,6,369},{6,7,186},{6,7,186},{6,7,186},{6,7,234},{6,7,53},{6,7,101},{6,7,101},{6,6,46},{5,7,68},{6,6,70},{6,7,185},{6,7,185},{6,7,185},{6,7,233},{6,7,52},{6,7,100},{6,7,100},{6,6,45},{5,7,52},{6,6,45},{7,6,80},{6,7,32},{6,7,272}, +{5,7,272},{7,6,80},{6,7,80},{5,7,272},{0,6,360},{6,7,80},{0,6,360},{6,0,170},{6,0,170},{6,0,170},{6,0,170},{6,7,37},{6,7,37},{6,7,37},{6,6,10},{6,6,34},{6,6,34},{7,7,800},{7,7,784},{6,7,802},{6,7,634},{6,7,903},{6,7,279},{6,7,159},{6,7,591},{6,7,332},{6,7,572},{7,7,224},{7,7,208},{7,7,257},{7,7,337},{7,6,339}, +{6,7,179},{6,7,59},{5,7,419},{6,7,251},{5,7,419},{7,6,745},{7,6,745},{7,6,745},{6,7,585},{6,7,278},{6,7,110},{6,7,110},{6,6,469},{6,7,163},{6,6,385},{7,6,169},{7,6,169},{7,6,169},{7,6,225},{7,6,50},{6,7,10},{6,7,10},{7,6,226},{7,6,82},{7,6,226},{7,7,80},{7,7,64},{7,7,113},{6,7,50},{7,7,80},{7,7,144},{6,7,50}, +{0,7,410},{7,7,144},{0,7,410},{6,0,584},{6,0,584},{6,0,584},{6,0,584},{6,7,109},{6,7,109},{6,7,109},{6,7,181},{6,6,160},{6,6,160},{7,7,393},{7,7,321},{7,7,272},{7,7,288},{7,7,477},{7,7,421},{7,7,372},{6,7,446},{6,7,483},{6,7,123},{7,7,137},{7,7,65},{7,7,16},{7,7,32},{7,7,221},{7,7,165},{7,7,116},{6,7,122},{7,7,261}, +{6,7,122},{7,7,272},{7,7,272},{7,7,272},{7,7,288},{7,7,356},{7,7,372},{7,7,372},{6,7,446},{6,7,83},{6,7,123},{7,7,16},{7,7,16},{7,7,16},{7,7,32},{7,7,100},{7,7,116},{7,7,116},{6,7,122},{6,7,82},{6,7,122},{7,7,121},{7,7,49},{7,7,0},{7,7,16},{7,7,121},{7,7,65},{7,7,16},{0,7,121},{7,7,65},{0,7,121},{7,0,272}, +{7,0,272},{7,0,272},{7,0,272},{7,6,265},{7,6,265},{7,6,265},{7,6,305},{6,7,2},{6,7,2},{7,7,265},{7,7,193},{7,7,144},{7,7,96},{7,7,253},{7,7,133},{7,7,84},{7,7,109},{7,7,297},{6,7,107},{7,7,201},{7,7,129},{7,7,80},{7,7,32},{7,7,189},{7,7,69},{7,7,20},{7,7,45},{7,7,101},{7,7,45},{7,7,144},{7,7,144},{7,7,144}, +{7,7,96},{7,7,132},{7,7,84},{7,7,84},{7,7,109},{7,7,248},{6,7,107},{7,7,80},{7,7,80},{7,7,80},{7,7,32},{7,7,68},{7,7,20},{7,7,20},{7,7,45},{7,7,52},{7,7,45},{7,7,185},{7,7,113},{7,7,64},{7,7,16},{7,7,185},{7,7,65},{7,7,16},{0,7,9},{7,7,65},{0,7,9},{7,0,80},{7,0,80},{7,0,80},{7,0,80},{7,7,68}, +{7,7,68},{7,7,68},{7,7,100},{6,7,98},{6,7,98},{7,7,386},{7,7,314},{7,7,265},{7,7,193},{7,7,278},{7,7,134},{7,7,85},{7,7,4},{7,7,138},{7,7,40},{7,7,386},{7,7,314},{7,7,265},{7,7,193},{7,7,278},{7,7,134},{7,7,85},{7,7,4},{7,7,102},{7,7,4},{7,7,265},{7,7,265},{7,7,265},{7,7,193},{7,7,157},{7,7,85},{7,7,85}, +{7,7,4},{7,7,89},{7,7,40},{7,7,265},{7,7,265},{7,7,265},{7,7,193},{7,7,157},{7,7,85},{7,7,85},{7,7,4},{7,7,53},{7,7,4},{7,7,242},{7,7,170},{7,7,121},{7,7,49},{7,7,242},{7,7,98},{7,7,49},{0,7,0},{7,7,98},{0,7,0},{7,0,144},{7,0,144},{7,0,144},{7,0,144},{7,7,36},{7,7,36},{7,7,36},{7,7,4},{7,7,40}, +{7,7,40},{0,1,200},{0,1,104},{0,0,153},{0,0,145},{0,1,561},{0,0,398},{0,0,181},{0,0,308},{0,0,498},{0,0,344},{0,1,200},{0,1,104},{0,0,153},{0,0,145},{0,1,561},{0,0,398},{0,0,181},{0,0,308},{0,0,462},{0,0,308},{0,0,9},{0,0,9},{0,0,9},{0,0,1},{0,0,45},{0,0,37},{0,0,37},{0,0,164},{0,0,137},{0,0,200},{0,0,9}, +{0,0,9},{0,0,9},{0,0,1},{0,0,45},{0,0,37},{0,0,37},{0,0,164},{0,0,101},{0,0,164},{0,1,200},{0,1,104},{0,0,153},{0,0,145},{0,1,200},{1,0,232},{0,0,145},{0,0,208},{1,0,232},{0,0,208},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,36},{0,0,36},{0,0,36},{0,0,100},{0,0,136},{0,0,136},{0,2,232},{0,1,40},{0,1,200}, +{0,1,392},{0,1,689},{0,1,593},{0,0,485},{0,0,500},{0,0,914},{0,0,536},{0,2,232},{0,1,40},{0,1,200},{0,1,392},{0,1,689},{0,1,593},{0,0,485},{0,0,500},{1,0,761},{0,0,500},{0,1,4},{0,1,4},{0,1,4},{0,0,49},{0,0,157},{0,0,85},{0,0,85},{0,0,100},{0,0,185},{0,0,136},{0,1,4},{0,1,4},{0,1,4},{0,0,49},{0,0,157}, +{0,0,85},{0,0,85},{0,0,100},{0,0,149},{0,0,100},{1,0,200},{0,1,40},{0,1,200},{0,1,392},{1,0,200},{1,0,232},{0,1,392},{0,0,400},{1,0,232},{0,0,400},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,36},{0,0,36},{0,0,36},{0,0,100},{0,0,136},{0,0,136},{0,2,281},{0,2,149},{0,1,121},{0,1,121},{0,2,808},{0,1,376},{0,1,216}, +{0,0,857},{0,1,1169},{0,0,893},{0,2,281},{0,2,149},{0,1,121},{0,1,121},{1,0,728},{0,1,376},{0,1,216},{0,0,857},{1,0,744},{0,0,857},{0,1,85},{0,1,85},{0,1,85},{0,1,85},{0,1,180},{0,1,180},{0,1,180},{0,0,73},{0,0,270},{0,0,109},{0,1,85},{0,1,85},{0,1,85},{0,1,85},{0,1,180},{0,1,180},{0,1,180},{0,0,73},{0,0,234}, +{0,0,73},{0,2,232},{0,2,100},{0,1,72},{0,1,72},{0,2,232},{2,0,202},{0,1,72},{0,1,712},{2,0,202},{0,1,712},{0,0,49},{0,0,49},{0,0,49},{0,0,49},{0,0,1},{0,0,1},{0,0,1},{0,0,9},{0,0,45},{0,0,45},{0,3,427},{0,2,229},{0,1,425},{0,1,233},{0,2,744},{0,1,504},{0,1,24},{0,1,584},{0,1,1105},{0,1,945},{0,3,427}, +{0,2,229},{1,1,414},{0,1,233},{0,2,744},{0,1,504},{0,1,24},{0,1,584},{2,0,739},{0,1,584},{0,2,229},{0,2,229},{0,2,229},{0,1,229},{0,1,212},{0,1,20},{0,1,20},{0,0,281},{0,0,590},{0,0,317},{0,2,229},{0,2,229},{0,2,229},{0,1,229},{1,0,180},{0,1,20},{0,1,20},{0,0,281},{1,0,164},{0,0,281},{0,3,202},{0,2,4},{1,1,53}, +{0,1,8},{0,3,202},{1,1,202},{0,1,8},{0,1,328},{1,1,202},{0,1,328},{0,0,225},{0,0,225},{0,0,225},{0,0,225},{0,1,16},{0,1,16},{0,1,16},{0,0,25},{0,0,61},{0,0,61},{0,4,842},{0,3,740},{1,1,1125},{0,1,834},{0,3,744},{0,2,267},{0,1,283},{0,1,267},{0,1,1356},{0,1,476},{1,2,302},{1,2,230},{1,1,225},{1,1,225},{0,3,728}, +{0,2,251},{0,1,267},{0,1,251},{1,1,728},{0,1,251},{0,3,596},{0,3,596},{0,3,596},{0,1,713},{0,2,186},{0,1,162},{0,1,162},{0,1,146},{0,1,395},{0,1,355},{1,1,104},{1,1,104},{1,1,104},{1,1,104},{0,2,170},{0,1,146},{0,1,146},{0,1,130},{0,1,170},{0,1,130},{1,2,202},{1,2,130},{1,1,125},{1,1,125},{1,2,202},{0,2,202},{1,1,125}, +{0,1,202},{0,2,202},{0,1,202},{0,0,592},{0,0,592},{0,0,592},{0,0,592},{0,1,41},{0,1,41},{0,1,41},{0,1,65},{0,0,200},{0,0,200},{1,3,738},{1,2,522},{1,2,722},{1,1,885},{0,4,987},{0,2,443},{0,2,379},{0,1,507},{0,2,1100},{0,1,412},{1,3,254},{1,2,38},{1,2,238},{1,1,401},{1,2,739},{0,2,299},{0,2,235},{0,1,363},{0,2,739}, +{0,1,363},{1,2,497},{1,2,497},{1,2,497},{1,1,524},{0,3,324},{0,2,154},{0,2,154},{0,1,146},{0,1,411},{0,1,51},{1,2,13},{1,2,13},{1,2,13},{1,1,40},{1,1,164},{0,2,10},{0,2,10},{0,1,2},{1,1,180},{0,1,2},{2,1,202},{1,2,34},{1,2,234},{0,2,234},{2,1,202},{4,0,202},{0,2,234},{0,1,362},{4,0,202},{0,1,362},{1,0,488}, +{1,0,488},{1,0,488},{1,0,488},{0,2,145},{0,2,145},{0,2,145},{0,1,145},{0,1,50},{0,1,50},{1,3,450},{1,3,362},{1,2,306},{1,2,330},{1,2,1015},{1,2,583},{1,2,463},{1,1,990},{0,2,940},{0,1,860},{1,3,254},{1,3,166},{1,2,110},{1,2,134},{0,4,731},{0,3,288},{0,2,155},{1,1,794},{2,1,731},{1,1,794},{1,2,257},{1,2,257},{1,2,257}, +{1,2,281},{1,2,390},{1,1,392},{1,1,392},{1,1,261},{0,2,315},{0,1,131},{1,2,61},{1,2,61},{1,2,61},{1,2,85},{2,0,164},{0,2,106},{0,2,106},{1,1,65},{3,0,164},{1,1,65},{3,0,208},{1,3,130},{1,2,74},{0,2,74},{3,0,208},{3,1,208},{0,2,74},{0,1,778},{3,1,208},{0,1,778},{1,0,232},{1,0,232},{1,0,232},{1,0,232},{1,1,196}, +{1,1,196},{1,1,196},{1,1,212},{0,1,82},{0,1,82},{1,4,440},{1,3,234},{1,2,402},{1,2,234},{1,3,767},{1,2,503},{1,2,63},{1,2,687},{0,3,1140},{0,2,396},{1,4,404},{1,3,198},{1,2,366},{1,2,198},{1,3,731},{0,3,224},{1,2,27},{0,2,387},{1,2,731},{0,2,387},{1,3,233},{1,3,233},{1,3,233},{1,2,233},{1,2,230},{1,2,62},{1,2,62}, +{1,1,277},{0,2,203},{1,1,385},{1,3,197},{1,3,197},{1,3,197},{1,2,197},{0,4,162},{1,2,26},{1,2,26},{1,1,241},{2,1,162},{1,1,241},{2,2,208},{1,3,2},{2,2,65},{1,2,2},{2,2,208},{5,0,208},{1,2,2},{0,2,362},{5,0,208},{0,2,362},{1,0,232},{1,0,232},{1,0,232},{1,0,232},{1,2,61},{1,2,61},{1,2,61},{1,1,52},{0,2,34}, +{0,2,34},{1,5,810},{1,3,702},{1,2,1122},{1,2,738},{1,4,748},{1,3,281},{1,2,225},{1,2,273},{0,3,780},{0,2,252},{2,3,329},{2,3,281},{2,2,222},{2,2,230},{2,2,731},{1,3,272},{1,2,216},{0,2,216},{5,0,731},{0,2,216},{1,4,547},{1,4,547},{1,4,547},{1,2,638},{1,3,173},{1,2,125},{1,2,125},{1,2,173},{0,3,339},{0,2,152},{2,2,122}, +{2,2,122},{2,2,122},{2,2,130},{1,3,164},{1,2,116},{1,2,116},{0,2,116},{1,2,164},{0,2,116},{2,3,208},{2,3,160},{2,2,101},{2,2,109},{2,3,208},{6,0,208},{2,2,109},{0,2,200},{6,0,208},{0,2,200},{1,0,538},{1,0,538},{1,0,538},{1,0,538},{1,2,25},{1,2,25},{1,2,25},{1,2,73},{0,2,52},{0,2,52},{2,3,810},{2,3,570},{2,3,810}, +{2,2,887},{1,4,940},{1,3,393},{1,3,393},{1,2,449},{0,3,1004},{1,2,392},{2,3,281},{2,3,41},{2,3,281},{2,2,358},{3,1,731},{1,3,272},{1,3,272},{1,2,328},{4,1,731},{1,2,328},{2,3,554},{2,3,554},{2,3,554},{2,2,563},{1,4,315},{1,3,137},{1,3,137},{1,2,125},{0,3,163},{1,2,68},{2,3,25},{2,3,25},{2,3,25},{2,2,34},{2,2,162}, +{1,3,16},{1,3,16},{1,2,4},{5,0,162},{1,2,4},{4,0,208},{2,3,32},{2,3,272},{1,3,272},{4,0,208},{5,1,208},{1,3,272},{0,2,328},{5,1,208},{0,2,328},{2,0,538},{2,0,538},{2,0,538},{2,0,538},{1,3,121},{1,3,121},{1,3,121},{1,2,121},{1,2,64},{1,2,64},{2,4,458},{2,3,410},{2,3,330},{2,3,378},{2,3,1013},{2,3,629},{1,3,505}, +{2,2,962},{0,4,772},{1,2,776},{2,4,233},{2,3,185},{2,3,105},{2,3,153},{4,0,724},{1,4,323},{1,3,144},{2,2,737},{3,2,724},{2,2,737},{2,3,266},{2,3,266},{2,3,266},{2,3,314},{2,3,437},{2,2,395},{2,2,395},{2,2,286},{1,3,356},{1,2,100},{2,3,41},{2,3,41},{2,3,41},{2,3,89},{3,1,162},{1,3,80},{1,3,80},{2,2,61},{4,1,162}, +{2,2,61},{2,4,208},{2,3,160},{2,3,80},{1,3,80},{2,4,208},{7,0,208},{1,3,80},{0,2,712},{7,0,208},{0,2,712},{2,0,250},{2,0,250},{2,0,250},{2,0,250},{2,2,226},{2,2,226},{2,2,226},{2,2,250},{1,2,64},{1,2,64},{2,5,436},{2,4,222},{2,3,362},{2,3,218},{2,4,773},{2,3,485},{2,3,85},{2,3,773},{0,4,804},{1,3,452},{2,5,387}, +{2,4,173},{2,3,313},{2,3,169},{2,4,724},{1,4,211},{2,3,36},{1,3,436},{7,0,724},{1,3,436},{2,4,218},{2,4,218},{2,4,218},{2,3,218},{2,3,229},{2,3,85},{2,3,85},{2,2,254},{1,3,196},{2,2,374},{2,4,169},{2,4,169},{2,4,169},{2,3,169},{4,0,164},{2,3,36},{2,3,36},{2,2,205},{3,2,164},{2,2,205},{3,3,202},{2,4,4},{3,3,81}, +{2,3,0},{3,3,202},{6,1,202},{2,3,0},{0,3,400},{6,1,202},{0,3,400},{2,0,218},{2,0,218},{2,0,218},{2,0,218},{2,3,85},{2,3,85},{2,3,85},{2,2,58},{1,3,52},{1,3,52},{2,5,760},{2,4,618},{2,3,1010},{2,3,650},{2,5,760},{2,4,303},{2,3,175},{2,3,287},{1,4,788},{1,3,236},{3,4,362},{3,4,338},{3,3,225},{3,3,241},{3,3,724}, +{2,4,299},{2,3,171},{1,3,211},{6,1,724},{1,3,211},{2,5,504},{2,5,504},{2,5,504},{2,3,569},{2,4,166},{2,3,94},{2,3,94},{2,3,206},{0,4,363},{1,3,155},{3,3,144},{3,3,144},{3,3,144},{3,3,160},{2,4,162},{2,3,90},{2,3,90},{1,3,130},{7,0,162},{1,3,130},{4,2,208},{2,4,130},{3,3,81},{3,3,97},{4,2,208},{5,2,208},{3,3,97}, +{0,3,202},{5,2,208},{0,3,202},{2,0,488},{2,0,488},{2,0,488},{2,0,488},{2,3,13},{2,3,13},{2,3,13},{2,3,85},{1,3,34},{1,3,34},{3,4,842},{3,4,626},{3,4,906},{3,3,897},{2,5,888},{2,4,351},{2,4,415},{2,3,399},{0,5,788},{2,3,380},{3,4,266},{3,4,50},{3,4,330},{3,3,321},{4,2,724},{2,4,251},{2,4,315},{2,3,299},{5,2,724}, +{2,3,299},{3,4,617},{3,4,617},{3,4,617},{3,3,608},{2,5,312},{2,4,126},{2,4,126},{2,3,110},{1,4,164},{2,3,91},{3,4,41},{3,4,41},{3,4,41},{3,3,32},{3,3,164},{2,4,26},{2,4,26},{2,3,10},{6,1,164},{2,3,10},{5,1,202},{3,4,34},{3,4,314},{3,3,305},{5,1,202},{4,3,202},{3,3,305},{0,3,298},{4,3,202},{0,3,298},{3,0,592}, +{3,0,592},{3,0,592},{3,0,592},{2,4,101},{2,4,101},{2,4,101},{2,3,101},{2,3,82},{2,3,82},{3,5,474},{3,4,402},{3,4,362},{3,4,434},{3,4,1019},{3,4,683},{2,4,463},{3,3,942},{1,5,804},{2,3,700},{3,5,218},{3,4,146},{3,4,106},{3,4,178},{5,1,723},{2,5,364},{2,4,139},{3,3,686},{4,3,723},{3,3,686},{3,4,281},{3,4,281},{3,4,281}, +{3,4,353},{3,4,490},{2,4,382},{2,4,382},{3,3,317},{1,4,324},{2,3,75},{3,4,25},{3,4,25},{3,4,25},{3,4,97},{4,2,164},{2,4,58},{2,4,58},{3,3,61},{5,2,164},{3,3,61},{6,0,202},{3,4,130},{3,4,90},{2,4,90},{6,0,202},{3,4,202},{2,4,90},{0,3,650},{3,4,202},{0,3,650},{3,0,272},{3,0,272},{3,0,272},{3,0,272},{3,3,260}, +{3,3,260},{3,3,260},{3,3,292},{2,3,50},{2,3,50},{3,6,440},{3,5,218},{3,4,330},{3,4,210},{3,5,787},{3,4,475},{3,4,115},{3,4,867},{1,5,772},{2,4,516},{3,6,376},{3,5,154},{3,4,266},{3,4,146},{6,0,723},{2,5,204},{3,4,51},{1,4,478},{3,4,723},{1,4,478},{3,5,209},{3,5,209},{3,5,209},{3,4,209},{3,4,234},{3,4,114},{3,4,114}, +{3,3,237},{2,4,195},{3,3,369},{3,5,145},{3,5,145},{3,5,145},{3,4,145},{5,1,170},{3,4,50},{3,4,50},{3,3,173},{7,1,170},{3,3,173},{4,4,200},{3,5,10},{4,4,101},{3,4,2},{4,4,200},{7,2,200},{3,4,2},{0,4,442},{7,2,200},{0,4,442},{3,0,208},{3,0,208},{3,0,208},{3,0,208},{3,3,100},{3,3,100},{3,3,100},{3,3,68},{2,4,74}, +{2,4,74},{3,6,692},{3,5,542},{3,4,906},{3,4,570},{3,6,780},{3,5,333},{3,4,133},{3,4,309},{2,5,804},{2,4,228},{4,5,401},{4,4,395},{4,4,234},{4,4,258},{4,4,723},{3,5,332},{3,4,132},{2,4,212},{7,2,723},{2,4,212},{3,6,467},{3,6,467},{3,6,467},{3,4,506},{3,5,165},{3,4,69},{3,4,69},{3,4,245},{1,5,324},{2,4,164},{4,4,170}, +{4,4,170},{4,4,170},{4,4,194},{6,0,164},{3,4,68},{3,4,68},{2,4,148},{3,4,164},{2,4,148},{5,3,202},{3,5,100},{4,4,65},{4,4,89},{5,3,202},{6,3,202},{4,4,89},{0,4,208},{6,3,202},{0,4,208},{3,0,442},{3,0,442},{3,0,442},{3,0,442},{3,4,5},{3,4,5},{3,4,5},{3,4,101},{2,4,20},{2,4,20},{4,5,882},{4,5,690},{4,4,955}, +{4,4,915},{3,6,844},{3,5,317},{3,5,445},{3,4,357},{1,6,772},{3,4,376},{4,5,257},{4,5,65},{4,4,330},{4,4,290},{5,3,723},{3,5,236},{3,5,364},{3,4,276},{6,3,723},{3,4,276},{4,5,686},{4,5,686},{4,5,686},{4,4,659},{3,6,315},{3,5,121},{3,5,121},{3,4,101},{2,5,171},{3,4,120},{4,5,61},{4,5,61},{4,5,61},{4,4,34},{5,2,170}, +{3,5,40},{3,5,40},{3,4,20},{7,2,170},{3,4,20},{6,2,200},{4,5,40},{4,4,305},{4,4,265},{6,2,200},{5,4,200},{4,4,265},{0,4,272},{5,4,200},{0,4,272},{4,0,650},{4,0,650},{4,0,650},{4,0,650},{3,5,85},{3,5,85},{3,5,85},{3,4,85},{3,4,104},{3,4,104},{4,6,498},{4,5,402},{4,5,402},{4,5,498},{3,7,1017},{3,6,700},{3,5,429}, +{3,4,917},{2,6,844},{3,4,632},{4,6,209},{4,5,113},{4,5,113},{4,5,209},{6,2,728},{3,6,411},{3,5,140},{3,4,628},{5,4,728},{3,4,628},{4,5,302},{4,5,302},{4,5,302},{4,5,398},{3,6,459},{3,5,329},{3,5,329},{3,4,341},{2,5,283},{3,4,56},{4,5,13},{4,5,13},{4,5,13},{4,5,109},{6,1,170},{3,5,40},{3,5,40},{3,4,52},{6,3,170}, +{3,4,52},{7,1,200},{4,5,104},{4,5,104},{3,5,104},{7,1,200},{4,5,200},{3,5,104},{0,4,592},{4,5,200},{0,4,592},{4,0,298},{4,0,298},{4,0,298},{4,0,298},{4,4,298},{4,4,298},{4,4,298},{3,4,325},{3,4,40},{3,4,40},{4,7,452},{4,6,222},{4,5,306},{4,5,210},{4,6,809},{4,5,473},{4,5,153},{4,5,969},{2,6,748},{3,5,588},{4,7,371}, +{4,6,141},{4,5,225},{4,5,129},{7,1,728},{3,6,203},{4,5,72},{2,5,513},{4,5,728},{2,5,513},{4,6,206},{4,6,206},{4,6,206},{4,5,206},{4,5,245},{4,5,149},{4,5,149},{4,4,226},{3,5,200},{4,4,370},{4,6,125},{4,6,125},{4,6,125},{4,5,125},{7,0,164},{4,5,68},{4,5,68},{4,4,145},{3,5,164},{4,4,145},{5,5,202},{4,6,20},{4,5,104}, +{4,5,8},{5,5,202},{3,6,202},{4,5,8},{0,5,488},{3,6,202},{0,5,488},{4,0,202},{4,0,202},{4,0,202},{4,0,202},{4,4,106},{4,4,106},{4,4,106},{4,4,82},{3,5,100},{3,5,100},{4,7,632},{4,6,474},{4,5,810},{4,5,498},{4,7,808},{4,6,371},{4,5,99},{4,5,339},{3,6,828},{3,5,228},{5,6,446},{5,5,396},{5,5,249},{5,5,281},{5,5,728}, +{4,6,371},{4,5,99},{3,5,219},{3,6,728},{3,5,219},{4,7,436},{4,7,436},{4,7,436},{4,5,449},{4,6,170},{4,5,50},{4,5,50},{4,5,290},{2,6,291},{3,5,179},{5,5,200},{5,5,200},{5,5,200},{5,5,232},{7,1,170},{4,5,50},{4,5,50},{3,5,170},{7,3,170},{3,5,170},{6,4,200},{4,6,74},{5,5,53},{5,5,85},{6,4,200},{7,4,200},{5,5,85}, +{0,5,218},{7,4,200},{0,5,218},{4,0,400},{4,0,400},{4,0,400},{4,0,400},{4,5,1},{4,5,1},{4,5,1},{4,4,100},{3,5,10},{3,5,10},{5,6,930},{5,6,762},{5,5,973},{5,5,941},{4,7,808},{4,6,291},{4,6,483},{4,5,323},{2,7,764},{4,5,380},{5,6,254},{5,6,86},{5,5,297},{5,5,265},{6,4,728},{4,6,227},{5,5,373},{4,5,259},{7,4,728}, +{4,5,259},{5,5,748},{5,5,748},{5,5,748},{5,5,716},{4,6,298},{4,6,122},{4,6,122},{4,5,98},{3,6,184},{4,5,155},{5,5,72},{5,5,72},{5,5,72},{5,5,40},{6,3,164},{4,6,58},{4,6,58},{4,5,34},{6,4,164},{4,5,34},{7,3,202},{5,6,50},{5,5,261},{5,5,229},{7,3,202},{6,5,202},{5,5,229},{0,5,250},{6,5,202},{0,5,250},{5,0,712}, +{5,0,712},{5,0,712},{5,0,712},{4,6,73},{4,6,73},{4,6,73},{4,5,73},{4,5,130},{4,5,130},{5,7,530},{5,6,410},{5,6,450},{5,6,570},{5,6,1055},{4,7,720},{4,6,403},{4,5,819},{3,7,892},{4,5,572},{5,7,206},{5,6,86},{5,6,126},{5,6,246},{5,6,731},{3,7,387},{4,6,147},{4,5,563},{4,6,731},{4,5,563},{5,6,329},{5,6,329},{5,6,329}, +{5,5,428},{4,7,420},{4,6,282},{4,6,282},{4,5,290},{3,6,248},{4,5,43},{5,6,5},{5,6,5},{5,6,5},{5,5,104},{7,2,164},{4,6,26},{4,6,26},{4,5,34},{5,5,164},{4,5,34},{5,7,202},{5,6,82},{5,6,122},{4,6,122},{5,7,202},{5,6,202},{4,6,122},{0,5,538},{5,6,202},{0,5,538},{5,0,328},{5,0,328},{5,0,328},{5,0,328},{4,6,281}, +{4,6,281},{4,6,281},{4,5,281},{4,5,34},{4,5,34},{5,7,498},{5,7,234},{5,6,290},{5,6,218},{5,7,839},{5,6,479},{5,6,199},{5,6,1079},{3,7,732},{4,6,668},{5,7,398},{5,7,134},{5,6,190},{5,6,118},{6,5,731},{4,7,208},{5,6,99},{3,6,554},{3,7,731},{3,6,554},{5,7,209},{5,7,209},{5,7,209},{5,6,209},{5,6,262},{5,6,190},{5,6,190}, +{5,5,221},{4,6,211},{4,5,315},{5,7,109},{5,7,109},{5,7,109},{5,6,109},{5,6,162},{5,6,90},{5,6,90},{5,5,121},{4,6,162},{5,5,121},{7,4,208},{5,7,34},{5,6,90},{5,6,18},{7,4,208},{7,5,208},{5,6,18},{0,6,538},{7,5,208},{0,6,538},{5,0,200},{5,0,200},{5,0,200},{5,0,200},{5,5,116},{5,5,116},{5,5,116},{5,5,100},{4,6,130}, +{4,6,130},{5,7,1074},{5,7,414},{5,6,722},{5,6,434},{5,7,857},{5,7,417},{5,6,73},{5,6,377},{4,7,860},{4,6,236},{6,7,497},{6,6,403},{6,6,270},{6,6,310},{7,4,731},{4,7,379},{5,6,72},{4,6,232},{7,5,731},{4,6,232},{5,7,398},{5,7,398},{5,7,398},{5,6,398},{5,7,181},{5,6,37},{5,6,37},{5,6,341},{3,7,264},{4,6,200},{6,6,234}, +{6,6,234},{6,6,234},{6,6,274},{6,5,164},{5,6,36},{5,6,36},{4,6,196},{3,7,164},{4,6,196},{7,5,202},{5,7,52},{6,6,45},{5,6,72},{7,5,202},{6,6,218},{5,6,72},{0,6,232},{6,6,218},{0,6,232},{5,0,362},{5,0,362},{5,0,362},{5,0,362},{5,6,1},{5,6,1},{5,6,1},{5,5,82},{4,6,4},{4,6,4},{6,7,986},{6,7,842},{6,6,999}, +{6,6,975},{5,7,1417},{5,7,273},{5,6,505},{5,6,297},{4,7,828},{5,6,392},{6,7,257},{6,7,113},{6,6,270},{6,6,246},{7,5,739},{5,7,224},{6,6,366},{5,6,248},{6,6,731},{5,6,248},{6,6,803},{6,6,803},{6,6,803},{6,6,779},{5,7,261},{5,7,129},{5,7,129},{5,6,101},{4,7,203},{5,6,196},{6,6,74},{6,6,74},{6,6,74},{6,6,50},{7,4,162}, +{5,7,80},{5,7,80},{5,6,52},{7,5,162},{5,6,52},{6,7,208},{6,7,64},{6,6,221},{6,6,197},{6,7,208},{7,6,208},{6,6,197},{0,6,232},{7,6,208},{0,6,232},{5,0,778},{5,0,778},{5,0,778},{5,0,778},{5,7,65},{5,7,65},{5,7,65},{5,6,65},{5,6,160},{5,6,160},{6,7,762},{6,7,426},{6,7,506},{6,7,650},{6,7,1085},{5,7,641},{5,7,385}, +{5,6,729},{5,7,980},{5,6,520},{6,7,401},{6,7,65},{6,7,145},{6,7,289},{6,7,724},{5,7,416},{5,7,160},{5,6,504},{5,7,724},{5,6,504},{6,7,362},{6,7,362},{6,7,362},{6,6,443},{6,6,555},{5,7,241},{5,7,241},{5,6,245},{4,7,219},{5,6,36},{6,7,1},{6,7,1},{6,7,1},{6,6,82},{7,5,194},{5,7,16},{5,7,16},{5,6,20},{6,6,162}, +{5,6,20},{7,6,208},{6,7,64},{6,7,144},{5,7,144},{7,6,208},{6,7,208},{5,7,144},{0,6,488},{6,7,208},{0,6,488},{6,0,362},{6,0,362},{6,0,362},{6,0,362},{5,7,241},{5,7,241},{5,7,241},{5,6,241},{5,6,32},{5,6,32},{6,7,1050},{6,7,522},{6,7,282},{6,7,234},{6,7,1069},{6,7,493},{6,7,253},{6,6,1122},{5,7,1012},{5,7,756},{7,7,843}, +{6,7,401},{6,7,161},{6,7,113},{7,6,724},{6,7,372},{6,7,132},{4,7,601},{6,7,756},{4,7,601},{6,7,266},{6,7,266},{6,7,266},{6,7,218},{6,7,285},{6,7,237},{6,7,237},{6,6,222},{5,7,228},{5,6,260},{6,7,145},{6,7,145},{6,7,145},{6,7,97},{6,7,164},{6,7,116},{6,7,116},{6,6,101},{5,7,164},{6,6,101},{7,7,218},{7,7,178},{6,7,80}, +{6,7,32},{7,7,218},{6,7,272},{6,7,32},{0,7,592},{6,7,272},{0,7,592},{6,0,202},{6,0,202},{6,0,202},{6,0,202},{6,6,130},{6,6,130},{6,6,130},{6,6,122},{5,6,160},{5,6,160},{6,7,1641},{6,7,1017},{6,7,617},{6,7,353},{6,7,1318},{6,7,430},{6,7,30},{6,7,398},{6,7,1035},{5,7,227},{7,7,393},{7,7,321},{7,7,272},{7,7,320},{7,7,621}, +{6,7,426},{6,7,26},{5,7,226},{6,7,594},{5,7,226},{6,7,617},{6,7,617},{6,7,617},{6,7,353},{6,7,294},{6,7,30},{6,7,30},{6,7,398},{5,7,291},{5,7,227},{7,7,272},{7,7,272},{7,7,272},{7,7,320},{7,6,162},{6,7,26},{6,7,26},{5,7,226},{7,6,194},{5,7,226},{7,7,137},{7,7,65},{7,7,16},{6,7,25},{7,7,137},{7,7,113},{6,7,25}, +{0,7,225},{7,7,113},{0,7,225},{6,0,328},{6,0,328},{6,0,328},{6,0,328},{6,7,5},{6,7,5},{6,7,5},{6,6,68},{5,7,2},{5,7,2},{7,7,985},{7,7,913},{7,7,864},{7,7,848},{7,7,1117},{6,7,654},{6,7,254},{6,7,110},{6,7,763},{5,7,179},{7,7,201},{7,7,129},{7,7,80},{7,7,64},{7,7,333},{7,7,245},{7,7,196},{6,7,74},{7,7,373}, +{6,7,74},{7,7,864},{7,7,864},{7,7,864},{7,7,848},{6,7,710},{6,7,254},{6,7,254},{6,7,110},{6,7,363},{5,7,179},{7,7,80},{7,7,80},{7,7,80},{7,7,64},{7,7,212},{7,7,196},{7,7,196},{6,7,74},{6,7,194},{6,7,74},{7,7,137},{7,7,65},{7,7,16},{7,7,0},{7,7,137},{7,7,49},{7,7,0},{0,7,49},{7,7,49},{0,7,49},{6,0,712}, +{6,0,712},{6,0,712},{6,0,712},{6,7,85},{6,7,85},{6,7,85},{6,7,61},{5,7,130},{5,7,130},{7,7,642},{7,7,570},{7,7,521},{7,7,449},{7,7,678},{7,7,534},{7,7,485},{6,7,205},{6,7,834},{6,7,34},{7,7,242},{7,7,170},{7,7,121},{7,7,49},{7,7,278},{7,7,134},{7,7,85},{6,7,9},{7,7,198},{6,7,9},{7,7,521},{7,7,521},{7,7,521}, +{7,7,449},{7,7,557},{7,7,485},{7,7,485},{6,7,205},{6,7,434},{6,7,34},{7,7,121},{7,7,121},{7,7,121},{7,7,49},{7,7,157},{7,7,85},{7,7,85},{6,7,9},{7,7,149},{6,7,9},{7,7,242},{7,7,170},{7,7,121},{7,7,49},{7,7,242},{7,7,98},{7,7,49},{0,7,0},{7,7,98},{0,7,0},{7,0,400},{7,0,400},{7,0,400},{7,0,400},{6,7,421}, +{6,7,421},{6,7,421},{6,7,205},{6,7,34},{6,7,34},{7,7,450},{7,7,378},{7,7,329},{7,7,257},{7,7,390},{7,7,246},{7,7,197},{7,7,148},{7,7,426},{6,7,130},{7,7,306},{7,7,234},{7,7,185},{7,7,113},{7,7,246},{7,7,102},{7,7,53},{7,7,4},{7,7,102},{7,7,4},{7,7,329},{7,7,329},{7,7,329},{7,7,257},{7,7,269},{7,7,197},{7,7,197}, +{7,7,148},{7,7,377},{6,7,130},{7,7,185},{7,7,185},{7,7,185},{7,7,113},{7,7,125},{7,7,53},{7,7,53},{7,7,4},{7,7,53},{7,7,4},{7,7,242},{7,7,170},{7,7,121},{7,7,49},{7,7,242},{7,7,98},{7,7,49},{0,7,0},{7,7,98},{0,7,0},{7,0,208},{7,0,208},{7,0,208},{7,0,208},{7,7,148},{7,7,148},{7,7,148},{7,7,148},{6,7,130}, +{6,7,130},{0,2,445},{0,1,157},{0,1,117},{0,1,405},{0,1,926},{0,1,806},{0,0,670},{0,0,741},{0,0,1169},{0,0,777},{0,2,445},{0,1,157},{0,1,117},{0,1,405},{0,1,926},{0,1,806},{0,0,670},{0,0,741},{1,0,990},{0,0,741},{0,1,36},{0,1,36},{0,1,36},{0,0,9},{0,0,85},{0,0,45},{0,0,45},{0,0,116},{0,0,145},{0,0,152},{0,1,36}, +{0,1,36},{0,1,36},{0,0,9},{0,0,85},{0,0,45},{0,0,45},{0,0,116},{0,0,109},{0,0,116},{1,0,421},{0,1,157},{0,1,117},{0,1,405},{1,0,421},{0,1,445},{0,1,405},{0,0,641},{0,1,445},{0,0,641},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,36},{0,0,36},{0,0,36},{0,0,100},{0,0,136},{0,0,136},{0,2,461},{0,2,109},{0,1,5}, +{0,1,101},{0,1,1326},{0,1,822},{0,1,462},{0,0,1205},{0,1,1783},{0,0,1241},{0,2,461},{0,2,109},{0,1,5},{0,1,101},{1,0,1294},{0,1,822},{0,1,462},{0,0,1205},{1,0,1262},{0,0,1205},{0,1,4},{0,1,4},{0,1,4},{0,1,100},{0,0,261},{0,0,157},{0,0,157},{0,0,116},{0,0,257},{0,0,152},{0,1,4},{0,1,4},{0,1,4},{0,1,100},{0,0,261}, +{0,0,157},{0,0,157},{0,0,116},{0,0,221},{0,0,116},{1,1,461},{0,2,109},{0,1,5},{0,1,101},{1,1,461},{2,0,421},{0,1,101},{0,1,901},{2,0,421},{0,1,901},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,36},{0,0,36},{0,0,36},{0,0,100},{0,0,136},{0,0,136},{0,3,430},{0,2,38},{0,1,158},{0,1,62},{0,2,1517},{0,1,989},{0,1,309}, +{0,1,1317},{0,1,1878},{0,1,1678},{0,3,430},{0,2,38},{0,1,158},{0,1,62},{0,2,1517},{0,1,989},{0,1,309},{0,1,1317},{0,1,1517},{0,1,1317},{0,2,13},{0,2,13},{0,2,13},{0,1,13},{0,1,356},{0,1,260},{0,1,260},{0,0,193},{0,0,446},{0,0,229},{0,2,13},{0,2,13},{0,2,13},{0,1,13},{0,1,356},{0,1,260},{0,1,260},{0,0,193},{0,0,410}, +{0,0,193},{0,3,421},{0,2,29},{0,1,149},{0,1,53},{0,3,421},{1,1,421},{0,1,53},{0,1,533},{1,1,421},{0,1,533},{0,0,9},{0,0,9},{0,0,9},{0,0,9},{0,0,9},{0,0,9},{0,0,9},{0,0,49},{0,0,85},{0,0,85},{0,4,602},{0,3,234},{0,2,518},{0,1,382},{0,3,1622},{0,2,825},{0,1,325},{0,1,821},{0,1,2022},{0,1,1182},{0,4,602}, +{0,3,234},{0,2,518},{0,1,382},{1,1,1526},{0,2,825},{0,1,325},{0,1,821},{2,0,1526},{0,1,821},{0,2,157},{0,2,157},{0,2,157},{0,1,157},{0,1,388},{0,1,100},{0,1,100},{0,0,401},{0,0,766},{0,0,437},{0,2,157},{0,2,157},{0,2,157},{0,1,157},{1,0,356},{0,1,100},{0,1,100},{0,0,401},{1,0,340},{0,0,401},{1,2,425},{0,3,113},{1,1,234}, +{0,1,261},{1,2,425},{0,2,425},{0,1,261},{0,1,421},{0,2,425},{0,1,421},{0,0,121},{0,0,121},{0,0,121},{0,0,121},{0,0,25},{0,0,25},{0,0,25},{0,0,1},{0,0,37},{0,0,37},{0,4,845},{0,3,405},{0,2,725},{0,2,549},{0,3,1541},{0,2,654},{0,2,270},{0,1,722},{0,2,2583},{0,1,1083},{1,3,657},{1,2,345},{1,2,345},{0,2,549},{2,0,1517}, +{0,2,654},{0,2,270},{0,1,722},{3,0,1517},{0,1,722},{0,3,404},{0,3,404},{0,3,404},{0,2,449},{0,2,346},{0,2,170},{0,2,170},{0,1,146},{0,1,707},{0,1,507},{1,1,232},{1,1,232},{1,1,232},{1,1,200},{0,2,346},{0,2,170},{0,2,170},{0,1,146},{0,1,346},{0,1,146},{2,1,421},{0,3,5},{1,2,149},{0,2,149},{2,1,421},{4,0,421},{0,2,149}, +{0,1,601},{4,0,421},{0,1,601},{0,0,400},{0,0,400},{0,0,400},{0,0,400},{0,1,1},{0,1,1},{0,1,1},{0,0,100},{0,0,136},{0,0,136},{0,5,1209},{0,4,937},{1,2,1197},{0,2,789},{0,4,1526},{0,3,737},{0,2,14},{0,1,1042},{0,2,2487},{0,1,1403},{1,3,481},{1,3,173},{1,2,41},{1,2,161},{1,2,1526},{0,3,737},{0,2,14},{0,1,1042},{2,1,1526}, +{0,1,1042},{0,4,793},{0,4,793},{0,4,793},{0,2,785},{0,3,356},{0,2,10},{0,2,10},{0,1,18},{0,1,899},{0,1,379},{1,2,37},{1,2,37},{1,2,37},{1,1,136},{1,1,340},{0,2,10},{0,2,10},{0,1,18},{1,1,356},{0,1,18},{3,0,425},{1,3,137},{1,2,5},{0,2,5},{3,0,425},{3,1,425},{0,2,5},{0,2,965},{3,1,425},{0,2,965},{0,0,784}, +{0,0,784},{0,0,784},{0,0,784},{0,2,9},{0,2,9},{0,2,9},{0,1,9},{0,0,360},{0,0,360},{1,4,1158},{1,3,758},{1,2,850},{1,2,778},{0,4,1671},{0,3,546},{0,2,191},{0,2,903},{0,2,2390},{0,2,1430},{1,4,429},{1,3,29},{1,2,121},{1,2,49},{2,1,1526},{0,3,497},{0,2,142},{0,2,854},{4,0,1526},{0,2,854},{1,3,742},{1,3,742},{1,3,742}, +{1,2,742},{0,3,437},{0,2,155},{0,2,155},{0,1,195},{0,2,946},{0,1,290},{1,3,13},{1,3,13},{1,3,13},{1,2,13},{2,0,340},{0,2,106},{0,2,106},{0,1,146},{3,0,340},{0,1,146},{1,4,425},{1,3,25},{1,2,117},{1,2,45},{1,4,425},{2,2,425},{1,2,45},{0,2,565},{2,2,425},{0,2,565},{1,0,733},{1,0,733},{1,0,733},{1,0,733},{0,2,74}, +{0,2,74},{0,2,74},{0,1,74},{0,1,169},{0,1,169},{1,4,966},{1,4,606},{1,3,886},{1,2,682},{0,5,1742},{0,3,866},{0,3,641},{0,2,727},{0,3,2382},{0,2,758},{1,4,605},{1,4,245},{1,3,525},{1,2,321},{3,0,1517},{0,3,641},{1,2,302},{0,2,502},{3,1,1517},{0,2,502},{1,3,486},{1,3,486},{1,3,486},{1,2,486},{0,4,563},{0,3,241},{0,3,241}, +{0,2,531},{0,2,626},{0,1,546},{1,3,125},{1,3,125},{1,3,125},{1,2,125},{0,4,338},{0,3,16},{0,3,16},{0,2,306},{2,1,338},{0,2,306},{3,1,433},{1,4,145},{2,2,212},{1,2,221},{3,1,433},{6,0,433},{1,2,221},{0,2,421},{6,0,433},{0,2,421},{1,0,461},{1,0,461},{1,0,461},{1,0,461},{0,3,225},{0,3,225},{0,3,225},{0,2,306},{0,1,185}, +{0,1,185},{1,5,894},{1,4,462},{1,3,778},{1,3,646},{1,4,1626},{1,3,749},{1,3,429},{1,2,809},{0,3,2022},{0,2,614},{2,4,706},{1,4,362},{2,3,410},{1,3,546},{3,1,1526},{0,4,441},{0,3,227},{0,2,565},{4,1,1526},{0,2,565},{1,4,462},{1,4,462},{1,4,462},{1,3,525},{1,3,440},{1,2,296},{1,2,296},{1,2,280},{0,2,725},{0,2,85},{2,2,250}, +{2,2,250},{2,2,250},{2,2,226},{1,3,340},{0,3,106},{0,3,106},{0,2,36},{1,2,340},{0,2,36},{3,2,425},{1,4,1},{2,3,185},{0,3,146},{3,2,425},{5,1,425},{0,3,146},{0,2,565},{5,1,425},{0,2,565},{1,0,461},{1,0,461},{1,0,461},{1,0,461},{1,2,100},{1,2,100},{1,2,100},{1,1,181},{0,2,49},{0,2,49},{1,6,1166},{1,4,878},{1,3,1226}, +{1,3,742},{1,5,1545},{1,4,798},{1,3,29},{1,2,985},{0,3,2246},{0,2,1030},{2,4,482},{2,4,218},{2,3,58},{2,3,202},{2,3,1517},{0,4,521},{1,3,25},{1,2,981},{6,0,1517},{1,2,981},{1,5,749},{1,5,749},{1,5,749},{1,3,733},{1,4,374},{1,3,20},{1,3,20},{1,2,24},{0,3,482},{0,2,69},{2,3,49},{2,3,49},{2,3,49},{2,2,130},{2,2,338}, +{1,3,16},{1,3,16},{1,2,20},{5,0,338},{1,2,20},{4,1,433},{1,4,145},{2,3,9},{1,3,9},{4,1,433},{7,0,433},{1,3,9},{0,2,965},{7,0,433},{0,2,965},{1,0,733},{1,0,733},{1,0,733},{1,0,733},{1,3,20},{1,3,20},{1,3,20},{1,2,20},{0,2,65},{0,2,65},{2,5,1218},{2,4,810},{2,3,874},{2,3,826},{1,5,1625},{1,4,542},{1,3,141}, +{1,3,961},{0,4,1806},{0,3,642},{2,5,434},{2,4,26},{2,3,90},{2,3,42},{3,2,1517},{1,4,506},{1,3,105},{0,3,626},{5,1,1517},{0,3,626},{2,4,801},{2,4,801},{2,4,801},{2,3,801},{1,4,406},{1,3,116},{1,3,116},{1,2,152},{0,3,482},{1,2,285},{2,4,17},{2,4,17},{2,4,17},{2,3,17},{3,1,338},{1,3,80},{1,3,80},{1,2,116},{4,1,338}, +{1,2,116},{3,3,425},{2,4,25},{2,3,89},{2,3,41},{3,3,425},{6,1,425},{2,3,41},{0,3,601},{6,1,425},{0,3,601},{2,0,785},{2,0,785},{2,0,785},{2,0,785},{1,3,52},{1,3,52},{1,3,52},{1,2,52},{0,3,41},{0,3,41},{2,5,962},{2,4,618},{2,3,906},{2,3,666},{1,6,1710},{1,4,798},{1,4,663},{1,3,721},{0,4,1838},{0,3,450},{2,5,562}, +{2,4,218},{2,3,506},{2,3,266},{4,1,1514},{0,5,474},{2,3,285},{0,3,434},{4,2,1514},{0,3,434},{2,4,497},{2,4,497},{2,4,497},{2,3,497},{1,5,536},{1,4,222},{1,4,222},{1,3,552},{0,4,469},{0,3,281},{2,4,97},{2,4,97},{2,4,97},{2,3,97},{4,0,340},{1,4,26},{1,4,26},{0,3,265},{3,2,340},{0,3,265},{4,2,425},{2,4,137},{3,3,194}, +{2,3,185},{4,2,425},{5,2,425},{2,3,185},{0,3,425},{5,2,425},{0,3,425},{2,0,481},{2,0,481},{2,0,481},{2,0,481},{1,4,197},{1,4,197},{1,4,197},{1,3,296},{0,3,25},{0,3,25},{2,6,870},{2,5,446},{2,4,758},{2,4,670},{2,5,1638},{2,4,771},{2,4,515},{2,3,823},{0,5,1710},{1,3,598},{3,4,737},{2,5,325},{3,4,481},{2,4,549},{5,0,1517}, +{1,5,458},{1,4,224},{1,3,534},{3,3,1517},{1,3,534},{2,5,445},{2,5,445},{2,5,445},{2,4,526},{2,4,459},{2,3,291},{2,3,291},{2,3,339},{0,4,370},{1,3,114},{3,3,272},{3,3,272},{3,3,272},{3,3,256},{2,4,338},{1,4,80},{1,4,80},{1,3,50},{7,0,338},{1,3,50},{5,1,425},{2,5,1},{3,4,225},{1,4,160},{5,1,425},{4,3,425},{1,4,160}, +{0,3,533},{4,3,425},{0,3,533},{2,0,445},{2,0,445},{2,0,445},{2,0,445},{2,3,122},{2,3,122},{2,3,122},{2,2,185},{1,3,65},{1,3,65},{2,7,1130},{2,5,798},{2,4,1142},{2,4,702},{2,6,1571},{2,4,819},{2,4,51},{2,3,935},{0,5,1614},{1,3,950},{3,5,489},{3,5,269},{3,4,81},{3,4,249},{3,4,1514},{1,5,490},{2,4,42},{2,3,926},{7,1,1514}, +{2,3,926},{2,6,710},{2,6,710},{2,6,710},{2,4,686},{2,5,397},{2,4,35},{2,4,35},{2,3,35},{1,4,509},{1,3,50},{3,4,65},{3,4,65},{3,4,65},{3,3,128},{3,3,340},{2,4,26},{2,4,26},{2,3,26},{6,1,340},{2,3,26},{6,0,425},{2,5,113},{3,4,17},{2,4,17},{6,0,425},{3,4,425},{2,4,17},{0,3,901},{3,4,425},{0,3,901},{2,0,685}, +{2,0,685},{2,0,685},{2,0,685},{2,4,34},{2,4,34},{2,4,34},{2,3,34},{1,3,49},{1,3,49},{3,6,1286},{3,5,870},{3,4,906},{3,4,882},{2,6,1587},{2,5,546},{2,4,99},{2,4,1027},{1,5,1838},{1,4,702},{3,6,445},{3,5,29},{3,4,65},{3,4,41},{4,3,1514},{2,5,521},{2,4,74},{1,4,677},{6,2,1514},{1,4,677},{3,5,866},{3,5,866},{3,5,866}, +{3,4,866},{2,5,381},{2,4,83},{2,4,83},{2,3,115},{0,5,349},{2,3,286},{3,5,25},{3,5,25},{3,5,25},{3,4,25},{4,2,340},{2,4,58},{2,4,58},{2,3,90},{5,2,340},{2,3,90},{4,4,421},{3,5,29},{3,4,65},{3,4,41},{4,4,421},{7,2,421},{3,4,41},{0,4,641},{7,2,421},{0,4,641},{3,0,841},{3,0,841},{3,0,841},{3,0,841},{2,4,34}, +{2,4,34},{2,4,34},{2,3,34},{1,4,61},{1,4,61},{3,6,966},{3,5,614},{3,4,874},{3,4,658},{2,7,1686},{2,5,738},{2,4,659},{2,4,723},{0,6,1518},{1,4,446},{3,6,525},{3,5,173},{3,4,433},{3,4,217},{5,2,1517},{1,6,457},{3,4,274},{1,4,437},{5,3,1517},{1,4,437},{3,5,514},{3,5,514},{3,5,514},{3,4,514},{2,6,515},{2,5,209},{2,5,209}, +{2,3,579},{1,5,510},{1,4,302},{3,5,73},{3,5,73},{3,5,73},{3,4,73},{5,1,346},{2,5,40},{2,5,40},{3,3,293},{7,1,346},{3,3,293},{5,3,421},{3,5,109},{4,4,180},{3,4,153},{5,3,421},{6,3,421},{3,4,153},{0,4,433},{6,3,421},{0,4,433},{3,0,505},{3,0,505},{3,0,505},{3,0,505},{2,5,173},{2,5,173},{2,5,173},{2,3,290},{1,4,13}, +{1,4,13},{3,7,854},{3,6,438},{3,5,746},{3,5,702},{3,6,1658},{3,5,801},{3,5,609},{3,4,845},{1,6,1758},{2,4,590},{3,7,710},{3,6,294},{4,5,558},{3,5,558},{6,1,1514},{2,6,481},{2,5,227},{2,4,509},{4,4,1514},{2,4,509},{3,6,434},{3,6,434},{3,6,434},{3,5,533},{3,5,484},{3,4,292},{3,4,292},{3,4,404},{1,5,357},{2,4,149},{3,6,290}, +{3,6,290},{3,6,290},{4,4,290},{6,0,340},{2,5,58},{2,5,58},{2,4,68},{3,4,340},{2,4,68},{6,2,421},{3,6,5},{4,5,269},{2,5,178},{6,2,421},{5,4,421},{2,5,178},{0,4,505},{5,4,421},{0,4,505},{3,0,433},{3,0,433},{3,0,433},{3,0,433},{3,4,148},{3,4,148},{3,4,148},{3,3,193},{2,4,85},{2,4,85},{3,7,1206},{3,6,726},{3,5,1066}, +{3,5,670},{3,7,1605},{3,5,785},{3,5,81},{3,4,893},{1,6,1598},{2,4,878},{4,6,502},{4,5,310},{4,5,110},{4,5,302},{7,0,1517},{2,6,465},{3,5,65},{2,4,877},{3,5,1517},{2,4,877},{3,7,677},{3,7,677},{3,7,677},{3,5,645},{3,6,426},{3,5,56},{3,5,56},{3,4,52},{2,5,542},{2,4,37},{4,5,85},{4,5,85},{4,5,85},{4,4,130},{5,2,346}, +{3,5,40},{3,5,40},{2,4,36},{7,2,346},{2,4,36},{7,1,421},{3,6,85},{4,5,29},{3,5,29},{7,1,421},{4,5,421},{3,5,29},{0,4,841},{4,5,421},{0,4,841},{3,0,641},{3,0,641},{3,0,641},{3,0,641},{3,4,52},{3,4,52},{3,4,52},{3,4,52},{2,4,37},{2,4,37},{4,7,1362},{4,6,938},{4,5,946},{4,5,946},{3,7,1557},{3,6,558},{3,5,65}, +{3,5,1101},{0,7,1662},{2,5,770},{4,7,462},{4,6,38},{4,5,46},{4,5,46},{5,4,1517},{3,6,542},{3,5,49},{1,5,721},{7,3,1517},{1,5,721},{4,5,937},{4,5,937},{4,5,937},{4,5,937},{3,6,362},{3,5,56},{3,5,56},{3,4,84},{1,6,350},{3,4,293},{4,5,37},{4,5,37},{4,5,37},{4,5,37},{6,1,346},{3,5,40},{3,5,40},{3,4,68},{6,3,346}, +{3,4,68},{5,5,421},{4,6,37},{4,5,45},{3,5,45},{5,5,421},{3,6,421},{3,5,45},{0,5,685},{3,6,421},{0,5,685},{4,0,901},{4,0,901},{4,0,901},{4,0,901},{3,5,20},{3,5,20},{3,5,20},{3,4,20},{2,5,85},{2,5,85},{4,7,978},{4,6,618},{4,5,850},{4,5,658},{3,7,2021},{3,6,686},{3,5,561},{3,5,733},{1,7,1530},{2,5,450},{4,7,494}, +{4,6,134},{4,5,366},{4,5,174},{6,3,1526},{2,7,446},{4,5,269},{2,5,446},{6,4,1526},{2,5,446},{4,6,537},{4,6,537},{4,6,537},{4,5,537},{3,7,500},{3,6,202},{3,6,202},{3,4,500},{1,6,510},{2,5,329},{4,6,53},{4,6,53},{4,6,53},{4,5,53},{7,0,340},{3,6,58},{3,6,58},{4,4,265},{3,5,340},{4,4,265},{6,4,421},{4,6,85},{5,5,170}, +{4,5,125},{6,4,421},{7,4,421},{4,5,125},{0,5,445},{7,4,421},{0,5,445},{4,0,533},{4,0,533},{4,0,533},{4,0,533},{3,6,153},{3,6,153},{3,6,153},{3,4,244},{2,5,5},{2,5,5},{4,7,1158},{4,7,438},{4,6,742},{4,6,742},{4,7,1686},{4,6,839},{3,6,677},{4,5,875},{1,7,1710},{3,5,590},{5,6,769},{4,7,269},{4,6,573},{4,6,573},{7,2,1517}, +{3,7,510},{3,6,236},{3,5,490},{5,5,1517},{3,5,490},{4,7,429},{4,7,429},{4,7,429},{4,5,546},{4,6,515},{4,5,299},{4,5,299},{4,5,475},{2,6,350},{3,5,190},{4,7,260},{4,7,260},{4,7,260},{5,5,328},{7,1,346},{3,6,40},{3,6,40},{3,5,90},{7,3,346},{3,5,90},{7,3,421},{4,7,13},{4,6,317},{3,6,200},{7,3,421},{6,5,421},{3,6,200}, +{0,5,481},{6,5,421},{0,5,481},{4,0,425},{4,0,425},{4,0,425},{4,0,425},{4,5,178},{4,5,178},{4,5,178},{4,4,205},{3,5,109},{3,5,109},{4,7,1862},{4,7,662},{4,6,998},{4,6,646},{4,7,1686},{4,6,759},{4,6,119},{4,5,859},{2,7,1590},{3,5,814},{5,7,521},{5,6,305},{5,6,145},{5,6,361},{5,6,1526},{3,7,446},{4,6,94},{3,5,810},{4,6,1526}, +{3,5,810},{4,7,637},{4,7,637},{4,7,637},{4,6,610},{4,6,435},{4,6,83},{4,6,83},{4,5,75},{1,7,565},{3,5,30},{5,6,109},{5,6,109},{5,6,109},{5,5,136},{6,3,340},{4,6,58},{4,6,58},{3,5,26},{6,4,340},{3,5,26},{5,7,421},{4,7,61},{5,6,45},{4,6,45},{5,7,421},{5,6,421},{4,6,45},{0,5,785},{5,6,421},{0,5,785},{4,0,601}, +{4,0,601},{4,0,601},{4,0,601},{4,5,50},{4,5,50},{4,5,50},{4,5,74},{3,5,29},{3,5,29},{5,7,1498},{5,7,1014},{5,6,994},{5,6,1018},{4,7,2198},{4,7,578},{4,6,39},{4,6,1183},{2,7,1878},{3,6,846},{5,7,537},{5,7,53},{5,6,33},{5,6,57},{7,3,1526},{4,7,569},{4,6,30},{2,6,758},{6,5,1526},{2,6,758},{5,6,990},{5,6,990},{5,6,990}, +{5,6,1014},{4,7,349},{4,6,35},{4,6,35},{4,5,59},{2,7,357},{3,5,254},{5,6,29},{5,6,29},{5,6,29},{5,6,53},{7,2,340},{4,6,26},{4,6,26},{4,5,50},{5,5,340},{4,5,50},{6,6,425},{5,7,49},{5,6,29},{4,6,29},{6,6,425},{4,7,425},{4,6,29},{0,6,733},{4,7,425},{0,6,733},{5,0,965},{5,0,965},{5,0,965},{5,0,965},{4,6,10}, +{4,6,10},{4,6,10},{4,5,10},{3,6,113},{3,6,113},{5,7,1466},{5,7,630},{5,6,834},{5,6,666},{5,7,2055},{4,7,642},{4,6,471},{4,6,751},{3,7,1766},{3,6,462},{5,7,937},{5,7,101},{5,6,305},{5,6,137},{5,7,1526},{4,7,521},{5,6,270},{3,6,461},{5,6,1526},{3,6,461},{5,7,566},{5,7,566},{5,7,566},{5,6,566},{4,7,621},{4,7,201},{4,7,201}, +{4,5,427},{2,7,469},{3,6,362},{5,7,37},{5,7,37},{5,7,37},{5,6,37},{5,6,338},{4,7,80},{4,7,80},{5,5,241},{4,6,338},{5,5,241},{7,5,425},{5,7,65},{6,6,164},{5,6,101},{7,5,425},{6,6,433},{5,6,101},{0,6,461},{6,6,433},{0,6,461},{5,0,565},{5,0,565},{5,0,565},{5,0,565},{4,7,137},{4,7,137},{4,7,137},{4,5,202},{3,6,1}, +{3,6,1},{5,7,2042},{5,7,810},{5,7,746},{5,7,790},{5,7,2073},{5,7,885},{4,7,651},{4,6,877},{4,7,2102},{4,6,598},{6,7,794},{6,7,530},{5,7,550},{5,7,594},{6,6,1526},{5,7,689},{4,7,251},{4,6,477},{6,6,1526},{4,6,477},{5,7,521},{5,7,521},{5,7,521},{5,6,521},{5,7,552},{5,6,312},{5,6,312},{4,6,516},{3,7,349},{4,6,237},{5,7,325}, +{5,7,325},{5,7,325},{5,6,325},{6,5,340},{4,7,26},{4,7,26},{4,6,116},{3,7,340},{4,6,116},{6,7,433},{6,7,169},{5,7,325},{4,7,226},{6,7,433},{7,6,425},{4,7,226},{0,6,461},{7,6,425},{0,6,461},{5,0,421},{5,0,421},{5,0,421},{5,0,421},{5,6,212},{5,6,212},{5,6,212},{5,5,221},{4,6,137},{4,6,137},{6,7,2362},{5,7,1514},{5,7,938}, +{5,7,630},{5,7,2633},{5,7,741},{5,7,165},{5,6,833},{4,7,2070},{4,6,758},{6,7,762},{6,7,306},{6,7,186},{6,7,426},{7,5,1526},{5,7,705},{5,7,129},{4,6,749},{5,7,1541},{4,6,749},{5,7,889},{5,7,889},{5,7,889},{5,7,581},{5,7,424},{5,7,116},{5,7,116},{5,6,104},{3,7,525},{4,6,29},{6,7,137},{6,7,137},{6,7,137},{6,6,146},{7,4,338}, +{5,7,80},{5,7,80},{4,6,20},{7,5,338},{4,6,20},{7,6,433},{6,7,185},{6,7,65},{5,7,65},{7,6,433},{6,7,425},{5,7,65},{0,6,733},{6,7,425},{0,6,733},{5,0,565},{5,0,565},{5,0,565},{5,0,565},{5,6,52},{5,6,52},{5,6,52},{5,6,100},{4,6,25},{4,6,25},{6,7,2073},{6,7,1449},{6,7,1049},{5,7,981},{6,7,2548},{5,7,1044},{5,7,20}, +{5,6,1196},{5,7,2365},{4,7,929},{6,7,1049},{6,7,425},{6,7,25},{6,7,73},{7,6,1492},{6,7,948},{5,7,16},{3,7,800},{7,6,1460},{3,7,800},{6,7,1049},{6,7,1049},{6,7,1049},{5,7,981},{5,7,680},{5,7,20},{5,7,20},{5,6,40},{4,7,434},{4,6,205},{6,7,25},{6,7,25},{6,7,25},{6,7,73},{7,5,370},{5,7,16},{5,7,16},{5,6,36},{6,6,338}, +{5,6,36},{7,7,410},{7,7,338},{6,7,16},{5,7,16},{7,7,410},{6,7,464},{5,7,16},{0,7,784},{6,7,464},{0,7,784},{5,0,965},{5,0,965},{5,0,965},{5,0,965},{5,7,4},{5,7,4},{5,7,4},{5,6,4},{4,7,145},{4,7,145},{6,7,1769},{6,7,1145},{6,7,745},{6,7,601},{6,7,1940},{6,7,1172},{5,7,308},{5,7,696},{5,7,1805},{4,7,401},{7,7,1043}, +{6,7,569},{6,7,169},{6,7,25},{7,6,1076},{6,7,596},{6,7,196},{4,7,401},{6,7,1076},{4,7,401},{6,7,745},{6,7,745},{6,7,745},{6,7,601},{6,7,916},{5,7,308},{5,7,308},{5,6,360},{4,7,626},{5,6,341},{6,7,169},{6,7,169},{6,7,169},{6,7,25},{6,7,340},{6,7,196},{6,7,196},{6,6,221},{5,7,340},{6,6,221},{7,7,202},{7,7,130},{7,7,81}, +{6,7,0},{7,7,202},{7,7,218},{6,7,0},{0,7,400},{7,7,218},{0,7,400},{6,0,601},{6,0,601},{6,0,601},{6,0,601},{5,7,164},{5,7,164},{5,7,164},{5,6,164},{4,7,1},{4,7,1},{6,7,1886},{6,7,1262},{6,7,862},{6,7,502},{6,7,1715},{6,7,731},{6,7,331},{5,7,507},{5,7,1634},{4,7,266},{7,7,521},{7,7,449},{7,7,400},{6,7,277},{7,7,797}, +{6,7,506},{6,7,106},{5,7,146},{6,7,770},{5,7,146},{6,7,862},{6,7,862},{6,7,862},{6,7,502},{6,7,691},{6,7,331},{6,7,331},{5,7,507},{5,7,610},{4,7,266},{7,7,400},{7,7,400},{7,7,400},{6,7,277},{7,6,338},{6,7,106},{6,7,106},{5,7,146},{7,6,370},{5,7,146},{7,7,121},{7,7,49},{7,7,0},{7,7,16},{7,7,121},{7,7,65},{7,7,16}, +{0,7,121},{7,7,65},{0,7,121},{6,0,421},{6,0,421},{6,0,421},{6,0,421},{6,7,250},{6,7,250},{6,7,250},{6,6,241},{4,7,145},{4,7,145},{7,7,2010},{6,7,1774},{6,7,1374},{6,7,822},{6,7,1923},{6,7,747},{6,7,347},{6,7,139},{6,7,1446},{5,7,34},{7,7,329},{7,7,257},{7,7,208},{7,7,160},{7,7,509},{7,7,389},{6,7,298},{5,7,18},{7,7,549}, +{5,7,18},{6,7,1374},{6,7,1374},{6,7,1374},{6,7,822},{6,7,899},{6,7,347},{6,7,347},{6,7,139},{5,7,866},{5,7,34},{7,7,208},{7,7,208},{7,7,208},{7,7,160},{7,7,388},{6,7,298},{6,7,298},{5,7,18},{6,7,370},{5,7,18},{7,7,185},{7,7,113},{7,7,64},{7,7,16},{7,7,185},{7,7,65},{7,7,16},{0,7,9},{7,7,65},{0,7,9},{6,0,533}, +{6,0,533},{6,0,533},{6,0,533},{6,7,58},{6,7,58},{6,7,58},{6,7,130},{5,7,25},{5,7,25},{7,7,1347},{7,7,1275},{7,7,1226},{7,7,1154},{7,7,1431},{6,7,922},{6,7,522},{6,7,2},{6,7,1125},{5,7,137},{7,7,258},{7,7,186},{7,7,137},{7,7,65},{7,7,342},{7,7,198},{7,7,149},{6,7,1},{7,7,294},{6,7,1},{7,7,1226},{7,7,1226},{7,7,1226}, +{7,7,1154},{6,7,1146},{6,7,522},{6,7,522},{6,7,2},{6,7,725},{5,7,137},{7,7,137},{7,7,137},{7,7,137},{7,7,65},{7,7,221},{7,7,149},{7,7,149},{6,7,1},{7,7,245},{6,7,1},{7,7,242},{7,7,170},{7,7,121},{7,7,49},{7,7,242},{7,7,98},{7,7,49},{0,7,0},{7,7,98},{0,7,0},{6,0,901},{6,0,901},{6,0,901},{6,0,901},{6,7,122}, +{6,7,122},{6,7,122},{6,7,2},{5,7,137},{5,7,137},{7,7,883},{7,7,811},{7,7,762},{7,7,690},{7,7,871},{7,7,727},{7,7,678},{6,7,130},{6,7,949},{6,7,149},{7,7,258},{7,7,186},{7,7,137},{7,7,65},{7,7,246},{7,7,102},{7,7,53},{7,7,36},{7,7,134},{7,7,36},{7,7,762},{7,7,762},{7,7,762},{7,7,690},{7,7,750},{7,7,678},{7,7,678}, +{6,7,130},{6,7,549},{6,7,149},{7,7,137},{7,7,137},{7,7,137},{7,7,65},{7,7,125},{7,7,53},{7,7,53},{7,7,36},{7,7,85},{7,7,36},{7,7,242},{7,7,170},{7,7,121},{7,7,49},{7,7,242},{7,7,98},{7,7,49},{0,7,0},{7,7,98},{0,7,0},{7,0,641},{7,0,641},{7,0,641},{7,0,641},{6,7,442},{6,7,442},{6,7,442},{6,7,130},{6,7,149}, +{6,7,149},{0,3,932},{0,2,218},{0,1,82},{0,1,250},{0,2,1971},{0,1,1371},{0,1,611},{0,0,1950},{0,1,2332},{0,0,1986},{0,3,932},{0,2,218},{0,1,82},{0,1,250},{1,0,1899},{0,1,1371},{0,1,611},{0,0,1950},{1,0,1923},{0,0,1950},{0,1,1},{0,1,1},{0,1,1},{0,0,64},{0,0,180},{0,0,100},{0,0,100},{0,0,101},{0,0,200},{0,0,137},{0,1,1}, +{0,1,1},{0,1,1},{0,0,64},{0,0,180},{0,0,100},{0,0,100},{0,0,101},{0,0,164},{0,0,101},{1,1,884},{0,2,218},{0,1,82},{0,1,250},{1,1,884},{2,0,900},{0,1,250},{0,1,1170},{2,0,900},{0,1,1170},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,36},{0,0,36},{0,0,36},{0,0,100},{0,0,136},{0,0,136},{0,3,900},{0,2,250},{0,2,314}, +{0,1,314},{0,2,2355},{0,1,1755},{0,1,675},{0,1,1875},{0,1,2716},{0,1,2236},{0,3,900},{0,2,250},{0,2,314},{0,1,314},{0,2,2355},{0,1,1755},{0,1,675},{0,1,1875},{0,1,2355},{0,1,1875},{0,2,25},{0,2,25},{0,2,25},{0,1,25},{0,1,410},{0,0,292},{0,0,292},{0,0,181},{0,0,392},{0,0,217},{0,2,25},{0,2,25},{0,2,25},{0,1,25},{0,1,410}, +{0,0,292},{0,0,292},{0,0,181},{0,0,356},{0,0,181},{2,0,884},{0,2,250},{0,2,314},{0,1,314},{2,0,884},{3,0,884},{0,1,314},{0,1,914},{3,0,884},{0,1,914},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,36},{0,0,36},{0,0,36},{0,0,100},{0,0,136},{0,0,136},{0,4,890},{0,3,104},{0,2,90},{0,2,442},{0,2,2995},{0,2,1851},{0,1,995}, +{0,1,1875},{0,1,3356},{0,1,2236},{0,4,890},{0,3,104},{0,2,90},{0,2,442},{1,1,2932},{0,2,1851},{0,1,995},{0,1,1875},{2,0,2900},{0,1,1875},{0,2,9},{0,2,9},{0,2,9},{0,1,9},{0,1,586},{0,1,370},{0,1,370},{0,0,389},{0,0,712},{0,0,425},{0,2,9},{0,2,9},{0,2,9},{0,1,9},{0,1,586},{0,1,370},{0,1,370},{0,0,389},{1,0,650}, +{0,0,389},{1,2,890},{0,3,104},{0,2,90},{0,2,442},{1,2,890},{2,1,890},{0,2,442},{0,1,914},{2,1,890},{0,1,914},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,36},{0,0,36},{0,0,36},{0,0,100},{0,0,136},{0,0,136},{0,4,990},{0,3,140},{0,2,158},{0,2,158},{0,3,3048},{0,2,1707},{0,2,747},{0,1,1795},{0,1,3916},{0,1,2156},{0,4,990}, +{0,3,140},{0,2,158},{0,2,158},{0,3,3048},{0,2,1707},{0,2,747},{0,1,1795},{1,1,3048},{0,1,1795},{0,3,40},{0,3,40},{0,3,40},{0,1,157},{0,1,698},{0,1,290},{0,1,290},{0,0,641},{0,0,1076},{0,0,677},{0,3,40},{0,3,40},{0,3,40},{0,1,157},{1,0,666},{0,1,290},{0,1,290},{0,0,641},{1,0,650},{0,0,641},{2,1,890},{0,3,104},{0,2,122}, +{0,2,122},{2,1,890},{4,0,890},{0,2,122},{0,1,1170},{4,0,890},{0,1,1170},{0,0,36},{0,0,36},{0,0,36},{0,0,36},{0,0,0},{0,0,0},{0,0,0},{0,0,16},{0,0,52},{0,0,52},{0,5,1115},{0,4,265},{0,2,689},{0,2,293},{0,4,3096},{0,3,1731},{0,2,324},{0,1,2020},{0,2,4009},{0,1,2381},{0,5,1115},{0,4,265},{1,2,429},{0,2,293},{1,2,3048}, +{0,3,1731},{0,2,324},{0,1,2020},{0,2,3048},{0,1,2020},{0,4,261},{0,4,261},{0,4,261},{0,2,229},{0,2,656},{0,2,260},{0,2,260},{0,1,256},{0,1,1017},{0,1,617},{0,4,261},{0,4,261},{0,4,261},{0,2,229},{0,2,656},{0,2,260},{0,2,260},{0,1,256},{0,1,656},{0,1,256},{3,0,890},{0,4,40},{1,2,68},{0,2,68},{3,0,890},{5,0,890},{0,2,68}, +{0,2,1220},{5,0,890},{0,2,1220},{0,0,225},{0,0,225},{0,0,225},{0,0,225},{0,1,16},{0,1,16},{0,1,16},{0,0,25},{0,0,61},{0,0,61},{0,6,1419},{0,4,569},{0,3,1078},{0,2,821},{0,4,3096},{0,3,1395},{0,2,356},{0,2,1832},{0,2,4201},{0,2,2793},{1,4,1011},{1,3,353},{1,2,413},{1,2,413},{2,1,3048},{0,3,1395},{0,2,356},{0,2,1832},{4,0,3048}, +{0,2,1832},{0,4,533},{0,4,533},{0,4,533},{0,2,565},{0,3,666},{0,2,100},{0,2,100},{0,1,128},{0,1,1209},{0,1,489},{1,2,157},{1,2,157},{1,2,157},{1,2,157},{1,1,650},{0,2,100},{0,2,100},{0,1,128},{1,1,666},{0,1,128},{3,1,890},{0,4,40},{1,2,292},{0,2,292},{3,1,890},{4,1,890},{0,2,292},{0,2,932},{4,1,890},{0,2,932},{0,0,529}, +{0,0,529},{0,0,529},{0,0,529},{0,1,16},{0,1,16},{0,1,16},{0,1,64},{0,0,205},{0,0,205},{0,6,1915},{0,5,1019},{1,3,1269},{0,3,1110},{0,5,3051},{0,3,1443},{0,3,318},{0,2,1384},{0,2,4777},{0,2,2345},{1,5,909},{1,4,131},{1,3,113},{1,3,509},{3,0,3051},{0,3,1443},{0,3,318},{0,2,1384},{3,1,3051},{0,2,1384},{0,5,970},{0,5,970},{0,5,970}, +{0,3,1010},{0,3,698},{0,2,196},{0,2,196},{0,1,256},{0,2,1641},{0,1,617},{1,3,13},{1,3,13},{1,3,13},{1,2,13},{2,0,650},{0,2,196},{0,2,196},{0,1,256},{3,0,650},{0,1,256},{2,3,884},{0,5,58},{1,3,104},{0,3,149},{2,3,884},{6,0,884},{0,3,149},{0,2,900},{6,0,884},{0,2,900},{0,0,961},{0,0,961},{0,0,961},{0,0,961},{0,2,0}, +{0,2,0},{0,2,0},{0,1,0},{0,1,361},{0,1,361},{1,5,2113},{1,4,1271},{1,3,1285},{1,3,1329},{0,6,3123},{0,4,1208},{0,3,30},{0,2,1320},{0,3,5011},{0,2,2281},{1,5,957},{1,4,115},{1,3,129},{1,3,173},{1,4,3051},{0,4,1208},{0,3,30},{0,2,1320},{2,2,3051},{0,2,1320},{1,4,1190},{1,4,1190},{1,4,1190},{1,2,1281},{0,4,648},{0,3,26},{0,3,26}, +{0,2,296},{0,2,1641},{0,1,1001},{1,4,34},{1,4,34},{1,4,34},{1,2,125},{0,4,648},{0,3,26},{0,3,26},{0,2,296},{2,1,648},{0,2,296},{3,2,884},{0,5,26},{1,3,104},{0,3,5},{3,2,884},{5,1,884},{0,3,5},{0,2,1124},{5,1,884},{0,2,1124},{1,0,1181},{1,0,1181},{1,0,1181},{1,0,1181},{0,3,25},{0,3,25},{0,3,25},{0,1,64},{0,1,425}, +{0,1,425},{1,6,1864},{1,5,1038},{1,3,1390},{1,3,1038},{0,6,3132},{0,4,1199},{0,3,201},{0,2,1743},{0,3,4924},{0,2,2332},{1,6,1080},{1,5,254},{2,3,458},{1,3,254},{2,3,3051},{0,4,1163},{0,3,165},{0,2,1707},{6,0,3051},{0,2,1707},{1,4,1016},{1,4,1016},{1,4,1016},{1,3,989},{0,5,716},{0,3,152},{0,3,152},{0,2,62},{0,2,1611},{0,2,651},{1,4,232}, +{1,4,232},{1,4,232},{1,3,205},{1,3,650},{0,3,116},{0,3,116},{0,2,26},{1,2,650},{0,2,26},{4,1,884},{1,5,58},{2,3,58},{1,3,58},{4,1,884},{4,2,884},{1,3,58},{0,3,1274},{4,2,884},{0,3,1274},{1,0,980},{1,0,980},{1,0,980},{1,0,980},{0,3,52},{0,3,52},{0,3,52},{0,2,61},{0,1,458},{0,1,458},{1,7,1784},{1,5,910},{1,4,1441}, +{1,3,1134},{0,7,3247},{0,5,1292},{0,4,567},{0,3,1474},{0,4,4900},{0,3,2178},{2,5,1028},{2,4,362},{2,3,394},{2,3,418},{3,2,3051},{0,5,1096},{1,3,331},{0,3,1278},{5,1,3051},{0,3,1278},{1,5,885},{1,5,885},{1,5,885},{1,3,909},{0,5,876},{0,4,206},{0,4,206},{0,2,254},{0,3,1548},{0,2,347},{2,3,169},{2,3,169},{2,3,169},{2,3,193},{2,2,648}, +{0,4,10},{0,4,10},{0,2,58},{5,0,648},{0,2,58},{5,0,884},{1,5,26},{2,3,250},{1,3,250},{5,0,884},{3,3,884},{1,3,250},{0,3,954},{3,3,884},{0,3,954},{1,0,884},{1,0,884},{1,0,884},{1,0,884},{0,4,197},{0,4,197},{0,4,197},{0,2,205},{0,2,298},{0,2,298},{1,7,1976},{1,6,1124},{1,4,1649},{1,4,1229},{1,6,3204},{0,5,1452},{1,4,525}, +{0,3,1474},{0,4,4420},{0,3,1474},{2,6,930},{2,5,160},{2,4,138},{2,3,546},{4,1,3060},{0,5,968},{0,4,195},{0,3,990},{4,2,3060},{0,3,990},{1,6,1060},{1,6,1060},{1,6,1060},{1,4,1108},{1,4,824},{1,3,314},{1,3,314},{1,2,370},{0,3,1260},{0,2,427},{2,4,17},{2,4,17},{2,4,17},{2,3,17},{3,1,648},{0,4,74},{0,4,74},{1,2,226},{4,1,648}, +{1,2,226},{3,4,882},{1,6,80},{2,4,122},{0,4,146},{3,4,882},{7,1,882},{0,4,146},{0,3,890},{7,1,882},{0,3,890},{1,0,1044},{1,0,1044},{1,0,1044},{1,0,1044},{1,3,145},{1,3,145},{1,3,145},{1,2,145},{0,2,202},{0,2,202},{2,6,2374},{1,6,1476},{2,4,1550},{1,4,1469},{1,6,3172},{1,5,1259},{1,4,61},{1,3,1323},{0,4,4452},{0,3,1282},{2,6,930}, +{2,5,96},{2,4,106},{2,4,194},{5,0,3060},{0,6,1144},{1,4,45},{0,3,1086},{6,1,3060},{0,3,1086},{2,5,1476},{2,5,1476},{2,5,1476},{1,4,1460},{1,5,666},{1,4,52},{1,4,52},{1,3,362},{0,3,1356},{0,3,321},{2,5,32},{2,5,32},{2,5,32},{2,3,97},{4,0,650},{1,4,36},{1,4,36},{0,3,125},{3,2,650},{0,3,125},{4,3,882},{1,6,16},{2,4,90}, +{1,4,9},{4,3,882},{6,2,882},{1,4,9},{0,3,1082},{6,2,882},{0,3,1082},{1,0,1460},{1,0,1460},{1,0,1460},{1,0,1460},{1,4,52},{1,4,52},{1,4,52},{1,2,65},{0,3,200},{0,3,200},{2,7,1892},{2,6,1090},{2,4,1370},{2,4,1062},{1,7,3100},{1,5,1169},{1,4,151},{1,3,1665},{0,5,4036},{0,3,1678},{2,7,1051},{2,6,249},{3,4,493},{2,4,221},{3,4,3060}, +{0,6,883},{1,4,126},{0,4,1528},{7,1,3060},{0,4,1528},{2,5,1035},{2,5,1035},{2,5,1035},{2,4,1026},{1,6,723},{1,4,115},{1,4,115},{1,3,65},{0,4,1004},{0,3,78},{2,5,194},{2,5,194},{2,5,194},{2,4,185},{2,4,648},{1,4,90},{1,4,90},{1,3,40},{7,0,648},{1,3,40},{5,2,882},{2,6,80},{3,4,52},{2,4,52},{5,2,882},{5,3,882},{2,4,52}, +{0,4,1332},{5,3,882},{0,4,1332},{2,0,1010},{2,0,1010},{2,0,1010},{2,0,1010},{1,4,34},{1,4,34},{1,4,34},{1,3,61},{0,3,74},{0,3,74},{2,7,1892},{2,6,898},{2,5,1451},{2,4,1094},{2,6,3501},{1,6,1308},{1,5,589},{1,4,1510},{0,5,3940},{0,4,1116},{3,6,1051},{3,5,377},{3,4,381},{3,4,429},{5,1,3060},{0,6,1059},{2,4,312},{0,4,1016},{6,2,3060}, +{0,4,1016},{2,6,882},{2,6,882},{2,6,882},{2,4,898},{1,6,835},{1,5,189},{1,5,189},{1,3,209},{0,4,1036},{0,3,270},{3,4,185},{3,4,185},{3,4,185},{3,4,233},{3,3,650},{1,5,20},{1,5,20},{1,3,40},{6,1,650},{1,3,40},{6,1,882},{2,6,16},{3,4,212},{2,4,212},{6,1,882},{4,4,882},{2,4,212},{0,4,980},{4,4,882},{0,4,980},{2,0,882}, +{2,0,882},{2,0,882},{2,0,882},{1,5,173},{1,5,173},{1,5,173},{1,3,173},{0,4,136},{0,4,136},{2,7,2404},{2,7,1116},{2,5,1595},{2,5,1235},{2,7,3244},{1,6,1404},{2,5,619},{1,4,1446},{0,6,3804},{0,4,892},{3,7,957},{3,6,195},{3,5,169},{3,4,509},{6,0,3060},{0,7,936},{1,5,196},{0,4,888},{3,4,3060},{0,4,888},{2,7,1035},{2,7,1035},{2,7,1035}, +{2,5,1091},{2,5,835},{2,4,317},{2,4,317},{2,3,369},{0,5,875},{1,3,396},{3,5,25},{3,5,25},{3,5,25},{3,4,25},{4,2,650},{1,5,52},{1,5,52},{2,3,200},{5,2,650},{2,3,200},{7,0,884},{2,7,106},{3,5,144},{1,5,160},{7,0,884},{3,5,884},{1,5,160},{0,4,884},{3,5,884},{0,4,884},{2,0,1010},{2,0,1010},{2,0,1010},{2,0,1010},{2,4,173}, +{2,4,173},{2,4,173},{2,3,173},{0,4,8},{0,4,8},{3,7,2430},{2,7,1404},{3,5,1610},{2,5,1411},{2,7,3148},{2,6,1309},{2,5,91},{2,4,1325},{0,6,3484},{0,4,1180},{3,7,909},{3,6,83},{3,5,89},{3,5,221},{4,4,3051},{0,7,1000},{2,5,66},{1,4,1053},{7,2,3051},{1,4,1053},{2,7,1403},{2,7,1403},{2,7,1403},{2,5,1395},{2,6,681},{2,5,75},{2,5,75}, +{2,4,425},{0,5,795},{0,4,280},{3,6,34},{3,6,34},{3,6,34},{3,4,73},{5,1,656},{2,5,50},{2,5,50},{1,4,153},{7,1,656},{1,4,153},{5,4,884},{2,7,10},{3,5,80},{2,5,17},{5,4,884},{7,3,884},{2,5,17},{0,4,1044},{7,3,884},{0,4,1044},{2,0,1394},{2,0,1394},{2,0,1394},{2,0,1394},{2,4,61},{2,4,61},{2,4,61},{2,3,61},{0,4,136}, +{0,4,136},{3,7,2214},{3,7,1150},{3,5,1358},{3,5,1094},{2,7,3652},{2,6,1147},{2,5,109},{2,4,1595},{0,7,3724},{0,5,1402},{3,7,1314},{3,7,250},{3,5,458},{3,5,194},{5,3,3060},{1,7,888},{2,5,93},{0,5,1398},{6,3,3060},{0,5,1398},{3,6,1060},{3,6,1060},{3,6,1060},{3,5,1069},{2,7,736},{2,5,84},{2,5,84},{2,4,74},{0,6,820},{1,4,81},{3,6,160}, +{3,6,160},{3,6,160},{3,5,169},{6,0,650},{2,5,68},{2,5,68},{1,4,45},{3,4,650},{1,4,45},{6,3,884},{3,7,106},{4,5,50},{3,5,50},{6,3,884},{6,4,884},{3,5,50},{0,5,1394},{6,4,884},{0,5,1394},{3,0,1044},{3,0,1044},{3,0,1044},{3,0,1044},{2,5,20},{2,5,20},{2,5,20},{2,4,65},{0,5,8},{0,5,8},{3,7,2566},{3,7,894},{3,6,1469}, +{3,5,1062},{3,7,3535},{2,7,1332},{2,6,619},{2,5,1554},{0,7,3276},{0,5,1146},{4,7,1080},{4,6,398},{4,5,374},{4,5,446},{6,2,3051},{1,7,1016},{3,5,299},{0,5,1046},{5,4,3051},{0,5,1046},{3,7,885},{3,7,885},{3,7,885},{3,5,893},{2,7,800},{2,6,178},{2,6,178},{2,4,170},{0,6,660},{1,4,225},{4,5,205},{4,5,205},{4,5,205},{4,5,277},{5,2,656}, +{2,6,34},{2,6,34},{2,4,26},{7,2,656},{2,4,26},{7,2,884},{3,7,10},{4,5,178},{3,5,178},{7,2,884},{5,5,884},{3,5,178},{0,5,1010},{5,5,884},{0,5,1010},{3,0,884},{3,0,884},{3,0,884},{3,0,884},{2,6,153},{2,6,153},{2,6,153},{2,4,145},{0,5,136},{0,5,136},{4,7,3320},{3,7,1150},{3,6,1549},{3,6,1249},{3,7,3487},{2,7,1364},{2,6,603}, +{2,5,1426},{0,7,3340},{1,5,892},{4,7,1016},{4,7,236},{4,6,206},{4,5,478},{7,1,3051},{2,7,964},{2,6,203},{1,5,883},{4,5,3051},{1,5,883},{3,7,1029},{3,7,1029},{3,7,1029},{3,6,1080},{3,6,852},{3,5,326},{3,5,326},{3,4,374},{0,6,884},{2,4,371},{4,6,37},{4,6,37},{4,6,37},{4,5,37},{6,1,656},{2,6,34},{2,6,34},{3,4,178},{6,3,656}, +{3,4,178},{5,6,890},{3,7,170},{4,6,170},{2,6,178},{5,6,890},{4,6,890},{2,6,178},{0,5,882},{4,6,890},{0,5,882},{3,0,980},{3,0,980},{3,0,980},{3,0,980},{3,5,205},{3,5,205},{3,5,205},{3,4,205},{1,5,10},{1,5,10},{4,7,2936},{4,7,1676},{4,6,1678},{3,6,1361},{3,7,3951},{3,7,1367},{3,6,129},{3,5,1335},{1,7,3496},{1,5,1116},{4,7,1336}, +{4,7,76},{4,6,78},{4,6,254},{5,5,3048},{2,7,1124},{3,6,93},{2,5,1026},{3,6,3048},{2,5,1026},{3,7,1557},{3,7,1557},{3,7,1557},{3,6,1336},{3,7,702},{3,6,104},{3,6,104},{3,5,494},{0,7,667},{1,5,275},{4,7,40},{4,7,40},{4,7,40},{4,5,53},{7,0,650},{3,6,68},{3,6,68},{2,5,185},{3,5,650},{2,5,185},{7,3,890},{4,7,72},{4,6,74}, +{3,6,29},{7,3,890},{6,5,890},{3,6,29},{0,5,1010},{6,5,890},{0,5,1010},{3,0,1332},{3,0,1332},{3,0,1332},{3,0,1332},{3,5,61},{3,5,61},{3,5,61},{3,4,61},{1,5,106},{1,5,106},{4,7,3116},{4,7,1316},{4,6,1354},{4,6,1134},{4,7,4084},{3,7,1133},{3,6,75},{3,5,1533},{1,7,3676},{1,6,1470},{5,7,1429},{4,7,355},{4,6,393},{4,6,173},{6,4,3051}, +{3,7,1124},{3,6,66},{1,6,1469},{7,4,3051},{1,6,1469},{4,7,1091},{4,7,1091},{4,7,1091},{4,6,1118},{3,7,729},{3,6,59},{3,6,59},{3,5,89},{0,7,820},{2,5,90},{4,7,130},{4,7,130},{4,7,130},{4,6,157},{7,1,656},{3,6,50},{3,6,50},{2,5,41},{7,3,656},{2,5,41},{7,4,890},{4,7,234},{5,6,52},{4,6,52},{7,4,890},{7,5,890},{4,6,52}, +{0,5,1460},{7,5,890},{0,5,1460},{4,0,1082},{4,0,1082},{4,0,1082},{4,0,1082},{3,6,10},{3,6,10},{3,6,10},{3,5,73},{1,6,10},{1,6,10},{4,7,3820},{4,7,1540},{4,7,1495},{4,6,1038},{4,7,4084},{3,7,1469},{3,6,571},{3,6,1606},{2,7,3916},{1,6,1150},{5,7,1349},{5,7,425},{5,6,373},{5,6,469},{7,3,3048},{3,7,1348},{4,6,292},{1,6,1069},{6,5,3048}, +{1,6,1069},{4,7,1011},{4,7,1011},{4,7,1011},{4,6,894},{3,7,1161},{3,7,173},{3,7,173},{3,5,137},{1,7,659},{2,5,186},{5,6,229},{5,6,229},{5,6,229},{5,6,325},{6,3,650},{3,7,52},{3,7,52},{3,5,16},{6,4,650},{3,5,16},{6,6,890},{5,7,200},{5,6,148},{4,6,148},{6,6,890},{6,6,890},{4,6,148},{0,6,1044},{6,6,890},{0,6,1044},{4,0,890}, +{4,0,890},{4,0,890},{4,0,890},{3,7,137},{3,7,137},{3,7,137},{3,5,121},{1,6,106},{1,6,106},{5,7,4054},{4,7,2276},{4,7,1511},{4,7,1271},{4,7,4596},{4,7,1596},{3,7,577},{3,6,1414},{2,7,4204},{2,6,900},{5,7,1653},{5,7,377},{5,7,249},{5,6,453},{5,7,3048},{4,7,1371},{3,7,216},{2,6,884},{5,6,3048},{2,6,884},{4,7,1315},{4,7,1315},{4,7,1315}, +{4,6,1054},{4,7,875},{4,6,341},{4,6,341},{4,5,385},{1,7,835},{3,5,352},{5,7,53},{5,7,53},{5,7,53},{5,6,53},{7,2,650},{3,7,20},{3,7,20},{4,5,160},{5,5,650},{4,5,160},{7,5,890},{5,7,328},{5,7,200},{3,7,200},{7,5,890},{5,7,900},{3,7,200},{0,6,884},{5,7,900},{0,6,884},{4,0,954},{4,0,954},{4,0,954},{4,0,954},{4,6,241}, +{4,6,241},{4,6,241},{4,5,241},{2,6,16},{2,6,16},{5,7,4022},{5,7,2394},{5,7,1754},{4,7,1319},{5,7,4921},{4,7,1660},{4,7,175},{4,6,1353},{3,7,4380},{2,6,1060},{6,7,2021},{5,7,713},{5,7,73},{5,7,293},{6,6,3051},{4,7,1611},{4,7,126},{3,6,1005},{4,7,3051},{3,6,1005},{5,7,1718},{5,7,1718},{5,7,1718},{4,7,1283},{4,7,859},{4,7,139},{4,7,139}, +{4,5,465},{2,7,779},{2,6,276},{5,7,37},{5,7,37},{5,7,37},{5,6,37},{5,6,648},{4,7,90},{4,7,90},{3,6,221},{4,6,648},{3,6,221},{7,6,900},{6,7,452},{5,7,72},{4,7,45},{7,6,900},{7,6,884},{4,7,45},{0,6,980},{7,6,884},{0,6,980},{4,0,1274},{4,0,1274},{4,0,1274},{4,0,1274},{4,6,65},{4,6,65},{4,6,65},{4,5,65},{2,6,80}, +{2,6,80},{5,7,4265},{5,7,2373},{5,7,1349},{5,7,1173},{5,7,4606},{4,7,2065},{4,7,40},{4,6,1266},{3,7,4455},{3,6,1261},{6,7,1649},{6,7,1025},{5,7,325},{5,7,149},{7,5,2817},{5,7,1514},{4,7,36},{3,6,1197},{6,6,2841},{3,6,1197},{5,7,1349},{5,7,1349},{5,7,1349},{5,7,1173},{4,7,1300},{4,7,40},{4,7,40},{4,6,110},{2,7,1040},{3,6,105},{5,7,325}, +{5,7,325},{5,7,325},{5,7,149},{6,5,650},{4,7,36},{4,7,36},{3,6,41},{3,7,650},{3,6,41},{7,6,801},{6,7,449},{6,7,49},{4,7,36},{7,6,801},{6,7,761},{4,7,36},{0,6,1181},{6,7,761},{0,6,1181},{5,0,1124},{5,0,1124},{5,0,1124},{5,0,1124},{4,7,4},{4,7,4},{4,7,4},{4,6,85},{2,7,16},{2,7,16},{5,7,4345},{5,7,2453},{5,7,1429}, +{5,7,901},{5,7,4190},{5,7,1770},{4,7,360},{4,6,1266},{4,7,3861},{2,7,1041},{6,7,1281},{6,7,657},{6,7,257},{5,7,325},{6,7,2250},{5,7,1194},{5,7,170},{2,7,977},{5,7,2250},{2,7,977},{5,7,1429},{5,7,1429},{5,7,1429},{5,7,901},{5,7,1274},{4,7,360},{4,7,360},{4,6,110},{3,7,979},{3,6,153},{6,7,257},{6,7,257},{6,7,257},{5,7,325},{7,4,648}, +{5,7,170},{5,7,170},{4,6,10},{7,5,648},{4,6,10},{7,7,521},{6,7,401},{6,7,1},{5,7,1},{7,7,521},{6,7,521},{5,7,1},{0,7,961},{6,7,521},{0,7,961},{5,0,900},{5,0,900},{5,0,900},{5,0,900},{4,7,164},{4,7,164},{4,7,164},{4,6,101},{2,7,80},{2,7,80},{6,7,3669},{5,7,2917},{5,7,1893},{5,7,1013},{5,7,4158},{5,7,1386},{5,7,362}, +{4,7,1049},{4,7,3381},{3,7,555},{6,7,1169},{6,7,545},{6,7,145},{6,7,73},{7,6,1802},{5,7,1130},{5,7,106},{3,7,530},{7,6,1770},{3,7,530},{5,7,1893},{5,7,1893},{5,7,1893},{5,7,1013},{5,7,1242},{5,7,362},{5,7,362},{5,6,402},{3,7,1251},{4,6,339},{6,7,145},{6,7,145},{6,7,145},{6,7,73},{7,5,680},{5,7,106},{5,7,106},{5,6,146},{6,6,648}, +{5,6,146},{7,7,265},{7,7,193},{6,7,81},{6,7,9},{7,7,265},{7,7,305},{6,7,9},{0,7,529},{7,7,305},{0,7,529},{5,0,932},{5,0,932},{5,0,932},{5,0,932},{5,7,281},{5,7,281},{5,7,281},{5,6,281},{3,7,26},{3,7,26},{6,7,3077},{6,7,2453},{6,7,2053},{5,7,1509},{6,7,3438},{5,7,1386},{5,7,362},{5,7,650},{5,7,3195},{3,7,283},{7,7,1293}, +{6,7,689},{6,7,289},{6,7,25},{7,6,1386},{6,7,786},{5,7,298},{4,7,261},{6,7,1386},{4,7,261},{6,7,2053},{6,7,2053},{6,7,2053},{5,7,1509},{5,7,1594},{5,7,362},{5,7,362},{5,6,434},{4,7,1260},{3,7,283},{6,7,289},{6,7,289},{6,7,289},{6,7,25},{6,7,650},{5,7,298},{5,7,298},{4,7,261},{5,7,650},{4,7,261},{7,7,137},{7,7,65},{7,7,16}, +{6,7,25},{7,7,137},{7,7,113},{6,7,25},{0,7,225},{7,7,113},{0,7,225},{5,0,1220},{5,0,1220},{5,0,1220},{5,0,1220},{5,7,73},{5,7,73},{5,7,73},{5,6,73},{3,7,58},{3,7,58},{6,7,2870},{6,7,2246},{6,7,1846},{6,7,1366},{6,7,2889},{6,7,1785},{5,7,821},{5,7,137},{5,7,2700},{4,7,126},{7,7,771},{7,7,699},{7,7,650},{6,7,277},{7,7,1107}, +{6,7,696},{6,7,296},{4,7,45},{6,7,1080},{4,7,45},{6,7,1846},{6,7,1846},{6,7,1846},{6,7,1366},{6,7,1865},{5,7,821},{5,7,821},{5,7,137},{4,7,1611},{4,7,126},{7,7,650},{7,7,650},{7,7,650},{6,7,277},{7,6,648},{6,7,296},{6,7,296},{4,7,45},{7,6,680},{4,7,45},{7,7,146},{7,7,74},{7,7,25},{7,7,1},{7,7,146},{7,7,50},{7,7,1}, +{0,7,36},{7,7,50},{0,7,36},{6,0,1170},{6,0,1170},{6,0,1170},{6,0,1170},{5,7,145},{5,7,145},{5,7,145},{5,7,101},{4,7,90},{4,7,90},{6,7,2962},{6,7,2338},{6,7,1938},{6,7,1314},{6,7,2677},{6,7,1429},{6,7,1029},{5,7,85},{5,7,2536},{4,7,122},{7,7,531},{7,7,459},{7,7,410},{7,7,338},{7,7,771},{7,7,627},{6,7,404},{5,7,4},{7,7,827}, +{5,7,4},{6,7,1938},{6,7,1938},{6,7,1938},{6,7,1314},{6,7,1653},{6,7,1029},{6,7,1029},{5,7,85},{5,7,1512},{4,7,122},{7,7,410},{7,7,410},{7,7,410},{7,7,338},{7,7,650},{6,7,404},{6,7,404},{5,7,4},{6,7,596},{5,7,4},{7,7,242},{7,7,170},{7,7,121},{7,7,49},{7,7,242},{7,7,98},{7,7,49},{0,7,0},{7,7,98},{0,7,0},{6,0,914}, +{6,0,914},{6,0,914},{6,0,914},{5,7,481},{5,7,481},{5,7,481},{5,7,85},{4,7,122},{4,7,122},{7,7,2924},{6,7,2338},{6,7,1938},{6,7,1314},{6,7,2373},{6,7,1125},{6,7,725},{5,7,325},{6,7,2132},{5,7,232},{7,7,323},{7,7,251},{7,7,202},{7,7,130},{7,7,467},{7,7,323},{7,7,274},{5,7,36},{7,7,459},{5,7,36},{6,7,1938},{6,7,1938},{6,7,1938}, +{6,7,1314},{6,7,1349},{6,7,725},{6,7,725},{5,7,325},{5,7,1256},{5,7,232},{7,7,202},{7,7,202},{7,7,202},{7,7,130},{7,7,346},{7,7,274},{7,7,274},{5,7,36},{7,7,410},{5,7,36},{7,7,242},{7,7,170},{7,7,121},{7,7,49},{7,7,242},{7,7,98},{7,7,49},{0,7,0},{7,7,98},{0,7,0},{6,0,914},{6,0,914},{6,0,914},{6,0,914},{6,7,325}, +{6,7,325},{6,7,325},{5,7,325},{5,7,232},{5,7,232},{7,7,2092},{7,7,2020},{7,7,1971},{6,7,1570},{7,7,2140},{6,7,1077},{6,7,677},{6,7,85},{6,7,1588},{5,7,232},{7,7,243},{7,7,171},{7,7,122},{7,7,50},{7,7,291},{7,7,147},{7,7,98},{6,7,4},{7,7,219},{6,7,4},{7,7,1971},{7,7,1971},{7,7,1971},{6,7,1570},{6,7,1301},{6,7,677},{6,7,677}, +{6,7,85},{6,7,1188},{5,7,232},{7,7,122},{7,7,122},{7,7,122},{7,7,50},{7,7,170},{7,7,98},{7,7,98},{6,7,4},{7,7,170},{6,7,4},{7,7,242},{7,7,170},{7,7,121},{7,7,49},{7,7,242},{7,7,98},{7,7,49},{0,7,0},{7,7,98},{0,7,0},{6,0,1170},{6,0,1170},{6,0,1170},{6,0,1170},{6,7,277},{6,7,277},{6,7,277},{6,7,85},{5,7,232}, +{5,7,232},{0,4,1618},{0,3,436},{0,2,74},{0,2,866},{0,2,3411},{0,2,2531},{0,1,1251},{0,1,2531},{0,1,3772},{0,1,2892},{0,4,1618},{0,3,436},{0,2,74},{0,2,866},{0,2,3411},{0,2,2531},{0,1,1251},{0,1,2531},{2,0,3376},{0,1,2531},{0,1,25},{0,1,25},{0,1,25},{0,1,49},{0,0,360},{0,0,232},{0,0,232},{0,0,149},{0,0,332},{0,0,185},{0,1,25}, +{0,1,25},{0,1,25},{0,1,49},{0,0,360},{0,0,232},{0,0,232},{0,0,149},{0,0,296},{0,0,149},{1,2,1570},{0,3,436},{0,2,74},{0,2,866},{1,2,1570},{0,2,1570},{0,2,866},{0,1,1570},{0,2,1570},{0,1,1570},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,36},{0,0,36},{0,0,36},{0,0,100},{0,0,136},{0,0,136},{0,4,1586},{0,3,340},{0,2,10}, +{0,2,450},{0,3,4016},{0,2,2627},{0,2,1411},{0,1,2691},{0,1,4572},{0,1,3052},{0,4,1586},{0,3,340},{0,2,10},{0,2,450},{1,1,3968},{0,2,2627},{0,2,1411},{0,1,2691},{2,0,4016},{0,1,2691},{0,2,1},{0,2,1},{0,2,1},{0,1,1},{0,1,530},{0,1,362},{0,1,362},{0,0,325},{0,0,620},{0,0,361},{0,2,1},{0,2,1},{0,2,1},{0,1,1},{0,1,530}, +{0,1,362},{0,1,362},{0,0,325},{0,0,584},{0,0,325},{2,1,1570},{0,3,340},{0,2,10},{0,2,450},{2,1,1570},{4,0,1570},{0,2,450},{0,1,1730},{4,0,1570},{0,1,1730},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,36},{0,0,36},{0,0,36},{0,0,100},{0,0,136},{0,0,136},{0,5,1576},{0,4,290},{0,2,202},{0,2,290},{0,3,4656},{0,2,2979},{0,2,1251}, +{0,1,3107},{0,1,5628},{0,1,3468},{0,5,1576},{0,4,290},{0,2,202},{0,2,290},{0,3,4656},{0,2,2979},{0,2,1251},{0,1,3107},{1,1,4656},{0,1,3107},{0,3,16},{0,3,16},{0,3,16},{0,1,81},{0,1,802},{0,1,442},{0,1,442},{0,0,629},{0,0,1036},{0,0,665},{0,3,16},{0,3,16},{0,3,16},{0,1,81},{0,1,802},{0,1,442},{0,1,442},{0,0,629},{1,0,818}, +{0,0,629},{3,0,1576},{0,4,290},{0,2,202},{0,2,290},{3,0,1576},{3,1,1576},{0,2,290},{0,1,2146},{3,1,1576},{0,1,2146},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,36},{0,0,36},{0,0,36},{0,0,100},{0,0,136},{0,0,136},{0,5,1640},{0,4,162},{0,3,241},{0,2,386},{0,4,5539},{0,3,3512},{0,2,1347},{0,1,3779},{0,2,6396},{0,1,4140},{0,5,1640}, +{0,4,162},{0,3,241},{0,2,386},{1,2,5435},{0,3,3512},{0,2,1347},{0,1,3779},{0,2,5435},{0,1,3779},{0,3,16},{0,3,16},{0,3,16},{0,2,25},{0,1,1202},{0,1,650},{0,1,650},{0,1,970},{0,0,1580},{0,0,1097},{0,3,16},{0,3,16},{0,3,16},{0,2,25},{1,0,1170},{0,1,650},{0,1,650},{0,1,970},{1,0,1154},{0,1,970},{2,2,1576},{0,4,162},{0,3,241}, +{0,2,386},{2,2,1576},{5,0,1576},{0,2,386},{0,2,1730},{5,0,1576},{0,2,1730},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,36},{0,0,36},{0,0,36},{0,0,100},{0,0,136},{0,0,136},{0,6,1667},{0,5,259},{0,3,286},{0,3,406},{0,4,5440},{0,3,3035},{0,2,1284},{0,2,3504},{0,2,6513},{0,2,4465},{0,6,1667},{0,5,259},{0,3,286},{0,3,406},{2,1,5424}, +{0,3,3035},{0,2,1284},{0,2,3504},{4,0,5424},{0,2,3504},{0,4,81},{0,4,81},{0,4,81},{0,2,97},{0,2,1160},{0,2,500},{0,2,500},{0,1,520},{0,1,1521},{0,1,881},{0,4,81},{0,4,81},{0,4,81},{0,2,97},{0,2,1160},{0,2,500},{0,2,500},{0,1,520},{0,1,1160},{0,1,520},{2,3,1576},{0,5,178},{1,3,100},{0,3,325},{2,3,1576},{6,0,1576},{0,3,325}, +{0,2,1568},{6,0,1576},{0,2,1568},{0,0,81},{0,0,81},{0,0,81},{0,0,81},{0,0,9},{0,0,9},{0,0,9},{0,0,1},{0,0,37},{0,0,37},{0,7,1865},{0,5,339},{0,3,734},{0,3,374},{0,5,5435},{0,3,3019},{0,3,814},{0,2,2992},{0,2,7025},{0,2,3953},{1,5,1865},{0,5,339},{1,3,293},{0,3,374},{3,0,5435},{0,3,3019},{0,3,814},{0,2,2992},{3,1,5435}, +{0,2,2992},{0,5,314},{0,5,314},{0,5,314},{0,3,370},{0,3,1170},{0,2,340},{0,2,340},{0,1,392},{0,1,1713},{0,1,753},{1,3,289},{1,3,289},{1,3,289},{1,2,289},{1,1,1154},{0,2,340},{0,2,340},{0,1,392},{1,1,1170},{0,1,392},{4,0,1576},{0,5,50},{1,3,4},{0,3,85},{4,0,1576},{5,1,1576},{0,3,85},{0,2,1696},{5,1,1576},{0,2,1696},{0,0,289}, +{0,0,289},{0,0,289},{0,0,289},{0,1,4},{0,1,4},{0,1,4},{0,0,49},{0,0,85},{0,0,85},{0,7,2265},{0,6,787},{1,3,1401},{0,3,726},{0,5,5515},{0,4,2664},{0,3,462},{0,2,2864},{0,3,7363},{0,2,3825},{1,6,1667},{1,5,405},{1,3,245},{1,3,377},{2,2,5427},{0,4,2664},{0,3,462},{0,2,2864},{5,0,5427},{0,2,2864},{0,5,634},{0,5,634},{0,5,634}, +{0,3,626},{0,3,1202},{0,3,362},{0,3,362},{0,1,520},{0,2,2145},{0,1,881},{1,4,106},{1,4,106},{1,4,106},{1,2,145},{2,0,1154},{0,3,362},{0,3,362},{0,1,520},{3,0,1154},{0,1,520},{2,4,1576},{0,6,162},{1,3,164},{0,3,101},{2,4,1576},{7,0,1576},{0,3,101},{0,2,2080},{7,0,1576},{0,2,2080},{0,0,625},{0,0,625},{0,0,625},{0,0,625},{0,1,36}, +{0,1,36},{0,1,36},{0,1,36},{0,0,261},{0,0,261},{1,6,2775},{0,6,1091},{1,4,1422},{0,3,1462},{0,6,5427},{0,4,2536},{0,3,494},{0,2,3120},{0,3,7635},{0,2,4081},{1,6,1619},{1,5,165},{1,4,266},{1,3,361},{3,1,5427},{0,4,2536},{0,3,494},{0,2,3120},{4,1,5427},{0,2,3120},{0,6,1090},{0,6,1090},{0,6,1090},{0,3,1138},{0,4,1152},{0,3,170},{0,3,170}, +{0,2,416},{0,2,2145},{0,1,1265},{1,4,10},{1,4,10},{1,4,10},{1,3,37},{0,4,1152},{0,3,170},{0,3,170},{0,2,416},{2,1,1152},{0,2,416},{3,3,1570},{0,6,2},{1,4,265},{1,3,360},{3,3,1570},{6,1,1570},{1,3,360},{0,3,1768},{6,1,1570},{0,3,1768},{0,0,1089},{0,0,1089},{0,0,1089},{0,0,1089},{0,2,4},{0,2,4},{0,2,4},{0,1,4},{0,1,365}, +{0,1,365},{1,7,2796},{1,6,1432},{1,4,1413},{1,4,1593},{0,7,5435},{0,5,2360},{0,4,299},{0,3,2594},{0,3,8400},{0,3,4530},{1,7,1640},{1,6,276},{1,4,257},{1,4,437},{4,0,5427},{0,5,2360},{0,4,299},{0,3,2594},{3,2,5427},{0,3,2594},{1,5,1221},{1,5,1221},{1,5,1221},{1,3,1229},{0,5,1184},{0,4,250},{0,4,250},{0,2,146},{0,2,2451},{0,2,1107},{1,5,65}, +{1,5,65},{1,5,65},{1,3,73},{1,3,1154},{0,4,250},{0,4,250},{0,2,146},{1,2,1154},{0,2,146},{4,2,1576},{0,6,128},{2,4,130},{0,4,74},{4,2,1576},{5,2,1576},{0,4,74},{0,3,1570},{5,2,1576},{0,3,1570},{1,0,1220},{1,0,1220},{1,0,1220},{1,0,1220},{0,3,4},{0,3,4},{0,3,4},{0,1,121},{0,1,482},{0,1,482},{1,7,3180},{1,6,1464},{1,4,1813}, +{1,4,1513},{0,7,5515},{0,5,2168},{0,4,59},{0,3,2242},{0,4,8764},{0,3,4178},{2,6,1894},{1,6,308},{2,4,326},{1,4,357},{2,4,5427},{0,5,2168},{0,4,59},{0,3,2242},{7,0,5427},{0,3,2242},{1,6,1448},{1,6,1448},{1,6,1448},{1,4,1512},{0,5,1184},{0,4,58},{0,4,58},{0,2,178},{0,2,2995},{0,2,1139},{1,6,292},{1,6,292},{1,6,292},{2,3,325},{2,2,1152}, +{0,4,58},{0,4,58},{0,2,178},{5,0,1152},{0,2,178},{5,1,1570},{0,7,34},{2,4,2},{0,4,10},{5,1,1570},{4,3,1570},{0,4,10},{0,3,1666},{4,3,1570},{0,3,1666},{1,0,1412},{1,0,1412},{1,0,1412},{1,0,1412},{0,3,36},{0,3,36},{0,3,36},{0,2,9},{0,1,722},{0,1,722},{1,7,3816},{1,6,1748},{1,5,2450},{1,4,1685},{0,7,5983},{0,6,2180},{0,4,207}, +{0,3,2278},{0,4,9004},{0,3,4038},{2,7,1700},{2,6,462},{2,4,230},{2,4,406},{3,3,5420},{0,6,2176},{0,4,203},{0,3,2274},{6,1,5420},{0,3,2274},{1,6,1604},{1,6,1604},{1,6,1604},{1,4,1604},{0,6,1156},{0,4,126},{0,4,126},{0,3,429},{0,3,3044},{0,2,1307},{2,5,136},{2,5,136},{2,5,136},{2,3,149},{3,1,1152},{0,4,122},{0,4,122},{0,3,425},{4,1,1152}, +{0,3,425},{6,0,1570},{0,7,130},{2,4,130},{1,4,85},{6,0,1570},{3,4,1570},{1,4,85},{0,3,2018},{3,4,1570},{0,3,2018},{1,0,1600},{1,0,1600},{1,0,1600},{1,0,1600},{0,4,5},{0,4,5},{0,4,5},{0,2,29},{0,2,866},{0,2,866},{1,7,4520},{1,7,1608},{1,5,2418},{1,4,1925},{1,7,5996},{0,6,1956},{0,5,409},{0,4,2751},{0,5,9020},{0,3,3846},{2,7,1604}, +{2,6,174},{2,5,297},{2,4,342},{4,2,5420},{0,6,1856},{0,5,309},{0,4,2651},{5,2,5420},{0,4,2651},{1,7,1604},{1,7,1604},{1,7,1604},{1,4,1636},{0,7,1302},{0,5,120},{0,5,120},{0,3,189},{0,3,2820},{0,3,1245},{2,5,8},{2,5,8},{2,5,8},{2,4,53},{4,0,1154},{0,5,20},{0,5,20},{0,3,89},{3,2,1154},{0,3,89},{4,4,1568},{1,7,8},{2,5,293}, +{0,5,293},{4,4,1568},{7,2,1568},{0,5,293},{0,4,1810},{7,2,1568},{0,4,1810},{1,0,1600},{1,0,1600},{1,0,1600},{1,0,1600},{0,5,116},{0,5,116},{0,5,116},{0,3,164},{0,2,610},{0,2,610},{2,7,4356},{1,7,2004},{2,5,2635},{1,5,2006},{1,7,5924},{0,6,2316},{0,5,499},{0,4,2337},{0,5,8300},{0,4,3420},{2,7,1955},{2,7,299},{2,5,234},{2,5,474},{5,1,5420}, +{0,6,1955},{0,5,138},{0,4,1976},{4,3,5420},{0,4,1976},{1,7,1955},{1,7,1955},{1,7,1955},{1,5,1942},{1,6,1427},{0,5,435},{0,5,435},{0,3,378},{0,4,2628},{0,3,642},{2,6,53},{2,6,53},{2,6,53},{2,4,53},{2,4,1152},{0,5,74},{0,5,74},{0,3,17},{7,0,1152},{0,3,17},{5,3,1570},{1,7,98},{3,5,164},{1,5,100},{5,3,1570},{6,3,1570},{1,5,100}, +{0,4,1576},{6,3,1570},{0,4,1576},{1,0,1906},{1,0,1906},{1,0,1906},{1,0,1906},{1,4,234},{1,4,234},{1,4,234},{1,2,325},{0,3,626},{0,3,626},{2,7,4356},{2,7,1964},{2,5,2267},{2,5,2027},{1,7,6404},{1,6,2220},{1,5,117},{1,4,2314},{0,5,8204},{0,4,2684},{3,7,1929},{2,7,283},{3,5,365},{2,5,346},{6,0,5420},{0,7,1712},{1,5,68},{0,4,1784},{3,4,5420}, +{0,4,1784},{2,6,1942},{2,6,1942},{2,6,1942},{2,4,2006},{1,6,1219},{1,5,117},{1,5,117},{1,3,209},{0,4,2340},{0,3,514},{2,6,261},{2,6,261},{2,6,261},{2,4,325},{3,3,1154},{0,6,50},{0,6,50},{1,3,160},{6,1,1154},{1,3,160},{6,2,1568},{2,7,58},{3,5,4},{1,5,4},{6,2,1568},{5,4,1568},{1,5,4},{0,4,1640},{5,4,1568},{0,4,1640},{2,0,1906}, +{2,0,1906},{2,0,1906},{2,0,1906},{1,4,74},{1,4,74},{1,4,74},{1,3,65},{0,3,370},{0,3,370},{2,7,4868},{2,7,1740},{2,5,2411},{2,5,1691},{2,7,6548},{1,7,2244},{1,5,165},{1,4,2250},{0,6,7668},{0,4,2460},{3,7,1817},{3,7,525},{3,5,221},{3,5,441},{4,4,5419},{0,7,1712},{1,5,164},{0,4,1976},{7,2,5419},{0,4,1976},{2,7,1619},{2,7,1619},{2,7,1619}, +{2,5,1627},{1,7,1155},{1,5,101},{1,5,101},{1,3,417},{0,5,2379},{0,4,696},{3,5,157},{3,5,157},{3,5,157},{3,4,157},{4,2,1154},{0,6,82},{0,6,82},{0,4,212},{5,2,1154},{0,4,212},{7,1,1568},{2,7,122},{3,5,100},{2,5,73},{7,1,1568},{4,5,1568},{2,5,73},{0,4,1960},{4,5,1568},{0,4,1960},{2,0,1618},{2,0,1618},{2,0,1618},{2,0,1618},{1,5,1}, +{1,5,1},{1,5,1},{1,3,17},{0,3,370},{0,3,370},{3,7,5570},{2,7,2028},{2,6,2394},{2,5,1867},{2,7,6452},{1,7,1956},{1,6,439},{1,4,2698},{0,6,7348},{0,4,2748},{3,7,2089},{3,7,189},{3,6,334},{3,5,329},{5,3,5419},{1,7,1875},{1,6,358},{0,5,2145},{6,3,5419},{0,5,2145},{2,7,1667},{2,7,1667},{2,7,1667},{2,5,1611},{1,7,1331},{1,6,115},{1,6,115}, +{1,4,198},{0,5,1979},{0,4,248},{3,6,10},{3,6,10},{3,6,10},{3,5,73},{5,1,1160},{1,6,34},{1,6,34},{0,4,52},{7,1,1160},{0,4,52},{5,5,1570},{3,7,180},{4,5,320},{2,5,281},{5,5,1570},{3,6,1570},{2,5,281},{0,5,1856},{3,6,1570},{0,5,1856},{2,0,1586},{2,0,1586},{2,0,1586},{2,0,1586},{1,6,106},{1,6,106},{1,6,106},{1,4,162},{0,4,212}, +{0,4,212},{3,7,5354},{3,7,2770},{3,6,2717},{2,6,1986},{2,7,6956},{1,7,2244},{1,6,457},{1,5,2351},{0,7,7268},{0,5,1974},{4,7,2384},{3,7,270},{3,6,217},{3,6,517},{6,2,5419},{1,7,1920},{1,6,133},{0,5,1650},{5,4,5419},{0,5,1650},{2,7,2180},{2,7,2180},{2,7,2180},{2,6,1905},{2,7,1480},{1,6,376},{1,6,376},{1,4,333},{0,5,1988},{0,4,203},{3,7,45}, +{3,7,45},{3,7,45},{3,5,37},{6,0,1154},{1,6,52},{1,6,52},{1,4,9},{3,4,1154},{1,4,9},{6,4,1568},{3,7,234},{3,6,181},{1,6,117},{6,4,1568},{7,4,1568},{1,6,117},{0,5,1586},{7,4,1568},{0,5,1586},{2,0,1856},{2,0,1856},{2,0,1856},{2,0,1856},{2,5,272},{2,5,272},{2,5,272},{1,4,324},{0,4,194},{0,4,194},{3,7,5706},{3,7,2514},{3,6,2285}, +{3,6,2105},{3,7,7359},{2,7,2244},{2,6,147},{2,5,2358},{0,7,6820},{0,5,1718},{4,7,2256},{3,7,750},{4,6,410},{3,6,341},{7,1,5419},{2,7,2180},{2,6,83},{0,5,1618},{4,5,5419},{0,5,1618},{3,7,1985},{3,7,1985},{3,7,1985},{3,5,2041},{2,7,1224},{2,6,146},{2,6,146},{2,4,210},{0,6,1644},{1,4,509},{3,7,221},{3,7,221},{3,7,221},{3,5,277},{5,2,1160}, +{1,7,64},{1,7,64},{2,4,146},{7,2,1160},{2,4,146},{7,3,1570},{4,7,356},{4,6,10},{2,6,2},{7,3,1570},{6,5,1570},{2,6,2},{0,5,1618},{6,5,1570},{0,5,1618},{3,0,1960},{3,0,1960},{3,0,1960},{3,0,1960},{2,5,80},{2,5,80},{2,5,80},{2,4,89},{0,5,100},{0,5,100},{3,7,6570},{3,7,2770},{3,6,2365},{3,6,1705},{3,7,7311},{2,7,2276},{2,6,131}, +{2,5,2230},{0,7,6884},{0,5,1974},{4,7,2512},{4,7,532},{4,6,218},{4,6,482},{5,5,5424},{2,7,2276},{2,6,131},{1,5,1931},{3,6,5424},{1,5,1931},{3,7,1809},{3,7,1809},{3,7,1809},{3,6,1656},{2,7,1352},{2,6,82},{2,6,82},{2,4,370},{0,6,1548},{0,5,293},{4,6,169},{4,6,169},{4,6,169},{4,5,169},{6,1,1160},{1,7,64},{1,7,64},{1,5,250},{6,3,1160}, +{1,5,250},{5,7,1570},{4,7,388},{4,6,74},{3,6,65},{5,7,1570},{5,6,1570},{3,6,65},{0,5,1906},{5,6,1570},{0,5,1906},{3,0,1640},{3,0,1640},{3,0,1640},{3,0,1640},{2,6,1},{2,6,1},{2,6,1},{2,4,9},{0,5,68},{0,5,68},{4,7,6752},{3,7,3538},{3,7,2378},{3,6,1817},{3,7,7775},{2,7,2820},{2,7,477},{2,5,2614},{1,7,7360},{0,6,1978},{5,7,3110}, +{4,7,692},{4,7,377},{4,6,322},{6,4,5424},{3,7,2539},{2,7,413},{0,6,1942},{7,4,5424},{0,6,1942},{3,7,2017},{3,7,2017},{3,7,2017},{3,6,1592},{3,7,1846},{2,7,116},{2,7,116},{2,5,213},{0,7,1531},{1,5,283},{4,7,16},{4,7,16},{4,7,16},{4,6,97},{7,0,1154},{2,7,52},{2,7,52},{1,5,58},{3,5,1154},{1,5,58},{7,4,1576},{5,7,610},{5,6,306}, +{3,6,241},{7,4,1576},{7,5,1576},{3,6,241},{0,6,1906},{7,5,1576},{0,6,1906},{3,0,1576},{3,0,1576},{3,0,1576},{3,0,1576},{2,7,100},{2,7,100},{2,7,100},{2,5,164},{0,6,72},{0,6,72},{4,7,6932},{4,7,3932},{4,7,2807},{3,7,1974},{4,7,8428},{3,7,2981},{2,7,423},{2,6,2373},{1,7,7540},{0,6,1618},{5,7,2921},{4,7,1331},{4,7,206},{4,7,566},{7,3,5424}, +{3,7,2692},{2,7,134},{0,6,1609},{6,5,5424},{0,6,1609},{4,7,2707},{4,7,2707},{4,7,2707},{3,7,1874},{3,7,1513},{2,7,323},{2,7,323},{2,5,294},{0,7,1324},{1,5,184},{4,7,106},{4,7,106},{4,7,106},{4,6,25},{7,1,1160},{2,7,34},{2,7,34},{2,5,5},{7,3,1160},{2,5,5},{7,5,1570},{5,7,628},{4,7,181},{2,7,125},{7,5,1570},{6,6,1586},{2,7,125}, +{0,6,1600},{6,6,1586},{0,6,1600},{3,0,1810},{3,0,1810},{3,0,1810},{3,0,1810},{2,7,298},{2,7,298},{2,7,298},{2,5,290},{0,6,18},{0,6,18},{4,7,7636},{4,7,4156},{4,7,2311},{4,7,2191},{4,7,8428},{3,7,3317},{3,7,185},{3,6,2410},{2,7,8180},{1,6,1722},{5,7,3161},{5,7,1357},{5,7,461},{4,7,342},{5,7,5424},{4,7,2979},{3,7,104},{1,6,1601},{5,6,5424}, +{1,6,1601},{4,7,2307},{4,7,2307},{4,7,2307},{4,6,2082},{3,7,1625},{3,7,181},{3,7,181},{3,5,217},{0,7,1548},{1,5,504},{5,7,457},{5,7,457},{5,7,457},{4,6,233},{6,3,1154},{3,7,100},{3,7,100},{3,5,136},{6,4,1154},{3,5,136},{6,7,1576},{5,7,916},{5,7,20},{3,7,4},{6,7,1576},{7,6,1576},{3,7,4},{0,6,1600},{7,6,1576},{0,6,1600},{4,0,2018}, +{4,0,2018},{4,0,2018},{4,0,2018},{3,6,90},{3,6,90},{3,6,90},{3,5,117},{0,7,104},{0,7,104},{5,7,7862},{4,7,4316},{4,7,2291},{4,7,1691},{4,7,8004},{3,7,3433},{3,7,69},{3,6,1774},{2,7,7580},{1,6,1470},{5,7,3101},{5,7,1209},{5,7,185},{4,7,466},{7,4,4803},{4,7,2579},{3,7,68},{2,6,1448},{7,5,4803},{2,6,1448},{4,7,2291},{4,7,2291},{4,7,2291}, +{4,7,1691},{3,7,2121},{3,7,69},{3,7,69},{3,5,329},{1,7,1539},{1,6,314},{5,7,185},{5,7,185},{5,7,185},{5,6,185},{7,2,1154},{3,7,68},{3,7,68},{2,6,292},{5,5,1154},{2,6,292},{7,6,1252},{6,7,724},{5,7,16},{4,7,25},{7,6,1252},{7,6,1268},{4,7,25},{0,6,1412},{7,6,1268},{0,6,1412},{4,0,1666},{4,0,1666},{4,0,1666},{4,0,1666},{3,7,5}, +{3,7,5},{3,7,5},{3,5,5},{0,7,40},{0,7,40},{5,7,6806},{4,7,4684},{4,7,2659},{4,7,1579},{4,7,7668},{4,7,2988},{3,7,341},{3,6,1390},{2,7,7084},{1,6,1470},{6,7,2645},{5,7,1193},{5,7,169},{5,7,125},{6,6,4059},{4,7,2259},{4,7,234},{2,6,1224},{4,7,4059},{2,6,1224},{4,7,2659},{4,7,2659},{4,7,2659},{4,7,1579},{4,7,2043},{3,7,341},{3,7,341}, +{3,6,234},{1,7,1779},{1,6,314},{5,7,169},{5,7,169},{5,7,169},{5,7,125},{5,6,1152},{4,7,234},{4,7,234},{2,6,68},{4,6,1152},{2,6,68},{7,6,900},{6,7,500},{6,7,100},{4,7,9},{7,6,900},{6,7,884},{4,7,9},{0,6,1220},{6,7,884},{0,6,1220},{4,0,1570},{4,0,1570},{4,0,1570},{4,0,1570},{3,7,85},{3,7,85},{3,7,85},{3,5,149},{1,7,98}, +{1,7,98},{5,7,6077},{5,7,4185},{5,7,3161},{4,7,1912},{5,7,6790},{4,7,2529},{4,7,504},{3,6,1417},{3,7,6199},{1,7,1097},{6,7,1925},{6,7,1301},{5,7,457},{5,7,17},{7,5,3321},{5,7,1754},{4,7,180},{1,7,1093},{6,6,3345},{1,7,1093},{5,7,3161},{5,7,3161},{5,7,3161},{4,7,1912},{4,7,2124},{4,7,504},{4,7,504},{3,6,261},{2,7,1944},{2,6,171},{5,7,457}, +{5,7,457},{5,7,457},{5,7,17},{6,5,1154},{4,7,180},{4,7,180},{3,6,5},{3,7,1154},{3,6,5},{7,7,605},{6,7,401},{6,7,1},{5,7,1},{7,7,605},{6,7,569},{5,7,1},{0,7,1089},{6,7,569},{0,7,1089},{4,0,1768},{4,0,1768},{4,0,1768},{4,0,1768},{4,7,360},{4,7,360},{4,7,360},{3,6,260},{1,7,8},{1,7,8},{5,7,5837},{5,7,3945},{5,7,2921}, +{5,7,2129},{5,7,6054},{4,7,2529},{4,7,504},{4,6,1386},{3,7,5767},{2,7,773},{6,7,1557},{6,7,933},{6,7,533},{5,7,193},{6,7,2754},{5,7,1434},{4,7,404},{2,7,629},{5,7,2754},{2,7,629},{5,7,2921},{5,7,2921},{5,7,2921},{5,7,2129},{4,7,2604},{4,7,504},{4,7,504},{4,6,230},{2,7,2264},{2,6,443},{6,7,533},{6,7,533},{6,7,533},{5,7,193},{7,4,1152}, +{4,7,404},{4,7,404},{3,6,117},{7,5,1152},{3,6,117},{7,7,317},{7,7,245},{6,7,49},{6,7,25},{7,7,317},{7,7,373},{6,7,25},{0,7,625},{7,7,373},{0,7,625},{5,0,2080},{5,0,2080},{5,0,2080},{5,0,2080},{4,7,104},{4,7,104},{4,7,104},{4,6,149},{2,7,148},{2,7,148},{5,7,5981},{5,7,4089},{5,7,3065},{5,7,1921},{5,7,5702},{5,7,2666},{4,7,888}, +{4,7,693},{4,7,5325},{2,7,341},{6,7,1445},{6,7,821},{6,7,421},{6,7,205},{7,6,2306},{5,7,1370},{5,7,346},{2,7,325},{7,6,2274},{2,7,325},{5,7,3065},{5,7,3065},{5,7,3065},{5,7,1921},{5,7,2786},{4,7,888},{4,7,888},{4,6,294},{3,7,2355},{2,7,341},{6,7,421},{6,7,421},{6,7,421},{6,7,205},{7,5,1184},{5,7,346},{5,7,346},{4,6,290},{6,6,1152}, +{4,6,290},{7,7,157},{7,7,85},{7,7,36},{6,7,9},{7,7,157},{7,7,149},{6,7,9},{0,7,289},{7,7,149},{0,7,289},{5,0,1696},{5,0,1696},{5,0,1696},{5,0,1696},{4,7,104},{4,7,104},{4,7,104},{4,6,5},{2,7,52},{2,7,52},{6,7,5433},{5,7,4617},{5,7,3593},{5,7,2097},{5,7,5734},{5,7,2346},{5,7,1322},{4,7,261},{4,7,4909},{2,7,293},{6,7,1589}, +{6,7,965},{6,7,565},{6,7,157},{7,6,1890},{6,7,1146},{5,7,538},{3,7,82},{6,7,1890},{3,7,82},{5,7,3593},{5,7,3593},{5,7,3593},{5,7,2097},{5,7,2818},{5,7,1322},{5,7,1322},{4,7,261},{3,7,2691},{2,7,293},{6,7,565},{6,7,565},{6,7,565},{6,7,157},{6,7,1154},{5,7,538},{5,7,538},{3,7,82},{5,7,1154},{3,7,82},{7,7,125},{7,7,53},{7,7,4}, +{7,7,4},{7,7,125},{7,7,53},{7,7,4},{0,7,81},{7,7,53},{0,7,81},{5,0,1568},{5,0,1568},{5,0,1568},{5,0,1568},{4,7,360},{4,7,360},{4,7,360},{4,6,117},{2,7,212},{2,7,212},{6,7,4866},{6,7,4242},{6,7,3842},{5,7,2754},{6,7,5113},{5,7,2445},{5,7,1421},{4,7,234},{5,7,4804},{3,7,164},{7,7,1203},{7,7,1131},{6,7,1033},{6,7,409},{7,7,1611}, +{6,7,1056},{6,7,656},{4,7,9},{6,7,1584},{4,7,9},{6,7,3842},{6,7,3842},{6,7,3842},{5,7,2754},{5,7,3313},{5,7,1421},{5,7,1421},{4,7,234},{4,7,2875},{3,7,164},{6,7,1033},{6,7,1033},{6,7,1033},{6,7,409},{7,6,1152},{6,7,656},{6,7,656},{4,7,9},{7,6,1184},{4,7,9},{7,7,242},{7,7,170},{7,7,121},{7,7,49},{7,7,242},{7,7,98},{7,7,49}, +{0,7,0},{7,7,98},{0,7,0},{5,0,1730},{5,0,1730},{5,0,1730},{5,0,1730},{5,7,397},{5,7,397},{5,7,397},{4,7,234},{3,7,164},{3,7,164},{6,7,4194},{6,7,3570},{6,7,3170},{6,7,2546},{6,7,4137},{5,7,2365},{5,7,1341},{5,7,185},{5,7,3876},{3,7,324},{7,7,771},{7,7,699},{7,7,650},{6,7,521},{7,7,1083},{6,7,864},{6,7,464},{4,7,25},{7,7,1187}, +{4,7,25},{6,7,3170},{6,7,3170},{6,7,3170},{6,7,2546},{6,7,3113},{5,7,1341},{5,7,1341},{5,7,185},{4,7,2491},{3,7,324},{7,7,650},{7,7,650},{7,7,650},{6,7,521},{7,6,832},{6,7,464},{6,7,464},{4,7,25},{6,7,800},{4,7,25},{7,7,242},{7,7,170},{7,7,121},{7,7,49},{7,7,242},{7,7,98},{7,7,49},{0,7,0},{7,7,98},{0,7,0},{5,0,2146}, +{5,0,2146},{5,0,2146},{5,0,2146},{5,7,317},{5,7,317},{5,7,317},{5,7,185},{3,7,324},{3,7,324},{6,7,3778},{6,7,3154},{6,7,2754},{6,7,2130},{6,7,3417},{6,7,2169},{5,7,1517},{5,7,9},{5,7,3204},{4,7,338},{7,7,467},{7,7,395},{7,7,346},{7,7,274},{7,7,683},{7,7,539},{6,7,400},{5,7,0},{7,7,723},{5,7,0},{6,7,2754},{6,7,2754},{6,7,2754}, +{6,7,2130},{6,7,2393},{5,7,1517},{5,7,1517},{5,7,9},{5,7,2180},{4,7,338},{7,7,346},{7,7,346},{7,7,346},{7,7,274},{7,7,562},{6,7,400},{6,7,400},{5,7,0},{6,7,544},{5,7,0},{7,7,242},{7,7,170},{7,7,121},{7,7,49},{7,7,242},{7,7,98},{7,7,49},{0,7,0},{7,7,98},{0,7,0},{6,0,1730},{6,0,1730},{6,0,1730},{6,0,1730},{5,7,493}, +{5,7,493},{5,7,493},{5,7,9},{4,7,338},{4,7,338},{6,7,3618},{6,7,2994},{6,7,2594},{6,7,1970},{6,7,2953},{6,7,1705},{6,7,1305},{5,7,89},{5,7,2788},{4,7,466},{7,7,291},{7,7,219},{7,7,170},{7,7,98},{7,7,411},{7,7,267},{7,7,218},{6,7,16},{7,7,387},{6,7,16},{6,7,2594},{6,7,2594},{6,7,2594},{6,7,1970},{6,7,1929},{6,7,1305},{6,7,1305}, +{5,7,89},{5,7,1764},{4,7,466},{7,7,170},{7,7,170},{7,7,170},{7,7,98},{7,7,290},{7,7,218},{7,7,218},{6,7,16},{7,7,338},{6,7,16},{7,7,242},{7,7,170},{7,7,121},{7,7,49},{7,7,242},{7,7,98},{7,7,49},{0,7,0},{7,7,98},{0,7,0},{6,0,1570},{6,0,1570},{6,0,1570},{6,0,1570},{6,7,905},{6,7,905},{6,7,905},{5,7,89},{4,7,466}, +{4,7,466},{0,5,2665},{0,4,697},{0,3,290},{0,2,841},{0,3,5901},{0,2,4170},{0,2,1802},{0,1,4310},{0,1,6951},{0,1,4671},{0,5,2665},{0,4,697},{0,3,290},{0,2,841},{2,0,5893},{0,2,4170},{0,2,1802},{0,1,4310},{3,0,5893},{0,1,4310},{0,2,4},{0,2,4},{0,2,4},{0,1,4},{0,1,557},{0,1,365},{0,1,365},{0,0,356},{0,0,665},{0,0,392},{0,2,4}, +{0,2,4},{0,2,4},{0,1,4},{0,1,557},{0,1,365},{0,1,365},{0,0,356},{0,0,629},{0,0,356},{3,0,2665},{0,4,697},{0,3,290},{0,2,841},{3,0,2665},{3,1,2665},{0,2,841},{0,2,3145},{3,1,2665},{0,2,3145},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,36},{0,0,36},{0,0,36},{0,0,100},{0,0,136},{0,0,136},{0,6,2705},{0,4,617},{0,3,34}, +{0,2,985},{0,4,6754},{0,3,4625},{0,2,1946},{0,1,5030},{0,2,7635},{0,1,5391},{0,6,2705},{0,4,617},{0,3,34},{0,2,985},{1,2,6674},{0,3,4625},{0,2,1946},{0,1,5030},{0,2,6674},{0,1,5030},{0,3,9},{0,3,9},{0,3,9},{0,1,100},{0,1,845},{0,1,461},{0,1,461},{0,0,676},{0,0,1097},{0,0,712},{0,3,9},{0,3,9},{0,3,9},{0,1,100},{0,1,845}, +{0,1,461},{0,1,461},{0,0,676},{1,0,853},{0,0,676},{1,4,2665},{0,4,617},{0,3,34},{0,2,985},{1,4,2665},{2,2,2665},{0,2,985},{0,2,2777},{2,2,2665},{0,2,2777},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,36},{0,0,36},{0,0,36},{0,0,100},{0,0,136},{0,0,136},{0,6,2689},{0,5,477},{0,3,34},{0,3,634},{0,4,7538},{0,3,4865},{0,2,2346}, +{0,2,5474},{0,2,8547},{0,1,6367},{0,6,2689},{0,5,477},{0,3,34},{0,3,634},{0,4,7538},{0,3,4865},{0,2,2346},{0,2,5474},{2,1,7538},{0,2,5474},{0,3,25},{0,3,25},{0,3,25},{0,2,16},{0,1,1261},{0,1,685},{0,1,685},{0,1,965},{0,1,1646},{0,0,1160},{0,3,25},{0,3,25},{0,3,25},{0,2,16},{1,0,1213},{0,1,685},{0,1,685},{0,1,965},{1,0,1205}, +{0,1,965},{2,3,2669},{0,5,477},{0,3,34},{0,3,634},{2,3,2669},{6,0,2669},{0,3,634},{0,2,2665},{6,0,2669},{0,2,2665},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,36},{0,0,36},{0,0,36},{0,0,100},{0,0,136},{0,0,136},{0,7,2669},{0,5,365},{0,3,290},{0,3,410},{0,4,8578},{0,3,5361},{0,3,2346},{0,2,5618},{0,2,9715},{0,2,6579},{0,7,2669}, +{0,5,365},{0,3,290},{0,3,410},{2,1,8498},{0,3,5361},{0,3,2346},{0,2,5618},{4,0,8498},{0,2,5618},{0,4,0},{0,4,0},{0,4,0},{0,2,16},{0,2,1637},{0,2,977},{0,2,977},{0,1,997},{0,1,1998},{0,1,1358},{0,4,0},{0,4,0},{0,4,0},{0,2,16},{1,0,1629},{0,2,977},{0,2,977},{0,1,997},{0,1,1637},{0,1,997},{3,2,2669},{0,5,365},{1,3,185}, +{0,3,410},{3,2,2669},{5,1,2669},{0,3,410},{0,2,2809},{5,1,2669},{0,2,2809},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,36},{0,0,36},{0,0,36},{0,0,100},{0,0,136},{0,0,136},{0,7,2777},{0,6,257},{0,4,277},{0,3,464},{0,5,9677},{0,4,6026},{0,3,2400},{0,2,6086},{0,2,11335},{0,2,7047},{0,7,2777},{0,6,257},{0,4,277},{0,3,464},{3,0,9677}, +{0,4,6026},{0,3,2400},{0,2,6086},{3,1,9677},{0,2,6086},{0,5,16},{0,5,16},{0,5,16},{0,3,64},{0,2,2186},{0,2,1130},{0,2,1130},{0,1,1186},{0,1,2547},{0,1,1547},{0,5,16},{0,5,16},{0,5,16},{0,3,64},{0,2,2186},{0,2,1130},{0,2,1130},{0,1,1186},{0,1,2186},{0,1,1186},{4,1,2669},{0,6,257},{0,4,277},{0,3,464},{4,1,2669},{4,2,2669},{0,3,464}, +{0,3,3209},{4,2,2669},{0,3,3209},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,36},{0,0,36},{0,0,36},{0,0,100},{0,0,136},{0,0,136},{0,7,3209},{0,6,209},{0,4,389},{0,4,541},{0,6,9765},{0,4,5546},{0,3,2080},{0,2,5990},{0,3,11621},{0,2,6951},{0,7,3209},{0,6,209},{0,4,389},{0,4,541},{1,4,9677},{0,4,5546},{0,3,2080},{0,2,5990},{2,2,9677}, +{0,2,5990},{0,5,80},{0,5,80},{0,5,80},{0,3,64},{0,3,2196},{0,2,970},{0,2,970},{0,1,1058},{0,1,2739},{0,1,1419},{0,5,80},{0,5,80},{0,5,80},{0,3,64},{1,1,2180},{0,2,970},{0,2,970},{0,1,1058},{1,1,2196},{0,1,1058},{5,0,2669},{0,6,145},{1,4,52},{0,4,477},{5,0,2669},{3,3,2669},{0,4,477},{0,3,2809},{3,3,2669},{0,3,2809},{0,0,64}, +{0,0,64},{0,0,64},{0,0,64},{0,0,4},{0,0,4},{0,0,4},{0,0,4},{0,0,40},{0,0,40},{0,7,4025},{0,7,441},{0,4,885},{0,4,429},{0,6,9685},{0,4,5450},{0,4,1854},{0,3,6029},{0,3,11925},{0,2,7239},{1,7,3001},{0,7,441},{1,4,344},{0,4,429},{3,1,9685},{0,4,5450},{0,4,1854},{0,3,6029},{4,1,9685},{0,3,6029},{0,6,256},{0,6,256},{0,6,256}, +{0,3,320},{0,3,2228},{0,3,848},{0,3,848},{0,1,1186},{0,2,3171},{0,1,1547},{0,6,256},{0,6,256},{0,6,256},{0,3,320},{2,0,2180},{0,3,848},{0,3,848},{0,1,1186},{3,0,2180},{0,1,1186},{4,2,2677},{0,7,185},{1,4,20},{0,4,173},{4,2,2677},{7,1,2677},{0,4,173},{0,3,2665},{7,1,2677},{0,3,2665},{0,0,256},{0,0,256},{0,0,256},{0,0,256},{0,1,9}, +{0,1,9},{0,1,9},{0,0,36},{0,0,72},{0,0,72},{1,7,4141},{0,7,617},{1,4,1500},{0,4,701},{0,7,9690},{0,5,5001},{0,4,1214},{0,3,5277},{0,3,12613},{0,3,7213},{1,7,2985},{1,6,465},{1,4,344},{1,4,524},{4,0,9674},{0,5,5001},{0,4,1214},{0,3,5277},{3,2,9674},{0,3,5277},{0,7,601},{0,7,601},{0,7,601},{0,4,601},{0,4,2178},{0,3,656},{0,3,656}, +{0,2,866},{0,2,3171},{0,2,1827},{1,5,101},{1,5,101},{1,5,101},{1,3,109},{0,4,2178},{0,3,656},{0,3,656},{0,2,866},{2,1,2178},{0,2,866},{5,1,2669},{0,7,41},{2,4,181},{0,4,125},{5,1,2669},{4,3,2669},{0,4,125},{0,3,2777},{4,3,2669},{0,3,2777},{0,0,576},{0,0,576},{0,0,576},{0,0,576},{0,1,25},{0,1,25},{0,1,25},{0,1,49},{0,0,232}, +{0,0,232},{1,7,4582},{0,7,1274},{1,5,1446},{0,4,1466},{0,7,9789},{0,5,4794},{0,4,953},{0,3,4890},{0,4,13038},{0,3,6826},{1,7,3426},{1,7,290},{1,5,290},{1,4,443},{2,4,9685},{0,5,4794},{0,4,953},{0,3,4890},{7,0,9685},{0,3,4890},{0,7,1105},{0,7,1105},{0,7,1105},{0,4,1105},{0,5,2210},{0,4,592},{0,4,592},{0,2,596},{0,2,3477},{0,2,1557},{1,6,26}, +{1,6,26},{1,6,26},{1,4,82},{1,3,2180},{0,4,592},{0,4,592},{0,2,596},{1,2,2180},{0,2,596},{6,0,2677},{0,7,185},{1,5,289},{0,4,377},{6,0,2677},{5,3,2677},{0,4,377},{0,3,3209},{5,3,2677},{0,3,3209},{0,0,1089},{0,0,1089},{0,0,1089},{0,0,1089},{0,2,4},{0,2,4},{0,2,4},{0,1,4},{0,1,365},{0,1,365},{1,7,5382},{1,7,1350},{1,5,1510}, +{1,5,1738},{0,7,10285},{0,6,4406},{0,5,971},{0,3,4954},{0,4,13534},{0,3,6890},{2,7,3454},{1,7,194},{1,5,354},{1,5,582},{3,3,9674},{0,6,4406},{0,5,971},{0,3,4954},{6,1,9674},{0,3,4954},{1,6,1214},{1,6,1214},{1,6,1214},{1,4,1206},{0,5,2210},{0,4,400},{0,4,400},{0,2,628},{0,2,4021},{0,2,1589},{1,6,58},{1,6,58},{1,6,58},{1,4,50},{2,2,2178}, +{0,4,400},{0,4,400},{0,2,628},{5,0,2178},{0,2,628},{4,4,2669},{1,7,145},{2,5,74},{0,5,130},{4,4,2669},{7,2,2669},{0,5,130},{0,4,2845},{7,2,2669},{0,4,2845},{1,0,1205},{1,0,1205},{1,0,1205},{1,0,1205},{0,3,9},{0,3,9},{0,3,9},{0,1,100},{0,1,461},{0,1,461},{1,7,6566},{1,7,1638},{1,5,1958},{1,5,1578},{1,7,10830},{0,6,4118},{0,5,443}, +{0,4,4785},{0,4,14414},{0,3,7338},{2,7,3390},{1,7,482},{2,5,371},{1,5,422},{4,2,9674},{0,6,4118},{0,5,443},{0,4,4785},{5,2,9674},{0,4,4785},{1,7,1382},{1,7,1382},{1,7,1382},{1,4,1430},{0,6,2178},{0,5,442},{0,5,442},{0,3,641},{0,3,4242},{0,2,1877},{1,7,226},{1,7,226},{1,7,226},{1,4,274},{3,1,2178},{0,5,442},{0,5,442},{0,3,641},{4,1,2178}, +{0,3,641},{5,3,2669},{1,7,257},{2,5,10},{0,5,2},{5,3,2669},{6,3,2669},{0,5,2},{0,4,2669},{6,3,2669},{0,4,2669},{1,0,1381},{1,0,1381},{1,0,1381},{1,0,1381},{0,3,25},{0,3,25},{0,3,25},{0,2,16},{0,1,685},{0,1,685},{1,7,8134},{1,7,2310},{1,6,2671},{1,5,1802},{1,7,11086},{0,7,4109},{0,5,299},{0,4,4193},{0,5,14830},{0,4,7442},{2,7,3710}, +{2,7,490},{2,5,323},{2,5,563},{5,1,9669},{0,7,4109},{0,5,299},{0,4,4193},{4,3,9669},{0,4,4193},{1,7,1734},{1,7,1734},{1,7,1734},{1,5,1721},{0,7,2228},{0,5,218},{0,5,218},{0,3,305},{0,3,4626},{0,3,2241},{2,6,125},{2,6,125},{2,6,125},{2,4,125},{4,0,2180},{0,5,218},{0,5,218},{0,3,305},{3,2,2180},{0,3,305},{6,2,2665},{2,7,369},{3,5,181}, +{1,5,117},{6,2,2665},{5,4,2665},{1,5,117},{0,4,2749},{5,4,2665},{0,4,2749},{1,0,1685},{1,0,1685},{1,0,1685},{1,0,1685},{0,4,0},{0,4,0},{0,4,0},{0,2,16},{0,2,977},{0,2,977},{2,7,9153},{1,7,3525},{1,6,3220},{1,5,2513},{1,7,11833},{0,7,3686},{0,6,548},{0,4,3986},{0,5,15577},{0,4,7235},{3,7,4141},{2,7,481},{2,6,309},{2,5,428},{6,0,9674}, +{0,7,3686},{0,6,548},{0,4,3986},{3,4,9674},{0,4,3986},{1,7,2436},{1,7,2436},{1,7,2436},{1,5,2189},{0,7,2210},{0,5,272},{0,5,272},{0,3,233},{0,3,5364},{0,3,2169},{2,7,40},{2,7,40},{2,7,40},{2,5,104},{2,4,2178},{0,5,272},{0,5,272},{0,3,233},{7,0,2178},{0,3,233},{7,1,2669},{2,7,477},{2,6,305},{0,6,292},{7,1,2669},{4,5,2669},{0,6,292}, +{0,4,3145},{4,5,2669},{0,4,3145},{1,0,2180},{1,0,2180},{1,0,2180},{1,0,2180},{0,5,16},{0,5,16},{0,5,16},{0,3,64},{0,2,1130},{0,2,1130},{2,7,10154},{1,7,4946},{1,6,4049},{1,6,2853},{1,7,12838},{0,7,3719},{0,6,133},{0,4,4211},{0,6,16286},{0,4,7346},{3,7,4061},{2,7,881},{2,6,325},{2,6,629},{4,4,9669},{0,7,3718},{0,6,132},{0,4,4210},{7,2,9669}, +{0,4,4210},{1,7,3265},{1,7,3265},{1,7,3265},{1,6,2789},{0,7,2467},{0,6,69},{0,6,69},{0,3,442},{0,4,5602},{0,3,2290},{2,7,40},{2,7,40},{2,7,40},{2,5,40},{3,3,2180},{0,6,68},{0,6,68},{0,3,441},{6,1,2180},{0,3,441},{5,5,2665},{3,7,617},{3,6,100},{0,6,68},{5,5,2665},{3,6,2665},{0,6,68},{0,5,2885},{3,6,2665},{0,5,2885},{1,0,2689}, +{1,0,2689},{1,0,2689},{1,0,2689},{0,5,17},{0,5,17},{0,5,17},{0,3,1},{0,2,1341},{0,2,1341},{2,7,10666},{2,7,5146},{2,6,4206},{1,6,2933},{2,7,13606},{0,7,4215},{0,6,181},{0,5,3914},{0,6,15454},{0,4,7122},{3,7,4365},{3,7,1097},{3,6,404},{2,6,421},{5,3,9669},{1,7,4133},{0,6,100},{0,5,3833},{6,3,9669},{0,5,3833},{2,7,3777},{2,7,3777},{2,7,3777}, +{1,6,2933},{1,7,2805},{0,6,181},{0,6,181},{0,4,275},{0,4,5282},{0,3,2130},{2,7,296},{2,7,296},{2,7,296},{2,5,232},{4,2,2180},{0,6,100},{0,6,100},{0,4,194},{5,2,2180},{0,4,194},{6,4,2665},{3,7,697},{3,6,4},{1,6,4},{6,4,2665},{7,4,2665},{1,6,4},{0,5,2677},{7,4,2665},{0,5,2677},{1,0,2929},{1,0,2929},{1,0,2929},{1,0,2929},{0,6,81}, +{0,6,81},{0,6,81},{0,3,145},{0,3,1289},{0,3,1289},{2,7,11690},{2,7,5434},{2,7,4085},{2,6,3198},{2,7,13510},{1,7,4470},{1,6,585},{0,5,3690},{0,6,15134},{0,5,6210},{3,7,5053},{3,7,1177},{3,6,308},{2,6,597},{6,2,9670},{1,7,4181},{1,6,296},{0,5,3401},{5,4,9670},{0,5,3401},{2,7,3409},{2,7,3409},{2,7,3409},{2,6,3134},{1,7,2565},{0,7,323},{0,7,323}, +{0,4,323},{0,5,5085},{0,4,1634},{3,7,153},{3,7,153},{3,7,153},{3,5,145},{5,1,2186},{0,7,34},{0,7,34},{0,4,34},{7,1,2186},{0,4,34},{7,3,2665},{4,7,937},{3,6,164},{1,6,100},{7,3,2665},{6,5,2665},{1,6,100},{0,5,2725},{6,5,2665},{0,5,2725},{2,0,3085},{2,0,3085},{2,0,3085},{2,0,3085},{1,5,290},{1,5,290},{1,5,290},{1,3,298},{0,3,985}, +{0,3,985},{3,7,12062},{2,7,6370},{2,7,3743},{2,6,3018},{2,7,14014},{1,7,4758},{1,6,603},{1,5,4049},{0,7,14638},{0,5,5310},{4,7,4958},{3,7,1726},{3,7,334},{3,6,419},{7,1,9669},{1,7,4694},{0,7,341},{0,5,3374},{4,5,9669},{0,5,3374},{2,7,3454},{2,7,3454},{2,7,3454},{2,6,2729},{1,7,2754},{1,6,314},{1,6,314},{1,4,289},{0,5,4626},{0,4,1121},{3,7,45}, +{3,7,45},{3,7,45},{3,5,109},{6,0,2180},{0,7,52},{0,7,52},{0,4,160},{3,4,2180},{0,4,160},{5,7,2665},{4,7,1009},{4,6,293},{2,6,293},{5,7,2665},{5,6,2665},{2,6,293},{0,5,3085},{5,6,2665},{0,5,3085},{2,0,2725},{2,0,2725},{2,0,2725},{2,0,2725},{1,6,89},{1,6,89},{1,6,89},{1,4,145},{0,3,949},{0,3,949},{3,7,12414},{3,7,7246},{2,7,3983}, +{2,7,2879},{2,7,15006},{1,7,5558},{1,7,163},{1,5,4161},{0,7,14190},{0,5,5054},{4,7,5246},{4,7,2186},{3,7,302},{3,6,659},{5,5,9670},{2,7,4926},{1,7,163},{0,5,3758},{3,6,9670},{0,5,3758},{2,7,3902},{2,7,3902},{2,7,3902},{2,6,2777},{1,7,3330},{1,7,82},{1,7,82},{1,4,401},{0,6,4490},{0,4,1073},{3,7,221},{3,7,221},{3,7,221},{3,6,34},{5,2,2186}, +{1,7,82},{1,7,82},{0,5,277},{7,2,2186},{0,5,277},{6,6,2665},{5,7,1313},{4,7,130},{1,7,82},{6,6,2665},{4,7,2665},{1,7,82},{0,6,2929},{4,7,2665},{0,6,2929},{2,0,2677},{2,0,2677},{2,0,2677},{2,0,2677},{1,6,9},{1,6,9},{1,6,9},{1,4,1},{0,4,673},{0,4,673},{3,7,13278},{3,7,7502},{3,7,4254},{2,7,2895},{3,7,15045},{2,7,6114},{1,7,147}, +{1,6,3978},{0,7,14254},{0,6,4818},{4,7,5918},{4,7,2378},{4,7,443},{3,7,426},{6,4,9670},{2,7,5438},{1,7,83},{0,6,3218},{7,4,9670},{0,6,3218},{3,7,4253},{3,7,4253},{3,7,4253},{2,7,2894},{2,7,3054},{1,7,146},{1,7,146},{1,5,296},{0,6,3978},{0,5,821},{4,7,442},{4,7,442},{4,7,442},{3,6,194},{6,1,2186},{1,7,82},{1,7,82},{0,5,37},{6,3,2186}, +{0,5,37},{7,5,2665},{5,7,1361},{4,7,2},{2,7,10},{7,5,2665},{6,6,2689},{2,7,10},{0,6,2689},{6,6,2689},{0,6,2689},{2,0,2885},{2,0,2885},{2,0,2885},{2,0,2885},{1,7,65},{1,7,65},{1,7,65},{1,4,113},{0,4,625},{0,4,625},{3,7,13261},{3,7,7409},{3,7,4045},{3,7,3209},{3,7,14116},{2,7,5615},{2,7,574},{1,6,3165},{0,7,13437},{0,6,3429},{5,7,5269}, +{4,7,2275},{4,7,250},{3,7,505},{5,6,8712},{3,7,4724},{2,7,250},{0,6,2405},{4,6,8712},{0,6,2405},{3,7,4045},{3,7,4045},{3,7,4045},{3,7,3209},{2,7,3150},{2,7,574},{2,7,574},{1,5,296},{0,6,3850},{0,5,453},{4,7,250},{4,7,250},{4,7,250},{4,6,169},{7,0,2180},{2,7,250},{2,7,250},{1,5,40},{3,5,2180},{1,5,40},{6,7,2180},{5,7,1168},{4,7,81}, +{2,7,25},{6,7,2180},{5,7,2180},{2,7,25},{0,6,2180},{5,7,2180},{0,6,2180},{3,0,3145},{3,0,3145},{3,0,3145},{3,0,3145},{1,7,305},{1,7,305},{1,7,305},{1,5,292},{0,5,449},{0,5,449},{4,7,11894},{3,7,7634},{3,7,4270},{3,7,2750},{3,7,13315},{2,7,5354},{2,7,313},{1,6,2634},{1,7,12414},{0,6,2250},{5,7,4369},{4,7,2365},{4,7,340},{4,7,160},{7,3,7590}, +{3,7,4094},{2,7,232},{0,6,1721},{6,5,7590},{0,6,1721},{3,7,4270},{3,7,4270},{3,7,4270},{3,7,2750},{2,7,3717},{2,7,313},{2,7,313},{2,5,302},{0,7,3546},{0,5,498},{4,7,340},{4,7,340},{4,7,340},{4,6,97},{7,1,2186},{2,7,232},{2,7,232},{1,5,130},{7,3,2186},{1,5,130},{6,7,1649},{6,7,1025},{5,7,9},{3,7,1},{6,7,1649},{7,6,1625},{3,7,1}, +{0,6,1685},{7,6,1625},{0,6,1685},{3,0,2749},{3,0,2749},{3,0,2749},{3,0,2749},{2,7,117},{2,7,117},{2,7,117},{2,5,181},{0,5,377},{0,5,377},{4,7,11078},{4,7,7478},{3,7,4878},{3,7,2750},{4,7,12662},{3,7,5031},{2,7,489},{2,6,1911},{1,7,11470},{0,6,1610},{5,7,3841},{5,7,1949},{4,7,692},{4,7,32},{5,7,6662},{4,7,3641},{3,7,442},{0,6,1385},{5,6,6662}, +{0,6,1385},{3,7,4878},{3,7,4878},{3,7,4878},{3,7,2750},{3,7,3795},{2,7,489},{2,7,489},{2,5,366},{0,7,3354},{0,6,454},{4,7,692},{4,7,692},{4,7,692},{4,7,32},{6,3,2180},{3,7,442},{3,7,442},{0,6,229},{6,4,2180},{0,6,229},{7,6,1201},{6,7,689},{5,7,25},{4,7,16},{7,6,1201},{7,6,1225},{4,7,16},{0,6,1381},{7,6,1225},{0,6,1381},{3,0,2669}, +{3,0,2669},{3,0,2669},{3,0,2669},{2,7,5},{2,7,5},{2,7,5},{2,5,5},{0,6,229},{0,6,229},{4,7,10646},{4,7,7046},{4,7,5021},{3,7,3134},{4,7,11526},{3,7,4503},{2,7,1049},{2,6,1479},{1,7,10910},{0,6,1354},{5,7,3569},{5,7,1677},{5,7,653},{4,7,160},{7,4,5829},{4,7,3065},{3,7,410},{1,6,1209},{7,5,5829},{1,6,1209},{4,7,5021},{4,7,5021},{4,7,5021}, +{3,7,3134},{3,7,3875},{2,7,1049},{2,7,1049},{2,6,323},{0,7,3546},{0,6,198},{5,7,653},{5,7,653},{5,7,653},{4,7,160},{7,2,2180},{3,7,410},{3,7,410},{1,6,53},{5,5,2180},{1,6,53},{7,6,865},{6,7,481},{6,7,81},{4,7,16},{7,6,865},{6,7,841},{4,7,16},{0,6,1205},{6,7,841},{0,6,1205},{3,0,2845},{3,0,2845},{3,0,2845},{3,0,2845},{2,7,149}, +{2,7,149},{2,7,149},{2,5,85},{0,6,149},{0,6,149},{4,7,10598},{4,7,6998},{4,7,4973},{4,7,3353},{4,7,10774},{3,7,4359},{3,7,995},{2,6,1431},{2,7,10294},{0,7,1242},{6,7,3329},{5,7,1661},{5,7,637},{5,7,197},{6,6,5085},{4,7,2745},{3,7,634},{0,7,1098},{4,7,5085},{0,7,1098},{4,7,4973},{4,7,4973},{4,7,4973},{4,7,3353},{3,7,4339},{3,7,995},{3,7,995}, +{2,6,275},{1,7,3845},{0,6,326},{5,7,637},{5,7,637},{5,7,637},{5,7,197},{5,6,2178},{3,7,634},{3,7,634},{1,6,37},{4,6,2178},{1,6,37},{7,7,605},{6,7,401},{6,7,1},{5,7,1},{7,7,605},{6,7,569},{5,7,1},{0,7,1089},{6,7,569},{0,7,1089},{4,0,3209},{4,0,3209},{4,0,3209},{4,0,3209},{3,7,370},{3,7,370},{3,7,370},{2,6,274},{0,7,153}, +{0,7,153},{5,7,9925},{4,7,7403},{4,7,5378},{4,7,3218},{4,7,10387},{4,7,4627},{3,7,1292},{3,6,1477},{2,7,9727},{0,7,621},{6,7,2609},{5,7,1949},{5,7,925},{5,7,89},{7,5,4347},{5,7,2384},{4,7,666},{0,7,612},{6,6,4371},{0,7,612},{4,7,5378},{4,7,5378},{4,7,5378},{4,7,3218},{4,7,4762},{3,7,1292},{3,7,1292},{3,6,321},{1,7,4106},{1,6,469},{5,7,925}, +{5,7,925},{5,7,925},{5,7,89},{6,5,2180},{4,7,666},{4,7,666},{2,6,104},{3,7,2180},{2,6,104},{7,7,290},{7,7,218},{6,7,64},{6,7,16},{7,7,290},{7,7,338},{6,7,16},{0,7,576},{7,7,338},{0,7,576},{4,0,2777},{4,0,2777},{4,0,2777},{4,0,2777},{3,7,136},{3,7,136},{3,7,136},{3,5,200},{0,7,45},{0,7,45},{5,7,9269},{5,7,7377},{4,7,6146}, +{4,7,3506},{5,7,10044},{4,7,4211},{3,7,1964},{3,7,836},{3,7,9185},{0,7,477},{6,7,2241},{6,7,1617},{6,7,1217},{5,7,265},{6,7,3780},{5,7,2064},{4,7,890},{1,7,257},{5,7,3780},{1,7,257},{4,7,6146},{4,7,6146},{4,7,6146},{4,7,3506},{4,7,4826},{3,7,1964},{3,7,1964},{3,6,337},{2,7,4590},{0,7,477},{6,7,1217},{6,7,1217},{6,7,1217},{5,7,265},{7,4,2178}, +{4,7,890},{4,7,890},{1,7,257},{7,5,2178},{1,7,257},{7,7,146},{7,7,74},{7,7,25},{6,7,16},{7,7,146},{7,7,130},{6,7,16},{0,7,256},{7,7,130},{0,7,256},{4,0,2665},{4,0,2665},{4,0,2665},{4,0,2665},{3,7,200},{3,7,200},{3,7,200},{3,6,13},{0,7,221},{0,7,221},{5,7,8997},{5,7,7105},{5,7,6081},{4,7,4178},{5,7,9276},{4,7,4179},{4,7,2154}, +{3,7,356},{3,7,8721},{1,7,209},{6,7,2129},{6,7,1505},{6,7,1105},{6,7,673},{7,6,3332},{5,7,2000},{5,7,976},{2,7,73},{7,6,3300},{2,7,73},{5,7,6081},{5,7,6081},{5,7,6081},{4,7,4178},{4,7,5274},{4,7,2154},{4,7,2154},{3,7,356},{2,7,4878},{1,7,209},{6,7,1105},{6,7,1105},{6,7,1105},{6,7,673},{7,5,2210},{5,7,976},{5,7,976},{2,7,73},{6,6,2178}, +{2,7,73},{7,7,130},{7,7,58},{7,7,9},{7,7,1},{7,7,130},{7,7,50},{7,7,1},{0,7,64},{7,7,50},{0,7,64},{4,0,2809},{4,0,2809},{4,0,2809},{4,0,2809},{3,7,520},{3,7,520},{3,7,520},{3,6,61},{1,7,145},{1,7,145},{5,7,9109},{5,7,7217},{5,7,6193},{5,7,4301},{5,7,8892},{4,7,4531},{4,7,2506},{3,7,260},{4,7,8587},{1,7,289},{6,7,2273}, +{6,7,1649},{6,7,1249},{6,7,625},{7,6,2916},{6,7,1956},{5,7,1168},{2,7,25},{6,7,2916},{2,7,25},{5,7,6193},{5,7,6193},{5,7,6193},{5,7,4301},{5,7,5976},{4,7,2506},{4,7,2506},{3,7,260},{3,7,5277},{1,7,289},{6,7,1249},{6,7,1249},{6,7,1249},{6,7,625},{6,7,2180},{5,7,1168},{5,7,1168},{2,7,25},{5,7,2180},{2,7,25},{7,7,242},{7,7,170},{7,7,121}, +{7,7,49},{7,7,242},{7,7,98},{7,7,49},{0,7,0},{7,7,98},{0,7,0},{4,0,3209},{4,0,3209},{4,0,3209},{4,0,3209},{4,7,481},{4,7,481},{4,7,481},{3,7,260},{1,7,289},{1,7,289},{6,7,8325},{5,7,6749},{5,7,5725},{5,7,3833},{5,7,7866},{5,7,4082},{4,7,2470},{4,7,265},{4,7,7219},{2,7,365},{7,7,1842},{6,7,1460},{6,7,1060},{6,7,436},{7,6,2241}, +{6,7,1425},{6,7,1025},{3,7,1},{6,7,2169},{3,7,1},{5,7,5725},{5,7,5725},{5,7,5725},{5,7,3833},{5,7,4950},{4,7,2470},{4,7,2470},{4,7,265},{3,7,4521},{2,7,365},{6,7,1060},{6,7,1060},{6,7,1060},{6,7,436},{6,7,1649},{6,7,1025},{6,7,1025},{3,7,1},{7,6,1625},{3,7,1},{7,7,242},{7,7,170},{7,7,121},{7,7,49},{7,7,242},{7,7,98},{7,7,49}, +{0,7,0},{7,7,98},{0,7,0},{5,0,2809},{5,0,2809},{5,0,2809},{5,0,2809},{4,7,445},{4,7,445},{4,7,445},{4,6,202},{2,7,365},{2,7,365},{6,7,7093},{6,7,6469},{5,7,5581},{5,7,3689},{5,7,7226},{5,7,3442},{5,7,2418},{4,7,25},{4,7,6275},{2,7,509},{7,7,1266},{7,7,1194},{6,7,1028},{6,7,404},{7,7,1686},{6,7,1089},{6,7,689},{4,7,16},{6,7,1641}, +{4,7,16},{5,7,5581},{5,7,5581},{5,7,5581},{5,7,3689},{5,7,4310},{5,7,2418},{5,7,2418},{4,7,25},{3,7,4121},{2,7,509},{6,7,1028},{6,7,1028},{6,7,1028},{6,7,404},{7,6,1201},{6,7,689},{6,7,689},{4,7,16},{7,6,1225},{4,7,16},{7,7,242},{7,7,170},{7,7,121},{7,7,49},{7,7,242},{7,7,98},{7,7,49},{0,7,0},{7,7,98},{0,7,0},{5,0,2665}, +{5,0,2665},{5,0,2665},{5,0,2665},{4,7,685},{4,7,685},{4,7,685},{4,7,25},{2,7,509},{2,7,509},{6,7,6117},{6,7,5493},{6,7,5093},{5,7,3801},{6,7,6098},{5,7,3058},{5,7,2034},{4,7,41},{4,7,5587},{3,7,613},{7,7,818},{7,7,746},{7,7,697},{6,7,500},{7,7,1142},{6,7,881},{6,7,481},{4,7,16},{6,7,1241},{4,7,16},{6,7,5093},{6,7,5093},{6,7,5093}, +{5,7,3801},{5,7,3926},{5,7,2034},{5,7,2034},{4,7,41},{4,7,3562},{3,7,613},{7,7,697},{7,7,697},{7,7,697},{6,7,500},{7,6,865},{6,7,481},{6,7,481},{4,7,16},{6,7,841},{4,7,16},{7,7,242},{7,7,170},{7,7,121},{7,7,49},{7,7,242},{7,7,98},{7,7,49},{0,7,0},{7,7,98},{0,7,0},{5,0,2777},{5,0,2777},{5,0,2777},{5,0,2777},{5,7,1010}, +{5,7,1010},{5,7,1010},{4,7,41},{3,7,613},{3,7,613},{6,7,5397},{6,7,4773},{6,7,4373},{6,7,3749},{6,7,5074},{5,7,2930},{5,7,1906},{4,7,313},{5,7,4753},{3,7,725},{7,7,498},{7,7,426},{7,7,377},{7,7,305},{7,7,726},{7,7,582},{6,7,401},{5,7,1},{7,7,774},{5,7,1},{6,7,4373},{6,7,4373},{6,7,4373},{6,7,3749},{5,7,3798},{5,7,1906},{5,7,1906}, +{4,7,313},{4,7,3130},{3,7,725},{7,7,377},{7,7,377},{7,7,377},{7,7,305},{7,7,605},{6,7,401},{6,7,401},{5,7,1},{6,7,569},{5,7,1},{7,7,242},{7,7,170},{7,7,121},{7,7,49},{7,7,242},{7,7,98},{7,7,49},{0,7,0},{7,7,98},{0,7,0},{5,0,3145},{5,0,3145},{5,0,3145},{5,0,3145},{5,7,882},{5,7,882},{5,7,882},{4,7,313},{3,7,725}, +{3,7,725},{1,7,34142},{0,7,5184},{0,5,609},{0,5,4841},{1,7,46442},{0,7,24449},{0,5,9741},{0,4,24761},{0,5,65162},{0,3,40820},{0,7,10048},{0,7,2880},{0,5,545},{0,4,3204},{1,4,18070},{0,4,13297},{0,4,6453},{0,2,13857},{2,2,18070},{0,2,13857},{0,3,9},{0,3,9},{0,3,9},{0,2,36},{0,1,1145},{0,1,617},{0,1,617},{0,1,977},{0,0,1505},{0,0,1036},{0,3,9}, +{0,3,9},{0,3,9},{0,2,36},{1,0,1129},{0,1,617},{0,1,617},{0,1,977},{1,0,1105},{0,1,977},{4,2,9250},{0,7,2880},{0,5,545},{0,4,3204},{4,2,9250},{5,2,9250},{0,4,3204},{0,3,9280},{5,2,9250},{0,3,9280},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,36},{0,0,36},{0,0,36},{0,0,100},{0,0,136},{0,0,136},{1,7,38782},{0,7,6720},{0,5,305}, +{0,5,3801},{1,7,51082},{0,7,24961},{0,5,8701},{0,4,25849},{0,5,65535},{0,4,42094},{1,7,10502},{0,7,2624},{0,5,241},{0,4,3044},{3,1,19334},{0,4,14065},{0,4,6293},{0,3,14756},{4,1,19334},{0,3,14756},{0,4,4},{0,4,4},{0,4,4},{0,2,4},{0,2,1537},{0,1,937},{0,1,937},{0,1,977},{0,1,1898},{0,1,1338},{0,4,4},{0,4,4},{0,4,4},{0,2,4},{1,0,1513}, +{0,1,937},{0,1,937},{0,1,977},{0,1,1537},{0,1,977},{5,1,9256},{0,7,2624},{0,5,241},{0,4,3044},{5,1,9256},{7,1,9256},{0,4,3044},{0,3,9280},{7,1,9256},{0,3,9280},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,36},{0,0,36},{0,0,36},{0,0,100},{0,0,136},{0,0,136},{1,7,44190},{0,7,9024},{0,5,769},{0,5,3529},{1,7,56490},{0,7,26241},{0,5,8429}, +{0,4,27705},{0,5,65535},{0,4,43950},{1,7,10854},{0,7,2624},{0,5,193},{0,5,2953},{2,3,20689},{0,5,14598},{0,4,6389},{0,3,15012},{6,0,20689},{0,3,15012},{0,4,36},{0,4,36},{0,4,36},{0,2,100},{0,2,1985},{0,2,1061},{0,2,1061},{0,1,1105},{0,1,2346},{0,1,1466},{0,4,36},{0,4,36},{0,4,36},{0,2,100},{0,2,1985},{0,2,1061},{0,2,1061},{0,1,1105},{0,1,1985}, +{0,1,1105},{6,0,9256},{0,7,2624},{0,5,193},{0,5,2953},{6,0,9256},{6,2,9256},{0,5,2953},{0,3,9536},{6,2,9256},{0,3,9536},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,36},{0,0,36},{0,0,36},{0,0,100},{0,0,136},{0,0,136},{1,7,50366},{0,7,12096},{0,6,1101},{0,5,4025},{1,7,62666},{0,7,28289},{0,5,8925},{0,5,28912},{0,6,65535},{0,4,46574},{1,7,11462}, +{0,7,2880},{0,6,317},{0,5,2425},{4,0,22137},{0,5,15206},{0,4,6741},{0,3,15524},{3,2,22137},{0,3,15524},{0,5,1},{0,5,1},{0,5,1},{0,3,9},{0,2,2561},{0,2,1285},{0,2,1285},{0,1,1361},{0,1,2922},{0,1,1722},{0,5,1},{0,5,1},{0,5,1},{0,3,9},{1,1,2561},{0,2,1285},{0,2,1285},{0,1,1361},{2,0,2521},{0,1,1361},{5,2,9250},{0,7,2880},{0,6,317}, +{0,5,2425},{5,2,9250},{5,3,9250},{0,5,2425},{0,4,9640},{5,3,9250},{0,4,9640},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,36},{0,0,36},{0,0,36},{0,0,100},{0,0,136},{0,0,136},{1,7,58232},{0,7,16470},{0,6,129},{0,6,3489},{1,7,65535},{0,7,31511},{0,6,10213},{0,5,29110},{0,6,65535},{0,4,50444},{1,7,12452},{0,7,3474},{0,6,29},{0,5,2137},{2,4,23851}, +{0,6,16172},{0,5,7037},{0,3,16406},{7,0,23851},{0,3,16406},{0,6,4},{0,6,4},{0,6,4},{0,3,36},{0,3,3232},{0,2,1690},{0,2,1690},{0,1,1802},{0,1,3723},{0,1,2163},{0,6,4},{0,6,4},{0,6,4},{0,3,36},{1,1,3200},{0,2,1690},{0,2,1690},{0,1,1802},{2,0,3232},{0,1,1802},{6,1,9256},{1,7,3232},{0,6,29},{0,5,2137},{6,1,9256},{6,3,9256},{0,5,2137}, +{0,4,9298},{6,3,9256},{0,4,9298},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,36},{0,0,36},{0,0,36},{0,0,100},{0,0,136},{0,0,136},{1,7,65535},{0,7,21174},{0,6,81},{0,6,2545},{1,7,65535},{0,7,35191},{0,6,9269},{0,5,30102},{0,6,65535},{0,5,54602},{1,7,13604},{0,7,4274},{0,6,45},{0,5,2153},{4,1,25472},{0,6,16620},{0,5,7053},{0,3,17462},{4,2,25472}, +{0,3,17462},{0,6,36},{0,6,36},{0,6,36},{0,4,49},{0,3,3872},{0,3,2132},{0,3,2132},{0,1,2330},{0,1,4571},{0,1,2691},{0,6,36},{0,6,36},{0,6,36},{0,4,49},{0,3,3872},{0,3,2132},{0,3,2132},{0,1,2330},{1,1,3872},{0,1,2330},{7,0,9250},{1,7,3488},{0,6,45},{0,5,2153},{7,0,9250},{3,5,9250},{0,5,2153},{0,4,9266},{3,5,9250},{0,4,9266},{0,0,0}, +{0,0,0},{0,0,0},{0,0,0},{0,0,36},{0,0,36},{0,0,36},{0,0,100},{0,0,136},{0,0,136},{2,7,65535},{1,7,25204},{0,6,805},{0,6,2373},{1,7,65535},{0,7,39263},{0,6,8769},{0,5,31402},{0,6,65535},{0,5,55902},{1,7,14880},{1,7,5024},{0,6,321},{0,6,1889},{5,0,26756},{0,6,17000},{0,5,7049},{0,4,18139},{6,1,26756},{0,4,18139},{0,7,5},{0,7,5},{0,7,5}, +{0,4,5},{0,3,4468},{0,3,2248},{0,3,2248},{0,2,2722},{0,2,5411},{0,1,3227},{0,7,5},{0,7,5},{0,7,5},{0,4,5},{2,0,4420},{0,3,2248},{0,3,2248},{0,2,2722},{3,0,4420},{0,2,2722},{5,4,9250},{1,7,4000},{1,6,185},{0,6,1885},{5,4,9250},{7,3,9250},{0,6,1885},{0,4,9490},{7,3,9250},{0,4,9490},{0,0,4},{0,0,4},{0,0,4},{0,0,4},{0,0,16}, +{0,0,16},{0,0,16},{0,0,64},{0,0,100},{0,0,100},{2,7,65535},{1,7,29620},{0,7,1306},{0,6,3061},{2,7,65535},{0,7,43055},{0,6,8145},{0,6,31878},{0,7,65535},{0,5,56670},{2,7,14924},{1,7,5344},{0,7,406},{0,6,1617},{4,2,26756},{0,6,16744},{0,5,6553},{0,4,17195},{5,2,26756},{0,4,17195},{0,7,181},{0,7,181},{0,7,181},{0,4,181},{0,4,4418},{0,3,2056},{0,3,2056}, +{0,2,2210},{0,2,5411},{0,2,3171},{0,7,181},{0,7,181},{0,7,181},{0,4,181},{0,4,4418},{0,3,2056},{0,3,2056},{0,2,2210},{2,1,4418},{0,2,2210},{6,3,9248},{2,7,4292},{0,7,306},{0,6,1517},{6,3,9248},{6,4,9248},{0,6,1517},{0,5,9698},{6,4,9248},{0,5,9698},{0,0,100},{0,0,100},{0,0,100},{0,0,100},{0,0,16},{0,0,16},{0,0,16},{0,0,0},{0,0,36}, +{0,0,36},{2,7,65535},{1,7,35659},{0,7,865},{0,7,2657},{2,7,65535},{1,7,48315},{0,7,8072},{0,6,29745},{0,7,65535},{0,5,58605},{2,7,15347},{1,7,6163},{1,7,270},{0,6,1770},{5,1,26756},{0,7,15992},{0,6,5378},{0,4,16592},{6,2,26756},{0,4,16592},{0,7,685},{0,7,685},{0,7,685},{0,5,370},{0,5,4450},{0,4,1768},{0,4,1768},{0,2,1940},{0,2,5717},{0,2,2901},{1,7,234}, +{1,7,234},{1,7,234},{1,4,250},{1,3,4420},{0,4,1768},{0,4,1768},{0,2,1940},{1,2,4420},{0,2,1940},{7,2,9250},{3,7,4820},{1,7,45},{0,6,1409},{7,2,9250},{5,5,9250},{0,6,1409},{0,5,9320},{5,5,9250},{0,5,9320},{0,0,361},{0,0,361},{0,0,361},{0,0,361},{0,1,0},{0,1,0},{0,1,0},{0,0,81},{0,0,117},{0,0,117},{2,7,65535},{1,7,40299},{0,7,1405}, +{0,7,2173},{2,7,65535},{1,7,50747},{0,7,6068},{0,6,28101},{0,7,65535},{0,5,59897},{2,7,15659},{1,7,6963},{1,7,74},{1,6,2046},{6,0,26264},{0,7,15284},{0,6,4470},{0,4,16052},{3,4,26264},{0,4,16052},{1,7,1230},{1,7,1230},{1,7,1230},{0,5,754},{0,5,4450},{0,4,1576},{0,4,1576},{0,2,1972},{0,2,6261},{0,2,2933},{1,7,74},{1,7,74},{1,7,74},{1,5,113},{2,2,4418}, +{0,4,1576},{0,4,1576},{0,2,1972},{5,0,4418},{0,2,1972},{5,6,8980},{3,7,4808},{1,7,25},{0,7,1444},{5,6,8980},{4,6,8980},{0,7,1444},{0,5,8980},{4,6,8980},{0,5,8980},{0,0,729},{0,0,729},{0,0,729},{0,0,729},{0,2,16},{0,2,16},{0,2,16},{0,1,16},{0,0,325},{0,0,325},{2,7,65535},{1,7,40395},{0,7,2381},{0,7,2125},{2,7,65535},{1,7,48635},{0,7,4500}, +{0,6,24853},{0,7,65535},{0,5,57545},{3,7,14605},{2,7,6211},{1,7,170},{1,6,1598},{5,2,24379},{0,7,13716},{0,6,3446},{0,5,14549},{5,3,24379},{0,5,14549},{1,7,1326},{1,7,1326},{1,7,1326},{1,5,1157},{0,6,4418},{0,5,1394},{0,5,1394},{0,3,1621},{0,3,6482},{0,2,3221},{1,7,170},{1,7,170},{1,7,170},{1,5,1},{3,1,4418},{0,5,1394},{0,5,1394},{0,3,1621},{4,1,4418}, +{0,3,1621},{7,3,7940},{3,7,4264},{2,7,81},{0,7,900},{7,3,7940},{6,5,7940},{0,7,900},{0,5,7988},{6,5,7940},{0,5,7988},{1,0,1157},{1,0,1157},{1,0,1157},{1,0,1157},{0,2,16},{0,2,16},{0,2,16},{0,1,16},{0,1,377},{0,1,377},{2,7,65535},{1,7,40747},{0,7,3613},{0,7,2333},{2,7,65535},{1,7,46779},{0,7,3188},{0,6,21861},{0,7,65535},{0,5,55449},{3,7,13181}, +{2,7,5667},{1,7,522},{1,7,1306},{6,1,22571},{0,7,12404},{0,6,2678},{0,5,12453},{4,4,22571},{0,5,12453},{1,7,1678},{1,7,1678},{1,7,1678},{1,5,1301},{0,7,4468},{0,5,1170},{0,5,1170},{0,3,1285},{0,3,6866},{0,3,3221},{1,7,522},{1,7,522},{1,7,522},{1,5,145},{4,0,4420},{0,5,1170},{0,5,1170},{0,3,1285},{3,2,4420},{0,3,1285},{6,5,6964},{3,7,3848},{2,7,1}, +{0,7,484},{6,5,6964},{3,7,6964},{0,7,484},{0,5,7124},{3,7,6964},{0,5,7124},{1,0,1237},{1,0,1237},{1,0,1237},{1,0,1237},{0,3,1},{0,3,1},{0,3,1},{0,2,100},{0,1,505},{0,1,505},{2,7,65535},{1,7,41449},{0,7,5305},{0,7,2873},{2,7,65535},{1,7,44997},{0,7,2018},{0,6,18801},{0,7,65535},{0,6,52421},{3,7,11885},{2,7,5361},{2,7,320},{1,7,1000},{5,3,20645}, +{0,7,11234},{0,7,2018},{0,5,10401},{6,3,20645},{0,5,10401},{1,7,2380},{1,7,2380},{1,7,2380},{1,6,1496},{0,7,4450},{0,6,964},{0,6,964},{0,3,1213},{0,3,7604},{0,3,3149},{2,7,320},{2,7,320},{2,7,320},{2,5,272},{2,4,4418},{0,6,964},{0,6,964},{0,3,1213},{7,0,4418},{0,3,1213},{5,7,5941},{4,7,3181},{2,7,64},{0,7,169},{5,7,5941},{5,6,5941},{0,7,169}, +{0,5,6305},{5,6,5941},{0,5,6305},{1,0,1480},{1,0,1480},{1,0,1480},{1,0,1480},{0,4,25},{0,4,25},{0,4,25},{0,2,1},{0,1,802},{0,1,802},{2,7,65535},{1,7,42345},{0,7,7081},{0,7,3625},{2,7,65535},{1,7,43685},{0,7,1250},{0,6,16353},{0,7,65535},{0,6,49973},{3,7,11005},{3,7,5153},{2,7,320},{2,7,964},{7,0,19026},{1,7,10349},{0,7,1250},{0,5,8849},{3,5,19026}, +{0,5,8849},{1,7,3276},{1,7,3276},{1,7,3276},{1,6,1848},{0,7,4706},{0,6,740},{0,6,740},{0,4,1226},{0,4,7955},{0,3,3357},{2,7,320},{2,7,320},{2,7,320},{2,6,145},{3,3,4420},{0,6,740},{0,6,740},{0,4,1226},{6,1,4420},{0,4,1226},{7,4,5105},{4,7,2701},{3,7,25},{0,7,25},{7,4,5105},{7,5,5105},{0,7,25},{0,6,5645},{7,5,5105},{0,6,5645},{1,0,1832}, +{1,0,1832},{1,0,1832},{1,0,1832},{0,4,9},{0,4,9},{0,4,9},{0,2,49},{0,2,1010},{0,2,1010},{2,7,65535},{1,7,43497},{1,7,9052},{0,7,4633},{2,7,65535},{1,7,42629},{0,7,738},{0,6,14161},{0,7,65535},{0,6,47781},{3,7,10381},{3,7,4529},{2,7,576},{2,7,484},{5,4,17490},{1,7,9293},{0,7,738},{0,5,7553},{7,3,17490},{0,5,7553},{1,7,4428},{1,7,4428},{1,7,4428}, +{1,7,2412},{0,7,5218},{0,7,738},{0,7,738},{0,4,810},{0,4,8467},{0,3,3821},{2,7,576},{2,7,576},{2,7,576},{2,6,1},{4,2,4420},{0,7,738},{0,7,738},{0,4,810},{5,2,4420},{0,4,810},{6,6,4329},{4,7,2349},{3,7,9},{0,7,9},{6,6,4329},{4,7,4329},{0,7,9},{0,6,4637},{4,7,4329},{0,6,4637},{1,0,2312},{1,0,2312},{1,0,2312},{1,0,2312},{0,5,4}, +{0,5,4},{0,5,4},{0,3,36},{0,2,1186},{0,2,1186},{2,7,65535},{1,7,44905},{1,7,10460},{0,7,5897},{2,7,65535},{1,7,41829},{0,7,482},{0,6,12225},{0,7,65535},{0,6,45845},{4,7,9325},{3,7,4161},{3,7,797},{2,7,260},{7,1,16034},{1,7,8493},{0,7,482},{0,5,6513},{4,5,16034},{0,5,6513},{2,7,5712},{2,7,5712},{2,7,5712},{1,7,2924},{1,7,5672},{0,7,482},{0,7,482}, +{0,4,650},{0,4,9235},{0,4,3899},{3,7,797},{3,7,797},{3,7,797},{2,6,113},{5,1,4426},{0,7,482},{0,7,482},{0,4,650},{7,1,4426},{0,4,650},{6,6,3625},{5,7,1985},{4,7,100},{1,7,4},{6,6,3625},{6,6,3617},{1,7,4},{0,6,3757},{6,6,3617},{0,6,3757},{1,0,2920},{1,0,2920},{1,0,2920},{1,0,2920},{0,5,36},{0,5,36},{0,5,36},{0,3,4},{0,2,1490}, +{0,2,1490},{2,7,65535},{1,7,46795},{1,7,12350},{0,7,7625},{2,7,65535},{1,7,41235},{0,7,500},{0,6,10353},{0,7,65535},{0,6,43973},{4,7,8227},{3,7,4053},{3,7,689},{2,7,314},{6,3,14507},{2,7,7875},{0,7,500},{0,5,5649},{6,4,14507},{0,5,5649},{2,7,6594},{2,7,6594},{2,7,6594},{1,7,3806},{1,7,6086},{0,7,500},{0,7,500},{0,4,776},{0,5,9830},{0,4,4025},{3,7,689}, +{3,7,689},{3,7,689},{3,6,298},{6,0,4420},{0,7,500},{0,7,500},{0,4,776},{3,4,4420},{0,4,776},{7,5,2890},{5,7,1508},{4,7,1},{2,7,25},{7,5,2890},{6,6,2906},{2,7,25},{0,6,2920},{6,6,2906},{0,6,2920},{1,0,3757},{1,0,3757},{1,0,3757},{1,0,3757},{0,6,9},{0,6,9},{0,6,9},{0,4,100},{0,2,1985},{0,2,1985},{2,7,65535},{1,7,48747},{1,7,14302}, +{0,7,9433},{2,7,65535},{1,7,40979},{0,7,788},{0,6,8961},{0,7,65535},{0,6,42581},{4,7,7523},{4,7,3923},{3,7,865},{3,7,181},{7,2,13243},{2,7,7075},{1,7,754},{0,6,4337},{5,5,13243},{0,6,4337},{2,7,7650},{2,7,7650},{2,7,7650},{1,7,4862},{1,7,6726},{0,7,788},{0,7,788},{0,5,529},{0,5,10470},{0,4,4409},{3,7,865},{3,7,865},{3,7,865},{3,7,181},{5,2,4426}, +{1,7,754},{1,7,754},{0,5,529},{7,2,4426},{0,5,529},{6,7,2320},{5,7,1220},{4,7,49},{2,7,9},{6,7,2320},{5,7,2320},{2,7,9},{0,6,2312},{5,7,2320},{0,6,2312},{1,0,4637},{1,0,4637},{1,0,4637},{1,0,4637},{0,7,4},{0,7,4},{0,7,4},{0,4,4},{0,3,2297},{0,3,2297},{2,7,65535},{1,7,50955},{1,7,16510},{1,7,10798},{2,7,65535},{1,7,40979},{0,7,1332}, +{0,7,6964},{0,7,65535},{0,6,41445},{4,7,7075},{4,7,3475},{3,7,1297},{3,7,5},{6,4,12051},{2,7,6531},{1,7,754},{0,6,3201},{7,4,12051},{0,6,3201},{2,7,8962},{2,7,8962},{2,7,8962},{2,7,5834},{1,7,7622},{0,7,1332},{0,7,1332},{0,5,289},{0,6,11342},{0,4,5049},{3,7,1297},{3,7,1297},{3,7,1297},{3,7,5},{6,1,4426},{1,7,754},{1,7,754},{0,5,289},{6,3,4426}, +{0,5,289},{6,7,1808},{5,7,1060},{5,7,36},{3,7,4},{6,7,1808},{7,6,1808},{3,7,4},{0,6,1832},{7,6,1808},{0,6,1832},{1,0,5645},{1,0,5645},{1,0,5645},{1,0,5645},{0,7,36},{0,7,36},{0,7,36},{0,4,36},{0,3,2665},{0,3,2665},{2,7,65535},{1,7,53419},{1,7,18974},{1,7,12366},{2,7,65535},{1,7,41235},{0,7,2132},{0,7,5204},{0,7,65535},{0,6,40565},{5,7,6641}, +{4,7,3283},{4,7,1258},{3,7,85},{5,6,10952},{3,7,5900},{1,7,1010},{0,6,2321},{4,6,10952},{0,6,2321},{2,7,10530},{2,7,10530},{2,7,10530},{2,7,6666},{1,7,8774},{0,7,2132},{0,7,2132},{0,5,305},{0,6,11790},{0,5,5205},{4,7,1258},{4,7,1258},{4,7,1258},{3,7,85},{7,0,4420},{1,7,1010},{1,7,1010},{0,5,305},{3,5,4420},{0,5,305},{7,6,1360},{6,7,800},{5,7,4}, +{3,7,36},{7,6,1360},{7,6,1360},{3,7,36},{0,6,1480},{7,6,1360},{0,6,1480},{2,0,6305},{2,0,6305},{2,0,6305},{2,0,6305},{0,7,196},{0,7,196},{0,7,196},{0,5,49},{0,3,3161},{0,3,3161},{2,7,65535},{2,7,56301},{1,7,22052},{1,7,14436},{2,7,65535},{1,7,41829},{0,7,3338},{0,7,3530},{0,7,65535},{0,6,39881},{5,7,5741},{4,7,3373},{4,7,1348},{4,7,328},{7,3,9830}, +{3,7,5270},{2,7,1184},{0,6,1637},{6,5,9830},{0,6,1637},{2,7,12600},{2,7,12600},{2,7,12600},{2,7,7908},{1,7,10376},{1,7,2760},{1,7,2760},{0,6,481},{0,6,12600},{0,5,5529},{4,7,1348},{4,7,1348},{4,7,1348},{4,7,328},{7,1,4426},{2,7,1184},{2,7,1184},{0,6,481},{7,3,4426},{0,6,481},{7,6,937},{6,7,521},{5,7,121},{4,7,4},{7,6,937},{6,7,929},{4,7,4}, +{0,6,1237},{6,7,929},{0,6,1237},{2,0,7124},{2,0,7124},{2,0,7124},{2,0,7124},{0,7,529},{0,7,529},{0,7,529},{0,5,4},{0,4,3778},{0,4,3778},{2,7,65535},{2,7,58413},{1,7,25060},{1,7,16548},{2,7,65535},{1,7,42629},{0,7,4682},{0,7,2314},{0,7,65535},{0,6,39545},{5,7,5213},{5,7,3321},{4,7,1700},{4,7,200},{5,7,8902},{3,7,4982},{2,7,1440},{0,6,1301},{5,6,8902}, +{0,6,1301},{3,7,14701},{3,7,14701},{3,7,14701},{2,7,9284},{2,7,11492},{1,7,3560},{1,7,3560},{0,6,145},{0,6,13592},{0,5,6089},{4,7,1700},{4,7,1700},{4,7,1700},{4,7,200},{6,3,4420},{2,7,1440},{2,7,1440},{0,6,145},{6,4,4420},{0,6,145},{7,6,697},{6,7,409},{6,7,9},{5,7,9},{7,6,697},{6,7,625},{5,7,9},{0,6,1157},{6,7,625},{0,6,1157},{2,0,7988}, +{2,0,7988},{2,0,7988},{2,0,7988},{0,7,961},{0,7,961},{0,7,961},{0,5,100},{0,4,4210},{0,4,4210},{3,7,65535},{2,7,60781},{1,7,28324},{1,7,18916},{2,7,65535},{1,7,43685},{0,7,6282},{0,7,1354},{0,7,65535},{0,6,39465},{5,7,4941},{5,7,3049},{5,7,2025},{4,7,328},{7,4,8069},{4,7,4465},{3,7,1586},{0,6,1221},{7,5,8069},{0,6,1221},{3,7,16189},{3,7,16189},{3,7,16189}, +{2,7,10916},{2,7,12740},{1,7,4616},{1,7,4616},{0,6,65},{0,7,14411},{0,6,6789},{5,7,2025},{5,7,2025},{5,7,2025},{4,7,328},{7,2,4420},{3,7,1586},{3,7,1586},{0,6,65},{5,5,4420},{0,6,65},{7,7,377},{7,7,305},{6,7,25},{5,7,25},{7,7,377},{6,7,449},{5,7,25},{0,7,729},{6,7,449},{0,7,729},{2,0,8980},{2,0,8980},{2,0,8980},{2,0,8980},{1,7,1480}, +{1,7,1480},{1,7,1480},{0,6,16},{0,4,4770},{0,4,4770},{3,7,65535},{2,7,59505},{1,7,29984},{1,7,19680},{2,7,65535},{1,7,43137},{0,7,8318},{0,7,830},{0,7,65535},{0,6,34901},{5,7,4925},{5,7,3033},{5,7,2009},{4,7,712},{6,6,7325},{4,7,4145},{3,7,1810},{0,7,650},{4,7,7325},{0,7,650},{3,7,16745},{3,7,16745},{3,7,16745},{2,7,12024},{2,7,13464},{1,7,5556},{1,7,5556}, +{0,6,277},{0,7,14139},{0,6,6017},{5,7,2009},{5,7,2009},{5,7,2009},{4,7,712},{5,6,4418},{3,7,1810},{3,7,1810},{0,6,241},{4,6,4418},{0,6,241},{7,7,185},{7,7,113},{7,7,64},{6,7,1},{7,7,185},{7,7,193},{6,7,1},{0,7,361},{7,7,193},{0,7,361},{2,0,9320},{2,0,9320},{2,0,9320},{2,0,9320},{1,7,1460},{1,7,1460},{1,7,1460},{0,6,52},{0,5,4772}, +{0,5,4772},{3,7,65535},{2,7,57588},{1,7,32135},{1,7,20823},{3,7,65535},{1,7,42804},{1,7,8359},{0,7,1289},{0,7,65535},{0,6,28970},{6,7,4317},{5,7,3321},{5,7,2297},{5,7,845},{7,5,6587},{5,7,4008},{4,7,2066},{0,7,164},{6,6,6611},{0,7,164},{3,7,17366},{3,7,17366},{3,7,17366},{3,7,12274},{2,7,14427},{2,7,6699},{2,7,6699},{0,7,389},{0,7,13860},{0,6,5234},{5,7,2297}, +{5,7,2297},{5,7,2297},{5,7,845},{6,5,4420},{4,7,2066},{4,7,2066},{0,7,164},{3,7,4420},{0,7,164},{7,7,122},{7,7,50},{7,7,1},{7,7,9},{7,7,122},{7,7,58},{7,7,9},{0,7,100},{7,7,58},{0,7,100},{2,0,9698},{2,0,9698},{2,0,9698},{2,0,9698},{1,7,1586},{1,7,1586},{1,7,1586},{0,7,289},{0,5,4250},{0,5,4250},{3,7,65535},{2,7,56836},{2,7,31631}, +{1,7,22791},{3,7,65535},{2,7,40532},{1,7,9015},{1,7,778},{0,7,65535},{0,6,24650},{6,7,3949},{6,7,3325},{5,7,2825},{5,7,1021},{6,7,6020},{5,7,3688},{4,7,2290},{0,7,4},{5,7,6020},{0,7,4},{3,7,18326},{3,7,18326},{3,7,18326},{3,7,12626},{3,7,15077},{2,7,7227},{2,7,7227},{1,7,294},{0,7,14020},{0,6,4946},{5,7,2825},{5,7,2825},{5,7,2825},{5,7,1021},{7,4,4418}, +{4,7,2290},{4,7,2290},{0,7,4},{7,5,4418},{0,7,4},{7,7,202},{7,7,130},{7,7,81},{7,7,25},{7,7,202},{7,7,74},{7,7,25},{0,7,4},{7,7,74},{0,7,4},{3,0,9490},{3,0,9490},{3,0,9490},{3,0,9490},{1,7,1970},{1,7,1970},{1,7,1970},{1,6,202},{0,6,3922},{0,6,3922},{3,7,65535},{3,7,55466},{2,7,30335},{2,7,21687},{3,7,65535},{2,7,37932},{1,7,9535}, +{1,7,70},{0,7,65535},{0,7,20544},{6,7,3417},{6,7,2793},{6,7,2393},{5,7,1033},{6,7,5184},{5,7,3204},{5,7,2180},{1,7,25},{7,6,5168},{1,7,25},{4,7,17611},{4,7,17611},{4,7,17611},{3,7,12630},{3,7,14321},{2,7,7251},{2,7,7251},{1,7,34},{0,7,13376},{0,7,4160},{6,7,2393},{6,7,2393},{6,7,2393},{5,7,1033},{6,6,3874},{5,7,2180},{5,7,2180},{1,7,25},{4,7,3874}, +{1,7,25},{7,7,242},{7,7,170},{7,7,121},{7,7,49},{7,7,242},{7,7,98},{7,7,49},{0,7,0},{7,7,98},{0,7,0},{3,0,9266},{3,0,9266},{3,0,9266},{3,0,9266},{2,7,2210},{2,7,2210},{2,7,2210},{1,7,34},{0,6,3442},{0,6,3442},{3,7,65535},{3,7,51210},{2,7,29343},{2,7,20695},{3,7,65535},{2,7,35820},{1,7,10495},{1,7,134},{1,7,65535},{0,7,15936},{6,7,2889}, +{6,7,2265},{6,7,1865},{5,7,1049},{7,6,4288},{5,7,2724},{5,7,1700},{1,7,9},{7,6,4272},{1,7,9},{4,7,16555},{4,7,16555},{4,7,16555},{3,7,12662},{3,7,13441},{2,7,7251},{2,7,7251},{1,7,34},{0,7,12608},{0,7,3392},{6,7,1865},{6,7,1865},{6,7,1865},{5,7,1049},{7,5,3218},{5,7,1700},{5,7,1700},{1,7,9},{6,6,3202},{1,7,9},{7,7,242},{7,7,170},{7,7,121}, +{7,7,49},{7,7,242},{7,7,98},{7,7,49},{0,7,0},{7,7,98},{0,7,0},{3,0,9298},{3,0,9298},{3,0,9298},{3,0,9298},{2,7,2210},{2,7,2210},{2,7,2210},{1,7,34},{0,6,3218},{0,6,3218},{4,7,65535},{3,7,47340},{2,7,29145},{2,7,20497},{3,7,65535},{2,7,34362},{2,7,9157},{1,7,1124},{1,7,64598},{0,7,11670},{6,7,2448},{6,7,1824},{6,7,1424},{6,7,800},{7,6,3361}, +{6,7,2321},{5,7,1313},{2,7,0},{6,7,3401},{2,7,0},{4,7,15673},{4,7,15673},{4,7,15673},{4,7,12073},{3,7,12757},{3,7,6905},{3,7,6905},{1,7,340},{1,7,11657},{0,7,2834},{6,7,1424},{6,7,1424},{6,7,1424},{6,7,800},{7,5,2525},{5,7,1313},{5,7,1313},{2,7,0},{5,7,2545},{2,7,0},{7,7,242},{7,7,170},{7,7,121},{7,7,49},{7,7,242},{7,7,98},{7,7,49}, +{0,7,0},{7,7,98},{0,7,0},{3,0,9640},{3,0,9640},{3,0,9640},{3,0,9640},{2,7,2516},{2,7,2516},{2,7,2516},{1,7,340},{0,7,2834},{0,7,2834},{4,7,65535},{3,7,44716},{3,7,27896},{2,7,21137},{4,7,65535},{3,7,31853},{2,7,8677},{2,7,784},{1,7,59734},{0,7,8694},{6,7,2192},{6,7,1568},{6,7,1168},{6,7,544},{7,6,2673},{6,7,1761},{5,7,1105},{3,7,25},{6,7,2649}, +{3,7,25},{4,7,15161},{4,7,15161},{4,7,15161},{4,7,11561},{4,7,12169},{3,7,6569},{3,7,6569},{2,7,208},{1,7,10889},{0,7,2610},{6,7,1168},{6,7,1168},{6,7,1168},{6,7,544},{6,7,1985},{5,7,1105},{5,7,1105},{3,7,25},{5,7,1985},{3,7,25},{7,7,242},{7,7,170},{7,7,121},{7,7,49},{7,7,242},{7,7,98},{7,7,49},{0,7,0},{7,7,98},{0,7,0},{4,0,9536}, +{4,0,9536},{4,0,9536},{4,0,9536},{2,7,3060},{2,7,3060},{2,7,3060},{2,7,208},{0,7,2610},{0,7,2610},{4,7,63766},{3,7,42860},{3,7,26040},{3,7,20188},{4,7,60070},{3,7,29085},{2,7,8965},{2,7,336},{1,7,55638},{0,7,6486},{7,7,1686},{6,7,1440},{6,7,1040},{6,7,416},{7,6,2113},{6,7,1329},{6,7,929},{3,7,9},{6,7,2025},{3,7,9},{4,7,14905},{4,7,14905},{4,7,14905}, +{4,7,11305},{4,7,11209},{3,7,6489},{3,7,6489},{2,7,272},{1,7,10377},{0,7,2642},{6,7,1040},{6,7,1040},{6,7,1040},{6,7,416},{7,6,1537},{6,7,929},{6,7,929},{3,7,9},{7,6,1513},{3,7,9},{7,7,242},{7,7,170},{7,7,121},{7,7,49},{7,7,242},{7,7,98},{7,7,49},{0,7,0},{7,7,98},{0,7,0},{4,0,9280},{4,0,9280},{4,0,9280},{4,0,9280},{3,7,3125}, +{3,7,3125},{3,7,3125},{2,7,272},{0,7,2642},{0,7,2642},{4,7,59414},{4,7,41414},{3,7,24952},{3,7,19100},{4,7,55014},{3,7,27085},{2,7,10021},{2,7,656},{1,7,52310},{0,7,5046},{7,7,1142},{7,7,1070},{7,7,1021},{6,7,416},{7,7,1538},{6,7,1025},{6,7,625},{4,7,4},{6,7,1529},{4,7,4},{5,7,13964},{5,7,13964},{5,7,13964},{4,7,11305},{4,7,10505},{3,7,6665},{3,7,6665}, +{2,7,592},{2,7,9973},{0,7,2930},{7,7,1021},{7,7,1021},{7,7,1021},{6,7,416},{7,6,1105},{6,7,625},{6,7,625},{4,7,4},{6,7,1129},{4,7,4},{7,7,242},{7,7,170},{7,7,121},{7,7,49},{7,7,242},{7,7,98},{7,7,49},{0,7,0},{7,7,98},{0,7,0},{4,0,9280},{4,0,9280},{4,0,9280},{4,0,9280},{3,7,3301},{3,7,3301},{3,7,3301},{2,7,592},{0,7,2930}, +{0,7,2930},
\ No newline at end of file diff --git a/thirdparty/enet/enet/enet.h b/thirdparty/enet/enet/enet.h index 966e3a465d..ac7552adb2 100644 --- a/thirdparty/enet/enet/enet.h +++ b/thirdparty/enet/enet/enet.h @@ -578,6 +578,8 @@ ENET_API void enet_host_channel_limit (ENetHost *, size_t); ENET_API void enet_host_bandwidth_limit (ENetHost *, enet_uint32, enet_uint32); extern void enet_host_bandwidth_throttle (ENetHost *); extern enet_uint32 enet_host_random_seed (void); +ENET_API void enet_host_dtls_server_setup (ENetHost *, void *, void *); +ENET_API void enet_host_dtls_client_setup (ENetHost *, void *, uint8_t, const char *); ENET_API int enet_peer_send (ENetPeer *, enet_uint8, ENetPacket *); ENET_API ENetPacket * enet_peer_receive (ENetPeer *, enet_uint8 * channelID); diff --git a/thirdparty/enet/godot.cpp b/thirdparty/enet/godot.cpp index 63580b6d1a..9fefa53e77 100644 --- a/thirdparty/enet/godot.cpp +++ b/thirdparty/enet/godot.cpp @@ -32,13 +32,313 @@ @brief ENet Godot specific functions */ +#include "core/io/dtls_server.h" #include "core/io/ip.h" #include "core/io/net_socket.h" +#include "core/io/packet_peer_dtls.h" +#include "core/io/udp_server.h" #include "core/os/os.h" // This must be last for windows to compile (tested with MinGW) #include "enet/enet.h" +/// Abstract ENet interface for UDP/DTLS. +class ENetGodotSocket { + +public: + virtual Error bind(IP_Address p_ip, uint16_t p_port) = 0; + virtual Error sendto(const uint8_t *p_buffer, int p_len, int &r_sent, IP_Address p_ip, uint16_t p_port) = 0; + virtual Error recvfrom(uint8_t *p_buffer, int p_len, int &r_read, IP_Address &r_ip, uint16_t &r_port) = 0; + virtual int set_option(ENetSocketOption p_option, int p_value) = 0; + virtual void close() = 0; + virtual ~ENetGodotSocket(){}; +}; + +class ENetDTLSClient; +class ENetDTLSServer; + +/// NetSocket interface +class ENetUDP : public ENetGodotSocket { + + friend class ENetDTLSClient; + friend class ENetDTLSServer; + +private: + Ref<NetSocket> sock; + IP_Address address; + uint16_t port; + bool bound; + +public: + ENetUDP() { + sock = Ref<NetSocket>(NetSocket::create()); + IP::Type ip_type = IP::TYPE_ANY; + bound = false; + sock->open(NetSocket::TYPE_UDP, ip_type); + } + + ~ENetUDP() { + sock->close(); + } + + Error bind(IP_Address p_ip, uint16_t p_port) { + address = p_ip; + port = p_port; + bound = true; + return sock->bind(address, port); + } + + Error sendto(const uint8_t *p_buffer, int p_len, int &r_sent, IP_Address p_ip, uint16_t p_port) { + return sock->sendto(p_buffer, p_len, r_sent, p_ip, p_port); + } + + Error recvfrom(uint8_t *p_buffer, int p_len, int &r_read, IP_Address &r_ip, uint16_t &r_port) { + Error err = sock->poll(NetSocket::POLL_TYPE_IN, 0); + if (err != OK) + return err; + return sock->recvfrom(p_buffer, p_len, r_read, r_ip, r_port); + } + + int set_option(ENetSocketOption p_option, int p_value) { + switch (p_option) { + case ENET_SOCKOPT_NONBLOCK: { + sock->set_blocking_enabled(p_value ? false : true); + return 0; + } break; + + case ENET_SOCKOPT_BROADCAST: { + sock->set_broadcasting_enabled(p_value ? true : false); + return 0; + } break; + + case ENET_SOCKOPT_REUSEADDR: { + sock->set_reuse_address_enabled(p_value ? true : false); + return 0; + } break; + + case ENET_SOCKOPT_RCVBUF: { + return -1; + } break; + + case ENET_SOCKOPT_SNDBUF: { + return -1; + } break; + + case ENET_SOCKOPT_RCVTIMEO: { + return -1; + } break; + + case ENET_SOCKOPT_SNDTIMEO: { + return -1; + } break; + + case ENET_SOCKOPT_NODELAY: { + sock->set_tcp_no_delay_enabled(p_value ? true : false); + return 0; + } break; + } + + return -1; + } + + void close() { + sock->close(); + } +}; + +/// DTLS Client ENet interface +class ENetDTLSClient : public ENetGodotSocket { + + bool connected; + Ref<PacketPeerUDP> udp; + Ref<PacketPeerDTLS> dtls; + bool verify; + String for_hostname; + Ref<X509Certificate> cert; + +public: + ENetDTLSClient(ENetUDP *p_base, Ref<X509Certificate> p_cert, bool p_verify, String p_for_hostname) { + verify = p_verify; + for_hostname = p_for_hostname; + cert = p_cert; + udp.instance(); + dtls = Ref<PacketPeerDTLS>(PacketPeerDTLS::create()); + p_base->close(); + if (p_base->bound) { + bind(p_base->address, p_base->port); + } + connected = false; + } + + ~ENetDTLSClient() { + close(); + } + + Error bind(IP_Address p_ip, uint16_t p_port) { + return udp->listen(p_port, p_ip); + } + + Error sendto(const uint8_t *p_buffer, int p_len, int &r_sent, IP_Address p_ip, uint16_t p_port) { + if (!connected) { + udp->connect_to_host(p_ip, p_port); + dtls->connect_to_peer(udp, verify, for_hostname, cert); + connected = true; + } + dtls->poll(); + if (dtls->get_status() == PacketPeerDTLS::STATUS_HANDSHAKING) + return ERR_BUSY; + else if (dtls->get_status() != PacketPeerDTLS::STATUS_CONNECTED) + return FAILED; + r_sent = p_len; + return dtls->put_packet(p_buffer, p_len); + } + + Error recvfrom(uint8_t *p_buffer, int p_len, int &r_read, IP_Address &r_ip, uint16_t &r_port) { + dtls->poll(); + if (dtls->get_status() == PacketPeerDTLS::STATUS_HANDSHAKING) + return ERR_BUSY; + if (dtls->get_status() != PacketPeerDTLS::STATUS_CONNECTED) + return FAILED; + int pc = dtls->get_available_packet_count(); + if (pc == 0) + return ERR_BUSY; + else if (pc < 0) + return FAILED; + + const uint8_t *buffer; + Error err = dtls->get_packet(&buffer, r_read); + ERR_FAIL_COND_V(err != OK, err); + ERR_FAIL_COND_V(p_len < r_read, ERR_OUT_OF_MEMORY); + + copymem(p_buffer, buffer, r_read); + r_ip = udp->get_packet_address(); + r_port = udp->get_packet_port(); + return err; + } + + int set_option(ENetSocketOption p_option, int p_value) { + return -1; + } + + void close() { + dtls->disconnect_from_peer(); + udp->close(); + } +}; + +/// DTLSServer - ENet interface +class ENetDTLSServer : public ENetGodotSocket { + + Ref<DTLSServer> server; + Ref<UDPServer> udp_server; + Map<String, Ref<PacketPeerDTLS> > peers; + int last_service; + +public: + ENetDTLSServer(ENetUDP *p_base, Ref<CryptoKey> p_key, Ref<X509Certificate> p_cert) { + last_service = 0; + udp_server.instance(); + p_base->close(); + if (p_base->bound) { + bind(p_base->address, p_base->port); + } + server = Ref<DTLSServer>(DTLSServer::create()); + server->setup(p_key, p_cert); + } + + ~ENetDTLSServer() { + close(); + } + + Error bind(IP_Address p_ip, uint16_t p_port) { + return udp_server->listen(p_port, p_ip); + } + + Error sendto(const uint8_t *p_buffer, int p_len, int &r_sent, IP_Address p_ip, uint16_t p_port) { + String key = String(p_ip) + ":" + itos(p_port); + ERR_FAIL_COND_V(!peers.has(key), ERR_UNAVAILABLE); + Ref<PacketPeerDTLS> peer = peers[key]; + Error err = peer->put_packet(p_buffer, p_len); + if (err == OK) + r_sent = p_len; + else if (err == ERR_BUSY) + r_sent = 0; + else + r_sent = -1; + return err; + } + + Error recvfrom(uint8_t *p_buffer, int p_len, int &r_read, IP_Address &r_ip, uint16_t &r_port) { + // TODO limits? Maybe we can better enforce allowed connections! + if (udp_server->is_connection_available()) { + Ref<PacketPeerUDP> udp = udp_server->take_connection(); + IP_Address peer_ip = udp->get_packet_address(); + int peer_port = udp->get_packet_port(); + Ref<PacketPeerDTLS> peer = server->take_connection(udp); + PacketPeerDTLS::Status status = peer->get_status(); + if (status == PacketPeerDTLS::STATUS_HANDSHAKING || status == PacketPeerDTLS::STATUS_CONNECTED) { + String key = String(peer_ip) + ":" + itos(peer_port); + peers[key] = peer; + } + } + + List<String> remove; + Error err = ERR_BUSY; + // TODO this needs to be fair! + for (Map<String, Ref<PacketPeerDTLS> >::Element *E = peers.front(); E; E = E->next()) { + Ref<PacketPeerDTLS> peer = E->get(); + peer->poll(); + + if (peer->get_status() == PacketPeerDTLS::STATUS_HANDSHAKING) + continue; + else if (peer->get_status() != PacketPeerDTLS::STATUS_CONNECTED) { + // Peer disconnected, removing it. + remove.push_back(E->key()); + continue; + } + + if (peer->get_available_packet_count() > 0) { + const uint8_t *buffer; + err = peer->get_packet(&buffer, r_read); + if (err != OK || p_len < r_read) { + // Something wrong with this peer, removing it. + remove.push_back(E->key()); + err = FAILED; + continue; + } + + Vector<String> s = E->key().rsplit(":", false, 1); + ERR_CONTINUE(s.size() != 2); // BUG! + + copymem(p_buffer, buffer, r_read); + r_ip = s[0]; + r_port = s[1].to_int(); + break; // err = OK + } + } + + // Remove disconnected peers from map. + for (List<String>::Element *E = remove.front(); E; E = E->next()) { + peers.erase(E->get()); + } + + return err; // OK, ERR_BUSY, or possibly an error. + } + + int set_option(ENetSocketOption p_option, int p_value) { + return -1; + } + + void close() { + for (Map<String, Ref<PacketPeerDTLS> >::Element *E = peers.front(); E; E = E->next()) { + E->get()->disconnect_from_peer(); + } + peers.clear(); + udp_server->stop(); + server->stop(); + } +}; + static enet_uint32 timeBase = 0; int enet_initialize(void) { @@ -92,13 +392,23 @@ int enet_address_get_host(const ENetAddress *address, char *name, size_t nameLen ENetSocket enet_socket_create(ENetSocketType type) { - NetSocket *socket = NetSocket::create(); - IP::Type ip_type = IP::TYPE_ANY; - socket->open(NetSocket::TYPE_UDP, ip_type); + ENetUDP *socket = memnew(ENetUDP); return socket; } +void enet_host_dtls_server_setup(ENetHost *host, void *p_key, void *p_cert) { + ENetUDP *sock = (ENetUDP *)host->socket; + host->socket = memnew(ENetDTLSServer(sock, Ref<CryptoKey>((CryptoKey *)p_key), Ref<X509Certificate>((X509Certificate *)p_cert))); + memdelete(sock); +} + +void enet_host_dtls_client_setup(ENetHost *host, void *p_cert, uint8_t p_verify, const char *p_for_hostname) { + ENetUDP *sock = (ENetUDP *)host->socket; + host->socket = memnew(ENetDTLSClient(sock, Ref<X509Certificate>((X509Certificate *)p_cert), p_verify, String(p_for_hostname))); + memdelete(sock); +} + int enet_socket_bind(ENetSocket socket, const ENetAddress *address) { IP_Address ip; @@ -108,7 +418,7 @@ int enet_socket_bind(ENetSocket socket, const ENetAddress *address) { ip.set_ipv6(address->host); } - NetSocket *sock = (NetSocket *)socket; + ENetGodotSocket *sock = (ENetGodotSocket *)socket; if (sock->bind(ip, address->port) != OK) { return -1; } @@ -116,7 +426,7 @@ int enet_socket_bind(ENetSocket socket, const ENetAddress *address) { } void enet_socket_destroy(ENetSocket socket) { - NetSocket *sock = (NetSocket *)socket; + ENetGodotSocket *sock = (ENetGodotSocket *)socket; sock->close(); memdelete(sock); } @@ -125,7 +435,7 @@ int enet_socket_send(ENetSocket socket, const ENetAddress *address, const ENetBu ERR_FAIL_COND_V(address == NULL, -1); - NetSocket *sock = (NetSocket *)socket; + ENetGodotSocket *sock = (ENetGodotSocket *)socket; IP_Address dest; Error err; size_t i = 0; @@ -133,8 +443,8 @@ int enet_socket_send(ENetSocket socket, const ENetAddress *address, const ENetBu dest.set_ipv6(address->host); // Create a single packet. - PoolVector<uint8_t> out; - PoolVector<uint8_t>::Write w; + Vector<uint8_t> out; + uint8_t* w; int size = 0; int pos = 0; for (i = 0; i < bufferCount; i++) { @@ -142,7 +452,7 @@ int enet_socket_send(ENetSocket socket, const ENetAddress *address, const ENetBu } out.resize(size); - w = out.write(); + w = out.ptrw(); for (i = 0; i < bufferCount; i++) { memcpy(&w[pos], buffers[i].data, buffers[i].dataLength); pos += buffers[i].dataLength; @@ -167,15 +477,7 @@ int enet_socket_receive(ENetSocket socket, ENetAddress *address, ENetBuffer *buf ERR_FAIL_COND_V(bufferCount != 1, -1); - NetSocket *sock = (NetSocket *)socket; - - Error ret = sock->poll(NetSocket::POLL_TYPE_IN, 0); - - if (ret == ERR_BUSY) - return 0; - - if (ret != OK) - return -1; + ENetGodotSocket *sock = (ENetGodotSocket *)socket; int read; IP_Address ip; @@ -215,47 +517,8 @@ int enet_socket_listen(ENetSocket socket, int backlog) { int enet_socket_set_option(ENetSocket socket, ENetSocketOption option, int value) { - NetSocket *sock = (NetSocket *)socket; - - switch (option) { - case ENET_SOCKOPT_NONBLOCK: { - sock->set_blocking_enabled(value ? false : true); - return 0; - } break; - - case ENET_SOCKOPT_BROADCAST: { - sock->set_broadcasting_enabled(value ? true : false); - return 0; - } break; - - case ENET_SOCKOPT_REUSEADDR: { - sock->set_reuse_address_enabled(value ? true : false); - return 0; - } break; - - case ENET_SOCKOPT_RCVBUF: { - return -1; - } break; - - case ENET_SOCKOPT_SNDBUF: { - return -1; - } break; - - case ENET_SOCKOPT_RCVTIMEO: { - return -1; - } break; - - case ENET_SOCKOPT_SNDTIMEO: { - return -1; - } break; - - case ENET_SOCKOPT_NODELAY: { - sock->set_tcp_no_delay_enabled(value ? true : false); - return 0; - } break; - } - - return -1; + ENetGodotSocket *sock = (ENetGodotSocket *)socket; + return sock->set_option(option, value); } int enet_socket_get_option(ENetSocket socket, ENetSocketOption option, int *value) { diff --git a/thirdparty/glslang/glslang/Include/revision.template b/thirdparty/glslang/glslang/Include/revision.template deleted file mode 100644 index 6c13630b27..0000000000 --- a/thirdparty/glslang/glslang/Include/revision.template +++ /dev/null @@ -1,13 +0,0 @@ -// The file revision.h should be updated to the latest version, somehow, on
-// check-in, if glslang has changed.
-//
-// revision.template is the source for revision.h when using SubWCRev as the
-// method of updating revision.h. You don't have to do it this way, the
-// requirement is only that revision.h gets updated.
-//
-// revision.h is under source control so that not all consumers of glslang
-// source have to figure out how to create revision.h just to get a build
-// going. However, if it is not updated, it can be a version behind.
-
-#define GLSLANG_REVISION "$WCREV$"
-#define GLSLANG_DATE "$WCDATE$"
|