summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/classes/@GlobalScope.xml51
-rw-r--r--doc/classes/AABB.xml8
-rw-r--r--doc/classes/AESContext.xml4
-rw-r--r--doc/classes/AStar.xml2
-rw-r--r--doc/classes/AStar2D.xml2
-rw-r--r--doc/classes/AcceptDialog.xml2
-rw-r--r--doc/classes/AnimatedSprite2D.xml6
-rw-r--r--doc/classes/AnimatedSprite3D.xml4
-rw-r--r--doc/classes/Animation.xml12
-rw-r--r--doc/classes/AnimationNode.xml118
-rw-r--r--doc/classes/AnimationNodeAnimation.xml2
-rw-r--r--doc/classes/AnimationNodeBlendSpace2D.xml6
-rw-r--r--doc/classes/AnimationNodeBlendTree.xml4
-rw-r--r--doc/classes/AnimationNodeStateMachine.xml2
-rw-r--r--doc/classes/AnimationNodeStateMachineTransition.xml2
-rw-r--r--doc/classes/AnimationPlayer.xml3
-rw-r--r--doc/classes/AnimationTrackEditPlugin.xml2
-rw-r--r--doc/classes/AnimationTree.xml6
-rw-r--r--doc/classes/Area2D.xml16
-rw-r--r--doc/classes/Area3D.xml16
-rw-r--r--doc/classes/Array.xml66
-rw-r--r--doc/classes/ArrayMesh.xml7
-rw-r--r--doc/classes/AtlasTexture.xml4
-rw-r--r--doc/classes/AudioEffectCompressor.xml2
-rw-r--r--doc/classes/AudioEffectInstance.xml2
-rw-r--r--doc/classes/AudioEffectPitchShift.xml25
-rw-r--r--doc/classes/AudioEffectSpectrumAnalyzer.xml28
-rw-r--r--doc/classes/AudioStreamGenerator.xml9
-rw-r--r--doc/classes/AudioStreamGeneratorPlayback.xml10
-rw-r--r--doc/classes/AudioStreamPlayback.xml2
-rw-r--r--doc/classes/AudioStreamPlayer.xml3
-rw-r--r--doc/classes/AudioStreamPlayer2D.xml6
-rw-r--r--doc/classes/AudioStreamPlayer3D.xml8
-rw-r--r--doc/classes/AudioStreamSample.xml8
-rw-r--r--doc/classes/BackBufferCopy.xml2
-rw-r--r--doc/classes/BaseMaterial3D.xml23
-rw-r--r--doc/classes/Basis.xml44
-rw-r--r--doc/classes/BitMap.xml6
-rw-r--r--doc/classes/Bone2D.xml71
-rw-r--r--doc/classes/BoxMesh.xml2
-rw-r--r--doc/classes/BoxShape3D.xml2
-rw-r--r--doc/classes/Button.xml22
-rw-r--r--doc/classes/ButtonGroup.xml9
-rw-r--r--doc/classes/CPUParticles2D.xml6
-rw-r--r--doc/classes/CPUParticles3D.xml10
-rw-r--r--doc/classes/Callable.xml16
-rw-r--r--doc/classes/CallbackTweener.xml29
-rw-r--r--doc/classes/Camera2D.xml4
-rw-r--r--doc/classes/Camera3D.xml15
-rw-r--r--doc/classes/CameraFeed.xml2
-rw-r--r--doc/classes/CanvasItem.xml54
-rw-r--r--doc/classes/CanvasLayer.xml6
-rw-r--r--doc/classes/CanvasModulate.xml2
-rw-r--r--doc/classes/CanvasTexture.xml2
-rw-r--r--doc/classes/CharFXTransform.xml10
-rw-r--r--doc/classes/CharacterBody2D.xml132
-rw-r--r--doc/classes/CharacterBody3D.xml115
-rw-r--r--doc/classes/CheckBox.xml12
-rw-r--r--doc/classes/CheckButton.xml12
-rw-r--r--doc/classes/ClassDB.xml4
-rw-r--r--doc/classes/CodeEdit.xml443
-rw-r--r--doc/classes/CodeHighlighter.xml8
-rw-r--r--doc/classes/CollisionObject3D.xml20
-rw-r--r--doc/classes/CollisionPolygon2D.xml2
-rw-r--r--doc/classes/CollisionPolygon3D.xml2
-rw-r--r--doc/classes/Color.xml313
-rw-r--r--doc/classes/ColorPicker.xml2
-rw-r--r--doc/classes/ColorPickerButton.xml12
-rw-r--r--doc/classes/ColorRect.xml2
-rw-r--r--doc/classes/ConcavePolygonShape2D.xml2
-rw-r--r--doc/classes/ConcavePolygonShape3D.xml2
-rw-r--r--doc/classes/ConfigFile.xml4
-rw-r--r--doc/classes/ConfirmationDialog.xml4
-rw-r--r--doc/classes/Control.xml285
-rw-r--r--doc/classes/ConvexPolygonShape2D.xml2
-rw-r--r--doc/classes/ConvexPolygonShape3D.xml2
-rw-r--r--doc/classes/Crypto.xml2
-rw-r--r--doc/classes/Curve2D.xml4
-rw-r--r--doc/classes/Curve3D.xml4
-rw-r--r--doc/classes/DTLSServer.xml2
-rw-r--r--doc/classes/Decal.xml4
-rw-r--r--doc/classes/Directory.xml10
-rw-r--r--doc/classes/DisplayServer.xml74
-rw-r--r--doc/classes/EditorDebuggerPlugin.xml2
-rw-r--r--doc/classes/EditorExportPlugin.xml2
-rw-r--r--doc/classes/EditorFeatureProfile.xml2
-rw-r--r--doc/classes/EditorImportPlugin.xml52
-rw-r--r--doc/classes/EditorInspectorPlugin.xml94
-rw-r--r--doc/classes/EditorInterface.xml6
-rw-r--r--doc/classes/EditorNode3DGizmo.xml142
-rw-r--r--doc/classes/EditorNode3DGizmoPlugin.xml162
-rw-r--r--doc/classes/EditorPaths.xml43
-rw-r--r--doc/classes/EditorPlugin.xml511
-rw-r--r--doc/classes/EditorProperty.xml20
-rw-r--r--doc/classes/EditorResourceConversionPlugin.xml2
-rw-r--r--doc/classes/EditorResourcePicker.xml81
-rw-r--r--doc/classes/EditorResourcePreview.xml6
-rw-r--r--doc/classes/EditorResourcePreviewGenerator.xml18
-rw-r--r--doc/classes/EditorSceneImporter.xml2
-rw-r--r--doc/classes/EditorSceneImporterMesh.xml4
-rw-r--r--doc/classes/EditorScenePostImport.xml22
-rw-r--r--doc/classes/EditorScript.xml2
-rw-r--r--doc/classes/EditorScriptPicker.xml21
-rw-r--r--doc/classes/EditorSettings.xml9
-rw-r--r--doc/classes/EditorSpinSlider.xml2
-rw-r--r--doc/classes/EditorSyntaxHighlighter.xml2
-rw-r--r--doc/classes/EditorTranslationParserPlugin.xml16
-rw-r--r--doc/classes/EncodedObjectAsID.xml2
-rw-r--r--doc/classes/Engine.xml1
-rw-r--r--doc/classes/EngineDebugger.xml2
-rw-r--r--doc/classes/Environment.xml14
-rw-r--r--doc/classes/Expression.xml12
-rw-r--r--doc/classes/File.xml19
-rw-r--r--doc/classes/FileDialog.xml8
-rw-r--r--doc/classes/FileSystemDock.xml34
-rw-r--r--doc/classes/Font.xml12
-rw-r--r--doc/classes/FontData.xml4
-rw-r--r--doc/classes/GPUParticles2D.xml18
-rw-r--r--doc/classes/GPUParticles3D.xml10
-rw-r--r--doc/classes/GPUParticlesAttractorBox.xml2
-rw-r--r--doc/classes/GPUParticlesAttractorVectorField.xml2
-rw-r--r--doc/classes/GPUParticlesCollisionBox.xml2
-rw-r--r--doc/classes/GPUParticlesCollisionHeightField.xml2
-rw-r--r--doc/classes/GPUParticlesCollisionSDF.xml2
-rw-r--r--doc/classes/GeometryInstance3D.xml26
-rw-r--r--doc/classes/Gradient.xml4
-rw-r--r--doc/classes/GraphEdit.xml26
-rw-r--r--doc/classes/GraphNode.xml91
-rw-r--r--doc/classes/HMACContext.xml2
-rw-r--r--doc/classes/HTTPClient.xml2
-rw-r--r--doc/classes/HTTPRequest.xml6
-rw-r--r--doc/classes/HashingContext.xml2
-rw-r--r--doc/classes/HeightMapShape3D.xml2
-rw-r--r--doc/classes/IP.xml22
-rw-r--r--doc/classes/Image.xml2
-rw-r--r--doc/classes/Input.xml7
-rw-r--r--doc/classes/InputEvent.xml17
-rw-r--r--doc/classes/InputEventAction.xml2
-rw-r--r--doc/classes/InputEventGesture.xml2
-rw-r--r--doc/classes/InputEventMouse.xml4
-rw-r--r--doc/classes/InputEventMouseButton.xml2
-rw-r--r--doc/classes/InputEventMouseMotion.xml6
-rw-r--r--doc/classes/InputEventPanGesture.xml2
-rw-r--r--doc/classes/InputEventScreenDrag.xml6
-rw-r--r--doc/classes/InputEventScreenTouch.xml2
-rw-r--r--doc/classes/InputEventWithModifiers.xml12
-rw-r--r--doc/classes/InstancePlaceholder.xml2
-rw-r--r--doc/classes/IntervalTweener.xml16
-rw-r--r--doc/classes/ItemList.xml10
-rw-r--r--doc/classes/JSON.xml70
-rw-r--r--doc/classes/JSONParseResult.xml51
-rw-r--r--doc/classes/JSONParser.xml57
-rw-r--r--doc/classes/JavaClass.xml2
-rw-r--r--doc/classes/JavaScript.xml43
-rw-r--r--doc/classes/JavaScriptObject.xml42
-rw-r--r--doc/classes/KinematicBody2D.xml176
-rw-r--r--doc/classes/KinematicBody3D.xml188
-rw-r--r--doc/classes/KinematicCollision2D.xml19
-rw-r--r--doc/classes/KinematicCollision3D.xml19
-rw-r--r--doc/classes/Label.xml8
-rw-r--r--doc/classes/Light2D.xml4
-rw-r--r--doc/classes/Light3D.xml8
-rw-r--r--doc/classes/LightmapGI.xml (renamed from doc/classes/BakedLightmap.xml)10
-rw-r--r--doc/classes/LightmapGIData.xml (renamed from doc/classes/BakedLightmapData.xml)2
-rw-r--r--doc/classes/Lightmapper.xml2
-rw-r--r--doc/classes/Line2D.xml4
-rw-r--r--doc/classes/LineEdit.xml20
-rw-r--r--doc/classes/LineShape2D.xml4
-rw-r--r--doc/classes/LinkButton.xml10
-rw-r--r--doc/classes/Listener3D.xml4
-rw-r--r--doc/classes/MenuButton.xml10
-rw-r--r--doc/classes/Mesh.xml2
-rw-r--r--doc/classes/MeshDataTool.xml6
-rw-r--r--doc/classes/MeshInstance3D.xml2
-rw-r--r--doc/classes/MeshLibrary.xml8
-rw-r--r--doc/classes/MeshTexture.xml2
-rw-r--r--doc/classes/MethodTweener.xml43
-rw-r--r--doc/classes/MultiMesh.xml10
-rw-r--r--doc/classes/MultiplayerAPI.xml10
-rw-r--r--doc/classes/Mutex.xml2
-rw-r--r--doc/classes/NavigationServer3D.xml2
-rw-r--r--doc/classes/NinePatchRect.xml2
-rw-r--r--doc/classes/Node.xml119
-rw-r--r--doc/classes/Node2D.xml10
-rw-r--r--doc/classes/Node3D.xml31
-rw-r--r--doc/classes/Node3DGizmo.xml2
-rw-r--r--doc/classes/OS.xml107
-rw-r--r--doc/classes/Object.xml8
-rw-r--r--doc/classes/Occluder3D.xml4
-rw-r--r--doc/classes/OccluderPolygon2D.xml2
-rw-r--r--doc/classes/OptionButton.xml10
-rw-r--r--doc/classes/PCKPacker.xml2
-rw-r--r--doc/classes/PackedDataContainer.xml2
-rw-r--r--doc/classes/PackedDataContainerRef.xml4
-rw-r--r--doc/classes/PackedScene.xml16
-rw-r--r--doc/classes/PackedVector3Array.xml2
-rw-r--r--doc/classes/PacketPeer.xml2
-rw-r--r--doc/classes/ParallaxBackground.xml10
-rw-r--r--doc/classes/ParallaxLayer.xml6
-rw-r--r--doc/classes/ParticlesMaterial.xml8
-rw-r--r--doc/classes/Performance.xml6
-rw-r--r--doc/classes/PhysicalBone2D.xml49
-rw-r--r--doc/classes/PhysicalBone3D.xml44
-rw-r--r--doc/classes/PhysicalSkyMaterial.xml6
-rw-r--r--doc/classes/PhysicsBody2D.xml40
-rw-r--r--doc/classes/PhysicsBody3D.xml80
-rw-r--r--doc/classes/PhysicsDirectBodyState2D.xml6
-rw-r--r--doc/classes/PhysicsDirectBodyState3D.xml12
-rw-r--r--doc/classes/PhysicsDirectSpaceState2D.xml6
-rw-r--r--doc/classes/PhysicsDirectSpaceState3D.xml2
-rw-r--r--doc/classes/PhysicsServer2D.xml29
-rw-r--r--doc/classes/PhysicsServer3D.xml66
-rw-r--r--doc/classes/PhysicsShapeQueryParameters2D.xml8
-rw-r--r--doc/classes/PhysicsShapeQueryParameters3D.xml6
-rw-r--r--doc/classes/PhysicsShapeQueryResult2D.xml2
-rw-r--r--doc/classes/PhysicsShapeQueryResult3D.xml2
-rw-r--r--doc/classes/PhysicsTestMotionResult2D.xml12
-rw-r--r--doc/classes/PinJoint2D.xml2
-rw-r--r--doc/classes/PinJoint3D.xml2
-rw-r--r--doc/classes/Plane.xml8
-rw-r--r--doc/classes/PlaneMesh.xml2
-rw-r--r--doc/classes/PointLight2D.xml2
-rw-r--r--doc/classes/Polygon2D.xml18
-rw-r--r--doc/classes/PopupMenu.xml12
-rw-r--r--doc/classes/PrimitiveMesh.xml4
-rw-r--r--doc/classes/PrismMesh.xml2
-rw-r--r--doc/classes/ProceduralSkyMaterial.xml8
-rw-r--r--doc/classes/ProgressBar.xml6
-rw-r--r--doc/classes/ProjectSettings.xml118
-rw-r--r--doc/classes/PropertyTweener.xml78
-rw-r--r--doc/classes/ProximityGroup3D.xml2
-rw-r--r--doc/classes/QuadMesh.xml2
-rw-r--r--doc/classes/Quaternion.xml (renamed from doc/classes/Quat.xml)100
-rw-r--r--doc/classes/RDAttachmentFormat.xml2
-rw-r--r--doc/classes/RDPipelineColorBlendState.xml6
-rw-r--r--doc/classes/RDPipelineColorBlendStateAttachment.xml2
-rw-r--r--doc/classes/RDPipelineDepthStencilState.xml2
-rw-r--r--doc/classes/RDPipelineMultisampleState.xml4
-rw-r--r--doc/classes/RDPipelineRasterizationState.xml2
-rw-r--r--doc/classes/RDSamplerState.xml2
-rw-r--r--doc/classes/RDShaderBytecode.xml10
-rw-r--r--doc/classes/RDShaderFile.xml4
-rw-r--r--doc/classes/RDShaderSource.xml2
-rw-r--r--doc/classes/RDTextureFormat.xml2
-rw-r--r--doc/classes/RDTextureView.xml2
-rw-r--r--doc/classes/RDUniform.xml2
-rw-r--r--doc/classes/RDVertexAttribute.xml2
-rw-r--r--doc/classes/RandomNumberGenerator.xml2
-rw-r--r--doc/classes/RayCast2D.xml2
-rw-r--r--doc/classes/RayCast3D.xml4
-rw-r--r--doc/classes/Rect2.xml6
-rw-r--r--doc/classes/Rect2i.xml6
-rw-r--r--doc/classes/RectangleShape2D.xml2
-rw-r--r--doc/classes/RefCounted.xml (renamed from doc/classes/Reference.xml)4
-rw-r--r--doc/classes/ReferenceRect.xml2
-rw-r--r--doc/classes/ReflectionProbe.xml8
-rw-r--r--doc/classes/RemoteTransform3D.xml4
-rw-r--r--doc/classes/RenderingDevice.xml28
-rw-r--r--doc/classes/RenderingServer.xml106
-rw-r--r--doc/classes/Resource.xml5
-rw-r--r--doc/classes/ResourceFormatLoader.xml14
-rw-r--r--doc/classes/ResourceFormatSaver.xml10
-rw-r--r--doc/classes/ResourceImporter.xml2
-rw-r--r--doc/classes/ResourceLoader.xml2
-rw-r--r--doc/classes/ResourceSaver.xml2
-rw-r--r--doc/classes/RichTextLabel.xml28
-rw-r--r--doc/classes/RigidBody2D.xml44
-rw-r--r--doc/classes/RigidBody3D.xml67
-rw-r--r--doc/classes/SceneState.xml10
-rw-r--r--doc/classes/SceneTree.xml15
-rw-r--r--doc/classes/SceneTreeTimer.xml2
-rw-r--r--doc/classes/Script.xml4
-rw-r--r--doc/classes/ScriptEditor.xml34
-rw-r--r--doc/classes/ScriptEditorBase.xml9
-rw-r--r--doc/classes/ScrollContainer.xml15
-rw-r--r--doc/classes/SegmentShape2D.xml4
-rw-r--r--doc/classes/Semaphore.xml2
-rw-r--r--doc/classes/Shape3D.xml7
-rw-r--r--doc/classes/Signal.xml2
-rw-r--r--doc/classes/Skeleton2D.xml54
-rw-r--r--doc/classes/Skeleton3D.xml66
-rw-r--r--doc/classes/SkeletonIK3D.xml8
-rw-r--r--doc/classes/SkeletonModification2D.xml104
-rw-r--r--doc/classes/SkeletonModification2DCCDIK.xml170
-rw-r--r--doc/classes/SkeletonModification2DFABRIK.xml108
-rw-r--r--doc/classes/SkeletonModification2DJiggle.xml232
-rw-r--r--doc/classes/SkeletonModification2DLookAt.xml107
-rw-r--r--doc/classes/SkeletonModification2DPhysicalBones.xml68
-rw-r--r--doc/classes/SkeletonModification2DStackHolder.xml32
-rw-r--r--doc/classes/SkeletonModification2DTwoBoneIK.xml94
-rw-r--r--doc/classes/SkeletonModificationStack2D.xml108
-rw-r--r--doc/classes/Skin.xml6
-rw-r--r--doc/classes/SkinReference.xml2
-rw-r--r--doc/classes/Sprite2D.xml6
-rw-r--r--doc/classes/Sprite3D.xml9
-rw-r--r--doc/classes/SpriteBase3D.xml4
-rw-r--r--doc/classes/StaticBody2D.xml17
-rw-r--r--doc/classes/StaticBody3D.xml19
-rw-r--r--doc/classes/StreamPeer.xml4
-rw-r--r--doc/classes/StreamPeerBuffer.xml2
-rw-r--r--doc/classes/String.xml18
-rw-r--r--doc/classes/StyleBoxFlat.xml8
-rw-r--r--doc/classes/StyleBoxLine.xml2
-rw-r--r--doc/classes/StyleBoxTexture.xml11
-rw-r--r--doc/classes/SubViewport.xml4
-rw-r--r--doc/classes/SurfaceTool.xml16
-rw-r--r--doc/classes/TCPServer.xml (renamed from doc/classes/TCP_Server.xml)2
-rw-r--r--doc/classes/TabContainer.xml8
-rw-r--r--doc/classes/Tabs.xml8
-rw-r--r--doc/classes/TextEdit.xml147
-rw-r--r--doc/classes/TextLine.xml6
-rw-r--r--doc/classes/TextParagraph.xml20
-rw-r--r--doc/classes/TextServer.xml10
-rw-r--r--doc/classes/Texture2D.xml6
-rw-r--r--doc/classes/TextureProgressBar.xml8
-rw-r--r--doc/classes/Theme.xml204
-rw-r--r--doc/classes/Thread.xml2
-rw-r--r--doc/classes/TileData.xml245
-rw-r--r--doc/classes/TileMap.xml281
-rw-r--r--doc/classes/TileSet.xml708
-rw-r--r--doc/classes/TileSetAtlasSource.xml207
-rw-r--r--doc/classes/TileSetScenesCollectionSource.xml155
-rw-r--r--doc/classes/TileSetSource.xml13
-rw-r--r--doc/classes/Time.xml270
-rw-r--r--doc/classes/Transform2D.xml51
-rw-r--r--doc/classes/Transform3D.xml (renamed from doc/classes/Transform.xml)98
-rw-r--r--doc/classes/Tree.xml40
-rw-r--r--doc/classes/TreeItem.xml84
-rw-r--r--doc/classes/TriangleMesh.xml2
-rw-r--r--doc/classes/Tween.xml509
-rw-r--r--doc/classes/Tweener.xml22
-rw-r--r--doc/classes/UDPServer.xml2
-rw-r--r--doc/classes/Variant.xml32
-rw-r--r--doc/classes/Vector2.xml31
-rw-r--r--doc/classes/Vector2i.xml23
-rw-r--r--doc/classes/Vector3.xml44
-rw-r--r--doc/classes/Vector3i.xml27
-rw-r--r--doc/classes/VelocityTracker3D.xml2
-rw-r--r--doc/classes/VideoPlayer.xml2
-rw-r--r--doc/classes/Viewport.xml31
-rw-r--r--doc/classes/VisibilityEnabler2D.xml79
-rw-r--r--doc/classes/VisibilityEnabler3D.xml55
-rw-r--r--doc/classes/VisibilityNotifier2D.xml57
-rw-r--r--doc/classes/VisibilityNotifier3D.xml56
-rw-r--r--doc/classes/VisibleOnScreenEnabler2D.xml25
-rw-r--r--doc/classes/VisibleOnScreenEnabler3D.xml30
-rw-r--r--doc/classes/VisibleOnScreenNotifier2D.xml42
-rw-r--r--doc/classes/VisibleOnScreenNotifier3D.xml42
-rw-r--r--doc/classes/VisualInstance3D.xml2
-rw-r--r--doc/classes/VisualShader.xml14
-rw-r--r--doc/classes/VisualShaderNode.xml16
-rw-r--r--doc/classes/VisualShaderNodeBillboard.xml38
-rw-r--r--doc/classes/VisualShaderNodeColorConstant.xml2
-rw-r--r--doc/classes/VisualShaderNodeColorUniform.xml2
-rw-r--r--doc/classes/VisualShaderNodeDeterminant.xml2
-rw-r--r--doc/classes/VisualShaderNodeParticleAccelerator.xml25
-rw-r--r--doc/classes/VisualShaderNodeParticleBoxEmitter.xml13
-rw-r--r--doc/classes/VisualShaderNodeParticleConeVelocity.xml13
-rw-r--r--doc/classes/VisualShaderNodeParticleEmit.xml27
-rw-r--r--doc/classes/VisualShaderNodeParticleEmitter.xml13
-rw-r--r--doc/classes/VisualShaderNodeParticleMultiplyByAxisAngle.xml17
-rw-r--r--doc/classes/VisualShaderNodeParticleOutput.xml13
-rw-r--r--doc/classes/VisualShaderNodeParticleRandomness.xml23
-rw-r--r--doc/classes/VisualShaderNodeParticleRingEmitter.xml13
-rw-r--r--doc/classes/VisualShaderNodeParticleSphereEmitter.xml13
-rw-r--r--doc/classes/VisualShaderNodeResizableBase.xml2
-rw-r--r--doc/classes/VisualShaderNodeTransformCompose.xml2
-rw-r--r--doc/classes/VisualShaderNodeTransformConstant.xml8
-rw-r--r--doc/classes/VisualShaderNodeTransformDecompose.xml2
-rw-r--r--doc/classes/VisualShaderNodeTransformFunc.xml8
-rw-r--r--doc/classes/VisualShaderNodeTransformMult.xml2
-rw-r--r--doc/classes/VisualShaderNodeTransformUniform.xml4
-rw-r--r--doc/classes/VisualShaderNodeTransformVecMult.xml2
-rw-r--r--doc/classes/VisualShaderNodeUVFunc.xml28
-rw-r--r--doc/classes/VisualShaderNodeVec3Constant.xml2
-rw-r--r--doc/classes/VisualShaderNodeVec3Uniform.xml2
-rw-r--r--doc/classes/VoxelGI.xml (renamed from doc/classes/GIProbe.xml)22
-rw-r--r--doc/classes/VoxelGIData.xml (renamed from doc/classes/GIProbeData.xml)6
-rw-r--r--doc/classes/WeakRef.xml4
-rw-r--r--doc/classes/Window.xml58
-rw-r--r--doc/classes/WorldEnvironment.xml2
-rw-r--r--doc/classes/WorldMarginShape3D.xml2
-rw-r--r--doc/classes/XMLParser.xml2
-rw-r--r--doc/classes/XRInterface.xml16
-rw-r--r--doc/classes/XRPositionalTracker.xml4
-rw-r--r--doc/classes/XRServer.xml8
-rw-r--r--doc/classes/YSort.xml21
-rw-r--r--doc/classes/float.xml6
-rw-r--r--doc/classes/int.xml4
-rw-r--r--doc/translations/ar.po32
-rw-r--r--doc/translations/ca.po32
-rw-r--r--doc/translations/classes.pot38
-rw-r--r--doc/translations/cs.po32
-rw-r--r--doc/translations/de.po32
-rw-r--r--doc/translations/es.po36
-rw-r--r--doc/translations/fa.po32
-rw-r--r--doc/translations/fi.po32
-rw-r--r--doc/translations/fr.po32
-rw-r--r--doc/translations/id.po32
-rw-r--r--doc/translations/it.po32
-rw-r--r--doc/translations/ja.po32
-rw-r--r--doc/translations/ko.po32
-rw-r--r--doc/translations/nl.po32
-rw-r--r--doc/translations/pl.po32
-rw-r--r--doc/translations/pt_BR.po32
-rw-r--r--doc/translations/ro.po32
-rw-r--r--doc/translations/ru.po32
-rw-r--r--doc/translations/sr_Cyrl.po32
-rw-r--r--doc/translations/th.po32
-rw-r--r--doc/translations/tr.po32
-rw-r--r--doc/translations/uk.po32
-rw-r--r--doc/translations/zh_Hans.po32
-rw-r--r--doc/translations/zh_Hant.po32
413 files changed, 7568 insertions, 4972 deletions
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml
index 95108f1613..fa118bec54 100644
--- a/doc/classes/@GlobalScope.xml
+++ b/doc/classes/@GlobalScope.xml
@@ -652,6 +652,31 @@
Converts a 2D point expressed in the polar coordinate system (a distance from the origin [code]r[/code] and an angle [code]th[/code]) to the cartesian coordinate system (X and Y axis).
</description>
</method>
+ <method name="posmod">
+ <return type="int">
+ </return>
+ <argument index="0" name="x" type="int">
+ </argument>
+ <argument index="1" name="y" type="int">
+ </argument>
+ <description>
+ Returns the integer modulus of [code]x/y[/code] that wraps equally in positive and negative.
+ [codeblock]
+ for i in range(-3, 4):
+ print("%2d %2d %2d" % [i, i % 3, posmod(i, 3)])
+ [/codeblock]
+ Produces:
+ [codeblock]
+ -3 0 0
+ -2 -2 1
+ -1 -1 2
+ 0 0 0
+ 1 1 1
+ 2 2 2
+ 3 0 0
+ [/codeblock]
+ </description>
+ </method>
<method name="pow">
<return type="float">
</return>
@@ -1041,11 +1066,13 @@
<description>
Returns the internal type of the given Variant object, using the [enum Variant.Type] values.
[codeblock]
- p = parse_json('["a", "b", "c"]')
- if typeof(p) == TYPE_ARRAY:
- print(p[0]) # Prints a
+ var json = JSON.new()
+ json.parse('["a", "b", "c"]')
+ var result = json.get_data()
+ if typeof(result) == TYPE_ARRAY:
+ print(result[0]) # Prints a
else:
- print("unexpected results")
+ print("Unexpected result")
[/codeblock]
</description>
</method>
@@ -1186,9 +1213,6 @@
<member name="InputMap" type="InputMap" setter="" getter="">
The [InputMap] singleton.
</member>
- <member name="JSON" type="JSON" setter="" getter="">
- The [JSON] singleton.
- </member>
<member name="JavaClassWrapper" type="JavaClassWrapper" setter="" getter="">
The [JavaClassWrapper] singleton.
[b]Note:[/b] Only implemented on Android.
@@ -1236,6 +1260,9 @@
<member name="TextServerManager" type="TextServerManager" setter="" getter="">
The [TextServerManager] singleton.
</member>
+ <member name="Time" type="Time" setter="" getter="">
+ The [Time] singleton.
+ </member>
<member name="TranslationServer" type="TranslationServer" setter="" getter="">
The [TranslationServer] singleton.
</member>
@@ -1368,7 +1395,7 @@
<constant name="KEY_SHIFT" value="16777237" enum="Key">
Shift key.
</constant>
- <constant name="KEY_CONTROL" value="16777238" enum="Key">
+ <constant name="KEY_CTRL" value="16777238" enum="Key">
Control key.
</constant>
<constant name="KEY_META" value="16777239" enum="Key">
@@ -2571,8 +2598,8 @@
<constant name="TYPE_PLANE" value="12" enum="Variant.Type">
Variable is of type [Plane].
</constant>
- <constant name="TYPE_QUAT" value="13" enum="Variant.Type">
- Variable is of type [Quat].
+ <constant name="TYPE_QUATERNION" value="13" enum="Variant.Type">
+ Variable is of type [Quaternion].
</constant>
<constant name="TYPE_AABB" value="14" enum="Variant.Type">
Variable is of type [AABB].
@@ -2580,8 +2607,8 @@
<constant name="TYPE_BASIS" value="15" enum="Variant.Type">
Variable is of type [Basis].
</constant>
- <constant name="TYPE_TRANSFORM" value="16" enum="Variant.Type">
- Variable is of type [Transform].
+ <constant name="TYPE_TRANSFORM3D" value="16" enum="Variant.Type">
+ Variable is of type [Transform3D].
</constant>
<constant name="TYPE_COLOR" value="17" enum="Variant.Type">
Variable is of type [Color].
diff --git a/doc/classes/AABB.xml b/doc/classes/AABB.xml
index a28bde9946..03607661df 100644
--- a/doc/classes/AABB.xml
+++ b/doc/classes/AABB.xml
@@ -242,7 +242,7 @@
<method name="operator *" qualifiers="operator">
<return type="AABB">
</return>
- <argument index="0" name="right" type="Transform">
+ <argument index="0" name="right" type="Transform3D">
</argument>
<description>
</description>
@@ -257,13 +257,13 @@
</method>
</methods>
<members>
- <member name="end" type="Vector3" setter="" getter="" default="Vector3( 0, 0, 0 )">
+ <member name="end" type="Vector3" setter="" getter="" default="Vector3(0, 0, 0)">
Ending corner. This is calculated as [code]position + size[/code]. Setting this value will change the size.
</member>
- <member name="position" type="Vector3" setter="" getter="" default="Vector3( 0, 0, 0 )">
+ <member name="position" type="Vector3" setter="" getter="" default="Vector3(0, 0, 0)">
Beginning corner. Typically has values lower than [member end].
</member>
- <member name="size" type="Vector3" setter="" getter="" default="Vector3( 0, 0, 0 )">
+ <member name="size" type="Vector3" setter="" getter="" default="Vector3(0, 0, 0)">
Size from [member position] to [member end]. Typically, all components are positive.
If the size is negative, you can use [method abs] to fix it.
</member>
diff --git a/doc/classes/AESContext.xml b/doc/classes/AESContext.xml
index f577bab992..e179c97677 100644
--- a/doc/classes/AESContext.xml
+++ b/doc/classes/AESContext.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AESContext" inherits="Reference" version="4.0">
+<class name="AESContext" inherits="RefCounted" version="4.0">
<brief_description>
Interface to low level AES encryption features.
</brief_description>
@@ -101,7 +101,7 @@
</argument>
<argument index="1" name="key" type="PackedByteArray">
</argument>
- <argument index="2" name="iv" type="PackedByteArray" default="PackedByteArray( )">
+ <argument index="2" name="iv" type="PackedByteArray" default="PackedByteArray()">
</argument>
<description>
Start the AES context in the given [code]mode[/code]. A [code]key[/code] of either 16 or 32 bytes must always be provided, while an [code]iv[/code] (initialization vector) of exactly 16 bytes, is only needed when [code]mode[/code] is either [constant MODE_CBC_ENCRYPT] or [constant MODE_CBC_DECRYPT].
diff --git a/doc/classes/AStar.xml b/doc/classes/AStar.xml
index fce2b90197..cc7f7072b9 100644
--- a/doc/classes/AStar.xml
+++ b/doc/classes/AStar.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AStar" inherits="Reference" version="4.0">
+<class name="AStar" inherits="RefCounted" version="4.0">
<brief_description>
An implementation of A* to find the shortest paths among connected points in space.
</brief_description>
diff --git a/doc/classes/AStar2D.xml b/doc/classes/AStar2D.xml
index 3efd2f604c..9edc300169 100644
--- a/doc/classes/AStar2D.xml
+++ b/doc/classes/AStar2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AStar2D" inherits="Reference" version="4.0">
+<class name="AStar2D" inherits="RefCounted" version="4.0">
<brief_description>
AStar class representation that uses 2D vectors as edges.
</brief_description>
diff --git a/doc/classes/AcceptDialog.xml b/doc/classes/AcceptDialog.xml
index f4cf246713..f644606040 100644
--- a/doc/classes/AcceptDialog.xml
+++ b/doc/classes/AcceptDialog.xml
@@ -49,7 +49,7 @@
<method name="register_text_enter">
<return type="void">
</return>
- <argument index="0" name="line_edit" type="Node">
+ <argument index="0" name="line_edit" type="Control">
</argument>
<description>
Registers a [LineEdit] in the dialog. When the enter key is pressed, the dialog will be accepted.
diff --git a/doc/classes/AnimatedSprite2D.xml b/doc/classes/AnimatedSprite2D.xml
index 969e9cc85b..7662e8368b 100644
--- a/doc/classes/AnimatedSprite2D.xml
+++ b/doc/classes/AnimatedSprite2D.xml
@@ -22,7 +22,7 @@
<method name="play">
<return type="void">
</return>
- <argument index="0" name="anim" type="StringName" default="@&quot;&quot;">
+ <argument index="0" name="anim" type="StringName" default="&amp;&quot;&quot;">
</argument>
<argument index="1" name="backwards" type="bool" default="false">
</argument>
@@ -39,7 +39,7 @@
</method>
</methods>
<members>
- <member name="animation" type="StringName" setter="set_animation" getter="get_animation" default="@&quot;default&quot;">
+ <member name="animation" type="StringName" setter="set_animation" getter="get_animation" default="&amp;&quot;default&quot;">
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">
@@ -57,7 +57,7 @@
<member name="frames" type="SpriteFrames" setter="set_sprite_frames" getter="get_sprite_frames">
The [SpriteFrames] resource containing the animation(s).
</member>
- <member name="offset" type="Vector2" setter="set_offset" getter="get_offset" default="Vector2( 0, 0 )">
+ <member name="offset" type="Vector2" setter="set_offset" getter="get_offset" default="Vector2(0, 0)">
The texture's drawing offset.
</member>
<member name="playing" type="bool" setter="_set_playing" getter="_is_playing" default="false">
diff --git a/doc/classes/AnimatedSprite3D.xml b/doc/classes/AnimatedSprite3D.xml
index 02ccab4e05..39ab317b79 100644
--- a/doc/classes/AnimatedSprite3D.xml
+++ b/doc/classes/AnimatedSprite3D.xml
@@ -20,7 +20,7 @@
<method name="play">
<return type="void">
</return>
- <argument index="0" name="anim" type="StringName" default="@&quot;&quot;">
+ <argument index="0" name="anim" type="StringName" default="&amp;&quot;&quot;">
</argument>
<description>
Plays the animation named [code]anim[/code]. If no [code]anim[/code] is provided, the current animation is played.
@@ -35,7 +35,7 @@
</method>
</methods>
<members>
- <member name="animation" type="StringName" setter="set_animation" getter="get_animation" default="@&quot;default&quot;">
+ <member name="animation" type="StringName" setter="set_animation" getter="get_animation" default="&amp;&quot;default&quot;">
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 7ceb21d22e..894e784397 100644
--- a/doc/classes/Animation.xml
+++ b/doc/classes/Animation.xml
@@ -213,9 +213,9 @@
</argument>
<argument index="2" name="value" type="float">
</argument>
- <argument index="3" name="in_handle" type="Vector2" default="Vector2( 0, 0 )">
+ <argument index="3" name="in_handle" type="Vector2" default="Vector2(0, 0)">
</argument>
- <argument index="4" name="out_handle" type="Vector2" default="Vector2( 0, 0 )">
+ <argument index="4" name="out_handle" type="Vector2" default="Vector2(0, 0)">
</argument>
<description>
Inserts a Bezier Track key at the given [code]time[/code] in seconds. The [code]track_idx[/code] must be the index of a Bezier Track.
@@ -640,7 +640,7 @@
</argument>
<argument index="2" name="location" type="Vector3">
</argument>
- <argument index="3" name="rotation" type="Quat">
+ <argument index="3" name="rotation" type="Quaternion">
</argument>
<argument index="4" name="scale" type="Vector3">
</argument>
@@ -656,7 +656,7 @@
<argument index="1" name="time_sec" type="float">
</argument>
<description>
- Returns the interpolated value of a transform track at a given time (in seconds). An array consisting of 3 elements: position ([Vector3]), rotation ([Quat]) and scale ([Vector3]).
+ Returns the interpolated value of a transform track at a given time (in seconds). An array consisting of 3 elements: position ([Vector3]), rotation ([Quaternion]) and scale ([Vector3]).
</description>
</method>
<method name="value_track_get_key_indices" qualifiers="const">
@@ -727,8 +727,8 @@
<constant name="TYPE_VALUE" value="0" enum="TrackType">
Value tracks set values in node properties, but only those which can be Interpolated.
</constant>
- <constant name="TYPE_TRANSFORM" value="1" enum="TrackType">
- Transform tracks are used to change node local transforms or skeleton pose bones. Transitions are interpolated.
+ <constant name="TYPE_TRANSFORM3D" value="1" enum="TrackType">
+ Transform3D tracks are used to change node local transforms or skeleton pose bones of 3D nodes. Transitions are interpolated.
</constant>
<constant name="TYPE_METHOD" value="2" enum="TrackType">
Method tracks call functions with given arguments per key.
diff --git a/doc/classes/AnimationNode.xml b/doc/classes/AnimationNode.xml
index 8204b456d9..fddd8989ab 100644
--- a/doc/classes/AnimationNode.xml
+++ b/doc/classes/AnimationNode.xml
@@ -11,6 +11,65 @@
<link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link>
</tutorials>
<methods>
+ <method name="_get_caption" qualifiers="virtual">
+ <return type="String">
+ </return>
+ <description>
+ Gets the text caption for this node (used by some editors).
+ </description>
+ </method>
+ <method name="_get_child_by_name" qualifiers="virtual">
+ <return type="Object">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ Gets a child node by index (used by editors inheriting from [AnimationRootNode]).
+ </description>
+ </method>
+ <method name="_get_child_nodes" qualifiers="virtual">
+ <return type="Dictionary">
+ </return>
+ <description>
+ Gets all children nodes in order as a [code]name: node[/code] dictionary. Only useful when inheriting [AnimationRootNode].
+ </description>
+ </method>
+ <method name="_get_parameter_default_value" qualifiers="virtual">
+ <return type="Variant">
+ </return>
+ <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.
+ </description>
+ </method>
+ <method name="_get_parameter_list" qualifiers="virtual">
+ <return type="Array">
+ </return>
+ <description>
+ Gets the property information for parameter. Parameters are custom local memory used for your nodes, given a resource can be reused in multiple trees. Format is similar to [method Object.get_property_list].
+ </description>
+ </method>
+ <method name="_has_filter" qualifiers="virtual">
+ <return type="bool">
+ </return>
+ <description>
+ Returns [code]true[/code] whether you want the blend tree editor to display filter editing on this node.
+ </description>
+ </method>
+ <method name="_process" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <argument index="0" name="time" type="float">
+ </argument>
+ <argument index="1" name="seek" type="bool">
+ </argument>
+ <description>
+ User-defined callback called when a custom node is processed. The [code]time[/code] parameter is a relative delta, unless [code]seek[/code] is [code]true[/code], in which case it is absolute.
+ Here, call the [method blend_input], [method blend_node] or [method blend_animation] functions. You can also use [method get_parameter] and [method set_parameter] to modify local memory.
+ This function should return the time left for the current animation to finish (if unsure, pass the value from the main blend being called).
+ </description>
+ </method>
<method name="add_input">
<return type="void">
</return>
@@ -77,29 +136,6 @@
Blend another animation node (in case this node contains children animation nodes). This function is only useful if you inherit from [AnimationRootNode] instead, else editors will not display your node for addition.
</description>
</method>
- <method name="get_caption" qualifiers="virtual">
- <return type="String">
- </return>
- <description>
- Gets the text caption for this node (used by some editors).
- </description>
- </method>
- <method name="get_child_by_name" qualifiers="virtual">
- <return type="Object">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- Gets a child node by index (used by editors inheriting from [AnimationRootNode]).
- </description>
- </method>
- <method name="get_child_nodes" qualifiers="virtual">
- <return type="Dictionary">
- </return>
- <description>
- Gets all children nodes in order as a [code]name: node[/code] dictionary. Only useful when inheriting [AnimationRootNode].
- </description>
- </method>
<method name="get_input_count" qualifiers="const">
<return type="int">
</return>
@@ -125,29 +161,6 @@
Gets the value of a parameter. Parameters are custom local memory used for your nodes, given a resource can be reused in multiple trees.
</description>
</method>
- <method name="get_parameter_default_value" qualifiers="virtual">
- <return type="Variant">
- </return>
- <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.
- </description>
- </method>
- <method name="get_parameter_list" qualifiers="virtual">
- <return type="Array">
- </return>
- <description>
- Gets the property information for parameter. Parameters are custom local memory used for your nodes, given a resource can be reused in multiple trees. Format is similar to [method Object.get_property_list].
- </description>
- </method>
- <method name="has_filter" qualifiers="virtual">
- <return type="bool">
- </return>
- <description>
- Returns [code]true[/code] whether you want the blend tree editor to display filter editing on this node.
- </description>
- </method>
<method name="is_path_filtered" qualifiers="const">
<return type="bool">
</return>
@@ -157,19 +170,6 @@
Returns [code]true[/code] whether a given path is filtered.
</description>
</method>
- <method name="process" qualifiers="virtual">
- <return type="void">
- </return>
- <argument index="0" name="time" type="float">
- </argument>
- <argument index="1" name="seek" type="bool">
- </argument>
- <description>
- User-defined callback called when a custom node is processed. The [code]time[/code] parameter is a relative delta, unless [code]seek[/code] is [code]true[/code], in which case it is absolute.
- Here, call the [method blend_input], [method blend_node] or [method blend_animation] functions. You can also use [method get_parameter] and [method set_parameter] to modify local memory.
- This function should return the time left for the current animation to finish (if unsure, pass the value from the main blend being called).
- </description>
- </method>
<method name="remove_input">
<return type="void">
</return>
diff --git a/doc/classes/AnimationNodeAnimation.xml b/doc/classes/AnimationNodeAnimation.xml
index 3f0843c112..75dae6a48e 100644
--- a/doc/classes/AnimationNodeAnimation.xml
+++ b/doc/classes/AnimationNodeAnimation.xml
@@ -14,7 +14,7 @@
<methods>
</methods>
<members>
- <member name="animation" type="StringName" setter="set_animation" getter="get_animation" default="@&quot;&quot;">
+ <member name="animation" type="StringName" setter="set_animation" getter="get_animation" default="&amp;&quot;&quot;">
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/AnimationNodeBlendSpace2D.xml b/doc/classes/AnimationNodeBlendSpace2D.xml
index abbc8cb2e6..1a6d2bd755 100644
--- a/doc/classes/AnimationNodeBlendSpace2D.xml
+++ b/doc/classes/AnimationNodeBlendSpace2D.xml
@@ -132,13 +132,13 @@
<member name="blend_mode" type="int" setter="set_blend_mode" getter="get_blend_mode" enum="AnimationNodeBlendSpace2D.BlendMode" default="0">
Controls the interpolation between animations. See [enum BlendMode] constants.
</member>
- <member name="max_space" type="Vector2" setter="set_max_space" getter="get_max_space" default="Vector2( 1, 1 )">
+ <member name="max_space" type="Vector2" setter="set_max_space" getter="get_max_space" default="Vector2(1, 1)">
The blend space's X and Y axes' upper limit for the points' position. See [method add_blend_point].
</member>
- <member name="min_space" type="Vector2" setter="set_min_space" getter="get_min_space" default="Vector2( -1, -1 )">
+ <member name="min_space" type="Vector2" setter="set_min_space" getter="get_min_space" default="Vector2(-1, -1)">
The blend space's X and Y axes' lower limit for the points' position. See [method add_blend_point].
</member>
- <member name="snap" type="Vector2" setter="set_snap" getter="get_snap" default="Vector2( 0.1, 0.1 )">
+ <member name="snap" type="Vector2" setter="set_snap" getter="get_snap" default="Vector2(0.1, 0.1)">
Position increment to snap to when moving a point.
</member>
<member name="x_label" type="String" setter="set_x_label" getter="get_x_label" default="&quot;x&quot;">
diff --git a/doc/classes/AnimationNodeBlendTree.xml b/doc/classes/AnimationNodeBlendTree.xml
index 8f87ce453f..a90e8647bb 100644
--- a/doc/classes/AnimationNodeBlendTree.xml
+++ b/doc/classes/AnimationNodeBlendTree.xml
@@ -17,7 +17,7 @@
</argument>
<argument index="1" name="node" type="AnimationNode">
</argument>
- <argument index="2" name="position" type="Vector2" default="Vector2( 0, 0 )">
+ <argument index="2" name="position" type="Vector2" default="Vector2(0, 0)">
</argument>
<description>
Adds an [AnimationNode] at the given [code]position[/code]. The [code]name[/code] is used to identify the created sub-node later.
@@ -107,7 +107,7 @@
</method>
</methods>
<members>
- <member name="graph_offset" type="Vector2" setter="set_graph_offset" getter="get_graph_offset" default="Vector2( 0, 0 )">
+ <member name="graph_offset" type="Vector2" setter="set_graph_offset" getter="get_graph_offset" default="Vector2(0, 0)">
The global offset of all sub-nodes.
</member>
</members>
diff --git a/doc/classes/AnimationNodeStateMachine.xml b/doc/classes/AnimationNodeStateMachine.xml
index e08e288c59..8e070142c4 100644
--- a/doc/classes/AnimationNodeStateMachine.xml
+++ b/doc/classes/AnimationNodeStateMachine.xml
@@ -28,7 +28,7 @@
</argument>
<argument index="1" name="node" type="AnimationNode">
</argument>
- <argument index="2" name="position" type="Vector2" default="Vector2( 0, 0 )">
+ <argument index="2" name="position" type="Vector2" default="Vector2(0, 0)">
</argument>
<description>
Adds a new node to the graph. The [code]position[/code] is used for display in the editor.
diff --git a/doc/classes/AnimationNodeStateMachineTransition.xml b/doc/classes/AnimationNodeStateMachineTransition.xml
index 2f0ebd7de6..7f07afecee 100644
--- a/doc/classes/AnimationNodeStateMachineTransition.xml
+++ b/doc/classes/AnimationNodeStateMachineTransition.xml
@@ -10,7 +10,7 @@
<methods>
</methods>
<members>
- <member name="advance_condition" type="StringName" setter="set_advance_condition" getter="get_advance_condition" default="@&quot;&quot;">
+ <member name="advance_condition" type="StringName" setter="set_advance_condition" getter="get_advance_condition" default="&amp;&quot;&quot;">
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]:
[codeblocks]
[gdscript]
diff --git a/doc/classes/AnimationPlayer.xml b/doc/classes/AnimationPlayer.xml
index 7696f36009..8a94eee54c 100644
--- a/doc/classes/AnimationPlayer.xml
+++ b/doc/classes/AnimationPlayer.xml
@@ -275,7 +275,8 @@
<argument index="1" name="new_name" type="StringName">
</argument>
<description>
- If the currently being played animation changes, this signal will notify of such change.
+ Emitted when a queued animation plays after the previous animation was finished. See [method queue].
+ [b]Note:[/b] The signal is not emitted when the animation is changed via [method play] or from [AnimationTree].
</description>
</signal>
<signal name="animation_finished">
diff --git a/doc/classes/AnimationTrackEditPlugin.xml b/doc/classes/AnimationTrackEditPlugin.xml
index 8490d48718..7b96808581 100644
--- a/doc/classes/AnimationTrackEditPlugin.xml
+++ b/doc/classes/AnimationTrackEditPlugin.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AnimationTrackEditPlugin" inherits="Reference" version="4.0">
+<class name="AnimationTrackEditPlugin" inherits="RefCounted" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/AnimationTree.xml b/doc/classes/AnimationTree.xml
index 2517941133..af7d8d73e8 100644
--- a/doc/classes/AnimationTree.xml
+++ b/doc/classes/AnimationTree.xml
@@ -21,10 +21,10 @@
</description>
</method>
<method name="get_root_motion_transform" qualifiers="const">
- <return type="Transform">
+ <return type="Transform3D">
</return>
<description>
- Retrieve the motion of the [member root_motion_track] as a [Transform] that can be used elsewhere. If [member root_motion_track] is not a path to a track of type [constant Animation.TYPE_TRANSFORM], returns an identity transformation.
+ Retrieve the motion of the [member root_motion_track] as a [Transform3D] that can be used elsewhere. If [member root_motion_track] is not a path to a track of type [constant Animation.TYPE_TRANSFORM3D], returns an identity transformation.
</description>
</method>
<method name="rename_parameter">
@@ -50,7 +50,7 @@
</member>
<member name="root_motion_track" type="NodePath" setter="set_root_motion_track" getter="get_root_motion_track" default="NodePath(&quot;&quot;)">
The path to the Animation track used for root motion. Paths must be valid scene-tree paths to a node, and must be specified starting from the parent node of the node that will reproduce the animation. To specify a track that controls properties or bones, append its name after the path, separated by [code]":"[/code]. For example, [code]"character/skeleton:ankle"[/code] or [code]"character/mesh:transform/local"[/code].
- If the track has type [constant Animation.TYPE_TRANSFORM], the transformation will be cancelled visually, and the animation will appear to stay in place.
+ If the track has type [constant Animation.TYPE_TRANSFORM3D], the transformation will be cancelled visually, and the animation will appear to stay in place.
</member>
<member name="tree_root" type="AnimationNode" setter="set_tree_root" getter="get_tree_root">
The root animation node of this [AnimationTree]. See [AnimationNode].
diff --git a/doc/classes/Area2D.xml b/doc/classes/Area2D.xml
index a1e522d146..f52c810ad2 100644
--- a/doc/classes/Area2D.xml
+++ b/doc/classes/Area2D.xml
@@ -54,14 +54,14 @@
The rate at which objects stop spinning in this area. Represents the angular velocity lost per second.
See [member ProjectSettings.physics/2d/default_angular_damp] for more details about damping.
</member>
- <member name="audio_bus_name" type="StringName" setter="set_audio_bus_name" getter="get_audio_bus_name" default="@&quot;Master&quot;">
+ <member name="audio_bus_name" type="StringName" setter="set_audio_bus_name" getter="get_audio_bus_name" default="&amp;&quot;Master&quot;">
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">
If [code]true[/code], the area's audio bus overrides the default audio bus.
</member>
- <member name="gravity" type="float" setter="set_gravity" getter="get_gravity" default="98.0">
- The area's gravity intensity (ranges from -1024 to 1024). This value multiplies the gravity vector. This is useful to alter the force of gravity without altering its direction.
+ <member name="gravity" type="float" setter="set_gravity" getter="get_gravity" default="980.0">
+ The area's gravity intensity (in pixels per second squared). This value multiplies the gravity vector. This is useful to alter the force of gravity without altering its direction.
</member>
<member name="gravity_distance_scale" type="float" setter="set_gravity_distance_scale" getter="get_gravity_distance_scale" default="0.0">
The falloff factor for point gravity. The greater the value, the faster gravity decreases with distance.
@@ -69,7 +69,7 @@
<member name="gravity_point" type="bool" setter="set_gravity_is_point" getter="is_gravity_a_point" default="false">
If [code]true[/code], gravity is calculated from a point (set via [member gravity_vec]). See also [member space_override].
</member>
- <member name="gravity_vec" type="Vector2" setter="set_gravity_vector" getter="get_gravity_vector" default="Vector2( 0, 1 )">
+ <member name="gravity_vec" type="Vector2" setter="set_gravity_vector" getter="get_gravity_vector" default="Vector2(0, 1)">
The area's gravity vector (not normalized). If gravity is a point (see [member gravity_point]), this will be the point of attraction.
</member>
<member name="linear_damp" type="float" setter="set_linear_damp" getter="get_linear_damp" default="0.1">
@@ -107,7 +107,7 @@
</description>
</signal>
<signal name="area_shape_entered">
- <argument index="0" name="area_id" type="int">
+ <argument index="0" name="area_rid" type="RID">
</argument>
<argument index="1" name="area" type="Area2D">
</argument>
@@ -124,7 +124,7 @@
</description>
</signal>
<signal name="area_shape_exited">
- <argument index="0" name="area_id" type="int">
+ <argument index="0" name="area_rid" type="RID">
</argument>
<argument index="1" name="area" type="Area2D">
</argument>
@@ -157,7 +157,7 @@
</description>
</signal>
<signal name="body_shape_entered">
- <argument index="0" name="body_id" type="int">
+ <argument index="0" name="body_rid" type="RID">
</argument>
<argument index="1" name="body" type="Node2D">
</argument>
@@ -174,7 +174,7 @@
</description>
</signal>
<signal name="body_shape_exited">
- <argument index="0" name="body_id" type="int">
+ <argument index="0" name="body_rid" type="RID">
</argument>
<argument index="1" name="body" type="Node2D">
</argument>
diff --git a/doc/classes/Area3D.xml b/doc/classes/Area3D.xml
index e69a89a836..cc31b6c203 100644
--- a/doc/classes/Area3D.xml
+++ b/doc/classes/Area3D.xml
@@ -52,14 +52,14 @@
The rate at which objects stop spinning in this area. Represents the angular velocity lost per second.
See [member ProjectSettings.physics/3d/default_angular_damp] for more details about damping.
</member>
- <member name="audio_bus_name" type="StringName" setter="set_audio_bus_name" getter="get_audio_bus_name" default="@&quot;Master&quot;">
+ <member name="audio_bus_name" type="StringName" setter="set_audio_bus_name" getter="get_audio_bus_name" default="&amp;&quot;Master&quot;">
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">
If [code]true[/code], the area's audio bus overrides the default audio bus.
</member>
<member name="gravity" type="float" setter="set_gravity" getter="get_gravity" default="9.8">
- The area's gravity intensity (ranges from -1024 to 1024). This value multiplies the gravity vector. This is useful to alter the force of gravity without altering its direction.
+ The area's gravity intensity (in meters per second squared). This value multiplies the gravity vector. This is useful to alter the force of gravity without altering its direction.
</member>
<member name="gravity_distance_scale" type="float" setter="set_gravity_distance_scale" getter="get_gravity_distance_scale" default="0.0">
The falloff factor for point gravity. The greater the value, the faster gravity decreases with distance.
@@ -67,7 +67,7 @@
<member name="gravity_point" type="bool" setter="set_gravity_is_point" getter="is_gravity_a_point" default="false">
If [code]true[/code], gravity is calculated from a point (set via [member gravity_vec]). See also [member space_override].
</member>
- <member name="gravity_vec" type="Vector3" setter="set_gravity_vector" getter="get_gravity_vector" default="Vector3( 0, -1, 0 )">
+ <member name="gravity_vec" type="Vector3" setter="set_gravity_vector" getter="get_gravity_vector" default="Vector3(0, -1, 0)">
The area's gravity vector (not normalized). If gravity is a point (see [member gravity_point]), this will be the point of attraction.
</member>
<member name="linear_damp" type="float" setter="set_linear_damp" getter="get_linear_damp" default="0.1">
@@ -89,7 +89,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="StringName" setter="set_reverb_bus" getter="get_reverb_bus" default="@&quot;Master&quot;">
+ <member name="reverb_bus_name" type="StringName" setter="set_reverb_bus" getter="get_reverb_bus" default="&amp;&quot;Master&quot;">
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">
@@ -117,7 +117,7 @@
</description>
</signal>
<signal name="area_shape_entered">
- <argument index="0" name="area_id" type="int">
+ <argument index="0" name="area_rid" type="RID">
</argument>
<argument index="1" name="area" type="Area3D">
</argument>
@@ -134,7 +134,7 @@
</description>
</signal>
<signal name="area_shape_exited">
- <argument index="0" name="area_id" type="int">
+ <argument index="0" name="area_rid" type="RID">
</argument>
<argument index="1" name="area" type="Area3D">
</argument>
@@ -167,7 +167,7 @@
</description>
</signal>
<signal name="body_shape_entered">
- <argument index="0" name="body_id" type="int">
+ <argument index="0" name="body_rid" type="RID">
</argument>
<argument index="1" name="body" type="Node3D">
</argument>
@@ -184,7 +184,7 @@
</description>
</signal>
<signal name="body_shape_exited">
- <argument index="0" name="body_id" type="int">
+ <argument index="0" name="body_rid" type="RID">
</argument>
<argument index="1" name="body" type="Node3D">
</argument>
diff --git a/doc/classes/Array.xml b/doc/classes/Array.xml
index 38b74cb436..543ec096c7 100644
--- a/doc/classes/Array.xml
+++ b/doc/classes/Array.xml
@@ -33,8 +33,8 @@
[/gdscript]
[csharp]
// Array concatenation is not possible with C# arrays, but is with Godot.Collections.Array.
- var array1 = new Godot.Collections.Array("One", 2);
- var array2 = new Godot.Collections.Array(3, "Four");
+ var array1 = new Godot.Collections.Array{"One", 2};
+ var array2 = new Godot.Collections.Array{3, "Four"};
GD.Print(array1 + array2); // Prints [One, 2, 3, Four]
[/csharp]
[/codeblocks]
@@ -258,6 +258,24 @@
[/codeblocks]
</description>
</method>
+ <method name="filter" qualifiers="const">
+ <return type="Array">
+ </return>
+ <argument index="0" name="method" type="Callable">
+ </argument>
+ <description>
+ Calls the provided [Callable] on each element in the array and returns a new array with the elements for which the method returned [code]true[/code].
+ The callable's method should take one [Variant] parameter (the current array element) and return a boolean value.
+ [codeblock]
+ func _ready():
+ print([1, 2, 3].filter(remove_1)) # Prints [2, 3].
+ print([1, 2, 3].filter(func(number): return number != 1)) # Same as above, but using lambda function.
+
+ func remove_1(number):
+ return number != 1
+ [/codeblock]
+ </description>
+ </method>
<method name="find" qualifiers="const">
<return type="int">
</return>
@@ -315,14 +333,14 @@
[gdscript]
# Will evaluate to `true`.
if 2 in [2, 4, 6, 8]:
- print("Containes!")
+ print("Contains!")
[/gdscript]
[csharp]
// As there is no "in" keyword in C#, you have to use Contains
var array = new Godot.Collections.Array{2, 4, 6, 8};
if (array.Contains(2))
{
- GD.Print("Containes!");
+ GD.Print("Contains!");
}
[/csharp]
[/codeblocks]
@@ -356,6 +374,24 @@
Returns [code]true[/code] if the array is empty.
</description>
</method>
+ <method name="map" qualifiers="const">
+ <return type="Array">
+ </return>
+ <argument index="0" name="method" type="Callable">
+ </argument>
+ <description>
+ Calls the provided [Callable] for each element in the array and returns a new array filled with values returned by the method.
+ The callable's method should take one [Variant] parameter (the current array element) and can return any [Variant].
+ [codeblock]
+ func _ready():
+ print([1, 2, 3].map(negate)) # Prints [-1, -2, -3].
+ print([1, 2, 3].map(func(number): return -number)) # Same as above, but using lambda function.
+
+ func negate(number):
+ return -number
+ [/codeblock]
+ </description>
+ </method>
<method name="max" qualifiers="const">
<return type="Variant">
</return>
@@ -468,6 +504,26 @@
[b]Note:[/b] On large arrays, this method is much slower than [method push_back] as it will reindex all the array's elements every time it's called. The larger the array, the slower [method push_front] will be.
</description>
</method>
+ <method name="reduce" qualifiers="const">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="method" type="Callable">
+ </argument>
+ <argument index="1" name="accum" type="Variant" default="null">
+ </argument>
+ <description>
+ Calls the provided [Callable] for each element in array and accumulates the result in [code]accum[/code].
+ The callable's method takes two arguments: the current value of [code]accum[/code] and the current array element. If [code]accum[/code] is [code]null[/code] (default value), the iteration will start from the second element, with the first one used as initial value of [code]accum[/code].
+ [codeblock]
+ func _ready():
+ print([1, 2, 3].reduce(sum, 10)) # Prints 16.
+ print([1, 2, 3].reduce(func(accum, number): return accum + number, 10)) # Same as above, but using lambda function.
+
+ func sum(accum, number):
+ return accum + number
+ [/codeblock]
+ </description>
+ </method>
<method name="remove">
<return type="void">
</return>
@@ -559,7 +615,7 @@
<argument index="0" name="func" type="Callable">
</argument>
<description>
- Sorts the array using a custom method. The custom method receives two arguments (a pair of elements from the array) and must return either [code]true[/code] or [code]false[/code].
+ Sorts the array using a custom method. The custom method receives two arguments (a pair of elements from the array) and must return either [code]true[/code] or [code]false[/code]. For two elements [code]a[/code] and [code]b[/code], if the given method returns [code]true[/code], element [code]b[/code] will be after element [code]a[/code] in the array.
[b]Note:[/b] you cannot randomize the return value as the heapsort algorithm expects a deterministic result. Doing so will result in unexpected behavior.
[codeblocks]
[gdscript]
diff --git a/doc/classes/ArrayMesh.xml b/doc/classes/ArrayMesh.xml
index 7c1c4656f8..1bbf9bcd93 100644
--- a/doc/classes/ArrayMesh.xml
+++ b/doc/classes/ArrayMesh.xml
@@ -66,7 +66,7 @@
</argument>
<argument index="1" name="arrays" type="Array">
</argument>
- <argument index="2" name="blend_shapes" type="Array" default="[ ]">
+ <argument index="2" name="blend_shapes" type="Array" default="[]">
</argument>
<argument index="3" name="lods" type="Dictionary" default="{
}">
@@ -77,7 +77,6 @@
Creates a new surface.
Surfaces are created to be rendered using a [code]primitive[/code], which may be any of the types defined in [enum Mesh.PrimitiveType]. (As a note, when using indices, it is recommended to only use points, lines or triangles.) [method Mesh.get_surface_count] will become the [code]surf_idx[/code] for this new surface.
The [code]arrays[/code] argument is an array of arrays. See [enum Mesh.ArrayType] for the values used in this array. For example, [code]arrays[0][/code] is the array of vertices. That first vertex sub-array is always required; the others are optional. Adding an index array puts this function into "index mode" where the vertex and other arrays become the sources of data and the index array defines the vertex order. All sub-arrays must have the same length as the vertex array or be empty, except for [constant Mesh.ARRAY_INDEX] if it is used.
- Adding an index array puts this function into "index mode" where the vertex and other arrays become the sources of data, and the index array defines the order of the vertices.
</description>
</method>
<method name="clear_blend_shapes">
@@ -113,7 +112,7 @@
<method name="lightmap_unwrap">
<return type="int" enum="Error">
</return>
- <argument index="0" name="transform" type="Transform">
+ <argument index="0" name="transform" type="Transform3D">
</argument>
<argument index="1" name="texel_size" type="float">
</argument>
@@ -222,7 +221,7 @@
<member name="blend_shape_mode" type="int" setter="set_blend_shape_mode" getter="get_blend_shape_mode" enum="Mesh.BlendShapeMode" default="1">
Sets the blend shape mode to one of [enum Mesh.BlendShapeMode].
</member>
- <member name="custom_aabb" type="AABB" setter="set_custom_aabb" getter="get_custom_aabb" default="AABB( 0, 0, 0, 0, 0, 0 )">
+ <member name="custom_aabb" type="AABB" setter="set_custom_aabb" getter="get_custom_aabb" default="AABB(0, 0, 0, 0, 0, 0)">
Overrides the [AABB] with one defined by user for use with frustum culling. Especially useful to avoid unexpected culling when using a shader to offset vertices.
</member>
<member name="shadow_mesh" type="ArrayMesh" setter="set_shadow_mesh" getter="get_shadow_mesh">
diff --git a/doc/classes/AtlasTexture.xml b/doc/classes/AtlasTexture.xml
index 9865319419..b49c0e4278 100644
--- a/doc/classes/AtlasTexture.xml
+++ b/doc/classes/AtlasTexture.xml
@@ -18,10 +18,10 @@
<member name="filter_clip" type="bool" setter="set_filter_clip" getter="has_filter_clip" default="false">
If [code]true[/code], clips the area outside of the region to avoid bleeding of the surrounding texture pixels.
</member>
- <member name="margin" type="Rect2" setter="set_margin" getter="get_margin" default="Rect2( 0, 0, 0, 0 )">
+ <member name="margin" type="Rect2" setter="set_margin" getter="get_margin" default="Rect2(0, 0, 0, 0)">
The margin around the region. The [Rect2]'s [member Rect2.size] parameter ("w" and "h" in the editor) resizes the texture so it fits within the margin.
</member>
- <member name="region" type="Rect2" setter="set_region" getter="get_region" default="Rect2( 0, 0, 0, 0 )">
+ <member name="region" type="Rect2" setter="set_region" getter="get_region" default="Rect2(0, 0, 0, 0)">
The AtlasTexture's used region.
</member>
</members>
diff --git a/doc/classes/AudioEffectCompressor.xml b/doc/classes/AudioEffectCompressor.xml
index 3117978d8a..4e924bcb65 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="StringName" setter="set_sidechain" getter="get_sidechain" default="@&quot;&quot;">
+ <member name="sidechain" type="StringName" setter="set_sidechain" getter="get_sidechain" default="&amp;&quot;&quot;">
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/AudioEffectInstance.xml b/doc/classes/AudioEffectInstance.xml
index dc76880a36..9ab6028901 100644
--- a/doc/classes/AudioEffectInstance.xml
+++ b/doc/classes/AudioEffectInstance.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioEffectInstance" inherits="Reference" version="4.0">
+<class name="AudioEffectInstance" inherits="RefCounted" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/AudioEffectPitchShift.xml b/doc/classes/AudioEffectPitchShift.xml
index afe364de63..9c28a01650 100644
--- a/doc/classes/AudioEffectPitchShift.xml
+++ b/doc/classes/AudioEffectPitchShift.xml
@@ -12,27 +12,34 @@
<methods>
</methods>
<members>
- <member name="fft_size" type="int" setter="set_fft_size" getter="get_fft_size" enum="AudioEffectPitchShift.FFT_Size" default="3">
+ <member name="fft_size" type="int" setter="set_fft_size" getter="get_fft_size" enum="AudioEffectPitchShift.FFTSize" default="3">
+ The size of the [url=https://en.wikipedia.org/wiki/Fast_Fourier_transform]Fast Fourier transform[/url] buffer. Higher values smooth out the effect over time, but have greater latency. The effects of this higher latency are especially noticeable on sounds that have sudden amplitude changes.
</member>
<member name="oversampling" type="int" setter="set_oversampling" getter="get_oversampling" default="4">
+ The oversampling factor to use. Higher values result in better quality, but are more demanding on the CPU and may cause audio cracking if the CPU can't keep up.
</member>
<member name="pitch_scale" type="float" setter="set_pitch_scale" getter="get_pitch_scale" default="1.0">
- Pitch value. Can range from 0 (-1 octave) to 16 (+16 octaves).
+ The pitch scale to use. [code]1.0[/code] is the default pitch and plays sounds unaltered. [member pitch_scale] can range from [code]0.0[/code] (infinitely low pitch, inaudible) to [code]16[/code] (16 times higher than the initial pitch).
</member>
</members>
<constants>
- <constant name="FFT_SIZE_256" value="0" enum="FFT_Size">
+ <constant name="FFT_SIZE_256" value="0" enum="FFTSize">
+ Use a buffer of 256 samples for the Fast Fourier transform. Lowest latency, but least stable over time.
</constant>
- <constant name="FFT_SIZE_512" value="1" enum="FFT_Size">
+ <constant name="FFT_SIZE_512" value="1" enum="FFTSize">
+ Use a buffer of 512 samples for the Fast Fourier transform. Low latency, but less stable over time.
</constant>
- <constant name="FFT_SIZE_1024" value="2" enum="FFT_Size">
+ <constant name="FFT_SIZE_1024" value="2" enum="FFTSize">
+ Use a buffer of 1024 samples for the Fast Fourier transform. This is a compromise between latency and stability over time.
</constant>
- <constant name="FFT_SIZE_2048" value="3" enum="FFT_Size">
+ <constant name="FFT_SIZE_2048" value="3" enum="FFTSize">
+ Use a buffer of 2048 samples for the Fast Fourier transform. High latency, but stable over time.
</constant>
- <constant name="FFT_SIZE_4096" value="4" enum="FFT_Size">
+ <constant name="FFT_SIZE_4096" value="4" enum="FFTSize">
+ Use a buffer of 4096 samples for the Fast Fourier transform. Highest latency, but most stable over time.
</constant>
- <constant name="FFT_SIZE_MAX" value="5" enum="FFT_Size">
- Represents the size of the [enum FFT_Size] enum.
+ <constant name="FFT_SIZE_MAX" value="5" enum="FFTSize">
+ Represents the size of the [enum FFTSize] enum.
</constant>
</constants>
</class>
diff --git a/doc/classes/AudioEffectSpectrumAnalyzer.xml b/doc/classes/AudioEffectSpectrumAnalyzer.xml
index 4c08b18f1d..10d29ff8ab 100644
--- a/doc/classes/AudioEffectSpectrumAnalyzer.xml
+++ b/doc/classes/AudioEffectSpectrumAnalyzer.xml
@@ -1,34 +1,46 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioEffectSpectrumAnalyzer" inherits="AudioEffect" version="4.0">
<brief_description>
+ Audio effect that can be used for real-time audio visualizations.
</brief_description>
<description>
+ This audio effect does not affect sound output, but can be used for real-time audio visualizations.
+ See also [AudioStreamGenerator] for procedurally generating sounds.
</description>
<tutorials>
+ <link title="https://godotengine.org/asset-library/asset/528">Audio Spectrum Demo</link>
+ <link title="https://godotengine.org/article/godot-32-will-get-new-audio-features">Godot 3.2 will get new audio features</link>
</tutorials>
<methods>
</methods>
<members>
<member name="buffer_length" type="float" setter="set_buffer_length" getter="get_buffer_length" default="2.0">
+ The length of the buffer to keep (in seconds). Higher values keep data around for longer, but require more memory.
</member>
- <member name="fft_size" type="int" setter="set_fft_size" getter="get_fft_size" enum="AudioEffectSpectrumAnalyzer.FFT_Size" default="2">
+ <member name="fft_size" type="int" setter="set_fft_size" getter="get_fft_size" enum="AudioEffectSpectrumAnalyzer.FFTSize" default="2">
+ The size of the [url=https://en.wikipedia.org/wiki/Fast_Fourier_transform]Fast Fourier transform[/url] buffer. Higher values smooth out the spectrum analysis over time, but have greater latency. The effects of this higher latency are especially noticeable with sudden amplitude changes.
</member>
<member name="tap_back_pos" type="float" setter="set_tap_back_pos" getter="get_tap_back_pos" default="0.01">
</member>
</members>
<constants>
- <constant name="FFT_SIZE_256" value="0" enum="FFT_Size">
+ <constant name="FFT_SIZE_256" value="0" enum="FFTSize">
+ Use a buffer of 256 samples for the Fast Fourier transform. Lowest latency, but least stable over time.
</constant>
- <constant name="FFT_SIZE_512" value="1" enum="FFT_Size">
+ <constant name="FFT_SIZE_512" value="1" enum="FFTSize">
+ Use a buffer of 512 samples for the Fast Fourier transform. Low latency, but less stable over time.
</constant>
- <constant name="FFT_SIZE_1024" value="2" enum="FFT_Size">
+ <constant name="FFT_SIZE_1024" value="2" enum="FFTSize">
+ Use a buffer of 1024 samples for the Fast Fourier transform. This is a compromise between latency and stability over time.
</constant>
- <constant name="FFT_SIZE_2048" value="3" enum="FFT_Size">
+ <constant name="FFT_SIZE_2048" value="3" enum="FFTSize">
+ Use a buffer of 2048 samples for the Fast Fourier transform. High latency, but stable over time.
</constant>
- <constant name="FFT_SIZE_4096" value="4" enum="FFT_Size">
+ <constant name="FFT_SIZE_4096" value="4" enum="FFTSize">
+ Use a buffer of 4096 samples for the Fast Fourier transform. Highest latency, but most stable over time.
</constant>
- <constant name="FFT_SIZE_MAX" value="5" enum="FFT_Size">
- Represents the size of the [enum FFT_Size] enum.
+ <constant name="FFT_SIZE_MAX" value="5" enum="FFTSize">
+ Represents the size of the [enum FFTSize] enum.
</constant>
</constants>
</class>
diff --git a/doc/classes/AudioStreamGenerator.xml b/doc/classes/AudioStreamGenerator.xml
index a273beb5af..8464bc8a85 100644
--- a/doc/classes/AudioStreamGenerator.xml
+++ b/doc/classes/AudioStreamGenerator.xml
@@ -1,18 +1,27 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioStreamGenerator" inherits="AudioStream" version="4.0">
<brief_description>
+ Audio stream that generates sounds procedurally.
</brief_description>
<description>
+ This audio stream does not play back sounds, but expects a script to generate audio data for it instead. See also [AudioStreamGeneratorPlayback].
+ See also [AudioEffectSpectrumAnalyzer] for performing real-time audio spectrum analysis.
+ [b]Note:[/b] Due to performance constraints, this class is best used from C# or from a compiled language via GDNative. If you still want to use this class from GDScript, consider using a lower [member mix_rate] such as 11,025 Hz or 22,050 Hz.
</description>
<tutorials>
<link title="Audio Generator Demo">https://godotengine.org/asset-library/asset/526</link>
+ <link title="https://godotengine.org/article/godot-32-will-get-new-audio-features">Godot 3.2 will get new audio features</link>
</tutorials>
<methods>
</methods>
<members>
<member name="buffer_length" type="float" setter="set_buffer_length" getter="get_buffer_length" default="0.5">
+ The length of the buffer to generate (in seconds). Lower values result in less latency, but require the script to generate audio data faster, resulting in increased CPU usage and more risk for audio cracking if the CPU can't keep up.
</member>
<member name="mix_rate" type="float" setter="set_mix_rate" getter="get_mix_rate" default="44100.0">
+ The sample rate to use (in Hz). Higher values are more demanding for the CPU to generate, but result in better quality.
+ In games, common sample rates in use are [code]11025[/code], [code]16000[/code], [code]22050[/code], [code]32000[/code], [code]44100[/code], and [code]48000[/code].
+ According to the [url=https://en.wikipedia.org/wiki/Nyquist%E2%80%93Shannon_sampling_theorem]Nyquist-Shannon sampling theorem[/url], there is no quality difference to human hearing when going past 40,000 Hz (since most humans can only hear up to ~20,000 Hz, often less). If you are generating lower-pitched sounds such as voices, lower sample rates such as [code]32000[/code] or [code]22050[/code] may be usable with no loss in quality.
</member>
</members>
<constants>
diff --git a/doc/classes/AudioStreamGeneratorPlayback.xml b/doc/classes/AudioStreamGeneratorPlayback.xml
index cd8e8735b6..503f72a048 100644
--- a/doc/classes/AudioStreamGeneratorPlayback.xml
+++ b/doc/classes/AudioStreamGeneratorPlayback.xml
@@ -1,11 +1,14 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioStreamGeneratorPlayback" inherits="AudioStreamPlaybackResampled" version="4.0">
<brief_description>
+ Plays back audio generated using [AudioStreamGenerator].
</brief_description>
<description>
+ This class is meant to be used with [AudioStreamGenerator] to play back the generated audio in real-time.
</description>
<tutorials>
- <link title="Audio generator demo project">https://github.com/godotengine/godot-demo-projects/tree/master/audio/generator</link>
+ <link title="Audio Generator Demo">https://godotengine.org/asset-library/asset/526</link>
+ <link title="https://godotengine.org/article/godot-32-will-get-new-audio-features">Godot 3.2 will get new audio features</link>
</tutorials>
<methods>
<method name="can_push_buffer" qualifiers="const">
@@ -14,18 +17,21 @@
<argument index="0" name="amount" type="int">
</argument>
<description>
+ Returns [code]true[/code] if a buffer of the size [code]amount[/code] can be pushed to the audio sample data buffer without overflowing it, [code]false[/code] otherwise.
</description>
</method>
<method name="clear_buffer">
<return type="void">
</return>
<description>
+ Clears the audio sample data buffer.
</description>
</method>
<method name="get_frames_available" qualifiers="const">
<return type="int">
</return>
<description>
+ Returns the number of audio data frames left to play. If this returned number reaches [code]0[/code], the audio will stop playing until frames are added again. Therefore, make sure your script can always generate and push new audio frames fast enough to avoid audio cracking.
</description>
</method>
<method name="get_skips" qualifiers="const">
@@ -40,6 +46,7 @@
<argument index="0" name="frames" type="PackedVector2Array">
</argument>
<description>
+ Pushes several audio data frames to the buffer. This is usually more efficient than [method push_frame] in C# and compiled languages via GDNative, but [method push_buffer] may be [i]less[/i] efficient in GDScript.
</description>
</method>
<method name="push_frame">
@@ -48,6 +55,7 @@
<argument index="0" name="frame" type="Vector2">
</argument>
<description>
+ Pushes a single audio data frame to the buffer. This is usually less efficient than [method push_buffer] in C# and compiled languages via GDNative, but [method push_frame] may be [i]more[/i] efficient in GDScript.
</description>
</method>
</methods>
diff --git a/doc/classes/AudioStreamPlayback.xml b/doc/classes/AudioStreamPlayback.xml
index da75ff206c..cb01aa75e8 100644
--- a/doc/classes/AudioStreamPlayback.xml
+++ b/doc/classes/AudioStreamPlayback.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioStreamPlayback" inherits="Reference" version="4.0">
+<class name="AudioStreamPlayback" inherits="RefCounted" version="4.0">
<brief_description>
Meta class for playing back audio.
</brief_description>
diff --git a/doc/classes/AudioStreamPlayer.xml b/doc/classes/AudioStreamPlayer.xml
index 55190c5f9f..7c7f7e0cea 100644
--- a/doc/classes/AudioStreamPlayer.xml
+++ b/doc/classes/AudioStreamPlayer.xml
@@ -5,6 +5,7 @@
</brief_description>
<description>
Plays an audio stream non-positionally.
+ To play audio positionally, use [AudioStreamPlayer2D] or [AudioStreamPlayer3D] instead of [AudioStreamPlayer].
</description>
<tutorials>
<link title="Audio streams">https://docs.godotengine.org/en/latest/tutorials/audio/audio_streams.html</link>
@@ -59,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="StringName" setter="set_bus" getter="get_bus" default="@&quot;Master&quot;">
+ <member name="bus" type="StringName" setter="set_bus" getter="get_bus" default="&amp;&quot;Master&quot;">
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 d8b9385736..b1e18ab550 100644
--- a/doc/classes/AudioStreamPlayer2D.xml
+++ b/doc/classes/AudioStreamPlayer2D.xml
@@ -1,10 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioStreamPlayer2D" inherits="Node2D" version="4.0">
<brief_description>
- Plays audio in 2D.
+ Plays positional sound in 2D space.
</brief_description>
<description>
Plays audio that dampens with distance from screen center.
+ See also [AudioStreamPlayer] to play a sound non-positionally.
+ [b]Note:[/b] Hiding an [AudioStreamPlayer2D] node does not disable its audio output. To temporarily disable an [AudioStreamPlayer2D]'s audio output, set [member volume_db] to a very low value like [code]-100[/code] (which isn't audible to human hearing).
</description>
<tutorials>
<link title="Audio streams">https://docs.godotengine.org/en/latest/tutorials/audio/audio_streams.html</link>
@@ -60,7 +62,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="StringName" setter="set_bus" getter="get_bus" default="@&quot;Master&quot;">
+ <member name="bus" type="StringName" setter="set_bus" getter="get_bus" default="&amp;&quot;Master&quot;">
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 7a8c4b2cc7..3bd20b4b9b 100644
--- a/doc/classes/AudioStreamPlayer3D.xml
+++ b/doc/classes/AudioStreamPlayer3D.xml
@@ -1,11 +1,13 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioStreamPlayer3D" inherits="Node3D" version="4.0">
<brief_description>
- Plays 3D sound in 3D space.
+ Plays positional sound in 3D space.
</brief_description>
<description>
Plays a sound effect with directed sound effects, dampens with distance if needed, generates effect of hearable position in space. For greater realism, a low-pass filter is automatically applied to distant sounds. This can be disabled by setting [member attenuation_filter_cutoff_hz] to [code]20500[/code].
By default, audio is heard from the camera position. This can be changed by adding a [Listener3D] node to the scene and enabling it by calling [method Listener3D.make_current] on it.
+ See also [AudioStreamPlayer] to play a sound non-positionally.
+ [b]Note:[/b] Hiding an [AudioStreamPlayer3D] node does not disable its audio output. To temporarily disable an [AudioStreamPlayer3D]'s audio output, set [member unit_db] to a very low value like [code]-100[/code] (which isn't audible to human hearing).
</description>
<tutorials>
<link title="Audio streams">https://docs.godotengine.org/en/latest/tutorials/audio/audio_streams.html</link>
@@ -67,7 +69,7 @@
<member name="autoplay" type="bool" setter="set_autoplay" getter="is_autoplay_enabled" default="false">
If [code]true[/code], audio plays when the AudioStreamPlayer3D node is added to scene tree.
</member>
- <member name="bus" type="StringName" setter="set_bus" getter="get_bus" default="@&quot;Master&quot;">
+ <member name="bus" type="StringName" setter="set_bus" getter="get_bus" default="&amp;&quot;Master&quot;">
The 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">
@@ -106,7 +108,7 @@
<member name="unit_db" type="float" setter="set_unit_db" getter="get_unit_db" default="0.0">
The base sound level unaffected by dampening, in decibels.
</member>
- <member name="unit_size" type="float" setter="set_unit_size" getter="get_unit_size" default="1.0">
+ <member name="unit_size" type="float" setter="set_unit_size" getter="get_unit_size" default="10.0">
The factor for the attenuation effect. Higher values make the sound audible over a larger distance.
</member>
</members>
diff --git a/doc/classes/AudioStreamSample.xml b/doc/classes/AudioStreamSample.xml
index c12e1bd05c..5a0e71a0f8 100644
--- a/doc/classes/AudioStreamSample.xml
+++ b/doc/classes/AudioStreamSample.xml
@@ -5,7 +5,7 @@
</brief_description>
<description>
AudioStreamSample stores sound samples loaded from WAV files. To play the stored sound, use an [AudioStreamPlayer] (for non-positional audio) or [AudioStreamPlayer2D]/[AudioStreamPlayer3D] (for positional audio). The sound can be looped.
- This class can also be used to store dynamically-generated PCM audio data.
+ This class can also be used to store dynamically-generated PCM audio data. See also [AudioStreamGenerator] for procedural audio generation.
</description>
<tutorials>
</tutorials>
@@ -22,7 +22,7 @@
</method>
</methods>
<members>
- <member name="data" type="PackedByteArray" setter="set_data" getter="get_data" default="PackedByteArray( )">
+ <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>
@@ -39,7 +39,9 @@
The loop mode. This information will be imported automatically from the WAV file if present. See [enum LoopMode] constants for values.
</member>
<member name="mix_rate" type="int" setter="set_mix_rate" getter="get_mix_rate" default="44100">
- The sample rate for mixing this audio.
+ The sample rate for mixing this audio. Higher values require more storage space, but result in better quality.
+ In games, common sample rates in use are [code]11025[/code], [code]16000[/code], [code]22050[/code], [code]32000[/code], [code]44100[/code], and [code]48000[/code].
+ According to the [url=https://en.wikipedia.org/wiki/Nyquist%E2%80%93Shannon_sampling_theorem]Nyquist-Shannon sampling theorem[/url], there is no quality difference to human hearing when going past 40,000 Hz (since most humans can only hear up to ~20,000 Hz, often less). If you are using lower-pitched sounds such as voices, lower sample rates such as [code]32000[/code] or [code]22050[/code] may be usable with no loss in quality.
</member>
<member name="stereo" type="bool" setter="set_stereo" getter="is_stereo" default="false">
If [code]true[/code], audio is stereo.
diff --git a/doc/classes/BackBufferCopy.xml b/doc/classes/BackBufferCopy.xml
index 9a70b8f20c..55ee573811 100644
--- a/doc/classes/BackBufferCopy.xml
+++ b/doc/classes/BackBufferCopy.xml
@@ -15,7 +15,7 @@
<member name="copy_mode" type="int" setter="set_copy_mode" getter="get_copy_mode" enum="BackBufferCopy.CopyMode" default="1">
Buffer mode. See [enum CopyMode] constants.
</member>
- <member name="rect" type="Rect2" setter="set_rect" getter="get_rect" default="Rect2( -100, -100, 200, 200 )">
+ <member name="rect" type="Rect2" setter="set_rect" getter="get_rect" default="Rect2(-100, -100, 200, 200)">
The area covered by the BackBufferCopy. Only used if [member copy_mode] is [constant COPY_MODE_RECT].
</member>
</members>
diff --git a/doc/classes/BaseMaterial3D.xml b/doc/classes/BaseMaterial3D.xml
index 0a7b4c5dab..abe06bc7e1 100644
--- a/doc/classes/BaseMaterial3D.xml
+++ b/doc/classes/BaseMaterial3D.xml
@@ -72,7 +72,7 @@
</method>
</methods>
<members>
- <member name="albedo_color" type="Color" setter="set_albedo" getter="get_albedo" default="Color( 1, 1, 1, 1 )">
+ <member name="albedo_color" type="Color" setter="set_albedo" getter="get_albedo" default="Color(1, 1, 1, 1)">
The material's base color.
</member>
<member name="albedo_tex_force_srgb" type="bool" setter="set_flag" getter="get_flag" default="false">
@@ -117,7 +117,7 @@
<member name="ao_texture_channel" type="int" setter="set_ao_texture_channel" getter="get_ao_texture_channel" enum="BaseMaterial3D.TextureChannel" default="0">
Specifies the channel of the [member ao_texture] in which the ambient occlusion information is stored. This is useful when you store the information for multiple effects in a single texture. For example if you stored metallic in the red channel, roughness in the blue, and ambient occlusion in the green you could reduce the number of textures you use.
</member>
- <member name="backlight" type="Color" setter="set_backlight" getter="get_backlight" default="Color( 0, 0, 0, 1 )">
+ <member name="backlight" type="Color" setter="set_backlight" getter="get_backlight" default="Color(0, 0, 0, 1)">
The color used by the backlight effect. Represents the light passing through an object.
</member>
<member name="backlight_enabled" type="bool" setter="set_feature" getter="get_feature" default="false">
@@ -195,11 +195,11 @@
<member name="distance_fade_mode" type="int" setter="set_distance_fade" getter="get_distance_fade" enum="BaseMaterial3D.DistanceFadeMode" default="0">
Specifies which type of fade to use. Can be any of the [enum DistanceFadeMode]s.
</member>
- <member name="emission" type="Color" setter="set_emission" getter="get_emission" default="Color( 0, 0, 0, 1 )">
+ <member name="emission" type="Color" setter="set_emission" getter="get_emission" default="Color(0, 0, 0, 1)">
The emitted light's color. See [member emission_enabled].
</member>
<member name="emission_enabled" type="bool" setter="set_feature" getter="get_feature" default="false">
- If [code]true[/code], the body emits light. Emitting light makes the object appear brighter. The object can also cast light on other objects if a [GIProbe] is used and this object is used in baked lighting.
+ If [code]true[/code], the body emits light. Emitting light makes the object appear brighter. The object can also cast light on other objects if a [VoxelGI] is used and this object is used in baked lighting.
</member>
<member name="emission_energy" type="float" setter="set_emission_energy" getter="get_emission_energy" default="1.0">
The emitted light's strength. See [member emission_enabled].
@@ -345,7 +345,7 @@
</member>
<member name="subsurf_scatter_transmittance_boost" type="float" setter="set_transmittance_boost" getter="get_transmittance_boost" default="0.0">
</member>
- <member name="subsurf_scatter_transmittance_color" type="Color" setter="set_transmittance_color" getter="get_transmittance_color" default="Color( 1, 1, 1, 1 )">
+ <member name="subsurf_scatter_transmittance_color" type="Color" setter="set_transmittance_color" getter="get_transmittance_color" default="Color(1, 1, 1, 1)">
</member>
<member name="subsurf_scatter_transmittance_curve" type="float" setter="set_transmittance_curve" getter="get_transmittance_curve" default="1.0">
</member>
@@ -370,10 +370,10 @@
If [code]true[/code], render point size can be changed.
[b]Note:[/b] this is only effective for objects whose geometry is point-based rather than triangle-based. See also [member point_size].
</member>
- <member name="uv1_offset" type="Vector3" setter="set_uv1_offset" getter="get_uv1_offset" default="Vector3( 0, 0, 0 )">
+ <member name="uv1_offset" type="Vector3" setter="set_uv1_offset" getter="get_uv1_offset" default="Vector3(0, 0, 0)">
How much to offset the [code]UV[/code] coordinates. This amount will be added to [code]UV[/code] in the vertex function. This can be used to offset a texture.
</member>
- <member name="uv1_scale" type="Vector3" setter="set_uv1_scale" getter="get_uv1_scale" default="Vector3( 1, 1, 1 )">
+ <member name="uv1_scale" type="Vector3" setter="set_uv1_scale" getter="get_uv1_scale" default="Vector3(1, 1, 1)">
How much to scale the [code]UV[/code] coordinates. This is multiplied by [code]UV[/code] in the vertex function.
</member>
<member name="uv1_triplanar" type="bool" setter="set_flag" getter="get_flag" default="false">
@@ -385,10 +385,10 @@
<member name="uv1_world_triplanar" type="bool" setter="set_flag" getter="get_flag" default="false">
If [code]true[/code], triplanar mapping for [code]UV[/code] is calculated in world space rather than object local space. See also [member uv1_triplanar].
</member>
- <member name="uv2_offset" type="Vector3" setter="set_uv2_offset" getter="get_uv2_offset" default="Vector3( 0, 0, 0 )">
+ <member name="uv2_offset" type="Vector3" setter="set_uv2_offset" getter="get_uv2_offset" default="Vector3(0, 0, 0)">
How much to offset the [code]UV2[/code] coordinates. This amount will be added to [code]UV2[/code] in the vertex function. This can be used to offset a texture.
</member>
- <member name="uv2_scale" type="Vector3" setter="set_uv2_scale" getter="get_uv2_scale" default="Vector3( 1, 1, 1 )">
+ <member name="uv2_scale" type="Vector3" setter="set_uv2_scale" getter="get_uv2_scale" default="Vector3(1, 1, 1)">
How much to scale the [code]UV2[/code] coordinates. This is multiplied by [code]UV2[/code] in the vertex function.
</member>
<member name="uv2_triplanar" type="bool" setter="set_flag" getter="get_flag" default="false">
@@ -671,10 +671,7 @@
<constant name="DIFFUSE_LAMBERT_WRAP" value="2" enum="DiffuseMode">
Extends Lambert to cover more than 90 degrees when roughness increases.
</constant>
- <constant name="DIFFUSE_OREN_NAYAR" value="3" enum="DiffuseMode">
- Attempts to use roughness to emulate microsurfacing.
- </constant>
- <constant name="DIFFUSE_TOON" value="4" enum="DiffuseMode">
+ <constant name="DIFFUSE_TOON" value="3" enum="DiffuseMode">
Uses a hard cut for lighting, with smoothing affected by roughness.
</constant>
<constant name="SPECULAR_SCHLICK_GGX" value="0" enum="SpecularMode">
diff --git a/doc/classes/Basis.xml b/doc/classes/Basis.xml
index 55ae58ee3a..bd1abe914d 100644
--- a/doc/classes/Basis.xml
+++ b/doc/classes/Basis.xml
@@ -4,7 +4,7 @@
3×3 matrix datatype.
</brief_description>
<description>
- 3×3 matrix used for 3D rotation and scale. Almost always used as an orthogonal basis for a Transform.
+ 3×3 matrix used for 3D rotation and scale. Almost always used as an orthogonal basis for a [Transform3D].
Contains 3 vector fields X, Y and Z as its columns, which are typically interpreted as the local basis vectors of a transformation. For such use, it is composed of a scaling and a rotation matrix, in that order (M = R.S).
Can also be accessed as array of 3D vectors. These vectors are normally orthogonal to each other, but are not necessarily normalized (due to scaling).
For more information, read the "Matrices and transforms" documentation article.
@@ -53,13 +53,13 @@
</argument>
<description>
Constructs a pure rotation basis matrix from the given Euler angles (in the YXZ convention: when *composing*, first Y, then X, and Z last), given in the vector format as (X angle, Y angle, Z angle).
- Consider using the [Quat] constructor instead, which uses a quaternion instead of Euler angles.
+ Consider using the [Quaternion] constructor instead, which uses a quaternion instead of Euler angles.
</description>
</method>
<method name="Basis" qualifiers="constructor">
<return type="Basis">
</return>
- <argument index="0" name="from" type="Quat">
+ <argument index="0" name="from" type="Quaternion">
</argument>
<description>
Constructs a pure rotation basis matrix from the given quaternion.
@@ -91,7 +91,7 @@
</return>
<description>
Returns the basis's rotation in the form of Euler angles (in the YXZ convention: when decomposing, first Z, then X, and Y last). The returned vector contains the rotation angles in the format (X angle, Y angle, Z angle).
- Consider using the [method get_rotation_quat] method instead, which returns a [Quat] quaternion instead of Euler angles.
+ Consider using the [method get_rotation_quaternion] method instead, which returns a [Quaternion] quaternion instead of Euler angles.
</description>
</method>
<method name="get_orthogonal_index" qualifiers="const">
@@ -101,8 +101,8 @@
This function considers a discretization of rotations into 24 points on unit sphere, lying along the vectors (x,y,z) with each component being either -1, 0, or 1, and returns the index of the point best representing the orientation of the object. It is mainly used by the [GridMap] editor. For further details, refer to the Godot source code.
</description>
</method>
- <method name="get_rotation_quat" qualifiers="const">
- <return type="Quat">
+ <method name="get_rotation_quaternion" qualifiers="const">
+ <return type="Quaternion">
</return>
<description>
Returns the basis's rotation in the form of a quaternion. See [method get_euler] if you need Euler angles, but keep in mind quaternions should generally be preferred to Euler angles.
@@ -155,6 +155,24 @@
<description>
</description>
</method>
+ <method name="operator *" qualifiers="operator">
+ <return type="Basis">
+ </return>
+ <argument index="0" name="right" type="float">
+ </argument>
+ <description>
+ This operator multiplies all components of the [Basis], which scales it uniformly.
+ </description>
+ </method>
+ <method name="operator *" qualifiers="operator">
+ <return type="Basis">
+ </return>
+ <argument index="0" name="right" type="int">
+ </argument>
+ <description>
+ This operator multiplies all components of the [Basis], which scales it uniformly.
+ </description>
+ </method>
<method name="operator ==" qualifiers="operator">
<return type="bool">
</return>
@@ -245,28 +263,28 @@
</method>
</methods>
<members>
- <member name="x" type="Vector3" setter="" getter="" default="Vector3( 1, 0, 0 )">
+ <member name="x" type="Vector3" setter="" getter="" default="Vector3(1, 0, 0)">
The basis matrix's X vector (column 0). Equivalent to array index [code]0[/code].
</member>
- <member name="y" type="Vector3" setter="" getter="" default="Vector3( 0, 1, 0 )">
+ <member name="y" type="Vector3" setter="" getter="" default="Vector3(0, 1, 0)">
The basis matrix's Y vector (column 1). Equivalent to array index [code]1[/code].
</member>
- <member name="z" type="Vector3" setter="" getter="" default="Vector3( 0, 0, 1 )">
+ <member name="z" type="Vector3" setter="" getter="" default="Vector3(0, 0, 1)">
The basis matrix's Z vector (column 2). Equivalent to array index [code]2[/code].
</member>
</members>
<constants>
- <constant name="IDENTITY" value="Basis( 1, 0, 0, 0, 1, 0, 0, 0, 1 )">
+ <constant name="IDENTITY" value="Basis(1, 0, 0, 0, 1, 0, 0, 0, 1)">
The identity basis, with no rotation or scaling applied.
This is identical to calling [code]Basis()[/code] without any parameters. This constant can be used to make your code clearer, and for consistency with C#.
</constant>
- <constant name="FLIP_X" value="Basis( -1, 0, 0, 0, 1, 0, 0, 0, 1 )">
+ <constant name="FLIP_X" value="Basis(-1, 0, 0, 0, 1, 0, 0, 0, 1)">
The basis that will flip something along the X axis when used in a transformation.
</constant>
- <constant name="FLIP_Y" value="Basis( 1, 0, 0, 0, -1, 0, 0, 0, 1 )">
+ <constant name="FLIP_Y" value="Basis(1, 0, 0, 0, -1, 0, 0, 0, 1)">
The basis that will flip something along the Y axis when used in a transformation.
</constant>
- <constant name="FLIP_Z" value="Basis( 1, 0, 0, 0, 1, 0, 0, 0, -1 )">
+ <constant name="FLIP_Z" value="Basis(1, 0, 0, 0, 1, 0, 0, 0, -1)">
The basis that will flip something along the Z axis when used in a transformation.
</constant>
</constants>
diff --git a/doc/classes/BitMap.xml b/doc/classes/BitMap.xml
index 27ead07e6f..83e598d2ba 100644
--- a/doc/classes/BitMap.xml
+++ b/doc/classes/BitMap.xml
@@ -71,6 +71,12 @@
<argument index="1" name="epsilon" type="float" default="2.0">
</argument>
<description>
+ Creates an [Array] of polygons covering a rectangular portion of the bitmap. It uses a marching squares algorithm, followed by Ramer-Douglas-Peucker (RDP) reduction of the number of vertices. Each polygon is described as a [PackedVector2Array] of its vertices.
+ To get polygons covering the whole bitmap, pass:
+ [codeblock]
+ Rect2(Vector2(), get_size())
+ [/codeblock]
+ [code]epsilon[/code] is passed to RDP to control how accurately the polygons cover the bitmap: a lower [code]epsilon[/code] corresponds to more points in the polygons.
</description>
</method>
<method name="set_bit">
diff --git a/doc/classes/Bone2D.xml b/doc/classes/Bone2D.xml
index 910d488dfd..b8d5544d59 100644
--- a/doc/classes/Bone2D.xml
+++ b/doc/classes/Bone2D.xml
@@ -19,6 +19,28 @@
Stores the node's current transforms in [member rest].
</description>
</method>
+ <method name="get_autocalculate_length_and_angle" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns whether this [code]Bone2D[/code] node is going to autocalculate its length and bone angle using its first [code]Bone2D[/code] child node, if one exists. If there are no [code]Bone2D[/code] children, then it cannot autocalculate these values and will print a warning.
+ </description>
+ </method>
+ <method name="get_bone_angle" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Returns the angle of the bone in the [code]Bone2D[/code] node.
+ [b]Note:[/b] This is different from the [code]Bone2D[/code]'s rotation. The bone angle is the rotation of the bone shown by the [code]Bone2D[/code] gizmo, and because [code]Bone2D[/code] bones are based on positions, this can vary from the actual rotation of the [code]Bone2D[/code] node.
+ </description>
+ </method>
+ <method name="get_default_length" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Deprecated. Please use [code]get_length[/code] instead.
+ </description>
+ </method>
<method name="get_index_in_skeleton" qualifiers="const">
<return type="int">
</return>
@@ -26,6 +48,13 @@
Returns the node's index as part of the entire skeleton. See [Skeleton2D].
</description>
</method>
+ <method name="get_length" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Returns the length of the bone in the [code]Bone2D[/code] node.
+ </description>
+ </method>
<method name="get_skeleton_rest" qualifiers="const">
<return type="Transform2D">
</return>
@@ -33,12 +62,46 @@
Returns the node's [member rest] [code]Transform2D[/code] if it doesn't have a parent, or its rest pose relative to its parent.
</description>
</method>
+ <method name="set_autocalculate_length_and_angle">
+ <return type="void">
+ </return>
+ <argument index="0" name="auto_calculate" type="bool">
+ </argument>
+ <description>
+ When set to [code]true[/code], the [code]Bone2D[/code] node will attempt to automatically calculate the bone angle and length using the first child [code]Bone2D[/code] node, if one exists. If none exist, the [code]Bone2D[/code] cannot automatically calculate these values and will print a warning.
+ </description>
+ </method>
+ <method name="set_bone_angle">
+ <return type="void">
+ </return>
+ <argument index="0" name="angle" type="float">
+ </argument>
+ <description>
+ Sets the bone angle for the [code]Bone2D[/code] node. This is typically set to the rotation from the [code]Bone2D[/code] node to a child [code]Bone2D[/code] node.
+ [b]Note:[/b] This is different from the [code]Bone2D[/code]'s rotation. The bone angle is the rotation of the bone shown by the [code]Bone2D[/code] gizmo, and because [code]Bone2D[/code] bones are based on positions, this can vary from the actual rotation of the [code]Bone2D[/code] node.
+ </description>
+ </method>
+ <method name="set_default_length">
+ <return type="void">
+ </return>
+ <argument index="0" name="default_length" type="float">
+ </argument>
+ <description>
+ Deprecated. Please use [code]set_length[/code] instead.
+ </description>
+ </method>
+ <method name="set_length">
+ <return type="void">
+ </return>
+ <argument index="0" name="length" type="float">
+ </argument>
+ <description>
+ Sets the length of the bone in the [code]Bone2D[/code] node.
+ </description>
+ </method>
</methods>
<members>
- <member name="default_length" type="float" setter="set_default_length" getter="get_default_length" default="16.0">
- Length of the bone's representation drawn in the editor's viewport in pixels.
- </member>
- <member name="rest" type="Transform2D" setter="set_rest" getter="get_rest" default="Transform2D( 0, 0, 0, 0, 0, 0 )">
+ <member name="rest" type="Transform2D" setter="set_rest" getter="get_rest" default="Transform2D(0, 0, 0, 0, 0, 0)">
Rest transform of the bone. You can reset the node's transforms to this value using [method apply_rest].
</member>
</members>
diff --git a/doc/classes/BoxMesh.xml b/doc/classes/BoxMesh.xml
index 1404477b46..dda5e2f1e5 100644
--- a/doc/classes/BoxMesh.xml
+++ b/doc/classes/BoxMesh.xml
@@ -13,7 +13,7 @@
<methods>
</methods>
<members>
- <member name="size" type="Vector3" setter="set_size" getter="get_size" default="Vector3( 2, 2, 2 )">
+ <member name="size" type="Vector3" setter="set_size" getter="get_size" default="Vector3(2, 2, 2)">
The box's width, height and depth.
</member>
<member name="subdivide_depth" type="int" setter="set_subdivide_depth" getter="get_subdivide_depth" default="0">
diff --git a/doc/classes/BoxShape3D.xml b/doc/classes/BoxShape3D.xml
index f5051413ce..5704de905b 100644
--- a/doc/classes/BoxShape3D.xml
+++ b/doc/classes/BoxShape3D.xml
@@ -14,7 +14,7 @@
<methods>
</methods>
<members>
- <member name="size" type="Vector3" setter="set_size" getter="get_size" default="Vector3( 2, 2, 2 )">
+ <member name="size" type="Vector3" setter="set_size" getter="get_size" default="Vector3(2, 2, 2)">
The box's width, height and depth.
</member>
</members>
diff --git a/doc/classes/Button.xml b/doc/classes/Button.xml
index 51c35b15ce..c9078a4de5 100644
--- a/doc/classes/Button.xml
+++ b/doc/classes/Button.xml
@@ -116,22 +116,22 @@
<theme_item name="font" type="Font">
[Font] of the [Button]'s text.
</theme_item>
- <theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )">
+ <theme_item name="font_color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
Default text [Color] of the [Button].
</theme_item>
- <theme_item name="font_disabled_color" type="Color" default="Color( 0.9, 0.9, 0.9, 0.2 )">
+ <theme_item name="font_disabled_color" type="Color" default="Color(0.9, 0.9, 0.9, 0.2)">
Text [Color] used when the [Button] is disabled.
</theme_item>
- <theme_item name="font_hover_color" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )">
+ <theme_item name="font_hover_color" type="Color" default="Color(0.94, 0.94, 0.94, 1)">
Text [Color] used when the [Button] is being hovered.
</theme_item>
- <theme_item name="font_hover_pressed_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ <theme_item name="font_hover_pressed_color" type="Color" default="Color(1, 1, 1, 1)">
Text [Color] used when the [Button] is being hovered and pressed.
</theme_item>
- <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ <theme_item name="font_outline_color" type="Color" default="Color(1, 1, 1, 1)">
The tint of text outline of the [Button].
</theme_item>
- <theme_item name="font_pressed_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ <theme_item name="font_pressed_color" type="Color" default="Color(1, 1, 1, 1)">
Text [Color] used when the [Button] is being pressed.
</theme_item>
<theme_item name="font_size" type="int">
@@ -143,19 +143,19 @@
<theme_item name="hseparation" type="int" default="2">
The horizontal space between [Button]'s icon and text.
</theme_item>
- <theme_item name="icon_disabled_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ <theme_item name="icon_disabled_color" type="Color" default="Color(1, 1, 1, 1)">
Icon modulate [Color] used when the [Button] is disabled.
</theme_item>
- <theme_item name="icon_hover_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ <theme_item name="icon_hover_color" type="Color" default="Color(1, 1, 1, 1)">
Icon modulate [Color] used when the [Button] is being hovered.
</theme_item>
- <theme_item name="icon_hover_pressed_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ <theme_item name="icon_hover_pressed_color" type="Color" default="Color(1, 1, 1, 1)">
Icon modulate [Color] used when the [Button] is being hovered and pressed.
</theme_item>
- <theme_item name="icon_normal_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ <theme_item name="icon_normal_color" type="Color" default="Color(1, 1, 1, 1)">
Default icon modulate [Color] of the [Button].
</theme_item>
- <theme_item name="icon_pressed_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ <theme_item name="icon_pressed_color" type="Color" default="Color(1, 1, 1, 1)">
Icon modulate [Color] used when the [Button] is being pressed.
</theme_item>
<theme_item name="normal" type="StyleBox">
diff --git a/doc/classes/ButtonGroup.xml b/doc/classes/ButtonGroup.xml
index 5aa2d699a8..0b31352611 100644
--- a/doc/classes/ButtonGroup.xml
+++ b/doc/classes/ButtonGroup.xml
@@ -28,6 +28,15 @@
<members>
<member name="resource_local_to_scene" type="bool" setter="set_local_to_scene" getter="is_local_to_scene" override="true" default="true" />
</members>
+ <signals>
+ <signal name="pressed">
+ <argument index="0" name="button" type="Object">
+ </argument>
+ <description>
+ Emitted when one of the buttons of the group is pressed.
+ </description>
+ </signal>
+ </signals>
<constants>
</constants>
</class>
diff --git a/doc/classes/CPUParticles2D.xml b/doc/classes/CPUParticles2D.xml
index aa9f99a31e..9620e9abd1 100644
--- a/doc/classes/CPUParticles2D.xml
+++ b/doc/classes/CPUParticles2D.xml
@@ -148,7 +148,7 @@
<member name="anim_speed_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
Animation speed randomness ratio.
</member>
- <member name="color" type="Color" setter="set_color" getter="get_color" default="Color( 1, 1, 1, 1 )">
+ <member name="color" type="Color" setter="set_color" getter="get_color" default="Color(1, 1, 1, 1)">
Each particle's initial color. If [member texture] is defined, it will be multiplied by this color.
</member>
<member name="color_ramp" type="Gradient" setter="set_color_ramp" getter="get_color_ramp">
@@ -163,7 +163,7 @@
<member name="damping_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
Damping randomness ratio.
</member>
- <member name="direction" type="Vector2" setter="set_direction" getter="get_direction" default="Vector2( 1, 0 )">
+ <member name="direction" type="Vector2" setter="set_direction" getter="get_direction" default="Vector2(1, 0)">
Unit vector specifying the particles' emission direction.
</member>
<member name="draw_order" type="int" setter="set_draw_order" getter="get_draw_order" enum="CPUParticles2D.DrawOrder" default="0">
@@ -199,7 +199,7 @@
<member name="fract_delta" type="bool" setter="set_fractional_delta" getter="get_fractional_delta" default="true">
If [code]true[/code], results in fractional delta calculation which has a smoother particles display effect.
</member>
- <member name="gravity" type="Vector2" setter="set_gravity" getter="get_gravity" default="Vector2( 0, 98 )">
+ <member name="gravity" type="Vector2" setter="set_gravity" getter="get_gravity" default="Vector2(0, 980)">
Gravity applied to every particle.
</member>
<member name="hue_variation" type="float" setter="set_param" getter="get_param" default="0.0">
diff --git a/doc/classes/CPUParticles3D.xml b/doc/classes/CPUParticles3D.xml
index 0512efa8c2..7509775d20 100644
--- a/doc/classes/CPUParticles3D.xml
+++ b/doc/classes/CPUParticles3D.xml
@@ -147,7 +147,7 @@
<member name="anim_speed_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
Animation speed randomness ratio.
</member>
- <member name="color" type="Color" setter="set_color" getter="get_color" default="Color( 1, 1, 1, 1 )">
+ <member name="color" type="Color" setter="set_color" getter="get_color" default="Color(1, 1, 1, 1)">
Unused for 3D particles.
</member>
<member name="color_ramp" type="Gradient" setter="set_color_ramp" getter="get_color_ramp">
@@ -162,7 +162,7 @@
<member name="damping_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
Damping randomness ratio.
</member>
- <member name="direction" type="Vector3" setter="set_direction" getter="get_direction" default="Vector3( 1, 0, 0 )">
+ <member name="direction" type="Vector3" setter="set_direction" getter="get_direction" default="Vector3(1, 0, 0)">
Unit vector specifying the particles' emission direction.
</member>
<member name="draw_order" type="int" setter="set_draw_order" getter="get_draw_order" enum="CPUParticles3D.DrawOrder" default="0">
@@ -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="PackedColorArray" setter="set_emission_colors" getter="get_emission_colors" default="PackedColorArray( )">
+ <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="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="PackedVector3Array" setter="set_emission_points" getter="get_emission_points" default="PackedVector3Array( )">
+ <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="CPUParticles3D.EmissionShape" default="0">
@@ -201,7 +201,7 @@
<member name="fract_delta" type="bool" setter="set_fractional_delta" getter="get_fractional_delta" default="true">
If [code]true[/code], results in fractional delta calculation which has a smoother particles display effect.
</member>
- <member name="gravity" type="Vector3" setter="set_gravity" getter="get_gravity" default="Vector3( 0, -9.8, 0 )">
+ <member name="gravity" type="Vector3" setter="set_gravity" getter="get_gravity" default="Vector3(0, -9.8, 0)">
Gravity applied to every particle.
</member>
<member name="hue_variation" type="float" setter="set_param" getter="get_param" default="0.0">
diff --git a/doc/classes/Callable.xml b/doc/classes/Callable.xml
index 0cfbd0270c..cbab1a8f50 100644
--- a/doc/classes/Callable.xml
+++ b/doc/classes/Callable.xml
@@ -151,6 +151,22 @@
Returns [code]true[/code] if both [Callable]s invoke the same custom target.
</description>
</method>
+ <method name="rpc" qualifiers="vararg const">
+ <return type="void">
+ </return>
+ <description>
+ Perform an RPC (Remote Procedure Call). This is used for multiplayer and is normally not available unless the function being called has been marked as [i]RPC[/i]. Calling it on unsupported functions will result in an error.
+ </description>
+ </method>
+ <method name="rpc_id" qualifiers="vararg const">
+ <return type="void">
+ </return>
+ <argument index="0" name="peer_id" type="int">
+ </argument>
+ <description>
+ Perform an RPC (Remote Procedure Call) on a specific peer ID (see multiplayer documentation for reference). This is used for multiplayer and is normally not available unless the function being called has been marked as [i]RPC[/i]. Calling it on unsupported functions will result in an error.
+ </description>
+ </method>
<method name="unbind" qualifiers="const">
<return type="Callable">
</return>
diff --git a/doc/classes/CallbackTweener.xml b/doc/classes/CallbackTweener.xml
new file mode 100644
index 0000000000..8ac285c3df
--- /dev/null
+++ b/doc/classes/CallbackTweener.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="CallbackTweener" inherits="Tweener" version="4.0">
+ <brief_description>
+ Calls the specified method after optional delay.
+ </brief_description>
+ <description>
+ [CallbackTweener] is used to call a method in a tweening sequence. See [method Tween.tween_callback] for more usage information.
+ [b]Note:[/b] [method Tween.tween_callback] is the only correct way to create [CallbackTweener]. Any [CallbackTweener] created manually will not function correctly.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="set_delay">
+ <return type="CallbackTweener">
+ </return>
+ <argument index="0" name="delay" type="float">
+ </argument>
+ <description>
+ Makes the callback call delayed by given time in seconds. Example:
+ [codeblock]
+ var tween = get_tree().create_tween()
+ tween.tween_callback(queue_free).set_delay(2) #this will call queue_free() after 2 seconds
+ [/codeblock]
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/Camera2D.xml b/doc/classes/Camera2D.xml
index d40567bdcb..bf1a9cc929 100644
--- a/doc/classes/Camera2D.xml
+++ b/doc/classes/Camera2D.xml
@@ -165,7 +165,7 @@
<member name="limit_top" type="int" setter="set_limit" getter="get_limit" default="-10000000">
Top scroll limit in pixels. The camera stops moving when reaching this value.
</member>
- <member name="offset" type="Vector2" setter="set_offset" getter="get_offset" default="Vector2( 0, 0 )">
+ <member name="offset" type="Vector2" setter="set_offset" getter="get_offset" default="Vector2(0, 0)">
The camera's offset, useful for looking around or camera shake animations.
</member>
<member name="process_callback" type="int" setter="set_process_callback" getter="get_process_callback" enum="Camera2D.Camera2DProcessCallback" default="1">
@@ -180,7 +180,7 @@
<member name="smoothing_speed" type="float" setter="set_follow_smoothing" getter="get_follow_smoothing" default="5.0">
Speed in pixels per second of the camera's smoothing effect when [member smoothing_enabled] is [code]true[/code].
</member>
- <member name="zoom" type="Vector2" setter="set_zoom" getter="get_zoom" default="Vector2( 1, 1 )">
+ <member name="zoom" type="Vector2" setter="set_zoom" getter="get_zoom" default="Vector2(1, 1)">
The camera's zoom relative to the viewport. Values larger than [code]Vector2(1, 1)[/code] zoom out and smaller values zoom in. For an example, use [code]Vector2(0.5, 0.5)[/code] for a 2× zoom-in, and [code]Vector2(4, 4)[/code] for a 4× zoom-out.
</member>
</members>
diff --git a/doc/classes/Camera3D.xml b/doc/classes/Camera3D.xml
index 9f1d6d8e31..afba478a20 100644
--- a/doc/classes/Camera3D.xml
+++ b/doc/classes/Camera3D.xml
@@ -27,7 +27,7 @@
</description>
</method>
<method name="get_camera_transform" qualifiers="const">
- <return type="Transform">
+ <return type="Transform3D">
</return>
<description>
Gets the camera transform. Subclassed cameras such as [ClippedCamera3D] may provide different transforms than the [Node] transform.
@@ -55,10 +55,19 @@
<argument index="0" name="world_point" type="Vector3">
</argument>
<description>
- Returns [code]true[/code] if the given position is behind the camera.
+ Returns [code]true[/code] if the given position is behind the camera (the blue part of the linked diagram). [url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/camera3d_position_frustum.png]See this diagram[/url] for an overview of position query methods.
[b]Note:[/b] A position which returns [code]false[/code] may still be outside the camera's field of view.
</description>
</method>
+ <method name="is_position_in_frustum" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="world_point" type="Vector3">
+ </argument>
+ <description>
+ Returns [code]true[/code] if the given position is inside the camera's frustum (the green part of the linked diagram). [url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/camera3d_position_frustum.png]See this diagram[/url] for an overview of position query methods.
+ </description>
+ </method>
<method name="make_current">
<return type="void">
</return>
@@ -200,7 +209,7 @@
- ~107.51 degrees in a 16:9 viewport
- ~121.63 degrees in a 21:9 viewport
</member>
- <member name="frustum_offset" type="Vector2" setter="set_frustum_offset" getter="get_frustum_offset" default="Vector2( 0, 0 )">
+ <member name="frustum_offset" type="Vector2" setter="set_frustum_offset" getter="get_frustum_offset" default="Vector2(0, 0)">
The camera's frustum offset. This can be changed from the default to create "tilted frustum" effects such as [url=https://zdoom.org/wiki/Y-shearing]Y-shearing[/url].
</member>
<member name="h_offset" type="float" setter="set_h_offset" getter="get_h_offset" default="0.0">
diff --git a/doc/classes/CameraFeed.xml b/doc/classes/CameraFeed.xml
index 4fc124592f..fc7dcd3772 100644
--- a/doc/classes/CameraFeed.xml
+++ b/doc/classes/CameraFeed.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CameraFeed" inherits="Reference" version="4.0">
+<class name="CameraFeed" inherits="RefCounted" version="4.0">
<brief_description>
A camera feed gives you access to a single physical camera attached to your device.
</brief_description>
diff --git a/doc/classes/CanvasItem.xml b/doc/classes/CanvasItem.xml
index 87b157db4e..d0950ae741 100644
--- a/doc/classes/CanvasItem.xml
+++ b/doc/classes/CanvasItem.xml
@@ -24,6 +24,21 @@
Overridable function called by the engine (if defined) to draw the canvas item.
</description>
</method>
+ <method name="draw_animation_slice">
+ <return type="void">
+ </return>
+ <argument index="0" name="animation_length" type="float">
+ </argument>
+ <argument index="1" name="slice_begin" type="float">
+ </argument>
+ <argument index="2" name="slice_end" type="float">
+ </argument>
+ <argument index="3" name="offset" type="float" default="0.0">
+ </argument>
+ <description>
+ Subsequent drawing commands will be ignored unless they fall within the specified animation slice. This is a faster way to implement animations that loop on background rather than redrawing constantly.
+ </description>
+ </method>
<method name="draw_arc">
<return type="void">
</return>
@@ -60,11 +75,11 @@
</argument>
<argument index="4" name="size" type="int" default="-1">
</argument>
- <argument index="5" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )">
+ <argument index="5" name="modulate" type="Color" default="Color(1, 1, 1, 1)">
</argument>
<argument index="6" name="outline_size" type="int" default="0">
</argument>
- <argument index="7" name="outline_modulate" type="Color" default="Color( 1, 1, 1, 0 )">
+ <argument index="7" name="outline_modulate" type="Color" default="Color(1, 1, 1, 0)">
</argument>
<description>
Draws a string character using a custom font. Returns the advance, depending on the character width and kerning with an optional next character.
@@ -90,7 +105,7 @@
</argument>
<argument index="1" name="color" type="Color">
</argument>
- <argument index="2" name="uvs" type="PackedVector2Array" default="PackedVector2Array( )">
+ <argument index="2" name="uvs" type="PackedVector2Array" default="PackedVector2Array()">
</argument>
<argument index="3" name="texture" type="Texture2D" default="null">
</argument>
@@ -98,6 +113,13 @@
Draws a colored polygon of any amount of points, convex or concave.
</description>
</method>
+ <method name="draw_end_animation">
+ <return type="void">
+ </return>
+ <description>
+ After submitting all animations slices via [method draw_animation_slice], this function can be used to revert drawing to its default state (all subsequent drawing commands will be visible). If you don't care about this particular use case, usage of this function after submitting the slices is not required.
+ </description>
+ </method>
<method name="draw_line">
<return type="void">
</return>
@@ -120,9 +142,9 @@
</argument>
<argument index="1" name="texture" type="Texture2D">
</argument>
- <argument index="2" name="transform" type="Transform2D" default="Transform2D( 1, 0, 0, 1, 0, 0 )">
+ <argument index="2" name="transform" type="Transform2D" default="Transform2D(1, 0, 0, 1, 0, 0)">
</argument>
- <argument index="3" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )">
+ <argument index="3" name="modulate" type="Color" default="Color(1, 1, 1, 1)">
</argument>
<description>
Draws a [Mesh] in 2D, using the provided texture. See [MeshInstance2D] for related documentation.
@@ -171,11 +193,11 @@
</argument>
<argument index="6" name="size" type="int" default="-1">
</argument>
- <argument index="7" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )">
+ <argument index="7" name="modulate" type="Color" default="Color(1, 1, 1, 1)">
</argument>
<argument index="8" name="outline_size" type="int" default="0">
</argument>
- <argument index="9" name="outline_modulate" type="Color" default="Color( 1, 1, 1, 0 )">
+ <argument index="9" name="outline_modulate" type="Color" default="Color(1, 1, 1, 0)">
</argument>
<argument index="10" name="flags" type="int" default="51">
</argument>
@@ -201,7 +223,7 @@
</argument>
<argument index="1" name="colors" type="PackedColorArray">
</argument>
- <argument index="2" name="uvs" type="PackedVector2Array" default="PackedVector2Array( )">
+ <argument index="2" name="uvs" type="PackedVector2Array" default="PackedVector2Array()">
</argument>
<argument index="3" name="texture" type="Texture2D" default="null">
</argument>
@@ -279,7 +301,7 @@
</argument>
<argument index="1" name="rotation" type="float" default="0.0">
</argument>
- <argument index="2" name="scale" type="Vector2" default="Vector2( 1, 1 )">
+ <argument index="2" name="scale" type="Vector2" default="Vector2(1, 1)">
</argument>
<description>
Sets a custom transform for drawing via components. Anything drawn afterwards will be transformed by this.
@@ -309,11 +331,11 @@
</argument>
<argument index="5" name="size" type="int" default="-1">
</argument>
- <argument index="6" name="modulate" 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="outline_size" type="int" default="0">
</argument>
- <argument index="8" name="outline_modulate" type="Color" default="Color( 1, 1, 1, 0 )">
+ <argument index="8" name="outline_modulate" type="Color" default="Color(1, 1, 1, 0)">
</argument>
<argument index="9" name="flags" type="int" default="3">
</argument>
@@ -359,7 +381,7 @@
</argument>
<argument index="1" name="position" type="Vector2">
</argument>
- <argument index="2" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )">
+ <argument index="2" name="modulate" type="Color" default="Color(1, 1, 1, 1)">
</argument>
<description>
Draws a texture at a given position.
@@ -374,7 +396,7 @@
</argument>
<argument index="2" name="tile" type="bool">
</argument>
- <argument index="3" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )">
+ <argument index="3" name="modulate" type="Color" default="Color(1, 1, 1, 1)">
</argument>
<argument index="4" name="transpose" type="bool" default="false">
</argument>
@@ -391,7 +413,7 @@
</argument>
<argument index="2" name="src_rect" type="Rect2">
</argument>
- <argument index="3" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )">
+ <argument index="3" name="modulate" type="Color" default="Color(1, 1, 1, 1)">
</argument>
<argument index="4" name="transpose" type="bool" default="false">
</argument>
@@ -573,10 +595,10 @@
<member name="material" type="Material" setter="set_material" getter="get_material">
The material applied to textures on this [CanvasItem].
</member>
- <member name="modulate" type="Color" setter="set_modulate" getter="get_modulate" default="Color( 1, 1, 1, 1 )">
+ <member name="modulate" type="Color" setter="set_modulate" getter="get_modulate" default="Color(1, 1, 1, 1)">
The color applied to textures on this [CanvasItem].
</member>
- <member name="self_modulate" type="Color" setter="set_self_modulate" getter="get_self_modulate" default="Color( 1, 1, 1, 1 )">
+ <member name="self_modulate" type="Color" setter="set_self_modulate" getter="get_self_modulate" default="Color(1, 1, 1, 1)">
The color applied to textures on this [CanvasItem]. This is not inherited by children [CanvasItem]s.
</member>
<member name="show_behind_parent" type="bool" setter="set_draw_behind_parent" getter="is_draw_behind_parent_enabled" default="false">
diff --git a/doc/classes/CanvasLayer.xml b/doc/classes/CanvasLayer.xml
index 9d952cdba3..f4c04d7bca 100644
--- a/doc/classes/CanvasLayer.xml
+++ b/doc/classes/CanvasLayer.xml
@@ -33,7 +33,7 @@
<member name="layer" type="int" setter="set_layer" getter="get_layer" default="1">
Layer index for draw order. Lower values are drawn first.
</member>
- <member name="offset" type="Vector2" setter="set_offset" getter="get_offset" default="Vector2( 0, 0 )">
+ <member name="offset" type="Vector2" setter="set_offset" getter="get_offset" default="Vector2(0, 0)">
The layer's base offset.
</member>
<member name="rotation" type="float" setter="set_rotation" getter="get_rotation" default="0.0">
@@ -42,10 +42,10 @@
<member name="rotation_degrees" type="float" setter="set_rotation_degrees" getter="get_rotation_degrees" default="0.0">
The layer's rotation in degrees.
</member>
- <member name="scale" type="Vector2" setter="set_scale" getter="get_scale" default="Vector2( 1, 1 )">
+ <member name="scale" type="Vector2" setter="set_scale" getter="get_scale" default="Vector2(1, 1)">
The layer's scale.
</member>
- <member name="transform" type="Transform2D" setter="set_transform" getter="get_transform" default="Transform2D( 1, 0, 0, 1, 0, 0 )">
+ <member name="transform" type="Transform2D" setter="set_transform" getter="get_transform" default="Transform2D(1, 0, 0, 1, 0, 0)">
The layer's transform.
</member>
</members>
diff --git a/doc/classes/CanvasModulate.xml b/doc/classes/CanvasModulate.xml
index 19f8912cd8..3540fa423f 100644
--- a/doc/classes/CanvasModulate.xml
+++ b/doc/classes/CanvasModulate.xml
@@ -11,7 +11,7 @@
<methods>
</methods>
<members>
- <member name="color" type="Color" setter="set_color" getter="get_color" default="Color( 1, 1, 1, 1 )">
+ <member name="color" type="Color" setter="set_color" getter="get_color" default="Color(1, 1, 1, 1)">
The tint color to apply.
</member>
</members>
diff --git a/doc/classes/CanvasTexture.xml b/doc/classes/CanvasTexture.xml
index 0ca132746b..f7147d9f0b 100644
--- a/doc/classes/CanvasTexture.xml
+++ b/doc/classes/CanvasTexture.xml
@@ -13,7 +13,7 @@
</member>
<member name="normal_texture" type="Texture2D" setter="set_normal_texture" getter="get_normal_texture">
</member>
- <member name="specular_color" type="Color" setter="set_specular_color" getter="get_specular_color" default="Color( 1, 1, 1, 1 )">
+ <member name="specular_color" type="Color" setter="set_specular_color" getter="get_specular_color" default="Color(1, 1, 1, 1)">
</member>
<member name="specular_shininess" type="float" setter="set_specular_shininess" getter="get_specular_shininess" default="1.0">
</member>
diff --git a/doc/classes/CharFXTransform.xml b/doc/classes/CharFXTransform.xml
index 850098f741..1f63b530b1 100644
--- a/doc/classes/CharFXTransform.xml
+++ b/doc/classes/CharFXTransform.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CharFXTransform" inherits="Reference" version="4.0">
+<class name="CharFXTransform" inherits="RefCounted" version="4.0">
<brief_description>
Controls how an individual character will be displayed in a [RichTextEffect].
</brief_description>
@@ -13,7 +13,7 @@
<methods>
</methods>
<members>
- <member name="color" type="Color" setter="set_color" getter="get_color" default="Color( 0, 0, 0, 1 )">
+ <member name="color" type="Color" setter="set_color" getter="get_color" default="Color(0, 0, 0, 1)">
The color the character will be drawn with.
</member>
<member name="elapsed_time" type="float" setter="set_elapsed_time" getter="get_elapsed_time" default="0.0">
@@ -33,13 +33,13 @@
<member name="glyph_index" type="int" setter="set_glyph_index" getter="get_glyph_index" default="0">
Font specific glyph index.
</member>
- <member name="offset" type="Vector2" setter="set_offset" getter="get_offset" default="Vector2( 0, 0 )">
+ <member name="offset" type="Vector2" setter="set_offset" getter="get_offset" default="Vector2(0, 0)">
The position offset the character will be drawn with (in pixels).
</member>
<member name="outline" type="bool" setter="set_outline" getter="is_outline" default="false">
- If [code]ture[/code], FX transform is called for outline drawing. Setting this property won't affect drawing.
+ If [code]true[/code], FX transform is called for outline drawing. Setting this property won't affect drawing.
</member>
- <member name="range" type="Vector2i" setter="set_range" getter="get_range" default="Vector2i( 0, 0 )">
+ <member name="range" type="Vector2i" setter="set_range" getter="get_range" default="Vector2i(0, 0)">
Absolute character range in the string, corresponding to the glyph. Setting this property won't affect drawing.
</member>
<member name="visible" type="bool" setter="set_visibility" getter="is_visible" default="true">
diff --git a/doc/classes/CharacterBody2D.xml b/doc/classes/CharacterBody2D.xml
new file mode 100644
index 0000000000..fbe5c34d7d
--- /dev/null
+++ b/doc/classes/CharacterBody2D.xml
@@ -0,0 +1,132 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="CharacterBody2D" inherits="PhysicsBody2D" version="4.0">
+ <brief_description>
+ Character body 2D node.
+ </brief_description>
+ <description>
+ Character bodies are special types of bodies that are meant to be user-controlled. They are not affected by physics at all; to other types of bodies, such as a rigid body, these are the same as a static body. However, they have two main uses:
+ [b]Kinematic characters:[/b] Character bodies have an API for moving objects with walls and slopes detection ([method move_and_slide] method), in addition to collision detection (also done with [method PhysicsBody3D.move_and_collide]). This makes them really useful to implement characters that move in specific ways and collide with the world, but don't require advanced physics.
+ [b]Kinematic motion:[/b] Character bodies can also be used for kinematic motion (same functionality as [member StaticBody3D.kinematic_motion] when enabled), which allows them to be moved by code and push other bodies on their path.
+ </description>
+ <tutorials>
+ <link title="Kinematic character (2D)">https://docs.godotengine.org/en/latest/tutorials/physics/kinematic_character_2d.html</link>
+ <link title="Using KinematicBody2D">https://docs.godotengine.org/en/latest/tutorials/physics/using_kinematic_body_2d.html</link>
+ <link title="2D Kinematic Character Demo">https://godotengine.org/asset-library/asset/113</link>
+ <link title="2D Platformer Demo">https://godotengine.org/asset-library/asset/120</link>
+ </tutorials>
+ <methods>
+ <method name="get_floor_normal" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ Returns the surface normal of the floor at the last collision point. Only valid after calling [method move_and_slide] and when [method is_on_floor] returns [code]true[/code].
+ </description>
+ </method>
+ <method name="get_floor_velocity" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ Returns the linear velocity of the floor at the last collision point. Only valid after calling [method move_and_slide] and when [method is_on_floor] returns [code]true[/code].
+ </description>
+ </method>
+ <method name="get_slide_collision">
+ <return type="KinematicCollision2D">
+ </return>
+ <argument index="0" name="slide_idx" type="int">
+ </argument>
+ <description>
+ Returns a [KinematicCollision2D], which contains information about a collision that occurred during the last call to [method move_and_slide]. Since the body can collide several times in a single call to [method move_and_slide], you must specify the index of the collision in the range 0 to ([method get_slide_count] - 1).
+ [b]Example usage:[/b]
+ [codeblocks]
+ [gdscript]
+ for i in get_slide_count():
+ var collision = get_slide_collision(i)
+ print("Collided with: ", collision.collider.name)
+ [/gdscript]
+ [csharp]
+ for (int i = 0; i &lt; GetSlideCount(); i++)
+ {
+ KinematicCollision2D collision = GetSlideCollision(i);
+ GD.Print("Collided with: ", (collision.Collider as Node).Name);
+ }
+ [/csharp]
+ [/codeblocks]
+ </description>
+ </method>
+ <method name="get_slide_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns the number of times the body collided and changed direction during the last call to [method move_and_slide].
+ </description>
+ </method>
+ <method name="is_on_ceiling" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns [code]true[/code] if the body collided with the ceiling on the last call of [method move_and_slide]. Otherwise, returns [code]false[/code].
+ </description>
+ </method>
+ <method name="is_on_floor" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns [code]true[/code] if the body collided with the floor on the last call of [method move_and_slide]. Otherwise, returns [code]false[/code].
+ </description>
+ </method>
+ <method name="is_on_wall" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns [code]true[/code] if the body collided with a wall on the last call of [method move_and_slide]. Otherwise, returns [code]false[/code].
+ </description>
+ </method>
+ <method name="move_and_slide">
+ <return type="void">
+ </return>
+ <description>
+ Moves the body based on [member linear_velocity]. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a [CharacterBody2D] or [RigidBody2D], it will also be affected by the motion of the other body. You can use this to make moving and rotating platforms, or to make nodes push other nodes.
+ This method should be used in [method Node._physics_process] (or in a method called by [method Node._physics_process]), as it uses the physics step's [code]delta[/code] value automatically in calculations. Otherwise, the simulation will run at an incorrect speed.
+ Modifies [member linear_velocity] if a slide collision occurred. To get detailed information about collisions that occurred, use [method get_slide_collision].
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="collision/safe_margin" type="float" setter="set_safe_margin" getter="get_safe_margin" default="0.08">
+ Extra margin used for collision recovery when calling [method move_and_slide].
+ If the body is at least this close to another body, it will consider them to be colliding and will be pushed away before performing the actual motion.
+ A higher value means it's more flexible for detecting collision, which helps with consistently detecting walls and floors.
+ A lower value forces the collision algorithm to use more exact detection, so it can be used in cases that specifically require precision, e.g at very low scale to avoid visible jittering, or for stability with a stack of character bodies.
+ </member>
+ <member name="floor_max_angle" type="float" setter="set_floor_max_angle" getter="get_floor_max_angle" default="0.785398">
+ Maximum angle (in radians) where a slope is still considered a floor (or a ceiling), rather than a wall, when calling [method move_and_slide]. The default value equals 45 degrees.
+ </member>
+ <member name="floor_max_angle_degrees" type="float" setter="set_floor_max_angle_degrees" getter="get_floor_max_angle_degrees" default="45.0">
+ Maximum angle (in degrees) where a slope is still considered a floor (or a ceiling), rather than a wall, when calling [method move_and_slide].
+ </member>
+ <member name="infinite_inertia" type="bool" setter="set_infinite_inertia_enabled" getter="is_infinite_inertia_enabled" default="true">
+ If [code]true[/code], the body will be able to push [RigidBody2D] nodes when calling [method move_and_slide], but it also won't detect any collisions with them. If [code]false[/code], it will interact with [RigidBody2D] nodes like with [StaticBody2D].
+ </member>
+ <member name="linear_velocity" type="Vector2" setter="set_linear_velocity" getter="get_linear_velocity" default="Vector2(0, 0)">
+ Current velocity vector in pixels per second, used and modified during calls to [method move_and_slide].
+ </member>
+ <member name="max_slides" type="int" setter="set_max_slides" getter="get_max_slides" default="4">
+ Maximum number of times the body can change direction before it stops when calling [method move_and_slide].
+ </member>
+ <member name="motion/sync_to_physics" type="bool" setter="set_sync_to_physics" getter="is_sync_to_physics_enabled" default="false">
+ If [code]true[/code], the body's movement will be synchronized to the physics frame. This is useful when animating movement via [AnimationPlayer], for example on moving platforms. Do [b]not[/b] use together with [method move_and_slide] or [method PhysicsBody2D.move_and_collide] functions.
+ </member>
+ <member name="snap" type="Vector2" setter="set_snap" getter="get_snap" default="Vector2(0, 0)">
+ When set to a value different from [code]Vector2(0, 0)[/code], the body is kept attached to slopes when calling [method move_and_slide].
+ As long as the [code]snap[/code] vector is in contact with the ground, the body will remain attached to the surface. This means you must disable snap in order to jump, for example. You can do this by setting [code]snap[/code] to [code]Vector2(0, 0)[/code].
+ </member>
+ <member name="stop_on_slope" type="bool" setter="set_stop_on_slope_enabled" getter="is_stop_on_slope_enabled" default="false">
+ If [code]true[/code], the body will not slide on slopes when you include gravity in [code]linear_velocity[/code] when calling [method move_and_slide] and the body is standing still.
+ </member>
+ <member name="up_direction" type="Vector2" setter="set_up_direction" getter="get_up_direction" default="Vector2(0, -1)">
+ Direction vector used to determine what is a wall and what is a floor (or a ceiling), rather than a wall, when calling [method move_and_slide]. Defaults to [code]Vector2.UP[/code]. If set to [code]Vector2(0, 0)[/code], everything is considered a wall. This is useful for topdown games.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/CharacterBody3D.xml b/doc/classes/CharacterBody3D.xml
new file mode 100644
index 0000000000..f6c3d68b3c
--- /dev/null
+++ b/doc/classes/CharacterBody3D.xml
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="CharacterBody3D" inherits="PhysicsBody3D" version="4.0">
+ <brief_description>
+ Character body 3D node.
+ </brief_description>
+ <description>
+ Character bodies are special types of bodies that are meant to be user-controlled. They are not affected by physics at all; to other types of bodies, such as a rigid body, these are the same as a static body. However, they have two main uses:
+ [b]Kinematic characters:[/b] Character bodies have an API for moving objects with walls and slopes detection ([method move_and_slide] method), in addition to collision detection (also done with [method PhysicsBody3D.move_and_collide]). This makes them really useful to implement characters that move in specific ways and collide with the world, but don't require advanced physics.
+ [b]Kinematic motion:[/b] Character bodies can also be used for kinematic motion (same functionality as [member StaticBody3D.kinematic_motion] when enabled), which allows them to be moved by code and push other bodies on their path.
+ </description>
+ <tutorials>
+ <link title="Kinematic character (2D)">https://docs.godotengine.org/en/latest/tutorials/physics/kinematic_character_2d.html</link>
+ <link title="3D Kinematic Character Demo">https://godotengine.org/asset-library/asset/126</link>
+ <link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link>
+ <link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link>
+ <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
+ </tutorials>
+ <methods>
+ <method name="get_floor_normal" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <description>
+ Returns the surface normal of the floor at the last collision point. Only valid after calling [method move_and_slide] and when [method is_on_floor] returns [code]true[/code].
+ </description>
+ </method>
+ <method name="get_floor_velocity" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <description>
+ Returns the linear velocity of the floor at the last collision point. Only valid after calling [method move_and_slide] and when [method is_on_floor] returns [code]true[/code].
+ </description>
+ </method>
+ <method name="get_slide_collision">
+ <return type="KinematicCollision3D">
+ </return>
+ <argument index="0" name="slide_idx" type="int">
+ </argument>
+ <description>
+ Returns a [KinematicCollision3D], which contains information about a collision that occurred during the last call to [method move_and_slide]. Since the body can collide several times in a single call to [method move_and_slide], you must specify the index of the collision in the range 0 to ([method get_slide_count] - 1).
+ </description>
+ </method>
+ <method name="get_slide_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns the number of times the body collided and changed direction during the last call to [method move_and_slide].
+ </description>
+ </method>
+ <method name="is_on_ceiling" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns [code]true[/code] if the body collided with the ceiling on the last call of [method move_and_slide]. Otherwise, returns [code]false[/code].
+ </description>
+ </method>
+ <method name="is_on_floor" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns [code]true[/code] if the body collided with the floor on the last call of [method move_and_slide]. Otherwise, returns [code]false[/code].
+ </description>
+ </method>
+ <method name="is_on_wall" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns [code]true[/code] if the body collided with a wall on the last call of [method move_and_slide]. Otherwise, returns [code]false[/code].
+ </description>
+ </method>
+ <method name="move_and_slide">
+ <return type="void">
+ </return>
+ <description>
+ Moves the body based on [member linear_velocity]. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a [CharacterBody3D] or [RigidBody3D], it will also be affected by the motion of the other body. You can use this to make moving and rotating platforms, or to make nodes push other nodes.
+ This method should be used in [method Node._physics_process] (or in a method called by [method Node._physics_process]), as it uses the physics step's [code]delta[/code] value automatically in calculations. Otherwise, the simulation will run at an incorrect speed.
+ Modifies [member linear_velocity] if a slide collision occurred. To get detailed information about collisions that occurred, use [method get_slide_collision].
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="collision/safe_margin" type="float" setter="set_safe_margin" getter="get_safe_margin" default="0.001">
+ Extra margin used for collision recovery when calling [method move_and_slide].
+ If the body is at least this close to another body, it will consider them to be colliding and will be pushed away before performing the actual motion.
+ A higher value means it's more flexible for detecting collision, which helps with consistently detecting walls and floors.
+ A lower value forces the collision algorithm to use more exact detection, so it can be used in cases that specifically require precision, e.g at very low scale to avoid visible jittering, or for stability with a stack of character bodies.
+ </member>
+ <member name="floor_max_angle" type="float" setter="set_floor_max_angle" getter="get_floor_max_angle" default="0.785398">
+ Maximum angle (in radians) where a slope is still considered a floor (or a ceiling), rather than a wall, when calling [method move_and_slide]. The default value equals 45 degrees.
+ </member>
+ <member name="floor_max_angle_degrees" type="float" setter="set_floor_max_angle_degrees" getter="get_floor_max_angle_degrees" default="45.0">
+ Maximum angle (in degrees) where a slope is still considered a floor (or a ceiling), rather than a wall, when calling [method move_and_slide].
+ </member>
+ <member name="infinite_inertia" type="bool" setter="set_infinite_inertia_enabled" getter="is_infinite_inertia_enabled" default="true">
+ If [code]true[/code], the body will be able to push [RigidBody3D] nodes when calling [method move_and_slide], but it also won't detect any collisions with them. If [code]false[/code], it will interact with [RigidBody3D] nodes like with [StaticBody3D].
+ </member>
+ <member name="linear_velocity" type="Vector3" setter="set_linear_velocity" getter="get_linear_velocity" default="Vector3(0, 0, 0)">
+ Current velocity vector (typically meters per second), used and modified during calls to [method move_and_slide].
+ </member>
+ <member name="max_slides" type="int" setter="set_max_slides" getter="get_max_slides" default="4">
+ Maximum number of times the body can change direction before it stops when calling [method move_and_slide].
+ </member>
+ <member name="snap" type="Vector3" setter="set_snap" getter="get_snap" default="Vector3(0, 0, 0)">
+ When set to a value different from [code]Vector3(0, 0, 0)[/code], the body is kept attached to slopes when calling [method move_and_slide].
+ As long as the [code]snap[/code] vector is in contact with the ground, the body will remain attached to the surface. This means you must disable snap in order to jump, for example. You can do this by setting [code]snap[/code] to [code]Vector3(0, 0, 0)[/code].
+ </member>
+ <member name="stop_on_slope" type="bool" setter="set_stop_on_slope_enabled" getter="is_stop_on_slope_enabled" default="false">
+ If [code]true[/code], the body will not slide on slopes when you include gravity in [code]linear_velocity[/code] when calling [method move_and_slide] and the body is standing still.
+ </member>
+ <member name="up_direction" type="Vector3" setter="set_up_direction" getter="get_up_direction" default="Vector3(0, 1, 0)">
+ Direction vector used to determine what is a wall and what is a floor (or a ceiling), rather than a wall, when calling [method move_and_slide]. Defaults to [code]Vector3.UP[/code]. If set to [code]Vector3(0, 0, 0)[/code], everything is considered a wall. This is useful for topdown games.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/CheckBox.xml b/doc/classes/CheckBox.xml
index 05e412e9da..90f3725172 100644
--- a/doc/classes/CheckBox.xml
+++ b/doc/classes/CheckBox.xml
@@ -35,22 +35,22 @@
<theme_item name="font" type="Font">
The [Font] to use for the [CheckBox] text.
</theme_item>
- <theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )">
+ <theme_item name="font_color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
The [CheckBox] text's font color.
</theme_item>
- <theme_item name="font_disabled_color" type="Color" default="Color( 0.9, 0.9, 0.9, 0.2 )">
+ <theme_item name="font_disabled_color" type="Color" default="Color(0.9, 0.9, 0.9, 0.2)">
The [CheckBox] text's font color when it's disabled.
</theme_item>
- <theme_item name="font_hover_color" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )">
+ <theme_item name="font_hover_color" type="Color" default="Color(0.94, 0.94, 0.94, 1)">
The [CheckBox] text's font color when it's hovered.
</theme_item>
- <theme_item name="font_hover_pressed_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ <theme_item name="font_hover_pressed_color" type="Color" default="Color(1, 1, 1, 1)">
The [CheckBox] text's font color when it's hovered and pressed.
</theme_item>
- <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ <theme_item name="font_outline_color" type="Color" default="Color(1, 1, 1, 1)">
The tint of text outline of the [CheckBox].
</theme_item>
- <theme_item name="font_pressed_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ <theme_item name="font_pressed_color" type="Color" default="Color(1, 1, 1, 1)">
The [CheckBox] text's font color when it's pressed.
</theme_item>
<theme_item name="font_size" type="int">
diff --git a/doc/classes/CheckButton.xml b/doc/classes/CheckButton.xml
index 46e590a115..7fa7093b32 100644
--- a/doc/classes/CheckButton.xml
+++ b/doc/classes/CheckButton.xml
@@ -30,22 +30,22 @@
<theme_item name="font" type="Font">
The [Font] to use for the [CheckButton] text.
</theme_item>
- <theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )">
+ <theme_item name="font_color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
The [CheckButton] text's font color.
</theme_item>
- <theme_item name="font_disabled_color" type="Color" default="Color( 0.9, 0.9, 0.9, 0.2 )">
+ <theme_item name="font_disabled_color" type="Color" default="Color(0.9, 0.9, 0.9, 0.2)">
The [CheckButton] text's font color when it's disabled.
</theme_item>
- <theme_item name="font_hover_color" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )">
+ <theme_item name="font_hover_color" type="Color" default="Color(0.94, 0.94, 0.94, 1)">
The [CheckButton] text's font color when it's hovered.
</theme_item>
- <theme_item name="font_hover_pressed_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ <theme_item name="font_hover_pressed_color" type="Color" default="Color(1, 1, 1, 1)">
The [CheckButton] text's font color when it's hovered and pressed.
</theme_item>
- <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ <theme_item name="font_outline_color" type="Color" default="Color(1, 1, 1, 1)">
The tint of text outline of the [CheckButton].
</theme_item>
- <theme_item name="font_pressed_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ <theme_item name="font_pressed_color" type="Color" default="Color(1, 1, 1, 1)">
The [CheckButton] text's font color when it's pressed.
</theme_item>
<theme_item name="font_size" type="int">
diff --git a/doc/classes/ClassDB.xml b/doc/classes/ClassDB.xml
index 860bdc7c8f..028781d313 100644
--- a/doc/classes/ClassDB.xml
+++ b/doc/classes/ClassDB.xml
@@ -9,7 +9,7 @@
<tutorials>
</tutorials>
<methods>
- <method name="can_instance" qualifiers="const">
+ <method name="can_instantiate" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="class" type="StringName">
@@ -187,7 +187,7 @@
Returns the parent class of [code]class[/code].
</description>
</method>
- <method name="instance" qualifiers="const">
+ <method name="instantiate" qualifiers="const">
<return type="Variant">
</return>
<argument index="0" name="class" type="StringName">
diff --git a/doc/classes/CodeEdit.xml b/doc/classes/CodeEdit.xml
index 81795abcdd..c7dbd86c55 100644
--- a/doc/classes/CodeEdit.xml
+++ b/doc/classes/CodeEdit.xml
@@ -8,6 +8,100 @@
<tutorials>
</tutorials>
<methods>
+ <method name="_confirm_code_completion" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <argument index="0" name="replace" type="bool">
+ </argument>
+ <description>
+ Override this method to define how the selected entry should be inserted. If [code]replace[/code] is true, any existing text should be replaced.
+ </description>
+ </method>
+ <method name="_filter_code_completion_candidates" qualifiers="virtual">
+ <return type="Array">
+ </return>
+ <argument index="0" name="candidates" type="Array">
+ </argument>
+ <description>
+ Override this method to define what items in [code]candidates[/code] should be displayed.
+ Both [code]candidates[/code] and the return is a [Array] of [Dictionary], see [method get_code_completion_option] for [Dictionary] content.
+ </description>
+ </method>
+ <method name="_request_code_completion" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <argument index="0" name="force" type="bool">
+ </argument>
+ <description>
+ Override this method to define what happens when the user requests code completion. If [code]force[/code] is true, any checks should be bypassed.
+ </description>
+ </method>
+ <method name="add_code_completion_option">
+ <return type="void">
+ </return>
+ <argument index="0" name="type" type="int" enum="CodeEdit.CodeCompletionKind">
+ </argument>
+ <argument index="1" name="display_text" type="String">
+ </argument>
+ <argument index="2" name="insert_text" type="String">
+ </argument>
+ <argument index="3" name="text_color" type="Color" default="Color(1, 1, 1, 1)">
+ </argument>
+ <argument index="4" name="icon" type="Resource" default="null">
+ </argument>
+ <argument index="5" name="value" type="Variant" default="0">
+ </argument>
+ <description>
+ Submits an item to the queue of potential candidates for the autocomplete menu. Call [method update_code_completion_options] to update the list.
+ [b]Note[/b]: This list will replace all current candidates.
+ </description>
+ </method>
+ <method name="add_comment_delimiter">
+ <return type="void">
+ </return>
+ <argument index="0" name="start_key" type="String">
+ </argument>
+ <argument index="1" name="end_key" type="String">
+ </argument>
+ <argument index="2" name="line_only" type="bool" default="false">
+ </argument>
+ <description>
+ Adds a comment delimiter.
+ Both the start and end keys must be symbols. Only the start key has to be unique.
+ Line only denotes if the region should continue until the end of the line or carry over on to the next line. If the end key is blank this is automatically set to [code]true[/code].
+ </description>
+ </method>
+ <method name="add_string_delimiter">
+ <return type="void">
+ </return>
+ <argument index="0" name="start_key" type="String">
+ </argument>
+ <argument index="1" name="end_key" type="String">
+ </argument>
+ <argument index="2" name="line_only" type="bool" default="false">
+ </argument>
+ <description>
+ Adds a string delimiter.
+ Both the start and end keys must be symbols. Only the start key has to be unique.
+ Line only denotes if the region should continue until the end of the line or carry over on to the next line. If the end key is blank this is automatically set to [code]true[/code].
+ </description>
+ </method>
+ <method name="can_fold_line" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="line" type="int">
+ </argument>
+ <description>
+ Returns if the given line is foldable, that is, it has indented lines right below it or a comment / string block.
+ </description>
+ </method>
+ <method name="cancel_code_completion">
+ <return type="void">
+ </return>
+ <description>
+ Cancels the autocomplete menu.
+ </description>
+ </method>
<method name="clear_bookmarked_lines">
<return type="void">
</return>
@@ -20,12 +114,51 @@
<description>
</description>
</method>
+ <method name="clear_comment_delimiters">
+ <return type="void">
+ </return>
+ <description>
+ Removes all comment delimiters.
+ </description>
+ </method>
<method name="clear_executing_lines">
<return type="void">
</return>
<description>
</description>
</method>
+ <method name="clear_string_delimiters">
+ <return type="void">
+ </return>
+ <description>
+ Removes all string delimiters.
+ </description>
+ </method>
+ <method name="confirm_code_completion">
+ <return type="void">
+ </return>
+ <argument index="0" name="replace" type="bool" default="false">
+ </argument>
+ <description>
+ Inserts the selected entry into the text. If [code]replace[/code] is true, any existing text is replaced rather then merged.
+ </description>
+ </method>
+ <method name="fold_all_lines">
+ <return type="void">
+ </return>
+ <description>
+ Folds all lines that are possible to be folded (see [method can_fold_line]).
+ </description>
+ </method>
+ <method name="fold_line">
+ <return type="void">
+ </return>
+ <argument index="0" name="line" type="int">
+ </argument>
+ <description>
+ Folds the given line, if possible (see [method can_fold_line]).
+ </description>
+ </method>
<method name="get_bookmarked_lines" qualifiers="const">
<return type="Array">
</return>
@@ -38,12 +171,135 @@
<description>
</description>
</method>
+ <method name="get_code_completion_option" qualifiers="const">
+ <return type="Dictionary">
+ </return>
+ <argument index="0" name="index" type="int">
+ </argument>
+ <description>
+ Gets the completion option at [code]index[/code]. The return [Dictionary] has the following key-values:
+ [code]kind[/code]: [enum CodeCompletionKind]
+ [code]display_text[/code]: Text that is shown on the autocomplete menu.
+ [code]insert_text[/code]: Text that is to be inserted when this item is selected.
+ [code]font_color[/code]: Color of the text on the autocomplete menu.
+ [code]icon[/code]: Icon to draw on the autocomplete menu.
+ [code]default_value[/code]: Value of the symbol.
+ </description>
+ </method>
+ <method name="get_code_completion_options" qualifiers="const">
+ <return type="Dictionary[]">
+ </return>
+ <description>
+ Gets all completion options, see [method get_code_completion_option] for return content.
+ </description>
+ </method>
+ <method name="get_code_completion_selected_index" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Gets the index of the current selected completion option.
+ </description>
+ </method>
+ <method name="get_delimiter_end_key" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="delimiter_index" type="int">
+ </argument>
+ <description>
+ Gets the end key for a string or comment region index.
+ </description>
+ </method>
+ <method name="get_delimiter_end_position" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="line" type="int">
+ </argument>
+ <argument index="1" name="column" type="int">
+ </argument>
+ <description>
+ If [code]line[/code] [code]column[/code] is in a string or comment, returns the end position of the region. If not or no end could be found, both [Vector2] values will be [code]-1[/code].
+ </description>
+ </method>
+ <method name="get_delimiter_start_key" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="delimiter_index" type="int">
+ </argument>
+ <description>
+ Gets the start key for a string or comment region index.
+ </description>
+ </method>
+ <method name="get_delimiter_start_position" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="line" type="int">
+ </argument>
+ <argument index="1" name="column" type="int">
+ </argument>
+ <description>
+ If [code]line[/code] [code]column[/code] is in a string or comment, returns the start position of the region. If not or no start could be found, both [Vector2] values will be [code]-1[/code].
+ </description>
+ </method>
<method name="get_executing_lines" qualifiers="const">
<return type="Array">
</return>
<description>
</description>
</method>
+ <method name="get_folded_lines" qualifiers="const">
+ <return type="int[]">
+ </return>
+ <description>
+ Return all lines that are current folded.
+ </description>
+ </method>
+ <method name="get_text_for_code_completion" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ Returns the full text with char [code]0xFFFF[/code] at the caret location.
+ </description>
+ </method>
+ <method name="has_comment_delimiter" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="start_key" type="String">
+ </argument>
+ <description>
+ Returns [code]true[/code] if comment [code]start_key[/code] exists.
+ </description>
+ </method>
+ <method name="has_string_delimiter" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="start_key" type="String">
+ </argument>
+ <description>
+ Returns [code]true[/code] if string [code]start_key[/code] exists.
+ </description>
+ </method>
+ <method name="is_in_comment" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="line" type="int">
+ </argument>
+ <argument index="1" name="column" type="int" default="-1">
+ </argument>
+ <description>
+ Return delimiter index if [code]line[/code] [code]column[/code] is in a comment. If [code]column[/code] is not provided, will return delimiter index if the entire [code]line[/code] is a comment. Otherwise [code]-1[/code].
+ </description>
+ </method>
+ <method name="is_in_string" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="line" type="int">
+ </argument>
+ <argument index="1" name="column" type="int" default="-1">
+ </argument>
+ <description>
+ Return the delimiter index if [code]line[/code] [code]column[/code] is in a string. If [code]column[/code] is not provided, will return the delimiter index if the entire [code]line[/code] is a string. Otherwise [code]-1[/code].
+ </description>
+ </method>
<method name="is_line_bookmarked" qualifiers="const">
<return type="bool">
</return>
@@ -68,6 +324,69 @@
<description>
</description>
</method>
+ <method name="is_line_folded" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="line" type="int">
+ </argument>
+ <description>
+ Returns whether the line at the specified index is folded or not.
+ </description>
+ </method>
+ <method name="remove_comment_delimiter">
+ <return type="void">
+ </return>
+ <argument index="0" name="start_key" type="String">
+ </argument>
+ <description>
+ Removes the comment delimiter with [code]start_key[/code].
+ </description>
+ </method>
+ <method name="remove_string_delimiter">
+ <return type="void">
+ </return>
+ <argument index="0" name="start_key" type="String">
+ </argument>
+ <description>
+ Removes the string delimiter with [code]start_key[/code].
+ </description>
+ </method>
+ <method name="request_code_completion">
+ <return type="void">
+ </return>
+ <argument index="0" name="force" type="bool" default="false">
+ </argument>
+ <description>
+ Emits [signal request_code_completion], if [code]force[/code] is true will bypass all checks. Otherwise will check that the caret is in a word or in front of a prefix. Will ignore the request if all current options are of type file path, node path or signal.
+ </description>
+ </method>
+ <method name="set_code_completion_selected_index">
+ <return type="void">
+ </return>
+ <argument index="0" name="index" type="int">
+ </argument>
+ <description>
+ Sets the current selected completion option.
+ </description>
+ </method>
+ <method name="set_code_hint">
+ <return type="void">
+ </return>
+ <argument index="0" name="code_hint" type="String">
+ </argument>
+ <description>
+ Sets the code hint text. Pass an empty string to clear.
+ </description>
+ </method>
+ <method name="set_code_hint_draw_below">
+ <return type="void">
+ </return>
+ <argument index="0" name="draw_below" type="bool">
+ </argument>
+ <description>
+ Sets if the code hint should draw below the text.
+ </description>
+ </method>
<method name="set_line_as_bookmarked">
<return type="void">
</return>
@@ -98,8 +417,54 @@
<description>
</description>
</method>
+ <method name="toggle_foldable_line">
+ <return type="void">
+ </return>
+ <argument index="0" name="line" type="int">
+ </argument>
+ <description>
+ Toggle the folding of the code block at the given line.
+ </description>
+ </method>
+ <method name="unfold_all_lines">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="unfold_line">
+ <return type="void">
+ </return>
+ <argument index="0" name="line" type="int">
+ </argument>
+ <description>
+ Unfolds all lines that were previously folded.
+ </description>
+ </method>
+ <method name="update_code_completion_options">
+ <return type="void">
+ </return>
+ <argument index="0" name="force" type="bool">
+ </argument>
+ <description>
+ Submits all completion options added with [method add_code_completion_option]. Will try to force the autoccomplete menu to popup, if [code]force[/code] is [code]true[/code].
+ [b]Note[/b]: This will replace all current candidates.
+ </description>
+ </method>
</methods>
<members>
+ <member name="code_completion_enabled" type="bool" setter="set_code_completion_enabled" getter="is_code_completion_enabled" default="false">
+ Sets whether code completion is allowed.
+ </member>
+ <member name="code_completion_prefixes" type="String[]" setter="set_code_completion_prefixes" getter="get_code_comletion_prefixes" default="[]">
+ Sets prefixes that will trigger code completion.
+ </member>
+ <member name="delimiter_comments" type="String[]" setter="set_comment_delimiters" getter="get_comment_delimiters" default="[]">
+ Sets the comment delimiters. All existing comment delimiters will be removed.
+ </member>
+ <member name="delimiter_strings" type="String[]" setter="set_string_delimiters" getter="get_string_delimiters" default="[]">
+ Sets the string delimiters. All existing string delimiters will be removed.
+ </member>
<member name="draw_bookmarks" type="bool" setter="set_draw_bookmarks_gutter" getter="is_drawing_bookmarks_gutter" default="false">
</member>
<member name="draw_breakpoints_gutter" type="bool" setter="set_draw_breakpoints_gutter" getter="is_drawing_breakpoints_gutter" default="false">
@@ -111,7 +476,10 @@
<member name="draw_line_numbers" type="bool" setter="set_draw_line_numbers" getter="is_draw_line_numbers_enabled" default="false">
</member>
<member name="layout_direction" type="int" setter="set_layout_direction" getter="get_layout_direction" override="true" enum="Control.LayoutDirection" default="2" />
- <member name="structured_text_bidi_override_options" type="Array" setter="set_structured_text_bidi_override_options" getter="get_structured_text_bidi_override_options" override="true" default="[ ]" />
+ <member name="line_folding" type="bool" setter="set_line_folding_enabled" getter="is_line_folding_enabled" default="true">
+ Sets whether line folding is allowed.
+ </member>
+ <member name="structured_text_bidi_override_options" type="Array" setter="set_structured_text_bidi_override_options" getter="get_structured_text_bidi_override_options" override="true" default="[]" />
<member name="text_direction" type="int" setter="set_text_direction" getter="get_text_direction" override="true" enum="Control.TextDirection" default="1" />
<member name="zero_pad_line_numbers" type="bool" setter="set_line_numbers_zero_padded" getter="is_line_numbers_zero_padded" default="false">
</member>
@@ -123,78 +491,103 @@
<description>
</description>
</signal>
+ <signal name="request_code_completion">
+ <description>
+ Emitted when the user requests code completion.
+ </description>
+ </signal>
</signals>
<constants>
+ <constant name="KIND_CLASS" value="0" enum="CodeCompletionKind">
+ </constant>
+ <constant name="KIND_FUNCTION" value="1" enum="CodeCompletionKind">
+ </constant>
+ <constant name="KIND_SIGNAL" value="2" enum="CodeCompletionKind">
+ </constant>
+ <constant name="KIND_VARIABLE" value="3" enum="CodeCompletionKind">
+ </constant>
+ <constant name="KIND_MEMBER" value="4" enum="CodeCompletionKind">
+ </constant>
+ <constant name="KIND_ENUM" value="5" enum="CodeCompletionKind">
+ </constant>
+ <constant name="KIND_CONSTANT" value="6" enum="CodeCompletionKind">
+ </constant>
+ <constant name="KIND_NODE_PATH" value="7" enum="CodeCompletionKind">
+ </constant>
+ <constant name="KIND_FILE_PATH" value="8" enum="CodeCompletionKind">
+ </constant>
+ <constant name="KIND_PLAIN_TEXT" value="9" enum="CodeCompletionKind">
+ </constant>
</constants>
<theme_items>
- <theme_item name="background_color" type="Color" default="Color( 0, 0, 0, 0 )">
+ <theme_item name="background_color" type="Color" default="Color(0, 0, 0, 0)">
</theme_item>
<theme_item name="bookmark" type="Texture2D">
</theme_item>
- <theme_item name="bookmark_color" type="Color" default="Color( 0.5, 0.64, 1, 0.8 )">
+ <theme_item name="bookmark_color" type="Color" default="Color(0.5, 0.64, 1, 0.8)">
</theme_item>
- <theme_item name="brace_mismatch_color" type="Color" default="Color( 1, 0.2, 0.2, 1 )">
+ <theme_item name="brace_mismatch_color" type="Color" default="Color(1, 0.2, 0.2, 1)">
</theme_item>
<theme_item name="breakpoint" type="Texture2D">
</theme_item>
- <theme_item name="breakpoint_color" type="Color" default="Color( 0.9, 0.29, 0.3, 1 )">
+ <theme_item name="breakpoint_color" type="Color" default="Color(0.9, 0.29, 0.3, 1)">
</theme_item>
<theme_item name="can_fold" type="Texture2D">
</theme_item>
- <theme_item name="caret_background_color" type="Color" default="Color( 0, 0, 0, 1 )">
+ <theme_item name="caret_background_color" type="Color" default="Color(0, 0, 0, 1)">
</theme_item>
- <theme_item name="caret_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )">
+ <theme_item name="caret_color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
</theme_item>
- <theme_item name="code_folding_color" type="Color" default="Color( 0.8, 0.8, 0.8, 0.8 )">
+ <theme_item name="code_folding_color" type="Color" default="Color(0.8, 0.8, 0.8, 0.8)">
</theme_item>
<theme_item name="completion" type="StyleBox">
</theme_item>
- <theme_item name="completion_background_color" type="Color" default="Color( 0.17, 0.16, 0.2, 1 )">
+ <theme_item name="completion_background_color" type="Color" default="Color(0.17, 0.16, 0.2, 1)">
</theme_item>
- <theme_item name="completion_existing_color" type="Color" default="Color( 0.87, 0.87, 0.87, 0.13 )">
+ <theme_item name="completion_existing_color" type="Color" default="Color(0.87, 0.87, 0.87, 0.13)">
</theme_item>
- <theme_item name="completion_font_color" type="Color" default="Color( 0.67, 0.67, 0.67, 1 )">
+ <theme_item name="completion_font_color" type="Color" default="Color(0.67, 0.67, 0.67, 1)">
</theme_item>
<theme_item name="completion_lines" type="int" default="7">
</theme_item>
<theme_item name="completion_max_width" type="int" default="50">
</theme_item>
- <theme_item name="completion_scroll_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ <theme_item name="completion_scroll_color" type="Color" default="Color(1, 1, 1, 1)">
</theme_item>
<theme_item name="completion_scroll_width" type="int" default="3">
</theme_item>
- <theme_item name="completion_selected_color" type="Color" default="Color( 0.26, 0.26, 0.27, 1 )">
+ <theme_item name="completion_selected_color" type="Color" default="Color(0.26, 0.26, 0.27, 1)">
</theme_item>
- <theme_item name="current_line_color" type="Color" default="Color( 0.25, 0.25, 0.26, 0.8 )">
+ <theme_item name="current_line_color" type="Color" default="Color(0.25, 0.25, 0.26, 0.8)">
</theme_item>
<theme_item name="executing_line" type="Texture2D">
</theme_item>
- <theme_item name="executing_line_color" type="Color" default="Color( 0.98, 0.89, 0.27, 1 )">
+ <theme_item name="executing_line_color" type="Color" default="Color(0.98, 0.89, 0.27, 1)">
</theme_item>
<theme_item name="focus" type="StyleBox">
</theme_item>
<theme_item name="folded" type="Texture2D">
</theme_item>
+ <theme_item name="folded_eol_icon" type="Texture2D">
+ </theme_item>
<theme_item name="font" type="Font">
</theme_item>
- <theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )">
+ <theme_item name="font_color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
</theme_item>
- <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ <theme_item name="font_outline_color" type="Color" default="Color(1, 1, 1, 1)">
The tint of text outline of the [CodeEdit].
</theme_item>
- <theme_item name="font_readonly_color" type="Color" default="Color( 0.88, 0.88, 0.88, 0.5 )">
+ <theme_item name="font_readonly_color" type="Color" default="Color(0.88, 0.88, 0.88, 0.5)">
</theme_item>
- <theme_item name="font_selected_color" type="Color" default="Color( 0, 0, 0, 1 )">
+ <theme_item name="font_selected_color" type="Color" default="Color(0, 0, 0, 1)">
</theme_item>
<theme_item name="font_size" type="int">
Font size of the [CodeEdit]'s text.
</theme_item>
- <theme_item name="line_number_color" type="Color" default="Color( 0.67, 0.67, 0.67, 0.4 )">
+ <theme_item name="line_number_color" type="Color" default="Color(0.67, 0.67, 0.67, 0.4)">
</theme_item>
<theme_item name="line_spacing" type="int" default="4">
</theme_item>
- <theme_item name="mark_color" type="Color" default="Color( 1, 0.4, 0.4, 0.4 )">
- </theme_item>
<theme_item name="normal" type="StyleBox">
</theme_item>
<theme_item name="outline_size" type="int" default="0">
@@ -202,15 +595,15 @@
</theme_item>
<theme_item name="read_only" type="StyleBox">
</theme_item>
- <theme_item name="safe_line_number_color" type="Color" default="Color( 0.67, 0.78, 0.67, 0.6 )">
+ <theme_item name="safe_line_number_color" type="Color" default="Color(0.67, 0.78, 0.67, 0.6)">
</theme_item>
- <theme_item name="selection_color" type="Color" default="Color( 0.49, 0.49, 0.49, 1 )">
+ <theme_item name="selection_color" type="Color" default="Color(0.49, 0.49, 0.49, 1)">
</theme_item>
<theme_item name="space" type="Texture2D">
</theme_item>
<theme_item name="tab" type="Texture2D">
</theme_item>
- <theme_item name="word_highlighted_color" type="Color" default="Color( 0.8, 0.9, 0.9, 0.15 )">
+ <theme_item name="word_highlighted_color" type="Color" default="Color(0.8, 0.9, 0.9, 0.15)">
</theme_item>
</theme_items>
</class>
diff --git a/doc/classes/CodeHighlighter.xml b/doc/classes/CodeHighlighter.xml
index f078e4e5b0..0406c25ffd 100644
--- a/doc/classes/CodeHighlighter.xml
+++ b/doc/classes/CodeHighlighter.xml
@@ -149,7 +149,7 @@
<member name="color_regions" type="Dictionary" setter="set_color_regions" getter="get_color_regions" default="{}">
Sets the color regions. All existing regions will be removed. The [Dictionary] key is the region start and end key, separated by a space. The value is the region color.
</member>
- <member name="function_color" type="Color" setter="set_function_color" getter="get_function_color" default="Color( 0, 0, 0, 1 )">
+ <member name="function_color" type="Color" setter="set_function_color" getter="get_function_color" default="Color(0, 0, 0, 1)">
Sets color for functions. A function is a non-keyword string followed by a '('.
</member>
<member name="keyword_colors" type="Dictionary" setter="set_keyword_colors" getter="get_keyword_colors" default="{}">
@@ -158,13 +158,13 @@
<member name="member_keyword_colors" type="Dictionary" setter="set_member_keyword_colors" getter="get_member_keyword_colors" default="{}">
Sets the member keyword colors. All existing member keyword will be removed. The [Dictionary] key is the member keyword. The value is the member keyword color.
</member>
- <member name="member_variable_color" type="Color" setter="set_member_variable_color" getter="get_member_variable_color" default="Color( 0, 0, 0, 1 )">
+ <member name="member_variable_color" type="Color" setter="set_member_variable_color" getter="get_member_variable_color" default="Color(0, 0, 0, 1)">
Sets color for member variables. A member variable is non-keyword, non-function string proceeded with a '.'.
</member>
- <member name="number_color" type="Color" setter="set_number_color" getter="get_number_color" default="Color( 0, 0, 0, 1 )">
+ <member name="number_color" type="Color" setter="set_number_color" getter="get_number_color" default="Color(0, 0, 0, 1)">
Sets the color for numbers.
</member>
- <member name="symbol_color" type="Color" setter="set_symbol_color" getter="get_symbol_color" default="Color( 0, 0, 0, 1 )">
+ <member name="symbol_color" type="Color" setter="set_symbol_color" getter="get_symbol_color" default="Color(0, 0, 0, 1)">
Sets the color for symbols.
</member>
</members>
diff --git a/doc/classes/CollisionObject3D.xml b/doc/classes/CollisionObject3D.xml
index 522eec5cbe..4ab37f5c7b 100644
--- a/doc/classes/CollisionObject3D.xml
+++ b/doc/classes/CollisionObject3D.xml
@@ -16,14 +16,14 @@
</argument>
<argument index="1" name="event" type="InputEvent">
</argument>
- <argument index="2" name="click_position" type="Vector3">
+ <argument index="2" name="position" type="Vector3">
</argument>
- <argument index="3" name="click_normal" type="Vector3">
+ <argument index="3" name="normal" type="Vector3">
</argument>
<argument index="4" name="shape_idx" type="int">
</argument>
<description>
- Accepts unhandled [InputEvent]s. [code]click_position[/code] is the clicked location in world space and [code]click_normal[/code] is the normal vector extending from the clicked surface of the [Shape3D] at [code]shape_idx[/code]. Connect to the [code]input_event[/code] signal to easily pick up these events.
+ Receives unhandled [InputEvent]s. [code]position[/code] is the location in world space of the mouse pointer on the surface of the shape with index [code]shape_idx[/code] and [code]normal[/code] is the normal vector of the surface at that point. Connect to the [signal input_event] signal to easily pick up these events.
</description>
</method>
<method name="create_shape_owner">
@@ -179,12 +179,12 @@
</description>
</method>
<method name="shape_owner_get_transform" qualifiers="const">
- <return type="Transform">
+ <return type="Transform3D">
</return>
<argument index="0" name="owner_id" type="int">
</argument>
<description>
- Returns the shape owner's [Transform].
+ Returns the shape owner's [Transform3D].
</description>
</method>
<method name="shape_owner_remove_shape">
@@ -214,10 +214,10 @@
</return>
<argument index="0" name="owner_id" type="int">
</argument>
- <argument index="1" name="transform" type="Transform">
+ <argument index="1" name="transform" type="Transform3D">
</argument>
<description>
- Sets the [Transform] of the given shape owner.
+ Sets the [Transform3D] of the given shape owner.
</description>
</method>
</methods>
@@ -243,14 +243,14 @@
</argument>
<argument index="1" name="event" type="InputEvent">
</argument>
- <argument index="2" name="click_position" type="Vector3">
+ <argument index="2" name="position" type="Vector3">
</argument>
- <argument index="3" name="click_normal" type="Vector3">
+ <argument index="3" name="normal" type="Vector3">
</argument>
<argument index="4" name="shape_idx" type="int">
</argument>
<description>
- Emitted when [method _input_event] receives an event. See its description for details.
+ Emitted when the object receives an unhandled [InputEvent]. [code]position[/code] is the location in world space of the mouse pointer on the surface of the shape with index [code]shape_idx[/code] and [code]normal[/code] is the normal vector of the surface at that point.
</description>
</signal>
<signal name="mouse_entered">
diff --git a/doc/classes/CollisionPolygon2D.xml b/doc/classes/CollisionPolygon2D.xml
index 242cdb8c80..4607ab3fbd 100644
--- a/doc/classes/CollisionPolygon2D.xml
+++ b/doc/classes/CollisionPolygon2D.xml
@@ -23,7 +23,7 @@
<member name="one_way_collision_margin" type="float" setter="set_one_way_collision_margin" getter="get_one_way_collision_margin" default="1.0">
The margin used for one-way collision (in pixels). Higher values will make the shape thicker, and work better for colliders that enter the polygon at a high velocity.
</member>
- <member name="polygon" type="PackedVector2Array" setter="set_polygon" getter="get_polygon" default="PackedVector2Array( )">
+ <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>
diff --git a/doc/classes/CollisionPolygon3D.xml b/doc/classes/CollisionPolygon3D.xml
index 38f4c5fe5c..cf0e55e712 100644
--- a/doc/classes/CollisionPolygon3D.xml
+++ b/doc/classes/CollisionPolygon3D.xml
@@ -20,7 +20,7 @@
<member name="margin" type="float" setter="set_margin" getter="get_margin" default="0.04">
The collision margin for the generated [Shape3D]. See [member Shape3D.margin] for more details.
</member>
- <member name="polygon" type="PackedVector2Array" setter="set_polygon" getter="get_polygon" default="PackedVector2Array( )">
+ <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/Color.xml b/doc/classes/Color.xml
index d645588af2..29c21b3213 100644
--- a/doc/classes/Color.xml
+++ b/doc/classes/Color.xml
@@ -136,6 +136,17 @@
[/codeblocks]
</description>
</method>
+ <method name="clamp" qualifiers="const">
+ <return type="Color">
+ </return>
+ <argument index="0" name="min" type="Color" default="Color(0, 0, 0, 0)">
+ </argument>
+ <argument index="1" name="max" type="Color" default="Color(1, 1, 1, 1)">
+ </argument>
+ <description>
+ Returns a new color with all components clamped between the components of [code]min[/code] and [code]max[/code], by running [method @GlobalScope.clamp] on each component.
+ </description>
+ </method>
<method name="darkened" qualifiers="const">
<return type="Color">
</return>
@@ -564,442 +575,442 @@
</member>
</members>
<constants>
- <constant name="aliceblue" value="Color( 0.94, 0.97, 1, 1 )">
+ <constant name="ALICE_BLUE" value="Color(0.94, 0.97, 1, 1)">
Alice blue color.
</constant>
- <constant name="antiquewhite" value="Color( 0.98, 0.92, 0.84, 1 )">
+ <constant name="ANTIQUE_WHITE" value="Color(0.98, 0.92, 0.84, 1)">
Antique white color.
</constant>
- <constant name="aqua" value="Color( 0, 1, 1, 1 )">
+ <constant name="AQUA" value="Color(0, 1, 1, 1)">
Aqua color.
</constant>
- <constant name="aquamarine" value="Color( 0.5, 1, 0.83, 1 )">
+ <constant name="AQUAMARINE" value="Color(0.5, 1, 0.83, 1)">
Aquamarine color.
</constant>
- <constant name="azure" value="Color( 0.94, 1, 1, 1 )">
+ <constant name="AZURE" value="Color(0.94, 1, 1, 1)">
Azure color.
</constant>
- <constant name="beige" value="Color( 0.96, 0.96, 0.86, 1 )">
+ <constant name="BEIGE" value="Color(0.96, 0.96, 0.86, 1)">
Beige color.
</constant>
- <constant name="bisque" value="Color( 1, 0.89, 0.77, 1 )">
+ <constant name="BISQUE" value="Color(1, 0.89, 0.77, 1)">
Bisque color.
</constant>
- <constant name="black" value="Color( 0, 0, 0, 1 )">
+ <constant name="BLACK" value="Color(0, 0, 0, 1)">
Black color.
</constant>
- <constant name="blanchedalmond" value="Color( 1, 0.92, 0.8, 1 )">
- Blanche almond color.
+ <constant name="BLANCHED_ALMOND" value="Color(1, 0.92, 0.8, 1)">
+ Blanched almond color.
</constant>
- <constant name="blue" value="Color( 0, 0, 1, 1 )">
+ <constant name="BLUE" value="Color(0, 0, 1, 1)">
Blue color.
</constant>
- <constant name="blueviolet" value="Color( 0.54, 0.17, 0.89, 1 )">
+ <constant name="BLUE_VIOLET" value="Color(0.54, 0.17, 0.89, 1)">
Blue violet color.
</constant>
- <constant name="brown" value="Color( 0.65, 0.16, 0.16, 1 )">
+ <constant name="BROWN" value="Color(0.65, 0.16, 0.16, 1)">
Brown color.
</constant>
- <constant name="burlywood" value="Color( 0.87, 0.72, 0.53, 1 )">
- Burly wood color.
+ <constant name="BURLYWOOD" value="Color(0.87, 0.72, 0.53, 1)">
+ Burlywood color.
</constant>
- <constant name="cadetblue" value="Color( 0.37, 0.62, 0.63, 1 )">
+ <constant name="CADET_BLUE" value="Color(0.37, 0.62, 0.63, 1)">
Cadet blue color.
</constant>
- <constant name="chartreuse" value="Color( 0.5, 1, 0, 1 )">
+ <constant name="CHARTREUSE" value="Color(0.5, 1, 0, 1)">
Chartreuse color.
</constant>
- <constant name="chocolate" value="Color( 0.82, 0.41, 0.12, 1 )">
+ <constant name="CHOCOLATE" value="Color(0.82, 0.41, 0.12, 1)">
Chocolate color.
</constant>
- <constant name="coral" value="Color( 1, 0.5, 0.31, 1 )">
+ <constant name="CORAL" value="Color(1, 0.5, 0.31, 1)">
Coral color.
</constant>
- <constant name="cornflower" value="Color( 0.39, 0.58, 0.93, 1 )">
- Cornflower color.
+ <constant name="CORNFLOWER_BLUE" value="Color(0.39, 0.58, 0.93, 1)">
+ Cornflower blue color.
</constant>
- <constant name="cornsilk" value="Color( 1, 0.97, 0.86, 1 )">
- Corn silk color.
+ <constant name="CORNSILK" value="Color(1, 0.97, 0.86, 1)">
+ Cornsilk color.
</constant>
- <constant name="crimson" value="Color( 0.86, 0.08, 0.24, 1 )">
+ <constant name="CRIMSON" value="Color(0.86, 0.08, 0.24, 1)">
Crimson color.
</constant>
- <constant name="cyan" value="Color( 0, 1, 1, 1 )">
+ <constant name="CYAN" value="Color(0, 1, 1, 1)">
Cyan color.
</constant>
- <constant name="darkblue" value="Color( 0, 0, 0.55, 1 )">
+ <constant name="DARK_BLUE" value="Color(0, 0, 0.55, 1)">
Dark blue color.
</constant>
- <constant name="darkcyan" value="Color( 0, 0.55, 0.55, 1 )">
+ <constant name="DARK_CYAN" value="Color(0, 0.55, 0.55, 1)">
Dark cyan color.
</constant>
- <constant name="darkgoldenrod" value="Color( 0.72, 0.53, 0.04, 1 )">
+ <constant name="DARK_GOLDENROD" value="Color(0.72, 0.53, 0.04, 1)">
Dark goldenrod color.
</constant>
- <constant name="darkgray" value="Color( 0.66, 0.66, 0.66, 1 )">
+ <constant name="DARK_GRAY" value="Color(0.66, 0.66, 0.66, 1)">
Dark gray color.
</constant>
- <constant name="darkgreen" value="Color( 0, 0.39, 0, 1 )">
+ <constant name="DARK_GREEN" value="Color(0, 0.39, 0, 1)">
Dark green color.
</constant>
- <constant name="darkkhaki" value="Color( 0.74, 0.72, 0.42, 1 )">
+ <constant name="DARK_KHAKI" value="Color(0.74, 0.72, 0.42, 1)">
Dark khaki color.
</constant>
- <constant name="darkmagenta" value="Color( 0.55, 0, 0.55, 1 )">
+ <constant name="DARK_MAGENTA" value="Color(0.55, 0, 0.55, 1)">
Dark magenta color.
</constant>
- <constant name="darkolivegreen" value="Color( 0.33, 0.42, 0.18, 1 )">
+ <constant name="DARK_OLIVE_GREEN" value="Color(0.33, 0.42, 0.18, 1)">
Dark olive green color.
</constant>
- <constant name="darkorange" value="Color( 1, 0.55, 0, 1 )">
+ <constant name="DARK_ORANGE" value="Color(1, 0.55, 0, 1)">
Dark orange color.
</constant>
- <constant name="darkorchid" value="Color( 0.6, 0.2, 0.8, 1 )">
+ <constant name="DARK_ORCHID" value="Color(0.6, 0.2, 0.8, 1)">
Dark orchid color.
</constant>
- <constant name="darkred" value="Color( 0.55, 0, 0, 1 )">
+ <constant name="DARK_RED" value="Color(0.55, 0, 0, 1)">
Dark red color.
</constant>
- <constant name="darksalmon" value="Color( 0.91, 0.59, 0.48, 1 )">
+ <constant name="DARK_SALMON" value="Color(0.91, 0.59, 0.48, 1)">
Dark salmon color.
</constant>
- <constant name="darkseagreen" value="Color( 0.56, 0.74, 0.56, 1 )">
+ <constant name="DARK_SEA_GREEN" value="Color(0.56, 0.74, 0.56, 1)">
Dark sea green color.
</constant>
- <constant name="darkslateblue" value="Color( 0.28, 0.24, 0.55, 1 )">
+ <constant name="DARK_SLATE_BLUE" value="Color(0.28, 0.24, 0.55, 1)">
Dark slate blue color.
</constant>
- <constant name="darkslategray" value="Color( 0.18, 0.31, 0.31, 1 )">
+ <constant name="DARK_SLATE_GRAY" value="Color(0.18, 0.31, 0.31, 1)">
Dark slate gray color.
</constant>
- <constant name="darkturquoise" value="Color( 0, 0.81, 0.82, 1 )">
+ <constant name="DARK_TURQUOISE" value="Color(0, 0.81, 0.82, 1)">
Dark turquoise color.
</constant>
- <constant name="darkviolet" value="Color( 0.58, 0, 0.83, 1 )">
+ <constant name="DARK_VIOLET" value="Color(0.58, 0, 0.83, 1)">
Dark violet color.
</constant>
- <constant name="deeppink" value="Color( 1, 0.08, 0.58, 1 )">
+ <constant name="DEEP_PINK" value="Color(1, 0.08, 0.58, 1)">
Deep pink color.
</constant>
- <constant name="deepskyblue" value="Color( 0, 0.75, 1, 1 )">
+ <constant name="DEEP_SKY_BLUE" value="Color(0, 0.75, 1, 1)">
Deep sky blue color.
</constant>
- <constant name="dimgray" value="Color( 0.41, 0.41, 0.41, 1 )">
+ <constant name="DIM_GRAY" value="Color(0.41, 0.41, 0.41, 1)">
Dim gray color.
</constant>
- <constant name="dodgerblue" value="Color( 0.12, 0.56, 1, 1 )">
+ <constant name="DODGER_BLUE" value="Color(0.12, 0.56, 1, 1)">
Dodger blue color.
</constant>
- <constant name="firebrick" value="Color( 0.7, 0.13, 0.13, 1 )">
+ <constant name="FIREBRICK" value="Color(0.7, 0.13, 0.13, 1)">
Firebrick color.
</constant>
- <constant name="floralwhite" value="Color( 1, 0.98, 0.94, 1 )">
+ <constant name="FLORAL_WHITE" value="Color(1, 0.98, 0.94, 1)">
Floral white color.
</constant>
- <constant name="forestgreen" value="Color( 0.13, 0.55, 0.13, 1 )">
+ <constant name="FOREST_GREEN" value="Color(0.13, 0.55, 0.13, 1)">
Forest green color.
</constant>
- <constant name="fuchsia" value="Color( 1, 0, 1, 1 )">
+ <constant name="FUCHSIA" value="Color(1, 0, 1, 1)">
Fuchsia color.
</constant>
- <constant name="gainsboro" value="Color( 0.86, 0.86, 0.86, 1 )">
+ <constant name="GAINSBORO" value="Color(0.86, 0.86, 0.86, 1)">
Gainsboro color.
</constant>
- <constant name="ghostwhite" value="Color( 0.97, 0.97, 1, 1 )">
+ <constant name="GHOST_WHITE" value="Color(0.97, 0.97, 1, 1)">
Ghost white color.
</constant>
- <constant name="gold" value="Color( 1, 0.84, 0, 1 )">
+ <constant name="GOLD" value="Color(1, 0.84, 0, 1)">
Gold color.
</constant>
- <constant name="goldenrod" value="Color( 0.85, 0.65, 0.13, 1 )">
+ <constant name="GOLDENROD" value="Color(0.85, 0.65, 0.13, 1)">
Goldenrod color.
</constant>
- <constant name="gray" value="Color( 0.75, 0.75, 0.75, 1 )">
+ <constant name="GRAY" value="Color(0.75, 0.75, 0.75, 1)">
Gray color.
</constant>
- <constant name="green" value="Color( 0, 1, 0, 1 )">
+ <constant name="GREEN" value="Color(0, 1, 0, 1)">
Green color.
</constant>
- <constant name="greenyellow" value="Color( 0.68, 1, 0.18, 1 )">
+ <constant name="GREEN_YELLOW" value="Color(0.68, 1, 0.18, 1)">
Green yellow color.
</constant>
- <constant name="honeydew" value="Color( 0.94, 1, 0.94, 1 )">
+ <constant name="HONEYDEW" value="Color(0.94, 1, 0.94, 1)">
Honeydew color.
</constant>
- <constant name="hotpink" value="Color( 1, 0.41, 0.71, 1 )">
+ <constant name="HOT_PINK" value="Color(1, 0.41, 0.71, 1)">
Hot pink color.
</constant>
- <constant name="indianred" value="Color( 0.8, 0.36, 0.36, 1 )">
+ <constant name="INDIAN_RED" value="Color(0.8, 0.36, 0.36, 1)">
Indian red color.
</constant>
- <constant name="indigo" value="Color( 0.29, 0, 0.51, 1 )">
+ <constant name="INDIGO" value="Color(0.29, 0, 0.51, 1)">
Indigo color.
</constant>
- <constant name="ivory" value="Color( 1, 1, 0.94, 1 )">
+ <constant name="IVORY" value="Color(1, 1, 0.94, 1)">
Ivory color.
</constant>
- <constant name="khaki" value="Color( 0.94, 0.9, 0.55, 1 )">
+ <constant name="KHAKI" value="Color(0.94, 0.9, 0.55, 1)">
Khaki color.
</constant>
- <constant name="lavender" value="Color( 0.9, 0.9, 0.98, 1 )">
+ <constant name="LAVENDER" value="Color(0.9, 0.9, 0.98, 1)">
Lavender color.
</constant>
- <constant name="lavenderblush" value="Color( 1, 0.94, 0.96, 1 )">
+ <constant name="LAVENDER_BLUSH" value="Color(1, 0.94, 0.96, 1)">
Lavender blush color.
</constant>
- <constant name="lawngreen" value="Color( 0.49, 0.99, 0, 1 )">
+ <constant name="LAWN_GREEN" value="Color(0.49, 0.99, 0, 1)">
Lawn green color.
</constant>
- <constant name="lemonchiffon" value="Color( 1, 0.98, 0.8, 1 )">
+ <constant name="LEMON_CHIFFON" value="Color(1, 0.98, 0.8, 1)">
Lemon chiffon color.
</constant>
- <constant name="lightblue" value="Color( 0.68, 0.85, 0.9, 1 )">
+ <constant name="LIGHT_BLUE" value="Color(0.68, 0.85, 0.9, 1)">
Light blue color.
</constant>
- <constant name="lightcoral" value="Color( 0.94, 0.5, 0.5, 1 )">
+ <constant name="LIGHT_CORAL" value="Color(0.94, 0.5, 0.5, 1)">
Light coral color.
</constant>
- <constant name="lightcyan" value="Color( 0.88, 1, 1, 1 )">
+ <constant name="LIGHT_CYAN" value="Color(0.88, 1, 1, 1)">
Light cyan color.
</constant>
- <constant name="lightgoldenrod" value="Color( 0.98, 0.98, 0.82, 1 )">
+ <constant name="LIGHT_GOLDENROD" value="Color(0.98, 0.98, 0.82, 1)">
Light goldenrod color.
</constant>
- <constant name="lightgray" value="Color( 0.83, 0.83, 0.83, 1 )">
+ <constant name="LIGHT_GRAY" value="Color(0.83, 0.83, 0.83, 1)">
Light gray color.
</constant>
- <constant name="lightgreen" value="Color( 0.56, 0.93, 0.56, 1 )">
+ <constant name="LIGHT_GREEN" value="Color(0.56, 0.93, 0.56, 1)">
Light green color.
</constant>
- <constant name="lightpink" value="Color( 1, 0.71, 0.76, 1 )">
+ <constant name="LIGHT_PINK" value="Color(1, 0.71, 0.76, 1)">
Light pink color.
</constant>
- <constant name="lightsalmon" value="Color( 1, 0.63, 0.48, 1 )">
+ <constant name="LIGHT_SALMON" value="Color(1, 0.63, 0.48, 1)">
Light salmon color.
</constant>
- <constant name="lightseagreen" value="Color( 0.13, 0.7, 0.67, 1 )">
+ <constant name="LIGHT_SEA_GREEN" value="Color(0.13, 0.7, 0.67, 1)">
Light sea green color.
</constant>
- <constant name="lightskyblue" value="Color( 0.53, 0.81, 0.98, 1 )">
+ <constant name="LIGHT_SKY_BLUE" value="Color(0.53, 0.81, 0.98, 1)">
Light sky blue color.
</constant>
- <constant name="lightslategray" value="Color( 0.47, 0.53, 0.6, 1 )">
+ <constant name="LIGHT_SLATE_GRAY" value="Color(0.47, 0.53, 0.6, 1)">
Light slate gray color.
</constant>
- <constant name="lightsteelblue" value="Color( 0.69, 0.77, 0.87, 1 )">
+ <constant name="LIGHT_STEEL_BLUE" value="Color(0.69, 0.77, 0.87, 1)">
Light steel blue color.
</constant>
- <constant name="lightyellow" value="Color( 1, 1, 0.88, 1 )">
+ <constant name="LIGHT_YELLOW" value="Color(1, 1, 0.88, 1)">
Light yellow color.
</constant>
- <constant name="lime" value="Color( 0, 1, 0, 1 )">
+ <constant name="LIME" value="Color(0, 1, 0, 1)">
Lime color.
</constant>
- <constant name="limegreen" value="Color( 0.2, 0.8, 0.2, 1 )">
+ <constant name="LIME_GREEN" value="Color(0.2, 0.8, 0.2, 1)">
Lime green color.
</constant>
- <constant name="linen" value="Color( 0.98, 0.94, 0.9, 1 )">
+ <constant name="LINEN" value="Color(0.98, 0.94, 0.9, 1)">
Linen color.
</constant>
- <constant name="magenta" value="Color( 1, 0, 1, 1 )">
+ <constant name="MAGENTA" value="Color(1, 0, 1, 1)">
Magenta color.
</constant>
- <constant name="maroon" value="Color( 0.69, 0.19, 0.38, 1 )">
+ <constant name="MAROON" value="Color(0.69, 0.19, 0.38, 1)">
Maroon color.
</constant>
- <constant name="mediumaquamarine" value="Color( 0.4, 0.8, 0.67, 1 )">
+ <constant name="MEDIUM_AQUAMARINE" value="Color(0.4, 0.8, 0.67, 1)">
Medium aquamarine color.
</constant>
- <constant name="mediumblue" value="Color( 0, 0, 0.8, 1 )">
+ <constant name="MEDIUM_BLUE" value="Color(0, 0, 0.8, 1)">
Medium blue color.
</constant>
- <constant name="mediumorchid" value="Color( 0.73, 0.33, 0.83, 1 )">
+ <constant name="MEDIUM_ORCHID" value="Color(0.73, 0.33, 0.83, 1)">
Medium orchid color.
</constant>
- <constant name="mediumpurple" value="Color( 0.58, 0.44, 0.86, 1 )">
+ <constant name="MEDIUM_PURPLE" value="Color(0.58, 0.44, 0.86, 1)">
Medium purple color.
</constant>
- <constant name="mediumseagreen" value="Color( 0.24, 0.7, 0.44, 1 )">
+ <constant name="MEDIUM_SEA_GREEN" value="Color(0.24, 0.7, 0.44, 1)">
Medium sea green color.
</constant>
- <constant name="mediumslateblue" value="Color( 0.48, 0.41, 0.93, 1 )">
+ <constant name="MEDIUM_SLATE_BLUE" value="Color(0.48, 0.41, 0.93, 1)">
Medium slate blue color.
</constant>
- <constant name="mediumspringgreen" value="Color( 0, 0.98, 0.6, 1 )">
+ <constant name="MEDIUM_SPRING_GREEN" value="Color(0, 0.98, 0.6, 1)">
Medium spring green color.
</constant>
- <constant name="mediumturquoise" value="Color( 0.28, 0.82, 0.8, 1 )">
+ <constant name="MEDIUM_TURQUOISE" value="Color(0.28, 0.82, 0.8, 1)">
Medium turquoise color.
</constant>
- <constant name="mediumvioletred" value="Color( 0.78, 0.08, 0.52, 1 )">
+ <constant name="MEDIUM_VIOLET_RED" value="Color(0.78, 0.08, 0.52, 1)">
Medium violet red color.
</constant>
- <constant name="midnightblue" value="Color( 0.1, 0.1, 0.44, 1 )">
+ <constant name="MIDNIGHT_BLUE" value="Color(0.1, 0.1, 0.44, 1)">
Midnight blue color.
</constant>
- <constant name="mintcream" value="Color( 0.96, 1, 0.98, 1 )">
+ <constant name="MINT_CREAM" value="Color(0.96, 1, 0.98, 1)">
Mint cream color.
</constant>
- <constant name="mistyrose" value="Color( 1, 0.89, 0.88, 1 )">
+ <constant name="MISTY_ROSE" value="Color(1, 0.89, 0.88, 1)">
Misty rose color.
</constant>
- <constant name="moccasin" value="Color( 1, 0.89, 0.71, 1 )">
+ <constant name="MOCCASIN" value="Color(1, 0.89, 0.71, 1)">
Moccasin color.
</constant>
- <constant name="navajowhite" value="Color( 1, 0.87, 0.68, 1 )">
+ <constant name="NAVAJO_WHITE" value="Color(1, 0.87, 0.68, 1)">
Navajo white color.
</constant>
- <constant name="navyblue" value="Color( 0, 0, 0.5, 1 )">
+ <constant name="NAVY_BLUE" value="Color(0, 0, 0.5, 1)">
Navy blue color.
</constant>
- <constant name="oldlace" value="Color( 0.99, 0.96, 0.9, 1 )">
+ <constant name="OLD_LACE" value="Color(0.99, 0.96, 0.9, 1)">
Old lace color.
</constant>
- <constant name="olive" value="Color( 0.5, 0.5, 0, 1 )">
+ <constant name="OLIVE" value="Color(0.5, 0.5, 0, 1)">
Olive color.
</constant>
- <constant name="olivedrab" value="Color( 0.42, 0.56, 0.14, 1 )">
+ <constant name="OLIVE_DRAB" value="Color(0.42, 0.56, 0.14, 1)">
Olive drab color.
</constant>
- <constant name="orange" value="Color( 1, 0.65, 0, 1 )">
+ <constant name="ORANGE" value="Color(1, 0.65, 0, 1)">
Orange color.
</constant>
- <constant name="orangered" value="Color( 1, 0.27, 0, 1 )">
+ <constant name="ORANGE_RED" value="Color(1, 0.27, 0, 1)">
Orange red color.
</constant>
- <constant name="orchid" value="Color( 0.85, 0.44, 0.84, 1 )">
+ <constant name="ORCHID" value="Color(0.85, 0.44, 0.84, 1)">
Orchid color.
</constant>
- <constant name="palegoldenrod" value="Color( 0.93, 0.91, 0.67, 1 )">
+ <constant name="PALE_GOLDENROD" value="Color(0.93, 0.91, 0.67, 1)">
Pale goldenrod color.
</constant>
- <constant name="palegreen" value="Color( 0.6, 0.98, 0.6, 1 )">
+ <constant name="PALE_GREEN" value="Color(0.6, 0.98, 0.6, 1)">
Pale green color.
</constant>
- <constant name="paleturquoise" value="Color( 0.69, 0.93, 0.93, 1 )">
+ <constant name="PALE_TURQUOISE" value="Color(0.69, 0.93, 0.93, 1)">
Pale turquoise color.
</constant>
- <constant name="palevioletred" value="Color( 0.86, 0.44, 0.58, 1 )">
+ <constant name="PALE_VIOLET_RED" value="Color(0.86, 0.44, 0.58, 1)">
Pale violet red color.
</constant>
- <constant name="papayawhip" value="Color( 1, 0.94, 0.84, 1 )">
+ <constant name="PAPAYA_WHIP" value="Color(1, 0.94, 0.84, 1)">
Papaya whip color.
</constant>
- <constant name="peachpuff" value="Color( 1, 0.85, 0.73, 1 )">
+ <constant name="PEACH_PUFF" value="Color(1, 0.85, 0.73, 1)">
Peach puff color.
</constant>
- <constant name="peru" value="Color( 0.8, 0.52, 0.25, 1 )">
+ <constant name="PERU" value="Color(0.8, 0.52, 0.25, 1)">
Peru color.
</constant>
- <constant name="pink" value="Color( 1, 0.75, 0.8, 1 )">
+ <constant name="PINK" value="Color(1, 0.75, 0.8, 1)">
Pink color.
</constant>
- <constant name="plum" value="Color( 0.87, 0.63, 0.87, 1 )">
+ <constant name="PLUM" value="Color(0.87, 0.63, 0.87, 1)">
Plum color.
</constant>
- <constant name="powderblue" value="Color( 0.69, 0.88, 0.9, 1 )">
+ <constant name="POWDER_BLUE" value="Color(0.69, 0.88, 0.9, 1)">
Powder blue color.
</constant>
- <constant name="purple" value="Color( 0.63, 0.13, 0.94, 1 )">
+ <constant name="PURPLE" value="Color(0.63, 0.13, 0.94, 1)">
Purple color.
</constant>
- <constant name="rebeccapurple" value="Color( 0.4, 0.2, 0.6, 1 )">
+ <constant name="REBECCA_PURPLE" value="Color(0.4, 0.2, 0.6, 1)">
Rebecca purple color.
</constant>
- <constant name="red" value="Color( 1, 0, 0, 1 )">
+ <constant name="RED" value="Color(1, 0, 0, 1)">
Red color.
</constant>
- <constant name="rosybrown" value="Color( 0.74, 0.56, 0.56, 1 )">
+ <constant name="ROSY_BROWN" value="Color(0.74, 0.56, 0.56, 1)">
Rosy brown color.
</constant>
- <constant name="royalblue" value="Color( 0.25, 0.41, 0.88, 1 )">
+ <constant name="ROYAL_BLUE" value="Color(0.25, 0.41, 0.88, 1)">
Royal blue color.
</constant>
- <constant name="saddlebrown" value="Color( 0.55, 0.27, 0.07, 1 )">
+ <constant name="SADDLE_BROWN" value="Color(0.55, 0.27, 0.07, 1)">
Saddle brown color.
</constant>
- <constant name="salmon" value="Color( 0.98, 0.5, 0.45, 1 )">
+ <constant name="SALMON" value="Color(0.98, 0.5, 0.45, 1)">
Salmon color.
</constant>
- <constant name="sandybrown" value="Color( 0.96, 0.64, 0.38, 1 )">
+ <constant name="SANDY_BROWN" value="Color(0.96, 0.64, 0.38, 1)">
Sandy brown color.
</constant>
- <constant name="seagreen" value="Color( 0.18, 0.55, 0.34, 1 )">
+ <constant name="SEA_GREEN" value="Color(0.18, 0.55, 0.34, 1)">
Sea green color.
</constant>
- <constant name="seashell" value="Color( 1, 0.96, 0.93, 1 )">
+ <constant name="SEASHELL" value="Color(1, 0.96, 0.93, 1)">
Seashell color.
</constant>
- <constant name="sienna" value="Color( 0.63, 0.32, 0.18, 1 )">
+ <constant name="SIENNA" value="Color(0.63, 0.32, 0.18, 1)">
Sienna color.
</constant>
- <constant name="silver" value="Color( 0.75, 0.75, 0.75, 1 )">
+ <constant name="SILVER" value="Color(0.75, 0.75, 0.75, 1)">
Silver color.
</constant>
- <constant name="skyblue" value="Color( 0.53, 0.81, 0.92, 1 )">
+ <constant name="SKY_BLUE" value="Color(0.53, 0.81, 0.92, 1)">
Sky blue color.
</constant>
- <constant name="slateblue" value="Color( 0.42, 0.35, 0.8, 1 )">
+ <constant name="SLATE_BLUE" value="Color(0.42, 0.35, 0.8, 1)">
Slate blue color.
</constant>
- <constant name="slategray" value="Color( 0.44, 0.5, 0.56, 1 )">
+ <constant name="SLATE_GRAY" value="Color(0.44, 0.5, 0.56, 1)">
Slate gray color.
</constant>
- <constant name="snow" value="Color( 1, 0.98, 0.98, 1 )">
+ <constant name="SNOW" value="Color(1, 0.98, 0.98, 1)">
Snow color.
</constant>
- <constant name="springgreen" value="Color( 0, 1, 0.5, 1 )">
+ <constant name="SPRING_GREEN" value="Color(0, 1, 0.5, 1)">
Spring green color.
</constant>
- <constant name="steelblue" value="Color( 0.27, 0.51, 0.71, 1 )">
+ <constant name="STEEL_BLUE" value="Color(0.27, 0.51, 0.71, 1)">
Steel blue color.
</constant>
- <constant name="tan" value="Color( 0.82, 0.71, 0.55, 1 )">
+ <constant name="TAN" value="Color(0.82, 0.71, 0.55, 1)">
Tan color.
</constant>
- <constant name="teal" value="Color( 0, 0.5, 0.5, 1 )">
+ <constant name="TEAL" value="Color(0, 0.5, 0.5, 1)">
Teal color.
</constant>
- <constant name="thistle" value="Color( 0.85, 0.75, 0.85, 1 )">
+ <constant name="THISTLE" value="Color(0.85, 0.75, 0.85, 1)">
Thistle color.
</constant>
- <constant name="tomato" value="Color( 1, 0.39, 0.28, 1 )">
+ <constant name="TOMATO" value="Color(1, 0.39, 0.28, 1)">
Tomato color.
</constant>
- <constant name="transparent" value="Color( 1, 1, 1, 0 )">
- Transparent color (white with no alpha).
+ <constant name="TRANSPARENT" value="Color(1, 1, 1, 0)">
+ Transparent color (white with zero alpha).
</constant>
- <constant name="turquoise" value="Color( 0.25, 0.88, 0.82, 1 )">
+ <constant name="TURQUOISE" value="Color(0.25, 0.88, 0.82, 1)">
Turquoise color.
</constant>
- <constant name="violet" value="Color( 0.93, 0.51, 0.93, 1 )">
+ <constant name="VIOLET" value="Color(0.93, 0.51, 0.93, 1)">
Violet color.
</constant>
- <constant name="webgray" value="Color( 0.5, 0.5, 0.5, 1 )">
+ <constant name="WEB_GRAY" value="Color(0.5, 0.5, 0.5, 1)">
Web gray color.
</constant>
- <constant name="webgreen" value="Color( 0, 0.5, 0, 1 )">
+ <constant name="WEB_GREEN" value="Color(0, 0.5, 0, 1)">
Web green color.
</constant>
- <constant name="webmaroon" value="Color( 0.5, 0, 0, 1 )">
+ <constant name="WEB_MAROON" value="Color(0.5, 0, 0, 1)">
Web maroon color.
</constant>
- <constant name="webpurple" value="Color( 0.5, 0, 0.5, 1 )">
+ <constant name="WEB_PURPLE" value="Color(0.5, 0, 0.5, 1)">
Web purple color.
</constant>
- <constant name="wheat" value="Color( 0.96, 0.87, 0.7, 1 )">
+ <constant name="WHEAT" value="Color(0.96, 0.87, 0.7, 1)">
Wheat color.
</constant>
- <constant name="white" value="Color( 1, 1, 1, 1 )">
+ <constant name="WHITE" value="Color(1, 1, 1, 1)">
White color.
</constant>
- <constant name="whitesmoke" value="Color( 0.96, 0.96, 0.96, 1 )">
+ <constant name="WHITE_SMOKE" value="Color(0.96, 0.96, 0.96, 1)">
White smoke color.
</constant>
- <constant name="yellow" value="Color( 1, 1, 0, 1 )">
+ <constant name="YELLOW" value="Color(1, 1, 0, 1)">
Yellow color.
</constant>
- <constant name="yellowgreen" value="Color( 0.6, 0.8, 0.2, 1 )">
+ <constant name="YELLOW_GREEN" value="Color(0.6, 0.8, 0.2, 1)">
Yellow green color.
</constant>
</constants>
diff --git a/doc/classes/ColorPicker.xml b/doc/classes/ColorPicker.xml
index fddfd27573..2111358ef4 100644
--- a/doc/classes/ColorPicker.xml
+++ b/doc/classes/ColorPicker.xml
@@ -38,7 +38,7 @@
</method>
</methods>
<members>
- <member name="color" type="Color" setter="set_pick_color" getter="get_pick_color" default="Color( 1, 1, 1, 1 )">
+ <member name="color" type="Color" setter="set_pick_color" getter="get_pick_color" default="Color(1, 1, 1, 1)">
The currently selected color.
</member>
<member name="deferred_mode" type="bool" setter="set_deferred_mode" getter="is_deferred_mode" default="false">
diff --git a/doc/classes/ColorPickerButton.xml b/doc/classes/ColorPickerButton.xml
index e49027e61d..09b828366f 100644
--- a/doc/classes/ColorPickerButton.xml
+++ b/doc/classes/ColorPickerButton.xml
@@ -28,7 +28,7 @@
</method>
</methods>
<members>
- <member name="color" type="Color" setter="set_pick_color" getter="get_pick_color" default="Color( 0, 0, 0, 1 )">
+ <member name="color" type="Color" setter="set_pick_color" getter="get_pick_color" default="Color(0, 0, 0, 1)">
The currently selected color.
</member>
<member name="edit_alpha" type="bool" setter="set_edit_alpha" getter="is_editing_alpha" default="true">
@@ -70,19 +70,19 @@
<theme_item name="font" type="Font">
[Font] of the [ColorPickerButton]'s text.
</theme_item>
- <theme_item name="font_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ <theme_item name="font_color" type="Color" default="Color(1, 1, 1, 1)">
Default text [Color] of the [ColorPickerButton].
</theme_item>
- <theme_item name="font_disabled_color" type="Color" default="Color( 0.9, 0.9, 0.9, 0.3 )">
+ <theme_item name="font_disabled_color" type="Color" default="Color(0.9, 0.9, 0.9, 0.3)">
Text [Color] used when the [ColorPickerButton] is disabled.
</theme_item>
- <theme_item name="font_hover_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ <theme_item name="font_hover_color" type="Color" default="Color(1, 1, 1, 1)">
Text [Color] used when the [ColorPickerButton] is being hovered.
</theme_item>
- <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ <theme_item name="font_outline_color" type="Color" default="Color(1, 1, 1, 1)">
The tint of text outline of the [ColorPickerButton].
</theme_item>
- <theme_item name="font_pressed_color" type="Color" default="Color( 0.8, 0.8, 0.8, 1 )">
+ <theme_item name="font_pressed_color" type="Color" default="Color(0.8, 0.8, 0.8, 1)">
Text [Color] used when the [ColorPickerButton] is being pressed.
</theme_item>
<theme_item name="font_size" type="int">
diff --git a/doc/classes/ColorRect.xml b/doc/classes/ColorRect.xml
index 09ba4c8b26..84955fed8a 100644
--- a/doc/classes/ColorRect.xml
+++ b/doc/classes/ColorRect.xml
@@ -12,7 +12,7 @@
<methods>
</methods>
<members>
- <member name="color" type="Color" setter="set_color" getter="get_color" default="Color( 1, 1, 1, 1 )">
+ <member name="color" type="Color" setter="set_color" getter="get_color" default="Color(1, 1, 1, 1)">
The fill color.
[codeblocks]
[gdscript]
diff --git a/doc/classes/ConcavePolygonShape2D.xml b/doc/classes/ConcavePolygonShape2D.xml
index 9999d086da..e6b2e1845d 100644
--- a/doc/classes/ConcavePolygonShape2D.xml
+++ b/doc/classes/ConcavePolygonShape2D.xml
@@ -12,7 +12,7 @@
<methods>
</methods>
<members>
- <member name="segments" type="PackedVector2Array" setter="set_segments" getter="get_segments" default="PackedVector2Array( )">
+ <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/ConcavePolygonShape3D.xml b/doc/classes/ConcavePolygonShape3D.xml
index a9687abedc..b510905d1f 100644
--- a/doc/classes/ConcavePolygonShape3D.xml
+++ b/doc/classes/ConcavePolygonShape3D.xml
@@ -5,7 +5,7 @@
</brief_description>
<description>
Concave polygon shape resource, which can be set into a [PhysicsBody3D] or area. This shape is created by feeding a list of triangles.
- Note: when used for collision, [ConcavePolygonShape3D] is intended to work with static [PhysicsBody3D] nodes like [StaticBody3D] and will not work with [KinematicBody3D] or [RigidBody3D] with a mode other than Static.
+ Note: when used for collision, [ConcavePolygonShape3D] is intended to work with static [PhysicsBody3D] nodes like [StaticBody3D] and will not work with [CharacterBody3D] or [RigidBody3D] with a mode other than Static.
</description>
<tutorials>
<link title="3D Physics Tests Demo">https://godotengine.org/asset-library/asset/675</link>
diff --git a/doc/classes/ConfigFile.xml b/doc/classes/ConfigFile.xml
index 38948a2d6e..76855fc19f 100644
--- a/doc/classes/ConfigFile.xml
+++ b/doc/classes/ConfigFile.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ConfigFile" inherits="Reference" version="4.0">
+<class name="ConfigFile" inherits="RefCounted" version="4.0">
<brief_description>
Helper class to handle INI-style files.
</brief_description>
@@ -9,7 +9,7 @@
[section]
some_key=42
string_example="Hello World3D!"
- a_vector=Vector3( 1, 0, 2 )
+ a_vector=Vector3(1, 0, 2)
[/codeblock]
The stored data can be saved to or parsed from a file, though ConfigFile objects can also be used directly without accessing the filesystem.
The following example shows how to parse an INI-style file from the system, read its contents and store new values in it:
diff --git a/doc/classes/ConfirmationDialog.xml b/doc/classes/ConfirmationDialog.xml
index 9d8977cef1..0253ef21df 100644
--- a/doc/classes/ConfirmationDialog.xml
+++ b/doc/classes/ConfirmationDialog.xml
@@ -27,8 +27,8 @@
</method>
</methods>
<members>
- <member name="min_size" type="Vector2i" setter="set_min_size" getter="get_min_size" override="true" default="Vector2i( 200, 70 )" />
- <member name="size" type="Vector2i" setter="set_size" getter="get_size" override="true" default="Vector2i( 200, 100 )" />
+ <member name="min_size" type="Vector2i" setter="set_min_size" getter="get_min_size" override="true" default="Vector2i(200, 70)" />
+ <member name="size" type="Vector2i" setter="set_size" getter="get_size" override="true" default="Vector2i(200, 100)" />
<member name="title" type="String" setter="set_title" getter="get_title" override="true" default="&quot;Please Confirm...&quot;" />
</members>
<constants>
diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml
index c0f918a01f..9addd5965a 100644
--- a/doc/classes/Control.xml
+++ b/doc/classes/Control.xml
@@ -22,6 +22,34 @@
<link title="All GUI Demos">https://github.com/godotengine/godot-demo-projects/tree/master/gui</link>
</tutorials>
<methods>
+ <method name="_can_drop_data" qualifiers="virtual">
+ <return type="bool">
+ </return>
+ <argument index="0" name="position" type="Vector2">
+ </argument>
+ <argument index="1" name="data" type="Variant">
+ </argument>
+ <description>
+ Godot calls this method to test if [code]data[/code] from a control's [method _get_drag_data] can be dropped at [code]position[/code]. [code]position[/code] is local to this control.
+ This method should only be used to test the data. Process the data in [method _drop_data].
+ [codeblocks]
+ [gdscript]
+ func _can_drop_data(position, data):
+ # Check position if it is relevant to you
+ # Otherwise, just check data
+ return typeof(data) == TYPE_DICTIONARY and data.has("expected")
+ [/gdscript]
+ [csharp]
+ public override bool CanDropData(Vector2 position, object data)
+ {
+ // Check position if it is relevant to you
+ // Otherwise, just check data
+ return data is Godot.Collections.Dictionary &amp;&amp; (data as Godot.Collections.Dictionary).Contains("expected");
+ }
+ [/csharp]
+ [/codeblocks]
+ </description>
+ </method>
<method name="_clips_input" qualifiers="virtual">
<return type="bool">
</return>
@@ -30,6 +58,61 @@
If not overridden, defaults to [code]false[/code].
</description>
</method>
+ <method name="_drop_data" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <argument index="0" name="position" type="Vector2">
+ </argument>
+ <argument index="1" name="data" type="Variant">
+ </argument>
+ <description>
+ Godot calls this method to pass you the [code]data[/code] from a control's [method _get_drag_data] result. Godot first calls [method _can_drop_data] to test if [code]data[/code] is allowed to drop at [code]position[/code] where [code]position[/code] is local to this control.
+ [codeblocks]
+ [gdscript]
+ func _can_drop_data(position, data):
+ return typeof(data) == TYPE_DICTIONARY and data.has("color")
+ func _drop_data(position, data):
+ var color = data["color"]
+ [/gdscript]
+ [csharp]
+ public override bool CanDropData(Vector2 position, object data)
+ {
+ return data is Godot.Collections.Dictionary &amp;&amp; (data as Godot.Collections.Dictionary).Contains("color");
+ }
+ public override void DropData(Vector2 position, object data)
+ {
+ Color color = (Color)(data as Godot.Collections.Dictionary)["color"];
+ }
+ [/csharp]
+ [/codeblocks]
+ </description>
+ </method>
+ <method name="_get_drag_data" qualifiers="virtual">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="position" type="Vector2">
+ </argument>
+ <description>
+ Godot calls this method to get data that can be dragged and dropped onto controls that expect drop data. Returns [code]null[/code] if there is no data to drag. Controls that want to receive drop data should implement [method _can_drop_data] and [method _drop_data]. [code]position[/code] is local to this control. Drag may be forced with [method force_drag].
+ A preview that will follow the mouse that should represent the data can be set with [method set_drag_preview]. A good time to set the preview is in this method.
+ [codeblocks]
+ [gdscript]
+ func _get_drag_data(position):
+ var mydata = make_data() # This is your custom method generating the drag data.
+ set_drag_preview(make_preview(mydata)) # This is your custom method generating the preview of the drag data.
+ return mydata
+ [/gdscript]
+ [csharp]
+ public override object GetDragData(Vector2 position)
+ {
+ object mydata = MakeData(); // This is your custom method generating the drag data.
+ SetDragPreview(MakePreview(mydata)); // This is your custom method generating the preview of the drag data.
+ return mydata;
+ }
+ [/csharp]
+ [/codeblocks]
+ </description>
+ </method>
<method name="_get_minimum_size" qualifiers="virtual">
<return type="Vector2">
</return>
@@ -68,13 +151,24 @@
[/csharp]
[/codeblocks]
The event won't trigger if:
- * clicking outside the control (see [method has_point]);
+ * clicking outside the control (see [method _has_point]);
* control has [member mouse_filter] set to [constant MOUSE_FILTER_IGNORE];
* control is obstructed by another [Control] on top of it, which doesn't have [member mouse_filter] set to [constant MOUSE_FILTER_IGNORE];
* control's parent has [member mouse_filter] set to [constant MOUSE_FILTER_STOP] or has accepted the event;
* it happens outside parent's rectangle and the parent has either [member rect_clip_content] or [method _clips_input] enabled.
</description>
</method>
+ <method name="_has_point" qualifiers="virtual">
+ <return type="bool">
+ </return>
+ <argument index="0" name="point" type="Vector2">
+ </argument>
+ <description>
+ Virtual method to be implemented by the user. Returns whether the given [code]point[/code] is inside this control.
+ If not overridden, default behavior is checking if the point is within control's Rect.
+ [b]Note:[/b] If you want to check if a point is inside the control, you can use [code]get_rect().has_point(point)[/code].
+ </description>
+ </method>
<method name="_make_custom_tooltip" qualifiers="virtual">
<return type="Control">
</return>
@@ -107,14 +201,14 @@
[codeblocks]
[gdscript]
func _make_custom_tooltip(for_text):
- var tooltip = preload("res://SomeTooltipScene.tscn").instance()
+ var tooltip = preload("res://SomeTooltipScene.tscn").instantiate()
tooltip.get_node("Label").text = for_text
return tooltip
[/gdscript]
[csharp]
public override Godot.Control _MakeCustomTooltip(String forText)
{
- Node tooltip = ResourceLoader.Load&lt;PackedScene&gt;("res://SomeTooltipScene.tscn").Instance();
+ Node tooltip = ResourceLoader.Load&lt;PackedScene&gt;("res://SomeTooltipScene.tscn").Instantiate();
tooltip.GetNode&lt;Label&gt;("Label").Text = forText;
return tooltip;
}
@@ -249,63 +343,6 @@
[/codeblocks]
</description>
</method>
- <method name="can_drop_data" qualifiers="virtual">
- <return type="bool">
- </return>
- <argument index="0" name="position" type="Vector2">
- </argument>
- <argument index="1" name="data" type="Variant">
- </argument>
- <description>
- Godot calls this method to test if [code]data[/code] from a control's [method get_drag_data] can be dropped at [code]position[/code]. [code]position[/code] is local to this control.
- This method should only be used to test the data. Process the data in [method drop_data].
- [codeblocks]
- [gdscript]
- func can_drop_data(position, data):
- # Check position if it is relevant to you
- # Otherwise, just check data
- return typeof(data) == TYPE_DICTIONARY and data.has("expected")
- [/gdscript]
- [csharp]
- public override bool CanDropData(Vector2 position, object data)
- {
- // Check position if it is relevant to you
- // Otherwise, just check data
- return data is Godot.Collections.Dictionary &amp;&amp; (data as Godot.Collections.Dictionary).Contains("expected");
- }
- [/csharp]
- [/codeblocks]
- </description>
- </method>
- <method name="drop_data" qualifiers="virtual">
- <return type="void">
- </return>
- <argument index="0" name="position" type="Vector2">
- </argument>
- <argument index="1" name="data" type="Variant">
- </argument>
- <description>
- Godot calls this method to pass you the [code]data[/code] from a control's [method get_drag_data] result. Godot first calls [method can_drop_data] to test if [code]data[/code] is allowed to drop at [code]position[/code] where [code]position[/code] is local to this control.
- [codeblocks]
- [gdscript]
- func can_drop_data(position, data):
- return typeof(data) == TYPE_DICTIONARY and data.has("color")
- func drop_data(position, data):
- var color = data["color"]
- [/gdscript]
- [csharp]
- public override bool CanDropData(Vector2 position, object data)
- {
- return data is Godot.Collections.Dictionary &amp;&amp; (data as Godot.Collections.Dictionary).Contains("color");
- }
- public override void DropData(Vector2 position, object data)
- {
- Color color = (Color)(data as Godot.Collections.Dictionary)["color"];
- }
- [/csharp]
- [/codeblocks]
- </description>
- </method>
<method name="find_next_valid_focus" qualifiers="const">
<return type="Control">
</return>
@@ -328,8 +365,8 @@
<argument index="1" name="preview" type="Control">
</argument>
<description>
- Forces drag and bypasses [method get_drag_data] and [method set_drag_preview] by passing [code]data[/code] and [code]preview[/code]. Drag will start even if the mouse is neither over nor pressed on this control.
- The methods [method can_drop_data] and [method drop_data] must be implemented on controls that want to receive drop data.
+ Forces drag and bypasses [method _get_drag_data] and [method set_drag_preview] by passing [code]data[/code] and [code]preview[/code]. Drag will start even if the mouse is neither over nor pressed on this control.
+ The methods [method _can_drop_data] and [method _drop_data] must be implemented on controls that want to receive drop data.
</description>
</method>
<method name="get_anchor" qualifiers="const">
@@ -358,38 +395,12 @@
<method name="get_cursor_shape" qualifiers="const">
<return type="int" enum="Control.CursorShape">
</return>
- <argument index="0" name="position" type="Vector2" default="Vector2( 0, 0 )">
+ <argument index="0" name="position" type="Vector2" default="Vector2(0, 0)">
</argument>
<description>
Returns the mouse cursor shape the control displays on mouse hover. See [enum CursorShape].
</description>
</method>
- <method name="get_drag_data" qualifiers="virtual">
- <return type="Variant">
- </return>
- <argument index="0" name="position" type="Vector2">
- </argument>
- <description>
- Godot calls this method to get data that can be dragged and dropped onto controls that expect drop data. Returns [code]null[/code] if there is no data to drag. Controls that want to receive drop data should implement [method can_drop_data] and [method drop_data]. [code]position[/code] is local to this control. Drag may be forced with [method force_drag].
- A preview that will follow the mouse that should represent the data can be set with [method set_drag_preview]. A good time to set the preview is in this method.
- [codeblocks]
- [gdscript]
- func get_drag_data(position):
- var mydata = make_data() # This is your custom method generating the drag data.
- set_drag_preview(make_preview(mydata)) # This is your custom method generating the preview of the drag data.
- return mydata
- [/gdscript]
- [csharp]
- public override object GetDragData(Vector2 position)
- {
- object mydata = MakeData(); // This is your custom method generating the drag data.
- SetDragPreview(MakePreview(mydata)); // This is your custom method generating the preview of the drag data.
- return mydata;
- }
- [/csharp]
- [/codeblocks]
- </description>
- </method>
<method name="get_end" qualifiers="const">
<return type="Vector2">
</return>
@@ -462,10 +473,10 @@
</return>
<argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="node_type" type="StringName" default="&quot;&quot;">
+ <argument index="1" name="theme_type" type="StringName" default="&quot;&quot;">
</argument>
<description>
- Returns a color from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]node_type[/code].
+ Returns a color from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]theme_type[/code].
[codeblocks]
[gdscript]
func _ready():
@@ -485,10 +496,10 @@
</return>
<argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="node_type" type="StringName" default="&quot;&quot;">
+ <argument index="1" name="theme_type" type="StringName" default="&quot;&quot;">
</argument>
<description>
- Returns a constant from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]node_type[/code].
+ Returns a constant from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]theme_type[/code].
</description>
</method>
<method name="get_theme_font" qualifiers="const">
@@ -496,10 +507,10 @@
</return>
<argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="node_type" type="StringName" default="&quot;&quot;">
+ <argument index="1" name="theme_type" type="StringName" default="&quot;&quot;">
</argument>
<description>
- Returns a font from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]node_type[/code].
+ Returns a font from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]theme_type[/code].
</description>
</method>
<method name="get_theme_font_size" qualifiers="const">
@@ -507,10 +518,10 @@
</return>
<argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="node_type" type="StringName" default="&quot;&quot;">
+ <argument index="1" name="theme_type" type="StringName" default="&quot;&quot;">
</argument>
<description>
- Returns a font size from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]type[/code].
+ Returns a font size from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]theme_type[/code].
</description>
</method>
<method name="get_theme_icon" qualifiers="const">
@@ -518,10 +529,10 @@
</return>
<argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="node_type" type="StringName" default="&quot;&quot;">
+ <argument index="1" name="theme_type" type="StringName" default="&quot;&quot;">
</argument>
<description>
- Returns an icon from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]node_type[/code].
+ Returns an icon from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]theme_type[/code].
</description>
</method>
<method name="get_theme_stylebox" qualifiers="const">
@@ -529,16 +540,16 @@
</return>
<argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="node_type" type="StringName" default="&quot;&quot;">
+ <argument index="1" name="theme_type" type="StringName" default="&quot;&quot;">
</argument>
<description>
- Returns a [StyleBox] from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]node_type[/code].
+ Returns a [StyleBox] from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]theme_type[/code].
</description>
</method>
<method name="get_tooltip" qualifiers="const">
<return type="String">
</return>
- <argument index="0" name="at_position" type="Vector2" default="Vector2( 0, 0 )">
+ <argument index="0" name="at_position" type="Vector2" default="Vector2(0, 0)">
</argument>
<description>
Returns the tooltip, which will appear when the cursor is resting over this control. See [member hint_tooltip].
@@ -577,26 +588,15 @@
Returns [code]true[/code] if this is the current focused control. See [member focus_mode].
</description>
</method>
- <method name="has_point" qualifiers="virtual">
- <return type="bool">
- </return>
- <argument index="0" name="point" type="Vector2">
- </argument>
- <description>
- Virtual method to be implemented by the user. Returns whether the given [code]point[/code] is inside this control.
- If not overridden, default behavior is checking if the point is within control's Rect.
- [b]Note:[/b] If you want to check if a point is inside the control, you can use [code]get_rect().has_point(point)[/code].
- </description>
- </method>
<method name="has_theme_color" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="node_type" type="StringName" default="&quot;&quot;">
+ <argument index="1" name="theme_type" type="StringName" default="&quot;&quot;">
</argument>
<description>
- Returns [code]true[/code] if [Color] with given [code]name[/code] and associated with [Control] of given [code]node_type[/code] exists in assigned [Theme].
+ Returns [code]true[/code] if [Color] with given [code]name[/code] and associated with [Control] of given [code]theme_type[/code] exists in assigned [Theme].
</description>
</method>
<method name="has_theme_color_override" qualifiers="const">
@@ -613,10 +613,10 @@
</return>
<argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="node_type" type="StringName" default="&quot;&quot;">
+ <argument index="1" name="theme_type" type="StringName" default="&quot;&quot;">
</argument>
<description>
- Returns [code]true[/code] if constant with given [code]name[/code] and associated with [Control] of given [code]node_type[/code] exists in assigned [Theme].
+ Returns [code]true[/code] if constant with given [code]name[/code] and associated with [Control] of given [code]theme_type[/code] exists in assigned [Theme].
</description>
</method>
<method name="has_theme_constant_override" qualifiers="const">
@@ -633,10 +633,10 @@
</return>
<argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="node_type" type="StringName" default="&quot;&quot;">
+ <argument index="1" name="theme_type" type="StringName" default="&quot;&quot;">
</argument>
<description>
- Returns [code]true[/code] if font with given [code]name[/code] and associated with [Control] of given [code]node_type[/code] exists in assigned [Theme].
+ Returns [code]true[/code] if font with given [code]name[/code] and associated with [Control] of given [code]theme_type[/code] exists in assigned [Theme].
</description>
</method>
<method name="has_theme_font_override" qualifiers="const">
@@ -653,10 +653,10 @@
</return>
<argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="node_type" type="StringName" default="&quot;&quot;">
+ <argument index="1" name="theme_type" type="StringName" default="&quot;&quot;">
</argument>
<description>
- Returns [code]true[/code] if font size with given [code]name[/code] and associated with [Control] of given [code]type[/code] exists in assigned [Theme].
+ Returns [code]true[/code] if font size with given [code]name[/code] and associated with [Control] of given [code]theme_type[/code] exists in assigned [Theme].
</description>
</method>
<method name="has_theme_font_size_override" qualifiers="const">
@@ -673,10 +673,10 @@
</return>
<argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="node_type" type="StringName" default="&quot;&quot;">
+ <argument index="1" name="theme_type" type="StringName" default="&quot;&quot;">
</argument>
<description>
- Returns [code]true[/code] if icon with given [code]name[/code] and associated with [Control] of given [code]node_type[/code] exists in assigned [Theme].
+ Returns [code]true[/code] if icon with given [code]name[/code] and associated with [Control] of given [code]theme_type[/code] exists in assigned [Theme].
</description>
</method>
<method name="has_theme_icon_override" qualifiers="const">
@@ -693,10 +693,10 @@
</return>
<argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="node_type" type="StringName" default="&quot;&quot;">
+ <argument index="1" name="theme_type" type="StringName" default="&quot;&quot;">
</argument>
<description>
- Returns [code]true[/code] if [StyleBox] with given [code]name[/code] and associated with [Control] of given [code]node_type[/code] exists in assigned [Theme].
+ Returns [code]true[/code] if [StyleBox] with given [code]name[/code] and associated with [Control] of given [code]theme_type[/code] exists in assigned [Theme].
</description>
</method>
<method name="has_theme_stylebox_override" qualifiers="const">
@@ -856,7 +856,7 @@
</argument>
<description>
Forwards the handling of this control's drag and drop to [code]target[/code] control.
- Forwarding can be implemented in the target control similar to the methods [method get_drag_data], [method can_drop_data], and [method drop_data] but with two differences:
+ Forwarding can be implemented in the target control similar to the methods [method _get_drag_data], [method _can_drop_data], and [method _drop_data] but with two differences:
1. The function name must be suffixed with [b]_fw[/b]
2. The function must take an extra argument that is the control doing the forwarding
[codeblocks]
@@ -871,13 +871,13 @@
# TargetControl.gd
extends Control
- func can_drop_data_fw(position, data, from_control):
+ func _can_drop_data_fw(position, data, from_control):
return true
- func drop_data_fw(position, data, from_control):
+ func _drop_data_fw(position, data, from_control):
my_handle_data(data) # Your handler method.
- func get_drag_data_fw(position, from_control):
+ func _get_drag_data_fw(position, from_control):
set_drag_preview(my_preview)
return my_data()
[/gdscript]
@@ -922,12 +922,12 @@
<argument index="0" name="control" type="Control">
</argument>
<description>
- Shows the given control at the mouse pointer. A good time to call this method is in [method get_drag_data]. The control must not be in the scene tree. You should not free the control, and you should not keep a reference to the control beyond the duration of the drag. It will be deleted automatically after the drag has ended.
+ Shows the given control at the mouse pointer. A good time to call this method is in [method _get_drag_data]. The control must not be in the scene tree. You should not free the control, and you should not keep a reference to the control beyond the duration of the drag. It will be deleted automatically after the drag has ended.
[codeblocks]
[gdscript]
export (Color, RGBA) var color = Color(1, 0, 0, 1)
- func get_drag_data(position):
+ func _get_drag_data(position):
# Use a control that is not in the tree
var cpb = ColorPickerButton.new()
cpb.color = color
@@ -1055,7 +1055,7 @@
Anchors the right edge of the node to the origin, the center or the end of its parent control. It changes how the right offset updates when the node moves or changes size. You can use one of the [enum Anchor] constants for convenience.
</member>
<member name="anchor_top" type="float" setter="_set_anchor" getter="get_anchor" default="0.0">
- Anchors the top edge of the node to the origin, the center or the end of its parent control. It changes how the top offset updates when the node moves or changes size. You can use one of the [enum Anchor] constants for convenience.
+ Anchors the top edge of the node to the origin, the center or the end of its parent control. It changes how the top offset updates when the node moves or changes size. You can use one of the [enum Anchor] constants for convenience.
</member>
<member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" enum="Control.FocusMode" default="0">
The focus access mode for the control (None, Click or All). Only one Control can be focused at the same time, and it will receive keyboard signals.
@@ -1067,7 +1067,7 @@
Tells Godot which node it should give keyboard focus to if the user presses the left arrow on the keyboard or left on a gamepad by default. You can change the key by editing the [code]ui_left[/code] input action. The node must be a [Control]. If this property is not set, Godot will give focus to the closest [Control] to the left of this one.
</member>
<member name="focus_neighbor_right" type="NodePath" setter="set_focus_neighbor" getter="get_focus_neighbor" default="NodePath(&quot;&quot;)">
- Tells Godot which node it should give keyboard focus to if the user presses the right arrow on the keyboard or right on a gamepad by default. You can change the key by editing the [code]ui_right[/code] input action. The node must be a [Control]. If this property is not set, Godot will give focus to the closest [Control] to the bottom of this one.
+ Tells Godot which node it should give keyboard focus to if the user presses the right arrow on the keyboard or right on a gamepad by default. You can change the key by editing the [code]ui_right[/code] input action. The node must be a [Control]. If this property is not set, Godot will give focus to the closest [Control] to the bottom of this one.
</member>
<member name="focus_neighbor_top" type="NodePath" setter="set_focus_neighbor" getter="get_focus_neighbor" default="NodePath(&quot;&quot;)">
Tells Godot which node it should give keyboard focus to if the user presses the top arrow on the keyboard or top on a gamepad by default. You can change the key by editing the [code]ui_top[/code] input action. The node must be a [Control]. If this property is not set, Godot will give focus to the closest [Control] to the bottom of this one.
@@ -1140,13 +1140,13 @@
<member name="rect_global_position" type="Vector2" setter="_set_global_position" getter="get_global_position">
The node's global position, relative to the world (usually to the top-left corner of the window).
</member>
- <member name="rect_min_size" type="Vector2" setter="set_custom_minimum_size" getter="get_custom_minimum_size" default="Vector2( 0, 0 )">
+ <member name="rect_min_size" type="Vector2" setter="set_custom_minimum_size" getter="get_custom_minimum_size" default="Vector2(0, 0)">
The minimum size of the node's bounding rectangle. If you set it to a value greater than (0, 0), the node's bounding rectangle will always have at least this size, even if its content is smaller. If it's set to (0, 0), the node sizes automatically to fit its content, be it a texture or child nodes.
</member>
- <member name="rect_pivot_offset" type="Vector2" setter="set_pivot_offset" getter="get_pivot_offset" default="Vector2( 0, 0 )">
+ <member name="rect_pivot_offset" type="Vector2" setter="set_pivot_offset" getter="get_pivot_offset" default="Vector2(0, 0)">
By default, the node's pivot is its top-left corner. When you change its [member rect_scale], it will scale around this pivot. Set this property to [member rect_size] / 2 to center the pivot in the node's rectangle.
</member>
- <member name="rect_position" type="Vector2" setter="_set_position" getter="get_position" default="Vector2( 0, 0 )">
+ <member name="rect_position" type="Vector2" setter="_set_position" getter="get_position" default="Vector2(0, 0)">
The node's position, relative to its parent. It corresponds to the rectangle's top-left corner. The property is not affected by [member rect_pivot_offset].
</member>
<member name="rect_rotation" type="float" setter="set_rotation" getter="get_rotation" default="0.0">
@@ -1155,12 +1155,12 @@
<member name="rect_rotation_degrees" type="float" setter="set_rotation_degrees" getter="get_rotation_degrees" default="0.0">
The node's rotation around its pivot, in degrees. See [member rect_pivot_offset] to change the pivot's position.
</member>
- <member name="rect_scale" type="Vector2" setter="set_scale" getter="get_scale" default="Vector2( 1, 1 )">
+ <member name="rect_scale" type="Vector2" setter="set_scale" getter="get_scale" default="Vector2(1, 1)">
The node's scale, relative to its [member rect_size]. Change this property to scale the node around its [member rect_pivot_offset]. The Control's [member hint_tooltip] will also scale according to this value.
[b]Note:[/b] This property is mainly intended to be used for animation purposes. Text inside the Control will look pixelated or blurry when the Control is scaled. To support multiple resolutions in your project, use an appropriate viewport stretch mode as described in the [url=https://docs.godotengine.org/en/latest/tutorials/viewports/multiple_resolutions.html]documentation[/url] instead of scaling Controls individually.
- [b]Note:[/b] If the Control node is a child of a [Container] node, the scale will be reset to [code]Vector2(1, 1)[/code] when the scene is instanced. To set the Control's scale when it's instanced, wait for one frame using [code]yield(get_tree(), "idle_frame")[/code] then set its [member rect_scale] property.
+ [b]Note:[/b] If the Control node is a child of a [Container] node, the scale will be reset to [code]Vector2(1, 1)[/code] when the scene is instantiated. To set the Control's scale when it's instantiated, wait for one frame using [code]yield(get_tree(), "idle_frame")[/code] then set its [member rect_scale] property.
</member>
- <member name="rect_size" type="Vector2" setter="_set_size" getter="get_size" default="Vector2( 0, 0 )">
+ <member name="rect_size" type="Vector2" setter="_set_size" getter="get_size" default="Vector2(0, 0)">
The size of the node's bounding rectangle, in pixels. [Container] nodes update this property automatically.
</member>
<member name="size_flags_horizontal" type="int" setter="set_h_size_flags" getter="get_h_size_flags" default="1">
@@ -1173,7 +1173,12 @@
Tells the parent [Container] nodes how they should resize and place the node on the Y axis. Use one of the [enum SizeFlags] constants to change the flags. See the constants to learn what each does.
</member>
<member name="theme" type="Theme" setter="set_theme" getter="get_theme">
- Changing this property replaces the current [Theme] resource this node and all its [Control] children use.
+ The [Theme] resource this node and all its [Control] children use. If a child node has its own [Theme] resource set, theme items are merged with child's definitions having higher priority.
+ </member>
+ <member name="theme_custom_type" type="StringName" setter="set_theme_custom_type" getter="get_theme_custom_type" default="&amp;&quot;&quot;">
+ The type name used by this [Control] to look up its own theme items. By default, the class name of the node is used (e.g. [code]Button[/code] for the [Button] control), as well as the class names of all parent classes (in order of inheritance). Setting this property gives the highest priority to the type of the specified name, then falls back on the class names.
+ [b]Note:[/b] To look up [Control]'s own items use various [code]get_theme_*[/code] methods without specifying [code]theme_type[/code].
+ [b]Note:[/b] Theme items are looked for in the tree order, from branch to root, where each [Control] node is checked for its [member theme] property. The earliest match against any type/class name is returned. The project-level Theme and the default Theme are checked last.
</member>
</members>
<signals>
diff --git a/doc/classes/ConvexPolygonShape2D.xml b/doc/classes/ConvexPolygonShape2D.xml
index 42951e2158..d53900e6c5 100644
--- a/doc/classes/ConvexPolygonShape2D.xml
+++ b/doc/classes/ConvexPolygonShape2D.xml
@@ -21,7 +21,7 @@
</method>
</methods>
<members>
- <member name="points" type="PackedVector2Array" setter="set_points" getter="get_points" default="PackedVector2Array( )">
+ <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/ConvexPolygonShape3D.xml b/doc/classes/ConvexPolygonShape3D.xml
index e18d716255..a5c86526b0 100644
--- a/doc/classes/ConvexPolygonShape3D.xml
+++ b/doc/classes/ConvexPolygonShape3D.xml
@@ -12,7 +12,7 @@
<methods>
</methods>
<members>
- <member name="points" type="PackedVector3Array" setter="set_points" getter="get_points" default="PackedVector3Array( )">
+ <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/Crypto.xml b/doc/classes/Crypto.xml
index 1f6cb40cde..deda6116f4 100644
--- a/doc/classes/Crypto.xml
+++ b/doc/classes/Crypto.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Crypto" inherits="Reference" version="4.0">
+<class name="Crypto" inherits="RefCounted" version="4.0">
<brief_description>
Access to advanced cryptographic functionalities.
</brief_description>
diff --git a/doc/classes/Curve2D.xml b/doc/classes/Curve2D.xml
index b33f3b4ffc..c9fcbd2892 100644
--- a/doc/classes/Curve2D.xml
+++ b/doc/classes/Curve2D.xml
@@ -15,9 +15,9 @@
</return>
<argument index="0" name="position" type="Vector2">
</argument>
- <argument index="1" name="in" type="Vector2" default="Vector2( 0, 0 )">
+ <argument index="1" name="in" type="Vector2" default="Vector2(0, 0)">
</argument>
- <argument index="2" name="out" type="Vector2" default="Vector2( 0, 0 )">
+ <argument index="2" name="out" type="Vector2" default="Vector2(0, 0)">
</argument>
<argument index="3" name="at_position" type="int" default="-1">
</argument>
diff --git a/doc/classes/Curve3D.xml b/doc/classes/Curve3D.xml
index fcd150ad57..fdf96b4262 100644
--- a/doc/classes/Curve3D.xml
+++ b/doc/classes/Curve3D.xml
@@ -15,9 +15,9 @@
</return>
<argument index="0" name="position" type="Vector3">
</argument>
- <argument index="1" name="in" type="Vector3" default="Vector3( 0, 0, 0 )">
+ <argument index="1" name="in" type="Vector3" default="Vector3(0, 0, 0)">
</argument>
- <argument index="2" name="out" type="Vector3" default="Vector3( 0, 0, 0 )">
+ <argument index="2" name="out" type="Vector3" default="Vector3(0, 0, 0)">
</argument>
<argument index="3" name="at_position" type="int" default="-1">
</argument>
diff --git a/doc/classes/DTLSServer.xml b/doc/classes/DTLSServer.xml
index 91a04b1f28..28d68d309f 100644
--- a/doc/classes/DTLSServer.xml
+++ b/doc/classes/DTLSServer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="DTLSServer" inherits="Reference" version="4.0">
+<class name="DTLSServer" inherits="RefCounted" version="4.0">
<brief_description>
Helper class to implement a DTLS server.
</brief_description>
diff --git a/doc/classes/Decal.xml b/doc/classes/Decal.xml
index 14c35ae6d3..e84cea7c30 100644
--- a/doc/classes/Decal.xml
+++ b/doc/classes/Decal.xml
@@ -79,13 +79,13 @@
<member name="emission_energy" type="float" setter="set_emission_energy" getter="get_emission_energy" default="1.0">
Energy multiplier for the emission texture. This will make the decal emit light at a higher intensity.
</member>
- <member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3( 1, 1, 1 )">
+ <member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3(1, 1, 1)">
Sets the size of the [AABB] used by the decal. The AABB goes from [code]-extents[/code] to [code]extents[/code].
</member>
<member name="lower_fade" type="float" setter="set_lower_fade" getter="get_lower_fade" default="0.3">
Sets the curve over which the decal will fade as the surface gets further from the center of the [AABB].
</member>
- <member name="modulate" type="Color" setter="set_modulate" getter="get_modulate" default="Color( 1, 1, 1, 1 )">
+ <member name="modulate" type="Color" setter="set_modulate" getter="get_modulate" default="Color(1, 1, 1, 1)">
Changes the [Color] of the Decal by multiplying it with this value.
</member>
<member name="normal_fade" type="float" setter="set_normal_fade" getter="get_normal_fade" default="0.0">
diff --git a/doc/classes/Directory.xml b/doc/classes/Directory.xml
index a9d7960501..dae8d83f0c 100644
--- a/doc/classes/Directory.xml
+++ b/doc/classes/Directory.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Directory" inherits="Reference" version="4.0">
+<class name="Directory" inherits="RefCounted" version="4.0">
<brief_description>
Type used to handle the filesystem.
</brief_description>
@@ -154,14 +154,14 @@
<method name="list_dir_begin">
<return type="int" enum="Error">
</return>
- <argument index="0" name="skip_navigational" type="bool" default="false">
+ <argument index="0" name="show_navigational" type="bool" default="false">
</argument>
- <argument index="1" name="skip_hidden" type="bool" default="false">
+ <argument index="1" name="show_hidden" type="bool" default="false">
</argument>
<description>
Initializes the stream used to list all files and directories using the [method get_next] function, closing the current opened stream if needed. Once the stream has been processed, it should typically be closed with [method list_dir_end].
- If [code]skip_navigational[/code] is [code]true[/code], [code].[/code] and [code]..[/code] are filtered out.
- If [code]skip_hidden[/code] is [code]true[/code], hidden files are filtered out.
+ If [code]show_navigational[/code] is [code]true[/code], [code].[/code] and [code]..[/code] are included too.
+ If [code]show_hidden[/code] is [code]true[/code], hidden files are included too.
</description>
</method>
<method name="list_dir_end">
diff --git a/doc/classes/DisplayServer.xml b/doc/classes/DisplayServer.xml
index 91e90d051d..0a4807f046 100644
--- a/doc/classes/DisplayServer.xml
+++ b/doc/classes/DisplayServer.xml
@@ -46,7 +46,7 @@
</argument>
<argument index="1" name="flags" type="int">
</argument>
- <argument index="2" name="rect" type="Rect2i" default="Rect2i( 0, 0, 0, 0 )">
+ <argument index="2" name="rect" type="Rect2i" default="Rect2i(0, 0, 0, 0)">
</argument>
<description>
</description>
@@ -64,7 +64,7 @@
</argument>
<argument index="1" name="shape" type="int" enum="DisplayServer.CursorShape" default="0">
</argument>
- <argument index="2" name="hotspot" type="Vector2" default="Vector2( 0, 0 )">
+ <argument index="2" name="hotspot" type="Vector2" default="Vector2(0, 0)">
</argument>
<description>
</description>
@@ -469,46 +469,6 @@
<description>
</description>
</method>
- <method name="native_video_is_playing" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="native_video_pause">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="native_video_play">
- <return type="int" enum="Error">
- </return>
- <argument index="0" name="path" type="String">
- </argument>
- <argument index="1" name="volume" type="float">
- </argument>
- <argument index="2" name="audio_track" type="String">
- </argument>
- <argument index="3" name="subtitle_track" type="String">
- </argument>
- <argument index="4" name="screen" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="native_video_stop">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="native_video_unpause">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
<method name="process_events">
<return type="void">
</return>
@@ -690,7 +650,7 @@
</return>
<argument index="0" name="existing_text" type="String">
</argument>
- <argument index="1" name="position" type="Rect2" default="Rect2i( 0, 0, 0, 0 )">
+ <argument index="1" name="position" type="Rect2" default="Rect2i(0, 0, 0, 0)">
</argument>
<argument index="2" name="multiline" type="bool" default="false">
</argument>
@@ -1065,33 +1025,39 @@
</constant>
<constant name="FEATURE_CUSTOM_CURSOR_SHAPE" value="8" enum="Feature">
</constant>
- <constant name="FEATURE_NATIVE_VIDEO" value="9" enum="Feature">
+ <constant name="FEATURE_NATIVE_DIALOG" value="9" enum="Feature">
</constant>
- <constant name="FEATURE_NATIVE_DIALOG" value="10" enum="Feature">
+ <constant name="FEATURE_CONSOLE_WINDOW" value="10" enum="Feature">
</constant>
- <constant name="FEATURE_CONSOLE_WINDOW" value="11" enum="Feature">
+ <constant name="FEATURE_IME" value="11" enum="Feature">
</constant>
- <constant name="FEATURE_IME" value="12" enum="Feature">
+ <constant name="FEATURE_WINDOW_TRANSPARENCY" value="12" enum="Feature">
</constant>
- <constant name="FEATURE_WINDOW_TRANSPARENCY" value="13" enum="Feature">
+ <constant name="FEATURE_HIDPI" value="13" enum="Feature">
</constant>
- <constant name="FEATURE_HIDPI" value="14" enum="Feature">
+ <constant name="FEATURE_ICON" value="14" enum="Feature">
</constant>
- <constant name="FEATURE_ICON" value="15" enum="Feature">
+ <constant name="FEATURE_NATIVE_ICON" value="15" enum="Feature">
</constant>
- <constant name="FEATURE_NATIVE_ICON" value="16" enum="Feature">
+ <constant name="FEATURE_ORIENTATION" value="16" enum="Feature">
</constant>
- <constant name="FEATURE_ORIENTATION" value="17" enum="Feature">
- </constant>
- <constant name="FEATURE_SWAP_BUFFERS" value="18" enum="Feature">
+ <constant name="FEATURE_SWAP_BUFFERS" value="17" enum="Feature">
</constant>
<constant name="MOUSE_MODE_VISIBLE" value="0" enum="MouseMode">
+ Makes the mouse cursor visible if it is hidden.
</constant>
<constant name="MOUSE_MODE_HIDDEN" value="1" enum="MouseMode">
+ Makes the mouse cursor hidden if it is visible.
</constant>
<constant name="MOUSE_MODE_CAPTURED" value="2" enum="MouseMode">
+ Captures the mouse. The mouse will be hidden and its position locked at the center of the screen.
+ [b]Note:[/b] If you want to process the mouse's movement in this mode, you need to use [member InputEventMouseMotion.relative].
</constant>
<constant name="MOUSE_MODE_CONFINED" value="3" enum="MouseMode">
+ Confines the mouse cursor to the game window, and make it visible.
+ </constant>
+ <constant name="MOUSE_MODE_CONFINED_HIDDEN" value="4" enum="MouseMode">
+ Confines the mouse cursor to the game window, and make it hidden.
</constant>
<constant name="SCREEN_OF_MAIN_WINDOW" value="-1">
</constant>
diff --git a/doc/classes/EditorDebuggerPlugin.xml b/doc/classes/EditorDebuggerPlugin.xml
index b97933e582..9484d33252 100644
--- a/doc/classes/EditorDebuggerPlugin.xml
+++ b/doc/classes/EditorDebuggerPlugin.xml
@@ -38,7 +38,7 @@
<return type="bool">
</return>
<description>
- Returns [code]true[/code] if there is an instance of the game running with the attached debugger otherwise [code]false[/code].
+ Returns [code]true[/code] if there is an instance of the game running with the attached debugger otherwise [code]false[/code].
</description>
</method>
<method name="register_message_capture">
diff --git a/doc/classes/EditorExportPlugin.xml b/doc/classes/EditorExportPlugin.xml
index b29734de1c..d9e3003fbb 100644
--- a/doc/classes/EditorExportPlugin.xml
+++ b/doc/classes/EditorExportPlugin.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorExportPlugin" inherits="Reference" version="4.0">
+<class name="EditorExportPlugin" inherits="RefCounted" version="4.0">
<brief_description>
A script that is executed when exporting the project.
</brief_description>
diff --git a/doc/classes/EditorFeatureProfile.xml b/doc/classes/EditorFeatureProfile.xml
index e05a685dd7..0cd839f370 100644
--- a/doc/classes/EditorFeatureProfile.xml
+++ b/doc/classes/EditorFeatureProfile.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorFeatureProfile" inherits="Reference" version="4.0">
+<class name="EditorFeatureProfile" inherits="RefCounted" version="4.0">
<brief_description>
An editor feature profile which can be used to disable specific features.
</brief_description>
diff --git a/doc/classes/EditorImportPlugin.xml b/doc/classes/EditorImportPlugin.xml
index aa64ab4043..a532e9bc2b 100644
--- a/doc/classes/EditorImportPlugin.xml
+++ b/doc/classes/EditorImportPlugin.xml
@@ -5,45 +5,45 @@
</brief_description>
<description>
EditorImportPlugins provide a way to extend the editor's resource import functionality. Use them to import resources from custom files or to provide alternatives to the editor's existing importers. Register your [EditorPlugin] with [method EditorPlugin.add_import_plugin].
- EditorImportPlugins work by associating with specific file extensions and a resource type. See [method get_recognized_extensions] and [method get_resource_type]. They may optionally specify some import presets that affect the import process. EditorImportPlugins are responsible for creating the resources and saving them in the [code].godot/imported[/code] directory.
+ EditorImportPlugins work by associating with specific file extensions and a resource type. See [method _get_recognized_extensions] and [method _get_resource_type]. They may optionally specify some import presets that affect the import process. EditorImportPlugins are responsible for creating the resources and saving them in the [code].godot/imported[/code] directory.
Below is an example EditorImportPlugin that imports a [Mesh] from a file with the extension ".special" or ".spec":
[codeblocks]
[gdscript]
tool
extends EditorImportPlugin
- func get_importer_name():
+ func _get_importer_name():
return "my.special.plugin"
- func get_visible_name():
+ func _get_visible_name():
return "Special Mesh"
- func get_recognized_extensions():
+ func _get_recognized_extensions():
return ["special", "spec"]
- func get_save_extension():
+ func _get_save_extension():
return "mesh"
- func get_resource_type():
+ func _get_resource_type():
return "Mesh"
- func get_preset_count():
+ func _get_preset_count():
return 1
- func get_preset_name(i):
+ func _get_preset_name(i):
return "Default"
- func get_import_options(i):
+ func _get_import_options(i):
return [{"name": "my_option", "default_value": false}]
- func import(source_file, save_path, options, platform_variants, gen_files):
+ func _import(source_file, save_path, options, platform_variants, gen_files):
var file = File.new()
if file.open(source_file, File.READ) != OK:
return FAILED
var mesh = ArrayMesh.new()
# Fill the Mesh with data read in "file", left as an exercise to the reader.
- var filename = save_path + "." + get_save_extension()
+ var filename = save_path + "." + _get_save_extension()
return ResourceSaver.save(filename, mesh)
[/gdscript]
[csharp]
@@ -92,7 +92,7 @@
return new Godot.Collections.Array{new Godot.Collections.Dictionary{{"name", "myOption"}, {"defaultValue", false}}};
}
- public override int Import(String sourceFile, String savePath, Godot.Collections.Dictionary options, Godot.Collections.Array platformVariants, Godot.Collections.Array genFiles)
+ public override int Import(String sourceFile, String savePath, Godot.Collections.Dictionary options, Godot.Collections.Array platformVariants, Godot.Collections.Array genFiles)
{
var file = new File();
if (file.Open(sourceFile, File.ModeFlags.Read) != Error.Ok)
@@ -113,7 +113,7 @@
<link title="Import plugins">https://docs.godotengine.org/en/latest/tutorials/plugins/editor/import_plugins.html</link>
</tutorials>
<methods>
- <method name="get_import_options" qualifiers="virtual">
+ <method name="_get_import_options" qualifiers="virtual">
<return type="Array">
</return>
<argument index="0" name="preset" type="int">
@@ -122,21 +122,21 @@
Gets the options and default values for the preset at this index. Returns an Array of Dictionaries with the following keys: [code]name[/code], [code]default_value[/code], [code]property_hint[/code] (optional), [code]hint_string[/code] (optional), [code]usage[/code] (optional).
</description>
</method>
- <method name="get_import_order" qualifiers="virtual">
+ <method name="_get_import_order" qualifiers="virtual">
<return type="int">
</return>
<description>
Gets the order of this importer to be run when importing resources. Higher values will be called later. Use this to ensure the importer runs after the dependencies are already imported.
</description>
</method>
- <method name="get_importer_name" qualifiers="virtual">
+ <method name="_get_importer_name" qualifiers="virtual">
<return type="String">
</return>
<description>
Gets the unique name of the importer.
</description>
</method>
- <method name="get_option_visibility" qualifiers="virtual">
+ <method name="_get_option_visibility" qualifiers="virtual">
<return type="bool">
</return>
<argument index="0" name="option" type="String">
@@ -147,7 +147,7 @@
This method can be overridden to hide specific import options if conditions are met. This is mainly useful for hiding options that depend on others if one of them is disabled. For example:
[codeblocks]
[gdscript]
- func get_option_visibility(option, options):
+ func _get_option_visibility(option, options):
# Only show the lossy quality setting if the compression mode is set to "Lossy".
if option == "compress/lossy_quality" and options.has("compress/mode"):
return int(options["compress/mode"]) == COMPRESS_LOSSY # This is a constant that you set
@@ -170,14 +170,14 @@
Return [code]true[/code] to make all options always visible.
</description>
</method>
- <method name="get_preset_count" qualifiers="virtual">
+ <method name="_get_preset_count" qualifiers="virtual">
<return type="int">
</return>
<description>
- Gets the number of initial presets defined by the plugin. Use [method get_import_options] to get the default options for the preset and [method get_preset_name] to get the name of the preset.
+ Gets the number of initial presets defined by the plugin. Use [method _get_import_options] to get the default options for the preset and [method _get_preset_name] to get the name of the preset.
</description>
</method>
- <method name="get_preset_name" qualifiers="virtual">
+ <method name="_get_preset_name" qualifiers="virtual">
<return type="String">
</return>
<argument index="0" name="preset" type="int">
@@ -186,42 +186,42 @@
Gets the name of the options preset at this index.
</description>
</method>
- <method name="get_priority" qualifiers="virtual">
+ <method name="_get_priority" qualifiers="virtual">
<return type="float">
</return>
<description>
Gets the priority of this plugin for the recognized extension. Higher priority plugins will be preferred. The default priority is [code]1.0[/code].
</description>
</method>
- <method name="get_recognized_extensions" qualifiers="virtual">
+ <method name="_get_recognized_extensions" qualifiers="virtual">
<return type="Array">
</return>
<description>
Gets the list of file extensions to associate with this loader (case-insensitive). e.g. [code]["obj"][/code].
</description>
</method>
- <method name="get_resource_type" qualifiers="virtual">
+ <method name="_get_resource_type" qualifiers="virtual">
<return type="String">
</return>
<description>
Gets the Godot resource type associated with this loader. e.g. [code]"Mesh"[/code] or [code]"Animation"[/code].
</description>
</method>
- <method name="get_save_extension" qualifiers="virtual">
+ <method name="_get_save_extension" qualifiers="virtual">
<return type="String">
</return>
<description>
Gets the extension used to save this resource in the [code].godot/imported[/code] directory.
</description>
</method>
- <method name="get_visible_name" qualifiers="virtual">
+ <method name="_get_visible_name" qualifiers="virtual">
<return type="String">
</return>
<description>
Gets the name to display in the import window. You should choose this name as a continuation to "Import as", e.g. "Import as Special Mesh".
</description>
</method>
- <method name="import" qualifiers="virtual">
+ <method name="_import" qualifiers="virtual">
<return type="int">
</return>
<argument index="0" name="source_file" type="String">
diff --git a/doc/classes/EditorInspectorPlugin.xml b/doc/classes/EditorInspectorPlugin.xml
index 8204dc931e..c992d0fbb4 100644
--- a/doc/classes/EditorInspectorPlugin.xml
+++ b/doc/classes/EditorInspectorPlugin.xml
@@ -1,106 +1,100 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorInspectorPlugin" inherits="Reference" version="4.0">
+<class name="EditorInspectorPlugin" inherits="RefCounted" version="4.0">
<brief_description>
Plugin for adding custom property editors on inspector.
</brief_description>
<description>
These plugins allow adding custom property editors to [EditorInspector].
Plugins are registered via [method EditorPlugin.add_inspector_plugin].
- When an object is edited, the [method can_handle] function is called and must return [code]true[/code] if the object type is supported.
- If supported, the function [method parse_begin] will be called, allowing to place custom controls at the beginning of the class.
- Subsequently, the [method parse_category] and [method parse_property] are called for every category and property. They offer the ability to add custom controls to the inspector too.
- Finally, [method parse_end] will be called.
+ When an object is edited, the [method _can_handle] function is called and must return [code]true[/code] if the object type is supported.
+ If supported, the function [method _parse_begin] will be called, allowing to place custom controls at the beginning of the class.
+ Subsequently, the [method _parse_category] and [method _parse_property] are called for every category and property. They offer the ability to add custom controls to the inspector too.
+ Finally, [method _parse_end] will be called.
On each of these calls, the "add" functions can be called.
</description>
<tutorials>
</tutorials>
<methods>
- <method name="add_custom_control">
- <return type="void">
+ <method name="_can_handle" qualifiers="virtual">
+ <return type="bool">
</return>
- <argument index="0" name="control" type="Control">
+ <argument index="0" name="object" type="Object">
</argument>
<description>
- Adds a custom control, not necessarily a property editor.
+ Returns [code]true[/code] if this object can be handled by this plugin.
</description>
</method>
- <method name="add_property_editor">
+ <method name="_parse_begin" qualifiers="virtual">
<return type="void">
</return>
- <argument index="0" name="property" type="String">
- </argument>
- <argument index="1" name="editor" type="Control">
- </argument>
<description>
- Adds a property editor, this must inherit [EditorProperty].
+ Called to allow adding controls at the beginning of the list.
</description>
</method>
- <method name="add_property_editor_for_multiple_properties">
+ <method name="_parse_category" qualifiers="virtual">
<return type="void">
</return>
- <argument index="0" name="label" type="String">
- </argument>
- <argument index="1" name="properties" type="PackedStringArray">
- </argument>
- <argument index="2" name="editor" type="Control">
+ <argument index="0" name="category" type="String">
</argument>
<description>
- Adds an editor that allows modifying multiple properties, this must inherit [EditorProperty].
+ Called to allow adding controls at the beginning of the category.
</description>
</method>
- <method name="can_handle" qualifiers="virtual">
- <return type="bool">
+ <method name="_parse_end" qualifiers="virtual">
+ <return type="void">
</return>
- <argument index="0" name="object" type="Object">
- </argument>
<description>
- Returns [code]true[/code] if this object can be handled by this plugin.
+ Called to allow adding controls at the end of the list.
</description>
</method>
- <method name="parse_begin" qualifiers="virtual">
- <return type="void">
+ <method name="_parse_property" qualifiers="virtual">
+ <return type="bool">
</return>
- <argument index="0" name="object" type="Object">
+ <argument index="0" name="type" type="int">
+ </argument>
+ <argument index="1" name="path" type="String">
+ </argument>
+ <argument index="2" name="hint" type="int">
+ </argument>
+ <argument index="3" name="hint_text" type="String">
+ </argument>
+ <argument index="4" name="usage" type="int">
</argument>
<description>
- Called to allow adding controls at the beginning of the list.
+ Called to allow adding property specific editors to the inspector. Usually these inherit [EditorProperty]. Returning [code]true[/code] removes the built-in editor for this property, otherwise allows to insert a custom editor before the built-in one.
</description>
</method>
- <method name="parse_category" qualifiers="virtual">
+ <method name="add_custom_control">
<return type="void">
</return>
- <argument index="0" name="object" type="Object">
- </argument>
- <argument index="1" name="category" type="String">
+ <argument index="0" name="control" type="Control">
</argument>
<description>
- Called to allow adding controls at the beginning of the category.
+ Adds a custom control, not necessarily a property editor.
</description>
</method>
- <method name="parse_end" qualifiers="virtual">
+ <method name="add_property_editor">
<return type="void">
</return>
+ <argument index="0" name="property" type="String">
+ </argument>
+ <argument index="1" name="editor" type="Control">
+ </argument>
<description>
- Called to allow adding controls at the end of the list.
+ Adds a property editor, this must inherit [EditorProperty].
</description>
</method>
- <method name="parse_property" qualifiers="virtual">
- <return type="bool">
+ <method name="add_property_editor_for_multiple_properties">
+ <return type="void">
</return>
- <argument index="0" name="object" type="Object">
- </argument>
- <argument index="1" name="type" type="int">
- </argument>
- <argument index="2" name="path" type="String">
- </argument>
- <argument index="3" name="hint" type="int">
+ <argument index="0" name="label" type="String">
</argument>
- <argument index="4" name="hint_text" type="String">
+ <argument index="1" name="properties" type="PackedStringArray">
</argument>
- <argument index="5" name="usage" type="int">
+ <argument index="2" name="editor" type="Control">
</argument>
<description>
- Called to allow adding property specific editors to the inspector. Usually these inherit [EditorProperty]. Returning [code]true[/code] removes the built-in editor for this property, otherwise allows to insert a custom editor before the built-in one.
+ Adds an editor that allows modifying multiple properties, this must inherit [EditorProperty].
</description>
</method>
</methods>
diff --git a/doc/classes/EditorInterface.xml b/doc/classes/EditorInterface.xml
index a5328ce382..3f324bf1a0 100644
--- a/doc/classes/EditorInterface.xml
+++ b/doc/classes/EditorInterface.xml
@@ -57,6 +57,12 @@
[b]Note:[/b] This returns the main editor control containing the whole editor, not the 2D or 3D viewports specifically.
</description>
</method>
+ <method name="get_editor_paths">
+ <return type="EditorPaths">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="get_editor_scale" qualifiers="const">
<return type="float">
</return>
diff --git a/doc/classes/EditorNode3DGizmo.xml b/doc/classes/EditorNode3DGizmo.xml
index 45541b9263..221b5e44d6 100644
--- a/doc/classes/EditorNode3DGizmo.xml
+++ b/doc/classes/EditorNode3DGizmo.xml
@@ -9,13 +9,76 @@
<tutorials>
</tutorials>
<methods>
+ <method name="_commit_handle" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <argument index="0" name="index" type="int">
+ </argument>
+ <argument index="1" name="restore" type="Variant">
+ </argument>
+ <argument index="2" name="cancel" type="bool" default="false">
+ </argument>
+ <description>
+ Commit a handle being edited (handles must have been previously added by [method add_handles]).
+ If the [code]cancel[/code] parameter is [code]true[/code], an option to restore the edited value to the original is provided.
+ </description>
+ </method>
+ <method name="_get_handle_name" qualifiers="virtual">
+ <return type="String">
+ </return>
+ <argument index="0" name="index" type="int">
+ </argument>
+ <description>
+ Gets the name of an edited handle (handles must have been previously added by [method add_handles]).
+ Handles can be named for reference to the user when editing.
+ </description>
+ </method>
+ <method name="_get_handle_value" qualifiers="virtual">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="index" type="int">
+ </argument>
+ <description>
+ Gets actual value of a handle. This value can be anything and used for eventually undoing the motion when calling [method _commit_handle].
+ </description>
+ </method>
+ <method name="_is_handle_highlighted" qualifiers="virtual">
+ <return type="bool">
+ </return>
+ <argument index="0" name="index" type="int">
+ </argument>
+ <description>
+ Returns [code]true[/code] if the handle at index [code]index[/code] is highlighted by being hovered with the mouse.
+ </description>
+ </method>
+ <method name="_redraw" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <description>
+ This function is called when the [Node3D] this gizmo refers to changes (the [method Node3D.update_gizmo] is called).
+ </description>
+ </method>
+ <method name="_set_handle" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <argument index="0" name="index" type="int">
+ </argument>
+ <argument index="1" name="camera" type="Camera3D">
+ </argument>
+ <argument index="2" name="point" type="Vector2">
+ </argument>
+ <description>
+ This function is used when the user drags a gizmo handle (previously added with [method add_handles]) in screen coordinates.
+ The [Camera3D] is also provided so screen coordinates can be converted to raycasts.
+ </description>
+ </method>
<method name="add_collision_segments">
<return type="void">
</return>
<argument index="0" name="segments" type="PackedVector3Array">
</argument>
<description>
- Adds the specified [code]segments[/code] to the gizmo's collision shape for picking. Call this function during [method redraw].
+ Adds the specified [code]segments[/code] to the gizmo's collision shape for picking. Call this function during [method _redraw].
</description>
</method>
<method name="add_collision_triangles">
@@ -24,7 +87,7 @@
<argument index="0" name="triangles" type="TriangleMesh">
</argument>
<description>
- Adds collision triangles to the gizmo for picking. A [TriangleMesh] can be generated from a regular [Mesh] too. Call this function during [method redraw].
+ Adds collision triangles to the gizmo for picking. A [TriangleMesh] can be generated from a regular [Mesh] too. Call this function during [method _redraw].
</description>
</method>
<method name="add_handles">
@@ -40,7 +103,7 @@
</argument>
<description>
Adds a list of handles (points) which can be used to deform the object being edited.
- There are virtual functions which will be called upon editing of these handles. Call this function during [method redraw].
+ There are virtual functions which will be called upon editing of these handles. Call this function during [method _redraw].
</description>
</method>
<method name="add_lines">
@@ -52,10 +115,10 @@
</argument>
<argument index="2" name="billboard" type="bool" default="false">
</argument>
- <argument index="3" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )">
+ <argument index="3" name="modulate" type="Color" default="Color(1, 1, 1, 1)">
</argument>
<description>
- Adds lines to the gizmo (as sets of 2 points), with a given material. The lines are used for visualizing the gizmo. Call this function during [method redraw].
+ Adds lines to the gizmo (as sets of 2 points), with a given material. The lines are used for visualizing the gizmo. Call this function during [method _redraw].
</description>
</method>
<method name="add_mesh">
@@ -70,7 +133,7 @@
<argument index="3" name="material" type="Material" default="null">
</argument>
<description>
- Adds a mesh to the gizmo with the specified [code]billboard[/code] state, [code]skeleton[/code] and [code]material[/code]. If [code]billboard[/code] is [code]true[/code], the mesh will rotate to always face the camera. Call this function during [method redraw].
+ Adds a mesh to the gizmo with the specified [code]billboard[/code] state, [code]skeleton[/code] and [code]material[/code]. If [code]billboard[/code] is [code]true[/code], the mesh will rotate to always face the camera. Call this function during [method _redraw].
</description>
</method>
<method name="add_unscaled_billboard">
@@ -80,10 +143,10 @@
</argument>
<argument index="1" name="default_scale" type="float" default="1">
</argument>
- <argument index="2" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )">
+ <argument index="2" name="modulate" type="Color" default="Color(1, 1, 1, 1)">
</argument>
<description>
- Adds an unscaled billboard for visualization. Call this function during [method redraw].
+ Adds an unscaled billboard for visualization. Call this function during [method _redraw].
</description>
</method>
<method name="clear">
@@ -93,39 +156,6 @@
Removes everything in the gizmo including meshes, collisions and handles.
</description>
</method>
- <method name="commit_handle" qualifiers="virtual">
- <return type="void">
- </return>
- <argument index="0" name="index" type="int">
- </argument>
- <argument index="1" name="restore" type="Variant">
- </argument>
- <argument index="2" name="cancel" type="bool" default="false">
- </argument>
- <description>
- Commit a handle being edited (handles must have been previously added by [method add_handles]).
- If the [code]cancel[/code] parameter is [code]true[/code], an option to restore the edited value to the original is provided.
- </description>
- </method>
- <method name="get_handle_name" qualifiers="virtual">
- <return type="String">
- </return>
- <argument index="0" name="index" type="int">
- </argument>
- <description>
- Gets the name of an edited handle (handles must have been previously added by [method add_handles]).
- Handles can be named for reference to the user when editing.
- </description>
- </method>
- <method name="get_handle_value" qualifiers="virtual">
- <return type="Variant">
- </return>
- <argument index="0" name="index" type="int">
- </argument>
- <description>
- Gets actual value of a handle. This value can be anything and used for eventually undoing the motion when calling [method commit_handle].
- </description>
- </method>
<method name="get_plugin" qualifiers="const">
<return type="EditorNode3DGizmoPlugin">
</return>
@@ -140,36 +170,6 @@
Returns the Node3D node associated with this gizmo.
</description>
</method>
- <method name="is_handle_highlighted" qualifiers="virtual">
- <return type="bool">
- </return>
- <argument index="0" name="index" type="int">
- </argument>
- <description>
- Returns [code]true[/code] if the handle at index [code]index[/code] is highlighted by being hovered with the mouse.
- </description>
- </method>
- <method name="redraw" qualifiers="virtual">
- <return type="void">
- </return>
- <description>
- This function is called when the [Node3D] this gizmo refers to changes (the [method Node3D.update_gizmo] is called).
- </description>
- </method>
- <method name="set_handle" qualifiers="virtual">
- <return type="void">
- </return>
- <argument index="0" name="index" type="int">
- </argument>
- <argument index="1" name="camera" type="Camera3D">
- </argument>
- <argument index="2" name="point" type="Vector2">
- </argument>
- <description>
- This function is used when the user drags a gizmo handle (previously added with [method add_handles]) in screen coordinates.
- The [Camera3D] is also provided so screen coordinates can be converted to raycasts.
- </description>
- </method>
<method name="set_hidden">
<return type="void">
</return>
diff --git a/doc/classes/EditorNode3DGizmoPlugin.xml b/doc/classes/EditorNode3DGizmoPlugin.xml
index 34657a1c08..41c94cbbc6 100644
--- a/doc/classes/EditorNode3DGizmoPlugin.xml
+++ b/doc/classes/EditorNode3DGizmoPlugin.xml
@@ -10,25 +10,14 @@
<link title="Spatial gizmo plugins">https://docs.godotengine.org/en/latest/tutorials/plugins/editor/spatial_gizmos.html</link>
</tutorials>
<methods>
- <method name="add_material">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="material" type="StandardMaterial3D">
- </argument>
- <description>
- Adds a new material to the internal material list for the plugin. It can then be accessed with [method get_material]. Should not be overridden.
- </description>
- </method>
- <method name="can_be_hidden" qualifiers="virtual">
+ <method name="_can_be_hidden" qualifiers="virtual">
<return type="bool">
</return>
<description>
Override this method to define whether the gizmo can be hidden or not. Returns [code]true[/code] if not overridden.
</description>
</method>
- <method name="commit_handle" qualifiers="virtual">
+ <method name="_commit_handle" qualifiers="virtual">
<return type="void">
</return>
<argument index="0" name="gizmo" type="EditorNode3DGizmo">
@@ -43,69 +32,23 @@
Override this method to commit gizmo handles. Called for this plugin's active gizmos.
</description>
</method>
- <method name="create_gizmo" qualifiers="virtual">
+ <method name="_create_gizmo" qualifiers="virtual">
<return type="EditorNode3DGizmo">
</return>
<argument index="0" name="spatial" type="Node3D">
</argument>
<description>
- Override this method to return a custom [EditorNode3DGizmo] for the spatial nodes of your choice, return [code]null[/code] for the rest of nodes. See also [method has_gizmo].
- </description>
- </method>
- <method name="create_handle_material">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="billboard" type="bool" default="false">
- </argument>
- <argument index="2" name="texture" type="Texture2D" default="null">
- </argument>
- <description>
- Creates a handle material with its variants (selected and/or editable) and adds them to the internal material list. They can then be accessed with [method get_material] and used in [method EditorNode3DGizmo.add_handles]. Should not be overridden.
- You can optionally provide a texture to use instead of the default icon.
+ Override this method to return a custom [EditorNode3DGizmo] for the spatial nodes of your choice, return [code]null[/code] for the rest of nodes. See also [method _has_gizmo].
</description>
</method>
- <method name="create_icon_material">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="texture" type="Texture2D">
- </argument>
- <argument index="2" name="on_top" type="bool" default="false">
- </argument>
- <argument index="3" name="color" type="Color" default="Color( 1, 1, 1, 1 )">
- </argument>
- <description>
- Creates an icon material with its variants (selected and/or editable) and adds them to the internal material list. They can then be accessed with [method get_material] and used in [method EditorNode3DGizmo.add_unscaled_billboard]. Should not be overridden.
- </description>
- </method>
- <method name="create_material">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="color" type="Color">
- </argument>
- <argument index="2" name="billboard" type="bool" default="false">
- </argument>
- <argument index="3" name="on_top" type="bool" default="false">
- </argument>
- <argument index="4" name="use_vertex_color" type="bool" default="false">
- </argument>
- <description>
- Creates an unshaded material with its variants (selected and/or editable) and adds them to the internal material list. They can then be accessed with [method get_material] and used in [method EditorNode3DGizmo.add_mesh] and [method EditorNode3DGizmo.add_lines]. Should not be overridden.
- </description>
- </method>
- <method name="get_gizmo_name" qualifiers="virtual">
+ <method name="_get_gizmo_name" qualifiers="virtual">
<return type="String">
</return>
<description>
Override this method to provide the name that will appear in the gizmo visibility menu.
</description>
</method>
- <method name="get_handle_name" qualifiers="virtual">
+ <method name="_get_handle_name" qualifiers="virtual">
<return type="String">
</return>
<argument index="0" name="gizmo" type="EditorNode3DGizmo">
@@ -116,7 +59,7 @@
Override this method to provide gizmo's handle names. Called for this plugin's active gizmos.
</description>
</method>
- <method name="get_handle_value" qualifiers="virtual">
+ <method name="_get_handle_value" qualifiers="virtual">
<return type="Variant">
</return>
<argument index="0" name="gizmo" type="EditorNode3DGizmo">
@@ -127,18 +70,7 @@
Gets actual value of a handle from gizmo. Called for this plugin's active gizmos.
</description>
</method>
- <method name="get_material">
- <return type="StandardMaterial3D">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="gizmo" type="EditorNode3DGizmo" default="null">
- </argument>
- <description>
- Gets material from the internal list of materials. If an [EditorNode3DGizmo] is provided, it will try to get the corresponding variant (selected and/or editable).
- </description>
- </method>
- <method name="get_priority" qualifiers="virtual">
+ <method name="_get_priority" qualifiers="virtual">
<return type="int">
</return>
<description>
@@ -146,7 +78,7 @@
All built-in editor gizmos return a priority of [code]-1[/code]. If not overridden, this method will return [code]0[/code], which means custom gizmos will automatically override built-in gizmos.
</description>
</method>
- <method name="has_gizmo" qualifiers="virtual">
+ <method name="_has_gizmo" qualifiers="virtual">
<return type="bool">
</return>
<argument index="0" name="spatial" type="Node3D">
@@ -155,7 +87,7 @@
Override this method to define which Node3D nodes have a gizmo from this plugin. Whenever a [Node3D] node is added to a scene this method is called, if it returns [code]true[/code] the node gets a generic [EditorNode3DGizmo] assigned and is added to this plugin's list of active gizmos.
</description>
</method>
- <method name="is_handle_highlighted" qualifiers="virtual">
+ <method name="_is_handle_highlighted" qualifiers="virtual">
<return type="bool">
</return>
<argument index="0" name="gizmo" type="EditorNode3DGizmo">
@@ -166,14 +98,14 @@
Gets whether a handle is highlighted or not. Called for this plugin's active gizmos.
</description>
</method>
- <method name="is_selectable_when_hidden" qualifiers="virtual">
+ <method name="_is_selectable_when_hidden" qualifiers="virtual">
<return type="bool">
</return>
<description>
Override this method to define whether Node3D with this gizmo should be selectable even when the gizmo is hidden.
</description>
</method>
- <method name="redraw" qualifiers="virtual">
+ <method name="_redraw" qualifiers="virtual">
<return type="void">
</return>
<argument index="0" name="gizmo" type="EditorNode3DGizmo">
@@ -182,7 +114,7 @@
Callback to redraw the provided gizmo. Called for this plugin's active gizmos.
</description>
</method>
- <method name="set_handle" qualifiers="virtual">
+ <method name="_set_handle" qualifiers="virtual">
<return type="void">
</return>
<argument index="0" name="gizmo" type="EditorNode3DGizmo">
@@ -197,6 +129,74 @@
Update the value of a handle after it has been updated. Called for this plugin's active gizmos.
</description>
</method>
+ <method name="add_material">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="material" type="StandardMaterial3D">
+ </argument>
+ <description>
+ Adds a new material to the internal material list for the plugin. It can then be accessed with [method get_material]. Should not be overridden.
+ </description>
+ </method>
+ <method name="create_handle_material">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="billboard" type="bool" default="false">
+ </argument>
+ <argument index="2" name="texture" type="Texture2D" default="null">
+ </argument>
+ <description>
+ Creates a handle material with its variants (selected and/or editable) and adds them to the internal material list. They can then be accessed with [method get_material] and used in [method EditorNode3DGizmo.add_handles]. Should not be overridden.
+ You can optionally provide a texture to use instead of the default icon.
+ </description>
+ </method>
+ <method name="create_icon_material">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="texture" type="Texture2D">
+ </argument>
+ <argument index="2" name="on_top" type="bool" default="false">
+ </argument>
+ <argument index="3" name="color" type="Color" default="Color(1, 1, 1, 1)">
+ </argument>
+ <description>
+ Creates an icon material with its variants (selected and/or editable) and adds them to the internal material list. They can then be accessed with [method get_material] and used in [method EditorNode3DGizmo.add_unscaled_billboard]. Should not be overridden.
+ </description>
+ </method>
+ <method name="create_material">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="color" type="Color">
+ </argument>
+ <argument index="2" name="billboard" type="bool" default="false">
+ </argument>
+ <argument index="3" name="on_top" type="bool" default="false">
+ </argument>
+ <argument index="4" name="use_vertex_color" type="bool" default="false">
+ </argument>
+ <description>
+ Creates an unshaded material with its variants (selected and/or editable) and adds them to the internal material list. They can then be accessed with [method get_material] and used in [method EditorNode3DGizmo.add_mesh] and [method EditorNode3DGizmo.add_lines]. Should not be overridden.
+ </description>
+ </method>
+ <method name="get_material">
+ <return type="StandardMaterial3D">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="gizmo" type="EditorNode3DGizmo" default="null">
+ </argument>
+ <description>
+ Gets material from the internal list of materials. If an [EditorNode3DGizmo] is provided, it will try to get the corresponding variant (selected and/or editable).
+ </description>
+ </method>
</methods>
<constants>
</constants>
diff --git a/doc/classes/EditorPaths.xml b/doc/classes/EditorPaths.xml
new file mode 100644
index 0000000000..d0d785dbb8
--- /dev/null
+++ b/doc/classes/EditorPaths.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="EditorPaths" inherits="Object" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="get_cache_dir" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_config_dir" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_data_dir" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_self_contained_file" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_self_contained" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/EditorPlugin.xml b/doc/classes/EditorPlugin.xml
index 61f1761249..a02d318f70 100644
--- a/doc/classes/EditorPlugin.xml
+++ b/doc/classes/EditorPlugin.xml
@@ -10,154 +10,7 @@
<link title="Editor plugins tutorial index">https://docs.godotengine.org/en/latest/tutorials/plugins/editor/index.html</link>
</tutorials>
<methods>
- <method name="add_autoload_singleton">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="path" type="String">
- </argument>
- <description>
- Adds a script at [code]path[/code] to the Autoload list as [code]name[/code].
- </description>
- </method>
- <method name="add_control_to_bottom_panel">
- <return type="Button">
- </return>
- <argument index="0" name="control" type="Control">
- </argument>
- <argument index="1" name="title" type="String">
- </argument>
- <description>
- Adds a control to the bottom panel (together with Output, Debug, Animation, etc). Returns a reference to the button added. It's up to you to hide/show the button when needed. When your plugin is deactivated, make sure to remove your custom control with [method remove_control_from_bottom_panel] and free it with [method Node.queue_free].
- </description>
- </method>
- <method name="add_control_to_container">
- <return type="void">
- </return>
- <argument index="0" name="container" type="int" enum="EditorPlugin.CustomControlContainer">
- </argument>
- <argument index="1" name="control" type="Control">
- </argument>
- <description>
- Adds a custom control to a container (see [enum CustomControlContainer]). There are many locations where custom controls can be added in the editor UI.
- Please remember that you have to manage the visibility of your custom controls yourself (and likely hide it after adding it).
- When your plugin is deactivated, make sure to remove your custom control with [method remove_control_from_container] and free it with [method Node.queue_free].
- </description>
- </method>
- <method name="add_control_to_dock">
- <return type="void">
- </return>
- <argument index="0" name="slot" type="int" enum="EditorPlugin.DockSlot">
- </argument>
- <argument index="1" name="control" type="Control">
- </argument>
- <description>
- Adds the control to a specific dock slot (see [enum DockSlot] for options).
- If the dock is repositioned and as long as the plugin is active, the editor will save the dock position on further sessions.
- When your plugin is deactivated, make sure to remove your custom control with [method remove_control_from_docks] and free it with [method Node.queue_free].
- </description>
- </method>
- <method name="add_custom_type">
- <return type="void">
- </return>
- <argument index="0" name="type" type="String">
- </argument>
- <argument index="1" name="base" type="String">
- </argument>
- <argument index="2" name="script" type="Script">
- </argument>
- <argument index="3" name="icon" type="Texture2D">
- </argument>
- <description>
- Adds a custom type, which will appear in the list of nodes or resources. An icon can be optionally passed.
- When given node or resource is selected, the base type will be instanced (e.g. "Node3D", "Control", "Resource"), then the script will be loaded and set to this object.
- You can use the virtual method [method handles] to check if your custom object is being edited by checking the script or using the [code]is[/code] keyword.
- During run-time, this will be a simple object with a script so this function does not need to be called then.
- </description>
- </method>
- <method name="add_debugger_plugin">
- <return type="void">
- </return>
- <argument index="0" name="script" type="Script">
- </argument>
- <description>
- Adds a [Script] as debugger plugin to the Debugger. The script must extend [EditorDebuggerPlugin].
- </description>
- </method>
- <method name="add_export_plugin">
- <return type="void">
- </return>
- <argument index="0" name="plugin" type="EditorExportPlugin">
- </argument>
- <description>
- Registers a new export plugin. Export plugins are used when the project is being exported. See [EditorExportPlugin] for more information.
- </description>
- </method>
- <method name="add_import_plugin">
- <return type="void">
- </return>
- <argument index="0" name="importer" type="EditorImportPlugin">
- </argument>
- <description>
- </description>
- </method>
- <method name="add_inspector_plugin">
- <return type="void">
- </return>
- <argument index="0" name="plugin" type="EditorInspectorPlugin">
- </argument>
- <description>
- </description>
- </method>
- <method name="add_scene_import_plugin">
- <return type="void">
- </return>
- <argument index="0" name="scene_importer" type="EditorSceneImporter">
- </argument>
- <description>
- </description>
- </method>
- <method name="add_spatial_gizmo_plugin">
- <return type="void">
- </return>
- <argument index="0" name="plugin" type="EditorNode3DGizmoPlugin">
- </argument>
- <description>
- </description>
- </method>
- <method name="add_tool_menu_item">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="callable" type="Callable">
- </argument>
- <description>
- Adds a custom menu item to [b]Project &gt; Tools[/b] named [code]name[/code]. When clicked, the provided [code]callable[/code] will be called.
- </description>
- </method>
- <method name="add_tool_submenu_item">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="submenu" type="Object">
- </argument>
- <description>
- Adds a custom submenu under [b]Project &gt; Tools &gt;[/b] [code]name[/code]. [code]submenu[/code] should be an object of class [PopupMenu]. Use [code]remove_tool_menu_item(name)[/code] on plugin clean up to remove the menu.
- </description>
- </method>
- <method name="add_translation_parser_plugin">
- <return type="void">
- </return>
- <argument index="0" name="parser" type="EditorTranslationParserPlugin">
- </argument>
- <description>
- Registers a custom translation parser plugin for extracting translatable strings from custom files.
- </description>
- </method>
- <method name="apply_changes" qualifiers="virtual">
+ <method name="_apply_changes" qualifiers="virtual">
<return type="void">
</return>
<description>
@@ -165,29 +18,29 @@
This is used, for example, in shader editors to let the plugin know that it must apply the shader code being written by the user to the object.
</description>
</method>
- <method name="build" qualifiers="virtual">
+ <method name="_build" qualifiers="virtual">
<return type="bool">
</return>
<description>
This method is called when the editor is about to run the project. The plugin can then perform required operations before the project runs.
- This method must return a boolean. If this method returns [code]false[/code], the project will not run. The run is aborted immediately, so this also prevents all other plugins' [method build] methods from running.
+ This method must return a boolean. If this method returns [code]false[/code], the project will not run. The run is aborted immediately, so this also prevents all other plugins' [method _build] methods from running.
</description>
</method>
- <method name="clear" qualifiers="virtual">
+ <method name="_clear" qualifiers="virtual">
<return type="void">
</return>
<description>
Clear all the state and reset the object being edited to zero. This ensures your plugin does not keep editing a currently existing node, or a node from the wrong scene.
</description>
</method>
- <method name="disable_plugin" qualifiers="virtual">
+ <method name="_disable_plugin" qualifiers="virtual">
<return type="void">
</return>
<description>
Called by the engine when the user disables the [EditorPlugin] in the Plugin tab of the project settings window.
</description>
</method>
- <method name="edit" qualifiers="virtual">
+ <method name="_edit" qualifiers="virtual">
<return type="void">
</return>
<argument index="0" name="object" type="Object">
@@ -196,14 +49,14 @@
This function is used for plugins that edit specific object types (nodes or resources). It requests the editor to edit the given object.
</description>
</method>
- <method name="enable_plugin" qualifiers="virtual">
+ <method name="_enable_plugin" qualifiers="virtual">
<return type="void">
</return>
<description>
Called by the engine when the user enables the [EditorPlugin] in the Plugin tab of the project settings window.
</description>
</method>
- <method name="forward_canvas_draw_over_viewport" qualifiers="virtual">
+ <method name="_forward_canvas_draw_over_viewport" qualifiers="virtual">
<return type="void">
</return>
<argument index="0" name="overlay" type="Control">
@@ -212,11 +65,11 @@
Called by the engine when the 2D editor's viewport is updated. Use the [code]overlay[/code] [Control] for drawing. You can update the viewport manually by calling [method update_overlays].
[codeblocks]
[gdscript]
- func forward_canvas_draw_over_viewport(overlay):
+ func _forward_canvas_draw_over_viewport(overlay):
# Draw a circle at cursor position.
overlay.draw_circle(overlay.get_local_mouse_position(), 64, Color.white)
- func forward_canvas_gui_input(event):
+ func _forward_canvas_gui_input(event):
if event is InputEventMouseMotion:
# Redraw viewport when cursor is moved.
update_overlays()
@@ -243,27 +96,27 @@
[/codeblocks]
</description>
</method>
- <method name="forward_canvas_force_draw_over_viewport" qualifiers="virtual">
+ <method name="_forward_canvas_force_draw_over_viewport" qualifiers="virtual">
<return type="void">
</return>
<argument index="0" name="overlay" type="Control">
</argument>
<description>
- This method is the same as [method forward_canvas_draw_over_viewport], except it draws on top of everything. Useful when you need an extra layer that shows over anything else.
+ This method is the same as [method _forward_canvas_draw_over_viewport], except it draws on top of everything. Useful when you need an extra layer that shows over anything else.
You need to enable calling of this method by using [method set_force_draw_over_forwarding_enabled].
</description>
</method>
- <method name="forward_canvas_gui_input" qualifiers="virtual">
+ <method name="_forward_canvas_gui_input" qualifiers="virtual">
<return type="bool">
</return>
<argument index="0" name="event" type="InputEvent">
</argument>
<description>
- Called when there is a root node in the current edited scene, [method handles] is implemented and an [InputEvent] happens in the 2D viewport. Intercepts the [InputEvent], if [code]return true[/code] [EditorPlugin] consumes the [code]event[/code], otherwise forwards [code]event[/code] to other Editor classes. Example:
+ Called when there is a root node in the current edited scene, [method _handles] is implemented and an [InputEvent] happens in the 2D viewport. Intercepts the [InputEvent], if [code]return true[/code] [EditorPlugin] consumes the [code]event[/code], otherwise forwards [code]event[/code] to other Editor classes. Example:
[codeblocks]
[gdscript]
# Prevents the InputEvent to reach other Editor classes
- func forward_canvas_gui_input(event):
+ func _forward_canvas_gui_input(event):
return true
[/gdscript]
[csharp]
@@ -278,7 +131,7 @@
[codeblocks]
[gdscript]
# Consumes InputEventMouseMotion and forwards other InputEvent types.
- func forward_canvas_gui_input(event):
+ func _forward_canvas_gui_input(event):
return event is InputEventMouseMotion
[/gdscript]
[csharp]
@@ -291,7 +144,7 @@
[/codeblocks]
</description>
</method>
- <method name="forward_spatial_draw_over_viewport" qualifiers="virtual">
+ <method name="_forward_spatial_draw_over_viewport" qualifiers="virtual">
<return type="void">
</return>
<argument index="0" name="overlay" type="Control">
@@ -300,11 +153,11 @@
Called by the engine when the 3D editor's viewport is updated. Use the [code]overlay[/code] [Control] for drawing. You can update the viewport manually by calling [method update_overlays].
[codeblocks]
[gdscript]
- func forward_spatial_draw_over_viewport(overlay):
+ func _forward_spatial_draw_over_viewport(overlay):
# Draw a circle at cursor position.
overlay.draw_circle(overlay.get_local_mouse_position(), 64)
- func forward_spatial_gui_input(camera, event):
+ func _forward_spatial_gui_input(camera, event):
if event is InputEventMouseMotion:
# Redraw viewport when cursor is moved.
update_overlays()
@@ -331,17 +184,17 @@
[/codeblocks]
</description>
</method>
- <method name="forward_spatial_force_draw_over_viewport" qualifiers="virtual">
+ <method name="_forward_spatial_force_draw_over_viewport" qualifiers="virtual">
<return type="void">
</return>
<argument index="0" name="overlay" type="Control">
</argument>
<description>
- This method is the same as [method forward_spatial_draw_over_viewport], except it draws on top of everything. Useful when you need an extra layer that shows over anything else.
+ This method is the same as [method _forward_spatial_draw_over_viewport], except it draws on top of everything. Useful when you need an extra layer that shows over anything else.
You need to enable calling of this method by using [method set_force_draw_over_forwarding_enabled].
</description>
</method>
- <method name="forward_spatial_gui_input" qualifiers="virtual">
+ <method name="_forward_spatial_gui_input" qualifiers="virtual">
<return type="bool">
</return>
<argument index="0" name="camera" type="Camera3D">
@@ -349,11 +202,11 @@
<argument index="1" name="event" type="InputEvent">
</argument>
<description>
- Called when there is a root node in the current edited scene, [method handles] is implemented and an [InputEvent] happens in the 3D viewport. Intercepts the [InputEvent], if [code]return true[/code] [EditorPlugin] consumes the [code]event[/code], otherwise forwards [code]event[/code] to other Editor classes. Example:
+ Called when there is a root node in the current edited scene, [method _handles] is implemented and an [InputEvent] happens in the 3D viewport. Intercepts the [InputEvent], if [code]return true[/code] [EditorPlugin] consumes the [code]event[/code], otherwise forwards [code]event[/code] to other Editor classes. Example:
[codeblocks]
[gdscript]
# Prevents the InputEvent to reach other Editor classes.
- func forward_spatial_gui_input(camera, event):
+ func _forward_spatial_gui_input(camera, event):
return true
[/gdscript]
[csharp]
@@ -368,7 +221,7 @@
[codeblocks]
[gdscript]
# Consumes InputEventMouseMotion and forwards other InputEvent types.
- func forward_spatial_gui_input(camera, event):
+ func _forward_spatial_gui_input(camera, event):
return event is InputEventMouseMotion
[/gdscript]
[csharp]
@@ -381,21 +234,14 @@
[/codeblocks]
</description>
</method>
- <method name="get_breakpoints" qualifiers="virtual">
+ <method name="_get_breakpoints" qualifiers="virtual">
<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].
</description>
</method>
- <method name="get_editor_interface">
- <return type="EditorInterface">
- </return>
- <description>
- Returns the [EditorInterface] object that gives you control over Godot editor's window and its functionalities.
- </description>
- </method>
- <method name="get_plugin_icon" qualifiers="virtual">
+ <method name="_get_plugin_icon" qualifiers="virtual">
<return type="Texture2D">
</return>
<description>
@@ -404,7 +250,7 @@
Ideally, the plugin icon should be white with a transparent background and 16x16 pixels in size.
[codeblocks]
[gdscript]
- func get_plugin_icon():
+ func _get_plugin_icon():
# You can use a custom icon:
return preload("res://addons/my_plugin/my_plugin_icon.svg")
# Or use a built-in icon:
@@ -422,7 +268,7 @@
[/codeblocks]
</description>
</method>
- <method name="get_plugin_name" qualifiers="virtual">
+ <method name="_get_plugin_name" qualifiers="virtual">
<return type="String">
</return>
<description>
@@ -430,75 +276,285 @@
For main screen plugins, this appears at the top of the screen, to the right of the "2D", "3D", "Script", and "AssetLib" buttons.
</description>
</method>
- <method name="get_script_create_dialog">
- <return type="ScriptCreateDialog">
+ <method name="_get_state" qualifiers="virtual">
+ <return type="Dictionary">
</return>
<description>
- Gets the Editor's dialogue used for making scripts.
- [b]Note:[/b] Users can configure it before use.
+ Gets the state of your plugin editor. This is used when saving the scene (so state is kept when opening it again) and for switching tabs (so state can be restored when the tab returns).
</description>
</method>
- <method name="get_state" qualifiers="virtual">
- <return type="Dictionary">
+ <method name="_get_window_layout" qualifiers="virtual">
+ <return type="void">
</return>
+ <argument index="0" name="layout" type="ConfigFile">
+ </argument>
<description>
- Gets the state of your plugin editor. This is used when saving the scene (so state is kept when opening it again) and for switching tabs (so state can be restored when the tab returns).
+ Gets the GUI layout of the plugin. This is used to save the project's editor layout when [method queue_save_layout] is called or the editor layout was changed(For example changing the position of a dock).
</description>
</method>
- <method name="get_undo_redo">
- <return type="UndoRedo">
+ <method name="_handles" qualifiers="virtual">
+ <return type="bool">
</return>
+ <argument index="0" name="object" type="Object">
+ </argument>
<description>
- Gets the undo/redo object. Most actions in the editor can be undoable, so use this object to make sure this happens when it's worth it.
+ Implement this function if your plugin edits a specific type of object (Resource or Node). If you return [code]true[/code], then you will get the functions [method _edit] and [method _make_visible] called when the editor requests them. If you have declared the methods [method _forward_canvas_gui_input] and [method _forward_spatial_gui_input] these will be called too.
+ </description>
+ </method>
+ <method name="_has_main_screen" qualifiers="virtual">
+ <return type="bool">
+ </return>
+ <description>
+ Returns [code]true[/code] if this is a main screen editor plugin (it goes in the workspace selector together with [b]2D[/b], [b]3D[/b], [b]Script[/b] and [b]AssetLib[/b]).
+ </description>
+ </method>
+ <method name="_make_visible" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <argument index="0" name="visible" type="bool">
+ </argument>
+ <description>
+ This function will be called when the editor is requested to become visible. It is used for plugins that edit a specific object type.
+ Remember that you have to manage the visibility of all your editor controls manually.
+ </description>
+ </method>
+ <method name="_save_external_data" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <description>
+ This method is called after the editor saves the project or when it's closed. It asks the plugin to save edited external scenes/resources.
+ </description>
+ </method>
+ <method name="_set_state" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <argument index="0" name="state" type="Dictionary">
+ </argument>
+ <description>
+ Restore the state saved by [method _get_state].
</description>
</method>
- <method name="get_window_layout" qualifiers="virtual">
+ <method name="_set_window_layout" qualifiers="virtual">
<return type="void">
</return>
<argument index="0" name="layout" type="ConfigFile">
</argument>
<description>
- Gets the GUI layout of the plugin. This is used to save the project's editor layout when [method queue_save_layout] is called or the editor layout was changed(For example changing the position of a dock).
+ Restore the plugin GUI layout saved by [method _get_window_layout].
</description>
</method>
- <method name="handles" qualifiers="virtual">
- <return type="bool">
+ <method name="add_autoload_singleton">
+ <return type="void">
</return>
- <argument index="0" name="object" type="Object">
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="path" type="String">
</argument>
<description>
- Implement this function if your plugin edits a specific type of object (Resource or Node). If you return [code]true[/code], then you will get the functions [method edit] and [method make_visible] called when the editor requests them. If you have declared the methods [method forward_canvas_gui_input] and [method forward_spatial_gui_input] these will be called too.
+ Adds a script at [code]path[/code] to the Autoload list as [code]name[/code].
</description>
</method>
- <method name="has_main_screen" qualifiers="virtual">
- <return type="bool">
+ <method name="add_control_to_bottom_panel">
+ <return type="Button">
</return>
+ <argument index="0" name="control" type="Control">
+ </argument>
+ <argument index="1" name="title" type="String">
+ </argument>
<description>
- Returns [code]true[/code] if this is a main screen editor plugin (it goes in the workspace selector together with [b]2D[/b], [b]3D[/b], [b]Script[/b] and [b]AssetLib[/b]).
+ Adds a control to the bottom panel (together with Output, Debug, Animation, etc). Returns a reference to the button added. It's up to you to hide/show the button when needed. When your plugin is deactivated, make sure to remove your custom control with [method remove_control_from_bottom_panel] and free it with [method Node.queue_free].
</description>
</method>
- <method name="hide_bottom_panel">
+ <method name="add_control_to_container">
<return type="void">
</return>
+ <argument index="0" name="container" type="int" enum="EditorPlugin.CustomControlContainer">
+ </argument>
+ <argument index="1" name="control" type="Control">
+ </argument>
<description>
+ Adds a custom control to a container (see [enum CustomControlContainer]). There are many locations where custom controls can be added in the editor UI.
+ Please remember that you have to manage the visibility of your custom controls yourself (and likely hide it after adding it).
+ When your plugin is deactivated, make sure to remove your custom control with [method remove_control_from_container] and free it with [method Node.queue_free].
</description>
</method>
- <method name="make_bottom_panel_item_visible">
+ <method name="add_control_to_dock">
<return type="void">
</return>
- <argument index="0" name="item" type="Control">
+ <argument index="0" name="slot" type="int" enum="EditorPlugin.DockSlot">
+ </argument>
+ <argument index="1" name="control" type="Control">
</argument>
<description>
+ Adds the control to a specific dock slot (see [enum DockSlot] for options).
+ If the dock is repositioned and as long as the plugin is active, the editor will save the dock position on further sessions.
+ When your plugin is deactivated, make sure to remove your custom control with [method remove_control_from_docks] and free it with [method Node.queue_free].
</description>
</method>
- <method name="make_visible" qualifiers="virtual">
+ <method name="add_custom_type">
<return type="void">
</return>
- <argument index="0" name="visible" type="bool">
+ <argument index="0" name="type" type="String">
+ </argument>
+ <argument index="1" name="base" type="String">
+ </argument>
+ <argument index="2" name="script" type="Script">
+ </argument>
+ <argument index="3" name="icon" type="Texture2D">
+ </argument>
+ <description>
+ Adds a custom type, which will appear in the list of nodes or resources. An icon can be optionally passed.
+ When given node or resource is selected, the base type will be instantiated (e.g. "Node3D", "Control", "Resource"), then the script will be loaded and set to this object.
+ You can use the virtual method [method _handles] to check if your custom object is being edited by checking the script or using the [code]is[/code] keyword.
+ During run-time, this will be a simple object with a script so this function does not need to be called then.
+ </description>
+ </method>
+ <method name="add_debugger_plugin">
+ <return type="void">
+ </return>
+ <argument index="0" name="script" type="Script">
+ </argument>
+ <description>
+ Adds a [Script] as debugger plugin to the Debugger. The script must extend [EditorDebuggerPlugin].
+ </description>
+ </method>
+ <method name="add_export_plugin">
+ <return type="void">
+ </return>
+ <argument index="0" name="plugin" type="EditorExportPlugin">
+ </argument>
+ <description>
+ Registers a new [EditorExportPlugin]. Export plugins are used to perform tasks when the project is being exported.
+ See [method add_inspector_plugin] for an example of how to register a plugin.
+ </description>
+ </method>
+ <method name="add_import_plugin">
+ <return type="void">
+ </return>
+ <argument index="0" name="importer" type="EditorImportPlugin">
+ </argument>
+ <description>
+ Registers a new [EditorImportPlugin]. Import plugins are used to import custom and unsupported assets as a custom [Resource] type.
+ [b]Note:[/b] If you want to import custom 3D asset formats use [method add_scene_import_plugin] instead.
+ See [method add_inspector_plugin] for an example of how to register a plugin.
+ </description>
+ </method>
+ <method name="add_inspector_plugin">
+ <return type="void">
+ </return>
+ <argument index="0" name="plugin" type="EditorInspectorPlugin">
+ </argument>
+ <description>
+ Registers a new [EditorInspectorPlugin]. Inspector plugins are used to extend [EditorInspector] and provide custom configuration tools for your object's properties.
+ [b]Note:[/b] Always use [method remove_inspector_plugin] to remove the registered [EditorInspectorPlugin] when your [EditorPlugin] is disabled to prevent leaks and an unexpected behavior.
+ [codeblocks]
+ [gdscript]
+ const MyInspectorPlugin = preload("res://addons/your_addon/path/to/your/script.gd")
+ var inspector_plugin = MyInspectorPlugin.new()
+
+ func _enter_tree():
+ add_inspector_plugin(inspector_plugin)
+
+ func _exit_tree():
+ remove_inspector_plugin(inspector_plugin)
+ [/gdscript]
+ [/codeblocks]
+ </description>
+ </method>
+ <method name="add_scene_import_plugin">
+ <return type="void">
+ </return>
+ <argument index="0" name="scene_importer" type="EditorSceneImporter">
+ </argument>
+ <description>
+ Registers a new [EditorSceneImporter]. Scene importers are used to import custom 3D asset formats as scenes.
+ </description>
+ </method>
+ <method name="add_spatial_gizmo_plugin">
+ <return type="void">
+ </return>
+ <argument index="0" name="plugin" type="EditorNode3DGizmoPlugin">
+ </argument>
+ <description>
+ Registers a new [EditorNode3DGizmoPlugin]. Gizmo plugins are used to add custom gizmos to the 3D preview viewport for a [Node3D].
+ See [method add_inspector_plugin] for an example of how to register a plugin.
+ </description>
+ </method>
+ <method name="add_tool_menu_item">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="callable" type="Callable">
+ </argument>
+ <description>
+ Adds a custom menu item to [b]Project &gt; Tools[/b] named [code]name[/code]. When clicked, the provided [code]callable[/code] will be called.
+ </description>
+ </method>
+ <method name="add_tool_submenu_item">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="submenu" type="Object">
+ </argument>
+ <description>
+ Adds a custom submenu under [b]Project &gt; Tools &gt;[/b] [code]name[/code]. [code]submenu[/code] should be an object of class [PopupMenu]. Use [code]remove_tool_menu_item(name)[/code] on plugin clean up to remove the menu.
+ </description>
+ </method>
+ <method name="add_translation_parser_plugin">
+ <return type="void">
+ </return>
+ <argument index="0" name="parser" type="EditorTranslationParserPlugin">
+ </argument>
+ <description>
+ Registers a custom translation parser plugin for extracting translatable strings from custom files.
+ </description>
+ </method>
+ <method name="add_undo_redo_inspector_hook_callback">
+ <return type="void">
+ </return>
+ <argument index="0" name="callable" type="Callable">
+ </argument>
+ <description>
+ Hooks a callback into the undo/redo action creation when a property is modified in the inspector. This allows, for example, to save other properties that may be lost when a given property is modified.
+ The callback should have 4 arguments: [Object] [code]undo_redo[/code], [Object] [code]modified_object[/code], [String] [code]property[/code] and [Variant] [code]new_value[/code]. They are, respectively, the [UndoRedo] object used by the inspector, the currently modified object, the name of the modified property and the new value the property is about to take.
+ </description>
+ </method>
+ <method name="get_editor_interface">
+ <return type="EditorInterface">
+ </return>
+ <description>
+ Returns the [EditorInterface] object that gives you control over Godot editor's window and its functionalities.
+ </description>
+ </method>
+ <method name="get_script_create_dialog">
+ <return type="ScriptCreateDialog">
+ </return>
+ <description>
+ Gets the Editor's dialogue used for making scripts.
+ [b]Note:[/b] Users can configure it before use.
+ </description>
+ </method>
+ <method name="get_undo_redo">
+ <return type="UndoRedo">
+ </return>
+ <description>
+ Gets the undo/redo object. Most actions in the editor can be undoable, so use this object to make sure this happens when it's worth it.
+ </description>
+ </method>
+ <method name="hide_bottom_panel">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="make_bottom_panel_item_visible">
+ <return type="void">
+ </return>
+ <argument index="0" name="item" type="Control">
</argument>
<description>
- This function will be called when the editor is requested to become visible. It is used for plugins that edit a specific object type.
- Remember that you have to manage the visibility of all your editor controls manually.
</description>
</method>
<method name="queue_save_layout">
@@ -570,6 +626,7 @@
<argument index="0" name="plugin" type="EditorExportPlugin">
</argument>
<description>
+ Removes an export plugin registered by [method add_export_plugin].
</description>
</method>
<method name="remove_import_plugin">
@@ -578,6 +635,7 @@
<argument index="0" name="importer" type="EditorImportPlugin">
</argument>
<description>
+ Removes an import plugin registered by [method add_import_plugin].
</description>
</method>
<method name="remove_inspector_plugin">
@@ -586,6 +644,7 @@
<argument index="0" name="plugin" type="EditorInspectorPlugin">
</argument>
<description>
+ Removes an inspector plugin registered by [method add_import_plugin]
</description>
</method>
<method name="remove_scene_import_plugin">
@@ -594,6 +653,7 @@
<argument index="0" name="scene_importer" type="EditorSceneImporter">
</argument>
<description>
+ Removes a scene importer registered by [method add_scene_import_plugin].
</description>
</method>
<method name="remove_spatial_gizmo_plugin">
@@ -602,6 +662,7 @@
<argument index="0" name="plugin" type="EditorNode3DGizmoPlugin">
</argument>
<description>
+ Removes a gizmo plugin registered by [method add_spatial_gizmo_plugin].
</description>
</method>
<method name="remove_tool_menu_item">
@@ -619,53 +680,37 @@
<argument index="0" name="parser" type="EditorTranslationParserPlugin">
</argument>
<description>
- Removes a registered custom translation parser plugin.
+ Removes a custom translation parser plugin registered by [method add_translation_parser_plugin].
</description>
</method>
- <method name="save_external_data" qualifiers="virtual">
+ <method name="remove_undo_redo_inspector_hook_callback">
<return type="void">
</return>
+ <argument index="0" name="callable" type="Callable">
+ </argument>
<description>
- This method is called after the editor saves the project or when it's closed. It asks the plugin to save edited external scenes/resources.
+ Removes a callback previsously added by [method add_undo_redo_inspector_hook_callback].
</description>
</method>
<method name="set_force_draw_over_forwarding_enabled">
<return type="void">
</return>
<description>
- Enables calling of [method forward_canvas_force_draw_over_viewport] for the 2D editor and [method forward_spatial_force_draw_over_viewport] for the 3D editor when their viewports are updated. You need to call this method only once and it will work permanently for this plugin.
+ Enables calling of [method _forward_canvas_force_draw_over_viewport] for the 2D editor and [method _forward_spatial_force_draw_over_viewport] for the 3D editor when their viewports are updated. You need to call this method only once and it will work permanently for this plugin.
</description>
</method>
<method name="set_input_event_forwarding_always_enabled">
<return type="void">
</return>
<description>
- Use this method if you always want to receive inputs from 3D view screen inside [method forward_spatial_gui_input]. It might be especially usable if your plugin will want to use raycast in the scene.
- </description>
- </method>
- <method name="set_state" qualifiers="virtual">
- <return type="void">
- </return>
- <argument index="0" name="state" type="Dictionary">
- </argument>
- <description>
- Restore the state saved by [method get_state].
- </description>
- </method>
- <method name="set_window_layout" qualifiers="virtual">
- <return type="void">
- </return>
- <argument index="0" name="layout" type="ConfigFile">
- </argument>
- <description>
- Restore the plugin GUI layout saved by [method get_window_layout].
+ Use this method if you always want to receive inputs from 3D view screen inside [method _forward_spatial_gui_input]. It might be especially usable if your plugin will want to use raycast in the scene.
</description>
</method>
<method name="update_overlays" qualifiers="const">
<return type="int">
</return>
<description>
- Updates the overlays of the 2D and 3D editor viewport. Causes methods [method forward_canvas_draw_over_viewport], [method forward_canvas_force_draw_over_viewport], [method forward_spatial_draw_over_viewport] and [method forward_spatial_force_draw_over_viewport] to be called.
+ Updates the overlays of the 2D and 3D editor viewport. Causes methods [method _forward_canvas_draw_over_viewport], [method _forward_canvas_force_draw_over_viewport], [method _forward_spatial_draw_over_viewport] and [method _forward_spatial_force_draw_over_viewport] to be called.
</description>
</method>
</methods>
diff --git a/doc/classes/EditorProperty.xml b/doc/classes/EditorProperty.xml
index f568263ff8..549d2c1628 100644
--- a/doc/classes/EditorProperty.xml
+++ b/doc/classes/EditorProperty.xml
@@ -9,6 +9,13 @@
<tutorials>
</tutorials>
<methods>
+ <method name="_update_property" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <description>
+ When this virtual function is called, you must update your editor.
+ </description>
+ </method>
<method name="add_focusable">
<return type="void">
</return>
@@ -25,7 +32,7 @@
</argument>
<argument index="1" name="value" type="Variant">
</argument>
- <argument index="2" name="field" type="StringName" default="@&quot;&quot;">
+ <argument index="2" name="field" type="StringName" default="&amp;&quot;&quot;">
</argument>
<argument index="3" name="changing" type="bool" default="false">
</argument>
@@ -44,7 +51,7 @@
<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.
+ Gets the edited property. If your editor is for a single property (added via [method EditorInspectorPlugin._parse_property]), then this will return the property.
</description>
</method>
<method name="get_tooltip_text" qualifiers="const">
@@ -63,13 +70,6 @@
Adds controls with this function if you want them on the bottom (below the label).
</description>
</method>
- <method name="update_property" qualifiers="virtual">
- <return type="void">
- </return>
- <description>
- When this virtual function is called, you must update your editor.
- </description>
- </method>
</methods>
<members>
<member name="checkable" type="bool" setter="set_checkable" getter="is_checkable" default="false">
@@ -101,7 +101,7 @@
<argument index="1" name="value" type="Array">
</argument>
<description>
- Emit it if you want multiple properties modified at the same time. Do not use if added via [method EditorInspectorPlugin.parse_property].
+ Emit it if you want multiple properties modified at the same time. Do not use if added via [method EditorInspectorPlugin._parse_property].
</description>
</signal>
<signal name="object_id_selected">
diff --git a/doc/classes/EditorResourceConversionPlugin.xml b/doc/classes/EditorResourceConversionPlugin.xml
index 1976eb802c..1d7e98c99d 100644
--- a/doc/classes/EditorResourceConversionPlugin.xml
+++ b/doc/classes/EditorResourceConversionPlugin.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorResourceConversionPlugin" inherits="Reference" version="4.0">
+<class name="EditorResourceConversionPlugin" inherits="RefCounted" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/EditorResourcePicker.xml b/doc/classes/EditorResourcePicker.xml
new file mode 100644
index 0000000000..0029955819
--- /dev/null
+++ b/doc/classes/EditorResourcePicker.xml
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="EditorResourcePicker" inherits="HBoxContainer" version="4.0">
+ <brief_description>
+ Godot editor's control for selecting [Resource] type properties.
+ </brief_description>
+ <description>
+ This [Control] node is used in the editor's Inspector dock to allow editing of [Resource] type properties. It provides options for creating, loading, saving and converting resources. Can be used with [EditorInspectorPlugin] to recreate the same behavior.
+ [b]Note:[/b] This [Control] does not include any editor for the resource, as editing is controlled by the Inspector dock itself or sub-Inspectors.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="_handle_menu_selected" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <description>
+ This virtual method can be implemented to handle context menu items not handled by default. See [method _set_create_options].
+ </description>
+ </method>
+ <method name="_set_create_options" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <argument index="0" name="menu_node" type="Object">
+ </argument>
+ <description>
+ This virtual method is called when updating the context menu of [EditorResourcePicker]. Implement this method to override the "New ..." items with your own options. [code]menu_node[/code] is a reference to the [PopupMenu] node.
+ [b]Note:[/b] Implement [method _handle_menu_selected] to handle these custom items.
+ </description>
+ </method>
+ <method name="get_allowed_types" qualifiers="const">
+ <return type="PackedStringArray">
+ </return>
+ <description>
+ Returns a list of all allowed types and subtypes corresponding to the [member base_type]. If the [member base_type] is empty, an empty list is returned.
+ </description>
+ </method>
+ <method name="set_toggle_pressed">
+ <return type="void">
+ </return>
+ <argument index="0" name="pressed" type="bool">
+ </argument>
+ <description>
+ Sets the toggle mode state for the main button. Works only if [member toggle_mode] is set to [code]true[/code].
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="base_type" type="String" setter="set_base_type" getter="get_base_type" default="&quot;&quot;">
+ The base type of allowed resource types. Can be a comma-separated list of several options.
+ </member>
+ <member name="editable" type="bool" setter="set_editable" getter="is_editable" default="true">
+ If [code]true[/code], the value can be selected and edited.
+ </member>
+ <member name="edited_resource" type="Resource" setter="set_edited_resource" getter="get_edited_resource">
+ The edited resource value.
+ </member>
+ <member name="toggle_mode" type="bool" setter="set_toggle_mode" getter="is_toggle_mode" default="false">
+ If [code]true[/code], the main button with the resource preview works in the toggle mode. Use [method set_toggle_pressed] to manually set the state.
+ </member>
+ </members>
+ <signals>
+ <signal name="resource_changed">
+ <argument index="0" name="resource" type="Resource">
+ </argument>
+ <description>
+ Emitted when the value of the edited resource was changed.
+ </description>
+ </signal>
+ <signal name="resource_selected">
+ <argument index="0" name="resource" type="Resource">
+ </argument>
+ <description>
+ Emitted when the resource value was set and user clicked to edit it.
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/EditorResourcePreview.xml b/doc/classes/EditorResourcePreview.xml
index 0c1d969518..3239a75ada 100644
--- a/doc/classes/EditorResourcePreview.xml
+++ b/doc/classes/EditorResourcePreview.xml
@@ -40,7 +40,8 @@
<argument index="3" name="userdata" type="Variant">
</argument>
<description>
- Queue a resource being edited for preview (using an instance). Once the preview is ready, your receiver.receiver_func will be called either containing the preview texture or an empty texture (if no preview was possible). Callback must have the format: (path,texture,userdata). Userdata can be anything.
+ Queue the [code]resource[/code] being edited for preview. Once the preview is ready, the [code]receiver[/code]'s [code]receiver_func[/code] will be called. The [code]receiver_func[/code] must take the following four arguments: [String] path, [Texture2D] preview, [Texture2D] thumbnail_preview, [Variant] userdata. [code]userdata[/code] can be anything, and will be returned when [code]receiver_func[/code] is called.
+ [b]Note[/b]: If it was not possible to create the preview the [code]receiver_func[/code] will still be called, but the preview will be null.
</description>
</method>
<method name="queue_resource_preview">
@@ -55,7 +56,8 @@
<argument index="3" name="userdata" type="Variant">
</argument>
<description>
- Queue a resource file for preview (using a path). Once the preview is ready, your receiver.receiver_func will be called either containing the preview texture or an empty texture (if no preview was possible). Callback must have the format: (path,texture,userdata). Userdata can be anything.
+ Queue a resource file located at [code]path[/code] for preview. Once the preview is ready, the [code]receiver[/code]'s [code]receiver_func[/code] will be called. The [code]receiver_func[/code] must take the following four arguments: [String] path, [Texture2D] preview, [Texture2D] thumbnail_preview, [Variant] userdata. [code]userdata[/code] can be anything, and will be returned when [code]receiver_func[/code] is called.
+ [b]Note[/b]: If it was not possible to create the preview the [code]receiver_func[/code] will still be called, but the preview will be null.
</description>
</method>
<method name="remove_preview_generator">
diff --git a/doc/classes/EditorResourcePreviewGenerator.xml b/doc/classes/EditorResourcePreviewGenerator.xml
index e935bf19fc..3594474e36 100644
--- a/doc/classes/EditorResourcePreviewGenerator.xml
+++ b/doc/classes/EditorResourcePreviewGenerator.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorResourcePreviewGenerator" inherits="Reference" version="4.0">
+<class name="EditorResourcePreviewGenerator" inherits="RefCounted" version="4.0">
<brief_description>
Custom generator of previews.
</brief_description>
@@ -9,15 +9,15 @@
<tutorials>
</tutorials>
<methods>
- <method name="can_generate_small_preview" qualifiers="virtual">
+ <method name="_can_generate_small_preview" qualifiers="virtual">
<return type="bool">
</return>
<description>
- If this function returns [code]true[/code], the generator will call [method generate] or [method generate_from_path] for small previews as well.
+ If this function returns [code]true[/code], the generator will call [method _generate] or [method _generate_from_path] for small previews as well.
By default, it returns [code]false[/code].
</description>
</method>
- <method name="generate" qualifiers="virtual">
+ <method name="_generate" qualifiers="virtual">
<return type="Texture2D">
</return>
<argument index="0" name="from" type="Resource">
@@ -30,7 +30,7 @@
Care must be taken because this function is always called from a thread (not the main thread).
</description>
</method>
- <method name="generate_from_path" qualifiers="virtual">
+ <method name="_generate_from_path" qualifiers="virtual">
<return type="Texture2D">
</return>
<argument index="0" name="path" type="String">
@@ -38,20 +38,20 @@
<argument index="1" name="size" type="Vector2">
</argument>
<description>
- Generate a preview directly from a path with the specified size. Implementing this is optional, as default code will load and call [method generate].
+ Generate a preview directly from a path with the specified size. Implementing this is optional, as default code will load and call [method _generate].
Returning an empty texture is an OK way to fail and let another generator take care.
Care must be taken because this function is always called from a thread (not the main thread).
</description>
</method>
- <method name="generate_small_preview_automatically" qualifiers="virtual">
+ <method name="_generate_small_preview_automatically" qualifiers="virtual">
<return type="bool">
</return>
<description>
- If this function returns [code]true[/code], the generator will automatically generate the small previews from the normal preview texture generated by the methods [method generate] or [method generate_from_path].
+ If this function returns [code]true[/code], the generator will automatically generate the small previews from the normal preview texture generated by the methods [method _generate] or [method _generate_from_path].
By default, it returns [code]false[/code].
</description>
</method>
- <method name="handles" qualifiers="virtual">
+ <method name="_handles" qualifiers="virtual">
<return type="bool">
</return>
<argument index="0" name="type" type="String">
diff --git a/doc/classes/EditorSceneImporter.xml b/doc/classes/EditorSceneImporter.xml
index aa55a1653d..8df3091057 100644
--- a/doc/classes/EditorSceneImporter.xml
+++ b/doc/classes/EditorSceneImporter.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorSceneImporter" inherits="Reference" version="4.0">
+<class name="EditorSceneImporter" inherits="RefCounted" version="4.0">
<brief_description>
Imports scenes from third-parties' 3D files.
</brief_description>
diff --git a/doc/classes/EditorSceneImporterMesh.xml b/doc/classes/EditorSceneImporterMesh.xml
index 9daa3f16bc..90eca9072b 100644
--- a/doc/classes/EditorSceneImporterMesh.xml
+++ b/doc/classes/EditorSceneImporterMesh.xml
@@ -22,7 +22,7 @@
</argument>
<argument index="1" name="arrays" type="Array">
</argument>
- <argument index="2" name="blend_shapes" type="Array" default="[ ]">
+ <argument index="2" name="blend_shapes" type="Array" default="[]">
</argument>
<argument index="3" name="lods" type="Dictionary" default="{
}">
@@ -168,7 +168,7 @@
</method>
</methods>
<members>
- <member name="_data" type="Dictionary" setter="_set_data" getter="_get_data" default="{&quot;surfaces&quot;: [ ]}">
+ <member name="_data" type="Dictionary" setter="_set_data" getter="_get_data" default="{&quot;surfaces&quot;: []}">
</member>
</members>
<constants>
diff --git a/doc/classes/EditorScenePostImport.xml b/doc/classes/EditorScenePostImport.xml
index d1cdc4e43e..d2b5e84ff7 100644
--- a/doc/classes/EditorScenePostImport.xml
+++ b/doc/classes/EditorScenePostImport.xml
@@ -1,18 +1,18 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorScenePostImport" inherits="Reference" version="4.0">
+<class name="EditorScenePostImport" inherits="RefCounted" version="4.0">
<brief_description>
Post-processes scenes after import.
</brief_description>
<description>
Imported scenes can be automatically modified right after import by setting their [b]Custom Script[/b] Import property to a [code]tool[/code] script that inherits from this class.
- The [method post_import] callback receives the imported scene's root node and returns the modified version of the scene. Usage example:
+ The [method _post_import] callback receives the imported scene's root node and returns the modified version of the scene. Usage example:
[codeblocks]
[gdscript]
tool # Needed so it runs in editor.
extends EditorScenePostImport
# This sample changes all node names.
# Called right after the scene is imported and gets the root node.
- func post_import(scene):
+ func _post_import(scene):
# Change all node names to "modified_[oldnodename]"
iterate(scene)
return scene # Remember to return the imported scene
@@ -55,14 +55,7 @@
<link title="Importing 3D scenes: Custom script">https://docs.godotengine.org/en/latest/getting_started/workflow/assets/importing_scenes.html#custom-script</link>
</tutorials>
<methods>
- <method name="get_source_file" qualifiers="const">
- <return type="String">
- </return>
- <description>
- Returns the source file path which got imported (e.g. [code]res://scene.dae[/code]).
- </description>
- </method>
- <method name="post_import" qualifiers="virtual">
+ <method name="_post_import" qualifiers="virtual">
<return type="Object">
</return>
<argument index="0" name="scene" type="Object">
@@ -71,6 +64,13 @@
Called after the scene was imported. This method must return the modified version of the scene.
</description>
</method>
+ <method name="get_source_file" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ Returns the source file path which got imported (e.g. [code]res://scene.dae[/code]).
+ </description>
+ </method>
</methods>
<constants>
</constants>
diff --git a/doc/classes/EditorScript.xml b/doc/classes/EditorScript.xml
index 60ccf451b8..a91ea0eb14 100644
--- a/doc/classes/EditorScript.xml
+++ b/doc/classes/EditorScript.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorScript" inherits="Reference" version="4.0">
+<class name="EditorScript" inherits="RefCounted" version="4.0">
<brief_description>
Base script that can be used to add extension functions to the editor.
</brief_description>
diff --git a/doc/classes/EditorScriptPicker.xml b/doc/classes/EditorScriptPicker.xml
new file mode 100644
index 0000000000..8334676d92
--- /dev/null
+++ b/doc/classes/EditorScriptPicker.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="EditorScriptPicker" inherits="EditorResourcePicker" version="4.0">
+ <brief_description>
+ Godot editor's control for selecting the [code]script[/code] property of a [Node].
+ </brief_description>
+ <description>
+ Similar to [EditorResourcePicker] this [Control] node is used in the editor's Inspector dock, but only to edit the [code]script[/code] property of a [Node]. Default options for creating new resources of all possible subtypes are replaced with dedicated buttons that open the "Attach Node Script" dialog. Can be used with [EditorInspectorPlugin] to recreate the same behavior.
+ [b]Note:[/b] You must set the [member script_owner] for the custom context menu items to work.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <members>
+ <member name="script_owner" type="Node" setter="set_script_owner" getter="get_script_owner">
+ The owner [Node] of the script property that holds the edited resource.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/EditorSettings.xml b/doc/classes/EditorSettings.xml
index 016d0128eb..e732223516 100644
--- a/doc/classes/EditorSettings.xml
+++ b/doc/classes/EditorSettings.xml
@@ -124,15 +124,6 @@
Returns the value of the setting specified by [code]name[/code]. This is equivalent to using [method Object.get] on the EditorSettings instance.
</description>
</method>
- <method name="get_settings_dir" qualifiers="const">
- <return type="String">
- </return>
- <description>
- Gets the global settings path for the engine. Inside this path, you can find some standard paths such as:
- [code]settings/tmp[/code] - Used for temporary storage of files
- [code]settings/templates[/code] - Where export templates are located
- </description>
- </method>
<method name="has_setting" qualifiers="const">
<return type="bool">
</return>
diff --git a/doc/classes/EditorSpinSlider.xml b/doc/classes/EditorSpinSlider.xml
index 381f4fae04..935335943f 100644
--- a/doc/classes/EditorSpinSlider.xml
+++ b/doc/classes/EditorSpinSlider.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="EditorSpinSlider" inherits="Range" version="4.0">
<brief_description>
+ Godot editor's control for editing numeric values.
</brief_description>
<description>
+ This [Control] node is used in the editor's Inspector dock to allow editing of numeric values. Can be used with [EditorInspectorPlugin] to recreate the same behavior.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/EditorSyntaxHighlighter.xml b/doc/classes/EditorSyntaxHighlighter.xml
index b80e81928f..d81b25345f 100644
--- a/doc/classes/EditorSyntaxHighlighter.xml
+++ b/doc/classes/EditorSyntaxHighlighter.xml
@@ -5,7 +5,7 @@
</brief_description>
<description>
Base syntax highlighter resource all editor syntax highlighters extend from, it is used in the [ScriptEditor].
- Add a syntax highlighter to an individual script by calling [method ScriptEditorBase.add_syntax_highlighter]. To apply to all scripts on open, call [method ScriptEditor.register_syntax_highlighter]
+ Add a syntax highlighter to an individual script by calling [method ScriptEditorBase._add_syntax_highlighter]. To apply to all scripts on open, call [method ScriptEditor.register_syntax_highlighter]
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/EditorTranslationParserPlugin.xml b/doc/classes/EditorTranslationParserPlugin.xml
index c97459d9dc..a9f4e90e72 100644
--- a/doc/classes/EditorTranslationParserPlugin.xml
+++ b/doc/classes/EditorTranslationParserPlugin.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorTranslationParserPlugin" inherits="Reference" version="4.0">
+<class name="EditorTranslationParserPlugin" inherits="RefCounted" version="4.0">
<brief_description>
Plugin for adding custom parsers to extract strings that are to be translated from custom files (.csv, .json etc.).
</brief_description>
<description>
- Plugins are registered via [method EditorPlugin.add_translation_parser_plugin] method. To define the parsing and string extraction logic, override the [method parse_file] method in script.
+ Plugins are registered via [method EditorPlugin.add_translation_parser_plugin] method. To define the parsing and string extraction logic, override the [method _parse_file] method in script.
Add the extracted strings to argument [code]msgids[/code] or [code]msgids_context_plural[/code] if context or plural is used.
When adding to [code]msgids_context_plural[/code], you must add the data using the format [code]["A", "B", "C"][/code], where [code]A[/code] represents the extracted string, [code]B[/code] represents the context, and [code]C[/code] represents the plural version of the extracted string. If you want to add only context but not plural, put [code]""[/code] for the plural slot. The idea is the same if you only want to add plural but not context. See the code below for concrete examples.
The extracted strings will be written into a POT file selected by user under "POT Generation" in "Localization" tab in "Project Settings" menu.
@@ -14,7 +14,7 @@
tool
extends EditorTranslationParserPlugin
- func parse_file(path, msgids, msgids_context_plural):
+ func _parse_file(path, msgids, msgids_context_plural):
var file = File.new()
file.open(path, File.READ)
var text = file.get_as_text()
@@ -23,7 +23,7 @@
msgids.append(s)
#print("Extracted string: " + s)
- func get_recognized_extensions():
+ func _get_recognized_extensions():
return ["csv"]
[/gdscript]
[csharp]
@@ -76,12 +76,12 @@
For example:
[codeblocks]
[gdscript]
- func parse_file(path, msgids, msgids_context_plural):
+ func _parse_file(path, msgids, msgids_context_plural):
var res = ResourceLoader.load(path, "Script")
var text = res.source_code
# Parsing logic.
- func get_recognized_extensions():
+ func _get_recognized_extensions():
return ["gd"]
[/gdscript]
[csharp]
@@ -102,14 +102,14 @@
<tutorials>
</tutorials>
<methods>
- <method name="get_recognized_extensions" qualifiers="virtual">
+ <method name="_get_recognized_extensions" qualifiers="virtual">
<return type="Array">
</return>
<description>
Gets the list of file extensions to associate with this parser, e.g. [code]["csv"][/code].
</description>
</method>
- <method name="parse_file" qualifiers="virtual">
+ <method name="_parse_file" qualifiers="virtual">
<return type="void">
</return>
<argument index="0" name="path" type="String">
diff --git a/doc/classes/EncodedObjectAsID.xml b/doc/classes/EncodedObjectAsID.xml
index 1e4fde453b..e3e36590a3 100644
--- a/doc/classes/EncodedObjectAsID.xml
+++ b/doc/classes/EncodedObjectAsID.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EncodedObjectAsID" inherits="Reference" version="4.0">
+<class name="EncodedObjectAsID" inherits="RefCounted" version="4.0">
<brief_description>
Holds a reference to an [Object]'s instance ID.
</brief_description>
diff --git a/doc/classes/Engine.xml b/doc/classes/Engine.xml
index 9573e83cb4..c0a8407ece 100644
--- a/doc/classes/Engine.xml
+++ b/doc/classes/Engine.xml
@@ -171,6 +171,7 @@
</member>
<member name="physics_jitter_fix" type="float" setter="set_physics_jitter_fix" getter="get_physics_jitter_fix" default="0.5">
Controls how much physics ticks are synchronized with real time. For 0 or less, the ticks are synchronized. Such values are recommended for network games, where clock synchronization matters. Higher values cause higher deviation of in-game clock and real clock, but allows smoothing out framerate jitters. The default value of 0.5 should be fine for most; values above 2 could cause the game to react to dropped frames with a noticeable delay and are not recommended.
+ [b]Note:[/b] For best results, when using a custom physics interpolation solution, the physics jitter fix should be disabled by setting [member physics_jitter_fix] to [code]0[/code].
</member>
<member name="print_error_messages" type="bool" setter="set_print_error_messages" getter="is_printing_error_messages" default="true">
If [code]false[/code], stops printing error and warning messages to the console and editor Output log. This can be used to hide error and warning messages during unit test suite runs. This property is equivalent to the [member ProjectSettings.application/run/disable_stderr] project setting.
diff --git a/doc/classes/EngineDebugger.xml b/doc/classes/EngineDebugger.xml
index 7db36b89d0..50ccb6b075 100644
--- a/doc/classes/EngineDebugger.xml
+++ b/doc/classes/EngineDebugger.xml
@@ -61,7 +61,7 @@
</argument>
<argument index="1" name="enable" type="bool">
</argument>
- <argument index="2" name="arguments" type="Array" default="[ ]">
+ <argument index="2" name="arguments" type="Array" default="[]">
</argument>
<description>
Calls the [code]toggle[/code] callable of the profiler with given [code]name[/code] and [code]arguments[/code]. Enables/Disables the same profiler depending on [code]enable[/code] argument.
diff --git a/doc/classes/Environment.xml b/doc/classes/Environment.xml
index 6909fac2b7..ae87a62c84 100644
--- a/doc/classes/Environment.xml
+++ b/doc/classes/Environment.xml
@@ -55,13 +55,13 @@
<member name="adjustment_saturation" type="float" setter="set_adjustment_saturation" getter="get_adjustment_saturation" default="1.0">
The global color saturation value of the rendered scene (default value is 1). Effective only if [code]adjustment_enabled[/code] is [code]true[/code].
</member>
- <member name="ambient_light_color" type="Color" setter="set_ambient_light_color" getter="get_ambient_light_color" default="Color( 0, 0, 0, 1 )">
+ <member name="ambient_light_color" type="Color" setter="set_ambient_light_color" getter="get_ambient_light_color" default="Color(0, 0, 0, 1)">
The ambient light's [Color].
</member>
<member name="ambient_light_energy" type="float" setter="set_ambient_light_energy" getter="get_ambient_light_energy" default="1.0">
The ambient light's energy. The higher the value, the stronger the light.
</member>
- <member name="ambient_light_occlusion_color" type="Color" setter="set_ao_color" getter="get_ao_color" default="Color( 0, 0, 0, 1 )">
+ <member name="ambient_light_occlusion_color" type="Color" setter="set_ao_color" getter="get_ao_color" default="Color(0, 0, 0, 1)">
</member>
<member name="ambient_light_sky_contribution" type="float" setter="set_ambient_light_sky_contribution" getter="get_ambient_light_sky_contribution" default="1.0">
Defines the amount of light that the sky brings on the scene. A value of 0 means that the sky's light emission has no effect on the scene illumination, thus all ambient illumination is provided by the ambient light. On the contrary, a value of 1 means that all the light that affects the scene is provided by the sky, thus the ambient light parameter has no effect on the scene.
@@ -89,7 +89,7 @@
<member name="background_canvas_max_layer" type="int" setter="set_canvas_max_layer" getter="get_canvas_max_layer" default="0">
The maximum layer ID to display. Only effective when using the [constant BG_CANVAS] background mode.
</member>
- <member name="background_color" type="Color" setter="set_bg_color" getter="get_bg_color" default="Color( 0, 0, 0, 1 )">
+ <member name="background_color" type="Color" setter="set_bg_color" getter="get_bg_color" default="Color(0, 0, 0, 1)">
The [Color] displayed for clear areas of the scene. Only effective when using the [constant BG_COLOR] background mode.
</member>
<member name="background_energy" type="float" setter="set_bg_energy" getter="get_bg_energy" default="1.0">
@@ -111,7 +111,7 @@
</member>
<member name="fog_height_density" type="float" setter="set_fog_height_density" getter="get_fog_height_density" default="0.0">
</member>
- <member name="fog_light_color" type="Color" setter="set_fog_light_color" getter="get_fog_light_color" default="Color( 0.5, 0.6, 0.7, 1 )">
+ <member name="fog_light_color" type="Color" setter="set_fog_light_color" getter="get_fog_light_color" default="Color(0.5, 0.6, 0.7, 1)">
</member>
<member name="fog_light_energy" type="float" setter="set_fog_light_energy" getter="get_fog_light_energy" default="1.0">
</member>
@@ -200,13 +200,13 @@
</member>
<member name="sky_custom_fov" type="float" setter="set_sky_custom_fov" getter="get_sky_custom_fov" default="0.0">
</member>
- <member name="sky_rotation" type="Vector3" setter="set_sky_rotation" getter="get_sky_rotation" default="Vector3( 0, 0, 0 )">
+ <member name="sky_rotation" type="Vector3" setter="set_sky_rotation" getter="get_sky_rotation" default="Vector3(0, 0, 0)">
</member>
<member name="ss_reflections_depth_tolerance" type="float" setter="set_ssr_depth_tolerance" getter="get_ssr_depth_tolerance" default="0.2">
The depth tolerance for screen-space reflections.
</member>
<member name="ss_reflections_enabled" type="bool" setter="set_ssr_enabled" getter="is_ssr_enabled" default="false">
- If [code]true[/code], screen-space reflections are enabled. Screen-space reflections are more accurate than reflections from [GIProbe]s or [ReflectionProbe]s, but are slower and can't reflect surfaces occluded by others.
+ If [code]true[/code], screen-space reflections are enabled. Screen-space reflections are more accurate than reflections from [VoxelGI]s or [ReflectionProbe]s, but are slower and can't reflect surfaces occluded by others.
</member>
<member name="ss_reflections_fade_in" type="float" setter="set_ssr_fade_in" getter="get_ssr_fade_in" default="0.15">
The fade-in distance for screen-space reflections. Affects the area from the reflected material to the screen-space reflection).
@@ -263,7 +263,7 @@
</member>
<member name="volumetric_fog_length" type="float" setter="set_volumetric_fog_length" getter="get_volumetric_fog_length" default="64.0">
</member>
- <member name="volumetric_fog_light" type="Color" setter="set_volumetric_fog_light" getter="get_volumetric_fog_light" default="Color( 0, 0, 0, 1 )">
+ <member name="volumetric_fog_light" type="Color" setter="set_volumetric_fog_light" getter="get_volumetric_fog_light" default="Color(0, 0, 0, 1)">
</member>
<member name="volumetric_fog_light_energy" type="float" setter="set_volumetric_fog_light_energy" getter="get_volumetric_fog_light_energy" default="1.0">
</member>
diff --git a/doc/classes/Expression.xml b/doc/classes/Expression.xml
index d777c6fd9d..640b45dca4 100644
--- a/doc/classes/Expression.xml
+++ b/doc/classes/Expression.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Expression" inherits="Reference" version="4.0">
+<class name="Expression" inherits="RefCounted" version="4.0">
<brief_description>
A class that stores an expression you can execute.
</brief_description>
@@ -12,9 +12,9 @@
var expression = Expression.new()
func _ready():
- $LineEdit.connect("text_entered", self, "_on_text_entered")
+ $LineEdit.connect("text_submitted", self, "_on_text_submitted")
- func _on_text_entered(command):
+ func _on_text_submitted(command):
var error = expression.parse(command)
if error != OK:
print(expression.get_error_text())
@@ -28,7 +28,7 @@
public override void _Ready()
{
- GetNode("LineEdit").Connect("text_entered", this, nameof(OnTextEntered));
+ GetNode("LineEdit").Connect("text_submitted", this, nameof(OnTextEntered));
}
private void OnTextEntered(string command)
@@ -54,7 +54,7 @@
<method name="execute">
<return type="Variant">
</return>
- <argument index="0" name="inputs" type="Array" default="[ ]">
+ <argument index="0" name="inputs" type="Array" default="[]">
</argument>
<argument index="1" name="base_instance" type="Object" default="null">
</argument>
@@ -84,7 +84,7 @@
</return>
<argument index="0" name="expression" type="String">
</argument>
- <argument index="1" name="input_names" type="PackedStringArray" default="PackedStringArray( )">
+ <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 e0781e807f..7feaaa2040 100644
--- a/doc/classes/File.xml
+++ b/doc/classes/File.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="File" inherits="Reference" version="4.0">
+<class name="File" inherits="RefCounted" version="4.0">
<brief_description>
Type to handle file reading and writing operations.
</brief_description>
@@ -61,7 +61,7 @@
</return>
<description>
Returns [code]true[/code] if the file cursor has read past the end of the file.
- [b]Note:[/b] This function will still return [code]false[/code] while at the end of the file and only activates when reading past it. This can be confusing but it conforms to how low-level file access works in all operating systems. There is always [method get_len] and [method get_position] to implement a custom logic.
+ [b]Note:[/b] This function will still return [code]false[/code] while at the end of the file and only activates when reading past it. This can be confusing but it conforms to how low-level file access works in all operating systems. There is always [method get_length] and [method get_position] to implement a custom logic.
</description>
</method>
<method name="file_exists" qualifiers="const">
@@ -121,10 +121,10 @@
<method name="get_buffer" qualifiers="const">
<return type="PackedByteArray">
</return>
- <argument index="0" name="len" type="int">
+ <argument index="0" name="length" type="int">
</argument>
<description>
- Returns next [code]len[/code] bytes of the file as a [PackedByteArray].
+ Returns next [code]length[/code] bytes of the file as a [PackedByteArray].
</description>
</method>
<method name="get_csv_line" qualifiers="const">
@@ -158,7 +158,7 @@
Returns the next 32 bits from the file as a floating-point number.
</description>
</method>
- <method name="get_len" qualifiers="const">
+ <method name="get_length" qualifiers="const">
<return type="int">
</return>
<description>
@@ -188,7 +188,7 @@
<argument index="0" name="file" type="String">
</argument>
<description>
- Returns the last time the [code]file[/code] was modified in unix timestamp format or returns a [String] "ERROR IN [code]file[/code]". This unix timestamp can be converted to datetime by using [method OS.get_datetime_from_unix_time].
+ Returns the last time the [code]file[/code] was modified in Unix timestamp format or returns a [String] "ERROR IN [code]file[/code]". This Unix timestamp can be converted to another format using the [Time] singleton.
</description>
</method>
<method name="get_pascal_string">
@@ -275,6 +275,7 @@
</argument>
<description>
Opens a compressed file for reading or writing.
+ [b]Note:[/b] [method open_compressed] can only read files that were saved by Godot, not third-party compression formats. See [url=https://github.com/godotengine/godot/issues/28999]GitHub issue #28999[/url] for a workaround.
</description>
</method>
<method name="open_encrypted">
@@ -489,10 +490,10 @@
</method>
</methods>
<members>
- <member name="endian_swap" type="bool" setter="set_endian_swap" getter="get_endian_swap" default="false">
+ <member name="big_endian" type="bool" setter="set_big_endian" getter="is_big_endian" default="false">
If [code]true[/code], the file is read with big-endian [url=https://en.wikipedia.org/wiki/Endianness]endianness[/url]. If [code]false[/code], the file is read with little-endian endianness. If in doubt, leave this to [code]false[/code] as most files are written with little-endian endianness.
- [b]Note:[/b] [member endian_swap] is only about the file format, not the CPU type. The CPU endianness doesn't affect the default endianness for files written.
- [b]Note:[/b] This is always reset to [code]false[/code] whenever you open the file. Therefore, you must set [member endian_swap] [i]after[/i] opening the file, not before.
+ [b]Note:[/b] [member big_endian] is only about the file format, not the CPU type. The CPU endianness doesn't affect the default endianness for files written.
+ [b]Note:[/b] This is always reset to [code]false[/code] whenever you open the file. Therefore, you must set [member big_endian] [i]after[/i] opening the file, not before.
</member>
</members>
<constants>
diff --git a/doc/classes/FileDialog.xml b/doc/classes/FileDialog.xml
index 966be0a981..8ccee1c82e 100644
--- a/doc/classes/FileDialog.xml
+++ b/doc/classes/FileDialog.xml
@@ -72,7 +72,7 @@
<member name="file_mode" type="int" setter="set_file_mode" getter="get_file_mode" enum="FileDialog.FileMode" default="4">
The dialog's open or save mode, which affects the selection behavior. See [enum FileMode].
</member>
- <member name="filters" type="PackedStringArray" setter="set_filters" getter="get_filters" default="PackedStringArray( )">
+ <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_overrides_title" type="bool" setter="set_mode_overrides_title" getter="is_mode_overriding_title" default="true">
@@ -139,16 +139,16 @@
<theme_item name="file" type="Texture2D">
Custom icon for files.
</theme_item>
- <theme_item name="file_icon_modulate" type="Color" default="Color( 1, 1, 1, 1 )">
+ <theme_item name="file_icon_modulate" type="Color" default="Color(1, 1, 1, 1)">
The color modulation applied to the file icon.
</theme_item>
- <theme_item name="files_disabled" type="Color" default="Color( 0, 0, 0, 0.7 )">
+ <theme_item name="files_disabled" type="Color" default="Color(0, 0, 0, 0.7)">
The color tint for disabled files (when the [FileDialog] is used in open folder mode).
</theme_item>
<theme_item name="folder" type="Texture2D">
Custom icon for folders.
</theme_item>
- <theme_item name="folder_icon_modulate" type="Color" default="Color( 1, 1, 1, 1 )">
+ <theme_item name="folder_icon_modulate" type="Color" default="Color(1, 1, 1, 1)">
The color modulation applied to the folder icon.
</theme_item>
<theme_item name="forward_folder" type="Texture2D">
diff --git a/doc/classes/FileSystemDock.xml b/doc/classes/FileSystemDock.xml
index c553f90e37..15f92e90e3 100644
--- a/doc/classes/FileSystemDock.xml
+++ b/doc/classes/FileSystemDock.xml
@@ -7,40 +7,6 @@
<tutorials>
</tutorials>
<methods>
- <method name="can_drop_data_fw" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="position" type="Vector2">
- </argument>
- <argument index="1" name="data" type="Variant">
- </argument>
- <argument index="2" name="from" type="Control">
- </argument>
- <description>
- </description>
- </method>
- <method name="drop_data_fw">
- <return type="void">
- </return>
- <argument index="0" name="position" type="Vector2">
- </argument>
- <argument index="1" name="data" type="Variant">
- </argument>
- <argument index="2" name="from" type="Control">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_drag_data_fw">
- <return type="Variant">
- </return>
- <argument index="0" name="position" type="Vector2">
- </argument>
- <argument index="1" name="from" type="Control">
- </argument>
- <description>
- </description>
- </method>
<method name="navigate_to_path">
<return type="void">
</return>
diff --git a/doc/classes/Font.xml b/doc/classes/Font.xml
index 20d5b6ce9b..186bfbb931 100644
--- a/doc/classes/Font.xml
+++ b/doc/classes/Font.xml
@@ -85,11 +85,11 @@
</argument>
<argument index="4" name="size" type="int" default="-1">
</argument>
- <argument index="5" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )">
+ <argument index="5" name="modulate" type="Color" default="Color(1, 1, 1, 1)">
</argument>
<argument index="6" name="outline_size" type="int" default="0">
</argument>
- <argument index="7" name="outline_modulate" type="Color" default="Color( 1, 1, 1, 0 )">
+ <argument index="7" name="outline_modulate" type="Color" default="Color(1, 1, 1, 0)">
</argument>
<description>
Draw a single Unicode character [code]char[/code] into a canvas item using the font, at a given position, with [code]modulate[/code] color, and optionally kerning if [code]next[/code] is passed. [code]position[/code] specifies the baseline, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis.
@@ -113,11 +113,11 @@
</argument>
<argument index="6" name="size" type="int" default="-1">
</argument>
- <argument index="7" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )">
+ <argument index="7" name="modulate" type="Color" default="Color(1, 1, 1, 1)">
</argument>
<argument index="8" name="outline_size" type="int" default="0">
</argument>
- <argument index="9" name="outline_modulate" type="Color" default="Color( 1, 1, 1, 0 )">
+ <argument index="9" name="outline_modulate" type="Color" default="Color(1, 1, 1, 0)">
</argument>
<argument index="10" name="flags" type="int" default="51">
</argument>
@@ -141,11 +141,11 @@
</argument>
<argument index="5" name="size" type="int" default="-1">
</argument>
- <argument index="6" name="modulate" 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="outline_size" type="int" default="0">
</argument>
- <argument index="8" name="outline_modulate" type="Color" default="Color( 1, 1, 1, 0 )">
+ <argument index="8" name="outline_modulate" type="Color" default="Color(1, 1, 1, 0)">
</argument>
<argument index="9" name="flags" type="int" default="3">
</argument>
diff --git a/doc/classes/FontData.xml b/doc/classes/FontData.xml
index e426c8fb36..0a2fb03750 100644
--- a/doc/classes/FontData.xml
+++ b/doc/classes/FontData.xml
@@ -61,7 +61,7 @@
</argument>
<argument index="3" name="index" type="int">
</argument>
- <argument index="4" name="color" type="Color" default="Color( 1, 1, 1, 1 )">
+ <argument index="4" name="color" type="Color" default="Color(1, 1, 1, 1)">
</argument>
<description>
Draws single glyph into a canvas item at the position, using [code]font[/code] at the size [code]size[/code].
@@ -82,7 +82,7 @@
</argument>
<argument index="4" name="index" type="int">
</argument>
- <argument index="5" name="color" type="Color" default="Color( 1, 1, 1, 1 )">
+ <argument index="5" name="color" type="Color" default="Color(1, 1, 1, 1)">
</argument>
<description>
Draws single glyph outline of size [code]outline_size[/code] into a canvas item at the position, using [code]font[/code] at the size [code]size[/code]. If outline drawing is not supported, nothing is drawn.
diff --git a/doc/classes/GPUParticles2D.xml b/doc/classes/GPUParticles2D.xml
index ebe4e3b00d..8684a7f41a 100644
--- a/doc/classes/GPUParticles2D.xml
+++ b/doc/classes/GPUParticles2D.xml
@@ -31,7 +31,9 @@
<member name="amount" type="int" setter="set_amount" getter="get_amount" default="8">
Number of particles emitted in one emission cycle.
</member>
- <member name="draw_order" type="int" setter="set_draw_order" getter="get_draw_order" enum="GPUParticles2D.DrawOrder" default="0">
+ <member name="collision_base_size" type="float" setter="set_collision_base_size" getter="get_collision_base_size" default="1.0">
+ </member>
+ <member name="draw_order" type="int" setter="set_draw_order" getter="get_draw_order" enum="GPUParticles2D.DrawOrder" default="1">
Particle draw order. Uses [enum DrawOrder] values.
</member>
<member name="emitting" type="bool" setter="set_emitting" getter="is_emitting" default="true">
@@ -40,7 +42,7 @@
<member name="explosiveness" type="float" setter="set_explosiveness_ratio" getter="get_explosiveness_ratio" default="0.0">
How rapidly particles in an emission cycle are emitted. If greater than [code]0[/code], there will be a gap in emissions before the next cycle begins.
</member>
- <member name="fixed_fps" type="int" setter="set_fixed_fps" getter="get_fixed_fps" default="0">
+ <member name="fixed_fps" type="int" setter="set_fixed_fps" getter="get_fixed_fps" default="30">
The particle system's frame rate is fixed to a value. For instance, changing the value to 2 will make the particles render at 2 frames per second. Note this does not slow down the simulation of the particle system itself.
</member>
<member name="fract_delta" type="bool" setter="set_fractional_delta" getter="get_fractional_delta" default="true">
@@ -70,7 +72,15 @@
<member name="texture" type="Texture2D" setter="set_texture" getter="get_texture">
Particle texture. If [code]null[/code], particles will be squares.
</member>
- <member name="visibility_rect" type="Rect2" setter="set_visibility_rect" getter="get_visibility_rect" default="Rect2( -100, -100, 200, 200 )">
+ <member name="trail_enabled" type="bool" setter="set_trail_enabled" getter="is_trail_enabled" default="false">
+ </member>
+ <member name="trail_length_secs" type="float" setter="set_trail_length" getter="get_trail_length" default="0.3">
+ </member>
+ <member name="trail_section_subdivisions" type="int" setter="set_trail_section_subdivisions" getter="get_trail_section_subdivisions" default="4">
+ </member>
+ <member name="trail_sections" type="int" setter="set_trail_sections" getter="get_trail_sections" default="8">
+ </member>
+ <member name="visibility_rect" type="Rect2" setter="set_visibility_rect" getter="get_visibility_rect" default="Rect2(-100, -100, 200, 200)">
The [Rect2] that determines the node's region which needs to be visible on screen for the particle system to be active.
Grow the rect if particles suddenly appear/disappear when the node enters/exits the screen. The [Rect2] can be grown via code or with the [b]Particles → Generate Visibility Rect[/b] editor tool.
</member>
@@ -82,5 +92,7 @@
<constant name="DRAW_ORDER_LIFETIME" value="1" enum="DrawOrder">
Particles are drawn in order of remaining lifetime.
</constant>
+ <constant name="DRAW_ORDER_REVERSE_LIFETIME" value="2" enum="DrawOrder">
+ </constant>
</constants>
</class>
diff --git a/doc/classes/GPUParticles3D.xml b/doc/classes/GPUParticles3D.xml
index e5d6581ddc..55e9b33aa8 100644
--- a/doc/classes/GPUParticles3D.xml
+++ b/doc/classes/GPUParticles3D.xml
@@ -22,7 +22,7 @@
<method name="emit_particle">
<return type="void">
</return>
- <argument index="0" name="xform" type="Transform">
+ <argument index="0" name="xform" type="Transform3D">
</argument>
<argument index="1" name="velocity" type="Vector3">
</argument>
@@ -126,13 +126,13 @@
</member>
<member name="sub_emitter" type="NodePath" setter="set_sub_emitter" getter="get_sub_emitter" default="NodePath(&quot;&quot;)">
</member>
- <member name="trail_enabled" type="bool" setter="set_enable_trail" getter="is_trail_enabled" default="false">
+ <member name="trail_enabled" type="bool" setter="set_trail_enabled" getter="is_trail_enabled" default="false">
</member>
<member name="trail_length_secs" type="float" setter="set_trail_length" getter="get_trail_length" default="0.3">
</member>
<member name="transform_align" type="int" setter="set_transform_align" getter="get_transform_align" enum="GPUParticles3D.TransformAlign" default="0">
</member>
- <member name="visibility_aabb" type="AABB" setter="set_visibility_aabb" getter="get_visibility_aabb" default="AABB( -4, -4, -4, 8, 8, 8 )">
+ <member name="visibility_aabb" type="AABB" setter="set_visibility_aabb" getter="get_visibility_aabb" default="AABB(-4, -4, -4, 8, 8, 8)">
The [AABB] that determines the node's region which needs to be visible on screen for the particle system to be active.
Grow the box if particles suddenly appear/disappear when the node enters/exits the screen. The [AABB] can be grown via code or with the [b]Particles → Generate AABB[/b] editor tool.
</member>
@@ -144,7 +144,9 @@
<constant name="DRAW_ORDER_LIFETIME" value="1" enum="DrawOrder">
Particles are drawn in order of remaining lifetime.
</constant>
- <constant name="DRAW_ORDER_VIEW_DEPTH" value="2" enum="DrawOrder">
+ <constant name="DRAW_ORDER_REVERSE_LIFETIME" value="2" enum="DrawOrder">
+ </constant>
+ <constant name="DRAW_ORDER_VIEW_DEPTH" value="3" enum="DrawOrder">
Particles are drawn in order of depth.
</constant>
<constant name="EMIT_FLAG_POSITION" value="1" enum="EmitFlags">
diff --git a/doc/classes/GPUParticlesAttractorBox.xml b/doc/classes/GPUParticlesAttractorBox.xml
index 68616f9bbd..49e6111c29 100644
--- a/doc/classes/GPUParticlesAttractorBox.xml
+++ b/doc/classes/GPUParticlesAttractorBox.xml
@@ -9,7 +9,7 @@
<methods>
</methods>
<members>
- <member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3( 1, 1, 1 )">
+ <member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3(1, 1, 1)">
</member>
</members>
<constants>
diff --git a/doc/classes/GPUParticlesAttractorVectorField.xml b/doc/classes/GPUParticlesAttractorVectorField.xml
index cf5e375ea3..7364a4b09f 100644
--- a/doc/classes/GPUParticlesAttractorVectorField.xml
+++ b/doc/classes/GPUParticlesAttractorVectorField.xml
@@ -9,7 +9,7 @@
<methods>
</methods>
<members>
- <member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3( 1, 1, 1 )">
+ <member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3(1, 1, 1)">
</member>
<member name="texture" type="Texture3D" setter="set_texture" getter="get_texture">
</member>
diff --git a/doc/classes/GPUParticlesCollisionBox.xml b/doc/classes/GPUParticlesCollisionBox.xml
index 17fc124c41..58de18556e 100644
--- a/doc/classes/GPUParticlesCollisionBox.xml
+++ b/doc/classes/GPUParticlesCollisionBox.xml
@@ -9,7 +9,7 @@
<methods>
</methods>
<members>
- <member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3( 1, 1, 1 )">
+ <member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3(1, 1, 1)">
</member>
</members>
<constants>
diff --git a/doc/classes/GPUParticlesCollisionHeightField.xml b/doc/classes/GPUParticlesCollisionHeightField.xml
index c6987515a9..0ddddda8e4 100644
--- a/doc/classes/GPUParticlesCollisionHeightField.xml
+++ b/doc/classes/GPUParticlesCollisionHeightField.xml
@@ -9,7 +9,7 @@
<methods>
</methods>
<members>
- <member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3( 1, 1, 1 )">
+ <member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3(1, 1, 1)">
</member>
<member name="follow_camera_enabled" type="bool" setter="set_follow_camera_mode" getter="is_follow_camera_mode_enabled" default="false">
</member>
diff --git a/doc/classes/GPUParticlesCollisionSDF.xml b/doc/classes/GPUParticlesCollisionSDF.xml
index c3cbe4b1c6..7ef6f5f3cd 100644
--- a/doc/classes/GPUParticlesCollisionSDF.xml
+++ b/doc/classes/GPUParticlesCollisionSDF.xml
@@ -9,7 +9,7 @@
<methods>
</methods>
<members>
- <member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3( 1, 1, 1 )">
+ <member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3(1, 1, 1)">
</member>
<member name="resolution" type="int" setter="set_resolution" getter="get_resolution" enum="GPUParticlesCollisionSDF.Resolution" default="2">
</member>
diff --git a/doc/classes/GeometryInstance3D.xml b/doc/classes/GeometryInstance3D.xml
index b2c3bfc3ed..667ca2dacf 100644
--- a/doc/classes/GeometryInstance3D.xml
+++ b/doc/classes/GeometryInstance3D.xml
@@ -52,25 +52,21 @@
</member>
<member name="lod_bias" type="float" setter="set_lod_bias" getter="get_lod_bias" default="1.0">
</member>
- <member name="lod_max_distance" type="float" setter="set_lod_max_distance" getter="get_lod_max_distance" default="0.0">
- The GeometryInstance3D's max LOD distance.
- [b]Note:[/b] This property currently has no effect.
+ <member name="material_override" type="Material" setter="set_material_override" getter="get_material_override">
+ The material override for the whole geometry.
+ If a material is assigned to this property, it will be used instead of any material set in any material slot of the mesh.
</member>
- <member name="lod_max_hysteresis" type="float" setter="set_lod_max_hysteresis" getter="get_lod_max_hysteresis" default="0.0">
- The GeometryInstance3D's max LOD margin.
- [b]Note:[/b] This property currently has no effect.
+ <member name="visibility_range_begin" type="float" setter="set_visibility_range_begin" getter="get_visibility_range_begin" default="0.0">
+ Starting distance from which the GeometryInstance3D will be visible, taking [member visibility_range_begin_margin] into account as well. The default value of 0 is used to disable the range check.
</member>
- <member name="lod_min_distance" type="float" setter="set_lod_min_distance" getter="get_lod_min_distance" default="0.0">
- The GeometryInstance3D's min LOD distance.
- [b]Note:[/b] This property currently has no effect.
+ <member name="visibility_range_begin_margin" type="float" setter="set_visibility_range_begin_margin" getter="get_visibility_range_begin_margin" default="0.0">
+ Margin for the [member visibility_range_begin] threshold. The GeometryInstance3D will only change its visibility state when it goes over or under the [member visibility_range_begin] threshold by this amount.
</member>
- <member name="lod_min_hysteresis" type="float" setter="set_lod_min_hysteresis" getter="get_lod_min_hysteresis" default="0.0">
- The GeometryInstance3D's min LOD margin.
- [b]Note:[/b] This property currently has no effect.
+ <member name="visibility_range_end" type="float" setter="set_visibility_range_end" getter="get_visibility_range_end" default="0.0">
+ Distance from which the GeometryInstance3D will be hidden, taking [member visibility_range_end_margin] into account as well. The default value of 0 is used to disable the range check..
</member>
- <member name="material_override" type="Material" setter="set_material_override" getter="get_material_override">
- The material override for the whole geometry.
- If a material is assigned to this property, it will be used instead of any material set in any material slot of the mesh.
+ <member name="visibility_range_end_margin" type="float" setter="set_visibility_range_end_margin" getter="get_visibility_range_end_margin" default="0.0">
+ Margin for the [member visibility_range_end] threshold. The GeometryInstance3D will only change its visibility state when it goes over or under the [member visibility_range_end] threshold by this amount.
</member>
</members>
<constants>
diff --git a/doc/classes/Gradient.xml b/doc/classes/Gradient.xml
index 28c647a1c3..1f1f266c59 100644
--- a/doc/classes/Gradient.xml
+++ b/doc/classes/Gradient.xml
@@ -87,10 +87,10 @@
</method>
</methods>
<members>
- <member name="colors" type="PackedColorArray" setter="set_colors" getter="get_colors" default="PackedColorArray( 0, 0, 0, 1, 1, 1, 1, 1 )">
+ <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="PackedFloat32Array" setter="set_offsets" getter="get_offsets" default="PackedFloat32Array( 0, 1 )">
+ <member name="offsets" type="PackedFloat32Array" setter="set_offsets" getter="get_offsets" default="PackedFloat32Array(0, 1)">
Gradient's offsets returned as a [PackedFloat32Array].
</member>
</members>
diff --git a/doc/classes/GraphEdit.xml b/doc/classes/GraphEdit.xml
index b4536c0589..65701b3a6a 100644
--- a/doc/classes/GraphEdit.xml
+++ b/doc/classes/GraphEdit.xml
@@ -187,16 +187,19 @@
<member name="minimap_opacity" type="float" setter="set_minimap_opacity" getter="get_minimap_opacity" default="0.65">
The opacity of the minimap rectangle.
</member>
- <member name="minimap_size" type="Vector2" setter="set_minimap_size" getter="get_minimap_size" default="Vector2( 240, 160 )">
+ <member name="minimap_size" type="Vector2" setter="set_minimap_size" getter="get_minimap_size" default="Vector2(240, 160)">
The size of the minimap rectangle. The map itself is based on the size of the grid area and is scaled to fit this rectangle.
</member>
<member name="rect_clip_content" type="bool" setter="set_clip_contents" getter="is_clipping_contents" override="true" default="true" />
<member name="right_disconnects" type="bool" setter="set_right_disconnects" getter="is_right_disconnects_enabled" default="false">
If [code]true[/code], enables disconnection of existing connections in the GraphEdit by dragging the right end.
</member>
- <member name="scroll_offset" type="Vector2" setter="set_scroll_ofs" getter="get_scroll_ofs" default="Vector2( 0, 0 )">
+ <member name="scroll_offset" type="Vector2" setter="set_scroll_ofs" getter="get_scroll_ofs" default="Vector2(0, 0)">
The scroll offset.
</member>
+ <member name="show_zoom_label" type="bool" setter="set_show_zoom_label" getter="is_showing_zoom_label" default="false">
+ If [code]true[/code], makes a label with the current zoom level visible. The zoom value is displayed in percents.
+ </member>
<member name="snap_distance" type="int" setter="set_snap" getter="get_snap" default="20">
The snapping distance in pixels.
</member>
@@ -206,6 +209,15 @@
<member name="zoom" type="float" setter="set_zoom" getter="get_zoom" default="1.0">
The current zoom value.
</member>
+ <member name="zoom_max" type="float" setter="set_zoom_max" getter="get_zoom_max" default="2.0736">
+ The upper zoom limit.
+ </member>
+ <member name="zoom_min" type="float" setter="set_zoom_min" getter="get_zoom_min" default="0.232568">
+ The lower zoom limit.
+ </member>
+ <member name="zoom_step" type="float" setter="set_zoom_step" getter="get_zoom_step" default="1.2">
+ The step of each zoom level.
+ </member>
</members>
<signals>
<signal name="begin_node_move">
@@ -317,7 +329,7 @@
<constants>
</constants>
<theme_items>
- <theme_item name="activity" type="Color" default="Color( 1, 1, 1, 1 )">
+ <theme_item name="activity" type="Color" default="Color(1, 1, 1, 1)">
</theme_item>
<theme_item name="bezier_len_neg" type="int" default="160">
</theme_item>
@@ -326,10 +338,10 @@
<theme_item name="bg" type="StyleBox">
The background drawn under the grid.
</theme_item>
- <theme_item name="grid_major" type="Color" default="Color( 1, 1, 1, 0.2 )">
+ <theme_item name="grid_major" type="Color" default="Color(1, 1, 1, 0.2)">
Color of major grid lines.
</theme_item>
- <theme_item name="grid_minor" type="Color" default="Color( 1, 1, 1, 0.05 )">
+ <theme_item name="grid_minor" type="Color" default="Color(1, 1, 1, 0.05)">
Color of minor grid lines.
</theme_item>
<theme_item name="minimap" type="Texture2D">
@@ -349,10 +361,10 @@
<theme_item name="reset" type="Texture2D">
The icon for the zoom reset button.
</theme_item>
- <theme_item name="selection_fill" type="Color" default="Color( 1, 1, 1, 0.3 )">
+ <theme_item name="selection_fill" type="Color" default="Color(1, 1, 1, 0.3)">
The fill color of the selection rectangle.
</theme_item>
- <theme_item name="selection_stroke" type="Color" default="Color( 1, 1, 1, 0.8 )">
+ <theme_item name="selection_stroke" type="Color" default="Color(1, 1, 1, 0.8)">
The outline color of the selection rectangle.
</theme_item>
<theme_item name="snap" type="Texture2D">
diff --git a/doc/classes/GraphNode.xml b/doc/classes/GraphNode.xml
index aae3126c0f..84eda7fcea 100644
--- a/doc/classes/GraphNode.xml
+++ b/doc/classes/GraphNode.xml
@@ -40,7 +40,7 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
- Returns the color of the input connection [code]idx[/code].
+ Returns the [Color] of the input connection [code]idx[/code].
</description>
</method>
<method name="get_connection_input_count">
@@ -74,7 +74,7 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
- Returns the color of the output connection [code]idx[/code].
+ Returns the [Color] of the output connection [code]idx[/code].
</description>
</method>
<method name="get_connection_output_count">
@@ -117,7 +117,7 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
- Returns the color set to [code]idx[/code] left (input) slot.
+ Returns the left (input) [Color] of the slot [code]idx[/code].
</description>
</method>
<method name="get_slot_color_right" qualifiers="const">
@@ -126,7 +126,7 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
- Returns the color set to [code]idx[/code] right (output) slot.
+ Returns the right (output) [Color] of the slot [code]idx[/code].
</description>
</method>
<method name="get_slot_type_left" qualifiers="const">
@@ -135,7 +135,7 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
- Returns the (integer) type of left (input) [code]idx[/code] slot.
+ Returns the left (input) type of the slot [code]idx[/code].
</description>
</method>
<method name="get_slot_type_right" qualifiers="const">
@@ -144,7 +144,7 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
- Returns the (integer) type of right (output) [code]idx[/code] slot.
+ Returns the right (output) type of the slot [code]idx[/code].
</description>
</method>
<method name="is_slot_enabled_left" qualifiers="const">
@@ -153,7 +153,7 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
- Returns [code]true[/code] if left (input) slot [code]idx[/code] is enabled, [code]false[/code] otherwise.
+ Returns [code]true[/code] if left (input) side of the slot [code]idx[/code] is enabled.
</description>
</method>
<method name="is_slot_enabled_right" qualifiers="const">
@@ -162,7 +162,7 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
- Returns [code]true[/code] if right (output) slot [code]idx[/code] is enabled, [code]false[/code] otherwise.
+ Returns [code]true[/code] if right (output) side of the slot [code]idx[/code] is enabled.
</description>
</method>
<method name="set_opentype_feature">
@@ -204,6 +204,73 @@
[code]color_left[/code]/[code]right[/code] is the tint of the port's icon on this side.
[code]custom_left[/code]/[code]right[/code] is a custom texture for this side's port.
[b]Note:[/b] This method only sets properties of the slot. To create the slot, add a [Control]-derived child to the GraphNode.
+ Individual properties can be set using one of the [code]set_slot_*[/code] methods. You must enable at least one side of the slot to do so.
+ </description>
+ </method>
+ <method name="set_slot_color_left">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="color_left" type="Color">
+ </argument>
+ <description>
+ Sets the [Color] of the left (input) side of the slot [code]idx[/code] to [code]color_left[/code].
+ </description>
+ </method>
+ <method name="set_slot_color_right">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="color_right" type="Color">
+ </argument>
+ <description>
+ Sets the [Color] of the right (output) side of the slot [code]idx[/code] to [code]color_right[/code].
+ </description>
+ </method>
+ <method name="set_slot_enabled_left">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="enable_left" type="bool">
+ </argument>
+ <description>
+ Toggles the left (input) side of the slot [code]idx[/code]. If [code]enable_left[/code] is [code]true[/code], a port will appear on the left side and the slot will be able to be connected from this side.
+ </description>
+ </method>
+ <method name="set_slot_enabled_right">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="enable_right" type="bool">
+ </argument>
+ <description>
+ Toggles the right (output) side of the slot [code]idx[/code]. If [code]enable_right[/code] is [code]true[/code], a port will appear on the right side and the slot will be able to be connected from this side.
+ </description>
+ </method>
+ <method name="set_slot_type_left">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="type_left" type="int">
+ </argument>
+ <description>
+ Sets the left (input) type of the slot [code]idx[/code] to [code]type_left[/code].
+ </description>
+ </method>
+ <method name="set_slot_type_right">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="type_right" type="int">
+ </argument>
+ <description>
+ Sets the right (output) type of the slot [code]idx[/code] to [code]type_right[/code].
</description>
</method>
</methods>
@@ -218,7 +285,7 @@
<member name="overlay" type="int" setter="set_overlay" getter="get_overlay" enum="GraphNode.Overlay" default="0">
Sets the overlay shown above the GraphNode. See [enum Overlay].
</member>
- <member name="position_offset" type="Vector2" setter="set_position_offset" getter="get_position_offset" default="Vector2( 0, 0 )">
+ <member name="position_offset" type="Vector2" setter="set_position_offset" getter="get_position_offset" default="Vector2(0, 0)">
The offset of the GraphNode, relative to the scroll offset of the [GraphEdit].
[b]Note:[/b] You cannot use position offset directly, as [GraphEdit] is a [Container].
</member>
@@ -298,7 +365,7 @@
<theme_item name="close" type="Texture2D">
The icon for the close button, visible when [member show_close] is enabled.
</theme_item>
- <theme_item name="close_color" type="Color" default="Color( 0, 0, 0, 1 )">
+ <theme_item name="close_color" type="Color" default="Color(0, 0, 0, 1)">
The color modulation applied to the close button icon.
</theme_item>
<theme_item name="close_offset" type="int" default="18">
@@ -329,7 +396,7 @@
<theme_item name="resizer" type="Texture2D">
The icon used for resizer, visible when [member resizable] is enabled.
</theme_item>
- <theme_item name="resizer_color" type="Color" default="Color( 0, 0, 0, 1 )">
+ <theme_item name="resizer_color" type="Color" default="Color(0, 0, 0, 1)">
The color modulation applied to the resizer icon.
</theme_item>
<theme_item name="selectedframe" type="StyleBox">
@@ -338,7 +405,7 @@
<theme_item name="separation" type="int" default="1">
The vertical distance between ports.
</theme_item>
- <theme_item name="title_color" type="Color" default="Color( 0, 0, 0, 1 )">
+ <theme_item name="title_color" type="Color" default="Color(0, 0, 0, 1)">
Color of the title text.
</theme_item>
<theme_item name="title_font" type="Font">
diff --git a/doc/classes/HMACContext.xml b/doc/classes/HMACContext.xml
index 00d528ef8f..9fa96e5ddf 100644
--- a/doc/classes/HMACContext.xml
+++ b/doc/classes/HMACContext.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="HMACContext" inherits="Reference" version="4.0">
+<class name="HMACContext" inherits="RefCounted" version="4.0">
<brief_description>
Used to create an HMAC for a message using a key.
</brief_description>
diff --git a/doc/classes/HTTPClient.xml b/doc/classes/HTTPClient.xml
index ddfcdf7724..a549994a69 100644
--- a/doc/classes/HTTPClient.xml
+++ b/doc/classes/HTTPClient.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="HTTPClient" inherits="Reference" version="4.0">
+<class name="HTTPClient" inherits="RefCounted" version="4.0">
<brief_description>
Low-level hyper-text transfer protocol client.
</brief_description>
diff --git a/doc/classes/HTTPRequest.xml b/doc/classes/HTTPRequest.xml
index 25667d8f79..908e355db3 100644
--- a/doc/classes/HTTPRequest.xml
+++ b/doc/classes/HTTPRequest.xml
@@ -192,7 +192,7 @@
</return>
<argument index="0" name="url" type="String">
</argument>
- <argument index="1" name="custom_headers" type="PackedStringArray" default="PackedStringArray( )">
+ <argument index="1" name="custom_headers" type="PackedStringArray" default="PackedStringArray()">
</argument>
<argument index="2" name="ssl_validate_domain" type="bool" default="true">
</argument>
@@ -211,13 +211,13 @@
</return>
<argument index="0" name="url" type="String">
</argument>
- <argument index="1" name="custom_headers" type="PackedStringArray" default="PackedStringArray( )">
+ <argument index="1" name="custom_headers" type="PackedStringArray" default="PackedStringArray()">
</argument>
<argument index="2" name="ssl_validate_domain" type="bool" default="true">
</argument>
<argument index="3" name="method" type="int" enum="HTTPClient.Method" default="0">
</argument>
- <argument index="4" name="request_data_raw" type="PackedByteArray" default="PackedByteArray( )">
+ <argument index="4" name="request_data_raw" type="PackedByteArray" default="PackedByteArray()">
</argument>
<description>
Creates request on the underlying [HTTPClient] using a raw array of bytes for the request body. If there is no configuration errors, it tries to connect using [method HTTPClient.connect_to_host] and passes parameters onto [method HTTPClient.request].
diff --git a/doc/classes/HashingContext.xml b/doc/classes/HashingContext.xml
index e020293d76..1c7b7ca937 100644
--- a/doc/classes/HashingContext.xml
+++ b/doc/classes/HashingContext.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="HashingContext" inherits="Reference" version="4.0">
+<class name="HashingContext" inherits="RefCounted" version="4.0">
<brief_description>
Context to compute cryptographic hashes over multiple iterations.
</brief_description>
diff --git a/doc/classes/HeightMapShape3D.xml b/doc/classes/HeightMapShape3D.xml
index f6f2a27891..9a9d3bf8f4 100644
--- a/doc/classes/HeightMapShape3D.xml
+++ b/doc/classes/HeightMapShape3D.xml
@@ -11,7 +11,7 @@
<methods>
</methods>
<members>
- <member name="map_data" type="PackedFloat32Array" setter="set_map_data" getter="get_map_data" default="PackedFloat32Array( 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/IP.xml b/doc/classes/IP.xml
index 849f036bbd..b3ce1abaeb 100644
--- a/doc/classes/IP.xml
+++ b/doc/classes/IP.xml
@@ -4,7 +4,7 @@
Internet protocol (IP) support functions such as DNS resolution.
</brief_description>
<description>
- IP contains support functions for the Internet Protocol (IP). TCP/IP support is in different classes (see [StreamPeerTCP] and [TCP_Server]). IP provides DNS hostname resolution support, both blocking and threaded.
+ IP contains support functions for the Internet Protocol (IP). TCP/IP support is in different classes (see [StreamPeerTCP] and [TCPServer]). IP provides DNS hostname resolution support, both blocking and threaded.
</description>
<tutorials>
</tutorials>
@@ -59,6 +59,15 @@
Returns a queued hostname's IP address, given its queue [code]id[/code]. Returns an empty string on error or if resolution hasn't happened yet (see [method get_resolve_item_status]).
</description>
</method>
+ <method name="get_resolve_item_addresses" qualifiers="const">
+ <return type="Array">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <description>
+ Returns resolved addresses, or an empty array if an error happened or resolution didn't happen yet (see [method get_resolve_item_status]).
+ </description>
+ </method>
<method name="get_resolve_item_status" qualifiers="const">
<return type="int" enum="IP.ResolverStatus">
</return>
@@ -79,6 +88,17 @@
Returns a given hostname's IPv4 or IPv6 address when resolved (blocking-type method). The address type returned depends on the [enum Type] constant given as [code]ip_type[/code].
</description>
</method>
+ <method name="resolve_hostname_addresses">
+ <return type="Array">
+ </return>
+ <argument index="0" name="host" type="String">
+ </argument>
+ <argument index="1" name="ip_type" type="int" enum="IP.Type" default="3">
+ </argument>
+ <description>
+ Resolves a given hostname in a blocking way. Addresses are returned as an [Array] of IPv4 or IPv6 addresses depending on [code]ip_type[/code].
+ </description>
+ </method>
<method name="resolve_hostname_queue_item">
<return type="int">
</return>
diff --git a/doc/classes/Image.xml b/doc/classes/Image.xml
index 91a07f66e0..167b90ea73 100644
--- a/doc/classes/Image.xml
+++ b/doc/classes/Image.xml
@@ -560,7 +560,7 @@
</method>
</methods>
<members>
- <member name="data" type="Dictionary" setter="_set_data" getter="_get_data" default="{&quot;data&quot;: PackedByteArray( ),&quot;format&quot;: &quot;Lum8&quot;,&quot;height&quot;: 0,&quot;mipmaps&quot;: false,&quot;width&quot;: 0}">
+ <member name="data" type="Dictionary" setter="_set_data" getter="_get_data" default="{&quot;data&quot;: PackedByteArray(),&quot;format&quot;: &quot;Lum8&quot;,&quot;height&quot;: 0,&quot;mipmaps&quot;: false,&quot;width&quot;: 0}">
Holds all 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 d7408cd0ff..05a8bd268e 100644
--- a/doc/classes/Input.xml
+++ b/doc/classes/Input.xml
@@ -341,7 +341,7 @@
</argument>
<argument index="1" name="shape" type="int" enum="Input.CursorShape" default="0">
</argument>
- <argument index="2" name="hotspot" type="Vector2" default="Vector2( 0, 0 )">
+ <argument index="2" name="hotspot" type="Vector2" default="Vector2(0, 0)">
</argument>
<description>
Sets a custom mouse cursor image, which is only visible inside the game window. The hotspot can also be specified. Passing [code]null[/code] to the image parameter resets to the system cursor. See [enum CursorShape] for the list of shapes.
@@ -449,7 +449,10 @@
[b]Note:[/b] If you want to process the mouse's movement in this mode, you need to use [member InputEventMouseMotion.relative].
</constant>
<constant name="MOUSE_MODE_CONFINED" value="3" enum="MouseMode">
- Makes the mouse cursor visible but confines it to the game window.
+ Confines the mouse cursor to the game window, and make it visible.
+ </constant>
+ <constant name="MOUSE_MODE_CONFINED_HIDDEN" value="4" enum="MouseMode">
+ Confines the mouse cursor to the game window, and make it hidden.
</constant>
<constant name="CURSOR_ARROW" value="0" enum="CursorShape">
Arrow cursor. Standard, default pointing cursor.
diff --git a/doc/classes/InputEvent.xml b/doc/classes/InputEvent.xml
index 28c4773f51..c28c4c4282 100644
--- a/doc/classes/InputEvent.xml
+++ b/doc/classes/InputEvent.xml
@@ -90,20 +90,23 @@
Returns [code]true[/code] if this input event is an echo event (only for events of type [InputEventKey]).
</description>
</method>
- <method name="is_pressed" qualifiers="const">
+ <method name="is_match" qualifiers="const">
<return type="bool">
</return>
+ <argument index="0" name="event" type="InputEvent">
+ </argument>
+ <argument index="1" name="exact_match" type="bool" default="true">
+ </argument>
<description>
- Returns [code]true[/code] if this input event is pressed. Not relevant for events of type [InputEventMouseMotion] or [InputEventScreenDrag].
+ Returns [code]true[/code] if the specified [code]event[/code] matches this event. Only valid for action events i.e key ([InputEventKey]), button ([InputEventMouseButton] or [InputEventJoypadButton]), axis [InputEventJoypadMotion] or action ([InputEventAction]) events.
+ If [code]exact_match[/code] is [code]false[/code], it ignores the input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events.
</description>
</method>
- <method name="shortcut_match" qualifiers="const">
+ <method name="is_pressed" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="event" type="InputEvent">
- </argument>
<description>
- Returns [code]true[/code] if the given input event is checking for the same key ([InputEventKey]), button ([InputEventJoypadButton]) or action ([InputEventAction]).
+ Returns [code]true[/code] if this input event is pressed. Not relevant for events of type [InputEventMouseMotion] or [InputEventScreenDrag].
</description>
</method>
<method name="xformed_by" qualifiers="const">
@@ -111,7 +114,7 @@
</return>
<argument index="0" name="xform" type="Transform2D">
</argument>
- <argument index="1" name="local_ofs" type="Vector2" default="Vector2( 0, 0 )">
+ <argument index="1" name="local_ofs" type="Vector2" default="Vector2(0, 0)">
</argument>
<description>
Returns a copy of the given input event which has been offset by [code]local_ofs[/code] and transformed by [code]xform[/code]. Relevant for events of type [InputEventMouseButton], [InputEventMouseMotion], [InputEventScreenTouch], [InputEventScreenDrag], [InputEventMagnifyGesture] and [InputEventPanGesture].
diff --git a/doc/classes/InputEventAction.xml b/doc/classes/InputEventAction.xml
index ed290fc7e2..42326f344f 100644
--- a/doc/classes/InputEventAction.xml
+++ b/doc/classes/InputEventAction.xml
@@ -14,7 +14,7 @@
<methods>
</methods>
<members>
- <member name="action" type="StringName" setter="set_action" getter="get_action" default="@&quot;&quot;">
+ <member name="action" type="StringName" setter="set_action" getter="get_action" default="&amp;&quot;&quot;">
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/InputEventGesture.xml b/doc/classes/InputEventGesture.xml
index 861ec026cd..fbde318ada 100644
--- a/doc/classes/InputEventGesture.xml
+++ b/doc/classes/InputEventGesture.xml
@@ -10,7 +10,7 @@
<methods>
</methods>
<members>
- <member name="position" type="Vector2" setter="set_position" getter="get_position" default="Vector2( 0, 0 )">
+ <member name="position" type="Vector2" setter="set_position" getter="get_position" default="Vector2(0, 0)">
The local gesture position relative to the [Viewport]. If used in [method Control._gui_input], the position is relative to the current [Control] that received this gesture.
</member>
</members>
diff --git a/doc/classes/InputEventMouse.xml b/doc/classes/InputEventMouse.xml
index e54c3224da..b8043118b7 100644
--- a/doc/classes/InputEventMouse.xml
+++ b/doc/classes/InputEventMouse.xml
@@ -15,10 +15,10 @@
<member name="button_mask" type="int" setter="set_button_mask" getter="get_button_mask" default="0">
The mouse button mask identifier, one of or a bitwise combination of the [enum MouseButton] button masks.
</member>
- <member name="global_position" type="Vector2" setter="set_global_position" getter="get_global_position" default="Vector2( 0, 0 )">
+ <member name="global_position" type="Vector2" setter="set_global_position" getter="get_global_position" default="Vector2(0, 0)">
The global mouse position relative to the current [Viewport] when used in [method Control._gui_input], otherwise is at 0,0.
</member>
- <member name="position" type="Vector2" setter="set_position" getter="get_position" default="Vector2( 0, 0 )">
+ <member name="position" type="Vector2" setter="set_position" getter="get_position" default="Vector2(0, 0)">
The local mouse position relative to the [Viewport]. If used in [method Control._gui_input], the position is relative to the current [Control] which is under the mouse.
</member>
</members>
diff --git a/doc/classes/InputEventMouseButton.xml b/doc/classes/InputEventMouseButton.xml
index d7e92f8bca..be71b42567 100644
--- a/doc/classes/InputEventMouseButton.xml
+++ b/doc/classes/InputEventMouseButton.xml
@@ -15,7 +15,7 @@
<member name="button_index" type="int" setter="set_button_index" getter="get_button_index" default="0">
The mouse button identifier, one of the [enum MouseButton] button or button wheel constants.
</member>
- <member name="doubleclick" type="bool" setter="set_doubleclick" getter="is_doubleclick" default="false">
+ <member name="double_click" type="bool" setter="set_double_click" getter="is_double_click" default="false">
If [code]true[/code], the mouse button's state is a double-click.
</member>
<member name="factor" type="float" setter="set_factor" getter="get_factor" default="1.0">
diff --git a/doc/classes/InputEventMouseMotion.xml b/doc/classes/InputEventMouseMotion.xml
index 0f9e71adb4..881d74ac7b 100644
--- a/doc/classes/InputEventMouseMotion.xml
+++ b/doc/classes/InputEventMouseMotion.xml
@@ -17,14 +17,14 @@
<member name="pressure" type="float" setter="set_pressure" getter="get_pressure" default="0.0">
Represents the pressure the user puts on the pen. Ranges from [code]0.0[/code] to [code]1.0[/code].
</member>
- <member name="relative" type="Vector2" setter="set_relative" getter="get_relative" default="Vector2( 0, 0 )">
+ <member name="relative" type="Vector2" setter="set_relative" getter="get_relative" default="Vector2(0, 0)">
The mouse position relative to the previous position (position at the last frame).
[b]Note:[/b] Since [InputEventMouseMotion] is only emitted when the mouse moves, the last event won't have a relative position of [code]Vector2(0, 0)[/code] when the user stops moving the mouse.
</member>
- <member name="speed" type="Vector2" setter="set_speed" getter="get_speed" default="Vector2( 0, 0 )">
+ <member name="speed" type="Vector2" setter="set_speed" getter="get_speed" default="Vector2(0, 0)">
The mouse speed in pixels per second.
</member>
- <member name="tilt" type="Vector2" setter="set_tilt" getter="get_tilt" default="Vector2( 0, 0 )">
+ <member name="tilt" type="Vector2" setter="set_tilt" getter="get_tilt" default="Vector2(0, 0)">
Represents the angles of tilt of the pen. Positive X-coordinate value indicates a tilt to the right. Positive Y-coordinate value indicates a tilt toward the user. Ranges from [code]-1.0[/code] to [code]1.0[/code] for both axes.
</member>
</members>
diff --git a/doc/classes/InputEventPanGesture.xml b/doc/classes/InputEventPanGesture.xml
index 83161cd163..ffb1901dad 100644
--- a/doc/classes/InputEventPanGesture.xml
+++ b/doc/classes/InputEventPanGesture.xml
@@ -9,7 +9,7 @@
<methods>
</methods>
<members>
- <member name="delta" type="Vector2" setter="set_delta" getter="get_delta" default="Vector2( 0, 0 )">
+ <member name="delta" type="Vector2" setter="set_delta" getter="get_delta" default="Vector2(0, 0)">
</member>
</members>
<constants>
diff --git a/doc/classes/InputEventScreenDrag.xml b/doc/classes/InputEventScreenDrag.xml
index d69f175be8..079ac03f45 100644
--- a/doc/classes/InputEventScreenDrag.xml
+++ b/doc/classes/InputEventScreenDrag.xml
@@ -15,13 +15,13 @@
<member name="index" type="int" setter="set_index" getter="get_index" default="0">
The drag event index in the case of a multi-drag event.
</member>
- <member name="position" type="Vector2" setter="set_position" getter="get_position" default="Vector2( 0, 0 )">
+ <member name="position" type="Vector2" setter="set_position" getter="get_position" default="Vector2(0, 0)">
The drag position.
</member>
- <member name="relative" type="Vector2" setter="set_relative" getter="get_relative" default="Vector2( 0, 0 )">
+ <member name="relative" type="Vector2" setter="set_relative" getter="get_relative" default="Vector2(0, 0)">
The drag position relative to its start position.
</member>
- <member name="speed" type="Vector2" setter="set_speed" getter="get_speed" default="Vector2( 0, 0 )">
+ <member name="speed" type="Vector2" setter="set_speed" getter="get_speed" default="Vector2(0, 0)">
The drag speed.
</member>
</members>
diff --git a/doc/classes/InputEventScreenTouch.xml b/doc/classes/InputEventScreenTouch.xml
index f497f2fecc..7aa5f62b05 100644
--- a/doc/classes/InputEventScreenTouch.xml
+++ b/doc/classes/InputEventScreenTouch.xml
@@ -16,7 +16,7 @@
<member name="index" type="int" setter="set_index" getter="get_index" default="0">
The touch index in the case of a multi-touch event. One index = one finger.
</member>
- <member name="position" type="Vector2" setter="set_position" getter="get_position" default="Vector2( 0, 0 )">
+ <member name="position" type="Vector2" setter="set_position" getter="get_position" default="Vector2(0, 0)">
The touch position.
</member>
<member name="pressed" type="bool" setter="set_pressed" getter="is_pressed" default="false">
diff --git a/doc/classes/InputEventWithModifiers.xml b/doc/classes/InputEventWithModifiers.xml
index dd782209e5..3beea7f9a0 100644
--- a/doc/classes/InputEventWithModifiers.xml
+++ b/doc/classes/InputEventWithModifiers.xml
@@ -12,23 +12,23 @@
<methods>
</methods>
<members>
- <member name="alt" type="bool" setter="set_alt" getter="get_alt" default="false">
+ <member name="alt_pressed" type="bool" setter="set_alt_pressed" getter="is_alt_pressed" default="false">
State of the [kbd]Alt[/kbd] modifier.
</member>
- <member name="command" type="bool" setter="set_command" getter="get_command" default="false">
+ <member name="command_pressed" type="bool" setter="set_command_pressed" getter="is_command_pressed" default="false">
State of the [kbd]Cmd[/kbd] modifier.
</member>
- <member name="control" type="bool" setter="set_control" getter="get_control" default="false">
+ <member name="ctrl_pressed" type="bool" setter="set_ctrl_pressed" getter="is_ctrl_pressed" default="false">
State of the [kbd]Ctrl[/kbd] modifier.
</member>
- <member name="meta" type="bool" setter="set_metakey" getter="get_metakey" default="false">
+ <member name="meta_pressed" type="bool" setter="set_meta_pressed" getter="is_meta_pressed" default="false">
State of the [kbd]Meta[/kbd] modifier.
</member>
- <member name="shift" type="bool" setter="set_shift" getter="get_shift" default="false">
+ <member name="shift_pressed" type="bool" setter="set_shift_pressed" getter="is_shift_pressed" default="false">
State of the [kbd]Shift[/kbd] modifier.
</member>
<member name="store_command" type="bool" setter="set_store_command" getter="is_storing_command" default="true">
- If [code]true[/code], pressing [kbd]Cmd[/kbd] on macOS or [kbd]Ctrl[/kbd] on all other platforms will both be serialized as [member command]. If [code]false[/code], those same keys will be serialized as [member meta] on macOS and [member control] on all other platforms.
+ If [code]true[/code], pressing [kbd]Cmd[/kbd] on macOS or [kbd]Ctrl[/kbd] on all other platforms will both be serialized as [member command_pressed]. If [code]false[/code], those same keys will be serialized as [member meta_pressed] on macOS and [member ctrl_pressed] on all other platforms.
This aids with cross-platform compatibility when developing e.g. on Windows for macOS, or vice-versa.
</member>
</members>
diff --git a/doc/classes/InstancePlaceholder.xml b/doc/classes/InstancePlaceholder.xml
index defd23afb1..934764b461 100644
--- a/doc/classes/InstancePlaceholder.xml
+++ b/doc/classes/InstancePlaceholder.xml
@@ -4,7 +4,7 @@
Placeholder for the root [Node] of a [PackedScene].
</brief_description>
<description>
- Turning on the option [b]Load As Placeholder[/b] for an instanced scene in the editor causes it to be replaced by an [InstancePlaceholder] when running the game. This makes it possible to delay actually loading the scene until calling [method create_instance]. This is useful to avoid loading large scenes all at once by loading parts of it selectively.
+ Turning on the option [b]Load As Placeholder[/b] for an instantiated scene in the editor causes it to be replaced by an [InstancePlaceholder] when running the game. This makes it possible to delay actually loading the scene until calling [method create_instance]. This is useful to avoid loading large scenes all at once by loading parts of it selectively.
The [InstancePlaceholder] does not have a transform. This causes any child nodes to be positioned relatively to the [Viewport] from point (0,0), rather than their parent as displayed in the editor. Replacing the placeholder with a scene with a transform will transform children relatively to their parent again.
</description>
<tutorials>
diff --git a/doc/classes/IntervalTweener.xml b/doc/classes/IntervalTweener.xml
new file mode 100644
index 0000000000..1c59003c70
--- /dev/null
+++ b/doc/classes/IntervalTweener.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="IntervalTweener" inherits="Tweener" version="4.0">
+ <brief_description>
+ Creates an idle interval in a [Tween] animation.
+ </brief_description>
+ <description>
+ [IntervalTweener] is used to make delays in a tweening sequence. See [method Tween.tween_interval] for more usage information.
+ [b]Note:[/b] [method Tween.tween_interval] is the only correct way to create [IntervalTweener]. Any [IntervalTweener] created manually will not function correctly.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/ItemList.xml b/doc/classes/ItemList.xml
index 0020cbf242..c639e0b88e 100644
--- a/doc/classes/ItemList.xml
+++ b/doc/classes/ItemList.xml
@@ -484,7 +484,7 @@
The width all columns will be adjusted to.
A value of zero disables the adjustment, each item will have a width equal to the width of its content and the columns will have an uneven width.
</member>
- <member name="fixed_icon_size" type="Vector2" setter="set_fixed_icon_size" getter="get_fixed_icon_size" default="Vector2( 0, 0 )">
+ <member name="fixed_icon_size" type="Vector2" setter="set_fixed_icon_size" getter="get_fixed_icon_size" default="Vector2(0, 0)">
The size all icons will be adjusted to.
If either X or Y component is not greater than zero, icon size won't be affected.
</member>
@@ -593,19 +593,19 @@
<theme_item name="font" type="Font">
[Font] of the item's text.
</theme_item>
- <theme_item name="font_color" type="Color" default="Color( 0.63, 0.63, 0.63, 1 )">
+ <theme_item name="font_color" type="Color" default="Color(0.63, 0.63, 0.63, 1)">
Default text [Color] of the item.
</theme_item>
- <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ <theme_item name="font_outline_color" type="Color" default="Color(1, 1, 1, 1)">
The tint of text outline of the item.
</theme_item>
- <theme_item name="font_selected_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ <theme_item name="font_selected_color" type="Color" default="Color(1, 1, 1, 1)">
Text [Color] used when the item is selected.
</theme_item>
<theme_item name="font_size" type="int">
Font size of the item's text.
</theme_item>
- <theme_item name="guide_color" type="Color" default="Color( 0, 0, 0, 0.1 )">
+ <theme_item name="guide_color" type="Color" default="Color(0, 0, 0, 0.1)">
[Color] of the guideline. The guideline is a line drawn between each row of items.
</theme_item>
<theme_item name="hseparation" type="int" default="4">
diff --git a/doc/classes/JSON.xml b/doc/classes/JSON.xml
index a9fb50c262..b95aaed143 100644
--- a/doc/classes/JSON.xml
+++ b/doc/classes/JSON.xml
@@ -1,42 +1,88 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="JSON" inherits="Object" version="4.0">
+<class name="JSON" inherits="RefCounted" version="4.0">
<brief_description>
- Helper class for parsing JSON data.
+ Helper class for creating and parsing JSON data.
</brief_description>
<description>
- Helper class for parsing JSON data. For usage example and other important hints, see [JSONParseResult].
+ The [JSON] enables all data types to be converted to and from a JSON string. This useful for serializing data to save to a file or send over the network.
+ [method stringify] is used to convert any data type into a JSON string.
+ [method parse] is used to convert any existing JSON data into a [Variant] that can be used within Godot. If successfully parsed, use [method get_data] to retrieve the [Variant], and use [code]typeof[/code] to check if the Variant's type is what you expect. JSON Objects are converted into a [Dictionary], but JSON data can be used to store [Array]s, numbers, [String]s and even just a boolean.
+ [b]Example[/b]
+ [codeblock]
+ var data_to_send = ["a", "b", "c"]
+ var json = JSON.new()
+ var json_string = json.stringify(data_to_send)
+ # Save data
+ # ...
+ # Retrieve data
+ var error = json.parse(json_string)
+ if error == OK:
+ var data_received = json.get_data()
+ if typeof(data_received) == TYPE_ARRAY:
+ print(data_received) # Prints array
+ else:
+ print("Unexpected data")
+ else:
+ print("JSON Parse Error: ", json.get_error_message(), " in ", json_string, " at line ", json.get_error_line())
+ [/codeblock]
</description>
<tutorials>
</tutorials>
<methods>
+ <method name="get_data" qualifiers="const">
+ <return type="Variant">
+ </return>
+ <description>
+ Returns the [Variant] containing the data of a successful [method parse].
+ [b]Note:[/b] It will return [code]Null[/code] if the last call to parse was unsuccessful or [method parse] has not yet been called.
+ </description>
+ </method>
+ <method name="get_error_line" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns [code]0[/code] if the last call to [method parse] was successful, or the line number where the parse failed.
+ </description>
+ </method>
+ <method name="get_error_message" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ Returns an empty string if the last call to [method parse] was successful, or the error message if it failed.
+ </description>
+ </method>
<method name="parse">
- <return type="JSONParseResult">
+ <return type="int" enum="Error">
</return>
- <argument index="0" name="json" type="String">
+ <argument index="0" name="json_string" type="String">
</argument>
<description>
- Parses a JSON-encoded string and returns a [JSONParseResult] containing the result.
+ Attempts to parse the [code]json_string[/code] provided.
+ Returns an [enum Error]. If the parse was successful, it returns [code]OK[/code] and the result can be retrieved using [method get_data]. If unsuccessful, use [method get_error_line] and [method get_error_message] for identifying the source of the failure.
</description>
</method>
- <method name="print">
+ <method name="stringify">
<return type="String">
</return>
- <argument index="0" name="value" type="Variant">
+ <argument index="0" name="data" type="Variant">
</argument>
<argument index="1" name="indent" type="String" default="&quot;&quot;">
</argument>
- <argument index="2" name="sort_keys" type="bool" default="false">
+ <argument index="2" name="sort_keys" type="bool" default="true">
+ </argument>
+ <argument index="3" name="full_precision" type="bool" default="false">
</argument>
<description>
Converts a [Variant] var to JSON text and returns the result. Useful for serializing data to store or send over the network.
[b]Note:[/b] The JSON specification does not define integer or float types, but only a [i]number[/i] type. Therefore, converting a Variant to JSON text will convert all numerical values to [float] types.
- Use [code]indent[/code] parameter to pretty print the output.
+ [b]Note:[/b] If [code]full_precision[/code] is true, when stringifying floats, the unreliable digits are stringified in addition to the reliable digits to guarantee exact decoding.
+ Use [code]indent[/code] parameter to pretty stringify the output.
[b]Example output:[/b]
[codeblock]
- ## JSON.print(my_dictionary)
+ ## JSON.stringify(my_dictionary)
{"name":"my_dictionary","version":"1.0.0","entities":[{"name":"entity_0","value":"value_0"},{"name":"entity_1","value":"value_1"}]}
- ## JSON.print(my_dictionary, "\t")
+ ## JSON.stringify(my_dictionary, "\t")
{
"name": "my_dictionary",
"version": "1.0.0",
diff --git a/doc/classes/JSONParseResult.xml b/doc/classes/JSONParseResult.xml
deleted file mode 100644
index bc94f74b07..0000000000
--- a/doc/classes/JSONParseResult.xml
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="JSONParseResult" inherits="Reference" version="4.0">
- <brief_description>
- Data class wrapper for decoded JSON.
- </brief_description>
- <description>
- Returned by [method JSON.parse], [JSONParseResult] contains the decoded JSON or error information if the JSON source wasn't successfully parsed. You can check if the JSON source was successfully parsed with [code]if json_result.error == OK[/code].
- </description>
- <tutorials>
- </tutorials>
- <methods>
- </methods>
- <members>
- <member name="error" type="int" setter="set_error" getter="get_error" enum="Error">
- The error type if the JSON source was not successfully parsed. See the [enum Error] constants.
- </member>
- <member name="error_line" type="int" setter="set_error_line" getter="get_error_line" default="-1">
- The line number where the error occurred if the JSON source was not successfully parsed.
- </member>
- <member name="error_string" type="String" setter="set_error_string" getter="get_error_string" default="&quot;&quot;">
- The error message if the JSON source was not successfully parsed. See the [enum Error] constants.
- </member>
- <member name="result" type="Variant" setter="set_result" getter="get_result">
- A [Variant] containing the parsed JSON. Use [method @GlobalScope.typeof] or the [code]is[/code] keyword to check if it is what you expect. For example, if the JSON source starts with curly braces ([code]{}[/code]), a [Dictionary] will be returned. If the JSON source starts with brackets ([code][][/code]), an [Array] will be returned.
- [b]Note:[/b] The JSON specification does not define integer or float types, but only a [i]number[/i] type. Therefore, parsing a JSON text will convert all numerical values to [float] types.
- [b]Note:[/b] JSON objects do not preserve key order like Godot dictionaries, thus, you should not rely on keys being in a certain order if a dictionary is constructed from JSON. In contrast, JSON arrays retain the order of their elements:
- [codeblocks]
- [gdscript]
- var p = JSON.parse('["hello", "world", "!"]')
- if typeof(p.result) == TYPE_ARRAY:
- print(p.result[0]) # Prints "hello"
- else:
- push_error("Unexpected results.")
- [/gdscript]
- [csharp]
- JSONParseResult p = JSON.Parse("[\"hello\"], \"world\", \"!\"]");
- if (p.Result is Godot.Collections.Array)
- {
- GD.Print((p.Result as Godot.Collections.Array)[0]); // Prints "hello"
- }
- else
- {
- GD.PushError("Unexpected results.");
- }
- [/csharp]
- [/codeblocks]
- </member>
- </members>
- <constants>
- </constants>
-</class>
diff --git a/doc/classes/JSONParser.xml b/doc/classes/JSONParser.xml
deleted file mode 100644
index 31ba295418..0000000000
--- a/doc/classes/JSONParser.xml
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="JSONParser" inherits="Reference" version="4.0">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <tutorials>
- </tutorials>
- <methods>
- <method name="decode_data">
- <return type="int" enum="Error">
- </return>
- <argument index="0" name="data" type="Variant">
- </argument>
- <argument index="1" name="indent" type="String" default="&quot;&quot;">
- </argument>
- <argument index="2" name="sort_keys" type="bool" default="true">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_data" qualifiers="const">
- <return type="Variant">
- </return>
- <description>
- </description>
- </method>
- <method name="get_error_line" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_error_text" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="get_string" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="parse_string">
- <return type="int" enum="Error">
- </return>
- <argument index="0" name="json_string" type="String">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
diff --git a/doc/classes/JavaClass.xml b/doc/classes/JavaClass.xml
index 69b7a9b718..0b6a44fe14 100644
--- a/doc/classes/JavaClass.xml
+++ b/doc/classes/JavaClass.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="JavaClass" inherits="Reference" version="4.0">
+<class name="JavaClass" inherits="RefCounted" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/JavaScript.xml b/doc/classes/JavaScript.xml
index c707a72ee8..c87e637ff5 100644
--- a/doc/classes/JavaScript.xml
+++ b/doc/classes/JavaScript.xml
@@ -11,6 +11,40 @@
<link title="Exporting for the Web: Calling JavaScript from script">https://docs.godotengine.org/en/latest/getting_started/workflow/export/exporting_for_web.html#calling-javascript-from-script</link>
</tutorials>
<methods>
+ <method name="create_callback">
+ <return type="JavaScriptObject">
+ </return>
+ <argument index="0" name="callable" type="Callable">
+ </argument>
+ <description>
+ Creates a reference to a [Callable] that can be used as a callback by JavaScript. The reference must be kept until the callback happens, or it won't be called at all. See [JavaScriptObject] for usage.
+ </description>
+ </method>
+ <method name="create_object" qualifiers="vararg">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="object" type="String">
+ </argument>
+ <description>
+ Creates a new JavaScript object using the [code]new[/code] constructor. The [code]object[/code] must a valid property of the JavaScript [code]window[/code]. See [JavaScriptObject] for usage.
+ </description>
+ </method>
+ <method name="download_buffer">
+ <return type="void">
+ </return>
+ <argument index="0" name="buffer" type="PackedByteArray">
+ </argument>
+ <argument index="1" name="name" type="String">
+ </argument>
+ <argument index="2" name="mime" type="String" default="&quot;application/octet-stream&quot;">
+ </argument>
+ <description>
+ Prompts the user to download a file containing the specified [code]buffer[/code]. The file will have the given [code]name[/code] and [code]mime[/code] type.
+ [b]Note:[/b] The browser may override the [url=https://en.wikipedia.org/wiki/Media_type]MIME type[/url] provided based on the file [code]name[/code]'s extension.
+ [b]Note:[/b] Browsers might block the download if [method download_buffer] is not being called from a user interaction (e.g. button click).
+ [b]Note:[/b] Browsers might ask the user for permission or block the download if multiple download requests are made in a quick succession.
+ </description>
+ </method>
<method name="eval">
<return type="Variant">
</return>
@@ -23,6 +57,15 @@
If [code]use_global_execution_context[/code] is [code]true[/code], the code will be evaluated in the global execution context. Otherwise, it is evaluated in the execution context of a function within the engine's runtime environment.
</description>
</method>
+ <method name="get_interface">
+ <return type="JavaScriptObject">
+ </return>
+ <argument index="0" name="interface" type="String">
+ </argument>
+ <description>
+ Returns an interface to a JavaScript object that can be used by scripts. The [code]interface[/code] must be a valid property of the JavaScript [code]window[/code]. The callback must accept a single [Array] argument, which will contain the JavaScript [code]arguments[/code]. See [JavaScriptObject] for usage.
+ </description>
+ </method>
</methods>
<constants>
</constants>
diff --git a/doc/classes/JavaScriptObject.xml b/doc/classes/JavaScriptObject.xml
new file mode 100644
index 0000000000..087fe163b4
--- /dev/null
+++ b/doc/classes/JavaScriptObject.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="JavaScriptObject" inherits="RefCounted" version="4.0">
+ <brief_description>
+ A wrapper class for native JavaScript objects.
+ </brief_description>
+ <description>
+ JavaScriptObject is used to interact with JavaScript objects retrieved or created via [method JavaScript.get_interface], [method JavaScript.create_object], or [method JavaScript.create_callback].
+ Example:
+ [codeblock]
+ extends Node
+
+ var _my_js_callback = JavaScript.create_callback(self, "myCallback") # This reference must be kept
+ var console = JavaScript.get_interface("console")
+
+ func _init():
+ var buf = JavaScript.create_object("ArrayBuffer", 10) # new ArrayBuffer(10)
+ print(buf) # prints [JavaScriptObject:OBJECT_ID]
+ var uint8arr = JavaScript.create_object("Uint8Array", buf) # new Uint8Array(buf)
+ uint8arr[1] = 255
+ prints(uint8arr[1], uint8arr.byteLength) # prints 255 10
+ console.log(uint8arr) # prints in browser console "Uint8Array(10) [ 0, 255, 0, 0, 0, 0, 0, 0, 0, 0 ]"
+
+ # Equivalent of JavaScript: Array.from(uint8arr).forEach(myCallback)
+ JavaScript.get_interface("Array").from(uint8arr).forEach(_my_js_callback)
+
+ func myCallback(args):
+ # Will be called with the parameters passed to the "forEach" callback
+ # [0, 0, [JavaScriptObject:1173]]
+ # [255, 1, [JavaScriptObject:1173]]
+ # ...
+ # [0, 9, [JavaScriptObject:1180]]
+ print(args)
+ [/codeblock]
+ Note: Only available in the "HTML5" platform.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/KinematicBody2D.xml b/doc/classes/KinematicBody2D.xml
deleted file mode 100644
index fdd4db6115..0000000000
--- a/doc/classes/KinematicBody2D.xml
+++ /dev/null
@@ -1,176 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="KinematicBody2D" inherits="PhysicsBody2D" version="4.0">
- <brief_description>
- Kinematic body 2D node.
- </brief_description>
- <description>
- Kinematic bodies are special types of bodies that are meant to be user-controlled. They are not affected by physics at all; to other types of bodies, such as a character or a rigid body, these are the same as a static body. However, they have two main uses:
- [b]Simulated motion:[/b] When these bodies are moved manually, either from code or from an [AnimationPlayer] (with [member AnimationPlayer.playback_process_mode] set to "physics"), the physics will automatically compute an estimate of their linear and angular velocity. This makes them very useful for moving platforms or other AnimationPlayer-controlled objects (like a door, a bridge that opens, etc).
- [b]Kinematic characters:[/b] KinematicBody2D also has an API for moving objects (the [method move_and_collide] and [method move_and_slide] methods) while performing collision tests. This makes them really useful to implement characters that collide against a world, but don't require advanced physics.
- </description>
- <tutorials>
- <link title="Kinematic character (2D)">https://docs.godotengine.org/en/latest/tutorials/physics/kinematic_character_2d.html</link>
- <link title="Using KinematicBody2D">https://docs.godotengine.org/en/latest/tutorials/physics/using_kinematic_body_2d.html</link>
- <link title="2D Kinematic Character Demo">https://godotengine.org/asset-library/asset/113</link>
- <link title="2D Platformer Demo">https://godotengine.org/asset-library/asset/120</link>
- </tutorials>
- <methods>
- <method name="get_floor_normal" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- Returns the surface normal of the floor at the last collision point. Only valid after calling [method move_and_slide] or [method move_and_slide_with_snap] and when [method is_on_floor] returns [code]true[/code].
- </description>
- </method>
- <method name="get_floor_velocity" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- Returns the linear velocity of the floor at the last collision point. Only valid after calling [method move_and_slide] or [method move_and_slide_with_snap] and when [method is_on_floor] returns [code]true[/code].
- </description>
- </method>
- <method name="get_slide_collision">
- <return type="KinematicCollision2D">
- </return>
- <argument index="0" name="slide_idx" type="int">
- </argument>
- <description>
- Returns a [KinematicCollision2D], which contains information about a collision that occurred during the last call to [method move_and_slide] or [method move_and_slide_with_snap]. Since the body can collide several times in a single call to [method move_and_slide], you must specify the index of the collision in the range 0 to ([method get_slide_count] - 1).
- [b]Example usage:[/b]
- [codeblocks]
- [gdscript]
- for i in get_slide_count():
- var collision = get_slide_collision(i)
- print("Collided with: ", collision.collider.name)
- [/gdscript]
- [csharp]
- for (int i = 0; i &lt; GetSlideCount(); i++)
- {
- KinematicCollision2D collision = GetSlideCollision(i);
- GD.Print("Collided with: ", (collision.Collider as Node).Name);
- }
- [/csharp]
- [/codeblocks]
- </description>
- </method>
- <method name="get_slide_count" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Returns the number of times the body collided and changed direction during the last call to [method move_and_slide] or [method move_and_slide_with_snap].
- </description>
- </method>
- <method name="is_on_ceiling" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Returns [code]true[/code] if the body collided with the ceiling on the last call of [method move_and_slide] or [method move_and_slide_with_snap]. Otherwise, returns [code]false[/code].
- </description>
- </method>
- <method name="is_on_floor" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Returns [code]true[/code] if the body collided with the floor on the last call of [method move_and_slide] or [method move_and_slide_with_snap]. Otherwise, returns [code]false[/code].
- </description>
- </method>
- <method name="is_on_wall" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Returns [code]true[/code] if the body collided with a wall on the last call of [method move_and_slide] or [method move_and_slide_with_snap]. Otherwise, returns [code]false[/code].
- </description>
- </method>
- <method name="move_and_collide">
- <return type="KinematicCollision2D">
- </return>
- <argument index="0" name="rel_vec" type="Vector2">
- </argument>
- <argument index="1" name="infinite_inertia" type="bool" default="true">
- </argument>
- <argument index="2" name="exclude_raycast_shapes" type="bool" default="true">
- </argument>
- <argument index="3" name="test_only" type="bool" default="false">
- </argument>
- <description>
- Moves the body along the vector [code]rel_vec[/code]. The body will stop if it collides. Returns a [KinematicCollision2D], which contains information about the collision.
- If [code]test_only[/code] is [code]true[/code], the body does not move but the would-be collision information is given.
- </description>
- </method>
- <method name="move_and_slide">
- <return type="Vector2">
- </return>
- <argument index="0" name="linear_velocity" type="Vector2">
- </argument>
- <argument index="1" name="up_direction" type="Vector2" default="Vector2( 0, 0 )">
- </argument>
- <argument index="2" name="stop_on_slope" type="bool" default="false">
- </argument>
- <argument index="3" name="max_slides" type="int" default="4">
- </argument>
- <argument index="4" name="floor_max_angle" type="float" default="0.785398">
- </argument>
- <argument index="5" name="infinite_inertia" type="bool" default="true">
- </argument>
- <description>
- Moves the body along a vector. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a [KinematicBody2D] or [RigidBody2D], it will also be affected by the motion of the other body. You can use this to make moving and rotating platforms, or to make nodes push other nodes.
- This method should be used in [method Node._physics_process] (or in a method called by [method Node._physics_process]), as it uses the physics step's [code]delta[/code] value automatically in calculations. Otherwise, the simulation will run at an incorrect speed.
- [code]linear_velocity[/code] is the velocity vector in pixels per second. Unlike in [method move_and_collide], you should [i]not[/i] multiply it by [code]delta[/code] — the physics engine handles applying the velocity.
- [code]up_direction[/code] is the up direction, used to determine what is a wall and what is a floor or a ceiling. If set to the default value of [code]Vector2(0, 0)[/code], everything is considered a wall. This is useful for topdown games.
- If [code]stop_on_slope[/code] is [code]true[/code], body will not slide on slopes when you include gravity in [code]linear_velocity[/code] and the body is standing still.
- If the body collides, it will change direction a maximum of [code]max_slides[/code] times before it stops.
- [code]floor_max_angle[/code] is the maximum angle (in radians) where a slope is still considered a floor (or a ceiling), rather than a wall. The default value equals 45 degrees.
- If [code]infinite_inertia[/code] is [code]true[/code], body will be able to push [RigidBody2D] nodes, but it won't also detect any collisions with them. If [code]false[/code], it will interact with [RigidBody2D] nodes like with [StaticBody2D].
- Returns the [code]linear_velocity[/code] vector, rotated and/or scaled if a slide collision occurred. To get detailed information about collisions that occurred, use [method get_slide_collision].
- </description>
- </method>
- <method name="move_and_slide_with_snap">
- <return type="Vector2">
- </return>
- <argument index="0" name="linear_velocity" type="Vector2">
- </argument>
- <argument index="1" name="snap" type="Vector2">
- </argument>
- <argument index="2" name="up_direction" type="Vector2" default="Vector2( 0, 0 )">
- </argument>
- <argument index="3" name="stop_on_slope" type="bool" default="false">
- </argument>
- <argument index="4" name="max_slides" type="int" default="4">
- </argument>
- <argument index="5" name="floor_max_angle" type="float" default="0.785398">
- </argument>
- <argument index="6" name="infinite_inertia" type="bool" default="true">
- </argument>
- <description>
- Moves the body while keeping it attached to slopes. Similar to [method move_and_slide].
- As long as the [code]snap[/code] vector is in contact with the ground, the body will remain attached to the surface. This means you must disable snap in order to jump, for example. You can do this by setting [code]snap[/code] to [code](0, 0)[/code] or by using [method move_and_slide] instead.
- </description>
- </method>
- <method name="test_move">
- <return type="bool">
- </return>
- <argument index="0" name="from" type="Transform2D">
- </argument>
- <argument index="1" name="rel_vec" type="Vector2">
- </argument>
- <argument index="2" name="infinite_inertia" type="bool" default="true">
- </argument>
- <description>
- Checks for collisions without moving the body. Virtually sets the node's position, scale and rotation to that of the given [Transform2D], then tries to move the body along the vector [code]rel_vec[/code]. Returns [code]true[/code] if a collision would occur.
- </description>
- </method>
- </methods>
- <members>
- <member name="collision/safe_margin" type="float" setter="set_safe_margin" getter="get_safe_margin" default="0.08">
- Extra margin used for collision recovery in motion functions (see [method move_and_collide], [method move_and_slide], [method move_and_slide_with_snap]).
- If the body is at least this close to another body, it will consider them to be colliding and will be pushed away before performing the actual motion.
- A higher value means it's more flexible for detecting collision, which helps with consistently detecting walls and floors.
- A lower value forces the collision algorithm to use more exact detection, so it can be used in cases that specifically require precision, e.g at very low scale to avoid visible jittering, or for stability with a stack of kinematic bodies.
- </member>
- <member name="motion/sync_to_physics" type="bool" setter="set_sync_to_physics" getter="is_sync_to_physics_enabled" default="false">
- If [code]true[/code], the body's movement will be synchronized to the physics frame. This is useful when animating movement via [AnimationPlayer], for example on moving platforms. Do [b]not[/b] use together with [method move_and_slide] or [method move_and_collide] functions.
- </member>
- </members>
- <constants>
- </constants>
-</class>
diff --git a/doc/classes/KinematicBody3D.xml b/doc/classes/KinematicBody3D.xml
deleted file mode 100644
index efd3f58f88..0000000000
--- a/doc/classes/KinematicBody3D.xml
+++ /dev/null
@@ -1,188 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="KinematicBody3D" inherits="PhysicsBody3D" version="4.0">
- <brief_description>
- Kinematic body 3D node.
- </brief_description>
- <description>
- Kinematic bodies are special types of bodies that are meant to be user-controlled. They are not affected by physics at all; to other types of bodies, such as a character or a rigid body, these are the same as a static body. However, they have two main uses:
- [b]Simulated motion:[/b] When these bodies are moved manually, either from code or from an [AnimationPlayer] (with [member AnimationPlayer.playback_process_mode] set to "physics"), the physics will automatically compute an estimate of their linear and angular velocity. This makes them very useful for moving platforms or other AnimationPlayer-controlled objects (like a door, a bridge that opens, etc).
- [b]Kinematic characters:[/b] KinematicBody3D also has an API for moving objects (the [method move_and_collide] and [method move_and_slide] methods) while performing collision tests. This makes them really useful to implement characters that collide against a world, but don't require advanced physics.
- </description>
- <tutorials>
- <link title="Kinematic character (2D)">https://docs.godotengine.org/en/latest/tutorials/physics/kinematic_character_2d.html</link>
- <link title="3D Kinematic Character Demo">https://godotengine.org/asset-library/asset/126</link>
- <link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link>
- <link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link>
- <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
- </tutorials>
- <methods>
- <method name="get_axis_lock" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="axis" type="int" enum="PhysicsServer3D.BodyAxis">
- </argument>
- <description>
- Returns [code]true[/code] if the specified [code]axis[/code] is locked. See also [member axis_lock_motion_x], [member axis_lock_motion_y] and [member axis_lock_motion_z].
- </description>
- </method>
- <method name="get_floor_normal" qualifiers="const">
- <return type="Vector3">
- </return>
- <description>
- Returns the surface normal of the floor at the last collision point. Only valid after calling [method move_and_slide] or [method move_and_slide_with_snap] and when [method is_on_floor] returns [code]true[/code].
- </description>
- </method>
- <method name="get_floor_velocity" qualifiers="const">
- <return type="Vector3">
- </return>
- <description>
- Returns the linear velocity of the floor at the last collision point. Only valid after calling [method move_and_slide] or [method move_and_slide_with_snap] and when [method is_on_floor] returns [code]true[/code].
- </description>
- </method>
- <method name="get_slide_collision">
- <return type="KinematicCollision3D">
- </return>
- <argument index="0" name="slide_idx" type="int">
- </argument>
- <description>
- Returns a [KinematicCollision3D], which contains information about a collision that occurred during the last call to [method move_and_slide] or [method move_and_slide_with_snap]. Since the body can collide several times in a single call to [method move_and_slide], you must specify the index of the collision in the range 0 to ([method get_slide_count] - 1).
- </description>
- </method>
- <method name="get_slide_count" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Returns the number of times the body collided and changed direction during the last call to [method move_and_slide] or [method move_and_slide_with_snap].
- </description>
- </method>
- <method name="is_on_ceiling" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Returns [code]true[/code] if the body collided with the ceiling on the last call of [method move_and_slide] or [method move_and_slide_with_snap]. Otherwise, returns [code]false[/code].
- </description>
- </method>
- <method name="is_on_floor" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Returns [code]true[/code] if the body collided with the floor on the last call of [method move_and_slide] or [method move_and_slide_with_snap]. Otherwise, returns [code]false[/code].
- </description>
- </method>
- <method name="is_on_wall" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Returns [code]true[/code] if the body collided with a wall on the last call of [method move_and_slide] or [method move_and_slide_with_snap]. Otherwise, returns [code]false[/code].
- </description>
- </method>
- <method name="move_and_collide">
- <return type="KinematicCollision3D">
- </return>
- <argument index="0" name="rel_vec" type="Vector3">
- </argument>
- <argument index="1" name="infinite_inertia" type="bool" default="true">
- </argument>
- <argument index="2" name="exclude_raycast_shapes" type="bool" default="true">
- </argument>
- <argument index="3" name="test_only" type="bool" default="false">
- </argument>
- <description>
- Moves the body along the vector [code]rel_vec[/code]. The body will stop if it collides. Returns a [KinematicCollision3D], which contains information about the collision.
- If [code]test_only[/code] is [code]true[/code], the body does not move but the would-be collision information is given.
- </description>
- </method>
- <method name="move_and_slide">
- <return type="Vector3">
- </return>
- <argument index="0" name="linear_velocity" type="Vector3">
- </argument>
- <argument index="1" name="up_direction" type="Vector3" default="Vector3( 0, 0, 0 )">
- </argument>
- <argument index="2" name="stop_on_slope" type="bool" default="false">
- </argument>
- <argument index="3" name="max_slides" type="int" default="4">
- </argument>
- <argument index="4" name="floor_max_angle" type="float" default="0.785398">
- </argument>
- <argument index="5" name="infinite_inertia" type="bool" default="true">
- </argument>
- <description>
- Moves the body along a vector. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a [KinematicBody3D] or [RigidBody3D], it will also be affected by the motion of the other body. You can use this to make moving and rotating platforms, or to make nodes push other nodes.
- This method should be used in [method Node._physics_process] (or in a method called by [method Node._physics_process]), as it uses the physics step's [code]delta[/code] value automatically in calculations. Otherwise, the simulation will run at an incorrect speed.
- [code]linear_velocity[/code] is the velocity vector (typically meters per second). Unlike in [method move_and_collide], you should [i]not[/i] multiply it by [code]delta[/code] — the physics engine handles applying the velocity.
- [code]up_direction[/code] is the up direction, used to determine what is a wall and what is a floor or a ceiling. If set to the default value of [code]Vector3(0, 0, 0)[/code], everything is considered a wall.
- If [code]stop_on_slope[/code] is [code]true[/code], body will not slide on slopes when you include gravity in [code]linear_velocity[/code] and the body is standing still.
- If the body collides, it will change direction a maximum of [code]max_slides[/code] times before it stops.
- [code]floor_max_angle[/code] is the maximum angle (in radians) where a slope is still considered a floor (or a ceiling), rather than a wall. The default value equals 45 degrees.
- If [code]infinite_inertia[/code] is [code]true[/code], body will be able to push [RigidBody3D] nodes, but it won't also detect any collisions with them. If [code]false[/code], it will interact with [RigidBody3D] nodes like with [StaticBody3D].
- Returns the [code]linear_velocity[/code] vector, rotated and/or scaled if a slide collision occurred. To get detailed information about collisions that occurred, use [method get_slide_collision].
- </description>
- </method>
- <method name="move_and_slide_with_snap">
- <return type="Vector3">
- </return>
- <argument index="0" name="linear_velocity" type="Vector3">
- </argument>
- <argument index="1" name="snap" type="Vector3">
- </argument>
- <argument index="2" name="up_direction" type="Vector3" default="Vector3( 0, 0, 0 )">
- </argument>
- <argument index="3" name="stop_on_slope" type="bool" default="false">
- </argument>
- <argument index="4" name="max_slides" type="int" default="4">
- </argument>
- <argument index="5" name="floor_max_angle" type="float" default="0.785398">
- </argument>
- <argument index="6" name="infinite_inertia" type="bool" default="true">
- </argument>
- <description>
- Moves the body while keeping it attached to slopes. Similar to [method move_and_slide].
- As long as the [code]snap[/code] vector is in contact with the ground, the body will remain attached to the surface. This means you must disable snap in order to jump, for example. You can do this by setting [code]snap[/code] to [code](0, 0, 0)[/code] or by using [method move_and_slide] instead.
- </description>
- </method>
- <method name="set_axis_lock">
- <return type="void">
- </return>
- <argument index="0" name="axis" type="int" enum="PhysicsServer3D.BodyAxis">
- </argument>
- <argument index="1" name="lock" type="bool">
- </argument>
- <description>
- Locks or unlocks the specified [code]axis[/code] depending on the value of [code]lock[/code]. See also [member axis_lock_motion_x], [member axis_lock_motion_y] and [member axis_lock_motion_z].
- </description>
- </method>
- <method name="test_move">
- <return type="bool">
- </return>
- <argument index="0" name="from" type="Transform">
- </argument>
- <argument index="1" name="rel_vec" type="Vector3">
- </argument>
- <argument index="2" name="infinite_inertia" type="bool" default="true">
- </argument>
- <description>
- Checks for collisions without moving the body. Virtually sets the node's position, scale and rotation to that of the given [Transform], then tries to move the body along the vector [code]rel_vec[/code]. Returns [code]true[/code] if a collision would occur.
- </description>
- </method>
- </methods>
- <members>
- <member name="axis_lock_motion_x" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false">
- Lock the body's X axis movement.
- </member>
- <member name="axis_lock_motion_y" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false">
- Lock the body's Y axis movement.
- </member>
- <member name="axis_lock_motion_z" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false">
- Lock the body's Z axis movement.
- </member>
- <member name="collision/safe_margin" type="float" setter="set_safe_margin" getter="get_safe_margin" default="0.001">
- Extra margin used for collision recovery in motion functions (see [method move_and_collide], [method move_and_slide], [method move_and_slide_with_snap]).
- If the body is at least this close to another body, it will consider them to be colliding and will be pushed away before performing the actual motion.
- A higher value means it's more flexible for detecting collision, which helps with consistently detecting walls and floors.
- A lower value forces the collision algorithm to use more exact detection, so it can be used in cases that specifically require precision, e.g at very low scale to avoid visible jittering, or for stability with a stack of kinematic bodies.
- </member>
- </members>
- <constants>
- </constants>
-</class>
diff --git a/doc/classes/KinematicCollision2D.xml b/doc/classes/KinematicCollision2D.xml
index ec6e16e25a..d7999f1aa0 100644
--- a/doc/classes/KinematicCollision2D.xml
+++ b/doc/classes/KinematicCollision2D.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="KinematicCollision2D" inherits="Reference" version="4.0">
+<class name="KinematicCollision2D" inherits="RefCounted" version="4.0">
<brief_description>
- Collision data for [KinematicBody2D] collisions.
+ Collision data for [method PhysicsBody2D.move_and_collide] collisions.
</brief_description>
<description>
- Contains collision data for [KinematicBody2D] collisions. When a [KinematicBody2D] is moved using [method KinematicBody2D.move_and_collide], it stops if it detects a collision with another body. If a collision is detected, a KinematicCollision2D object is returned.
+ Contains collision data for [method PhysicsBody2D.move_and_collide] collisions. When a [PhysicsBody2D] is moved using [method PhysicsBody2D.move_and_collide], it stops if it detects a collision with another body. If a collision is detected, a [KinematicCollision2D] object is returned.
This object contains information about the collision, including the colliding object, the remaining motion, and the collision position. This information can be used to calculate a collision response.
</description>
<tutorials>
@@ -21,28 +21,31 @@
<member name="collider_metadata" type="Variant" setter="" getter="get_collider_metadata">
The colliding body's metadata. See [Object].
</member>
+ <member name="collider_rid" type="RID" setter="" getter="get_collider_rid">
+ The colliding body's [RID] used by the [PhysicsServer2D].
+ </member>
<member name="collider_shape" type="Object" setter="" getter="get_collider_shape">
The colliding body's shape.
</member>
<member name="collider_shape_index" type="int" setter="" getter="get_collider_shape_index" default="0">
The colliding shape's index. See [CollisionObject2D].
</member>
- <member name="collider_velocity" type="Vector2" setter="" getter="get_collider_velocity" default="Vector2( 0, 0 )">
+ <member name="collider_velocity" type="Vector2" setter="" getter="get_collider_velocity" default="Vector2(0, 0)">
The colliding object's velocity.
</member>
<member name="local_shape" type="Object" setter="" getter="get_local_shape">
The moving object's colliding shape.
</member>
- <member name="normal" type="Vector2" setter="" getter="get_normal" default="Vector2( 0, 0 )">
+ <member name="normal" type="Vector2" setter="" getter="get_normal" default="Vector2(0, 0)">
The colliding body's shape's normal at the point of collision.
</member>
- <member name="position" type="Vector2" setter="" getter="get_position" default="Vector2( 0, 0 )">
+ <member name="position" type="Vector2" setter="" getter="get_position" default="Vector2(0, 0)">
The point of collision, in global coordinates.
</member>
- <member name="remainder" type="Vector2" setter="" getter="get_remainder" default="Vector2( 0, 0 )">
+ <member name="remainder" type="Vector2" setter="" getter="get_remainder" default="Vector2(0, 0)">
The moving object's remaining movement vector.
</member>
- <member name="travel" type="Vector2" setter="" getter="get_travel" default="Vector2( 0, 0 )">
+ <member name="travel" type="Vector2" setter="" getter="get_travel" default="Vector2(0, 0)">
The distance the moving object traveled before collision.
</member>
</members>
diff --git a/doc/classes/KinematicCollision3D.xml b/doc/classes/KinematicCollision3D.xml
index f3248a9ca1..abdb5b4f4e 100644
--- a/doc/classes/KinematicCollision3D.xml
+++ b/doc/classes/KinematicCollision3D.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="KinematicCollision3D" inherits="Reference" version="4.0">
+<class name="KinematicCollision3D" inherits="RefCounted" version="4.0">
<brief_description>
- Collision data for [KinematicBody3D] collisions.
+ Collision data for [method PhysicsBody3D.move_and_collide] collisions.
</brief_description>
<description>
- Contains collision data for [KinematicBody3D] collisions. When a [KinematicBody3D] is moved using [method KinematicBody3D.move_and_collide], it stops if it detects a collision with another body. If a collision is detected, a KinematicCollision3D object is returned.
+ Contains collision data for [method PhysicsBody3D.move_and_collide] collisions. When a [PhysicsBody3D] is moved using [method PhysicsBody3D.move_and_collide], it stops if it detects a collision with another body. If a collision is detected, a [KinematicCollision3D] object is returned.
This object contains information about the collision, including the colliding object, the remaining motion, and the collision position. This information can be used to calculate a collision response.
</description>
<tutorials>
@@ -21,28 +21,31 @@
<member name="collider_metadata" type="Variant" setter="" getter="get_collider_metadata">
The colliding body's metadata. See [Object].
</member>
+ <member name="collider_rid" type="RID" setter="" getter="get_collider_rid">
+ The colliding body's [RID] used by the [PhysicsServer3D].
+ </member>
<member name="collider_shape" type="Object" setter="" getter="get_collider_shape">
The colliding body's shape.
</member>
<member name="collider_shape_index" type="int" setter="" getter="get_collider_shape_index" default="0">
The colliding shape's index. See [CollisionObject3D].
</member>
- <member name="collider_velocity" type="Vector3" setter="" getter="get_collider_velocity" default="Vector3( 0, 0, 0 )">
+ <member name="collider_velocity" type="Vector3" setter="" getter="get_collider_velocity" default="Vector3(0, 0, 0)">
The colliding object's velocity.
</member>
<member name="local_shape" type="Object" setter="" getter="get_local_shape">
The moving object's colliding shape.
</member>
- <member name="normal" type="Vector3" setter="" getter="get_normal" default="Vector3( 0, 0, 0 )">
+ <member name="normal" type="Vector3" setter="" getter="get_normal" default="Vector3(0, 0, 0)">
The colliding body's shape's normal at the point of collision.
</member>
- <member name="position" type="Vector3" setter="" getter="get_position" default="Vector3( 0, 0, 0 )">
+ <member name="position" type="Vector3" setter="" getter="get_position" default="Vector3(0, 0, 0)">
The point of collision, in global coordinates.
</member>
- <member name="remainder" type="Vector3" setter="" getter="get_remainder" default="Vector3( 0, 0, 0 )">
+ <member name="remainder" type="Vector3" setter="" getter="get_remainder" default="Vector3(0, 0, 0)">
The moving object's remaining movement vector.
</member>
- <member name="travel" type="Vector3" setter="" getter="get_travel" default="Vector3( 0, 0, 0 )">
+ <member name="travel" type="Vector3" setter="" getter="get_travel" default="Vector3(0, 0, 0)">
The distance the moving object traveled before collision.
</member>
</members>
diff --git a/doc/classes/Label.xml b/doc/classes/Label.xml
index 76b9686393..ee59f0c85a 100644
--- a/doc/classes/Label.xml
+++ b/doc/classes/Label.xml
@@ -98,7 +98,7 @@
<member name="structured_text_bidi_override" type="int" setter="set_structured_text_bidi_override" getter="get_structured_text_bidi_override" enum="Control.StructuredTextParser" default="0">
Set BiDi algorithm override for the structured text.
</member>
- <member name="structured_text_bidi_override_options" type="Array" setter="set_structured_text_bidi_override_options" getter="get_structured_text_bidi_override_options" default="[ ]">
+ <member name="structured_text_bidi_override_options" type="Array" setter="set_structured_text_bidi_override_options" getter="get_structured_text_bidi_override_options" default="[]">
Set additional options for BiDi override.
</member>
<member name="text" type="String" setter="set_text" getter="get_text" default="&quot;&quot;">
@@ -147,13 +147,13 @@
<theme_item name="font" type="Font">
[Font] used for the [Label]'s text.
</theme_item>
- <theme_item name="font_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ <theme_item name="font_color" type="Color" default="Color(1, 1, 1, 1)">
Default text [Color] of the [Label].
</theme_item>
- <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ <theme_item name="font_outline_color" type="Color" default="Color(1, 1, 1, 1)">
The tint of [Font]'s outline.
</theme_item>
- <theme_item name="font_shadow_color" type="Color" default="Color( 0, 0, 0, 0 )">
+ <theme_item name="font_shadow_color" type="Color" default="Color(0, 0, 0, 0)">
[Color] of the text's shadow effect.
</theme_item>
<theme_item name="font_size" type="int">
diff --git a/doc/classes/Light2D.xml b/doc/classes/Light2D.xml
index f6698352ab..0e71f29b58 100644
--- a/doc/classes/Light2D.xml
+++ b/doc/classes/Light2D.xml
@@ -30,7 +30,7 @@
<member name="blend_mode" type="int" setter="set_blend_mode" getter="get_blend_mode" enum="Light2D.BlendMode" default="0">
The Light2D's blend mode. See [enum BlendMode] constants for values.
</member>
- <member name="color" type="Color" setter="set_color" getter="get_color" default="Color( 1, 1, 1, 1 )">
+ <member name="color" type="Color" setter="set_color" getter="get_color" default="Color(1, 1, 1, 1)">
The Light2D's [Color].
</member>
<member name="editor_only" type="bool" setter="set_editor_only" getter="is_editor_only" default="false">
@@ -57,7 +57,7 @@
<member name="range_z_min" type="int" setter="set_z_range_min" getter="get_z_range_min" default="-1024">
Minimum [code]z[/code] value of objects that are affected by the Light2D.
</member>
- <member name="shadow_color" type="Color" setter="set_shadow_color" getter="get_shadow_color" default="Color( 0, 0, 0, 0 )">
+ <member name="shadow_color" type="Color" setter="set_shadow_color" getter="get_shadow_color" default="Color(0, 0, 0, 0)">
[Color] of shadows cast by the Light2D.
</member>
<member name="shadow_enabled" type="bool" setter="set_shadow_enabled" getter="is_shadow_enabled" default="false">
diff --git a/doc/classes/Light3D.xml b/doc/classes/Light3D.xml
index 6bae612c9f..815d20223d 100644
--- a/doc/classes/Light3D.xml
+++ b/doc/classes/Light3D.xml
@@ -4,7 +4,7 @@
Provides a base class for different kinds of light nodes.
</brief_description>
<description>
- Light3D is the [i]abstract[/i] base class for light nodes. As it can't be instanced, it shouldn't be used directly. Other types of light nodes inherit from it. Light3D contains the common variables and parameters used for lighting.
+ Light3D is the [i]abstract[/i] base class for light nodes. As it can't be instantiated, it shouldn't be used directly. Other types of light nodes inherit from it. Light3D contains the common variables and parameters used for lighting.
</description>
<tutorials>
<link title="3D lights and shadows">https://docs.godotengine.org/en/latest/tutorials/3d/lights_and_shadows.html</link>
@@ -42,7 +42,7 @@
<member name="light_bake_mode" type="int" setter="set_bake_mode" getter="get_bake_mode" enum="Light3D.BakeMode" default="1">
The light's bake mode. See [enum BakeMode].
</member>
- <member name="light_color" type="Color" setter="set_color" getter="get_color" default="Color( 1, 1, 1, 1 )">
+ <member name="light_color" type="Color" setter="set_color" getter="get_color" default="Color(1, 1, 1, 1)">
The light's color. An [i]overbright[/i] color can be used to achieve a result equivalent to increasing the light's [member light_energy].
</member>
<member name="light_cull_mask" type="int" setter="set_cull_mask" getter="get_cull_mask" default="4294967295">
@@ -52,7 +52,7 @@
The light's strength multiplier (this is not a physical unit). For [OmniLight3D] and [SpotLight3D], changing this value will only change the light color's intensity, not the light's radius.
</member>
<member name="light_indirect_energy" type="float" setter="set_param" getter="get_param" default="1.0">
- Secondary multiplier used with indirect light (light bounces). Used with [GIProbe].
+ Secondary multiplier used with indirect light (light bounces). Used with [VoxelGI].
</member>
<member name="light_negative" type="bool" setter="set_negative" getter="is_negative" default="false">
If [code]true[/code], the light's effect is reversed, darkening areas and casting bright shadows.
@@ -72,7 +72,7 @@
<member name="shadow_blur" type="float" setter="set_param" getter="get_param" default="1.0">
Blurs the edges of the shadow. Can be used to hide pixel artifacts in low-resolution shadow maps. A high value can impact performance, make shadows appear grainy and can cause other unwanted artifacts. Try to keep as near default as possible.
</member>
- <member name="shadow_color" type="Color" setter="set_shadow_color" getter="get_shadow_color" default="Color( 0, 0, 0, 1 )">
+ <member name="shadow_color" type="Color" setter="set_shadow_color" getter="get_shadow_color" default="Color(0, 0, 0, 1)">
The color of shadows cast by this light.
</member>
<member name="shadow_enabled" type="bool" setter="set_shadow" getter="has_shadow" default="false">
diff --git a/doc/classes/BakedLightmap.xml b/doc/classes/LightmapGI.xml
index 6fd08fc4e4..d7722a83b0 100644
--- a/doc/classes/BakedLightmap.xml
+++ b/doc/classes/LightmapGI.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="BakedLightmap" inherits="VisualInstance3D" version="4.0">
+<class name="LightmapGI" inherits="VisualInstance3D" version="4.0">
<brief_description>
</brief_description>
<description>
@@ -21,17 +21,17 @@
</member>
<member name="environment_custom_sky" type="Sky" setter="set_environment_custom_sky" getter="get_environment_custom_sky">
</member>
- <member name="environment_mode" type="int" setter="set_environment_mode" getter="get_environment_mode" enum="BakedLightmap.EnvironmentMode" default="0">
+ <member name="environment_mode" type="int" setter="set_environment_mode" getter="get_environment_mode" enum="LightmapGI.EnvironmentMode" default="0">
</member>
- <member name="generate_probes_subdiv" type="int" setter="set_generate_probes" getter="get_generate_probes" enum="BakedLightmap.GenerateProbes" default="0">
+ <member name="generate_probes_subdiv" type="int" setter="set_generate_probes" getter="get_generate_probes" enum="LightmapGI.GenerateProbes" default="0">
</member>
<member name="interior" type="bool" setter="set_interior" getter="is_interior" default="false">
</member>
- <member name="light_data" type="BakedLightmapData" setter="set_light_data" getter="get_light_data">
+ <member name="light_data" type="LightmapGIData" setter="set_light_data" getter="get_light_data">
</member>
<member name="max_texture_size" type="int" setter="set_max_texture_size" getter="get_max_texture_size" default="16384">
</member>
- <member name="quality" type="int" setter="set_bake_quality" getter="get_bake_quality" enum="BakedLightmap.BakeQuality" default="1">
+ <member name="quality" type="int" setter="set_bake_quality" getter="get_bake_quality" enum="LightmapGI.BakeQuality" default="1">
</member>
<member name="use_denoiser" type="bool" setter="set_use_denoiser" getter="is_using_denoiser" default="true">
</member>
diff --git a/doc/classes/BakedLightmapData.xml b/doc/classes/LightmapGIData.xml
index 904555c48e..3a37c6dcb7 100644
--- a/doc/classes/BakedLightmapData.xml
+++ b/doc/classes/LightmapGIData.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="BakedLightmapData" inherits="Resource" version="4.0">
+<class name="LightmapGIData" inherits="Resource" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/Lightmapper.xml b/doc/classes/Lightmapper.xml
index e80194858a..79fae42d68 100644
--- a/doc/classes/Lightmapper.xml
+++ b/doc/classes/Lightmapper.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Lightmapper" inherits="Reference" version="4.0">
+<class name="Lightmapper" inherits="RefCounted" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/Line2D.xml b/doc/classes/Line2D.xml
index dec5d60cbb..587d5833b9 100644
--- a/doc/classes/Line2D.xml
+++ b/doc/classes/Line2D.xml
@@ -74,7 +74,7 @@
<member name="begin_cap_mode" type="int" setter="set_begin_cap_mode" getter="get_begin_cap_mode" enum="Line2D.LineCapMode" default="0">
Controls the style of the line's first point. Use [enum LineCapMode] constants.
</member>
- <member name="default_color" type="Color" setter="set_default_color" getter="get_default_color" default="Color( 1, 1, 1, 1 )">
+ <member name="default_color" type="Color" setter="set_default_color" getter="get_default_color" default="Color(1, 1, 1, 1)">
The line's color. Will not be used if a gradient is set.
</member>
<member name="end_cap_mode" type="int" setter="set_end_cap_mode" getter="get_end_cap_mode" enum="Line2D.LineCapMode" default="0">
@@ -86,7 +86,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="PackedVector2Array" setter="set_points" getter="get_points" default="PackedVector2Array( )">
+ <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. Points are interpreted as local vectors.
</member>
<member name="round_precision" type="int" setter="set_round_precision" getter="get_round_precision" default="8">
diff --git a/doc/classes/LineEdit.xml b/doc/classes/LineEdit.xml
index 7adf19632e..f1e7c5f6e1 100644
--- a/doc/classes/LineEdit.xml
+++ b/doc/classes/LineEdit.xml
@@ -221,7 +221,7 @@
<member name="structured_text_bidi_override" type="int" setter="set_structured_text_bidi_override" getter="get_structured_text_bidi_override" enum="Control.StructuredTextParser" default="0">
Set BiDi algorithm override for the structured text.
</member>
- <member name="structured_text_bidi_override_options" type="Array" setter="set_structured_text_bidi_override_options" getter="get_structured_text_bidi_override_options" default="[ ]">
+ <member name="structured_text_bidi_override_options" type="Array" setter="set_structured_text_bidi_override_options" getter="get_structured_text_bidi_override_options" default="[]">
Set additional options for BiDi override.
</member>
<member name="text" type="String" setter="set_text" getter="get_text" default="&quot;&quot;">
@@ -248,7 +248,7 @@
Emitted when the text changes.
</description>
</signal>
- <signal name="text_entered">
+ <signal name="text_submitted">
<argument index="0" name="new_text" type="String">
</argument>
<description>
@@ -359,16 +359,16 @@
</constant>
</constants>
<theme_items>
- <theme_item name="caret_color" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )">
+ <theme_item name="caret_color" type="Color" default="Color(0.94, 0.94, 0.94, 1)">
Color of the [LineEdit]'s caret (text cursor).
</theme_item>
<theme_item name="clear" type="Texture2D">
Texture for the clear button. See [member clear_button_enabled].
</theme_item>
- <theme_item name="clear_button_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )">
+ <theme_item name="clear_button_color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
Color used as default tint for the clear button.
</theme_item>
- <theme_item name="clear_button_color_pressed" type="Color" default="Color( 1, 1, 1, 1 )">
+ <theme_item name="clear_button_color_pressed" type="Color" default="Color(1, 1, 1, 1)">
Color used for the clear button when it's pressed.
</theme_item>
<theme_item name="focus" type="StyleBox">
@@ -377,19 +377,19 @@
<theme_item name="font" type="Font">
Font used for the text.
</theme_item>
- <theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )">
+ <theme_item name="font_color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
Default font color.
</theme_item>
- <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ <theme_item name="font_outline_color" type="Color" default="Color(1, 1, 1, 1)">
The tint of text outline of the [LineEdit].
</theme_item>
- <theme_item name="font_selected_color" type="Color" default="Color( 0, 0, 0, 1 )">
+ <theme_item name="font_selected_color" type="Color" default="Color(0, 0, 0, 1)">
Font color for selected text (inside the selection rectangle).
</theme_item>
<theme_item name="font_size" type="int">
Font size of the [LineEdit]'s text.
</theme_item>
- <theme_item name="font_uneditable_color" type="Color" default="Color( 0.88, 0.88, 0.88, 0.5 )">
+ <theme_item name="font_uneditable_color" type="Color" default="Color(0.88, 0.88, 0.88, 0.5)">
Font color when editing is disabled.
</theme_item>
<theme_item name="minimum_character_width" type="int" default="4">
@@ -404,7 +404,7 @@
<theme_item name="read_only" type="StyleBox">
Background used when [LineEdit] is in read-only mode ([member editable] is set to [code]false[/code]).
</theme_item>
- <theme_item name="selection_color" type="Color" default="Color( 0.49, 0.49, 0.49, 1 )">
+ <theme_item name="selection_color" type="Color" default="Color(0.49, 0.49, 0.49, 1)">
Color of the selection rectangle.
</theme_item>
</theme_items>
diff --git a/doc/classes/LineShape2D.xml b/doc/classes/LineShape2D.xml
index 58caf1b1de..434e6fba8e 100644
--- a/doc/classes/LineShape2D.xml
+++ b/doc/classes/LineShape2D.xml
@@ -14,8 +14,8 @@
<member name="distance" type="float" setter="set_distance" getter="get_distance" default="0.0">
The line's distance from the origin.
</member>
- <member name="normal" type="Vector2" setter="set_normal" getter="get_normal" default="Vector2( 0, 1 )">
- The line's normal.
+ <member name="normal" type="Vector2" setter="set_normal" getter="get_normal" default="Vector2(0, -1)">
+ The line's normal. Defaults to [code]Vector2.UP[/code].
</member>
</members>
<constants>
diff --git a/doc/classes/LinkButton.xml b/doc/classes/LinkButton.xml
index 6e2f4399b3..51b20cd04d 100644
--- a/doc/classes/LinkButton.xml
+++ b/doc/classes/LinkButton.xml
@@ -47,7 +47,7 @@
<member name="structured_text_bidi_override" type="int" setter="set_structured_text_bidi_override" getter="get_structured_text_bidi_override" enum="Control.StructuredTextParser" default="0">
Set BiDi algorithm override for the structured text.
</member>
- <member name="structured_text_bidi_override_options" type="Array" setter="set_structured_text_bidi_override_options" getter="get_structured_text_bidi_override_options" default="[ ]">
+ <member name="structured_text_bidi_override_options" type="Array" setter="set_structured_text_bidi_override_options" getter="get_structured_text_bidi_override_options" default="[]">
Set additional options for BiDi override.
</member>
<member name="text" type="String" setter="set_text" getter="get_text" default="&quot;&quot;">
@@ -78,16 +78,16 @@
<theme_item name="font" type="Font">
[Font] of the [LinkButton]'s text.
</theme_item>
- <theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )">
+ <theme_item name="font_color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
Default text [Color] of the [LinkButton].
</theme_item>
- <theme_item name="font_hover_color" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )">
+ <theme_item name="font_hover_color" type="Color" default="Color(0.94, 0.94, 0.94, 1)">
Text [Color] used when the [LinkButton] is being hovered.
</theme_item>
- <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ <theme_item name="font_outline_color" type="Color" default="Color(1, 1, 1, 1)">
The tint of text outline of the [LinkButton].
</theme_item>
- <theme_item name="font_pressed_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ <theme_item name="font_pressed_color" type="Color" default="Color(1, 1, 1, 1)">
Text [Color] used when the [LinkButton] is being pressed.
</theme_item>
<theme_item name="font_size" type="int">
diff --git a/doc/classes/Listener3D.xml b/doc/classes/Listener3D.xml
index 998ea757ff..b2fcbe534d 100644
--- a/doc/classes/Listener3D.xml
+++ b/doc/classes/Listener3D.xml
@@ -18,10 +18,10 @@
</description>
</method>
<method name="get_listener_transform" qualifiers="const">
- <return type="Transform">
+ <return type="Transform3D">
</return>
<description>
- Returns the listener's global orthonormalized [Transform].
+ Returns the listener's global orthonormalized [Transform3D].
</description>
</method>
<method name="is_current" qualifiers="const">
diff --git a/doc/classes/MenuButton.xml b/doc/classes/MenuButton.xml
index 7cbf9d3dfe..3b37853d70 100644
--- a/doc/classes/MenuButton.xml
+++ b/doc/classes/MenuButton.xml
@@ -56,19 +56,19 @@
<theme_item name="font" type="Font">
[Font] of the [MenuButton]'s text.
</theme_item>
- <theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )">
+ <theme_item name="font_color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
Default text [Color] of the [MenuButton].
</theme_item>
- <theme_item name="font_disabled_color" type="Color" default="Color( 1, 1, 1, 0.3 )">
+ <theme_item name="font_disabled_color" type="Color" default="Color(1, 1, 1, 0.3)">
Text [Color] used when the [MenuButton] is disabled.
</theme_item>
- <theme_item name="font_hover_color" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )">
+ <theme_item name="font_hover_color" type="Color" default="Color(0.94, 0.94, 0.94, 1)">
Text [Color] used when the [MenuButton] is being hovered.
</theme_item>
- <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ <theme_item name="font_outline_color" type="Color" default="Color(1, 1, 1, 1)">
The tint of text outline of the [MenuButton].
</theme_item>
- <theme_item name="font_pressed_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ <theme_item name="font_pressed_color" type="Color" default="Color(1, 1, 1, 1)">
Text [Color] used when the [MenuButton] is being pressed.
</theme_item>
<theme_item name="font_size" type="int">
diff --git a/doc/classes/Mesh.xml b/doc/classes/Mesh.xml
index ed7c39d4d9..3bbdfbe62e 100644
--- a/doc/classes/Mesh.xml
+++ b/doc/classes/Mesh.xml
@@ -106,7 +106,7 @@
</method>
</methods>
<members>
- <member name="lightmap_size_hint" type="Vector2i" setter="set_lightmap_size_hint" getter="get_lightmap_size_hint" default="Vector2i( 0, 0 )">
+ <member name="lightmap_size_hint" type="Vector2i" setter="set_lightmap_size_hint" getter="get_lightmap_size_hint" default="Vector2i(0, 0)">
Sets a hint to be used for lightmap resolution.
</member>
</members>
diff --git a/doc/classes/MeshDataTool.xml b/doc/classes/MeshDataTool.xml
index db7a3187f0..da02511dc0 100644
--- a/doc/classes/MeshDataTool.xml
+++ b/doc/classes/MeshDataTool.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="MeshDataTool" inherits="Reference" version="4.0">
+<class name="MeshDataTool" inherits="RefCounted" version="4.0">
<brief_description>
Helper tool to access and edit [Mesh] data.
</brief_description>
@@ -15,7 +15,7 @@
mdt.create_from_surface(mesh, 0)
for i in range(mdt.get_vertex_count()):
var vertex = mdt.get_vertex(i)
- # In this example we extend the mesh by one unit, which results in seperated faces as it is flat shaded.
+ # In this example we extend the mesh by one unit, which results in separated faces as it is flat shaded.
vertex += mdt.get_vertex_normal(i)
# Save your change.
mdt.set_vertex(i, vertex)
@@ -33,7 +33,7 @@
for (var i = 0; i &lt; mdt.GetVertexCount(); i++)
{
Vector3 vertex = mdt.GetVertex(i);
- // In this example we extend the mesh by one unit, which results in seperated faces as it is flat shaded.
+ // In this example we extend the mesh by one unit, which results in separated faces as it is flat shaded.
vertex += mdt.GetVertexNormal(i);
// Save your change.
mdt.SetVertex(i, vertex);
diff --git a/doc/classes/MeshInstance3D.xml b/doc/classes/MeshInstance3D.xml
index b5ab296bd0..7c4e75793e 100644
--- a/doc/classes/MeshInstance3D.xml
+++ b/doc/classes/MeshInstance3D.xml
@@ -4,7 +4,7 @@
Node that instances meshes into a scenario.
</brief_description>
<description>
- MeshInstance3D is a node that takes a [Mesh] resource and adds it to the current scenario by creating an instance of it. This is the class most often used render 3D geometry and can be used to instance a single [Mesh] in many places. This allows reuse of geometry which can save on resources. When a [Mesh] has to be instanced more than thousands of times at close proximity, consider using a [MultiMesh] in a [MultiMeshInstance3D] instead.
+ MeshInstance3D is a node that takes a [Mesh] resource and adds it to the current scenario by creating an instance of it. This is the class most often used render 3D geometry and can be used to instance a single [Mesh] in many places. This allows reuse of geometry which can save on resources. When a [Mesh] has to be instantiated more than thousands of times at close proximity, consider using a [MultiMesh] in a [MultiMeshInstance3D] instead.
</description>
<tutorials>
<link title="3D Material Testers Demo">https://godotengine.org/asset-library/asset/123</link>
diff --git a/doc/classes/MeshLibrary.xml b/doc/classes/MeshLibrary.xml
index ad8bd6991d..b33bcc89e3 100644
--- a/doc/classes/MeshLibrary.xml
+++ b/doc/classes/MeshLibrary.xml
@@ -72,7 +72,7 @@
</description>
</method>
<method name="get_item_navmesh_transform" qualifiers="const">
- <return type="Transform">
+ <return type="Transform3D">
</return>
<argument index="0" name="id" type="int">
</argument>
@@ -96,7 +96,7 @@
</argument>
<description>
Returns an item's collision shapes.
- The array consists of each [Shape3D] followed by its [Transform].
+ The array consists of each [Shape3D] followed by its [Transform3D].
</description>
</method>
<method name="get_last_unused_item_id" qualifiers="const">
@@ -154,7 +154,7 @@
</return>
<argument index="0" name="id" type="int">
</argument>
- <argument index="1" name="navmesh" type="Transform">
+ <argument index="1" name="navmesh" type="Transform3D">
</argument>
<description>
Sets the transform to apply to the item's navigation mesh.
@@ -180,7 +180,7 @@
</argument>
<description>
Sets an item's collision shapes.
- The array should consist of [Shape3D] objects, each followed by a [Transform] that will be applied to it. For shapes that should not have a transform, use [constant Transform.IDENTITY].
+ The array should consist of [Shape3D] objects, each followed by a [Transform3D] that will be applied to it. For shapes that should not have a transform, use [constant Transform3D.IDENTITY].
</description>
</method>
</methods>
diff --git a/doc/classes/MeshTexture.xml b/doc/classes/MeshTexture.xml
index bcc9adf90f..57f2397874 100644
--- a/doc/classes/MeshTexture.xml
+++ b/doc/classes/MeshTexture.xml
@@ -14,7 +14,7 @@
<member name="base_texture" type="Texture2D" setter="set_base_texture" getter="get_base_texture">
Sets the base texture that the Mesh will use to draw.
</member>
- <member name="image_size" type="Vector2" setter="set_image_size" getter="get_image_size" default="Vector2( 0, 0 )">
+ <member name="image_size" type="Vector2" setter="set_image_size" getter="get_image_size" default="Vector2(0, 0)">
Sets the size of the image, needed for reference.
</member>
<member name="mesh" type="Mesh" setter="set_mesh" getter="get_mesh">
diff --git a/doc/classes/MethodTweener.xml b/doc/classes/MethodTweener.xml
new file mode 100644
index 0000000000..42b91abf93
--- /dev/null
+++ b/doc/classes/MethodTweener.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="MethodTweener" inherits="Tweener" version="4.0">
+ <brief_description>
+ Interpolates an abstract value and supplies it to a method called over time.
+ </brief_description>
+ <description>
+ [MethodTweener] is similar to a combination of [CallbackTweener] and [PropertyTweener]. It calls a method providing an interpolated value as a paramater. See [method Tween.tween_method] for more usage information.
+ [b]Note:[/b] [method Tween.tween_method] is the only correct way to create [MethodTweener]. Any [MethodTweener] created manually will not function correctly.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="set_delay">
+ <return type="MethodTweener">
+ </return>
+ <argument index="0" name="delay" type="float">
+ </argument>
+ <description>
+ Sets the time in seconds after which the [MethodTweener] will start interpolating. By default there's no delay.
+ </description>
+ </method>
+ <method name="set_ease">
+ <return type="MethodTweener">
+ </return>
+ <argument index="0" name="ease" type="int" enum="Tween.EaseType">
+ </argument>
+ <description>
+ Sets the type of used easing from [enum Tween.EaseType]. If not set, the default easing is used from the [Tween] that contains this Tweener.
+ </description>
+ </method>
+ <method name="set_trans">
+ <return type="MethodTweener">
+ </return>
+ <argument index="0" name="trans" type="int" enum="Tween.TransitionType">
+ </argument>
+ <description>
+ Sets the type of used transition from [enum Tween.TransitionType]. If not set, the default transition is used from the [Tween] that contains this Tweener.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/MultiMesh.xml b/doc/classes/MultiMesh.xml
index 2adebdb306..7151e58c5f 100644
--- a/doc/classes/MultiMesh.xml
+++ b/doc/classes/MultiMesh.xml
@@ -40,12 +40,12 @@
</description>
</method>
<method name="get_instance_transform" qualifiers="const">
- <return type="Transform">
+ <return type="Transform3D">
</return>
<argument index="0" name="instance" type="int">
</argument>
<description>
- Returns the [Transform] of a specific instance.
+ Returns the [Transform3D] of a specific instance.
</description>
</method>
<method name="get_instance_transform_2d" qualifiers="const">
@@ -86,10 +86,10 @@
</return>
<argument index="0" name="instance" type="int">
</argument>
- <argument index="1" name="transform" type="Transform">
+ <argument index="1" name="transform" type="Transform3D">
</argument>
<description>
- Sets the [Transform] for a specific instance.
+ Sets the [Transform3D] for a specific instance.
</description>
</method>
<method name="set_instance_transform_2d">
@@ -105,7 +105,7 @@
</method>
</methods>
<members>
- <member name="buffer" type="PackedFloat32Array" setter="set_buffer" getter="get_buffer" default="PackedFloat32Array( )">
+ <member name="buffer" type="PackedFloat32Array" setter="set_buffer" getter="get_buffer" default="PackedFloat32Array()">
</member>
<member name="color_array" type="PackedColorArray" setter="_set_color_array" getter="_get_color_array">
</member>
diff --git a/doc/classes/MultiplayerAPI.xml b/doc/classes/MultiplayerAPI.xml
index c168695d61..5de5703d95 100644
--- a/doc/classes/MultiplayerAPI.xml
+++ b/doc/classes/MultiplayerAPI.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="MultiplayerAPI" inherits="Reference" version="4.0">
+<class name="MultiplayerAPI" inherits="RefCounted" version="4.0">
<brief_description>
High-level multiplayer API.
</brief_description>
@@ -135,16 +135,16 @@
</signals>
<constants>
<constant name="RPC_MODE_DISABLED" value="0" enum="RPCMode">
- Used with [method Node.rpc_config] or [method Node.rset_config] to disable a method or property for all RPC calls, making it unavailable. Default for all methods.
+ Used with [method Node.rpc_config] to disable a method or property for all RPC calls, making it unavailable. Default for all methods.
</constant>
<constant name="RPC_MODE_REMOTE" value="1" enum="RPCMode">
- Used with [method Node.rpc_config] or [method Node.rset_config] to set a method to be called or a property to be changed only on the remote end, not locally. Analogous to the [code]remote[/code] keyword. Calls and property changes are accepted from all remote peers, no matter if they are node's master or puppets.
+ Used with [method Node.rpc_config] to set a method to be called or a property to be changed only on the remote end, not locally. Analogous to the [code]remote[/code] keyword. Calls and property changes are accepted from all remote peers, no matter if they are node's master or puppets.
</constant>
<constant name="RPC_MODE_MASTER" value="2" enum="RPCMode">
- Used with [method Node.rpc_config] or [method Node.rset_config] to set a method to be called or a property to be changed only on the network master for this node. Analogous to the [code]master[/code] keyword. Only accepts calls or property changes from the node's network puppets, see [method Node.set_network_master].
+ Used with [method Node.rpc_config] to set a method to be called or a property to be changed only on the network master for this node. Analogous to the [code]master[/code] keyword. Only accepts calls or property changes from the node's network puppets, see [method Node.set_network_master].
</constant>
<constant name="RPC_MODE_PUPPET" value="3" enum="RPCMode">
- Used with [method Node.rpc_config] or [method Node.rset_config] to set a method to be called or a property to be changed only on puppets for this node. Analogous to the [code]puppet[/code] keyword. Only accepts calls or property changes from the node's network master, see [method Node.set_network_master].
+ Used with [method Node.rpc_config] to set a method to be called or a property to be changed only on puppets for this node. Analogous to the [code]puppet[/code] keyword. Only accepts calls or property changes from the node's network master, see [method Node.set_network_master].
</constant>
<constant name="RPC_MODE_REMOTESYNC" value="4" enum="RPCMode">
Behave like [constant RPC_MODE_REMOTE] but also make the call or property change locally. Analogous to the [code]remotesync[/code] keyword.
diff --git a/doc/classes/Mutex.xml b/doc/classes/Mutex.xml
index f5f6308401..dfda614f8e 100644
--- a/doc/classes/Mutex.xml
+++ b/doc/classes/Mutex.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Mutex" inherits="Reference" version="4.0">
+<class name="Mutex" inherits="RefCounted" version="4.0">
<brief_description>
A synchronization mutex (mutual exclusion).
</brief_description>
diff --git a/doc/classes/NavigationServer3D.xml b/doc/classes/NavigationServer3D.xml
index b098a7fc20..ef9efcb99c 100644
--- a/doc/classes/NavigationServer3D.xml
+++ b/doc/classes/NavigationServer3D.xml
@@ -413,7 +413,7 @@
</return>
<argument index="0" name="region" type="RID">
</argument>
- <argument index="1" name="transform" type="Transform">
+ <argument index="1" name="transform" type="Transform3D">
</argument>
<description>
Sets the global transformation for the region.
diff --git a/doc/classes/NinePatchRect.xml b/doc/classes/NinePatchRect.xml
index d6de0ef4cf..5d59f994d3 100644
--- a/doc/classes/NinePatchRect.xml
+++ b/doc/classes/NinePatchRect.xml
@@ -53,7 +53,7 @@
<member name="patch_margin_top" type="int" setter="set_patch_margin" getter="get_patch_margin" default="0">
The height of the 9-slice's top row. A margin of 16 means the 9-slice's top corners and side will have a height of 16 pixels. You can set all 4 margin values individually to create panels with non-uniform borders.
</member>
- <member name="region_rect" type="Rect2" setter="set_region_rect" getter="get_region_rect" default="Rect2( 0, 0, 0, 0 )">
+ <member name="region_rect" type="Rect2" setter="set_region_rect" getter="get_region_rect" default="Rect2(0, 0, 0, 0)">
Rectangular region of the texture to sample from. If you're working with an atlas, use this property to define the area the 9-slice should use. All other properties are relative to this one. If the rect is empty, NinePatchRect will use the whole texture.
</member>
<member name="texture" type="Texture2D" setter="set_texture" getter="get_texture">
diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml
index 523f3a0c17..21f3f1fcc0 100644
--- a/doc/classes/Node.xml
+++ b/doc/classes/Node.xml
@@ -5,13 +5,13 @@
</brief_description>
<description>
Nodes are Godot's building blocks. They can be assigned as the child of another node, resulting in a tree arrangement. A given node can contain any number of nodes as children with the requirement that all siblings (direct children of a node) should have unique names.
- A tree of nodes is called a [i]scene[/i]. Scenes can be saved to the disk and then instanced into other scenes. This allows for very high flexibility in the architecture and data model of Godot projects.
+ A tree of nodes is called a [i]scene[/i]. Scenes can be saved to the disk and then instantiated into other scenes. This allows for very high flexibility in the architecture and data model of Godot projects.
[b]Scene tree:[/b] The [SceneTree] contains the active tree of nodes. When a node is added to the scene tree, it receives the [constant NOTIFICATION_ENTER_TREE] notification and its [method _enter_tree] callback is triggered. Child nodes are always added [i]after[/i] their parent node, i.e. the [method _enter_tree] callback of a parent node will be triggered before its child's.
Once all nodes have been added in the scene tree, they receive the [constant NOTIFICATION_READY] notification and their respective [method _ready] callbacks are triggered. For groups of nodes, the [method _ready] callback is called in reverse order, starting with the children and moving up to the parent nodes.
This means that when adding a node to the scene tree, the following order will be used for the callbacks: [method _enter_tree] of the parent, [method _enter_tree] of the children, [method _ready] of the children and finally [method _ready] of the parent (recursively for the entire scene tree).
[b]Processing:[/b] Nodes can override the "process" state, so that they receive a callback on each frame requesting them to process (do something). Normal processing (callback [method _process], toggled with [method set_process]) happens as fast as possible and is dependent on the frame rate, so the processing time [i]delta[/i] (in seconds) is passed as an argument. Physics processing (callback [method _physics_process], toggled with [method set_physics_process]) happens a fixed number of times per second (60 by default) and is useful for code related to the physics engine.
Nodes can also process input events. When present, the [method _input] function will be called for each input that the program receives. In many cases, this can be overkill (unless used for simple projects), and the [method _unhandled_input] function might be preferred; it is called when the input event was not handled by anyone else (typically, GUI [Control] nodes), ensuring that the node only receives the events that were meant for it.
- To keep track of the scene hierarchy (especially when instancing scenes into other scenes), an "owner" can be set for the node with the [member owner] property. This keeps track of who instanced what. This is mostly useful when writing editors and tools, though.
+ To keep track of the scene hierarchy (especially when instancing scenes into other scenes), an "owner" can be set for the node with the [member owner] property. This keeps track of who instantiated what. This is mostly useful when writing editors and tools, though.
Finally, when a node is freed with [method Object.free] or [method queue_free], it will also free all its children.
[b]Groups:[/b] Nodes can be added to as many groups as you want to be easy to manage, you could create groups like "enemies" or "collectables" for example, depending on your game. See [method add_to_group], [method is_in_group] and [method remove_from_group]. You can then retrieve all nodes in these groups, iterate them and even call methods on groups via the methods on [SceneTree].
[b]Networking with nodes:[/b] After connecting to a server (or making one, see [NetworkedMultiplayerENet]), it is possible to use the built-in RPC (remote procedure call) system to communicate over the network. By calling [method rpc] with a method name, it will be called locally and in all connected peers (peers = clients and the server that accepts connections). To identify which node receives the RPC call, Godot will use its [NodePath] (make sure node names are the same on all peers). Also, take a look at the high-level networking tutorial and corresponding demos.
@@ -128,7 +128,7 @@
</argument>
<description>
Adds a child node. Nodes can have any number of children, but every child must have a unique name. Child nodes are automatically deleted when the parent node is deleted, so an entire scene can be removed by deleting its topmost node.
- If [code]legible_unique_name[/code] is [code]true[/code], the child node will have a human-readable name based on the name of the node being instanced instead of its type.
+ If [code]legible_unique_name[/code] is [code]true[/code], the child node will have a human-readable name based on the name of the node being instantiated instead of its type.
[b]Note:[/b] If the child node already has a parent, the function will fail. Use [method remove_child] first to remove the node from its current parent. For example:
[codeblocks]
[gdscript]
@@ -159,7 +159,7 @@
</argument>
<description>
Adds a [code]sibling[/code] node to current's node parent, at the same level as that node, right below it.
- If [code]legible_unique_name[/code] is [code]true[/code], the child node will have a human-readable name based on the name of the node being instanced instead of its type.
+ If [code]legible_unique_name[/code] is [code]true[/code], the child node will have a human-readable name based on the name of the node being instantiated 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>
@@ -182,6 +182,16 @@
Returns [code]true[/code] if the node can process while the scene tree is paused (see [member process_mode]). Always returns [code]true[/code] if the scene tree is not paused, and [code]false[/code] if the node is not in the tree.
</description>
</method>
+ <method name="create_tween">
+ <return type="Tween">
+ </return>
+ <description>
+ Creates a new [Tween] and binds it to this node. This is equivalent of doing:
+ [codeblock]
+ get_tree().create_tween().bind_node(self)
+ [/codeblock]
+ </description>
+ </method>
<method name="duplicate" qualifiers="const">
<return type="Node">
</return>
@@ -568,7 +578,7 @@
</return>
<argument index="0" name="method" type="StringName">
</argument>
- <argument index="1" name="args" type="Array" default="[ ]">
+ <argument index="1" name="args" type="Array" default="[]">
</argument>
<argument index="2" name="parent_first" type="bool" default="false">
</argument>
@@ -649,7 +659,7 @@
<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].
+ Sends a remote procedure call request for the given [code]method[/code] to peers on the network (and locally), optionally sending all additional arguments as arguments to the method called by the RPC. The call request will only be received by nodes with the same [NodePath], including the exact same node name. Behaviour depends on the RPC configuration for the given method, see [method rpc_config]. Methods are not exposed to RPCs by default. Returns an empty [Variant].
[b]Note:[/b] You can only safely use RPCs on clients after you received the [code]connected_to_server[/code] signal from the [SceneTree]. You also need to keep track of the connection state, either by the [SceneTree] signals like [code]server_disconnected[/code] or by checking [code]SceneTree.network_peer.get_connection_status() == CONNECTION_CONNECTED[/code].
</description>
</method>
@@ -658,33 +668,17 @@
</return>
<argument index="0" name="method" type="StringName">
</argument>
- <argument index="1" name="mode" type="int" enum="MultiplayerAPI.RPCMode">
+ <argument index="1" name="rpc_mode" type="int" enum="MultiplayerAPI.RPCMode">
</argument>
- <description>
- Changes the RPC mode for the given [code]method[/code] to the given [code]mode[/code]. See [enum MultiplayerAPI.RPCMode]. An alternative is annotating methods and properties with the corresponding keywords ([code]remote[/code], [code]master[/code], [code]puppet[/code], [code]remotesync[/code], [code]mastersync[/code], [code]puppetsync[/code]). By default, methods are not exposed to networking (and RPCs). See also [method rset] and [method rset_config] for properties.
- </description>
- </method>
- <method name="rpc_id" qualifiers="vararg">
- <return type="Variant">
- </return>
- <argument index="0" name="peer_id" type="int">
+ <argument index="2" name="transfer_mode" type="int" enum="NetworkedMultiplayerPeer.TransferMode" default="2">
</argument>
- <argument index="1" name="method" type="StringName">
+ <argument index="3" name="channel" type="int" default="0">
</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].
+ Changes the RPC mode for the given [code]method[/code] to the given [code]rpc_mode[/code], optionally specifying the [code]transfer_mode[/code] and [code]channel[/code] (on supported peers). See [enum MultiplayerAPI.RPCMode] and [enum NetworkedMultiplayerPeer.TransferMode]. An alternative is annotating methods and properties with the corresponding keywords ([code]remote[/code], [code]master[/code], [code]puppet[/code], [code]remotesync[/code], [code]mastersync[/code], [code]puppetsync[/code]). By default, methods are not exposed to networking (and RPCs).
</description>
</method>
- <method name="rpc_unreliable" qualifiers="vararg">
- <return type="Variant">
- </return>
- <argument index="0" name="method" type="StringName">
- </argument>
- <description>
- Sends a [method rpc] using an unreliable protocol. Returns an empty [Variant].
- </description>
- </method>
- <method name="rpc_unreliable_id" qualifiers="vararg">
+ <method name="rpc_id" qualifiers="vararg">
<return type="Variant">
</return>
<argument index="0" name="peer_id" type="int">
@@ -692,66 +686,7 @@
<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].
- </description>
- </method>
- <method name="rset">
- <return type="void">
- </return>
- <argument index="0" name="property" type="StringName">
- </argument>
- <argument index="1" name="value" type="Variant">
- </argument>
- <description>
- Remotely changes a property's value on other peers (and locally). Behaviour depends on the RPC configuration for the given property, see [method rset_config]. See also [method rpc] for RPCs for methods, most information applies to this method as well.
- </description>
- </method>
- <method name="rset_config">
- <return type="int">
- </return>
- <argument index="0" name="property" type="StringName">
- </argument>
- <argument index="1" name="mode" type="int" enum="MultiplayerAPI.RPCMode">
- </argument>
- <description>
- Changes the RPC mode for the given [code]property[/code] to the given [code]mode[/code]. See [enum MultiplayerAPI.RPCMode]. An alternative is annotating methods and properties with the corresponding keywords ([code]remote[/code], [code]master[/code], [code]puppet[/code], [code]remotesync[/code], [code]mastersync[/code], [code]puppetsync[/code]). By default, properties are not exposed to networking (and RPCs). See also [method rpc] and [method rpc_config] for methods.
- </description>
- </method>
- <method name="rset_id">
- <return type="void">
- </return>
- <argument index="0" name="peer_id" type="int">
- </argument>
- <argument index="1" name="property" type="StringName">
- </argument>
- <argument index="2" name="value" type="Variant">
- </argument>
- <description>
- Remotely changes the property's value on a specific peer identified by [code]peer_id[/code] (see [method NetworkedMultiplayerPeer.set_target_peer]).
- </description>
- </method>
- <method name="rset_unreliable">
- <return type="void">
- </return>
- <argument index="0" name="property" type="StringName">
- </argument>
- <argument index="1" name="value" type="Variant">
- </argument>
- <description>
- Remotely changes the property's value on other peers (and locally) using an unreliable protocol.
- </description>
- </method>
- <method name="rset_unreliable_id">
- <return type="void">
- </return>
- <argument index="0" name="peer_id" type="int">
- </argument>
- <argument index="1" name="property" type="StringName">
- </argument>
- <argument index="2" name="value" type="Variant">
- </argument>
- <description>
- Remotely changes property's value on a specific peer identified by [code]peer_id[/code] using an unreliable protocol (see [method NetworkedMultiplayerPeer.set_target_peer]).
+ Sends a [method rpc] to a specific peer identified by [code]peer_id[/code] (see [method NetworkedMultiplayerPeer.set_target_peer]). Returns an empty [Variant].
</description>
</method>
<method name="set_display_folded">
@@ -870,7 +805,7 @@
The override to the default [MultiplayerAPI]. Set to [code]null[/code] to use the default [SceneTree] one.
</member>
<member name="filename" type="String" setter="set_filename" getter="get_filename">
- When a scene is instanced from a file, its topmost node contains the filename from which it was loaded.
+ When a scene is instantiated from a file, its topmost node contains the filename from which it was loaded.
</member>
<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).
@@ -949,7 +884,7 @@
Notification received when a node is unparented (parent removed it from the list of children).
</constant>
<constant name="NOTIFICATION_INSTANCED" value="20">
- Notification received when the node is instanced.
+ Notification received when the node is instantiated.
</constant>
<constant name="NOTIFICATION_DRAG_BEGIN" value="21">
Notification received when a drag begins.
@@ -969,6 +904,12 @@
<constant name="NOTIFICATION_POST_ENTER_TREE" value="27">
Notification received when the node is ready, just before [constant NOTIFICATION_READY] is received. Unlike the latter, it's sent every time the node enters tree, instead of only once.
</constant>
+ <constant name="NOTIFICATION_EDITOR_PRE_SAVE" value="9001">
+ Notification received right before the scene with the node is saved in the editor. This notification is only sent in the Godot editor and will not occur in exported projects.
+ </constant>
+ <constant name="NOTIFICATION_EDITOR_POST_SAVE" value="9002">
+ Notification received right after the scene with the node is saved in the editor. This notification is only sent in the Godot editor and will not occur in exported projects.
+ </constant>
<constant name="NOTIFICATION_WM_MOUSE_ENTER" value="1002">
Notification received from the OS when the mouse enters the game window.
Implemented on desktop and web platforms.
diff --git a/doc/classes/Node2D.xml b/doc/classes/Node2D.xml
index eed0ec8d7e..cc99abf9cb 100644
--- a/doc/classes/Node2D.xml
+++ b/doc/classes/Node2D.xml
@@ -131,7 +131,7 @@
<member name="global_transform" type="Transform2D" setter="set_global_transform" getter="get_global_transform">
Global [Transform2D].
</member>
- <member name="position" type="Vector2" setter="set_position" getter="get_position" default="Vector2( 0, 0 )">
+ <member name="position" type="Vector2" setter="set_position" getter="get_position" default="Vector2(0, 0)">
Position, relative to the node's parent.
</member>
<member name="rotation" type="float" setter="set_rotation" getter="get_rotation" default="0.0">
@@ -140,7 +140,7 @@
<member name="rotation_degrees" type="float" setter="set_rotation_degrees" getter="get_rotation_degrees" default="0.0">
Rotation in degrees, relative to the node's parent.
</member>
- <member name="scale" type="Vector2" setter="set_scale" getter="get_scale" default="Vector2( 1, 1 )">
+ <member name="scale" type="Vector2" setter="set_scale" getter="get_scale" default="Vector2(1, 1)">
The node's scale. Unscaled value: [code](1, 1)[/code].
</member>
<member name="skew" type="float" setter="set_skew" getter="get_skew" default="0.0">
@@ -150,11 +150,15 @@
<member name="transform" type="Transform2D" setter="set_transform" getter="get_transform">
Local [Transform2D].
</member>
+ <member name="y_sort_enabled" type="bool" setter="set_y_sort_enabled" getter="is_y_sort_enabled" default="false">
+ If [code]true[/code], child nodes with the lowest Y position are drawn before those with a higher Y position. If [code]false[/code], Y-sorting is disabled. Y-sorting only affects children that inherit from [CanvasItem].
+ You can nest nodes with Y-sorting. Child Y-sorted nodes are sorted in the same space as the parent Y-sort. This feature allows you to organize a scene better or divide it into multiple ones without changing your scene tree.
+ </member>
<member name="z_as_relative" type="bool" setter="set_z_as_relative" getter="is_z_relative" default="true">
If [code]true[/code], the node's Z index is relative to its parent's Z index. If this node's Z index is 2 and its parent's effective Z index is 3, then this node's effective Z index will be 2 + 3 = 5.
</member>
<member name="z_index" type="int" setter="set_z_index" getter="get_z_index" default="0">
- Z index. Controls the order in which the nodes render. A node with a higher Z index will display in front of others.
+ Z index. Controls the order in which the nodes render. A node with a higher Z index will display in front of others. Must be between [constant RenderingServer.CANVAS_ITEM_Z_MIN] and [constant RenderingServer.CANVAS_ITEM_Z_MAX] (inclusive).
</member>
</members>
<constants>
diff --git a/doc/classes/Node3D.xml b/doc/classes/Node3D.xml
index 5c29c0d48f..2dc8659d5d 100644
--- a/doc/classes/Node3D.xml
+++ b/doc/classes/Node3D.xml
@@ -4,7 +4,7 @@
Most basic 3D game object, parent of all 3D-related nodes.
</brief_description>
<description>
- Most basic 3D game object, with a 3D [Transform] and visibility settings. All other 3D game objects inherit from Node3D. Use [Node3D] as a parent node to move, scale, rotate and show/hide children in a 3D project.
+ Most basic 3D game object, with a 3D [Transform3D] and visibility settings. All other 3D game objects inherit from Node3D. Use [Node3D] as a parent node to move, scale, rotate and show/hide children in a 3D project.
Affine operations (rotate, scale, translate) happen in parent's local coordinate system, unless the [Node3D] object is set as top-level. Affine operations in this coordinate system correspond to direct affine operations on the [Node3D]'s transform. The word local below refers to this coordinate system. The coordinate system that is attached to the [Node3D] object itself is referred to as object-local coordinate system.
[b]Note:[/b] Unless otherwise specified, all methods that have angle parameters must have angles specified as [i]radians[/i]. To convert degrees to radians, use [method @GlobalScope.deg2rad].
</description>
@@ -20,7 +20,7 @@
Forces the transform to update. Transform changes in physics are not instant for performance reasons. Transforms are accumulated and then set. Use this if you need an up-to-date transform when doing physics operations.
</description>
</method>
- <method name="get_parent_spatial" qualifiers="const">
+ <method name="get_parent_node_3d" qualifiers="const">
<return type="Node3D">
</return>
<description>
@@ -103,7 +103,7 @@
</return>
<argument index="0" name="target" type="Vector3">
</argument>
- <argument index="1" name="up" type="Vector3" default="Vector3( 0, 1, 0 )">
+ <argument index="1" name="up" type="Vector3" default="Vector3(0, 1, 0)">
</argument>
<description>
Rotates itself so that the local -Z axis points towards the [code]target[/code] position.
@@ -118,7 +118,7 @@
</argument>
<argument index="1" name="target" type="Vector3">
</argument>
- <argument index="2" name="up" type="Vector3" default="Vector3( 0, 1, 0 )">
+ <argument index="2" name="up" type="Vector3" default="Vector3(0, 1, 0)">
</argument>
<description>
Moves the node to the specified [code]position[/code], and then rotates itself to point toward the [code]target[/code] as per [method look_at]. Operations take place in global space.
@@ -128,7 +128,7 @@
<return type="void">
</return>
<description>
- Resets this node's transformations (like scale, skew and taper) preserving its rotation and translation by performing Gram-Schmidt orthonormalization on this node's [Transform].
+ Resets this node's transformations (like scale, skew and taper) preserving its rotation and translation by performing Gram-Schmidt orthonormalization on this node's [Transform3D].
</description>
</method>
<method name="rotate">
@@ -202,7 +202,7 @@
<return type="void">
</return>
<description>
- Reset all transformations for this node (sets its [Transform] to the identity matrix).
+ Reset all transformations for this node (sets its [Transform3D] to the identity matrix).
</description>
</method>
<method name="set_ignore_transform_notification">
@@ -288,27 +288,30 @@
<member name="gizmo" type="Node3DGizmo" setter="set_gizmo" getter="get_gizmo">
The [Node3DGizmo] for this node. Used for example in [EditorNode3DGizmo] as custom visualization and editing handles in Editor.
</member>
- <member name="global_transform" type="Transform" setter="set_global_transform" getter="get_global_transform">
- World3D space (global) [Transform] of this node.
+ <member name="global_transform" type="Transform3D" setter="set_global_transform" getter="get_global_transform">
+ World3D space (global) [Transform3D] of this node.
+ </member>
+ <member name="position" type="Vector3" setter="set_position" getter="get_position" default="Vector3(0, 0, 0)">
+ Local position or translation of this node relative to the parent. This is equivalent to [code]transform.origin[/code].
</member>
<member name="rotation" type="Vector3" setter="set_rotation" getter="get_rotation">
Rotation part of the local transformation in radians, specified in terms of YXZ-Euler angles in the format (X angle, Y angle, Z angle).
[b]Note:[/b] In the mathematical sense, rotation is a matrix and not a vector. The three Euler angles, which are the three independent parameters of the Euler-angle parametrization of the rotation matrix, are stored in a [Vector3] data structure not because the rotation is a vector, but only because [Vector3] exists as a convenient data-structure to store 3 floating-point numbers. Therefore, applying affine operations on the rotation "vector" is not meaningful.
</member>
- <member name="rotation_degrees" type="Vector3" setter="set_rotation_degrees" getter="get_rotation_degrees" default="Vector3( 0, 0, 0 )">
+ <member name="rotation_degrees" type="Vector3" setter="set_rotation_degrees" getter="get_rotation_degrees" default="Vector3(0, 0, 0)">
Rotation part of the local transformation in degrees, specified in terms of YXZ-Euler angles in the format (X angle, Y angle, Z angle).
</member>
- <member name="scale" type="Vector3" setter="set_scale" getter="get_scale" default="Vector3( 1, 1, 1 )">
+ <member name="scale" type="Vector3" setter="set_scale" getter="get_scale" default="Vector3(1, 1, 1)">
Scale part of the local transformation.
</member>
<member name="top_level" type="bool" setter="set_as_top_level" getter="is_set_as_top_level" default="false">
If [code]true[/code], the node will not inherit its transformations from its parent. Node transformations are only in global space.
</member>
- <member name="transform" type="Transform" setter="set_transform" getter="get_transform" default="Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )">
- Local space [Transform] of this node, with respect to the parent node.
+ <member name="transform" type="Transform3D" setter="set_transform" getter="get_transform" default="Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)">
+ Local space [Transform3D] of this node, with respect to the parent node.
</member>
- <member name="translation" type="Vector3" setter="set_translation" getter="get_translation" default="Vector3( 0, 0, 0 )">
- Local translation of this node.
+ <member name="visibility_parent" type="NodePath" setter="set_visibility_parent" getter="get_visibility_parent" default="NodePath(&quot;&quot;)">
+ Defines the visibility range parent for this node and its subtree. The visibility parent must be a GeometryInstance3D. Any visual instance will only be visible if the visibility parent (and all of its visibility ancestors) is hidden by being closer to the camera than its own [member GeometryInstance3D.visibility_range_begin]. Nodes hidden via the [member Node3D.visible] property are essentially removed from the visibility dependency tree, so dependant instances will not take the hidden node or its ancestors into account.
</member>
<member name="visible" type="bool" setter="set_visible" getter="is_visible" default="true">
If [code]true[/code], this node is drawn. The node is only visible if all of its antecedents are visible as well (in other words, [method is_visible_in_tree] must return [code]true[/code]).
diff --git a/doc/classes/Node3DGizmo.xml b/doc/classes/Node3DGizmo.xml
index 55080614fc..c561047332 100644
--- a/doc/classes/Node3DGizmo.xml
+++ b/doc/classes/Node3DGizmo.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Node3DGizmo" inherits="Reference" version="4.0">
+<class name="Node3DGizmo" inherits="RefCounted" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml
index 8c90108aef..a9396306f4 100644
--- a/doc/classes/OS.xml
+++ b/doc/classes/OS.xml
@@ -94,7 +94,7 @@
</argument>
<argument index="1" name="arguments" type="PackedStringArray">
</argument>
- <argument index="2" name="output" type="Array" default="[ ]">
+ <argument index="2" name="output" type="Array" default="[]">
</argument>
<argument index="3" name="read_stderr" type="bool" default="false">
</argument>
@@ -136,6 +136,14 @@
Returns the keycode of the given string (e.g. "Escape").
</description>
</method>
+ <method name="get_cache_dir" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ Returns the [i]global[/i] cache data directory according to the operating system's standards. On desktop platforms, this path can be overridden by setting the [code]XDG_CACHE_HOME[/code] environment variable before starting the project. See [url=https://docs.godotengine.org/en/latest/tutorials/io/data_paths.html]File paths in Godot projects[/url] in the documentation for more information. See also [method get_config_dir] and [method get_data_dir].
+ Not to be confused with [method get_user_data_dir], which returns the [i]project-specific[/i] user data path.
+ </description>
+ </method>
<method name="get_cmdline_args">
<return type="PackedStringArray">
</return>
@@ -143,7 +151,7 @@
Returns the command-line arguments passed to the engine.
Command-line arguments can be written in any form, including both [code]--key value[/code] and [code]--key=value[/code] forms so they can be properly parsed, as long as custom command-line arguments do not conflict with engine arguments.
You can also incorporate environment variables using the [method get_environment] method.
- You can set [code]editor/main_run_args[/code] in the Project Settings to define command-line arguments to be passed by the editor when running the project.
+ You can set [member ProjectSettings.editor/run/main_run_args] to define command-line arguments to be passed by the editor when running the project.
Here's a minimal example on how to parse command-line arguments into a dictionary using the [code]--key=value[/code] form for arguments:
[codeblocks]
[gdscript]
@@ -167,6 +175,14 @@
[/codeblocks]
</description>
</method>
+ <method name="get_config_dir" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ Returns the [i]global[/i] user configuration directory according to the operating system's standards. On desktop platforms, this path can be overridden by setting the [code]XDG_CONFIG_HOME[/code] environment variable before starting the project. See [url=https://docs.godotengine.org/en/latest/tutorials/io/data_paths.html]File paths in Godot projects[/url] in the documentation for more information. See also [method get_cache_dir] and [method get_data_dir].
+ Not to be confused with [method get_user_data_dir], which returns the [i]project-specific[/i] user data path.
+ </description>
+ </method>
<method name="get_connected_midi_inputs">
<return type="PackedStringArray">
</return>
@@ -176,32 +192,12 @@
[b]Note:[/b] This method is implemented on Linux, macOS and Windows.
</description>
</method>
- <method name="get_date" qualifiers="const">
- <return type="Dictionary">
- </return>
- <argument index="0" name="utc" type="bool" default="false">
- </argument>
- <description>
- Returns current date as a dictionary of keys: [code]year[/code], [code]month[/code], [code]day[/code], [code]weekday[/code], [code]dst[/code] (Daylight Savings Time).
- </description>
- </method>
- <method name="get_datetime" qualifiers="const">
- <return type="Dictionary">
- </return>
- <argument index="0" name="utc" type="bool" default="false">
- </argument>
- <description>
- Returns current datetime as a dictionary of keys: [code]year[/code], [code]month[/code], [code]day[/code], [code]weekday[/code], [code]dst[/code] (Daylight Savings Time), [code]hour[/code], [code]minute[/code], [code]second[/code].
- </description>
- </method>
- <method name="get_datetime_from_unix_time" qualifiers="const">
- <return type="Dictionary">
+ <method name="get_data_dir" qualifiers="const">
+ <return type="String">
</return>
- <argument index="0" name="unix_time_val" type="int">
- </argument>
<description>
- Gets a dictionary of time values corresponding to the given UNIX epoch time (in seconds).
- 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.
+ Returns the [i]global[/i] user data directory according to the operating system's standards. On desktop platforms, this path can be overridden by setting the [code]XDG_DATA_HOME[/code] environment variable before starting the project. See [url=https://docs.godotengine.org/en/latest/tutorials/io/data_paths.html]File paths in Godot projects[/url] in the documentation for more information. See also [method get_cache_dir] and [method get_config_dir].
+ Not to be confused with [method get_user_data_dir], which returns the [i]project-specific[/i] user data path.
</description>
</method>
<method name="get_environment" qualifiers="const">
@@ -221,6 +217,13 @@
Returns the path to the current engine executable.
</description>
</method>
+ <method name="get_external_data_dir" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ On Android, returns the absolute directory path where user data can be written to external storage if available. On all other platforms, this will return the same location as [method get_user_data_dir].
+ </description>
+ </method>
<method name="get_granted_permissions" qualifiers="const">
<return type="PackedStringArray">
</return>
@@ -313,64 +316,15 @@
[b]Note:[/b] Thread IDs are not deterministic and may be reused across application restarts.
</description>
</method>
- <method name="get_ticks_msec" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Returns the amount of time passed in milliseconds since the engine started.
- </description>
- </method>
- <method name="get_ticks_usec" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Returns the amount of time passed in microseconds since the engine started.
- </description>
- </method>
- <method name="get_time" qualifiers="const">
- <return type="Dictionary">
- </return>
- <argument index="0" name="utc" type="bool" default="false">
- </argument>
- <description>
- Returns current time as a dictionary of keys: hour, minute, second.
- </description>
- </method>
- <method name="get_time_zone_info" qualifiers="const">
- <return type="Dictionary">
- </return>
- <description>
- Returns the current time zone as a dictionary with the keys: bias and name.
- </description>
- </method>
<method name="get_unique_id" qualifiers="const">
<return type="String">
</return>
<description>
Returns a string that is unique to the device.
+ [b]Note:[/b] This string may change without notice if the user reinstalls/upgrades their operating system or changes their hardware. This means it should generally not be used to encrypt persistent data as the data saved prior to an unexpected ID change would become inaccessible. The returned string may also be falsified using external programs, so do not rely on the string returned by [method get_unique_id] for security purposes.
[b]Note:[/b] Returns an empty string on HTML5 and UWP, as this method isn't implemented on those platforms yet.
</description>
</method>
- <method name="get_unix_time" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Returns the current UNIX epoch timestamp in seconds.
- [b]Important:[/b] This is the system clock that the user can manully set. [b]Never use[/b] this method for precise time calculation since its results are also subject to automatic adjustments by the operating system. [b]Always use[/b] [method get_ticks_usec] or [method get_ticks_msec] for precise time calculation instead, since they are guaranteed to be monotonic (i.e. never decrease).
- </description>
- </method>
- <method name="get_unix_time_from_datetime" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="datetime" type="Dictionary">
- </argument>
- <description>
- Gets an epoch time value from a dictionary of time values.
- [code]datetime[/code] must be populated with the following keys: [code]year[/code], [code]month[/code], [code]day[/code], [code]hour[/code], [code]minute[/code], [code]second[/code].
- If the dictionary is empty [code]0[/code] is returned.
- You can pass the output from [method get_datetime_from_unix_time] directly into this function. Daylight Savings Time ([code]dst[/code]), if present, is ignored.
- </description>
- </method>
<method name="get_user_data_dir" qualifiers="const">
<return type="String">
</return>
@@ -380,6 +334,7 @@
On macOS, this is [code]~/Library/Application Support/Godot/app_userdata/[project_name][/code], or [code]~/Library/Application Support/[custom_name][/code] if [code]use_custom_user_dir[/code] is set.
On Windows, this is [code]%APPDATA%\Godot\app_userdata\[project_name][/code], or [code]%APPDATA%\[custom_name][/code] if [code]use_custom_user_dir[/code] is set. [code]%APPDATA%[/code] expands to [code]%USERPROFILE%\AppData\Roaming[/code].
If the project name is empty, [code]user://[/code] falls back to [code]res://[/code].
+ Not to be confused with [method get_data_dir], which returns the [i]global[/i] (non-project-specific) user data directory.
</description>
</method>
<method name="has_environment" qualifiers="const">
diff --git a/doc/classes/Object.xml b/doc/classes/Object.xml
index 7da9c1ac38..cdf76a3a59 100644
--- a/doc/classes/Object.xml
+++ b/doc/classes/Object.xml
@@ -7,7 +7,7 @@
Every class which is not a built-in type inherits from this class.
You can construct Objects from scripting languages, using [code]Object.new()[/code] in GDScript, [code]new Object[/code] in C#, or the "Construct Object" node in VisualScript.
Objects do not manage memory. If a class inherits from Object, you will have to delete instances of it manually. To do so, call the [method free] method from your script or delete the instance from C++.
- Some classes that extend Object add memory management. This is the case of [Reference], which counts references and deletes itself automatically when no longer referenced. [Node], another fundamental type, deletes all its children when freed from memory.
+ Some classes that extend Object add memory management. This is the case of [RefCounted], which counts references and deletes itself automatically when no longer referenced. [Node], another fundamental type, deletes all its children when freed from memory.
Objects export properties, which are mainly useful for storage and editing, but not really so much in programming. Properties are exported in [method _get_property_list] and handled in [method _get] and [method _set]. However, scripting languages and C++ have simpler means to export them.
Property membership can be tested directly in GDScript using [code]in[/code]:
[codeblocks]
@@ -26,7 +26,7 @@
[/codeblocks]
The [code]in[/code] operator will evaluate to [code]true[/code] as long as the key exists, even if the value is [code]null[/code].
Objects also receive notifications. Notifications are a simple way to notify the object about different events, so they can all be handled together. See [method _notification].
- [b]Note:[/b] Unlike references to a [Reference], references to an Object stored in a variable can become invalid without warning. Therefore, it's recommended to use [Reference] for data classes instead of [Object].
+ [b]Note:[/b] Unlike references to a [RefCounted], references to an Object stored in a variable can become invalid without warning. Therefore, it's recommended to use [RefCounted] for data classes instead of [Object].
</description>
<tutorials>
<link title="When and how to avoid using nodes for everything">https://docs.godotengine.org/en/latest/getting_started/workflow/best_practices/node_alternatives.html</link>
@@ -92,7 +92,7 @@
</return>
<argument index="0" name="signal" type="String">
</argument>
- <argument index="1" name="arguments" type="Array" default="[ ]">
+ <argument index="1" name="arguments" type="Array" default="[]">
</argument>
<description>
Adds a user-defined [code]signal[/code]. Arguments are optional, but can be added as an [Array] of dictionaries, each containing [code]name: String[/code] and [code]type: int[/code] (see [enum Variant.Type]) entries.
@@ -173,7 +173,7 @@
</argument>
<argument index="1" name="callable" type="Callable">
</argument>
- <argument index="2" name="binds" type="Array" default="[ ]">
+ <argument index="2" name="binds" type="Array" default="[]">
</argument>
<argument index="3" name="flags" type="int" default="0">
</argument>
diff --git a/doc/classes/Occluder3D.xml b/doc/classes/Occluder3D.xml
index fc676c2b49..501c4a3ccf 100644
--- a/doc/classes/Occluder3D.xml
+++ b/doc/classes/Occluder3D.xml
@@ -9,9 +9,9 @@
<methods>
</methods>
<members>
- <member name="indices" type="PackedInt32Array" setter="set_indices" getter="get_indices" default="PackedInt32Array( )">
+ <member name="indices" type="PackedInt32Array" setter="set_indices" getter="get_indices" default="PackedInt32Array()">
</member>
- <member name="vertices" type="PackedVector3Array" setter="set_vertices" getter="get_vertices" default="PackedVector3Array( )">
+ <member name="vertices" type="PackedVector3Array" setter="set_vertices" getter="get_vertices" default="PackedVector3Array()">
</member>
</members>
<constants>
diff --git a/doc/classes/OccluderPolygon2D.xml b/doc/classes/OccluderPolygon2D.xml
index 8a59ef5cb4..28d3ed433a 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="PackedVector2Array" setter="set_polygon" getter="get_polygon" default="PackedVector2Array( )">
+ <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/OptionButton.xml b/doc/classes/OptionButton.xml
index 52da08c02f..4c03c59f8b 100644
--- a/doc/classes/OptionButton.xml
+++ b/doc/classes/OptionButton.xml
@@ -250,19 +250,19 @@
<theme_item name="font" type="Font">
[Font] of the [OptionButton]'s text.
</theme_item>
- <theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )">
+ <theme_item name="font_color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
Default text [Color] of the [OptionButton].
</theme_item>
- <theme_item name="font_disabled_color" type="Color" default="Color( 0.9, 0.9, 0.9, 0.2 )">
+ <theme_item name="font_disabled_color" type="Color" default="Color(0.9, 0.9, 0.9, 0.2)">
Text [Color] used when the [OptionButton] is disabled.
</theme_item>
- <theme_item name="font_hover_color" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )">
+ <theme_item name="font_hover_color" type="Color" default="Color(0.94, 0.94, 0.94, 1)">
Text [Color] used when the [OptionButton] is being hovered.
</theme_item>
- <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ <theme_item name="font_outline_color" type="Color" default="Color(1, 1, 1, 1)">
The tint of text outline of the [OptionButton].
</theme_item>
- <theme_item name="font_pressed_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ <theme_item name="font_pressed_color" type="Color" default="Color(1, 1, 1, 1)">
Text [Color] used when the [OptionButton] is being pressed.
</theme_item>
<theme_item name="font_size" type="int">
diff --git a/doc/classes/PCKPacker.xml b/doc/classes/PCKPacker.xml
index e3c78e08f1..40e8683c93 100644
--- a/doc/classes/PCKPacker.xml
+++ b/doc/classes/PCKPacker.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PCKPacker" inherits="Reference" version="4.0">
+<class name="PCKPacker" inherits="RefCounted" version="4.0">
<brief_description>
Creates packages that can be loaded into a running project.
</brief_description>
diff --git a/doc/classes/PackedDataContainer.xml b/doc/classes/PackedDataContainer.xml
index 296f9d3373..f72db514f0 100644
--- a/doc/classes/PackedDataContainer.xml
+++ b/doc/classes/PackedDataContainer.xml
@@ -23,7 +23,7 @@
</method>
</methods>
<members>
- <member name="__data__" type="PackedByteArray" setter="_set_data" getter="_get_data" default="PackedByteArray( )">
+ <member name="__data__" type="PackedByteArray" setter="_set_data" getter="_get_data" default="PackedByteArray()">
</member>
</members>
<constants>
diff --git a/doc/classes/PackedDataContainerRef.xml b/doc/classes/PackedDataContainerRef.xml
index f0f59675de..bfd5a6f1c1 100644
--- a/doc/classes/PackedDataContainerRef.xml
+++ b/doc/classes/PackedDataContainerRef.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PackedDataContainerRef" inherits="Reference" version="4.0">
+<class name="PackedDataContainerRef" inherits="RefCounted" version="4.0">
<brief_description>
- Reference version of [PackedDataContainer].
+ Reference-counted version of [PackedDataContainer].
</brief_description>
<description>
</description>
diff --git a/doc/classes/PackedScene.xml b/doc/classes/PackedScene.xml
index 1d9be7f165..f39cae8be5 100644
--- a/doc/classes/PackedScene.xml
+++ b/doc/classes/PackedScene.xml
@@ -11,13 +11,13 @@
[codeblocks]
[gdscript]
# Use load() instead of preload() if the path isn't known at compile-time.
- var scene = preload("res://scene.tscn").instance()
+ var scene = preload("res://scene.tscn").instantiate()
# Add the node as a child of the node the script is attached to.
add_child(scene)
[/gdscript]
[csharp]
// C# has no preload, so you have to always use ResourceLoader.Load&lt;PackedScene&gt;().
- var scene = ResourceLoader.Load&lt;PackedScene&gt;("res://scene.tscn").Instance();
+ var scene = ResourceLoader.Load&lt;PackedScene&gt;("res://scene.tscn").Instantiate();
// Add the node as a child of the node the script is attached to.
AddChild(scene);
[/csharp]
@@ -76,7 +76,7 @@
<link title="2D Role Playing Game Demo">https://godotengine.org/asset-library/asset/520</link>
</tutorials>
<methods>
- <method name="can_instance" qualifiers="const">
+ <method name="can_instantiate" qualifiers="const">
<return type="bool">
</return>
<description>
@@ -90,7 +90,7 @@
Returns the [code]SceneState[/code] representing the scene file contents.
</description>
</method>
- <method name="instance" qualifiers="const">
+ <method name="instantiate" qualifiers="const">
<return type="Node">
</return>
<argument index="0" name="edit_state" type="int" enum="PackedScene.GenEditState" default="0">
@@ -110,21 +110,21 @@
</method>
</methods>
<members>
- <member name="_bundled" type="Dictionary" setter="_set_bundled_scene" getter="_get_bundled_scene" default="{&quot;conn_count&quot;: 0,&quot;conns&quot;: PackedInt32Array( ),&quot;editable_instances&quot;: [ ],&quot;names&quot;: PackedStringArray( ),&quot;node_count&quot;: 0,&quot;node_paths&quot;: [ ],&quot;nodes&quot;: PackedInt32Array( ),&quot;variants&quot;: [ ],&quot;version&quot;: 2}">
+ <member name="_bundled" type="Dictionary" setter="_set_bundled_scene" getter="_get_bundled_scene" default="{&quot;conn_count&quot;: 0,&quot;conns&quot;: PackedInt32Array(),&quot;editable_instances&quot;: [],&quot;names&quot;: PackedStringArray(),&quot;node_count&quot;: 0,&quot;node_paths&quot;: [],&quot;nodes&quot;: PackedInt32Array(),&quot;variants&quot;: [],&quot;version&quot;: 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>
</members>
<constants>
<constant name="GEN_EDIT_STATE_DISABLED" value="0" enum="GenEditState">
- If passed to [method instance], blocks edits to the scene state.
+ If passed to [method instantiate], blocks edits to the scene state.
</constant>
<constant name="GEN_EDIT_STATE_INSTANCE" value="1" enum="GenEditState">
- If passed to [method instance], provides local scene resources to the local scene.
+ If passed to [method instantiate], provides local scene resources to the local scene.
[b]Note:[/b] Only available in editor builds.
</constant>
<constant name="GEN_EDIT_STATE_MAIN" value="2" enum="GenEditState">
- If passed to [method instance], provides local scene resources to the local scene. Only the main scene should receive the main edit state.
+ If passed to [method instantiate], provides local scene resources to the local scene. Only the main scene should receive the main edit state.
[b]Note:[/b] Only available in editor builds.
</constant>
</constants>
diff --git a/doc/classes/PackedVector3Array.xml b/doc/classes/PackedVector3Array.xml
index 85d41d7519..00ded39082 100644
--- a/doc/classes/PackedVector3Array.xml
+++ b/doc/classes/PackedVector3Array.xml
@@ -106,7 +106,7 @@
<method name="operator *" qualifiers="operator">
<return type="PackedVector3Array">
</return>
- <argument index="0" name="right" type="Transform">
+ <argument index="0" name="right" type="Transform3D">
</argument>
<description>
</description>
diff --git a/doc/classes/PacketPeer.xml b/doc/classes/PacketPeer.xml
index e3e2f63e14..0a758c2cd6 100644
--- a/doc/classes/PacketPeer.xml
+++ b/doc/classes/PacketPeer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PacketPeer" inherits="Reference" version="4.0">
+<class name="PacketPeer" inherits="RefCounted" version="4.0">
<brief_description>
Abstraction and base class for packet-based protocols.
</brief_description>
diff --git a/doc/classes/ParallaxBackground.xml b/doc/classes/ParallaxBackground.xml
index 3b730fc4d4..b8097343f4 100644
--- a/doc/classes/ParallaxBackground.xml
+++ b/doc/classes/ParallaxBackground.xml
@@ -12,22 +12,22 @@
</methods>
<members>
<member name="layer" type="int" setter="set_layer" getter="get_layer" override="true" default="-100" />
- <member name="scroll_base_offset" type="Vector2" setter="set_scroll_base_offset" getter="get_scroll_base_offset" default="Vector2( 0, 0 )">
+ <member name="scroll_base_offset" type="Vector2" setter="set_scroll_base_offset" getter="get_scroll_base_offset" default="Vector2(0, 0)">
The base position offset for all [ParallaxLayer] children.
</member>
- <member name="scroll_base_scale" type="Vector2" setter="set_scroll_base_scale" getter="get_scroll_base_scale" default="Vector2( 1, 1 )">
+ <member name="scroll_base_scale" type="Vector2" setter="set_scroll_base_scale" getter="get_scroll_base_scale" default="Vector2(1, 1)">
The base motion scale for all [ParallaxLayer] children.
</member>
<member name="scroll_ignore_camera_zoom" type="bool" setter="set_ignore_camera_zoom" getter="is_ignore_camera_zoom" default="false">
If [code]true[/code], elements in [ParallaxLayer] child aren't affected by the zoom level of the camera.
</member>
- <member name="scroll_limit_begin" type="Vector2" setter="set_limit_begin" getter="get_limit_begin" default="Vector2( 0, 0 )">
+ <member name="scroll_limit_begin" type="Vector2" setter="set_limit_begin" getter="get_limit_begin" default="Vector2(0, 0)">
Top-left limits for scrolling to begin. If the camera is outside of this limit, the background will stop scrolling. Must be lower than [member scroll_limit_end] to work.
</member>
- <member name="scroll_limit_end" type="Vector2" setter="set_limit_end" getter="get_limit_end" default="Vector2( 0, 0 )">
+ <member name="scroll_limit_end" type="Vector2" setter="set_limit_end" getter="get_limit_end" default="Vector2(0, 0)">
Bottom-right limits for scrolling to end. If the camera is outside of this limit, the background will stop scrolling. Must be higher than [member scroll_limit_begin] to work.
</member>
- <member name="scroll_offset" type="Vector2" setter="set_scroll_offset" getter="get_scroll_offset" default="Vector2( 0, 0 )">
+ <member name="scroll_offset" type="Vector2" setter="set_scroll_offset" getter="get_scroll_offset" default="Vector2(0, 0)">
The ParallaxBackground's scroll value. Calculated automatically when using a [Camera2D], but can be used to manually manage scrolling when no camera is present.
</member>
</members>
diff --git a/doc/classes/ParallaxLayer.xml b/doc/classes/ParallaxLayer.xml
index 7210bee11c..6b1e013851 100644
--- a/doc/classes/ParallaxLayer.xml
+++ b/doc/classes/ParallaxLayer.xml
@@ -13,13 +13,13 @@
<methods>
</methods>
<members>
- <member name="motion_mirroring" type="Vector2" setter="set_mirroring" getter="get_mirroring" default="Vector2( 0, 0 )">
+ <member name="motion_mirroring" type="Vector2" setter="set_mirroring" getter="get_mirroring" default="Vector2(0, 0)">
The ParallaxLayer's [Texture2D] mirroring. Useful for creating an infinite scrolling background. If an axis is set to [code]0[/code], the [Texture2D] will not be mirrored.
</member>
- <member name="motion_offset" type="Vector2" setter="set_motion_offset" getter="get_motion_offset" default="Vector2( 0, 0 )">
+ <member name="motion_offset" type="Vector2" setter="set_motion_offset" getter="get_motion_offset" default="Vector2(0, 0)">
The ParallaxLayer's offset relative to the parent ParallaxBackground's [member ParallaxBackground.scroll_offset].
</member>
- <member name="motion_scale" type="Vector2" setter="set_motion_scale" getter="get_motion_scale" default="Vector2( 1, 1 )">
+ <member name="motion_scale" type="Vector2" setter="set_motion_scale" getter="get_motion_scale" default="Vector2(1, 1)">
Multiplies the ParallaxLayer's motion. If an axis is set to [code]0[/code], it will not scroll.
</member>
</members>
diff --git a/doc/classes/ParticlesMaterial.xml b/doc/classes/ParticlesMaterial.xml
index 6d7f99a55b..e8fde21032 100644
--- a/doc/classes/ParticlesMaterial.xml
+++ b/doc/classes/ParticlesMaterial.xml
@@ -135,13 +135,13 @@
</member>
<member name="collision_bounce" type="float" setter="set_collision_bounce" getter="get_collision_bounce" default="0.0">
</member>
- <member name="collision_enabled" type="bool" setter="set_collision_enabled" getter="is_collision_enabled" default="true">
+ <member name="collision_enabled" type="bool" setter="set_collision_enabled" getter="is_collision_enabled" default="false">
</member>
<member name="collision_friction" type="float" setter="set_collision_friction" getter="get_collision_friction" default="0.0">
</member>
<member name="collision_use_scale" type="bool" setter="set_collision_use_scale" getter="is_collision_using_scale" default="false">
</member>
- <member name="color" type="Color" setter="set_color" getter="get_color" default="Color( 1, 1, 1, 1 )">
+ <member name="color" type="Color" setter="set_color" getter="get_color" default="Color(1, 1, 1, 1)">
Each particle's initial color. If the [GPUParticles2D]'s [code]texture[/code] is defined, it will be multiplied by this color. To have particle display color in a [BaseMaterial3D] make sure to set [member BaseMaterial3D.vertex_color_use_as_albedo] to [code]true[/code].
</member>
<member name="color_ramp" type="Texture2D" setter="set_color_ramp" getter="get_color_ramp">
@@ -156,7 +156,7 @@
<member name="damping_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
Damping randomness ratio.
</member>
- <member name="direction" type="Vector3" setter="set_direction" getter="get_direction" default="Vector3( 1, 0, 0 )">
+ <member name="direction" type="Vector3" setter="set_direction" getter="get_direction" default="Vector3(1, 0, 0)">
Unit vector specifying the particles' emission direction.
</member>
<member name="emission_box_extents" type="Vector3" setter="set_emission_box_extents" getter="get_emission_box_extents">
@@ -183,7 +183,7 @@
<member name="flatness" type="float" setter="set_flatness" getter="get_flatness" default="0.0">
Amount of [member spread] along the Y axis.
</member>
- <member name="gravity" type="Vector3" setter="set_gravity" getter="get_gravity" default="Vector3( 0, -9.8, 0 )">
+ <member name="gravity" type="Vector3" setter="set_gravity" getter="get_gravity" default="Vector3(0, -9.8, 0)">
Gravity applied to every particle.
</member>
<member name="hue_variation" type="float" setter="set_param" getter="get_param" default="0.0">
diff --git a/doc/classes/Performance.xml b/doc/classes/Performance.xml
index 9e9c5063ae..b6013fa83e 100644
--- a/doc/classes/Performance.xml
+++ b/doc/classes/Performance.xml
@@ -20,7 +20,7 @@
</argument>
<argument index="1" name="callable" type="Callable">
</argument>
- <argument index="2" name="arguments" type="Array" default="[ ]">
+ <argument index="2" name="arguments" type="Array" default="[]">
</argument>
<description>
Adds a custom monitor with name same as id. You can specify the category of monitor using '/' in id. If there are more than one '/' then default category is used. Default category is "Custom".
@@ -157,13 +157,13 @@
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="6" enum="Monitor">
- Number of objects currently instanced (including nodes).
+ Number of objects currently instantiated (including nodes).
</constant>
<constant name="OBJECT_RESOURCE_COUNT" value="7" enum="Monitor">
Number of resources currently used.
</constant>
<constant name="OBJECT_NODE_COUNT" value="8" enum="Monitor">
- Number of nodes currently instanced in the scene tree. This also includes the root node.
+ Number of nodes currently instantiated in the scene tree. This also includes the root node.
</constant>
<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.
diff --git a/doc/classes/PhysicalBone2D.xml b/doc/classes/PhysicalBone2D.xml
new file mode 100644
index 0000000000..cea75bad52
--- /dev/null
+++ b/doc/classes/PhysicalBone2D.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="PhysicalBone2D" inherits="RigidBody2D" version="4.0">
+ <brief_description>
+ A 2D node that can be used for physically aware bones in 2D.
+ </brief_description>
+ <description>
+ The [code]PhysicalBone2D[/code] node is a [RigidBody2D]-based node that can be used to make [Bone2D] nodes in a [Skeleton2D] react to physics. This node is very similar to the [PhysicalBone3D] node, just for 2D instead of 3D.
+ [b]Note:[/b] To have the Bone2D nodes visually follow the [code]PhysicalBone2D[/code] node, use a [SkeletonModification2DPhysicalBones] modification on the [Skeleton2D] node with the [Bone2D] nodes.
+ [b]Note:[/b] The PhysicalBone2D node does not automatically create a [Joint2D] node to keep [code]PhysicalBone2D[/code] nodes together. You will need to create these manually. For most cases, you want to use a [PinJoint2D] node. The [code]PhysicalBone2D[/code] node can automatically configure the [Joint2D] node once it's been created as a child node.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="get_joint" qualifiers="const">
+ <return type="Joint2D">
+ </return>
+ <description>
+ Returns the first [Joint2D] child node, if one exists. This is mainly a helper function to make it easier to get the [Joint2D] that the [code]PhysicalBone2D[/code] is autoconfiguring.
+ </description>
+ </method>
+ <method name="is_simulating_physics" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns a boolean that indicates whether the [code]PhysicalBone2D[/code] node is running and simulating using the Godot 2D physics engine. When [code]true[/code], the PhysicalBone2D node is using physics.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="auto_configure_joint" type="bool" setter="set_auto_configure_joint" getter="get_auto_configure_joint" default="true">
+ If [code]true[/code], the [code]PhysicalBone2D[/code] node will automatically configure the first [Joint2D] child node. The automatic configuration is limited to setting up the node properties and positioning the [Joint2D].
+ </member>
+ <member name="bone2d_index" type="int" setter="set_bone2d_index" getter="get_bone2d_index" default="-1">
+ The index of the [Bone2D] node that this [code]PhysicalBone2D[/code] node is supposed to be simulating.
+ </member>
+ <member name="bone2d_nodepath" type="NodePath" setter="set_bone2d_nodepath" getter="get_bone2d_nodepath" default="NodePath(&quot;&quot;)">
+ The [NodePath] to the [Bone2D] node that this [code]PhysicalBone2D[/code] node is supposed to be simulating.
+ </member>
+ <member name="follow_bone_when_simulating" type="bool" setter="set_follow_bone_when_simulating" getter="get_follow_bone_when_simulating" default="false">
+ If [code]true[/code], the [code]PhysicalBone2D[/code] will keep the transform of the bone it is bound to when simulating physics.
+ </member>
+ <member name="simulate_physics" type="bool" setter="set_simulate_physics" getter="get_simulate_physics" default="false">
+ If [code]true[/code], the [code]PhysicalBone2D[/code] will start simulating using physics. If [code]false[/code], the [code]PhysicalBone2D[/code] will follow the transform of the [Bone2D] node.
+ [b]Note:[/b] To have the Bone2D nodes visually follow the [code]PhysicalBone2D[/code] node, use a [SkeletonModification2DPhysicalBones] modification on the [Skeleton2D] node with the [Bone2D] nodes.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/PhysicalBone3D.xml b/doc/classes/PhysicalBone3D.xml
index 38d9f722b1..736b44ee1c 100644
--- a/doc/classes/PhysicalBone3D.xml
+++ b/doc/classes/PhysicalBone3D.xml
@@ -20,15 +20,7 @@
</return>
<argument index="0" name="impulse" type="Vector3">
</argument>
- <argument index="1" name="position" type="Vector3" default="Vector3( 0, 0, 0 )">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_axis_lock" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="axis" type="int" enum="PhysicsServer3D.BodyAxis">
+ <argument index="1" name="position" type="Vector3" default="Vector3(0, 0, 0)">
</argument>
<description>
</description>
@@ -51,40 +43,12 @@
<description>
</description>
</method>
- <method name="set_axis_lock">
- <return type="void">
- </return>
- <argument index="0" name="axis" type="int" enum="PhysicsServer3D.BodyAxis">
- </argument>
- <argument index="1" name="lock" type="bool">
- </argument>
- <description>
- </description>
- </method>
</methods>
<members>
<member name="angular_damp" type="float" setter="set_angular_damp" getter="get_angular_damp" default="-1.0">
Damps the body's rotation if greater than [code]0[/code].
</member>
- <member name="axis_lock_angular_x" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false">
- Lock the body's rotation in the X axis.
- </member>
- <member name="axis_lock_angular_y" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false">
- Lock the body's rotation in the Y axis.
- </member>
- <member name="axis_lock_angular_z" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false">
- Lock the body's rotation in the Z axis.
- </member>
- <member name="axis_lock_linear_x" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false">
- Lock the body's movement in the X axis.
- </member>
- <member name="axis_lock_linear_y" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false">
- Lock the body's movement in the Y axis.
- </member>
- <member name="axis_lock_linear_z" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false">
- Lock the body's movement in the Z axis.
- </member>
- <member name="body_offset" type="Transform" setter="set_body_offset" getter="get_body_offset" default="Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )">
+ <member name="body_offset" type="Transform3D" setter="set_body_offset" getter="get_body_offset" default="Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)">
Sets the body's transform.
</member>
<member name="bounce" type="float" setter="set_bounce" getter="get_bounce" default="0.0">
@@ -99,13 +63,13 @@
<member name="gravity_scale" type="float" setter="set_gravity_scale" getter="get_gravity_scale" default="1.0">
This is multiplied by the global 3D gravity setting found in [b]Project &gt; Project Settings &gt; Physics &gt; 3d[/b] to produce the body's gravity. For example, a value of 1 will be normal gravity, 2 will apply double gravity, and 0.5 will apply half gravity to this object.
</member>
- <member name="joint_offset" type="Transform" setter="set_joint_offset" getter="get_joint_offset" default="Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )">
+ <member name="joint_offset" type="Transform3D" setter="set_joint_offset" getter="get_joint_offset" default="Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)">
Sets the joint's transform.
</member>
<member name="joint_rotation" type="Vector3" setter="set_joint_rotation" getter="get_joint_rotation">
Sets the joint's rotation in radians.
</member>
- <member name="joint_rotation_degrees" type="Vector3" setter="set_joint_rotation_degrees" getter="get_joint_rotation_degrees" default="Vector3( 0, 0, 0 )">
+ <member name="joint_rotation_degrees" type="Vector3" setter="set_joint_rotation_degrees" getter="get_joint_rotation_degrees" default="Vector3(0, 0, 0)">
Sets the joint's rotation in degrees.
</member>
<member name="joint_type" type="int" setter="set_joint_type" getter="get_joint_type" enum="PhysicalBone3D.JointType" default="0">
diff --git a/doc/classes/PhysicalSkyMaterial.xml b/doc/classes/PhysicalSkyMaterial.xml
index 381371b973..20ab998d35 100644
--- a/doc/classes/PhysicalSkyMaterial.xml
+++ b/doc/classes/PhysicalSkyMaterial.xml
@@ -19,13 +19,13 @@
<member name="exposure" type="float" setter="set_exposure" getter="get_exposure" default="0.1">
Sets the exposure of the sky. Higher exposure values make the entire sky brighter.
</member>
- <member name="ground_color" type="Color" setter="set_ground_color" getter="get_ground_color" default="Color( 1, 1, 1, 1 )">
+ <member name="ground_color" type="Color" setter="set_ground_color" getter="get_ground_color" default="Color(1, 1, 1, 1)">
Modulates the [Color] on the bottom half of the sky to represent the ground.
</member>
<member name="mie_coefficient" type="float" setter="set_mie_coefficient" getter="get_mie_coefficient" default="0.005">
Controls the strength of mie scattering for the sky. Mie scattering results from light colliding with larger particles (like water). On earth, mie scattering results in a whitish color around the sun and horizon.
</member>
- <member name="mie_color" type="Color" setter="set_mie_color" getter="get_mie_color" default="Color( 0.36, 0.56, 0.82, 1 )">
+ <member name="mie_color" type="Color" setter="set_mie_color" getter="get_mie_color" default="Color(0.36, 0.56, 0.82, 1)">
Controls the [Color] of the mie scattering effect. While not physically accurate, this allows for the creation of alien looking planets.
</member>
<member name="mie_eccentricity" type="float" setter="set_mie_eccentricity" getter="get_mie_eccentricity" default="0.8">
@@ -37,7 +37,7 @@
<member name="rayleigh_coefficient" type="float" setter="set_rayleigh_coefficient" getter="get_rayleigh_coefficient" default="2.0">
Controls the strength of the Rayleigh scattering. Rayleigh scattering results from light colliding with small particles. It is responsible for the blue color of the sky.
</member>
- <member name="rayleigh_color" type="Color" setter="set_rayleigh_color" getter="get_rayleigh_color" default="Color( 0.056, 0.14, 0.3, 1 )">
+ <member name="rayleigh_color" type="Color" setter="set_rayleigh_color" getter="get_rayleigh_color" default="Color(0.056, 0.14, 0.3, 1)">
Controls the [Color] of the Rayleigh scattering. While not physically accurate, this allows for the creation of alien looking planets. For example, setting this to a red [Color] results in a Mars looking atmosphere with a corresponding blue sunset.
</member>
<member name="sun_disk_scale" type="float" setter="set_sun_disk_scale" getter="get_sun_disk_scale" default="1.0">
diff --git a/doc/classes/PhysicsBody2D.xml b/doc/classes/PhysicsBody2D.xml
index e43d3bb762..654b0fb668 100644
--- a/doc/classes/PhysicsBody2D.xml
+++ b/doc/classes/PhysicsBody2D.xml
@@ -26,6 +26,25 @@
Returns an array of nodes that were added as collision exceptions for this body.
</description>
</method>
+ <method name="move_and_collide">
+ <return type="KinematicCollision2D">
+ </return>
+ <argument index="0" name="rel_vec" type="Vector2">
+ </argument>
+ <argument index="1" name="infinite_inertia" type="bool" default="true">
+ </argument>
+ <argument index="2" name="exclude_raycast_shapes" type="bool" default="true">
+ </argument>
+ <argument index="3" name="test_only" type="bool" default="false">
+ </argument>
+ <argument index="4" name="safe_margin" type="float" default="0.08">
+ </argument>
+ <description>
+ Moves the body along the vector [code]rel_vec[/code]. The body will stop if it collides. Returns a [KinematicCollision2D], which contains information about the collision.
+ If [code]test_only[/code] is [code]true[/code], the body does not move but the would-be collision information is given.
+ [code]safe_margin[/code] is the extra margin used for collision recovery (see [member CharacterBody2D.collision/safe_margin] for more details).
+ </description>
+ </method>
<method name="remove_collision_exception_with">
<return type="void">
</return>
@@ -35,6 +54,27 @@
Removes a body from the list of bodies that this body can't collide with.
</description>
</method>
+ <method name="test_move">
+ <return type="bool">
+ </return>
+ <argument index="0" name="from" type="Transform2D">
+ </argument>
+ <argument index="1" name="rel_vec" type="Vector2">
+ </argument>
+ <argument index="2" name="infinite_inertia" type="bool" default="true">
+ </argument>
+ <argument index="3" name="exclude_raycast_shapes" type="bool" default="true">
+ </argument>
+ <argument index="4" name="collision" type="KinematicCollision2D" default="null">
+ </argument>
+ <argument index="5" name="safe_margin" type="float" default="0.08">
+ </argument>
+ <description>
+ Checks for collisions without moving the body. Virtually sets the node's position, scale and rotation to that of the given [Transform2D], then tries to move the body along the vector [code]rel_vec[/code]. Returns [code]true[/code] if a collision would occur.
+ [code]collision[/code] is an optional object of type [KinematicCollision2D], which contains additional information about the collision (should there be one).
+ [code]safe_margin[/code] is the extra margin used for collision recovery (see [member CharacterBody2D.collision/safe_margin] for more details).
+ </description>
+ </method>
</methods>
<members>
<member name="input_pickable" type="bool" setter="set_pickable" getter="is_pickable" override="true" default="false" />
diff --git a/doc/classes/PhysicsBody3D.xml b/doc/classes/PhysicsBody3D.xml
index b320d37d23..1ec38000be 100644
--- a/doc/classes/PhysicsBody3D.xml
+++ b/doc/classes/PhysicsBody3D.xml
@@ -19,6 +19,15 @@
Adds a body to the list of bodies that this body can't collide with.
</description>
</method>
+ <method name="get_axis_lock" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="axis" type="int" enum="PhysicsServer3D.BodyAxis">
+ </argument>
+ <description>
+ Returns [code]true[/code] if the specified linear or rotational [code]axis[/code] is locked.
+ </description>
+ </method>
<method name="get_collision_exceptions">
<return type="PhysicsBody3D[]">
</return>
@@ -26,6 +35,25 @@
Returns an array of nodes that were added as collision exceptions for this body.
</description>
</method>
+ <method name="move_and_collide">
+ <return type="KinematicCollision3D">
+ </return>
+ <argument index="0" name="rel_vec" type="Vector3">
+ </argument>
+ <argument index="1" name="infinite_inertia" type="bool" default="true">
+ </argument>
+ <argument index="2" name="exclude_raycast_shapes" type="bool" default="true">
+ </argument>
+ <argument index="3" name="test_only" type="bool" default="false">
+ </argument>
+ <argument index="4" name="safe_margin" type="float" default="0.001">
+ </argument>
+ <description>
+ Moves the body along the vector [code]rel_vec[/code]. The body will stop if it collides. Returns a [KinematicCollision3D], which contains information about the collision.
+ If [code]test_only[/code] is [code]true[/code], the body does not move but the would-be collision information is given.
+ [code]safe_margin[/code] is the extra margin used for collision recovery (see [member CharacterBody3D.collision/safe_margin] for more details).
+ </description>
+ </method>
<method name="remove_collision_exception_with">
<return type="void">
</return>
@@ -35,7 +63,59 @@
Removes a body from the list of bodies that this body can't collide with.
</description>
</method>
+ <method name="set_axis_lock">
+ <return type="void">
+ </return>
+ <argument index="0" name="axis" type="int" enum="PhysicsServer3D.BodyAxis">
+ </argument>
+ <argument index="1" name="lock" type="bool">
+ </argument>
+ <description>
+ Locks or unlocks the specified linear or rotational [code]axis[/code] depending on the value of [code]lock[/code].
+ </description>
+ </method>
+ <method name="test_move">
+ <return type="bool">
+ </return>
+ <argument index="0" name="from" type="Transform3D">
+ </argument>
+ <argument index="1" name="rel_vec" type="Vector3">
+ </argument>
+ <argument index="2" name="infinite_inertia" type="bool" default="true">
+ </argument>
+ <argument index="3" name="exclude_raycast_shapes" type="bool" default="true">
+ </argument>
+ <argument index="4" name="collision" type="KinematicCollision3D" default="null">
+ </argument>
+ <argument index="5" name="safe_margin" type="float" default="0.001">
+ </argument>
+ <description>
+ Checks for collisions without moving the body. Virtually sets the node's position, scale and rotation to that of the given [Transform3D], then tries to move the body along the vector [code]rel_vec[/code]. Returns [code]true[/code] if a collision would occur.
+ [code]collision[/code] is an optional object of type [KinematicCollision3D], which contains additional information about the collision (should there be one).
+ [code]safe_margin[/code] is the extra margin used for collision recovery (see [member CharacterBody3D.collision/safe_margin] for more details).
+ </description>
+ </method>
</methods>
+ <members>
+ <member name="axis_lock_angular_x" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false">
+ Lock the body's rotation in the X axis.
+ </member>
+ <member name="axis_lock_angular_y" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false">
+ Lock the body's rotation in the Y axis.
+ </member>
+ <member name="axis_lock_angular_z" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false">
+ Lock the body's rotation in the Z axis.
+ </member>
+ <member name="axis_lock_linear_x" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false">
+ Lock the body's linear movement in the X axis.
+ </member>
+ <member name="axis_lock_linear_y" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false">
+ Lock the body's linear movement in the Y axis.
+ </member>
+ <member name="axis_lock_linear_z" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false">
+ Lock the body's linear movement in the Z axis.
+ </member>
+ </members>
<constants>
</constants>
</class>
diff --git a/doc/classes/PhysicsDirectBodyState2D.xml b/doc/classes/PhysicsDirectBodyState2D.xml
index dfc0ab909a..65cb3e7f38 100644
--- a/doc/classes/PhysicsDirectBodyState2D.xml
+++ b/doc/classes/PhysicsDirectBodyState2D.xml
@@ -4,7 +4,7 @@
Direct access object to a physics body in the [PhysicsServer2D].
</brief_description>
<description>
- Provides direct access to a physics body in the [PhysicsServer2D], allowing safe changes to physics properties. This object is passed via the direct state callback of rigid/character bodies, and is intended for changing the direct state of that body. See [method RigidBody2D._integrate_forces].
+ Provides direct access to a physics body in the [PhysicsServer2D], allowing safe changes to physics properties. This object is passed via the direct state callback of dynamic bodies, and is intended for changing the direct state of that body. See [method RigidBody2D._integrate_forces].
</description>
<tutorials>
<link title="Ray-casting">https://docs.godotengine.org/en/latest/tutorials/physics/ray-casting.html</link>
@@ -24,7 +24,7 @@
</return>
<argument index="0" name="force" type="Vector2">
</argument>
- <argument index="1" name="position" type="Vector2" default="Vector2( 0, 0 )">
+ <argument index="1" name="position" type="Vector2" default="Vector2(0, 0)">
</argument>
<description>
Adds a positioned force to the body. Both the force and the offset from the body origin are in global coordinates.
@@ -53,7 +53,7 @@
</return>
<argument index="0" name="impulse" type="Vector2">
</argument>
- <argument index="1" name="position" type="Vector2" default="Vector2( 0, 0 )">
+ <argument index="1" name="position" type="Vector2" default="Vector2(0, 0)">
</argument>
<description>
Applies a positioned impulse to the body. An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). The offset uses the rotation of the global coordinate system, but is centered at the object's origin.
diff --git a/doc/classes/PhysicsDirectBodyState3D.xml b/doc/classes/PhysicsDirectBodyState3D.xml
index eea681e696..85feeef86e 100644
--- a/doc/classes/PhysicsDirectBodyState3D.xml
+++ b/doc/classes/PhysicsDirectBodyState3D.xml
@@ -4,7 +4,7 @@
Direct access object to a physics body in the [PhysicsServer3D].
</brief_description>
<description>
- Provides direct access to a physics body in the [PhysicsServer3D], allowing safe changes to physics properties. This object is passed via the direct state callback of rigid/character bodies, and is intended for changing the direct state of that body. See [method RigidBody3D._integrate_forces].
+ Provides direct access to a physics body in the [PhysicsServer3D], allowing safe changes to physics properties. This object is passed via the direct state callback of dynamic bodies, and is intended for changing the direct state of that body. See [method RigidBody3D._integrate_forces].
</description>
<tutorials>
</tutorials>
@@ -12,7 +12,7 @@
<method name="add_central_force">
<return type="void">
</return>
- <argument index="0" name="force" type="Vector3" default="Vector3( 0, 0, 0 )">
+ <argument index="0" name="force" type="Vector3" default="Vector3(0, 0, 0)">
</argument>
<description>
Adds a constant directional force without affecting rotation.
@@ -24,7 +24,7 @@
</return>
<argument index="0" name="force" type="Vector3">
</argument>
- <argument index="1" name="position" type="Vector3" default="Vector3( 0, 0, 0 )">
+ <argument index="1" name="position" type="Vector3" default="Vector3(0, 0, 0)">
</argument>
<description>
Adds a positioned force to the body. Both the force and the offset from the body origin are in global coordinates.
@@ -42,7 +42,7 @@
<method name="apply_central_impulse">
<return type="void">
</return>
- <argument index="0" name="impulse" type="Vector3" default="Vector3( 0, 0, 0 )">
+ <argument index="0" name="impulse" type="Vector3" default="Vector3(0, 0, 0)">
</argument>
<description>
Applies a single directional impulse without affecting rotation.
@@ -54,7 +54,7 @@
</return>
<argument index="0" name="impulse" type="Vector3">
</argument>
- <argument index="1" name="position" type="Vector3" default="Vector3( 0, 0, 0 )">
+ <argument index="1" name="position" type="Vector3" default="Vector3(0, 0, 0)">
</argument>
<description>
Applies a positioned impulse to the body. An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason it should only be used when simulating one-time impacts. The position uses the rotation of the global coordinate system, but is centered at the object's origin.
@@ -214,7 +214,7 @@
<member name="total_linear_damp" type="float" setter="" getter="get_total_linear_damp">
The rate at which the body stops moving, if there are not any other forces moving it.
</member>
- <member name="transform" type="Transform" setter="set_transform" getter="get_transform">
+ <member name="transform" type="Transform3D" setter="set_transform" getter="get_transform">
The body's transformation matrix.
</member>
</members>
diff --git a/doc/classes/PhysicsDirectSpaceState2D.xml b/doc/classes/PhysicsDirectSpaceState2D.xml
index b6f95305ed..6c8c957e5d 100644
--- a/doc/classes/PhysicsDirectSpaceState2D.xml
+++ b/doc/classes/PhysicsDirectSpaceState2D.xml
@@ -56,7 +56,7 @@
</argument>
<argument index="1" name="max_results" type="int" default="32">
</argument>
- <argument index="2" name="exclude" type="Array" default="[ ]">
+ <argument index="2" name="exclude" type="Array" default="[]">
</argument>
<argument index="3" name="collision_layer" type="int" default="2147483647">
</argument>
@@ -84,7 +84,7 @@
</argument>
<argument index="2" name="max_results" type="int" default="32">
</argument>
- <argument index="3" name="exclude" type="Array" default="[ ]">
+ <argument index="3" name="exclude" type="Array" default="[]">
</argument>
<argument index="4" name="collision_layer" type="int" default="2147483647">
</argument>
@@ -102,7 +102,7 @@
</argument>
<argument index="1" name="to" type="Vector2">
</argument>
- <argument index="2" name="exclude" type="Array" default="[ ]">
+ <argument index="2" name="exclude" type="Array" default="[]">
</argument>
<argument index="3" name="collision_layer" type="int" default="2147483647">
</argument>
diff --git a/doc/classes/PhysicsDirectSpaceState3D.xml b/doc/classes/PhysicsDirectSpaceState3D.xml
index 243d071c56..a69b6f07fd 100644
--- a/doc/classes/PhysicsDirectSpaceState3D.xml
+++ b/doc/classes/PhysicsDirectSpaceState3D.xml
@@ -57,7 +57,7 @@
</argument>
<argument index="1" name="to" type="Vector3">
</argument>
- <argument index="2" name="exclude" type="Array" default="[ ]">
+ <argument index="2" name="exclude" type="Array" default="[]">
</argument>
<argument index="3" name="collision_mask" type="int" default="2147483647">
</argument>
diff --git a/doc/classes/PhysicsServer2D.xml b/doc/classes/PhysicsServer2D.xml
index 229facd08b..33cd61eb9c 100644
--- a/doc/classes/PhysicsServer2D.xml
+++ b/doc/classes/PhysicsServer2D.xml
@@ -16,7 +16,7 @@
</argument>
<argument index="1" name="shape" type="RID">
</argument>
- <argument index="2" name="transform" type="Transform2D" default="Transform2D( 1, 0, 0, 1, 0, 0 )">
+ <argument index="2" name="transform" type="Transform2D" default="Transform2D(1, 0, 0, 1, 0, 0)">
</argument>
<argument index="3" name="disabled" type="bool" default="false">
</argument>
@@ -333,7 +333,7 @@
</argument>
<argument index="1" name="force" type="Vector2">
</argument>
- <argument index="2" name="position" type="Vector2" default="Vector2( 0, 0 )">
+ <argument index="2" name="position" type="Vector2" default="Vector2(0, 0)">
</argument>
<description>
Adds a positioned force to the applied force and torque. As with [method body_apply_impulse], both the force and the offset from the body origin are in global coordinates. A force differs from an impulse in that, while the two are forces, the impulse clears itself after being applied.
@@ -346,7 +346,7 @@
</argument>
<argument index="1" name="shape" type="RID">
</argument>
- <argument index="2" name="transform" type="Transform2D" default="Transform2D( 1, 0, 0, 1, 0, 0 )">
+ <argument index="2" name="transform" type="Transform2D" default="Transform2D(1, 0, 0, 1, 0, 0)">
</argument>
<argument index="3" name="disabled" type="bool" default="false">
</argument>
@@ -381,7 +381,7 @@
</argument>
<argument index="1" name="impulse" type="Vector2">
</argument>
- <argument index="2" name="position" type="Vector2" default="Vector2( 0, 0 )">
+ <argument index="2" name="position" type="Vector2" default="Vector2(0, 0)">
</argument>
<description>
Adds a positioned impulse to the applied force and torque. Both the force and the offset from the body origin are in global coordinates.
@@ -1018,6 +1018,15 @@
Activates or deactivates the 2D physics engine.
</description>
</method>
+ <method name="set_collision_iterations">
+ <return type="void">
+ </return>
+ <argument index="0" name="iterations" type="int">
+ </argument>
+ <description>
+ Sets the amount of iterations for calculating velocities of colliding bodies. The greater the amount, the more accurate the collisions, but with a performance loss.
+ </description>
+ </method>
<method name="shape_get_data" qualifiers="const">
<return type="Variant">
</return>
@@ -1198,16 +1207,16 @@
This area replaces any gravity/damp calculated so far, but keeps calculating the rest of the areas, down to the default one.
</constant>
<constant name="BODY_MODE_STATIC" value="0" enum="BodyMode">
- Constant for static bodies.
+ Constant for static bodies. In this mode, a body can be only moved by user code.
</constant>
<constant name="BODY_MODE_KINEMATIC" value="1" enum="BodyMode">
- Constant for kinematic bodies.
+ Constant for kinematic bodies. In this mode, a body can be only moved by user code and collides with other bodies along its path.
</constant>
- <constant name="BODY_MODE_RIGID" value="2" enum="BodyMode">
- Constant for rigid bodies.
+ <constant name="BODY_MODE_DYNAMIC" value="2" enum="BodyMode">
+ Constant for dynamic bodies. In this mode, a body can be pushed by other bodies and has forces applied.
</constant>
- <constant name="BODY_MODE_CHARACTER" value="3" enum="BodyMode">
- Constant for rigid bodies in character mode. In this mode, a body can not rotate, and only its linear velocity is affected by physics.
+ <constant name="BODY_MODE_DYNAMIC_LOCKED" value="3" enum="BodyMode">
+ Constant for locked dynamic bodies. In this mode, a body is dynamic but can not rotate, and only its linear velocity is affected by external forces.
</constant>
<constant name="BODY_PARAM_BOUNCE" value="0" enum="BodyParameter">
Constant to set/get a body's bounce factor.
diff --git a/doc/classes/PhysicsServer3D.xml b/doc/classes/PhysicsServer3D.xml
index 46de9e5282..aa1f7597ea 100644
--- a/doc/classes/PhysicsServer3D.xml
+++ b/doc/classes/PhysicsServer3D.xml
@@ -16,7 +16,7 @@
</argument>
<argument index="1" name="shape" type="RID">
</argument>
- <argument index="2" name="transform" type="Transform" default="Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )">
+ <argument index="2" name="transform" type="Transform3D" default="Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)">
</argument>
<argument index="3" name="disabled" type="bool" default="false">
</argument>
@@ -92,7 +92,7 @@
</description>
</method>
<method name="area_get_shape_transform" qualifiers="const">
- <return type="Transform">
+ <return type="Transform3D">
</return>
<argument index="0" name="area" type="RID">
</argument>
@@ -121,7 +121,7 @@
</description>
</method>
<method name="area_get_transform" qualifiers="const">
- <return type="Transform">
+ <return type="Transform3D">
</return>
<argument index="0" name="area" type="RID">
</argument>
@@ -258,7 +258,7 @@
</argument>
<argument index="1" name="shape_idx" type="int">
</argument>
- <argument index="2" name="transform" type="Transform">
+ <argument index="2" name="transform" type="Transform3D">
</argument>
<description>
Sets the transform matrix for an area shape.
@@ -291,7 +291,7 @@
</return>
<argument index="0" name="area" type="RID">
</argument>
- <argument index="1" name="transform" type="Transform">
+ <argument index="1" name="transform" type="Transform3D">
</argument>
<description>
Sets the transform matrix for an area.
@@ -325,7 +325,7 @@
</argument>
<argument index="1" name="force" type="Vector3">
</argument>
- <argument index="2" name="position" type="Vector3" default="Vector3( 0, 0, 0 )">
+ <argument index="2" name="position" type="Vector3" default="Vector3(0, 0, 0)">
</argument>
<description>
</description>
@@ -337,7 +337,7 @@
</argument>
<argument index="1" name="shape" type="RID">
</argument>
- <argument index="2" name="transform" type="Transform" default="Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )">
+ <argument index="2" name="transform" type="Transform3D" default="Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)">
</argument>
<argument index="3" name="disabled" type="bool" default="false">
</argument>
@@ -372,7 +372,7 @@
</argument>
<argument index="1" name="impulse" type="Vector3">
</argument>
- <argument index="2" name="position" type="Vector3" default="Vector3( 0, 0, 0 )">
+ <argument index="2" name="position" type="Vector3" default="Vector3(0, 0, 0)">
</argument>
<description>
Gives the body a push at a [code]position[/code] in the direction of the [code]impulse[/code].
@@ -443,14 +443,6 @@
Returns the [PhysicsDirectBodyState3D] of the body.
</description>
</method>
- <method name="body_get_kinematic_safe_margin" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <description>
- </description>
- </method>
<method name="body_get_max_contacts_reported" qualifiers="const">
<return type="int">
</return>
@@ -510,7 +502,7 @@
</description>
</method>
<method name="body_get_shape_transform" qualifiers="const">
- <return type="Transform">
+ <return type="Transform3D">
</return>
<argument index="0" name="body" type="RID">
</argument>
@@ -661,16 +653,6 @@
Sets the function used to calculate physics for an object, if that object allows it (see [method body_set_omit_force_integration]).
</description>
</method>
- <method name="body_set_kinematic_safe_margin">
- <return type="void">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <argument index="1" name="margin" type="float">
- </argument>
- <description>
- </description>
- </method>
<method name="body_set_max_contacts_reported">
<return type="void">
</return>
@@ -760,7 +742,7 @@
</argument>
<argument index="1" name="shape_idx" type="int">
</argument>
- <argument index="2" name="transform" type="Transform">
+ <argument index="2" name="transform" type="Transform3D">
</argument>
<description>
Sets the transform matrix for a body shape.
@@ -1017,11 +999,11 @@
</argument>
<argument index="1" name="body_A" type="RID">
</argument>
- <argument index="2" name="local_ref_A" type="Transform">
+ <argument index="2" name="local_ref_A" type="Transform3D">
</argument>
<argument index="3" name="body_B" type="RID">
</argument>
- <argument index="4" name="local_ref_B" type="Transform">
+ <argument index="4" name="local_ref_B" type="Transform3D">
</argument>
<description>
</description>
@@ -1033,11 +1015,11 @@
</argument>
<argument index="1" name="body_A" type="RID">
</argument>
- <argument index="2" name="local_ref_A" type="Transform">
+ <argument index="2" name="local_ref_A" type="Transform3D">
</argument>
<argument index="3" name="body_B" type="RID">
</argument>
- <argument index="4" name="local_ref_B" type="Transform">
+ <argument index="4" name="local_ref_B" type="Transform3D">
</argument>
<description>
</description>
@@ -1049,11 +1031,11 @@
</argument>
<argument index="1" name="body_A" type="RID">
</argument>
- <argument index="2" name="hinge_A" type="Transform">
+ <argument index="2" name="hinge_A" type="Transform3D">
</argument>
<argument index="3" name="body_B" type="RID">
</argument>
- <argument index="4" name="hinge_B" type="Transform">
+ <argument index="4" name="hinge_B" type="Transform3D">
</argument>
<description>
</description>
@@ -1081,11 +1063,11 @@
</argument>
<argument index="1" name="body_A" type="RID">
</argument>
- <argument index="2" name="local_ref_A" type="Transform">
+ <argument index="2" name="local_ref_A" type="Transform3D">
</argument>
<argument index="3" name="body_B" type="RID">
</argument>
- <argument index="4" name="local_ref_B" type="Transform">
+ <argument index="4" name="local_ref_B" type="Transform3D">
</argument>
<description>
</description>
@@ -1595,16 +1577,16 @@
This area replaces any gravity/damp calculated so far, but keeps calculating the rest of the areas, down to the default one.
</constant>
<constant name="BODY_MODE_STATIC" value="0" enum="BodyMode">
- Constant for static bodies.
+ Constant for static bodies. In this mode, a body can be only moved by user code.
</constant>
<constant name="BODY_MODE_KINEMATIC" value="1" enum="BodyMode">
- Constant for kinematic bodies.
+ Constant for kinematic bodies. In this mode, a body can be only moved by user code and collides with other bodies along its path.
</constant>
- <constant name="BODY_MODE_RIGID" value="2" enum="BodyMode">
- Constant for rigid bodies.
+ <constant name="BODY_MODE_DYNAMIC" value="2" enum="BodyMode">
+ Constant for dynamic bodies. In this mode, a body can be pushed by other bodies and has forces applied.
</constant>
- <constant name="BODY_MODE_CHARACTER" value="3" enum="BodyMode">
- Constant for rigid bodies in character mode. In this mode, a body can not rotate, and only its linear velocity is affected by physics.
+ <constant name="BODY_MODE_DYNAMIC_LOCKED" value="3" enum="BodyMode">
+ Constant for locked dynamic bodies. In this mode, a body is dynamic but can not rotate, and only its linear velocity is affected by external forces.
</constant>
<constant name="BODY_PARAM_BOUNCE" value="0" enum="BodyParameter">
Constant to set/get a body's bounce factor.
diff --git a/doc/classes/PhysicsShapeQueryParameters2D.xml b/doc/classes/PhysicsShapeQueryParameters2D.xml
index 4d7fc61517..321a713e26 100644
--- a/doc/classes/PhysicsShapeQueryParameters2D.xml
+++ b/doc/classes/PhysicsShapeQueryParameters2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PhysicsShapeQueryParameters2D" inherits="Reference" version="4.0">
+<class name="PhysicsShapeQueryParameters2D" inherits="RefCounted" version="4.0">
<brief_description>
Parameters to be sent to a 2D shape physics query.
</brief_description>
@@ -20,13 +20,13 @@
<member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer" default="2147483647">
The physics layer(s) the query will take into account (as a bitmask). See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
</member>
- <member name="exclude" type="Array" setter="set_exclude" getter="get_exclude" default="[ ]">
+ <member name="exclude" type="Array" setter="set_exclude" getter="get_exclude" default="[]">
The list of objects or object [RID]s that will be excluded from collisions.
</member>
<member name="margin" type="float" setter="set_margin" getter="get_margin" default="0.0">
The collision margin for the shape.
</member>
- <member name="motion" type="Vector2" setter="set_motion" getter="get_motion" default="Vector2( 0, 0 )">
+ <member name="motion" type="Vector2" setter="set_motion" getter="get_motion" default="Vector2(0, 0)">
The motion of the shape being queried for.
</member>
<member name="shape" type="Resource" setter="set_shape" getter="get_shape">
@@ -63,7 +63,7 @@
[/csharp]
[/codeblocks]
</member>
- <member name="transform" type="Transform2D" setter="set_transform" getter="get_transform" default="Transform2D( 1, 0, 0, 1, 0, 0 )">
+ <member name="transform" type="Transform2D" setter="set_transform" getter="get_transform" default="Transform2D(1, 0, 0, 1, 0, 0)">
The queried shape's transform matrix.
</member>
</members>
diff --git a/doc/classes/PhysicsShapeQueryParameters3D.xml b/doc/classes/PhysicsShapeQueryParameters3D.xml
index 4b43ea66fc..52916a8418 100644
--- a/doc/classes/PhysicsShapeQueryParameters3D.xml
+++ b/doc/classes/PhysicsShapeQueryParameters3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PhysicsShapeQueryParameters3D" inherits="Reference" version="4.0">
+<class name="PhysicsShapeQueryParameters3D" inherits="RefCounted" version="4.0">
<brief_description>
Parameters to be sent to a 3D shape physics query.
</brief_description>
@@ -20,7 +20,7 @@
<member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="2147483647">
The physics layer(s) the query will take into account (as a bitmask). See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
</member>
- <member name="exclude" type="Array" setter="set_exclude" getter="get_exclude" default="[ ]">
+ <member name="exclude" type="Array" setter="set_exclude" getter="get_exclude" default="[]">
The list of objects or object [RID]s that will be excluded from collisions.
</member>
<member name="margin" type="float" setter="set_margin" getter="get_margin" default="0.0">
@@ -60,7 +60,7 @@
[/csharp]
[/codeblocks]
</member>
- <member name="transform" type="Transform" setter="set_transform" getter="get_transform" default="Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )">
+ <member name="transform" type="Transform3D" setter="set_transform" getter="get_transform" default="Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)">
The queried shape's transform matrix.
</member>
</members>
diff --git a/doc/classes/PhysicsShapeQueryResult2D.xml b/doc/classes/PhysicsShapeQueryResult2D.xml
index 227683cc33..07b7bc90e2 100644
--- a/doc/classes/PhysicsShapeQueryResult2D.xml
+++ b/doc/classes/PhysicsShapeQueryResult2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PhysicsShapeQueryResult2D" inherits="Reference" version="4.0">
+<class name="PhysicsShapeQueryResult2D" inherits="RefCounted" version="4.0">
<brief_description>
Result of a 2D shape query in [PhysicsServer2D].
</brief_description>
diff --git a/doc/classes/PhysicsShapeQueryResult3D.xml b/doc/classes/PhysicsShapeQueryResult3D.xml
index 4555c4e242..d0ca227a68 100644
--- a/doc/classes/PhysicsShapeQueryResult3D.xml
+++ b/doc/classes/PhysicsShapeQueryResult3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PhysicsShapeQueryResult3D" inherits="Reference" version="4.0">
+<class name="PhysicsShapeQueryResult3D" inherits="RefCounted" version="4.0">
<brief_description>
Result of a 3D shape query in [PhysicsServer3D].
</brief_description>
diff --git a/doc/classes/PhysicsTestMotionResult2D.xml b/doc/classes/PhysicsTestMotionResult2D.xml
index 301cff2885..da04ffa86a 100644
--- a/doc/classes/PhysicsTestMotionResult2D.xml
+++ b/doc/classes/PhysicsTestMotionResult2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PhysicsTestMotionResult2D" inherits="Reference" version="4.0">
+<class name="PhysicsTestMotionResult2D" inherits="RefCounted" version="4.0">
<brief_description>
</brief_description>
<description>
@@ -17,15 +17,15 @@
</member>
<member name="collider_shape" type="int" setter="" getter="get_collider_shape" default="0">
</member>
- <member name="collider_velocity" type="Vector2" setter="" getter="get_collider_velocity" default="Vector2( 0, 0 )">
+ <member name="collider_velocity" type="Vector2" setter="" getter="get_collider_velocity" default="Vector2(0, 0)">
</member>
- <member name="collision_normal" type="Vector2" setter="" getter="get_collision_normal" default="Vector2( 0, 0 )">
+ <member name="collision_normal" type="Vector2" setter="" getter="get_collision_normal" default="Vector2(0, 0)">
</member>
- <member name="collision_point" type="Vector2" setter="" getter="get_collision_point" default="Vector2( 0, 0 )">
+ <member name="collision_point" type="Vector2" setter="" getter="get_collision_point" default="Vector2(0, 0)">
</member>
- <member name="motion" type="Vector2" setter="" getter="get_motion" default="Vector2( 0, 0 )">
+ <member name="motion" type="Vector2" setter="" getter="get_motion" default="Vector2(0, 0)">
</member>
- <member name="motion_remainder" type="Vector2" setter="" getter="get_motion_remainder" default="Vector2( 0, 0 )">
+ <member name="motion_remainder" type="Vector2" setter="" getter="get_motion_remainder" default="Vector2(0, 0)">
</member>
</members>
<constants>
diff --git a/doc/classes/PinJoint2D.xml b/doc/classes/PinJoint2D.xml
index 42155a7f25..ed45149cdf 100644
--- a/doc/classes/PinJoint2D.xml
+++ b/doc/classes/PinJoint2D.xml
@@ -4,7 +4,7 @@
Pin joint for 2D shapes.
</brief_description>
<description>
- Pin joint for 2D rigid bodies. It pins two bodies (rigid or static) together.
+ Pin joint for 2D rigid bodies. It pins two bodies (dynamic or static) together.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/PinJoint3D.xml b/doc/classes/PinJoint3D.xml
index 267ea38873..37a85e497f 100644
--- a/doc/classes/PinJoint3D.xml
+++ b/doc/classes/PinJoint3D.xml
@@ -4,7 +4,7 @@
Pin joint for 3D PhysicsBodies.
</brief_description>
<description>
- Pin joint for 3D rigid bodies. It pins 2 bodies (rigid or static) together. See also [Generic6DOFJoint3D].
+ Pin joint for 3D rigid bodies. It pins 2 bodies (dynamic or static) together. See also [Generic6DOFJoint3D].
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/Plane.xml b/doc/classes/Plane.xml
index 2342f00631..cca5793fc7 100644
--- a/doc/classes/Plane.xml
+++ b/doc/classes/Plane.xml
@@ -204,7 +204,7 @@
The distance from the origin to the plane, in the direction of [member normal]. This value is typically non-negative.
In the scalar equation of the plane [code]ax + by + cz = d[/code], this is [code]d[/code], while the [code](a, b, c)[/code] coordinates are represented by the [member normal] property.
</member>
- <member name="normal" type="Vector3" setter="" getter="" default="Vector3( 0, 0, 0 )">
+ <member name="normal" type="Vector3" setter="" getter="" default="Vector3(0, 0, 0)">
The normal of the plane, which must be normalized.
In the scalar equation of the plane [code]ax + by + cz = d[/code], this is the vector [code](a, b, c)[/code], where [code]d[/code] is the [member d] property.
</member>
@@ -219,13 +219,13 @@
</member>
</members>
<constants>
- <constant name="PLANE_YZ" value="Plane( 1, 0, 0, 0 )">
+ <constant name="PLANE_YZ" value="Plane(1, 0, 0, 0)">
A plane that extends in the Y and Z axes (normal vector points +X).
</constant>
- <constant name="PLANE_XZ" value="Plane( 0, 1, 0, 0 )">
+ <constant name="PLANE_XZ" value="Plane(0, 1, 0, 0)">
A plane that extends in the X and Z axes (normal vector points +Y).
</constant>
- <constant name="PLANE_XY" value="Plane( 0, 0, 1, 0 )">
+ <constant name="PLANE_XY" value="Plane(0, 0, 1, 0)">
A plane that extends in the X and Y axes (normal vector points +Z).
</constant>
</constants>
diff --git a/doc/classes/PlaneMesh.xml b/doc/classes/PlaneMesh.xml
index 333d687e91..c95ba29ea2 100644
--- a/doc/classes/PlaneMesh.xml
+++ b/doc/classes/PlaneMesh.xml
@@ -12,7 +12,7 @@
<methods>
</methods>
<members>
- <member name="size" type="Vector2" setter="set_size" getter="get_size" default="Vector2( 2, 2 )">
+ <member name="size" type="Vector2" setter="set_size" getter="get_size" default="Vector2(2, 2)">
Size of the generated plane.
</member>
<member name="subdivide_depth" type="int" setter="set_subdivide_depth" getter="get_subdivide_depth" default="0">
diff --git a/doc/classes/PointLight2D.xml b/doc/classes/PointLight2D.xml
index 9337bc8351..a7207a3c80 100644
--- a/doc/classes/PointLight2D.xml
+++ b/doc/classes/PointLight2D.xml
@@ -12,7 +12,7 @@
<member name="height" type="float" setter="set_height" getter="get_height" default="0.0">
The height of the light. Used with 2D normal mapping.
</member>
- <member name="offset" type="Vector2" setter="set_texture_offset" getter="get_texture_offset" default="Vector2( 0, 0 )">
+ <member name="offset" type="Vector2" setter="set_texture_offset" getter="get_texture_offset" default="Vector2(0, 0)">
The offset of the light's [member texture].
</member>
<member name="texture" type="Texture2D" setter="set_texture" getter="get_texture">
diff --git a/doc/classes/Polygon2D.xml b/doc/classes/Polygon2D.xml
index 3aca83658d..c33a1424a7 100644
--- a/doc/classes/Polygon2D.xml
+++ b/doc/classes/Polygon2D.xml
@@ -88,9 +88,9 @@
<member name="antialiased" type="bool" setter="set_antialiased" getter="get_antialiased" default="false">
If [code]true[/code], polygon edges will be anti-aliased.
</member>
- <member name="bones" type="Array" setter="_set_bones" getter="_get_bones" default="[ ]">
+ <member name="bones" type="Array" setter="_set_bones" getter="_get_bones" default="[]">
</member>
- <member name="color" type="Color" setter="set_color" getter="get_color" default="Color( 1, 1, 1, 1 )">
+ <member name="color" type="Color" setter="set_color" getter="get_color" default="Color(1, 1, 1, 1)">
The polygon's fill color. If [code]texture[/code] is defined, it will be multiplied by this color. It will also be the default color for vertices not set in [code]vertex_colors[/code].
</member>
<member name="internal_vertex_count" type="int" setter="set_internal_vertex_count" getter="get_internal_vertex_count" default="0">
@@ -101,21 +101,21 @@
<member name="invert_enable" type="bool" setter="set_invert" getter="get_invert" default="false">
If [code]true[/code], polygon will be inverted, containing the area outside the defined points and extending to the [code]invert_border[/code].
</member>
- <member name="offset" type="Vector2" setter="set_offset" getter="get_offset" default="Vector2( 0, 0 )">
+ <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="PackedVector2Array" setter="set_polygon" getter="get_polygon" default="PackedVector2Array( )">
+ <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 [PackedVector2Array] rather than a reference.
</member>
- <member name="polygons" type="Array" setter="set_polygons" getter="get_polygons" default="[ ]">
+ <member name="polygons" type="Array" setter="set_polygons" getter="get_polygons" default="[]">
</member>
<member name="skeleton" type="NodePath" setter="set_skeleton" getter="get_skeleton" default="NodePath(&quot;&quot;)">
</member>
<member name="texture" type="Texture2D" setter="set_texture" getter="get_texture">
The polygon's fill texture. Use [code]uv[/code] to set texture coordinates.
</member>
- <member name="texture_offset" type="Vector2" setter="set_texture_offset" getter="get_texture_offset" default="Vector2( 0, 0 )">
+ <member name="texture_offset" type="Vector2" setter="set_texture_offset" getter="get_texture_offset" default="Vector2(0, 0)">
Amount to offset the polygon's [code]texture[/code]. If [code](0, 0)[/code] the texture's origin (its top-left corner) will be placed at the polygon's [code]position[/code].
</member>
<member name="texture_rotation" type="float" setter="set_texture_rotation" getter="get_texture_rotation">
@@ -124,13 +124,13 @@
<member name="texture_rotation_degrees" type="float" setter="set_texture_rotation_degrees" getter="get_texture_rotation_degrees" default="0.0">
The texture's rotation in degrees.
</member>
- <member name="texture_scale" type="Vector2" setter="set_texture_scale" getter="get_texture_scale" default="Vector2( 1, 1 )">
+ <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="PackedVector2Array" setter="set_uv" getter="get_uv" default="PackedVector2Array( )">
+ <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="PackedColorArray" setter="set_vertex_colors" getter="get_vertex_colors" default="PackedColorArray( )">
+ <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/PopupMenu.xml b/doc/classes/PopupMenu.xml
index 418785222e..e448d18d73 100644
--- a/doc/classes/PopupMenu.xml
+++ b/doc/classes/PopupMenu.xml
@@ -717,22 +717,22 @@
<theme_item name="font" type="Font">
[Font] used for the menu items.
</theme_item>
- <theme_item name="font_accelerator_color" type="Color" default="Color( 0.7, 0.7, 0.7, 0.8 )">
+ <theme_item name="font_accelerator_color" type="Color" default="Color(0.7, 0.7, 0.7, 0.8)">
The text [Color] used for shortcuts and accelerators that show next to the menu item name when defined. See [method get_item_accelerator] for more info on accelerators.
</theme_item>
- <theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )">
+ <theme_item name="font_color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
The default text [Color] for menu items' names.
</theme_item>
- <theme_item name="font_disabled_color" type="Color" default="Color( 0.4, 0.4, 0.4, 0.8 )">
+ <theme_item name="font_disabled_color" type="Color" default="Color(0.4, 0.4, 0.4, 0.8)">
[Color] used for disabled menu items' text.
</theme_item>
- <theme_item name="font_hover_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )">
+ <theme_item name="font_hover_color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
[Color] used for the hovered text.
</theme_item>
- <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ <theme_item name="font_outline_color" type="Color" default="Color(1, 1, 1, 1)">
The tint of text outline of the menu item.
</theme_item>
- <theme_item name="font_separator_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )">
+ <theme_item name="font_separator_color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
[Color] used for labeled separators' text. See [method add_separator].
</theme_item>
<theme_item name="font_size" type="int">
diff --git a/doc/classes/PrimitiveMesh.xml b/doc/classes/PrimitiveMesh.xml
index 8b73bcb9c1..ca41c367c8 100644
--- a/doc/classes/PrimitiveMesh.xml
+++ b/doc/classes/PrimitiveMesh.xml
@@ -30,8 +30,8 @@
</method>
</methods>
<members>
- <member name="custom_aabb" type="AABB" setter="set_custom_aabb" getter="get_custom_aabb" default="AABB( 0, 0, 0, 0, 0, 0 )">
- Overrides the [AABB] with one defined by user for use with frustum culling. Especially useful to avoid unexpected culling when using a shader to offset vertices.
+ <member name="custom_aabb" type="AABB" setter="set_custom_aabb" getter="get_custom_aabb" default="AABB(0, 0, 0, 0, 0, 0)">
+ Overrides the [AABB] with one defined by user for use with frustum culling. Especially useful to avoid unexpected culling when using a shader to offset vertices.
</member>
<member name="flip_faces" type="bool" setter="set_flip_faces" getter="get_flip_faces" default="false">
If set, the order of the vertices in each triangle are reversed resulting in the backside of the mesh being drawn.
diff --git a/doc/classes/PrismMesh.xml b/doc/classes/PrismMesh.xml
index b2e1fdd3f0..0e66281fd1 100644
--- a/doc/classes/PrismMesh.xml
+++ b/doc/classes/PrismMesh.xml
@@ -14,7 +14,7 @@
<member name="left_to_right" type="float" setter="set_left_to_right" getter="get_left_to_right" default="0.5">
Displacement of the upper edge along the X axis. 0.0 positions edge straight above the bottom-left edge.
</member>
- <member name="size" type="Vector3" setter="set_size" getter="get_size" default="Vector3( 2, 2, 2 )">
+ <member name="size" type="Vector3" setter="set_size" getter="get_size" default="Vector3(2, 2, 2)">
Size of the prism.
</member>
<member name="subdivide_depth" type="int" setter="set_subdivide_depth" getter="get_subdivide_depth" default="0">
diff --git a/doc/classes/ProceduralSkyMaterial.xml b/doc/classes/ProceduralSkyMaterial.xml
index d3e1dbca27..c598a2c266 100644
--- a/doc/classes/ProceduralSkyMaterial.xml
+++ b/doc/classes/ProceduralSkyMaterial.xml
@@ -13,7 +13,7 @@
<methods>
</methods>
<members>
- <member name="ground_bottom_color" type="Color" setter="set_ground_bottom_color" getter="get_ground_bottom_color" default="Color( 0.12, 0.12, 0.13, 1 )">
+ <member name="ground_bottom_color" type="Color" setter="set_ground_bottom_color" getter="get_ground_bottom_color" default="Color(0.12, 0.12, 0.13, 1)">
Color of the ground at the bottom. Blends with [member ground_horizon_color].
</member>
<member name="ground_curve" type="float" setter="set_ground_curve" getter="get_ground_curve" default="0.02">
@@ -22,7 +22,7 @@
<member name="ground_energy" type="float" setter="set_ground_energy" getter="get_ground_energy" default="1.0">
Amount of energy contribution from the ground.
</member>
- <member name="ground_horizon_color" type="Color" setter="set_ground_horizon_color" getter="get_ground_horizon_color" default="Color( 0.37, 0.33, 0.31, 1 )">
+ <member name="ground_horizon_color" type="Color" setter="set_ground_horizon_color" getter="get_ground_horizon_color" default="Color(0.37, 0.33, 0.31, 1)">
Color of the ground at the horizon. Blends with [member ground_bottom_color].
</member>
<member name="sky_curve" type="float" setter="set_sky_curve" getter="get_sky_curve" default="0.09">
@@ -31,10 +31,10 @@
<member name="sky_energy" type="float" setter="set_sky_energy" getter="get_sky_energy" default="1.0">
Amount of energy contribution from the sky.
</member>
- <member name="sky_horizon_color" type="Color" setter="set_sky_horizon_color" getter="get_sky_horizon_color" default="Color( 0.55, 0.69, 0.81, 1 )">
+ <member name="sky_horizon_color" type="Color" setter="set_sky_horizon_color" getter="get_sky_horizon_color" default="Color(0.55, 0.69, 0.81, 1)">
Color of the sky at the horizon. Blends with [member sky_top_color].
</member>
- <member name="sky_top_color" type="Color" setter="set_sky_top_color" getter="get_sky_top_color" default="Color( 0.35, 0.46, 0.71, 1 )">
+ <member name="sky_top_color" type="Color" setter="set_sky_top_color" getter="get_sky_top_color" default="Color(0.35, 0.46, 0.71, 1)">
Color of the sky at the top. Blends with [member sky_horizon_color].
</member>
<member name="sun_angle_max" type="float" setter="set_sun_angle_max" getter="get_sun_angle_max" default="100.0">
diff --git a/doc/classes/ProgressBar.xml b/doc/classes/ProgressBar.xml
index 160b61c720..c33f6f636d 100644
--- a/doc/classes/ProgressBar.xml
+++ b/doc/classes/ProgressBar.xml
@@ -29,13 +29,13 @@
<theme_item name="font" type="Font">
Font used to draw the fill percentage if [member percent_visible] is [code]true[/code].
</theme_item>
- <theme_item name="font_color" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )">
+ <theme_item name="font_color" type="Color" default="Color(0.94, 0.94, 0.94, 1)">
The color of the text.
</theme_item>
- <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ <theme_item name="font_outline_color" type="Color" default="Color(1, 1, 1, 1)">
The tint of text outline of the [ProgressBar].
</theme_item>
- <theme_item name="font_shadow_color" type="Color" default="Color( 0, 0, 0, 1 )">
+ <theme_item name="font_shadow_color" type="Color" default="Color(0, 0, 0, 1)">
The color of the text's shadow.
</theme_item>
<theme_item name="font_size" type="int">
diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml
index fa28eaa526..336f1877db 100644
--- a/doc/classes/ProjectSettings.xml
+++ b/doc/classes/ProjectSettings.xml
@@ -6,7 +6,7 @@
<description>
Contains global variables accessible from everywhere. Use [method get_setting], [method set_setting] or [method has_setting] to access them. Variables stored in [code]project.godot[/code] are also loaded into ProjectSettings, making this object very useful for reading custom game configuration options.
When naming a Project Settings property, use the full path to the setting including the category. For example, [code]"application/config/name"[/code] for the project name. Category and property names can be viewed in the Project Settings dialog.
- [b]Feature tags:[/b] Project settings can be overriden for specific platforms and configurations (debug, release, ...) using [url=https://docs.godotengine.org/en/latest/tutorials/export/feature_tags.html]feature tags[/url].
+ [b]Feature tags:[/b] Project settings can be overridden for specific platforms and configurations (debug, release, ...) using [url=https://docs.godotengine.org/en/latest/tutorials/export/feature_tags.html]feature tags[/url].
[b]Overriding:[/b] Any project setting can be overridden by creating a file named [code]override.cfg[/code] in the project's root directory. This can also be used in exported projects by placing this file in the same directory as the project binary. Overriding will still take the base project settings' [url=https://docs.godotengine.org/en/latest/tutorials/export/feature_tags.html]feature tags[/url] in account. Therefore, make sure to [i]also[/i] override the setting with the desired feature tags if you want them to override base project settings on all platforms and configurations.
</description>
<tutorials>
@@ -226,7 +226,7 @@
</method>
</methods>
<members>
- <member name="application/boot_splash/bg_color" type="Color" setter="" getter="" default="Color( 0.14, 0.14, 0.14, 1 )">
+ <member name="application/boot_splash/bg_color" type="Color" setter="" getter="" default="Color(0.14, 0.14, 0.14, 1)">
Background color for the boot splash.
</member>
<member name="application/boot_splash/fullsize" type="bool" setter="" getter="" default="true">
@@ -309,7 +309,7 @@
If [code]true[/code], microphone input will be allowed. This requires appropriate permissions to be set when exporting to Android or iOS.
</member>
<member name="audio/driver/mix_rate" type="int" setter="" getter="" default="44100">
- Mixing rate used for audio. In general, it's better to not touch this and leave it to the host operating system.
+ The mixing rate used for audio (in Hz). In general, it's better to not touch this and leave it to the host operating system.
</member>
<member name="audio/driver/output_latency" type="int" setter="" getter="" default="15">
Output latency in milliseconds for audio. Lower values will result in lower audio latency at the cost of increased CPU usage. Low values may result in audible cracking on slower hardware.
@@ -461,7 +461,7 @@
<member name="debug/settings/visual_script/max_call_stack" type="int" setter="" getter="" default="1024">
Maximum call stack in visual scripting, to avoid infinite recursion.
</member>
- <member name="debug/shapes/collision/contact_color" type="Color" setter="" getter="" default="Color( 1, 0.2, 0.1, 0.8 )">
+ <member name="debug/shapes/collision/contact_color" type="Color" setter="" getter="" default="Color(1, 0.2, 0.1, 0.8)">
Color of the contact points between collision shapes, visible when "Visible Collision Shapes" is enabled in the Debug menu.
</member>
<member name="debug/shapes/collision/draw_2d_outlines" type="bool" setter="" getter="" default="true">
@@ -470,22 +470,22 @@
<member name="debug/shapes/collision/max_contacts_displayed" type="int" setter="" getter="" default="10000">
Maximum number of contact points between collision shapes to display when "Visible Collision Shapes" is enabled in the Debug menu.
</member>
- <member name="debug/shapes/collision/shape_color" type="Color" setter="" getter="" default="Color( 0, 0.6, 0.7, 0.42 )">
+ <member name="debug/shapes/collision/shape_color" type="Color" setter="" getter="" default="Color(0, 0.6, 0.7, 0.42)">
Color of the collision shapes, visible when "Visible Collision Shapes" is enabled in the Debug menu.
</member>
- <member name="debug/shapes/navigation/disabled_geometry_color" type="Color" setter="" getter="" default="Color( 1, 0.7, 0.1, 0.4 )">
+ <member name="debug/shapes/navigation/disabled_geometry_color" type="Color" setter="" getter="" default="Color(1, 0.7, 0.1, 0.4)">
Color of the disabled navigation geometry, visible when "Visible Navigation" is enabled in the Debug menu.
</member>
- <member name="debug/shapes/navigation/geometry_color" type="Color" setter="" getter="" default="Color( 0.1, 1, 0.7, 0.4 )">
+ <member name="debug/shapes/navigation/geometry_color" type="Color" setter="" getter="" default="Color(0.1, 1, 0.7, 0.4)">
Color of the navigation geometry, visible when "Visible Navigation" is enabled in the Debug menu.
</member>
<member name="display/mouse_cursor/custom_image" type="String" setter="" getter="" default="&quot;&quot;">
Custom image for the mouse cursor (limited to 256×256).
</member>
- <member name="display/mouse_cursor/custom_image_hotspot" type="Vector2" setter="" getter="" default="Vector2( 0, 0 )">
+ <member name="display/mouse_cursor/custom_image_hotspot" type="Vector2" setter="" getter="" default="Vector2(0, 0)">
Hotspot for the custom mouse cursor image.
</member>
- <member name="display/mouse_cursor/tooltip_position_offset" type="Vector2" setter="" getter="" default="Vector2( 10, 10 )">
+ <member name="display/mouse_cursor/tooltip_position_offset" type="Vector2" setter="" getter="" default="Vector2(10, 10)">
Position offset for tooltips, relative to the mouse cursor's hotspot.
</member>
<member name="display/window/dpi/allow_hidpi" type="bool" setter="" getter="" default="false">
@@ -494,8 +494,9 @@
<member name="display/window/energy_saving/keep_screen_on" type="bool" setter="" getter="" default="true">
If [code]true[/code], keeps the screen on (even in case of inactivity), so the screensaver does not take over. Works on desktop and mobile platforms.
</member>
- <member name="display/window/handheld/orientation" type="String" setter="" getter="" default="&quot;landscape&quot;">
- Default orientation on mobile devices.
+ <member name="display/window/handheld/orientation" type="int" setter="" getter="" default="0">
+ The default screen orientation to use on mobile devices. See [enum DisplayServer.ScreenOrientation] for possible values.
+ [b]Note:[/b] When set to a portrait orientation, this project setting does not flip the project resolution's width and height automatically. Instead, you have to set [member display/window/size/width] and [member display/window/size/height] accordingly.
</member>
<member name="display/window/ios/hide_home_indicator" type="bool" setter="" getter="" default="true">
If [code]true[/code], the home indicator is hidden automatically. This only affects iOS devices without a physical home button.
@@ -542,7 +543,15 @@
<member name="editor/node_naming/name_num_separator" type="int" setter="" getter="" default="0">
What to use to separate node name from number. This is mostly an editor setting.
</member>
- <member name="editor/script/search_in_file_extensions" type="PackedStringArray" setter="" getter="" default="PackedStringArray( &quot;gd&quot;, &quot;shader&quot; )">
+ <member name="editor/run/main_run_args" type="String" setter="" getter="" default="&quot;&quot;">
+ The command-line arguments to append to Godot's own command line when running the project. This doesn't affect the editor itself.
+ It is possible to make another executable run Godot by using the [code]%command%[/code] placeholder. The placeholder will be replaced with Godot's own command line. Program-specific arguments should be placed [i]before[/i] the placeholder, whereas Godot-specific arguments should be placed [i]after[/i] the placeholder.
+ For example, this can be used to force the project to run on the dedicated GPU in a NVIDIA Optimus system on Linux:
+ [codeblock]
+ prime-run %command%
+ [/codeblock]
+ </member>
+ <member name="editor/script/search_in_file_extensions" type="PackedStringArray" setter="" getter="" default="PackedStringArray(&quot;gd&quot;, &quot;gdshader&quot;)">
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="editor/script/templates_search_path" type="String" setter="" getter="" default="&quot;res://script_templates&quot;">
@@ -694,6 +703,8 @@
</member>
<member name="input/ui_text_completion_query" type="Dictionary" setter="" getter="">
</member>
+ <member name="input/ui_text_completion_replace" type="Dictionary" setter="" getter="">
+ </member>
<member name="input/ui_text_dedent" type="Dictionary" setter="" getter="">
</member>
<member name="input/ui_text_delete" type="Dictionary" setter="" getter="">
@@ -724,6 +735,12 @@
</member>
<member name="input/ui_text_select_all" type="Dictionary" setter="" getter="">
</member>
+ <member name="input/ui_text_select_word_under_caret" type="Dictionary" setter="" getter="">
+ If no selection is currently active, selects the word currently under the caret in text fields. If a selection is currently active, deselects the current selection.
+ [b]Note:[/b] Currently, this is only implemented in [TextEdit], not [LineEdit].
+ </member>
+ <member name="input/ui_text_submit" type="Dictionary" setter="" getter="">
+ </member>
<member name="input/ui_text_toggle_insert_mode" type="Dictionary" setter="" getter="">
</member>
<member name="input/ui_undo" type="Dictionary" setter="" getter="">
@@ -1124,8 +1141,6 @@
<member name="layer_names/3d_render/layer_9" type="String" setter="" getter="" default="&quot;&quot;">
Optional name for the 3D render layer 9. If left empty, the layer will display as "Layer 9".
</member>
- <member name="memory/limits/command_queue/multithreading_queue_size_kb" type="int" setter="" getter="" default="256">
- </member>
<member name="memory/limits/message_queue/max_size_kb" type="int" setter="" getter="" default="4096">
Godot uses a message queue to defer some function calls. If you run out of space on it (you will see an error), you can increase the size here.
</member>
@@ -1189,31 +1204,25 @@
The CA certificates bundle to use for SSL connections. If this is set to a non-empty value, this will [i]override[/i] Godot's default [url=https://github.com/godotengine/godot/blob/master/thirdparty/certs/ca-certificates.crt]Mozilla certificate bundle[/url]. If left empty, the default certificate bundle will be used.
If in doubt, leave this setting empty.
</member>
- <member name="physics/2d/bp_hash_table_size" type="int" setter="" getter="" default="4096">
- Size of the hash table used for the broad-phase 2D hash grid algorithm.
- </member>
- <member name="physics/2d/cell_size" type="int" setter="" getter="" default="128">
- Cell size used for the broad-phase 2D hash grid algorithm (in pixels).
- </member>
<member name="physics/2d/default_angular_damp" type="float" setter="" getter="" default="1.0">
The default angular damp in 2D.
[b]Note:[/b] Good values are in the range [code]0[/code] to [code]1[/code]. At value [code]0[/code] objects will keep moving with the same velocity. Values greater than [code]1[/code] will aim to reduce the velocity to [code]0[/code] in less than a second e.g. a value of [code]2[/code] will aim to reduce the velocity to [code]0[/code] in half a second. A value equal to or greater than the physics frame rate ([member ProjectSettings.physics/common/physics_fps], [code]60[/code] by default) will bring the object to a stop in one iteration.
</member>
- <member name="physics/2d/default_gravity" type="int" setter="" getter="" default="98">
- The default gravity strength in 2D.
+ <member name="physics/2d/default_gravity" type="float" setter="" getter="" default="980.0">
+ The default gravity strength in 2D (in pixels per second squared).
[b]Note:[/b] This property is only read when the project starts. To change the default gravity at runtime, use the following code sample:
[codeblocks]
[gdscript]
- # Set the default gravity strength to 98.
- PhysicsServer2D.area_set_param(get_viewport().find_world_2d().space, PhysicsServer2D.AREA_PARAM_GRAVITY, 98)
+ # Set the default gravity strength to 980.
+ PhysicsServer2D.area_set_param(get_viewport().find_world_2d().space, PhysicsServer2D.AREA_PARAM_GRAVITY, 980)
[/gdscript]
[csharp]
- // Set the default gravity strength to 98.
- PhysicsServer2D.AreaSetParam(GetViewport().FindWorld2d().Space, PhysicsServer2D.AreaParameter.Gravity, 98);
+ // Set the default gravity strength to 980.
+ PhysicsServer2D.AreaSetParam(GetViewport().FindWorld2d().Space, PhysicsServer2D.AreaParameter.Gravity, 980);
[/csharp]
[/codeblocks]
</member>
- <member name="physics/2d/default_gravity_vector" type="Vector2" setter="" getter="" default="Vector2( 0, 1 )">
+ <member name="physics/2d/default_gravity_vector" type="Vector2" setter="" getter="" default="Vector2(0, 1)">
The default gravity direction in 2D.
[b]Note:[/b] This property is only read when the project starts. To change the default gravity vector at runtime, use the following code sample:
[codeblocks]
@@ -1231,9 +1240,6 @@
The default linear damp in 2D.
[b]Note:[/b] Good values are in the range [code]0[/code] to [code]1[/code]. At value [code]0[/code] objects will keep moving with the same velocity. Values greater than [code]1[/code] will aim to reduce the velocity to [code]0[/code] in less than a second e.g. a value of [code]2[/code] will aim to reduce the velocity to [code]0[/code] in half a second. A value equal to or greater than the physics frame rate ([member ProjectSettings.physics/common/physics_fps], [code]60[/code] by default) will bring the object to a stop in one iteration.
</member>
- <member name="physics/2d/large_object_surface_threshold_in_cells" type="int" setter="" getter="" default="512">
- Threshold defining the surface size that constitutes a large object with regard to cells in the broad-phase 2D hash grid algorithm.
- </member>
<member name="physics/2d/physics_engine" type="String" setter="" getter="" default="&quot;DEFAULT&quot;">
Sets which physics engine to use for 2D physics.
"DEFAULT" and "GodotPhysics2D" are the same, as there is currently no alternative 2D physics server implemented.
@@ -1255,7 +1261,7 @@
[b]Note:[/b] Good values are in the range [code]0[/code] to [code]1[/code]. At value [code]0[/code] objects will keep moving with the same velocity. Values greater than [code]1[/code] will aim to reduce the velocity to [code]0[/code] in less than a second e.g. a value of [code]2[/code] will aim to reduce the velocity to [code]0[/code] in half a second. A value equal to or greater than the physics frame rate ([member ProjectSettings.physics/common/physics_fps], [code]60[/code] by default) will bring the object to a stop in one iteration.
</member>
<member name="physics/3d/default_gravity" type="float" setter="" getter="" default="9.8">
- The default gravity strength in 3D.
+ The default gravity strength in 3D (in meters per second squared).
[b]Note:[/b] This property is only read when the project starts. To change the default gravity at runtime, use the following code sample:
[codeblocks]
[gdscript]
@@ -1268,7 +1274,7 @@
[/csharp]
[/codeblocks]
</member>
- <member name="physics/3d/default_gravity_vector" type="Vector3" setter="" getter="" default="Vector3( 0, -1, 0 )">
+ <member name="physics/3d/default_gravity_vector" type="Vector3" setter="" getter="" default="Vector3(0, -1, 0)">
The default gravity direction in 3D.
[b]Note:[/b] This property is only read when the project starts. To change the default gravity vector at runtime, use the following code sample:
[codeblocks]
@@ -1307,7 +1313,8 @@
[b]Note:[/b] This property is only read when the project starts. To change the physics FPS at runtime, set [member Engine.iterations_per_second] instead.
</member>
<member name="physics/common/physics_jitter_fix" type="float" setter="" getter="" default="0.5">
- Fix to improve physics jitter, specially on monitors where refresh rate is different than the physics FPS.
+ Controls how much physics ticks are synchronized with real time. For 0 or less, the ticks are synchronized. Such values are recommended for network games, where clock synchronization matters. Higher values cause higher deviation of in-game clock and real clock, but allows smoothing out framerate jitters. The default value of 0.5 should be fine for most; values above 2 could cause the game to react to dropped frames with a noticeable delay and are not recommended.
+ [b]Note:[/b] For best results, when using a custom physics interpolation solution, the physics jitter fix should be disabled by setting [member physics/common/physics_jitter_fix] to [code]0[/code].
[b]Note:[/b] This property is only read when the project starts. To change the physics FPS at runtime, set [member Engine.physics_jitter_fix] instead.
</member>
<member name="rendering/2d/sdf/oversize" type="int" setter="" getter="" default="1">
@@ -1356,14 +1363,10 @@
[b]FIXME:[/b] No longer valid after DisplayServer split:
In such cases, this property is not updated, so use [code]OS.get_current_video_driver[/code] to query it at run-time.
</member>
- <member name="rendering/driver/rd_renderer/use_low_end_renderer" type="bool" setter="" getter="" default="false">
- </member>
- <member name="rendering/driver/rd_renderer/use_low_end_renderer.mobile" type="bool" setter="" getter="" default="true">
- </member>
<member name="rendering/driver/threads/thread_model" type="int" setter="" getter="" default="1">
Thread model for rendering. Rendering on a thread can vastly improve performance, but synchronizing to the main thread can cause a bit more jitter.
</member>
- <member name="rendering/environment/defaults/default_clear_color" type="Color" setter="" getter="" default="Color( 0.3, 0.3, 0.3, 1 )">
+ <member name="rendering/environment/defaults/default_clear_color" type="Color" setter="" getter="" default="Color(0.3, 0.3, 0.3, 1)">
Default background clear color. Overridable per [Viewport] using its [Environment]. See [member Environment.background_mode] and [member Environment.background_color] in particular. To change this default color programmatically, use [method RenderingServer.set_default_clear_color].
</member>
<member name="rendering/environment/defaults/default_environment" type="String" setter="" getter="" default="&quot;&quot;">
@@ -1419,18 +1422,16 @@
</member>
<member name="rendering/global_illumination/gi/use_half_resolution" type="bool" setter="" getter="" default="false">
</member>
- <member name="rendering/global_illumination/gi_probes/anisotropic" type="bool" setter="" getter="" default="false">
- If [code]true[/code], take additional samples when rendering objects affected by a [GIProbe] to reduce artifacts from only sampling in one direction.
- </member>
- <member name="rendering/global_illumination/gi_probes/quality" type="int" setter="" getter="" default="1">
- Sets the number of cone samples taken when rendering objects affected by [GIProbe]s.
- </member>
<member name="rendering/global_illumination/sdfgi/frames_to_converge" type="int" setter="" getter="" default="4">
</member>
<member name="rendering/global_illumination/sdfgi/frames_to_update_lights" type="int" setter="" getter="" default="2">
</member>
<member name="rendering/global_illumination/sdfgi/probe_ray_count" type="int" setter="" getter="" default="1">
</member>
+ <member name="rendering/global_illumination/voxel_gi/anisotropic" type="bool" setter="" getter="" default="false">
+ </member>
+ <member name="rendering/global_illumination/voxel_gi/quality" type="int" setter="" getter="" default="1">
+ </member>
<member name="rendering/lightmapping/bake_performance/max_rays_per_pass" type="int" setter="" getter="" default="32">
</member>
<member name="rendering/lightmapping/bake_performance/max_rays_per_probe_pass" type="int" setter="" getter="" default="64">
@@ -1502,6 +1503,16 @@
<member name="rendering/reflections/sky_reflections/texture_array_reflections.mobile" type="bool" setter="" getter="" default="false">
Lower-end override for [member rendering/reflections/sky_reflections/texture_array_reflections] on mobile devices, due to performance concerns or driver support.
</member>
+ <member name="rendering/shader_compiler/shader_cache/compress" type="bool" setter="" getter="" default="true">
+ </member>
+ <member name="rendering/shader_compiler/shader_cache/enabled" type="bool" setter="" getter="" default="true">
+ </member>
+ <member name="rendering/shader_compiler/shader_cache/strip_debug" type="bool" setter="" getter="" default="false">
+ </member>
+ <member name="rendering/shader_compiler/shader_cache/strip_debug.release" type="bool" setter="" getter="" default="true">
+ </member>
+ <member name="rendering/shader_compiler/shader_cache/use_zstd_compression" type="bool" setter="" getter="" default="true">
+ </member>
<member name="rendering/shading/overrides/force_blinn_over_ggx" type="bool" setter="" getter="" default="false">
If [code]true[/code], uses faster but lower-quality Blinn model to generate blurred reflections instead of the GGX model.
</member>
@@ -1566,31 +1577,46 @@
<member name="rendering/textures/default_filters/use_nearest_mipmap_filter" type="bool" setter="" getter="" default="false">
If [code]true[/code], uses nearest-neighbor mipmap filtering when using mipmaps (also called "bilinear filtering"), which will result in visible seams appearing between mipmap stages. This may increase performance in mobile as less memory bandwidth is used. If [code]false[/code], linear mipmap filtering (also called "trilinear filtering") is used.
</member>
+ <member name="rendering/textures/lossless_compression/force_png" type="bool" setter="" getter="" default="false">
+ If [code]true[/code], the texture importer will import lossless textures using the PNG format. Otherwise, it will default to using WebP.
+ </member>
+ <member name="rendering/textures/lossless_compression/webp_compression_level" type="int" setter="" getter="" default="2">
+ The default compression level for lossless WebP. Higher levels result in smaller files at the cost of compression speed. Decompression speed is mostly unaffected by the compression level. Supported values are 0 to 9. Note that compression levels above 6 are very slow and offer very little savings.
+ </member>
<member name="rendering/textures/vram_compression/import_bptc" type="bool" setter="" getter="" default="false">
If [code]true[/code], the texture importer will import VRAM-compressed textures using the BPTC algorithm. This texture compression algorithm is only supported on desktop platforms, and only when using the Vulkan renderer.
+ [b]Note:[/b] Changing this setting does [i]not[/i] impact textures that were already imported before. To make this setting apply to textures that were already imported, exit the editor, remove the [code].godot/imported/[/code] folder located inside the project folder then restart the editor.
</member>
<member name="rendering/textures/vram_compression/import_etc" type="bool" setter="" getter="" default="false">
If [code]true[/code], the texture importer will import VRAM-compressed textures using the Ericsson Texture Compression algorithm. This algorithm doesn't support alpha channels in textures.
+ [b]Note:[/b] Changing this setting does [i]not[/i] impact textures that were already imported before. To make this setting apply to textures that were already imported, exit the editor, remove the [code].godot/imported/[/code] folder located inside the project folder then restart the editor.
</member>
<member name="rendering/textures/vram_compression/import_etc2" type="bool" setter="" getter="" default="true">
If [code]true[/code], the texture importer will import VRAM-compressed textures using the Ericsson Texture Compression 2 algorithm. This texture compression algorithm is only supported when using the Vulkan renderer.
+ [b]Note:[/b] Changing this setting does [i]not[/i] impact textures that were already imported before. To make this setting apply to textures that were already imported, exit the editor, remove the [code].godot/imported/[/code] folder located inside the project folder then restart the editor.
</member>
<member name="rendering/textures/vram_compression/import_pvrtc" type="bool" setter="" getter="" default="false">
If [code]true[/code], the texture importer will import VRAM-compressed textures using the PowerVR Texture Compression algorithm. This texture compression algorithm is only supported on iOS.
+ [b]Note:[/b] Changing this setting does [i]not[/i] impact textures that were already imported before. To make this setting apply to textures that were already imported, exit the editor, remove the [code].godot/imported/[/code] folder located inside the project folder then restart the editor.
</member>
<member name="rendering/textures/vram_compression/import_s3tc" type="bool" setter="" getter="" default="true">
If [code]true[/code], the texture importer will import VRAM-compressed textures using the S3 Texture Compression algorithm. This algorithm is only supported on desktop platforms and consoles.
+ [b]Note:[/b] Changing this setting does [i]not[/i] impact textures that were already imported before. To make this setting apply to textures that were already imported, exit the editor, remove the [code].godot/imported/[/code] folder located inside the project folder then restart the editor.
</member>
<member name="rendering/vulkan/descriptor_pools/max_descriptors_per_pool" type="int" setter="" getter="" default="64">
</member>
+ <member name="rendering/vulkan/rendering/back_end" type="int" setter="" getter="" default="0">
+ </member>
+ <member name="rendering/vulkan/rendering/back_end.mobile" type="int" setter="" getter="" default="1">
+ </member>
<member name="rendering/vulkan/staging_buffer/block_size_kb" type="int" setter="" getter="" default="256">
</member>
<member name="rendering/vulkan/staging_buffer/max_size_mb" type="int" setter="" getter="" default="128">
</member>
<member name="rendering/vulkan/staging_buffer/texture_upload_region_size_px" type="int" setter="" getter="" default="64">
</member>
- <member name="world/2d/cell_size" type="int" setter="" getter="" default="100">
- Cell size used for the 2D hash grid that [VisibilityNotifier2D] uses (in pixels).
+ <member name="rendering/xr/enabled" type="bool" setter="" getter="" default="false">
+ If [code]true[/code], XR support is enabled in Godot, this ensures required shaders are compiled.
</member>
</members>
<constants>
diff --git a/doc/classes/PropertyTweener.xml b/doc/classes/PropertyTweener.xml
new file mode 100644
index 0000000000..1e77bb33c6
--- /dev/null
+++ b/doc/classes/PropertyTweener.xml
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="PropertyTweener" inherits="Tweener" version="4.0">
+ <brief_description>
+ Interpolates an [Object]'s property over time.
+ </brief_description>
+ <description>
+ [PropertyTweener] is used to interpolate a property in an object. See [method Tween.tween_property] for more usage information.
+ [b]Note:[/b] [method Tween.tween_property] is the only correct way to create [PropertyTweener]. Any [PropertyTweener] created manually will not function correctly.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="as_relative">
+ <return type="PropertyTweener">
+ </return>
+ <description>
+ When called, the final value will be used as a relative value instead. Example:
+ [codeblock]
+ var tween = get_tree().create_tween()
+ tween.tween_property(self, "position", Vector2.RIGHT * 100, 1).as_relative() #the node will move by 100 pixels to the right
+ [/codeblock]
+ </description>
+ </method>
+ <method name="from">
+ <return type="PropertyTweener">
+ </return>
+ <argument index="0" name="value" type="Variant">
+ </argument>
+ <description>
+ Sets a custom initial value to the [PropertyTweener]. Example:
+ [codeblock]
+ var tween = get_tree().create_tween()
+ tween.tween_property(self, "position", Vector2(200, 100), 1).from(Vector2(100, 100) #this will move the node from position (100, 100) to (200, 100)
+ [/codeblock]
+ </description>
+ </method>
+ <method name="from_current">
+ <return type="PropertyTweener">
+ </return>
+ <description>
+ Makes the [PropertyTweener] use the current property value (i.e. at the time of creating this [PropertyTweener]) as a starting point. This is equivalent of using [method from] with the current value. These two calls will do the same:
+ [codeblock]
+ tween.tween_property(self, "position", Vector2(200, 100), 1).from(position)
+ tween.tween_property(self, "position", Vector2(200, 100), 1).from_current()
+ [/codeblock]
+ </description>
+ </method>
+ <method name="set_delay">
+ <return type="PropertyTweener">
+ </return>
+ <argument index="0" name="delay" type="float">
+ </argument>
+ <description>
+ Sets the time in seconds after which the [PropertyTweener] will start interpolating. By default there's no delay.
+ </description>
+ </method>
+ <method name="set_ease">
+ <return type="PropertyTweener">
+ </return>
+ <argument index="0" name="ease" type="int" enum="Tween.EaseType">
+ </argument>
+ <description>
+ Sets the type of used easing from [enum Tween.EaseType]. If not set, the default easing is used from the [Tween] that contains this Tweener.
+ </description>
+ </method>
+ <method name="set_trans">
+ <return type="PropertyTweener">
+ </return>
+ <argument index="0" name="trans" type="int" enum="Tween.TransitionType">
+ </argument>
+ <description>
+ Sets the type of used transition from [enum Tween.TransitionType]. If not set, the default transition is used from the [Tween] that contains this Tweener.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/ProximityGroup3D.xml b/doc/classes/ProximityGroup3D.xml
index 512d55c9a0..22e397b832 100644
--- a/doc/classes/ProximityGroup3D.xml
+++ b/doc/classes/ProximityGroup3D.xml
@@ -23,7 +23,7 @@
<members>
<member name="dispatch_mode" type="int" setter="set_dispatch_mode" getter="get_dispatch_mode" enum="ProximityGroup3D.DispatchMode" default="0">
</member>
- <member name="grid_radius" type="Vector3" setter="set_grid_radius" getter="get_grid_radius" default="Vector3( 1, 1, 1 )">
+ <member name="grid_radius" type="Vector3" setter="set_grid_radius" getter="get_grid_radius" default="Vector3(1, 1, 1)">
</member>
<member name="group_name" type="String" setter="set_group_name" getter="get_group_name" default="&quot;&quot;">
</member>
diff --git a/doc/classes/QuadMesh.xml b/doc/classes/QuadMesh.xml
index 24a3d76ee2..94d638888c 100644
--- a/doc/classes/QuadMesh.xml
+++ b/doc/classes/QuadMesh.xml
@@ -13,7 +13,7 @@
<methods>
</methods>
<members>
- <member name="size" type="Vector2" setter="set_size" getter="get_size" default="Vector2( 1, 1 )">
+ <member name="size" type="Vector2" setter="set_size" getter="get_size" default="Vector2(1, 1)">
Size on the X and Y axes.
</member>
</members>
diff --git a/doc/classes/Quat.xml b/doc/classes/Quaternion.xml
index 1c0a3e37c0..660204ee7d 100644
--- a/doc/classes/Quat.xml
+++ b/doc/classes/Quaternion.xml
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Quat" version="4.0">
+<class name="Quaternion" version="4.0">
<brief_description>
Quaternion.
</brief_description>
<description>
A unit quaternion used for representing 3D rotations. Quaternions need to be normalized to be used for rotation.
- It is similar to Basis, which implements matrix representation of rotations, and can be parametrized using both an axis-angle pair or Euler angles. Basis stores rotation, scale, and shearing, while Quat only stores rotation.
+ It is similar to Basis, which implements matrix representation of rotations, and can be parametrized using both an axis-angle pair or Euler angles. Basis stores rotation, scale, and shearing, while Quaternion only stores rotation.
Due to its compactness and the way it is stored in memory, certain operations (obtaining axis-angle and performing SLERP, in particular) are more efficient and robust against floating-point errors.
</description>
<tutorials>
@@ -13,24 +13,24 @@
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
<methods>
- <method name="Quat" qualifiers="constructor">
- <return type="Quat">
+ <method name="Quaternion" qualifiers="constructor">
+ <return type="Quaternion">
</return>
<description>
Constructs a default-initialized quaternion with all components set to [code]0[/code].
</description>
</method>
- <method name="Quat" qualifiers="constructor">
- <return type="Quat">
+ <method name="Quaternion" qualifiers="constructor">
+ <return type="Quaternion">
</return>
- <argument index="0" name="from" type="Quat">
+ <argument index="0" name="from" type="Quaternion">
</argument>
<description>
- Constructs a [Quat] as a copy of the given [Quat].
+ Constructs a [Quaternion] as a copy of the given [Quaternion].
</description>
</method>
- <method name="Quat" qualifiers="constructor">
- <return type="Quat">
+ <method name="Quaternion" qualifiers="constructor">
+ <return type="Quaternion">
</return>
<argument index="0" name="arc_from" type="Vector3">
</argument>
@@ -39,8 +39,8 @@
<description>
</description>
</method>
- <method name="Quat" qualifiers="constructor">
- <return type="Quat">
+ <method name="Quaternion" qualifiers="constructor">
+ <return type="Quaternion">
</return>
<argument index="0" name="axis" type="Vector3">
</argument>
@@ -50,8 +50,8 @@
Constructs a quaternion that will rotate around the given axis by the specified angle. The axis must be a normalized vector.
</description>
</method>
- <method name="Quat" qualifiers="constructor">
- <return type="Quat">
+ <method name="Quaternion" qualifiers="constructor">
+ <return type="Quaternion">
</return>
<argument index="0" name="euler" type="Vector3">
</argument>
@@ -59,8 +59,8 @@
Constructs a quaternion that will perform a rotation specified by Euler angles (in the YXZ convention: when decomposing, first Z, then X, and Y last), given in the vector format as (X angle, Y angle, Z angle).
</description>
</method>
- <method name="Quat" qualifiers="constructor">
- <return type="Quat">
+ <method name="Quaternion" qualifiers="constructor">
+ <return type="Quaternion">
</return>
<argument index="0" name="from" type="Basis">
</argument>
@@ -68,8 +68,8 @@
Constructs a quaternion from the given [Basis].
</description>
</method>
- <method name="Quat" qualifiers="constructor">
- <return type="Quat">
+ <method name="Quaternion" qualifiers="constructor">
+ <return type="Quaternion">
</return>
<argument index="0" name="x" type="float">
</argument>
@@ -83,14 +83,24 @@
Constructs a quaternion defined by the given values.
</description>
</method>
+ <method name="angle_to" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="to" type="Quaternion">
+ </argument>
+ <description>
+ Returns the angle between this quaternion and [code]to[/code]. This is the magnitude of the angle you would need to rotate by to get from one to the other.
+ [b]Note:[/b] This method has an abnormally high amount of floating-point error, so methods such as [code]is_zero_approx[/code] will not work reliably.
+ </description>
+ </method>
<method name="cubic_slerp" qualifiers="const">
- <return type="Quat">
+ <return type="Quaternion">
</return>
- <argument index="0" name="b" type="Quat">
+ <argument index="0" name="b" type="Quaternion">
</argument>
- <argument index="1" name="pre_a" type="Quat">
+ <argument index="1" name="pre_a" type="Quaternion">
</argument>
- <argument index="2" name="post_b" type="Quat">
+ <argument index="2" name="post_b" type="Quaternion">
</argument>
<argument index="3" name="weight" type="float">
</argument>
@@ -101,7 +111,7 @@
<method name="dot" qualifiers="const">
<return type="float">
</return>
- <argument index="0" name="with" type="Quat">
+ <argument index="0" name="with" type="Quaternion">
</argument>
<description>
Returns the dot product of two quaternions.
@@ -115,7 +125,7 @@
</description>
</method>
<method name="inverse" qualifiers="const">
- <return type="Quat">
+ <return type="Quaternion">
</return>
<description>
Returns the inverse of the quaternion.
@@ -124,7 +134,7 @@
<method name="is_equal_approx" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="to" type="Quat">
+ <argument index="0" name="to" type="Quaternion">
</argument>
<description>
Returns [code]true[/code] if this quaternion and [code]quat[/code] are approximately equal, by running [method @GlobalScope.is_equal_approx] on each component.
@@ -152,7 +162,7 @@
</description>
</method>
<method name="normalized" qualifiers="const">
- <return type="Quat">
+ <return type="Quaternion">
</return>
<description>
Returns a copy of the quaternion, normalized to unit length.
@@ -161,15 +171,15 @@
<method name="operator !=" qualifiers="operator">
<return type="bool">
</return>
- <argument index="0" name="right" type="Quat">
+ <argument index="0" name="right" type="Quaternion">
</argument>
<description>
</description>
</method>
<method name="operator *" qualifiers="operator">
- <return type="Quat">
+ <return type="Quaternion">
</return>
- <argument index="0" name="right" type="Quat">
+ <argument index="0" name="right" type="Quaternion">
</argument>
<description>
</description>
@@ -183,7 +193,7 @@
</description>
</method>
<method name="operator *" qualifiers="operator">
- <return type="Quat">
+ <return type="Quaternion">
</return>
<argument index="0" name="right" type="float">
</argument>
@@ -191,7 +201,7 @@
</description>
</method>
<method name="operator *" qualifiers="operator">
- <return type="Quat">
+ <return type="Quaternion">
</return>
<argument index="0" name="right" type="int">
</argument>
@@ -199,35 +209,35 @@
</description>
</method>
<method name="operator +" qualifiers="operator">
- <return type="Quat">
+ <return type="Quaternion">
</return>
<description>
</description>
</method>
<method name="operator +" qualifiers="operator">
- <return type="Quat">
+ <return type="Quaternion">
</return>
- <argument index="0" name="right" type="Quat">
+ <argument index="0" name="right" type="Quaternion">
</argument>
<description>
</description>
</method>
<method name="operator -" qualifiers="operator">
- <return type="Quat">
+ <return type="Quaternion">
</return>
<description>
</description>
</method>
<method name="operator -" qualifiers="operator">
- <return type="Quat">
+ <return type="Quaternion">
</return>
- <argument index="0" name="right" type="Quat">
+ <argument index="0" name="right" type="Quaternion">
</argument>
<description>
</description>
</method>
<method name="operator /" qualifiers="operator">
- <return type="Quat">
+ <return type="Quaternion">
</return>
<argument index="0" name="right" type="float">
</argument>
@@ -235,7 +245,7 @@
</description>
</method>
<method name="operator /" qualifiers="operator">
- <return type="Quat">
+ <return type="Quaternion">
</return>
<argument index="0" name="right" type="int">
</argument>
@@ -245,7 +255,7 @@
<method name="operator ==" qualifiers="operator">
<return type="bool">
</return>
- <argument index="0" name="right" type="Quat">
+ <argument index="0" name="right" type="Quaternion">
</argument>
<description>
</description>
@@ -259,9 +269,9 @@
</description>
</method>
<method name="slerp" qualifiers="const">
- <return type="Quat">
+ <return type="Quaternion">
</return>
- <argument index="0" name="to" type="Quat">
+ <argument index="0" name="to" type="Quaternion">
</argument>
<argument index="1" name="weight" type="float">
</argument>
@@ -271,9 +281,9 @@
</description>
</method>
<method name="slerpni" qualifiers="const">
- <return type="Quat">
+ <return type="Quaternion">
</return>
- <argument index="0" name="to" type="Quat">
+ <argument index="0" name="to" type="Quaternion">
</argument>
<argument index="1" name="weight" type="float">
</argument>
@@ -301,7 +311,7 @@
</member>
</members>
<constants>
- <constant name="IDENTITY" value="Quat( 0, 0, 0, 1 )">
+ <constant name="IDENTITY" value="Quaternion(0, 0, 0, 1)">
The identity quaternion, representing no rotation. Equivalent to an identity [Basis] matrix. If a vector is transformed by an identity quaternion, it will not change.
</constant>
</constants>
diff --git a/doc/classes/RDAttachmentFormat.xml b/doc/classes/RDAttachmentFormat.xml
index 4ee7b9b28e..b73377bf77 100644
--- a/doc/classes/RDAttachmentFormat.xml
+++ b/doc/classes/RDAttachmentFormat.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RDAttachmentFormat" inherits="Reference" version="4.0">
+<class name="RDAttachmentFormat" inherits="RefCounted" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/RDPipelineColorBlendState.xml b/doc/classes/RDPipelineColorBlendState.xml
index adc6f1f6a3..b672a053c7 100644
--- a/doc/classes/RDPipelineColorBlendState.xml
+++ b/doc/classes/RDPipelineColorBlendState.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RDPipelineColorBlendState" inherits="Reference" version="4.0">
+<class name="RDPipelineColorBlendState" inherits="RefCounted" version="4.0">
<brief_description>
</brief_description>
<description>
@@ -9,9 +9,9 @@
<methods>
</methods>
<members>
- <member name="attachments" type="RDPipelineColorBlendStateAttachment[]" setter="set_attachments" getter="get_attachments" default="[ ]">
+ <member name="attachments" type="RDPipelineColorBlendStateAttachment[]" setter="set_attachments" getter="get_attachments" default="[]">
</member>
- <member name="blend_constant" type="Color" setter="set_blend_constant" getter="get_blend_constant" default="Color( 0, 0, 0, 1 )">
+ <member name="blend_constant" type="Color" setter="set_blend_constant" getter="get_blend_constant" default="Color(0, 0, 0, 1)">
</member>
<member name="enable_logic_op" type="bool" setter="set_enable_logic_op" getter="get_enable_logic_op" default="false">
</member>
diff --git a/doc/classes/RDPipelineColorBlendStateAttachment.xml b/doc/classes/RDPipelineColorBlendStateAttachment.xml
index 7f118b5f0b..a6a1900cb5 100644
--- a/doc/classes/RDPipelineColorBlendStateAttachment.xml
+++ b/doc/classes/RDPipelineColorBlendStateAttachment.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RDPipelineColorBlendStateAttachment" inherits="Reference" version="4.0">
+<class name="RDPipelineColorBlendStateAttachment" inherits="RefCounted" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/RDPipelineDepthStencilState.xml b/doc/classes/RDPipelineDepthStencilState.xml
index 562ff52819..76e0506bca 100644
--- a/doc/classes/RDPipelineDepthStencilState.xml
+++ b/doc/classes/RDPipelineDepthStencilState.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RDPipelineDepthStencilState" inherits="Reference" version="4.0">
+<class name="RDPipelineDepthStencilState" inherits="RefCounted" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/RDPipelineMultisampleState.xml b/doc/classes/RDPipelineMultisampleState.xml
index 4658c7d9ba..b4345f1f8b 100644
--- a/doc/classes/RDPipelineMultisampleState.xml
+++ b/doc/classes/RDPipelineMultisampleState.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RDPipelineMultisampleState" inherits="Reference" version="4.0">
+<class name="RDPipelineMultisampleState" inherits="RefCounted" version="4.0">
<brief_description>
</brief_description>
<description>
@@ -19,7 +19,7 @@
</member>
<member name="sample_count" type="int" setter="set_sample_count" getter="get_sample_count" enum="RenderingDevice.TextureSamples" default="0">
</member>
- <member name="sample_masks" type="int[]" setter="set_sample_masks" getter="get_sample_masks" default="[ ]">
+ <member name="sample_masks" type="int[]" setter="set_sample_masks" getter="get_sample_masks" default="[]">
</member>
</members>
<constants>
diff --git a/doc/classes/RDPipelineRasterizationState.xml b/doc/classes/RDPipelineRasterizationState.xml
index 5064dd6deb..3f8c50cf42 100644
--- a/doc/classes/RDPipelineRasterizationState.xml
+++ b/doc/classes/RDPipelineRasterizationState.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RDPipelineRasterizationState" inherits="Reference" version="4.0">
+<class name="RDPipelineRasterizationState" inherits="RefCounted" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/RDSamplerState.xml b/doc/classes/RDSamplerState.xml
index ab31960b7c..9a9d55948c 100644
--- a/doc/classes/RDSamplerState.xml
+++ b/doc/classes/RDSamplerState.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RDSamplerState" inherits="Reference" version="4.0">
+<class name="RDSamplerState" inherits="RefCounted" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/RDShaderBytecode.xml b/doc/classes/RDShaderBytecode.xml
index 7a3501004e..20bf9bdd72 100644
--- a/doc/classes/RDShaderBytecode.xml
+++ b/doc/classes/RDShaderBytecode.xml
@@ -45,15 +45,15 @@
</method>
</methods>
<members>
- <member name="bytecode_compute" type="PackedByteArray" setter="set_stage_bytecode" getter="get_stage_bytecode" default="PackedByteArray( )">
+ <member name="bytecode_compute" type="PackedByteArray" setter="set_stage_bytecode" getter="get_stage_bytecode" default="PackedByteArray()">
</member>
- <member name="bytecode_fragment" type="PackedByteArray" setter="set_stage_bytecode" getter="get_stage_bytecode" default="PackedByteArray( )">
+ <member name="bytecode_fragment" type="PackedByteArray" setter="set_stage_bytecode" getter="get_stage_bytecode" default="PackedByteArray()">
</member>
- <member name="bytecode_tesselation_control" type="PackedByteArray" setter="set_stage_bytecode" getter="get_stage_bytecode" default="PackedByteArray( )">
+ <member name="bytecode_tesselation_control" type="PackedByteArray" setter="set_stage_bytecode" getter="get_stage_bytecode" default="PackedByteArray()">
</member>
- <member name="bytecode_tesselation_evaluation" type="PackedByteArray" setter="set_stage_bytecode" getter="get_stage_bytecode" default="PackedByteArray( )">
+ <member name="bytecode_tesselation_evaluation" type="PackedByteArray" setter="set_stage_bytecode" getter="get_stage_bytecode" default="PackedByteArray()">
</member>
- <member name="bytecode_vertex" type="PackedByteArray" setter="set_stage_bytecode" getter="get_stage_bytecode" default="PackedByteArray( )">
+ <member name="bytecode_vertex" type="PackedByteArray" setter="set_stage_bytecode" getter="get_stage_bytecode" default="PackedByteArray()">
</member>
<member name="compile_error_compute" type="String" setter="set_stage_compile_error" getter="get_stage_compile_error" default="&quot;&quot;">
</member>
diff --git a/doc/classes/RDShaderFile.xml b/doc/classes/RDShaderFile.xml
index 14e70d53ea..346a97a1c0 100644
--- a/doc/classes/RDShaderFile.xml
+++ b/doc/classes/RDShaderFile.xml
@@ -10,7 +10,7 @@
<method name="get_bytecode" qualifiers="const">
<return type="RDShaderBytecode">
</return>
- <argument index="0" name="version" type="StringName" default="@&quot;&quot;">
+ <argument index="0" name="version" type="StringName" default="&amp;&quot;&quot;">
</argument>
<description>
</description>
@@ -26,7 +26,7 @@
</return>
<argument index="0" name="bytecode" type="RDShaderBytecode">
</argument>
- <argument index="1" name="version" type="StringName" default="@&quot;&quot;">
+ <argument index="1" name="version" type="StringName" default="&amp;&quot;&quot;">
</argument>
<description>
</description>
diff --git a/doc/classes/RDShaderSource.xml b/doc/classes/RDShaderSource.xml
index c1cfd34bb7..68fc43d8ef 100644
--- a/doc/classes/RDShaderSource.xml
+++ b/doc/classes/RDShaderSource.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RDShaderSource" inherits="Reference" version="4.0">
+<class name="RDShaderSource" inherits="RefCounted" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/RDTextureFormat.xml b/doc/classes/RDTextureFormat.xml
index e41ddff368..ccfa6d1b95 100644
--- a/doc/classes/RDTextureFormat.xml
+++ b/doc/classes/RDTextureFormat.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RDTextureFormat" inherits="Reference" version="4.0">
+<class name="RDTextureFormat" inherits="RefCounted" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/RDTextureView.xml b/doc/classes/RDTextureView.xml
index 73b2a7ae4a..db140ae775 100644
--- a/doc/classes/RDTextureView.xml
+++ b/doc/classes/RDTextureView.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RDTextureView" inherits="Reference" version="4.0">
+<class name="RDTextureView" inherits="RefCounted" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/RDUniform.xml b/doc/classes/RDUniform.xml
index bc8a21e985..666935d663 100644
--- a/doc/classes/RDUniform.xml
+++ b/doc/classes/RDUniform.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RDUniform" inherits="Reference" version="4.0">
+<class name="RDUniform" inherits="RefCounted" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/RDVertexAttribute.xml b/doc/classes/RDVertexAttribute.xml
index 56fe40b51d..3499918cc8 100644
--- a/doc/classes/RDVertexAttribute.xml
+++ b/doc/classes/RDVertexAttribute.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RDVertexAttribute" inherits="Reference" version="4.0">
+<class name="RDVertexAttribute" inherits="RefCounted" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/RandomNumberGenerator.xml b/doc/classes/RandomNumberGenerator.xml
index 6312cd18aa..6fcb79b5fe 100644
--- a/doc/classes/RandomNumberGenerator.xml
+++ b/doc/classes/RandomNumberGenerator.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RandomNumberGenerator" inherits="Reference" version="4.0">
+<class name="RandomNumberGenerator" inherits="RefCounted" version="4.0">
<brief_description>
A class for generating pseudo-random numbers.
</brief_description>
diff --git a/doc/classes/RayCast2D.xml b/doc/classes/RayCast2D.xml
index e30d7df63f..14b67b46df 100644
--- a/doc/classes/RayCast2D.xml
+++ b/doc/classes/RayCast2D.xml
@@ -138,7 +138,7 @@
<member name="exclude_parent" type="bool" setter="set_exclude_parent_body" getter="get_exclude_parent_body" default="true">
If [code]true[/code], the parent node will be excluded from collision detection.
</member>
- <member name="target_position" type="Vector2" setter="set_target_position" getter="get_target_position" default="Vector2( 0, 50 )">
+ <member name="target_position" type="Vector2" setter="set_target_position" getter="get_target_position" default="Vector2(0, 50)">
The ray's destination point, relative to the RayCast's [code]position[/code].
</member>
</members>
diff --git a/doc/classes/RayCast3D.xml b/doc/classes/RayCast3D.xml
index 443890438f..98c8c96403 100644
--- a/doc/classes/RayCast3D.xml
+++ b/doc/classes/RayCast3D.xml
@@ -136,7 +136,7 @@
<member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="1">
The ray's collision mask. Only objects in at least one collision layer enabled in the mask will be detected. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
</member>
- <member name="debug_shape_custom_color" type="Color" setter="set_debug_shape_custom_color" getter="get_debug_shape_custom_color" default="Color( 0, 0, 0, 1 )">
+ <member name="debug_shape_custom_color" type="Color" setter="set_debug_shape_custom_color" getter="get_debug_shape_custom_color" default="Color(0, 0, 0, 1)">
The custom color to use to draw the shape in the editor and at run-time if [b]Visible Collision Shapes[/b] is enabled in the [b]Debug[/b] menu. This color will be highlighted at run-time if the [RayCast3D] is colliding with something.
If set to [code]Color(0.0, 0.0, 0.0)[/code] (by default), the color set in [member ProjectSettings.debug/shapes/collision/shape_color] is used.
</member>
@@ -149,7 +149,7 @@
<member name="exclude_parent" type="bool" setter="set_exclude_parent_body" getter="get_exclude_parent_body" default="true">
If [code]true[/code], collisions will be ignored for this RayCast3D's immediate parent.
</member>
- <member name="target_position" type="Vector3" setter="set_target_position" getter="get_target_position" default="Vector3( 0, -1, 0 )">
+ <member name="target_position" type="Vector3" setter="set_target_position" getter="get_target_position" default="Vector3(0, -1, 0)">
The ray's destination point, relative to the RayCast's [code]position[/code].
</member>
</members>
diff --git a/doc/classes/Rect2.xml b/doc/classes/Rect2.xml
index 352a18e326..627c488b01 100644
--- a/doc/classes/Rect2.xml
+++ b/doc/classes/Rect2.xml
@@ -214,13 +214,13 @@
</method>
</methods>
<members>
- <member name="end" type="Vector2" setter="" getter="" default="Vector2( 0, 0 )">
+ <member name="end" type="Vector2" setter="" getter="" default="Vector2(0, 0)">
Ending corner. This is calculated as [code]position + size[/code]. Setting this value will change the size.
</member>
- <member name="position" type="Vector2" setter="" getter="" default="Vector2( 0, 0 )">
+ <member name="position" type="Vector2" setter="" getter="" default="Vector2(0, 0)">
Beginning corner. Typically has values lower than [member end].
</member>
- <member name="size" type="Vector2" setter="" getter="" default="Vector2( 0, 0 )">
+ <member name="size" type="Vector2" setter="" getter="" default="Vector2(0, 0)">
Size from [member position] to [member end]. Typically, all components are positive.
If the size is negative, you can use [method abs] to fix it.
</member>
diff --git a/doc/classes/Rect2i.xml b/doc/classes/Rect2i.xml
index 84bef9b406..67d148084f 100644
--- a/doc/classes/Rect2i.xml
+++ b/doc/classes/Rect2i.xml
@@ -193,13 +193,13 @@
</method>
</methods>
<members>
- <member name="end" type="Vector2i" setter="" getter="" default="Vector2i( 0, 0 )">
+ <member name="end" type="Vector2i" setter="" getter="" default="Vector2i(0, 0)">
Ending corner. This is calculated as [code]position + size[/code]. Setting this value will change the size.
</member>
- <member name="position" type="Vector2i" setter="" getter="" default="Vector2i( 0, 0 )">
+ <member name="position" type="Vector2i" setter="" getter="" default="Vector2i(0, 0)">
Beginning corner. Typically has values lower than [member end].
</member>
- <member name="size" type="Vector2i" setter="" getter="" default="Vector2i( 0, 0 )">
+ <member name="size" type="Vector2i" setter="" getter="" default="Vector2i(0, 0)">
Size from [member position] to [member end]. Typically, all components are positive.
If the size is negative, you can use [method abs] to fix it.
</member>
diff --git a/doc/classes/RectangleShape2D.xml b/doc/classes/RectangleShape2D.xml
index 8e37fbad6f..f2795ae4a1 100644
--- a/doc/classes/RectangleShape2D.xml
+++ b/doc/classes/RectangleShape2D.xml
@@ -13,7 +13,7 @@
<methods>
</methods>
<members>
- <member name="size" type="Vector2" setter="set_size" getter="get_size" default="Vector2( 20, 20 )">
+ <member name="size" type="Vector2" setter="set_size" getter="get_size" default="Vector2(20, 20)">
The rectangle's width and height.
</member>
</members>
diff --git a/doc/classes/Reference.xml b/doc/classes/RefCounted.xml
index 724d2db924..cf96514203 100644
--- a/doc/classes/Reference.xml
+++ b/doc/classes/RefCounted.xml
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Reference" inherits="Object" version="4.0">
+<class name="RefCounted" inherits="Object" version="4.0">
<brief_description>
Base class for reference-counted objects.
</brief_description>
<description>
Base class for any object that keeps a reference count. [Resource] and many other helper objects inherit this class.
Unlike other [Object] types, References keep an internal reference counter so that they are automatically released when no longer in use, and only then. References therefore do not need to be freed manually with [method Object.free].
- In the vast majority of use cases, instantiating and using [Reference]-derived types is all you need to do. The methods provided in this class are only for advanced users, and can cause issues if misused.
+ In the vast majority of use cases, instantiating and using [RefCounted]-derived types is all you need to do. The methods provided in this class are only for advanced users, and can cause issues if misused.
[b]Note:[/b] In C#, references will not be freed instantly after they are no longer in use. Instead, garbage collection will run periodically and will free references that are no longer in use. This means that unused references will linger on for a while before being removed.
</description>
<tutorials>
diff --git a/doc/classes/ReferenceRect.xml b/doc/classes/ReferenceRect.xml
index 1a3fbbdfc5..df9a6f0a46 100644
--- a/doc/classes/ReferenceRect.xml
+++ b/doc/classes/ReferenceRect.xml
@@ -11,7 +11,7 @@
<methods>
</methods>
<members>
- <member name="border_color" type="Color" setter="set_border_color" getter="get_border_color" default="Color( 1, 0, 0, 1 )">
+ <member name="border_color" type="Color" setter="set_border_color" getter="get_border_color" default="Color(1, 0, 0, 1)">
Sets the border [Color] of the [ReferenceRect].
</member>
<member name="border_width" type="float" setter="set_border_width" getter="get_border_width" default="1.0">
diff --git a/doc/classes/ReflectionProbe.xml b/doc/classes/ReflectionProbe.xml
index cd08778c89..1d32a8b509 100644
--- a/doc/classes/ReflectionProbe.xml
+++ b/doc/classes/ReflectionProbe.xml
@@ -5,7 +5,7 @@
</brief_description>
<description>
Captures its surroundings as a cubemap, and stores versions of it with increasing levels of blur to simulate different material roughnesses.
- The [ReflectionProbe] is used to create high-quality reflections at the cost of performance. It can be combined with [GIProbe]s and Screen Space Reflections to achieve high quality reflections. [ReflectionProbe]s render all objects within their [member cull_mask], so updating them can be quite expensive. It is best to update them once with the important static objects and then leave them.
+ The [ReflectionProbe] is used to create high-quality reflections at the cost of performance. It can be combined with [VoxelGI]s and Screen Space Reflections to achieve high quality reflections. [ReflectionProbe]s render all objects within their [member cull_mask], so updating them can be quite expensive. It is best to update them once with the important static objects and then leave them.
</description>
<tutorials>
<link title="Reflection probes">https://docs.godotengine.org/en/latest/tutorials/3d/reflection_probes.html</link>
@@ -13,7 +13,7 @@
<methods>
</methods>
<members>
- <member name="ambient_color" type="Color" setter="set_ambient_color" getter="get_ambient_color" default="Color( 0, 0, 0, 1 )">
+ <member name="ambient_color" type="Color" setter="set_ambient_color" getter="get_ambient_color" default="Color(0, 0, 0, 1)">
</member>
<member name="ambient_color_energy" type="float" setter="set_ambient_color_energy" getter="get_ambient_color_energy" default="1.0">
</member>
@@ -28,7 +28,7 @@
<member name="enable_shadows" type="bool" setter="set_enable_shadows" getter="are_shadows_enabled" default="false">
If [code]true[/code], computes shadows in the reflection probe. This makes the reflection probe slower to render; you may want to disable this if using the [constant UPDATE_ALWAYS] [member update_mode].
</member>
- <member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3( 1, 1, 1 )">
+ <member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3(1, 1, 1)">
The size of the reflection probe. The larger the extents the more space covered by the probe which will lower the perceived resolution. It is best to keep the extents only as large as you need them.
</member>
<member name="intensity" type="float" setter="set_intensity" getter="get_intensity" default="1.0">
@@ -42,7 +42,7 @@
<member name="max_distance" type="float" setter="set_max_distance" getter="get_max_distance" default="0.0">
Sets the max distance away from the probe an object can be before it is culled.
</member>
- <member name="origin_offset" type="Vector3" setter="set_origin_offset" getter="get_origin_offset" default="Vector3( 0, 0, 0 )">
+ <member name="origin_offset" type="Vector3" setter="set_origin_offset" getter="get_origin_offset" default="Vector3(0, 0, 0)">
Sets the origin offset to be used when this reflection probe is in box project mode.
</member>
<member name="update_mode" type="int" setter="set_update_mode" getter="get_update_mode" enum="ReflectionProbe.UpdateMode" default="0">
diff --git a/doc/classes/RemoteTransform3D.xml b/doc/classes/RemoteTransform3D.xml
index bd3da2aea9..453177496f 100644
--- a/doc/classes/RemoteTransform3D.xml
+++ b/doc/classes/RemoteTransform3D.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="RemoteTransform3D" inherits="Node3D" version="4.0">
<brief_description>
- RemoteTransform3D pushes its own [Transform] to another [Node3D] derived Node in the scene.
+ RemoteTransform3D pushes its own [Transform3D] to another [Node3D] derived Node in the scene.
</brief_description>
<description>
- RemoteTransform3D pushes its own [Transform] to another [Node3D] derived Node (called the remote node) in the scene.
+ RemoteTransform3D pushes its own [Transform3D] to another [Node3D] derived Node (called the remote node) in the scene.
It can be set to update another Node's position, rotation and/or scale. It can use either global or local coordinates.
</description>
<tutorials>
diff --git a/doc/classes/RenderingDevice.xml b/doc/classes/RenderingDevice.xml
index 841d2bde72..dc56e6fd5d 100644
--- a/doc/classes/RenderingDevice.xml
+++ b/doc/classes/RenderingDevice.xml
@@ -196,15 +196,15 @@
</argument>
<argument index="4" name="final_depth_action" type="int" enum="RenderingDevice.FinalAction">
</argument>
- <argument index="5" name="clear_color_values" type="PackedColorArray" default="PackedColorArray( )">
+ <argument index="5" name="clear_color_values" type="PackedColorArray" default="PackedColorArray()">
</argument>
<argument index="6" name="clear_depth" type="float" default="1.0">
</argument>
<argument index="7" name="clear_stencil" type="int" default="0">
</argument>
- <argument index="8" name="region" type="Rect2" default="Rect2i( 0, 0, 0, 0 )">
+ <argument index="8" name="region" type="Rect2" default="Rect2i(0, 0, 0, 0)">
</argument>
- <argument index="9" name="storage_textures" type="Array" default="[ ]">
+ <argument index="9" name="storage_textures" type="Array" default="[]">
</argument>
<description>
</description>
@@ -214,7 +214,7 @@
</return>
<argument index="0" name="screen" type="int" default="0">
</argument>
- <argument index="1" name="clear_color" type="Color" default="Color( 0, 0, 0, 1 )">
+ <argument index="1" name="clear_color" type="Color" default="Color(0, 0, 0, 1)">
</argument>
<description>
</description>
@@ -234,15 +234,15 @@
</argument>
<argument index="5" name="final_depth_action" type="int" enum="RenderingDevice.FinalAction">
</argument>
- <argument index="6" name="clear_color_values" type="PackedColorArray" default="PackedColorArray( )">
+ <argument index="6" name="clear_color_values" type="PackedColorArray" default="PackedColorArray()">
</argument>
<argument index="7" name="clear_depth" type="float" default="1.0">
</argument>
<argument index="8" name="clear_stencil" type="int" default="0">
</argument>
- <argument index="9" name="region" type="Rect2" default="Rect2i( 0, 0, 0, 0 )">
+ <argument index="9" name="region" type="Rect2" default="Rect2i(0, 0, 0, 0)">
</argument>
- <argument index="10" name="storage_textures" type="RID[]" default="[ ]">
+ <argument index="10" name="storage_textures" type="RID[]" default="[]">
</argument>
<description>
</description>
@@ -316,7 +316,7 @@
</return>
<argument index="0" name="draw_list" type="int">
</argument>
- <argument index="1" name="rect" type="Rect2" default="Rect2i( 0, 0, 0, 0 )">
+ <argument index="1" name="rect" type="Rect2" default="Rect2i(0, 0, 0, 0)">
</argument>
<description>
</description>
@@ -488,7 +488,7 @@
</argument>
<argument index="1" name="format" type="int" enum="RenderingDevice.IndexBufferFormat">
</argument>
- <argument index="2" name="data" type="PackedByteArray" default="PackedByteArray( )">
+ <argument index="2" name="data" type="PackedByteArray" default="PackedByteArray()">
</argument>
<argument index="3" name="use_restart_indices" type="bool" default="false">
</argument>
@@ -606,7 +606,7 @@
</return>
<argument index="0" name="size_bytes" type="int">
</argument>
- <argument index="1" name="data" type="PackedByteArray" default="PackedByteArray( )">
+ <argument index="1" name="data" type="PackedByteArray" default="PackedByteArray()">
</argument>
<argument index="2" name="usage" type="int" default="0">
</argument>
@@ -632,7 +632,7 @@
</argument>
<argument index="1" name="format" type="int" enum="RenderingDevice.DataFormat">
</argument>
- <argument index="2" name="data" type="PackedByteArray" default="PackedByteArray( )">
+ <argument index="2" name="data" type="PackedByteArray" default="PackedByteArray()">
</argument>
<description>
</description>
@@ -690,7 +690,7 @@
</argument>
<argument index="1" name="view" type="RDTextureView">
</argument>
- <argument index="2" name="data" type="PackedByteArray[]" default="[ ]">
+ <argument index="2" name="data" type="PackedByteArray[]" default="[]">
</argument>
<description>
</description>
@@ -788,7 +788,7 @@
</return>
<argument index="0" name="size_bytes" type="int">
</argument>
- <argument index="1" name="data" type="PackedByteArray" default="PackedByteArray( )">
+ <argument index="1" name="data" type="PackedByteArray" default="PackedByteArray()">
</argument>
<description>
</description>
@@ -818,7 +818,7 @@
</return>
<argument index="0" name="size_bytes" type="int">
</argument>
- <argument index="1" name="data" type="PackedByteArray" default="PackedByteArray( )">
+ <argument index="1" name="data" type="PackedByteArray" default="PackedByteArray()">
</argument>
<argument index="2" name="use_as_storage" type="bool" default="false">
</argument>
diff --git a/doc/classes/RenderingServer.xml b/doc/classes/RenderingServer.xml
index 638b0bb297..44e0202307 100644
--- a/doc/classes/RenderingServer.xml
+++ b/doc/classes/RenderingServer.xml
@@ -130,10 +130,10 @@
</return>
<argument index="0" name="camera" type="RID">
</argument>
- <argument index="1" name="transform" type="Transform">
+ <argument index="1" name="transform" type="Transform3D">
</argument>
<description>
- Sets [Transform] of camera.
+ Sets [Transform3D] of camera.
</description>
</method>
<method name="camera_set_use_vertical_aspect">
@@ -620,7 +620,7 @@
</argument>
<argument index="5" name="reflection_source" type="int" enum="RenderingServer.EnvironmentReflectionSource" default="0">
</argument>
- <argument index="6" name="ao_color" type="Color" default="Color( 0, 0, 0, 1 )">
+ <argument index="6" name="ao_color" type="Color" default="Color(0, 0, 0, 1)">
</argument>
<description>
</description>
@@ -1175,17 +1175,6 @@
Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method.
</description>
</method>
- <method name="instance_geometry_set_as_instance_lod">
- <return type="void">
- </return>
- <argument index="0" name="instance" type="RID">
- </argument>
- <argument index="1" name="as_lod_of_instance" type="RID">
- </argument>
- <description>
- Not implemented in Godot 3.x.
- </description>
- </method>
<method name="instance_geometry_set_cast_shadows_setting">
<return type="void">
</return>
@@ -1197,45 +1186,45 @@
Sets the shadow casting setting to one of [enum ShadowCastingSetting]. Equivalent to [member GeometryInstance3D.cast_shadow].
</description>
</method>
- <method name="instance_geometry_set_draw_range">
+ <method name="instance_geometry_set_flag">
<return type="void">
</return>
<argument index="0" name="instance" type="RID">
</argument>
- <argument index="1" name="min" type="float">
- </argument>
- <argument index="2" name="max" type="float">
- </argument>
- <argument index="3" name="min_margin" type="float">
+ <argument index="1" name="flag" type="int" enum="RenderingServer.InstanceFlags">
</argument>
- <argument index="4" name="max_margin" type="float">
+ <argument index="2" name="enabled" type="bool">
</argument>
<description>
- Not implemented in Godot 3.x.
+ Sets the flag for a given [enum InstanceFlags]. See [enum InstanceFlags] for more details.
</description>
</method>
- <method name="instance_geometry_set_flag">
+ <method name="instance_geometry_set_material_override">
<return type="void">
</return>
<argument index="0" name="instance" type="RID">
</argument>
- <argument index="1" name="flag" type="int" enum="RenderingServer.InstanceFlags">
- </argument>
- <argument index="2" name="enabled" type="bool">
+ <argument index="1" name="material" type="RID">
</argument>
<description>
- Sets the flag for a given [enum InstanceFlags]. See [enum InstanceFlags] for more details.
+ Sets a material that will override the material for all surfaces on the mesh associated with this instance. Equivalent to [member GeometryInstance3D.material_override].
</description>
</method>
- <method name="instance_geometry_set_material_override">
+ <method name="instance_geometry_set_visibility_range">
<return type="void">
</return>
<argument index="0" name="instance" type="RID">
</argument>
- <argument index="1" name="material" type="RID">
+ <argument index="1" name="min" type="float">
+ </argument>
+ <argument index="2" name="max" type="float">
+ </argument>
+ <argument index="3" name="min_margin" type="float">
+ </argument>
+ <argument index="4" name="max_margin" type="float">
</argument>
<description>
- Sets a material that will override the material for all surfaces on the mesh associated with this instance. Equivalent to [member GeometryInstance3D.material_override].
+ Sets the visibility range values for the given geometry instance. Equivalent to [member GeometryInstance3D.visibility_range_begin] and related properties.
</description>
</method>
<method name="instance_set_base">
@@ -1335,12 +1324,23 @@
</return>
<argument index="0" name="instance" type="RID">
</argument>
- <argument index="1" name="transform" type="Transform">
+ <argument index="1" name="transform" type="Transform3D">
</argument>
<description>
Sets the world space transform of the instance. Equivalent to [member Node3D.transform].
</description>
</method>
+ <method name="instance_set_visibility_parent">
+ <return type="void">
+ </return>
+ <argument index="0" name="instance" type="RID">
+ </argument>
+ <argument index="1" name="parent" type="RID">
+ </argument>
+ <description>
+ Sets the visibility parent for the given instance. Equivalent to [member Node3D.visibility_parent].
+ </description>
+ </method>
<method name="instance_set_visible">
<return type="void">
</return>
@@ -1894,14 +1894,14 @@
</description>
</method>
<method name="multimesh_instance_get_transform" qualifiers="const">
- <return type="Transform">
+ <return type="Transform3D">
</return>
<argument index="0" name="multimesh" type="RID">
</argument>
<argument index="1" name="index" type="int">
</argument>
<description>
- Returns the [Transform] of the specified instance.
+ Returns the [Transform3D] of the specified instance.
</description>
</method>
<method name="multimesh_instance_get_transform_2d" qualifiers="const">
@@ -1948,10 +1948,10 @@
</argument>
<argument index="1" name="index" type="int">
</argument>
- <argument index="2" name="transform" type="Transform">
+ <argument index="2" name="transform" type="Transform3D">
</argument>
<description>
- Sets the [Transform] for this instance. Equivalent to [method MultiMesh.set_instance_transform].
+ Sets the [Transform3D] for this instance. Equivalent to [method MultiMesh.set_instance_transform].
</description>
</method>
<method name="multimesh_instance_set_transform_2d">
@@ -2142,10 +2142,10 @@
</return>
<argument index="0" name="particles" type="RID">
</argument>
- <argument index="1" name="transform" type="Transform">
+ <argument index="1" name="transform" type="Transform3D">
</argument>
<description>
- Sets the [Transform] that will be used by the particles when they first emit.
+ Sets the [Transform3D] that will be used by the particles when they first emit.
</description>
</method>
<method name="particles_set_emitting">
@@ -2590,14 +2590,14 @@
</description>
</method>
<method name="skeleton_bone_get_transform" qualifiers="const">
- <return type="Transform">
+ <return type="Transform3D">
</return>
<argument index="0" name="skeleton" type="RID">
</argument>
<argument index="1" name="bone" type="int">
</argument>
<description>
- Returns the [Transform] set for a specific bone of this skeleton.
+ Returns the [Transform3D] set for a specific bone of this skeleton.
</description>
</method>
<method name="skeleton_bone_get_transform_2d" qualifiers="const">
@@ -2618,10 +2618,10 @@
</argument>
<argument index="1" name="bone" type="int">
</argument>
- <argument index="2" name="transform" type="Transform">
+ <argument index="2" name="transform" type="Transform3D">
</argument>
<description>
- Sets the [Transform] for a specific bone of this skeleton.
+ Sets the [Transform3D] for a specific bone of this skeleton.
</description>
</method>
<method name="skeleton_bone_set_transform_2d">
@@ -2725,7 +2725,7 @@
</return>
<argument index="0" name="viewport" type="RID">
</argument>
- <argument index="1" name="rect" type="Rect2" default="Rect2( 0, 0, 0, 0 )">
+ <argument index="1" name="rect" type="Rect2" default="Rect2(0, 0, 0, 0)">
</argument>
<argument index="2" name="screen" type="int" default="0">
</argument>
@@ -3267,7 +3267,7 @@
Use [Transform2D] to store MultiMesh transform.
</constant>
<constant name="MULTIMESH_TRANSFORM_3D" value="1" enum="MultimeshTransformFormat">
- Use [Transform] to store MultiMesh transform.
+ Use [Transform3D] to store MultiMesh transform.
</constant>
<constant name="LIGHT_DIRECTIONAL" value="0" enum="LightType">
Is a directional (sun) light.
@@ -3388,7 +3388,7 @@
<constant name="PARTICLES_DRAW_ORDER_LIFETIME" value="1" enum="ParticlesDrawOrder">
Sort particles based on their lifetime.
</constant>
- <constant name="PARTICLES_DRAW_ORDER_VIEW_DEPTH" value="2" enum="ParticlesDrawOrder">
+ <constant name="PARTICLES_DRAW_ORDER_VIEW_DEPTH" value="3" enum="ParticlesDrawOrder">
Sort particles based on their distance to the camera.
</constant>
<constant name="VIEWPORT_UPDATE_DISABLED" value="0" enum="ViewportUpdateMode">
@@ -3477,14 +3477,14 @@
<constant name="VIEWPORT_DEBUG_DRAW_NORMAL_BUFFER" value="5" enum="ViewportDebugDraw">
Normal buffer is drawn instead of regular scene so you can see the per-pixel normals that will be used by post-processing effects.
</constant>
- <constant name="VIEWPORT_DEBUG_DRAW_GI_PROBE_ALBEDO" value="6" enum="ViewportDebugDraw">
- Objects are displayed with only the albedo value from [GIProbe]s.
+ <constant name="VIEWPORT_DEBUG_DRAW_VOXEL_GI_ALBEDO" value="6" enum="ViewportDebugDraw">
+ Objects are displayed with only the albedo value from [VoxelGI]s.
</constant>
- <constant name="VIEWPORT_DEBUG_DRAW_GI_PROBE_LIGHTING" value="7" enum="ViewportDebugDraw">
- Objects are displayed with only the lighting value from [GIProbe]s.
+ <constant name="VIEWPORT_DEBUG_DRAW_VOXEL_GI_LIGHTING" value="7" enum="ViewportDebugDraw">
+ Objects are displayed with only the lighting value from [VoxelGI]s.
</constant>
- <constant name="VIEWPORT_DEBUG_DRAW_GI_PROBE_EMISSION" value="8" enum="ViewportDebugDraw">
- Objects are displayed with only the emission color from [GIProbe]s.
+ <constant name="VIEWPORT_DEBUG_DRAW_VOXEL_GI_EMISSION" value="8" enum="ViewportDebugDraw">
+ Objects are displayed with only the emission color from [VoxelGI]s.
</constant>
<constant name="VIEWPORT_DEBUG_DRAW_SHADOW_ATLAS" value="9" enum="ViewportDebugDraw">
Draws the shadow atlas that stores shadows from [OmniLight3D]s and [SpotLight3D]s in the upper left quadrant of the [Viewport].
@@ -3694,15 +3694,15 @@
<constant name="INSTANCE_DECAL" value="8" enum="InstanceType">
The instance is a decal.
</constant>
- <constant name="INSTANCE_GI_PROBE" value="9" enum="InstanceType">
- The instance is a GI probe.
+ <constant name="INSTANCE_VOXEL_GI" value="9" enum="InstanceType">
+ The instance is a VoxelGI.
</constant>
<constant name="INSTANCE_LIGHTMAP" value="10" enum="InstanceType">
The instance is a lightmap.
</constant>
<constant name="INSTANCE_OCCLUDER" value="11" enum="InstanceType">
</constant>
- <constant name="INSTANCE_MAX" value="12" enum="InstanceType">
+ <constant name="INSTANCE_MAX" value="13" enum="InstanceType">
Represents the size of the [enum InstanceType] enum.
</constant>
<constant name="INSTANCE_GEOMETRY_MASK" value="30" enum="InstanceType">
diff --git a/doc/classes/Resource.xml b/doc/classes/Resource.xml
index 2548f8d911..c8800a3c25 100644
--- a/doc/classes/Resource.xml
+++ b/doc/classes/Resource.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Resource" inherits="Reference" version="4.0">
+<class name="Resource" inherits="RefCounted" version="4.0">
<brief_description>
Base class for all resources.
</brief_description>
<description>
- Resource is the base class for all Godot-specific resource types, serving primarily as data containers. Since they inherit from [Reference], resources are reference-counted and freed when no longer in use. They are also cached once loaded from disk, so that any further attempts to load a resource from a given path will return the same reference (all this in contrast to a [Node], which is not reference-counted and can be instanced from disk as many times as desired). Resources can be saved externally on disk or bundled into another object, such as a [Node] or another resource.
+ Resource is the base class for all Godot-specific resource types, serving primarily as data containers. Since they inherit from [RefCounted], resources are reference-counted and freed when no longer in use. They are also cached once loaded from disk, so that any further attempts to load a resource from a given path will return the same reference (all this in contrast to a [Node], which is not reference-counted and can be instantiated from disk as many times as desired). Resources can be saved externally on disk or bundled into another object, such as a [Node] or another resource.
[b]Note:[/b] In C#, resources will not be freed instantly after they are no longer in use. Instead, garbage collection will run periodically and will free resources that are no longer in use. This means that unused resources will linger on for a while before being removed.
</description>
<tutorials>
@@ -27,6 +27,7 @@
<description>
Duplicates the resource, returning a new resource. By default, sub-resources are shared between resource copies for efficiency. This can be changed by passing [code]true[/code] to the [code]subresources[/code] argument which will copy the subresources.
[b]Note:[/b] If [code]subresources[/code] is [code]true[/code], this method will only perform a shallow copy. Nested resources within subresources will not be duplicated and will still be shared.
+ [b]Note:[/b] When duplicating a resource, only [code]export[/code]ed properties are copied. Other properties will be set to their default value in the new resource.
</description>
</method>
<method name="emit_changed">
diff --git a/doc/classes/ResourceFormatLoader.xml b/doc/classes/ResourceFormatLoader.xml
index 9943f644cf..6abe5c813b 100644
--- a/doc/classes/ResourceFormatLoader.xml
+++ b/doc/classes/ResourceFormatLoader.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ResourceFormatLoader" inherits="Reference" version="4.0">
+<class name="ResourceFormatLoader" inherits="RefCounted" version="4.0">
<brief_description>
Loads a specific resource type from a file.
</brief_description>
@@ -11,7 +11,7 @@
<tutorials>
</tutorials>
<methods>
- <method name="get_dependencies" qualifiers="virtual">
+ <method name="_get_dependencies" qualifiers="virtual">
<return type="void">
</return>
<argument index="0" name="path" type="String">
@@ -23,14 +23,14 @@
[b]Note:[/b] Custom resource types defined by scripts aren't known by the [ClassDB], so you might just return [code]"Resource"[/code] for them.
</description>
</method>
- <method name="get_recognized_extensions" qualifiers="virtual">
+ <method name="_get_recognized_extensions" qualifiers="virtual">
<return type="PackedStringArray">
</return>
<description>
Gets the list of extensions for files this loader is able to read.
</description>
</method>
- <method name="get_resource_type" qualifiers="virtual">
+ <method name="_get_resource_type" qualifiers="virtual">
<return type="String">
</return>
<argument index="0" name="path" type="String">
@@ -40,7 +40,7 @@
[b]Note:[/b] Custom resource types defined by scripts aren't known by the [ClassDB], so you might just return [code]"Resource"[/code] for them.
</description>
</method>
- <method name="handles_type" qualifiers="virtual">
+ <method name="_handles_type" qualifiers="virtual">
<return type="bool">
</return>
<argument index="0" name="typename" type="StringName">
@@ -50,7 +50,7 @@
[b]Note:[/b] Custom resource types defined by scripts aren't known by the [ClassDB], so you might just handle [code]"Resource"[/code] for them.
</description>
</method>
- <method name="load" qualifiers="virtual">
+ <method name="_load" qualifiers="virtual">
<return type="Variant">
</return>
<argument index="0" name="path" type="String">
@@ -66,7 +66,7 @@
The [code]cache_mode[/code] property defines whether and how the cache should be used or updated when loading the resource. See [enum CacheMode] for details.
</description>
</method>
- <method name="rename_dependencies" qualifiers="virtual">
+ <method name="_rename_dependencies" qualifiers="virtual">
<return type="int">
</return>
<argument index="0" name="path" type="String">
diff --git a/doc/classes/ResourceFormatSaver.xml b/doc/classes/ResourceFormatSaver.xml
index 69f8b43898..df71e05d02 100644
--- a/doc/classes/ResourceFormatSaver.xml
+++ b/doc/classes/ResourceFormatSaver.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ResourceFormatSaver" inherits="Reference" version="4.0">
+<class name="ResourceFormatSaver" inherits="RefCounted" version="4.0">
<brief_description>
Saves a specific resource type to a file.
</brief_description>
@@ -10,16 +10,16 @@
<tutorials>
</tutorials>
<methods>
- <method name="get_recognized_extensions" qualifiers="virtual">
+ <method name="_get_recognized_extensions" qualifiers="virtual">
<return type="PackedStringArray">
</return>
<argument index="0" name="resource" type="Resource">
</argument>
<description>
- Returns the list of extensions available for saving the resource object, provided it is recognized (see [method recognize]).
+ Returns the list of extensions available for saving the resource object, provided it is recognized (see [method _recognize]).
</description>
</method>
- <method name="recognize" qualifiers="virtual">
+ <method name="_recognize" qualifiers="virtual">
<return type="bool">
</return>
<argument index="0" name="resource" type="Resource">
@@ -28,7 +28,7 @@
Returns whether the given resource object can be saved by this saver.
</description>
</method>
- <method name="save" qualifiers="virtual">
+ <method name="_save" qualifiers="virtual">
<return type="int">
</return>
<argument index="0" name="path" type="String">
diff --git a/doc/classes/ResourceImporter.xml b/doc/classes/ResourceImporter.xml
index 0475d2c94d..59900b1b73 100644
--- a/doc/classes/ResourceImporter.xml
+++ b/doc/classes/ResourceImporter.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ResourceImporter" inherits="Reference" version="4.0">
+<class name="ResourceImporter" inherits="RefCounted" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/ResourceLoader.xml b/doc/classes/ResourceLoader.xml
index c81b21333f..682d7b97f3 100644
--- a/doc/classes/ResourceLoader.xml
+++ b/doc/classes/ResourceLoader.xml
@@ -84,7 +84,7 @@
</return>
<argument index="0" name="path" type="String">
</argument>
- <argument index="1" name="progress" type="Array" default="[ ]">
+ <argument index="1" name="progress" type="Array" default="[]">
</argument>
<description>
Returns the status of a threaded loading operation started with [method load_threaded_request] for the resource at [code]path[/code]. See [enum ThreadLoadStatus] for possible return values.
diff --git a/doc/classes/ResourceSaver.xml b/doc/classes/ResourceSaver.xml
index ecde5754f9..437b0ce730 100644
--- a/doc/classes/ResourceSaver.xml
+++ b/doc/classes/ResourceSaver.xml
@@ -49,7 +49,7 @@
Do not save editor-specific metadata (identified by their [code]__editor[/code] prefix).
</constant>
<constant name="FLAG_SAVE_BIG_ENDIAN" value="16" enum="SaverFlags">
- Save as big endian (see [member File.endian_swap]).
+ Save as big endian (see [member File.big_endian]).
</constant>
<constant name="FLAG_COMPRESS" value="32" enum="SaverFlags">
Compress the resource on save using [constant File.COMPRESSION_ZSTD]. Only available for binary resource types.
diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml
index 7ca70f5a7a..623ee7520d 100644
--- a/doc/classes/RichTextLabel.xml
+++ b/doc/classes/RichTextLabel.xml
@@ -24,7 +24,7 @@
</argument>
<argument index="2" name="height" type="int" default="0">
</argument>
- <argument index="3" name="color" type="Color" default="Color( 1, 1, 1, 1 )">
+ <argument index="3" name="color" type="Color" default="Color(1, 1, 1, 1)">
</argument>
<argument index="4" name="inline_align" type="int" enum="VAlign" default="0">
</argument>
@@ -209,13 +209,13 @@
</argument>
<argument index="2" name="size" type="int">
</argument>
- <argument index="3" name="dropcap_margins" type="Rect2" default="Rect2( 0, 0, 0, 0 )">
+ <argument index="3" name="dropcap_margins" type="Rect2" default="Rect2(0, 0, 0, 0)">
</argument>
- <argument index="4" name="color" type="Color" default="Color( 1, 1, 1, 1 )">
+ <argument index="4" name="color" type="Color" default="Color(1, 1, 1, 1)">
</argument>
<argument index="5" name="outline_size" type="int" default="0">
</argument>
- <argument index="6" name="outline_color" type="Color" default="Color( 0, 0, 0, 0 )">
+ <argument index="6" name="outline_color" type="Color" default="Color(0, 0, 0, 0)">
</argument>
<description>
Adds a [code][dropcap][/code] tag to the tag stack. Drop cap (dropped capital) is a decorative element at the beginning of a paragraph that is larger than the rest of the text.
@@ -450,7 +450,7 @@
The label's text in BBCode format. Is not representative of manual modifications to the internal tag stack. Erases changes made by other methods when edited.
[b]Note:[/b] It is unadvised to use the [code]+=[/code] operator with [code]bbcode_text[/code] (e.g. [code]bbcode_text += "some string"[/code]) as it replaces the whole text and can cause slowdowns. Use [method append_bbcode] for adding text instead, unless you absolutely need to close a tag that was opened in an earlier method call.
</member>
- <member name="custom_effects" type="Array" setter="set_effects" getter="get_effects" default="[ ]">
+ <member name="custom_effects" type="Array" setter="set_effects" getter="get_effects" default="[]">
The currently installed custom effects. This is an array of [RichTextEffect]s.
To add a custom effect, it's more convenient to use [method install_effect].
</member>
@@ -484,7 +484,7 @@
<member name="structured_text_bidi_override" type="int" setter="set_structured_text_bidi_override" getter="get_structured_text_bidi_override" enum="Control.StructuredTextParser" default="0">
Set BiDi algorithm override for the structured text.
</member>
- <member name="structured_text_bidi_override_options" type="Array" setter="set_structured_text_bidi_override_options" getter="get_structured_text_bidi_override_options" default="[ ]">
+ <member name="structured_text_bidi_override_options" type="Array" setter="set_structured_text_bidi_override_options" getter="get_structured_text_bidi_override_options" default="[]">
Set additional options for BiDi override.
</member>
<member name="tab_size" type="int" setter="set_tab_size" getter="get_tab_size" default="4">
@@ -612,19 +612,19 @@
<theme_item name="bold_italics_font_size" type="int">
The font size used for bold italics text.
</theme_item>
- <theme_item name="default_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ <theme_item name="default_color" type="Color" default="Color(1, 1, 1, 1)">
The default text color.
</theme_item>
<theme_item name="focus" type="StyleBox">
The background The background used when the [RichTextLabel] is focused.
</theme_item>
- <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ <theme_item name="font_outline_color" type="Color" default="Color(1, 1, 1, 1)">
The default tint of text outline.
</theme_item>
- <theme_item name="font_selected_color" type="Color" default="Color( 0, 0, 0, 1 )">
+ <theme_item name="font_selected_color" type="Color" default="Color(0, 0, 0, 1)">
The color of selected text, used when [member selection_enabled] is [code]true[/code].
</theme_item>
- <theme_item name="font_shadow_color" type="Color" default="Color( 0, 0, 0, 0 )">
+ <theme_item name="font_shadow_color" type="Color" default="Color(0, 0, 0, 0)">
The color of the font's shadow.
</theme_item>
<theme_item name="italics_font" type="Font">
@@ -654,7 +654,7 @@
<theme_item name="outline_size" type="int" default="0">
The size of the text outline.
</theme_item>
- <theme_item name="selection_color" type="Color" default="Color( 0.1, 0.1, 1, 0.8 )">
+ <theme_item name="selection_color" type="Color" default="Color(0.1, 0.1, 1, 0.8)">
The color of the selection box.
</theme_item>
<theme_item name="shadow_as_outline" type="int" default="0">
@@ -666,16 +666,16 @@
<theme_item name="shadow_offset_y" type="int" default="1">
The vertical offset of the font's shadow.
</theme_item>
- <theme_item name="table_border" type="Color" default="Color( 0, 0, 0, 0 )">
+ <theme_item name="table_border" type="Color" default="Color(0, 0, 0, 0)">
The default cell border color.
</theme_item>
- <theme_item name="table_even_row_bg" type="Color" default="Color( 0, 0, 0, 0 )">
+ <theme_item name="table_even_row_bg" type="Color" default="Color(0, 0, 0, 0)">
The default background color for even rows.
</theme_item>
<theme_item name="table_hseparation" type="int" default="3">
The horizontal separation of elements in a table.
</theme_item>
- <theme_item name="table_odd_row_bg" type="Color" default="Color( 0, 0, 0, 0 )">
+ <theme_item name="table_odd_row_bg" type="Color" default="Color(0, 0, 0, 0)">
The default background color for odd rows.
</theme_item>
<theme_item name="table_vseparation" type="int" default="3">
diff --git a/doc/classes/RigidBody2D.xml b/doc/classes/RigidBody2D.xml
index ed375a8b1e..64573b7282 100644
--- a/doc/classes/RigidBody2D.xml
+++ b/doc/classes/RigidBody2D.xml
@@ -5,7 +5,7 @@
</brief_description>
<description>
This node implements simulated 2D physics. You do not control a RigidBody2D directly. Instead, you apply forces to it (gravity, impulses, etc.) and the physics simulation calculates the resulting movement based on its mass, friction, and other physical properties.
- A RigidBody2D has 4 behavior [member mode]s: Rigid, Static, Character, and Kinematic.
+ A RigidBody2D has 4 behavior [member mode]s: Dynamic, Static, DynamicLocked, and Kinematic.
[b]Note:[/b] You should not change a RigidBody2D's [code]position[/code] or [code]linear_velocity[/code] every frame or even very often. If you need to directly affect the body's state, use [method _integrate_forces], which allows you to directly access the physics state.
Please also keep in mind that physics bodies manage their own transform which overwrites the ones you set. So any direct or indirect transformation (including scaling of the node or its parent) will be visible in the editor only, and immediately reset at runtime.
If you need to override the default physics behavior or add a transformation at runtime, you can write a custom force integration. See [member custom_integrator].
@@ -39,7 +39,7 @@
</return>
<argument index="0" name="force" type="Vector2">
</argument>
- <argument index="1" name="position" type="Vector2" default="Vector2( 0, 0 )">
+ <argument index="1" name="position" type="Vector2" default="Vector2(0, 0)">
</argument>
<description>
Adds a positioned force to the body. Both the force and the offset from the body origin are in global coordinates.
@@ -57,7 +57,7 @@
<method name="apply_central_impulse">
<return type="void">
</return>
- <argument index="0" name="impulse" type="Vector2" default="Vector2( 0, 0 )">
+ <argument index="0" name="impulse" type="Vector2" default="Vector2(0, 0)">
</argument>
<description>
Applies a directional impulse without affecting rotation.
@@ -68,7 +68,7 @@
</return>
<argument index="0" name="impulse" type="Vector2">
</argument>
- <argument index="1" name="position" type="Vector2" default="Vector2( 0, 0 )">
+ <argument index="1" name="position" type="Vector2" default="Vector2(0, 0)">
</argument>
<description>
Applies a positioned impulse to the body. An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason it should only be used when simulating one-time impacts (use the "_force" functions otherwise). The position uses the rotation of the global coordinate system, but is centered at the object's origin.
@@ -100,21 +100,6 @@
Sets the body's velocity on the given axis. The velocity in the given vector axis will be set as the given vector length. This is useful for jumping behavior.
</description>
</method>
- <method name="test_motion">
- <return type="bool">
- </return>
- <argument index="0" name="motion" type="Vector2">
- </argument>
- <argument index="1" name="infinite_inertia" type="bool" default="true">
- </argument>
- <argument index="2" name="margin" type="float" default="0.08">
- </argument>
- <argument index="3" name="result" type="PhysicsTestMotionResult2D" default="null">
- </argument>
- <description>
- Returns [code]true[/code] if a collision would result from moving in the given vector. [code]margin[/code] increases the size of the shapes involved in the collision detection, and [code]result[/code] is an object of type [PhysicsTestMotionResult2D], which contains additional information about the collision (should there be one).
- </description>
- </method>
</methods>
<members>
<member name="angular_damp" type="float" setter="set_angular_damp" getter="get_angular_damp" default="-1.0">
@@ -124,7 +109,7 @@
<member name="angular_velocity" type="float" setter="set_angular_velocity" getter="get_angular_velocity" default="0.0">
The body's rotational velocity.
</member>
- <member name="applied_force" type="Vector2" setter="set_applied_force" getter="get_applied_force" default="Vector2( 0, 0 )">
+ <member name="applied_force" type="Vector2" setter="set_applied_force" getter="get_applied_force" default="Vector2(0, 0)">
The body's total applied force.
</member>
<member name="applied_torque" type="float" setter="set_applied_torque" getter="get_applied_torque" default="0.0">
@@ -132,7 +117,6 @@
</member>
<member name="can_sleep" type="bool" setter="set_can_sleep" getter="is_able_to_sleep" default="true">
If [code]true[/code], the body can enter sleep mode when there is no movement. See [member sleeping].
- [b]Note:[/b] A RigidBody2D will never enter sleep mode automatically if its [member mode] is [constant MODE_CHARACTER]. It can still be put to sleep manually by setting its [member sleeping] property to [code]true[/code].
</member>
<member name="contact_monitor" type="bool" setter="set_contact_monitor" getter="is_contact_monitor_enabled" default="false">
If [code]true[/code], the body will emit signals when it collides with another RigidBody2D. See also [member contacts_reported].
@@ -158,7 +142,7 @@
Damps the body's [member linear_velocity]. If [code]-1[/code], the body will use the [b]Default Linear Damp[/b] in [b]Project &gt; Project Settings &gt; Physics &gt; 2d[/b].
See [member ProjectSettings.physics/2d/default_linear_damp] for more details about damping.
</member>
- <member name="linear_velocity" type="Vector2" setter="set_linear_velocity" getter="get_linear_velocity" default="Vector2( 0, 0 )">
+ <member name="linear_velocity" type="Vector2" setter="set_linear_velocity" getter="get_linear_velocity" default="Vector2(0, 0)">
The body's linear velocity.
</member>
<member name="mass" type="float" setter="set_mass" getter="get_mass" default="1.0">
@@ -193,7 +177,7 @@
</description>
</signal>
<signal name="body_shape_entered">
- <argument index="0" name="body_id" type="int">
+ <argument index="0" name="body_rid" type="RID">
</argument>
<argument index="1" name="body" type="Node">
</argument>
@@ -210,7 +194,7 @@
</description>
</signal>
<signal name="body_shape_exited">
- <argument index="0" name="body_id" type="int">
+ <argument index="0" name="body_rid" type="RID">
</argument>
<argument index="1" name="body" type="Node">
</argument>
@@ -234,17 +218,17 @@
</signal>
</signals>
<constants>
- <constant name="MODE_RIGID" value="0" enum="Mode">
- Rigid mode. The body behaves as a physical object. It collides with other bodies and responds to forces applied to it. This is the default mode.
+ <constant name="MODE_DYNAMIC" value="0" enum="Mode">
+ Dynamic body mode. This is the default mode of a rigid body. It is affected by forces, and can move, rotate, and be affected by user code.
</constant>
<constant name="MODE_STATIC" value="1" enum="Mode">
- Static mode. The body behaves like a [StaticBody2D] and does not move.
+ Static body mode. The body behaves like a [StaticBody2D], and must be moved by code.
</constant>
- <constant name="MODE_CHARACTER" value="2" enum="Mode">
- Character mode. Similar to [constant MODE_RIGID], but the body can not rotate.
+ <constant name="MODE_DYNAMIC_LOCKED" value="2" enum="Mode">
+ Locked dynamic body mode. Similar to [constant MODE_DYNAMIC], but the body can not rotate.
</constant>
<constant name="MODE_KINEMATIC" value="3" enum="Mode">
- Kinematic mode. The body behaves like a [KinematicBody2D], and must be moved by code.
+ Kinematic body mode. The body behaves like a [StaticBody2D] with [member StaticBody2D.kinematic_motion] enabled, and must be moved by user code.
</constant>
<constant name="CCD_MODE_DISABLED" value="0" enum="CCDMode">
Continuous collision detection disabled. This is the fastest way to detect body collisions, but can miss small, fast-moving objects.
diff --git a/doc/classes/RigidBody3D.xml b/doc/classes/RigidBody3D.xml
index 1c6c8852a9..fb2b9690a3 100644
--- a/doc/classes/RigidBody3D.xml
+++ b/doc/classes/RigidBody3D.xml
@@ -5,7 +5,7 @@
</brief_description>
<description>
This is the node that implements full 3D physics. This means that you do not control a RigidBody3D directly. Instead, you can apply forces to it (gravity, impulses, etc.), and the physics simulation will calculate the resulting movement, collision, bouncing, rotating, etc.
- A RigidBody3D has 4 behavior [member mode]s: Rigid, Static, Character, and Kinematic.
+ A RigidBody3D has 4 behavior [member mode]s: Dynamic, Static, DynamicLocked, and Kinematic.
[b]Note:[/b] Don't change a RigidBody3D's position every frame or very often. Sporadic changes work fine, but physics runs at a different granularity (fixed Hz) than usual rendering (process callback) and maybe even in a separate thread, so changing this from a process loop may result in strange behavior. If you need to directly affect the body's state, use [method _integrate_forces], which allows you to directly access the physics state.
If you need to override the default physics behavior, you can write a custom force integration function. See [member custom_integrator].
With Bullet physics (the default), the center of mass is the RigidBody3D center. With GodotPhysics, the center of mass is the average of the [CollisionShape3D] centers.
@@ -40,7 +40,7 @@
</return>
<argument index="0" name="force" type="Vector3">
</argument>
- <argument index="1" name="position" type="Vector3" default="Vector3( 0, 0, 0 )">
+ <argument index="1" name="position" type="Vector3" default="Vector3(0, 0, 0)">
</argument>
<description>
Adds a constant directional force (i.e. acceleration).
@@ -71,7 +71,7 @@
</return>
<argument index="0" name="impulse" type="Vector3">
</argument>
- <argument index="1" name="position" type="Vector3" default="Vector3( 0, 0, 0 )">
+ <argument index="1" name="position" type="Vector3" default="Vector3(0, 0, 0)">
</argument>
<description>
Applies a positioned impulse to the body. An impulse is time independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason it should only be used when simulating one-time impacts. The position uses the rotation of the global coordinate system, but is centered at the object's origin.
@@ -86,15 +86,6 @@
Applies a torque impulse which will be affected by the body mass and shape. This will rotate the body around the [code]impulse[/code] vector passed.
</description>
</method>
- <method name="get_axis_lock" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="axis" type="int" enum="PhysicsServer3D.BodyAxis">
- </argument>
- <description>
- Returns [code]true[/code] if the specified linear or rotational axis is locked.
- </description>
- </method>
<method name="get_colliding_bodies" qualifiers="const">
<return type="Array">
</return>
@@ -103,24 +94,13 @@
[b]Note:[/b] The result of this test is not immediate after moving objects. For performance, list of collisions is updated once per frame and before the physics step. Consider using signals instead.
</description>
</method>
- <method name="get_inverse_inertia_tensor">
+ <method name="get_inverse_inertia_tensor" qualifiers="const">
<return type="Basis">
</return>
<description>
Returns the inverse inertia tensor basis. This is used to calculate the angular acceleration resulting from a torque applied to the [RigidBody3D].
</description>
</method>
- <method name="set_axis_lock">
- <return type="void">
- </return>
- <argument index="0" name="axis" type="int" enum="PhysicsServer3D.BodyAxis">
- </argument>
- <argument index="1" name="lock" type="bool">
- </argument>
- <description>
- Locks the specified linear or rotational axis.
- </description>
- </method>
<method name="set_axis_velocity">
<return type="void">
</return>
@@ -136,30 +116,11 @@
Damps RigidBody3D's rotational forces.
See [member ProjectSettings.physics/3d/default_angular_damp] for more details about damping.
</member>
- <member name="angular_velocity" type="Vector3" setter="set_angular_velocity" getter="get_angular_velocity" default="Vector3( 0, 0, 0 )">
+ <member name="angular_velocity" type="Vector3" setter="set_angular_velocity" getter="get_angular_velocity" default="Vector3(0, 0, 0)">
RigidBody3D's rotational velocity.
</member>
- <member name="axis_lock_angular_x" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false">
- Lock the body's rotation in the X axis.
- </member>
- <member name="axis_lock_angular_y" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false">
- Lock the body's rotation in the Y axis.
- </member>
- <member name="axis_lock_angular_z" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false">
- Lock the body's rotation in the Z axis.
- </member>
- <member name="axis_lock_linear_x" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false">
- Lock the body's movement in the X axis.
- </member>
- <member name="axis_lock_linear_y" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false">
- Lock the body's movement in the Y axis.
- </member>
- <member name="axis_lock_linear_z" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false">
- Lock the body's movement in the Z axis.
- </member>
<member name="can_sleep" type="bool" setter="set_can_sleep" getter="is_able_to_sleep" default="true">
If [code]true[/code], the body can enter sleep mode when there is no movement. See [member sleeping].
- [b]Note:[/b] A RigidBody3D will never enter sleep mode automatically if its [member mode] is [constant MODE_CHARACTER]. It can still be put to sleep manually by setting its [member sleeping] property to [code]true[/code].
</member>
<member name="contact_monitor" type="bool" setter="set_contact_monitor" getter="is_contact_monitor_enabled" default="false">
If [code]true[/code], the RigidBody3D will emit signals when it collides with another RigidBody3D. See also [member contacts_reported].
@@ -182,7 +143,7 @@
The body's linear damp. Cannot be less than -1.0. If this value is different from -1.0, any linear damp derived from the world or areas will be overridden.
See [member ProjectSettings.physics/3d/default_linear_damp] for more details about damping.
</member>
- <member name="linear_velocity" type="Vector3" setter="set_linear_velocity" getter="get_linear_velocity" default="Vector3( 0, 0, 0 )">
+ <member name="linear_velocity" type="Vector3" setter="set_linear_velocity" getter="get_linear_velocity" default="Vector3(0, 0, 0)">
The body's linear velocity. Can be used sporadically, but [b]don't set this every frame[/b], because physics may run in another thread and runs at a different granularity. Use [method _integrate_forces] as your process loop for precise control of the body state.
</member>
<member name="mass" type="float" setter="set_mass" getter="get_mass" default="1.0">
@@ -217,7 +178,7 @@
</description>
</signal>
<signal name="body_shape_entered">
- <argument index="0" name="body_id" type="int">
+ <argument index="0" name="body_rid" type="RID">
</argument>
<argument index="1" name="body" type="Node">
</argument>
@@ -235,7 +196,7 @@
</description>
</signal>
<signal name="body_shape_exited">
- <argument index="0" name="body_id" type="int">
+ <argument index="0" name="body_rid" type="RID">
</argument>
<argument index="1" name="body" type="Node">
</argument>
@@ -260,17 +221,17 @@
</signal>
</signals>
<constants>
- <constant name="MODE_RIGID" value="0" enum="Mode">
- Rigid body mode. This is the "natural" state of a rigid body. It is affected by forces, and can move, rotate, and be affected by user code.
+ <constant name="MODE_DYNAMIC" value="0" enum="Mode">
+ Dynamic body mode. This is the default mode of a rigid body. It is affected by forces, and can move, rotate, and be affected by user code.
</constant>
<constant name="MODE_STATIC" value="1" enum="Mode">
- Static mode. The body behaves like a [StaticBody3D], and can only move by user code.
+ Static body mode. The body behaves like a [StaticBody3D], and can only move by user code.
</constant>
- <constant name="MODE_CHARACTER" value="2" enum="Mode">
- Character body mode. This behaves like a rigid body, but can not rotate.
+ <constant name="MODE_DYNAMIC_LOCKED" value="2" enum="Mode">
+ Locked dynamic body mode. Similar to [constant MODE_DYNAMIC], but the body can not rotate.
</constant>
<constant name="MODE_KINEMATIC" value="3" enum="Mode">
- Kinematic body mode. The body behaves like a [KinematicBody3D], and can only move by user code.
+ Kinematic body mode. The body behaves like a [StaticBody3D] with [member StaticBody3D.kinematic_motion] enabled, and can only move by user code.
</constant>
</constants>
</class>
diff --git a/doc/classes/SceneState.xml b/doc/classes/SceneState.xml
index abc429d5fe..6d804cc697 100644
--- a/doc/classes/SceneState.xml
+++ b/doc/classes/SceneState.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SceneState" inherits="Reference" version="4.0">
+<class name="SceneState" inherits="RefCounted" version="4.0">
<brief_description>
A script interface to a scene file's data.
</brief_description>
@@ -95,7 +95,7 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
- Returns the node's index, which is its position relative to its siblings. This is only relevant and saved in scenes for cases where new nodes are added to an instanced or inherited scene among siblings from the base scene. Despite the name, this index is not related to the [code]idx[/code] argument used here and in other methods.
+ Returns the node's index, which is its position relative to its siblings. This is only relevant and saved in scenes for cases where new nodes are added to an instantiated or inherited scene among siblings from the base scene. Despite the name, this index is not related to the [code]idx[/code] argument used here and in other methods.
</description>
</method>
<method name="get_node_instance" qualifiers="const">
@@ -199,14 +199,14 @@
</methods>
<constants>
<constant name="GEN_EDIT_STATE_DISABLED" value="0" enum="GenEditState">
- If passed to [method PackedScene.instance], blocks edits to the scene state.
+ If passed to [method PackedScene.instantiate], blocks edits to the scene state.
</constant>
<constant name="GEN_EDIT_STATE_INSTANCE" value="1" enum="GenEditState">
- If passed to [method PackedScene.instance], provides inherited scene resources to the local scene.
+ If passed to [method PackedScene.instantiate], provides inherited scene resources to the local scene.
[b]Note:[/b] Only available in editor builds.
</constant>
<constant name="GEN_EDIT_STATE_MAIN" value="2" enum="GenEditState">
- If passed to [method PackedScene.instance], provides local scene resources to the local scene. Only the main scene should receive the main edit state.
+ If passed to [method PackedScene.instantiate], provides local scene resources to the local scene. Only the main scene should receive the main edit state.
[b]Note:[/b] Only available in editor builds.
</constant>
</constants>
diff --git a/doc/classes/SceneTree.xml b/doc/classes/SceneTree.xml
index 06800082cb..d327e8cbca 100644
--- a/doc/classes/SceneTree.xml
+++ b/doc/classes/SceneTree.xml
@@ -90,6 +90,13 @@
The timer will be automatically freed after its time elapses.
</description>
</method>
+ <method name="create_tween">
+ <return type="Tween">
+ </return>
+ <description>
+ Creates and returns a new [Tween].
+ </description>
+ </method>
<method name="get_first_node_in_group">
<return type="Node">
</return>
@@ -135,6 +142,13 @@
Returns a list of all nodes assigned to the given group.
</description>
</method>
+ <method name="get_processed_tweens">
+ <return type="Array">
+ </return>
+ <description>
+ Returns an array of currently exising [Tween]s in the [SceneTree] (both running and paused).
+ </description>
+ </method>
<method name="get_rpc_sender_id" qualifiers="const">
<return type="int">
</return>
@@ -207,6 +221,7 @@
Quits the application at the end of the current iteration. Argument [code]exit_code[/code] can optionally be given (defaulting to 0) to customize the exit status code.
By convention, an exit code of [code]0[/code] indicates success whereas a non-zero exit code indicates an error.
For portability reasons, the exit code should be set between 0 and 125 (inclusive).
+ [b]Note:[/b] On iOS this method doesn't work. Instead, as recommended by the iOS Human Interface Guidelines, the user is expected to close apps via the Home button.
</description>
</method>
<method name="reload_current_scene">
diff --git a/doc/classes/SceneTreeTimer.xml b/doc/classes/SceneTreeTimer.xml
index b223bf6821..4eef754345 100644
--- a/doc/classes/SceneTreeTimer.xml
+++ b/doc/classes/SceneTreeTimer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SceneTreeTimer" inherits="Reference" version="4.0">
+<class name="SceneTreeTimer" inherits="RefCounted" version="4.0">
<brief_description>
One-shot timer.
</brief_description>
diff --git a/doc/classes/Script.xml b/doc/classes/Script.xml
index 56272760bd..e7527d73e2 100644
--- a/doc/classes/Script.xml
+++ b/doc/classes/Script.xml
@@ -11,11 +11,11 @@
<link title="Scripting">https://docs.godotengine.org/en/latest/getting_started/step_by_step/scripting.html</link>
</tutorials>
<methods>
- <method name="can_instance" qualifiers="const">
+ <method name="can_instantiate" qualifiers="const">
<return type="bool">
</return>
<description>
- Returns [code]true[/code] if the script can be instanced.
+ Returns [code]true[/code] if the script can be instantiated.
</description>
</method>
<method name="get_base_script" qualifiers="const">
diff --git a/doc/classes/ScriptEditor.xml b/doc/classes/ScriptEditor.xml
index 28620bd29b..31dbf7453f 100644
--- a/doc/classes/ScriptEditor.xml
+++ b/doc/classes/ScriptEditor.xml
@@ -9,30 +9,6 @@
<tutorials>
</tutorials>
<methods>
- <method name="can_drop_data_fw" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="point" type="Vector2">
- </argument>
- <argument index="1" name="data" type="Variant">
- </argument>
- <argument index="2" name="from" type="Control">
- </argument>
- <description>
- </description>
- </method>
- <method name="drop_data_fw">
- <return type="void">
- </return>
- <argument index="0" name="point" type="Vector2">
- </argument>
- <argument index="1" name="data" type="Variant">
- </argument>
- <argument index="2" name="from" type="Control">
- </argument>
- <description>
- </description>
- </method>
<method name="get_current_editor" qualifiers="const">
<return type="ScriptEditorBase">
</return>
@@ -47,16 +23,6 @@
Returns a [Script] that is currently active in editor.
</description>
</method>
- <method name="get_drag_data_fw">
- <return type="Variant">
- </return>
- <argument index="0" name="point" type="Vector2">
- </argument>
- <argument index="1" name="from" type="Control">
- </argument>
- <description>
- </description>
- </method>
<method name="get_open_script_editors" qualifiers="const">
<return type="Array">
</return>
diff --git a/doc/classes/ScriptEditorBase.xml b/doc/classes/ScriptEditorBase.xml
index ee498de302..a135062bd8 100644
--- a/doc/classes/ScriptEditorBase.xml
+++ b/doc/classes/ScriptEditorBase.xml
@@ -9,7 +9,7 @@
<tutorials>
</tutorials>
<methods>
- <method name="add_syntax_highlighter" qualifiers="virtual">
+ <method name="_add_syntax_highlighter" qualifiers="virtual">
<return type="void">
</return>
<argument index="0" name="highlighter" type="Object">
@@ -18,6 +18,13 @@
Adds a [EditorSyntaxHighlighter] to the open script.
</description>
</method>
+ <method name="get_base_editor" qualifiers="const">
+ <return type="Control">
+ </return>
+ <description>
+ Returns the underlying [Control] used for editing scripts. This can be either [CodeEdit] (for text scripts) or [GraphEdit] (for visual scripts).
+ </description>
+ </method>
</methods>
<signals>
<signal name="edited_script_changed">
diff --git a/doc/classes/ScrollContainer.xml b/doc/classes/ScrollContainer.xml
index 9c5634f43a..60f3106b4b 100644
--- a/doc/classes/ScrollContainer.xml
+++ b/doc/classes/ScrollContainer.xml
@@ -11,6 +11,15 @@
<tutorials>
</tutorials>
<methods>
+ <method name="ensure_control_visible">
+ <return type="void">
+ </return>
+ <argument index="0" name="control" type="Control">
+ </argument>
+ <description>
+ Ensures the given [code]control[/code] is visible (must be a direct or indirect child of the ScrollContainer). Used by [member follow_focus].
+ </description>
+ </method>
<method name="get_h_scrollbar">
<return type="HScrollBar">
</return>
@@ -39,12 +48,18 @@
<member name="scroll_horizontal_enabled" type="bool" setter="set_enable_h_scroll" getter="is_h_scroll_enabled" default="true">
If [code]true[/code], enables horizontal scrolling.
</member>
+ <member name="scroll_horizontal_visible" type="bool" setter="set_h_scroll_visible" getter="is_h_scroll_visible" default="true">
+ If [code]false[/code], hides the horizontal scrollbar.
+ </member>
<member name="scroll_vertical" type="int" setter="set_v_scroll" getter="get_v_scroll" default="0">
The current vertical scroll value.
</member>
<member name="scroll_vertical_enabled" type="bool" setter="set_enable_v_scroll" getter="is_v_scroll_enabled" default="true">
If [code]true[/code], enables vertical scrolling.
</member>
+ <member name="scroll_vertical_visible" type="bool" setter="set_v_scroll_visible" getter="is_v_scroll_visible" default="true">
+ If [code]false[/code], hides the vertical scrollbar.
+ </member>
</members>
<signals>
<signal name="scroll_ended">
diff --git a/doc/classes/SegmentShape2D.xml b/doc/classes/SegmentShape2D.xml
index 31c0f7f1f3..341c5e9d20 100644
--- a/doc/classes/SegmentShape2D.xml
+++ b/doc/classes/SegmentShape2D.xml
@@ -11,10 +11,10 @@
<methods>
</methods>
<members>
- <member name="a" type="Vector2" setter="set_a" getter="get_a" default="Vector2( 0, 0 )">
+ <member name="a" type="Vector2" setter="set_a" getter="get_a" default="Vector2(0, 0)">
The segment's first point position.
</member>
- <member name="b" type="Vector2" setter="set_b" getter="get_b" default="Vector2( 0, 10 )">
+ <member name="b" type="Vector2" setter="set_b" getter="get_b" default="Vector2(0, 10)">
The segment's second point position.
</member>
</members>
diff --git a/doc/classes/Semaphore.xml b/doc/classes/Semaphore.xml
index f311e1c72f..e8b405e52a 100644
--- a/doc/classes/Semaphore.xml
+++ b/doc/classes/Semaphore.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Semaphore" inherits="Reference" version="4.0">
+<class name="Semaphore" inherits="RefCounted" version="4.0">
<brief_description>
A synchronization semaphore.
</brief_description>
diff --git a/doc/classes/Shape3D.xml b/doc/classes/Shape3D.xml
index f8b749aebf..b5f70132d7 100644
--- a/doc/classes/Shape3D.xml
+++ b/doc/classes/Shape3D.xml
@@ -10,6 +10,13 @@
<link title="Physics introduction">https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html</link>
</tutorials>
<methods>
+ <method name="get_debug_mesh">
+ <return type="ArrayMesh">
+ </return>
+ <description>
+ Returns the [ArrayMesh] used to draw the debug collision for this [Shape3D].
+ </description>
+ </method>
</methods>
<members>
<member name="margin" type="float" setter="set_margin" getter="get_margin" default="0.04">
diff --git a/doc/classes/Signal.xml b/doc/classes/Signal.xml
index 84efc974c0..1fd70a43fd 100644
--- a/doc/classes/Signal.xml
+++ b/doc/classes/Signal.xml
@@ -40,7 +40,7 @@
</return>
<argument index="0" name="callable" type="Callable">
</argument>
- <argument index="1" name="binds" type="Array" default="[ ]">
+ <argument index="1" name="binds" type="Array" default="[]">
</argument>
<argument index="2" name="flags" type="int" default="0">
</argument>
diff --git a/doc/classes/Skeleton2D.xml b/doc/classes/Skeleton2D.xml
index 0ddbac9ba4..6665a4a9f6 100644
--- a/doc/classes/Skeleton2D.xml
+++ b/doc/classes/Skeleton2D.xml
@@ -10,6 +10,17 @@
<link title="2D skeletons">https://docs.godotengine.org/en/latest/tutorials/animation/2d_skeletons.html</link>
</tutorials>
<methods>
+ <method name="execute_modifications">
+ <return type="void">
+ </return>
+ <argument index="0" name="delta" type="float">
+ </argument>
+ <argument index="1" name="execution_mode" type="int">
+ </argument>
+ <description>
+ Executes all the modifications on the [SkeletonModificationStack2D], if the Skeleton3D has one assigned.
+ </description>
+ </method>
<method name="get_bone">
<return type="Bone2D">
</return>
@@ -26,6 +37,22 @@
Returns the number of [Bone2D] nodes in the node hierarchy parented by Skeleton2D.
</description>
</method>
+ <method name="get_bone_local_pose_override">
+ <return type="Transform2D">
+ </return>
+ <argument index="0" name="bone_idx" type="int">
+ </argument>
+ <description>
+ Returns the local pose override transform for [code]bone_idx[/code].
+ </description>
+ </method>
+ <method name="get_modification_stack" qualifiers="const">
+ <return type="SkeletonModificationStack2D">
+ </return>
+ <description>
+ Returns the [SkeletonModificationStack2D] attached to this skeleton, if one exists.
+ </description>
+ </method>
<method name="get_skeleton" qualifiers="const">
<return type="RID">
</return>
@@ -33,10 +60,37 @@
Returns the [RID] of a Skeleton2D instance.
</description>
</method>
+ <method name="set_bone_local_pose_override">
+ <return type="void">
+ </return>
+ <argument index="0" name="bone_idx" type="int">
+ </argument>
+ <argument index="1" name="override_pose" type="Transform2D">
+ </argument>
+ <argument index="2" name="strength" type="float">
+ </argument>
+ <argument index="3" name="persistent" type="bool">
+ </argument>
+ <description>
+ Sets the local pose transform, [code]pose[/code], for the bone at [code]bone_idx[/code].
+ [code]amount[/code] is the interpolation strengh that will be used when applying the pose, and [code]persistent[/code] determines if the applied pose will remain.
+ [b]Note:[/b] The pose transform needs to be a local transform relative to the [Bone2D] node at [code]bone_idx[/code]!
+ </description>
+ </method>
+ <method name="set_modification_stack">
+ <return type="void">
+ </return>
+ <argument index="0" name="modification_stack" type="SkeletonModificationStack2D">
+ </argument>
+ <description>
+ Sets the [SkeletonModificationStack2D] attached to this skeleton.
+ </description>
+ </method>
</methods>
<signals>
<signal name="bone_setup_changed">
<description>
+ Emitted when the [Bone2D] setup attached to this skeletons changes. This is primarily used internally within the skeleton.
</description>
</signal>
</signals>
diff --git a/doc/classes/Skeleton3D.xml b/doc/classes/Skeleton3D.xml
index c6dd6fb142..136f2f0a63 100644
--- a/doc/classes/Skeleton3D.xml
+++ b/doc/classes/Skeleton3D.xml
@@ -22,21 +22,10 @@
Adds a bone, with name [code]name[/code]. [method get_bone_count] will become the bone index.
</description>
</method>
- <method name="bind_child_node_to_bone">
- <return type="void">
- </return>
- <argument index="0" name="bone_idx" type="int">
- </argument>
- <argument index="1" name="node" type="Node">
- </argument>
- <description>
- [i]Deprecated soon.[/i]
- </description>
- </method>
<method name="bone_transform_to_world_transform">
- <return type="Transform">
+ <return type="Transform3D">
</return>
- <argument index="0" name="bone_transform" type="Transform">
+ <argument index="0" name="bone_transform" type="Transform3D">
</argument>
<description>
Takes the given bone pose/transform and converts it to a world transform, relative to the [Skeleton3D] node.
@@ -74,7 +63,7 @@
</description>
</method>
<method name="get_bone_custom_pose" qualifiers="const">
- <return type="Transform">
+ <return type="Transform3D">
</return>
<argument index="0" name="bone_idx" type="int">
</argument>
@@ -83,7 +72,7 @@
</description>
</method>
<method name="get_bone_global_pose" qualifiers="const">
- <return type="Transform">
+ <return type="Transform3D">
</return>
<argument index="0" name="bone_idx" type="int">
</argument>
@@ -91,6 +80,15 @@
Returns the overall transform of the specified bone, with respect to the skeleton. Being relative to the skeleton frame, this is not the actual "global" transform of the bone.
</description>
</method>
+ <method name="get_bone_global_pose_no_override" qualifiers="const">
+ <return type="Transform3D">
+ </return>
+ <argument index="0" name="bone_idx" type="int">
+ </argument>
+ <description>
+ Returns the overall transform of the specified bone, with respect to the skeleton, but without any global pose overrides. Being relative to the skeleton frame, this is not the actual "global" transform of the bone.
+ </description>
+ </method>
<method name="get_bone_name" qualifiers="const">
<return type="String">
</return>
@@ -111,7 +109,7 @@
</description>
</method>
<method name="get_bone_pose" qualifiers="const">
- <return type="Transform">
+ <return type="Transform3D">
</return>
<argument index="0" name="bone_idx" type="int">
</argument>
@@ -126,7 +124,7 @@
</description>
</method>
<method name="get_bone_rest" qualifiers="const">
- <return type="Transform">
+ <return type="Transform3D">
</return>
<argument index="0" name="bone_idx" type="int">
</argument>
@@ -134,15 +132,6 @@
Returns the rest transform for a bone [code]bone_idx[/code].
</description>
</method>
- <method name="get_bound_child_nodes_to_bone" qualifiers="const">
- <return type="Array">
- </return>
- <argument index="0" name="bone_idx" type="int">
- </argument>
- <description>
- [i]Deprecated soon.[/i]
- </description>
- </method>
<method name="is_bone_rest_disabled" qualifiers="const">
<return type="bool">
</return>
@@ -182,7 +171,7 @@
<method name="physical_bones_start_simulation">
<return type="void">
</return>
- <argument index="0" name="bones" type="StringName[]" default="[ ]">
+ <argument index="0" name="bones" type="StringName[]" default="[]">
</argument>
<description>
Tells the [PhysicalBone3D] nodes in the Skeleton to start simulating and reacting to the physics world.
@@ -210,7 +199,7 @@
</return>
<argument index="0" name="bone_idx" type="int">
</argument>
- <argument index="1" name="custom_pose" type="Transform">
+ <argument index="1" name="custom_pose" type="Transform3D">
</argument>
<description>
Sets the custom pose transform, [code]custom_pose[/code], for the bone at [code]bone_idx[/code]. This pose is an addition to the bone rest pose.
@@ -233,7 +222,7 @@
</return>
<argument index="0" name="bone_idx" type="int">
</argument>
- <argument index="1" name="pose" type="Transform">
+ <argument index="1" name="pose" type="Transform3D">
</argument>
<argument index="2" name="amount" type="float">
</argument>
@@ -272,7 +261,7 @@
</return>
<argument index="0" name="bone_idx" type="int">
</argument>
- <argument index="1" name="pose" type="Transform">
+ <argument index="1" name="pose" type="Transform3D">
</argument>
<description>
Sets the pose transform for bone [code]bone_idx[/code].
@@ -284,23 +273,12 @@
</return>
<argument index="0" name="bone_idx" type="int">
</argument>
- <argument index="1" name="rest" type="Transform">
+ <argument index="1" name="rest" type="Transform3D">
</argument>
<description>
Sets the rest transform for bone [code]bone_idx[/code].
</description>
</method>
- <method name="unbind_child_node_from_bone">
- <return type="void">
- </return>
- <argument index="0" name="bone_idx" type="int">
- </argument>
- <argument index="1" name="node" type="Node">
- </argument>
- <description>
- [i]Deprecated soon.[/i]
- </description>
- </method>
<method name="unparent_bone_and_rest">
<return type="void">
</return>
@@ -311,9 +289,9 @@
</description>
</method>
<method name="world_transform_to_bone_transform">
- <return type="Transform">
+ <return type="Transform3D">
</return>
- <argument index="0" name="world_transform" type="Transform">
+ <argument index="0" name="world_transform" type="Transform3D">
</argument>
<description>
Takes the given world transform, relative to the [Skeleton3D], and converts it to a bone pose/transform.
diff --git a/doc/classes/SkeletonIK3D.xml b/doc/classes/SkeletonIK3D.xml
index 5193109447..138ebe4411 100644
--- a/doc/classes/SkeletonIK3D.xml
+++ b/doc/classes/SkeletonIK3D.xml
@@ -38,7 +38,7 @@
<members>
<member name="interpolation" type="float" setter="set_interpolation" getter="get_interpolation" default="1.0">
</member>
- <member name="magnet" type="Vector3" setter="set_magnet_position" getter="get_magnet_position" default="Vector3( 0, 0, 0 )">
+ <member name="magnet" type="Vector3" setter="set_magnet_position" getter="get_magnet_position" default="Vector3(0, 0, 0)">
</member>
<member name="max_iterations" type="int" setter="set_max_iterations" getter="get_max_iterations" default="10">
</member>
@@ -46,13 +46,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="StringName" setter="set_root_bone" getter="get_root_bone" default="@&quot;&quot;">
+ <member name="root_bone" type="StringName" setter="set_root_bone" getter="get_root_bone" default="&amp;&quot;&quot;">
</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 name="target" type="Transform3D" setter="set_target_transform" getter="get_target_transform" default="Transform3D(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(&quot;&quot;)">
</member>
- <member name="tip_bone" type="StringName" setter="set_tip_bone" getter="get_tip_bone" default="@&quot;&quot;">
+ <member name="tip_bone" type="StringName" setter="set_tip_bone" getter="get_tip_bone" default="&amp;&quot;&quot;">
</member>
<member name="use_magnet" type="bool" setter="set_use_magnet" getter="is_using_magnet" default="false">
</member>
diff --git a/doc/classes/SkeletonModification2D.xml b/doc/classes/SkeletonModification2D.xml
new file mode 100644
index 0000000000..8596dac76e
--- /dev/null
+++ b/doc/classes/SkeletonModification2D.xml
@@ -0,0 +1,104 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="SkeletonModification2D" inherits="Resource" version="4.0">
+ <brief_description>
+ A resource that operates on [Bone2D] nodes in a [Skeleton2D].
+ </brief_description>
+ <description>
+ This resource provides an interface that can be expanded so code that operates on [Bone2D] nodes in a [Skeleton2D] can be mixed and matched together to create complex interactions.
+ This is used to provide Godot with a flexible and powerful Inverse Kinematics solution that can be adapted for many different uses.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="_draw_editor_gizmo" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <description>
+ Used for drawing [b]editor-only[/b] modification gizmos. This function will only be called in the Godot editor and can be overriden to draw custom gizmos.
+ [b]Note:[/b] You will need to use the Skeleton2D from [method SkeletonModificationStack2D.get_skeleton] and it's draw functions, as the [SkeletonModification2D] resource cannot draw on its own.
+ </description>
+ </method>
+ <method name="_execute" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <argument index="0" name="delta" type="float">
+ </argument>
+ <description>
+ Executes the given modification. This is where the modification performs whatever function it is designed to do.
+ </description>
+ </method>
+ <method name="_setup_modification" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <argument index="0" name="modification_stack" type="SkeletonModificationStack2D">
+ </argument>
+ <description>
+ Called when the modification is setup. This is where the modification performs initialization.
+ </description>
+ </method>
+ <method name="clamp_angle">
+ <return type="float">
+ </return>
+ <argument index="0" name="angle" type="float">
+ </argument>
+ <argument index="1" name="min" type="float">
+ </argument>
+ <argument index="2" name="max" type="float">
+ </argument>
+ <argument index="3" name="invert" type="bool">
+ </argument>
+ <description>
+ Takes a angle and clamps it so it is within the passed-in [code]min[/code] and [code]max[/code] range. [code]invert[/code] will inversely clamp the angle, clamping it to the range outside of the given bounds.
+ </description>
+ </method>
+ <method name="get_editor_draw_gizmo" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns whether this modification will call [method _draw_editor_gizmo] in the Godot editor to draw modification-specific gizmos.
+ </description>
+ </method>
+ <method name="get_is_setup" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns whether this modification has been successfully setup or not.
+ </description>
+ </method>
+ <method name="get_modification_stack">
+ <return type="SkeletonModificationStack2D">
+ </return>
+ <description>
+ Returns the [SkeletonModificationStack2D] that this modification is bound to. Through the modification stack, you can access the Skeleton3D the modification is operating on.
+ </description>
+ </method>
+ <method name="set_editor_draw_gizmo">
+ <return type="void">
+ </return>
+ <argument index="0" name="draw_gizmo" type="bool">
+ </argument>
+ <description>
+ Sets whether this modification will call [method _draw_editor_gizmo] in the Godot editor to draw modification-specific gizmos.
+ </description>
+ </method>
+ <method name="set_is_setup">
+ <return type="void">
+ </return>
+ <argument index="0" name="is_setup" type="bool">
+ </argument>
+ <description>
+ Manually allows you to set the setup state of the modification. This function should only rarely be used, as the [SkeletonModificationStack2D] the modification is bound to should handle setting the modification up.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="enabled" type="bool" setter="set_enabled" getter="get_enabled" default="true">
+ If [code]true[/code], the modification's [method _execute] function will be called by the [SkeletonModificationStack2D].
+ </member>
+ <member name="execution_mode" type="int" setter="set_execution_mode" getter="get_execution_mode" default="0">
+ The execution mode for the modification. This tells the modification stack when to execute the modification. Some modifications have settings that are only availible in certain execution modes.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/SkeletonModification2DCCDIK.xml b/doc/classes/SkeletonModification2DCCDIK.xml
new file mode 100644
index 0000000000..014d366a42
--- /dev/null
+++ b/doc/classes/SkeletonModification2DCCDIK.xml
@@ -0,0 +1,170 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="SkeletonModification2DCCDIK" inherits="SkeletonModification2D" version="4.0">
+ <brief_description>
+ A modification that uses CCDIK to manipulate a series of bones to reach a target in 2D.
+ </brief_description>
+ <description>
+ This [SkeletonModification2D] uses an algorithm called [b]C[/b]yclic [b]C[/b]oordinate [b]D[/b]escent [b]I[/b]nverse [b]K[/b]inematics, or CCDIK, to maniuplate a chain of bones in a [Skeleton2D] so it reaches a defined target.
+ CCDIK works by rotating a set of bones, typically called a "bone chain", on a single axis. Each bone is rotated to face the target from the tip (by default), which over a chain of bones allow it to rotate properly to reach the target. Because the bones only rotate on a single axis, CCDIK [i]can[/i] look more robotic than other IK solvers.
+ [b]Note:[/b] The CCDIK modifier has [code]ccdik_joints[/code], which are the data objects that hold the data for each joint in the CCDIK chain. This is different from a bone! CCDIK joints hold the data needed for each bone in the bone chain used by CCDIK.
+ CCDIK also fully supports angle constraints, allowing for more control over how a solution is met.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="get_ccdik_joint_bone2d_node" qualifiers="const">
+ <return type="NodePath">
+ </return>
+ <argument index="0" name="joint_idx" type="int">
+ </argument>
+ <description>
+ Returns the [Bone2D] node assigned to the CCDIK joint at [code]joint_idx[/code].
+ </description>
+ </method>
+ <method name="get_ccdik_joint_bone_index" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="joint_idx" type="int">
+ </argument>
+ <description>
+ Returns the index of the [Bone2D] node assigned to the CCDIK joint at [code]joint_idx[/code].
+ </description>
+ </method>
+ <method name="get_ccdik_joint_constraint_angle_invert" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="joint_idx" type="int">
+ </argument>
+ <description>
+ Returns whether the CCDIK joint at [code]joint_idx[/code] uses an inverted joint constraint. See [method set_ccdik_joint_constraint_angle_invert] for details.
+ </description>
+ </method>
+ <method name="get_ccdik_joint_constraint_angle_max" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="joint_idx" type="int">
+ </argument>
+ <description>
+ Returns the maximum angle constraint for the joint at [code]joint_idx[/code].
+ </description>
+ </method>
+ <method name="get_ccdik_joint_constraint_angle_min" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="joint_idx" type="int">
+ </argument>
+ <description>
+ Returns the minimum angle constraint for the joint at [code]joint_idx[/code].
+ </description>
+ </method>
+ <method name="get_ccdik_joint_enable_constraint" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="joint_idx" type="int">
+ </argument>
+ <description>
+ Returns whether angle constraints on the CCDIK joint at [code]joint_idx[/code] are enabled.
+ </description>
+ </method>
+ <method name="get_ccdik_joint_rotate_from_joint" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="joint_idx" type="int">
+ </argument>
+ <description>
+ Returns whether the joint at [code]joint_idx[/code] is set to rotate from the joint, [code]true[/code], or to rotate from the tip, [code]false[/code]. The default is to rotate from the tip.
+ </description>
+ </method>
+ <method name="set_ccdik_joint_bone2d_node">
+ <return type="void">
+ </return>
+ <argument index="0" name="joint_idx" type="int">
+ </argument>
+ <argument index="1" name="bone2d_nodepath" type="NodePath">
+ </argument>
+ <description>
+ Sets the [Bone2D] node assigned to the CCDIK joint at [code]joint_idx[/code].
+ </description>
+ </method>
+ <method name="set_ccdik_joint_bone_index">
+ <return type="void">
+ </return>
+ <argument index="0" name="joint_idx" type="int">
+ </argument>
+ <argument index="1" name="bone_idx" type="int">
+ </argument>
+ <description>
+ Sets the bone index, [code]bone_index[/code], of the CCDIK joint at [code]joint_idx[/code]. When possible, this will also update the [code]bone2d_node[/code] of the CCDIK joint based on data provided by the linked skeleton.
+ </description>
+ </method>
+ <method name="set_ccdik_joint_constraint_angle_invert">
+ <return type="void">
+ </return>
+ <argument index="0" name="joint_idx" type="int">
+ </argument>
+ <argument index="1" name="invert" type="bool">
+ </argument>
+ <description>
+ Sets whether the CCDIK joint at [code]joint_idx[/code] uses an inverted joint constraint.
+ An inverted joint constraint only constraints the CCDIK joint to the angles [i]outside of[/i] the inputted minimum and maximum angles. For this reason, it is referred to as an inverted joint constraint, as it constraints the joint to the outside of the inputted values.
+ </description>
+ </method>
+ <method name="set_ccdik_joint_constraint_angle_max">
+ <return type="void">
+ </return>
+ <argument index="0" name="joint_idx" type="int">
+ </argument>
+ <argument index="1" name="angle_max" type="float">
+ </argument>
+ <description>
+ Sets the maximum angle constraint for the joint at [code]joint_idx[/code].
+ </description>
+ </method>
+ <method name="set_ccdik_joint_constraint_angle_min">
+ <return type="void">
+ </return>
+ <argument index="0" name="joint_idx" type="int">
+ </argument>
+ <argument index="1" name="angle_min" type="float">
+ </argument>
+ <description>
+ Sets the minimum angle constraint for the joint at [code]joint_idx[/code].
+ </description>
+ </method>
+ <method name="set_ccdik_joint_enable_constraint">
+ <return type="void">
+ </return>
+ <argument index="0" name="joint_idx" type="int">
+ </argument>
+ <argument index="1" name="enable_constraint" type="bool">
+ </argument>
+ <description>
+ Determines whether angle constraints on the CCDIK joint at [code]joint_idx[/code] are enabled. When [code]true[/code], constraints will be enabled and taken into account when solving.
+ </description>
+ </method>
+ <method name="set_ccdik_joint_rotate_from_joint">
+ <return type="void">
+ </return>
+ <argument index="0" name="joint_idx" type="int">
+ </argument>
+ <argument index="1" name="rotate_from_joint" type="bool">
+ </argument>
+ <description>
+ Sets whether the joint at [code]joint_idx[/code] is set to rotate from the joint, [code]true[/code], or to rotate from the tip, [code]false[/code].
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="ccdik_data_chain_length" type="int" setter="set_ccdik_data_chain_length" getter="get_ccdik_data_chain_length" default="0">
+ The amount of CCDIK joints in the CCDIK modification.
+ </member>
+ <member name="target_nodepath" type="NodePath" setter="set_target_node" getter="get_target_node" default="NodePath(&quot;&quot;)">
+ The NodePath to the node that is the target for the CCDIK modification. This node is what the CCDIK chain will attempt to rotate the bone chain to.
+ </member>
+ <member name="tip_nodepath" type="NodePath" setter="set_tip_node" getter="get_tip_node" default="NodePath(&quot;&quot;)">
+ The end position of the CCDIK chain. Typically, this should be a child of a [Bone2D] node attached to the final [Bone2D] in the CCDIK chain.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/SkeletonModification2DFABRIK.xml b/doc/classes/SkeletonModification2DFABRIK.xml
new file mode 100644
index 0000000000..62ab34b06f
--- /dev/null
+++ b/doc/classes/SkeletonModification2DFABRIK.xml
@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="SkeletonModification2DFABRIK" inherits="SkeletonModification2D" version="4.0">
+ <brief_description>
+ A modification that uses FABRIK to manipulate a series of [Bone2D] nodes to reach a target.
+ </brief_description>
+ <description>
+ This [SkeletonModification2D] uses an algorithm called [b]F[/b]orward [b]A[/b]nd [b]B[/b]ackward [b]R[/b]eaching [b]I[/b]nverse [b]K[/b]inematics, or FABRIK, to rotate a bone chain so that it reaches a target.
+ FABRIK works by knowing the positions and lengths of a series of bones, typically called a "bone chain". It first starts by running a forward pass, which places the final bone at the target's position. Then all other bones are moved towards the tip bone, so they stay at the defined bone length away. Then a backwards pass is performed, where the root/first bone in the FABRIK chain is placed back at the origin. then all other bones are moved so they stay at the defined bone length away. This positions the bone chain so that it reaches the target when possible, but all of the bones stay the correct length away from each other.
+ Because of how FABRIK works, it often gives more natural results than those seen in [SkeletonModification2DCCDIK]. FABRIK also supports angle constraints, which are fully taken into account when solving.
+ [b]Note:[/b] The FABRIK modifier has [code]fabrik_joints[/code], which are the data objects that hold the data for each joint in the FABRIK chain. This is different from [Bone2D] nodes! FABRIK joints hold the data needed for each [Bone2D] in the bone chain used by FABRIK.
+ To help control how the FABRIK joints move, a magnet vector can be passed, which can nudge the bones in a certain direction prior to solving, giving a level of control over the final result.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="get_fabrik_joint_bone2d_node" qualifiers="const">
+ <return type="NodePath">
+ </return>
+ <argument index="0" name="joint_idx" type="int">
+ </argument>
+ <description>
+ Returns the [Bone2D] node assigned to the FABRIK joint at [code]joint_idx[/code].
+ </description>
+ </method>
+ <method name="get_fabrik_joint_bone_index" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="joint_idx" type="int">
+ </argument>
+ <description>
+ Returns the index of the [Bone2D] node assigned to the FABRIK joint at [code]joint_idx[/code].
+ </description>
+ </method>
+ <method name="get_fabrik_joint_magnet_position" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="joint_idx" type="int">
+ </argument>
+ <description>
+ Returns the magnet position vector for the joint at [code]joint_idx[/code].
+ </description>
+ </method>
+ <method name="get_fabrik_joint_use_target_rotation" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="joint_idx" type="int">
+ </argument>
+ <description>
+ Returns whether the joint is using the target's rotation rather than allowing FABRIK to rotate the joint. This option only applies to the tip/final joint in the chain.
+ </description>
+ </method>
+ <method name="set_fabrik_joint_bone2d_node">
+ <return type="void">
+ </return>
+ <argument index="0" name="joint_idx" type="int">
+ </argument>
+ <argument index="1" name="bone2d_nodepath" type="NodePath">
+ </argument>
+ <description>
+ Sets the [Bone2D] node assigned to the FABRIK joint at [code]joint_idx[/code].
+ </description>
+ </method>
+ <method name="set_fabrik_joint_bone_index">
+ <return type="void">
+ </return>
+ <argument index="0" name="joint_idx" type="int">
+ </argument>
+ <argument index="1" name="bone_idx" type="int">
+ </argument>
+ <description>
+ Sets the bone index, [code]bone_index[/code], of the FABRIK joint at [code]joint_idx[/code]. When possible, this will also update the [code]bone2d_node[/code] of the FABRIK joint based on data provided by the linked skeleton.
+ </description>
+ </method>
+ <method name="set_fabrik_joint_magnet_position">
+ <return type="void">
+ </return>
+ <argument index="0" name="joint_idx" type="int">
+ </argument>
+ <argument index="1" name="magnet_position" type="Vector2">
+ </argument>
+ <description>
+ Sets the magnet position vector for the joint at [code]joint_idx[/code].
+ </description>
+ </method>
+ <method name="set_fabrik_joint_use_target_rotation">
+ <return type="void">
+ </return>
+ <argument index="0" name="joint_idx" type="int">
+ </argument>
+ <argument index="1" name="use_target_rotation" type="bool">
+ </argument>
+ <description>
+ Sets whether the joint at [code]joint_idx[/code] will use the target node's rotation rather than letting FABRIK rotate the node.
+ [b]Note:[/b] This option only works for the tip/final joint in the chain. For all other nodes, this option will be ignored.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="fabrik_data_chain_length" type="int" setter="set_fabrik_data_chain_length" getter="get_fabrik_data_chain_length" default="0">
+ The amount of FABRIK joints in the FABRIK modification.
+ </member>
+ <member name="target_nodepath" type="NodePath" setter="set_target_node" getter="get_target_node" default="NodePath(&quot;&quot;)">
+ The NodePath to the node that is the target for the FABRIK modification. This node is what the FABRIK chain will attempt to rotate the bone chain to.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/SkeletonModification2DJiggle.xml b/doc/classes/SkeletonModification2DJiggle.xml
new file mode 100644
index 0000000000..ae46acd0d0
--- /dev/null
+++ b/doc/classes/SkeletonModification2DJiggle.xml
@@ -0,0 +1,232 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="SkeletonModification2DJiggle" inherits="SkeletonModification2D" version="4.0">
+ <brief_description>
+ A modification that jiggles [Bone2D] nodes as they move towards a target.
+ </brief_description>
+ <description>
+ This modification moves a series of bones, typically called a bone chain, towards a target. What makes this modification special is that it calculates the velocity and acceleration for each bone in the bone chain, and runs a very light physics-like calculation using the inputted values. This allows the bones to overshoot the target and "jiggle" around. It can be configured to act more like a spring, or sway around like cloth might.
+ This modification is useful for adding additional motion to things like hair, the edges of clothing, and more. It has several settings to that allow control over how the joint moves when the target moves.
+ [b]Note:[/b] The Jiggle modifier has [code]jiggle_joints[/code], which are the data objects that hold the data for each joint in the Jiggle chain. This is different from than [Bone2D] nodes! Jiggle joints hold the data needed for each [Bone2D] in the bone chain used by the Jiggle modification.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="get_collision_mask" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns the collision mask used by the Jiggle modifier when collisions are enabled.
+ </description>
+ </method>
+ <method name="get_jiggle_joint_bone2d_node" qualifiers="const">
+ <return type="NodePath">
+ </return>
+ <argument index="0" name="joint_idx" type="int">
+ </argument>
+ <description>
+ Returns the [Bone2D] node assigned to the Jiggle joint at [code]joint_idx[/code].
+ </description>
+ </method>
+ <method name="get_jiggle_joint_bone_index" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="joint_idx" type="int">
+ </argument>
+ <description>
+ Returns the index of the [Bone2D] node assigned to the Jiggle joint at [code]joint_idx[/code].
+ </description>
+ </method>
+ <method name="get_jiggle_joint_damping" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="joint_idx" type="int">
+ </argument>
+ <description>
+ Returns the amount of damping of the Jiggle joint at [code]joint_idx[/code].
+ </description>
+ </method>
+ <method name="get_jiggle_joint_gravity" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="joint_idx" type="int">
+ </argument>
+ <description>
+ Returns a [Vector2] representing the amount of gravity the Jiggle joint at [code]joint_idx[/code] is influenced by.
+ </description>
+ </method>
+ <method name="get_jiggle_joint_mass" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="joint_idx" type="int">
+ </argument>
+ <description>
+ Returns the amount of mass of the jiggle joint at [code]joint_idx[/code].
+ </description>
+ </method>
+ <method name="get_jiggle_joint_override" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="joint_idx" type="int">
+ </argument>
+ <description>
+ Returns a boolean that indiciates whether the joint at [code]joint_idx[/code] is overriding the default Jiggle joint data defined in the modification.
+ </description>
+ </method>
+ <method name="get_jiggle_joint_stiffness" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="joint_idx" type="int">
+ </argument>
+ <description>
+ Returns the stiffness of the Jiggle joint at [code]joint_idx[/code].
+ </description>
+ </method>
+ <method name="get_jiggle_joint_use_gravity" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="joint_idx" type="int">
+ </argument>
+ <description>
+ Returns a boolean that indiciates whether the joint at [code]joint_idx[/code] is using gravity or not.
+ </description>
+ </method>
+ <method name="get_use_colliders" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns whether the jiggle modifier is taking physics colliders into account when solving.
+ </description>
+ </method>
+ <method name="set_collision_mask">
+ <return type="void">
+ </return>
+ <argument index="0" name="collision_mask" type="int">
+ </argument>
+ <description>
+ Sets the collision mask that the Jiggle modifier will use when reacting to colliders, if the Jiggle modifier is set to take colliders into account.
+ </description>
+ </method>
+ <method name="set_jiggle_joint_bone2d_node">
+ <return type="void">
+ </return>
+ <argument index="0" name="joint_idx" type="int">
+ </argument>
+ <argument index="1" name="bone2d_node" type="NodePath">
+ </argument>
+ <description>
+ Sets the [Bone2D] node assigned to the Jiggle joint at [code]joint_idx[/code].
+ </description>
+ </method>
+ <method name="set_jiggle_joint_bone_index">
+ <return type="void">
+ </return>
+ <argument index="0" name="joint_idx" type="int">
+ </argument>
+ <argument index="1" name="bone_idx" type="int">
+ </argument>
+ <description>
+ Sets the bone index, [code]bone_index[/code], of the Jiggle joint at [code]joint_idx[/code]. When possible, this will also update the [code]bone2d_node[/code] of the Jiggle joint based on data provided by the linked skeleton.
+ </description>
+ </method>
+ <method name="set_jiggle_joint_damping">
+ <return type="void">
+ </return>
+ <argument index="0" name="joint_idx" type="int">
+ </argument>
+ <argument index="1" name="damping" type="float">
+ </argument>
+ <description>
+ Sets the amount of dampening of the Jiggle joint at [code]joint_idx[/code].
+ </description>
+ </method>
+ <method name="set_jiggle_joint_gravity">
+ <return type="void">
+ </return>
+ <argument index="0" name="joint_idx" type="int">
+ </argument>
+ <argument index="1" name="gravity" type="Vector2">
+ </argument>
+ <description>
+ Sets the gravity vector of the Jiggle joint at [code]joint_idx[/code].
+ </description>
+ </method>
+ <method name="set_jiggle_joint_mass">
+ <return type="void">
+ </return>
+ <argument index="0" name="joint_idx" type="int">
+ </argument>
+ <argument index="1" name="mass" type="float">
+ </argument>
+ <description>
+ Sets the of mass of the Jiggle joint at [code]joint_idx[/code].
+ </description>
+ </method>
+ <method name="set_jiggle_joint_override">
+ <return type="void">
+ </return>
+ <argument index="0" name="joint_idx" type="int">
+ </argument>
+ <argument index="1" name="override" type="bool">
+ </argument>
+ <description>
+ Sets whether the Jiggle joint at [code]joint_idx[/code] should override the default Jiggle joint settings. Setting this to [code]true[/code] will make the joint use its own settings rather than the default ones attached to the modification.
+ </description>
+ </method>
+ <method name="set_jiggle_joint_stiffness">
+ <return type="void">
+ </return>
+ <argument index="0" name="joint_idx" type="int">
+ </argument>
+ <argument index="1" name="stiffness" type="float">
+ </argument>
+ <description>
+ Sets the of stiffness of the Jiggle joint at [code]joint_idx[/code].
+ </description>
+ </method>
+ <method name="set_jiggle_joint_use_gravity">
+ <return type="void">
+ </return>
+ <argument index="0" name="joint_idx" type="int">
+ </argument>
+ <argument index="1" name="use_gravity" type="bool">
+ </argument>
+ <description>
+ Sets whether the Jiggle joint at [code]joint_idx[/code] should use gravity.
+ </description>
+ </method>
+ <method name="set_use_colliders">
+ <return type="void">
+ </return>
+ <argument index="0" name="use_colliders" type="bool">
+ </argument>
+ <description>
+ If [code]true[/code], the Jiggle modifier will take colliders into account, keeping them from entering into these collision objects.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="damping" type="float" setter="set_damping" getter="get_damping" default="0.75">
+ The default amount of dampening applied to the Jiggle joints, if they are not overriden. Higher values lead to more of the calculated velocity being applied.
+ </member>
+ <member name="gravity" type="Vector2" setter="set_gravity" getter="get_gravity" default="Vector2(0, 6)">
+ The default amount of gravity applied to the Jiggle joints, if they are not overriden.
+ </member>
+ <member name="jiggle_data_chain_length" type="int" setter="set_jiggle_data_chain_length" getter="get_jiggle_data_chain_length" default="0">
+ The amount of Jiggle joints in the Jiggle modification.
+ </member>
+ <member name="mass" type="float" setter="set_mass" getter="get_mass" default="0.75">
+ The default amount of mass assigned to the Jiggle joints, if they are not overriden. Higher values lead to faster movements and more overshooting.
+ </member>
+ <member name="stiffness" type="float" setter="set_stiffness" getter="get_stiffness" default="3.0">
+ The default amount of stiffness assigned to the Jiggle joints, if they are not overriden. Higher values act more like springs, quickly moving into the correct position.
+ </member>
+ <member name="target_nodepath" type="NodePath" setter="set_target_node" getter="get_target_node" default="NodePath(&quot;&quot;)">
+ The NodePath to the node that is the target for the Jiggle modification. This node is what the Jiggle chain will attempt to rotate the bone chain to.
+ </member>
+ <member name="use_gravity" type="bool" setter="set_use_gravity" getter="get_use_gravity" default="false">
+ Whether the gravity vector, [member gravity], should be applied to the Jiggle joints, assuming they are not overriding the default settings.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/SkeletonModification2DLookAt.xml b/doc/classes/SkeletonModification2DLookAt.xml
new file mode 100644
index 0000000000..b0fa0e5a01
--- /dev/null
+++ b/doc/classes/SkeletonModification2DLookAt.xml
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="SkeletonModification2DLookAt" inherits="SkeletonModification2D" version="4.0">
+ <brief_description>
+ A modification that rotates a [Bone2D] node to look at a target.
+ </brief_description>
+ <description>
+ This [SkeletonModification2D] rotates a bone to look a target. This is extremely helpful for moving character's head to look at the player, rotating a turret to look at a target, or any other case where you want to make a bone rotate towards something quickly and easily.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="get_additional_rotation" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Returns the amount of additional rotation that is applied after the LookAt modification executes.
+ </description>
+ </method>
+ <method name="get_constraint_angle_invert" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns whether the constraints to this modification are inverted or not.
+ </description>
+ </method>
+ <method name="get_constraint_angle_max" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Returns the constraint's maximum allowed angle.
+ </description>
+ </method>
+ <method name="get_constraint_angle_min" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Returns the constraint's minimum allowed angle.
+ </description>
+ </method>
+ <method name="get_enable_constraint" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns [code]true[/code] if the LookAt modification is using constraints.
+ </description>
+ </method>
+ <method name="set_additional_rotation">
+ <return type="void">
+ </return>
+ <argument index="0" name="rotation" type="float">
+ </argument>
+ <description>
+ Sets the amount of additional rotation that is to be applied after executing the modification. This allows for offsetting the results by the inputted rotation amount.
+ </description>
+ </method>
+ <method name="set_constraint_angle_invert">
+ <return type="void">
+ </return>
+ <argument index="0" name="invert" type="bool">
+ </argument>
+ <description>
+ When [code]true[/code], the modification will use an inverted joint constraint.
+ An inverted joint constraint only constraints the [Bone2D] to the angles [i]outside of[/i] the inputted minimum and maximum angles. For this reason, it is referred to as an inverted joint constraint, as it constraints the joint to the outside of the inputted values.
+ </description>
+ </method>
+ <method name="set_constraint_angle_max">
+ <return type="void">
+ </return>
+ <argument index="0" name="angle_max" type="float">
+ </argument>
+ <description>
+ Sets the constraint's maximum allowed angle.
+ </description>
+ </method>
+ <method name="set_constraint_angle_min">
+ <return type="void">
+ </return>
+ <argument index="0" name="angle_min" type="float">
+ </argument>
+ <description>
+ Sets the constraint's minimum allowed angle.
+ </description>
+ </method>
+ <method name="set_enable_constraint">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable_constraint" type="bool">
+ </argument>
+ <description>
+ Sets whether this modification will use constraints or not. When [code]true[/code], constraints will be applied when solving the LookAt modification.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="bone2d_node" type="NodePath" setter="set_bone2d_node" getter="get_bone2d_node" default="NodePath(&quot;&quot;)">
+ The [Bone2D] node that the modification will operate on.
+ </member>
+ <member name="bone_index" type="int" setter="set_bone_index" getter="get_bone_index" default="-1">
+ The index of the [Bone2D] node that the modification will oeprate on.
+ </member>
+ <member name="target_nodepath" type="NodePath" setter="set_target_node" getter="get_target_node" default="NodePath(&quot;&quot;)">
+ The NodePath to the node that is the target for the LookAt modification. This node is what the modification will rotate the [Bone2D] to.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/SkeletonModification2DPhysicalBones.xml b/doc/classes/SkeletonModification2DPhysicalBones.xml
new file mode 100644
index 0000000000..2547727097
--- /dev/null
+++ b/doc/classes/SkeletonModification2DPhysicalBones.xml
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="SkeletonModification2DPhysicalBones" inherits="SkeletonModification2D" version="4.0">
+ <brief_description>
+ A modification that applies the transforms of [PhysicalBone2D] nodes to [Bone2D] nodes.
+ </brief_description>
+ <description>
+ This modification takes the transforms of [PhysicalBone2D] nodes and applies them to [Bone2D] nodes. This allows the [Bone2D] nodes to react to physics thanks to the linked [PhysicalBone2D] nodes.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="fetch_physical_bones">
+ <return type="void">
+ </return>
+ <description>
+ Empties the list of [PhysicalBone2D] nodes and populates it will all [PhysicalBone2D] nodes that are children of the [Skeleton2D].
+ </description>
+ </method>
+ <method name="get_physical_bone_node" qualifiers="const">
+ <return type="NodePath">
+ </return>
+ <argument index="0" name="joint_idx" type="int">
+ </argument>
+ <description>
+ Returns the [PhysicalBone2D] node at [code]joint_idx[/code].
+ </description>
+ </method>
+ <method name="set_physical_bone_node">
+ <return type="void">
+ </return>
+ <argument index="0" name="joint_idx" type="int">
+ </argument>
+ <argument index="1" name="physicalbone2d_node" type="NodePath">
+ </argument>
+ <description>
+ Sets the [PhysicalBone2D] node at [code]joint_idx[/code].
+ [b]Note:[/b] This is just the index used for this modification, not the bone index used in the [Skeleton2D].
+ </description>
+ </method>
+ <method name="start_simulation">
+ <return type="void">
+ </return>
+ <argument index="0" name="bones" type="StringName[]" default="[]">
+ </argument>
+ <description>
+ Tell the [PhysicalBone2D] nodes to start simulating and interacting with the physics world.
+ Optionally, an array of bone names can be passed to this function, and that will cause only [PhysicalBone2D] nodes with those names to start simulating.
+ </description>
+ </method>
+ <method name="stop_simulation">
+ <return type="void">
+ </return>
+ <argument index="0" name="bones" type="StringName[]" default="[]">
+ </argument>
+ <description>
+ Tell the [PhysicalBone2D] nodes to stop simulating and interacting with the physics world.
+ Optionally, an array of bone names can be passed to this function, and that will cause only [PhysicalBone2D] nodes with those names to stop simulating.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="physical_bone_chain_length" type="int" setter="set_physical_bone_chain_length" getter="get_physical_bone_chain_length" default="0">
+ The amount of [PhysicalBone2D] nodes linked in this modification.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/SkeletonModification2DStackHolder.xml b/doc/classes/SkeletonModification2DStackHolder.xml
new file mode 100644
index 0000000000..313cf81482
--- /dev/null
+++ b/doc/classes/SkeletonModification2DStackHolder.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="SkeletonModification2DStackHolder" inherits="SkeletonModification2D" version="4.0">
+ <brief_description>
+ A modification that holds and executes a [SkeletonModificationStack2D].
+ </brief_description>
+ <description>
+ This [SkeletonModification2D] holds a reference to a [SkeletonModificationStack2D], allowing you to use multiple modification stacks on a single [Skeleton2D].
+ [b]Note:[/b] The modifications in the held [SkeletonModificationStack2D] will only be executed if their execution mode matches the execution mode of the SkeletonModification2DStackHolder.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="get_held_modification_stack" qualifiers="const">
+ <return type="SkeletonModificationStack2D">
+ </return>
+ <description>
+ Returns the [SkeletonModificationStack2D] that this modification is holding.
+ </description>
+ </method>
+ <method name="set_held_modification_stack">
+ <return type="void">
+ </return>
+ <argument index="0" name="held_modification_stack" type="SkeletonModificationStack2D">
+ </argument>
+ <description>
+ Sets the [SkeletonModificationStack2D] that this modification is holding. This modification stack will then be executed when this modification is executed.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/SkeletonModification2DTwoBoneIK.xml b/doc/classes/SkeletonModification2DTwoBoneIK.xml
new file mode 100644
index 0000000000..554515556b
--- /dev/null
+++ b/doc/classes/SkeletonModification2DTwoBoneIK.xml
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="SkeletonModification2DTwoBoneIK" inherits="SkeletonModification2D" version="4.0">
+ <brief_description>
+ A modification that rotates two bones using the law of cosigns to reach the target.
+ </brief_description>
+ <description>
+ This [SkeletonModification2D] uses an algorithm typically called TwoBoneIK. This algorithm works by leveraging the law of cosigns and the lengths of the bones to figure out what rotation the bones currently have, and what rotation they need to make a complete triangle, where the first bone, the second bone, and the target form the three verticies of the triangle. Because the algorithm works by making a triangle, it can only opperate on two bones.
+ TwoBoneIK is great for arms, legs, and really any joints that can be represented by just two bones that bend to reach a target. This solver is more lightweight than [SkeletonModification2DFABRIK], but gives similar, natural looking results.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="get_joint_one_bone2d_node" qualifiers="const">
+ <return type="NodePath">
+ </return>
+ <description>
+ Returns the [Bone2D] node that is being used as the first bone in the TwoBoneIK modification.
+ </description>
+ </method>
+ <method name="get_joint_one_bone_idx" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns the index of the [Bone2D] node that is being used as the first bone in the TwoBoneIK modification.
+ </description>
+ </method>
+ <method name="get_joint_two_bone2d_node" qualifiers="const">
+ <return type="NodePath">
+ </return>
+ <description>
+ Returns the [Bone2D] node that is being used as the second bone in the TwoBoneIK modification.
+ </description>
+ </method>
+ <method name="get_joint_two_bone_idx" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns the index of the [Bone2D] node that is being used as the second bone in the TwoBoneIK modification.
+ </description>
+ </method>
+ <method name="set_joint_one_bone2d_node">
+ <return type="void">
+ </return>
+ <argument index="0" name="bone2d_node" type="NodePath">
+ </argument>
+ <description>
+ Sets the [Bone2D] node that is being used as the first bone in the TwoBoneIK modification.
+ </description>
+ </method>
+ <method name="set_joint_one_bone_idx">
+ <return type="void">
+ </return>
+ <argument index="0" name="bone_idx" type="int">
+ </argument>
+ <description>
+ Sets the index of the [Bone2D] node that is being used as the first bone in the TwoBoneIK modification.
+ </description>
+ </method>
+ <method name="set_joint_two_bone2d_node">
+ <return type="void">
+ </return>
+ <argument index="0" name="bone2d_node" type="NodePath">
+ </argument>
+ <description>
+ Sets the [Bone2D] node that is being used as the second bone in the TwoBoneIK modification.
+ </description>
+ </method>
+ <method name="set_joint_two_bone_idx">
+ <return type="void">
+ </return>
+ <argument index="0" name="bone_idx" type="int">
+ </argument>
+ <description>
+ Sets the index of the [Bone2D] node that is being used as the second bone in the TwoBoneIK modification.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="flip_bend_direction" type="bool" setter="set_flip_bend_direction" getter="get_flip_bend_direction" default="false">
+ If [code]true[/code], the bones in the modification will blend outward as opposed to inwards when contracting. If [code]false[/code], the bones will bend inwards when contracting.
+ </member>
+ <member name="target_maximum_distance" type="float" setter="set_target_maximum_distance" getter="get_target_maximum_distance" default="0.0">
+ The maximum distance the target can be at. If the target is farther than this distance, the modification will solve as if it's at this maximum distance. When set to [code]0[/code], the modification will solve without distance constraints.
+ </member>
+ <member name="target_minimum_distance" type="float" setter="set_target_minimum_distance" getter="get_target_minimum_distance" default="0.0">
+ The minimum distance the target can be at. If the target is closer than this distance, the modification will solve as if it's at this minimum distance. When set to [code]0[/code], the modification will solve without distance constraints.
+ </member>
+ <member name="target_nodepath" type="NodePath" setter="set_target_node" getter="get_target_node" default="NodePath(&quot;&quot;)">
+ The NodePath to the node that is the target for the TwoBoneIK modification. This node is what the modification will use when bending the [Bone2D] nodes.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/SkeletonModificationStack2D.xml b/doc/classes/SkeletonModificationStack2D.xml
new file mode 100644
index 0000000000..35b899fe08
--- /dev/null
+++ b/doc/classes/SkeletonModificationStack2D.xml
@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="SkeletonModificationStack2D" inherits="Resource" version="4.0">
+ <brief_description>
+ A resource that holds a stack of [SkeletonModification2D]s.
+ </brief_description>
+ <description>
+ This resource is used by the Skeleton and holds a stack of [SkeletonModification2D]s.
+ This controls the order of the modifications and how they are applied. Modification order is especially important for full-body IK setups, as you need to execute the modifications in the correct order to get the desired results. For example, you want to execute a modification on the spine [i]before[/i] the arms on a humanoid skeleton.
+ This resource also controls how strongly all of the modifications are applied to the [Skeleton2D].
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="add_modification">
+ <return type="void">
+ </return>
+ <argument index="0" name="modification" type="SkeletonModification2D">
+ </argument>
+ <description>
+ Adds the passed-in [SkeletonModification2D] to the stack.
+ </description>
+ </method>
+ <method name="delete_modification">
+ <return type="void">
+ </return>
+ <argument index="0" name="mod_idx" type="int">
+ </argument>
+ <description>
+ Deletes the [SkeletonModification2D] at the index position [code]mod_idx[/code], if it exists.
+ </description>
+ </method>
+ <method name="enable_all_modifications">
+ <return type="void">
+ </return>
+ <argument index="0" name="enabled" type="bool">
+ </argument>
+ <description>
+ Enables all [SkeletonModification2D]s in the stack.
+ </description>
+ </method>
+ <method name="execute">
+ <return type="void">
+ </return>
+ <argument index="0" name="delta" type="float">
+ </argument>
+ <argument index="1" name="execution_mode" type="int">
+ </argument>
+ <description>
+ Executes all of the [SkeletonModification2D]s in the stack that use the same execution mode as the passed-in [code]execution_mode[/code], starting from index [code]0[/code] to [member modification_count].
+ [b]Note:[/b] The order of the modifications can matter depending on the modifications. For example, modifications on a spine should operate before modifications on the arms in order to get proper results.
+ </description>
+ </method>
+ <method name="get_is_setup" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns a boolean that indiciates whether the modification stack is setup and can execute.
+ </description>
+ </method>
+ <method name="get_modification" qualifiers="const">
+ <return type="SkeletonModification2D">
+ </return>
+ <argument index="0" name="mod_idx" type="int">
+ </argument>
+ <description>
+ Returns the [SkeletonModification2D] at the passed-in index, [code]mod_idx[/code].
+ </description>
+ </method>
+ <method name="get_skeleton" qualifiers="const">
+ <return type="Skeleton2D">
+ </return>
+ <description>
+ Returns the [Skeleton2D] node that the SkeletonModificationStack2D is bound to.
+ </description>
+ </method>
+ <method name="set_modification">
+ <return type="void">
+ </return>
+ <argument index="0" name="mod_idx" type="int">
+ </argument>
+ <argument index="1" name="modification" type="SkeletonModification2D">
+ </argument>
+ <description>
+ Sets the modification at [code]mod_idx[/code] to the passed-in modification, [code]modification[/code].
+ </description>
+ </method>
+ <method name="setup">
+ <return type="void">
+ </return>
+ <description>
+ Sets up the modification stack so it can execute. This function should be called by [Skeleton2D] and shouldn't be manually called unless you know what you are doing.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="enabled" type="bool" setter="set_enabled" getter="get_enabled" default="false">
+ If [code]true[/code], the modification's in the stack will be called. This is handled automatically through the [Skeleton2D] node.
+ </member>
+ <member name="modification_count" type="int" setter="set_modification_count" getter="get_modification_count" default="0">
+ The number of modifications in the stack.
+ </member>
+ <member name="strength" type="float" setter="set_strength" getter="get_strength" default="1.0">
+ The interpolation strength of the modifications in stack. A value of [code]0[/code] will make it where the modifications are not applied, a strength of [code]0.5[/code] will be half applied, and a strength of [code]1[/code] will allow the modifications to be fully applied and override the [Skeleton2D] [Bone2D] poses.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/Skin.xml b/doc/classes/Skin.xml
index e22feb42f0..f409b6c80c 100644
--- a/doc/classes/Skin.xml
+++ b/doc/classes/Skin.xml
@@ -12,7 +12,7 @@
</return>
<argument index="0" name="bone" type="int">
</argument>
- <argument index="1" name="pose" type="Transform">
+ <argument index="1" name="pose" type="Transform3D">
</argument>
<description>
</description>
@@ -46,7 +46,7 @@
</description>
</method>
<method name="get_bind_pose" qualifiers="const">
- <return type="Transform">
+ <return type="Transform3D">
</return>
<argument index="0" name="bind_index" type="int">
</argument>
@@ -86,7 +86,7 @@
</return>
<argument index="0" name="bind_index" type="int">
</argument>
- <argument index="1" name="pose" type="Transform">
+ <argument index="1" name="pose" type="Transform3D">
</argument>
<description>
</description>
diff --git a/doc/classes/SkinReference.xml b/doc/classes/SkinReference.xml
index 8fc163f88d..3f8bc3be82 100644
--- a/doc/classes/SkinReference.xml
+++ b/doc/classes/SkinReference.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SkinReference" inherits="Reference" version="4.0">
+<class name="SkinReference" inherits="RefCounted" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/Sprite2D.xml b/doc/classes/Sprite2D.xml
index 617ad3a371..b419b003bf 100644
--- a/doc/classes/Sprite2D.xml
+++ b/doc/classes/Sprite2D.xml
@@ -64,13 +64,13 @@
<member name="frame" type="int" setter="set_frame" getter="get_frame" default="0">
Current frame to display from sprite sheet. [member hframes] or [member vframes] must be greater than 1.
</member>
- <member name="frame_coords" type="Vector2" setter="set_frame_coords" getter="get_frame_coords" default="Vector2( 0, 0 )">
+ <member name="frame_coords" type="Vector2i" setter="set_frame_coords" getter="get_frame_coords" default="Vector2i(0, 0)">
Coordinates of the frame to display from sprite sheet. This is as an alias for the [member frame] property. [member hframes] or [member vframes] must be greater than 1.
</member>
<member name="hframes" type="int" setter="set_hframes" getter="get_hframes" default="1">
The number of columns in the sprite sheet.
</member>
- <member name="offset" type="Vector2" setter="set_offset" getter="get_offset" default="Vector2( 0, 0 )">
+ <member name="offset" type="Vector2" setter="set_offset" getter="get_offset" default="Vector2(0, 0)">
The texture's drawing offset.
</member>
<member name="region_enabled" type="bool" setter="set_region_enabled" getter="is_region_enabled" default="false">
@@ -79,7 +79,7 @@
<member name="region_filter_clip_enabled" type="bool" setter="set_region_filter_clip_enabled" getter="is_region_filter_clip_enabled" default="false">
If [code]true[/code], the outermost pixels get blurred out. [member region_enabled] must be [code]true[/code].
</member>
- <member name="region_rect" type="Rect2" setter="set_region_rect" getter="get_region_rect" default="Rect2( 0, 0, 0, 0 )">
+ <member name="region_rect" type="Rect2" setter="set_region_rect" getter="get_region_rect" default="Rect2(0, 0, 0, 0)">
The region of the atlas texture to display. [member region_enabled] must be [code]true[/code].
</member>
<member name="texture" type="Texture2D" setter="set_texture" getter="get_texture">
diff --git a/doc/classes/Sprite3D.xml b/doc/classes/Sprite3D.xml
index 658fd1a4f2..f7f2ff0de1 100644
--- a/doc/classes/Sprite3D.xml
+++ b/doc/classes/Sprite3D.xml
@@ -14,7 +14,7 @@
<member name="frame" type="int" setter="set_frame" getter="get_frame" default="0">
Current frame to display from sprite sheet. [member hframes] or [member vframes] must be greater than 1.
</member>
- <member name="frame_coords" type="Vector2" setter="set_frame_coords" getter="get_frame_coords" default="Vector2( 0, 0 )">
+ <member name="frame_coords" type="Vector2i" setter="set_frame_coords" getter="get_frame_coords" default="Vector2i(0, 0)">
Coordinates of the frame to display from sprite sheet. This is as an alias for the [member frame] property. [member hframes] or [member vframes] must be greater than 1.
</member>
<member name="hframes" type="int" setter="set_hframes" getter="get_hframes" default="1">
@@ -23,7 +23,7 @@
<member name="region_enabled" type="bool" setter="set_region_enabled" getter="is_region_enabled" default="false">
If [code]true[/code], texture will be cut from a larger atlas texture. See [member region_rect].
</member>
- <member name="region_rect" type="Rect2" setter="set_region_rect" getter="get_region_rect" default="Rect2( 0, 0, 0, 0 )">
+ <member name="region_rect" type="Rect2" setter="set_region_rect" getter="get_region_rect" default="Rect2(0, 0, 0, 0)">
The region of the atlas texture to display. [member region_enabled] must be [code]true[/code].
</member>
<member name="texture" type="Texture2D" setter="set_texture" getter="get_texture">
@@ -39,6 +39,11 @@
Emitted when the [member frame] changes.
</description>
</signal>
+ <signal name="texture_changed">
+ <description>
+ Emitted when the [member texture] changes.
+ </description>
+ </signal>
</signals>
<constants>
</constants>
diff --git a/doc/classes/SpriteBase3D.xml b/doc/classes/SpriteBase3D.xml
index 06b9c2b042..3168e2d848 100644
--- a/doc/classes/SpriteBase3D.xml
+++ b/doc/classes/SpriteBase3D.xml
@@ -66,10 +66,10 @@
<member name="flip_v" type="bool" setter="set_flip_v" getter="is_flipped_v" default="false">
If [code]true[/code], texture is flipped vertically.
</member>
- <member name="modulate" type="Color" setter="set_modulate" getter="get_modulate" default="Color( 1, 1, 1, 1 )">
+ <member name="modulate" type="Color" setter="set_modulate" getter="get_modulate" default="Color(1, 1, 1, 1)">
A color value that gets multiplied on, could be used for mood-coloring or to simulate the color of light.
</member>
- <member name="offset" type="Vector2" setter="set_offset" getter="get_offset" default="Vector2( 0, 0 )">
+ <member name="offset" type="Vector2" setter="set_offset" getter="get_offset" default="Vector2(0, 0)">
The texture's drawing offset.
</member>
<member name="opacity" type="float" setter="set_opacity" getter="get_opacity" default="1.0">
diff --git a/doc/classes/StaticBody2D.xml b/doc/classes/StaticBody2D.xml
index 2a5c1ea6f4..85915a53fe 100644
--- a/doc/classes/StaticBody2D.xml
+++ b/doc/classes/StaticBody2D.xml
@@ -4,8 +4,11 @@
Static body for 2D physics.
</brief_description>
<description>
- Static body for 2D physics. A StaticBody2D is a body that is not intended to move. It is ideal for implementing objects in the environment, such as walls or platforms.
- Additionally, a constant linear or angular velocity can be set for the static body, which will affect colliding bodies as if it were moving (for example, a conveyor belt).
+ Static body for 2D physics. A static body is a simple body that can't be moved by external forces or contacts. It is ideal for implementing objects in the environment, such as walls or platforms. In contrast to [RigidBody2D], they don't consume any CPU resources as long as they don't move.
+ They however have extra functionalities to move and affect other bodies:
+ [b]Constant velocity:[/b] [member constant_linear_velocity] and [member constant_angular_velocity] can be set for the static body, so even if it doesn't move, it affects other bodies as if it was moving (this is useful for simulating conveyor belts or conveyor wheels).
+ [b]Transform change:[/b] Static bodies can be also moved by code. Unless [member kinematic_motion] is enabled, they are just teleported in this case and don't affect other bodies on their path.
+ [b]Kinematic motion:[/b] Static bodies can have [member kinematic_motion] enabled to make them kinematic bodies that can be moved by code and push other bodies on their path.
</description>
<tutorials>
</tutorials>
@@ -13,10 +16,14 @@
</methods>
<members>
<member name="constant_angular_velocity" type="float" setter="set_constant_angular_velocity" getter="get_constant_angular_velocity" default="0.0">
- The body's constant angular velocity. This does not rotate the body, but affects colliding bodies, as if it were rotating.
+ The body's constant angular velocity. This does not rotate the body (unless [member kinematic_motion] is enabled), but affects other bodies that touch it, as if it were rotating.
</member>
- <member name="constant_linear_velocity" type="Vector2" setter="set_constant_linear_velocity" getter="get_constant_linear_velocity" default="Vector2( 0, 0 )">
- The body's constant linear velocity. This does not move the body, but affects colliding bodies, as if it were moving.
+ <member name="constant_linear_velocity" type="Vector2" setter="set_constant_linear_velocity" getter="get_constant_linear_velocity" default="Vector2(0, 0)">
+ The body's constant linear velocity. This does not move the body (unless [member kinematic_motion] is enabled), but affects other bodies that touch it, as if it were moving.
+ </member>
+ <member name="kinematic_motion" type="bool" setter="set_kinematic_motion_enabled" getter="is_kinematic_motion_enabled" default="false">
+ If [code]true[/code], the body will act the same as a [RigidBody2D] in [constant RigidBody2D.MODE_KINEMATIC] mode.
+ When the body is moved manually, either from code or from an [AnimationPlayer] (with [member AnimationPlayer.playback_process_mode] set to [code]physics[/code]), the physics will automatically compute an estimate of their linear and angular velocity. This makes them very useful for moving platforms or other AnimationPlayer-controlled objects (like a door, a bridge that opens, etc).
</member>
<member name="physics_material_override" type="PhysicsMaterial" setter="set_physics_material_override" getter="get_physics_material_override">
The physics material override for the body.
diff --git a/doc/classes/StaticBody3D.xml b/doc/classes/StaticBody3D.xml
index 63a15cbe1d..f83d440f10 100644
--- a/doc/classes/StaticBody3D.xml
+++ b/doc/classes/StaticBody3D.xml
@@ -4,8 +4,11 @@
Static body for 3D physics.
</brief_description>
<description>
- Static body for 3D physics. A static body is a simple body that is not intended to move. In contrast to [RigidBody3D], they don't consume any CPU resources as long as they don't move.
- Additionally, a constant linear or angular velocity can be set for the static body, so even if it doesn't move, it affects other bodies as if it was moving (this is useful for simulating conveyor belts or conveyor wheels).
+ Static body for 3D physics. A static body is a simple body that can't be moved by external forces or contacts. It is ideal for implementing objects in the environment, such as walls or platforms. In contrast to [RigidBody3D], they don't consume any CPU resources as long as they don't move.
+ They however have extra functionalities to move and affect other bodies:
+ [b]Constant velocity:[/b] [member constant_linear_velocity] and [member constant_angular_velocity] can be set for the static body, so even if it doesn't move, it affects other bodies as if it was moving (this is useful for simulating conveyor belts or conveyor wheels).
+ [b]Transform change:[/b] Static bodies can be also moved by code. Unless [member kinematic_motion] is enabled, they are just teleported in this case and don't affect other bodies on their path.
+ [b]Kinematic motion:[/b] Static bodies can have [member kinematic_motion] enabled to make them kinematic bodies that can be moved by code and push other bodies on their path.
</description>
<tutorials>
<link title="3D Physics Tests Demo">https://godotengine.org/asset-library/asset/675</link>
@@ -15,11 +18,15 @@
<methods>
</methods>
<members>
- <member name="constant_angular_velocity" type="Vector3" setter="set_constant_angular_velocity" getter="get_constant_angular_velocity" default="Vector3( 0, 0, 0 )">
- The body's constant angular velocity. This does not rotate the body, but affects other bodies that touch it, as if it was in a state of rotation.
+ <member name="constant_angular_velocity" type="Vector3" setter="set_constant_angular_velocity" getter="get_constant_angular_velocity" default="Vector3(0, 0, 0)">
+ The body's constant angular velocity. This does not rotate the body (unless [member kinematic_motion] is enabled), but affects other bodies that touch it, as if it were rotating.
</member>
- <member name="constant_linear_velocity" type="Vector3" setter="set_constant_linear_velocity" getter="get_constant_linear_velocity" default="Vector3( 0, 0, 0 )">
- The body's constant linear velocity. This does not move the body, but affects other bodies that touch it, as if it was in a state of movement.
+ <member name="constant_linear_velocity" type="Vector3" setter="set_constant_linear_velocity" getter="get_constant_linear_velocity" default="Vector3(0, 0, 0)">
+ The body's constant linear velocity. This does not move the body (unless [member kinematic_motion] is enabled), but affects other bodies that touch it, as if it were moving.
+ </member>
+ <member name="kinematic_motion" type="bool" setter="set_kinematic_motion_enabled" getter="is_kinematic_motion_enabled" default="false">
+ If [code]true[/code], the body will act the same as a [RigidBody3D] in [constant RigidBody3D.MODE_KINEMATIC] mode.
+ When the body is moved manually, either from code or from an [AnimationPlayer] (with [member AnimationPlayer.playback_process_mode] set to [code]physics[/code]), the physics will automatically compute an estimate of their linear and angular velocity. This makes them very useful for moving platforms or other AnimationPlayer-controlled objects (like a door, a bridge that opens, etc).
</member>
<member name="physics_material_override" type="PhysicsMaterial" setter="set_physics_material_override" getter="get_physics_material_override">
The physics material override for the body.
diff --git a/doc/classes/StreamPeer.xml b/doc/classes/StreamPeer.xml
index a1b858acf6..5367a572f1 100644
--- a/doc/classes/StreamPeer.xml
+++ b/doc/classes/StreamPeer.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="StreamPeer" inherits="Reference" version="4.0">
+<class name="StreamPeer" inherits="RefCounted" version="4.0">
<brief_description>
Abstraction and base class for stream-based protocols.
</brief_description>
<description>
- StreamPeer is an abstraction and base class for stream-based protocols (such as TCP or UNIX sockets). It provides an API for sending and receiving data through streams as raw data or strings.
+ StreamPeer is an abstraction and base class for stream-based protocols (such as TCP). It provides an API for sending and receiving data through streams as raw data or strings.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/StreamPeerBuffer.xml b/doc/classes/StreamPeerBuffer.xml
index 41cef9fb55..03a150b90f 100644
--- a/doc/classes/StreamPeerBuffer.xml
+++ b/doc/classes/StreamPeerBuffer.xml
@@ -49,7 +49,7 @@
</method>
</methods>
<members>
- <member name="data_array" type="PackedByteArray" setter="set_data_array" getter="get_data_array" default="PackedByteArray( )">
+ <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 416438e648..3bf05e7c92 100644
--- a/doc/classes/String.xml
+++ b/doc/classes/String.xml
@@ -275,7 +275,7 @@
Returns a copy of the string with the substring [code]what[/code] inserted at the given position.
</description>
</method>
- <method name="is_abs_path" qualifiers="const">
+ <method name="is_absolute_path" qualifiers="const">
<return type="bool">
</return>
<description>
@@ -352,7 +352,7 @@
Returns [code]true[/code] if this string is a valid identifier. A valid identifier may contain only letters, digits and underscores ([code]_[/code]) and the first character may not be a digit.
</description>
</method>
- <method name="is_valid_integer" qualifiers="const">
+ <method name="is_valid_int" qualifiers="const">
<return type="bool">
</return>
<description>
@@ -397,7 +397,12 @@
<argument index="0" name="position" type="int">
</argument>
<description>
- Returns a number of characters from the left of the string.
+ Returns a number of characters from the left of the string. If negative [code]position[/code] is used, the characters are counted downwards from [String]'s length.
+ Examples:
+ [codeblock]
+ print("sample text".left(3)) #prints "sam"
+ print("sample text".left(-3)) #prints "sample t"
+ [/codeblock]
</description>
</method>
<method name="length" qualifiers="const">
@@ -669,7 +674,12 @@
<argument index="0" name="position" type="int">
</argument>
<description>
- Returns the right side of the string from a given position.
+ Returns a number of characters from the right of the string. If negative [code]position[/code] is used, the characters are counted downwards from [String]'s length.
+ Examples:
+ [codeblock]
+ print("sample text".right(3)) #prints "ext"
+ print("sample text".right(-3)) #prints "ple text"
+ [/codeblock]
</description>
</method>
<method name="rpad" qualifiers="const">
diff --git a/doc/classes/StyleBoxFlat.xml b/doc/classes/StyleBoxFlat.xml
index d66ae210ec..9e02fb57c3 100644
--- a/doc/classes/StyleBoxFlat.xml
+++ b/doc/classes/StyleBoxFlat.xml
@@ -156,13 +156,13 @@
<member name="anti_aliasing_size" type="int" setter="set_aa_size" getter="get_aa_size" default="1">
This changes the size of the faded ring. Higher values can be used to achieve a "blurry" effect.
</member>
- <member name="bg_color" type="Color" setter="set_bg_color" getter="get_bg_color" default="Color( 0.6, 0.6, 0.6, 1 )">
+ <member name="bg_color" type="Color" setter="set_bg_color" getter="get_bg_color" default="Color(0.6, 0.6, 0.6, 1)">
The background color of the stylebox.
</member>
<member name="border_blend" type="bool" setter="set_border_blend" getter="get_border_blend" default="false">
If [code]true[/code], the border will fade into the background color.
</member>
- <member name="border_color" type="Color" setter="set_border_color" getter="get_border_color" default="Color( 0.8, 0.8, 0.8, 1 )">
+ <member name="border_color" type="Color" setter="set_border_color" getter="get_border_color" default="Color(0.8, 0.8, 0.8, 1)">
Sets the color of the border.
</member>
<member name="border_width_bottom" type="int" setter="set_border_width" getter="get_border_width" default="0">
@@ -209,10 +209,10 @@
<member name="expand_margin_top" type="float" setter="set_expand_margin" getter="get_expand_margin" default="0.0">
Expands the stylebox outside of the control rect on the top edge. Useful in combination with [member border_width_top] to draw a border outside the control rect.
</member>
- <member name="shadow_color" type="Color" setter="set_shadow_color" getter="get_shadow_color" default="Color( 0, 0, 0, 0.6 )">
+ <member name="shadow_color" type="Color" setter="set_shadow_color" getter="get_shadow_color" default="Color(0, 0, 0, 0.6)">
The color of the shadow. This has no effect if [member shadow_size] is lower than 1.
</member>
- <member name="shadow_offset" type="Vector2" setter="set_shadow_offset" getter="get_shadow_offset" default="Vector2( 0, 0 )">
+ <member name="shadow_offset" type="Vector2" setter="set_shadow_offset" getter="get_shadow_offset" default="Vector2(0, 0)">
The shadow offset in pixels. Adjusts the position of the shadow relatively to the stylebox.
</member>
<member name="shadow_size" type="int" setter="set_shadow_size" getter="get_shadow_size" default="0">
diff --git a/doc/classes/StyleBoxLine.xml b/doc/classes/StyleBoxLine.xml
index 4a2dbf60e4..850c656720 100644
--- a/doc/classes/StyleBoxLine.xml
+++ b/doc/classes/StyleBoxLine.xml
@@ -11,7 +11,7 @@
<methods>
</methods>
<members>
- <member name="color" type="Color" setter="set_color" getter="get_color" default="Color( 0, 0, 0, 1 )">
+ <member name="color" type="Color" setter="set_color" getter="get_color" default="Color(0, 0, 0, 1)">
The line's color.
</member>
<member name="grow_begin" type="float" setter="set_grow_begin" getter="get_grow_begin" default="1.0">
diff --git a/doc/classes/StyleBoxTexture.xml b/doc/classes/StyleBoxTexture.xml
index 895d0c357d..be14048126 100644
--- a/doc/classes/StyleBoxTexture.xml
+++ b/doc/classes/StyleBoxTexture.xml
@@ -116,10 +116,10 @@
A higher value means more of the source texture is considered to be part of the top border of the 3×3 box.
This is also the value used as fallback for [member StyleBox.content_margin_top] if it is negative.
</member>
- <member name="modulate_color" type="Color" setter="set_modulate" getter="get_modulate" default="Color( 1, 1, 1, 1 )">
+ <member name="modulate_color" type="Color" setter="set_modulate" getter="get_modulate" default="Color(1, 1, 1, 1)">
Modulates the color of the texture when this style box is drawn.
</member>
- <member name="region_rect" type="Rect2" setter="set_region_rect" getter="get_region_rect" default="Rect2( 0, 0, 0, 0 )">
+ <member name="region_rect" type="Rect2" setter="set_region_rect" getter="get_region_rect" default="Rect2(0, 0, 0, 0)">
Species a sub-region of the texture to use.
This is equivalent to first wrapping the texture in an [AtlasTexture] with the same region.
</member>
@@ -127,13 +127,6 @@
The texture to use when drawing this style box.
</member>
</members>
- <signals>
- <signal name="texture_changed">
- <description>
- Emitted when the stylebox's texture is changed.
- </description>
- </signal>
- </signals>
<constants>
<constant name="AXIS_STRETCH_MODE_STRETCH" value="0" enum="AxisStretchMode">
Stretch the stylebox's texture. This results in visible distortion unless the texture size matches the stylebox's size perfectly.
diff --git a/doc/classes/SubViewport.xml b/doc/classes/SubViewport.xml
index b6e9eda1d1..9c5610e2c7 100644
--- a/doc/classes/SubViewport.xml
+++ b/doc/classes/SubViewport.xml
@@ -25,10 +25,10 @@
<member name="render_target_update_mode" type="int" setter="set_update_mode" getter="get_update_mode" enum="SubViewport.UpdateMode" default="2">
The update mode when the sub-viewport is used as a render target.
</member>
- <member name="size" type="Vector2i" setter="set_size" getter="get_size" default="Vector2i( 0, 0 )">
+ <member name="size" type="Vector2i" setter="set_size" getter="get_size" default="Vector2i(512, 512)">
The width and height of the sub-viewport.
</member>
- <member name="size_2d_override" type="Vector2i" setter="set_size_2d_override" getter="get_size_2d_override" default="Vector2i( 0, 0 )">
+ <member name="size_2d_override" type="Vector2i" setter="set_size_2d_override" getter="get_size_2d_override" default="Vector2i(0, 0)">
The 2D size override of the sub-viewport. If either the width or height is [code]0[/code], the override is disabled.
</member>
<member name="size_2d_override_stretch" type="bool" setter="set_size_2d_override_stretch" getter="is_size_2d_override_stretch_enabled" default="false">
diff --git a/doc/classes/SurfaceTool.xml b/doc/classes/SurfaceTool.xml
index 1195e4aa2b..22d1b52479 100644
--- a/doc/classes/SurfaceTool.xml
+++ b/doc/classes/SurfaceTool.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SurfaceTool" inherits="Reference" version="4.0">
+<class name="SurfaceTool" inherits="RefCounted" version="4.0">
<brief_description>
Helper tool to create geometry.
</brief_description>
@@ -45,15 +45,15 @@
</return>
<argument index="0" name="vertices" type="PackedVector3Array">
</argument>
- <argument index="1" name="uvs" type="PackedVector2Array" default="PackedVector2Array( )">
+ <argument index="1" name="uvs" type="PackedVector2Array" default="PackedVector2Array()">
</argument>
- <argument index="2" name="colors" type="PackedColorArray" default="PackedColorArray( )">
+ <argument index="2" name="colors" type="PackedColorArray" default="PackedColorArray()">
</argument>
- <argument index="3" name="uv2s" type="PackedVector2Array" default="PackedVector2Array( )">
+ <argument index="3" name="uv2s" type="PackedVector2Array" default="PackedVector2Array()">
</argument>
- <argument index="4" name="normals" type="PackedVector3Array" default="PackedVector3Array( )">
+ <argument index="4" name="normals" type="PackedVector3Array" default="PackedVector3Array()">
</argument>
- <argument index="5" name="tangents" type="Array" default="[ ]">
+ <argument index="5" name="tangents" type="Array" default="[]">
</argument>
<description>
Inserts a triangle fan made of array data into [Mesh] being constructed.
@@ -76,10 +76,10 @@
</argument>
<argument index="1" name="surface" type="int">
</argument>
- <argument index="2" name="transform" type="Transform">
+ <argument index="2" name="transform" type="Transform3D">
</argument>
<description>
- Append vertices from a given [Mesh] surface onto the current vertex array with specified [Transform].
+ Append vertices from a given [Mesh] surface onto the current vertex array with specified [Transform3D].
</description>
</method>
<method name="begin">
diff --git a/doc/classes/TCP_Server.xml b/doc/classes/TCPServer.xml
index ec91d75d47..7160055c6d 100644
--- a/doc/classes/TCP_Server.xml
+++ b/doc/classes/TCPServer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="TCP_Server" inherits="Reference" version="4.0">
+<class name="TCPServer" inherits="RefCounted" version="4.0">
<brief_description>
A TCP server.
</brief_description>
diff --git a/doc/classes/TabContainer.xml b/doc/classes/TabContainer.xml
index ddf6b465a4..3f24509ec7 100644
--- a/doc/classes/TabContainer.xml
+++ b/doc/classes/TabContainer.xml
@@ -198,19 +198,19 @@
<theme_item name="font" type="Font">
The font used to draw tab names.
</theme_item>
- <theme_item name="font_disabled_color" type="Color" default="Color( 0.9, 0.9, 0.9, 0.2 )">
+ <theme_item name="font_disabled_color" type="Color" default="Color(0.9, 0.9, 0.9, 0.2)">
Font color of disabled tabs.
</theme_item>
- <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ <theme_item name="font_outline_color" type="Color" default="Color(1, 1, 1, 1)">
The tint of text outline of the tab name.
</theme_item>
- <theme_item name="font_selected_color" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )">
+ <theme_item name="font_selected_color" type="Color" default="Color(0.94, 0.94, 0.94, 1)">
Font color of the currently selected tab.
</theme_item>
<theme_item name="font_size" type="int">
Font size of the tab names.
</theme_item>
- <theme_item name="font_unselected_color" type="Color" default="Color( 0.69, 0.69, 0.69, 1 )">
+ <theme_item name="font_unselected_color" type="Color" default="Color(0.69, 0.69, 0.69, 1)">
Font color of the other, unselected tabs.
</theme_item>
<theme_item name="icon_separation" type="int" default="4">
diff --git a/doc/classes/Tabs.xml b/doc/classes/Tabs.xml
index d784585e20..aff104c922 100644
--- a/doc/classes/Tabs.xml
+++ b/doc/classes/Tabs.xml
@@ -362,19 +362,19 @@
<theme_item name="font" type="Font">
The font used to draw tab names.
</theme_item>
- <theme_item name="font_disabled_color" type="Color" default="Color( 0.9, 0.9, 0.9, 0.2 )">
+ <theme_item name="font_disabled_color" type="Color" default="Color(0.9, 0.9, 0.9, 0.2)">
Font color of disabled tabs.
</theme_item>
- <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ <theme_item name="font_outline_color" type="Color" default="Color(1, 1, 1, 1)">
The tint of text outline of the tab name.
</theme_item>
- <theme_item name="font_selected_color" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )">
+ <theme_item name="font_selected_color" type="Color" default="Color(0.94, 0.94, 0.94, 1)">
Font color of the currently selected tab.
</theme_item>
<theme_item name="font_size" type="int">
Font size of the tab names.
</theme_item>
- <theme_item name="font_unselected_color" type="Color" default="Color( 0.69, 0.69, 0.69, 1 )">
+ <theme_item name="font_unselected_color" type="Color" default="Color(0.69, 0.69, 0.69, 1)">
Font color of the other, unselected tabs.
</theme_item>
<theme_item name="hseparation" type="int" default="4">
diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml
index 088bcd1c3c..03e4556c92 100644
--- a/doc/classes/TextEdit.xml
+++ b/doc/classes/TextEdit.xml
@@ -5,6 +5,7 @@
</brief_description>
<description>
TextEdit is meant for editing large, multiline text. It also has facilities for editing code, such as syntax highlighting support and multiple levels of undo/redo.
+ [b]Note:[/b] When holding down [kbd]Alt[/kbd], the vertical scroll wheel will scroll 5 times as fast as it would normally do. This also works in the Godot script editor.
</description>
<tutorials>
</tutorials>
@@ -17,15 +18,6 @@
<description>
</description>
</method>
- <method name="can_fold" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="line" type="int">
- </argument>
- <description>
- Returns if the given line is foldable, that is, it has indented lines right below it.
- </description>
- </method>
<method name="center_viewport_to_cursor">
<return type="void">
</return>
@@ -94,7 +86,7 @@
<description>
Moves the cursor at the specified [code]line[/code] index.
If [code]adjust_viewport[/code] is set to [code]true[/code], the viewport will center at the cursor position after the move occurs.
- If [code]can_be_hidden[/code] is set to [code]true[/code], the specified [code]line[/code] can be hidden using [method set_line_as_hidden].
+ If [code]can_be_hidden[/code] is set to [code]true[/code], the specified [code]line[/code] can be hidden.
</description>
</method>
<method name="cut">
@@ -111,20 +103,11 @@
Deselects the current selection.
</description>
</method>
- <method name="fold_all_lines">
- <return type="void">
- </return>
- <description>
- Folds all lines that are possible to be folded (see [method can_fold]).
- </description>
- </method>
- <method name="fold_line">
- <return type="void">
+ <method name="get_caret_draw_pos" qualifiers="const">
+ <return type="Vector2">
</return>
- <argument index="0" name="line" type="int">
- </argument>
<description>
- Folds the given line, if possible (see [method can_fold]).
+ Gets the caret pixel draw poistion.
</description>
</method>
<method name="get_gutter_count" qualifiers="const">
@@ -166,6 +149,15 @@
Returns the text of a specific line.
</description>
</method>
+ <method name="get_line_background_color">
+ <return type="Color">
+ </return>
+ <argument index="0" name="line" type="int">
+ </argument>
+ <description>
+ Returns the current background color of the line. [code]Color(0, 0, 0, 0)[/code] is returned if no color is set.
+ </description>
+ </method>
<method name="get_line_count" qualifiers="const">
<return type="int">
</return>
@@ -282,6 +274,13 @@
Returns the selection end line.
</description>
</method>
+ <method name="get_visible_line_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns the number of visible lines, including wrapped text.
+ </description>
+ </method>
<method name="get_word_under_cursor" qualifiers="const">
<return type="String">
</return>
@@ -298,13 +297,11 @@
Insert the specified text at the cursor position.
</description>
</method>
- <method name="is_folded" qualifiers="const">
+ <method name="is_caret_visible" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="line" type="int">
- </argument>
<description>
- Returns whether the line at the specified index is folded or not.
+ Returns [code]true[/code] if the caret is visible on the screen.
</description>
</method>
<method name="is_gutter_clickable" qualifiers="const">
@@ -341,15 +338,6 @@
<description>
</description>
</method>
- <method name="is_line_hidden" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="line" type="int">
- </argument>
- <description>
- Returns whether the line at the specified index is hidden or not.
- </description>
- </method>
<method name="is_selection_active" qualifiers="const">
<return type="bool">
</return>
@@ -529,15 +517,15 @@
Sets the text for a specific line.
</description>
</method>
- <method name="set_line_as_hidden">
+ <method name="set_line_background_color">
<return type="void">
</return>
<argument index="0" name="line" type="int">
</argument>
- <argument index="1" name="enable" type="bool">
+ <argument index="1" name="color" type="Color">
</argument>
<description>
- If [code]true[/code], hides the line of the specified index.
+ Sets the current background color of the line. Set to [code]Color(0, 0, 0, 0)[/code] for no color.
</description>
</method>
<method name="set_line_gutter_clickable">
@@ -623,15 +611,6 @@
<description>
</description>
</method>
- <method name="toggle_fold_line">
- <return type="void">
- </return>
- <argument index="0" name="line" type="int">
- </argument>
- <description>
- Toggle the folding of the code block at the given line.
- </description>
- </method>
<method name="undo">
<return type="void">
</return>
@@ -639,22 +618,6 @@
Perform undo operation.
</description>
</method>
- <method name="unfold_line">
- <return type="void">
- </return>
- <argument index="0" name="line" type="int">
- </argument>
- <description>
- Unfolds the given line, if folded.
- </description>
- </method>
- <method name="unhide_all_lines">
- <return type="void">
- </return>
- <description>
- Unhide all lines that were previously set to hidden by [method set_line_as_hidden].
- </description>
- </method>
</methods>
<members>
<member name="caret_blink" type="bool" setter="cursor_set_blink_enabled" getter="cursor_get_blink_enabled" default="false">
@@ -688,9 +651,6 @@
If [code]true[/code], the "tab" character will have a visible representation.
</member>
<member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" override="true" enum="Control.FocusMode" default="2" />
- <member name="hiding_enabled" type="bool" setter="set_hiding_enabled" getter="is_hiding_enabled" default="false">
- If [code]true[/code], all lines that have been set to hidden by [method set_line_as_hidden], will not be visible.
- </member>
<member name="highlight_all_occurrences" type="bool" setter="set_highlight_all_occurrences" getter="is_highlight_all_occurrences_enabled" default="false">
If [code]true[/code], all occurrences of the selected text will be highlighted.
</member>
@@ -714,10 +674,10 @@
If [code]true[/code], read-only mode is enabled. Existing text cannot be modified and new text cannot be added.
</member>
<member name="scroll_horizontal" type="int" setter="set_h_scroll" getter="get_h_scroll" default="0">
- If there is a horizontal scrollbar this determines the current horizontal scroll value in pixels.
+ If there is a horizontal scrollbar, this determines the current horizontal scroll value in pixels.
</member>
<member name="scroll_vertical" type="float" setter="set_v_scroll" getter="get_v_scroll" default="0.0">
- If there is a vertical scrollbar this determines the current vertical scroll value in line numbers, starting at 0 for the top line.
+ If there is a vertical scrollbar, this determines the current vertical scroll value in line numbers, starting at 0 for the top line.
</member>
<member name="selecting_enabled" type="bool" setter="set_selecting_enabled" getter="is_selecting_enabled" default="true">
If [code]true[/code], text can be selected.
@@ -732,7 +692,7 @@
<member name="structured_text_bidi_override" type="int" setter="set_structured_text_bidi_override" getter="get_structured_text_bidi_override" enum="Control.StructuredTextParser" default="0">
Set BiDi algorithm override for the structured text.
</member>
- <member name="structured_text_bidi_override_options" type="Array" setter="set_structured_text_bidi_override_options" getter="get_structured_text_bidi_override_options" default="[ ]">
+ <member name="structured_text_bidi_override_options" type="Array" setter="set_structured_text_bidi_override_options" getter="get_structured_text_bidi_override_options" default="[]">
Set additional options for BiDi override.
</member>
<member name="syntax_highlighter" type="SyntaxHighlighter" setter="set_syntax_highlighter" getter="get_syntax_highlighter">
@@ -784,10 +744,6 @@
<description>
</description>
</signal>
- <signal name="request_completion">
- <description>
- </description>
- </signal>
<signal name="symbol_lookup">
<argument index="0" name="symbol" type="String">
</argument>
@@ -925,36 +881,16 @@
</constant>
</constants>
<theme_items>
- <theme_item name="background_color" type="Color" default="Color( 0, 0, 0, 0 )">
+ <theme_item name="background_color" type="Color" default="Color(0, 0, 0, 0)">
Sets the background [Color] of this [TextEdit].
</theme_item>
- <theme_item name="brace_mismatch_color" type="Color" default="Color( 1, 0.2, 0.2, 1 )">
- </theme_item>
- <theme_item name="caret_background_color" type="Color" default="Color( 0, 0, 0, 1 )">
- </theme_item>
- <theme_item name="caret_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )">
- </theme_item>
- <theme_item name="code_folding_color" type="Color" default="Color( 0.8, 0.8, 0.8, 0.8 )">
+ <theme_item name="brace_mismatch_color" type="Color" default="Color(1, 0.2, 0.2, 1)">
</theme_item>
- <theme_item name="completion" type="StyleBox">
+ <theme_item name="caret_background_color" type="Color" default="Color(0, 0, 0, 1)">
</theme_item>
- <theme_item name="completion_background_color" type="Color" default="Color( 0.17, 0.16, 0.2, 1 )">
+ <theme_item name="caret_color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
</theme_item>
- <theme_item name="completion_existing_color" type="Color" default="Color( 0.87, 0.87, 0.87, 0.13 )">
- </theme_item>
- <theme_item name="completion_font_color" type="Color" default="Color( 0.67, 0.67, 0.67, 1 )">
- </theme_item>
- <theme_item name="completion_lines" type="int" default="7">
- </theme_item>
- <theme_item name="completion_max_width" type="int" default="50">
- </theme_item>
- <theme_item name="completion_scroll_color" type="Color" default="Color( 1, 1, 1, 1 )">
- </theme_item>
- <theme_item name="completion_scroll_width" type="int" default="3">
- </theme_item>
- <theme_item name="completion_selected_color" type="Color" default="Color( 0.26, 0.26, 0.27, 1 )">
- </theme_item>
- <theme_item name="current_line_color" type="Color" default="Color( 0.25, 0.25, 0.26, 0.8 )">
+ <theme_item name="current_line_color" type="Color" default="Color(0.25, 0.25, 0.26, 0.8)">
Sets the [Color] of the breakpoints. [member breakpoint_gutter] has to be enabled.
</theme_item>
<theme_item name="focus" type="StyleBox">
@@ -962,15 +898,15 @@
<theme_item name="font" type="Font">
Sets the default [Font].
</theme_item>
- <theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )">
+ <theme_item name="font_color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
Sets the font [Color].
</theme_item>
- <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ <theme_item name="font_outline_color" type="Color" default="Color(1, 1, 1, 1)">
The tint of text outline of the [TextEdit].
</theme_item>
- <theme_item name="font_readonly_color" type="Color" default="Color( 0.88, 0.88, 0.88, 0.5 )">
+ <theme_item name="font_readonly_color" type="Color" default="Color(0.88, 0.88, 0.88, 0.5)">
</theme_item>
- <theme_item name="font_selected_color" type="Color" default="Color( 0, 0, 0, 1 )">
+ <theme_item name="font_selected_color" type="Color" default="Color(0, 0, 0, 1)">
Sets the [Color] of the selected text. [member override_selected_font_color] has to be enabled.
</theme_item>
<theme_item name="font_size" type="int">
@@ -979,9 +915,6 @@
<theme_item name="line_spacing" type="int" default="4">
Sets the spacing between the lines.
</theme_item>
- <theme_item name="mark_color" type="Color" default="Color( 1, 0.4, 0.4, 0.4 )">
- Sets the [Color] of marked text.
- </theme_item>
<theme_item name="normal" type="StyleBox">
Sets the [StyleBox] of this [TextEdit].
</theme_item>
@@ -991,7 +924,7 @@
<theme_item name="read_only" type="StyleBox">
Sets the [StyleBox] of this [TextEdit] when [member readonly] is enabled.
</theme_item>
- <theme_item name="selection_color" type="Color" default="Color( 0.49, 0.49, 0.49, 1 )">
+ <theme_item name="selection_color" type="Color" default="Color(0.49, 0.49, 0.49, 1)">
Sets the highlight [Color] of text selections.
</theme_item>
<theme_item name="space" type="Texture2D">
@@ -1000,7 +933,7 @@
<theme_item name="tab" type="Texture2D">
Sets a custom [Texture2D] for tab text characters.
</theme_item>
- <theme_item name="word_highlighted_color" type="Color" default="Color( 0.8, 0.9, 0.9, 0.15 )">
+ <theme_item name="word_highlighted_color" type="Color" default="Color(0.8, 0.9, 0.9, 0.15)">
Sets the highlight [Color] of multiple occurrences. [member highlight_all_occurrences] has to be enabled.
</theme_item>
</theme_items>
diff --git a/doc/classes/TextLine.xml b/doc/classes/TextLine.xml
index c21da09edb..318c3be794 100644
--- a/doc/classes/TextLine.xml
+++ b/doc/classes/TextLine.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="TextLine" inherits="Reference" version="4.0">
+<class name="TextLine" inherits="RefCounted" version="4.0">
<brief_description>
Holds a line of text.
</brief_description>
@@ -56,7 +56,7 @@
</argument>
<argument index="1" name="pos" type="Vector2">
</argument>
- <argument index="2" name="color" type="Color" default="Color( 1, 1, 1, 1 )">
+ <argument index="2" name="color" type="Color" default="Color(1, 1, 1, 1)">
</argument>
<description>
Draw text into a canvas item at a given position, with [code]color[/code]. [code]pos[/code] specifies the top left corner of the bounding box.
@@ -71,7 +71,7 @@
</argument>
<argument index="2" name="outline_size" type="int" default="1">
</argument>
- <argument index="3" name="color" type="Color" default="Color( 1, 1, 1, 1 )">
+ <argument index="3" name="color" type="Color" default="Color(1, 1, 1, 1)">
</argument>
<description>
Draw text into a canvas item at a given position, with [code]color[/code]. [code]pos[/code] specifies the top left corner of the bounding box.
diff --git a/doc/classes/TextParagraph.xml b/doc/classes/TextParagraph.xml
index 8df53b8423..d67a9bcb85 100644
--- a/doc/classes/TextParagraph.xml
+++ b/doc/classes/TextParagraph.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="TextParagraph" inherits="Reference" version="4.0">
+<class name="TextParagraph" inherits="RefCounted" version="4.0">
<brief_description>
Holds a paragraph of text.
</brief_description>
@@ -63,9 +63,9 @@
</argument>
<argument index="1" name="pos" type="Vector2">
</argument>
- <argument index="2" name="color" type="Color" default="Color( 1, 1, 1, 1 )">
+ <argument index="2" name="color" type="Color" default="Color(1, 1, 1, 1)">
</argument>
- <argument index="3" name="dc_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ <argument index="3" name="dc_color" type="Color" default="Color(1, 1, 1, 1)">
</argument>
<description>
Draw all lines of the text and drop cap into a canvas item at a given position, with [code]color[/code]. [code]pos[/code] specifies the top left corner of the bounding box.
@@ -78,7 +78,7 @@
</argument>
<argument index="1" name="pos" type="Vector2">
</argument>
- <argument index="2" name="color" type="Color" default="Color( 1, 1, 1, 1 )">
+ <argument index="2" name="color" type="Color" default="Color(1, 1, 1, 1)">
</argument>
<description>
Draw drop cap into a canvas item at a given position, with [code]color[/code]. [code]pos[/code] specifies the top left corner of the bounding box.
@@ -93,7 +93,7 @@
</argument>
<argument index="2" name="outline_size" type="int" default="1">
</argument>
- <argument index="3" name="color" type="Color" default="Color( 1, 1, 1, 1 )">
+ <argument index="3" name="color" type="Color" default="Color(1, 1, 1, 1)">
</argument>
<description>
Draw drop cap outline into a canvas item at a given position, with [code]color[/code]. [code]pos[/code] specifies the top left corner of the bounding box.
@@ -108,7 +108,7 @@
</argument>
<argument index="2" name="line" type="int">
</argument>
- <argument index="3" name="color" type="Color" default="Color( 1, 1, 1, 1 )">
+ <argument index="3" name="color" type="Color" default="Color(1, 1, 1, 1)">
</argument>
<description>
Draw single line of text into a canvas item at a given position, with [code]color[/code]. [code]pos[/code] specifies the top left corner of the bounding box.
@@ -125,7 +125,7 @@
</argument>
<argument index="3" name="outline_size" type="int" default="1">
</argument>
- <argument index="4" name="color" type="Color" default="Color( 1, 1, 1, 1 )">
+ <argument index="4" name="color" type="Color" default="Color(1, 1, 1, 1)">
</argument>
<description>
Draw outline of the single line of text into a canvas item at a given position, with [code]color[/code]. [code]pos[/code] specifies the top left corner of the bounding box.
@@ -140,9 +140,9 @@
</argument>
<argument index="2" name="outline_size" type="int" default="1">
</argument>
- <argument index="3" name="color" type="Color" default="Color( 1, 1, 1, 1 )">
+ <argument index="3" name="color" type="Color" default="Color(1, 1, 1, 1)">
</argument>
- <argument index="4" name="dc_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ <argument index="4" name="dc_color" type="Color" default="Color(1, 1, 1, 1)">
</argument>
<description>
Draw outlines of all lines of the text and drop cap into a canvas item at a given position, with [code]color[/code]. [code]pos[/code] specifies the top left corner of the bounding box.
@@ -344,7 +344,7 @@
</argument>
<argument index="2" name="size" type="int">
</argument>
- <argument index="3" name="dropcap_margins" type="Rect2" default="Rect2( 0, 0, 0, 0 )">
+ <argument index="3" name="dropcap_margins" type="Rect2" default="Rect2(0, 0, 0, 0)">
</argument>
<argument index="4" name="opentype_features" type="Dictionary" default="{
}">
diff --git a/doc/classes/TextServer.xml b/doc/classes/TextServer.xml
index fe63e434c9..c943946ab3 100644
--- a/doc/classes/TextServer.xml
+++ b/doc/classes/TextServer.xml
@@ -149,7 +149,7 @@
</argument>
<argument index="4" name="index" type="int">
</argument>
- <argument index="5" name="color" type="Color" default="Color( 1, 1, 1, 1 )">
+ <argument index="5" name="color" type="Color" default="Color(1, 1, 1, 1)">
</argument>
<description>
Draws single glyph into a canvas item at the position, using [code]font[/code] at the size [code]size[/code].
@@ -171,7 +171,7 @@
</argument>
<argument index="5" name="index" type="int">
</argument>
- <argument index="6" name="color" type="Color" default="Color( 1, 1, 1, 1 )">
+ <argument index="6" name="color" type="Color" default="Color(1, 1, 1, 1)">
</argument>
<description>
Draws single glyph outline of size [code]outline_size[/code] into a canvas item at the position, using [code]font[/code] at the size [code]size[/code].
@@ -788,7 +788,7 @@
</argument>
<argument index="4" name="clip_r" type="float" default="-1">
</argument>
- <argument index="5" name="color" type="Color" default="Color( 1, 1, 1, 1 )">
+ <argument index="5" name="color" type="Color" default="Color(1, 1, 1, 1)">
</argument>
<description>
Draw shaped text into a canvas item at a given position, with [code]color[/code]. [code]pos[/code] specifies the leftmost point of the baseline (for horizontal layout) or topmost point of the baseline (for vertical layout).
@@ -809,7 +809,7 @@
</argument>
<argument index="5" name="outline_size" type="int" default="1">
</argument>
- <argument index="6" name="color" type="Color" default="Color( 1, 1, 1, 1 )">
+ <argument index="6" name="color" type="Color" default="Color(1, 1, 1, 1)">
</argument>
<description>
Draw the outline of the shaped text into a canvas item at a given position, with [code]color[/code]. [code]pos[/code] specifies the leftmost point of the baseline (for horizontal layout) or topmost point of the baseline (for vertical layout).
@@ -976,7 +976,7 @@
</argument>
<description>
Returns [code]true[/code] if text buffer is configured to display hexadecimal codes in place of invalid characters.
- Note: If set to [code]false[/code], nothing is displayed in place of invalid characters.
+ Note: If set to [code]false[/code], nothing is displayed in place of invalid characters.
</description>
</method>
<method name="shaped_text_get_range" qualifiers="const">
diff --git a/doc/classes/Texture2D.xml b/doc/classes/Texture2D.xml
index c33f32c9e4..35b719ae48 100644
--- a/doc/classes/Texture2D.xml
+++ b/doc/classes/Texture2D.xml
@@ -19,7 +19,7 @@
</argument>
<argument index="1" name="position" type="Vector2">
</argument>
- <argument index="2" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )">
+ <argument index="2" name="modulate" type="Color" default="Color(1, 1, 1, 1)">
</argument>
<argument index="3" name="transpose" type="bool" default="false">
</argument>
@@ -36,7 +36,7 @@
</argument>
<argument index="2" name="tile" type="bool">
</argument>
- <argument index="3" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )">
+ <argument index="3" name="modulate" type="Color" default="Color(1, 1, 1, 1)">
</argument>
<argument index="4" name="transpose" type="bool" default="false">
</argument>
@@ -53,7 +53,7 @@
</argument>
<argument index="2" name="src_rect" type="Rect2">
</argument>
- <argument index="3" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )">
+ <argument index="3" name="modulate" type="Color" default="Color(1, 1, 1, 1)">
</argument>
<argument index="4" name="transpose" type="bool" default="false">
</argument>
diff --git a/doc/classes/TextureProgressBar.xml b/doc/classes/TextureProgressBar.xml
index b40759578f..59cde536ad 100644
--- a/doc/classes/TextureProgressBar.xml
+++ b/doc/classes/TextureProgressBar.xml
@@ -36,7 +36,7 @@
<member name="nine_patch_stretch" type="bool" setter="set_nine_patch_stretch" getter="get_nine_patch_stretch" default="false">
If [code]true[/code], Godot treats the bar's textures like in [NinePatchRect]. Use the [code]stretch_margin_*[/code] properties like [member stretch_margin_bottom] to set up the nine patch's 3×3 grid. When using a radial [member fill_mode], this setting will enable stretching.
</member>
- <member name="radial_center_offset" type="Vector2" setter="set_radial_center_offset" getter="get_radial_center_offset" default="Vector2( 0, 0 )">
+ <member name="radial_center_offset" type="Vector2" setter="set_radial_center_offset" getter="get_radial_center_offset" default="Vector2(0, 0)">
Offsets [member texture_progress] if [member fill_mode] is [constant FILL_CLOCKWISE] or [constant FILL_COUNTER_CLOCKWISE].
</member>
<member name="radial_fill_degrees" type="float" setter="set_fill_degrees" getter="get_fill_degrees" default="360.0">
@@ -68,13 +68,13 @@
<member name="texture_under" type="Texture2D" setter="set_under_texture" getter="get_under_texture">
[Texture2D] that draws under the progress bar. The bar's background.
</member>
- <member name="tint_over" type="Color" setter="set_tint_over" getter="get_tint_over" default="Color( 1, 1, 1, 1 )">
+ <member name="tint_over" type="Color" setter="set_tint_over" getter="get_tint_over" default="Color(1, 1, 1, 1)">
Multiplies the color of the bar's [code]texture_over[/code] texture. The effect is similar to [member CanvasItem.modulate], except it only affects this specific texture instead of the entire node.
</member>
- <member name="tint_progress" type="Color" setter="set_tint_progress" getter="get_tint_progress" default="Color( 1, 1, 1, 1 )">
+ <member name="tint_progress" type="Color" setter="set_tint_progress" getter="get_tint_progress" default="Color(1, 1, 1, 1)">
Multiplies the color of the bar's [code]texture_progress[/code] texture.
</member>
- <member name="tint_under" type="Color" setter="set_tint_under" getter="get_tint_under" default="Color( 1, 1, 1, 1 )">
+ <member name="tint_under" type="Color" setter="set_tint_under" getter="get_tint_under" default="Color(1, 1, 1, 1)">
Multiplies the color of the bar's [code]texture_under[/code] texture.
</member>
</members>
diff --git a/doc/classes/Theme.xml b/doc/classes/Theme.xml
index 3173dddb42..7448697df3 100644
--- a/doc/classes/Theme.xml
+++ b/doc/classes/Theme.xml
@@ -23,10 +23,10 @@
</return>
<argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="node_type" type="StringName">
+ <argument index="1" name="theme_type" type="StringName">
</argument>
<description>
- Clears the [Color] at [code]name[/code] if the theme has [code]node_type[/code].
+ Clears the [Color] at [code]name[/code] if the theme has [code]theme_type[/code].
</description>
</method>
<method name="clear_constant">
@@ -34,10 +34,10 @@
</return>
<argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="node_type" type="StringName">
+ <argument index="1" name="theme_type" type="StringName">
</argument>
<description>
- Clears the constant at [code]name[/code] if the theme has [code]node_type[/code].
+ Clears the constant at [code]name[/code] if the theme has [code]theme_type[/code].
</description>
</method>
<method name="clear_font">
@@ -45,10 +45,10 @@
</return>
<argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="node_type" type="StringName">
+ <argument index="1" name="theme_type" type="StringName">
</argument>
<description>
- Clears the [Font] at [code]name[/code] if the theme has [code]node_type[/code].
+ Clears the [Font] at [code]name[/code] if the theme has [code]theme_type[/code].
</description>
</method>
<method name="clear_font_size">
@@ -56,10 +56,10 @@
</return>
<argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="node_type" type="StringName">
+ <argument index="1" name="theme_type" type="StringName">
</argument>
<description>
- Clears the font size [code]name[/code] if the theme has [code]node_type[/code].
+ Clears the font size [code]name[/code] if the theme has [code]theme_type[/code].
</description>
</method>
<method name="clear_icon">
@@ -67,10 +67,10 @@
</return>
<argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="node_type" type="StringName">
+ <argument index="1" name="theme_type" type="StringName">
</argument>
<description>
- Clears the icon at [code]name[/code] if the theme has [code]node_type[/code].
+ Clears the icon at [code]name[/code] if the theme has [code]theme_type[/code].
</description>
</method>
<method name="clear_stylebox">
@@ -78,10 +78,10 @@
</return>
<argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="node_type" type="StringName">
+ <argument index="1" name="theme_type" type="StringName">
</argument>
<description>
- Clears [StyleBox] at [code]name[/code] if the theme has [code]node_type[/code].
+ Clears [StyleBox] at [code]name[/code] if the theme has [code]theme_type[/code].
</description>
</method>
<method name="clear_theme_item">
@@ -91,10 +91,10 @@
</argument>
<argument index="1" name="name" type="StringName">
</argument>
- <argument index="2" name="node_type" type="StringName">
+ <argument index="2" name="theme_type" type="StringName">
</argument>
<description>
- Clears the theme item of [code]data_type[/code] at [code]name[/code] if the theme has [code]node_type[/code].
+ Clears the theme item of [code]data_type[/code] at [code]name[/code] if the theme has [code]theme_type[/code].
</description>
</method>
<method name="copy_default_theme">
@@ -118,19 +118,19 @@
</return>
<argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="node_type" type="StringName">
+ <argument index="1" name="theme_type" type="StringName">
</argument>
<description>
- Returns the [Color] at [code]name[/code] if the theme has [code]node_type[/code].
+ Returns the [Color] at [code]name[/code] if the theme has [code]theme_type[/code].
</description>
</method>
<method name="get_color_list" qualifiers="const">
<return type="PackedStringArray">
</return>
- <argument index="0" name="node_type" type="String">
+ <argument index="0" name="theme_type" type="String">
</argument>
<description>
- 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]node_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]theme_type[/code].
</description>
</method>
<method name="get_color_type_list" qualifiers="const">
@@ -145,19 +145,19 @@
</return>
<argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="node_type" type="StringName">
+ <argument index="1" name="theme_type" type="StringName">
</argument>
<description>
- Returns the constant at [code]name[/code] if the theme has [code]node_type[/code].
+ Returns the constant at [code]name[/code] if the theme has [code]theme_type[/code].
</description>
</method>
<method name="get_constant_list" qualifiers="const">
<return type="PackedStringArray">
</return>
- <argument index="0" name="node_type" type="String">
+ <argument index="0" name="theme_type" type="String">
</argument>
<description>
- Returns all the constants as a [PackedStringArray] filled with each constant's name, for use in [method get_constant], if the theme has [code]node_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]theme_type[/code].
</description>
</method>
<method name="get_constant_type_list" qualifiers="const">
@@ -172,19 +172,19 @@
</return>
<argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="node_type" type="StringName">
+ <argument index="1" name="theme_type" type="StringName">
</argument>
<description>
- Returns the [Font] at [code]name[/code] if the theme has [code]node_type[/code].
+ Returns the [Font] at [code]name[/code] if the theme has [code]theme_type[/code].
</description>
</method>
<method name="get_font_list" qualifiers="const">
<return type="PackedStringArray">
</return>
- <argument index="0" name="node_type" type="String">
+ <argument index="0" name="theme_type" type="String">
</argument>
<description>
- 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]node_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]theme_type[/code].
</description>
</method>
<method name="get_font_size" qualifiers="const">
@@ -192,19 +192,19 @@
</return>
<argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="node_type" type="StringName">
+ <argument index="1" name="theme_type" type="StringName">
</argument>
<description>
- Returns the font size at [code]name[/code] if the theme has [code]node_type[/code].
+ Returns the font size at [code]name[/code] if the theme has [code]theme_type[/code].
</description>
</method>
<method name="get_font_size_list" qualifiers="const">
<return type="PackedStringArray">
</return>
- <argument index="0" name="node_type" type="String">
+ <argument index="0" name="theme_type" type="String">
</argument>
<description>
- Returns all the font sizes as a [PackedStringArray] filled with each font size name, for use in [method get_font_size], if the theme has [code]node_type[/code].
+ Returns all the font sizes as a [PackedStringArray] filled with each font size name, for use in [method get_font_size], if the theme has [code]theme_type[/code].
</description>
</method>
<method name="get_font_size_type_list" qualifiers="const">
@@ -226,19 +226,19 @@
</return>
<argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="node_type" type="StringName">
+ <argument index="1" name="theme_type" type="StringName">
</argument>
<description>
- Returns the icon [Texture2D] at [code]name[/code] if the theme has [code]node_type[/code].
+ Returns the icon [Texture2D] at [code]name[/code] if the theme has [code]theme_type[/code].
</description>
</method>
<method name="get_icon_list" qualifiers="const">
<return type="PackedStringArray">
</return>
- <argument index="0" name="node_type" type="String">
+ <argument index="0" name="theme_type" type="String">
</argument>
<description>
- Returns all the icons as a [PackedStringArray] filled with each [Texture2D]'s name, for use in [method get_icon], if the theme has [code]node_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]theme_type[/code].
</description>
</method>
<method name="get_icon_type_list" qualifiers="const">
@@ -253,21 +253,21 @@
</return>
<argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="node_type" type="StringName">
+ <argument index="1" name="theme_type" type="StringName">
</argument>
<description>
- Returns the [StyleBox] at [code]name[/code] if the theme has [code]node_type[/code].
- Valid [code]name[/code]s may be found using [method get_stylebox_list]. Valid [code]node_type[/code]s may be found using [method get_stylebox_type_list].
+ Returns the [StyleBox] at [code]name[/code] if the theme has [code]theme_type[/code].
+ Valid [code]name[/code]s may be found using [method get_stylebox_list]. Valid [code]theme_type[/code]s may be found using [method get_stylebox_type_list].
</description>
</method>
<method name="get_stylebox_list" qualifiers="const">
<return type="PackedStringArray">
</return>
- <argument index="0" name="node_type" type="String">
+ <argument index="0" name="theme_type" type="String">
</argument>
<description>
- 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]node_type[/code].
- Valid [code]node_type[/code]s may be found using [method get_stylebox_type_list].
+ 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]theme_type[/code].
+ Valid [code]theme_type[/code]s may be found using [method get_stylebox_type_list].
</description>
</method>
<method name="get_stylebox_type_list" qualifiers="const">
@@ -284,11 +284,11 @@
</argument>
<argument index="1" name="name" type="StringName">
</argument>
- <argument index="2" name="node_type" type="StringName">
+ <argument index="2" name="theme_type" type="StringName">
</argument>
<description>
- Returns the theme item of [code]data_type[/code] at [code]name[/code] if the theme has [code]node_type[/code].
- Valid [code]name[/code]s may be found using [method get_theme_item_list] or a data type specific method. Valid [code]node_type[/code]s may be found using [method get_theme_item_type_list] or a data type specific method.
+ Returns the theme item of [code]data_type[/code] at [code]name[/code] if the theme has [code]theme_type[/code].
+ Valid [code]name[/code]s may be found using [method get_theme_item_list] or a data type specific method. Valid [code]theme_type[/code]s may be found using [method get_theme_item_type_list] or a data type specific method.
</description>
</method>
<method name="get_theme_item_list" qualifiers="const">
@@ -296,11 +296,11 @@
</return>
<argument index="0" name="data_type" type="int" enum="Theme.DataType">
</argument>
- <argument index="1" name="node_type" type="String">
+ <argument index="1" name="theme_type" type="String">
</argument>
<description>
- Returns all the theme items of [code]data_type[/code] as a [PackedStringArray] filled with each theme items's name, for use in [method get_theme_item] or a data type specific method, if the theme has [code]node_type[/code].
- Valid [code]node_type[/code]s may be found using [method get_theme_item_type_list] or a data type specific method.
+ Returns all the theme items of [code]data_type[/code] as a [PackedStringArray] filled with each theme items's name, for use in [method get_theme_item] or a data type specific method, if the theme has [code]theme_type[/code].
+ Valid [code]theme_type[/code]s may be found using [method get_theme_item_type_list] or a data type specific method.
</description>
</method>
<method name="get_theme_item_type_list" qualifiers="const">
@@ -324,11 +324,11 @@
</return>
<argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="node_type" type="StringName">
+ <argument index="1" name="theme_type" type="StringName">
</argument>
<description>
- Returns [code]true[/code] if [Color] with [code]name[/code] is in [code]node_type[/code].
- Returns [code]false[/code] if the theme does not have [code]node_type[/code].
+ Returns [code]true[/code] if [Color] with [code]name[/code] is in [code]theme_type[/code].
+ Returns [code]false[/code] if the theme does not have [code]theme_type[/code].
</description>
</method>
<method name="has_constant" qualifiers="const">
@@ -336,11 +336,11 @@
</return>
<argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="node_type" type="StringName">
+ <argument index="1" name="theme_type" type="StringName">
</argument>
<description>
- Returns [code]true[/code] if constant with [code]name[/code] is in [code]node_type[/code].
- Returns [code]false[/code] if the theme does not have [code]node_type[/code].
+ Returns [code]true[/code] if constant with [code]name[/code] is in [code]theme_type[/code].
+ Returns [code]false[/code] if the theme does not have [code]theme_type[/code].
</description>
</method>
<method name="has_font" qualifiers="const">
@@ -348,11 +348,11 @@
</return>
<argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="node_type" type="StringName">
+ <argument index="1" name="theme_type" type="StringName">
</argument>
<description>
- Returns [code]true[/code] if [Font] with [code]name[/code] is in [code]node_type[/code].
- Returns [code]false[/code] if the theme does not have [code]node_type[/code].
+ Returns [code]true[/code] if [Font] with [code]name[/code] is in [code]theme_type[/code].
+ Returns [code]false[/code] if the theme does not have [code]theme_type[/code].
</description>
</method>
<method name="has_font_size" qualifiers="const">
@@ -360,11 +360,11 @@
</return>
<argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="node_type" type="StringName">
+ <argument index="1" name="theme_type" type="StringName">
</argument>
<description>
- Returns [code]true[/code] if font size with [code]name[/code] is in [code]node_type[/code].
- Returns [code]false[/code] if the theme does not have [code]node_type[/code].
+ Returns [code]true[/code] if font size with [code]name[/code] is in [code]theme_type[/code].
+ Returns [code]false[/code] if the theme does not have [code]theme_type[/code].
</description>
</method>
<method name="has_icon" qualifiers="const">
@@ -372,11 +372,11 @@
</return>
<argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="node_type" type="StringName">
+ <argument index="1" name="theme_type" type="StringName">
</argument>
<description>
- Returns [code]true[/code] if icon [Texture2D] with [code]name[/code] is in [code]node_type[/code].
- Returns [code]false[/code] if the theme does not have [code]node_type[/code].
+ Returns [code]true[/code] if icon [Texture2D] with [code]name[/code] is in [code]theme_type[/code].
+ Returns [code]false[/code] if the theme does not have [code]theme_type[/code].
</description>
</method>
<method name="has_stylebox" qualifiers="const">
@@ -384,11 +384,11 @@
</return>
<argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="node_type" type="StringName">
+ <argument index="1" name="theme_type" type="StringName">
</argument>
<description>
- Returns [code]true[/code] if [StyleBox] with [code]name[/code] is in [code]node_type[/code].
- Returns [code]false[/code] if the theme does not have [code]node_type[/code].
+ Returns [code]true[/code] if [StyleBox] with [code]name[/code] is in [code]theme_type[/code].
+ Returns [code]false[/code] if the theme does not have [code]theme_type[/code].
</description>
</method>
<method name="has_theme_item" qualifiers="const">
@@ -398,11 +398,11 @@
</argument>
<argument index="1" name="name" type="StringName">
</argument>
- <argument index="2" name="node_type" type="StringName">
+ <argument index="2" name="theme_type" type="StringName">
</argument>
<description>
- Returns [code]true[/code] if a theme item of [code]data_type[/code] with [code]name[/code] is in [code]node_type[/code].
- Returns [code]false[/code] if the theme does not have [code]node_type[/code].
+ Returns [code]true[/code] if a theme item of [code]data_type[/code] with [code]name[/code] is in [code]theme_type[/code].
+ Returns [code]false[/code] if the theme does not have [code]theme_type[/code].
</description>
</method>
<method name="rename_color">
@@ -412,10 +412,10 @@
</argument>
<argument index="1" name="name" type="StringName">
</argument>
- <argument index="2" name="node_type" type="StringName">
+ <argument index="2" name="theme_type" type="StringName">
</argument>
<description>
- Renames the [Color] at [code]old_name[/code] to [code]name[/code] if the theme has [code]node_type[/code]. If [code]name[/code] is already taken, this method fails.
+ Renames the [Color] at [code]old_name[/code] to [code]name[/code] if the theme has [code]theme_type[/code]. If [code]name[/code] is already taken, this method fails.
</description>
</method>
<method name="rename_constant">
@@ -425,10 +425,10 @@
</argument>
<argument index="1" name="name" type="StringName">
</argument>
- <argument index="2" name="node_type" type="StringName">
+ <argument index="2" name="theme_type" type="StringName">
</argument>
<description>
- Renames the constant at [code]old_name[/code] to [code]name[/code] if the theme has [code]node_type[/code]. If [code]name[/code] is already taken, this method fails.
+ Renames the constant at [code]old_name[/code] to [code]name[/code] if the theme has [code]theme_type[/code]. If [code]name[/code] is already taken, this method fails.
</description>
</method>
<method name="rename_font">
@@ -438,10 +438,10 @@
</argument>
<argument index="1" name="name" type="StringName">
</argument>
- <argument index="2" name="node_type" type="StringName">
+ <argument index="2" name="theme_type" type="StringName">
</argument>
<description>
- Renames the [Font] at [code]old_name[/code] to [code]name[/code] if the theme has [code]node_type[/code]. If [code]name[/code] is already taken, this method fails.
+ Renames the [Font] at [code]old_name[/code] to [code]name[/code] if the theme has [code]theme_type[/code]. If [code]name[/code] is already taken, this method fails.
</description>
</method>
<method name="rename_font_size">
@@ -451,10 +451,10 @@
</argument>
<argument index="1" name="name" type="StringName">
</argument>
- <argument index="2" name="node_type" type="StringName">
+ <argument index="2" name="theme_type" type="StringName">
</argument>
<description>
- Renames the font size [code]old_name[/code] to [code]name[/code] if the theme has [code]node_type[/code]. If [code]name[/code] is already taken, this method fails.
+ Renames the font size [code]old_name[/code] to [code]name[/code] if the theme has [code]theme_type[/code]. If [code]name[/code] is already taken, this method fails.
</description>
</method>
<method name="rename_icon">
@@ -464,10 +464,10 @@
</argument>
<argument index="1" name="name" type="StringName">
</argument>
- <argument index="2" name="node_type" type="StringName">
+ <argument index="2" name="theme_type" type="StringName">
</argument>
<description>
- Renames the icon at [code]old_name[/code] to [code]name[/code] if the theme has [code]node_type[/code]. If [code]name[/code] is already taken, this method fails.
+ Renames the icon at [code]old_name[/code] to [code]name[/code] if the theme has [code]theme_type[/code]. If [code]name[/code] is already taken, this method fails.
</description>
</method>
<method name="rename_stylebox">
@@ -477,10 +477,10 @@
</argument>
<argument index="1" name="name" type="StringName">
</argument>
- <argument index="2" name="node_type" type="StringName">
+ <argument index="2" name="theme_type" type="StringName">
</argument>
<description>
- Renames [StyleBox] at [code]old_name[/code] to [code]name[/code] if the theme has [code]node_type[/code]. If [code]name[/code] is already taken, this method fails.
+ Renames [StyleBox] at [code]old_name[/code] to [code]name[/code] if the theme has [code]theme_type[/code]. If [code]name[/code] is already taken, this method fails.
</description>
</method>
<method name="rename_theme_item">
@@ -492,10 +492,10 @@
</argument>
<argument index="2" name="name" type="StringName">
</argument>
- <argument index="3" name="node_type" type="StringName">
+ <argument index="3" name="theme_type" type="StringName">
</argument>
<description>
- Renames the theme item of [code]data_type[/code] at [code]old_name[/code] to [code]name[/code] if the theme has [code]node_type[/code]. If [code]name[/code] is already taken, this method fails.
+ Renames the theme item of [code]data_type[/code] at [code]old_name[/code] to [code]name[/code] if the theme has [code]theme_type[/code]. If [code]name[/code] is already taken, this method fails.
</description>
</method>
<method name="set_color">
@@ -503,13 +503,13 @@
</return>
<argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="node_type" type="StringName">
+ <argument index="1" name="theme_type" type="StringName">
</argument>
<argument index="2" name="color" type="Color">
</argument>
<description>
- Sets the theme's [Color] to [code]color[/code] at [code]name[/code] in [code]node_type[/code].
- Creates [code]node_type[/code] if the theme does not have it.
+ Sets the theme's [Color] to [code]color[/code] at [code]name[/code] in [code]theme_type[/code].
+ Creates [code]theme_type[/code] if the theme does not have it.
</description>
</method>
<method name="set_constant">
@@ -517,13 +517,13 @@
</return>
<argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="node_type" type="StringName">
+ <argument index="1" name="theme_type" type="StringName">
</argument>
<argument index="2" name="constant" type="int">
</argument>
<description>
- Sets the theme's constant to [code]constant[/code] at [code]name[/code] in [code]node_type[/code].
- Creates [code]node_type[/code] if the theme does not have it.
+ Sets the theme's constant to [code]constant[/code] at [code]name[/code] in [code]theme_type[/code].
+ Creates [code]theme_type[/code] if the theme does not have it.
</description>
</method>
<method name="set_font">
@@ -531,13 +531,13 @@
</return>
<argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="node_type" type="StringName">
+ <argument index="1" name="theme_type" type="StringName">
</argument>
<argument index="2" name="font" type="Font">
</argument>
<description>
- Sets the theme's [Font] to [code]font[/code] at [code]name[/code] in [code]node_type[/code].
- Creates [code]node_type[/code] if the theme does not have it.
+ Sets the theme's [Font] to [code]font[/code] at [code]name[/code] in [code]theme_type[/code].
+ Creates [code]theme_type[/code] if the theme does not have it.
</description>
</method>
<method name="set_font_size">
@@ -545,13 +545,13 @@
</return>
<argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="node_type" type="StringName">
+ <argument index="1" name="theme_type" type="StringName">
</argument>
<argument index="2" name="font_size" type="int">
</argument>
<description>
- Sets the theme's font size to [code]font_size[/code] at [code]name[/code] in [code]node_type[/code].
- Creates [code]node_type[/code] if the theme does not have it.
+ Sets the theme's font size to [code]font_size[/code] at [code]name[/code] in [code]theme_type[/code].
+ Creates [code]theme_type[/code] if the theme does not have it.
</description>
</method>
<method name="set_icon">
@@ -559,13 +559,13 @@
</return>
<argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="node_type" type="StringName">
+ <argument index="1" name="theme_type" type="StringName">
</argument>
<argument index="2" name="texture" type="Texture2D">
</argument>
<description>
- Sets the theme's icon [Texture2D] to [code]texture[/code] at [code]name[/code] in [code]node_type[/code].
- Creates [code]node_type[/code] if the theme does not have it.
+ Sets the theme's icon [Texture2D] to [code]texture[/code] at [code]name[/code] in [code]theme_type[/code].
+ Creates [code]theme_type[/code] if the theme does not have it.
</description>
</method>
<method name="set_stylebox">
@@ -573,13 +573,13 @@
</return>
<argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="node_type" type="StringName">
+ <argument index="1" name="theme_type" type="StringName">
</argument>
<argument index="2" name="texture" type="StyleBox">
</argument>
<description>
- Sets theme's [StyleBox] to [code]stylebox[/code] at [code]name[/code] in [code]node_type[/code].
- Creates [code]node_type[/code] if the theme does not have it.
+ Sets theme's [StyleBox] to [code]stylebox[/code] at [code]name[/code] in [code]theme_type[/code].
+ Creates [code]theme_type[/code] if the theme does not have it.
</description>
</method>
<method name="set_theme_item">
@@ -589,14 +589,14 @@
</argument>
<argument index="1" name="name" type="StringName">
</argument>
- <argument index="2" name="node_type" type="StringName">
+ <argument index="2" name="theme_type" type="StringName">
</argument>
<argument index="3" name="value" type="Variant">
</argument>
<description>
- Sets the theme item of [code]data_type[/code] to [code]value[/code] at [code]name[/code] in [code]node_type[/code].
+ Sets the theme item of [code]data_type[/code] to [code]value[/code] at [code]name[/code] in [code]theme_type[/code].
Does nothing if the [code]value[/code] type does not match [code]data_type[/code].
- Creates [code]node_type[/code] if the theme does not have it.
+ Creates [code]theme_type[/code] if the theme does not have it.
</description>
</method>
</methods>
diff --git a/doc/classes/Thread.xml b/doc/classes/Thread.xml
index 88f46e3937..5ac9416b72 100644
--- a/doc/classes/Thread.xml
+++ b/doc/classes/Thread.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Thread" inherits="Reference" version="4.0">
+<class name="Thread" inherits="RefCounted" version="4.0">
<brief_description>
A unit of execution in a process.
</brief_description>
diff --git a/doc/classes/TileData.xml b/doc/classes/TileData.xml
new file mode 100644
index 0000000000..1f0f807a08
--- /dev/null
+++ b/doc/classes/TileData.xml
@@ -0,0 +1,245 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="TileData" inherits="Object" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="add_collision_shape">
+ <return type="void">
+ </return>
+ <argument index="0" name="layer_id" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_collision_shape_one_way_margin" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="layer_id" type="int">
+ </argument>
+ <argument index="1" name="shape_index" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_collision_shape_shape" qualifiers="const">
+ <return type="Shape2D">
+ </return>
+ <argument index="0" name="layer_id" type="int">
+ </argument>
+ <argument index="1" name="shape_index" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_collision_shapes_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="layer_id" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_custom_data" qualifiers="const">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="layer_name" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_custom_data_by_layer_id" qualifiers="const">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="layer_id" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_navigation_polygon" qualifiers="const">
+ <return type="NavigationPolygon">
+ </return>
+ <argument index="0" name="layer_id" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_occluder" qualifiers="const">
+ <return type="OccluderPolygon2D">
+ </return>
+ <argument index="0" name="layer_id" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_peering_bit_terrain" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="peering_bit" type="int" enum="TileSet.CellNeighbor">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="is_collision_shape_one_way" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="layer_id" type="int">
+ </argument>
+ <argument index="1" name="shape_index" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="remove_collision_shape">
+ <return type="void">
+ </return>
+ <argument index="0" name="layer_id" type="int">
+ </argument>
+ <argument index="1" name="shape_index" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_collision_shape_one_way">
+ <return type="void">
+ </return>
+ <argument index="0" name="layer_id" type="int">
+ </argument>
+ <argument index="1" name="shape_index" type="int">
+ </argument>
+ <argument index="2" name="one_way" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_collision_shape_one_way_margin">
+ <return type="void">
+ </return>
+ <argument index="0" name="layer_id" type="int">
+ </argument>
+ <argument index="1" name="shape_index" type="int">
+ </argument>
+ <argument index="2" name="one_way_margin" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_collision_shape_shape">
+ <return type="void">
+ </return>
+ <argument index="0" name="layer_id" type="int">
+ </argument>
+ <argument index="1" name="shape_index" type="int">
+ </argument>
+ <argument index="2" name="shape" type="Shape2D">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_collision_shapes_count">
+ <return type="void">
+ </return>
+ <argument index="0" name="layer_id" type="int">
+ </argument>
+ <argument index="1" name="shapes_count" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_custom_data">
+ <return type="void">
+ </return>
+ <argument index="0" name="layer_name" type="String">
+ </argument>
+ <argument index="1" name="value" type="Variant">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_custom_data_by_layer_id">
+ <return type="void">
+ </return>
+ <argument index="0" name="layer_id" type="int">
+ </argument>
+ <argument index="1" name="value" type="Variant">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_navigation_polygon">
+ <return type="void">
+ </return>
+ <argument index="0" name="layer_id" type="int">
+ </argument>
+ <argument index="1" name="navigation_polygon" type="NavigationPolygon">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_occluder">
+ <return type="void">
+ </return>
+ <argument index="0" name="layer_id" type="int">
+ </argument>
+ <argument index="1" name="occluder_polygon" type="OccluderPolygon2D">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_peering_bit_terrain">
+ <return type="void">
+ </return>
+ <argument index="0" name="peering_bit" type="int" enum="TileSet.CellNeighbor">
+ </argument>
+ <argument index="1" name="terrain" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="tile_get_material" qualifiers="const">
+ <return type="ShaderMaterial">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="tile_set_material">
+ <return type="void">
+ </return>
+ <argument index="0" name="material" type="ShaderMaterial">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="flip_h" type="bool" setter="set_flip_h" getter="get_flip_h" default="false">
+ </member>
+ <member name="flip_v" type="bool" setter="set_flip_v" getter="get_flip_v" default="false">
+ </member>
+ <member name="modulate" type="Color" setter="set_modulate" getter="get_modulate" default="Color(1, 1, 1, 1)">
+ </member>
+ <member name="probability" type="float" setter="set_probability" getter="get_probability" default="1.0">
+ </member>
+ <member name="terrain_set" type="int" setter="set_terrain_set" getter="get_terrain_set" default="-1">
+ </member>
+ <member name="texture_offset" type="Vector2i" setter="set_texture_offset" getter="get_texture_offset" default="Vector2i(0, 0)">
+ </member>
+ <member name="transpose" type="bool" setter="set_transpose" getter="get_transpose" default="false">
+ </member>
+ <member name="y_sort_origin" type="int" setter="set_y_sort_origin" getter="get_y_sort_origin" default="0">
+ </member>
+ <member name="z_index" type="int" setter="set_z_index" getter="get_z_index" default="0">
+ </member>
+ </members>
+ <signals>
+ <signal name="changed">
+ <description>
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/TileMap.xml b/doc/classes/TileMap.xml
index 205b342ba8..5a4068ec86 100644
--- a/doc/classes/TileMap.xml
+++ b/doc/classes/TileMap.xml
@@ -31,53 +31,46 @@
Clears cells that do not exist in the tileset.
</description>
</method>
- <method name="get_cell" qualifiers="const">
+ <method name="get_cell_alternative_tile" qualifiers="const">
<return type="int">
</return>
- <argument index="0" name="x" type="int">
- </argument>
- <argument index="1" name="y" type="int">
+ <argument index="0" name="coords" type="Vector2i">
</argument>
<description>
- Returns the tile index of the given cell. If no tile exists in the cell, returns [constant INVALID_CELL].
</description>
</method>
- <method name="get_cell_autotile_coord" qualifiers="const">
- <return type="Vector2">
+ <method name="get_cell_atlas_coords" qualifiers="const">
+ <return type="Vector2i">
</return>
- <argument index="0" name="x" type="int">
- </argument>
- <argument index="1" name="y" type="int">
+ <argument index="0" name="coords" type="Vector2i">
</argument>
<description>
- Returns the coordinate (subtile column and row) of the autotile variation in the tileset. Returns a zero vector if the cell doesn't have autotiling.
</description>
</method>
- <method name="get_cellv" qualifiers="const">
+ <method name="get_cell_source_id" qualifiers="const">
<return type="int">
</return>
- <argument index="0" name="position" type="Vector2">
+ <argument index="0" name="coords" type="Vector2i">
</argument>
<description>
- Returns the tile index of the cell given by a Vector2. If no tile exists in the cell, returns [constant INVALID_CELL].
</description>
</method>
- <method name="get_collision_layer_bit" qualifiers="const">
- <return type="bool">
+ <method name="get_neighbor_cell" qualifiers="const">
+ <return type="Vector2i">
</return>
- <argument index="0" name="bit" type="int">
+ <argument index="0" name="coords" type="Vector2i">
+ </argument>
+ <argument index="1" name="neighbor" type="int" enum="TileSet.CellNeighbor">
</argument>
<description>
- Returns [code]true[/code] if the given collision layer bit is set.
</description>
</method>
- <method name="get_collision_mask_bit" qualifiers="const">
- <return type="bool">
+ <method name="get_surrounding_tiles">
+ <return type="Vector2i[]">
</return>
- <argument index="0" name="bit" type="int">
+ <argument index="0" name="coords" type="Vector2i">
</argument>
<description>
- Returns [code]true[/code] if the given collision mask bit is set.
</description>
</method>
<method name="get_used_cells" qualifiers="const">
@@ -87,15 +80,6 @@
Returns a [Vector2] array with the positions of all cells containing a tile from the tileset (i.e. a tile index different from [code]-1[/code]).
</description>
</method>
- <method name="get_used_cells_by_index" qualifiers="const">
- <return type="Vector2i[]">
- </return>
- <argument index="0" name="index" type="int">
- </argument>
- <description>
- Returns an array of all cells with the given tile [code]index[/code].
- </description>
- </method>
<method name="get_used_rect">
<return type="Rect2">
</return>
@@ -103,155 +87,28 @@
Returns a rectangle enclosing the used (non-empty) tiles of the map.
</description>
</method>
- <method name="is_cell_transposed" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="x" type="int">
- </argument>
- <argument index="1" name="y" type="int">
- </argument>
- <description>
- Returns [code]true[/code] if the given cell is transposed, i.e. the X and Y axes are swapped.
- </description>
- </method>
- <method name="is_cell_x_flipped" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="x" type="int">
- </argument>
- <argument index="1" name="y" type="int">
- </argument>
- <description>
- Returns [code]true[/code] if the given cell is flipped in the X axis.
- </description>
- </method>
- <method name="is_cell_y_flipped" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="x" type="int">
- </argument>
- <argument index="1" name="y" type="int">
- </argument>
- <description>
- Returns [code]true[/code] if the given cell is flipped in the Y axis.
- </description>
- </method>
<method name="map_to_world" qualifiers="const">
<return type="Vector2">
</return>
- <argument index="0" name="map_position" type="Vector2">
- </argument>
- <argument index="1" name="ignore_half_ofs" type="bool" default="false">
+ <argument index="0" name="map_position" type="Vector2i">
</argument>
<description>
Returns the local position corresponding to the given tilemap (grid-based) coordinates.
- Optionally, the tilemap's half offset can be ignored.
</description>
</method>
<method name="set_cell">
<return type="void">
</return>
- <argument index="0" name="x" type="int">
- </argument>
- <argument index="1" name="y" type="int">
- </argument>
- <argument index="2" name="tile" type="int">
- </argument>
- <argument index="3" name="flip_x" type="bool" default="false">
- </argument>
- <argument index="4" name="flip_y" type="bool" default="false">
- </argument>
- <argument index="5" name="transpose" type="bool" default="false">
- </argument>
- <argument index="6" name="autotile_coord" type="Vector2" default="Vector2( 0, 0 )">
- </argument>
- <description>
- Sets the tile index for the cell given by a Vector2.
- An index of [code]-1[/code] clears the cell.
- Optionally, the tile can also be flipped, transposed, or given autotile coordinates. The autotile coordinate refers to the column and row of the subtile.
- [b]Note:[/b] Data such as navigation polygons and collision shapes are not immediately updated for performance reasons.
- If you need these to be immediately updated, you can call [method update_dirty_quadrants].
- Overriding this method also overrides it internally, allowing custom logic to be implemented when tiles are placed/removed:
- [codeblocks]
- [gdscript]
- func set_cell(x, y, tile, flip_x=false, flip_y=false, transpose=false, autotile_coord=Vector2()):
- # Write your custom logic here.
- # To call the default method:
- .set_cell(x, y, tile, flip_x, flip_y, transpose, autotile_coord)
- [/gdscript]
- [csharp]
- public void SetCell(int x, int y, int tile, bool flipX = false, bool flipY = false, bool transpose = false, Vector2 autotileCoord = new Vector2())
- {
- // Write your custom logic here.
- // To call the default method:
- base.SetCell(x, y, tile, flipX, flipY, transpose, autotileCoord);
- }
- [/csharp]
- [/codeblocks]
- </description>
- </method>
- <method name="set_cellv">
- <return type="void">
- </return>
- <argument index="0" name="position" type="Vector2">
+ <argument index="0" name="coords" type="Vector2i">
</argument>
- <argument index="1" name="tile" type="int">
+ <argument index="1" name="source_id" type="int" default="-1">
</argument>
- <argument index="2" name="flip_x" type="bool" default="false">
+ <argument index="2" name="atlas_coords" type="Vector2i" default="Vector2i(-1, -1)">
</argument>
- <argument index="3" name="flip_y" type="bool" default="false">
- </argument>
- <argument index="4" name="transpose" type="bool" default="false">
+ <argument index="3" name="alternative_tile" type="int" default="-1">
</argument>
<description>
- Sets the tile index for the given cell.
- An index of [code]-1[/code] clears the cell.
- Optionally, the tile can also be flipped or transposed.
- [b]Note:[/b] Data such as navigation polygons and collision shapes are not immediately updated for performance reasons.
- If you need these to be immediately updated, you can call [method update_dirty_quadrants].
- </description>
- </method>
- <method name="set_collision_layer_bit">
- <return type="void">
- </return>
- <argument index="0" name="bit" type="int">
- </argument>
- <argument index="1" name="value" type="bool">
- </argument>
- <description>
- Sets the given collision layer bit.
- </description>
- </method>
- <method name="set_collision_mask_bit">
- <return type="void">
- </return>
- <argument index="0" name="bit" type="int">
- </argument>
- <argument index="1" name="value" type="bool">
- </argument>
- <description>
- Sets the given collision mask bit.
- </description>
- </method>
- <method name="update_bitmask_area">
- <return type="void">
- </return>
- <argument index="0" name="position" type="Vector2">
- </argument>
- <description>
- Applies autotiling rules to the cell (and its adjacent cells) referenced by its grid-based X and Y coordinates.
- </description>
- </method>
- <method name="update_bitmask_region">
- <return type="void">
- </return>
- <argument index="0" name="start" type="Vector2" default="Vector2( 0, 0 )">
- </argument>
- <argument index="1" name="end" type="Vector2" default="Vector2( 0, 0 )">
- </argument>
- <description>
- Applies autotiling rules to the cells in the given region (specified by grid-based X and Y coordinates).
- Calling with invalid (or missing) parameters applies autotiling rules for the entire tilemap.
+ Sets the tile index for the cell given by a Vector2i.
</description>
</method>
<method name="update_dirty_quadrants">
@@ -262,7 +119,7 @@
</description>
</method>
<method name="world_to_map" qualifiers="const">
- <return type="Vector2">
+ <return type="Vector2i">
</return>
<argument index="0" name="world_position" type="Vector2">
</argument>
@@ -272,110 +129,30 @@
</method>
</methods>
<members>
- <member name="bake_navigation" type="bool" setter="set_bake_navigation" getter="is_baking_navigation" default="false">
- If [code]true[/code], this TileMap bakes a navigation region.
- </member>
- <member name="cell_clip_uv" type="bool" setter="set_clip_uv" getter="get_clip_uv" default="false">
- If [code]true[/code], the cell's UVs will be clipped.
- </member>
- <member name="cell_custom_transform" type="Transform2D" setter="set_custom_transform" getter="get_custom_transform" default="Transform2D( 64, 0, 0, 64, 0, 0 )">
- The custom [Transform2D] to be applied to the TileMap's cells.
- </member>
- <member name="cell_half_offset" type="int" setter="set_half_offset" getter="get_half_offset" enum="TileMap.HalfOffset" default="2">
- Amount to offset alternating tiles. See [enum HalfOffset] for possible values.
- </member>
<member name="cell_quadrant_size" type="int" setter="set_quadrant_size" getter="get_quadrant_size" default="16">
The TileMap's quadrant size. Optimizes drawing by batching, using chunks of this size.
</member>
- <member name="cell_size" type="Vector2" setter="set_cell_size" getter="get_cell_size" default="Vector2( 64, 64 )">
- The TileMap's cell size.
- </member>
- <member name="cell_tile_origin" type="int" setter="set_tile_origin" getter="get_tile_origin" enum="TileMap.TileOrigin" default="0">
- Position for tile origin. See [enum TileOrigin] for possible values.
- </member>
- <member name="cell_y_sort" type="bool" setter="set_y_sort_enabled" getter="is_y_sort_enabled" default="false">
- If [code]true[/code], the TileMap's direct children will be drawn in order of their Y coordinate.
- </member>
- <member name="centered_textures" type="bool" setter="set_centered_textures" getter="is_centered_textures_enabled" default="false">
- If [code]true[/code], the textures will be centered in the middle of each tile. This is useful for certain isometric or top-down modes when textures are made larger or smaller than the tiles (e.g. to avoid flickering on tile edges). The offset is still applied, but from the center of the tile. If used, [member compatibility_mode] is ignored.
- If [code]false[/code], the texture position start in the top-left corner unless [member compatibility_mode] is enabled.
- </member>
- <member name="collision_bounce" type="float" setter="set_collision_bounce" getter="get_collision_bounce" default="0.0">
- Bounce value for static body collisions (see [code]collision_use_kinematic[/code]).
- </member>
- <member name="collision_friction" type="float" setter="set_collision_friction" getter="get_collision_friction" default="1.0">
- Friction value for static body collisions (see [code]collision_use_kinematic[/code]).
- </member>
- <member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer" default="1">
- The collision layer(s) for all colliders in the TileMap. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
- </member>
- <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="1">
- The collision mask(s) for all colliders in the TileMap. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
- </member>
- <member name="collision_use_kinematic" type="bool" setter="set_collision_use_kinematic" getter="get_collision_use_kinematic" default="false">
- If [code]true[/code], TileMap collisions will be handled as a kinematic body. If [code]false[/code], collisions will be handled as static body.
- </member>
- <member name="collision_use_parent" type="bool" setter="set_collision_use_parent" getter="get_collision_use_parent" default="false">
- If [code]true[/code], this tilemap's collision shape will be added to the collision shape of the parent. The parent has to be a [CollisionObject2D].
+ <member name="show_collision" type="int" setter="set_collision_visibility_mode" getter="get_collision_visibility_mode" enum="TileMap.VisibilityMode" default="0">
</member>
- <member name="compatibility_mode" type="bool" setter="set_compatibility_mode" getter="is_compatibility_mode_enabled" default="false">
- If [code]true[/code], the compatibility with the tilemaps made in Godot 3.1 or earlier is maintained (textures move when the tile origin changes and rotate if the texture size is not homogeneous). This mode presents problems when doing [code]flip_h[/code], [code]flip_v[/code] and [code]transpose[/code] tile operations on non-homogeneous isometric tiles (e.g. 2:1), in which the texture could not coincide with the collision, thus it is not recommended for isometric or non-square tiles.
- If [code]false[/code], the textures do not move when doing [code]flip_h[/code], [code]flip_v[/code] operations if no offset is used, nor when changing the tile origin.
- The compatibility mode doesn't work with the [member centered_textures] option, because displacing textures with the [member cell_tile_origin] option or in irregular tiles is not relevant when centering those textures.
- </member>
- <member name="mode" type="int" setter="set_mode" getter="get_mode" enum="TileMap.Mode" default="0">
- The TileMap orientation mode. See [enum Mode] for possible values.
- </member>
- <member name="occluder_light_mask" type="int" setter="set_occluder_light_mask" getter="get_occluder_light_mask" default="1">
- The light mask assigned to all light occluders in the TileMap. The TileSet's light occluders will cast shadows only from Light2D(s) that have the same light mask(s).
+ <member name="show_navigation" type="int" setter="set_navigation_visibility_mode" getter="get_navigation_visibility_mode" enum="TileMap.VisibilityMode" default="0">
</member>
<member name="tile_set" type="TileSet" setter="set_tileset" getter="get_tileset">
The assigned [TileSet].
</member>
</members>
<signals>
- <signal name="settings_changed">
+ <signal name="changed">
<description>
- Emitted when a tilemap setting has changed.
+ Emitted when the [TileSet] of this TileMap changes.
</description>
</signal>
</signals>
<constants>
- <constant name="INVALID_CELL" value="-1">
- Returned when a cell doesn't exist.
- </constant>
- <constant name="MODE_SQUARE" value="0" enum="Mode">
- Orthogonal orientation mode.
- </constant>
- <constant name="MODE_ISOMETRIC" value="1" enum="Mode">
- Isometric orientation mode.
- </constant>
- <constant name="MODE_CUSTOM" value="2" enum="Mode">
- Custom orientation mode.
- </constant>
- <constant name="HALF_OFFSET_X" value="0" enum="HalfOffset">
- Half offset on the X coordinate.
- </constant>
- <constant name="HALF_OFFSET_Y" value="1" enum="HalfOffset">
- Half offset on the Y coordinate.
- </constant>
- <constant name="HALF_OFFSET_DISABLED" value="2" enum="HalfOffset">
- Half offset disabled.
- </constant>
- <constant name="HALF_OFFSET_NEGATIVE_X" value="3" enum="HalfOffset">
- Half offset on the X coordinate (negative).
- </constant>
- <constant name="HALF_OFFSET_NEGATIVE_Y" value="4" enum="HalfOffset">
- Half offset on the Y coordinate (negative).
- </constant>
- <constant name="TILE_ORIGIN_TOP_LEFT" value="0" enum="TileOrigin">
- Tile origin at its top-left corner.
+ <constant name="VISIBILITY_MODE_DEFAULT" value="0" enum="VisibilityMode">
</constant>
- <constant name="TILE_ORIGIN_CENTER" value="1" enum="TileOrigin">
- Tile origin at its center.
+ <constant name="VISIBILITY_MODE_FORCE_HIDE" value="2" enum="VisibilityMode">
</constant>
- <constant name="TILE_ORIGIN_BOTTOM_LEFT" value="2" enum="TileOrigin">
- Tile origin at its bottom-left corner.
+ <constant name="VISIBILITY_MODE_FORCE_SHOW" value="1" enum="VisibilityMode">
</constant>
</constants>
</class>
diff --git a/doc/classes/TileSet.xml b/doc/classes/TileSet.xml
index adc5880c71..7d8b589f78 100644
--- a/doc/classes/TileSet.xml
+++ b/doc/classes/TileSet.xml
@@ -17,752 +17,350 @@
<link title="2D Kinematic Character Demo">https://godotengine.org/asset-library/asset/113</link>
</tutorials>
<methods>
- <method name="_forward_atlas_subtile_selection" qualifiers="virtual">
- <return type="Vector2">
- </return>
- <argument index="0" name="atlastile_id" type="int">
- </argument>
- <argument index="1" name="tilemap" type="Object">
- </argument>
- <argument index="2" name="tile_location" type="Vector2">
- </argument>
- <description>
- </description>
- </method>
- <method name="_forward_subtile_selection" qualifiers="virtual">
- <return type="Vector2">
- </return>
- <argument index="0" name="autotile_id" type="int">
- </argument>
- <argument index="1" name="bitmask" type="int">
- </argument>
- <argument index="2" name="tilemap" type="Object">
- </argument>
- <argument index="3" name="tile_location" type="Vector2">
- </argument>
- <description>
- </description>
- </method>
- <method name="_is_tile_bound" qualifiers="virtual">
- <return type="bool">
- </return>
- <argument index="0" name="drawn_id" type="int">
- </argument>
- <argument index="1" name="neighbor_id" type="int">
- </argument>
- <description>
- Determines when the auto-tiler should consider two different auto-tile IDs to be bound together.
- [b]Note:[/b] [code]neighbor_id[/code] will be [code]-1[/code] ([constant TileMap.INVALID_CELL]) when checking a tile against an empty neighbor tile.
- </description>
- </method>
- <method name="autotile_clear_bitmask_map">
- <return type="void">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- Clears all bitmask information of the autotile.
- </description>
- </method>
- <method name="autotile_get_bitmask">
+ <method name="add_source">
<return type="int">
</return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="coord" type="Vector2">
+ <argument index="0" name="atlas_source_id_override" type="TileSetSource">
</argument>
- <description>
- Returns the bitmask of the subtile from an autotile given its coordinates.
- The value is the sum of the values in [enum AutotileBindings] present in the subtile (e.g. a value of 5 means the bitmask has bindings in both the top left and top right).
- </description>
- </method>
- <method name="autotile_get_bitmask_mode" qualifiers="const">
- <return type="int" enum="TileSet.BitmaskMode">
- </return>
- <argument index="0" name="id" type="int">
+ <argument index="1" name="arg1" type="int" default="-1">
</argument>
<description>
- Returns the [enum BitmaskMode] of the autotile.
</description>
</method>
- <method name="autotile_get_icon_coordinate" qualifiers="const">
- <return type="Vector2">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- Returns the subtile that's being used as an icon in an atlas/autotile given its coordinates.
- The subtile defined as the icon will be used as a fallback when the atlas/autotile's bitmask information is incomplete. It will also be used to represent it in the TileSet editor.
- </description>
- </method>
- <method name="autotile_get_light_occluder" qualifiers="const">
- <return type="OccluderPolygon2D">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="coord" type="Vector2">
- </argument>
- <description>
- Returns the light occluder of the subtile from an atlas/autotile given its coordinates.
- </description>
- </method>
- <method name="autotile_get_navigation_polygon" qualifiers="const">
- <return type="NavigationPolygon">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="coord" type="Vector2">
- </argument>
- <description>
- Returns the navigation polygon of the subtile from an atlas/autotile given its coordinates.
- </description>
- </method>
- <method name="autotile_get_size" qualifiers="const">
- <return type="Vector2">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- Returns the size of the subtiles in an atlas/autotile.
- </description>
- </method>
- <method name="autotile_get_spacing" qualifiers="const">
+ <method name="get_navigation_layer_layers" qualifiers="const">
<return type="int">
</return>
- <argument index="0" name="id" type="int">
+ <argument index="0" name="layer_index" type="int">
</argument>
<description>
- Returns the spacing between subtiles of the atlas/autotile.
</description>
</method>
- <method name="autotile_get_subtile_priority">
+ <method name="get_next_source_id" qualifiers="const">
<return type="int">
</return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="coord" type="Vector2">
- </argument>
<description>
- Returns the priority of the subtile from an autotile given its coordinates.
- When more than one subtile has the same bitmask value, one of them will be picked randomly for drawing. Its priority will define how often it will be picked.
</description>
</method>
- <method name="autotile_get_z_index">
+ <method name="get_occlusion_layer_light_mask" qualifiers="const">
<return type="int">
</return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="coord" type="Vector2">
+ <argument index="0" name="arg0" type="int">
</argument>
<description>
- Returns the drawing index of the subtile from an atlas/autotile given its coordinates.
</description>
</method>
- <method name="autotile_set_bitmask">
- <return type="void">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="bitmask" type="Vector2">
- </argument>
- <argument index="2" name="flag" type="int">
- </argument>
- <description>
- Sets the bitmask of the subtile from an autotile given its coordinates.
- The value is the sum of the values in [enum AutotileBindings] present in the subtile (e.g. a value of 5 means the bitmask has bindings in both the top left and top right).
- </description>
- </method>
- <method name="autotile_set_bitmask_mode">
- <return type="void">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="mode" type="int" enum="TileSet.BitmaskMode">
- </argument>
- <description>
- Sets the [enum BitmaskMode] of the autotile.
- </description>
- </method>
- <method name="autotile_set_icon_coordinate">
- <return type="void">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="coord" type="Vector2">
- </argument>
- <description>
- Sets the subtile that will be used as an icon in an atlas/autotile given its coordinates.
- The subtile defined as the icon will be used as a fallback when the atlas/autotile's bitmask information is incomplete. It will also be used to represent it in the TileSet editor.
- </description>
- </method>
- <method name="autotile_set_light_occluder">
- <return type="void">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="light_occluder" type="OccluderPolygon2D">
- </argument>
- <argument index="2" name="coord" type="Vector2">
- </argument>
- <description>
- Sets the light occluder of the subtile from an atlas/autotile given its coordinates.
- </description>
- </method>
- <method name="autotile_set_navigation_polygon">
- <return type="void">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="navigation_polygon" type="NavigationPolygon">
- </argument>
- <argument index="2" name="coord" type="Vector2">
- </argument>
- <description>
- Sets the navigation polygon of the subtile from an atlas/autotile given its coordinates.
- </description>
- </method>
- <method name="autotile_set_size">
- <return type="void">
+ <method name="get_occlusion_layer_sdf_collision" qualifiers="const">
+ <return type="bool">
</return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="size" type="Vector2">
+ <argument index="0" name="arg0" type="int">
</argument>
<description>
- Sets the size of the subtiles in an atlas/autotile.
</description>
</method>
- <method name="autotile_set_spacing">
- <return type="void">
+ <method name="get_physics_layer_collision_layer" qualifiers="const">
+ <return type="int">
</return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="spacing" type="int">
+ <argument index="0" name="layer_index" type="int">
</argument>
<description>
- Sets the spacing between subtiles of the atlas/autotile.
</description>
</method>
- <method name="autotile_set_subtile_priority">
- <return type="void">
+ <method name="get_physics_layer_collision_mask" qualifiers="const">
+ <return type="int">
</return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="coord" type="Vector2">
- </argument>
- <argument index="2" name="priority" type="int">
+ <argument index="0" name="layer_index" type="int">
</argument>
<description>
- Sets the priority of the subtile from an autotile given its coordinates.
- When more than one subtile has the same bitmask value, one of them will be picked randomly for drawing. Its priority will define how often it will be picked.
</description>
</method>
- <method name="autotile_set_z_index">
- <return type="void">
+ <method name="get_physics_layer_physics_material" qualifiers="const">
+ <return type="PhysicsMaterial">
</return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="coord" type="Vector2">
- </argument>
- <argument index="2" name="z_index" type="int">
+ <argument index="0" name="layer_index" type="int">
</argument>
<description>
- Sets the drawing index of the subtile from an atlas/autotile given its coordinates.
</description>
</method>
- <method name="clear">
- <return type="void">
+ <method name="get_source" qualifiers="const">
+ <return type="TileSetSource">
</return>
- <description>
- Clears all tiles.
- </description>
- </method>
- <method name="create_tile">
- <return type="void">
- </return>
- <argument index="0" name="id" type="int">
+ <argument index="0" name="index" type="int">
</argument>
<description>
- Creates a new tile with the given ID.
</description>
</method>
- <method name="find_tile_by_name" qualifiers="const">
+ <method name="get_source_count" qualifiers="const">
<return type="int">
</return>
- <argument index="0" name="name" type="String">
- </argument>
<description>
- Returns the first tile matching the given name.
</description>
</method>
- <method name="get_last_unused_tile_id" qualifiers="const">
+ <method name="get_source_id" qualifiers="const">
<return type="int">
</return>
- <description>
- Returns the ID following the last currently used ID, useful when creating a new tile.
- </description>
- </method>
- <method name="get_tiles_ids" qualifiers="const">
- <return type="Array">
- </return>
- <description>
- Returns an array of all currently used tile IDs.
- </description>
- </method>
- <method name="remove_tile">
- <return type="void">
- </return>
- <argument index="0" name="id" type="int">
+ <argument index="0" name="index" type="int">
</argument>
<description>
- Removes the given tile ID.
</description>
</method>
- <method name="tile_add_shape">
- <return type="void">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="shape" type="Shape2D">
- </argument>
- <argument index="2" name="shape_transform" type="Transform2D">
- </argument>
- <argument index="3" name="one_way" type="bool" default="false">
- </argument>
- <argument index="4" name="autotile_coord" type="Vector2" default="Vector2( 0, 0 )">
- </argument>
- <description>
- Adds a shape to the tile.
- </description>
- </method>
- <method name="tile_get_light_occluder" qualifiers="const">
- <return type="OccluderPolygon2D">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- Returns the tile's light occluder.
- </description>
- </method>
- <method name="tile_get_material" qualifiers="const">
- <return type="ShaderMaterial">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- Returns the tile's material.
- </description>
- </method>
- <method name="tile_get_modulate" qualifiers="const">
+ <method name="get_terrain_color" qualifiers="const">
<return type="Color">
</return>
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- Returns the tile's modulation color.
- </description>
- </method>
- <method name="tile_get_name" qualifiers="const">
- <return type="String">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- Returns the tile's name.
- </description>
- </method>
- <method name="tile_get_navigation_polygon" qualifiers="const">
- <return type="NavigationPolygon">
- </return>
- <argument index="0" name="id" type="int">
+ <argument index="0" name="terrain_set" type="int">
</argument>
- <description>
- Returns the navigation polygon of the tile.
- </description>
- </method>
- <method name="tile_get_navigation_polygon_offset" qualifiers="const">
- <return type="Vector2">
- </return>
- <argument index="0" name="id" type="int">
+ <argument index="1" name="terrain_index" type="int">
</argument>
<description>
- Returns the offset of the tile's navigation polygon.
</description>
</method>
- <method name="tile_get_occluder_offset" qualifiers="const">
- <return type="Vector2">
+ <method name="get_terrain_name" qualifiers="const">
+ <return type="String">
</return>
- <argument index="0" name="id" type="int">
+ <argument index="0" name="terrain_set" type="int">
</argument>
- <description>
- Returns the offset of the tile's light occluder.
- </description>
- </method>
- <method name="tile_get_region" qualifiers="const">
- <return type="Rect2">
- </return>
- <argument index="0" name="id" type="int">
+ <argument index="1" name="terrain_index" type="int">
</argument>
<description>
- Returns the tile sub-region in the texture.
</description>
</method>
- <method name="tile_get_shape" qualifiers="const">
- <return type="Shape2D">
+ <method name="get_terrain_set_mode" qualifiers="const">
+ <return type="int" enum="TileSet.TerrainMode">
</return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="shape_id" type="int">
+ <argument index="0" name="terrain_set" type="int">
</argument>
<description>
- Returns a tile's given shape.
</description>
</method>
- <method name="tile_get_shape_count" qualifiers="const">
+ <method name="get_terrains_count" qualifiers="const">
<return type="int">
</return>
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- Returns the number of shapes assigned to a tile.
- </description>
- </method>
- <method name="tile_get_shape_offset" qualifiers="const">
- <return type="Vector2">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="shape_id" type="int">
+ <argument index="0" name="terrain_set" type="int">
</argument>
<description>
- Returns the offset of a tile's shape.
</description>
</method>
- <method name="tile_get_shape_one_way" qualifiers="const">
+ <method name="has_source" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="shape_id" type="int">
- </argument>
- <description>
- Returns the one-way collision value of a tile's shape.
- </description>
- </method>
- <method name="tile_get_shape_one_way_margin" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="shape_id" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="tile_get_shape_transform" qualifiers="const">
- <return type="Transform2D">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="shape_id" type="int">
- </argument>
- <description>
- Returns the [Transform2D] of a tile's shape.
- </description>
- </method>
- <method name="tile_get_shapes" qualifiers="const">
- <return type="Array">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- Returns an array of dictionaries describing the tile's shapes.
- [b]Dictionary structure in the array returned by this method:[/b]
- [codeblock]
- {
- "autotile_coord": Vector2,
- "one_way": bool,
- "one_way_margin": int,
- "shape": CollisionShape2D,
- "shape_transform": Transform2D,
- }
- [/codeblock]
- </description>
- </method>
- <method name="tile_get_texture" qualifiers="const">
- <return type="Texture2D">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- Returns the tile's texture.
- </description>
- </method>
- <method name="tile_get_texture_offset" qualifiers="const">
- <return type="Vector2">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- Returns the texture offset of the tile.
- </description>
- </method>
- <method name="tile_get_tile_mode" qualifiers="const">
- <return type="int" enum="TileSet.TileMode">
- </return>
- <argument index="0" name="id" type="int">
+ <argument index="0" name="index" type="int">
</argument>
<description>
- Returns the tile's [enum TileMode].
</description>
</method>
- <method name="tile_get_z_index" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- Returns the tile's Z index (drawing layer).
- </description>
- </method>
- <method name="tile_set_light_occluder">
- <return type="void">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="light_occluder" type="OccluderPolygon2D">
- </argument>
- <description>
- Sets a light occluder for the tile.
- </description>
- </method>
- <method name="tile_set_material">
- <return type="void">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="material" type="ShaderMaterial">
- </argument>
- <description>
- Sets the tile's material.
- </description>
- </method>
- <method name="tile_set_modulate">
- <return type="void">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="color" type="Color">
- </argument>
- <description>
- Sets the tile's modulation color.
- </description>
- </method>
- <method name="tile_set_name">
- <return type="void">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="name" type="String">
- </argument>
- <description>
- Sets the tile's name.
- </description>
- </method>
- <method name="tile_set_navigation_polygon">
+ <method name="remove_source">
<return type="void">
</return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="navigation_polygon" type="NavigationPolygon">
+ <argument index="0" name="source_id" type="int">
</argument>
<description>
- Sets the tile's navigation polygon.
</description>
</method>
- <method name="tile_set_navigation_polygon_offset">
+ <method name="set_navigation_layer_layers">
<return type="void">
</return>
- <argument index="0" name="id" type="int">
+ <argument index="0" name="layer_index" type="int">
</argument>
- <argument index="1" name="navigation_polygon_offset" type="Vector2">
+ <argument index="1" name="layers" type="int">
</argument>
<description>
- Sets an offset for the tile's navigation polygon.
</description>
</method>
- <method name="tile_set_occluder_offset">
+ <method name="set_occlusion_layer_light_mask">
<return type="void">
</return>
- <argument index="0" name="id" type="int">
+ <argument index="0" name="layer_index" type="int">
</argument>
- <argument index="1" name="occluder_offset" type="Vector2">
+ <argument index="1" name="light_mask" type="int">
</argument>
<description>
- Sets an offset for the tile's light occluder.
</description>
</method>
- <method name="tile_set_region">
+ <method name="set_occlusion_layer_sdf_collision">
<return type="void">
</return>
- <argument index="0" name="id" type="int">
+ <argument index="0" name="layer_index" type="int">
</argument>
- <argument index="1" name="region" type="Rect2">
+ <argument index="1" name="sdf_collision" type="int">
</argument>
<description>
- Sets the tile's sub-region in the texture. This is common in texture atlases.
</description>
</method>
- <method name="tile_set_shape">
+ <method name="set_physics_layer_collision_layer">
<return type="void">
</return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="shape_id" type="int">
+ <argument index="0" name="layer_index" type="int">
</argument>
- <argument index="2" name="shape" type="Shape2D">
+ <argument index="1" name="layer" type="int">
</argument>
<description>
- Sets a shape for the tile, enabling collision.
</description>
</method>
- <method name="tile_set_shape_offset">
+ <method name="set_physics_layer_collision_mask">
<return type="void">
</return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="shape_id" type="int">
+ <argument index="0" name="layer_index" type="int">
</argument>
- <argument index="2" name="shape_offset" type="Vector2">
+ <argument index="1" name="mask" type="int">
</argument>
<description>
- Sets the offset of a tile's shape.
</description>
</method>
- <method name="tile_set_shape_one_way">
+ <method name="set_physics_layer_physics_material">
<return type="void">
</return>
- <argument index="0" name="id" type="int">
+ <argument index="0" name="layer_index" type="int">
</argument>
- <argument index="1" name="shape_id" type="int">
- </argument>
- <argument index="2" name="one_way" type="bool">
+ <argument index="1" name="physics_material" type="PhysicsMaterial">
</argument>
<description>
- Enables one-way collision on a tile's shape.
</description>
</method>
- <method name="tile_set_shape_one_way_margin">
+ <method name="set_source_id">
<return type="void">
</return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="shape_id" type="int">
+ <argument index="0" name="source_id" type="int">
</argument>
- <argument index="2" name="one_way" type="float">
+ <argument index="1" name="arg1" type="int">
</argument>
<description>
</description>
</method>
- <method name="tile_set_shape_transform">
+ <method name="set_terrain_color">
<return type="void">
</return>
- <argument index="0" name="id" type="int">
+ <argument index="0" name="terrain_set" type="int">
</argument>
- <argument index="1" name="shape_id" type="int">
+ <argument index="1" name="terrain_index" type="int">
</argument>
- <argument index="2" name="shape_transform" type="Transform2D">
+ <argument index="2" name="color" type="Color">
</argument>
<description>
- Sets a [Transform2D] on a tile's shape.
</description>
</method>
- <method name="tile_set_shapes">
+ <method name="set_terrain_name">
<return type="void">
</return>
- <argument index="0" name="id" type="int">
+ <argument index="0" name="terrain_set" type="int">
</argument>
- <argument index="1" name="shapes" type="Array">
- </argument>
- <description>
- Sets an array of shapes for the tile, enabling collision.
- </description>
- </method>
- <method name="tile_set_texture">
- <return type="void">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="texture" type="Texture2D">
- </argument>
- <description>
- Sets the tile's texture.
- </description>
- </method>
- <method name="tile_set_texture_offset">
- <return type="void">
- </return>
- <argument index="0" name="id" type="int">
+ <argument index="1" name="terrain_index" type="int">
</argument>
- <argument index="1" name="texture_offset" type="Vector2">
+ <argument index="2" name="name" type="String">
</argument>
<description>
- Sets the tile's texture offset.
</description>
</method>
- <method name="tile_set_tile_mode">
+ <method name="set_terrain_set_mode">
<return type="void">
</return>
- <argument index="0" name="id" type="int">
+ <argument index="0" name="terrain_set" type="int">
</argument>
- <argument index="1" name="tilemode" type="int" enum="TileSet.TileMode">
+ <argument index="1" name="mode" type="int" enum="TileSet.TerrainMode">
</argument>
<description>
- Sets the tile's [enum TileMode].
</description>
</method>
- <method name="tile_set_z_index">
+ <method name="set_terrains_count">
<return type="void">
</return>
- <argument index="0" name="id" type="int">
+ <argument index="0" name="terrain_set" type="int">
</argument>
- <argument index="1" name="z_index" type="int">
+ <argument index="1" name="terrains_count" type="int">
</argument>
<description>
- Sets the tile's drawing index.
</description>
</method>
</methods>
+ <members>
+ <member name="custom_data_layers_count" type="int" setter="set_custom_data_layers_count" getter="get_custom_data_layers_count" default="0">
+ </member>
+ <member name="navigation_layers_count" type="int" setter="set_navigation_layers_count" getter="get_navigation_layers_count" default="0">
+ </member>
+ <member name="occlusion_layers_count" type="int" setter="set_occlusion_layers_count" getter="get_occlusion_layers_count" default="0">
+ </member>
+ <member name="physics_layers_count" type="int" setter="set_physics_layers_count" getter="get_physics_layers_count" default="0">
+ </member>
+ <member name="terrains_sets_count" type="int" setter="set_terrain_sets_count" getter="get_terrain_sets_count" default="0">
+ </member>
+ <member name="tile_layout" type="int" setter="set_tile_layout" getter="get_tile_layout" enum="TileSet.TileLayout" default="0">
+ </member>
+ <member name="tile_offset_axis" type="int" setter="set_tile_offset_axis" getter="get_tile_offset_axis" enum="TileSet.TileOffsetAxis" default="0">
+ </member>
+ <member name="tile_shape" type="int" setter="set_tile_shape" getter="get_tile_shape" enum="TileSet.TileShape" default="0">
+ </member>
+ <member name="tile_size" type="Vector2i" setter="set_tile_size" getter="get_tile_size" default="Vector2i(16, 16)">
+ </member>
+ <member name="tile_skew" type="Vector2" setter="set_tile_skew" getter="get_tile_skew" default="Vector2(0, 0)">
+ </member>
+ <member name="uv_clipping" type="bool" setter="set_uv_clipping" getter="is_uv_clipping" default="false">
+ </member>
+ <member name="y_sorting" type="bool" setter="set_y_sorting" getter="is_y_sorting" default="false">
+ </member>
+ </members>
<constants>
- <constant name="BITMASK_2X2" value="0" enum="BitmaskMode">
+ <constant name="TILE_SHAPE_SQUARE" value="0" enum="TileShape">
+ Orthogonal orientation mode.
+ </constant>
+ <constant name="TILE_SHAPE_ISOMETRIC" value="1" enum="TileShape">
+ Isometric orientation mode.
+ </constant>
+ <constant name="TILE_SHAPE_HALF_OFFSET_SQUARE" value="2" enum="TileShape">
+ </constant>
+ <constant name="TILE_SHAPE_HEXAGON" value="3" enum="TileShape">
+ Hexagon orientation mode.
+ </constant>
+ <constant name="TILE_LAYOUT_STACKED" value="0" enum="TileLayout">
+ </constant>
+ <constant name="TILE_LAYOUT_STACKED_OFFSET" value="1" enum="TileLayout">
+ </constant>
+ <constant name="TILE_LAYOUT_STAIRS_RIGHT" value="2" enum="TileLayout">
+ </constant>
+ <constant name="TILE_LAYOUT_STAIRS_DOWN" value="3" enum="TileLayout">
+ </constant>
+ <constant name="TILE_LAYOUT_DIAMOND_RIGHT" value="4" enum="TileLayout">
+ </constant>
+ <constant name="TILE_LAYOUT_DIAMOND_DOWN" value="5" enum="TileLayout">
+ </constant>
+ <constant name="TILE_OFFSET_AXIS_HORIZONTAL" value="0" enum="TileOffsetAxis">
+ </constant>
+ <constant name="TILE_OFFSET_AXIS_VERTICAL" value="1" enum="TileOffsetAxis">
+ </constant>
+ <constant name="TileSet::CELL_NEIGHBOR_RIGHT_SIDE" value="0" enum="CellNeighbor">
+ </constant>
+ <constant name="TileSet::CELL_NEIGHBOR_RIGHT_CORNER" value="1" enum="CellNeighbor">
+ </constant>
+ <constant name="TileSet::CELL_NEIGHBOR_BOTTOM_RIGHT_SIDE" value="2" enum="CellNeighbor">
+ </constant>
+ <constant name="TileSet::CELL_NEIGHBOR_BOTTOM_RIGHT_CORNER" value="3" enum="CellNeighbor">
+ </constant>
+ <constant name="TileSet::CELL_NEIGHBOR_BOTTOM_SIDE" value="4" enum="CellNeighbor">
</constant>
- <constant name="BITMASK_3X3_MINIMAL" value="1" enum="BitmaskMode">
+ <constant name="TileSet::CELL_NEIGHBOR_BOTTOM_CORNER" value="5" enum="CellNeighbor">
</constant>
- <constant name="BITMASK_3X3" value="2" enum="BitmaskMode">
+ <constant name="TileSet::CELL_NEIGHBOR_BOTTOM_LEFT_SIDE" value="6" enum="CellNeighbor">
</constant>
- <constant name="BIND_TOPLEFT" value="1" enum="AutotileBindings">
+ <constant name="TileSet::CELL_NEIGHBOR_BOTTOM_LEFT_CORNER" value="7" enum="CellNeighbor">
</constant>
- <constant name="BIND_TOP" value="2" enum="AutotileBindings">
+ <constant name="TileSet::CELL_NEIGHBOR_LEFT_SIDE" value="8" enum="CellNeighbor">
</constant>
- <constant name="BIND_TOPRIGHT" value="4" enum="AutotileBindings">
+ <constant name="TileSet::CELL_NEIGHBOR_LEFT_CORNER" value="9" enum="CellNeighbor">
</constant>
- <constant name="BIND_LEFT" value="8" enum="AutotileBindings">
+ <constant name="TileSet::CELL_NEIGHBOR_TOP_LEFT_SIDE" value="10" enum="CellNeighbor">
</constant>
- <constant name="BIND_CENTER" value="16" enum="AutotileBindings">
+ <constant name="TileSet::CELL_NEIGHBOR_TOP_LEFT_CORNER" value="11" enum="CellNeighbor">
</constant>
- <constant name="BIND_RIGHT" value="32" enum="AutotileBindings">
+ <constant name="TileSet::CELL_NEIGHBOR_TOP_SIDE" value="12" enum="CellNeighbor">
</constant>
- <constant name="BIND_BOTTOMLEFT" value="64" enum="AutotileBindings">
+ <constant name="TileSet::CELL_NEIGHBOR_TOP_CORNER" value="13" enum="CellNeighbor">
</constant>
- <constant name="BIND_BOTTOM" value="128" enum="AutotileBindings">
+ <constant name="TileSet::CELL_NEIGHBOR_TOP_RIGHT_SIDE" value="14" enum="CellNeighbor">
</constant>
- <constant name="BIND_BOTTOMRIGHT" value="256" enum="AutotileBindings">
+ <constant name="TileSet::CELL_NEIGHBOR_TOP_RIGHT_CORNER" value="15" enum="CellNeighbor">
</constant>
- <constant name="SINGLE_TILE" value="0" enum="TileMode">
+ <constant name="TERRAIN_MODE_MATCH_CORNERS_AND_SIDES" value="0" enum="TerrainMode">
</constant>
- <constant name="AUTO_TILE" value="1" enum="TileMode">
+ <constant name="TERRAIN_MODE_MATCH_CORNERS" value="1" enum="TerrainMode">
</constant>
- <constant name="ATLAS_TILE" value="2" enum="TileMode">
+ <constant name="TERRAIN_MODE_MATCH_SIDES" value="2" enum="TerrainMode">
</constant>
</constants>
</class>
diff --git a/doc/classes/TileSetAtlasSource.xml b/doc/classes/TileSetAtlasSource.xml
new file mode 100644
index 0000000000..8482c356d7
--- /dev/null
+++ b/doc/classes/TileSetAtlasSource.xml
@@ -0,0 +1,207 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="TileSetAtlasSource" inherits="TileSetSource" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="can_move_tile_in_atlas" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="atlas_coords" type="Vector2i">
+ </argument>
+ <argument index="1" name="new_atlas_coords" type="Vector2i" default="Vector2i(-1, -1)">
+ </argument>
+ <argument index="2" name="new_size" type="Vector2i" default="Vector2i(-1, -1)">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="clear_tiles_outside_texture">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="create_alternative_tile">
+ <return type="int">
+ </return>
+ <argument index="0" name="atlas_coords" type="Vector2i">
+ </argument>
+ <argument index="1" name="alternative_id_override" type="int" default="-1">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="create_tile">
+ <return type="void">
+ </return>
+ <argument index="0" name="atlas_coords" type="Vector2i">
+ </argument>
+ <argument index="1" name="size" type="Vector2i" default="Vector2i(1, 1)">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_alternative_tile_id" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="atlas_coords" type="Vector2i">
+ </argument>
+ <argument index="1" name="index" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_alternative_tiles_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="atlas_coords" type="Vector2i">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_atlas_grid_size" qualifiers="const">
+ <return type="Vector2i">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_next_alternative_tile_id" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="atlas_coords" type="Vector2i">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_tile_at_coords" qualifiers="const">
+ <return type="Vector2i">
+ </return>
+ <argument index="0" name="atlas_coords" type="Vector2i">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_tile_data" qualifiers="const">
+ <return type="Object">
+ </return>
+ <argument index="0" name="atlas_coords" type="Vector2i">
+ </argument>
+ <argument index="1" name="index" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_tile_id" qualifiers="const">
+ <return type="Vector2i">
+ </return>
+ <argument index="0" name="index" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_tile_size_in_atlas" qualifiers="const">
+ <return type="Vector2i">
+ </return>
+ <argument index="0" name="atlas_coords" type="Vector2i">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_tile_texture_region" qualifiers="const">
+ <return type="Rect2i">
+ </return>
+ <argument index="0" name="atlas_coords" type="Vector2i">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_tiles_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="has_alternative_tile" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="atlas_coords" type="Vector2i">
+ </argument>
+ <argument index="1" name="alternative_tile" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="has_tile" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="atlas_coords" type="Vector2i">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="has_tiles_outside_texture">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="move_tile_in_atlas">
+ <return type="void">
+ </return>
+ <argument index="0" name="atlas_coords" type="Vector2i">
+ </argument>
+ <argument index="1" name="new_atlas_coords" type="Vector2i" default="Vector2i(-1, -1)">
+ </argument>
+ <argument index="2" name="new_size" type="Vector2i" default="Vector2i(-1, -1)">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="remove_alternative_tile">
+ <return type="void">
+ </return>
+ <argument index="0" name="atlas_coords" type="Vector2i">
+ </argument>
+ <argument index="1" name="alternative_tile" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="remove_tile">
+ <return type="void">
+ </return>
+ <argument index="0" name="atlas_coords" type="Vector2i">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_alternative_tile_id">
+ <return type="void">
+ </return>
+ <argument index="0" name="atlas_coords" type="Vector2i">
+ </argument>
+ <argument index="1" name="alternative_tile" type="int">
+ </argument>
+ <argument index="2" name="new_id" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="margins" type="Vector2i" setter="set_margins" getter="get_margins" default="Vector2i(0, 0)">
+ </member>
+ <member name="separation" type="Vector2i" setter="set_separation" getter="get_separation" default="Vector2i(0, 0)">
+ </member>
+ <member name="texture" type="Texture2D" setter="set_texture" getter="get_texture">
+ </member>
+ <member name="tile_size" type="Vector2i" setter="set_texture_region_size" getter="get_texture_region_size" default="Vector2i(16, 16)">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/TileSetScenesCollectionSource.xml b/doc/classes/TileSetScenesCollectionSource.xml
new file mode 100644
index 0000000000..1a00eb51c0
--- /dev/null
+++ b/doc/classes/TileSetScenesCollectionSource.xml
@@ -0,0 +1,155 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="TileSetScenesCollectionSource" inherits="TileSetSource" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="create_scene_tile">
+ <return type="int">
+ </return>
+ <argument index="0" name="packed_scene" type="PackedScene">
+ </argument>
+ <argument index="1" name="id_override" type="int" default="-1">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_alternative_tile_id" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="atlas_coords" type="Vector2i">
+ </argument>
+ <argument index="1" name="index" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_alternative_tiles_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="atlas_coords" type="Vector2i">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_next_scene_tile_id" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_scene_tile_display_placeholder" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_scene_tile_id">
+ <return type="int">
+ </return>
+ <argument index="0" name="index" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_scene_tile_scene" qualifiers="const">
+ <return type="PackedScene">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_scene_tiles_count">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_tile_id" qualifiers="const">
+ <return type="Vector2i">
+ </return>
+ <argument index="0" name="index" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_tiles_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="has_alternative_tile" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="atlas_coords" type="Vector2i">
+ </argument>
+ <argument index="1" name="alternative_tile" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="has_scene_tile_id">
+ <return type="bool">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="has_tile" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="atlas_coords" type="Vector2i">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="remove_scene_tile">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_scene_tile_display_placeholder">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <argument index="1" name="display_placeholder" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_scene_tile_id">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <argument index="1" name="new_id" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_scene_tile_scene">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <argument index="1" name="packed_scene" type="PackedScene">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/TileSetSource.xml b/doc/classes/TileSetSource.xml
new file mode 100644
index 0000000000..6a3029bb3f
--- /dev/null
+++ b/doc/classes/TileSetSource.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="TileSetSource" inherits="Resource" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/Time.xml b/doc/classes/Time.xml
new file mode 100644
index 0000000000..0c7c090e97
--- /dev/null
+++ b/doc/classes/Time.xml
@@ -0,0 +1,270 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Time" inherits="Object" version="4.0">
+ <brief_description>
+ Time singleton for working with time.
+ </brief_description>
+ <description>
+ The Time singleton allows converting time between various formats and also getting time information from the system.
+ This class conforms with as many of the ISO 8601 standards as possible. All dates follow the Proleptic Gregorian calendar. As such, the day before [code]1582-10-15[/code] is [code]1582-10-14[/code], not [code]1582-10-04[/code]. The year before 1 AD (aka 1 BC) is number [code]0[/code], with the year before that (2 BC) being [code]-1[/code], etc.
+ Conversion methods assume "the same timezone", and do not handle timezone conversions or DST automatically. Leap seconds are also not handled, they must be done manually if desired. Suffixes such as "Z" are not handled, you need to strip them away manually.
+ [b]Important:[/b] The [code]_from_system[/code] methods use the system clock that the user can manually set. [b]Never use[/b] this method for precise time calculation since its results are subject to automatic adjustments by the user or the operating system. [b]Always use[/b] [method get_ticks_usec] or [method get_ticks_msec] for precise time calculation instead, since they are guaranteed to be monotonic (i.e. never decrease).
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="get_date_dict_from_system" qualifiers="const">
+ <return type="Dictionary">
+ </return>
+ <argument index="0" name="utc" type="bool" default="false">
+ </argument>
+ <description>
+ Returns the current date as a dictionary of keys: [code]year[/code], [code]month[/code], [code]day[/code], [code]weekday[/code], and [code]dst[/code] (Daylight Savings Time).
+ The returned values are in the system's local time when [code]utc[/code] is false, otherwise they are in UTC.
+ </description>
+ </method>
+ <method name="get_date_dict_from_unix_time" qualifiers="const">
+ <return type="Dictionary">
+ </return>
+ <argument index="0" name="unix_time_val" type="int">
+ </argument>
+ <description>
+ Converts the given Unix timestamp to a dictionary of keys: [code]year[/code], [code]month[/code], [code]day[/code], and [code]weekday[/code].
+ </description>
+ </method>
+ <method name="get_date_string_from_system" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="utc" type="bool" default="false">
+ </argument>
+ <description>
+ Returns the current date as an ISO 8601 date string (YYYY-MM-DD).
+ The returned values are in the system's local time when [code]utc[/code] is false, otherwise they are in UTC.
+ </description>
+ </method>
+ <method name="get_date_string_from_unix_time" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="unix_time_val" type="int">
+ </argument>
+ <description>
+ Converts the given Unix timestamp to an ISO 8601 date string (YYYY-MM-DD).
+ </description>
+ </method>
+ <method name="get_datetime_dict_from_string" qualifiers="const">
+ <return type="Dictionary">
+ </return>
+ <argument index="0" name="datetime" type="String">
+ </argument>
+ <argument index="1" name="weekday" type="bool">
+ </argument>
+ <description>
+ Converts the given ISO 8601 date and time string (YYYY-MM-DDTHH:MM:SS) to a dictionary of keys: [code]year[/code], [code]month[/code], [code]day[/code], [code]weekday[/code], [code]hour[/code], [code]minute[/code], and [code]second[/code].
+ If [code]weekday[/code] is false, then the [code]weekday[/code] entry is excluded (the calculation is relatively expensive).
+ </description>
+ </method>
+ <method name="get_datetime_dict_from_system" qualifiers="const">
+ <return type="Dictionary">
+ </return>
+ <argument index="0" name="utc" type="bool" default="false">
+ </argument>
+ <description>
+ Returns the current date as a dictionary of keys: [code]year[/code], [code]month[/code], [code]day[/code], [code]weekday[/code], [code]hour[/code], [code]minute[/code], and [code]second[/code].
+ </description>
+ </method>
+ <method name="get_datetime_dict_from_unix_time" qualifiers="const">
+ <return type="Dictionary">
+ </return>
+ <argument index="0" name="unix_time_val" type="int">
+ </argument>
+ <description>
+ Converts the given Unix timestamp to a dictionary of keys: [code]year[/code], [code]month[/code], [code]day[/code], and [code]weekday[/code].
+ The returned Dictionary's values will be the same as the [method get_datetime_dict_from_system] if the Unix timestamp is the current time, with the exception of Daylight Savings Time as it cannot be determined from the epoch.
+ </description>
+ </method>
+ <method name="get_datetime_string_from_dict" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="datetime" type="Dictionary">
+ </argument>
+ <argument index="1" name="use_space" type="bool">
+ </argument>
+ <description>
+ Converts the given dictionary of keys to an ISO 8601 date and time string (YYYY-MM-DDTHH:MM:SS).
+ The given dictionary can be populated with the following keys: [code]year[/code], [code]month[/code], [code]day[/code], [code]hour[/code], [code]minute[/code], and [code]second[/code]. Any other entries (including [code]dst[/code]) are ignored.
+ If the dictionary is empty, [code]0[/code] is returned. If some keys are omitted, they default to the equivalent values for the Unix epoch timestamp 0 (1970-01-01 at 00:00:00).
+ If [code]use_space[/code] is true, use a space instead of the letter T in the middle.
+ </description>
+ </method>
+ <method name="get_datetime_string_from_system" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="utc" type="bool" default="false">
+ </argument>
+ <argument index="1" name="use_space" type="bool" default="false">
+ </argument>
+ <description>
+ Returns the current date and time as a dictionary of keys: [code]year[/code], [code]month[/code], [code]day[/code], [code]weekday[/code], [code]dst[/code] (Daylight Savings Time), [code]hour[/code], [code]minute[/code], and [code]second[/code].
+ The returned values are in the system's local time when [code]utc[/code] is false, otherwise they are in UTC.
+ If [code]use_space[/code] is true, use a space instead of the letter T in the middle.
+ </description>
+ </method>
+ <method name="get_datetime_string_from_unix_time" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="unix_time_val" type="int">
+ </argument>
+ <argument index="1" name="use_space" type="bool" default="false">
+ </argument>
+ <description>
+ Converts the given Unix timestamp to an ISO 8601 date and time string (YYYY-MM-DDTHH:MM:SS).
+ If [code]use_space[/code] is true, use a space instead of the letter T in the middle.
+ </description>
+ </method>
+ <method name="get_ticks_msec" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns the amount of time passed in milliseconds since the engine started.
+ </description>
+ </method>
+ <method name="get_ticks_usec" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns the amount of time passed in microseconds since the engine started.
+ </description>
+ </method>
+ <method name="get_time_dict_from_system" qualifiers="const">
+ <return type="Dictionary">
+ </return>
+ <argument index="0" name="utc" type="bool" default="false">
+ </argument>
+ <description>
+ Returns the current time as a dictionary of keys: [code]hour[/code], [code]minute[/code], and [code]second[/code].
+ The returned values are in the system's local time when [code]utc[/code] is false, otherwise they are in UTC.
+ </description>
+ </method>
+ <method name="get_time_dict_from_unix_time" qualifiers="const">
+ <return type="Dictionary">
+ </return>
+ <argument index="0" name="unix_time_val" type="int">
+ </argument>
+ <description>
+ Converts the given time to a dictionary of keys: [code]hour[/code], [code]minute[/code], and [code]second[/code].
+ </description>
+ </method>
+ <method name="get_time_string_from_system" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="utc" type="bool" default="false">
+ </argument>
+ <description>
+ Returns the current time as an ISO 8601 time string (HH:MM:SS).
+ The returned values are in the system's local time when [code]utc[/code] is false, otherwise they are in UTC.
+ </description>
+ </method>
+ <method name="get_time_string_from_unix_time" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="unix_time_val" type="int">
+ </argument>
+ <description>
+ Converts the given Unix timestamp to an ISO 8601 time string (HH:MM:SS).
+ </description>
+ </method>
+ <method name="get_time_zone_from_system" qualifiers="const">
+ <return type="Dictionary">
+ </return>
+ <description>
+ Returns the current time zone as a dictionary of keys: [code]bias[/code] and [code]name[/code]. The [code]bias[/code] value is the offset from UTC in minutes, since not all time zones are multiples of an hour from UTC.
+ </description>
+ </method>
+ <method name="get_unix_time_from_datetime_dict" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="datetime" type="Dictionary">
+ </argument>
+ <description>
+ Converts a dictionary of time values to a Unix timestamp.
+ The given dictionary can be populated with the following keys: [code]year[/code], [code]month[/code], [code]day[/code], [code]hour[/code], [code]minute[/code], and [code]second[/code]. Any other entries (including [code]dst[/code]) are ignored.
+ If the dictionary is empty, [code]0[/code] is returned. If some keys are omitted, they default to the equivalent values for the Unix epoch timestamp 0 (1970-01-01 at 00:00:00).
+ You can pass the output from [method get_datetime_dict_from_unix_time] directly into this function and get the same as what was put in.
+ </description>
+ </method>
+ <method name="get_unix_time_from_datetime_string" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="datetime" type="String">
+ </argument>
+ <description>
+ Converts the given ISO 8601 date and/or time string to a Unix timestamp. The string can contain a date only, a time only, or both.
+ </description>
+ </method>
+ <method name="get_unix_time_from_system" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Returns the current Unix timestamp in seconds based on the system time.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ <constant name="MONTH_JANUARY" value="1" enum="Month">
+ The month of January, represented numerically as [code]01[/code].
+ </constant>
+ <constant name="MONTH_FEBRUARY" value="2" enum="Month">
+ The month of February, represented numerically as [code]02[/code].
+ </constant>
+ <constant name="MONTH_MARCH" value="3" enum="Month">
+ The month of March, represented numerically as [code]03[/code].
+ </constant>
+ <constant name="MONTH_APRIL" value="4" enum="Month">
+ The month of April, represented numerically as [code]04[/code].
+ </constant>
+ <constant name="MONTH_MAY" value="5" enum="Month">
+ The month of May, represented numerically as [code]05[/code].
+ </constant>
+ <constant name="MONTH_JUNE" value="6" enum="Month">
+ The month of June, represented numerically as [code]06[/code].
+ </constant>
+ <constant name="MONTH_JULY" value="7" enum="Month">
+ The month of July, represented numerically as [code]07[/code].
+ </constant>
+ <constant name="MONTH_AUGUST" value="8" enum="Month">
+ The month of August, represented numerically as [code]08[/code].
+ </constant>
+ <constant name="MONTH_SEPTEMBER" value="9" enum="Month">
+ The month of September, represented numerically as [code]09[/code].
+ </constant>
+ <constant name="MONTH_OCTOBER" value="10" enum="Month">
+ The month of October, represented numerically as [code]10[/code].
+ </constant>
+ <constant name="MONTH_NOVEMBER" value="11" enum="Month">
+ The month of November, represented numerically as [code]11[/code].
+ </constant>
+ <constant name="MONTH_DECEMBER" value="12" enum="Month">
+ The month of December, represented numerically as [code]12[/code].
+ </constant>
+ <constant name="WEEKDAY_SUNDAY" value="0" enum="Weekday">
+ The day of the week Sunday, represented numerically as [code]0[/code].
+ </constant>
+ <constant name="WEEKDAY_MONDAY" value="1" enum="Weekday">
+ The day of the week Monday, represented numerically as [code]1[/code].
+ </constant>
+ <constant name="WEEKDAY_TUESDAY" value="2" enum="Weekday">
+ The day of the week Tuesday, represented numerically as [code]2[/code].
+ </constant>
+ <constant name="WEEKDAY_WEDNESDAY" value="3" enum="Weekday">
+ The day of the week Wednesday, represented numerically as [code]3[/code].
+ </constant>
+ <constant name="WEEKDAY_THURSDAY" value="4" enum="Weekday">
+ The day of the week Thursday, represented numerically as [code]4[/code].
+ </constant>
+ <constant name="WEEKDAY_FRIDAY" value="5" enum="Weekday">
+ The day of the week Friday, represented numerically as [code]5[/code].
+ </constant>
+ <constant name="WEEKDAY_SATURDAY" value="6" enum="Weekday">
+ The day of the week Saturday, represented numerically as [code]6[/code].
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/Transform2D.xml b/doc/classes/Transform2D.xml
index 6ae7fbcf79..4f9b59c188 100644
--- a/doc/classes/Transform2D.xml
+++ b/doc/classes/Transform2D.xml
@@ -18,7 +18,7 @@
<return type="Transform2D">
</return>
<description>
- Constructs a default-initialized [Transform] set to [constant IDENTITY].
+ Constructs a default-initialized [Transform2D] set to [constant IDENTITY].
</description>
</method>
<method name="Transform2D" qualifiers="constructor">
@@ -129,6 +129,16 @@
Returns [code]true[/code] if this transform and [code]transform[/code] are approximately equal, by calling [code]is_equal_approx[/code] on each component.
</description>
</method>
+ <method name="looking_at" qualifiers="const">
+ <return type="Transform2D">
+ </return>
+ <argument index="0" name="target" type="Vector2" default="Transform2D(1, 0, 0, 1, 0, 0)">
+ </argument>
+ <description>
+ Returns a copy of the transform rotated such that it's rotation on the X-axis points towards the [code]target[/code] position.
+ Operations take place in global space.
+ </description>
+ </method>
<method name="operator !=" qualifiers="operator">
<return type="bool">
</return>
@@ -169,6 +179,24 @@
<description>
</description>
</method>
+ <method name="operator *" qualifiers="operator">
+ <return type="Transform2D">
+ </return>
+ <argument index="0" name="right" type="float">
+ </argument>
+ <description>
+ This operator multiplies all components of the [Transform2D], including the origin vector, which scales it uniformly.
+ </description>
+ </method>
+ <method name="operator *" qualifiers="operator">
+ <return type="Transform2D">
+ </return>
+ <argument index="0" name="right" type="int">
+ </argument>
+ <description>
+ This operator multiplies all components of the [Transform2D], including the origin vector, which scales it uniformly.
+ </description>
+ </method>
<method name="operator ==" qualifiers="operator">
<return type="bool">
</return>
@@ -210,6 +238,15 @@
Scales the transform by the given scale factor, using matrix multiplication.
</description>
</method>
+ <method name="set_rotation">
+ <return type="void">
+ </return>
+ <argument index="0" name="rotation" type="float">
+ </argument>
+ <description>
+ Sets the transform's rotation (in radians).
+ </description>
+ </method>
<method name="translated" qualifiers="const">
<return type="Transform2D">
</return>
@@ -222,24 +259,24 @@
</method>
</methods>
<members>
- <member name="origin" type="Vector2" setter="" getter="" default="Vector2( 0, 0 )">
+ <member name="origin" type="Vector2" setter="" getter="" default="Vector2(0, 0)">
The origin vector (column 2, the third column). Equivalent to array index [code]2[/code]. The origin vector represents translation.
</member>
- <member name="x" type="Vector2" setter="" getter="" default="Vector2( 1, 0 )">
+ <member name="x" type="Vector2" setter="" getter="" default="Vector2(1, 0)">
The basis matrix's X vector (column 0). Equivalent to array index [code]0[/code].
</member>
- <member name="y" type="Vector2" setter="" getter="" default="Vector2( 0, 1 )">
+ <member name="y" type="Vector2" setter="" getter="" default="Vector2(0, 1)">
The basis matrix's Y vector (column 1). Equivalent to array index [code]1[/code].
</member>
</members>
<constants>
- <constant name="IDENTITY" value="Transform2D( 1, 0, 0, 1, 0, 0 )">
+ <constant name="IDENTITY" value="Transform2D(1, 0, 0, 1, 0, 0)">
The identity [Transform2D] with no translation, rotation or scaling applied. When applied to other data structures, [constant IDENTITY] performs no transformation.
</constant>
- <constant name="FLIP_X" value="Transform2D( -1, 0, 0, 1, 0, 0 )">
+ <constant name="FLIP_X" value="Transform2D(-1, 0, 0, 1, 0, 0)">
The [Transform2D] that will flip something along the X axis.
</constant>
- <constant name="FLIP_Y" value="Transform2D( 1, 0, 0, -1, 0, 0 )">
+ <constant name="FLIP_Y" value="Transform2D(1, 0, 0, -1, 0, 0)">
The [Transform2D] that will flip something along the Y axis.
</constant>
</constants>
diff --git a/doc/classes/Transform.xml b/doc/classes/Transform3D.xml
index 9d8721e2de..5410cbced7 100644
--- a/doc/classes/Transform.xml
+++ b/doc/classes/Transform3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Transform" version="4.0">
+<class name="Transform3D" version="4.0">
<brief_description>
3D transformation (3×4 matrix).
</brief_description>
@@ -16,35 +16,35 @@
<link title="2.5D Demo">https://godotengine.org/asset-library/asset/583</link>
</tutorials>
<methods>
- <method name="Transform" qualifiers="constructor">
- <return type="Transform">
+ <method name="Transform3D" qualifiers="constructor">
+ <return type="Transform3D">
</return>
<description>
- Constructs a default-initialized [Transform] set to [constant IDENTITY].
+ Constructs a default-initialized [Transform3D] set to [constant IDENTITY].
</description>
</method>
- <method name="Transform" qualifiers="constructor">
- <return type="Transform">
+ <method name="Transform3D" qualifiers="constructor">
+ <return type="Transform3D">
</return>
- <argument index="0" name="from" type="Transform">
+ <argument index="0" name="from" type="Transform3D">
</argument>
<description>
- Constructs a [Transform] as a copy of the given [Transform].
+ Constructs a [Transform3D] as a copy of the given [Transform3D].
</description>
</method>
- <method name="Transform" qualifiers="constructor">
- <return type="Transform">
+ <method name="Transform3D" qualifiers="constructor">
+ <return type="Transform3D">
</return>
<argument index="0" name="basis" type="Basis">
</argument>
<argument index="1" name="origin" type="Vector3">
</argument>
<description>
- Constructs a Transform from a [Basis] and [Vector3].
+ Constructs a Transform3D from a [Basis] and [Vector3].
</description>
</method>
- <method name="Transform" qualifiers="constructor">
- <return type="Transform">
+ <method name="Transform3D" qualifiers="constructor">
+ <return type="Transform3D">
</return>
<argument index="0" name="x_axis" type="Vector3">
</argument>
@@ -55,29 +55,29 @@
<argument index="3" name="origin" type="Vector3">
</argument>
<description>
- Constructs a Transform from four [Vector3] values (matrix columns). Each axis corresponds to local basis vectors (some of which may be scaled).
+ Constructs a Transform3D from four [Vector3] values (matrix columns). Each axis corresponds to local basis vectors (some of which may be scaled).
</description>
</method>
<method name="affine_inverse" qualifiers="const">
- <return type="Transform">
+ <return type="Transform3D">
</return>
<description>
Returns the inverse of the transform, under the assumption that the transformation is composed of rotation, scaling and translation.
</description>
</method>
<method name="interpolate_with" qualifiers="const">
- <return type="Transform">
+ <return type="Transform3D">
</return>
- <argument index="0" name="xform" type="Transform">
+ <argument index="0" name="xform" type="Transform3D">
</argument>
<argument index="1" name="weight" type="float">
</argument>
<description>
- Interpolates the transform to other Transform by weight amount (on the range of 0.0 to 1.0).
+ Interpolates the transform to other Transform3D by weight amount (on the range of 0.0 to 1.0).
</description>
</method>
<method name="inverse" qualifiers="const">
- <return type="Transform">
+ <return type="Transform3D">
</return>
<description>
Returns the inverse of the transform, under the assumption that the transformation is composed of rotation and translation (no scaling, use affine_inverse for transforms with scaling).
@@ -86,18 +86,18 @@
<method name="is_equal_approx" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="xform" type="Transform">
+ <argument index="0" name="xform" type="Transform3D">
</argument>
<description>
Returns [code]true[/code] if this transform and [code]transform[/code] are approximately equal, by calling [code]is_equal_approx[/code] on each component.
</description>
</method>
<method name="looking_at" qualifiers="const">
- <return type="Transform">
+ <return type="Transform3D">
</return>
<argument index="0" name="target" type="Vector3">
</argument>
- <argument index="1" name="up" type="Vector3" default="Vector3( 0, 1, 0 )">
+ <argument index="1" name="up" type="Vector3" default="Vector3(0, 1, 0)">
</argument>
<description>
Returns a copy of the transform rotated such that its -Z axis points towards the [code]target[/code] position.
@@ -108,7 +108,7 @@
<method name="operator !=" qualifiers="operator">
<return type="bool">
</return>
- <argument index="0" name="right" type="Transform">
+ <argument index="0" name="right" type="Transform3D">
</argument>
<description>
</description>
@@ -122,9 +122,9 @@
</description>
</method>
<method name="operator *" qualifiers="operator">
- <return type="Transform">
+ <return type="Transform3D">
</return>
- <argument index="0" name="right" type="Transform">
+ <argument index="0" name="right" type="Transform3D">
</argument>
<description>
</description>
@@ -145,23 +145,41 @@
<description>
</description>
</method>
+ <method name="operator *" qualifiers="operator">
+ <return type="Transform3D">
+ </return>
+ <argument index="0" name="right" type="float">
+ </argument>
+ <description>
+ This operator multiplies all components of the [Transform3D], including the origin vector, which scales it uniformly.
+ </description>
+ </method>
+ <method name="operator *" qualifiers="operator">
+ <return type="Transform3D">
+ </return>
+ <argument index="0" name="right" type="int">
+ </argument>
+ <description>
+ This operator multiplies all components of the [Transform3D], including the origin vector, which scales it uniformly.
+ </description>
+ </method>
<method name="operator ==" qualifiers="operator">
<return type="bool">
</return>
- <argument index="0" name="right" type="Transform">
+ <argument index="0" name="right" type="Transform3D">
</argument>
<description>
</description>
</method>
<method name="orthonormalized" qualifiers="const">
- <return type="Transform">
+ <return type="Transform3D">
</return>
<description>
Returns the transform with the basis orthogonal (90 degrees), and normalized axis vectors.
</description>
</method>
<method name="rotated" qualifiers="const">
- <return type="Transform">
+ <return type="Transform3D">
</return>
<argument index="0" name="axis" type="Vector3">
</argument>
@@ -172,7 +190,7 @@
</description>
</method>
<method name="scaled" qualifiers="const">
- <return type="Transform">
+ <return type="Transform3D">
</return>
<argument index="0" name="scale" type="Vector3">
</argument>
@@ -181,7 +199,7 @@
</description>
</method>
<method name="translated" qualifiers="const">
- <return type="Transform">
+ <return type="Transform3D">
</return>
<argument index="0" name="offset" type="Vector3">
</argument>
@@ -192,25 +210,25 @@
</method>
</methods>
<members>
- <member name="basis" type="Basis" setter="" getter="" default="Basis( 1, 0, 0, 0, 1, 0, 0, 0, 1 )">
+ <member name="basis" type="Basis" setter="" getter="" default="Basis(1, 0, 0, 0, 1, 0, 0, 0, 1)">
The basis is a matrix containing 3 [Vector3] as its columns: X axis, Y axis, and Z axis. These vectors can be interpreted as the basis vectors of local coordinate system traveling with the object.
</member>
- <member name="origin" type="Vector3" setter="" getter="" default="Vector3( 0, 0, 0 )">
+ <member name="origin" type="Vector3" setter="" getter="" default="Vector3(0, 0, 0)">
The translation offset of the transform (column 3, the fourth column). Equivalent to array index [code]3[/code].
</member>
</members>
<constants>
- <constant name="IDENTITY" value="Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )">
- [Transform] with no translation, rotation or scaling applied. When applied to other data structures, [constant IDENTITY] performs no transformation.
+ <constant name="IDENTITY" value="Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)">
+ [Transform3D] with no translation, rotation or scaling applied. When applied to other data structures, [constant IDENTITY] performs no transformation.
</constant>
- <constant name="FLIP_X" value="Transform( -1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )">
- [Transform] with mirroring applied perpendicular to the YZ plane.
+ <constant name="FLIP_X" value="Transform3D(-1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)">
+ [Transform3D] with mirroring applied perpendicular to the YZ plane.
</constant>
- <constant name="FLIP_Y" value="Transform( 1, 0, 0, 0, -1, 0, 0, 0, 1, 0, 0, 0 )">
- [Transform] with mirroring applied perpendicular to the XZ plane.
+ <constant name="FLIP_Y" value="Transform3D(1, 0, 0, 0, -1, 0, 0, 0, 1, 0, 0, 0)">
+ [Transform3D] with mirroring applied perpendicular to the XZ plane.
</constant>
- <constant name="FLIP_Z" value="Transform( 1, 0, 0, 0, 1, 0, 0, 0, -1, 0, 0, 0 )">
- [Transform] with mirroring applied perpendicular to the XY plane.
+ <constant name="FLIP_Z" value="Transform3D(1, 0, 0, 0, 1, 0, 0, 0, -1, 0, 0, 0)">
+ [Transform3D] with mirroring applied perpendicular to the XY plane.
</constant>
</constants>
</class>
diff --git a/doc/classes/Tree.xml b/doc/classes/Tree.xml
index a09f1bf470..6a65d4ff7d 100644
--- a/doc/classes/Tree.xml
+++ b/doc/classes/Tree.xml
@@ -30,7 +30,7 @@
}
[/csharp]
[/codeblocks]
- To iterate over all the [TreeItem] objects in a [Tree] object, use [method TreeItem.get_next] and [method TreeItem.get_children] after getting the root through [method get_root]. You can use [method Object.free] on a [TreeItem] to remove it from the [Tree].
+ To iterate over all the [TreeItem] objects in a [Tree] object, use [method TreeItem.get_next] and [method TreeItem.get_first_child] after getting the root through [method get_root]. You can use [method Object.free] on a [TreeItem] to remove it from the [Tree].
</description>
<tutorials>
</tutorials>
@@ -361,7 +361,7 @@
The number of columns.
</member>
<member name="drop_mode_flags" type="int" setter="set_drop_mode_flags" getter="get_drop_mode_flags" default="0">
- The drop mode as an OR combination of flags. See [enum DropModeFlags] constants. Once dropping is done, reverts to [constant DROP_MODE_DISABLED]. Setting this during [method Control.can_drop_data] is recommended.
+ The drop mode as an OR combination of flags. See [enum DropModeFlags] constants. Once dropping is done, reverts to [constant DROP_MODE_DISABLED]. Setting this during [method Control._can_drop_data] is recommended.
This controls the drop sections, i.e. the decision and drawing of possible drop locations based on the mouse position.
</member>
<member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" override="true" enum="Control.FocusMode" default="2" />
@@ -533,6 +533,12 @@
<theme_item name="checked" type="Texture2D">
The check icon to display when the [constant TreeItem.CELL_MODE_CHECK] mode cell is checked.
</theme_item>
+ <theme_item name="children_hl_line_color" type="Color" default="Color(0.27, 0.27, 0.27, 1)">
+ The [Color] of the relationship lines between the selected [TreeItem] and its children.
+ </theme_item>
+ <theme_item name="children_hl_line_width" type="int" default="1">
+ The width of the relationship lines between the selected [TreeItem] and its children.
+ </theme_item>
<theme_item name="cursor" type="StyleBox">
[StyleBox] used for the cursor, when the [Tree] is being focused.
</theme_item>
@@ -542,7 +548,7 @@
<theme_item name="custom_button" type="StyleBox">
Default [StyleBox] for a [constant TreeItem.CELL_MODE_CUSTOM] mode cell.
</theme_item>
- <theme_item name="custom_button_font_highlight" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )">
+ <theme_item name="custom_button_font_highlight" type="Color" default="Color(0.94, 0.94, 0.94, 1)">
Text [Color] for a [constant TreeItem.CELL_MODE_CUSTOM] mode cell when it's hovered.
</theme_item>
<theme_item name="custom_button_hover" type="StyleBox">
@@ -557,25 +563,25 @@
<theme_item name="draw_relationship_lines" type="int" default="0">
Draws the relationship lines if not zero, this acts as a boolean. Relationship lines are drawn at the start of child items to show hierarchy.
</theme_item>
- <theme_item name="drop_position_color" type="Color" default="Color( 1, 0.3, 0.2, 1 )">
+ <theme_item name="drop_position_color" type="Color" default="Color(1, 0.3, 0.2, 1)">
[Color] used to draw possible drop locations. See [enum DropModeFlags] constants for further description of drop locations.
</theme_item>
<theme_item name="font" type="Font">
[Font] of the item's text.
</theme_item>
- <theme_item name="font_color" type="Color" default="Color( 0.69, 0.69, 0.69, 1 )">
+ <theme_item name="font_color" type="Color" default="Color(0.69, 0.69, 0.69, 1)">
Default text [Color] of the item.
</theme_item>
- <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ <theme_item name="font_outline_color" type="Color" default="Color(1, 1, 1, 1)">
The tint of text outline of the item.
</theme_item>
- <theme_item name="font_selected_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ <theme_item name="font_selected_color" type="Color" default="Color(1, 1, 1, 1)">
Text [Color] used when the item is selected.
</theme_item>
<theme_item name="font_size" type="int">
Font size of the item's text.
</theme_item>
- <theme_item name="guide_color" type="Color" default="Color( 0, 0, 0, 0.1 )">
+ <theme_item name="guide_color" type="Color" default="Color(0, 0, 0, 0.1)">
[Color] of the guideline.
</theme_item>
<theme_item name="hseparation" type="int" default="4">
@@ -587,8 +593,20 @@
<theme_item name="outline_size" type="int" default="0">
The size of the text outline.
</theme_item>
- <theme_item name="relationship_line_color" type="Color" default="Color( 0.27, 0.27, 0.27, 1 )">
- [Color] of the relationship lines.
+ <theme_item name="parent_hl_line_color" type="Color" default="Color(0.27, 0.27, 0.27, 1)">
+ The [Color] of the relationship lines between the selected [TreeItem] and its parents.
+ </theme_item>
+ <theme_item name="parent_hl_line_margin" type="int" default="0">
+ The space between the parent relationship lines for the selected [TreeItem] and the relationship lines to its siblings that are not selected.
+ </theme_item>
+ <theme_item name="parent_hl_line_width" type="int" default="1">
+ The width of the relationship lines between the selected [TreeItem] and its parents.
+ </theme_item>
+ <theme_item name="relationship_line_color" type="Color" default="Color(0.27, 0.27, 0.27, 1)">
+ The default [Color] of the relationship lines.
+ </theme_item>
+ <theme_item name="relationship_line_width" type="int" default="1">
+ The default width of the relationship lines.
</theme_item>
<theme_item name="scroll_border" type="int" default="4">
The maximum distance between the mouse cursor and the control's border to trigger border scrolling when dragging.
@@ -605,7 +623,7 @@
<theme_item name="selected_focus" type="StyleBox">
[StyleBox] for the selected items, used when the [Tree] is being focused.
</theme_item>
- <theme_item name="title_button_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )">
+ <theme_item name="title_button_color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
Default text [Color] of the title button.
</theme_item>
<theme_item name="title_button_font" type="Font">
diff --git a/doc/classes/TreeItem.xml b/doc/classes/TreeItem.xml
index add23c2ce6..0256d83fea 100644
--- a/doc/classes/TreeItem.xml
+++ b/doc/classes/TreeItem.xml
@@ -63,6 +63,16 @@
Removes all OpenType features.
</description>
</method>
+ <method name="create_child">
+ <return type="TreeItem">
+ </return>
+ <argument index="0" name="idx" type="int" default="-1">
+ </argument>
+ <description>
+ Creates an item and adds it as a child.
+ The new item will be inserted as position [code]idx[/code] (the default value [code]-1[/code] means the last position), or it will be the last child if [code]idx[/code] is higher than the child count.
+ </description>
+ </method>
<method name="deselect">
<return type="void">
</return>
@@ -123,11 +133,28 @@
Returns the column's cell mode.
</description>
</method>
- <method name="get_children">
+ <method name="get_child">
<return type="TreeItem">
</return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Returns a child item by its index (see [method get_child_count]). This method is often used for iterating all children of an item.
+ Negative indices access the children from the last one.
+ </description>
+ </method>
+ <method name="get_child_count">
+ <return type="int">
+ </return>
<description>
- Returns the TreeItem's first child item or a null object if there is none.
+ Returns the number of child items.
+ </description>
+ </method>
+ <method name="get_children">
+ <return type="Array">
+ </return>
+ <description>
+ Returns an array of references to the item's children.
</description>
</method>
<method name="get_custom_bg_color" qualifiers="const">
@@ -148,6 +175,14 @@
Returns the custom color of column [code]column[/code].
</description>
</method>
+ <method name="get_custom_font" qualifiers="const">
+ <return type="Font">
+ </return>
+ <argument index="0" name="column" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="get_expand_right" qualifiers="const">
<return type="bool">
</return>
@@ -157,6 +192,13 @@
Returns [code]true[/code] if [code]expand_right[/code] is set.
</description>
</method>
+ <method name="get_first_child">
+ <return type="TreeItem">
+ </return>
+ <description>
+ Returns the TreeItem's first child.
+ </description>
+ </method>
<method name="get_icon" qualifiers="const">
<return type="Texture2D">
</return>
@@ -193,6 +235,13 @@
Returns the icon [Texture2D] region as [Rect2].
</description>
</method>
+ <method name="get_index">
+ <return type="int">
+ </return>
+ <description>
+ Returns the node's order in the tree. For example, if called on the first child item the position is [code]0[/code].
+ </description>
+ </method>
<method name="get_language" qualifiers="const">
<return type="String">
</return>
@@ -342,6 +391,13 @@
Returns the given column's tooltip.
</description>
</method>
+ <method name="get_tree">
+ <return type="Tree">
+ </return>
+ <description>
+ Returns the [Tree] that owns this TreeItem.
+ </description>
+ </method>
<method name="is_button_disabled" qualifiers="const">
<return type="bool">
</return>
@@ -397,18 +453,24 @@
Returns [code]true[/code] if column [code]column[/code] is selected.
</description>
</method>
- <method name="move_to_bottom">
+ <method name="move_after">
<return type="void">
</return>
+ <argument index="0" name="item" type="Object">
+ </argument>
<description>
- Moves this TreeItem to the bottom in the [Tree] hierarchy.
+ Moves this TreeItem right after the given [code]item[/code].
+ [b]Note:[/b] You can't move to the root or move the root.
</description>
</method>
- <method name="move_to_top">
+ <method name="move_before">
<return type="void">
</return>
+ <argument index="0" name="item" type="Object">
+ </argument>
<description>
- Moves this TreeItem to the top in the [Tree] hierarchy.
+ Moves this TreeItem right before the given [code]item[/code].
+ [b]Note:[/b] You can't move to the root or move the root.
</description>
</method>
<method name="remove_child">
@@ -525,6 +587,16 @@
The [code]callback[/code] should accept two arguments: the [TreeItem] that is drawn and its position and size as a [Rect2].
</description>
</method>
+ <method name="set_custom_font">
+ <return type="void">
+ </return>
+ <argument index="0" name="column" type="int">
+ </argument>
+ <argument index="1" name="font" type="Font">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="set_editable">
<return type="void">
</return>
diff --git a/doc/classes/TriangleMesh.xml b/doc/classes/TriangleMesh.xml
index 39bee0c2b3..cfdb6fe33e 100644
--- a/doc/classes/TriangleMesh.xml
+++ b/doc/classes/TriangleMesh.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="TriangleMesh" inherits="Reference" version="4.0">
+<class name="TriangleMesh" inherits="RefCounted" version="4.0">
<brief_description>
Internal mesh type.
</brief_description>
diff --git a/doc/classes/Tween.xml b/doc/classes/Tween.xml
index 00cca40093..ed193b9f7e 100644
--- a/doc/classes/Tween.xml
+++ b/doc/classes/Tween.xml
@@ -1,453 +1,398 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Tween" inherits="Node" version="4.0">
+<class name="Tween" inherits="RefCounted" version="4.0">
<brief_description>
- Smoothly animates a node's properties over time.
+ Lightweight object used for general-purpose animation via script, using [Tweener]s.
</brief_description>
<description>
- Tweens are useful for animations requiring a numerical property to be interpolated over a range of values. The name [i]tween[/i] comes from [i]in-betweening[/i], an animation technique where you specify [i]keyframes[/i] and the computer interpolates the frames that appear between them.
- [Tween] is more suited than [AnimationPlayer] for animations where you don't know the final values in advance. For example, interpolating a dynamically-chosen camera zoom value is best done with a [Tween] node; it would be difficult to do the same thing with an [AnimationPlayer] node.
- Here is a brief usage example that makes a 2D node move smoothly between two positions:
- [codeblocks]
- [gdscript]
- var tween = get_node("Tween")
- tween.interpolate_property($Node2D, "position",
- Vector2(0, 0), Vector2(100, 100), 1,
- Tween.TRANS_LINEAR, Tween.EASE_IN_OUT)
- tween.start()
- [/gdscript]
- [csharp]
- var tween = GetNode&lt;Tween&gt;("Tween");
- tween.InterpolateProperty(GetNode&lt;Node2D&gt;("Node2D"), "position",
- new Vector2(0, 0), new Vector2(100, 100), 1,
- Tween.TransitionType.Linear, Tween.EaseType.InOut);
- tween.Start();
- [/csharp]
- [/codeblocks]
- Many methods require a property name, such as [code]"position"[/code] above. You can find the correct property name by hovering over the property in the Inspector. You can also provide the components of a property directly by using [code]"property:component"[/code] (e.g. [code]position:x[/code]), where it would only apply to that particular component.
- Many of the methods accept [code]trans_type[/code] and [code]ease_type[/code]. The first accepts an [enum TransitionType] constant, and refers to the way the timing of the animation is handled (see [url=https://easings.net/]easings.net[/url] for some examples). The second accepts an [enum EaseType] constant, and controls where the [code]trans_type[/code] is applied to the interpolation (in the beginning, the end, or both). If you don't know which transition and easing to pick, you can try different [enum TransitionType] constants with [constant EASE_IN_OUT], and use the one that looks best.
+ Tweens are mostly useful for animations requiring a numerical property to be interpolated over a range of values. The name [i]tween[/i] comes from [i]in-betweening[/i], an animation technique where you specify [i]keyframes[/i] and the computer interpolates the frames that appear between them.
+ [Tween] is more suited than [AnimationPlayer] for animations where you don't know the final values in advance. For example, interpolating a dynamically-chosen camera zoom value is best done with a [Tween]; it would be difficult to do the same thing with an [AnimationPlayer] node. Tweens are also more light-weight than [AnimationPlayer], so they are very much suited for simple animations or general tasks that don't require visual tweaking provided by the editor. They can be used in a fire-and-forget manner for some logic that normally would be done by code. You can e.g. make something shoot periodically by using a looped [CallbackTweener] with a delay.
+ A [Tween] can be created by using either [method SceneTree.create_tween] or [method Node.create_tween]. [Tween]s created manually (i.e. by using [code]Tween.new()[/code]) are invalid. They can't be used for tweening values, but you can do manual interpolation with [method interpolate_value].
+ A [Tween] animation is composed of a sequence of [Tweener]s, which by default are executed one after another. You can create a sequence by appending [Tweener]s to the [Tween]. Animating something with a [Tweener] is called tweening. Example tweening sequence looks like this:
+ [codeblock]
+ var tween = get_tree().create_tween()
+ tween.tween_property($Sprite, "modulate", Color.red, 1)
+ tween.tween_property($Sprite, "scale", Vector2(), 1)
+ tween.tween_callback($Sprite.queue_free)
+ [/codeblock]
+ This sequence will make the [code]$Sprite[/code] node turn red, then shrink and finally the [method Node.queue_free] is called to remove the sprite. See methods [method tween_property], [method tween_interval], [method tween_callback] and [method tween_method] for more usage information.
+ When a [Tweener] is created with one of the [code]tween_*[/code] methods, a chained method call can be used to tweak the properties of this [Tweener]. For example, if you want to set different transition type in the above example, you can do:
+ [codeblock]
+ var tween = get_tree().create_tween()
+ tween.tween_property($Sprite, "modulate", Color.red, 1).set_trans(Tween.TRANS_SINE)
+ tween.tween_property($Sprite, "scale", Vector2(), 1).set_trans(Tween.TRANS_BOUNCE)
+ tween.tween_callback($Sprite.queue_free)
+ [/codeblock]
+ Most of the [Tween] methods can be chained this way too. In this example the [Tween] is bound and have set a default transition:
+ [codeblock]
+ var tween = get_tree().create_tween().bind_node(self).set_trans(Tween.TRANS_ELASTIC)
+ tween.tween_property($Sprite, "modulate", Color.red, 1)
+ tween.tween_property($Sprite, "scale", Vector2(), 1)
+ tween.tween_callback($Sprite.queue_free)
+ [/codeblock]
+ Another interesting use for [Tween]s is animating arbitrary set of objects:
+ [codeblock]
+ var tween = create_tween()
+ for sprite in get_children():
+ tween.tween_property(sprite, "position", Vector2(), 1)
+ [/codeblock]
+ In the example above, all children of a node are moved one after another to position (0, 0).
+ Some [Tweener]s use transitions and eases. The first accepts an [enum TransitionType] constant, and refers to the way the timing of the animation is handled (see [url=https://easings.net/]easings.net[/url] for some examples). The second accepts an [enum EaseType] constant, and controls where the [code]trans_type[/code] is applied to the interpolation (in the beginning, the end, or both). If you don't know which transition and easing to pick, you can try different [enum TransitionType] constants with [constant EASE_IN_OUT], and use the one that looks best.
[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]
+ [b]Note:[/b] All [Tween]s will automatically start by default. To prevent a [Tween] from autostarting, you can call [method stop] immediately after it was created.
</description>
<tutorials>
</tutorials>
<methods>
- <method name="follow_method">
- <return type="void">
+ <method name="bind_node">
+ <return type="Tween">
</return>
- <argument index="0" name="object" type="Object">
- </argument>
- <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="StringName">
- </argument>
- <argument index="5" name="duration" type="float">
- </argument>
- <argument index="6" name="trans_type" type="int" enum="Tween.TransitionType" default="0">
- </argument>
- <argument index="7" name="ease_type" type="int" enum="Tween.EaseType" default="2">
- </argument>
- <argument index="8" name="delay" type="float" default="0">
+ <argument index="0" name="node" type="Node">
</argument>
<description>
- Follows [code]method[/code] of [code]object[/code] and applies the returned value on [code]target_method[/code] of [code]target[/code], beginning from [code]initial_val[/code] for [code]duration[/code] seconds, [code]delay[/code] later. Methods are called with consecutive values.
- Use [enum TransitionType] for [code]trans_type[/code] and [enum EaseType] for [code]ease_type[/code] parameters. These values control the timing and direction of the interpolation. See the class description for more information.
+ Binds this [Tween] with the given [code]node[/code]. [Tween]s are processed directly by the [SceneTree], so they run independently of the animated nodes. When you bind a [Node] with the [Tween], the [Tween] will halt the animation when the object is not inside tree and the [Tween] will be automatically killed when the bound object is freed. Also [constant TWEEN_PAUSE_BOUND] will make the pausing behavior dependent on the bound node.
+ For a shorter way to create and bind a [Tween], you can use [method Node.create_tween].
</description>
</method>
- <method name="follow_property">
- <return type="void">
+ <method name="chain">
+ <return type="Tween">
</return>
- <argument index="0" name="object" type="Object">
- </argument>
- <argument index="1" name="property" type="NodePath">
- </argument>
- <argument index="2" name="initial_val" type="Variant">
- </argument>
- <argument index="3" name="target" type="Object">
- </argument>
- <argument index="4" name="target_property" type="NodePath">
- </argument>
- <argument index="5" name="duration" type="float">
- </argument>
- <argument index="6" name="trans_type" type="int" enum="Tween.TransitionType" default="0">
- </argument>
- <argument index="7" name="ease_type" type="int" enum="Tween.EaseType" default="2">
- </argument>
- <argument index="8" name="delay" type="float" default="0">
- </argument>
<description>
- Follows [code]property[/code] of [code]object[/code] and applies it on [code]target_property[/code] of [code]target[/code], beginning from [code]initial_val[/code] for [code]duration[/code] seconds, [code]delay[/code] seconds later.
- Use [enum TransitionType] for [code]trans_type[/code] and [enum EaseType] for [code]ease_type[/code] parameters. These values control the timing and direction of the interpolation. See the class description for more information.
+ Used to chain two [Tweener]s after [method set_parallel] is called with [code]true[/code].
+ [codeblock]
+ var tween = create_tween().set_parallel(true)
+ tween.tween_property(...)
+ tween.tween_property(...) #will run parallelly with above
+ tween.chain().tween_property(...) #will run after two above are finished
+ [/codeblock]
</description>
</method>
- <method name="get_runtime" qualifiers="const">
- <return type="float">
+ <method name="custom_step">
+ <return type="bool">
</return>
+ <argument index="0" name="delta" type="float">
+ </argument>
<description>
- Returns the total time needed for all tweens to end. If you have two tweens, one lasting 10 seconds and the other 20 seconds, it would return 20 seconds, as by that time all tweens would have finished.
+ Processes the [Tween] by given [code]delta[/code] value, in seconds. Mostly useful when the [Tween] is paused, for controlling it manually.
+ Returns [code]true[/code] if the [Tween] still has [Tweener]s that haven't finished.
+ [b]Note:[/b] The [Tween] will become invalid after finished, but you can call [method stop] after the step, to keep it and reset.
+ [b]Note:[/b] [method custom_step] will process only one step of the [Tween]. If the [code]delta[/code] is greater than the remaining time, the excessive time will not have any effect.
</description>
</method>
- <method name="interpolate_callback">
- <return type="void">
+ <method name="interpolate_value">
+ <return type="Variant">
</return>
- <argument index="0" name="object" type="Object">
- </argument>
- <argument index="1" name="duration" type="float">
+ <argument index="0" name="trans_type" type="Variant">
</argument>
- <argument index="2" name="callback" type="String">
+ <argument index="1" name="ease_type" type="Variant">
</argument>
- <argument index="3" name="arg1" type="Variant" default="null">
+ <argument index="2" name="elapsed_time" type="float">
</argument>
- <argument index="4" name="arg2" type="Variant" default="null">
+ <argument index="3" name="initial_value" type="float">
</argument>
- <argument index="5" name="arg3" type="Variant" default="null">
+ <argument index="4" name="delta_value" type="int" enum="Tween.TransitionType">
</argument>
- <argument index="6" name="arg4" type="Variant" default="null">
- </argument>
- <argument index="7" name="arg5" type="Variant" default="null">
+ <argument index="5" name="duration" type="int" enum="Tween.EaseType">
</argument>
<description>
- Calls [code]callback[/code] of [code]object[/code] after [code]duration[/code]. [code]arg1[/code]-[code]arg5[/code] are arguments to be passed to the callback.
+ This method can be used for manual interpolation of a value, when you don't want [Tween] to do animating for you. It's similar to [method @GlobalScope.lerp], but with support for custom transition and easing.
+ [code]elapsed_time[/code] is the time in seconds that passed after the interping started and it's used to control the position of the interpolation. E.g. when it's equal to half of the [code]duration[/code], the interpolated value will be halfway between initial and final values. This value can also be greater than [code]duration[/code] or lower than 0, which will extrapolate the value.
+ [code]initial_value[/code] is the starting value of the interpolation.
+ [code]delta_value[/code] is the change of the value in the interpolation, i.e. it's equal to [code]final_value - initial_value[/code].
+ [code]duration[/code] is the total time of the interpolation.
</description>
</method>
- <method name="interpolate_deferred_callback">
- <return type="void">
+ <method name="is_running">
+ <return type="bool">
</return>
- <argument index="0" name="object" type="Object">
- </argument>
- <argument index="1" name="duration" type="float">
- </argument>
- <argument index="2" name="callback" type="String">
- </argument>
- <argument index="3" name="arg1" type="Variant" default="null">
- </argument>
- <argument index="4" name="arg2" type="Variant" default="null">
- </argument>
- <argument index="5" name="arg3" type="Variant" default="null">
- </argument>
- <argument index="6" name="arg4" type="Variant" default="null">
- </argument>
- <argument index="7" name="arg5" type="Variant" default="null">
- </argument>
<description>
- Calls [code]callback[/code] of [code]object[/code] after [code]duration[/code] on the main thread (similar to [method Object.call_deferred]). [code]arg1[/code]-[code]arg5[/code] are arguments to be passed to the callback.
+ Returns whether the [Tween] is currently running, i.e. it wasn't paused and it's not finished.
</description>
</method>
- <method name="interpolate_method">
- <return type="void">
+ <method name="is_valid">
+ <return type="bool">
</return>
- <argument index="0" name="object" type="Object">
- </argument>
- <argument index="1" name="method" type="StringName">
- </argument>
- <argument index="2" name="initial_val" type="Variant">
- </argument>
- <argument index="3" name="final_val" type="Variant">
- </argument>
- <argument index="4" name="duration" type="float">
- </argument>
- <argument index="5" name="trans_type" type="int" enum="Tween.TransitionType" default="0">
- </argument>
- <argument index="6" name="ease_type" type="int" enum="Tween.EaseType" default="2">
- </argument>
- <argument index="7" name="delay" type="float" default="0">
- </argument>
<description>
- Animates [code]method[/code] of [code]object[/code] from [code]initial_val[/code] to [code]final_val[/code] for [code]duration[/code] seconds, [code]delay[/code] seconds later. Methods are called with consecutive values.
- Use [enum TransitionType] for [code]trans_type[/code] and [enum EaseType] for [code]ease_type[/code] parameters. These values control the timing and direction of the interpolation. See the class description for more information.
+ Returns whether the [Tween] is valid. A valid [Tween] is a [Tween] contained by the scene tree (i.e. the array from [method SceneTree.get_processed_tweens] will contain this [Tween]). [Tween] might become invalid when it has finished tweening or was killed, also when created with [code]Tween.new()[/code]. Invalid [Tween] can't have [Tweener]s appended, because it can't animate them. You can however still use [method interpolate_value].
</description>
</method>
- <method name="interpolate_property">
+ <method name="kill">
<return type="void">
</return>
- <argument index="0" name="object" type="Object">
- </argument>
- <argument index="1" name="property" type="NodePath">
- </argument>
- <argument index="2" name="initial_val" type="Variant">
- </argument>
- <argument index="3" name="final_val" type="Variant">
- </argument>
- <argument index="4" name="duration" type="float">
- </argument>
- <argument index="5" name="trans_type" type="int" enum="Tween.TransitionType" default="0">
- </argument>
- <argument index="6" name="ease_type" type="int" enum="Tween.EaseType" default="2">
- </argument>
- <argument index="7" name="delay" type="float" default="0">
- </argument>
<description>
- Animates [code]property[/code] of [code]object[/code] from [code]initial_val[/code] to [code]final_val[/code] for [code]duration[/code] seconds, [code]delay[/code] seconds later. Setting the initial value to [code]null[/code] uses the current value of the property.
- Use [enum TransitionType] for [code]trans_type[/code] and [enum EaseType] for [code]ease_type[/code] parameters. These values control the timing and direction of the interpolation. See the class description for more information.
+ Aborts all tweening operations and invalidates the [Tween].
</description>
</method>
- <method name="is_active" qualifiers="const">
- <return type="bool">
+ <method name="parallel">
+ <return type="Tween">
</return>
<description>
- Returns [code]true[/code] if any tweens are currently running.
- [b]Note:[/b] This method doesn't consider tweens that have ended.
+ Makes the next [Tweener] run parallely to the previous one. Example:
+ [codeblock]
+ var tween = create_tween()
+ tween.tween_property(...)
+ tween.parallel().tween_property(...)
+ tween.parallel().tween_property(...)
+ [/codeblock]
+ All [Tweener]s in the example will run at the same time.
+ You can make the [Tween] parallel by default by using [method set_parallel].
</description>
</method>
- <method name="remove">
+ <method name="pause">
<return type="void">
</return>
- <argument index="0" name="object" type="Object">
- </argument>
- <argument index="1" name="key" type="StringName" default="&quot;&quot;">
- </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.
+ Pauses the tweening. The animation can be resumed by using [method play].
</description>
</method>
- <method name="remove_all">
+ <method name="play">
<return type="void">
</return>
<description>
- Stops animation and removes all tweens.
+ Resumes a paused or stopped [Tween].
</description>
</method>
- <method name="reset">
- <return type="void">
+ <method name="set_ease">
+ <return type="Tween">
</return>
- <argument index="0" name="object" type="Object">
- </argument>
- <argument index="1" name="key" type="StringName" default="&quot;&quot;">
+ <argument index="0" name="ease" type="int" enum="Tween.EaseType">
</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.
+ Sets the default ease type for [PropertyTweener]s and [MethodTweener]s animated by this [Tween].
</description>
</method>
- <method name="reset_all">
- <return type="void">
+ <method name="set_loops">
+ <return type="Tween">
</return>
+ <argument index="0" name="loops" type="int" default="0">
+ </argument>
<description>
- Resets all tweens to their initial values (the ones given, not those before the tween).
+ Sets the number of times the tweening sequence will be repeated, i.e. [code]set_loops(2)[/code] will run the animation twice.
+ Calling this method without arguments will make the [Tween] run infinitely, until it is either killed by [method kill] or by freeing bound node, or all the animated objects have been freed (which makes further animation impossible).
</description>
</method>
- <method name="resume">
- <return type="void">
+ <method name="set_parallel">
+ <return type="Tween">
</return>
- <argument index="0" name="object" type="Object">
- </argument>
- <argument index="1" name="key" type="StringName" default="&quot;&quot;">
+ <argument index="0" name="parallel" type="bool" default="true">
</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.
+ If [code]parallel[/code] is [code]true[/code], the [Tweener]s appended after this method will by default run simultanously, as opposed to sequentially.
</description>
</method>
- <method name="resume_all">
- <return type="void">
+ <method name="set_pause_mode">
+ <return type="Tween">
</return>
+ <argument index="0" name="mode" type="int" enum="Tween.TweenPauseMode">
+ </argument>
<description>
- Continues animating all stopped tweens.
+ Determines the behavior of the [Tween] when the [SceneTree] is paused. Check [enum TweenPauseMode] for options.
+ Default value is [constant TWEEN_PAUSE_BOUND].
</description>
</method>
- <method name="seek">
- <return type="void">
+ <method name="set_process_mode">
+ <return type="Tween">
</return>
- <argument index="0" name="time" type="float">
+ <argument index="0" name="mode" type="int" enum="Tween.TweenProcessMode">
</argument>
<description>
- Sets the interpolation to the given [code]time[/code] in seconds.
+ Determines whether the [Tween] should run during idle frame (see [method Node._process]) or physics frame (see [method Node._physics_process].
+ Default value is [constant TWEEN_PROCESS_IDLE].
</description>
</method>
- <method name="set_active">
- <return type="void">
+ <method name="set_speed_scale">
+ <return type="Tween">
</return>
- <argument index="0" name="active" type="bool">
+ <argument index="0" name="speed" type="float">
</argument>
<description>
- Activates/deactivates the tween. See also [method stop_all] and [method resume_all].
+ Scales the speed of tweening. This affects all [Tweener]s and their delays.
</description>
</method>
- <method name="start">
- <return type="void">
+ <method name="set_trans">
+ <return type="Tween">
</return>
+ <argument index="0" name="trans" type="int" enum="Tween.TransitionType">
+ </argument>
<description>
- Starts the tween. You can define animations both before and after this.
+ Sets the default transition type for [PropertyTweener]s and [MethodTweener]s animated by this [Tween].
</description>
</method>
<method name="stop">
<return type="void">
</return>
- <argument index="0" name="object" type="Object">
- </argument>
- <argument index="1" name="key" type="StringName" default="&quot;&quot;">
- </argument>
<description>
- Stops a tween, given its object and property/method pair. By default, all tweens are stopped, unless [code]key[/code] is specified.
+ Stops the tweening and resets the [Tween] to its initial state. This will not remove any appended [Tweener]s.
</description>
</method>
- <method name="stop_all">
- <return type="void">
+ <method name="tween_callback">
+ <return type="CallbackTweener">
</return>
+ <argument index="0" name="callback" type="Callable">
+ </argument>
<description>
- Stops animating all tweens.
+ Creates and appends a [CallbackTweener]. This method can be used to call an arbitrary method in any object. Use [method Callable.bind] to bind additional arguments for the call.
+ Example: object that keeps shooting every 1 second.
+ [codeblock]
+ var tween = get_tree().create_tween().set_loops()
+ tween.tween_callback(shoot).set_delay(1)
+ [/codeblock]
+ Example: turning a sprite red and then blue, with 2 second delay.
+ [codeblock]
+ var tween = get_tree().create_tween()
+ tween.tween_callback($Sprite.set_modulate.bind(Color.red)).set_delay(2)
+ tween.tween_callback($Sprite.set_modulate.bind(Color.blue)).set_delay(2)
+ [/codeblock]
</description>
</method>
- <method name="targeting_method">
- <return type="void">
+ <method name="tween_interval">
+ <return type="IntervalTweener">
</return>
- <argument index="0" name="object" type="Object">
- </argument>
- <argument index="1" name="method" type="StringName">
- </argument>
- <argument index="2" name="initial" type="Object">
- </argument>
- <argument index="3" name="initial_method" type="StringName">
- </argument>
- <argument index="4" name="final_val" type="Variant">
+ <argument index="0" name="time" type="float">
</argument>
- <argument index="5" name="duration" type="float">
+ <description>
+ Creates and appends an [IntervalTweener]. This method can be used to create delays in the tween animation, as an alternative for using the delay in other [Tweener]s or when there's no animation (in which case the [Tween] acts as a timer). [code]time[/code] is the length of the interval, in seconds.
+ Example: creating an interval in code execution.
+ [codeblock]
+ #... some code
+ var tween = create_tween()
+ tween.tween_interval(2)
+ await tween.finished
+ #... more code
+ [/codeblock]
+ Example: creating an object that moves back and forth and jumps every few seconds.
+ [codeblock]
+ var tween = create_tween().set_loops()
+ tween.tween_property("position:x", 200, 1).as_relative()
+ tween.tween_callback(jump)
+ tween.tween_interval(2)
+ tween.tween_property("position:x", -200, 1).as_relative()
+ tween.tween_callback(jump)
+ tween.tween_interval(2)
+ [/codeblock]
+ </description>
+ </method>
+ <method name="tween_method">
+ <return type="MethodTweener">
+ </return>
+ <argument index="0" name="method" type="Callable">
</argument>
- <argument index="6" name="trans_type" type="int" enum="Tween.TransitionType" default="0">
+ <argument index="1" name="from" type="float">
</argument>
- <argument index="7" name="ease_type" type="int" enum="Tween.EaseType" default="2">
+ <argument index="2" name="to" type="float">
</argument>
- <argument index="8" name="delay" type="float" default="0">
+ <argument index="3" name="duration" type="float">
</argument>
<description>
- Animates [code]method[/code] of [code]object[/code] from the value returned by [code]initial_method[/code] to [code]final_val[/code] for [code]duration[/code] seconds, [code]delay[/code] seconds later. Methods are animated by calling them with consecutive values.
- Use [enum TransitionType] for [code]trans_type[/code] and [enum EaseType] for [code]ease_type[/code] parameters. These values control the timing and direction of the interpolation. See the class description for more information.
+ Creates and appends a [MethodTweener]. This method is similar to a combination of [method tween_callback] and [method tween_property]. It calls a method over time with a tweened value provided as an argument. The value is tweened between [code]from[/code] and [code]to[/code] over the time specified by [code]duration[/code], in seconds. Use [method Callable.bind] to bind additional arguments for the call. You can use [method MethodTweener.set_ease] and [method MethodTweener.set_trans] to tweak the easing and transition of the value or [method MethodTweener.set_delay] to delay the tweening.
+ Example: making a 3D object look from one point to another point.
+ [codeblock]
+ var tween = create_tween()
+ tween.tween_method(look_at.bind(Vector3.UP), Vector3(-1, 0, -1), Vector3(1, 0, -1), 1) #the look_at() method takes up vector as second argument
+ [/codeblock]
+ Example: setting a text of a [Label], using an intermediate method and after a delay.
+ [codeblock]
+ func _ready():
+ var tween = create_tween()
+ tween.tween_method(set_label_text, 0, 10, 1).set_delay(1)
+
+ func set_label_text(value: int):
+ $Label.text = "Counting " + str(value)
+ [/codeblock]
</description>
</method>
- <method name="targeting_property">
- <return type="void">
+ <method name="tween_property">
+ <return type="PropertyTweener">
</return>
<argument index="0" name="object" type="Object">
</argument>
<argument index="1" name="property" type="NodePath">
</argument>
- <argument index="2" name="initial" type="Object">
- </argument>
- <argument index="3" name="initial_val" type="NodePath">
- </argument>
- <argument index="4" name="final_val" type="Variant">
+ <argument index="2" name="final_val" type="Variant">
</argument>
- <argument index="5" name="duration" type="float">
+ <argument index="3" name="duration" type="float">
</argument>
- <argument index="6" name="trans_type" type="int" enum="Tween.TransitionType" default="0">
- </argument>
- <argument index="7" name="ease_type" type="int" enum="Tween.EaseType" default="2">
- </argument>
- <argument index="8" name="delay" type="float" default="0">
- </argument>
- <description>
- Animates [code]property[/code] of [code]object[/code] from the current value of the [code]initial_val[/code] property of [code]initial[/code] to [code]final_val[/code] for [code]duration[/code] seconds, [code]delay[/code] seconds later.
- Use [enum TransitionType] for [code]trans_type[/code] and [enum EaseType] for [code]ease_type[/code] parameters. These values control the timing and direction of the interpolation. See the class description for more information.
- </description>
- </method>
- <method name="tell" qualifiers="const">
- <return type="float">
- </return>
<description>
- Returns the current time of the tween.
+ Creates and appends a [PropertyTweener]. This method tweens a [code]property[/code] of an [code]object[/code] between an initial value and [code]final_val[/code] in a span of time equal to [code]duration[/code], in seconds. The initial value by default is a value at the time the tweening of the [PropertyTweener] start. For example:
+ [codeblock]
+ var tween = create_tween()
+ tween.tween_property($Sprite, "position", Vector2(100, 200)
+ tween.tween_property($Sprite, "position", Vector2(200, 300)
+ [/codeblock]
+ will move the sprite to position (100, 200) and then to (200, 300). If you use [method PropertyTweener.from] or [method PropertyTweener.from_current], the starting position will be overwritten by the given value instead. See other methods in [PropertyTweener] to see how the tweening can be tweaked further.
+ [b]Note:[/b] You can find the correct property name by hovering over the property in the Inspector. You can also provide the components of a property directly by using [code]"property:component"[/code] (eg. [code]position:x[/code]), where it would only apply to that particular component.
+ Example: moving object twice from the same position, with different transition types.
+ [codeblock]
+ var tween = create_tween()
+ tween.tween_property($Sprite, "position", Vector2.RIGHT * 300).as_relative().set_trans(Tween.TRANS_SINE)
+ tween.tween_property($Sprite, "position", Vector2.RIGHT * 300).as_relative().from_current().set_trans(Tween.TRANS_EXPO)
+ [/codeblock]
</description>
</method>
</methods>
- <members>
- <member name="playback_process_mode" type="int" setter="set_tween_process_mode" getter="get_tween_process_mode" enum="Tween.TweenProcessMode" default="1">
- The tween's animation process thread. See [enum TweenProcessMode].
- </member>
- <member name="playback_speed" type="float" setter="set_speed_scale" getter="get_speed_scale" default="1.0">
- The tween's speed multiplier. For example, set it to [code]1.0[/code] for normal speed, [code]2.0[/code] for two times normal speed, or [code]0.5[/code] for half of the normal speed. A value of [code]0[/code] pauses the animation, but see also [method set_active] or [method stop_all] for this.
- </member>
- <member name="repeat" type="bool" setter="set_repeat" getter="is_repeat" default="false">
- If [code]true[/code], the tween loops.
- </member>
- </members>
<signals>
- <signal name="tween_all_completed">
+ <signal name="finished">
<description>
- Emitted when all processes in a tween end.
+ Emitted when the [Tween] has finished all tweening. Never emitted when the [Tween] is set to infinite looping (see [method set_loops]).
+ [b]Note:[/b] The [Tween] is removed (invalidated) after this signal is emitted, but it doesn't happen immediately, but on the next processing frame. Calling [method stop] inside the signal callback will preserve the [Tween].
</description>
</signal>
- <signal name="tween_completed">
- <argument index="0" name="object" type="Object">
- </argument>
- <argument index="1" name="key" type="NodePath">
+ <signal name="loop_finished">
+ <argument index="0" name="loop_count" type="int">
</argument>
<description>
- Emitted when a tween ends.
+ Emitted when a full loop is complete (see [method set_loops]), providing the loop index. This signal is not emitted after final loop, use [signal finished] instead for this case.
</description>
</signal>
- <signal name="tween_started">
- <argument index="0" name="object" type="Object">
- </argument>
- <argument index="1" name="key" type="NodePath">
+ <signal name="step_finished">
+ <argument index="0" name="idx" type="int">
</argument>
<description>
- Emitted when a tween starts.
- </description>
- </signal>
- <signal name="tween_step">
- <argument index="0" name="object" type="Object">
- </argument>
- <argument index="1" name="key" type="NodePath">
- </argument>
- <argument index="2" name="elapsed" type="float">
- </argument>
- <argument index="3" name="value" type="Object">
- </argument>
- <description>
- Emitted at each step of the animation.
+ Emitted when one step of the [Tween] is complete, providing the step index. One step is either a single [Tweener] or a group of [Tweener]s running parallelly.
</description>
</signal>
</signals>
<constants>
<constant name="TWEEN_PROCESS_PHYSICS" value="0" enum="TweenProcessMode">
- The tween updates with the [code]_physics_process[/code] callback.
+ The [Tween] updates during physics frame.
</constant>
<constant name="TWEEN_PROCESS_IDLE" value="1" enum="TweenProcessMode">
- The tween updates with the [code]_process[/code] callback.
+ The [Tween] updates during idle
+ </constant>
+ <constant name="TWEEN_PAUSE_BOUND" value="0" enum="TweenPauseMode">
+ </constant>
+ <constant name="TWEEN_PAUSE_STOP" value="1" enum="TweenPauseMode">
+ </constant>
+ <constant name="TWEEN_PAUSE_PROCESS" value="2" enum="TweenPauseMode">
</constant>
<constant name="TRANS_LINEAR" value="0" enum="TransitionType">
- The animation is interpolated linearly.
</constant>
<constant name="TRANS_SINE" value="1" enum="TransitionType">
- The animation is interpolated using a sine function.
</constant>
<constant name="TRANS_QUINT" value="2" enum="TransitionType">
- The animation is interpolated with a quintic (to the power of 5) function.
</constant>
<constant name="TRANS_QUART" value="3" enum="TransitionType">
- The animation is interpolated with a quartic (to the power of 4) function.
</constant>
<constant name="TRANS_QUAD" value="4" enum="TransitionType">
- The animation is interpolated with a quadratic (to the power of 2) function.
</constant>
<constant name="TRANS_EXPO" value="5" enum="TransitionType">
- The animation is interpolated with an exponential (to the power of x) function.
</constant>
<constant name="TRANS_ELASTIC" value="6" enum="TransitionType">
- The animation is interpolated with elasticity, wiggling around the edges.
</constant>
<constant name="TRANS_CUBIC" value="7" enum="TransitionType">
- The animation is interpolated with a cubic (to the power of 3) function.
</constant>
<constant name="TRANS_CIRC" value="8" enum="TransitionType">
- The animation is interpolated with a function using square roots.
</constant>
<constant name="TRANS_BOUNCE" value="9" enum="TransitionType">
- The animation is interpolated by bouncing at the end.
</constant>
<constant name="TRANS_BACK" value="10" enum="TransitionType">
- The animation is interpolated backing out at ends.
</constant>
<constant name="EASE_IN" value="0" enum="EaseType">
- The interpolation starts slowly and speeds up towards the end.
</constant>
<constant name="EASE_OUT" value="1" enum="EaseType">
- The interpolation starts quickly and slows down towards the end.
</constant>
<constant name="EASE_IN_OUT" value="2" enum="EaseType">
- A combination of [constant EASE_IN] and [constant EASE_OUT]. The interpolation is slowest at both ends.
</constant>
<constant name="EASE_OUT_IN" value="3" enum="EaseType">
- A combination of [constant EASE_IN] and [constant EASE_OUT]. The interpolation is fastest at both ends.
</constant>
</constants>
</class>
diff --git a/doc/classes/Tweener.xml b/doc/classes/Tweener.xml
new file mode 100644
index 0000000000..5cd502ced9
--- /dev/null
+++ b/doc/classes/Tweener.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Tweener" inherits="RefCounted" version="4.0">
+ <brief_description>
+ Abstract class for all Tweeners used by [Tween].
+ </brief_description>
+ <description>
+ Tweeners are objects that perform a specific animating task, e.g. interpolating a property or calling a method at a given time. A [Tweener] can't be created manually, you need to use a dedicated method from [Tween] or [Node].
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <signals>
+ <signal name="finished">
+ <description>
+ Emited when the [Tweener] has just finished its job.
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/UDPServer.xml b/doc/classes/UDPServer.xml
index 6f3ccb8a17..5e2906450c 100644
--- a/doc/classes/UDPServer.xml
+++ b/doc/classes/UDPServer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="UDPServer" inherits="Reference" version="4.0">
+<class name="UDPServer" inherits="RefCounted" version="4.0">
<brief_description>
Helper class to implement a UDP server.
</brief_description>
diff --git a/doc/classes/Variant.xml b/doc/classes/Variant.xml
index 775bd58bcf..240c1c909f 100644
--- a/doc/classes/Variant.xml
+++ b/doc/classes/Variant.xml
@@ -5,20 +5,30 @@
</brief_description>
<description>
In computer programming, a Variant class is a class that is designed to store a variety of other types. Dynamic programming languages like PHP, Lua, JavaScript and GDScript like to use them to store variables' data on the backend. With these Variants, properties are able to change value types freely.
- [codeblock]
+ [codeblocks]
+ [gdscript]
var foo = 2 # foo is dynamically an integer
foo = "Now foo is a string!"
- foo = Reference.new() # foo is an Object
+ foo = RefCounted.new() # foo is an Object
var bar: int = 2 # bar is a statically typed integer.
# bar = "Uh oh! I can't make static variables become a different type!"
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ // ... but C# is statically typed. Once a variable has a type it cannot be changed. However you can use the var keyword in methods to let the compiler decide the type automatically.
+ var foo = 2; // Foo is a 32-bit integer (int). Be cautious, integers in GDScript are 64-bit and the direct C# equivalent is "long".
+ // foo = "foo was and will always be an integer. It cannot be turned into a string!";
+ var boo = "Boo is a string!";
+ var ref = new Reference(); // var is especially useful when used together with a constructor.
+ [/csharp]
+ [/codeblocks]
Godot tracks all scripting API variables within Variants. Without even realizing it, you use Variants all the time. When a particular language enforces its own rules for keeping data typed, then that language is applying its own custom logic over the base Variant scripting API.
- GDScript automatically wrap values in them. It keeps all data in plain Variants by default and then optionally enforces custom static typing rules on variable types.
- VisualScript tracks properties inside Variants as well, but it also uses static typing. The GUI interface enforces that properties have a particular type that doesn't change over time.
- C# is statically typed, but uses the Mono [code]object[/code] type in place of Godot's Variant class when it needs to represent a dynamic value. [code]object[/code] is the Mono runtime's equivalent of the same concept.
- The statically-typed language NativeScript C++ does not define a built-in Variant-like class. Godot's GDNative bindings provide their own godot::Variant class for users; Any point at which the C++ code starts interacting with the Godot runtime is a place where you might have to start wrapping data inside Variant objects.
The global [method @GlobalScope.typeof] function returns the enumerated value of the Variant type stored in the current variable (see [enum Variant.Type]).
- [codeblock]
+ [codeblocks]
+ [gdscript]
var foo = 2
match typeof(foo):
TYPE_NIL:
@@ -32,7 +42,19 @@
# Note also that there is not yet any way to get a script's `class_name` string easily.
# To fetch that value, you need to dig deeply into a hidden ProjectSettings setting: an Array of Dictionaries called "_global_script_classes".
# Open your project.godot file to see it up close.
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ int foo = 2;
+ if (foo == null)
+ {
+ GD.Print("foo is null");
+ }
+ if (foo is int)
+ {
+ GD.Print("foo is an integer");
+ }
+ [/csharp]
+ [/codeblocks]
A Variant takes up only 20 bytes and can store almost any engine datatype inside of it. Variants are rarely used to hold information for long periods of time. Instead, they are used mainly for communication, editing, serialization and moving data around.
Godot has specifically invested in making its Variant class as flexible as possible; so much so that it is used for a multitude of operations to facilitate communication between all of Godot's systems.
A Variant:
diff --git a/doc/classes/Vector2.xml b/doc/classes/Vector2.xml
index 94d4b1a903..07d09c31dc 100644
--- a/doc/classes/Vector2.xml
+++ b/doc/classes/Vector2.xml
@@ -110,13 +110,15 @@
Returns the vector with all components rounded up (towards positive infinity).
</description>
</method>
- <method name="clamped" qualifiers="const">
+ <method name="clamp" qualifiers="const">
<return type="Vector2">
</return>
- <argument index="0" name="length" type="float">
+ <argument index="0" name="min" type="Vector2">
+ </argument>
+ <argument index="1" name="max" type="Vector2">
</argument>
<description>
- Returns the vector with a maximum length by limiting its length to [code]length[/code].
+ Returns a new vector with all components clamped between the components of [code]min[/code] and [code]max[/code], by running [method @GlobalScope.clamp] on each component.
</description>
</method>
<method name="cross" qualifiers="const">
@@ -232,6 +234,15 @@
Returns the result of the linear interpolation between this vector and [code]to[/code] by amount [code]weight[/code]. [code]weight[/code] is on the range of 0.0 to 1.0, representing the amount of interpolation.
</description>
</method>
+ <method name="limit_length" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="length" type="float" default="1.0">
+ </argument>
+ <description>
+ Returns the vector with a maximum length by limiting its length to [code]length[/code].
+ </description>
+ </method>
<method name="move_toward" qualifiers="const">
<return type="Vector2">
</return>
@@ -502,25 +513,25 @@
<constant name="AXIS_Y" value="1">
Enumerated value for the Y axis.
</constant>
- <constant name="ZERO" value="Vector2( 0, 0 )">
+ <constant name="ZERO" value="Vector2(0, 0)">
Zero vector, a vector with all components set to [code]0[/code].
</constant>
- <constant name="ONE" value="Vector2( 1, 1 )">
+ <constant name="ONE" value="Vector2(1, 1)">
One vector, a vector with all components set to [code]1[/code].
</constant>
- <constant name="INF" value="Vector2( inf, inf )">
+ <constant name="INF" value="Vector2(inf, inf)">
Infinity vector, a vector with all components set to [constant @GDScript.INF].
</constant>
- <constant name="LEFT" value="Vector2( -1, 0 )">
+ <constant name="LEFT" value="Vector2(-1, 0)">
Left unit vector. Represents the direction of left.
</constant>
- <constant name="RIGHT" value="Vector2( 1, 0 )">
+ <constant name="RIGHT" value="Vector2(1, 0)">
Right unit vector. Represents the direction of right.
</constant>
- <constant name="UP" value="Vector2( 0, -1 )">
+ <constant name="UP" value="Vector2(0, -1)">
Up unit vector. Y is down in 2D, so this vector points -Y.
</constant>
- <constant name="DOWN" value="Vector2( 0, 1 )">
+ <constant name="DOWN" value="Vector2(0, 1)">
Down unit vector. Y is down in 2D, so this vector points +Y.
</constant>
</constants>
diff --git a/doc/classes/Vector2i.xml b/doc/classes/Vector2i.xml
index b38b968ba3..930ec944ba 100644
--- a/doc/classes/Vector2i.xml
+++ b/doc/classes/Vector2i.xml
@@ -64,6 +64,17 @@
Returns the ratio of [member x] to [member y].
</description>
</method>
+ <method name="clamp" qualifiers="const">
+ <return type="Vector2i">
+ </return>
+ <argument index="0" name="min" type="Vector2i">
+ </argument>
+ <argument index="1" name="max" type="Vector2i">
+ </argument>
+ <description>
+ Returns a new vector with all components clamped between the components of [code]min[/code] and [code]max[/code], by running [method @GlobalScope.clamp] on each component.
+ </description>
+ </method>
<method name="operator !=" qualifiers="operator">
<return type="bool">
</return>
@@ -235,22 +246,22 @@
<constant name="AXIS_Y" value="1">
Enumerated value for the Y axis.
</constant>
- <constant name="ZERO" value="Vector2i( 0, 0 )">
+ <constant name="ZERO" value="Vector2i(0, 0)">
Zero vector, a vector with all components set to [code]0[/code].
</constant>
- <constant name="ONE" value="Vector2i( 1, 1 )">
+ <constant name="ONE" value="Vector2i(1, 1)">
One vector, a vector with all components set to [code]1[/code].
</constant>
- <constant name="LEFT" value="Vector2i( -1, 0 )">
+ <constant name="LEFT" value="Vector2i(-1, 0)">
Left unit vector. Represents the direction of left.
</constant>
- <constant name="RIGHT" value="Vector2i( 1, 0 )">
+ <constant name="RIGHT" value="Vector2i(1, 0)">
Right unit vector. Represents the direction of right.
</constant>
- <constant name="UP" value="Vector2i( 0, -1 )">
+ <constant name="UP" value="Vector2i(0, -1)">
Up unit vector. Y is down in 2D, so this vector points -Y.
</constant>
- <constant name="DOWN" value="Vector2i( 0, 1 )">
+ <constant name="DOWN" value="Vector2i(0, 1)">
Down unit vector. Y is down in 2D, so this vector points +Y.
</constant>
</constants>
diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml
index 0a86369506..eb1fd5f098 100644
--- a/doc/classes/Vector3.xml
+++ b/doc/classes/Vector3.xml
@@ -87,6 +87,17 @@
Returns a new vector with all components rounded up (towards positive infinity).
</description>
</method>
+ <method name="clamp" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <argument index="0" name="min" type="Vector3">
+ </argument>
+ <argument index="1" name="max" type="Vector3">
+ </argument>
+ <description>
+ Returns a new vector with all components clamped between the components of [code]min[/code] and [code]max[/code], by running [method @GlobalScope.clamp] on each component.
+ </description>
+ </method>
<method name="cross" qualifiers="const">
<return type="Vector3">
</return>
@@ -162,7 +173,7 @@
<return type="Vector3">
</return>
<description>
- Returns the inverse of the vector. This is the same as [code]Vector3( 1.0 / v.x, 1.0 / v.y, 1.0 / v.z )[/code].
+ Returns the inverse of the vector. This is the same as [code]Vector3(1.0 / v.x, 1.0 / v.y, 1.0 / v.z)[/code].
</description>
</method>
<method name="is_equal_approx" qualifiers="const">
@@ -207,6 +218,15 @@
Returns the result of the linear interpolation between this vector and [code]to[/code] by amount [code]weight[/code]. [code]weight[/code] is on the range of 0.0 to 1.0, representing the amount of interpolation.
</description>
</method>
+ <method name="limit_length" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <argument index="0" name="length" type="float" default="1.0">
+ </argument>
+ <description>
+ Returns the vector with a maximum length by limiting its length to [code]length[/code].
+ </description>
+ </method>
<method name="max_axis" qualifiers="const">
<return type="int">
</return>
@@ -266,7 +286,7 @@
<method name="operator *" qualifiers="operator">
<return type="Vector3">
</return>
- <argument index="0" name="right" type="Quat">
+ <argument index="0" name="right" type="Quaternion">
</argument>
<description>
</description>
@@ -274,7 +294,7 @@
<method name="operator *" qualifiers="operator">
<return type="Vector3">
</return>
- <argument index="0" name="right" type="Transform">
+ <argument index="0" name="right" type="Transform3D">
</argument>
<description>
</description>
@@ -536,31 +556,31 @@
<constant name="AXIS_Z" value="2">
Enumerated value for the Z axis. Returned by [method max_axis] and [method min_axis].
</constant>
- <constant name="ZERO" value="Vector3( 0, 0, 0 )">
+ <constant name="ZERO" value="Vector3(0, 0, 0)">
Zero vector, a vector with all components set to [code]0[/code].
</constant>
- <constant name="ONE" value="Vector3( 1, 1, 1 )">
+ <constant name="ONE" value="Vector3(1, 1, 1)">
One vector, a vector with all components set to [code]1[/code].
</constant>
- <constant name="INF" value="Vector3( inf, inf, inf )">
+ <constant name="INF" value="Vector3(inf, inf, inf)">
Infinity vector, a vector with all components set to [constant @GDScript.INF].
</constant>
- <constant name="LEFT" value="Vector3( -1, 0, 0 )">
+ <constant name="LEFT" value="Vector3(-1, 0, 0)">
Left unit vector. Represents the local direction of left, and the global direction of west.
</constant>
- <constant name="RIGHT" value="Vector3( 1, 0, 0 )">
+ <constant name="RIGHT" value="Vector3(1, 0, 0)">
Right unit vector. Represents the local direction of right, and the global direction of east.
</constant>
- <constant name="UP" value="Vector3( 0, 1, 0 )">
+ <constant name="UP" value="Vector3(0, 1, 0)">
Up unit vector.
</constant>
- <constant name="DOWN" value="Vector3( 0, -1, 0 )">
+ <constant name="DOWN" value="Vector3(0, -1, 0)">
Down unit vector.
</constant>
- <constant name="FORWARD" value="Vector3( 0, 0, -1 )">
+ <constant name="FORWARD" value="Vector3(0, 0, -1)">
Forward unit vector. Represents the local direction of forward, and the global direction of north.
</constant>
- <constant name="BACK" value="Vector3( 0, 0, 1 )">
+ <constant name="BACK" value="Vector3(0, 0, 1)">
Back unit vector. Represents the local direction of back, and the global direction of south.
</constant>
</constants>
diff --git a/doc/classes/Vector3i.xml b/doc/classes/Vector3i.xml
index ea5945f5b7..8b45a62afa 100644
--- a/doc/classes/Vector3i.xml
+++ b/doc/classes/Vector3i.xml
@@ -58,6 +58,17 @@
<description>
</description>
</method>
+ <method name="clamp" qualifiers="const">
+ <return type="Vector3i">
+ </return>
+ <argument index="0" name="min" type="Vector3i">
+ </argument>
+ <argument index="1" name="max" type="Vector3i">
+ </argument>
+ <description>
+ Returns a new vector with all components clamped between the components of [code]min[/code] and [code]max[/code], by running [method @GlobalScope.clamp] on each component.
+ </description>
+ </method>
<method name="max_axis" qualifiers="const">
<return type="int">
</return>
@@ -249,28 +260,28 @@
<constant name="AXIS_Z" value="2">
Enumerated value for the Z axis.
</constant>
- <constant name="ZERO" value="Vector3i( 0, 0, 0 )">
+ <constant name="ZERO" value="Vector3i(0, 0, 0)">
Zero vector, a vector with all components set to [code]0[/code].
</constant>
- <constant name="ONE" value="Vector3i( 1, 1, 1 )">
+ <constant name="ONE" value="Vector3i(1, 1, 1)">
One vector, a vector with all components set to [code]1[/code].
</constant>
- <constant name="LEFT" value="Vector3i( -1, 0, 0 )">
+ <constant name="LEFT" value="Vector3i(-1, 0, 0)">
Left unit vector. Represents the local direction of left, and the global direction of west.
</constant>
- <constant name="RIGHT" value="Vector3i( 1, 0, 0 )">
+ <constant name="RIGHT" value="Vector3i(1, 0, 0)">
Right unit vector. Represents the local direction of right, and the global direction of east.
</constant>
- <constant name="UP" value="Vector3i( 0, 1, 0 )">
+ <constant name="UP" value="Vector3i(0, 1, 0)">
Up unit vector.
</constant>
- <constant name="DOWN" value="Vector3i( 0, -1, 0 )">
+ <constant name="DOWN" value="Vector3i(0, -1, 0)">
Down unit vector.
</constant>
- <constant name="FORWARD" value="Vector3i( 0, 0, -1 )">
+ <constant name="FORWARD" value="Vector3i(0, 0, -1)">
Forward unit vector. Represents the local direction of forward, and the global direction of north.
</constant>
- <constant name="BACK" value="Vector3i( 0, 0, 1 )">
+ <constant name="BACK" value="Vector3i(0, 0, 1)">
Back unit vector. Represents the local direction of back, and the global direction of south.
</constant>
</constants>
diff --git a/doc/classes/VelocityTracker3D.xml b/doc/classes/VelocityTracker3D.xml
index 98f7533c76..2d5e3a4d30 100644
--- a/doc/classes/VelocityTracker3D.xml
+++ b/doc/classes/VelocityTracker3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VelocityTracker3D" inherits="Reference" version="4.0">
+<class name="VelocityTracker3D" inherits="RefCounted" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/VideoPlayer.xml b/doc/classes/VideoPlayer.xml
index d905ce4054..12558ebbbc 100644
--- a/doc/classes/VideoPlayer.xml
+++ b/doc/classes/VideoPlayer.xml
@@ -60,7 +60,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="StringName" setter="set_bus" getter="get_bus" default="@&quot;Master&quot;">
+ <member name="bus" type="StringName" setter="set_bus" getter="get_bus" default="&amp;&quot;Master&quot;">
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 1c33274cb0..292be34a0d 100644
--- a/doc/classes/Viewport.xml
+++ b/doc/classes/Viewport.xml
@@ -81,10 +81,16 @@
<description>
Returns the viewport's texture.
[b]Note:[/b] Due to the way OpenGL works, the resulting [ViewportTexture] is flipped vertically. You can use [method Image.flip_y] on the result of [method Texture2D.get_image] to flip it back, for example:
- [codeblock]
+ [codeblocks]
+ [gdscript]
var img = get_viewport().get_texture().get_image()
img.flip_y()
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ Image img = GetViewport().GetTexture().GetImage();
+ img.FlipY();
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="get_viewport_rid" qualifiers="const">
@@ -105,7 +111,7 @@
<return type="Variant">
</return>
<description>
- Returns the drag data from the GUI, that was previously returned by [method Control.get_drag_data].
+ Returns the drag data from the GUI, that was previously returned by [method Control._get_drag_data].
</description>
</method>
<method name="gui_is_dragging" qualifiers="const">
@@ -173,13 +179,6 @@
<description>
</description>
</method>
- <method name="update_worlds">
- <return type="void">
- </return>
- <description>
- Forces update of the 2D and 3D worlds.
- </description>
- </method>
<method name="warp_mouse">
<return type="void">
</return>
@@ -382,14 +381,14 @@
</constant>
<constant name="DEBUG_DRAW_NORMAL_BUFFER" value="5" enum="DebugDraw">
</constant>
- <constant name="DEBUG_DRAW_GI_PROBE_ALBEDO" value="6" enum="DebugDraw">
- Objects are displayed with only the albedo value from [GIProbe]s.
+ <constant name="DEBUG_DRAW_VOXEL_GI_ALBEDO" value="6" enum="DebugDraw">
+ Objects are displayed with only the albedo value from [VoxelGI]s.
</constant>
- <constant name="DEBUG_DRAW_GI_PROBE_LIGHTING" value="7" enum="DebugDraw">
- Objects are displayed with only the lighting value from [GIProbe]s.
+ <constant name="DEBUG_DRAW_VOXEL_GI_LIGHTING" value="7" enum="DebugDraw">
+ Objects are displayed with only the lighting value from [VoxelGI]s.
</constant>
- <constant name="DEBUG_DRAW_GI_PROBE_EMISSION" value="8" enum="DebugDraw">
- Objects are displayed with only the emission color from [GIProbe]s.
+ <constant name="DEBUG_DRAW_VOXEL_GI_EMISSION" value="8" enum="DebugDraw">
+ Objects are displayed with only the emission color from [VoxelGI]s.
</constant>
<constant name="DEBUG_DRAW_SHADOW_ATLAS" value="9" enum="DebugDraw">
Draws the shadow atlas that stores shadows from [OmniLight3D]s and [SpotLight3D]s in the upper left quadrant of the [Viewport].
diff --git a/doc/classes/VisibilityEnabler2D.xml b/doc/classes/VisibilityEnabler2D.xml
deleted file mode 100644
index 02fe7a7cd0..0000000000
--- a/doc/classes/VisibilityEnabler2D.xml
+++ /dev/null
@@ -1,79 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisibilityEnabler2D" inherits="VisibilityNotifier2D" version="4.0">
- <brief_description>
- Enables certain nodes only when approximately visible.
- </brief_description>
- <description>
- The VisibilityEnabler2D will disable [RigidBody2D], [AnimationPlayer], and other nodes when they are not visible. It will only affect nodes with the same root node as the VisibilityEnabler2D, and the root node itself.
- If you just want to receive notifications, use [VisibilityNotifier2D] instead.
- [b]Note:[/b] For performance reasons, VisibilityEnabler2D uses an approximate heuristic with precision determined by [member ProjectSettings.world/2d/cell_size]. If you need precise visibility checking, use another method such as adding an [Area2D] node as a child of a [Camera2D] node.
- [b]Note:[/b] VisibilityEnabler2D will not affect nodes added after scene initialization.
- </description>
- <tutorials>
- </tutorials>
- <methods>
- <method name="is_enabler_enabled" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="enabler" type="int" enum="VisibilityEnabler2D.Enabler">
- </argument>
- <description>
- Returns whether the enabler identified by given [enum Enabler] constant is active.
- </description>
- </method>
- <method name="set_enabler">
- <return type="void">
- </return>
- <argument index="0" name="enabler" type="int" enum="VisibilityEnabler2D.Enabler">
- </argument>
- <argument index="1" name="enabled" type="bool">
- </argument>
- <description>
- Sets active state of the enabler identified by given [enum Enabler] constant.
- </description>
- </method>
- </methods>
- <members>
- <member name="freeze_bodies" type="bool" setter="set_enabler" getter="is_enabler_enabled" default="true">
- If [code]true[/code], [RigidBody2D] nodes will be paused.
- </member>
- <member name="pause_animated_sprites" type="bool" setter="set_enabler" getter="is_enabler_enabled" default="true">
- If [code]true[/code], [AnimatedSprite2D] nodes will be paused.
- </member>
- <member name="pause_animations" type="bool" setter="set_enabler" getter="is_enabler_enabled" default="true">
- If [code]true[/code], [AnimationPlayer] nodes will be paused.
- </member>
- <member name="pause_particles" type="bool" setter="set_enabler" getter="is_enabler_enabled" default="true">
- If [code]true[/code], [GPUParticles2D] nodes will be paused.
- </member>
- <member name="physics_process_parent" type="bool" setter="set_enabler" getter="is_enabler_enabled" default="false">
- If [code]true[/code], the parent's [method Node._physics_process] will be stopped.
- </member>
- <member name="process_parent" type="bool" setter="set_enabler" getter="is_enabler_enabled" default="false">
- If [code]true[/code], the parent's [method Node._process] will be stopped.
- </member>
- </members>
- <constants>
- <constant name="ENABLER_PAUSE_ANIMATIONS" value="0" enum="Enabler">
- This enabler will pause [AnimationPlayer] nodes.
- </constant>
- <constant name="ENABLER_FREEZE_BODIES" value="1" enum="Enabler">
- This enabler will freeze [RigidBody2D] nodes.
- </constant>
- <constant name="ENABLER_PAUSE_PARTICLES" value="2" enum="Enabler">
- This enabler will stop [GPUParticles2D] nodes.
- </constant>
- <constant name="ENABLER_PARENT_PROCESS" value="3" enum="Enabler">
- This enabler will stop the parent's _process function.
- </constant>
- <constant name="ENABLER_PARENT_PHYSICS_PROCESS" value="4" enum="Enabler">
- This enabler will stop the parent's _physics_process function.
- </constant>
- <constant name="ENABLER_PAUSE_ANIMATED_SPRITES" value="5" enum="Enabler">
- This enabler will stop [AnimatedSprite2D] nodes animations.
- </constant>
- <constant name="ENABLER_MAX" value="6" enum="Enabler">
- Represents the size of the [enum Enabler] enum.
- </constant>
- </constants>
-</class>
diff --git a/doc/classes/VisibilityEnabler3D.xml b/doc/classes/VisibilityEnabler3D.xml
deleted file mode 100644
index d78ebb55f2..0000000000
--- a/doc/classes/VisibilityEnabler3D.xml
+++ /dev/null
@@ -1,55 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisibilityEnabler3D" inherits="VisibilityNotifier3D" version="4.0">
- <brief_description>
- Enables certain nodes only when approximately visible.
- </brief_description>
- <description>
- The VisibilityEnabler3D will disable [RigidBody3D] and [AnimationPlayer] nodes when they are not visible. It will only affect other nodes within the same scene as the VisibilityEnabler3D itself.
- If you just want to receive notifications, use [VisibilityNotifier3D] instead.
- [b]Note:[/b] VisibilityEnabler3D uses an approximate heuristic for performance reasons. It doesn't take walls and other occlusion into account. The heuristic is an implementation detail and may change in future versions. If you need precise visibility checking, use another method such as adding an [Area3D] node as a child of a [Camera3D] node and/or [method Vector3.dot].
- [b]Note:[/b] VisibilityEnabler3D will not affect nodes added after scene initialization.
- </description>
- <tutorials>
- </tutorials>
- <methods>
- <method name="is_enabler_enabled" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="enabler" type="int" enum="VisibilityEnabler3D.Enabler">
- </argument>
- <description>
- Returns whether the enabler identified by given [enum Enabler] constant is active.
- </description>
- </method>
- <method name="set_enabler">
- <return type="void">
- </return>
- <argument index="0" name="enabler" type="int" enum="VisibilityEnabler3D.Enabler">
- </argument>
- <argument index="1" name="enabled" type="bool">
- </argument>
- <description>
- Sets active state of the enabler identified by given [enum Enabler] constant.
- </description>
- </method>
- </methods>
- <members>
- <member name="freeze_bodies" type="bool" setter="set_enabler" getter="is_enabler_enabled" default="true">
- If [code]true[/code], [RigidBody3D] nodes will be paused.
- </member>
- <member name="pause_animations" type="bool" setter="set_enabler" getter="is_enabler_enabled" default="true">
- If [code]true[/code], [AnimationPlayer] nodes will be paused.
- </member>
- </members>
- <constants>
- <constant name="ENABLER_PAUSE_ANIMATIONS" value="0" enum="Enabler">
- This enabler will pause [AnimationPlayer] nodes.
- </constant>
- <constant name="ENABLER_FREEZE_BODIES" value="1" enum="Enabler">
- This enabler will freeze [RigidBody3D] nodes.
- </constant>
- <constant name="ENABLER_MAX" value="2" enum="Enabler">
- Represents the size of the [enum Enabler] enum.
- </constant>
- </constants>
-</class>
diff --git a/doc/classes/VisibilityNotifier2D.xml b/doc/classes/VisibilityNotifier2D.xml
deleted file mode 100644
index 761438b77e..0000000000
--- a/doc/classes/VisibilityNotifier2D.xml
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisibilityNotifier2D" inherits="Node2D" version="4.0">
- <brief_description>
- Detects approximately when the node is visible on screen.
- </brief_description>
- <description>
- The VisibilityNotifier2D detects when it is visible on the screen. It also notifies when its bounding rectangle enters or exits the screen or a viewport.
- If you want nodes to be disabled automatically when they exit the screen, use [VisibilityEnabler2D] instead.
- [b]Note:[/b] For performance reasons, VisibilityNotifier2D uses an approximate heuristic with precision determined by [member ProjectSettings.world/2d/cell_size]. If you need precise visibility checking, use another method such as adding an [Area2D] node as a child of a [Camera2D] node.
- </description>
- <tutorials>
- <link title="2D Dodge The Creeps Demo">https://godotengine.org/asset-library/asset/515</link>
- </tutorials>
- <methods>
- <method name="is_on_screen" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- If [code]true[/code], the bounding rectangle is on the screen.
- [b]Note:[/b] It takes one frame for the node's visibility to be assessed once added to the scene tree, so this method will return [code]false[/code] right after it is instantiated, even if it will be on screen in the draw pass.
- </description>
- </method>
- </methods>
- <members>
- <member name="rect" type="Rect2" setter="set_rect" getter="get_rect" default="Rect2( -10, -10, 20, 20 )">
- The VisibilityNotifier2D's bounding rectangle.
- </member>
- </members>
- <signals>
- <signal name="screen_entered">
- <description>
- Emitted when the VisibilityNotifier2D enters the screen.
- </description>
- </signal>
- <signal name="screen_exited">
- <description>
- Emitted when the VisibilityNotifier2D exits the screen.
- </description>
- </signal>
- <signal name="viewport_entered">
- <argument index="0" name="viewport" type="Viewport">
- </argument>
- <description>
- Emitted when the VisibilityNotifier2D enters a [Viewport]'s view.
- </description>
- </signal>
- <signal name="viewport_exited">
- <argument index="0" name="viewport" type="Viewport">
- </argument>
- <description>
- Emitted when the VisibilityNotifier2D exits a [Viewport]'s view.
- </description>
- </signal>
- </signals>
- <constants>
- </constants>
-</class>
diff --git a/doc/classes/VisibilityNotifier3D.xml b/doc/classes/VisibilityNotifier3D.xml
deleted file mode 100644
index e5d3116612..0000000000
--- a/doc/classes/VisibilityNotifier3D.xml
+++ /dev/null
@@ -1,56 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisibilityNotifier3D" inherits="Node3D" version="4.0">
- <brief_description>
- Detects approximately when the node is visible on screen.
- </brief_description>
- <description>
- The VisibilityNotifier3D detects when it is visible on the screen. It also notifies when its bounding rectangle enters or exits the screen or a [Camera3D]'s view.
- If you want nodes to be disabled automatically when they exit the screen, use [VisibilityEnabler3D] instead.
- [b]Note:[/b] VisibilityNotifier3D uses an approximate heuristic for performance reasons. It doesn't take walls and other occlusion into account. The heuristic is an implementation detail and may change in future versions. If you need precise visibility checking, use another method such as adding an [Area3D] node as a child of a [Camera3D] node and/or [method Vector3.dot].
- </description>
- <tutorials>
- </tutorials>
- <methods>
- <method name="is_on_screen" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- If [code]true[/code], the bounding box is on the screen.
- [b]Note:[/b] It takes one frame for the node's visibility to be assessed once added to the scene tree, so this method will return [code]false[/code] right after it is instantiated, even if it will be on screen in the draw pass.
- </description>
- </method>
- </methods>
- <members>
- <member name="aabb" type="AABB" setter="set_aabb" getter="get_aabb" default="AABB( -1, -1, -1, 2, 2, 2 )">
- The VisibilityNotifier3D's bounding box.
- </member>
- </members>
- <signals>
- <signal name="camera_entered">
- <argument index="0" name="camera" type="Camera3D">
- </argument>
- <description>
- Emitted when the VisibilityNotifier3D enters a [Camera3D]'s view.
- </description>
- </signal>
- <signal name="camera_exited">
- <argument index="0" name="camera" type="Camera3D">
- </argument>
- <description>
- Emitted when the VisibilityNotifier3D exits a [Camera3D]'s view.
- </description>
- </signal>
- <signal name="screen_entered">
- <description>
- Emitted when the VisibilityNotifier3D enters the screen.
- </description>
- </signal>
- <signal name="screen_exited">
- <description>
- Emitted when the VisibilityNotifier3D exits the screen.
- </description>
- </signal>
- </signals>
- <constants>
- </constants>
-</class>
diff --git a/doc/classes/VisibleOnScreenEnabler2D.xml b/doc/classes/VisibleOnScreenEnabler2D.xml
new file mode 100644
index 0000000000..c6ae8227d2
--- /dev/null
+++ b/doc/classes/VisibleOnScreenEnabler2D.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisibleOnScreenEnabler2D" inherits="VisibleOnScreenNotifier2D" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <members>
+ <member name="enable_mode" type="int" setter="set_enable_mode" getter="get_enable_mode" enum="VisibleOnScreenEnabler2D.EnableMode" default="0">
+ </member>
+ <member name="enable_node_path" type="NodePath" setter="set_enable_node_path" getter="get_enable_node_path" default="NodePath(&quot;..&quot;)">
+ </member>
+ </members>
+ <constants>
+ <constant name="ENABLE_MODE_INHERIT" value="0" enum="EnableMode">
+ </constant>
+ <constant name="ENABLE_MODE_ALWAYS" value="1" enum="EnableMode">
+ </constant>
+ <constant name="ENABLE_MODE_WHEN_PAUSED" value="2" enum="EnableMode">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/VisibleOnScreenEnabler3D.xml b/doc/classes/VisibleOnScreenEnabler3D.xml
new file mode 100644
index 0000000000..3205d6b415
--- /dev/null
+++ b/doc/classes/VisibleOnScreenEnabler3D.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisibleOnScreenEnabler3D" inherits="VisibleOnScreenNotifier3D" version="4.0">
+ <brief_description>
+ Enables certain nodes only when approximately visible.
+ </brief_description>
+ <description>
+ The VisibleOnScreenEnabler3D will disable [RigidBody3D] and [AnimationPlayer] nodes when they are not visible. It will only affect other nodes within the same scene as the VisibleOnScreenEnabler3D itself.
+ If you just want to receive notifications, use [VisibleOnScreenNotifier3D] instead.
+ [b]Note:[/b] VisibleOnScreenEnabler3D uses an approximate heuristic for performance reasons. It doesn't take walls and other occlusion into account. The heuristic is an implementation detail and may change in future versions. If you need precise visibility checking, use another method such as adding an [Area3D] node as a child of a [Camera3D] node and/or [method Vector3.dot].
+ [b]Note:[/b] VisibleOnScreenEnabler3D will not affect nodes added after scene initialization.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <members>
+ <member name="enable_mode" type="int" setter="set_enable_mode" getter="get_enable_mode" enum="VisibleOnScreenEnabler3D.EnableMode" default="0">
+ </member>
+ <member name="enable_node_path" type="NodePath" setter="set_enable_node_path" getter="get_enable_node_path" default="NodePath(&quot;..&quot;)">
+ </member>
+ </members>
+ <constants>
+ <constant name="ENABLE_MODE_INHERIT" value="0" enum="EnableMode">
+ </constant>
+ <constant name="ENABLE_MODE_ALWAYS" value="1" enum="EnableMode">
+ </constant>
+ <constant name="ENABLE_MODE_WHEN_PAUSED" value="2" enum="EnableMode">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/VisibleOnScreenNotifier2D.xml b/doc/classes/VisibleOnScreenNotifier2D.xml
new file mode 100644
index 0000000000..daad200ca8
--- /dev/null
+++ b/doc/classes/VisibleOnScreenNotifier2D.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisibleOnScreenNotifier2D" inherits="Node2D" version="4.0">
+ <brief_description>
+ Detects when the node extents are visible on screen.
+ </brief_description>
+ <description>
+ The VisibleOnScreenNotifier2D detects when it is visible on the screen. It also notifies when its bounding rectangle enters or exits the screen or a viewport.
+ If you want nodes to be disabled automatically when they exit the screen, use [VisibleOnScreenEnabler2D] instead.
+ </description>
+ <tutorials>
+ <link title="2D Dodge The Creeps Demo">https://godotengine.org/asset-library/asset/515</link>
+ </tutorials>
+ <methods>
+ <method name="is_on_screen" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ If [code]true[/code], the bounding rectangle is on the screen.
+ [b]Note:[/b] It takes one frame for the node's visibility to be assessed once added to the scene tree, so this method will return [code]false[/code] right after it is instantiated, even if it will be on screen in the draw pass.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="rect" type="Rect2" setter="set_rect" getter="get_rect" default="Rect2(-10, -10, 20, 20)">
+ The VisibleOnScreenNotifier2D's bounding rectangle.
+ </member>
+ </members>
+ <signals>
+ <signal name="screen_entered">
+ <description>
+ Emitted when the VisibleOnScreenNotifier2D enters the screen.
+ </description>
+ </signal>
+ <signal name="screen_exited">
+ <description>
+ Emitted when the VisibleOnScreenNotifier2D exits the screen.
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/VisibleOnScreenNotifier3D.xml b/doc/classes/VisibleOnScreenNotifier3D.xml
new file mode 100644
index 0000000000..85ff324fbf
--- /dev/null
+++ b/doc/classes/VisibleOnScreenNotifier3D.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisibleOnScreenNotifier3D" inherits="VisualInstance3D" version="4.0">
+ <brief_description>
+ Detects approximately when the node is visible on screen.
+ </brief_description>
+ <description>
+ The VisibleOnScreenNotifier3D detects when it is visible on the screen. It also notifies when its bounding rectangle enters or exits the screen or a [Camera3D]'s view.
+ If you want nodes to be disabled automatically when they exit the screen, use [VisibleOnScreenEnabler3D] instead.
+ [b]Note:[/b] VisibleOnScreenNotifier3D uses an approximate heuristic for performance reasons. It doesn't take walls and other occlusion into account. The heuristic is an implementation detail and may change in future versions. If you need precise visibility checking, use another method such as adding an [Area3D] node as a child of a [Camera3D] node and/or [method Vector3.dot].
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="is_on_screen" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ If [code]true[/code], the bounding box is on the screen.
+ [b]Note:[/b] It takes one frame for the node's visibility to be assessed once added to the scene tree, so this method will return [code]false[/code] right after it is instantiated, even if it will be on screen in the draw pass.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="aabb" type="AABB" setter="set_aabb" getter="get_aabb" default="AABB(-1, -1, -1, 2, 2, 2)">
+ The VisibleOnScreenNotifier3D's bounding box.
+ </member>
+ </members>
+ <signals>
+ <signal name="screen_entered">
+ <description>
+ Emitted when the VisibleOnScreenNotifier3D enters the screen.
+ </description>
+ </signal>
+ <signal name="screen_exited">
+ <description>
+ Emitted when the VisibleOnScreenNotifier3D exits the screen.
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/VisualInstance3D.xml b/doc/classes/VisualInstance3D.xml
index 01d569d9c8..2a12254b71 100644
--- a/doc/classes/VisualInstance3D.xml
+++ b/doc/classes/VisualInstance3D.xml
@@ -44,7 +44,7 @@
</return>
<description>
Returns the transformed [AABB] (also known as the bounding box) for this [VisualInstance3D].
- Transformed in this case means the [AABB] plus the position, rotation, and scale of the [Node3D]'s [Transform]. See also [method get_aabb].
+ Transformed in this case means the [AABB] plus the position, rotation, and scale of the [Node3D]'s [Transform3D]. See also [method get_aabb].
</description>
</method>
<method name="set_base">
diff --git a/doc/classes/VisualShader.xml b/doc/classes/VisualShader.xml
index ff00a848b9..19b4acd8f1 100644
--- a/doc/classes/VisualShader.xml
+++ b/doc/classes/VisualShader.xml
@@ -206,7 +206,7 @@
</method>
</methods>
<members>
- <member name="graph_offset" type="Vector2" setter="set_graph_offset" getter="get_graph_offset" default="Vector2( 0, 0 )">
+ <member name="graph_offset" type="Vector2" setter="set_graph_offset" getter="get_graph_offset" default="Vector2(0, 0)">
The offset vector of the whole graph.
</member>
<member name="version" type="String" setter="set_version" getter="get_version" default="&quot;&quot;">
@@ -222,15 +222,19 @@
<constant name="TYPE_LIGHT" value="2" enum="Type">
A shader for light calculations.
</constant>
- <constant name="TYPE_EMIT" value="3" enum="Type">
+ <constant name="TYPE_START" value="3" enum="Type">
</constant>
<constant name="TYPE_PROCESS" value="4" enum="Type">
</constant>
- <constant name="TYPE_END" value="5" enum="Type">
+ <constant name="TYPE_COLLIDE" value="5" enum="Type">
</constant>
- <constant name="TYPE_SKY" value="6" enum="Type">
+ <constant name="TYPE_START_CUSTOM" value="6" enum="Type">
</constant>
- <constant name="TYPE_MAX" value="7" enum="Type">
+ <constant name="TYPE_PROCESS_CUSTOM" value="7" enum="Type">
+ </constant>
+ <constant name="TYPE_SKY" value="8" enum="Type">
+ </constant>
+ <constant name="TYPE_MAX" value="9" enum="Type">
Represents the size of the [enum Type] enum.
</constant>
<constant name="NODE_ID_INVALID" value="-1">
diff --git a/doc/classes/VisualShaderNode.xml b/doc/classes/VisualShaderNode.xml
index 6327ab534f..9a74f2322e 100644
--- a/doc/classes/VisualShaderNode.xml
+++ b/doc/classes/VisualShaderNode.xml
@@ -9,6 +9,13 @@
<link title="VisualShaders">https://docs.godotengine.org/en/latest/tutorials/shading/visual_shaders.html</link>
</tutorials>
<methods>
+ <method name="clear_default_input_values">
+ <return type="void">
+ </return>
+ <description>
+ Clears the default input ports value.
+ </description>
+ </method>
<method name="get_default_input_values" qualifiers="const">
<return type="Array">
</return>
@@ -25,6 +32,15 @@
Returns the default value of the input [code]port[/code].
</description>
</method>
+ <method name="remove_input_port_default_value">
+ <return type="void">
+ </return>
+ <argument index="0" name="port" type="int">
+ </argument>
+ <description>
+ Removes the default value of the input [code]port[/code].
+ </description>
+ </method>
<method name="set_default_input_values">
<return type="void">
</return>
diff --git a/doc/classes/VisualShaderNodeBillboard.xml b/doc/classes/VisualShaderNodeBillboard.xml
new file mode 100644
index 0000000000..53bcfa7b5c
--- /dev/null
+++ b/doc/classes/VisualShaderNodeBillboard.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualShaderNodeBillboard" inherits="VisualShaderNode" version="4.0">
+ <brief_description>
+ A node that controls how the object faces the camera to be used within the visual shader graph.
+ </brief_description>
+ <description>
+ The output port of this node needs to be connected to [code]Model View Matrix[/code] port of [VisualShaderNodeOutput].
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <members>
+ <member name="billboard_type" type="int" setter="set_billboard_type" getter="get_billboard_type" enum="VisualShaderNodeBillboard.BillboardType" default="1">
+ Controls how the object faces the camera. See [enum BillboardType].
+ </member>
+ <member name="keep_scale" type="bool" setter="set_keep_scale_enabled" getter="is_keep_scale_enabled" default="false">
+ If [code]true[/code], the shader will keep the scale set for the mesh. Otherwise, the scale is lost when billboarding.
+ </member>
+ </members>
+ <constants>
+ <constant name="BILLBOARD_TYPE_DISABLED" value="0" enum="BillboardType">
+ Billboarding is disabled and the node does nothing.
+ </constant>
+ <constant name="BILLBOARD_TYPE_ENABLED" value="1" enum="BillboardType">
+ A standard billboarding algorithm is enabled.
+ </constant>
+ <constant name="BILLBOARD_TYPE_FIXED_Y" value="2" enum="BillboardType">
+ A billboarding algorithm to rotate around Y-axis is enabled.
+ </constant>
+ <constant name="BILLBOARD_TYPE_PARTICLES" value="3" enum="BillboardType">
+ A billboarding algorithm designed to use on particles is enabled.
+ </constant>
+ <constant name="BILLBOARD_TYPE_MAX" value="4" enum="BillboardType">
+ Represents the size of the [enum BillboardType] enum.
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/VisualShaderNodeColorConstant.xml b/doc/classes/VisualShaderNodeColorConstant.xml
index 8644013ef2..fa1a11c488 100644
--- a/doc/classes/VisualShaderNodeColorConstant.xml
+++ b/doc/classes/VisualShaderNodeColorConstant.xml
@@ -12,7 +12,7 @@
<methods>
</methods>
<members>
- <member name="constant" type="Color" setter="set_constant" getter="get_constant" default="Color( 1, 1, 1, 1 )">
+ <member name="constant" type="Color" setter="set_constant" getter="get_constant" default="Color(1, 1, 1, 1)">
A [Color] constant which represents a state of this node.
</member>
</members>
diff --git a/doc/classes/VisualShaderNodeColorUniform.xml b/doc/classes/VisualShaderNodeColorUniform.xml
index 90ef381b76..bdaf301f09 100644
--- a/doc/classes/VisualShaderNodeColorUniform.xml
+++ b/doc/classes/VisualShaderNodeColorUniform.xml
@@ -11,7 +11,7 @@
<methods>
</methods>
<members>
- <member name="default_value" type="Color" setter="set_default_value" getter="get_default_value" default="Color( 1, 1, 1, 1 )">
+ <member name="default_value" type="Color" setter="set_default_value" getter="get_default_value" default="Color(1, 1, 1, 1)">
A default value to be assigned within the shader.
</member>
<member name="default_value_enabled" type="bool" setter="set_default_value_enabled" getter="is_default_value_enabled" default="false">
diff --git a/doc/classes/VisualShaderNodeDeterminant.xml b/doc/classes/VisualShaderNodeDeterminant.xml
index 6b042f6172..06b05addfa 100644
--- a/doc/classes/VisualShaderNodeDeterminant.xml
+++ b/doc/classes/VisualShaderNodeDeterminant.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="VisualShaderNodeDeterminant" inherits="VisualShaderNode" version="4.0">
<brief_description>
- Calculates the determinant of a [Transform] within the visual shader graph.
+ Calculates the determinant of a [Transform3D] within the visual shader graph.
</brief_description>
<description>
Translates to [code]determinant(x)[/code] in the shader language.
diff --git a/doc/classes/VisualShaderNodeParticleAccelerator.xml b/doc/classes/VisualShaderNodeParticleAccelerator.xml
new file mode 100644
index 0000000000..82aae1df63
--- /dev/null
+++ b/doc/classes/VisualShaderNodeParticleAccelerator.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualShaderNodeParticleAccelerator" inherits="VisualShaderNodeOutput" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <members>
+ <member name="mode" type="int" setter="set_mode" getter="get_mode" enum="VisualShaderNodeParticleAccelerator.Mode" default="0">
+ </member>
+ </members>
+ <constants>
+ <constant name="MODE_LINEAR" value="0" enum="Mode">
+ </constant>
+ <constant name="MODE_RADIAL" value="1" enum="Mode">
+ </constant>
+ <constant name="MODE_TANGENTIAL" value="2" enum="Mode">
+ </constant>
+ <constant name="MODE_MAX" value="3" enum="Mode">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/VisualShaderNodeParticleBoxEmitter.xml b/doc/classes/VisualShaderNodeParticleBoxEmitter.xml
new file mode 100644
index 0000000000..af33b285d2
--- /dev/null
+++ b/doc/classes/VisualShaderNodeParticleBoxEmitter.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualShaderNodeParticleBoxEmitter" inherits="VisualShaderNodeParticleEmitter" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/VisualShaderNodeParticleConeVelocity.xml b/doc/classes/VisualShaderNodeParticleConeVelocity.xml
new file mode 100644
index 0000000000..7a40c2a7d0
--- /dev/null
+++ b/doc/classes/VisualShaderNodeParticleConeVelocity.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualShaderNodeParticleConeVelocity" inherits="VisualShaderNode" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/VisualShaderNodeParticleEmit.xml b/doc/classes/VisualShaderNodeParticleEmit.xml
new file mode 100644
index 0000000000..120b12d643
--- /dev/null
+++ b/doc/classes/VisualShaderNodeParticleEmit.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualShaderNodeParticleEmit" inherits="VisualShaderNode" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <members>
+ <member name="flags" type="int" setter="set_flags" getter="get_flags" enum="VisualShaderNodeParticleEmit.EmitFlags" default="31">
+ </member>
+ </members>
+ <constants>
+ <constant name="EMIT_FLAG_POSITION" value="1" enum="EmitFlags">
+ </constant>
+ <constant name="EMIT_FLAG_ROT_SCALE" value="2" enum="EmitFlags">
+ </constant>
+ <constant name="EMIT_FLAG_VELOCITY" value="4" enum="EmitFlags">
+ </constant>
+ <constant name="EMIT_FLAG_COLOR" value="8" enum="EmitFlags">
+ </constant>
+ <constant name="EMIT_FLAG_CUSTOM" value="16" enum="EmitFlags">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/VisualShaderNodeParticleEmitter.xml b/doc/classes/VisualShaderNodeParticleEmitter.xml
new file mode 100644
index 0000000000..3a25fc1c7f
--- /dev/null
+++ b/doc/classes/VisualShaderNodeParticleEmitter.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualShaderNodeParticleEmitter" inherits="VisualShaderNode" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/VisualShaderNodeParticleMultiplyByAxisAngle.xml b/doc/classes/VisualShaderNodeParticleMultiplyByAxisAngle.xml
new file mode 100644
index 0000000000..89a53699c9
--- /dev/null
+++ b/doc/classes/VisualShaderNodeParticleMultiplyByAxisAngle.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualShaderNodeParticleMultiplyByAxisAngle" inherits="VisualShaderNode" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <members>
+ <member name="degrees_mode" type="bool" setter="set_degrees_mode" getter="is_degrees_mode" default="true">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/VisualShaderNodeParticleOutput.xml b/doc/classes/VisualShaderNodeParticleOutput.xml
new file mode 100644
index 0000000000..c8fc66f2ff
--- /dev/null
+++ b/doc/classes/VisualShaderNodeParticleOutput.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualShaderNodeParticleOutput" inherits="VisualShaderNodeOutput" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/VisualShaderNodeParticleRandomness.xml b/doc/classes/VisualShaderNodeParticleRandomness.xml
new file mode 100644
index 0000000000..f19723a663
--- /dev/null
+++ b/doc/classes/VisualShaderNodeParticleRandomness.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualShaderNodeParticleRandomness" inherits="VisualShaderNode" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <members>
+ <member name="op_type" type="int" setter="set_op_type" getter="get_op_type" enum="VisualShaderNodeParticleRandomness.OpType" default="0">
+ </member>
+ </members>
+ <constants>
+ <constant name="OP_TYPE_SCALAR" value="0" enum="OpType">
+ </constant>
+ <constant name="OP_TYPE_VECTOR" value="1" enum="OpType">
+ </constant>
+ <constant name="OP_TYPE_MAX" value="2" enum="OpType">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/VisualShaderNodeParticleRingEmitter.xml b/doc/classes/VisualShaderNodeParticleRingEmitter.xml
new file mode 100644
index 0000000000..ee3fbe7faf
--- /dev/null
+++ b/doc/classes/VisualShaderNodeParticleRingEmitter.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualShaderNodeParticleRingEmitter" inherits="VisualShaderNodeParticleEmitter" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/VisualShaderNodeParticleSphereEmitter.xml b/doc/classes/VisualShaderNodeParticleSphereEmitter.xml
new file mode 100644
index 0000000000..d43ac518cf
--- /dev/null
+++ b/doc/classes/VisualShaderNodeParticleSphereEmitter.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualShaderNodeParticleSphereEmitter" inherits="VisualShaderNodeParticleEmitter" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/VisualShaderNodeResizableBase.xml b/doc/classes/VisualShaderNodeResizableBase.xml
index 9f827a96cc..9052f6854b 100644
--- a/doc/classes/VisualShaderNodeResizableBase.xml
+++ b/doc/classes/VisualShaderNodeResizableBase.xml
@@ -9,7 +9,7 @@
<methods>
</methods>
<members>
- <member name="size" type="Vector2" setter="set_size" getter="get_size" default="Vector2( 0, 0 )">
+ <member name="size" type="Vector2" setter="set_size" getter="get_size" default="Vector2(0, 0)">
The size of the node in the visual shader graph.
</member>
</members>
diff --git a/doc/classes/VisualShaderNodeTransformCompose.xml b/doc/classes/VisualShaderNodeTransformCompose.xml
index 41762b0099..b82ce9bdd8 100644
--- a/doc/classes/VisualShaderNodeTransformCompose.xml
+++ b/doc/classes/VisualShaderNodeTransformCompose.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="VisualShaderNodeTransformCompose" inherits="VisualShaderNode" version="4.0">
<brief_description>
- Composes a [Transform] from four [Vector3]s within the visual shader graph.
+ Composes a [Transform3D] from four [Vector3]s within the visual shader graph.
</brief_description>
<description>
Creates a 4x4 transform matrix using four vectors of type [code]vec3[/code]. Each vector is one row in the matrix and the last column is a [code]vec4(0, 0, 0, 1)[/code].
diff --git a/doc/classes/VisualShaderNodeTransformConstant.xml b/doc/classes/VisualShaderNodeTransformConstant.xml
index b8f054e914..30178752d0 100644
--- a/doc/classes/VisualShaderNodeTransformConstant.xml
+++ b/doc/classes/VisualShaderNodeTransformConstant.xml
@@ -1,18 +1,18 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="VisualShaderNodeTransformConstant" inherits="VisualShaderNodeConstant" version="4.0">
<brief_description>
- A [Transform] constant for use within the visual shader graph.
+ A [Transform3D] constant for use within the visual shader graph.
</brief_description>
<description>
- A constant [Transform], which can be used as an input node.
+ A constant [Transform3D], which can be used as an input node.
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<members>
- <member name="constant" type="Transform" setter="set_constant" getter="get_constant" default="Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )">
- A [Transform] constant which represents the state of this node.
+ <member name="constant" type="Transform3D" setter="set_constant" getter="get_constant" default="Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)">
+ A [Transform3D] constant which represents the state of this node.
</member>
</members>
<constants>
diff --git a/doc/classes/VisualShaderNodeTransformDecompose.xml b/doc/classes/VisualShaderNodeTransformDecompose.xml
index c8d893db00..b815efc67a 100644
--- a/doc/classes/VisualShaderNodeTransformDecompose.xml
+++ b/doc/classes/VisualShaderNodeTransformDecompose.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="VisualShaderNodeTransformDecompose" inherits="VisualShaderNode" version="4.0">
<brief_description>
- Decomposes a [Transform] into four [Vector3]s within the visual shader graph.
+ Decomposes a [Transform3D] into four [Vector3]s within the visual shader graph.
</brief_description>
<description>
Takes a 4x4 transform matrix and decomposes it into four [code]vec3[/code] values, one from each row of the matrix.
diff --git a/doc/classes/VisualShaderNodeTransformFunc.xml b/doc/classes/VisualShaderNodeTransformFunc.xml
index d0b5c5129d..41a58e1458 100644
--- a/doc/classes/VisualShaderNodeTransformFunc.xml
+++ b/doc/classes/VisualShaderNodeTransformFunc.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="VisualShaderNodeTransformFunc" inherits="VisualShaderNode" version="4.0">
<brief_description>
- Computes a [Transform] function within the visual shader graph.
+ Computes a [Transform3D] function within the visual shader graph.
</brief_description>
<description>
- Computes an inverse or transpose function on the provided [Transform].
+ Computes an inverse or transpose function on the provided [Transform3D].
</description>
<tutorials>
</tutorials>
@@ -17,10 +17,10 @@
</members>
<constants>
<constant name="FUNC_INVERSE" value="0" enum="Function">
- Perform the inverse operation on the [Transform] matrix.
+ Perform the inverse operation on the [Transform3D] matrix.
</constant>
<constant name="FUNC_TRANSPOSE" value="1" enum="Function">
- Perform the transpose operation on the [Transform] matrix.
+ Perform the transpose operation on the [Transform3D] matrix.
</constant>
</constants>
</class>
diff --git a/doc/classes/VisualShaderNodeTransformMult.xml b/doc/classes/VisualShaderNodeTransformMult.xml
index 02b6e0cd1c..f26f60a1f3 100644
--- a/doc/classes/VisualShaderNodeTransformMult.xml
+++ b/doc/classes/VisualShaderNodeTransformMult.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="VisualShaderNodeTransformMult" inherits="VisualShaderNode" version="4.0">
<brief_description>
- Multiplies [Transform] by [Transform] within the visual shader graph.
+ Multiplies [Transform3D] by [Transform3D] within the visual shader graph.
</brief_description>
<description>
A multiplication operation on two transforms (4x4 matrices), with support for different multiplication operators.
diff --git a/doc/classes/VisualShaderNodeTransformUniform.xml b/doc/classes/VisualShaderNodeTransformUniform.xml
index ff6246618d..2f7818ec8a 100644
--- a/doc/classes/VisualShaderNodeTransformUniform.xml
+++ b/doc/classes/VisualShaderNodeTransformUniform.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="VisualShaderNodeTransformUniform" inherits="VisualShaderNodeUniform" version="4.0">
<brief_description>
- A [Transform] uniform for use within the visual shader graph.
+ A [Transform3D] uniform for use within the visual shader graph.
</brief_description>
<description>
Translated to [code]uniform mat4[/code] in the shader language.
@@ -11,7 +11,7 @@
<methods>
</methods>
<members>
- <member name="default_value" type="Transform" setter="set_default_value" getter="get_default_value" default="Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )">
+ <member name="default_value" type="Transform3D" setter="set_default_value" getter="get_default_value" default="Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)">
A default value to be assigned within the shader.
</member>
<member name="default_value_enabled" type="bool" setter="set_default_value_enabled" getter="is_default_value_enabled" default="false">
diff --git a/doc/classes/VisualShaderNodeTransformVecMult.xml b/doc/classes/VisualShaderNodeTransformVecMult.xml
index 3d5f87f727..2c9c115d9c 100644
--- a/doc/classes/VisualShaderNodeTransformVecMult.xml
+++ b/doc/classes/VisualShaderNodeTransformVecMult.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="VisualShaderNodeTransformVecMult" inherits="VisualShaderNode" version="4.0">
<brief_description>
- Multiplies a [Transform] and a [Vector3] within the visual shader graph.
+ Multiplies a [Transform3D] and a [Vector3] within the visual shader graph.
</brief_description>
<description>
A multiplication operation on a transform (4x4 matrix) and a vector, with support for different multiplication operators.
diff --git a/doc/classes/VisualShaderNodeUVFunc.xml b/doc/classes/VisualShaderNodeUVFunc.xml
new file mode 100644
index 0000000000..042644feb0
--- /dev/null
+++ b/doc/classes/VisualShaderNodeUVFunc.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualShaderNodeUVFunc" inherits="VisualShaderNode" version="4.0">
+ <brief_description>
+ Contains functions to modify texture coordinates ([code]uv[/code]) to be used within the visual shader graph.
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <members>
+ <member name="function" type="int" setter="set_function" getter="get_function" enum="VisualShaderNodeUVFunc.Function" default="0">
+ A function to be applied to the texture coordinates. See [enum Function] for options.
+ </member>
+ </members>
+ <constants>
+ <constant name="FUNC_PANNING" value="0" enum="Function">
+ Translates [code]uv[/code] by using [code]scale[/code] and [code]offset[/code] values using the following formula: [code]uv = uv + offset * scale[/code]. [code]uv[/code] port is connected to [code]UV[/code] built-in by default.
+ </constant>
+ <constant name="FUNC_SCALING" value="1" enum="Function">
+ Scales [code]uv[/uv] by using [code]scale[/code] and [code]pivot[/code] values using the following formula: [code]uv = (uv - pivot) * scale + pivot[/code]. [code]uv[/code] port is connected to [code]UV[/code] built-in by default.
+ </constant>
+ <constant name="FUNC_MAX" value="2" enum="Function">
+ Represents the size of the [enum Function] enum.
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/VisualShaderNodeVec3Constant.xml b/doc/classes/VisualShaderNodeVec3Constant.xml
index b01bb514fe..28c3d22345 100644
--- a/doc/classes/VisualShaderNodeVec3Constant.xml
+++ b/doc/classes/VisualShaderNodeVec3Constant.xml
@@ -11,7 +11,7 @@
<methods>
</methods>
<members>
- <member name="constant" type="Vector3" setter="set_constant" getter="get_constant" default="Vector3( 0, 0, 0 )">
+ <member name="constant" type="Vector3" setter="set_constant" getter="get_constant" default="Vector3(0, 0, 0)">
A [Vector3] constant which represents the state of this node.
</member>
</members>
diff --git a/doc/classes/VisualShaderNodeVec3Uniform.xml b/doc/classes/VisualShaderNodeVec3Uniform.xml
index cd1500f5a1..215e2cfbea 100644
--- a/doc/classes/VisualShaderNodeVec3Uniform.xml
+++ b/doc/classes/VisualShaderNodeVec3Uniform.xml
@@ -11,7 +11,7 @@
<methods>
</methods>
<members>
- <member name="default_value" type="Vector3" setter="set_default_value" getter="get_default_value" default="Vector3( 0, 0, 0 )">
+ <member name="default_value" type="Vector3" setter="set_default_value" getter="get_default_value" default="Vector3(0, 0, 0)">
A default value to be assigned within the shader.
</member>
<member name="default_value_enabled" type="bool" setter="set_default_value_enabled" getter="is_default_value_enabled" default="false">
diff --git a/doc/classes/GIProbe.xml b/doc/classes/VoxelGI.xml
index 4f56d1ad3e..5b395becb7 100644
--- a/doc/classes/GIProbe.xml
+++ b/doc/classes/VoxelGI.xml
@@ -1,15 +1,15 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="GIProbe" inherits="VisualInstance3D" version="4.0">
+<class name="VoxelGI" inherits="VisualInstance3D" version="4.0">
<brief_description>
Real-time global illumination (GI) probe.
</brief_description>
<description>
- [GIProbe]s are used to provide high-quality real-time indirect light to scenes. They precompute the effect of objects that emit light and the effect of static geometry to simulate the behavior of complex light in real-time. [GIProbe]s need to be baked before using, however, once baked, dynamic objects will receive light from them. Further, lights can be fully dynamic or baked.
- Having [GIProbe]s in a scene can be expensive, the quality of the probe can be turned down in exchange for better performance in the [ProjectSettings] using [member ProjectSettings.rendering/global_illumination/gi_probes/quality].
+ [VoxelGI]s are used to provide high-quality real-time indirect light to scenes. They precompute the effect of objects that emit light and the effect of static geometry to simulate the behavior of complex light in real-time. [VoxelGI]s need to be baked before using, however, once baked, dynamic objects will receive light from them. Further, lights can be fully dynamic or baked.
+ Having [VoxelGI]s in a scene can be expensive, the quality of the probe can be turned down in exchange for better performance in the [ProjectSettings] using [member ProjectSettings.rendering/global_illumination/voxel_gi/quality].
[b]Note:[/b] Meshes should have sufficiently thick walls to avoid light leaks (avoid one-sided walls). For interior levels, enclose your level geometry in a sufficiently large box and bridge the loops to close the mesh.
</description>
<tutorials>
- <link title="GI probes">https://docs.godotengine.org/en/latest/tutorials/3d/gi_probes.html</link>
+ <link title="GI probes">https://docs.godotengine.org/en/latest/tutorials/3d/voxel_gi.html</link>
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
<methods>
@@ -21,7 +21,7 @@
<argument index="1" name="create_visual_debug" type="bool" default="false">
</argument>
<description>
- Bakes the effect from all [GeometryInstance3D]s marked with [constant GeometryInstance3D.GI_MODE_BAKED] and [Light3D]s marked with either [constant Light3D.BAKE_DYNAMIC] or [constant Light3D.BAKE_STATIC]. If [code]create_visual_debug[/code] is [code]true[/code], after baking the light, this will generate a [MultiMesh] that has a cube representing each solid cell with each cube colored to the cell's albedo color. This can be used to visualize the [GIProbe]'s data and debug any issues that may be occurring.
+ Bakes the effect from all [GeometryInstance3D]s marked with [constant GeometryInstance3D.GI_MODE_BAKED] and [Light3D]s marked with either [constant Light3D.BAKE_DYNAMIC] or [constant Light3D.BAKE_STATIC]. If [code]create_visual_debug[/code] is [code]true[/code], after baking the light, this will generate a [MultiMesh] that has a cube representing each solid cell with each cube colored to the cell's albedo color. This can be used to visualize the [VoxelGI]'s data and debug any issues that may be occurring.
</description>
</method>
<method name="debug_bake">
@@ -33,14 +33,14 @@
</method>
</methods>
<members>
- <member name="data" type="GIProbeData" setter="set_probe_data" getter="get_probe_data">
- The [GIProbeData] resource that holds the data for this [GIProbe].
+ <member name="data" type="VoxelGIData" setter="set_probe_data" getter="get_probe_data">
+ The [VoxelGIData] resource that holds the data for this [VoxelGI].
</member>
- <member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3( 10, 10, 10 )">
- The size of the area covered by the [GIProbe]. If you make the extents larger without increasing the subdivisions with [member subdiv], the size of each cell will increase and result in lower detailed lighting.
+ <member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3(10, 10, 10)">
+ The size of the area covered by the [VoxelGI]. If you make the extents larger without increasing the subdivisions with [member subdiv], the size of each cell will increase and result in lower detailed lighting.
</member>
- <member name="subdiv" type="int" setter="set_subdiv" getter="get_subdiv" enum="GIProbe.Subdiv" default="1">
- Number of times to subdivide the grid that the [GIProbe] operates on. A higher number results in finer detail and thus higher visual quality, while lower numbers result in better performance.
+ <member name="subdiv" type="int" setter="set_subdiv" getter="get_subdiv" enum="VoxelGI.Subdiv" default="1">
+ Number of times to subdivide the grid that the [VoxelGI] operates on. A higher number results in finer detail and thus higher visual quality, while lower numbers result in better performance.
</member>
</members>
<constants>
diff --git a/doc/classes/GIProbeData.xml b/doc/classes/VoxelGIData.xml
index 693df8f819..88a0411e2b 100644
--- a/doc/classes/GIProbeData.xml
+++ b/doc/classes/VoxelGIData.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="GIProbeData" inherits="Resource" version="4.0">
+<class name="VoxelGIData" inherits="Resource" version="4.0">
<brief_description>
</brief_description>
<description>
@@ -11,7 +11,7 @@
<method name="allocate">
<return type="void">
</return>
- <argument index="0" name="to_cell_xform" type="Transform">
+ <argument index="0" name="to_cell_xform" type="Transform3D">
</argument>
<argument index="1" name="aabb" type="AABB">
</argument>
@@ -59,7 +59,7 @@
</description>
</method>
<method name="get_to_cell_xform" qualifiers="const">
- <return type="Transform">
+ <return type="Transform3D">
</return>
<description>
</description>
diff --git a/doc/classes/WeakRef.xml b/doc/classes/WeakRef.xml
index 4140df5828..6c9a7de67f 100644
--- a/doc/classes/WeakRef.xml
+++ b/doc/classes/WeakRef.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="WeakRef" inherits="Reference" version="4.0">
+<class name="WeakRef" inherits="RefCounted" version="4.0">
<brief_description>
Holds an [Object], but does not contribute to the reference count if the object is a reference.
</brief_description>
<description>
- A weakref can hold a [Reference], without contributing to the reference counter. A weakref can be created from an [Object] using [method @GlobalScope.weakref]. If this object is not a reference, weakref still works, however, it does not have any effect on the object. Weakrefs are useful in cases where multiple classes have variables that refer to each other. Without weakrefs, using these classes could lead to memory leaks, since both references keep each other from being released. Making part of the variables a weakref can prevent this cyclic dependency, and allows the references to be released.
+ A weakref can hold a [RefCounted], without contributing to the reference counter. A weakref can be created from an [Object] using [method @GlobalScope.weakref]. If this object is not a reference, weakref still works, however, it does not have any effect on the object. Weakrefs are useful in cases where multiple classes have variables that refer to each other. Without weakrefs, using these classes could lead to memory leaks, since both references keep each other from being released. Making part of the variables a weakref can prevent this cyclic dependency, and allows the references to be released.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/Window.xml b/doc/classes/Window.xml
index b99a251a11..6ae5a5f449 100644
--- a/doc/classes/Window.xml
+++ b/doc/classes/Window.xml
@@ -45,7 +45,7 @@
</return>
<argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="StringName" default="&quot;&quot;">
+ <argument index="1" name="theme_type" type="StringName" default="&quot;&quot;">
</argument>
<description>
</description>
@@ -55,7 +55,7 @@
</return>
<argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="StringName" default="&quot;&quot;">
+ <argument index="1" name="theme_type" type="StringName" default="&quot;&quot;">
</argument>
<description>
</description>
@@ -65,10 +65,10 @@
</return>
<argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="StringName" default="&quot;&quot;">
+ <argument index="1" name="theme_type" type="StringName" default="&quot;&quot;">
</argument>
<description>
- Returns the [Font] at [code]name[/code] if the theme has [code]type[/code].
+ Returns the [Font] at [code]name[/code] if the theme has [code]theme_type[/code].
</description>
</method>
<method name="get_theme_font_size" qualifiers="const">
@@ -76,10 +76,10 @@
</return>
<argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="StringName" default="&quot;&quot;">
+ <argument index="1" name="theme_type" type="StringName" default="&quot;&quot;">
</argument>
<description>
- Returns the font size at [code]name[/code] if the theme has [code]type[/code].
+ Returns the font size at [code]name[/code] if the theme has [code]theme_type[/code].
</description>
</method>
<method name="get_theme_icon" qualifiers="const">
@@ -87,7 +87,7 @@
</return>
<argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="StringName" default="&quot;&quot;">
+ <argument index="1" name="theme_type" type="StringName" default="&quot;&quot;">
</argument>
<description>
</description>
@@ -97,7 +97,7 @@
</return>
<argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="StringName" default="&quot;&quot;">
+ <argument index="1" name="theme_type" type="StringName" default="&quot;&quot;">
</argument>
<description>
</description>
@@ -119,7 +119,7 @@
</return>
<argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="StringName" default="&quot;&quot;">
+ <argument index="1" name="theme_type" type="StringName" default="&quot;&quot;">
</argument>
<description>
</description>
@@ -129,7 +129,7 @@
</return>
<argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="StringName" default="&quot;&quot;">
+ <argument index="1" name="theme_type" type="StringName" default="&quot;&quot;">
</argument>
<description>
</description>
@@ -139,11 +139,11 @@
</return>
<argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="StringName" default="&quot;&quot;">
+ <argument index="1" name="theme_type" type="StringName" default="&quot;&quot;">
</argument>
<description>
- Returns [code]true[/code] if [Font] with [code]name[/code] is in [code]type[/code].
- Returns [code]false[/code] if the theme does not have [code]type[/code].
+ Returns [code]true[/code] if [Font] with [code]name[/code] is in [code]theme_type[/code].
+ Returns [code]false[/code] if the theme does not have [code]theme_type[/code].
</description>
</method>
<method name="has_theme_font_size" qualifiers="const">
@@ -151,11 +151,11 @@
</return>
<argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="StringName" default="&quot;&quot;">
+ <argument index="1" name="theme_type" type="StringName" default="&quot;&quot;">
</argument>
<description>
- Returns [code]true[/code] if font size with [code]name[/code] is in [code]type[/code].
- Returns [code]false[/code] if the theme does not have [code]type[/code].
+ Returns [code]true[/code] if font size with [code]name[/code] is in [code]theme_type[/code].
+ Returns [code]false[/code] if the theme does not have [code]theme_type[/code].
</description>
</method>
<method name="has_theme_icon" qualifiers="const">
@@ -163,7 +163,7 @@
</return>
<argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="StringName" default="&quot;&quot;">
+ <argument index="1" name="theme_type" type="StringName" default="&quot;&quot;">
</argument>
<description>
</description>
@@ -173,7 +173,7 @@
</return>
<argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="StringName" default="&quot;&quot;">
+ <argument index="1" name="theme_type" type="StringName" default="&quot;&quot;">
</argument>
<description>
</description>
@@ -218,7 +218,7 @@
<method name="popup">
<return type="void">
</return>
- <argument index="0" name="rect" type="Rect2i" default="Rect2i( 0, 0, 0, 0 )">
+ <argument index="0" name="rect" type="Rect2i" default="Rect2i(0, 0, 0, 0)">
</argument>
<description>
</description>
@@ -226,7 +226,7 @@
<method name="popup_centered">
<return type="void">
</return>
- <argument index="0" name="minsize" type="Vector2i" default="Vector2i( 0, 0 )">
+ <argument index="0" name="minsize" type="Vector2i" default="Vector2i(0, 0)">
</argument>
<description>
</description>
@@ -234,7 +234,7 @@
<method name="popup_centered_clamped">
<return type="void">
</return>
- <argument index="0" name="minsize" type="Vector2i" default="Vector2i( 0, 0 )">
+ <argument index="0" name="minsize" type="Vector2i" default="Vector2i(0, 0)">
</argument>
<argument index="1" name="fallback_ratio" type="float" default="0.75">
</argument>
@@ -322,24 +322,26 @@
</member>
<member name="content_scale_mode" type="int" setter="set_content_scale_mode" getter="get_content_scale_mode" enum="Window.ContentScaleMode" default="0">
</member>
- <member name="content_scale_size" type="Vector2i" setter="set_content_scale_size" getter="get_content_scale_size" default="Vector2i( 0, 0 )">
+ <member name="content_scale_size" type="Vector2i" setter="set_content_scale_size" getter="get_content_scale_size" default="Vector2i(0, 0)">
</member>
<member name="current_screen" type="int" setter="set_current_screen" getter="get_current_screen" default="0">
</member>
<member name="exclusive" type="bool" setter="set_exclusive" getter="is_exclusive" default="false">
</member>
- <member name="max_size" type="Vector2i" setter="set_max_size" getter="get_max_size" default="Vector2i( 0, 0 )">
+ <member name="max_size" type="Vector2i" setter="set_max_size" getter="get_max_size" default="Vector2i(0, 0)">
</member>
- <member name="min_size" type="Vector2i" setter="set_min_size" getter="get_min_size" default="Vector2i( 0, 0 )">
+ <member name="min_size" type="Vector2i" setter="set_min_size" getter="get_min_size" default="Vector2i(0, 0)">
</member>
<member name="mode" type="int" setter="set_mode" getter="get_mode" enum="Window.Mode" default="0">
</member>
- <member name="position" type="Vector2i" setter="set_position" getter="get_position" default="Vector2i( 0, 0 )">
+ <member name="position" type="Vector2i" setter="set_position" getter="get_position" default="Vector2i(0, 0)">
</member>
- <member name="size" type="Vector2i" setter="set_size" getter="get_size" default="Vector2i( 100, 100 )">
+ <member name="size" type="Vector2i" setter="set_size" getter="get_size" default="Vector2i(100, 100)">
</member>
<member name="theme" type="Theme" setter="set_theme" getter="get_theme">
</member>
+ <member name="theme_custom_type" type="StringName" setter="set_theme_custom_type" getter="get_theme_custom_type" default="&amp;&quot;&quot;">
+ </member>
<member name="title" type="String" setter="set_title" getter="get_title" default="&quot;&quot;">
</member>
<member name="transient" type="bool" setter="set_transient" getter="is_transient" default="false">
@@ -470,7 +472,7 @@
</theme_item>
<theme_item name="scaleborder_size" type="int" default="4">
</theme_item>
- <theme_item name="title_color" type="Color" default="Color( 0, 0, 0, 1 )">
+ <theme_item name="title_color" type="Color" default="Color(0, 0, 0, 1)">
</theme_item>
<theme_item name="title_font" type="Font">
</theme_item>
@@ -479,7 +481,7 @@
</theme_item>
<theme_item name="title_height" type="int" default="20">
</theme_item>
- <theme_item name="title_outline_modulate" type="Color" default="Color( 1, 1, 1, 1 )">
+ <theme_item name="title_outline_modulate" type="Color" default="Color(1, 1, 1, 1)">
The color of the title outline.
</theme_item>
<theme_item name="title_outline_size" type="int" default="0">
diff --git a/doc/classes/WorldEnvironment.xml b/doc/classes/WorldEnvironment.xml
index c1cf639ec0..6aa2db00b4 100644
--- a/doc/classes/WorldEnvironment.xml
+++ b/doc/classes/WorldEnvironment.xml
@@ -5,7 +5,7 @@
</brief_description>
<description>
The [WorldEnvironment] node is used to configure the default [Environment] for the scene.
- The parameters defined in the [WorldEnvironment] can be overridden by an [Environment] node set on the current [Camera3D]. Additionally, only one [WorldEnvironment] may be instanced in a given scene at a time.
+ The parameters defined in the [WorldEnvironment] can be overridden by an [Environment] node set on the current [Camera3D]. Additionally, only one [WorldEnvironment] may be instantiated in a given scene at a time.
The [WorldEnvironment] allows the user to specify default lighting parameters (e.g. ambient lighting), various post-processing effects (e.g. SSAO, DOF, Tonemapping), and how to draw the background (e.g. solid color, skybox). Usually, these are added in order to improve the realism/color balance of the scene.
</description>
<tutorials>
diff --git a/doc/classes/WorldMarginShape3D.xml b/doc/classes/WorldMarginShape3D.xml
index a91447056b..9a26f254f1 100644
--- a/doc/classes/WorldMarginShape3D.xml
+++ b/doc/classes/WorldMarginShape3D.xml
@@ -11,7 +11,7 @@
<methods>
</methods>
<members>
- <member name="plane" type="Plane" setter="set_plane" getter="get_plane" default="Plane( 0, 1, 0, 0 )">
+ <member name="plane" type="Plane" setter="set_plane" getter="get_plane" default="Plane(0, 1, 0, 0)">
The [Plane] used by the [WorldMarginShape3D] for collision.
</member>
</members>
diff --git a/doc/classes/XMLParser.xml b/doc/classes/XMLParser.xml
index 2849ea62ab..ab5c58c51c 100644
--- a/doc/classes/XMLParser.xml
+++ b/doc/classes/XMLParser.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="XMLParser" inherits="Reference" version="4.0">
+<class name="XMLParser" inherits="RefCounted" version="4.0">
<brief_description>
Low-level class for creating parsers for [url=https://en.wikipedia.org/wiki/XML]XML[/url] files.
</brief_description>
diff --git a/doc/classes/XRInterface.xml b/doc/classes/XRInterface.xml
index 034cb51be3..fec98007c3 100644
--- a/doc/classes/XRInterface.xml
+++ b/doc/classes/XRInterface.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="XRInterface" inherits="Reference" version="4.0">
+<class name="XRInterface" inherits="RefCounted" version="4.0">
<brief_description>
Base class for an AR/VR interface implementation.
</brief_description>
@@ -46,6 +46,13 @@
If supported, returns the status of our tracking. This will allow you to provide feedback to the user whether there are issues with positional tracking.
</description>
</method>
+ <method name="get_view_count">
+ <return type="int">
+ </return>
+ <description>
+ Returns the number of views that need to be rendered for this device. 1 for Monoscopic, 2 for Stereoscopic.
+ </description>
+ </method>
<method name="initialize">
<return type="bool">
</return>
@@ -57,13 +64,6 @@
While currently not used, you can activate additional interfaces. You may wish to do this if you want to track controllers from other platforms. However, at this point in time only one interface can render to an HMD.
</description>
</method>
- <method name="is_stereo">
- <return type="bool">
- </return>
- <description>
- Returns [code]true[/code] if the current output of this interface is in stereo.
- </description>
- </method>
<method name="uninitialize">
<return type="void">
</return>
diff --git a/doc/classes/XRPositionalTracker.xml b/doc/classes/XRPositionalTracker.xml
index 5274d952fd..cd8cb71cd9 100644
--- a/doc/classes/XRPositionalTracker.xml
+++ b/doc/classes/XRPositionalTracker.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="XRPositionalTracker" inherits="Reference" version="4.0">
+<class name="XRPositionalTracker" inherits="RefCounted" version="4.0">
<brief_description>
A tracked object.
</brief_description>
@@ -69,7 +69,7 @@
</description>
</method>
<method name="get_transform" qualifiers="const">
- <return type="Transform">
+ <return type="Transform3D">
</return>
<argument index="0" name="adjust_by_reference_frame" type="bool">
</argument>
diff --git a/doc/classes/XRServer.xml b/doc/classes/XRServer.xml
index d0edf91fed..149e177700 100644
--- a/doc/classes/XRServer.xml
+++ b/doc/classes/XRServer.xml
@@ -63,7 +63,7 @@
</description>
</method>
<method name="get_hmd_transform">
- <return type="Transform">
+ <return type="Transform3D">
</return>
<description>
Returns the primary interface's transformation.
@@ -96,7 +96,7 @@
<return type="int">
</return>
<description>
- Returns the absolute timestamp (in μs) of the last [XRServer] commit of the AR/VR eyes to [RenderingServer]. The value comes from an internal call to [method OS.get_ticks_usec].
+ Returns the absolute timestamp (in μs) of the last [XRServer] commit of the AR/VR eyes to [RenderingServer]. The value comes from an internal call to [method Time.get_ticks_usec].
</description>
</method>
<method name="get_last_frame_usec">
@@ -110,11 +110,11 @@
<return type="int">
</return>
<description>
- Returns the absolute timestamp (in μs) of the last [XRServer] process callback. The value comes from an internal call to [method OS.get_ticks_usec].
+ Returns the absolute timestamp (in μs) of the last [XRServer] process callback. The value comes from an internal call to [method Time.get_ticks_usec].
</description>
</method>
<method name="get_reference_frame" qualifiers="const">
- <return type="Transform">
+ <return type="Transform3D">
</return>
<description>
Returns the reference frame transform. Mostly used internally and exposed for GDNative build interfaces.
diff --git a/doc/classes/YSort.xml b/doc/classes/YSort.xml
deleted file mode 100644
index 4ef6a4b4ec..0000000000
--- a/doc/classes/YSort.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="YSort" inherits="Node2D" version="4.0">
- <brief_description>
- Sort all child nodes based on their Y positions.
- </brief_description>
- <description>
- Sort all child nodes based on their Y positions. The child node must inherit from [CanvasItem] for it to be sorted. Nodes that have a higher Y position will be drawn later, so they will appear on top of nodes that have a lower Y position.
- Nesting of YSort nodes is possible. Children YSort nodes will be sorted in the same space as the parent YSort, allowing to better organize a scene or divide it in multiple ones, yet keep the unique sorting.
- </description>
- <tutorials>
- </tutorials>
- <methods>
- </methods>
- <members>
- <member name="sort_enabled" type="bool" setter="set_sort_enabled" getter="is_sort_enabled" default="true">
- If [code]true[/code], child nodes are sorted, otherwise sorting is disabled.
- </member>
- </members>
- <constants>
- </constants>
-</class>
diff --git a/doc/classes/float.xml b/doc/classes/float.xml
index 11f6d91b05..f75c130039 100644
--- a/doc/classes/float.xml
+++ b/doc/classes/float.xml
@@ -113,12 +113,12 @@
</description>
</method>
<method name="operator *" qualifiers="operator">
- <return type="Quat">
+ <return type="Quaternion">
</return>
- <argument index="0" name="right" type="Quat">
+ <argument index="0" name="right" type="Quaternion">
</argument>
<description>
- Multiplies each component of the [Quat] by the given [float].
+ Multiplies each component of the [Quaternion] by the given [float].
</description>
</method>
<method name="operator *" qualifiers="operator">
diff --git a/doc/classes/int.xml b/doc/classes/int.xml
index 119cdf8eeb..b0ad963998 100644
--- a/doc/classes/int.xml
+++ b/doc/classes/int.xml
@@ -183,9 +183,9 @@
</description>
</method>
<method name="operator *" qualifiers="operator">
- <return type="Quat">
+ <return type="Quaternion">
</return>
- <argument index="0" name="right" type="Quat">
+ <argument index="0" name="right" type="Quaternion">
</argument>
<description>
Multiplies each component of the quaternion by the given integer.
diff --git a/doc/translations/ar.po b/doc/translations/ar.po
index b4ae664714..4199bca6c7 100644
--- a/doc/translations/ar.po
+++ b/doc/translations/ar.po
@@ -701,7 +701,7 @@ msgid ""
"the FileSystem dock into the script.\n"
"[codeblock]\n"
"# Instance a scene.\n"
-"var diamond = preload(\"res://diamond.tscn\").instance()\n"
+"var diamond = preload(\"res://diamond.tscn\").instantiate()\n"
"[/codeblock]"
msgstr ""
@@ -13825,7 +13825,7 @@ msgid ""
"Example of usage with custom scene instance:\n"
"[codeblock]\n"
"func _make_custom_tooltip(for_text):\n"
-" var tooltip = preload(\"SomeTooltipScene.tscn\").instance()\n"
+" var tooltip = preload(\"SomeTooltipScene.tscn\").instantiate()\n"
" tooltip.get_node(\"Label\").text = for_text\n"
" return tooltip\n"
"[/codeblock]"
@@ -33036,7 +33036,7 @@ msgid ""
"to delete instances of it manually. To do so, call the [method free] method "
"from your script or delete the instance from C++.\n"
"Some classes that extend Object add memory management. This is the case of "
-"[Reference], which counts references and deletes itself automatically when "
+"[RefCounted], which counts references and deletes itself automatically when "
"no longer referenced. [Node], another fundamental type, deletes all its "
"children when freed from memory.\n"
"Objects export properties, which are mainly useful for storage and editing, "
@@ -33055,12 +33055,12 @@ msgid ""
"Objects also receive notifications. Notifications are a simple way to notify "
"the object about different events, so they can all be handled together. See "
"[method _notification].\n"
-"[b]Note:[/b] Unlike references to a [Reference], references to an Object "
+"[b]Note:[/b] Unlike references to a [RefCounted], references to an Object "
"stored in a variable can become invalid without warning. Therefore, it's "
-"recommended to use [Reference] for data classes instead of [Object]."
+"recommended to use [RefCounted] for data classes instead of [Object]."
msgstr ""
-#: doc/classes/Object.xml:23 doc/classes/Reference.xml:12
+#: doc/classes/Object.xml:23 doc/classes/RefCounted.xml:12
#: doc/classes/Resource.xml:11
msgid ""
"https://docs.godotengine.org/en/latest/getting_started/workflow/"
@@ -34557,7 +34557,7 @@ msgid "Changes the [Color] at the given index."
msgstr ""
#: doc/classes/PackedDataContainerRef.xml:4
-msgid "Reference version of [PackedDataContainer]."
+msgid "RefCounted version of [PackedDataContainer]."
msgstr ""
#: doc/classes/PackedFloat32Array.xml:4
@@ -34691,7 +34691,7 @@ msgid ""
"[codeblock]\n"
"# Use `load()` instead of `preload()` if the path isn't known at compile-"
"time.\n"
-"var scene = preload(\"res://scene.tscn\").instance()\n"
+"var scene = preload(\"res://scene.tscn\").instantiate()\n"
"# Add the node as a child of the node the script is attached to.\n"
"add_child(scene)\n"
"[/codeblock]\n"
@@ -41765,30 +41765,30 @@ msgid ""
"the half extents."
msgstr ""
-#: doc/classes/Reference.xml:4
+#: doc/classes/RefCounted.xml:4
msgid "Base class for reference-counted objects."
msgstr ""
-#: doc/classes/Reference.xml:7
+#: doc/classes/RefCounted.xml:7
msgid ""
"Base class for any object that keeps a reference count. [Resource] and many "
"other helper objects inherit this class.\n"
"Unlike [Object]s, References keep an internal reference counter so that they "
"are automatically released when no longer in use, and only then. References "
"therefore do not need to be freed manually with [method Object.free].\n"
-"In the vast majority of use cases, instantiating and using [Reference]-"
+"In the vast majority of use cases, instantiating and using [RefCounted]-"
"derived types is all you need to do. The methods provided in this class are "
"only for advanced users, and can cause issues if misused."
msgstr ""
-#: doc/classes/Reference.xml:19
+#: doc/classes/RefCounted.xml:19
msgid ""
"Initializes the internal reference counter. Use this only if you really know "
"what you are doing.\n"
"Returns whether the initialization was successful."
msgstr ""
-#: doc/classes/Reference.xml:27
+#: doc/classes/RefCounted.xml:27
msgid ""
"Increments the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -41796,7 +41796,7 @@ msgid ""
"code] otherwise."
msgstr ""
-#: doc/classes/Reference.xml:35
+#: doc/classes/RefCounted.xml:35
msgid ""
"Decrements the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -54060,7 +54060,7 @@ msgid ""
"[codeblock]\n"
"var foo = 2 # foo is dynamically an integer\n"
"foo = \"Now foo is a string!\"\n"
-"foo = Reference.new() # foo is an Object\n"
+"foo = RefCounted.new() # foo is an Object\n"
"var bar: int = 2 # bar is a statically typed integer.\n"
"# bar = \"Uh oh! I can't make static variables become a different type!\"\n"
"[/codeblock]\n"
@@ -59139,7 +59139,7 @@ msgstr ""
#: doc/classes/WeakRef.xml:7
msgid ""
-"A weakref can hold a [Reference], without contributing to the reference "
+"A weakref can hold a [RefCounted], without contributing to the reference "
"counter. A weakref can be created from an [Object] using [method @GDScript."
"weakref]. If this object is not a reference, weakref still works, however, "
"it does not have any effect on the object. Weakrefs are useful in cases "
diff --git a/doc/translations/ca.po b/doc/translations/ca.po
index 6485111b20..c72cba18bc 100644
--- a/doc/translations/ca.po
+++ b/doc/translations/ca.po
@@ -732,7 +732,7 @@ msgid ""
"the FileSystem dock into the script.\n"
"[codeblock]\n"
"# Instance a scene.\n"
-"var diamond = preload(\"res://diamond.tscn\").instance()\n"
+"var diamond = preload(\"res://diamond.tscn\").instantiate()\n"
"[/codeblock]"
msgstr ""
@@ -13856,7 +13856,7 @@ msgid ""
"Example of usage with custom scene instance:\n"
"[codeblock]\n"
"func _make_custom_tooltip(for_text):\n"
-" var tooltip = preload(\"SomeTooltipScene.tscn\").instance()\n"
+" var tooltip = preload(\"SomeTooltipScene.tscn\").instantiate()\n"
" tooltip.get_node(\"Label\").text = for_text\n"
" return tooltip\n"
"[/codeblock]"
@@ -33067,7 +33067,7 @@ msgid ""
"to delete instances of it manually. To do so, call the [method free] method "
"from your script or delete the instance from C++.\n"
"Some classes that extend Object add memory management. This is the case of "
-"[Reference], which counts references and deletes itself automatically when "
+"[RefCounted], which counts references and deletes itself automatically when "
"no longer referenced. [Node], another fundamental type, deletes all its "
"children when freed from memory.\n"
"Objects export properties, which are mainly useful for storage and editing, "
@@ -33086,12 +33086,12 @@ msgid ""
"Objects also receive notifications. Notifications are a simple way to notify "
"the object about different events, so they can all be handled together. See "
"[method _notification].\n"
-"[b]Note:[/b] Unlike references to a [Reference], references to an Object "
+"[b]Note:[/b] Unlike references to a [RefCounted], references to an Object "
"stored in a variable can become invalid without warning. Therefore, it's "
-"recommended to use [Reference] for data classes instead of [Object]."
+"recommended to use [RefCounted] for data classes instead of [Object]."
msgstr ""
-#: doc/classes/Object.xml:23 doc/classes/Reference.xml:12
+#: doc/classes/Object.xml:23 doc/classes/RefCounted.xml:12
#: doc/classes/Resource.xml:11
msgid ""
"https://docs.godotengine.org/en/latest/getting_started/workflow/"
@@ -34588,7 +34588,7 @@ msgid "Changes the [Color] at the given index."
msgstr ""
#: doc/classes/PackedDataContainerRef.xml:4
-msgid "Reference version of [PackedDataContainer]."
+msgid "RefCounted version of [PackedDataContainer]."
msgstr ""
#: doc/classes/PackedFloat32Array.xml:4
@@ -34722,7 +34722,7 @@ msgid ""
"[codeblock]\n"
"# Use `load()` instead of `preload()` if the path isn't known at compile-"
"time.\n"
-"var scene = preload(\"res://scene.tscn\").instance()\n"
+"var scene = preload(\"res://scene.tscn\").instantiate()\n"
"# Add the node as a child of the node the script is attached to.\n"
"add_child(scene)\n"
"[/codeblock]\n"
@@ -41796,30 +41796,30 @@ msgid ""
"the half extents."
msgstr ""
-#: doc/classes/Reference.xml:4
+#: doc/classes/RefCounted.xml:4
msgid "Base class for reference-counted objects."
msgstr ""
-#: doc/classes/Reference.xml:7
+#: doc/classes/RefCounted.xml:7
msgid ""
"Base class for any object that keeps a reference count. [Resource] and many "
"other helper objects inherit this class.\n"
"Unlike [Object]s, References keep an internal reference counter so that they "
"are automatically released when no longer in use, and only then. References "
"therefore do not need to be freed manually with [method Object.free].\n"
-"In the vast majority of use cases, instantiating and using [Reference]-"
+"In the vast majority of use cases, instantiating and using [RefCounted]-"
"derived types is all you need to do. The methods provided in this class are "
"only for advanced users, and can cause issues if misused."
msgstr ""
-#: doc/classes/Reference.xml:19
+#: doc/classes/RefCounted.xml:19
msgid ""
"Initializes the internal reference counter. Use this only if you really know "
"what you are doing.\n"
"Returns whether the initialization was successful."
msgstr ""
-#: doc/classes/Reference.xml:27
+#: doc/classes/RefCounted.xml:27
msgid ""
"Increments the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -41827,7 +41827,7 @@ msgid ""
"code] otherwise."
msgstr ""
-#: doc/classes/Reference.xml:35
+#: doc/classes/RefCounted.xml:35
msgid ""
"Decrements the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -54091,7 +54091,7 @@ msgid ""
"[codeblock]\n"
"var foo = 2 # foo is dynamically an integer\n"
"foo = \"Now foo is a string!\"\n"
-"foo = Reference.new() # foo is an Object\n"
+"foo = RefCounted.new() # foo is an Object\n"
"var bar: int = 2 # bar is a statically typed integer.\n"
"# bar = \"Uh oh! I can't make static variables become a different type!\"\n"
"[/codeblock]\n"
@@ -59170,7 +59170,7 @@ msgstr ""
#: doc/classes/WeakRef.xml:7
msgid ""
-"A weakref can hold a [Reference], without contributing to the reference "
+"A weakref can hold a [RefCounted], without contributing to the reference "
"counter. A weakref can be created from an [Object] using [method @GDScript."
"weakref]. If this object is not a reference, weakref still works, however, "
"it does not have any effect on the object. Weakrefs are useful in cases "
diff --git a/doc/translations/classes.pot b/doc/translations/classes.pot
index d14b0d9b1f..321e67f759 100644
--- a/doc/translations/classes.pot
+++ b/doc/translations/classes.pot
@@ -702,7 +702,7 @@ msgid ""
"the FileSystem dock into the script.\n"
"[codeblock]\n"
"# Instance a scene.\n"
-"var diamond = preload(\"res://diamond.tscn\").instance()\n"
+"var diamond = preload(\"res://diamond.tscn\").instantiate()\n"
"[/codeblock]"
msgstr ""
@@ -13826,7 +13826,7 @@ msgid ""
"Example of usage with custom scene instance:\n"
"[codeblock]\n"
"func _make_custom_tooltip(for_text):\n"
-" var tooltip = preload(\"SomeTooltipScene.tscn\").instance()\n"
+" var tooltip = preload(\"SomeTooltipScene.tscn\").instantiate()\n"
" tooltip.get_node(\"Label\").text = for_text\n"
" return tooltip\n"
"[/codeblock]"
@@ -20685,9 +20685,9 @@ msgid ""
"onready var expression = Expression.new()\n"
"\n"
"func _ready():\n"
-" $LineEdit.connect(\"text_entered\", self, \"_on_text_entered\")\n"
+" $LineEdit.connect(\"text_submitted\", self, \"_on_text_submitted\")\n"
"\n"
-"func _on_text_entered(command):\n"
+"func _on_text_submitted(command):\n"
" var error = expression.parse(command, [])\n"
" if error != OK:\n"
" print(expression.get_error_text())\n"
@@ -33037,7 +33037,7 @@ msgid ""
"to delete instances of it manually. To do so, call the [method free] method "
"from your script or delete the instance from C++.\n"
"Some classes that extend Object add memory management. This is the case of "
-"[Reference], which counts references and deletes itself automatically when "
+"[RefCounted], which counts references and deletes itself automatically when "
"no longer referenced. [Node], another fundamental type, deletes all its "
"children when freed from memory.\n"
"Objects export properties, which are mainly useful for storage and editing, "
@@ -33056,12 +33056,12 @@ msgid ""
"Objects also receive notifications. Notifications are a simple way to notify "
"the object about different events, so they can all be handled together. See "
"[method _notification].\n"
-"[b]Note:[/b] Unlike references to a [Reference], references to an Object "
+"[b]Note:[/b] Unlike references to a [RefCounted], references to an Object "
"stored in a variable can become invalid without warning. Therefore, it's "
-"recommended to use [Reference] for data classes instead of [Object]."
+"recommended to use [RefCounted] for data classes instead of [Object]."
msgstr ""
-#: doc/classes/Object.xml:23 doc/classes/Reference.xml:12
+#: doc/classes/Object.xml:23 doc/classes/RefCounted.xml:12
#: doc/classes/Resource.xml:11
msgid ""
"https://docs.godotengine.org/en/latest/getting_started/workflow/"
@@ -33187,7 +33187,7 @@ msgid ""
"Examples:\n"
"[codeblock]\n"
"connect(\"pressed\", self, \"_on_Button_pressed\") # BaseButton signal\n"
-"connect(\"text_entered\", self, \"_on_LineEdit_text_entered\") # LineEdit "
+"connect(\"text_submitted\", self, \"_on_LineEdit_text_submitted\") # LineEdit "
"signal\n"
"connect(\"hit\", self, \"_on_Player_hit\", [ weapon_type, damage ]) # User-"
"defined signal\n"
@@ -34558,7 +34558,7 @@ msgid "Changes the [Color] at the given index."
msgstr ""
#: doc/classes/PackedDataContainerRef.xml:4
-msgid "Reference version of [PackedDataContainer]."
+msgid "RefCounted version of [PackedDataContainer]."
msgstr ""
#: doc/classes/PackedFloat32Array.xml:4
@@ -34692,7 +34692,7 @@ msgid ""
"[codeblock]\n"
"# Use `load()` instead of `preload()` if the path isn't known at compile-"
"time.\n"
-"var scene = preload(\"res://scene.tscn\").instance()\n"
+"var scene = preload(\"res://scene.tscn\").instantiate()\n"
"# Add the node as a child of the node the script is attached to.\n"
"add_child(scene)\n"
"[/codeblock]\n"
@@ -41766,30 +41766,30 @@ msgid ""
"the half extents."
msgstr ""
-#: doc/classes/Reference.xml:4
+#: doc/classes/RefCounted.xml:4
msgid "Base class for reference-counted objects."
msgstr ""
-#: doc/classes/Reference.xml:7
+#: doc/classes/RefCounted.xml:7
msgid ""
"Base class for any object that keeps a reference count. [Resource] and many "
"other helper objects inherit this class.\n"
"Unlike [Object]s, References keep an internal reference counter so that they "
"are automatically released when no longer in use, and only then. References "
"therefore do not need to be freed manually with [method Object.free].\n"
-"In the vast majority of use cases, instantiating and using [Reference]-"
+"In the vast majority of use cases, instantiating and using [RefCounted]-"
"derived types is all you need to do. The methods provided in this class are "
"only for advanced users, and can cause issues if misused."
msgstr ""
-#: doc/classes/Reference.xml:19
+#: doc/classes/RefCounted.xml:19
msgid ""
"Initializes the internal reference counter. Use this only if you really know "
"what you are doing.\n"
"Returns whether the initialization was successful."
msgstr ""
-#: doc/classes/Reference.xml:27
+#: doc/classes/RefCounted.xml:27
msgid ""
"Increments the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -41797,7 +41797,7 @@ msgid ""
"code] otherwise."
msgstr ""
-#: doc/classes/Reference.xml:35
+#: doc/classes/RefCounted.xml:35
msgid ""
"Decrements the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -54061,7 +54061,7 @@ msgid ""
"[codeblock]\n"
"var foo = 2 # foo is dynamically an integer\n"
"foo = \"Now foo is a string!\"\n"
-"foo = Reference.new() # foo is an Object\n"
+"foo = RefCounted.new() # foo is an Object\n"
"var bar: int = 2 # bar is a statically typed integer.\n"
"# bar = \"Uh oh! I can't make static variables become a different type!\"\n"
"[/codeblock]\n"
@@ -59140,7 +59140,7 @@ msgstr ""
#: doc/classes/WeakRef.xml:7
msgid ""
-"A weakref can hold a [Reference], without contributing to the reference "
+"A weakref can hold a [RefCounted], without contributing to the reference "
"counter. A weakref can be created from an [Object] using [method @GDScript."
"weakref]. If this object is not a reference, weakref still works, however, "
"it does not have any effect on the object. Weakrefs are useful in cases "
diff --git a/doc/translations/cs.po b/doc/translations/cs.po
index 7b958a5049..3584fc5062 100644
--- a/doc/translations/cs.po
+++ b/doc/translations/cs.po
@@ -1058,7 +1058,7 @@ msgid ""
"the FileSystem dock into the script.\n"
"[codeblock]\n"
"# Instance a scene.\n"
-"var diamond = preload(\"res://diamond.tscn\").instance()\n"
+"var diamond = preload(\"res://diamond.tscn\").instantiate()\n"
"[/codeblock]"
msgstr ""
@@ -14318,7 +14318,7 @@ msgid ""
"Example of usage with custom scene instance:\n"
"[codeblock]\n"
"func _make_custom_tooltip(for_text):\n"
-" var tooltip = preload(\"SomeTooltipScene.tscn\").instance()\n"
+" var tooltip = preload(\"SomeTooltipScene.tscn\").instantiate()\n"
" tooltip.get_node(\"Label\").text = for_text\n"
" return tooltip\n"
"[/codeblock]"
@@ -33536,7 +33536,7 @@ msgid ""
"to delete instances of it manually. To do so, call the [method free] method "
"from your script or delete the instance from C++.\n"
"Some classes that extend Object add memory management. This is the case of "
-"[Reference], which counts references and deletes itself automatically when "
+"[RefCounted], which counts references and deletes itself automatically when "
"no longer referenced. [Node], another fundamental type, deletes all its "
"children when freed from memory.\n"
"Objects export properties, which are mainly useful for storage and editing, "
@@ -33555,12 +33555,12 @@ msgid ""
"Objects also receive notifications. Notifications are a simple way to notify "
"the object about different events, so they can all be handled together. See "
"[method _notification].\n"
-"[b]Note:[/b] Unlike references to a [Reference], references to an Object "
+"[b]Note:[/b] Unlike references to a [RefCounted], references to an Object "
"stored in a variable can become invalid without warning. Therefore, it's "
-"recommended to use [Reference] for data classes instead of [Object]."
+"recommended to use [RefCounted] for data classes instead of [Object]."
msgstr ""
-#: doc/classes/Object.xml:23 doc/classes/Reference.xml:12
+#: doc/classes/Object.xml:23 doc/classes/RefCounted.xml:12
#: doc/classes/Resource.xml:11
msgid ""
"https://docs.godotengine.org/en/latest/getting_started/workflow/"
@@ -35058,7 +35058,7 @@ msgid "Changes the [Color] at the given index."
msgstr ""
#: doc/classes/PackedDataContainerRef.xml:4
-msgid "Reference version of [PackedDataContainer]."
+msgid "RefCounted version of [PackedDataContainer]."
msgstr ""
#: doc/classes/PackedFloat32Array.xml:4
@@ -35192,7 +35192,7 @@ msgid ""
"[codeblock]\n"
"# Use `load()` instead of `preload()` if the path isn't known at compile-"
"time.\n"
-"var scene = preload(\"res://scene.tscn\").instance()\n"
+"var scene = preload(\"res://scene.tscn\").instantiate()\n"
"# Add the node as a child of the node the script is attached to.\n"
"add_child(scene)\n"
"[/codeblock]\n"
@@ -42266,30 +42266,30 @@ msgid ""
"the half extents."
msgstr ""
-#: doc/classes/Reference.xml:4
+#: doc/classes/RefCounted.xml:4
msgid "Base class for reference-counted objects."
msgstr ""
-#: doc/classes/Reference.xml:7
+#: doc/classes/RefCounted.xml:7
msgid ""
"Base class for any object that keeps a reference count. [Resource] and many "
"other helper objects inherit this class.\n"
"Unlike [Object]s, References keep an internal reference counter so that they "
"are automatically released when no longer in use, and only then. References "
"therefore do not need to be freed manually with [method Object.free].\n"
-"In the vast majority of use cases, instantiating and using [Reference]-"
+"In the vast majority of use cases, instantiating and using [RefCounted]-"
"derived types is all you need to do. The methods provided in this class are "
"only for advanced users, and can cause issues if misused."
msgstr ""
-#: doc/classes/Reference.xml:19
+#: doc/classes/RefCounted.xml:19
msgid ""
"Initializes the internal reference counter. Use this only if you really know "
"what you are doing.\n"
"Returns whether the initialization was successful."
msgstr ""
-#: doc/classes/Reference.xml:27
+#: doc/classes/RefCounted.xml:27
msgid ""
"Increments the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -42297,7 +42297,7 @@ msgid ""
"code] otherwise."
msgstr ""
-#: doc/classes/Reference.xml:35
+#: doc/classes/RefCounted.xml:35
msgid ""
"Decrements the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -54562,7 +54562,7 @@ msgid ""
"[codeblock]\n"
"var foo = 2 # foo is dynamically an integer\n"
"foo = \"Now foo is a string!\"\n"
-"foo = Reference.new() # foo is an Object\n"
+"foo = RefCounted.new() # foo is an Object\n"
"var bar: int = 2 # bar is a statically typed integer.\n"
"# bar = \"Uh oh! I can't make static variables become a different type!\"\n"
"[/codeblock]\n"
@@ -59645,7 +59645,7 @@ msgstr ""
#: doc/classes/WeakRef.xml:7
msgid ""
-"A weakref can hold a [Reference], without contributing to the reference "
+"A weakref can hold a [RefCounted], without contributing to the reference "
"counter. A weakref can be created from an [Object] using [method @GDScript."
"weakref]. If this object is not a reference, weakref still works, however, "
"it does not have any effect on the object. Weakrefs are useful in cases "
diff --git a/doc/translations/de.po b/doc/translations/de.po
index 2e3e219ba6..76eff809ff 100644
--- a/doc/translations/de.po
+++ b/doc/translations/de.po
@@ -992,7 +992,7 @@ msgid ""
"the FileSystem dock into the script.\n"
"[codeblock]\n"
"# Instance a scene.\n"
-"var diamond = preload(\"res://diamond.tscn\").instance()\n"
+"var diamond = preload(\"res://diamond.tscn\").instantiate()\n"
"[/codeblock]"
msgstr ""
@@ -14154,7 +14154,7 @@ msgid ""
"Example of usage with custom scene instance:\n"
"[codeblock]\n"
"func _make_custom_tooltip(for_text):\n"
-" var tooltip = preload(\"SomeTooltipScene.tscn\").instance()\n"
+" var tooltip = preload(\"SomeTooltipScene.tscn\").instantiate()\n"
" tooltip.get_node(\"Label\").text = for_text\n"
" return tooltip\n"
"[/codeblock]"
@@ -33453,7 +33453,7 @@ msgid ""
"to delete instances of it manually. To do so, call the [method free] method "
"from your script or delete the instance from C++.\n"
"Some classes that extend Object add memory management. This is the case of "
-"[Reference], which counts references and deletes itself automatically when "
+"[RefCounted], which counts references and deletes itself automatically when "
"no longer referenced. [Node], another fundamental type, deletes all its "
"children when freed from memory.\n"
"Objects export properties, which are mainly useful for storage and editing, "
@@ -33472,12 +33472,12 @@ msgid ""
"Objects also receive notifications. Notifications are a simple way to notify "
"the object about different events, so they can all be handled together. See "
"[method _notification].\n"
-"[b]Note:[/b] Unlike references to a [Reference], references to an Object "
+"[b]Note:[/b] Unlike references to a [RefCounted], references to an Object "
"stored in a variable can become invalid without warning. Therefore, it's "
-"recommended to use [Reference] for data classes instead of [Object]."
+"recommended to use [RefCounted] for data classes instead of [Object]."
msgstr ""
-#: doc/classes/Object.xml:23 doc/classes/Reference.xml:12
+#: doc/classes/Object.xml:23 doc/classes/RefCounted.xml:12
#: doc/classes/Resource.xml:11
#, fuzzy
msgid ""
@@ -34984,7 +34984,7 @@ msgid "Changes the [Color] at the given index."
msgstr ""
#: doc/classes/PackedDataContainerRef.xml:4
-msgid "Reference version of [PackedDataContainer]."
+msgid "RefCounted version of [PackedDataContainer]."
msgstr ""
#: doc/classes/PackedFloat32Array.xml:4
@@ -35118,7 +35118,7 @@ msgid ""
"[codeblock]\n"
"# Use `load()` instead of `preload()` if the path isn't known at compile-"
"time.\n"
-"var scene = preload(\"res://scene.tscn\").instance()\n"
+"var scene = preload(\"res://scene.tscn\").instantiate()\n"
"# Add the node as a child of the node the script is attached to.\n"
"add_child(scene)\n"
"[/codeblock]\n"
@@ -42226,30 +42226,30 @@ msgid ""
"the half extents."
msgstr ""
-#: doc/classes/Reference.xml:4
+#: doc/classes/RefCounted.xml:4
msgid "Base class for reference-counted objects."
msgstr ""
-#: doc/classes/Reference.xml:7
+#: doc/classes/RefCounted.xml:7
msgid ""
"Base class for any object that keeps a reference count. [Resource] and many "
"other helper objects inherit this class.\n"
"Unlike [Object]s, References keep an internal reference counter so that they "
"are automatically released when no longer in use, and only then. References "
"therefore do not need to be freed manually with [method Object.free].\n"
-"In the vast majority of use cases, instantiating and using [Reference]-"
+"In the vast majority of use cases, instantiating and using [RefCounted]-"
"derived types is all you need to do. The methods provided in this class are "
"only for advanced users, and can cause issues if misused."
msgstr ""
-#: doc/classes/Reference.xml:19
+#: doc/classes/RefCounted.xml:19
msgid ""
"Initializes the internal reference counter. Use this only if you really know "
"what you are doing.\n"
"Returns whether the initialization was successful."
msgstr ""
-#: doc/classes/Reference.xml:27
+#: doc/classes/RefCounted.xml:27
msgid ""
"Increments the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -42257,7 +42257,7 @@ msgid ""
"code] otherwise."
msgstr ""
-#: doc/classes/Reference.xml:35
+#: doc/classes/RefCounted.xml:35
msgid ""
"Decrements the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -54558,7 +54558,7 @@ msgid ""
"[codeblock]\n"
"var foo = 2 # foo is dynamically an integer\n"
"foo = \"Now foo is a string!\"\n"
-"foo = Reference.new() # foo is an Object\n"
+"foo = RefCounted.new() # foo is an Object\n"
"var bar: int = 2 # bar is a statically typed integer.\n"
"# bar = \"Uh oh! I can't make static variables become a different type!\"\n"
"[/codeblock]\n"
@@ -59796,7 +59796,7 @@ msgstr ""
#: doc/classes/WeakRef.xml:7
msgid ""
-"A weakref can hold a [Reference], without contributing to the reference "
+"A weakref can hold a [RefCounted], without contributing to the reference "
"counter. A weakref can be created from an [Object] using [method @GDScript."
"weakref]. If this object is not a reference, weakref still works, however, "
"it does not have any effect on the object. Weakrefs are useful in cases "
diff --git a/doc/translations/es.po b/doc/translations/es.po
index 3078c1bf90..44b3b22597 100644
--- a/doc/translations/es.po
+++ b/doc/translations/es.po
@@ -1119,7 +1119,7 @@ msgid ""
"the FileSystem dock into the script.\n"
"[codeblock]\n"
"# Instance a scene.\n"
-"var diamond = preload(\"res://diamond.tscn\").instance()\n"
+"var diamond = preload(\"res://diamond.tscn\").instantiate()\n"
"[/codeblock]"
msgstr ""
@@ -18123,7 +18123,7 @@ msgid ""
"Example of usage with custom scene instance:\n"
"[codeblock]\n"
"func _make_custom_tooltip(for_text):\n"
-" var tooltip = preload(\"SomeTooltipScene.tscn\").instance()\n"
+" var tooltip = preload(\"SomeTooltipScene.tscn\").instantiate()\n"
" tooltip.get_node(\"Label\").text = for_text\n"
" return tooltip\n"
"[/codeblock]"
@@ -18150,7 +18150,7 @@ msgstr ""
"Ejemplo de uso con una instancia de una escena personalizada<\n"
"[codeblock]\n"
"func _make_custom_tooltip(for_text):\n"
-" var sugerencia = preload(\"algunaEscenaSugerencia.tscn\").instance()\n"
+" var sugerencia = preload(\"algunaEscenaSugerencia.tscn\").instantiate()\n"
" tooltip.get_node(\"etiqueta\").text = para_texto\n"
" return sugerencia\n"
"[/codeblock]"
@@ -44834,7 +44834,7 @@ msgid ""
"to delete instances of it manually. To do so, call the [method free] method "
"from your script or delete the instance from C++.\n"
"Some classes that extend Object add memory management. This is the case of "
-"[Reference], which counts references and deletes itself automatically when "
+"[RefCounted], which counts references and deletes itself automatically when "
"no longer referenced. [Node], another fundamental type, deletes all its "
"children when freed from memory.\n"
"Objects export properties, which are mainly useful for storage and editing, "
@@ -44853,9 +44853,9 @@ msgid ""
"Objects also receive notifications. Notifications are a simple way to notify "
"the object about different events, so they can all be handled together. See "
"[method _notification].\n"
-"[b]Note:[/b] Unlike references to a [Reference], references to an Object "
+"[b]Note:[/b] Unlike references to a [RefCounted], references to an Object "
"stored in a variable can become invalid without warning. Therefore, it's "
-"recommended to use [Reference] for data classes instead of [Object]."
+"recommended to use [RefCounted] for data classes instead of [Object]."
msgstr ""
"Toda clase que no es un tipo integrado hereda de esta clase.\n"
"Puedes construir Objetos desde lenguajes de scripting, usando [code]Object."
@@ -44866,7 +44866,7 @@ msgstr ""
"llama al método [method free] desde tu script o elimina la instancia desde C+"
"+.\n"
"Algunas clases que extienden a Object añaden gestión de memoria. Este es el "
-"caso de [Reference], que cuenta las referencias y se borra a sí misma "
+"caso de [RefCounted], que cuenta las referencias y se borra a sí misma "
"automáticamente cuando deja de estar referenciada. [Node], otro tipo "
"fundamental, borra todos sus hijos cuando se libera de la memoria.\n"
"Los objetos exportan propiedades, que son principalmente útiles para el "
@@ -44887,7 +44887,7 @@ msgstr ""
"sencilla de notificar al objeto sobre diferentes eventos, de modo que todos "
"ellos pueden ser manejados juntos. Véase [method _notification]."
-#: doc/classes/Object.xml:23 doc/classes/Reference.xml:12
+#: doc/classes/Object.xml:23 doc/classes/RefCounted.xml:12
#: doc/classes/Resource.xml:11
#, fuzzy
msgid ""
@@ -46525,7 +46525,7 @@ msgid "Changes the [Color] at the given index."
msgstr ""
#: doc/classes/PackedDataContainerRef.xml:4
-msgid "Reference version of [PackedDataContainer]."
+msgid "RefCounted version of [PackedDataContainer]."
msgstr ""
#: doc/classes/PackedFloat32Array.xml:4
@@ -46659,7 +46659,7 @@ msgid ""
"[codeblock]\n"
"# Use `load()` instead of `preload()` if the path isn't known at compile-"
"time.\n"
-"var scene = preload(\"res://scene.tscn\").instance()\n"
+"var scene = preload(\"res://scene.tscn\").instantiate()\n"
"# Add the node as a child of the node the script is attached to.\n"
"add_child(scene)\n"
"[/codeblock]\n"
@@ -53779,30 +53779,30 @@ msgid ""
"the half extents."
msgstr ""
-#: doc/classes/Reference.xml:4
+#: doc/classes/RefCounted.xml:4
msgid "Base class for reference-counted objects."
msgstr ""
-#: doc/classes/Reference.xml:7
+#: doc/classes/RefCounted.xml:7
msgid ""
"Base class for any object that keeps a reference count. [Resource] and many "
"other helper objects inherit this class.\n"
"Unlike [Object]s, References keep an internal reference counter so that they "
"are automatically released when no longer in use, and only then. References "
"therefore do not need to be freed manually with [method Object.free].\n"
-"In the vast majority of use cases, instantiating and using [Reference]-"
+"In the vast majority of use cases, instantiating and using [RefCounted]-"
"derived types is all you need to do. The methods provided in this class are "
"only for advanced users, and can cause issues if misused."
msgstr ""
-#: doc/classes/Reference.xml:19
+#: doc/classes/RefCounted.xml:19
msgid ""
"Initializes the internal reference counter. Use this only if you really know "
"what you are doing.\n"
"Returns whether the initialization was successful."
msgstr ""
-#: doc/classes/Reference.xml:27
+#: doc/classes/RefCounted.xml:27
msgid ""
"Increments the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -53810,7 +53810,7 @@ msgid ""
"code] otherwise."
msgstr ""
-#: doc/classes/Reference.xml:35
+#: doc/classes/RefCounted.xml:35
msgid ""
"Decrements the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -66189,7 +66189,7 @@ msgid ""
"[codeblock]\n"
"var foo = 2 # foo is dynamically an integer\n"
"foo = \"Now foo is a string!\"\n"
-"foo = Reference.new() # foo is an Object\n"
+"foo = RefCounted.new() # foo is an Object\n"
"var bar: int = 2 # bar is a statically typed integer.\n"
"# bar = \"Uh oh! I can't make static variables become a different type!\"\n"
"[/codeblock]\n"
@@ -71348,7 +71348,7 @@ msgstr ""
#: doc/classes/WeakRef.xml:7
msgid ""
-"A weakref can hold a [Reference], without contributing to the reference "
+"A weakref can hold a [RefCounted], without contributing to the reference "
"counter. A weakref can be created from an [Object] using [method @GDScript."
"weakref]. If this object is not a reference, weakref still works, however, "
"it does not have any effect on the object. Weakrefs are useful in cases "
diff --git a/doc/translations/fa.po b/doc/translations/fa.po
index 733d3bb969..2a185fadc5 100644
--- a/doc/translations/fa.po
+++ b/doc/translations/fa.po
@@ -707,7 +707,7 @@ msgid ""
"the FileSystem dock into the script.\n"
"[codeblock]\n"
"# Instance a scene.\n"
-"var diamond = preload(\"res://diamond.tscn\").instance()\n"
+"var diamond = preload(\"res://diamond.tscn\").instantiate()\n"
"[/codeblock]"
msgstr ""
@@ -13831,7 +13831,7 @@ msgid ""
"Example of usage with custom scene instance:\n"
"[codeblock]\n"
"func _make_custom_tooltip(for_text):\n"
-" var tooltip = preload(\"SomeTooltipScene.tscn\").instance()\n"
+" var tooltip = preload(\"SomeTooltipScene.tscn\").instantiate()\n"
" tooltip.get_node(\"Label\").text = for_text\n"
" return tooltip\n"
"[/codeblock]"
@@ -33042,7 +33042,7 @@ msgid ""
"to delete instances of it manually. To do so, call the [method free] method "
"from your script or delete the instance from C++.\n"
"Some classes that extend Object add memory management. This is the case of "
-"[Reference], which counts references and deletes itself automatically when "
+"[RefCounted], which counts references and deletes itself automatically when "
"no longer referenced. [Node], another fundamental type, deletes all its "
"children when freed from memory.\n"
"Objects export properties, which are mainly useful for storage and editing, "
@@ -33061,12 +33061,12 @@ msgid ""
"Objects also receive notifications. Notifications are a simple way to notify "
"the object about different events, so they can all be handled together. See "
"[method _notification].\n"
-"[b]Note:[/b] Unlike references to a [Reference], references to an Object "
+"[b]Note:[/b] Unlike references to a [RefCounted], references to an Object "
"stored in a variable can become invalid without warning. Therefore, it's "
-"recommended to use [Reference] for data classes instead of [Object]."
+"recommended to use [RefCounted] for data classes instead of [Object]."
msgstr ""
-#: doc/classes/Object.xml:23 doc/classes/Reference.xml:12
+#: doc/classes/Object.xml:23 doc/classes/RefCounted.xml:12
#: doc/classes/Resource.xml:11
msgid ""
"https://docs.godotengine.org/en/latest/getting_started/workflow/"
@@ -34563,7 +34563,7 @@ msgid "Changes the [Color] at the given index."
msgstr ""
#: doc/classes/PackedDataContainerRef.xml:4
-msgid "Reference version of [PackedDataContainer]."
+msgid "RefCounted version of [PackedDataContainer]."
msgstr ""
#: doc/classes/PackedFloat32Array.xml:4
@@ -34697,7 +34697,7 @@ msgid ""
"[codeblock]\n"
"# Use `load()` instead of `preload()` if the path isn't known at compile-"
"time.\n"
-"var scene = preload(\"res://scene.tscn\").instance()\n"
+"var scene = preload(\"res://scene.tscn\").instantiate()\n"
"# Add the node as a child of the node the script is attached to.\n"
"add_child(scene)\n"
"[/codeblock]\n"
@@ -41771,30 +41771,30 @@ msgid ""
"the half extents."
msgstr ""
-#: doc/classes/Reference.xml:4
+#: doc/classes/RefCounted.xml:4
msgid "Base class for reference-counted objects."
msgstr ""
-#: doc/classes/Reference.xml:7
+#: doc/classes/RefCounted.xml:7
msgid ""
"Base class for any object that keeps a reference count. [Resource] and many "
"other helper objects inherit this class.\n"
"Unlike [Object]s, References keep an internal reference counter so that they "
"are automatically released when no longer in use, and only then. References "
"therefore do not need to be freed manually with [method Object.free].\n"
-"In the vast majority of use cases, instantiating and using [Reference]-"
+"In the vast majority of use cases, instantiating and using [RefCounted]-"
"derived types is all you need to do. The methods provided in this class are "
"only for advanced users, and can cause issues if misused."
msgstr ""
-#: doc/classes/Reference.xml:19
+#: doc/classes/RefCounted.xml:19
msgid ""
"Initializes the internal reference counter. Use this only if you really know "
"what you are doing.\n"
"Returns whether the initialization was successful."
msgstr ""
-#: doc/classes/Reference.xml:27
+#: doc/classes/RefCounted.xml:27
msgid ""
"Increments the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -41802,7 +41802,7 @@ msgid ""
"code] otherwise."
msgstr ""
-#: doc/classes/Reference.xml:35
+#: doc/classes/RefCounted.xml:35
msgid ""
"Decrements the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -54066,7 +54066,7 @@ msgid ""
"[codeblock]\n"
"var foo = 2 # foo is dynamically an integer\n"
"foo = \"Now foo is a string!\"\n"
-"foo = Reference.new() # foo is an Object\n"
+"foo = RefCounted.new() # foo is an Object\n"
"var bar: int = 2 # bar is a statically typed integer.\n"
"# bar = \"Uh oh! I can't make static variables become a different type!\"\n"
"[/codeblock]\n"
@@ -59145,7 +59145,7 @@ msgstr ""
#: doc/classes/WeakRef.xml:7
msgid ""
-"A weakref can hold a [Reference], without contributing to the reference "
+"A weakref can hold a [RefCounted], without contributing to the reference "
"counter. A weakref can be created from an [Object] using [method @GDScript."
"weakref]. If this object is not a reference, weakref still works, however, "
"it does not have any effect on the object. Weakrefs are useful in cases "
diff --git a/doc/translations/fi.po b/doc/translations/fi.po
index 0a40863a52..a5f470c60b 100644
--- a/doc/translations/fi.po
+++ b/doc/translations/fi.po
@@ -720,7 +720,7 @@ msgid ""
"the FileSystem dock into the script.\n"
"[codeblock]\n"
"# Instance a scene.\n"
-"var diamond = preload(\"res://diamond.tscn\").instance()\n"
+"var diamond = preload(\"res://diamond.tscn\").instantiate()\n"
"[/codeblock]"
msgstr ""
@@ -13844,7 +13844,7 @@ msgid ""
"Example of usage with custom scene instance:\n"
"[codeblock]\n"
"func _make_custom_tooltip(for_text):\n"
-" var tooltip = preload(\"SomeTooltipScene.tscn\").instance()\n"
+" var tooltip = preload(\"SomeTooltipScene.tscn\").instantiate()\n"
" tooltip.get_node(\"Label\").text = for_text\n"
" return tooltip\n"
"[/codeblock]"
@@ -33055,7 +33055,7 @@ msgid ""
"to delete instances of it manually. To do so, call the [method free] method "
"from your script or delete the instance from C++.\n"
"Some classes that extend Object add memory management. This is the case of "
-"[Reference], which counts references and deletes itself automatically when "
+"[RefCounted], which counts references and deletes itself automatically when "
"no longer referenced. [Node], another fundamental type, deletes all its "
"children when freed from memory.\n"
"Objects export properties, which are mainly useful for storage and editing, "
@@ -33074,12 +33074,12 @@ msgid ""
"Objects also receive notifications. Notifications are a simple way to notify "
"the object about different events, so they can all be handled together. See "
"[method _notification].\n"
-"[b]Note:[/b] Unlike references to a [Reference], references to an Object "
+"[b]Note:[/b] Unlike references to a [RefCounted], references to an Object "
"stored in a variable can become invalid without warning. Therefore, it's "
-"recommended to use [Reference] for data classes instead of [Object]."
+"recommended to use [RefCounted] for data classes instead of [Object]."
msgstr ""
-#: doc/classes/Object.xml:23 doc/classes/Reference.xml:12
+#: doc/classes/Object.xml:23 doc/classes/RefCounted.xml:12
#: doc/classes/Resource.xml:11
msgid ""
"https://docs.godotengine.org/en/latest/getting_started/workflow/"
@@ -34576,7 +34576,7 @@ msgid "Changes the [Color] at the given index."
msgstr ""
#: doc/classes/PackedDataContainerRef.xml:4
-msgid "Reference version of [PackedDataContainer]."
+msgid "RefCounted version of [PackedDataContainer]."
msgstr ""
#: doc/classes/PackedFloat32Array.xml:4
@@ -34710,7 +34710,7 @@ msgid ""
"[codeblock]\n"
"# Use `load()` instead of `preload()` if the path isn't known at compile-"
"time.\n"
-"var scene = preload(\"res://scene.tscn\").instance()\n"
+"var scene = preload(\"res://scene.tscn\").instantiate()\n"
"# Add the node as a child of the node the script is attached to.\n"
"add_child(scene)\n"
"[/codeblock]\n"
@@ -41784,30 +41784,30 @@ msgid ""
"the half extents."
msgstr ""
-#: doc/classes/Reference.xml:4
+#: doc/classes/RefCounted.xml:4
msgid "Base class for reference-counted objects."
msgstr ""
-#: doc/classes/Reference.xml:7
+#: doc/classes/RefCounted.xml:7
msgid ""
"Base class for any object that keeps a reference count. [Resource] and many "
"other helper objects inherit this class.\n"
"Unlike [Object]s, References keep an internal reference counter so that they "
"are automatically released when no longer in use, and only then. References "
"therefore do not need to be freed manually with [method Object.free].\n"
-"In the vast majority of use cases, instantiating and using [Reference]-"
+"In the vast majority of use cases, instantiating and using [RefCounted]-"
"derived types is all you need to do. The methods provided in this class are "
"only for advanced users, and can cause issues if misused."
msgstr ""
-#: doc/classes/Reference.xml:19
+#: doc/classes/RefCounted.xml:19
msgid ""
"Initializes the internal reference counter. Use this only if you really know "
"what you are doing.\n"
"Returns whether the initialization was successful."
msgstr ""
-#: doc/classes/Reference.xml:27
+#: doc/classes/RefCounted.xml:27
msgid ""
"Increments the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -41815,7 +41815,7 @@ msgid ""
"code] otherwise."
msgstr ""
-#: doc/classes/Reference.xml:35
+#: doc/classes/RefCounted.xml:35
msgid ""
"Decrements the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -54080,7 +54080,7 @@ msgid ""
"[codeblock]\n"
"var foo = 2 # foo is dynamically an integer\n"
"foo = \"Now foo is a string!\"\n"
-"foo = Reference.new() # foo is an Object\n"
+"foo = RefCounted.new() # foo is an Object\n"
"var bar: int = 2 # bar is a statically typed integer.\n"
"# bar = \"Uh oh! I can't make static variables become a different type!\"\n"
"[/codeblock]\n"
@@ -59168,7 +59168,7 @@ msgstr ""
#: doc/classes/WeakRef.xml:7
msgid ""
-"A weakref can hold a [Reference], without contributing to the reference "
+"A weakref can hold a [RefCounted], without contributing to the reference "
"counter. A weakref can be created from an [Object] using [method @GDScript."
"weakref]. If this object is not a reference, weakref still works, however, "
"it does not have any effect on the object. Weakrefs are useful in cases "
diff --git a/doc/translations/fr.po b/doc/translations/fr.po
index f3e26ebc61..2d9b1db565 100644
--- a/doc/translations/fr.po
+++ b/doc/translations/fr.po
@@ -1017,7 +1017,7 @@ msgid ""
"the FileSystem dock into the script.\n"
"[codeblock]\n"
"# Instance a scene.\n"
-"var diamond = preload(\"res://diamond.tscn\").instance()\n"
+"var diamond = preload(\"res://diamond.tscn\").instantiate()\n"
"[/codeblock]"
msgstr ""
@@ -14162,7 +14162,7 @@ msgid ""
"Example of usage with custom scene instance:\n"
"[codeblock]\n"
"func _make_custom_tooltip(for_text):\n"
-" var tooltip = preload(\"SomeTooltipScene.tscn\").instance()\n"
+" var tooltip = preload(\"SomeTooltipScene.tscn\").instantiate()\n"
" tooltip.get_node(\"Label\").text = for_text\n"
" return tooltip\n"
"[/codeblock]"
@@ -33403,7 +33403,7 @@ msgid ""
"to delete instances of it manually. To do so, call the [method free] method "
"from your script or delete the instance from C++.\n"
"Some classes that extend Object add memory management. This is the case of "
-"[Reference], which counts references and deletes itself automatically when "
+"[RefCounted], which counts references and deletes itself automatically when "
"no longer referenced. [Node], another fundamental type, deletes all its "
"children when freed from memory.\n"
"Objects export properties, which are mainly useful for storage and editing, "
@@ -33422,12 +33422,12 @@ msgid ""
"Objects also receive notifications. Notifications are a simple way to notify "
"the object about different events, so they can all be handled together. See "
"[method _notification].\n"
-"[b]Note:[/b] Unlike references to a [Reference], references to an Object "
+"[b]Note:[/b] Unlike references to a [RefCounted], references to an Object "
"stored in a variable can become invalid without warning. Therefore, it's "
-"recommended to use [Reference] for data classes instead of [Object]."
+"recommended to use [RefCounted] for data classes instead of [Object]."
msgstr ""
-#: doc/classes/Object.xml:23 doc/classes/Reference.xml:12
+#: doc/classes/Object.xml:23 doc/classes/RefCounted.xml:12
#: doc/classes/Resource.xml:11
msgid ""
"https://docs.godotengine.org/en/latest/getting_started/workflow/"
@@ -34927,7 +34927,7 @@ msgid "Changes the [Color] at the given index."
msgstr ""
#: doc/classes/PackedDataContainerRef.xml:4
-msgid "Reference version of [PackedDataContainer]."
+msgid "RefCounted version of [PackedDataContainer]."
msgstr ""
#: doc/classes/PackedFloat32Array.xml:4
@@ -35061,7 +35061,7 @@ msgid ""
"[codeblock]\n"
"# Use `load()` instead of `preload()` if the path isn't known at compile-"
"time.\n"
-"var scene = preload(\"res://scene.tscn\").instance()\n"
+"var scene = preload(\"res://scene.tscn\").instantiate()\n"
"# Add the node as a child of the node the script is attached to.\n"
"add_child(scene)\n"
"[/codeblock]\n"
@@ -42142,30 +42142,30 @@ msgid ""
"the half extents."
msgstr ""
-#: doc/classes/Reference.xml:4
+#: doc/classes/RefCounted.xml:4
msgid "Base class for reference-counted objects."
msgstr ""
-#: doc/classes/Reference.xml:7
+#: doc/classes/RefCounted.xml:7
msgid ""
"Base class for any object that keeps a reference count. [Resource] and many "
"other helper objects inherit this class.\n"
"Unlike [Object]s, References keep an internal reference counter so that they "
"are automatically released when no longer in use, and only then. References "
"therefore do not need to be freed manually with [method Object.free].\n"
-"In the vast majority of use cases, instantiating and using [Reference]-"
+"In the vast majority of use cases, instantiating and using [RefCounted]-"
"derived types is all you need to do. The methods provided in this class are "
"only for advanced users, and can cause issues if misused."
msgstr ""
-#: doc/classes/Reference.xml:19
+#: doc/classes/RefCounted.xml:19
msgid ""
"Initializes the internal reference counter. Use this only if you really know "
"what you are doing.\n"
"Returns whether the initialization was successful."
msgstr ""
-#: doc/classes/Reference.xml:27
+#: doc/classes/RefCounted.xml:27
msgid ""
"Increments the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -42173,7 +42173,7 @@ msgid ""
"code] otherwise."
msgstr ""
-#: doc/classes/Reference.xml:35
+#: doc/classes/RefCounted.xml:35
msgid ""
"Decrements the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -54519,7 +54519,7 @@ msgid ""
"[codeblock]\n"
"var foo = 2 # foo is dynamically an integer\n"
"foo = \"Now foo is a string!\"\n"
-"foo = Reference.new() # foo is an Object\n"
+"foo = RefCounted.new() # foo is an Object\n"
"var bar: int = 2 # bar is a statically typed integer.\n"
"# bar = \"Uh oh! I can't make static variables become a different type!\"\n"
"[/codeblock]\n"
@@ -59618,7 +59618,7 @@ msgstr ""
#: doc/classes/WeakRef.xml:7
msgid ""
-"A weakref can hold a [Reference], without contributing to the reference "
+"A weakref can hold a [RefCounted], without contributing to the reference "
"counter. A weakref can be created from an [Object] using [method @GDScript."
"weakref]. If this object is not a reference, weakref still works, however, "
"it does not have any effect on the object. Weakrefs are useful in cases "
diff --git a/doc/translations/id.po b/doc/translations/id.po
index 1bce3d6b50..cd841fc553 100644
--- a/doc/translations/id.po
+++ b/doc/translations/id.po
@@ -733,7 +733,7 @@ msgid ""
"the FileSystem dock into the script.\n"
"[codeblock]\n"
"# Instance a scene.\n"
-"var diamond = preload(\"res://diamond.tscn\").instance()\n"
+"var diamond = preload(\"res://diamond.tscn\").instantiate()\n"
"[/codeblock]"
msgstr ""
@@ -13857,7 +13857,7 @@ msgid ""
"Example of usage with custom scene instance:\n"
"[codeblock]\n"
"func _make_custom_tooltip(for_text):\n"
-" var tooltip = preload(\"SomeTooltipScene.tscn\").instance()\n"
+" var tooltip = preload(\"SomeTooltipScene.tscn\").instantiate()\n"
" tooltip.get_node(\"Label\").text = for_text\n"
" return tooltip\n"
"[/codeblock]"
@@ -33068,7 +33068,7 @@ msgid ""
"to delete instances of it manually. To do so, call the [method free] method "
"from your script or delete the instance from C++.\n"
"Some classes that extend Object add memory management. This is the case of "
-"[Reference], which counts references and deletes itself automatically when "
+"[RefCounted], which counts references and deletes itself automatically when "
"no longer referenced. [Node], another fundamental type, deletes all its "
"children when freed from memory.\n"
"Objects export properties, which are mainly useful for storage and editing, "
@@ -33087,12 +33087,12 @@ msgid ""
"Objects also receive notifications. Notifications are a simple way to notify "
"the object about different events, so they can all be handled together. See "
"[method _notification].\n"
-"[b]Note:[/b] Unlike references to a [Reference], references to an Object "
+"[b]Note:[/b] Unlike references to a [RefCounted], references to an Object "
"stored in a variable can become invalid without warning. Therefore, it's "
-"recommended to use [Reference] for data classes instead of [Object]."
+"recommended to use [RefCounted] for data classes instead of [Object]."
msgstr ""
-#: doc/classes/Object.xml:23 doc/classes/Reference.xml:12
+#: doc/classes/Object.xml:23 doc/classes/RefCounted.xml:12
#: doc/classes/Resource.xml:11
msgid ""
"https://docs.godotengine.org/en/latest/getting_started/workflow/"
@@ -34589,7 +34589,7 @@ msgid "Changes the [Color] at the given index."
msgstr ""
#: doc/classes/PackedDataContainerRef.xml:4
-msgid "Reference version of [PackedDataContainer]."
+msgid "RefCounted version of [PackedDataContainer]."
msgstr ""
#: doc/classes/PackedFloat32Array.xml:4
@@ -34723,7 +34723,7 @@ msgid ""
"[codeblock]\n"
"# Use `load()` instead of `preload()` if the path isn't known at compile-"
"time.\n"
-"var scene = preload(\"res://scene.tscn\").instance()\n"
+"var scene = preload(\"res://scene.tscn\").instantiate()\n"
"# Add the node as a child of the node the script is attached to.\n"
"add_child(scene)\n"
"[/codeblock]\n"
@@ -41797,30 +41797,30 @@ msgid ""
"the half extents."
msgstr ""
-#: doc/classes/Reference.xml:4
+#: doc/classes/RefCounted.xml:4
msgid "Base class for reference-counted objects."
msgstr ""
-#: doc/classes/Reference.xml:7
+#: doc/classes/RefCounted.xml:7
msgid ""
"Base class for any object that keeps a reference count. [Resource] and many "
"other helper objects inherit this class.\n"
"Unlike [Object]s, References keep an internal reference counter so that they "
"are automatically released when no longer in use, and only then. References "
"therefore do not need to be freed manually with [method Object.free].\n"
-"In the vast majority of use cases, instantiating and using [Reference]-"
+"In the vast majority of use cases, instantiating and using [RefCounted]-"
"derived types is all you need to do. The methods provided in this class are "
"only for advanced users, and can cause issues if misused."
msgstr ""
-#: doc/classes/Reference.xml:19
+#: doc/classes/RefCounted.xml:19
msgid ""
"Initializes the internal reference counter. Use this only if you really know "
"what you are doing.\n"
"Returns whether the initialization was successful."
msgstr ""
-#: doc/classes/Reference.xml:27
+#: doc/classes/RefCounted.xml:27
msgid ""
"Increments the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -41828,7 +41828,7 @@ msgid ""
"code] otherwise."
msgstr ""
-#: doc/classes/Reference.xml:35
+#: doc/classes/RefCounted.xml:35
msgid ""
"Decrements the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -54092,7 +54092,7 @@ msgid ""
"[codeblock]\n"
"var foo = 2 # foo is dynamically an integer\n"
"foo = \"Now foo is a string!\"\n"
-"foo = Reference.new() # foo is an Object\n"
+"foo = RefCounted.new() # foo is an Object\n"
"var bar: int = 2 # bar is a statically typed integer.\n"
"# bar = \"Uh oh! I can't make static variables become a different type!\"\n"
"[/codeblock]\n"
@@ -59171,7 +59171,7 @@ msgstr ""
#: doc/classes/WeakRef.xml:7
msgid ""
-"A weakref can hold a [Reference], without contributing to the reference "
+"A weakref can hold a [RefCounted], without contributing to the reference "
"counter. A weakref can be created from an [Object] using [method @GDScript."
"weakref]. If this object is not a reference, weakref still works, however, "
"it does not have any effect on the object. Weakrefs are useful in cases "
diff --git a/doc/translations/it.po b/doc/translations/it.po
index 18e162476c..aa085f6158 100644
--- a/doc/translations/it.po
+++ b/doc/translations/it.po
@@ -985,7 +985,7 @@ msgid ""
"the FileSystem dock into the script.\n"
"[codeblock]\n"
"# Instance a scene.\n"
-"var diamond = preload(\"res://diamond.tscn\").instance()\n"
+"var diamond = preload(\"res://diamond.tscn\").instantiate()\n"
"[/codeblock]"
msgstr ""
@@ -14115,7 +14115,7 @@ msgid ""
"Example of usage with custom scene instance:\n"
"[codeblock]\n"
"func _make_custom_tooltip(for_text):\n"
-" var tooltip = preload(\"SomeTooltipScene.tscn\").instance()\n"
+" var tooltip = preload(\"SomeTooltipScene.tscn\").instantiate()\n"
" tooltip.get_node(\"Label\").text = for_text\n"
" return tooltip\n"
"[/codeblock]"
@@ -33334,7 +33334,7 @@ msgid ""
"to delete instances of it manually. To do so, call the [method free] method "
"from your script or delete the instance from C++.\n"
"Some classes that extend Object add memory management. This is the case of "
-"[Reference], which counts references and deletes itself automatically when "
+"[RefCounted], which counts references and deletes itself automatically when "
"no longer referenced. [Node], another fundamental type, deletes all its "
"children when freed from memory.\n"
"Objects export properties, which are mainly useful for storage and editing, "
@@ -33353,12 +33353,12 @@ msgid ""
"Objects also receive notifications. Notifications are a simple way to notify "
"the object about different events, so they can all be handled together. See "
"[method _notification].\n"
-"[b]Note:[/b] Unlike references to a [Reference], references to an Object "
+"[b]Note:[/b] Unlike references to a [RefCounted], references to an Object "
"stored in a variable can become invalid without warning. Therefore, it's "
-"recommended to use [Reference] for data classes instead of [Object]."
+"recommended to use [RefCounted] for data classes instead of [Object]."
msgstr ""
-#: doc/classes/Object.xml:23 doc/classes/Reference.xml:12
+#: doc/classes/Object.xml:23 doc/classes/RefCounted.xml:12
#: doc/classes/Resource.xml:11
msgid ""
"https://docs.godotengine.org/en/latest/getting_started/workflow/"
@@ -34856,7 +34856,7 @@ msgid "Changes the [Color] at the given index."
msgstr ""
#: doc/classes/PackedDataContainerRef.xml:4
-msgid "Reference version of [PackedDataContainer]."
+msgid "RefCounted version of [PackedDataContainer]."
msgstr ""
#: doc/classes/PackedFloat32Array.xml:4
@@ -34990,7 +34990,7 @@ msgid ""
"[codeblock]\n"
"# Use `load()` instead of `preload()` if the path isn't known at compile-"
"time.\n"
-"var scene = preload(\"res://scene.tscn\").instance()\n"
+"var scene = preload(\"res://scene.tscn\").instantiate()\n"
"# Add the node as a child of the node the script is attached to.\n"
"add_child(scene)\n"
"[/codeblock]\n"
@@ -42067,30 +42067,30 @@ msgid ""
"the half extents."
msgstr ""
-#: doc/classes/Reference.xml:4
+#: doc/classes/RefCounted.xml:4
msgid "Base class for reference-counted objects."
msgstr ""
-#: doc/classes/Reference.xml:7
+#: doc/classes/RefCounted.xml:7
msgid ""
"Base class for any object that keeps a reference count. [Resource] and many "
"other helper objects inherit this class.\n"
"Unlike [Object]s, References keep an internal reference counter so that they "
"are automatically released when no longer in use, and only then. References "
"therefore do not need to be freed manually with [method Object.free].\n"
-"In the vast majority of use cases, instantiating and using [Reference]-"
+"In the vast majority of use cases, instantiating and using [RefCounted]-"
"derived types is all you need to do. The methods provided in this class are "
"only for advanced users, and can cause issues if misused."
msgstr ""
-#: doc/classes/Reference.xml:19
+#: doc/classes/RefCounted.xml:19
msgid ""
"Initializes the internal reference counter. Use this only if you really know "
"what you are doing.\n"
"Returns whether the initialization was successful."
msgstr ""
-#: doc/classes/Reference.xml:27
+#: doc/classes/RefCounted.xml:27
msgid ""
"Increments the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -42098,7 +42098,7 @@ msgid ""
"code] otherwise."
msgstr ""
-#: doc/classes/Reference.xml:35
+#: doc/classes/RefCounted.xml:35
msgid ""
"Decrements the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -54365,7 +54365,7 @@ msgid ""
"[codeblock]\n"
"var foo = 2 # foo is dynamically an integer\n"
"foo = \"Now foo is a string!\"\n"
-"foo = Reference.new() # foo is an Object\n"
+"foo = RefCounted.new() # foo is an Object\n"
"var bar: int = 2 # bar is a statically typed integer.\n"
"# bar = \"Uh oh! I can't make static variables become a different type!\"\n"
"[/codeblock]\n"
@@ -59459,7 +59459,7 @@ msgstr ""
#: doc/classes/WeakRef.xml:7
msgid ""
-"A weakref can hold a [Reference], without contributing to the reference "
+"A weakref can hold a [RefCounted], without contributing to the reference "
"counter. A weakref can be created from an [Object] using [method @GDScript."
"weakref]. If this object is not a reference, weakref still works, however, "
"it does not have any effect on the object. Weakrefs are useful in cases "
diff --git a/doc/translations/ja.po b/doc/translations/ja.po
index ede80a35ef..ee900d58c2 100644
--- a/doc/translations/ja.po
+++ b/doc/translations/ja.po
@@ -1091,7 +1091,7 @@ msgid ""
"the FileSystem dock into the script.\n"
"[codeblock]\n"
"# Instance a scene.\n"
-"var diamond = preload(\"res://diamond.tscn\").instance()\n"
+"var diamond = preload(\"res://diamond.tscn\").instantiate()\n"
"[/codeblock]"
msgstr ""
@@ -15045,7 +15045,7 @@ msgid ""
"Example of usage with custom scene instance:\n"
"[codeblock]\n"
"func _make_custom_tooltip(for_text):\n"
-" var tooltip = preload(\"SomeTooltipScene.tscn\").instance()\n"
+" var tooltip = preload(\"SomeTooltipScene.tscn\").instantiate()\n"
" tooltip.get_node(\"Label\").text = for_text\n"
" return tooltip\n"
"[/codeblock]"
@@ -34306,7 +34306,7 @@ msgid ""
"to delete instances of it manually. To do so, call the [method free] method "
"from your script or delete the instance from C++.\n"
"Some classes that extend Object add memory management. This is the case of "
-"[Reference], which counts references and deletes itself automatically when "
+"[RefCounted], which counts references and deletes itself automatically when "
"no longer referenced. [Node], another fundamental type, deletes all its "
"children when freed from memory.\n"
"Objects export properties, which are mainly useful for storage and editing, "
@@ -34325,12 +34325,12 @@ msgid ""
"Objects also receive notifications. Notifications are a simple way to notify "
"the object about different events, so they can all be handled together. See "
"[method _notification].\n"
-"[b]Note:[/b] Unlike references to a [Reference], references to an Object "
+"[b]Note:[/b] Unlike references to a [RefCounted], references to an Object "
"stored in a variable can become invalid without warning. Therefore, it's "
-"recommended to use [Reference] for data classes instead of [Object]."
+"recommended to use [RefCounted] for data classes instead of [Object]."
msgstr ""
-#: doc/classes/Object.xml:23 doc/classes/Reference.xml:12
+#: doc/classes/Object.xml:23 doc/classes/RefCounted.xml:12
#: doc/classes/Resource.xml:11
#, fuzzy
msgid ""
@@ -35830,7 +35830,7 @@ msgid "Changes the [Color] at the given index."
msgstr ""
#: doc/classes/PackedDataContainerRef.xml:4
-msgid "Reference version of [PackedDataContainer]."
+msgid "RefCounted version of [PackedDataContainer]."
msgstr ""
#: doc/classes/PackedFloat32Array.xml:4
@@ -35964,7 +35964,7 @@ msgid ""
"[codeblock]\n"
"# Use `load()` instead of `preload()` if the path isn't known at compile-"
"time.\n"
-"var scene = preload(\"res://scene.tscn\").instance()\n"
+"var scene = preload(\"res://scene.tscn\").instantiate()\n"
"# Add the node as a child of the node the script is attached to.\n"
"add_child(scene)\n"
"[/codeblock]\n"
@@ -43046,30 +43046,30 @@ msgid ""
"the half extents."
msgstr ""
-#: doc/classes/Reference.xml:4
+#: doc/classes/RefCounted.xml:4
msgid "Base class for reference-counted objects."
msgstr ""
-#: doc/classes/Reference.xml:7
+#: doc/classes/RefCounted.xml:7
msgid ""
"Base class for any object that keeps a reference count. [Resource] and many "
"other helper objects inherit this class.\n"
"Unlike [Object]s, References keep an internal reference counter so that they "
"are automatically released when no longer in use, and only then. References "
"therefore do not need to be freed manually with [method Object.free].\n"
-"In the vast majority of use cases, instantiating and using [Reference]-"
+"In the vast majority of use cases, instantiating and using [RefCounted]-"
"derived types is all you need to do. The methods provided in this class are "
"only for advanced users, and can cause issues if misused."
msgstr ""
-#: doc/classes/Reference.xml:19
+#: doc/classes/RefCounted.xml:19
msgid ""
"Initializes the internal reference counter. Use this only if you really know "
"what you are doing.\n"
"Returns whether the initialization was successful."
msgstr ""
-#: doc/classes/Reference.xml:27
+#: doc/classes/RefCounted.xml:27
msgid ""
"Increments the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -43077,7 +43077,7 @@ msgid ""
"code] otherwise."
msgstr ""
-#: doc/classes/Reference.xml:35
+#: doc/classes/RefCounted.xml:35
msgid ""
"Decrements the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -55349,7 +55349,7 @@ msgid ""
"[codeblock]\n"
"var foo = 2 # foo is dynamically an integer\n"
"foo = \"Now foo is a string!\"\n"
-"foo = Reference.new() # foo is an Object\n"
+"foo = RefCounted.new() # foo is an Object\n"
"var bar: int = 2 # bar is a statically typed integer.\n"
"# bar = \"Uh oh! I can't make static variables become a different type!\"\n"
"[/codeblock]\n"
@@ -60446,7 +60446,7 @@ msgstr ""
#: doc/classes/WeakRef.xml:7
msgid ""
-"A weakref can hold a [Reference], without contributing to the reference "
+"A weakref can hold a [RefCounted], without contributing to the reference "
"counter. A weakref can be created from an [Object] using [method @GDScript."
"weakref]. If this object is not a reference, weakref still works, however, "
"it does not have any effect on the object. Weakrefs are useful in cases "
diff --git a/doc/translations/ko.po b/doc/translations/ko.po
index e71cd06ba7..60416fb63c 100644
--- a/doc/translations/ko.po
+++ b/doc/translations/ko.po
@@ -709,7 +709,7 @@ msgid ""
"the FileSystem dock into the script.\n"
"[codeblock]\n"
"# Instance a scene.\n"
-"var diamond = preload(\"res://diamond.tscn\").instance()\n"
+"var diamond = preload(\"res://diamond.tscn\").instantiate()\n"
"[/codeblock]"
msgstr ""
@@ -13833,7 +13833,7 @@ msgid ""
"Example of usage with custom scene instance:\n"
"[codeblock]\n"
"func _make_custom_tooltip(for_text):\n"
-" var tooltip = preload(\"SomeTooltipScene.tscn\").instance()\n"
+" var tooltip = preload(\"SomeTooltipScene.tscn\").instantiate()\n"
" tooltip.get_node(\"Label\").text = for_text\n"
" return tooltip\n"
"[/codeblock]"
@@ -33044,7 +33044,7 @@ msgid ""
"to delete instances of it manually. To do so, call the [method free] method "
"from your script or delete the instance from C++.\n"
"Some classes that extend Object add memory management. This is the case of "
-"[Reference], which counts references and deletes itself automatically when "
+"[RefCounted], which counts references and deletes itself automatically when "
"no longer referenced. [Node], another fundamental type, deletes all its "
"children when freed from memory.\n"
"Objects export properties, which are mainly useful for storage and editing, "
@@ -33063,12 +33063,12 @@ msgid ""
"Objects also receive notifications. Notifications are a simple way to notify "
"the object about different events, so they can all be handled together. See "
"[method _notification].\n"
-"[b]Note:[/b] Unlike references to a [Reference], references to an Object "
+"[b]Note:[/b] Unlike references to a [RefCounted], references to an Object "
"stored in a variable can become invalid without warning. Therefore, it's "
-"recommended to use [Reference] for data classes instead of [Object]."
+"recommended to use [RefCounted] for data classes instead of [Object]."
msgstr ""
-#: doc/classes/Object.xml:23 doc/classes/Reference.xml:12
+#: doc/classes/Object.xml:23 doc/classes/RefCounted.xml:12
#: doc/classes/Resource.xml:11
msgid ""
"https://docs.godotengine.org/en/latest/getting_started/workflow/"
@@ -34565,7 +34565,7 @@ msgid "Changes the [Color] at the given index."
msgstr ""
#: doc/classes/PackedDataContainerRef.xml:4
-msgid "Reference version of [PackedDataContainer]."
+msgid "RefCounted version of [PackedDataContainer]."
msgstr ""
#: doc/classes/PackedFloat32Array.xml:4
@@ -34699,7 +34699,7 @@ msgid ""
"[codeblock]\n"
"# Use `load()` instead of `preload()` if the path isn't known at compile-"
"time.\n"
-"var scene = preload(\"res://scene.tscn\").instance()\n"
+"var scene = preload(\"res://scene.tscn\").instantiate()\n"
"# Add the node as a child of the node the script is attached to.\n"
"add_child(scene)\n"
"[/codeblock]\n"
@@ -41773,30 +41773,30 @@ msgid ""
"the half extents."
msgstr ""
-#: doc/classes/Reference.xml:4
+#: doc/classes/RefCounted.xml:4
msgid "Base class for reference-counted objects."
msgstr ""
-#: doc/classes/Reference.xml:7
+#: doc/classes/RefCounted.xml:7
msgid ""
"Base class for any object that keeps a reference count. [Resource] and many "
"other helper objects inherit this class.\n"
"Unlike [Object]s, References keep an internal reference counter so that they "
"are automatically released when no longer in use, and only then. References "
"therefore do not need to be freed manually with [method Object.free].\n"
-"In the vast majority of use cases, instantiating and using [Reference]-"
+"In the vast majority of use cases, instantiating and using [RefCounted]-"
"derived types is all you need to do. The methods provided in this class are "
"only for advanced users, and can cause issues if misused."
msgstr ""
-#: doc/classes/Reference.xml:19
+#: doc/classes/RefCounted.xml:19
msgid ""
"Initializes the internal reference counter. Use this only if you really know "
"what you are doing.\n"
"Returns whether the initialization was successful."
msgstr ""
-#: doc/classes/Reference.xml:27
+#: doc/classes/RefCounted.xml:27
msgid ""
"Increments the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -41804,7 +41804,7 @@ msgid ""
"code] otherwise."
msgstr ""
-#: doc/classes/Reference.xml:35
+#: doc/classes/RefCounted.xml:35
msgid ""
"Decrements the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -54068,7 +54068,7 @@ msgid ""
"[codeblock]\n"
"var foo = 2 # foo is dynamically an integer\n"
"foo = \"Now foo is a string!\"\n"
-"foo = Reference.new() # foo is an Object\n"
+"foo = RefCounted.new() # foo is an Object\n"
"var bar: int = 2 # bar is a statically typed integer.\n"
"# bar = \"Uh oh! I can't make static variables become a different type!\"\n"
"[/codeblock]\n"
@@ -59149,7 +59149,7 @@ msgstr ""
#: doc/classes/WeakRef.xml:7
msgid ""
-"A weakref can hold a [Reference], without contributing to the reference "
+"A weakref can hold a [RefCounted], without contributing to the reference "
"counter. A weakref can be created from an [Object] using [method @GDScript."
"weakref]. If this object is not a reference, weakref still works, however, "
"it does not have any effect on the object. Weakrefs are useful in cases "
diff --git a/doc/translations/nl.po b/doc/translations/nl.po
index 032ff95bdb..c0dc01c653 100644
--- a/doc/translations/nl.po
+++ b/doc/translations/nl.po
@@ -735,7 +735,7 @@ msgid ""
"the FileSystem dock into the script.\n"
"[codeblock]\n"
"# Instance a scene.\n"
-"var diamond = preload(\"res://diamond.tscn\").instance()\n"
+"var diamond = preload(\"res://diamond.tscn\").instantiate()\n"
"[/codeblock]"
msgstr ""
@@ -13859,7 +13859,7 @@ msgid ""
"Example of usage with custom scene instance:\n"
"[codeblock]\n"
"func _make_custom_tooltip(for_text):\n"
-" var tooltip = preload(\"SomeTooltipScene.tscn\").instance()\n"
+" var tooltip = preload(\"SomeTooltipScene.tscn\").instantiate()\n"
" tooltip.get_node(\"Label\").text = for_text\n"
" return tooltip\n"
"[/codeblock]"
@@ -33070,7 +33070,7 @@ msgid ""
"to delete instances of it manually. To do so, call the [method free] method "
"from your script or delete the instance from C++.\n"
"Some classes that extend Object add memory management. This is the case of "
-"[Reference], which counts references and deletes itself automatically when "
+"[RefCounted], which counts references and deletes itself automatically when "
"no longer referenced. [Node], another fundamental type, deletes all its "
"children when freed from memory.\n"
"Objects export properties, which are mainly useful for storage and editing, "
@@ -33089,12 +33089,12 @@ msgid ""
"Objects also receive notifications. Notifications are a simple way to notify "
"the object about different events, so they can all be handled together. See "
"[method _notification].\n"
-"[b]Note:[/b] Unlike references to a [Reference], references to an Object "
+"[b]Note:[/b] Unlike references to a [RefCounted], references to an Object "
"stored in a variable can become invalid without warning. Therefore, it's "
-"recommended to use [Reference] for data classes instead of [Object]."
+"recommended to use [RefCounted] for data classes instead of [Object]."
msgstr ""
-#: doc/classes/Object.xml:23 doc/classes/Reference.xml:12
+#: doc/classes/Object.xml:23 doc/classes/RefCounted.xml:12
#: doc/classes/Resource.xml:11
msgid ""
"https://docs.godotengine.org/en/latest/getting_started/workflow/"
@@ -34591,7 +34591,7 @@ msgid "Changes the [Color] at the given index."
msgstr ""
#: doc/classes/PackedDataContainerRef.xml:4
-msgid "Reference version of [PackedDataContainer]."
+msgid "RefCounted version of [PackedDataContainer]."
msgstr ""
#: doc/classes/PackedFloat32Array.xml:4
@@ -34725,7 +34725,7 @@ msgid ""
"[codeblock]\n"
"# Use `load()` instead of `preload()` if the path isn't known at compile-"
"time.\n"
-"var scene = preload(\"res://scene.tscn\").instance()\n"
+"var scene = preload(\"res://scene.tscn\").instantiate()\n"
"# Add the node as a child of the node the script is attached to.\n"
"add_child(scene)\n"
"[/codeblock]\n"
@@ -41799,30 +41799,30 @@ msgid ""
"the half extents."
msgstr ""
-#: doc/classes/Reference.xml:4
+#: doc/classes/RefCounted.xml:4
msgid "Base class for reference-counted objects."
msgstr ""
-#: doc/classes/Reference.xml:7
+#: doc/classes/RefCounted.xml:7
msgid ""
"Base class for any object that keeps a reference count. [Resource] and many "
"other helper objects inherit this class.\n"
"Unlike [Object]s, References keep an internal reference counter so that they "
"are automatically released when no longer in use, and only then. References "
"therefore do not need to be freed manually with [method Object.free].\n"
-"In the vast majority of use cases, instantiating and using [Reference]-"
+"In the vast majority of use cases, instantiating and using [RefCounted]-"
"derived types is all you need to do. The methods provided in this class are "
"only for advanced users, and can cause issues if misused."
msgstr ""
-#: doc/classes/Reference.xml:19
+#: doc/classes/RefCounted.xml:19
msgid ""
"Initializes the internal reference counter. Use this only if you really know "
"what you are doing.\n"
"Returns whether the initialization was successful."
msgstr ""
-#: doc/classes/Reference.xml:27
+#: doc/classes/RefCounted.xml:27
msgid ""
"Increments the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -41830,7 +41830,7 @@ msgid ""
"code] otherwise."
msgstr ""
-#: doc/classes/Reference.xml:35
+#: doc/classes/RefCounted.xml:35
msgid ""
"Decrements the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -54094,7 +54094,7 @@ msgid ""
"[codeblock]\n"
"var foo = 2 # foo is dynamically an integer\n"
"foo = \"Now foo is a string!\"\n"
-"foo = Reference.new() # foo is an Object\n"
+"foo = RefCounted.new() # foo is an Object\n"
"var bar: int = 2 # bar is a statically typed integer.\n"
"# bar = \"Uh oh! I can't make static variables become a different type!\"\n"
"[/codeblock]\n"
@@ -59173,7 +59173,7 @@ msgstr ""
#: doc/classes/WeakRef.xml:7
msgid ""
-"A weakref can hold a [Reference], without contributing to the reference "
+"A weakref can hold a [RefCounted], without contributing to the reference "
"counter. A weakref can be created from an [Object] using [method @GDScript."
"weakref]. If this object is not a reference, weakref still works, however, "
"it does not have any effect on the object. Weakrefs are useful in cases "
diff --git a/doc/translations/pl.po b/doc/translations/pl.po
index b0c94b55be..2664f263cb 100644
--- a/doc/translations/pl.po
+++ b/doc/translations/pl.po
@@ -737,7 +737,7 @@ msgid ""
"the FileSystem dock into the script.\n"
"[codeblock]\n"
"# Instance a scene.\n"
-"var diamond = preload(\"res://diamond.tscn\").instance()\n"
+"var diamond = preload(\"res://diamond.tscn\").instantiate()\n"
"[/codeblock]"
msgstr ""
@@ -13877,7 +13877,7 @@ msgid ""
"Example of usage with custom scene instance:\n"
"[codeblock]\n"
"func _make_custom_tooltip(for_text):\n"
-" var tooltip = preload(\"SomeTooltipScene.tscn\").instance()\n"
+" var tooltip = preload(\"SomeTooltipScene.tscn\").instantiate()\n"
" tooltip.get_node(\"Label\").text = for_text\n"
" return tooltip\n"
"[/codeblock]"
@@ -33089,7 +33089,7 @@ msgid ""
"to delete instances of it manually. To do so, call the [method free] method "
"from your script or delete the instance from C++.\n"
"Some classes that extend Object add memory management. This is the case of "
-"[Reference], which counts references and deletes itself automatically when "
+"[RefCounted], which counts references and deletes itself automatically when "
"no longer referenced. [Node], another fundamental type, deletes all its "
"children when freed from memory.\n"
"Objects export properties, which are mainly useful for storage and editing, "
@@ -33108,12 +33108,12 @@ msgid ""
"Objects also receive notifications. Notifications are a simple way to notify "
"the object about different events, so they can all be handled together. See "
"[method _notification].\n"
-"[b]Note:[/b] Unlike references to a [Reference], references to an Object "
+"[b]Note:[/b] Unlike references to a [RefCounted], references to an Object "
"stored in a variable can become invalid without warning. Therefore, it's "
-"recommended to use [Reference] for data classes instead of [Object]."
+"recommended to use [RefCounted] for data classes instead of [Object]."
msgstr ""
-#: doc/classes/Object.xml:23 doc/classes/Reference.xml:12
+#: doc/classes/Object.xml:23 doc/classes/RefCounted.xml:12
#: doc/classes/Resource.xml:11
msgid ""
"https://docs.godotengine.org/en/latest/getting_started/workflow/"
@@ -34610,7 +34610,7 @@ msgid "Changes the [Color] at the given index."
msgstr ""
#: doc/classes/PackedDataContainerRef.xml:4
-msgid "Reference version of [PackedDataContainer]."
+msgid "RefCounted version of [PackedDataContainer]."
msgstr ""
#: doc/classes/PackedFloat32Array.xml:4
@@ -34744,7 +34744,7 @@ msgid ""
"[codeblock]\n"
"# Use `load()` instead of `preload()` if the path isn't known at compile-"
"time.\n"
-"var scene = preload(\"res://scene.tscn\").instance()\n"
+"var scene = preload(\"res://scene.tscn\").instantiate()\n"
"# Add the node as a child of the node the script is attached to.\n"
"add_child(scene)\n"
"[/codeblock]\n"
@@ -41818,30 +41818,30 @@ msgid ""
"the half extents."
msgstr ""
-#: doc/classes/Reference.xml:4
+#: doc/classes/RefCounted.xml:4
msgid "Base class for reference-counted objects."
msgstr ""
-#: doc/classes/Reference.xml:7
+#: doc/classes/RefCounted.xml:7
msgid ""
"Base class for any object that keeps a reference count. [Resource] and many "
"other helper objects inherit this class.\n"
"Unlike [Object]s, References keep an internal reference counter so that they "
"are automatically released when no longer in use, and only then. References "
"therefore do not need to be freed manually with [method Object.free].\n"
-"In the vast majority of use cases, instantiating and using [Reference]-"
+"In the vast majority of use cases, instantiating and using [RefCounted]-"
"derived types is all you need to do. The methods provided in this class are "
"only for advanced users, and can cause issues if misused."
msgstr ""
-#: doc/classes/Reference.xml:19
+#: doc/classes/RefCounted.xml:19
msgid ""
"Initializes the internal reference counter. Use this only if you really know "
"what you are doing.\n"
"Returns whether the initialization was successful."
msgstr ""
-#: doc/classes/Reference.xml:27
+#: doc/classes/RefCounted.xml:27
msgid ""
"Increments the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -41849,7 +41849,7 @@ msgid ""
"code] otherwise."
msgstr ""
-#: doc/classes/Reference.xml:35
+#: doc/classes/RefCounted.xml:35
msgid ""
"Decrements the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -54117,7 +54117,7 @@ msgid ""
"[codeblock]\n"
"var foo = 2 # foo is dynamically an integer\n"
"foo = \"Now foo is a string!\"\n"
-"foo = Reference.new() # foo is an Object\n"
+"foo = RefCounted.new() # foo is an Object\n"
"var bar: int = 2 # bar is a statically typed integer.\n"
"# bar = \"Uh oh! I can't make static variables become a different type!\"\n"
"[/codeblock]\n"
@@ -59203,7 +59203,7 @@ msgstr ""
#: doc/classes/WeakRef.xml:7
msgid ""
-"A weakref can hold a [Reference], without contributing to the reference "
+"A weakref can hold a [RefCounted], without contributing to the reference "
"counter. A weakref can be created from an [Object] using [method @GDScript."
"weakref]. If this object is not a reference, weakref still works, however, "
"it does not have any effect on the object. Weakrefs are useful in cases "
diff --git a/doc/translations/pt_BR.po b/doc/translations/pt_BR.po
index a508d38859..f86bed9585 100644
--- a/doc/translations/pt_BR.po
+++ b/doc/translations/pt_BR.po
@@ -748,7 +748,7 @@ msgid ""
"the FileSystem dock into the script.\n"
"[codeblock]\n"
"# Instance a scene.\n"
-"var diamond = preload(\"res://diamond.tscn\").instance()\n"
+"var diamond = preload(\"res://diamond.tscn\").instantiate()\n"
"[/codeblock]"
msgstr ""
@@ -13872,7 +13872,7 @@ msgid ""
"Example of usage with custom scene instance:\n"
"[codeblock]\n"
"func _make_custom_tooltip(for_text):\n"
-" var tooltip = preload(\"SomeTooltipScene.tscn\").instance()\n"
+" var tooltip = preload(\"SomeTooltipScene.tscn\").instantiate()\n"
" tooltip.get_node(\"Label\").text = for_text\n"
" return tooltip\n"
"[/codeblock]"
@@ -33083,7 +33083,7 @@ msgid ""
"to delete instances of it manually. To do so, call the [method free] method "
"from your script or delete the instance from C++.\n"
"Some classes that extend Object add memory management. This is the case of "
-"[Reference], which counts references and deletes itself automatically when "
+"[RefCounted], which counts references and deletes itself automatically when "
"no longer referenced. [Node], another fundamental type, deletes all its "
"children when freed from memory.\n"
"Objects export properties, which are mainly useful for storage and editing, "
@@ -33102,12 +33102,12 @@ msgid ""
"Objects also receive notifications. Notifications are a simple way to notify "
"the object about different events, so they can all be handled together. See "
"[method _notification].\n"
-"[b]Note:[/b] Unlike references to a [Reference], references to an Object "
+"[b]Note:[/b] Unlike references to a [RefCounted], references to an Object "
"stored in a variable can become invalid without warning. Therefore, it's "
-"recommended to use [Reference] for data classes instead of [Object]."
+"recommended to use [RefCounted] for data classes instead of [Object]."
msgstr ""
-#: doc/classes/Object.xml:23 doc/classes/Reference.xml:12
+#: doc/classes/Object.xml:23 doc/classes/RefCounted.xml:12
#: doc/classes/Resource.xml:11
msgid ""
"https://docs.godotengine.org/en/latest/getting_started/workflow/"
@@ -34604,7 +34604,7 @@ msgid "Changes the [Color] at the given index."
msgstr ""
#: doc/classes/PackedDataContainerRef.xml:4
-msgid "Reference version of [PackedDataContainer]."
+msgid "RefCounted version of [PackedDataContainer]."
msgstr ""
#: doc/classes/PackedFloat32Array.xml:4
@@ -34738,7 +34738,7 @@ msgid ""
"[codeblock]\n"
"# Use `load()` instead of `preload()` if the path isn't known at compile-"
"time.\n"
-"var scene = preload(\"res://scene.tscn\").instance()\n"
+"var scene = preload(\"res://scene.tscn\").instantiate()\n"
"# Add the node as a child of the node the script is attached to.\n"
"add_child(scene)\n"
"[/codeblock]\n"
@@ -41812,30 +41812,30 @@ msgid ""
"the half extents."
msgstr ""
-#: doc/classes/Reference.xml:4
+#: doc/classes/RefCounted.xml:4
msgid "Base class for reference-counted objects."
msgstr ""
-#: doc/classes/Reference.xml:7
+#: doc/classes/RefCounted.xml:7
msgid ""
"Base class for any object that keeps a reference count. [Resource] and many "
"other helper objects inherit this class.\n"
"Unlike [Object]s, References keep an internal reference counter so that they "
"are automatically released when no longer in use, and only then. References "
"therefore do not need to be freed manually with [method Object.free].\n"
-"In the vast majority of use cases, instantiating and using [Reference]-"
+"In the vast majority of use cases, instantiating and using [RefCounted]-"
"derived types is all you need to do. The methods provided in this class are "
"only for advanced users, and can cause issues if misused."
msgstr ""
-#: doc/classes/Reference.xml:19
+#: doc/classes/RefCounted.xml:19
msgid ""
"Initializes the internal reference counter. Use this only if you really know "
"what you are doing.\n"
"Returns whether the initialization was successful."
msgstr ""
-#: doc/classes/Reference.xml:27
+#: doc/classes/RefCounted.xml:27
msgid ""
"Increments the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -41843,7 +41843,7 @@ msgid ""
"code] otherwise."
msgstr ""
-#: doc/classes/Reference.xml:35
+#: doc/classes/RefCounted.xml:35
msgid ""
"Decrements the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -54108,7 +54108,7 @@ msgid ""
"[codeblock]\n"
"var foo = 2 # foo is dynamically an integer\n"
"foo = \"Now foo is a string!\"\n"
-"foo = Reference.new() # foo is an Object\n"
+"foo = RefCounted.new() # foo is an Object\n"
"var bar: int = 2 # bar is a statically typed integer.\n"
"# bar = \"Uh oh! I can't make static variables become a different type!\"\n"
"[/codeblock]\n"
@@ -59194,7 +59194,7 @@ msgstr ""
#: doc/classes/WeakRef.xml:7
msgid ""
-"A weakref can hold a [Reference], without contributing to the reference "
+"A weakref can hold a [RefCounted], without contributing to the reference "
"counter. A weakref can be created from an [Object] using [method @GDScript."
"weakref]. If this object is not a reference, weakref still works, however, "
"it does not have any effect on the object. Weakrefs are useful in cases "
diff --git a/doc/translations/ro.po b/doc/translations/ro.po
index 96c0161312..b25c3911cc 100644
--- a/doc/translations/ro.po
+++ b/doc/translations/ro.po
@@ -709,7 +709,7 @@ msgid ""
"the FileSystem dock into the script.\n"
"[codeblock]\n"
"# Instance a scene.\n"
-"var diamond = preload(\"res://diamond.tscn\").instance()\n"
+"var diamond = preload(\"res://diamond.tscn\").instantiate()\n"
"[/codeblock]"
msgstr ""
@@ -13833,7 +13833,7 @@ msgid ""
"Example of usage with custom scene instance:\n"
"[codeblock]\n"
"func _make_custom_tooltip(for_text):\n"
-" var tooltip = preload(\"SomeTooltipScene.tscn\").instance()\n"
+" var tooltip = preload(\"SomeTooltipScene.tscn\").instantiate()\n"
" tooltip.get_node(\"Label\").text = for_text\n"
" return tooltip\n"
"[/codeblock]"
@@ -33044,7 +33044,7 @@ msgid ""
"to delete instances of it manually. To do so, call the [method free] method "
"from your script or delete the instance from C++.\n"
"Some classes that extend Object add memory management. This is the case of "
-"[Reference], which counts references and deletes itself automatically when "
+"[RefCounted], which counts references and deletes itself automatically when "
"no longer referenced. [Node], another fundamental type, deletes all its "
"children when freed from memory.\n"
"Objects export properties, which are mainly useful for storage and editing, "
@@ -33063,12 +33063,12 @@ msgid ""
"Objects also receive notifications. Notifications are a simple way to notify "
"the object about different events, so they can all be handled together. See "
"[method _notification].\n"
-"[b]Note:[/b] Unlike references to a [Reference], references to an Object "
+"[b]Note:[/b] Unlike references to a [RefCounted], references to an Object "
"stored in a variable can become invalid without warning. Therefore, it's "
-"recommended to use [Reference] for data classes instead of [Object]."
+"recommended to use [RefCounted] for data classes instead of [Object]."
msgstr ""
-#: doc/classes/Object.xml:23 doc/classes/Reference.xml:12
+#: doc/classes/Object.xml:23 doc/classes/RefCounted.xml:12
#: doc/classes/Resource.xml:11
msgid ""
"https://docs.godotengine.org/en/latest/getting_started/workflow/"
@@ -34565,7 +34565,7 @@ msgid "Changes the [Color] at the given index."
msgstr ""
#: doc/classes/PackedDataContainerRef.xml:4
-msgid "Reference version of [PackedDataContainer]."
+msgid "RefCounted version of [PackedDataContainer]."
msgstr ""
#: doc/classes/PackedFloat32Array.xml:4
@@ -34699,7 +34699,7 @@ msgid ""
"[codeblock]\n"
"# Use `load()` instead of `preload()` if the path isn't known at compile-"
"time.\n"
-"var scene = preload(\"res://scene.tscn\").instance()\n"
+"var scene = preload(\"res://scene.tscn\").instantiate()\n"
"# Add the node as a child of the node the script is attached to.\n"
"add_child(scene)\n"
"[/codeblock]\n"
@@ -41773,30 +41773,30 @@ msgid ""
"the half extents."
msgstr ""
-#: doc/classes/Reference.xml:4
+#: doc/classes/RefCounted.xml:4
msgid "Base class for reference-counted objects."
msgstr ""
-#: doc/classes/Reference.xml:7
+#: doc/classes/RefCounted.xml:7
msgid ""
"Base class for any object that keeps a reference count. [Resource] and many "
"other helper objects inherit this class.\n"
"Unlike [Object]s, References keep an internal reference counter so that they "
"are automatically released when no longer in use, and only then. References "
"therefore do not need to be freed manually with [method Object.free].\n"
-"In the vast majority of use cases, instantiating and using [Reference]-"
+"In the vast majority of use cases, instantiating and using [RefCounted]-"
"derived types is all you need to do. The methods provided in this class are "
"only for advanced users, and can cause issues if misused."
msgstr ""
-#: doc/classes/Reference.xml:19
+#: doc/classes/RefCounted.xml:19
msgid ""
"Initializes the internal reference counter. Use this only if you really know "
"what you are doing.\n"
"Returns whether the initialization was successful."
msgstr ""
-#: doc/classes/Reference.xml:27
+#: doc/classes/RefCounted.xml:27
msgid ""
"Increments the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -41804,7 +41804,7 @@ msgid ""
"code] otherwise."
msgstr ""
-#: doc/classes/Reference.xml:35
+#: doc/classes/RefCounted.xml:35
msgid ""
"Decrements the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -54068,7 +54068,7 @@ msgid ""
"[codeblock]\n"
"var foo = 2 # foo is dynamically an integer\n"
"foo = \"Now foo is a string!\"\n"
-"foo = Reference.new() # foo is an Object\n"
+"foo = RefCounted.new() # foo is an Object\n"
"var bar: int = 2 # bar is a statically typed integer.\n"
"# bar = \"Uh oh! I can't make static variables become a different type!\"\n"
"[/codeblock]\n"
@@ -59147,7 +59147,7 @@ msgstr ""
#: doc/classes/WeakRef.xml:7
msgid ""
-"A weakref can hold a [Reference], without contributing to the reference "
+"A weakref can hold a [RefCounted], without contributing to the reference "
"counter. A weakref can be created from an [Object] using [method @GDScript."
"weakref]. If this object is not a reference, weakref still works, however, "
"it does not have any effect on the object. Weakrefs are useful in cases "
diff --git a/doc/translations/ru.po b/doc/translations/ru.po
index 1108967bc9..cf5289d7f9 100644
--- a/doc/translations/ru.po
+++ b/doc/translations/ru.po
@@ -1072,7 +1072,7 @@ msgid ""
"the FileSystem dock into the script.\n"
"[codeblock]\n"
"# Instance a scene.\n"
-"var diamond = preload(\"res://diamond.tscn\").instance()\n"
+"var diamond = preload(\"res://diamond.tscn\").instantiate()\n"
"[/codeblock]"
msgstr ""
@@ -14338,7 +14338,7 @@ msgid ""
"Example of usage with custom scene instance:\n"
"[codeblock]\n"
"func _make_custom_tooltip(for_text):\n"
-" var tooltip = preload(\"SomeTooltipScene.tscn\").instance()\n"
+" var tooltip = preload(\"SomeTooltipScene.tscn\").instantiate()\n"
" tooltip.get_node(\"Label\").text = for_text\n"
" return tooltip\n"
"[/codeblock]"
@@ -33581,7 +33581,7 @@ msgid ""
"to delete instances of it manually. To do so, call the [method free] method "
"from your script or delete the instance from C++.\n"
"Some classes that extend Object add memory management. This is the case of "
-"[Reference], which counts references and deletes itself automatically when "
+"[RefCounted], which counts references and deletes itself automatically when "
"no longer referenced. [Node], another fundamental type, deletes all its "
"children when freed from memory.\n"
"Objects export properties, which are mainly useful for storage and editing, "
@@ -33600,12 +33600,12 @@ msgid ""
"Objects also receive notifications. Notifications are a simple way to notify "
"the object about different events, so they can all be handled together. See "
"[method _notification].\n"
-"[b]Note:[/b] Unlike references to a [Reference], references to an Object "
+"[b]Note:[/b] Unlike references to a [RefCounted], references to an Object "
"stored in a variable can become invalid without warning. Therefore, it's "
-"recommended to use [Reference] for data classes instead of [Object]."
+"recommended to use [RefCounted] for data classes instead of [Object]."
msgstr ""
-#: doc/classes/Object.xml:23 doc/classes/Reference.xml:12
+#: doc/classes/Object.xml:23 doc/classes/RefCounted.xml:12
#: doc/classes/Resource.xml:11
msgid ""
"https://docs.godotengine.org/en/latest/getting_started/workflow/"
@@ -35104,7 +35104,7 @@ msgid "Changes the [Color] at the given index."
msgstr ""
#: doc/classes/PackedDataContainerRef.xml:4
-msgid "Reference version of [PackedDataContainer]."
+msgid "RefCounted version of [PackedDataContainer]."
msgstr ""
#: doc/classes/PackedFloat32Array.xml:4
@@ -35238,7 +35238,7 @@ msgid ""
"[codeblock]\n"
"# Use `load()` instead of `preload()` if the path isn't known at compile-"
"time.\n"
-"var scene = preload(\"res://scene.tscn\").instance()\n"
+"var scene = preload(\"res://scene.tscn\").instantiate()\n"
"# Add the node as a child of the node the script is attached to.\n"
"add_child(scene)\n"
"[/codeblock]\n"
@@ -42362,30 +42362,30 @@ msgid ""
"the half extents."
msgstr ""
-#: doc/classes/Reference.xml:4
+#: doc/classes/RefCounted.xml:4
msgid "Base class for reference-counted objects."
msgstr ""
-#: doc/classes/Reference.xml:7
+#: doc/classes/RefCounted.xml:7
msgid ""
"Base class for any object that keeps a reference count. [Resource] and many "
"other helper objects inherit this class.\n"
"Unlike [Object]s, References keep an internal reference counter so that they "
"are automatically released when no longer in use, and only then. References "
"therefore do not need to be freed manually with [method Object.free].\n"
-"In the vast majority of use cases, instantiating and using [Reference]-"
+"In the vast majority of use cases, instantiating and using [RefCounted]-"
"derived types is all you need to do. The methods provided in this class are "
"only for advanced users, and can cause issues if misused."
msgstr ""
-#: doc/classes/Reference.xml:19
+#: doc/classes/RefCounted.xml:19
msgid ""
"Initializes the internal reference counter. Use this only if you really know "
"what you are doing.\n"
"Returns whether the initialization was successful."
msgstr ""
-#: doc/classes/Reference.xml:27
+#: doc/classes/RefCounted.xml:27
msgid ""
"Increments the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -42393,7 +42393,7 @@ msgid ""
"code] otherwise."
msgstr ""
-#: doc/classes/Reference.xml:35
+#: doc/classes/RefCounted.xml:35
msgid ""
"Decrements the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -54666,7 +54666,7 @@ msgid ""
"[codeblock]\n"
"var foo = 2 # foo is dynamically an integer\n"
"foo = \"Now foo is a string!\"\n"
-"foo = Reference.new() # foo is an Object\n"
+"foo = RefCounted.new() # foo is an Object\n"
"var bar: int = 2 # bar is a statically typed integer.\n"
"# bar = \"Uh oh! I can't make static variables become a different type!\"\n"
"[/codeblock]\n"
@@ -59891,7 +59891,7 @@ msgstr ""
#: doc/classes/WeakRef.xml:7
msgid ""
-"A weakref can hold a [Reference], without contributing to the reference "
+"A weakref can hold a [RefCounted], without contributing to the reference "
"counter. A weakref can be created from an [Object] using [method @GDScript."
"weakref]. If this object is not a reference, weakref still works, however, "
"it does not have any effect on the object. Weakrefs are useful in cases "
diff --git a/doc/translations/sr_Cyrl.po b/doc/translations/sr_Cyrl.po
index d7d2911b97..06399d5e87 100644
--- a/doc/translations/sr_Cyrl.po
+++ b/doc/translations/sr_Cyrl.po
@@ -719,7 +719,7 @@ msgid ""
"the FileSystem dock into the script.\n"
"[codeblock]\n"
"# Instance a scene.\n"
-"var diamond = preload(\"res://diamond.tscn\").instance()\n"
+"var diamond = preload(\"res://diamond.tscn\").instantiate()\n"
"[/codeblock]"
msgstr ""
@@ -13843,7 +13843,7 @@ msgid ""
"Example of usage with custom scene instance:\n"
"[codeblock]\n"
"func _make_custom_tooltip(for_text):\n"
-" var tooltip = preload(\"SomeTooltipScene.tscn\").instance()\n"
+" var tooltip = preload(\"SomeTooltipScene.tscn\").instantiate()\n"
" tooltip.get_node(\"Label\").text = for_text\n"
" return tooltip\n"
"[/codeblock]"
@@ -33054,7 +33054,7 @@ msgid ""
"to delete instances of it manually. To do so, call the [method free] method "
"from your script or delete the instance from C++.\n"
"Some classes that extend Object add memory management. This is the case of "
-"[Reference], which counts references and deletes itself automatically when "
+"[RefCounted], which counts references and deletes itself automatically when "
"no longer referenced. [Node], another fundamental type, deletes all its "
"children when freed from memory.\n"
"Objects export properties, which are mainly useful for storage and editing, "
@@ -33073,12 +33073,12 @@ msgid ""
"Objects also receive notifications. Notifications are a simple way to notify "
"the object about different events, so they can all be handled together. See "
"[method _notification].\n"
-"[b]Note:[/b] Unlike references to a [Reference], references to an Object "
+"[b]Note:[/b] Unlike references to a [RefCounted], references to an Object "
"stored in a variable can become invalid without warning. Therefore, it's "
-"recommended to use [Reference] for data classes instead of [Object]."
+"recommended to use [RefCounted] for data classes instead of [Object]."
msgstr ""
-#: doc/classes/Object.xml:23 doc/classes/Reference.xml:12
+#: doc/classes/Object.xml:23 doc/classes/RefCounted.xml:12
#: doc/classes/Resource.xml:11
msgid ""
"https://docs.godotengine.org/en/latest/getting_started/workflow/"
@@ -34575,7 +34575,7 @@ msgid "Changes the [Color] at the given index."
msgstr ""
#: doc/classes/PackedDataContainerRef.xml:4
-msgid "Reference version of [PackedDataContainer]."
+msgid "RefCounted version of [PackedDataContainer]."
msgstr ""
#: doc/classes/PackedFloat32Array.xml:4
@@ -34709,7 +34709,7 @@ msgid ""
"[codeblock]\n"
"# Use `load()` instead of `preload()` if the path isn't known at compile-"
"time.\n"
-"var scene = preload(\"res://scene.tscn\").instance()\n"
+"var scene = preload(\"res://scene.tscn\").instantiate()\n"
"# Add the node as a child of the node the script is attached to.\n"
"add_child(scene)\n"
"[/codeblock]\n"
@@ -41783,30 +41783,30 @@ msgid ""
"the half extents."
msgstr ""
-#: doc/classes/Reference.xml:4
+#: doc/classes/RefCounted.xml:4
msgid "Base class for reference-counted objects."
msgstr ""
-#: doc/classes/Reference.xml:7
+#: doc/classes/RefCounted.xml:7
msgid ""
"Base class for any object that keeps a reference count. [Resource] and many "
"other helper objects inherit this class.\n"
"Unlike [Object]s, References keep an internal reference counter so that they "
"are automatically released when no longer in use, and only then. References "
"therefore do not need to be freed manually with [method Object.free].\n"
-"In the vast majority of use cases, instantiating and using [Reference]-"
+"In the vast majority of use cases, instantiating and using [RefCounted]-"
"derived types is all you need to do. The methods provided in this class are "
"only for advanced users, and can cause issues if misused."
msgstr ""
-#: doc/classes/Reference.xml:19
+#: doc/classes/RefCounted.xml:19
msgid ""
"Initializes the internal reference counter. Use this only if you really know "
"what you are doing.\n"
"Returns whether the initialization was successful."
msgstr ""
-#: doc/classes/Reference.xml:27
+#: doc/classes/RefCounted.xml:27
msgid ""
"Increments the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -41814,7 +41814,7 @@ msgid ""
"code] otherwise."
msgstr ""
-#: doc/classes/Reference.xml:35
+#: doc/classes/RefCounted.xml:35
msgid ""
"Decrements the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -54078,7 +54078,7 @@ msgid ""
"[codeblock]\n"
"var foo = 2 # foo is dynamically an integer\n"
"foo = \"Now foo is a string!\"\n"
-"foo = Reference.new() # foo is an Object\n"
+"foo = RefCounted.new() # foo is an Object\n"
"var bar: int = 2 # bar is a statically typed integer.\n"
"# bar = \"Uh oh! I can't make static variables become a different type!\"\n"
"[/codeblock]\n"
@@ -59157,7 +59157,7 @@ msgstr ""
#: doc/classes/WeakRef.xml:7
msgid ""
-"A weakref can hold a [Reference], without contributing to the reference "
+"A weakref can hold a [RefCounted], without contributing to the reference "
"counter. A weakref can be created from an [Object] using [method @GDScript."
"weakref]. If this object is not a reference, weakref still works, however, "
"it does not have any effect on the object. Weakrefs are useful in cases "
diff --git a/doc/translations/th.po b/doc/translations/th.po
index 5031ecfb0e..cdf1c6d7e2 100644
--- a/doc/translations/th.po
+++ b/doc/translations/th.po
@@ -725,7 +725,7 @@ msgid ""
"the FileSystem dock into the script.\n"
"[codeblock]\n"
"# Instance a scene.\n"
-"var diamond = preload(\"res://diamond.tscn\").instance()\n"
+"var diamond = preload(\"res://diamond.tscn\").instantiate()\n"
"[/codeblock]"
msgstr ""
@@ -13849,7 +13849,7 @@ msgid ""
"Example of usage with custom scene instance:\n"
"[codeblock]\n"
"func _make_custom_tooltip(for_text):\n"
-" var tooltip = preload(\"SomeTooltipScene.tscn\").instance()\n"
+" var tooltip = preload(\"SomeTooltipScene.tscn\").instantiate()\n"
" tooltip.get_node(\"Label\").text = for_text\n"
" return tooltip\n"
"[/codeblock]"
@@ -33060,7 +33060,7 @@ msgid ""
"to delete instances of it manually. To do so, call the [method free] method "
"from your script or delete the instance from C++.\n"
"Some classes that extend Object add memory management. This is the case of "
-"[Reference], which counts references and deletes itself automatically when "
+"[RefCounted], which counts references and deletes itself automatically when "
"no longer referenced. [Node], another fundamental type, deletes all its "
"children when freed from memory.\n"
"Objects export properties, which are mainly useful for storage and editing, "
@@ -33079,12 +33079,12 @@ msgid ""
"Objects also receive notifications. Notifications are a simple way to notify "
"the object about different events, so they can all be handled together. See "
"[method _notification].\n"
-"[b]Note:[/b] Unlike references to a [Reference], references to an Object "
+"[b]Note:[/b] Unlike references to a [RefCounted], references to an Object "
"stored in a variable can become invalid without warning. Therefore, it's "
-"recommended to use [Reference] for data classes instead of [Object]."
+"recommended to use [RefCounted] for data classes instead of [Object]."
msgstr ""
-#: doc/classes/Object.xml:23 doc/classes/Reference.xml:12
+#: doc/classes/Object.xml:23 doc/classes/RefCounted.xml:12
#: doc/classes/Resource.xml:11
msgid ""
"https://docs.godotengine.org/en/latest/getting_started/workflow/"
@@ -34581,7 +34581,7 @@ msgid "Changes the [Color] at the given index."
msgstr ""
#: doc/classes/PackedDataContainerRef.xml:4
-msgid "Reference version of [PackedDataContainer]."
+msgid "RefCounted version of [PackedDataContainer]."
msgstr ""
#: doc/classes/PackedFloat32Array.xml:4
@@ -34715,7 +34715,7 @@ msgid ""
"[codeblock]\n"
"# Use `load()` instead of `preload()` if the path isn't known at compile-"
"time.\n"
-"var scene = preload(\"res://scene.tscn\").instance()\n"
+"var scene = preload(\"res://scene.tscn\").instantiate()\n"
"# Add the node as a child of the node the script is attached to.\n"
"add_child(scene)\n"
"[/codeblock]\n"
@@ -41789,30 +41789,30 @@ msgid ""
"the half extents."
msgstr ""
-#: doc/classes/Reference.xml:4
+#: doc/classes/RefCounted.xml:4
msgid "Base class for reference-counted objects."
msgstr ""
-#: doc/classes/Reference.xml:7
+#: doc/classes/RefCounted.xml:7
msgid ""
"Base class for any object that keeps a reference count. [Resource] and many "
"other helper objects inherit this class.\n"
"Unlike [Object]s, References keep an internal reference counter so that they "
"are automatically released when no longer in use, and only then. References "
"therefore do not need to be freed manually with [method Object.free].\n"
-"In the vast majority of use cases, instantiating and using [Reference]-"
+"In the vast majority of use cases, instantiating and using [RefCounted]-"
"derived types is all you need to do. The methods provided in this class are "
"only for advanced users, and can cause issues if misused."
msgstr ""
-#: doc/classes/Reference.xml:19
+#: doc/classes/RefCounted.xml:19
msgid ""
"Initializes the internal reference counter. Use this only if you really know "
"what you are doing.\n"
"Returns whether the initialization was successful."
msgstr ""
-#: doc/classes/Reference.xml:27
+#: doc/classes/RefCounted.xml:27
msgid ""
"Increments the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -41820,7 +41820,7 @@ msgid ""
"code] otherwise."
msgstr ""
-#: doc/classes/Reference.xml:35
+#: doc/classes/RefCounted.xml:35
msgid ""
"Decrements the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -54084,7 +54084,7 @@ msgid ""
"[codeblock]\n"
"var foo = 2 # foo is dynamically an integer\n"
"foo = \"Now foo is a string!\"\n"
-"foo = Reference.new() # foo is an Object\n"
+"foo = RefCounted.new() # foo is an Object\n"
"var bar: int = 2 # bar is a statically typed integer.\n"
"# bar = \"Uh oh! I can't make static variables become a different type!\"\n"
"[/codeblock]\n"
@@ -59163,7 +59163,7 @@ msgstr ""
#: doc/classes/WeakRef.xml:7
msgid ""
-"A weakref can hold a [Reference], without contributing to the reference "
+"A weakref can hold a [RefCounted], without contributing to the reference "
"counter. A weakref can be created from an [Object] using [method @GDScript."
"weakref]. If this object is not a reference, weakref still works, however, "
"it does not have any effect on the object. Weakrefs are useful in cases "
diff --git a/doc/translations/tr.po b/doc/translations/tr.po
index a317f4ee83..646a3fb5b3 100644
--- a/doc/translations/tr.po
+++ b/doc/translations/tr.po
@@ -701,7 +701,7 @@ msgid ""
"the FileSystem dock into the script.\n"
"[codeblock]\n"
"# Instance a scene.\n"
-"var diamond = preload(\"res://diamond.tscn\").instance()\n"
+"var diamond = preload(\"res://diamond.tscn\").instantiate()\n"
"[/codeblock]"
msgstr ""
@@ -13825,7 +13825,7 @@ msgid ""
"Example of usage with custom scene instance:\n"
"[codeblock]\n"
"func _make_custom_tooltip(for_text):\n"
-" var tooltip = preload(\"SomeTooltipScene.tscn\").instance()\n"
+" var tooltip = preload(\"SomeTooltipScene.tscn\").instantiate()\n"
" tooltip.get_node(\"Label\").text = for_text\n"
" return tooltip\n"
"[/codeblock]"
@@ -33036,7 +33036,7 @@ msgid ""
"to delete instances of it manually. To do so, call the [method free] method "
"from your script or delete the instance from C++.\n"
"Some classes that extend Object add memory management. This is the case of "
-"[Reference], which counts references and deletes itself automatically when "
+"[RefCounted], which counts references and deletes itself automatically when "
"no longer referenced. [Node], another fundamental type, deletes all its "
"children when freed from memory.\n"
"Objects export properties, which are mainly useful for storage and editing, "
@@ -33055,12 +33055,12 @@ msgid ""
"Objects also receive notifications. Notifications are a simple way to notify "
"the object about different events, so they can all be handled together. See "
"[method _notification].\n"
-"[b]Note:[/b] Unlike references to a [Reference], references to an Object "
+"[b]Note:[/b] Unlike references to a [RefCounted], references to an Object "
"stored in a variable can become invalid without warning. Therefore, it's "
-"recommended to use [Reference] for data classes instead of [Object]."
+"recommended to use [RefCounted] for data classes instead of [Object]."
msgstr ""
-#: doc/classes/Object.xml:23 doc/classes/Reference.xml:12
+#: doc/classes/Object.xml:23 doc/classes/RefCounted.xml:12
#: doc/classes/Resource.xml:11
msgid ""
"https://docs.godotengine.org/en/latest/getting_started/workflow/"
@@ -34557,7 +34557,7 @@ msgid "Changes the [Color] at the given index."
msgstr ""
#: doc/classes/PackedDataContainerRef.xml:4
-msgid "Reference version of [PackedDataContainer]."
+msgid "RefCounted version of [PackedDataContainer]."
msgstr ""
#: doc/classes/PackedFloat32Array.xml:4
@@ -34691,7 +34691,7 @@ msgid ""
"[codeblock]\n"
"# Use `load()` instead of `preload()` if the path isn't known at compile-"
"time.\n"
-"var scene = preload(\"res://scene.tscn\").instance()\n"
+"var scene = preload(\"res://scene.tscn\").instantiate()\n"
"# Add the node as a child of the node the script is attached to.\n"
"add_child(scene)\n"
"[/codeblock]\n"
@@ -41765,30 +41765,30 @@ msgid ""
"the half extents."
msgstr ""
-#: doc/classes/Reference.xml:4
+#: doc/classes/RefCounted.xml:4
msgid "Base class for reference-counted objects."
msgstr ""
-#: doc/classes/Reference.xml:7
+#: doc/classes/RefCounted.xml:7
msgid ""
"Base class for any object that keeps a reference count. [Resource] and many "
"other helper objects inherit this class.\n"
"Unlike [Object]s, References keep an internal reference counter so that they "
"are automatically released when no longer in use, and only then. References "
"therefore do not need to be freed manually with [method Object.free].\n"
-"In the vast majority of use cases, instantiating and using [Reference]-"
+"In the vast majority of use cases, instantiating and using [RefCounted]-"
"derived types is all you need to do. The methods provided in this class are "
"only for advanced users, and can cause issues if misused."
msgstr ""
-#: doc/classes/Reference.xml:19
+#: doc/classes/RefCounted.xml:19
msgid ""
"Initializes the internal reference counter. Use this only if you really know "
"what you are doing.\n"
"Returns whether the initialization was successful."
msgstr ""
-#: doc/classes/Reference.xml:27
+#: doc/classes/RefCounted.xml:27
msgid ""
"Increments the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -41796,7 +41796,7 @@ msgid ""
"code] otherwise."
msgstr ""
-#: doc/classes/Reference.xml:35
+#: doc/classes/RefCounted.xml:35
msgid ""
"Decrements the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -54060,7 +54060,7 @@ msgid ""
"[codeblock]\n"
"var foo = 2 # foo is dynamically an integer\n"
"foo = \"Now foo is a string!\"\n"
-"foo = Reference.new() # foo is an Object\n"
+"foo = RefCounted.new() # foo is an Object\n"
"var bar: int = 2 # bar is a statically typed integer.\n"
"# bar = \"Uh oh! I can't make static variables become a different type!\"\n"
"[/codeblock]\n"
@@ -59139,7 +59139,7 @@ msgstr ""
#: doc/classes/WeakRef.xml:7
msgid ""
-"A weakref can hold a [Reference], without contributing to the reference "
+"A weakref can hold a [RefCounted], without contributing to the reference "
"counter. A weakref can be created from an [Object] using [method @GDScript."
"weakref]. If this object is not a reference, weakref still works, however, "
"it does not have any effect on the object. Weakrefs are useful in cases "
diff --git a/doc/translations/uk.po b/doc/translations/uk.po
index 8ca75e8b19..c2232d81ab 100644
--- a/doc/translations/uk.po
+++ b/doc/translations/uk.po
@@ -787,7 +787,7 @@ msgid ""
"the FileSystem dock into the script.\n"
"[codeblock]\n"
"# Instance a scene.\n"
-"var diamond = preload(\"res://diamond.tscn\").instance()\n"
+"var diamond = preload(\"res://diamond.tscn\").instantiate()\n"
"[/codeblock]"
msgstr ""
@@ -13911,7 +13911,7 @@ msgid ""
"Example of usage with custom scene instance:\n"
"[codeblock]\n"
"func _make_custom_tooltip(for_text):\n"
-" var tooltip = preload(\"SomeTooltipScene.tscn\").instance()\n"
+" var tooltip = preload(\"SomeTooltipScene.tscn\").instantiate()\n"
" tooltip.get_node(\"Label\").text = for_text\n"
" return tooltip\n"
"[/codeblock]"
@@ -33122,7 +33122,7 @@ msgid ""
"to delete instances of it manually. To do so, call the [method free] method "
"from your script or delete the instance from C++.\n"
"Some classes that extend Object add memory management. This is the case of "
-"[Reference], which counts references and deletes itself automatically when "
+"[RefCounted], which counts references and deletes itself automatically when "
"no longer referenced. [Node], another fundamental type, deletes all its "
"children when freed from memory.\n"
"Objects export properties, which are mainly useful for storage and editing, "
@@ -33141,12 +33141,12 @@ msgid ""
"Objects also receive notifications. Notifications are a simple way to notify "
"the object about different events, so they can all be handled together. See "
"[method _notification].\n"
-"[b]Note:[/b] Unlike references to a [Reference], references to an Object "
+"[b]Note:[/b] Unlike references to a [RefCounted], references to an Object "
"stored in a variable can become invalid without warning. Therefore, it's "
-"recommended to use [Reference] for data classes instead of [Object]."
+"recommended to use [RefCounted] for data classes instead of [Object]."
msgstr ""
-#: doc/classes/Object.xml:23 doc/classes/Reference.xml:12
+#: doc/classes/Object.xml:23 doc/classes/RefCounted.xml:12
#: doc/classes/Resource.xml:11
msgid ""
"https://docs.godotengine.org/en/latest/getting_started/workflow/"
@@ -34643,7 +34643,7 @@ msgid "Changes the [Color] at the given index."
msgstr ""
#: doc/classes/PackedDataContainerRef.xml:4
-msgid "Reference version of [PackedDataContainer]."
+msgid "RefCounted version of [PackedDataContainer]."
msgstr ""
#: doc/classes/PackedFloat32Array.xml:4
@@ -34777,7 +34777,7 @@ msgid ""
"[codeblock]\n"
"# Use `load()` instead of `preload()` if the path isn't known at compile-"
"time.\n"
-"var scene = preload(\"res://scene.tscn\").instance()\n"
+"var scene = preload(\"res://scene.tscn\").instantiate()\n"
"# Add the node as a child of the node the script is attached to.\n"
"add_child(scene)\n"
"[/codeblock]\n"
@@ -41851,30 +41851,30 @@ msgid ""
"the half extents."
msgstr ""
-#: doc/classes/Reference.xml:4
+#: doc/classes/RefCounted.xml:4
msgid "Base class for reference-counted objects."
msgstr ""
-#: doc/classes/Reference.xml:7
+#: doc/classes/RefCounted.xml:7
msgid ""
"Base class for any object that keeps a reference count. [Resource] and many "
"other helper objects inherit this class.\n"
"Unlike [Object]s, References keep an internal reference counter so that they "
"are automatically released when no longer in use, and only then. References "
"therefore do not need to be freed manually with [method Object.free].\n"
-"In the vast majority of use cases, instantiating and using [Reference]-"
+"In the vast majority of use cases, instantiating and using [RefCounted]-"
"derived types is all you need to do. The methods provided in this class are "
"only for advanced users, and can cause issues if misused."
msgstr ""
-#: doc/classes/Reference.xml:19
+#: doc/classes/RefCounted.xml:19
msgid ""
"Initializes the internal reference counter. Use this only if you really know "
"what you are doing.\n"
"Returns whether the initialization was successful."
msgstr ""
-#: doc/classes/Reference.xml:27
+#: doc/classes/RefCounted.xml:27
msgid ""
"Increments the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -41882,7 +41882,7 @@ msgid ""
"code] otherwise."
msgstr ""
-#: doc/classes/Reference.xml:35
+#: doc/classes/RefCounted.xml:35
msgid ""
"Decrements the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -54147,7 +54147,7 @@ msgid ""
"[codeblock]\n"
"var foo = 2 # foo is dynamically an integer\n"
"foo = \"Now foo is a string!\"\n"
-"foo = Reference.new() # foo is an Object\n"
+"foo = RefCounted.new() # foo is an Object\n"
"var bar: int = 2 # bar is a statically typed integer.\n"
"# bar = \"Uh oh! I can't make static variables become a different type!\"\n"
"[/codeblock]\n"
@@ -59237,7 +59237,7 @@ msgstr ""
#: doc/classes/WeakRef.xml:7
msgid ""
-"A weakref can hold a [Reference], without contributing to the reference "
+"A weakref can hold a [RefCounted], without contributing to the reference "
"counter. A weakref can be created from an [Object] using [method @GDScript."
"weakref]. If this object is not a reference, weakref still works, however, "
"it does not have any effect on the object. Weakrefs are useful in cases "
diff --git a/doc/translations/zh_Hans.po b/doc/translations/zh_Hans.po
index aee852699c..40d1eb68bc 100644
--- a/doc/translations/zh_Hans.po
+++ b/doc/translations/zh_Hans.po
@@ -934,7 +934,7 @@ msgid ""
"the FileSystem dock into the script.\n"
"[codeblock]\n"
"# Instance a scene.\n"
-"var diamond = preload(\"res://diamond.tscn\").instance()\n"
+"var diamond = preload(\"res://diamond.tscn\").instantiate()\n"
"[/codeblock]"
msgstr ""
@@ -14058,7 +14058,7 @@ msgid ""
"Example of usage with custom scene instance:\n"
"[codeblock]\n"
"func _make_custom_tooltip(for_text):\n"
-" var tooltip = preload(\"SomeTooltipScene.tscn\").instance()\n"
+" var tooltip = preload(\"SomeTooltipScene.tscn\").instantiate()\n"
" tooltip.get_node(\"Label\").text = for_text\n"
" return tooltip\n"
"[/codeblock]"
@@ -33272,7 +33272,7 @@ msgid ""
"to delete instances of it manually. To do so, call the [method free] method "
"from your script or delete the instance from C++.\n"
"Some classes that extend Object add memory management. This is the case of "
-"[Reference], which counts references and deletes itself automatically when "
+"[RefCounted], which counts references and deletes itself automatically when "
"no longer referenced. [Node], another fundamental type, deletes all its "
"children when freed from memory.\n"
"Objects export properties, which are mainly useful for storage and editing, "
@@ -33291,12 +33291,12 @@ msgid ""
"Objects also receive notifications. Notifications are a simple way to notify "
"the object about different events, so they can all be handled together. See "
"[method _notification].\n"
-"[b]Note:[/b] Unlike references to a [Reference], references to an Object "
+"[b]Note:[/b] Unlike references to a [RefCounted], references to an Object "
"stored in a variable can become invalid without warning. Therefore, it's "
-"recommended to use [Reference] for data classes instead of [Object]."
+"recommended to use [RefCounted] for data classes instead of [Object]."
msgstr ""
-#: doc/classes/Object.xml:23 doc/classes/Reference.xml:12
+#: doc/classes/Object.xml:23 doc/classes/RefCounted.xml:12
#: doc/classes/Resource.xml:11
msgid ""
"https://docs.godotengine.org/en/latest/getting_started/workflow/"
@@ -34794,7 +34794,7 @@ msgid "Changes the [Color] at the given index."
msgstr ""
#: doc/classes/PackedDataContainerRef.xml:4
-msgid "Reference version of [PackedDataContainer]."
+msgid "RefCounted version of [PackedDataContainer]."
msgstr ""
#: doc/classes/PackedFloat32Array.xml:4
@@ -34928,7 +34928,7 @@ msgid ""
"[codeblock]\n"
"# Use `load()` instead of `preload()` if the path isn't known at compile-"
"time.\n"
-"var scene = preload(\"res://scene.tscn\").instance()\n"
+"var scene = preload(\"res://scene.tscn\").instantiate()\n"
"# Add the node as a child of the node the script is attached to.\n"
"add_child(scene)\n"
"[/codeblock]\n"
@@ -42002,30 +42002,30 @@ msgid ""
"the half extents."
msgstr ""
-#: doc/classes/Reference.xml:4
+#: doc/classes/RefCounted.xml:4
msgid "Base class for reference-counted objects."
msgstr ""
-#: doc/classes/Reference.xml:7
+#: doc/classes/RefCounted.xml:7
msgid ""
"Base class for any object that keeps a reference count. [Resource] and many "
"other helper objects inherit this class.\n"
"Unlike [Object]s, References keep an internal reference counter so that they "
"are automatically released when no longer in use, and only then. References "
"therefore do not need to be freed manually with [method Object.free].\n"
-"In the vast majority of use cases, instantiating and using [Reference]-"
+"In the vast majority of use cases, instantiating and using [RefCounted]-"
"derived types is all you need to do. The methods provided in this class are "
"only for advanced users, and can cause issues if misused."
msgstr ""
-#: doc/classes/Reference.xml:19
+#: doc/classes/RefCounted.xml:19
msgid ""
"Initializes the internal reference counter. Use this only if you really know "
"what you are doing.\n"
"Returns whether the initialization was successful."
msgstr ""
-#: doc/classes/Reference.xml:27
+#: doc/classes/RefCounted.xml:27
msgid ""
"Increments the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -42033,7 +42033,7 @@ msgid ""
"code] otherwise."
msgstr ""
-#: doc/classes/Reference.xml:35
+#: doc/classes/RefCounted.xml:35
msgid ""
"Decrements the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -54298,7 +54298,7 @@ msgid ""
"[codeblock]\n"
"var foo = 2 # foo is dynamically an integer\n"
"foo = \"Now foo is a string!\"\n"
-"foo = Reference.new() # foo is an Object\n"
+"foo = RefCounted.new() # foo is an Object\n"
"var bar: int = 2 # bar is a statically typed integer.\n"
"# bar = \"Uh oh! I can't make static variables become a different type!\"\n"
"[/codeblock]\n"
@@ -59381,7 +59381,7 @@ msgstr ""
#: doc/classes/WeakRef.xml:7
msgid ""
-"A weakref can hold a [Reference], without contributing to the reference "
+"A weakref can hold a [RefCounted], without contributing to the reference "
"counter. A weakref can be created from an [Object] using [method @GDScript."
"weakref]. If this object is not a reference, weakref still works, however, "
"it does not have any effect on the object. Weakrefs are useful in cases "
diff --git a/doc/translations/zh_Hant.po b/doc/translations/zh_Hant.po
index 242c8cc086..13515dff67 100644
--- a/doc/translations/zh_Hant.po
+++ b/doc/translations/zh_Hant.po
@@ -738,7 +738,7 @@ msgid ""
"the FileSystem dock into the script.\n"
"[codeblock]\n"
"# Instance a scene.\n"
-"var diamond = preload(\"res://diamond.tscn\").instance()\n"
+"var diamond = preload(\"res://diamond.tscn\").instantiate()\n"
"[/codeblock]"
msgstr ""
@@ -13862,7 +13862,7 @@ msgid ""
"Example of usage with custom scene instance:\n"
"[codeblock]\n"
"func _make_custom_tooltip(for_text):\n"
-" var tooltip = preload(\"SomeTooltipScene.tscn\").instance()\n"
+" var tooltip = preload(\"SomeTooltipScene.tscn\").instantiate()\n"
" tooltip.get_node(\"Label\").text = for_text\n"
" return tooltip\n"
"[/codeblock]"
@@ -33073,7 +33073,7 @@ msgid ""
"to delete instances of it manually. To do so, call the [method free] method "
"from your script or delete the instance from C++.\n"
"Some classes that extend Object add memory management. This is the case of "
-"[Reference], which counts references and deletes itself automatically when "
+"[RefCounted], which counts references and deletes itself automatically when "
"no longer referenced. [Node], another fundamental type, deletes all its "
"children when freed from memory.\n"
"Objects export properties, which are mainly useful for storage and editing, "
@@ -33092,12 +33092,12 @@ msgid ""
"Objects also receive notifications. Notifications are a simple way to notify "
"the object about different events, so they can all be handled together. See "
"[method _notification].\n"
-"[b]Note:[/b] Unlike references to a [Reference], references to an Object "
+"[b]Note:[/b] Unlike references to a [RefCounted], references to an Object "
"stored in a variable can become invalid without warning. Therefore, it's "
-"recommended to use [Reference] for data classes instead of [Object]."
+"recommended to use [RefCounted] for data classes instead of [Object]."
msgstr ""
-#: doc/classes/Object.xml:23 doc/classes/Reference.xml:12
+#: doc/classes/Object.xml:23 doc/classes/RefCounted.xml:12
#: doc/classes/Resource.xml:11
msgid ""
"https://docs.godotengine.org/en/latest/getting_started/workflow/"
@@ -34594,7 +34594,7 @@ msgid "Changes the [Color] at the given index."
msgstr ""
#: doc/classes/PackedDataContainerRef.xml:4
-msgid "Reference version of [PackedDataContainer]."
+msgid "RefCounted version of [PackedDataContainer]."
msgstr ""
#: doc/classes/PackedFloat32Array.xml:4
@@ -34728,7 +34728,7 @@ msgid ""
"[codeblock]\n"
"# Use `load()` instead of `preload()` if the path isn't known at compile-"
"time.\n"
-"var scene = preload(\"res://scene.tscn\").instance()\n"
+"var scene = preload(\"res://scene.tscn\").instantiate()\n"
"# Add the node as a child of the node the script is attached to.\n"
"add_child(scene)\n"
"[/codeblock]\n"
@@ -41802,30 +41802,30 @@ msgid ""
"the half extents."
msgstr ""
-#: doc/classes/Reference.xml:4
+#: doc/classes/RefCounted.xml:4
msgid "Base class for reference-counted objects."
msgstr ""
-#: doc/classes/Reference.xml:7
+#: doc/classes/RefCounted.xml:7
msgid ""
"Base class for any object that keeps a reference count. [Resource] and many "
"other helper objects inherit this class.\n"
"Unlike [Object]s, References keep an internal reference counter so that they "
"are automatically released when no longer in use, and only then. References "
"therefore do not need to be freed manually with [method Object.free].\n"
-"In the vast majority of use cases, instantiating and using [Reference]-"
+"In the vast majority of use cases, instantiating and using [RefCounted]-"
"derived types is all you need to do. The methods provided in this class are "
"only for advanced users, and can cause issues if misused."
msgstr ""
-#: doc/classes/Reference.xml:19
+#: doc/classes/RefCounted.xml:19
msgid ""
"Initializes the internal reference counter. Use this only if you really know "
"what you are doing.\n"
"Returns whether the initialization was successful."
msgstr ""
-#: doc/classes/Reference.xml:27
+#: doc/classes/RefCounted.xml:27
msgid ""
"Increments the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -41833,7 +41833,7 @@ msgid ""
"code] otherwise."
msgstr ""
-#: doc/classes/Reference.xml:35
+#: doc/classes/RefCounted.xml:35
msgid ""
"Decrements the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -54098,7 +54098,7 @@ msgid ""
"[codeblock]\n"
"var foo = 2 # foo is dynamically an integer\n"
"foo = \"Now foo is a string!\"\n"
-"foo = Reference.new() # foo is an Object\n"
+"foo = RefCounted.new() # foo is an Object\n"
"var bar: int = 2 # bar is a statically typed integer.\n"
"# bar = \"Uh oh! I can't make static variables become a different type!\"\n"
"[/codeblock]\n"
@@ -59181,7 +59181,7 @@ msgstr ""
#: doc/classes/WeakRef.xml:7
msgid ""
-"A weakref can hold a [Reference], without contributing to the reference "
+"A weakref can hold a [RefCounted], without contributing to the reference "
"counter. A weakref can be created from an [Object] using [method @GDScript."
"weakref]. If this object is not a reference, weakref still works, however, "
"it does not have any effect on the object. Weakrefs are useful in cases "